@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
|
@@ -1,13 +1,5 @@
|
|
|
1
1
|
const NAMESPACE = 'taro-components';
|
|
2
2
|
|
|
3
|
-
/**
|
|
4
|
-
* Virtual DOM patching algorithm based on Snabbdom by
|
|
5
|
-
* Simon Friis Vindum (@paldepind)
|
|
6
|
-
* Licensed under the MIT License
|
|
7
|
-
* https://github.com/snabbdom/snabbdom/blob/master/LICENSE
|
|
8
|
-
*
|
|
9
|
-
* Modified for Stencil's renderer and slot projection
|
|
10
|
-
*/
|
|
11
3
|
let contentRef;
|
|
12
4
|
let hostTagName;
|
|
13
5
|
let useNativeShadowDom = false;
|
|
@@ -15,6 +7,63 @@ let checkSlotFallbackVisibility = false;
|
|
|
15
7
|
let checkSlotRelocate = false;
|
|
16
8
|
let isSvgMode = false;
|
|
17
9
|
let queuePending = false;
|
|
10
|
+
const win = typeof window !== 'undefined' ? window : {};
|
|
11
|
+
const doc = win.document || { head: {} };
|
|
12
|
+
const plt = {
|
|
13
|
+
$flags$: 0,
|
|
14
|
+
$resourcesUrl$: '',
|
|
15
|
+
jmp: (h) => h(),
|
|
16
|
+
raf: (h) => requestAnimationFrame(h),
|
|
17
|
+
ael: (el, eventName, listener, opts) => el.addEventListener(eventName, listener, opts),
|
|
18
|
+
rel: (el, eventName, listener, opts) => el.removeEventListener(eventName, listener, opts),
|
|
19
|
+
ce: (eventName, opts) => new CustomEvent(eventName, opts),
|
|
20
|
+
};
|
|
21
|
+
const promiseResolve = (v) => Promise.resolve(v);
|
|
22
|
+
const supportsConstructibleStylesheets = /*@__PURE__*/ (() => {
|
|
23
|
+
try {
|
|
24
|
+
new CSSStyleSheet();
|
|
25
|
+
return typeof new CSSStyleSheet().replace === 'function';
|
|
26
|
+
}
|
|
27
|
+
catch (e) { }
|
|
28
|
+
return false;
|
|
29
|
+
})()
|
|
30
|
+
;
|
|
31
|
+
const addHostEventListeners = (elm, hostRef, listeners, attachParentListeners) => {
|
|
32
|
+
if (listeners) {
|
|
33
|
+
listeners.map(([flags, name, method]) => {
|
|
34
|
+
const target = getHostListenerTarget(elm, flags) ;
|
|
35
|
+
const handler = hostListenerProxy(hostRef, method);
|
|
36
|
+
const opts = hostListenerOpts(flags);
|
|
37
|
+
plt.ael(target, name, handler, opts);
|
|
38
|
+
(hostRef.$rmListeners$ = hostRef.$rmListeners$ || []).push(() => plt.rel(target, name, handler, opts));
|
|
39
|
+
});
|
|
40
|
+
}
|
|
41
|
+
};
|
|
42
|
+
const hostListenerProxy = (hostRef, methodName) => (ev) => {
|
|
43
|
+
try {
|
|
44
|
+
{
|
|
45
|
+
if (hostRef.$flags$ & 256 /* isListenReady */) {
|
|
46
|
+
// instance is ready, let's call it's member method for this event
|
|
47
|
+
hostRef.$lazyInstance$[methodName](ev);
|
|
48
|
+
}
|
|
49
|
+
else {
|
|
50
|
+
(hostRef.$queuedListeners$ = hostRef.$queuedListeners$ || []).push([methodName, ev]);
|
|
51
|
+
}
|
|
52
|
+
}
|
|
53
|
+
}
|
|
54
|
+
catch (e) {
|
|
55
|
+
consoleError(e);
|
|
56
|
+
}
|
|
57
|
+
};
|
|
58
|
+
const getHostListenerTarget = (elm, flags) => {
|
|
59
|
+
if (flags & 4 /* TargetDocument */)
|
|
60
|
+
return doc;
|
|
61
|
+
return elm;
|
|
62
|
+
};
|
|
63
|
+
// prettier-ignore
|
|
64
|
+
const hostListenerOpts = (flags) => (flags & 2 /* Capture */) !== 0;
|
|
65
|
+
const HYDRATED_CSS = '{visibility:hidden}.hydrated{visibility:inherit}';
|
|
66
|
+
const XLINK_NS = 'http://www.w3.org/1999/xlink';
|
|
18
67
|
const createTime = (fnName, tagName = '') => {
|
|
19
68
|
{
|
|
20
69
|
return () => {
|
|
@@ -29,8 +78,59 @@ const uniqueTime = (key, measureText) => {
|
|
|
29
78
|
};
|
|
30
79
|
}
|
|
31
80
|
};
|
|
32
|
-
const
|
|
33
|
-
const
|
|
81
|
+
const rootAppliedStyles = new WeakMap();
|
|
82
|
+
const registerStyle = (scopeId, cssText, allowCS) => {
|
|
83
|
+
let style = styles.get(scopeId);
|
|
84
|
+
if (supportsConstructibleStylesheets && allowCS) {
|
|
85
|
+
style = (style || new CSSStyleSheet());
|
|
86
|
+
style.replace(cssText);
|
|
87
|
+
}
|
|
88
|
+
else {
|
|
89
|
+
style = cssText;
|
|
90
|
+
}
|
|
91
|
+
styles.set(scopeId, style);
|
|
92
|
+
};
|
|
93
|
+
const addStyle = (styleContainerNode, cmpMeta, mode, hostElm) => {
|
|
94
|
+
let scopeId = getScopeId(cmpMeta);
|
|
95
|
+
let style = styles.get(scopeId);
|
|
96
|
+
// if an element is NOT connected then getRootNode() will return the wrong root node
|
|
97
|
+
// so the fallback is to always use the document for the root node in those cases
|
|
98
|
+
styleContainerNode = styleContainerNode.nodeType === 11 /* DocumentFragment */ ? styleContainerNode : doc;
|
|
99
|
+
if (style) {
|
|
100
|
+
if (typeof style === 'string') {
|
|
101
|
+
styleContainerNode = styleContainerNode.head || styleContainerNode;
|
|
102
|
+
let appliedStyles = rootAppliedStyles.get(styleContainerNode);
|
|
103
|
+
let styleElm;
|
|
104
|
+
if (!appliedStyles) {
|
|
105
|
+
rootAppliedStyles.set(styleContainerNode, (appliedStyles = new Set()));
|
|
106
|
+
}
|
|
107
|
+
if (!appliedStyles.has(scopeId)) {
|
|
108
|
+
{
|
|
109
|
+
{
|
|
110
|
+
styleElm = doc.createElement('style');
|
|
111
|
+
styleElm.innerHTML = style;
|
|
112
|
+
}
|
|
113
|
+
styleContainerNode.insertBefore(styleElm, styleContainerNode.querySelector('link'));
|
|
114
|
+
}
|
|
115
|
+
if (appliedStyles) {
|
|
116
|
+
appliedStyles.add(scopeId);
|
|
117
|
+
}
|
|
118
|
+
}
|
|
119
|
+
}
|
|
120
|
+
else if (!styleContainerNode.adoptedStyleSheets.includes(style)) {
|
|
121
|
+
styleContainerNode.adoptedStyleSheets = [...styleContainerNode.adoptedStyleSheets, style];
|
|
122
|
+
}
|
|
123
|
+
}
|
|
124
|
+
return scopeId;
|
|
125
|
+
};
|
|
126
|
+
const attachStyles = (hostRef) => {
|
|
127
|
+
const cmpMeta = hostRef.$cmpMeta$;
|
|
128
|
+
const elm = hostRef.$hostElement$;
|
|
129
|
+
const endAttachStyles = createTime('attachStyles', cmpMeta.$tagName$);
|
|
130
|
+
addStyle(elm.getRootNode(), cmpMeta);
|
|
131
|
+
endAttachStyles();
|
|
132
|
+
};
|
|
133
|
+
const getScopeId = (cmp, mode) => 'sc-' + (cmp.$tagName$);
|
|
34
134
|
/**
|
|
35
135
|
* Default style mode id
|
|
36
136
|
*/
|
|
@@ -61,7 +161,7 @@ const h = (nodeName, vnodeData, ...children) => {
|
|
|
61
161
|
let slotName = null;
|
|
62
162
|
let simple = false;
|
|
63
163
|
let lastSimple = false;
|
|
64
|
-
|
|
164
|
+
let vNodeChildren = [];
|
|
65
165
|
const walk = (c) => {
|
|
66
166
|
for (let i = 0; i < c.length; i++) {
|
|
67
167
|
child = c[i];
|
|
@@ -173,137 +273,6 @@ const convertToPrivate = (node) => {
|
|
|
173
273
|
vnode.$name$ = node.vname;
|
|
174
274
|
return vnode;
|
|
175
275
|
};
|
|
176
|
-
/**
|
|
177
|
-
* Parse a new property value for a given property type.
|
|
178
|
-
*
|
|
179
|
-
* While the prop value can reasonably be expected to be of `any` type as far as TypeScript's type checker is concerned,
|
|
180
|
-
* it is not safe to assume that the string returned by evaluating `typeof propValue` matches:
|
|
181
|
-
* 1. `any`, the type given to `propValue` in the function signature
|
|
182
|
-
* 2. the type stored from `propType`.
|
|
183
|
-
*
|
|
184
|
-
* This function provides the capability to parse/coerce a property's value to potentially any other JavaScript type.
|
|
185
|
-
*
|
|
186
|
-
* Property values represented in TSX preserve their type information. In the example below, the number 0 is passed to
|
|
187
|
-
* a component. This `propValue` will preserve its type information (`typeof propValue === 'number'`). Note that is
|
|
188
|
-
* based on the type of the value being passed in, not the type declared of the class member decorated with `@Prop`.
|
|
189
|
-
* ```tsx
|
|
190
|
-
* <my-cmp prop-val={0}></my-cmp>
|
|
191
|
-
* ```
|
|
192
|
-
*
|
|
193
|
-
* HTML prop values on the other hand, will always a string
|
|
194
|
-
*
|
|
195
|
-
* @param propValue the new value to coerce to some type
|
|
196
|
-
* @param propType the type of the prop, expressed as a binary number
|
|
197
|
-
* @returns the parsed/coerced value
|
|
198
|
-
*/
|
|
199
|
-
const parsePropertyValue = (propValue, propType) => {
|
|
200
|
-
// ensure this value is of the correct prop type
|
|
201
|
-
if (propValue != null && !isComplexType(propValue)) {
|
|
202
|
-
if (propType & 4 /* MEMBER_FLAGS.Boolean */) {
|
|
203
|
-
// per the HTML spec, any string value means it is a boolean true value
|
|
204
|
-
// but we'll cheat here and say that the string "false" is the boolean false
|
|
205
|
-
return propValue === 'false' ? false : propValue === '' || !!propValue;
|
|
206
|
-
}
|
|
207
|
-
if (propType & 2 /* MEMBER_FLAGS.Number */) {
|
|
208
|
-
// force it to be a number
|
|
209
|
-
return parseFloat(propValue);
|
|
210
|
-
}
|
|
211
|
-
if (propType & 1 /* MEMBER_FLAGS.String */) {
|
|
212
|
-
// could have been passed as a number or boolean
|
|
213
|
-
// but we still want it as a string
|
|
214
|
-
return String(propValue);
|
|
215
|
-
}
|
|
216
|
-
// redundant return here for better minification
|
|
217
|
-
return propValue;
|
|
218
|
-
}
|
|
219
|
-
// not sure exactly what type we want
|
|
220
|
-
// so no need to change to a different type
|
|
221
|
-
return propValue;
|
|
222
|
-
};
|
|
223
|
-
const getElement = (ref) => (getHostRef(ref).$hostElement$ );
|
|
224
|
-
const createEvent = (ref, name, flags) => {
|
|
225
|
-
const elm = getElement(ref);
|
|
226
|
-
return {
|
|
227
|
-
emit: (detail) => {
|
|
228
|
-
return emitEvent(elm, name, {
|
|
229
|
-
bubbles: !!(flags & 4 /* EVENT_FLAGS.Bubbles */),
|
|
230
|
-
composed: !!(flags & 2 /* EVENT_FLAGS.Composed */),
|
|
231
|
-
cancelable: !!(flags & 1 /* EVENT_FLAGS.Cancellable */),
|
|
232
|
-
detail,
|
|
233
|
-
});
|
|
234
|
-
},
|
|
235
|
-
};
|
|
236
|
-
};
|
|
237
|
-
/**
|
|
238
|
-
* Helper function to create & dispatch a custom Event on a provided target
|
|
239
|
-
* @param elm the target of the Event
|
|
240
|
-
* @param name the name to give the custom Event
|
|
241
|
-
* @param opts options for configuring a custom Event
|
|
242
|
-
* @returns the custom Event
|
|
243
|
-
*/
|
|
244
|
-
const emitEvent = (elm, name, opts) => {
|
|
245
|
-
const ev = plt.ce(name, opts);
|
|
246
|
-
elm.dispatchEvent(ev);
|
|
247
|
-
return ev;
|
|
248
|
-
};
|
|
249
|
-
const rootAppliedStyles = /*@__PURE__*/ new WeakMap();
|
|
250
|
-
const registerStyle = (scopeId, cssText, allowCS) => {
|
|
251
|
-
let style = styles.get(scopeId);
|
|
252
|
-
if (supportsConstructableStylesheets && allowCS) {
|
|
253
|
-
style = (style || new CSSStyleSheet());
|
|
254
|
-
if (typeof style === 'string') {
|
|
255
|
-
style = cssText;
|
|
256
|
-
}
|
|
257
|
-
else {
|
|
258
|
-
style.replaceSync(cssText);
|
|
259
|
-
}
|
|
260
|
-
}
|
|
261
|
-
else {
|
|
262
|
-
style = cssText;
|
|
263
|
-
}
|
|
264
|
-
styles.set(scopeId, style);
|
|
265
|
-
};
|
|
266
|
-
const addStyle = (styleContainerNode, cmpMeta, mode, hostElm) => {
|
|
267
|
-
let scopeId = getScopeId(cmpMeta);
|
|
268
|
-
const style = styles.get(scopeId);
|
|
269
|
-
// if an element is NOT connected then getRootNode() will return the wrong root node
|
|
270
|
-
// so the fallback is to always use the document for the root node in those cases
|
|
271
|
-
styleContainerNode = styleContainerNode.nodeType === 11 /* NODE_TYPE.DocumentFragment */ ? styleContainerNode : doc;
|
|
272
|
-
if (style) {
|
|
273
|
-
if (typeof style === 'string') {
|
|
274
|
-
styleContainerNode = styleContainerNode.head || styleContainerNode;
|
|
275
|
-
let appliedStyles = rootAppliedStyles.get(styleContainerNode);
|
|
276
|
-
let styleElm;
|
|
277
|
-
if (!appliedStyles) {
|
|
278
|
-
rootAppliedStyles.set(styleContainerNode, (appliedStyles = new Set()));
|
|
279
|
-
}
|
|
280
|
-
if (!appliedStyles.has(scopeId)) {
|
|
281
|
-
{
|
|
282
|
-
{
|
|
283
|
-
styleElm = doc.createElement('style');
|
|
284
|
-
styleElm.innerHTML = style;
|
|
285
|
-
}
|
|
286
|
-
styleContainerNode.insertBefore(styleElm, styleContainerNode.querySelector('link'));
|
|
287
|
-
}
|
|
288
|
-
if (appliedStyles) {
|
|
289
|
-
appliedStyles.add(scopeId);
|
|
290
|
-
}
|
|
291
|
-
}
|
|
292
|
-
}
|
|
293
|
-
else if (!styleContainerNode.adoptedStyleSheets.includes(style)) {
|
|
294
|
-
styleContainerNode.adoptedStyleSheets = [...styleContainerNode.adoptedStyleSheets, style];
|
|
295
|
-
}
|
|
296
|
-
}
|
|
297
|
-
return scopeId;
|
|
298
|
-
};
|
|
299
|
-
const attachStyles = (hostRef) => {
|
|
300
|
-
const cmpMeta = hostRef.$cmpMeta$;
|
|
301
|
-
const elm = hostRef.$hostElement$;
|
|
302
|
-
const endAttachStyles = createTime('attachStyles', cmpMeta.$tagName$);
|
|
303
|
-
addStyle(elm.getRootNode(), cmpMeta);
|
|
304
|
-
endAttachStyles();
|
|
305
|
-
};
|
|
306
|
-
const getScopeId = (cmp, mode) => 'sc-' + (cmp.$tagName$);
|
|
307
276
|
/**
|
|
308
277
|
* Production setAccessor() function based on Preact by
|
|
309
278
|
* Jason Miller (@developit)
|
|
@@ -401,7 +370,7 @@ const setAccessor = (elm, memberName, oldValue, newValue, isSvg, flags) => {
|
|
|
401
370
|
if ((isProp || (isComplex && newValue !== null)) && !isSvg) {
|
|
402
371
|
try {
|
|
403
372
|
if (!elm.tagName.includes('-')) {
|
|
404
|
-
|
|
373
|
+
let n = newValue == null ? '' : newValue;
|
|
405
374
|
// Workaround for Safari, moving the <input> caret when re-assigning the same valued
|
|
406
375
|
if (memberName === 'list') {
|
|
407
376
|
isProp = false;
|
|
@@ -440,7 +409,7 @@ const setAccessor = (elm, memberName, oldValue, newValue, isSvg, flags) => {
|
|
|
440
409
|
}
|
|
441
410
|
}
|
|
442
411
|
}
|
|
443
|
-
else if ((!isProp || flags & 4 /*
|
|
412
|
+
else if ((!isProp || flags & 4 /* isHost */ || isSvg) && !isComplex) {
|
|
444
413
|
newValue = newValue === true ? '' : newValue;
|
|
445
414
|
if (xlink) {
|
|
446
415
|
elm.setAttributeNS(XLINK_NS, memberName, newValue);
|
|
@@ -458,7 +427,7 @@ const updateElement = (oldVnode, newVnode, isSvgMode, memberName) => {
|
|
|
458
427
|
// if the element passed in is a shadow root, which is a document fragment
|
|
459
428
|
// then we want to be adding attrs/props to the shadow root's "host" element
|
|
460
429
|
// if it's not a shadow root, then we add attrs/props to the same element
|
|
461
|
-
const elm = newVnode.$elm$.nodeType === 11 /*
|
|
430
|
+
const elm = newVnode.$elm$.nodeType === 11 /* DocumentFragment */ && newVnode.$elm$.host
|
|
462
431
|
? newVnode.$elm$.host
|
|
463
432
|
: newVnode.$elm$;
|
|
464
433
|
const oldVnodeAttrs = (oldVnode && oldVnode.$attrs$) || EMPTY_OBJ;
|
|
@@ -476,19 +445,9 @@ const updateElement = (oldVnode, newVnode, isSvgMode, memberName) => {
|
|
|
476
445
|
setAccessor(elm, memberName, oldVnodeAttrs[memberName], newVnodeAttrs[memberName], isSvgMode, newVnode.$flags$);
|
|
477
446
|
}
|
|
478
447
|
};
|
|
479
|
-
/**
|
|
480
|
-
* Create a DOM Node corresponding to one of the children of a given VNode.
|
|
481
|
-
*
|
|
482
|
-
* @param oldParentVNode the parent VNode from the previous render
|
|
483
|
-
* @param newParentVNode the parent VNode from the current render
|
|
484
|
-
* @param childIndex the index of the VNode, in the _new_ parent node's
|
|
485
|
-
* children, for which we will create a new DOM node
|
|
486
|
-
* @param parentElm the parent DOM node which our new node will be a child of
|
|
487
|
-
* @returns the newly created node
|
|
488
|
-
*/
|
|
489
448
|
const createElm = (oldParentVNode, newParentVNode, childIndex, parentElm) => {
|
|
490
449
|
// tslint:disable-next-line: prefer-const
|
|
491
|
-
|
|
450
|
+
let newVNode = newParentVNode.$children$[childIndex];
|
|
492
451
|
let i = 0;
|
|
493
452
|
let elm;
|
|
494
453
|
let childNode;
|
|
@@ -499,23 +458,23 @@ const createElm = (oldParentVNode, newParentVNode, childIndex, parentElm) => {
|
|
|
499
458
|
if (newVNode.$tag$ === 'slot') {
|
|
500
459
|
newVNode.$flags$ |= newVNode.$children$
|
|
501
460
|
? // slot element has fallback content
|
|
502
|
-
2 /*
|
|
461
|
+
2 /* isSlotFallback */
|
|
503
462
|
: // slot element does not have fallback content
|
|
504
|
-
1 /*
|
|
463
|
+
1 /* isSlotReference */;
|
|
505
464
|
}
|
|
506
465
|
}
|
|
507
466
|
if (newVNode.$text$ !== null) {
|
|
508
467
|
// create text node
|
|
509
468
|
elm = newVNode.$elm$ = doc.createTextNode(newVNode.$text$);
|
|
510
469
|
}
|
|
511
|
-
else if (newVNode.$flags$ & 1 /*
|
|
470
|
+
else if (newVNode.$flags$ & 1 /* isSlotReference */) {
|
|
512
471
|
// create a slot reference node
|
|
513
472
|
elm = newVNode.$elm$ =
|
|
514
473
|
doc.createTextNode('');
|
|
515
474
|
}
|
|
516
475
|
else {
|
|
517
476
|
// create element
|
|
518
|
-
elm = newVNode.$elm$ = (doc.createElement(newVNode.$flags$ & 2 /*
|
|
477
|
+
elm = newVNode.$elm$ = (doc.createElement(newVNode.$flags$ & 2 /* isSlotFallback */
|
|
519
478
|
? 'slot-fb'
|
|
520
479
|
: newVNode.$tag$));
|
|
521
480
|
// add css classes, attrs, props, listeners, etc.
|
|
@@ -536,7 +495,7 @@ const createElm = (oldParentVNode, newParentVNode, childIndex, parentElm) => {
|
|
|
536
495
|
}
|
|
537
496
|
{
|
|
538
497
|
elm['s-hn'] = hostTagName;
|
|
539
|
-
if (newVNode.$flags$ & (2 /*
|
|
498
|
+
if (newVNode.$flags$ & (2 /* isSlotFallback */ | 1 /* isSlotReference */)) {
|
|
540
499
|
// remember the content reference comment
|
|
541
500
|
elm['s-sr'] = true;
|
|
542
501
|
// remember the content reference comment
|
|
@@ -555,7 +514,7 @@ const createElm = (oldParentVNode, newParentVNode, childIndex, parentElm) => {
|
|
|
555
514
|
return elm;
|
|
556
515
|
};
|
|
557
516
|
const putBackInOriginalLocation = (parentElm, recursive) => {
|
|
558
|
-
plt.$flags$ |= 1 /*
|
|
517
|
+
plt.$flags$ |= 1 /* isTmpDisconnected */;
|
|
559
518
|
const oldSlotChildNodes = parentElm.childNodes;
|
|
560
519
|
for (let i = oldSlotChildNodes.length - 1; i >= 0; i--) {
|
|
561
520
|
const childNode = oldSlotChildNodes[i];
|
|
@@ -576,7 +535,7 @@ const putBackInOriginalLocation = (parentElm, recursive) => {
|
|
|
576
535
|
putBackInOriginalLocation(childNode, recursive);
|
|
577
536
|
}
|
|
578
537
|
}
|
|
579
|
-
plt.$flags$ &= ~1 /*
|
|
538
|
+
plt.$flags$ &= ~1 /* isTmpDisconnected */;
|
|
580
539
|
};
|
|
581
540
|
const addVnodes = (parentElm, before, parentVNode, vnodes, startIdx, endIdx) => {
|
|
582
541
|
let containerElm = ((parentElm['s-cr'] && parentElm['s-cr'].parentNode) || parentElm);
|
|
@@ -615,74 +574,6 @@ const removeVnodes = (vnodes, startIdx, endIdx, vnode, elm) => {
|
|
|
615
574
|
}
|
|
616
575
|
}
|
|
617
576
|
};
|
|
618
|
-
/**
|
|
619
|
-
* Reconcile the children of a new VNode with the children of an old VNode by
|
|
620
|
-
* traversing the two collections of children, identifying nodes that are
|
|
621
|
-
* conserved or changed, calling out to `patch` to make any necessary
|
|
622
|
-
* updates to the DOM, and rearranging DOM nodes as needed.
|
|
623
|
-
*
|
|
624
|
-
* The algorithm for reconciling children works by analyzing two 'windows' onto
|
|
625
|
-
* the two arrays of children (`oldCh` and `newCh`). We keep track of the
|
|
626
|
-
* 'windows' by storing start and end indices and references to the
|
|
627
|
-
* corresponding array entries. Initially the two 'windows' are basically equal
|
|
628
|
-
* to the entire array, but we progressively narrow the windows until there are
|
|
629
|
-
* no children left to update by doing the following:
|
|
630
|
-
*
|
|
631
|
-
* 1. Skip any `null` entries at the beginning or end of the two arrays, so
|
|
632
|
-
* that if we have an initial array like the following we'll end up dealing
|
|
633
|
-
* only with a window bounded by the highlighted elements:
|
|
634
|
-
*
|
|
635
|
-
* [null, null, VNode1 , ... , VNode2, null, null]
|
|
636
|
-
* ^^^^^^ ^^^^^^
|
|
637
|
-
*
|
|
638
|
-
* 2. Check to see if the elements at the head and tail positions are equal
|
|
639
|
-
* across the windows. This will basically detect elements which haven't
|
|
640
|
-
* been added, removed, or changed position, i.e. if you had the following
|
|
641
|
-
* VNode elements (represented as HTML):
|
|
642
|
-
*
|
|
643
|
-
* oldVNode: `<div><p><span>HEY</span></p></div>`
|
|
644
|
-
* newVNode: `<div><p><span>THERE</span></p></div>`
|
|
645
|
-
*
|
|
646
|
-
* Then when comparing the children of the `<div>` tag we check the equality
|
|
647
|
-
* of the VNodes corresponding to the `<p>` tags and, since they are the
|
|
648
|
-
* same tag in the same position, we'd be able to avoid completely
|
|
649
|
-
* re-rendering the subtree under them with a new DOM element and would just
|
|
650
|
-
* call out to `patch` to handle reconciling their children and so on.
|
|
651
|
-
*
|
|
652
|
-
* 3. Check, for both windows, to see if the element at the beginning of the
|
|
653
|
-
* window corresponds to the element at the end of the other window. This is
|
|
654
|
-
* a heuristic which will let us identify _some_ situations in which
|
|
655
|
-
* elements have changed position, for instance it _should_ detect that the
|
|
656
|
-
* children nodes themselves have not changed but merely moved in the
|
|
657
|
-
* following example:
|
|
658
|
-
*
|
|
659
|
-
* oldVNode: `<div><element-one /><element-two /></div>`
|
|
660
|
-
* newVNode: `<div><element-two /><element-one /></div>`
|
|
661
|
-
*
|
|
662
|
-
* If we find cases like this then we also need to move the concrete DOM
|
|
663
|
-
* elements corresponding to the moved children to write the re-order to the
|
|
664
|
-
* DOM.
|
|
665
|
-
*
|
|
666
|
-
* 4. Finally, if VNodes have the `key` attribute set on them we check for any
|
|
667
|
-
* nodes in the old children which have the same key as the first element in
|
|
668
|
-
* our window on the new children. If we find such a node we handle calling
|
|
669
|
-
* out to `patch`, moving relevant DOM nodes, and so on, in accordance with
|
|
670
|
-
* what we find.
|
|
671
|
-
*
|
|
672
|
-
* Finally, once we've narrowed our 'windows' to the point that either of them
|
|
673
|
-
* collapse (i.e. they have length 0) we then handle any remaining VNode
|
|
674
|
-
* insertion or deletion that needs to happen to get a DOM state that correctly
|
|
675
|
-
* reflects the new child VNodes. If, for instance, after our window on the old
|
|
676
|
-
* children has collapsed we still have more nodes on the new children that
|
|
677
|
-
* we haven't dealt with yet then we need to add them, or if the new children
|
|
678
|
-
* collapse but we still have unhandled _old_ children then we need to make
|
|
679
|
-
* sure the corresponding DOM nodes are removed.
|
|
680
|
-
*
|
|
681
|
-
* @param parentElm the node into which the parent VNode is rendered
|
|
682
|
-
* @param oldCh the old children of the parent node
|
|
683
|
-
* @param newVNode the new VNode which will replace the parent
|
|
684
|
-
* @param newCh the new children of the parent node
|
|
685
|
-
*/
|
|
686
577
|
const updateChildren = (parentElm, oldCh, newVNode, newCh) => {
|
|
687
578
|
let oldStartIdx = 0;
|
|
688
579
|
let newStartIdx = 0;
|
|
@@ -698,7 +589,7 @@ const updateChildren = (parentElm, oldCh, newVNode, newCh) => {
|
|
|
698
589
|
let elmToMove;
|
|
699
590
|
while (oldStartIdx <= oldEndIdx && newStartIdx <= newEndIdx) {
|
|
700
591
|
if (oldStartVnode == null) {
|
|
701
|
-
//
|
|
592
|
+
// Vnode might have been moved left
|
|
702
593
|
oldStartVnode = oldCh[++oldStartIdx];
|
|
703
594
|
}
|
|
704
595
|
else if (oldEndVnode == null) {
|
|
@@ -711,100 +602,37 @@ const updateChildren = (parentElm, oldCh, newVNode, newCh) => {
|
|
|
711
602
|
newEndVnode = newCh[--newEndIdx];
|
|
712
603
|
}
|
|
713
604
|
else if (isSameVnode(oldStartVnode, newStartVnode)) {
|
|
714
|
-
// if the start nodes are the same then we should patch the new VNode
|
|
715
|
-
// onto the old one, and increment our `newStartIdx` and `oldStartIdx`
|
|
716
|
-
// indices to reflect that. We don't need to move any DOM Nodes around
|
|
717
|
-
// since things are matched up in order.
|
|
718
605
|
patch(oldStartVnode, newStartVnode);
|
|
719
606
|
oldStartVnode = oldCh[++oldStartIdx];
|
|
720
607
|
newStartVnode = newCh[++newStartIdx];
|
|
721
608
|
}
|
|
722
609
|
else if (isSameVnode(oldEndVnode, newEndVnode)) {
|
|
723
|
-
// likewise, if the end nodes are the same we patch new onto old and
|
|
724
|
-
// decrement our end indices, and also likewise in this case we don't
|
|
725
|
-
// need to move any DOM Nodes.
|
|
726
610
|
patch(oldEndVnode, newEndVnode);
|
|
727
611
|
oldEndVnode = oldCh[--oldEndIdx];
|
|
728
612
|
newEndVnode = newCh[--newEndIdx];
|
|
729
613
|
}
|
|
730
614
|
else if (isSameVnode(oldStartVnode, newEndVnode)) {
|
|
731
|
-
//
|
|
732
|
-
//
|
|
733
|
-
// We've found that the last node in our window on the new children is
|
|
734
|
-
// the same VNode as the _first_ node in our window on the old children
|
|
735
|
-
// we're dealing with now. Visually, this is the layout of these two
|
|
736
|
-
// nodes:
|
|
737
|
-
//
|
|
738
|
-
// newCh: [..., newStartVnode , ... , newEndVnode , ...]
|
|
739
|
-
// ^^^^^^^^^^^
|
|
740
|
-
// oldCh: [..., oldStartVnode , ... , oldEndVnode , ...]
|
|
741
|
-
// ^^^^^^^^^^^^^
|
|
742
|
-
//
|
|
743
|
-
// In this situation we need to patch `newEndVnode` onto `oldStartVnode`
|
|
744
|
-
// and move the DOM element for `oldStartVnode`.
|
|
615
|
+
// Vnode moved right
|
|
745
616
|
if ((oldStartVnode.$tag$ === 'slot' || newEndVnode.$tag$ === 'slot')) {
|
|
746
617
|
putBackInOriginalLocation(oldStartVnode.$elm$.parentNode, false);
|
|
747
618
|
}
|
|
748
619
|
patch(oldStartVnode, newEndVnode);
|
|
749
|
-
// We need to move the element for `oldStartVnode` into a position which
|
|
750
|
-
// will be appropriate for `newEndVnode`. For this we can use
|
|
751
|
-
// `.insertBefore` and `oldEndVnode.$elm$.nextSibling`. If there is a
|
|
752
|
-
// sibling for `oldEndVnode.$elm$` then we want to move the DOM node for
|
|
753
|
-
// `oldStartVnode` between `oldEndVnode` and it's sibling, like so:
|
|
754
|
-
//
|
|
755
|
-
// <old-start-node />
|
|
756
|
-
// <some-intervening-node />
|
|
757
|
-
// <old-end-node />
|
|
758
|
-
// <!-- -> <-- `oldStartVnode.$elm$` should be inserted here
|
|
759
|
-
// <next-sibling />
|
|
760
|
-
//
|
|
761
|
-
// If instead `oldEndVnode.$elm$` has no sibling then we just want to put
|
|
762
|
-
// the node for `oldStartVnode` at the end of the children of
|
|
763
|
-
// `parentElm`. Luckily, `Node.nextSibling` will return `null` if there
|
|
764
|
-
// aren't any siblings, and passing `null` to `Node.insertBefore` will
|
|
765
|
-
// append it to the children of the parent element.
|
|
766
620
|
parentElm.insertBefore(oldStartVnode.$elm$, oldEndVnode.$elm$.nextSibling);
|
|
767
621
|
oldStartVnode = oldCh[++oldStartIdx];
|
|
768
622
|
newEndVnode = newCh[--newEndIdx];
|
|
769
623
|
}
|
|
770
624
|
else if (isSameVnode(oldEndVnode, newStartVnode)) {
|
|
771
|
-
//
|
|
772
|
-
//
|
|
773
|
-
// We've found that the first node in our window on the new children is
|
|
774
|
-
// the same VNode as the _last_ node in our window on the old children.
|
|
775
|
-
// Visually, this is the layout of these two nodes:
|
|
776
|
-
//
|
|
777
|
-
// newCh: [..., newStartVnode , ... , newEndVnode , ...]
|
|
778
|
-
// ^^^^^^^^^^^^^
|
|
779
|
-
// oldCh: [..., oldStartVnode , ... , oldEndVnode , ...]
|
|
780
|
-
// ^^^^^^^^^^^
|
|
781
|
-
//
|
|
782
|
-
// In this situation we need to patch `newStartVnode` onto `oldEndVnode`
|
|
783
|
-
// (which will handle updating any changed attributes, reconciling their
|
|
784
|
-
// children etc) but we also need to move the DOM node to which
|
|
785
|
-
// `oldEndVnode` corresponds.
|
|
625
|
+
// Vnode moved left
|
|
786
626
|
if ((oldStartVnode.$tag$ === 'slot' || newEndVnode.$tag$ === 'slot')) {
|
|
787
627
|
putBackInOriginalLocation(oldEndVnode.$elm$.parentNode, false);
|
|
788
628
|
}
|
|
789
629
|
patch(oldEndVnode, newStartVnode);
|
|
790
|
-
// We've already checked above if `oldStartVnode` and `newStartVnode` are
|
|
791
|
-
// the same node, so since we're here we know that they are not. Thus we
|
|
792
|
-
// can move the element for `oldEndVnode` _before_ the element for
|
|
793
|
-
// `oldStartVnode`, leaving `oldStartVnode` to be reconciled in the
|
|
794
|
-
// future.
|
|
795
630
|
parentElm.insertBefore(oldEndVnode.$elm$, oldStartVnode.$elm$);
|
|
796
631
|
oldEndVnode = oldCh[--oldEndIdx];
|
|
797
632
|
newStartVnode = newCh[++newStartIdx];
|
|
798
633
|
}
|
|
799
634
|
else {
|
|
800
|
-
//
|
|
801
|
-
// `$key$` attribute, which is set by putting a `key="my-key"` attribute
|
|
802
|
-
// in the JSX for a DOM element in the implementation of a Stencil
|
|
803
|
-
// component.
|
|
804
|
-
//
|
|
805
|
-
// First we check to see if there are any nodes in the array of old
|
|
806
|
-
// children which have the same key as the first node in the new
|
|
807
|
-
// children.
|
|
635
|
+
// createKeyToOldIdx
|
|
808
636
|
idxInOld = -1;
|
|
809
637
|
{
|
|
810
638
|
for (i = oldStartIdx; i <= oldEndIdx; ++i) {
|
|
@@ -815,32 +643,23 @@ const updateChildren = (parentElm, oldCh, newVNode, newCh) => {
|
|
|
815
643
|
}
|
|
816
644
|
}
|
|
817
645
|
if (idxInOld >= 0) {
|
|
818
|
-
// We found a node in the old children which matches up with the first
|
|
819
|
-
// node in the new children! So let's deal with that
|
|
820
646
|
elmToMove = oldCh[idxInOld];
|
|
821
647
|
if (elmToMove.$tag$ !== newStartVnode.$tag$) {
|
|
822
|
-
// the tag doesn't match so we'll need a new DOM element
|
|
823
648
|
node = createElm(oldCh && oldCh[newStartIdx], newVNode, idxInOld);
|
|
824
649
|
}
|
|
825
650
|
else {
|
|
826
651
|
patch(elmToMove, newStartVnode);
|
|
827
|
-
// invalidate the matching old node so that we won't try to update it
|
|
828
|
-
// again later on
|
|
829
652
|
oldCh[idxInOld] = undefined;
|
|
830
653
|
node = elmToMove.$elm$;
|
|
831
654
|
}
|
|
832
655
|
newStartVnode = newCh[++newStartIdx];
|
|
833
656
|
}
|
|
834
657
|
else {
|
|
835
|
-
//
|
|
836
|
-
// the key of the first new child OR the build is not using `key`
|
|
837
|
-
// attributes at all. In either case we need to create a new element
|
|
838
|
-
// for the new node.
|
|
658
|
+
// new element
|
|
839
659
|
node = createElm(oldCh && oldCh[newStartIdx], newVNode, newStartIdx);
|
|
840
660
|
newStartVnode = newCh[++newStartIdx];
|
|
841
661
|
}
|
|
842
662
|
if (node) {
|
|
843
|
-
// if we created a new node then handle inserting it to the DOM
|
|
844
663
|
{
|
|
845
664
|
parentReferenceNode(oldStartVnode.$elm$).insertBefore(node, referenceNode(oldStartVnode.$elm$));
|
|
846
665
|
}
|
|
@@ -848,43 +667,21 @@ const updateChildren = (parentElm, oldCh, newVNode, newCh) => {
|
|
|
848
667
|
}
|
|
849
668
|
}
|
|
850
669
|
if (oldStartIdx > oldEndIdx) {
|
|
851
|
-
// we have some more new nodes to add which don't match up with old nodes
|
|
852
670
|
addVnodes(parentElm, newCh[newEndIdx + 1] == null ? null : newCh[newEndIdx + 1].$elm$, newVNode, newCh, newStartIdx, newEndIdx);
|
|
853
671
|
}
|
|
854
672
|
else if (newStartIdx > newEndIdx) {
|
|
855
|
-
// there are nodes in the `oldCh` array which no longer correspond to nodes
|
|
856
|
-
// in the new array, so lets remove them (which entails cleaning up the
|
|
857
|
-
// relevant DOM nodes)
|
|
858
673
|
removeVnodes(oldCh, oldStartIdx, oldEndIdx);
|
|
859
674
|
}
|
|
860
675
|
};
|
|
861
|
-
|
|
862
|
-
* Compare two VNodes to determine if they are the same
|
|
863
|
-
*
|
|
864
|
-
* **NB**: This function is an equality _heuristic_ based on the available
|
|
865
|
-
* information set on the two VNodes and can be misleading under certain
|
|
866
|
-
* circumstances. In particular, if the two nodes do not have `key` attrs
|
|
867
|
-
* (available under `$key$` on VNodes) then the function falls back on merely
|
|
868
|
-
* checking that they have the same tag.
|
|
869
|
-
*
|
|
870
|
-
* So, in other words, if `key` attrs are not set on VNodes which may be
|
|
871
|
-
* changing order within a `children` array or something along those lines then
|
|
872
|
-
* we could obtain a false positive and then have to do needless re-rendering.
|
|
873
|
-
*
|
|
874
|
-
* @param leftVNode the first VNode to check
|
|
875
|
-
* @param rightVNode the second VNode to check
|
|
876
|
-
* @returns whether they're equal or not
|
|
877
|
-
*/
|
|
878
|
-
const isSameVnode = (leftVNode, rightVNode) => {
|
|
676
|
+
const isSameVnode = (vnode1, vnode2) => {
|
|
879
677
|
// compare if two vnode to see if they're "technically" the same
|
|
880
678
|
// need to have the same element tag, and same key to be the same
|
|
881
|
-
if (
|
|
882
|
-
if (
|
|
883
|
-
return
|
|
679
|
+
if (vnode1.$tag$ === vnode2.$tag$) {
|
|
680
|
+
if (vnode1.$tag$ === 'slot') {
|
|
681
|
+
return vnode1.$name$ === vnode2.$name$;
|
|
884
682
|
}
|
|
885
|
-
// this will be set if components in the build have `key` attrs set on them
|
|
886
683
|
{
|
|
887
|
-
return
|
|
684
|
+
return vnode1.$key$ === vnode2.$key$;
|
|
888
685
|
}
|
|
889
686
|
}
|
|
890
687
|
return false;
|
|
@@ -897,14 +694,6 @@ const referenceNode = (node) => {
|
|
|
897
694
|
return (node && node['s-ol']) || node;
|
|
898
695
|
};
|
|
899
696
|
const parentReferenceNode = (node) => (node['s-ol'] ? node['s-ol'] : node).parentNode;
|
|
900
|
-
/**
|
|
901
|
-
* Handle reconciling an outdated VNode with a new one which corresponds to
|
|
902
|
-
* it. This function handles flushing updates to the DOM and reconciling the
|
|
903
|
-
* children of the two nodes (if any).
|
|
904
|
-
*
|
|
905
|
-
* @param oldVNode an old VNode whose DOM element and children we want to update
|
|
906
|
-
* @param newVNode a new VNode representing an updated version of the old one
|
|
907
|
-
*/
|
|
908
697
|
const patch = (oldVNode, newVNode) => {
|
|
909
698
|
const elm = (newVNode.$elm$ = oldVNode.$elm$);
|
|
910
699
|
const oldChildren = oldVNode.$children$;
|
|
@@ -913,6 +702,7 @@ const patch = (oldVNode, newVNode) => {
|
|
|
913
702
|
const text = newVNode.$text$;
|
|
914
703
|
let defaultHolder;
|
|
915
704
|
if (text === null) {
|
|
705
|
+
// element node
|
|
916
706
|
{
|
|
917
707
|
if (tag === 'slot')
|
|
918
708
|
;
|
|
@@ -925,7 +715,6 @@ const patch = (oldVNode, newVNode) => {
|
|
|
925
715
|
}
|
|
926
716
|
if (oldChildren !== null && newChildren !== null) {
|
|
927
717
|
// looks like there's child vnodes for both the old and new vnodes
|
|
928
|
-
// so we need to call `updateChildren` to reconcile them
|
|
929
718
|
updateChildren(elm, oldChildren, newVNode, newChildren);
|
|
930
719
|
}
|
|
931
720
|
else if (newChildren !== null) {
|
|
@@ -954,7 +743,7 @@ const patch = (oldVNode, newVNode) => {
|
|
|
954
743
|
};
|
|
955
744
|
const updateFallbackSlotVisibility = (elm) => {
|
|
956
745
|
// tslint:disable-next-line: prefer-const
|
|
957
|
-
|
|
746
|
+
let childNodes = elm.childNodes;
|
|
958
747
|
let childNode;
|
|
959
748
|
let i;
|
|
960
749
|
let ilen;
|
|
@@ -963,7 +752,7 @@ const updateFallbackSlotVisibility = (elm) => {
|
|
|
963
752
|
let nodeType;
|
|
964
753
|
for (i = 0, ilen = childNodes.length; i < ilen; i++) {
|
|
965
754
|
childNode = childNodes[i];
|
|
966
|
-
if (childNode.nodeType === 1 /*
|
|
755
|
+
if (childNode.nodeType === 1 /* ElementNode */) {
|
|
967
756
|
if (childNode['s-sr']) {
|
|
968
757
|
// this is a slot fallback node
|
|
969
758
|
// get the slot name for this slot reference node
|
|
@@ -975,7 +764,7 @@ const updateFallbackSlotVisibility = (elm) => {
|
|
|
975
764
|
nodeType = childNodes[j].nodeType;
|
|
976
765
|
if (childNodes[j]['s-hn'] !== childNode['s-hn'] || slotNameAttr !== '') {
|
|
977
766
|
// this sibling node is from a different component OR is a named fallback slot node
|
|
978
|
-
if (nodeType === 1 /*
|
|
767
|
+
if (nodeType === 1 /* ElementNode */ && slotNameAttr === childNodes[j].getAttribute('slot')) {
|
|
979
768
|
childNode.hidden = true;
|
|
980
769
|
break;
|
|
981
770
|
}
|
|
@@ -984,8 +773,8 @@ const updateFallbackSlotVisibility = (elm) => {
|
|
|
984
773
|
// this is a default fallback slot node
|
|
985
774
|
// any element or text node (with content)
|
|
986
775
|
// should hide the default fallback slot node
|
|
987
|
-
if (nodeType === 1 /*
|
|
988
|
-
(nodeType === 3 /*
|
|
776
|
+
if (nodeType === 1 /* ElementNode */ ||
|
|
777
|
+
(nodeType === 3 /* TextNode */ && childNodes[j].textContent.trim() !== '')) {
|
|
989
778
|
childNode.hidden = true;
|
|
990
779
|
break;
|
|
991
780
|
}
|
|
@@ -1007,8 +796,8 @@ const relocateSlotContent = (elm) => {
|
|
|
1007
796
|
let relocateNodeData;
|
|
1008
797
|
let j;
|
|
1009
798
|
let i = 0;
|
|
1010
|
-
|
|
1011
|
-
|
|
799
|
+
let childNodes = elm.childNodes;
|
|
800
|
+
let ilen = childNodes.length;
|
|
1012
801
|
for (; i < ilen; i++) {
|
|
1013
802
|
childNode = childNodes[i];
|
|
1014
803
|
if (childNode['s-sr'] && (node = childNode['s-cr']) && node.parentNode) {
|
|
@@ -1063,13 +852,13 @@ const relocateSlotContent = (elm) => {
|
|
|
1063
852
|
}
|
|
1064
853
|
}
|
|
1065
854
|
}
|
|
1066
|
-
if (childNode.nodeType === 1 /*
|
|
855
|
+
if (childNode.nodeType === 1 /* ElementNode */) {
|
|
1067
856
|
relocateSlotContent(childNode);
|
|
1068
857
|
}
|
|
1069
858
|
}
|
|
1070
859
|
};
|
|
1071
860
|
const isNodeLocatedInSlot = (nodeToRelocate, slotNameAttr) => {
|
|
1072
|
-
if (nodeToRelocate.nodeType === 1 /*
|
|
861
|
+
if (nodeToRelocate.nodeType === 1 /* ElementNode */) {
|
|
1073
862
|
if (nodeToRelocate.getAttribute('slot') === null && slotNameAttr === '') {
|
|
1074
863
|
return true;
|
|
1075
864
|
}
|
|
@@ -1095,17 +884,13 @@ const renderVdom = (hostRef, renderFnResults) => {
|
|
|
1095
884
|
const oldVNode = hostRef.$vnode$ || newVNode(null, null);
|
|
1096
885
|
const rootVnode = isHost(renderFnResults) ? renderFnResults : h(null, null, renderFnResults);
|
|
1097
886
|
hostTagName = hostElm.tagName;
|
|
1098
|
-
if (cmpMeta.$attrsToReflect$) {
|
|
1099
|
-
rootVnode.$attrs$ = rootVnode.$attrs$ || {};
|
|
1100
|
-
cmpMeta.$attrsToReflect$.map(([propName, attribute]) => (rootVnode.$attrs$[attribute] = hostElm[propName]));
|
|
1101
|
-
}
|
|
1102
887
|
rootVnode.$tag$ = null;
|
|
1103
|
-
rootVnode.$flags$ |= 4 /*
|
|
888
|
+
rootVnode.$flags$ |= 4 /* isHost */;
|
|
1104
889
|
hostRef.$vnode$ = rootVnode;
|
|
1105
890
|
rootVnode.$elm$ = oldVNode.$elm$ = (hostElm);
|
|
1106
891
|
{
|
|
1107
892
|
contentRef = hostElm['s-cr'];
|
|
1108
|
-
useNativeShadowDom = (cmpMeta.$flags$ & 1 /*
|
|
893
|
+
useNativeShadowDom = (cmpMeta.$flags$ & 1 /* shadowDomEncapsulation */) !== 0;
|
|
1109
894
|
// always reset
|
|
1110
895
|
checkSlotFallbackVisibility = false;
|
|
1111
896
|
}
|
|
@@ -1114,7 +899,7 @@ const renderVdom = (hostRef, renderFnResults) => {
|
|
|
1114
899
|
{
|
|
1115
900
|
// while we're moving nodes around existing nodes, temporarily disable
|
|
1116
901
|
// the disconnectCallback from working
|
|
1117
|
-
plt.$flags$ |= 1 /*
|
|
902
|
+
plt.$flags$ |= 1 /* isTmpDisconnected */;
|
|
1118
903
|
if (checkSlotRelocate) {
|
|
1119
904
|
relocateSlotContent(rootVnode.$elm$);
|
|
1120
905
|
let relocateData;
|
|
@@ -1172,7 +957,7 @@ const renderVdom = (hostRef, renderFnResults) => {
|
|
|
1172
957
|
}
|
|
1173
958
|
else {
|
|
1174
959
|
// this node doesn't have a slot home to go to, so let's hide it
|
|
1175
|
-
if (nodeToRelocate.nodeType === 1 /*
|
|
960
|
+
if (nodeToRelocate.nodeType === 1 /* ElementNode */) {
|
|
1176
961
|
nodeToRelocate.hidden = true;
|
|
1177
962
|
}
|
|
1178
963
|
}
|
|
@@ -1183,11 +968,37 @@ const renderVdom = (hostRef, renderFnResults) => {
|
|
|
1183
968
|
}
|
|
1184
969
|
// done moving nodes around
|
|
1185
970
|
// allow the disconnect callback to work again
|
|
1186
|
-
plt.$flags$ &= ~1 /*
|
|
971
|
+
plt.$flags$ &= ~1 /* isTmpDisconnected */;
|
|
1187
972
|
// always reset
|
|
1188
973
|
relocateNodes.length = 0;
|
|
1189
974
|
}
|
|
1190
975
|
};
|
|
976
|
+
const getElement = (ref) => (getHostRef(ref).$hostElement$ );
|
|
977
|
+
const createEvent = (ref, name, flags) => {
|
|
978
|
+
const elm = getElement(ref);
|
|
979
|
+
return {
|
|
980
|
+
emit: (detail) => {
|
|
981
|
+
return emitEvent(elm, name, {
|
|
982
|
+
bubbles: !!(flags & 4 /* Bubbles */),
|
|
983
|
+
composed: !!(flags & 2 /* Composed */),
|
|
984
|
+
cancelable: !!(flags & 1 /* Cancellable */),
|
|
985
|
+
detail,
|
|
986
|
+
});
|
|
987
|
+
},
|
|
988
|
+
};
|
|
989
|
+
};
|
|
990
|
+
/**
|
|
991
|
+
* Helper function to create & dispatch a custom Event on a provided target
|
|
992
|
+
* @param elm the target of the Event
|
|
993
|
+
* @param name the name to give the custom Event
|
|
994
|
+
* @param opts options for configuring a custom Event
|
|
995
|
+
* @returns the custom Event
|
|
996
|
+
*/
|
|
997
|
+
const emitEvent = (elm, name, opts) => {
|
|
998
|
+
const ev = plt.ce(name, opts);
|
|
999
|
+
elm.dispatchEvent(ev);
|
|
1000
|
+
return ev;
|
|
1001
|
+
};
|
|
1191
1002
|
const attachToAncestor = (hostRef, ancestorComponent) => {
|
|
1192
1003
|
if (ancestorComponent && !hostRef.$onRenderResolve$ && ancestorComponent['s-p']) {
|
|
1193
1004
|
ancestorComponent['s-p'].push(new Promise((r) => (hostRef.$onRenderResolve$ = r)));
|
|
@@ -1195,10 +1006,10 @@ const attachToAncestor = (hostRef, ancestorComponent) => {
|
|
|
1195
1006
|
};
|
|
1196
1007
|
const scheduleUpdate = (hostRef, isInitialLoad) => {
|
|
1197
1008
|
{
|
|
1198
|
-
hostRef.$flags$ |= 16 /*
|
|
1009
|
+
hostRef.$flags$ |= 16 /* isQueuedForUpdate */;
|
|
1199
1010
|
}
|
|
1200
|
-
if (hostRef.$flags$ & 4 /*
|
|
1201
|
-
hostRef.$flags$ |= 512 /*
|
|
1011
|
+
if (hostRef.$flags$ & 4 /* isWaitingForChildren */) {
|
|
1012
|
+
hostRef.$flags$ |= 512 /* needsRerender */;
|
|
1202
1013
|
return;
|
|
1203
1014
|
}
|
|
1204
1015
|
attachToAncestor(hostRef, hostRef.$ancestorComponent$);
|
|
@@ -1214,7 +1025,7 @@ const dispatchHooks = (hostRef, isInitialLoad) => {
|
|
|
1214
1025
|
let promise;
|
|
1215
1026
|
if (isInitialLoad) {
|
|
1216
1027
|
{
|
|
1217
|
-
hostRef.$flags$ |= 256 /*
|
|
1028
|
+
hostRef.$flags$ |= 256 /* isListenReady */;
|
|
1218
1029
|
if (hostRef.$queuedListeners$) {
|
|
1219
1030
|
hostRef.$queuedListeners$.map(([methodName, event]) => safeCall(instance, methodName, event));
|
|
1220
1031
|
hostRef.$queuedListeners$ = null;
|
|
@@ -1262,7 +1073,7 @@ const updateComponent = async (hostRef, instance, isInitialLoad) => {
|
|
|
1262
1073
|
}
|
|
1263
1074
|
else {
|
|
1264
1075
|
Promise.all(childrenPromises).then(postUpdate);
|
|
1265
|
-
hostRef.$flags$ |= 4 /*
|
|
1076
|
+
hostRef.$flags$ |= 4 /* isWaitingForChildren */;
|
|
1266
1077
|
childrenPromises.length = 0;
|
|
1267
1078
|
}
|
|
1268
1079
|
}
|
|
@@ -1271,10 +1082,10 @@ const callRender = (hostRef, instance, elm) => {
|
|
|
1271
1082
|
try {
|
|
1272
1083
|
instance = instance.render() ;
|
|
1273
1084
|
{
|
|
1274
|
-
hostRef.$flags$ &= ~16 /*
|
|
1085
|
+
hostRef.$flags$ &= ~16 /* isQueuedForUpdate */;
|
|
1275
1086
|
}
|
|
1276
1087
|
{
|
|
1277
|
-
hostRef.$flags$ |= 2 /*
|
|
1088
|
+
hostRef.$flags$ |= 2 /* hasRendered */;
|
|
1278
1089
|
}
|
|
1279
1090
|
{
|
|
1280
1091
|
{
|
|
@@ -1301,8 +1112,8 @@ const postUpdateComponent = (hostRef) => {
|
|
|
1301
1112
|
{
|
|
1302
1113
|
safeCall(instance, 'componentDidRender');
|
|
1303
1114
|
}
|
|
1304
|
-
if (!(hostRef.$flags$ & 64 /*
|
|
1305
|
-
hostRef.$flags$ |= 64 /*
|
|
1115
|
+
if (!(hostRef.$flags$ & 64 /* hasLoadedComponent */)) {
|
|
1116
|
+
hostRef.$flags$ |= 64 /* hasLoadedComponent */;
|
|
1306
1117
|
{
|
|
1307
1118
|
// DOM WRITE!
|
|
1308
1119
|
addHydratedFlag(elm);
|
|
@@ -1334,10 +1145,10 @@ const postUpdateComponent = (hostRef) => {
|
|
|
1334
1145
|
hostRef.$onRenderResolve$();
|
|
1335
1146
|
hostRef.$onRenderResolve$ = undefined;
|
|
1336
1147
|
}
|
|
1337
|
-
if (hostRef.$flags$ & 512 /*
|
|
1148
|
+
if (hostRef.$flags$ & 512 /* needsRerender */) {
|
|
1338
1149
|
nextTick(() => scheduleUpdate(hostRef, false));
|
|
1339
1150
|
}
|
|
1340
|
-
hostRef.$flags$ &= ~(4 /*
|
|
1151
|
+
hostRef.$flags$ &= ~(4 /* isWaitingForChildren */ | 512 /* needsRerender */);
|
|
1341
1152
|
}
|
|
1342
1153
|
// ( •_•)
|
|
1343
1154
|
// ( •_•)>⌐■-■
|
|
@@ -1367,6 +1178,30 @@ const then = (promise, thenFn) => {
|
|
|
1367
1178
|
};
|
|
1368
1179
|
const addHydratedFlag = (elm) => elm.classList.add('hydrated')
|
|
1369
1180
|
;
|
|
1181
|
+
const parsePropertyValue = (propValue, propType) => {
|
|
1182
|
+
// ensure this value is of the correct prop type
|
|
1183
|
+
if (propValue != null && !isComplexType(propValue)) {
|
|
1184
|
+
if (propType & 4 /* Boolean */) {
|
|
1185
|
+
// per the HTML spec, any string value means it is a boolean true value
|
|
1186
|
+
// but we'll cheat here and say that the string "false" is the boolean false
|
|
1187
|
+
return propValue === 'false' ? false : propValue === '' || !!propValue;
|
|
1188
|
+
}
|
|
1189
|
+
if (propType & 2 /* Number */) {
|
|
1190
|
+
// force it to be a number
|
|
1191
|
+
return parseFloat(propValue);
|
|
1192
|
+
}
|
|
1193
|
+
if (propType & 1 /* String */) {
|
|
1194
|
+
// could have been passed as a number or boolean
|
|
1195
|
+
// but we still want it as a string
|
|
1196
|
+
return String(propValue);
|
|
1197
|
+
}
|
|
1198
|
+
// redundant return here for better minification
|
|
1199
|
+
return propValue;
|
|
1200
|
+
}
|
|
1201
|
+
// not sure exactly what type we want
|
|
1202
|
+
// so no need to change to a different type
|
|
1203
|
+
return propValue;
|
|
1204
|
+
};
|
|
1370
1205
|
const getValue = (ref, propName) => getHostRef(ref).$instanceValues$.get(propName);
|
|
1371
1206
|
const setValue = (ref, propName, newVal, cmpMeta) => {
|
|
1372
1207
|
// check our new property value against our internal value
|
|
@@ -1376,16 +1211,13 @@ const setValue = (ref, propName, newVal, cmpMeta) => {
|
|
|
1376
1211
|
const flags = hostRef.$flags$;
|
|
1377
1212
|
const instance = hostRef.$lazyInstance$ ;
|
|
1378
1213
|
newVal = parsePropertyValue(newVal, cmpMeta.$members$[propName][0]);
|
|
1379
|
-
|
|
1380
|
-
const areBothNaN = Number.isNaN(oldVal) && Number.isNaN(newVal);
|
|
1381
|
-
const didValueChange = newVal !== oldVal && !areBothNaN;
|
|
1382
|
-
if ((!(flags & 8 /* HOST_FLAGS.isConstructingInstance */) || oldVal === undefined) && didValueChange) {
|
|
1214
|
+
if ((!(flags & 8 /* isConstructingInstance */) || oldVal === undefined) && newVal !== oldVal) {
|
|
1383
1215
|
// gadzooks! the property's value has changed!!
|
|
1384
1216
|
// set our new value!
|
|
1385
1217
|
hostRef.$instanceValues$.set(propName, newVal);
|
|
1386
1218
|
if (instance) {
|
|
1387
1219
|
// get an array of method names of watch functions to call
|
|
1388
|
-
if (cmpMeta.$watchers$ && flags & 128 /*
|
|
1220
|
+
if (cmpMeta.$watchers$ && flags & 128 /* isWatchReady */) {
|
|
1389
1221
|
const watchMethods = cmpMeta.$watchers$[propName];
|
|
1390
1222
|
if (watchMethods) {
|
|
1391
1223
|
// this instance is watching for when this property changed
|
|
@@ -1400,7 +1232,7 @@ const setValue = (ref, propName, newVal, cmpMeta) => {
|
|
|
1400
1232
|
});
|
|
1401
1233
|
}
|
|
1402
1234
|
}
|
|
1403
|
-
if ((flags & (2 /*
|
|
1235
|
+
if ((flags & (2 /* hasRendered */ | 16 /* isQueuedForUpdate */)) === 2 /* hasRendered */) {
|
|
1404
1236
|
// looks like this value actually changed, so we've got work to do!
|
|
1405
1237
|
// but only if we've already rendered, otherwise just chill out
|
|
1406
1238
|
// queue that we need to do an update, but don't worry about queuing
|
|
@@ -1410,16 +1242,6 @@ const setValue = (ref, propName, newVal, cmpMeta) => {
|
|
|
1410
1242
|
}
|
|
1411
1243
|
}
|
|
1412
1244
|
};
|
|
1413
|
-
/**
|
|
1414
|
-
* Attach a series of runtime constructs to a compiled Stencil component
|
|
1415
|
-
* constructor, including getters and setters for the `@Prop` and `@State`
|
|
1416
|
-
* decorators, callbacks for when attributes change, and so on.
|
|
1417
|
-
*
|
|
1418
|
-
* @param Cstr the constructor for a component that we need to process
|
|
1419
|
-
* @param cmpMeta metadata collected previously about the component
|
|
1420
|
-
* @param flags a number used to store a series of bit flags
|
|
1421
|
-
* @returns a reference to the same constructor passed in (but now mutated)
|
|
1422
|
-
*/
|
|
1423
1245
|
const proxyComponent = (Cstr, cmpMeta, flags) => {
|
|
1424
1246
|
if (cmpMeta.$members$) {
|
|
1425
1247
|
if (Cstr.watchers) {
|
|
@@ -1429,8 +1251,8 @@ const proxyComponent = (Cstr, cmpMeta, flags) => {
|
|
|
1429
1251
|
const members = Object.entries(cmpMeta.$members$);
|
|
1430
1252
|
const prototype = Cstr.prototype;
|
|
1431
1253
|
members.map(([memberName, [memberFlags]]) => {
|
|
1432
|
-
if ((memberFlags & 31 /*
|
|
1433
|
-
((flags & 2 /*
|
|
1254
|
+
if ((memberFlags & 31 /* Prop */ ||
|
|
1255
|
+
((flags & 2 /* proxyState */) && memberFlags & 32 /* State */))) {
|
|
1434
1256
|
// proxyComponent - prop
|
|
1435
1257
|
Object.defineProperty(prototype, memberName, {
|
|
1436
1258
|
get() {
|
|
@@ -1445,8 +1267,8 @@ const proxyComponent = (Cstr, cmpMeta, flags) => {
|
|
|
1445
1267
|
enumerable: true,
|
|
1446
1268
|
});
|
|
1447
1269
|
}
|
|
1448
|
-
else if (flags & 1 /*
|
|
1449
|
-
memberFlags & 64 /*
|
|
1270
|
+
else if (flags & 1 /* isElementConstructor */ &&
|
|
1271
|
+
memberFlags & 64 /* Method */) {
|
|
1450
1272
|
// proxyComponent - method
|
|
1451
1273
|
Object.defineProperty(prototype, memberName, {
|
|
1452
1274
|
value(...args) {
|
|
@@ -1456,7 +1278,7 @@ const proxyComponent = (Cstr, cmpMeta, flags) => {
|
|
|
1456
1278
|
});
|
|
1457
1279
|
}
|
|
1458
1280
|
});
|
|
1459
|
-
if ((flags & 1 /*
|
|
1281
|
+
if ((flags & 1 /* isElementConstructor */)) {
|
|
1460
1282
|
const attrNameToPropName = new Map();
|
|
1461
1283
|
prototype.attributeChangedCallback = function (attrName, _oldValue, newValue) {
|
|
1462
1284
|
plt.jmp(() => {
|
|
@@ -1512,13 +1334,10 @@ const proxyComponent = (Cstr, cmpMeta, flags) => {
|
|
|
1512
1334
|
// create an array of attributes to observe
|
|
1513
1335
|
// and also create a map of html attribute name to js property name
|
|
1514
1336
|
Cstr.observedAttributes = members
|
|
1515
|
-
.filter(([_, m]) => m[0] & 15 /*
|
|
1337
|
+
.filter(([_, m]) => m[0] & 15 /* HasAttribute */) // filter to only keep props that should match attributes
|
|
1516
1338
|
.map(([propName, m]) => {
|
|
1517
1339
|
const attrName = m[1] || propName;
|
|
1518
1340
|
attrNameToPropName.set(attrName, propName);
|
|
1519
|
-
if (m[0] & 512 /* MEMBER_FLAGS.ReflectAttr */) {
|
|
1520
|
-
cmpMeta.$attrsToReflect$.push([propName, attrName]);
|
|
1521
|
-
}
|
|
1522
1341
|
return attrName;
|
|
1523
1342
|
});
|
|
1524
1343
|
}
|
|
@@ -1527,10 +1346,10 @@ const proxyComponent = (Cstr, cmpMeta, flags) => {
|
|
|
1527
1346
|
};
|
|
1528
1347
|
const initializeComponent = async (elm, hostRef, cmpMeta, hmrVersionId, Cstr) => {
|
|
1529
1348
|
// initializeComponent
|
|
1530
|
-
if ((hostRef.$flags$ & 32 /*
|
|
1349
|
+
if ((hostRef.$flags$ & 32 /* hasInitializedComponent */) === 0) {
|
|
1531
1350
|
{
|
|
1532
1351
|
// we haven't initialized this element yet
|
|
1533
|
-
hostRef.$flags$ |= 32 /*
|
|
1352
|
+
hostRef.$flags$ |= 32 /* hasInitializedComponent */;
|
|
1534
1353
|
// lazy loaded components
|
|
1535
1354
|
// request the component's implementation to be
|
|
1536
1355
|
// wired up with the host element
|
|
@@ -1548,7 +1367,7 @@ const initializeComponent = async (elm, hostRef, cmpMeta, hmrVersionId, Cstr) =>
|
|
|
1548
1367
|
{
|
|
1549
1368
|
cmpMeta.$watchers$ = Cstr.watchers;
|
|
1550
1369
|
}
|
|
1551
|
-
proxyComponent(Cstr, cmpMeta, 2 /*
|
|
1370
|
+
proxyComponent(Cstr, cmpMeta, 2 /* proxyState */);
|
|
1552
1371
|
Cstr.isProxied = true;
|
|
1553
1372
|
}
|
|
1554
1373
|
const endNewInstance = createTime('createInstance', cmpMeta.$tagName$);
|
|
@@ -1556,7 +1375,7 @@ const initializeComponent = async (elm, hostRef, cmpMeta, hmrVersionId, Cstr) =>
|
|
|
1556
1375
|
// but let's keep track of when we start and stop
|
|
1557
1376
|
// so that the getters/setters don't incorrectly step on data
|
|
1558
1377
|
{
|
|
1559
|
-
hostRef.$flags$ |= 8 /*
|
|
1378
|
+
hostRef.$flags$ |= 8 /* isConstructingInstance */;
|
|
1560
1379
|
}
|
|
1561
1380
|
// construct the lazy-loaded component implementation
|
|
1562
1381
|
// passing the hostRef is very important during
|
|
@@ -1569,10 +1388,10 @@ const initializeComponent = async (elm, hostRef, cmpMeta, hmrVersionId, Cstr) =>
|
|
|
1569
1388
|
consoleError(e);
|
|
1570
1389
|
}
|
|
1571
1390
|
{
|
|
1572
|
-
hostRef.$flags$ &= ~8 /*
|
|
1391
|
+
hostRef.$flags$ &= ~8 /* isConstructingInstance */;
|
|
1573
1392
|
}
|
|
1574
1393
|
{
|
|
1575
|
-
hostRef.$flags$ |= 128 /*
|
|
1394
|
+
hostRef.$flags$ |= 128 /* isWatchReady */;
|
|
1576
1395
|
}
|
|
1577
1396
|
endNewInstance();
|
|
1578
1397
|
fireConnectedCallback(hostRef.$lazyInstance$);
|
|
@@ -1583,7 +1402,7 @@ const initializeComponent = async (elm, hostRef, cmpMeta, hmrVersionId, Cstr) =>
|
|
|
1583
1402
|
const scopeId = getScopeId(cmpMeta);
|
|
1584
1403
|
if (!styles.has(scopeId)) {
|
|
1585
1404
|
const endRegisterStyles = createTime('registerStyles', cmpMeta.$tagName$);
|
|
1586
|
-
registerStyle(scopeId, style, !!(cmpMeta.$flags$ & 1 /*
|
|
1405
|
+
registerStyle(scopeId, style, !!(cmpMeta.$flags$ & 1 /* shadowDomEncapsulation */));
|
|
1587
1406
|
endRegisterStyles();
|
|
1588
1407
|
}
|
|
1589
1408
|
}
|
|
@@ -1610,19 +1429,19 @@ const fireConnectedCallback = (instance) => {
|
|
|
1610
1429
|
}
|
|
1611
1430
|
};
|
|
1612
1431
|
const connectedCallback = (elm) => {
|
|
1613
|
-
if ((plt.$flags$ & 1 /*
|
|
1432
|
+
if ((plt.$flags$ & 1 /* isTmpDisconnected */) === 0) {
|
|
1614
1433
|
const hostRef = getHostRef(elm);
|
|
1615
1434
|
const cmpMeta = hostRef.$cmpMeta$;
|
|
1616
1435
|
const endConnected = createTime('connectedCallback', cmpMeta.$tagName$);
|
|
1617
|
-
if (!(hostRef.$flags$ & 1 /*
|
|
1436
|
+
if (!(hostRef.$flags$ & 1 /* hasConnected */)) {
|
|
1618
1437
|
// first time this component has connected
|
|
1619
|
-
hostRef.$flags$ |= 1 /*
|
|
1438
|
+
hostRef.$flags$ |= 1 /* hasConnected */;
|
|
1620
1439
|
{
|
|
1621
1440
|
// initUpdate
|
|
1622
1441
|
// if the slot polyfill is required we'll need to put some nodes
|
|
1623
1442
|
// in here to act as original content anchors as we move nodes around
|
|
1624
1443
|
// host element has been connected to the DOM
|
|
1625
|
-
if ((cmpMeta.$flags$ & (4 /*
|
|
1444
|
+
if ((cmpMeta.$flags$ & (4 /* hasSlotRelocation */ | 8 /* needsShadowDomShim */))) {
|
|
1626
1445
|
setContentReference(elm);
|
|
1627
1446
|
}
|
|
1628
1447
|
}
|
|
@@ -1645,7 +1464,7 @@ const connectedCallback = (elm) => {
|
|
|
1645
1464
|
// https://developers.google.com/web/fundamentals/web-components/best-practices#lazy-properties
|
|
1646
1465
|
if (cmpMeta.$members$) {
|
|
1647
1466
|
Object.entries(cmpMeta.$members$).map(([memberName, [memberFlags]]) => {
|
|
1648
|
-
if (memberFlags & 31 /*
|
|
1467
|
+
if (memberFlags & 31 /* Prop */ && elm.hasOwnProperty(memberName)) {
|
|
1649
1468
|
const value = elm[memberName];
|
|
1650
1469
|
delete elm[memberName];
|
|
1651
1470
|
elm[memberName] = value;
|
|
@@ -1679,7 +1498,7 @@ const setContentReference = (elm) => {
|
|
|
1679
1498
|
elm.insertBefore(contentRefElm, elm.firstChild);
|
|
1680
1499
|
};
|
|
1681
1500
|
const disconnectedCallback = (elm) => {
|
|
1682
|
-
if ((plt.$flags$ & 1 /*
|
|
1501
|
+
if ((plt.$flags$ & 1 /* isTmpDisconnected */) === 0) {
|
|
1683
1502
|
const hostRef = getHostRef(elm);
|
|
1684
1503
|
const instance = hostRef.$lazyInstance$ ;
|
|
1685
1504
|
{
|
|
@@ -1720,9 +1539,6 @@ const bootstrapLazy = (lazyBundles, options = {}) => {
|
|
|
1720
1539
|
{
|
|
1721
1540
|
cmpMeta.$listeners$ = compactMeta[3];
|
|
1722
1541
|
}
|
|
1723
|
-
{
|
|
1724
|
-
cmpMeta.$attrsToReflect$ = [];
|
|
1725
|
-
}
|
|
1726
1542
|
{
|
|
1727
1543
|
cmpMeta.$watchers$ = {};
|
|
1728
1544
|
}
|
|
@@ -1758,7 +1574,7 @@ const bootstrapLazy = (lazyBundles, options = {}) => {
|
|
|
1758
1574
|
cmpMeta.$lazyBundleId$ = lazyBundle[0];
|
|
1759
1575
|
if (!exclude.includes(tagName) && !customElements.get(tagName)) {
|
|
1760
1576
|
cmpTags.push(tagName);
|
|
1761
|
-
customElements.define(tagName, proxyComponent(HostElement, cmpMeta, 1 /*
|
|
1577
|
+
customElements.define(tagName, proxyComponent(HostElement, cmpMeta, 1 /* isElementConstructor */));
|
|
1762
1578
|
}
|
|
1763
1579
|
});
|
|
1764
1580
|
});
|
|
@@ -1780,41 +1596,7 @@ const bootstrapLazy = (lazyBundles, options = {}) => {
|
|
|
1780
1596
|
// Fallback appLoad event
|
|
1781
1597
|
endBootstrap();
|
|
1782
1598
|
};
|
|
1783
|
-
const
|
|
1784
|
-
if (listeners) {
|
|
1785
|
-
listeners.map(([flags, name, method]) => {
|
|
1786
|
-
const target = getHostListenerTarget(elm, flags) ;
|
|
1787
|
-
const handler = hostListenerProxy(hostRef, method);
|
|
1788
|
-
const opts = hostListenerOpts(flags);
|
|
1789
|
-
plt.ael(target, name, handler, opts);
|
|
1790
|
-
(hostRef.$rmListeners$ = hostRef.$rmListeners$ || []).push(() => plt.rel(target, name, handler, opts));
|
|
1791
|
-
});
|
|
1792
|
-
}
|
|
1793
|
-
};
|
|
1794
|
-
const hostListenerProxy = (hostRef, methodName) => (ev) => {
|
|
1795
|
-
try {
|
|
1796
|
-
{
|
|
1797
|
-
if (hostRef.$flags$ & 256 /* HOST_FLAGS.isListenReady */) {
|
|
1798
|
-
// instance is ready, let's call it's member method for this event
|
|
1799
|
-
hostRef.$lazyInstance$[methodName](ev);
|
|
1800
|
-
}
|
|
1801
|
-
else {
|
|
1802
|
-
(hostRef.$queuedListeners$ = hostRef.$queuedListeners$ || []).push([methodName, ev]);
|
|
1803
|
-
}
|
|
1804
|
-
}
|
|
1805
|
-
}
|
|
1806
|
-
catch (e) {
|
|
1807
|
-
consoleError(e);
|
|
1808
|
-
}
|
|
1809
|
-
};
|
|
1810
|
-
const getHostListenerTarget = (elm, flags) => {
|
|
1811
|
-
if (flags & 4 /* LISTENER_FLAGS.TargetDocument */)
|
|
1812
|
-
return doc;
|
|
1813
|
-
return elm;
|
|
1814
|
-
};
|
|
1815
|
-
// prettier-ignore
|
|
1816
|
-
const hostListenerOpts = (flags) => (flags & 2 /* LISTENER_FLAGS.Capture */) !== 0;
|
|
1817
|
-
const hostRefs = /*@__PURE__*/ new WeakMap();
|
|
1599
|
+
const hostRefs = new WeakMap();
|
|
1818
1600
|
const getHostRef = (ref) => hostRefs.get(ref);
|
|
1819
1601
|
const registerInstance = (lazyInstance, hostRef) => hostRefs.set((hostRef.$lazyInstance$ = lazyInstance), hostRef);
|
|
1820
1602
|
const registerHost = (elm, cmpMeta) => {
|
|
@@ -1846,9 +1628,7 @@ const loadModule = (cmpMeta, hostRef, hmrVersionId) => {
|
|
|
1846
1628
|
if (module) {
|
|
1847
1629
|
return module[exportName];
|
|
1848
1630
|
}
|
|
1849
|
-
/*!__STENCIL_STATIC_IMPORT_SWITCH__*/
|
|
1850
1631
|
return import(
|
|
1851
|
-
/* @vite-ignore */
|
|
1852
1632
|
/* webpackInclude: /\.entry\.js$/ */
|
|
1853
1633
|
/* webpackExclude: /\.system\.entry\.js$/ */
|
|
1854
1634
|
/* webpackMode: "lazy" */
|
|
@@ -1859,35 +1639,14 @@ const loadModule = (cmpMeta, hostRef, hmrVersionId) => {
|
|
|
1859
1639
|
return importedModule[exportName];
|
|
1860
1640
|
}, consoleError);
|
|
1861
1641
|
};
|
|
1862
|
-
const styles =
|
|
1863
|
-
const win = typeof window !== 'undefined' ? window : {};
|
|
1864
|
-
const doc = win.document || { head: {} };
|
|
1865
|
-
const plt = {
|
|
1866
|
-
$flags$: 0,
|
|
1867
|
-
$resourcesUrl$: '',
|
|
1868
|
-
jmp: (h) => h(),
|
|
1869
|
-
raf: (h) => requestAnimationFrame(h),
|
|
1870
|
-
ael: (el, eventName, listener, opts) => el.addEventListener(eventName, listener, opts),
|
|
1871
|
-
rel: (el, eventName, listener, opts) => el.removeEventListener(eventName, listener, opts),
|
|
1872
|
-
ce: (eventName, opts) => new CustomEvent(eventName, opts),
|
|
1873
|
-
};
|
|
1874
|
-
const promiseResolve = (v) => Promise.resolve(v);
|
|
1875
|
-
const supportsConstructableStylesheets = /*@__PURE__*/ (() => {
|
|
1876
|
-
try {
|
|
1877
|
-
new CSSStyleSheet();
|
|
1878
|
-
return typeof new CSSStyleSheet().replaceSync === 'function';
|
|
1879
|
-
}
|
|
1880
|
-
catch (e) { }
|
|
1881
|
-
return false;
|
|
1882
|
-
})()
|
|
1883
|
-
;
|
|
1642
|
+
const styles = new Map();
|
|
1884
1643
|
const queueDomReads = [];
|
|
1885
1644
|
const queueDomWrites = [];
|
|
1886
1645
|
const queueTask = (queue, write) => (cb) => {
|
|
1887
1646
|
queue.push(cb);
|
|
1888
1647
|
if (!queuePending) {
|
|
1889
1648
|
queuePending = true;
|
|
1890
|
-
if (write && plt.$flags$ & 4 /*
|
|
1649
|
+
if (write && plt.$flags$ & 4 /* queueSync */) {
|
|
1891
1650
|
nextTick(flush);
|
|
1892
1651
|
}
|
|
1893
1652
|
else {
|
|
@@ -1925,5 +1684,3 @@ const nextTick = /*@__PURE__*/ (cb) => promiseResolve().then(cb);
|
|
|
1925
1684
|
const writeTask = /*@__PURE__*/ queueTask(queueDomWrites, true);
|
|
1926
1685
|
|
|
1927
1686
|
export { Host as H, bootstrapLazy as b, createEvent as c, getElement as g, h, promiseResolve as p, registerInstance as r };
|
|
1928
|
-
|
|
1929
|
-
//# sourceMappingURL=index-5d881caf.js.map
|