@tarojs/components 3.5.7 → 3.6.0-canary.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +1 -1
- package/dist/cjs/helper-db78e01a.js +2 -0
- package/dist/cjs/helper-db78e01a.js.map +1 -0
- package/dist/cjs/hls-67cbc62d.js +27624 -0
- package/dist/cjs/hls-67cbc62d.js.map +1 -0
- package/dist/cjs/index-47a1959e.js +2 -0
- package/dist/cjs/index-47a1959e.js.map +1 -0
- package/dist/cjs/{index-7c61bee9.js → index-9174e0b1.js} +477 -234
- package/dist/cjs/index-9174e0b1.js.map +1 -0
- package/dist/cjs/index-f9d21cc5.js +2 -0
- package/dist/cjs/index-f9d21cc5.js.map +1 -0
- package/dist/cjs/index.cjs.js +2 -0
- package/dist/cjs/index.cjs.js.map +1 -0
- package/dist/cjs/intersection-observer-dc4cfcef.js +2 -0
- package/dist/cjs/intersection-observer-dc4cfcef.js.map +1 -0
- package/dist/cjs/loader.cjs.js +5 -3
- package/dist/cjs/loader.cjs.js.map +1 -0
- package/dist/cjs/taro-ad-core.cjs.entry.js +4 -2
- package/dist/cjs/taro-ad-core.cjs.entry.js.map +1 -0
- package/dist/cjs/taro-ad-custom-core.cjs.entry.js +4 -2
- package/dist/cjs/taro-ad-custom-core.cjs.entry.js.map +1 -0
- package/dist/cjs/taro-audio-core.cjs.entry.js +5 -2
- package/dist/cjs/taro-audio-core.cjs.entry.js.map +1 -0
- package/dist/cjs/taro-block-core.cjs.entry.js +4 -2
- package/dist/cjs/taro-block-core.cjs.entry.js.map +1 -0
- package/dist/cjs/taro-button-core.cjs.entry.js +7 -2
- package/dist/cjs/taro-button-core.cjs.entry.js.map +1 -0
- package/dist/cjs/taro-camera-core.cjs.entry.js +4 -2
- package/dist/cjs/taro-camera-core.cjs.entry.js.map +1 -0
- package/dist/cjs/taro-canvas-core.cjs.entry.js +6 -3
- package/dist/cjs/taro-canvas-core.cjs.entry.js.map +1 -0
- package/dist/cjs/taro-checkbox-core_2.cjs.entry.js +15 -9
- package/dist/cjs/taro-checkbox-core_2.cjs.entry.js.map +1 -0
- package/dist/cjs/taro-components.cjs.js +5 -3
- package/dist/cjs/taro-components.cjs.js.map +1 -0
- package/dist/cjs/taro-cover-image-core.cjs.entry.js +7 -4
- package/dist/cjs/taro-cover-image-core.cjs.entry.js.map +1 -0
- package/dist/cjs/taro-cover-view-core.cjs.entry.js +7 -3
- package/dist/cjs/taro-cover-view-core.cjs.entry.js.map +1 -0
- package/dist/cjs/taro-custom-wrapper-core.cjs.entry.js +4 -2
- package/dist/cjs/taro-custom-wrapper-core.cjs.entry.js.map +1 -0
- package/dist/cjs/taro-editor-core.cjs.entry.js +4 -2
- package/dist/cjs/taro-editor-core.cjs.entry.js.map +1 -0
- package/dist/cjs/taro-form-core.cjs.entry.js +34 -39
- package/dist/cjs/taro-form-core.cjs.entry.js.map +1 -0
- package/dist/cjs/taro-functional-page-navigator-core.cjs.entry.js +4 -2
- package/dist/cjs/taro-functional-page-navigator-core.cjs.entry.js.map +1 -0
- package/dist/cjs/taro-icon-core.cjs.entry.js +6 -2
- package/dist/cjs/taro-icon-core.cjs.entry.js.map +1 -0
- package/dist/cjs/taro-image-core.cjs.entry.js +7 -4
- package/dist/cjs/taro-image-core.cjs.entry.js.map +1 -0
- package/dist/cjs/taro-input-core.cjs.entry.js +29 -14
- package/dist/cjs/taro-input-core.cjs.entry.js.map +1 -0
- package/dist/cjs/taro-keyboard-accessory-core.cjs.entry.js +4 -2
- package/dist/cjs/taro-keyboard-accessory-core.cjs.entry.js.map +1 -0
- package/dist/cjs/taro-label-core.cjs.entry.js +5 -2
- package/dist/cjs/taro-label-core.cjs.entry.js.map +1 -0
- package/dist/cjs/taro-live-player-core.cjs.entry.js +4 -2
- package/dist/cjs/taro-live-player-core.cjs.entry.js.map +1 -0
- package/dist/cjs/taro-live-pusher-core.cjs.entry.js +4 -2
- package/dist/cjs/taro-live-pusher-core.cjs.entry.js.map +1 -0
- package/dist/cjs/taro-map-core.cjs.entry.js +4 -2
- package/dist/cjs/taro-map-core.cjs.entry.js.map +1 -0
- package/dist/cjs/taro-match-media-core.cjs.entry.js +4 -2
- package/dist/cjs/taro-match-media-core.cjs.entry.js.map +1 -0
- package/dist/cjs/{taro-movable-view-core.cjs.entry.js → taro-movable-area-core_2.cjs.entry.js} +187 -97
- package/dist/cjs/taro-movable-area-core_2.cjs.entry.js.map +1 -0
- package/dist/cjs/taro-navigation-bar-core.cjs.entry.js +4 -2
- package/dist/cjs/taro-navigation-bar-core.cjs.entry.js.map +1 -0
- package/dist/cjs/taro-navigator-core.cjs.entry.js +6 -2
- package/dist/cjs/taro-navigator-core.cjs.entry.js.map +1 -0
- package/dist/cjs/taro-official-account-core.cjs.entry.js +4 -2
- package/dist/cjs/taro-official-account-core.cjs.entry.js.map +1 -0
- package/dist/cjs/taro-open-data-core.cjs.entry.js +4 -2
- package/dist/cjs/taro-open-data-core.cjs.entry.js.map +1 -0
- package/dist/cjs/taro-page-container-core.cjs.entry.js +4 -2
- package/dist/cjs/taro-page-container-core.cjs.entry.js.map +1 -0
- package/dist/cjs/taro-page-meta-core.cjs.entry.js +4 -2
- package/dist/cjs/taro-page-meta-core.cjs.entry.js.map +1 -0
- package/dist/cjs/taro-picker-core_2.cjs.entry.js +31 -15
- package/dist/cjs/taro-picker-core_2.cjs.entry.js.map +1 -0
- package/dist/cjs/{taro-picker-view-core.cjs.entry.js → taro-picker-view-column-core_2.cjs.entry.js} +101 -6
- package/dist/cjs/taro-picker-view-column-core_2.cjs.entry.js.map +1 -0
- package/dist/cjs/taro-progress-core.cjs.entry.js +7 -5
- package/dist/cjs/taro-progress-core.cjs.entry.js.map +1 -0
- package/dist/cjs/taro-pull-to-refresh.cjs.entry.js +10 -8
- package/dist/cjs/taro-pull-to-refresh.cjs.entry.js.map +1 -0
- package/dist/cjs/taro-radio-core_2.cjs.entry.js +15 -9
- package/dist/cjs/taro-radio-core_2.cjs.entry.js.map +1 -0
- package/dist/cjs/taro-rich-text-core.cjs.entry.js +5 -2
- package/dist/cjs/taro-rich-text-core.cjs.entry.js.map +1 -0
- package/dist/cjs/taro-root-portal-core.cjs.entry.js +4 -2
- package/dist/cjs/taro-root-portal-core.cjs.entry.js.map +1 -0
- package/dist/cjs/taro-scroll-view-core.cjs.entry.js +28 -22
- package/dist/cjs/taro-scroll-view-core.cjs.entry.js.map +1 -0
- package/dist/cjs/taro-share-element-core.cjs.entry.js +4 -2
- package/dist/cjs/taro-share-element-core.cjs.entry.js.map +1 -0
- package/dist/cjs/taro-slider-core.cjs.entry.js +37 -40
- package/dist/cjs/taro-slider-core.cjs.entry.js.map +1 -0
- package/dist/cjs/taro-slot-core.cjs.entry.js +4 -7
- package/dist/cjs/taro-slot-core.cjs.entry.js.map +1 -0
- package/dist/cjs/taro-swiper-core_2.cjs.entry.js +46 -72
- package/dist/cjs/taro-swiper-core_2.cjs.entry.js.map +1 -0
- package/dist/cjs/taro-switch-core.cjs.entry.js +12 -8
- package/dist/cjs/taro-switch-core.cjs.entry.js.map +1 -0
- package/dist/cjs/taro-tabbar.cjs.entry.js +12 -4
- package/dist/cjs/taro-tabbar.cjs.entry.js.map +1 -0
- package/dist/cjs/taro-text-core.cjs.entry.js +4 -2
- package/dist/cjs/taro-text-core.cjs.entry.js.map +1 -0
- package/dist/cjs/taro-textarea-core.cjs.entry.js +21 -10
- package/dist/cjs/taro-textarea-core.cjs.entry.js.map +1 -0
- package/dist/cjs/taro-video-control_3.cjs.entry.js +218 -27943
- package/dist/cjs/taro-video-control_3.cjs.entry.js.map +1 -0
- package/dist/cjs/taro-view-core.cjs.entry.js +7 -3
- package/dist/cjs/taro-view-core.cjs.entry.js.map +1 -0
- package/dist/cjs/taro-voip-room-core.cjs.entry.js +4 -2
- package/dist/cjs/taro-voip-room-core.cjs.entry.js.map +1 -0
- package/dist/cjs/taro-web-view-core.cjs.entry.js +5 -2
- package/dist/cjs/taro-web-view-core.cjs.entry.js.map +1 -0
- package/dist/collection/collection-manifest.json +16 -4
- package/dist/collection/components/ad/ad.js +2 -1
- package/dist/collection/components/ad/ad.js.map +1 -0
- package/dist/collection/components/ad-custom/ad-custom.js +2 -1
- package/dist/collection/components/ad-custom/ad-custom.js.map +1 -0
- package/dist/collection/components/audio/audio.js +199 -190
- package/dist/collection/components/audio/audio.js.map +1 -0
- package/dist/collection/components/block/block.js +2 -2
- package/dist/collection/components/block/block.js.map +1 -0
- package/dist/collection/components/button/button.js +224 -211
- package/dist/collection/components/button/button.js.map +1 -0
- package/dist/collection/components/camera/camera.js +2 -1
- package/dist/collection/components/camera/camera.js.map +1 -0
- package/dist/collection/components/canvas/canvas.js +67 -58
- package/dist/collection/components/canvas/canvas.js.map +1 -0
- package/dist/collection/components/checkbox/checkbox-group.js +50 -42
- package/dist/collection/components/checkbox/checkbox-group.js.map +1 -0
- package/dist/collection/components/checkbox/checkbox.js +175 -162
- package/dist/collection/components/checkbox/checkbox.js.map +1 -0
- package/dist/collection/components/cover-image/cover-image.js +83 -74
- package/dist/collection/components/cover-image/cover-image.js.map +1 -0
- package/dist/collection/components/cover-view/cover-view.js +131 -118
- package/dist/collection/components/cover-view/cover-view.js.map +1 -0
- package/dist/collection/components/custom-wrapper/custom-wrapper.js +2 -2
- package/dist/collection/components/custom-wrapper/custom-wrapper.js.map +1 -0
- package/dist/collection/components/editor/editor.js +2 -1
- package/dist/collection/components/editor/editor.js.map +1 -0
- package/dist/collection/components/form/form.js +66 -74
- package/dist/collection/components/form/form.js.map +1 -0
- package/dist/collection/components/functional-page-navigator/functional-page-navigator.js +2 -1
- package/dist/collection/components/functional-page-navigator/functional-page-navigator.js.map +1 -0
- package/dist/collection/components/icon/icon.js +61 -56
- package/dist/collection/components/icon/icon.js.map +1 -0
- package/dist/collection/components/image/image.js +125 -113
- package/dist/collection/components/image/image.js.map +1 -0
- package/dist/collection/components/input/input.js +336 -296
- package/dist/collection/components/input/input.js.map +1 -0
- package/dist/collection/components/keyboard-accessory/keyboard-accessory.js +2 -1
- package/dist/collection/components/keyboard-accessory/keyboard-accessory.js.map +1 -0
- package/dist/collection/components/label/label.js +27 -22
- package/dist/collection/components/label/label.js.map +1 -0
- package/dist/collection/components/live-player/live-player.js +2 -1
- package/dist/collection/components/live-player/live-player.js.map +1 -0
- package/dist/collection/components/live-pusher/live-pusher.js +2 -1
- package/dist/collection/components/live-pusher/live-pusher.js.map +1 -0
- package/dist/collection/components/map/map.js +2 -1
- package/dist/collection/components/map/map.js.map +1 -0
- package/dist/collection/components/match-media/match-media.js +2 -1
- package/dist/collection/components/match-media/match-media.js.map +1 -0
- package/dist/collection/components/movable-area/area.css +2 -2
- package/dist/collection/components/movable-area/movable-area.js +34 -26
- package/dist/collection/components/movable-area/movable-area.js.map +1 -0
- package/dist/collection/components/movable-area/movable-view.js +415 -457
- package/dist/collection/components/movable-area/movable-view.js.map +1 -0
- package/dist/collection/components/navigation-bar/navigation-bar.js +2 -1
- package/dist/collection/components/navigation-bar/navigation-bar.js.map +1 -0
- package/dist/collection/components/navigator/navigator.js +158 -145
- package/dist/collection/components/navigator/navigator.js.map +1 -0
- package/dist/collection/components/official-account/official-account.js +2 -1
- package/dist/collection/components/official-account/official-account.js.map +1 -0
- package/dist/collection/components/open-data/open-data.js +2 -1
- package/dist/collection/components/open-data/open-data.js.map +1 -0
- package/dist/collection/components/page-container/page-container.js +2 -1
- package/dist/collection/components/page-container/page-container.js.map +1 -0
- package/dist/collection/components/page-meta/page-meta.js +2 -1
- package/dist/collection/components/page-meta/page-meta.js.map +1 -0
- package/dist/collection/components/picker/constant.js +1 -0
- package/dist/collection/components/picker/constant.js.map +1 -0
- package/dist/collection/components/picker/picker-group.js +240 -176
- package/dist/collection/components/picker/picker-group.js.map +1 -0
- package/dist/collection/components/picker/picker.js +261 -257
- package/dist/collection/components/picker/picker.js.map +1 -0
- package/dist/collection/components/picker/utils.js +1 -0
- package/dist/collection/components/picker/utils.js.map +1 -0
- package/dist/collection/components/picker-view/picker-view-column.js +158 -147
- package/dist/collection/components/picker-view/picker-view-column.js.map +1 -0
- package/dist/collection/components/picker-view/picker-view.js +171 -159
- package/dist/collection/components/picker-view/picker-view.js.map +1 -0
- package/dist/collection/components/progress/progress.js +153 -157
- package/dist/collection/components/progress/progress.js.map +1 -0
- package/dist/collection/components/pull-to-refresh/pull-to-refresh.js +121 -114
- package/dist/collection/components/pull-to-refresh/pull-to-refresh.js.map +1 -0
- package/dist/collection/components/radio/radio-group.js +50 -43
- package/dist/collection/components/radio/radio-group.js.map +1 -0
- package/dist/collection/components/radio/radio.js +152 -144
- package/dist/collection/components/radio/radio.js.map +1 -0
- package/dist/collection/components/rich-text/rich-text.js +27 -23
- package/dist/collection/components/rich-text/rich-text.js.map +1 -0
- package/dist/collection/components/root-portal/root-portal.js +2 -1
- package/dist/collection/components/root-portal/root-portal.js.map +1 -0
- package/dist/collection/components/scroll-view/scroll-view.js +242 -220
- package/dist/collection/components/scroll-view/scroll-view.js.map +1 -0
- package/dist/collection/components/share-element/share-element.js +2 -1
- package/dist/collection/components/share-element/share-element.js.map +1 -0
- package/dist/collection/components/slider/slider.js +279 -283
- package/dist/collection/components/slider/slider.js.map +1 -0
- package/dist/collection/components/slot/slot.js +2 -5
- package/dist/collection/components/slot/slot.js.map +1 -0
- package/dist/collection/components/swiper/swiper-item.js +26 -21
- package/dist/collection/components/swiper/swiper-item.js.map +1 -0
- package/dist/collection/components/swiper/swiper.js +346 -368
- package/dist/collection/components/swiper/swiper.js.map +1 -0
- package/dist/collection/components/switch/switch.js +153 -139
- package/dist/collection/components/switch/switch.js.map +1 -0
- package/dist/collection/components/tabbar/tabbar-item.js +2 -6
- package/dist/collection/components/tabbar/tabbar-item.js.map +1 -0
- package/dist/collection/components/tabbar/tabbar.js +86 -70
- package/dist/collection/components/tabbar/tabbar.js.map +1 -0
- package/dist/collection/components/text/text.js +35 -30
- package/dist/collection/components/text/text.js.map +1 -0
- package/dist/collection/components/textarea/textarea.js +262 -227
- package/dist/collection/components/textarea/textarea.js.map +1 -0
- package/dist/collection/components/video/utils.js +1 -0
- package/dist/collection/components/video/utils.js.map +1 -0
- package/dist/collection/components/video/video-control.js +274 -286
- package/dist/collection/components/video/video-control.js.map +1 -0
- package/dist/collection/components/video/video-danmu.js +111 -118
- package/dist/collection/components/video/video-danmu.js.map +1 -0
- package/dist/collection/components/video/video.js +769 -834
- package/dist/collection/components/video/video.js.map +1 -0
- package/dist/collection/components/view/view.js +131 -118
- package/dist/collection/components/view/view.js.map +1 -0
- package/dist/collection/components/voip-room/voip-room.js +2 -1
- package/dist/collection/components/voip-room/voip-room.js.map +1 -0
- package/dist/collection/components/web-view/web-view.js +68 -57
- package/dist/collection/components/web-view/web-view.js.map +1 -0
- package/dist/collection/index.js +1 -0
- package/dist/collection/index.js.map +1 -0
- package/dist/collection/utils/helper.js +1 -0
- package/dist/collection/utils/helper.js.map +1 -0
- package/dist/collection/utils/index.js +1 -0
- package/dist/collection/utils/index.js.map +1 -0
- package/dist/collection/utils/style.js +1 -0
- package/dist/collection/utils/style.js.map +1 -0
- package/dist/collection/utils/url.js +1 -0
- package/dist/collection/utils/url.js.map +1 -0
- package/dist/esm/helper-3d0ecf0f.js +2 -0
- package/dist/esm/helper-3d0ecf0f.js.map +1 -0
- package/dist/esm/hls-221423a1.js +27622 -0
- package/dist/esm/hls-221423a1.js.map +1 -0
- package/dist/esm/index-1d8e8acd.js +2 -0
- package/dist/esm/index-1d8e8acd.js.map +1 -0
- package/dist/esm/{index-8809c729.js → index-5d881caf.js} +477 -234
- package/dist/esm/index-5d881caf.js.map +1 -0
- package/dist/esm/index-cad8203e.js +2 -0
- package/dist/esm/index-cad8203e.js.map +1 -0
- package/dist/esm/index.js +2 -0
- package/dist/esm/index.js.map +1 -0
- package/dist/esm/intersection-observer-8e4c7135.js +2 -0
- package/dist/esm/intersection-observer-8e4c7135.js.map +1 -0
- package/dist/esm/loader.js +5 -3
- package/dist/esm/loader.js.map +1 -0
- package/dist/esm/polyfills/css-shim.js +1 -1
- package/dist/esm/taro-ad-core.entry.js +4 -2
- package/dist/esm/taro-ad-core.entry.js.map +1 -0
- package/dist/esm/taro-ad-custom-core.entry.js +4 -2
- package/dist/esm/taro-ad-custom-core.entry.js.map +1 -0
- package/dist/esm/taro-audio-core.entry.js +5 -2
- package/dist/esm/taro-audio-core.entry.js.map +1 -0
- package/dist/esm/taro-block-core.entry.js +4 -2
- package/dist/esm/taro-block-core.entry.js.map +1 -0
- package/dist/esm/taro-button-core.entry.js +7 -2
- package/dist/esm/taro-button-core.entry.js.map +1 -0
- package/dist/esm/taro-camera-core.entry.js +4 -2
- package/dist/esm/taro-camera-core.entry.js.map +1 -0
- package/dist/esm/taro-canvas-core.entry.js +6 -3
- package/dist/esm/taro-canvas-core.entry.js.map +1 -0
- package/dist/esm/taro-checkbox-core_2.entry.js +15 -9
- package/dist/esm/taro-checkbox-core_2.entry.js.map +1 -0
- package/dist/esm/taro-components.js +5 -3
- package/dist/esm/taro-components.js.map +1 -0
- package/dist/esm/taro-cover-image-core.entry.js +7 -4
- package/dist/esm/taro-cover-image-core.entry.js.map +1 -0
- package/dist/esm/taro-cover-view-core.entry.js +7 -3
- package/dist/esm/taro-cover-view-core.entry.js.map +1 -0
- package/dist/esm/taro-custom-wrapper-core.entry.js +4 -2
- package/dist/esm/taro-custom-wrapper-core.entry.js.map +1 -0
- package/dist/esm/taro-editor-core.entry.js +4 -2
- package/dist/esm/taro-editor-core.entry.js.map +1 -0
- package/dist/esm/taro-form-core.entry.js +34 -39
- package/dist/esm/taro-form-core.entry.js.map +1 -0
- package/dist/esm/taro-functional-page-navigator-core.entry.js +4 -2
- package/dist/esm/taro-functional-page-navigator-core.entry.js.map +1 -0
- package/dist/esm/taro-icon-core.entry.js +6 -2
- package/dist/esm/taro-icon-core.entry.js.map +1 -0
- package/dist/esm/taro-image-core.entry.js +7 -4
- package/dist/esm/taro-image-core.entry.js.map +1 -0
- package/dist/esm/taro-input-core.entry.js +29 -14
- package/dist/esm/taro-input-core.entry.js.map +1 -0
- package/dist/esm/taro-keyboard-accessory-core.entry.js +4 -2
- package/dist/esm/taro-keyboard-accessory-core.entry.js.map +1 -0
- package/dist/esm/taro-label-core.entry.js +5 -2
- package/dist/esm/taro-label-core.entry.js.map +1 -0
- package/dist/esm/taro-live-player-core.entry.js +4 -2
- package/dist/esm/taro-live-player-core.entry.js.map +1 -0
- package/dist/esm/taro-live-pusher-core.entry.js +4 -2
- package/dist/esm/taro-live-pusher-core.entry.js.map +1 -0
- package/dist/esm/taro-map-core.entry.js +4 -2
- package/dist/esm/taro-map-core.entry.js.map +1 -0
- package/dist/esm/taro-match-media-core.entry.js +4 -2
- package/dist/esm/taro-match-media-core.entry.js.map +1 -0
- package/dist/esm/{taro-movable-view-core.entry.js → taro-movable-area-core_2.entry.js} +187 -98
- package/dist/esm/taro-movable-area-core_2.entry.js.map +1 -0
- package/dist/esm/taro-navigation-bar-core.entry.js +4 -2
- package/dist/esm/taro-navigation-bar-core.entry.js.map +1 -0
- package/dist/esm/taro-navigator-core.entry.js +6 -2
- package/dist/esm/taro-navigator-core.entry.js.map +1 -0
- package/dist/esm/taro-official-account-core.entry.js +4 -2
- package/dist/esm/taro-official-account-core.entry.js.map +1 -0
- package/dist/esm/taro-open-data-core.entry.js +4 -2
- package/dist/esm/taro-open-data-core.entry.js.map +1 -0
- package/dist/esm/taro-page-container-core.entry.js +4 -2
- package/dist/esm/taro-page-container-core.entry.js.map +1 -0
- package/dist/esm/taro-page-meta-core.entry.js +4 -2
- package/dist/esm/taro-page-meta-core.entry.js.map +1 -0
- package/dist/esm/taro-picker-core_2.entry.js +31 -15
- package/dist/esm/taro-picker-core_2.entry.js.map +1 -0
- package/dist/esm/{taro-picker-view-core.entry.js → taro-picker-view-column-core_2.entry.js} +97 -3
- package/dist/esm/taro-picker-view-column-core_2.entry.js.map +1 -0
- package/dist/esm/taro-progress-core.entry.js +7 -5
- package/dist/esm/taro-progress-core.entry.js.map +1 -0
- package/dist/esm/taro-pull-to-refresh.entry.js +10 -8
- package/dist/esm/taro-pull-to-refresh.entry.js.map +1 -0
- package/dist/esm/taro-radio-core_2.entry.js +15 -9
- package/dist/esm/taro-radio-core_2.entry.js.map +1 -0
- package/dist/esm/taro-rich-text-core.entry.js +5 -2
- package/dist/esm/taro-rich-text-core.entry.js.map +1 -0
- package/dist/esm/taro-root-portal-core.entry.js +4 -2
- package/dist/esm/taro-root-portal-core.entry.js.map +1 -0
- package/dist/esm/taro-scroll-view-core.entry.js +28 -22
- package/dist/esm/taro-scroll-view-core.entry.js.map +1 -0
- package/dist/esm/taro-share-element-core.entry.js +4 -2
- package/dist/esm/taro-share-element-core.entry.js.map +1 -0
- package/dist/esm/taro-slider-core.entry.js +37 -40
- package/dist/esm/taro-slider-core.entry.js.map +1 -0
- package/dist/esm/taro-slot-core.entry.js +4 -7
- package/dist/esm/taro-slot-core.entry.js.map +1 -0
- package/dist/esm/taro-swiper-core_2.entry.js +46 -72
- package/dist/esm/taro-swiper-core_2.entry.js.map +1 -0
- package/dist/esm/taro-switch-core.entry.js +12 -8
- package/dist/esm/taro-switch-core.entry.js.map +1 -0
- package/dist/esm/taro-tabbar.entry.js +12 -4
- package/dist/esm/taro-tabbar.entry.js.map +1 -0
- package/dist/esm/taro-text-core.entry.js +4 -2
- package/dist/esm/taro-text-core.entry.js.map +1 -0
- package/dist/esm/taro-textarea-core.entry.js +21 -10
- package/dist/esm/taro-textarea-core.entry.js.map +1 -0
- package/dist/esm/taro-video-control_3.entry.js +213 -27938
- package/dist/esm/taro-video-control_3.entry.js.map +1 -0
- package/dist/esm/taro-view-core.entry.js +7 -3
- package/dist/esm/taro-view-core.entry.js.map +1 -0
- package/dist/esm/taro-voip-room-core.entry.js +4 -2
- package/dist/esm/taro-voip-room-core.entry.js.map +1 -0
- package/dist/esm/taro-web-view-core.entry.js +5 -2
- package/dist/esm/taro-web-view-core.entry.js.map +1 -0
- package/dist/esm-es5/helper-3d0ecf0f.js +2 -1
- package/dist/esm-es5/helper-3d0ecf0f.js.map +1 -0
- package/dist/esm-es5/hls-221423a1.js +366 -0
- package/dist/esm-es5/hls-221423a1.js.map +1 -0
- package/dist/esm-es5/index-1d8e8acd.js +2 -1
- package/dist/esm-es5/index-1d8e8acd.js.map +1 -0
- package/dist/esm-es5/index-5d881caf.js +3 -0
- package/dist/esm-es5/index-5d881caf.js.map +1 -0
- package/dist/esm-es5/index-cad8203e.js +2 -1
- package/dist/esm-es5/index-cad8203e.js.map +1 -0
- package/dist/esm-es5/index.js +2 -0
- package/dist/esm-es5/index.js.map +1 -0
- package/dist/esm-es5/intersection-observer-8e4c7135.js +2 -1
- package/dist/esm-es5/intersection-observer-8e4c7135.js.map +1 -0
- package/dist/esm-es5/loader.js +2 -1
- package/dist/esm-es5/loader.js.map +1 -0
- package/dist/esm-es5/taro-ad-core.entry.js +2 -1
- package/dist/esm-es5/taro-ad-core.entry.js.map +1 -0
- package/dist/esm-es5/taro-ad-custom-core.entry.js +2 -1
- package/dist/esm-es5/taro-ad-custom-core.entry.js.map +1 -0
- package/dist/esm-es5/taro-audio-core.entry.js +2 -1
- package/dist/esm-es5/taro-audio-core.entry.js.map +1 -0
- package/dist/esm-es5/taro-block-core.entry.js +2 -1
- package/dist/esm-es5/taro-block-core.entry.js.map +1 -0
- package/dist/esm-es5/taro-button-core.entry.js +2 -1
- package/dist/esm-es5/taro-button-core.entry.js.map +1 -0
- package/dist/esm-es5/taro-camera-core.entry.js +2 -1
- package/dist/esm-es5/taro-camera-core.entry.js.map +1 -0
- package/dist/esm-es5/taro-canvas-core.entry.js +2 -1
- package/dist/esm-es5/taro-canvas-core.entry.js.map +1 -0
- package/dist/esm-es5/taro-checkbox-core_2.entry.js +2 -1
- package/dist/esm-es5/taro-checkbox-core_2.entry.js.map +1 -0
- package/dist/esm-es5/taro-components.js +2 -1
- package/dist/esm-es5/taro-components.js.map +1 -0
- package/dist/esm-es5/taro-cover-image-core.entry.js +2 -1
- package/dist/esm-es5/taro-cover-image-core.entry.js.map +1 -0
- package/dist/esm-es5/taro-cover-view-core.entry.js +2 -1
- package/dist/esm-es5/taro-cover-view-core.entry.js.map +1 -0
- package/dist/esm-es5/taro-custom-wrapper-core.entry.js +2 -1
- package/dist/esm-es5/taro-custom-wrapper-core.entry.js.map +1 -0
- package/dist/esm-es5/taro-editor-core.entry.js +2 -1
- package/dist/esm-es5/taro-editor-core.entry.js.map +1 -0
- package/dist/esm-es5/taro-form-core.entry.js +2 -1
- package/dist/esm-es5/taro-form-core.entry.js.map +1 -0
- package/dist/esm-es5/taro-functional-page-navigator-core.entry.js +2 -1
- package/dist/esm-es5/taro-functional-page-navigator-core.entry.js.map +1 -0
- package/dist/esm-es5/taro-icon-core.entry.js +2 -1
- package/dist/esm-es5/taro-icon-core.entry.js.map +1 -0
- package/dist/esm-es5/taro-image-core.entry.js +2 -1
- package/dist/esm-es5/taro-image-core.entry.js.map +1 -0
- package/dist/esm-es5/taro-input-core.entry.js +2 -1
- package/dist/esm-es5/taro-input-core.entry.js.map +1 -0
- package/dist/esm-es5/taro-keyboard-accessory-core.entry.js +2 -1
- package/dist/esm-es5/taro-keyboard-accessory-core.entry.js.map +1 -0
- package/dist/esm-es5/taro-label-core.entry.js +2 -1
- package/dist/esm-es5/taro-label-core.entry.js.map +1 -0
- package/dist/esm-es5/taro-live-player-core.entry.js +2 -1
- package/dist/esm-es5/taro-live-player-core.entry.js.map +1 -0
- package/dist/esm-es5/taro-live-pusher-core.entry.js +2 -1
- package/dist/esm-es5/taro-live-pusher-core.entry.js.map +1 -0
- package/dist/esm-es5/taro-map-core.entry.js +2 -1
- package/dist/esm-es5/taro-map-core.entry.js.map +1 -0
- package/dist/esm-es5/taro-match-media-core.entry.js +2 -1
- package/dist/esm-es5/taro-match-media-core.entry.js.map +1 -0
- package/dist/esm-es5/taro-movable-area-core_2.entry.js +2 -0
- package/dist/esm-es5/taro-movable-area-core_2.entry.js.map +1 -0
- package/dist/esm-es5/taro-navigation-bar-core.entry.js +2 -1
- package/dist/esm-es5/taro-navigation-bar-core.entry.js.map +1 -0
- package/dist/esm-es5/taro-navigator-core.entry.js +2 -1
- package/dist/esm-es5/taro-navigator-core.entry.js.map +1 -0
- package/dist/esm-es5/taro-official-account-core.entry.js +2 -1
- package/dist/esm-es5/taro-official-account-core.entry.js.map +1 -0
- package/dist/esm-es5/taro-open-data-core.entry.js +2 -1
- package/dist/esm-es5/taro-open-data-core.entry.js.map +1 -0
- package/dist/esm-es5/taro-page-container-core.entry.js +2 -1
- package/dist/esm-es5/taro-page-container-core.entry.js.map +1 -0
- package/dist/esm-es5/taro-page-meta-core.entry.js +2 -1
- package/dist/esm-es5/taro-page-meta-core.entry.js.map +1 -0
- package/dist/esm-es5/taro-picker-core_2.entry.js +2 -1
- package/dist/esm-es5/taro-picker-core_2.entry.js.map +1 -0
- package/dist/esm-es5/taro-picker-view-column-core_2.entry.js +2 -0
- package/dist/esm-es5/taro-picker-view-column-core_2.entry.js.map +1 -0
- package/dist/esm-es5/taro-progress-core.entry.js +2 -1
- package/dist/esm-es5/taro-progress-core.entry.js.map +1 -0
- package/dist/esm-es5/taro-pull-to-refresh.entry.js +2 -1
- package/dist/esm-es5/taro-pull-to-refresh.entry.js.map +1 -0
- package/dist/esm-es5/taro-radio-core_2.entry.js +2 -1
- package/dist/esm-es5/taro-radio-core_2.entry.js.map +1 -0
- package/dist/esm-es5/taro-rich-text-core.entry.js +2 -1
- package/dist/esm-es5/taro-rich-text-core.entry.js.map +1 -0
- package/dist/esm-es5/taro-root-portal-core.entry.js +2 -1
- package/dist/esm-es5/taro-root-portal-core.entry.js.map +1 -0
- package/dist/esm-es5/taro-scroll-view-core.entry.js +2 -1
- package/dist/esm-es5/taro-scroll-view-core.entry.js.map +1 -0
- package/dist/esm-es5/taro-share-element-core.entry.js +2 -1
- package/dist/esm-es5/taro-share-element-core.entry.js.map +1 -0
- package/dist/esm-es5/taro-slider-core.entry.js +2 -1
- package/dist/esm-es5/taro-slider-core.entry.js.map +1 -0
- package/dist/esm-es5/taro-slot-core.entry.js +2 -1
- package/dist/esm-es5/taro-slot-core.entry.js.map +1 -0
- package/dist/esm-es5/taro-swiper-core_2.entry.js +2 -1
- package/dist/esm-es5/taro-swiper-core_2.entry.js.map +1 -0
- package/dist/esm-es5/taro-switch-core.entry.js +2 -1
- package/dist/esm-es5/taro-switch-core.entry.js.map +1 -0
- package/dist/esm-es5/taro-tabbar.entry.js +2 -1
- package/dist/esm-es5/taro-tabbar.entry.js.map +1 -0
- package/dist/esm-es5/taro-text-core.entry.js +2 -1
- package/dist/esm-es5/taro-text-core.entry.js.map +1 -0
- package/dist/esm-es5/taro-textarea-core.entry.js +2 -1
- package/dist/esm-es5/taro-textarea-core.entry.js.map +1 -0
- package/dist/esm-es5/taro-video-control_3.entry.js +2 -365
- package/dist/esm-es5/taro-video-control_3.entry.js.map +1 -0
- package/dist/esm-es5/taro-view-core.entry.js +2 -1
- package/dist/esm-es5/taro-view-core.entry.js.map +1 -0
- package/dist/esm-es5/taro-voip-room-core.entry.js +2 -1
- package/dist/esm-es5/taro-voip-room-core.entry.js.map +1 -0
- package/dist/esm-es5/taro-web-view-core.entry.js +2 -1
- package/dist/esm-es5/taro-web-view-core.entry.js.map +1 -0
- package/{dist-h5/react/components → dist/react/component-lib}/index.js +1 -1
- package/{dist-h5/react/components → dist/react/component-lib}/input.js +5 -5
- package/{dist-h5/react/utils → dist/react/component-lib}/reactify-wc.js +10 -20
- package/dist/react/components.js +65 -0
- package/dist/react/helper.js +13 -0
- package/{dist-h5 → dist}/react/index.js +0 -0
- package/dist/react/react-component-lib/index.js +2 -0
- package/dist/react/react-component-lib/interfaces.js +1 -0
- package/dist/react/react-component-lib/utils/attachProps.js +107 -0
- package/dist/react/react-component-lib/utils/case.js +10 -0
- package/dist/react/react-component-lib/utils/dev.js +12 -0
- package/dist/taro-components/index.esm.js +2 -0
- package/dist/taro-components/index.esm.js.map +1 -0
- package/dist/taro-components/p-001ef419.system.entry.js +2 -0
- package/dist/taro-components/p-001ef419.system.entry.js.map +1 -0
- package/dist/taro-components/p-01dc54a5.entry.js +2 -0
- package/dist/taro-components/p-01dc54a5.entry.js.map +1 -0
- package/dist/taro-components/p-0382d7d0.system.entry.js +2 -0
- package/dist/taro-components/p-0382d7d0.system.entry.js.map +1 -0
- package/dist/taro-components/{p-a94524c9.system.entry.js → p-057159bc.system.entry.js} +2 -1
- package/dist/taro-components/p-057159bc.system.entry.js.map +1 -0
- package/dist/taro-components/p-0a896bc7.entry.js +2 -0
- package/dist/taro-components/p-0a896bc7.entry.js.map +1 -0
- package/dist/taro-components/p-0b38e6c7.system.entry.js +2 -0
- package/dist/taro-components/p-0b38e6c7.system.entry.js.map +1 -0
- package/dist/taro-components/p-0d36ef6b.entry.js +2 -0
- package/dist/taro-components/p-0d36ef6b.entry.js.map +1 -0
- package/dist/taro-components/p-0ee6a068.entry.js +2 -0
- package/dist/taro-components/p-0ee6a068.entry.js.map +1 -0
- package/dist/taro-components/p-12e4b019.entry.js +2 -0
- package/dist/taro-components/p-12e4b019.entry.js.map +1 -0
- package/dist/taro-components/p-15dced71.system.entry.js +2 -0
- package/dist/taro-components/p-15dced71.system.entry.js.map +1 -0
- package/dist/taro-components/p-15e45ed6.system.js +2 -1
- package/dist/taro-components/p-15e45ed6.system.js.map +1 -0
- package/dist/taro-components/{p-f81a74bb.system.entry.js → p-1743a04b.system.js} +82 -81
- package/dist/taro-components/p-1743a04b.system.js.map +1 -0
- package/dist/taro-components/p-17657dca.entry.js +2 -0
- package/dist/taro-components/p-17657dca.entry.js.map +1 -0
- package/dist/taro-components/p-1b2556e2.system.entry.js +2 -0
- package/dist/taro-components/p-1b2556e2.system.entry.js.map +1 -0
- package/dist/taro-components/p-1b64d2a2.entry.js +2 -0
- package/dist/taro-components/p-1b64d2a2.entry.js.map +1 -0
- package/dist/taro-components/p-1bd3d09b.system.entry.js +2 -0
- package/dist/taro-components/p-1bd3d09b.system.entry.js.map +1 -0
- package/dist/taro-components/p-1cb76199.entry.js +2 -0
- package/dist/taro-components/p-1cb76199.entry.js.map +1 -0
- package/dist/taro-components/{p-13f0b11f.system.entry.js → p-1cd1c507.system.entry.js} +2 -1
- package/dist/taro-components/p-1cd1c507.system.entry.js.map +1 -0
- package/dist/taro-components/p-1e436d5b.entry.js +2 -0
- package/dist/taro-components/p-1e436d5b.entry.js.map +1 -0
- package/dist/taro-components/p-2096bc5f.entry.js +2 -0
- package/dist/taro-components/p-2096bc5f.entry.js.map +1 -0
- package/dist/taro-components/p-20ec6387.entry.js +2 -0
- package/dist/taro-components/p-20ec6387.entry.js.map +1 -0
- package/dist/taro-components/{p-c5fd5c7f.system.entry.js → p-21b77a13.system.entry.js} +2 -1
- package/dist/taro-components/p-21b77a13.system.entry.js.map +1 -0
- package/dist/taro-components/p-2243a376.entry.js +2 -0
- package/dist/taro-components/p-2243a376.entry.js.map +1 -0
- package/dist/taro-components/p-22f9f9fa.entry.js +2 -0
- package/dist/taro-components/p-22f9f9fa.entry.js.map +1 -0
- package/dist/taro-components/p-29f04296.entry.js +2 -0
- package/dist/taro-components/p-29f04296.entry.js.map +1 -0
- package/dist/taro-components/{p-3e11c8cc.system.entry.js → p-301a8b85.system.entry.js} +2 -1
- package/dist/taro-components/p-301a8b85.system.entry.js.map +1 -0
- package/dist/taro-components/p-3b1d2d37.system.js +2 -1
- package/dist/taro-components/p-3b1d2d37.system.js.map +1 -0
- package/dist/taro-components/p-3b9a1125.entry.js +2 -0
- package/dist/taro-components/p-3b9a1125.entry.js.map +1 -0
- package/dist/taro-components/p-3c256e0e.entry.js +2 -0
- package/dist/taro-components/p-3c256e0e.entry.js.map +1 -0
- package/dist/taro-components/p-3e6b29c6.entry.js +2 -0
- package/dist/taro-components/p-3e6b29c6.entry.js.map +1 -0
- package/dist/taro-components/{p-a63fbc50.system.entry.js → p-439a3349.system.entry.js} +2 -1
- package/dist/taro-components/p-439a3349.system.entry.js.map +1 -0
- package/dist/taro-components/p-447386b2.system.entry.js +2 -0
- package/dist/taro-components/p-447386b2.system.entry.js.map +1 -0
- package/dist/taro-components/{p-d075934f.system.entry.js → p-45b6ea0c.system.entry.js} +2 -1
- package/dist/taro-components/p-45b6ea0c.system.entry.js.map +1 -0
- package/dist/taro-components/p-49a6cae4.system.entry.js +2 -0
- package/dist/taro-components/p-49a6cae4.system.entry.js.map +1 -0
- package/dist/taro-components/p-4b05e003.entry.js +2 -0
- package/dist/taro-components/p-4b05e003.entry.js.map +1 -0
- package/dist/taro-components/{p-692d986d.system.entry.js → p-4b27df71.system.entry.js} +2 -1
- package/dist/taro-components/p-4b27df71.system.entry.js.map +1 -0
- package/dist/taro-components/p-4b71c926.entry.js +2 -0
- package/dist/taro-components/p-4b71c926.entry.js.map +1 -0
- package/dist/taro-components/{p-f7c80795.system.entry.js → p-4fbb8b4c.system.entry.js} +2 -1
- package/dist/taro-components/p-4fbb8b4c.system.entry.js.map +1 -0
- package/dist/taro-components/p-50ea2036.system.js +2 -1
- package/dist/taro-components/p-50ea2036.system.js.map +1 -0
- package/dist/taro-components/p-55519002.entry.js +2 -0
- package/dist/taro-components/p-55519002.entry.js.map +1 -0
- package/dist/taro-components/p-570222e2.entry.js +2 -0
- package/dist/taro-components/p-570222e2.entry.js.map +1 -0
- package/dist/taro-components/p-5746d7ce.js +2 -1
- package/dist/taro-components/p-5746d7ce.js.map +1 -0
- package/dist/taro-components/{p-6ad59489.system.entry.js → p-580a72d1.system.entry.js} +2 -1
- package/dist/taro-components/p-580a72d1.system.entry.js.map +1 -0
- package/dist/taro-components/{p-93eed5d7.system.entry.js → p-59418be7.system.entry.js} +2 -1
- package/dist/taro-components/p-59418be7.system.entry.js.map +1 -0
- package/dist/taro-components/p-59e02aca.system.entry.js +2 -0
- package/dist/taro-components/p-59e02aca.system.entry.js.map +1 -0
- package/dist/taro-components/p-5b552407.entry.js +2 -0
- package/dist/taro-components/p-5b552407.entry.js.map +1 -0
- package/dist/taro-components/p-5bfefd19.js +3 -0
- package/dist/taro-components/p-5bfefd19.js.map +1 -0
- package/dist/taro-components/p-61f225ef.system.js +2 -1
- package/dist/taro-components/p-61f225ef.system.js.map +1 -0
- package/dist/taro-components/p-663d1bb9.system.js +2 -1
- package/dist/taro-components/p-663d1bb9.system.js.map +1 -0
- package/dist/taro-components/p-6a96da58.js +2 -1
- package/dist/taro-components/p-6a96da58.js.map +1 -0
- package/dist/taro-components/p-6af8be19.entry.js +2 -0
- package/dist/taro-components/p-6af8be19.entry.js.map +1 -0
- package/dist/taro-components/p-6ea2995b.entry.js +2 -0
- package/dist/taro-components/p-6ea2995b.entry.js.map +1 -0
- package/dist/taro-components/p-6f8af69f.entry.js +2 -0
- package/dist/taro-components/p-6f8af69f.entry.js.map +1 -0
- package/dist/taro-components/{p-f4ea8a56.system.entry.js → p-701b0286.system.entry.js} +2 -1
- package/dist/taro-components/p-701b0286.system.entry.js.map +1 -0
- package/dist/taro-components/p-72f327e1.js +2 -1
- package/dist/taro-components/p-72f327e1.js.map +1 -0
- package/dist/taro-components/p-72f626ab.system.entry.js +2 -0
- package/dist/taro-components/p-72f626ab.system.entry.js.map +1 -0
- package/dist/taro-components/p-755be847.system.entry.js +2 -0
- package/dist/taro-components/p-755be847.system.entry.js.map +1 -0
- package/dist/taro-components/p-76724e58.js +3 -2
- package/dist/taro-components/p-76724e58.js.map +1 -0
- package/dist/taro-components/p-7baff0b4.entry.js +2 -0
- package/dist/taro-components/p-7baff0b4.entry.js.map +1 -0
- package/dist/taro-components/p-8231e748.entry.js +2 -0
- package/dist/taro-components/p-8231e748.entry.js.map +1 -0
- package/dist/taro-components/{p-07294134.system.entry.js → p-8a3620a6.system.entry.js} +2 -1
- package/dist/taro-components/p-8a3620a6.system.entry.js.map +1 -0
- package/dist/taro-components/p-8a8f286f.system.js +3 -0
- package/dist/taro-components/p-8a8f286f.system.js.map +1 -0
- package/dist/taro-components/{p-7e960ac3.system.entry.js → p-8bec95d4.system.entry.js} +2 -1
- package/dist/taro-components/p-8bec95d4.system.entry.js.map +1 -0
- package/dist/taro-components/{p-e671c8c5.system.entry.js → p-8c8fe164.system.entry.js} +2 -1
- package/dist/taro-components/p-8c8fe164.system.entry.js.map +1 -0
- package/dist/taro-components/p-93cc7adc.entry.js +2 -0
- package/dist/taro-components/p-93cc7adc.entry.js.map +1 -0
- package/dist/taro-components/p-946c0799.system.entry.js +2 -0
- package/dist/taro-components/p-946c0799.system.entry.js.map +1 -0
- package/dist/taro-components/p-96a784f1.entry.js +2 -0
- package/dist/taro-components/p-96a784f1.entry.js.map +1 -0
- package/dist/taro-components/p-99bbe34a.system.entry.js +2 -0
- package/dist/taro-components/p-99bbe34a.system.entry.js.map +1 -0
- package/dist/taro-components/p-9e20c25c.entry.js +2 -0
- package/dist/taro-components/p-9e20c25c.entry.js.map +1 -0
- package/dist/taro-components/{p-075458e5.system.entry.js → p-9f1ca602.system.entry.js} +2 -1
- package/dist/taro-components/p-9f1ca602.system.entry.js.map +1 -0
- package/dist/taro-components/p-a1ace8c7.system.entry.js +2 -0
- package/dist/taro-components/p-a1ace8c7.system.entry.js.map +1 -0
- package/dist/taro-components/p-a29509fa.system.entry.js +2 -0
- package/dist/taro-components/p-a29509fa.system.entry.js.map +1 -0
- package/dist/taro-components/p-a2aab820.entry.js +2 -0
- package/dist/taro-components/p-a2aab820.entry.js.map +1 -0
- package/dist/taro-components/{p-d4da725f.system.entry.js → p-a6f2dc54.system.entry.js} +2 -1
- package/dist/taro-components/p-a6f2dc54.system.entry.js.map +1 -0
- package/dist/taro-components/p-ab105c26.entry.js +2 -0
- package/dist/taro-components/p-ab105c26.entry.js.map +1 -0
- package/dist/taro-components/{p-c93bb915.system.entry.js → p-b04a56bd.system.entry.js} +2 -1
- package/dist/taro-components/p-b04a56bd.system.entry.js.map +1 -0
- package/dist/taro-components/p-b10cb428.entry.js +2 -0
- package/dist/taro-components/p-b10cb428.entry.js.map +1 -0
- package/dist/taro-components/p-b4ec48c3.entry.js +2 -0
- package/dist/taro-components/p-b4ec48c3.entry.js.map +1 -0
- package/dist/taro-components/{p-d6662ab3.system.entry.js → p-b500c116.system.entry.js} +2 -1
- package/dist/taro-components/p-b500c116.system.entry.js.map +1 -0
- package/dist/taro-components/p-b832f4e8.entry.js +2 -0
- package/dist/taro-components/p-b832f4e8.entry.js.map +1 -0
- package/dist/taro-components/p-b88a55b4.system.entry.js +2 -0
- package/dist/taro-components/p-b88a55b4.system.entry.js.map +1 -0
- package/dist/taro-components/p-b90926cc.entry.js +2 -0
- package/dist/taro-components/p-b90926cc.entry.js.map +1 -0
- package/dist/taro-components/p-ba743573.entry.js +2 -0
- package/dist/taro-components/p-ba743573.entry.js.map +1 -0
- package/dist/taro-components/p-be3f5ac0.entry.js +2 -0
- package/dist/taro-components/p-be3f5ac0.entry.js.map +1 -0
- package/dist/taro-components/p-beea63a7.entry.js +2 -0
- package/dist/taro-components/p-beea63a7.entry.js.map +1 -0
- package/dist/taro-components/{p-b7681c76.system.entry.js → p-c0e3c822.system.entry.js} +2 -1
- package/dist/taro-components/p-c0e3c822.system.entry.js.map +1 -0
- package/dist/taro-components/p-c3acf0ea.system.entry.js +2 -0
- package/dist/taro-components/p-c3acf0ea.system.entry.js.map +1 -0
- package/dist/taro-components/p-c3bb8fa6.entry.js +2 -0
- package/dist/taro-components/p-c3bb8fa6.entry.js.map +1 -0
- package/dist/taro-components/{p-733cc64a.system.entry.js → p-c4cf58af.system.entry.js} +2 -1
- package/dist/taro-components/p-c4cf58af.system.entry.js.map +1 -0
- package/dist/taro-components/{p-b11aaf69.system.entry.js → p-c5c331bf.system.entry.js} +2 -1
- package/dist/taro-components/p-c5c331bf.system.entry.js.map +1 -0
- package/dist/taro-components/p-cb17d8bd.system.js +2 -0
- package/dist/taro-components/p-cb17d8bd.system.js.map +1 -0
- package/dist/taro-components/{p-fc9f4fd7.system.entry.js → p-cbe2436d.system.entry.js} +2 -1
- package/dist/taro-components/p-cbe2436d.system.entry.js.map +1 -0
- package/dist/taro-components/p-cd6a7eea.entry.js +2 -0
- package/dist/taro-components/p-cd6a7eea.entry.js.map +1 -0
- package/dist/taro-components/p-d4b6f19e.system.entry.js +2 -0
- package/dist/taro-components/p-d4b6f19e.system.entry.js.map +1 -0
- package/dist/taro-components/p-d5234e7e.js +366 -0
- package/dist/taro-components/p-d5234e7e.js.map +1 -0
- package/dist/taro-components/p-d5579efa.system.entry.js +2 -0
- package/dist/taro-components/p-d5579efa.system.entry.js.map +1 -0
- package/dist/taro-components/p-d619f198.system.entry.js +2 -0
- package/dist/taro-components/p-d619f198.system.entry.js.map +1 -0
- package/dist/taro-components/p-d7ab3e23.system.entry.js +2 -0
- package/dist/taro-components/p-d7ab3e23.system.entry.js.map +1 -0
- package/dist/taro-components/p-d7f4b10f.entry.js +2 -0
- package/dist/taro-components/p-d7f4b10f.entry.js.map +1 -0
- package/dist/taro-components/p-d85b216d.entry.js +2 -0
- package/dist/taro-components/p-d85b216d.entry.js.map +1 -0
- package/dist/taro-components/p-dcb48fd9.system.entry.js +2 -0
- package/dist/taro-components/p-dcb48fd9.system.entry.js.map +1 -0
- package/dist/taro-components/p-de762042.entry.js +2 -0
- package/dist/taro-components/p-de762042.entry.js.map +1 -0
- package/dist/taro-components/p-df862d0c.entry.js +2 -0
- package/dist/taro-components/p-df862d0c.entry.js.map +1 -0
- package/dist/taro-components/p-e0d6b00b.entry.js +2 -0
- package/dist/taro-components/p-e0d6b00b.entry.js.map +1 -0
- package/dist/taro-components/p-e4f1cc50.entry.js +2 -0
- package/dist/taro-components/p-e4f1cc50.entry.js.map +1 -0
- package/dist/taro-components/p-e59f999e.entry.js +2 -0
- package/dist/taro-components/p-e59f999e.entry.js.map +1 -0
- package/dist/taro-components/p-e7239faa.system.entry.js +2 -0
- package/dist/taro-components/p-e7239faa.system.entry.js.map +1 -0
- package/dist/taro-components/p-e98c07c3.system.entry.js +2 -0
- package/dist/taro-components/p-e98c07c3.system.entry.js.map +1 -0
- package/dist/taro-components/p-e9abe3e2.entry.js +2 -0
- package/dist/taro-components/p-e9abe3e2.entry.js.map +1 -0
- package/dist/taro-components/p-eddd00e9.system.entry.js +2 -0
- package/dist/taro-components/p-eddd00e9.system.entry.js.map +1 -0
- package/dist/taro-components/p-ef029c30.system.entry.js +2 -0
- package/dist/taro-components/p-ef029c30.system.entry.js.map +1 -0
- package/dist/taro-components/{p-8e2b048e.system.entry.js → p-f0d0160d.system.entry.js} +2 -1
- package/dist/taro-components/p-f0d0160d.system.entry.js.map +1 -0
- package/dist/taro-components/{p-f2803c2e.system.entry.js → p-f2c75971.system.entry.js} +2 -1
- package/dist/taro-components/p-f2c75971.system.entry.js.map +1 -0
- package/dist/taro-components/p-ffc44634.entry.js +2 -0
- package/dist/taro-components/p-ffc44634.entry.js.map +1 -0
- package/dist/taro-components/taro-components.esm.js +2 -1
- package/dist/taro-components/taro-components.esm.js.map +1 -0
- package/dist/taro-components/taro-components.js +2 -1
- 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 +4 -7
- package/dist/types/components/image/image.d.ts +1 -1
- package/dist/types/components/input/input.d.ts +4 -3
- 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 +3 -4
- package/dist/types/components/slot/slot.d.ts +0 -1
- package/dist/types/components/textarea/textarea.d.ts +1 -0
- package/dist/types/components/video/utils.d.ts +1 -1
- package/dist/types/components.d.ts +183 -70
- package/dist/types/stencil-public-runtime.d.ts +20 -4
- package/{dist-h5/vue/components/index.js → dist/vue2/component-lib/components.js} +0 -0
- package/{dist-h5/vue → dist/vue2/component-lib}/createComponent.js +0 -0
- package/{dist-h5/vue → dist/vue2/component-lib}/createFormsComponent.js +0 -0
- package/{dist-h5/vue/components → dist/vue2/component-lib}/icon.js +2 -2
- package/{dist-h5/vue/components → dist/vue2/component-lib}/image.js +2 -2
- package/{dist-h5/vue → dist/vue2/component-lib}/index.js +4 -3
- package/{dist-h5/vue → dist/vue2/component-lib}/mixins/listeners.js +0 -0
- package/{dist-h5/vue → dist/vue2/component-lib}/mixins/refs.js +0 -0
- package/{dist-h5/vue/components → dist/vue2/component-lib}/picker.js +2 -2
- package/{dist-h5/vue/components → dist/vue2/component-lib}/scroll-view.js +2 -2
- package/{dist-h5/vue/components → dist/vue2/component-lib}/text.js +2 -2
- package/dist/vue2/components.js +490 -0
- package/dist/vue2/index.js +26 -0
- package/dist/vue2/vue-component-lib/utils.js +45 -0
- package/{dist-h5/vue3 → dist/vue3/component-lib}/createComponent.js +1 -1
- package/{dist-h5/vue3 → dist/vue3/component-lib}/createFormsComponent.js +0 -0
- package/{dist-h5/vue3 → dist/vue3/component-lib}/forwardRef.js +0 -0
- package/{dist-h5/vue3/components → dist/vue3/component-lib}/icon.js +2 -2
- package/{dist-h5/vue3/components → dist/vue3/component-lib}/image.js +2 -2
- package/{dist-h5/vue3/components → dist/vue3/component-lib}/index.js +2 -2
- package/{dist-h5/vue3/components → dist/vue3/component-lib}/scroll-view.js +2 -2
- package/{dist-h5/vue3/components → dist/vue3/component-lib}/text.js +2 -2
- package/dist/vue3/components.js +64 -0
- package/{dist-h5 → dist}/vue3/index.js +0 -0
- package/dist/vue3/vue-component-lib/utils.js +201 -0
- package/loader/package.json +1 -0
- package/package.json +23 -23
- package/types/Ad.d.ts +20 -21
- package/types/Audio.d.ts +5 -5
- package/types/Button.d.ts +67 -70
- package/types/Camera.d.ts +15 -16
- package/types/Canvas.d.ts +22 -27
- package/types/Checkbox.d.ts +7 -7
- package/types/CoverImage.d.ts +15 -15
- package/types/CoverView.d.ts +5 -5
- package/types/Form.d.ts +10 -10
- package/types/Image.d.ts +20 -20
- package/types/Input.d.ts +26 -24
- package/types/LivePlayer.d.ts +31 -25
- package/types/LivePusher.d.ts +5 -5
- package/types/Map.d.ts +66 -71
- package/types/MovableView.d.ts +5 -14
- package/types/Navigator.d.ts +10 -10
- package/types/OpenData.d.ts +5 -5
- package/types/PageContainer.d.ts +7 -10
- package/types/PageMeta.d.ts +14 -14
- package/types/Picker.d.ts +1 -5
- package/types/PickerView.d.ts +11 -21
- package/types/Progress.d.ts +5 -5
- package/types/RadioGroup.d.ts +5 -5
- package/types/RichText.d.ts +17 -17
- package/types/ScrollView.d.ts +46 -30
- package/types/Slider.d.ts +10 -10
- package/types/Swiper.d.ts +20 -20
- package/types/Switch.d.ts +5 -5
- package/types/Textarea.d.ts +32 -32
- package/types/Video.d.ts +119 -108
- package/types/View.d.ts +21 -15
- package/types/VoipRoom.d.ts +5 -5
- package/types/WebView.d.ts +11 -5
- package/dist/cjs/taro-movable-area-core.cjs.entry.js +0 -157
- package/dist/cjs/taro-picker-view-column-core.cjs.entry.js +0 -95
- package/dist/esm/taro-movable-area-core.entry.js +0 -153
- package/dist/esm/taro-picker-view-column-core.entry.js +0 -91
- package/dist/esm-es5/index-8809c729.js +0 -1
- package/dist/esm-es5/taro-movable-area-core.entry.js +0 -1
- package/dist/esm-es5/taro-movable-view-core.entry.js +0 -1
- package/dist/esm-es5/taro-picker-view-column-core.entry.js +0 -1
- package/dist/esm-es5/taro-picker-view-core.entry.js +0 -1
- package/dist/taro-components/p-028e2728.entry.js +0 -1
- package/dist/taro-components/p-0380841f.system.js +0 -1
- package/dist/taro-components/p-059912fd.js +0 -1
- package/dist/taro-components/p-06178a0c.entry.js +0 -1
- package/dist/taro-components/p-06e6864b.system.entry.js +0 -1
- package/dist/taro-components/p-10c47df8.system.entry.js +0 -1
- package/dist/taro-components/p-1c775a11.system.entry.js +0 -1
- package/dist/taro-components/p-232ebfae.system.entry.js +0 -1
- package/dist/taro-components/p-25df0ce9.entry.js +0 -1
- package/dist/taro-components/p-27126803.system.entry.js +0 -1
- package/dist/taro-components/p-275d883f.system.entry.js +0 -1
- package/dist/taro-components/p-27c80869.system.entry.js +0 -1
- package/dist/taro-components/p-2ec47545.entry.js +0 -1
- package/dist/taro-components/p-3255f11f.system.entry.js +0 -1
- package/dist/taro-components/p-362998cf.entry.js +0 -1
- package/dist/taro-components/p-3744e978.entry.js +0 -365
- package/dist/taro-components/p-3c6090fd.entry.js +0 -1
- package/dist/taro-components/p-44398c17.system.entry.js +0 -1
- package/dist/taro-components/p-44cbb351.system.js +0 -1
- package/dist/taro-components/p-4ada10aa.entry.js +0 -1
- package/dist/taro-components/p-4cf436f9.entry.js +0 -1
- package/dist/taro-components/p-4d826fb7.entry.js +0 -1
- package/dist/taro-components/p-55266a1f.entry.js +0 -1
- package/dist/taro-components/p-56c86512.entry.js +0 -1
- package/dist/taro-components/p-5733124c.entry.js +0 -1
- package/dist/taro-components/p-57a2a441.entry.js +0 -1
- package/dist/taro-components/p-59d93770.entry.js +0 -1
- package/dist/taro-components/p-5a2305e7.entry.js +0 -1
- package/dist/taro-components/p-5a374cb9.entry.js +0 -1
- package/dist/taro-components/p-5c87902f.system.entry.js +0 -1
- package/dist/taro-components/p-5e223bab.system.entry.js +0 -1
- package/dist/taro-components/p-5f18259d.system.entry.js +0 -1
- package/dist/taro-components/p-62fc514e.entry.js +0 -1
- package/dist/taro-components/p-63a0c6b0.entry.js +0 -1
- package/dist/taro-components/p-64447f5a.system.entry.js +0 -1
- package/dist/taro-components/p-67222d90.system.entry.js +0 -1
- package/dist/taro-components/p-6800ac6f.entry.js +0 -1
- package/dist/taro-components/p-6aa557f0.entry.js +0 -1
- package/dist/taro-components/p-72f858e4.entry.js +0 -1
- package/dist/taro-components/p-7374537f.entry.js +0 -1
- package/dist/taro-components/p-7407013d.entry.js +0 -1
- package/dist/taro-components/p-7d329ab0.entry.js +0 -1
- package/dist/taro-components/p-7f93fa08.entry.js +0 -1
- package/dist/taro-components/p-82661d45.system.entry.js +0 -1
- package/dist/taro-components/p-8475421b.system.entry.js +0 -1
- package/dist/taro-components/p-8788dc46.system.entry.js +0 -1
- package/dist/taro-components/p-886571e5.entry.js +0 -1
- package/dist/taro-components/p-888fac99.entry.js +0 -1
- package/dist/taro-components/p-8aea3de3.entry.js +0 -1
- package/dist/taro-components/p-8c8be53b.entry.js +0 -1
- package/dist/taro-components/p-8cf86f31.system.entry.js +0 -1
- package/dist/taro-components/p-9234cc1d.entry.js +0 -1
- package/dist/taro-components/p-92699438.entry.js +0 -1
- package/dist/taro-components/p-9a0e70b1.entry.js +0 -1
- package/dist/taro-components/p-9afbb423.system.entry.js +0 -1
- package/dist/taro-components/p-9b39a940.entry.js +0 -1
- package/dist/taro-components/p-9e1572c5.system.entry.js +0 -1
- package/dist/taro-components/p-ab1256fe.entry.js +0 -1
- package/dist/taro-components/p-ad6ad7e3.system.entry.js +0 -1
- package/dist/taro-components/p-afbcd093.entry.js +0 -1
- package/dist/taro-components/p-b1ae9401.entry.js +0 -1
- package/dist/taro-components/p-b2800ccd.entry.js +0 -1
- package/dist/taro-components/p-b3b677fc.entry.js +0 -1
- package/dist/taro-components/p-b3d961f9.system.entry.js +0 -1
- package/dist/taro-components/p-b60820b4.entry.js +0 -1
- package/dist/taro-components/p-b7639674.entry.js +0 -1
- package/dist/taro-components/p-b7ac0b7f.system.entry.js +0 -1
- package/dist/taro-components/p-b9903f15.system.entry.js +0 -1
- package/dist/taro-components/p-bd706d39.entry.js +0 -1
- package/dist/taro-components/p-c92bafb6.system.entry.js +0 -1
- package/dist/taro-components/p-cf048af9.entry.js +0 -1
- package/dist/taro-components/p-d5f3080c.entry.js +0 -1
- package/dist/taro-components/p-df3b544a.system.entry.js +0 -1
- package/dist/taro-components/p-dff55efd.entry.js +0 -1
- package/dist/taro-components/p-eec00033.entry.js +0 -1
- package/dist/taro-components/p-eeed74e3.system.entry.js +0 -1
- package/dist/taro-components/p-ef006b23.entry.js +0 -1
- package/dist/taro-components/p-f8b9c4b0.entry.js +0 -1
- package/dist/taro-components/p-fa2a9bab.entry.js +0 -1
- package/dist/taro-components/p-fec6ac36.entry.js +0 -1
- package/dist/taro-components/p-ff84986d.entry.js +0 -1
- package/dist/taro-components/p-ffefd74f.entry.js +0 -1
|
@@ -1,5 +1,13 @@
|
|
|
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
|
+
*/
|
|
3
11
|
let contentRef;
|
|
4
12
|
let hostTagName;
|
|
5
13
|
let useNativeShadowDom = false;
|
|
@@ -7,63 +15,6 @@ let checkSlotFallbackVisibility = false;
|
|
|
7
15
|
let checkSlotRelocate = false;
|
|
8
16
|
let isSvgMode = false;
|
|
9
17
|
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';
|
|
67
18
|
const createTime = (fnName, tagName = '') => {
|
|
68
19
|
{
|
|
69
20
|
return () => {
|
|
@@ -78,59 +29,8 @@ const uniqueTime = (key, measureText) => {
|
|
|
78
29
|
};
|
|
79
30
|
}
|
|
80
31
|
};
|
|
81
|
-
const
|
|
82
|
-
const
|
|
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$);
|
|
32
|
+
const HYDRATED_CSS = '{visibility:hidden}.hydrated{visibility:inherit}';
|
|
33
|
+
const XLINK_NS = 'http://www.w3.org/1999/xlink';
|
|
134
34
|
/**
|
|
135
35
|
* Default style mode id
|
|
136
36
|
*/
|
|
@@ -161,7 +61,7 @@ const h = (nodeName, vnodeData, ...children) => {
|
|
|
161
61
|
let slotName = null;
|
|
162
62
|
let simple = false;
|
|
163
63
|
let lastSimple = false;
|
|
164
|
-
|
|
64
|
+
const vNodeChildren = [];
|
|
165
65
|
const walk = (c) => {
|
|
166
66
|
for (let i = 0; i < c.length; i++) {
|
|
167
67
|
child = c[i];
|
|
@@ -273,6 +173,137 @@ const convertToPrivate = (node) => {
|
|
|
273
173
|
vnode.$name$ = node.vname;
|
|
274
174
|
return vnode;
|
|
275
175
|
};
|
|
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$);
|
|
276
307
|
/**
|
|
277
308
|
* Production setAccessor() function based on Preact by
|
|
278
309
|
* Jason Miller (@developit)
|
|
@@ -370,7 +401,7 @@ const setAccessor = (elm, memberName, oldValue, newValue, isSvg, flags) => {
|
|
|
370
401
|
if ((isProp || (isComplex && newValue !== null)) && !isSvg) {
|
|
371
402
|
try {
|
|
372
403
|
if (!elm.tagName.includes('-')) {
|
|
373
|
-
|
|
404
|
+
const n = newValue == null ? '' : newValue;
|
|
374
405
|
// Workaround for Safari, moving the <input> caret when re-assigning the same valued
|
|
375
406
|
if (memberName === 'list') {
|
|
376
407
|
isProp = false;
|
|
@@ -409,7 +440,7 @@ const setAccessor = (elm, memberName, oldValue, newValue, isSvg, flags) => {
|
|
|
409
440
|
}
|
|
410
441
|
}
|
|
411
442
|
}
|
|
412
|
-
else if ((!isProp || flags & 4 /* isHost */ || isSvg) && !isComplex) {
|
|
443
|
+
else if ((!isProp || flags & 4 /* VNODE_FLAGS.isHost */ || isSvg) && !isComplex) {
|
|
413
444
|
newValue = newValue === true ? '' : newValue;
|
|
414
445
|
if (xlink) {
|
|
415
446
|
elm.setAttributeNS(XLINK_NS, memberName, newValue);
|
|
@@ -427,7 +458,7 @@ const updateElement = (oldVnode, newVnode, isSvgMode, memberName) => {
|
|
|
427
458
|
// if the element passed in is a shadow root, which is a document fragment
|
|
428
459
|
// then we want to be adding attrs/props to the shadow root's "host" element
|
|
429
460
|
// if it's not a shadow root, then we add attrs/props to the same element
|
|
430
|
-
const elm = newVnode.$elm$.nodeType === 11 /* DocumentFragment */ && newVnode.$elm$.host
|
|
461
|
+
const elm = newVnode.$elm$.nodeType === 11 /* NODE_TYPE.DocumentFragment */ && newVnode.$elm$.host
|
|
431
462
|
? newVnode.$elm$.host
|
|
432
463
|
: newVnode.$elm$;
|
|
433
464
|
const oldVnodeAttrs = (oldVnode && oldVnode.$attrs$) || EMPTY_OBJ;
|
|
@@ -445,9 +476,19 @@ const updateElement = (oldVnode, newVnode, isSvgMode, memberName) => {
|
|
|
445
476
|
setAccessor(elm, memberName, oldVnodeAttrs[memberName], newVnodeAttrs[memberName], isSvgMode, newVnode.$flags$);
|
|
446
477
|
}
|
|
447
478
|
};
|
|
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
|
+
*/
|
|
448
489
|
const createElm = (oldParentVNode, newParentVNode, childIndex, parentElm) => {
|
|
449
490
|
// tslint:disable-next-line: prefer-const
|
|
450
|
-
|
|
491
|
+
const newVNode = newParentVNode.$children$[childIndex];
|
|
451
492
|
let i = 0;
|
|
452
493
|
let elm;
|
|
453
494
|
let childNode;
|
|
@@ -458,23 +499,23 @@ const createElm = (oldParentVNode, newParentVNode, childIndex, parentElm) => {
|
|
|
458
499
|
if (newVNode.$tag$ === 'slot') {
|
|
459
500
|
newVNode.$flags$ |= newVNode.$children$
|
|
460
501
|
? // slot element has fallback content
|
|
461
|
-
2 /* isSlotFallback */
|
|
502
|
+
2 /* VNODE_FLAGS.isSlotFallback */
|
|
462
503
|
: // slot element does not have fallback content
|
|
463
|
-
1 /* isSlotReference */;
|
|
504
|
+
1 /* VNODE_FLAGS.isSlotReference */;
|
|
464
505
|
}
|
|
465
506
|
}
|
|
466
507
|
if (newVNode.$text$ !== null) {
|
|
467
508
|
// create text node
|
|
468
509
|
elm = newVNode.$elm$ = doc.createTextNode(newVNode.$text$);
|
|
469
510
|
}
|
|
470
|
-
else if (newVNode.$flags$ & 1 /* isSlotReference */) {
|
|
511
|
+
else if (newVNode.$flags$ & 1 /* VNODE_FLAGS.isSlotReference */) {
|
|
471
512
|
// create a slot reference node
|
|
472
513
|
elm = newVNode.$elm$ =
|
|
473
514
|
doc.createTextNode('');
|
|
474
515
|
}
|
|
475
516
|
else {
|
|
476
517
|
// create element
|
|
477
|
-
elm = newVNode.$elm$ = (doc.createElement(newVNode.$flags$ & 2 /* isSlotFallback */
|
|
518
|
+
elm = newVNode.$elm$ = (doc.createElement(newVNode.$flags$ & 2 /* VNODE_FLAGS.isSlotFallback */
|
|
478
519
|
? 'slot-fb'
|
|
479
520
|
: newVNode.$tag$));
|
|
480
521
|
// add css classes, attrs, props, listeners, etc.
|
|
@@ -495,7 +536,7 @@ const createElm = (oldParentVNode, newParentVNode, childIndex, parentElm) => {
|
|
|
495
536
|
}
|
|
496
537
|
{
|
|
497
538
|
elm['s-hn'] = hostTagName;
|
|
498
|
-
if (newVNode.$flags$ & (2 /* isSlotFallback */ | 1 /* isSlotReference */)) {
|
|
539
|
+
if (newVNode.$flags$ & (2 /* VNODE_FLAGS.isSlotFallback */ | 1 /* VNODE_FLAGS.isSlotReference */)) {
|
|
499
540
|
// remember the content reference comment
|
|
500
541
|
elm['s-sr'] = true;
|
|
501
542
|
// remember the content reference comment
|
|
@@ -514,7 +555,7 @@ const createElm = (oldParentVNode, newParentVNode, childIndex, parentElm) => {
|
|
|
514
555
|
return elm;
|
|
515
556
|
};
|
|
516
557
|
const putBackInOriginalLocation = (parentElm, recursive) => {
|
|
517
|
-
plt.$flags$ |= 1 /* isTmpDisconnected */;
|
|
558
|
+
plt.$flags$ |= 1 /* PLATFORM_FLAGS.isTmpDisconnected */;
|
|
518
559
|
const oldSlotChildNodes = parentElm.childNodes;
|
|
519
560
|
for (let i = oldSlotChildNodes.length - 1; i >= 0; i--) {
|
|
520
561
|
const childNode = oldSlotChildNodes[i];
|
|
@@ -535,7 +576,7 @@ const putBackInOriginalLocation = (parentElm, recursive) => {
|
|
|
535
576
|
putBackInOriginalLocation(childNode, recursive);
|
|
536
577
|
}
|
|
537
578
|
}
|
|
538
|
-
plt.$flags$ &= ~1 /* isTmpDisconnected */;
|
|
579
|
+
plt.$flags$ &= ~1 /* PLATFORM_FLAGS.isTmpDisconnected */;
|
|
539
580
|
};
|
|
540
581
|
const addVnodes = (parentElm, before, parentVNode, vnodes, startIdx, endIdx) => {
|
|
541
582
|
let containerElm = ((parentElm['s-cr'] && parentElm['s-cr'].parentNode) || parentElm);
|
|
@@ -574,6 +615,74 @@ const removeVnodes = (vnodes, startIdx, endIdx, vnode, elm) => {
|
|
|
574
615
|
}
|
|
575
616
|
}
|
|
576
617
|
};
|
|
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
|
+
*/
|
|
577
686
|
const updateChildren = (parentElm, oldCh, newVNode, newCh) => {
|
|
578
687
|
let oldStartIdx = 0;
|
|
579
688
|
let newStartIdx = 0;
|
|
@@ -589,7 +698,7 @@ const updateChildren = (parentElm, oldCh, newVNode, newCh) => {
|
|
|
589
698
|
let elmToMove;
|
|
590
699
|
while (oldStartIdx <= oldEndIdx && newStartIdx <= newEndIdx) {
|
|
591
700
|
if (oldStartVnode == null) {
|
|
592
|
-
//
|
|
701
|
+
// VNode might have been moved left
|
|
593
702
|
oldStartVnode = oldCh[++oldStartIdx];
|
|
594
703
|
}
|
|
595
704
|
else if (oldEndVnode == null) {
|
|
@@ -602,37 +711,100 @@ const updateChildren = (parentElm, oldCh, newVNode, newCh) => {
|
|
|
602
711
|
newEndVnode = newCh[--newEndIdx];
|
|
603
712
|
}
|
|
604
713
|
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.
|
|
605
718
|
patch(oldStartVnode, newStartVnode);
|
|
606
719
|
oldStartVnode = oldCh[++oldStartIdx];
|
|
607
720
|
newStartVnode = newCh[++newStartIdx];
|
|
608
721
|
}
|
|
609
722
|
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.
|
|
610
726
|
patch(oldEndVnode, newEndVnode);
|
|
611
727
|
oldEndVnode = oldCh[--oldEndIdx];
|
|
612
728
|
newEndVnode = newCh[--newEndIdx];
|
|
613
729
|
}
|
|
614
730
|
else if (isSameVnode(oldStartVnode, newEndVnode)) {
|
|
615
|
-
// Vnode moved right
|
|
731
|
+
// case: "Vnode moved right"
|
|
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`.
|
|
616
745
|
if ((oldStartVnode.$tag$ === 'slot' || newEndVnode.$tag$ === 'slot')) {
|
|
617
746
|
putBackInOriginalLocation(oldStartVnode.$elm$.parentNode, false);
|
|
618
747
|
}
|
|
619
748
|
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.
|
|
620
766
|
parentElm.insertBefore(oldStartVnode.$elm$, oldEndVnode.$elm$.nextSibling);
|
|
621
767
|
oldStartVnode = oldCh[++oldStartIdx];
|
|
622
768
|
newEndVnode = newCh[--newEndIdx];
|
|
623
769
|
}
|
|
624
770
|
else if (isSameVnode(oldEndVnode, newStartVnode)) {
|
|
625
|
-
// Vnode moved left
|
|
771
|
+
// case: "Vnode moved left"
|
|
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.
|
|
626
786
|
if ((oldStartVnode.$tag$ === 'slot' || newEndVnode.$tag$ === 'slot')) {
|
|
627
787
|
putBackInOriginalLocation(oldEndVnode.$elm$.parentNode, false);
|
|
628
788
|
}
|
|
629
789
|
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.
|
|
630
795
|
parentElm.insertBefore(oldEndVnode.$elm$, oldStartVnode.$elm$);
|
|
631
796
|
oldEndVnode = oldCh[--oldEndIdx];
|
|
632
797
|
newStartVnode = newCh[++newStartIdx];
|
|
633
798
|
}
|
|
634
799
|
else {
|
|
635
|
-
//
|
|
800
|
+
// Here we do some checks to match up old and new nodes based on the
|
|
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.
|
|
636
808
|
idxInOld = -1;
|
|
637
809
|
{
|
|
638
810
|
for (i = oldStartIdx; i <= oldEndIdx; ++i) {
|
|
@@ -643,23 +815,32 @@ const updateChildren = (parentElm, oldCh, newVNode, newCh) => {
|
|
|
643
815
|
}
|
|
644
816
|
}
|
|
645
817
|
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
|
|
646
820
|
elmToMove = oldCh[idxInOld];
|
|
647
821
|
if (elmToMove.$tag$ !== newStartVnode.$tag$) {
|
|
822
|
+
// the tag doesn't match so we'll need a new DOM element
|
|
648
823
|
node = createElm(oldCh && oldCh[newStartIdx], newVNode, idxInOld);
|
|
649
824
|
}
|
|
650
825
|
else {
|
|
651
826
|
patch(elmToMove, newStartVnode);
|
|
827
|
+
// invalidate the matching old node so that we won't try to update it
|
|
828
|
+
// again later on
|
|
652
829
|
oldCh[idxInOld] = undefined;
|
|
653
830
|
node = elmToMove.$elm$;
|
|
654
831
|
}
|
|
655
832
|
newStartVnode = newCh[++newStartIdx];
|
|
656
833
|
}
|
|
657
834
|
else {
|
|
658
|
-
//
|
|
835
|
+
// We either didn't find an element in the old children that matches
|
|
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.
|
|
659
839
|
node = createElm(oldCh && oldCh[newStartIdx], newVNode, newStartIdx);
|
|
660
840
|
newStartVnode = newCh[++newStartIdx];
|
|
661
841
|
}
|
|
662
842
|
if (node) {
|
|
843
|
+
// if we created a new node then handle inserting it to the DOM
|
|
663
844
|
{
|
|
664
845
|
parentReferenceNode(oldStartVnode.$elm$).insertBefore(node, referenceNode(oldStartVnode.$elm$));
|
|
665
846
|
}
|
|
@@ -667,21 +848,43 @@ const updateChildren = (parentElm, oldCh, newVNode, newCh) => {
|
|
|
667
848
|
}
|
|
668
849
|
}
|
|
669
850
|
if (oldStartIdx > oldEndIdx) {
|
|
851
|
+
// we have some more new nodes to add which don't match up with old nodes
|
|
670
852
|
addVnodes(parentElm, newCh[newEndIdx + 1] == null ? null : newCh[newEndIdx + 1].$elm$, newVNode, newCh, newStartIdx, newEndIdx);
|
|
671
853
|
}
|
|
672
854
|
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)
|
|
673
858
|
removeVnodes(oldCh, oldStartIdx, oldEndIdx);
|
|
674
859
|
}
|
|
675
860
|
};
|
|
676
|
-
|
|
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) => {
|
|
677
879
|
// compare if two vnode to see if they're "technically" the same
|
|
678
880
|
// need to have the same element tag, and same key to be the same
|
|
679
|
-
if (
|
|
680
|
-
if (
|
|
681
|
-
return
|
|
881
|
+
if (leftVNode.$tag$ === rightVNode.$tag$) {
|
|
882
|
+
if (leftVNode.$tag$ === 'slot') {
|
|
883
|
+
return leftVNode.$name$ === rightVNode.$name$;
|
|
682
884
|
}
|
|
885
|
+
// this will be set if components in the build have `key` attrs set on them
|
|
683
886
|
{
|
|
684
|
-
return
|
|
887
|
+
return leftVNode.$key$ === rightVNode.$key$;
|
|
685
888
|
}
|
|
686
889
|
}
|
|
687
890
|
return false;
|
|
@@ -694,6 +897,14 @@ const referenceNode = (node) => {
|
|
|
694
897
|
return (node && node['s-ol']) || node;
|
|
695
898
|
};
|
|
696
899
|
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
|
+
*/
|
|
697
908
|
const patch = (oldVNode, newVNode) => {
|
|
698
909
|
const elm = (newVNode.$elm$ = oldVNode.$elm$);
|
|
699
910
|
const oldChildren = oldVNode.$children$;
|
|
@@ -702,7 +913,6 @@ const patch = (oldVNode, newVNode) => {
|
|
|
702
913
|
const text = newVNode.$text$;
|
|
703
914
|
let defaultHolder;
|
|
704
915
|
if (text === null) {
|
|
705
|
-
// element node
|
|
706
916
|
{
|
|
707
917
|
if (tag === 'slot')
|
|
708
918
|
;
|
|
@@ -715,6 +925,7 @@ const patch = (oldVNode, newVNode) => {
|
|
|
715
925
|
}
|
|
716
926
|
if (oldChildren !== null && newChildren !== null) {
|
|
717
927
|
// looks like there's child vnodes for both the old and new vnodes
|
|
928
|
+
// so we need to call `updateChildren` to reconcile them
|
|
718
929
|
updateChildren(elm, oldChildren, newVNode, newChildren);
|
|
719
930
|
}
|
|
720
931
|
else if (newChildren !== null) {
|
|
@@ -743,7 +954,7 @@ const patch = (oldVNode, newVNode) => {
|
|
|
743
954
|
};
|
|
744
955
|
const updateFallbackSlotVisibility = (elm) => {
|
|
745
956
|
// tslint:disable-next-line: prefer-const
|
|
746
|
-
|
|
957
|
+
const childNodes = elm.childNodes;
|
|
747
958
|
let childNode;
|
|
748
959
|
let i;
|
|
749
960
|
let ilen;
|
|
@@ -752,7 +963,7 @@ const updateFallbackSlotVisibility = (elm) => {
|
|
|
752
963
|
let nodeType;
|
|
753
964
|
for (i = 0, ilen = childNodes.length; i < ilen; i++) {
|
|
754
965
|
childNode = childNodes[i];
|
|
755
|
-
if (childNode.nodeType === 1 /* ElementNode */) {
|
|
966
|
+
if (childNode.nodeType === 1 /* NODE_TYPE.ElementNode */) {
|
|
756
967
|
if (childNode['s-sr']) {
|
|
757
968
|
// this is a slot fallback node
|
|
758
969
|
// get the slot name for this slot reference node
|
|
@@ -764,7 +975,7 @@ const updateFallbackSlotVisibility = (elm) => {
|
|
|
764
975
|
nodeType = childNodes[j].nodeType;
|
|
765
976
|
if (childNodes[j]['s-hn'] !== childNode['s-hn'] || slotNameAttr !== '') {
|
|
766
977
|
// this sibling node is from a different component OR is a named fallback slot node
|
|
767
|
-
if (nodeType === 1 /* ElementNode */ && slotNameAttr === childNodes[j].getAttribute('slot')) {
|
|
978
|
+
if (nodeType === 1 /* NODE_TYPE.ElementNode */ && slotNameAttr === childNodes[j].getAttribute('slot')) {
|
|
768
979
|
childNode.hidden = true;
|
|
769
980
|
break;
|
|
770
981
|
}
|
|
@@ -773,8 +984,8 @@ const updateFallbackSlotVisibility = (elm) => {
|
|
|
773
984
|
// this is a default fallback slot node
|
|
774
985
|
// any element or text node (with content)
|
|
775
986
|
// should hide the default fallback slot node
|
|
776
|
-
if (nodeType === 1 /* ElementNode */ ||
|
|
777
|
-
(nodeType === 3 /* TextNode */ && childNodes[j].textContent.trim() !== '')) {
|
|
987
|
+
if (nodeType === 1 /* NODE_TYPE.ElementNode */ ||
|
|
988
|
+
(nodeType === 3 /* NODE_TYPE.TextNode */ && childNodes[j].textContent.trim() !== '')) {
|
|
778
989
|
childNode.hidden = true;
|
|
779
990
|
break;
|
|
780
991
|
}
|
|
@@ -796,8 +1007,8 @@ const relocateSlotContent = (elm) => {
|
|
|
796
1007
|
let relocateNodeData;
|
|
797
1008
|
let j;
|
|
798
1009
|
let i = 0;
|
|
799
|
-
|
|
800
|
-
|
|
1010
|
+
const childNodes = elm.childNodes;
|
|
1011
|
+
const ilen = childNodes.length;
|
|
801
1012
|
for (; i < ilen; i++) {
|
|
802
1013
|
childNode = childNodes[i];
|
|
803
1014
|
if (childNode['s-sr'] && (node = childNode['s-cr']) && node.parentNode) {
|
|
@@ -852,13 +1063,13 @@ const relocateSlotContent = (elm) => {
|
|
|
852
1063
|
}
|
|
853
1064
|
}
|
|
854
1065
|
}
|
|
855
|
-
if (childNode.nodeType === 1 /* ElementNode */) {
|
|
1066
|
+
if (childNode.nodeType === 1 /* NODE_TYPE.ElementNode */) {
|
|
856
1067
|
relocateSlotContent(childNode);
|
|
857
1068
|
}
|
|
858
1069
|
}
|
|
859
1070
|
};
|
|
860
1071
|
const isNodeLocatedInSlot = (nodeToRelocate, slotNameAttr) => {
|
|
861
|
-
if (nodeToRelocate.nodeType === 1 /* ElementNode */) {
|
|
1072
|
+
if (nodeToRelocate.nodeType === 1 /* NODE_TYPE.ElementNode */) {
|
|
862
1073
|
if (nodeToRelocate.getAttribute('slot') === null && slotNameAttr === '') {
|
|
863
1074
|
return true;
|
|
864
1075
|
}
|
|
@@ -884,13 +1095,17 @@ const renderVdom = (hostRef, renderFnResults) => {
|
|
|
884
1095
|
const oldVNode = hostRef.$vnode$ || newVNode(null, null);
|
|
885
1096
|
const rootVnode = isHost(renderFnResults) ? renderFnResults : h(null, null, renderFnResults);
|
|
886
1097
|
hostTagName = hostElm.tagName;
|
|
1098
|
+
if (cmpMeta.$attrsToReflect$) {
|
|
1099
|
+
rootVnode.$attrs$ = rootVnode.$attrs$ || {};
|
|
1100
|
+
cmpMeta.$attrsToReflect$.map(([propName, attribute]) => (rootVnode.$attrs$[attribute] = hostElm[propName]));
|
|
1101
|
+
}
|
|
887
1102
|
rootVnode.$tag$ = null;
|
|
888
|
-
rootVnode.$flags$ |= 4 /* isHost */;
|
|
1103
|
+
rootVnode.$flags$ |= 4 /* VNODE_FLAGS.isHost */;
|
|
889
1104
|
hostRef.$vnode$ = rootVnode;
|
|
890
1105
|
rootVnode.$elm$ = oldVNode.$elm$ = (hostElm);
|
|
891
1106
|
{
|
|
892
1107
|
contentRef = hostElm['s-cr'];
|
|
893
|
-
useNativeShadowDom = (cmpMeta.$flags$ & 1 /* shadowDomEncapsulation */) !== 0;
|
|
1108
|
+
useNativeShadowDom = (cmpMeta.$flags$ & 1 /* CMP_FLAGS.shadowDomEncapsulation */) !== 0;
|
|
894
1109
|
// always reset
|
|
895
1110
|
checkSlotFallbackVisibility = false;
|
|
896
1111
|
}
|
|
@@ -899,7 +1114,7 @@ const renderVdom = (hostRef, renderFnResults) => {
|
|
|
899
1114
|
{
|
|
900
1115
|
// while we're moving nodes around existing nodes, temporarily disable
|
|
901
1116
|
// the disconnectCallback from working
|
|
902
|
-
plt.$flags$ |= 1 /* isTmpDisconnected */;
|
|
1117
|
+
plt.$flags$ |= 1 /* PLATFORM_FLAGS.isTmpDisconnected */;
|
|
903
1118
|
if (checkSlotRelocate) {
|
|
904
1119
|
relocateSlotContent(rootVnode.$elm$);
|
|
905
1120
|
let relocateData;
|
|
@@ -957,7 +1172,7 @@ const renderVdom = (hostRef, renderFnResults) => {
|
|
|
957
1172
|
}
|
|
958
1173
|
else {
|
|
959
1174
|
// this node doesn't have a slot home to go to, so let's hide it
|
|
960
|
-
if (nodeToRelocate.nodeType === 1 /* ElementNode */) {
|
|
1175
|
+
if (nodeToRelocate.nodeType === 1 /* NODE_TYPE.ElementNode */) {
|
|
961
1176
|
nodeToRelocate.hidden = true;
|
|
962
1177
|
}
|
|
963
1178
|
}
|
|
@@ -968,37 +1183,11 @@ const renderVdom = (hostRef, renderFnResults) => {
|
|
|
968
1183
|
}
|
|
969
1184
|
// done moving nodes around
|
|
970
1185
|
// allow the disconnect callback to work again
|
|
971
|
-
plt.$flags$ &= ~1 /* isTmpDisconnected */;
|
|
1186
|
+
plt.$flags$ &= ~1 /* PLATFORM_FLAGS.isTmpDisconnected */;
|
|
972
1187
|
// always reset
|
|
973
1188
|
relocateNodes.length = 0;
|
|
974
1189
|
}
|
|
975
1190
|
};
|
|
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
|
-
};
|
|
1002
1191
|
const attachToAncestor = (hostRef, ancestorComponent) => {
|
|
1003
1192
|
if (ancestorComponent && !hostRef.$onRenderResolve$ && ancestorComponent['s-p']) {
|
|
1004
1193
|
ancestorComponent['s-p'].push(new Promise((r) => (hostRef.$onRenderResolve$ = r)));
|
|
@@ -1006,10 +1195,10 @@ const attachToAncestor = (hostRef, ancestorComponent) => {
|
|
|
1006
1195
|
};
|
|
1007
1196
|
const scheduleUpdate = (hostRef, isInitialLoad) => {
|
|
1008
1197
|
{
|
|
1009
|
-
hostRef.$flags$ |= 16 /* isQueuedForUpdate */;
|
|
1198
|
+
hostRef.$flags$ |= 16 /* HOST_FLAGS.isQueuedForUpdate */;
|
|
1010
1199
|
}
|
|
1011
|
-
if (hostRef.$flags$ & 4 /* isWaitingForChildren */) {
|
|
1012
|
-
hostRef.$flags$ |= 512 /* needsRerender */;
|
|
1200
|
+
if (hostRef.$flags$ & 4 /* HOST_FLAGS.isWaitingForChildren */) {
|
|
1201
|
+
hostRef.$flags$ |= 512 /* HOST_FLAGS.needsRerender */;
|
|
1013
1202
|
return;
|
|
1014
1203
|
}
|
|
1015
1204
|
attachToAncestor(hostRef, hostRef.$ancestorComponent$);
|
|
@@ -1025,7 +1214,7 @@ const dispatchHooks = (hostRef, isInitialLoad) => {
|
|
|
1025
1214
|
let promise;
|
|
1026
1215
|
if (isInitialLoad) {
|
|
1027
1216
|
{
|
|
1028
|
-
hostRef.$flags$ |= 256 /* isListenReady */;
|
|
1217
|
+
hostRef.$flags$ |= 256 /* HOST_FLAGS.isListenReady */;
|
|
1029
1218
|
if (hostRef.$queuedListeners$) {
|
|
1030
1219
|
hostRef.$queuedListeners$.map(([methodName, event]) => safeCall(instance, methodName, event));
|
|
1031
1220
|
hostRef.$queuedListeners$ = null;
|
|
@@ -1073,7 +1262,7 @@ const updateComponent = async (hostRef, instance, isInitialLoad) => {
|
|
|
1073
1262
|
}
|
|
1074
1263
|
else {
|
|
1075
1264
|
Promise.all(childrenPromises).then(postUpdate);
|
|
1076
|
-
hostRef.$flags$ |= 4 /* isWaitingForChildren */;
|
|
1265
|
+
hostRef.$flags$ |= 4 /* HOST_FLAGS.isWaitingForChildren */;
|
|
1077
1266
|
childrenPromises.length = 0;
|
|
1078
1267
|
}
|
|
1079
1268
|
}
|
|
@@ -1082,10 +1271,10 @@ const callRender = (hostRef, instance, elm) => {
|
|
|
1082
1271
|
try {
|
|
1083
1272
|
instance = instance.render() ;
|
|
1084
1273
|
{
|
|
1085
|
-
hostRef.$flags$ &= ~16 /* isQueuedForUpdate */;
|
|
1274
|
+
hostRef.$flags$ &= ~16 /* HOST_FLAGS.isQueuedForUpdate */;
|
|
1086
1275
|
}
|
|
1087
1276
|
{
|
|
1088
|
-
hostRef.$flags$ |= 2 /* hasRendered */;
|
|
1277
|
+
hostRef.$flags$ |= 2 /* HOST_FLAGS.hasRendered */;
|
|
1089
1278
|
}
|
|
1090
1279
|
{
|
|
1091
1280
|
{
|
|
@@ -1112,8 +1301,8 @@ const postUpdateComponent = (hostRef) => {
|
|
|
1112
1301
|
{
|
|
1113
1302
|
safeCall(instance, 'componentDidRender');
|
|
1114
1303
|
}
|
|
1115
|
-
if (!(hostRef.$flags$ & 64 /* hasLoadedComponent */)) {
|
|
1116
|
-
hostRef.$flags$ |= 64 /* hasLoadedComponent */;
|
|
1304
|
+
if (!(hostRef.$flags$ & 64 /* HOST_FLAGS.hasLoadedComponent */)) {
|
|
1305
|
+
hostRef.$flags$ |= 64 /* HOST_FLAGS.hasLoadedComponent */;
|
|
1117
1306
|
{
|
|
1118
1307
|
// DOM WRITE!
|
|
1119
1308
|
addHydratedFlag(elm);
|
|
@@ -1145,10 +1334,10 @@ const postUpdateComponent = (hostRef) => {
|
|
|
1145
1334
|
hostRef.$onRenderResolve$();
|
|
1146
1335
|
hostRef.$onRenderResolve$ = undefined;
|
|
1147
1336
|
}
|
|
1148
|
-
if (hostRef.$flags$ & 512 /* needsRerender */) {
|
|
1337
|
+
if (hostRef.$flags$ & 512 /* HOST_FLAGS.needsRerender */) {
|
|
1149
1338
|
nextTick(() => scheduleUpdate(hostRef, false));
|
|
1150
1339
|
}
|
|
1151
|
-
hostRef.$flags$ &= ~(4 /* isWaitingForChildren */ | 512 /* needsRerender */);
|
|
1340
|
+
hostRef.$flags$ &= ~(4 /* HOST_FLAGS.isWaitingForChildren */ | 512 /* HOST_FLAGS.needsRerender */);
|
|
1152
1341
|
}
|
|
1153
1342
|
// ( •_•)
|
|
1154
1343
|
// ( •_•)>⌐■-■
|
|
@@ -1178,30 +1367,6 @@ const then = (promise, thenFn) => {
|
|
|
1178
1367
|
};
|
|
1179
1368
|
const addHydratedFlag = (elm) => elm.classList.add('hydrated')
|
|
1180
1369
|
;
|
|
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
|
-
};
|
|
1205
1370
|
const getValue = (ref, propName) => getHostRef(ref).$instanceValues$.get(propName);
|
|
1206
1371
|
const setValue = (ref, propName, newVal, cmpMeta) => {
|
|
1207
1372
|
// check our new property value against our internal value
|
|
@@ -1211,13 +1376,16 @@ const setValue = (ref, propName, newVal, cmpMeta) => {
|
|
|
1211
1376
|
const flags = hostRef.$flags$;
|
|
1212
1377
|
const instance = hostRef.$lazyInstance$ ;
|
|
1213
1378
|
newVal = parsePropertyValue(newVal, cmpMeta.$members$[propName][0]);
|
|
1214
|
-
|
|
1379
|
+
// explicitly check for NaN on both sides, as `NaN === NaN` is always false
|
|
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) {
|
|
1215
1383
|
// gadzooks! the property's value has changed!!
|
|
1216
1384
|
// set our new value!
|
|
1217
1385
|
hostRef.$instanceValues$.set(propName, newVal);
|
|
1218
1386
|
if (instance) {
|
|
1219
1387
|
// get an array of method names of watch functions to call
|
|
1220
|
-
if (cmpMeta.$watchers$ && flags & 128 /* isWatchReady */) {
|
|
1388
|
+
if (cmpMeta.$watchers$ && flags & 128 /* HOST_FLAGS.isWatchReady */) {
|
|
1221
1389
|
const watchMethods = cmpMeta.$watchers$[propName];
|
|
1222
1390
|
if (watchMethods) {
|
|
1223
1391
|
// this instance is watching for when this property changed
|
|
@@ -1232,7 +1400,7 @@ const setValue = (ref, propName, newVal, cmpMeta) => {
|
|
|
1232
1400
|
});
|
|
1233
1401
|
}
|
|
1234
1402
|
}
|
|
1235
|
-
if ((flags & (2 /* hasRendered */ | 16 /* isQueuedForUpdate */)) === 2 /* hasRendered */) {
|
|
1403
|
+
if ((flags & (2 /* HOST_FLAGS.hasRendered */ | 16 /* HOST_FLAGS.isQueuedForUpdate */)) === 2 /* HOST_FLAGS.hasRendered */) {
|
|
1236
1404
|
// looks like this value actually changed, so we've got work to do!
|
|
1237
1405
|
// but only if we've already rendered, otherwise just chill out
|
|
1238
1406
|
// queue that we need to do an update, but don't worry about queuing
|
|
@@ -1242,6 +1410,16 @@ const setValue = (ref, propName, newVal, cmpMeta) => {
|
|
|
1242
1410
|
}
|
|
1243
1411
|
}
|
|
1244
1412
|
};
|
|
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
|
+
*/
|
|
1245
1423
|
const proxyComponent = (Cstr, cmpMeta, flags) => {
|
|
1246
1424
|
if (cmpMeta.$members$) {
|
|
1247
1425
|
if (Cstr.watchers) {
|
|
@@ -1251,8 +1429,8 @@ const proxyComponent = (Cstr, cmpMeta, flags) => {
|
|
|
1251
1429
|
const members = Object.entries(cmpMeta.$members$);
|
|
1252
1430
|
const prototype = Cstr.prototype;
|
|
1253
1431
|
members.map(([memberName, [memberFlags]]) => {
|
|
1254
|
-
if ((memberFlags & 31 /* Prop */ ||
|
|
1255
|
-
((flags & 2 /* proxyState */) && memberFlags & 32 /* State */))) {
|
|
1432
|
+
if ((memberFlags & 31 /* MEMBER_FLAGS.Prop */ ||
|
|
1433
|
+
((flags & 2 /* PROXY_FLAGS.proxyState */) && memberFlags & 32 /* MEMBER_FLAGS.State */))) {
|
|
1256
1434
|
// proxyComponent - prop
|
|
1257
1435
|
Object.defineProperty(prototype, memberName, {
|
|
1258
1436
|
get() {
|
|
@@ -1267,8 +1445,8 @@ const proxyComponent = (Cstr, cmpMeta, flags) => {
|
|
|
1267
1445
|
enumerable: true,
|
|
1268
1446
|
});
|
|
1269
1447
|
}
|
|
1270
|
-
else if (flags & 1 /* isElementConstructor */ &&
|
|
1271
|
-
memberFlags & 64 /* Method */) {
|
|
1448
|
+
else if (flags & 1 /* PROXY_FLAGS.isElementConstructor */ &&
|
|
1449
|
+
memberFlags & 64 /* MEMBER_FLAGS.Method */) {
|
|
1272
1450
|
// proxyComponent - method
|
|
1273
1451
|
Object.defineProperty(prototype, memberName, {
|
|
1274
1452
|
value(...args) {
|
|
@@ -1278,7 +1456,7 @@ const proxyComponent = (Cstr, cmpMeta, flags) => {
|
|
|
1278
1456
|
});
|
|
1279
1457
|
}
|
|
1280
1458
|
});
|
|
1281
|
-
if ((flags & 1 /* isElementConstructor */)) {
|
|
1459
|
+
if ((flags & 1 /* PROXY_FLAGS.isElementConstructor */)) {
|
|
1282
1460
|
const attrNameToPropName = new Map();
|
|
1283
1461
|
prototype.attributeChangedCallback = function (attrName, _oldValue, newValue) {
|
|
1284
1462
|
plt.jmp(() => {
|
|
@@ -1334,10 +1512,13 @@ const proxyComponent = (Cstr, cmpMeta, flags) => {
|
|
|
1334
1512
|
// create an array of attributes to observe
|
|
1335
1513
|
// and also create a map of html attribute name to js property name
|
|
1336
1514
|
Cstr.observedAttributes = members
|
|
1337
|
-
.filter(([_, m]) => m[0] & 15 /* HasAttribute */) // filter to only keep props that should match attributes
|
|
1515
|
+
.filter(([_, m]) => m[0] & 15 /* MEMBER_FLAGS.HasAttribute */) // filter to only keep props that should match attributes
|
|
1338
1516
|
.map(([propName, m]) => {
|
|
1339
1517
|
const attrName = m[1] || propName;
|
|
1340
1518
|
attrNameToPropName.set(attrName, propName);
|
|
1519
|
+
if (m[0] & 512 /* MEMBER_FLAGS.ReflectAttr */) {
|
|
1520
|
+
cmpMeta.$attrsToReflect$.push([propName, attrName]);
|
|
1521
|
+
}
|
|
1341
1522
|
return attrName;
|
|
1342
1523
|
});
|
|
1343
1524
|
}
|
|
@@ -1346,10 +1527,10 @@ const proxyComponent = (Cstr, cmpMeta, flags) => {
|
|
|
1346
1527
|
};
|
|
1347
1528
|
const initializeComponent = async (elm, hostRef, cmpMeta, hmrVersionId, Cstr) => {
|
|
1348
1529
|
// initializeComponent
|
|
1349
|
-
if ((hostRef.$flags$ & 32 /* hasInitializedComponent */) === 0) {
|
|
1530
|
+
if ((hostRef.$flags$ & 32 /* HOST_FLAGS.hasInitializedComponent */) === 0) {
|
|
1350
1531
|
{
|
|
1351
1532
|
// we haven't initialized this element yet
|
|
1352
|
-
hostRef.$flags$ |= 32 /* hasInitializedComponent */;
|
|
1533
|
+
hostRef.$flags$ |= 32 /* HOST_FLAGS.hasInitializedComponent */;
|
|
1353
1534
|
// lazy loaded components
|
|
1354
1535
|
// request the component's implementation to be
|
|
1355
1536
|
// wired up with the host element
|
|
@@ -1367,7 +1548,7 @@ const initializeComponent = async (elm, hostRef, cmpMeta, hmrVersionId, Cstr) =>
|
|
|
1367
1548
|
{
|
|
1368
1549
|
cmpMeta.$watchers$ = Cstr.watchers;
|
|
1369
1550
|
}
|
|
1370
|
-
proxyComponent(Cstr, cmpMeta, 2 /* proxyState */);
|
|
1551
|
+
proxyComponent(Cstr, cmpMeta, 2 /* PROXY_FLAGS.proxyState */);
|
|
1371
1552
|
Cstr.isProxied = true;
|
|
1372
1553
|
}
|
|
1373
1554
|
const endNewInstance = createTime('createInstance', cmpMeta.$tagName$);
|
|
@@ -1375,7 +1556,7 @@ const initializeComponent = async (elm, hostRef, cmpMeta, hmrVersionId, Cstr) =>
|
|
|
1375
1556
|
// but let's keep track of when we start and stop
|
|
1376
1557
|
// so that the getters/setters don't incorrectly step on data
|
|
1377
1558
|
{
|
|
1378
|
-
hostRef.$flags$ |= 8 /* isConstructingInstance */;
|
|
1559
|
+
hostRef.$flags$ |= 8 /* HOST_FLAGS.isConstructingInstance */;
|
|
1379
1560
|
}
|
|
1380
1561
|
// construct the lazy-loaded component implementation
|
|
1381
1562
|
// passing the hostRef is very important during
|
|
@@ -1388,10 +1569,10 @@ const initializeComponent = async (elm, hostRef, cmpMeta, hmrVersionId, Cstr) =>
|
|
|
1388
1569
|
consoleError(e);
|
|
1389
1570
|
}
|
|
1390
1571
|
{
|
|
1391
|
-
hostRef.$flags$ &= ~8 /* isConstructingInstance */;
|
|
1572
|
+
hostRef.$flags$ &= ~8 /* HOST_FLAGS.isConstructingInstance */;
|
|
1392
1573
|
}
|
|
1393
1574
|
{
|
|
1394
|
-
hostRef.$flags$ |= 128 /* isWatchReady */;
|
|
1575
|
+
hostRef.$flags$ |= 128 /* HOST_FLAGS.isWatchReady */;
|
|
1395
1576
|
}
|
|
1396
1577
|
endNewInstance();
|
|
1397
1578
|
fireConnectedCallback(hostRef.$lazyInstance$);
|
|
@@ -1402,7 +1583,7 @@ const initializeComponent = async (elm, hostRef, cmpMeta, hmrVersionId, Cstr) =>
|
|
|
1402
1583
|
const scopeId = getScopeId(cmpMeta);
|
|
1403
1584
|
if (!styles.has(scopeId)) {
|
|
1404
1585
|
const endRegisterStyles = createTime('registerStyles', cmpMeta.$tagName$);
|
|
1405
|
-
registerStyle(scopeId, style, !!(cmpMeta.$flags$ & 1 /* shadowDomEncapsulation */));
|
|
1586
|
+
registerStyle(scopeId, style, !!(cmpMeta.$flags$ & 1 /* CMP_FLAGS.shadowDomEncapsulation */));
|
|
1406
1587
|
endRegisterStyles();
|
|
1407
1588
|
}
|
|
1408
1589
|
}
|
|
@@ -1429,19 +1610,19 @@ const fireConnectedCallback = (instance) => {
|
|
|
1429
1610
|
}
|
|
1430
1611
|
};
|
|
1431
1612
|
const connectedCallback = (elm) => {
|
|
1432
|
-
if ((plt.$flags$ & 1 /* isTmpDisconnected */) === 0) {
|
|
1613
|
+
if ((plt.$flags$ & 1 /* PLATFORM_FLAGS.isTmpDisconnected */) === 0) {
|
|
1433
1614
|
const hostRef = getHostRef(elm);
|
|
1434
1615
|
const cmpMeta = hostRef.$cmpMeta$;
|
|
1435
1616
|
const endConnected = createTime('connectedCallback', cmpMeta.$tagName$);
|
|
1436
|
-
if (!(hostRef.$flags$ & 1 /* hasConnected */)) {
|
|
1617
|
+
if (!(hostRef.$flags$ & 1 /* HOST_FLAGS.hasConnected */)) {
|
|
1437
1618
|
// first time this component has connected
|
|
1438
|
-
hostRef.$flags$ |= 1 /* hasConnected */;
|
|
1619
|
+
hostRef.$flags$ |= 1 /* HOST_FLAGS.hasConnected */;
|
|
1439
1620
|
{
|
|
1440
1621
|
// initUpdate
|
|
1441
1622
|
// if the slot polyfill is required we'll need to put some nodes
|
|
1442
1623
|
// in here to act as original content anchors as we move nodes around
|
|
1443
1624
|
// host element has been connected to the DOM
|
|
1444
|
-
if ((cmpMeta.$flags$ & (4 /* hasSlotRelocation */ | 8 /* needsShadowDomShim */))) {
|
|
1625
|
+
if ((cmpMeta.$flags$ & (4 /* CMP_FLAGS.hasSlotRelocation */ | 8 /* CMP_FLAGS.needsShadowDomShim */))) {
|
|
1445
1626
|
setContentReference(elm);
|
|
1446
1627
|
}
|
|
1447
1628
|
}
|
|
@@ -1464,7 +1645,7 @@ const connectedCallback = (elm) => {
|
|
|
1464
1645
|
// https://developers.google.com/web/fundamentals/web-components/best-practices#lazy-properties
|
|
1465
1646
|
if (cmpMeta.$members$) {
|
|
1466
1647
|
Object.entries(cmpMeta.$members$).map(([memberName, [memberFlags]]) => {
|
|
1467
|
-
if (memberFlags & 31 /* Prop */ && elm.hasOwnProperty(memberName)) {
|
|
1648
|
+
if (memberFlags & 31 /* MEMBER_FLAGS.Prop */ && elm.hasOwnProperty(memberName)) {
|
|
1468
1649
|
const value = elm[memberName];
|
|
1469
1650
|
delete elm[memberName];
|
|
1470
1651
|
elm[memberName] = value;
|
|
@@ -1498,7 +1679,7 @@ const setContentReference = (elm) => {
|
|
|
1498
1679
|
elm.insertBefore(contentRefElm, elm.firstChild);
|
|
1499
1680
|
};
|
|
1500
1681
|
const disconnectedCallback = (elm) => {
|
|
1501
|
-
if ((plt.$flags$ & 1 /* isTmpDisconnected */) === 0) {
|
|
1682
|
+
if ((plt.$flags$ & 1 /* PLATFORM_FLAGS.isTmpDisconnected */) === 0) {
|
|
1502
1683
|
const hostRef = getHostRef(elm);
|
|
1503
1684
|
const instance = hostRef.$lazyInstance$ ;
|
|
1504
1685
|
{
|
|
@@ -1539,6 +1720,9 @@ const bootstrapLazy = (lazyBundles, options = {}) => {
|
|
|
1539
1720
|
{
|
|
1540
1721
|
cmpMeta.$listeners$ = compactMeta[3];
|
|
1541
1722
|
}
|
|
1723
|
+
{
|
|
1724
|
+
cmpMeta.$attrsToReflect$ = [];
|
|
1725
|
+
}
|
|
1542
1726
|
{
|
|
1543
1727
|
cmpMeta.$watchers$ = {};
|
|
1544
1728
|
}
|
|
@@ -1574,7 +1758,7 @@ const bootstrapLazy = (lazyBundles, options = {}) => {
|
|
|
1574
1758
|
cmpMeta.$lazyBundleId$ = lazyBundle[0];
|
|
1575
1759
|
if (!exclude.includes(tagName) && !customElements.get(tagName)) {
|
|
1576
1760
|
cmpTags.push(tagName);
|
|
1577
|
-
customElements.define(tagName, proxyComponent(HostElement, cmpMeta, 1 /* isElementConstructor */));
|
|
1761
|
+
customElements.define(tagName, proxyComponent(HostElement, cmpMeta, 1 /* PROXY_FLAGS.isElementConstructor */));
|
|
1578
1762
|
}
|
|
1579
1763
|
});
|
|
1580
1764
|
});
|
|
@@ -1596,7 +1780,41 @@ const bootstrapLazy = (lazyBundles, options = {}) => {
|
|
|
1596
1780
|
// Fallback appLoad event
|
|
1597
1781
|
endBootstrap();
|
|
1598
1782
|
};
|
|
1599
|
-
const
|
|
1783
|
+
const addHostEventListeners = (elm, hostRef, listeners, attachParentListeners) => {
|
|
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();
|
|
1600
1818
|
const getHostRef = (ref) => hostRefs.get(ref);
|
|
1601
1819
|
const registerInstance = (lazyInstance, hostRef) => hostRefs.set((hostRef.$lazyInstance$ = lazyInstance), hostRef);
|
|
1602
1820
|
const registerHost = (elm, cmpMeta) => {
|
|
@@ -1628,7 +1846,9 @@ const loadModule = (cmpMeta, hostRef, hmrVersionId) => {
|
|
|
1628
1846
|
if (module) {
|
|
1629
1847
|
return module[exportName];
|
|
1630
1848
|
}
|
|
1849
|
+
/*!__STENCIL_STATIC_IMPORT_SWITCH__*/
|
|
1631
1850
|
return import(
|
|
1851
|
+
/* @vite-ignore */
|
|
1632
1852
|
/* webpackInclude: /\.entry\.js$/ */
|
|
1633
1853
|
/* webpackExclude: /\.system\.entry\.js$/ */
|
|
1634
1854
|
/* webpackMode: "lazy" */
|
|
@@ -1639,14 +1859,35 @@ const loadModule = (cmpMeta, hostRef, hmrVersionId) => {
|
|
|
1639
1859
|
return importedModule[exportName];
|
|
1640
1860
|
}, consoleError);
|
|
1641
1861
|
};
|
|
1642
|
-
const styles = new Map();
|
|
1862
|
+
const styles = /*@__PURE__*/ new Map();
|
|
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
|
+
;
|
|
1643
1884
|
const queueDomReads = [];
|
|
1644
1885
|
const queueDomWrites = [];
|
|
1645
1886
|
const queueTask = (queue, write) => (cb) => {
|
|
1646
1887
|
queue.push(cb);
|
|
1647
1888
|
if (!queuePending) {
|
|
1648
1889
|
queuePending = true;
|
|
1649
|
-
if (write && plt.$flags$ & 4 /* queueSync */) {
|
|
1890
|
+
if (write && plt.$flags$ & 4 /* PLATFORM_FLAGS.queueSync */) {
|
|
1650
1891
|
nextTick(flush);
|
|
1651
1892
|
}
|
|
1652
1893
|
else {
|
|
@@ -1684,3 +1925,5 @@ const nextTick = /*@__PURE__*/ (cb) => promiseResolve().then(cb);
|
|
|
1684
1925
|
const writeTask = /*@__PURE__*/ queueTask(queueDomWrites, true);
|
|
1685
1926
|
|
|
1686
1927
|
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
|