@dropi/ui 0.1.21 → 0.1.22
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/dist/cjs/dropi-accordion-item.cjs.entry.js +2 -2
- package/dist/cjs/dropi-accordion.cjs.entry.js +2 -2
- package/dist/cjs/dropi-alert-legacy.cjs.entry.js +1 -1
- package/dist/cjs/dropi-alert-modal.cjs.entry.js +3 -3
- package/dist/cjs/dropi-alert.cjs.entry.js +2 -2
- package/dist/cjs/dropi-avatars.cjs.entry.js +2 -2
- package/dist/cjs/dropi-badge-legacy.cjs.entry.js +2 -2
- package/dist/cjs/dropi-badge.cjs.entry.js +2 -2
- package/dist/cjs/dropi-banner-external.cjs.entry.js +12 -2
- package/dist/cjs/dropi-breadcrumb.cjs.entry.js +2 -2
- package/dist/cjs/dropi-button.cjs.entry.js +3 -3
- package/dist/cjs/dropi-card-checkbox.cjs.entry.js +3 -3
- package/dist/cjs/dropi-card-product.cjs.entry.js +7 -5
- package/dist/cjs/dropi-card-section.cjs.entry.js +3 -3
- package/dist/cjs/dropi-carousel.cjs.entry.js +7 -2
- package/dist/cjs/dropi-checkbox-selection-list.cjs.entry.js +3 -3
- package/dist/cjs/dropi-checkbox.cjs.entry.js +3 -3
- package/dist/cjs/dropi-chips.cjs.entry.js +2 -2
- package/dist/cjs/dropi-city-selector.cjs.entry.js +10 -2
- package/dist/cjs/dropi-color-picker.cjs.entry.js +4 -4
- package/dist/cjs/dropi-country-flags.cjs.entry.js +2 -2
- package/dist/cjs/dropi-country-selector.cjs.entry.js +3 -3
- package/dist/cjs/dropi-date-picker-range.cjs.entry.js +1 -1
- package/dist/cjs/dropi-date-picker.cjs.entry.js +5 -5
- package/dist/cjs/dropi-drawer.cjs.entry.js +7 -4
- package/dist/cjs/dropi-dropdown.cjs.entry.js +3 -3
- package/dist/cjs/dropi-empty-state.cjs.entry.js +2 -2
- package/dist/cjs/dropi-favorite-button.cjs.entry.js +2 -2
- package/dist/cjs/dropi-file-upload-progress-bar.cjs.entry.js +4 -2
- package/dist/cjs/dropi-file-upload.cjs.entry.js +6 -5
- package/dist/cjs/dropi-icon.cjs.entry.js +21 -4
- package/dist/cjs/dropi-ilustration-icon.cjs.entry.js +2 -2
- package/dist/cjs/dropi-image-miniature.cjs.entry.js +2 -2
- package/dist/cjs/dropi-image-overlay.cjs.entry.js +3 -2
- package/dist/cjs/dropi-input_3.cjs.entry.js +13 -11
- package/dist/cjs/dropi-languages-selector.cjs.entry.js +6 -2
- package/dist/cjs/dropi-logo.cjs.entry.js +12 -2
- package/dist/cjs/dropi-lottie-loader.cjs.entry.js +1 -1
- package/dist/cjs/dropi-media-player.cjs.entry.js +7 -4
- package/dist/cjs/dropi-modal.cjs.entry.js +19 -12
- package/dist/cjs/dropi-navbar.cjs.entry.js +3 -3
- package/dist/cjs/dropi-otp-send-code.cjs.entry.js +7 -7
- package/dist/cjs/dropi-phone-input.cjs.entry.js +4 -4
- package/dist/cjs/dropi-radio-button.cjs.entry.js +2 -2
- package/dist/cjs/dropi-radio-selection-list.cjs.entry.js +3 -3
- package/dist/cjs/dropi-read-more.cjs.entry.js +2 -2
- package/dist/cjs/dropi-search.cjs.entry.js +3 -3
- package/dist/cjs/dropi-select.cjs.entry.js +6 -2
- package/dist/cjs/dropi-sidebar.cjs.entry.js +2 -2
- package/dist/cjs/dropi-simple-stepper.cjs.entry.js +2 -2
- package/dist/cjs/dropi-skeleton.cjs.entry.js +2 -2
- package/dist/cjs/dropi-steps.cjs.entry.js +2 -2
- package/dist/cjs/dropi-switch.cjs.entry.js +2 -2
- package/dist/cjs/dropi-table.cjs.entry.js +14 -7
- package/dist/cjs/dropi-tabs.cjs.entry.js +2 -2
- package/dist/cjs/dropi-tag-type-product.cjs.entry.js +2 -2
- package/dist/cjs/dropi-text-area.cjs.entry.js +3 -3
- package/dist/cjs/dropi-time-line.cjs.entry.js +2 -2
- package/dist/cjs/dropi-toast.cjs.entry.js +6 -5
- package/dist/cjs/dropi-tooltip-v2.cjs.entry.js +3 -3
- package/dist/cjs/dropi-tooltip.cjs.entry.js +2 -2
- package/dist/cjs/dropi-ui.cjs.js +2 -2
- package/dist/cjs/dropi-vertical-steps.cjs.entry.js +2 -2
- package/dist/cjs/dropi-youtube-lazy-video.cjs.entry.js +2 -2
- package/dist/cjs/{index-077kM98l.js → index-C8kwDvpf.js} +1041 -14
- package/dist/cjs/loader.cjs.js +2 -2
- package/dist/collection/components/dropi-accordion/dropi-accordion-item.js +1 -1
- package/dist/collection/components/dropi-accordion/dropi-accordion.js +1 -1
- package/dist/collection/components/dropi-alert/dropi-alert.css +0 -6
- package/dist/collection/components/dropi-alert-modal/dropi-alert-modal.css +10 -1
- package/dist/collection/components/dropi-alert-modal/dropi-alert-modal.js +4 -5
- package/dist/collection/components/dropi-avatars/dropi-avatars.js +1 -1
- package/dist/collection/components/dropi-badge/dropi-badge.js +1 -1
- package/dist/collection/components/dropi-badge-legacy/dropi-badge-legacy.js +1 -1
- package/dist/collection/components/dropi-banner-external/dropi-banner-external.js +12 -1
- package/dist/collection/components/dropi-breadcrumb/dropi-breadcrumb.js +1 -1
- package/dist/collection/components/dropi-button/dropi-button.js +2 -2
- package/dist/collection/components/dropi-card-checkbox/dropi-card-checkbox.js +2 -2
- package/dist/collection/components/dropi-card-product/dropi-card-product.js +6 -4
- package/dist/collection/components/dropi-card-section/dropi-card-section.js +2 -2
- package/dist/collection/components/dropi-carousel/dropi-carousel.js +15 -10
- package/dist/collection/components/dropi-checkbox/dropi-checkbox.js +2 -2
- package/dist/collection/components/dropi-checkbox-selection-list/dropi-checkbox-selection-list.js +2 -2
- package/dist/collection/components/dropi-chips/dropi-chips.js +1 -1
- package/dist/collection/components/dropi-city-selector/dropi-city-selector.js +9 -1
- package/dist/collection/components/dropi-color-picker/dropi-color-picker.js +3 -3
- package/dist/collection/components/dropi-country-flags/dropi-country-flags.js +1 -1
- package/dist/collection/components/dropi-country-selector/dropi-country-selector.js +2 -2
- package/dist/collection/components/dropi-date-picker/dropi-date-picker.js +4 -4
- package/dist/collection/components/dropi-drawer/dropi-drawer.js +12 -9
- package/dist/collection/components/dropi-dropdown/dropi-dropdown.js +2 -2
- package/dist/collection/components/dropi-empty-state/dropi-empty-state.js +1 -1
- package/dist/collection/components/dropi-favorite-button/dropi-favorite-button.js +1 -1
- package/dist/collection/components/dropi-file-upload/dropi-file-upload.js +5 -4
- package/dist/collection/components/dropi-file-upload-progress-bar/dropi-file-upload-progress-bar.js +3 -1
- package/dist/collection/components/dropi-icon/dropi-icon.css +5 -0
- package/dist/collection/components/dropi-icon/dropi-icon.js +19 -2
- package/dist/collection/components/dropi-ilustration-icon/dropi-ilustration-icon.js +1 -1
- package/dist/collection/components/dropi-image-miniature/dropi-image-miniature.js +1 -1
- package/dist/collection/components/dropi-image-overlay/dropi-image-overlay.js +5 -4
- package/dist/collection/components/dropi-input/dropi-input.js +12 -10
- package/dist/collection/components/dropi-languages-selector/dropi-languages-selector.js +5 -1
- package/dist/collection/components/dropi-logo/dropi-logo.js +12 -1
- package/dist/collection/components/dropi-media-player/dropi-media-player.js +6 -3
- package/dist/collection/components/dropi-modal/dropi-modal.js +22 -15
- package/dist/collection/components/dropi-navbar/dropi-navbar.js +2 -2
- package/dist/collection/components/dropi-otp-send-code/dropi-otp-send-code.js +6 -6
- package/dist/collection/components/dropi-paginator/dropi-paginator.js +2 -2
- package/dist/collection/components/dropi-phone-input/dropi-phone-input.js +3 -3
- package/dist/collection/components/dropi-radio-button/dropi-radio-button.js +1 -1
- package/dist/collection/components/dropi-radio-selection-list/dropi-radio-selection-list.js +2 -2
- package/dist/collection/components/dropi-read-more/dropi-read-more.js +1 -1
- package/dist/collection/components/dropi-search/dropi-search.js +2 -2
- package/dist/collection/components/dropi-select/dropi-select.js +5 -1
- package/dist/collection/components/dropi-sidebar/dropi-sidebar.js +1 -1
- package/dist/collection/components/dropi-simple-stepper/dropi-simple-stepper.js +1 -1
- package/dist/collection/components/dropi-skeleton/dropi-skeleton.js +1 -1
- package/dist/collection/components/dropi-steps/dropi-steps.js +1 -1
- package/dist/collection/components/dropi-switch/dropi-switch.js +1 -1
- package/dist/collection/components/dropi-table/dropi-table.js +13 -6
- package/dist/collection/components/dropi-tabs/dropi-tabs.js +1 -1
- package/dist/collection/components/dropi-tag/dropi-tag.js +5 -5
- package/dist/collection/components/dropi-tag-type-product/dropi-tag-type-product.js +1 -1
- package/dist/collection/components/dropi-text-area/dropi-text-area.js +2 -2
- package/dist/collection/components/dropi-time-line/dropi-time-line.js +1 -1
- package/dist/collection/components/dropi-toast/dropi-toast.css +1 -1
- package/dist/collection/components/dropi-toast/dropi-toast.js +4 -3
- package/dist/collection/components/dropi-tooltip/dropi-tooltip.js +1 -1
- package/dist/collection/components/dropi-tooltip-v2/dropi-tooltip.js +2 -2
- package/dist/collection/components/dropi-vertical-steps/dropi-vertical-steps.js +1 -1
- package/dist/collection/components/dropi-youtube-lazy-video/dropi-youtube-lazy-video.js +1 -1
- package/dist/components/dropi-accordion-item.js +1 -1
- package/dist/components/dropi-accordion.js +1 -1
- package/dist/components/dropi-alert-modal.js +1 -1
- package/dist/components/dropi-alert.js +1 -1
- package/dist/components/dropi-avatars.js +1 -1
- package/dist/components/dropi-badge-legacy.js +1 -1
- package/dist/components/dropi-badge.js +1 -1
- package/dist/components/dropi-banner-external.js +1 -1
- package/dist/components/dropi-breadcrumb.js +1 -1
- package/dist/components/dropi-button.js +1 -1
- package/dist/components/dropi-card-checkbox.js +1 -1
- package/dist/components/dropi-card-product.js +1 -1
- package/dist/components/dropi-card-section.js +1 -1
- package/dist/components/dropi-carousel.js +1 -1
- package/dist/components/dropi-checkbox-selection-list.js +1 -1
- package/dist/components/dropi-checkbox.js +1 -1
- package/dist/components/dropi-chips.js +1 -1
- package/dist/components/dropi-city-selector.js +1 -1
- package/dist/components/dropi-color-picker.js +1 -1
- package/dist/components/dropi-country-flags.js +1 -1
- package/dist/components/dropi-country-selector.js +1 -1
- package/dist/components/dropi-date-picker.js +1 -1
- package/dist/components/dropi-drawer.js +1 -1
- package/dist/components/dropi-dropdown.js +1 -1
- package/dist/components/dropi-empty-state.js +1 -1
- package/dist/components/dropi-favorite-button.js +1 -1
- package/dist/components/dropi-file-upload-progress-bar.js +1 -1
- package/dist/components/dropi-file-upload.js +1 -1
- package/dist/components/dropi-icon.js +1 -1
- package/dist/components/dropi-ilustration-icon.js +1 -1
- package/dist/components/dropi-image-miniature.js +1 -1
- package/dist/components/dropi-image-overlay.js +1 -1
- package/dist/components/dropi-input.js +1 -1
- package/dist/components/dropi-languages-selector.js +1 -1
- package/dist/components/dropi-logo.js +1 -1
- package/dist/components/dropi-media-player.js +1 -1
- package/dist/components/dropi-modal.js +1 -1
- package/dist/components/dropi-navbar.js +1 -1
- package/dist/components/dropi-otp-send-code.js +1 -1
- package/dist/components/dropi-paginator.js +1 -1
- package/dist/components/dropi-phone-input.js +1 -1
- package/dist/components/dropi-radio-button.js +1 -1
- package/dist/components/dropi-radio-selection-list.js +1 -1
- package/dist/components/dropi-read-more.js +1 -1
- package/dist/components/dropi-search.js +1 -1
- package/dist/components/dropi-select.js +1 -1
- package/dist/components/dropi-sidebar.js +1 -1
- package/dist/components/dropi-simple-stepper.js +1 -1
- package/dist/components/dropi-skeleton.js +1 -1
- package/dist/components/dropi-steps.js +1 -1
- package/dist/components/dropi-switch.js +1 -1
- package/dist/components/dropi-table.js +1 -1
- package/dist/components/dropi-tabs.js +1 -1
- package/dist/components/dropi-tag-type-product.js +1 -1
- package/dist/components/dropi-tag.js +1 -1
- package/dist/components/dropi-text-area.js +1 -1
- package/dist/components/dropi-time-line.js +1 -1
- package/dist/components/dropi-toast.js +1 -1
- package/dist/components/dropi-tooltip-v2.js +1 -1
- package/dist/components/dropi-tooltip.js +1 -1
- package/dist/components/dropi-vertical-steps.js +1 -1
- package/dist/components/dropi-youtube-lazy-video.js +1 -1
- package/dist/components/index.js +1 -1
- package/dist/components/{p-DWzWYR5X.js → p-B9R8Apw7.js} +1 -1
- package/dist/components/p-B_Ace02i.js +1 -0
- package/dist/components/p-BrjO_JXp.js +1 -0
- package/dist/components/p-BwhxWL4p.js +1 -0
- package/dist/components/p-Bz2jXX3R.js +1 -0
- package/dist/components/{p-CDvkvedb.js → p-CV4X3Gm4.js} +1 -1
- package/dist/components/p-CV_oz45O.js +1 -0
- package/dist/components/{p-CzHupXu8.js → p-D-vQQQNz.js} +1 -1
- package/dist/components/p-D13d88W3.js +1 -0
- package/dist/components/p-DGUfr98Z.js +1 -0
- package/dist/components/p-a-hGQrJd.js +1 -0
- package/dist/components/{p-DjO9xpVc.js → p-o5gyrbbD.js} +1 -1
- package/dist/dropi-ui/dropi-ui.css +1 -1
- package/dist/dropi-ui/dropi-ui.esm.js +1 -1
- package/dist/dropi-ui/{p-475a16f2.entry.js → p-00e5a2de.entry.js} +1 -1
- package/dist/dropi-ui/{p-8b4d4d2d.entry.js → p-0188e07a.entry.js} +1 -1
- package/dist/dropi-ui/{p-10e363a2.entry.js → p-02710049.entry.js} +1 -1
- package/dist/dropi-ui/{p-eac7777f.entry.js → p-17c56074.entry.js} +1 -1
- package/dist/dropi-ui/{p-a6939701.entry.js → p-18adf694.entry.js} +1 -1
- package/dist/dropi-ui/p-1a3619c3.entry.js +1 -0
- package/dist/dropi-ui/{p-0c541a53.entry.js → p-1d3d6a32.entry.js} +1 -1
- package/dist/dropi-ui/p-25640777.entry.js +1 -0
- package/dist/dropi-ui/p-2674d901.entry.js +1 -0
- package/dist/dropi-ui/{p-6e727fb0.entry.js → p-2af538b9.entry.js} +1 -1
- package/dist/dropi-ui/p-3013f3b8.entry.js +1 -0
- package/dist/dropi-ui/{p-0cd1fb7a.entry.js → p-3321ca70.entry.js} +1 -1
- package/dist/dropi-ui/{p-623759eb.entry.js → p-33d242ec.entry.js} +1 -1
- package/dist/dropi-ui/{p-6178190b.entry.js → p-39af6478.entry.js} +1 -1
- package/dist/dropi-ui/{p-858bedcf.entry.js → p-3e36c8b8.entry.js} +1 -1
- package/dist/dropi-ui/p-3ebc9b7b.entry.js +1 -0
- package/dist/dropi-ui/{p-36cdd4fc.entry.js → p-446a481d.entry.js} +1 -1
- package/dist/dropi-ui/{p-c7e3a5e0.entry.js → p-50a5e548.entry.js} +1 -1
- package/dist/dropi-ui/p-50e0d44f.entry.js +1 -0
- package/dist/dropi-ui/p-53a7a37d.entry.js +1 -0
- package/dist/dropi-ui/p-5c0bd7c2.entry.js +1 -0
- package/dist/dropi-ui/p-5cee6721.entry.js +1 -0
- package/dist/dropi-ui/p-5fb33ae4.entry.js +1 -0
- package/dist/dropi-ui/{p-0966c363.entry.js → p-665ef7ba.entry.js} +1 -1
- package/dist/dropi-ui/p-66b80371.entry.js +1 -0
- package/dist/dropi-ui/p-7bfc1c27.entry.js +1 -0
- package/dist/dropi-ui/p-7c0d2edf.entry.js +1 -0
- package/dist/dropi-ui/p-7eb27836.entry.js +1 -0
- package/dist/dropi-ui/p-85444414.entry.js +1 -0
- package/dist/dropi-ui/{p-7f8d3642.entry.js → p-86283e99.entry.js} +1 -1
- package/dist/dropi-ui/p-8bf5d8ee.entry.js +1 -0
- package/dist/dropi-ui/{p-ed94b5fe.entry.js → p-9032ba00.entry.js} +1 -1
- package/dist/dropi-ui/{p-b207fc92.entry.js → p-9212f544.entry.js} +1 -1
- package/dist/dropi-ui/{p-ba3ad28e.entry.js → p-92291873.entry.js} +1 -1
- package/dist/dropi-ui/{p-59188dd5.entry.js → p-955e52f8.entry.js} +1 -1
- package/dist/dropi-ui/{p-3cbe953f.entry.js → p-976a15e3.entry.js} +1 -1
- package/dist/dropi-ui/{p-4de83790.entry.js → p-9b037086.entry.js} +1 -1
- package/dist/dropi-ui/{p-7fc02d98.entry.js → p-9e0129cc.entry.js} +1 -1
- package/dist/dropi-ui/{p-99943b7d.entry.js → p-9ffec3f7.entry.js} +1 -1
- package/dist/dropi-ui/p-D5SAM1O2.js +2 -0
- package/dist/dropi-ui/p-a1c93e55.entry.js +1 -0
- package/dist/dropi-ui/{p-2e4efb72.entry.js → p-a232c6a7.entry.js} +1 -1
- package/dist/dropi-ui/{p-aa8d2aec.entry.js → p-a3c4d677.entry.js} +1 -1
- package/dist/dropi-ui/p-a457e8ca.entry.js +1 -0
- package/dist/dropi-ui/p-a4e1df5e.entry.js +1 -0
- package/dist/dropi-ui/p-a822a23e.entry.js +1 -0
- package/dist/dropi-ui/{p-0f161461.entry.js → p-a8f24270.entry.js} +1 -1
- package/dist/dropi-ui/p-ae35d538.entry.js +1 -0
- package/dist/dropi-ui/p-af8e2157.entry.js +1 -0
- package/dist/dropi-ui/{p-a1f2383d.entry.js → p-b2623a5c.entry.js} +1 -1
- package/dist/dropi-ui/p-b3d3c72e.entry.js +1 -0
- package/dist/dropi-ui/p-c3614c4a.entry.js +1 -0
- package/dist/dropi-ui/{p-e6943d7c.entry.js → p-cbf5367e.entry.js} +1 -1
- package/dist/dropi-ui/{p-e7b59811.entry.js → p-cc527d91.entry.js} +1 -1
- package/dist/dropi-ui/{p-7036c073.entry.js → p-cdde481b.entry.js} +1 -1
- package/dist/dropi-ui/{p-f0ddf569.entry.js → p-d42d4ef7.entry.js} +1 -1
- package/dist/dropi-ui/{p-7c0bc6dd.entry.js → p-db38bf16.entry.js} +1 -1
- package/dist/dropi-ui/p-dd5d8b1b.entry.js +1 -0
- package/dist/dropi-ui/p-e3ad21f8.entry.js +1 -0
- package/dist/dropi-ui/{p-acfa17ef.entry.js → p-e6e766ed.entry.js} +1 -1
- package/dist/dropi-ui/{p-d36a0c37.entry.js → p-ec263862.entry.js} +1 -1
- package/dist/dropi-ui/p-efc2fc35.entry.js +1 -0
- package/dist/dropi-ui/{p-9062f0de.entry.js → p-f41cd9b5.entry.js} +1 -1
- package/dist/dropi-ui/{p-40b69ccd.entry.js → p-fa3d0267.entry.js} +1 -1
- package/dist/esm/dropi-accordion-item.entry.js +2 -2
- package/dist/esm/dropi-accordion.entry.js +2 -2
- package/dist/esm/dropi-alert-legacy.entry.js +1 -1
- package/dist/esm/dropi-alert-modal.entry.js +3 -3
- package/dist/esm/dropi-alert.entry.js +2 -2
- package/dist/esm/dropi-avatars.entry.js +2 -2
- package/dist/esm/dropi-badge-legacy.entry.js +2 -2
- package/dist/esm/dropi-badge.entry.js +2 -2
- package/dist/esm/dropi-banner-external.entry.js +12 -2
- package/dist/esm/dropi-breadcrumb.entry.js +2 -2
- package/dist/esm/dropi-button.entry.js +3 -3
- package/dist/esm/dropi-card-checkbox.entry.js +3 -3
- package/dist/esm/dropi-card-product.entry.js +7 -5
- package/dist/esm/dropi-card-section.entry.js +3 -3
- package/dist/esm/dropi-carousel.entry.js +7 -2
- package/dist/esm/dropi-checkbox-selection-list.entry.js +3 -3
- package/dist/esm/dropi-checkbox.entry.js +3 -3
- package/dist/esm/dropi-chips.entry.js +2 -2
- package/dist/esm/dropi-city-selector.entry.js +10 -2
- package/dist/esm/dropi-color-picker.entry.js +4 -4
- package/dist/esm/dropi-country-flags.entry.js +2 -2
- package/dist/esm/dropi-country-selector.entry.js +3 -3
- package/dist/esm/dropi-date-picker-range.entry.js +1 -1
- package/dist/esm/dropi-date-picker.entry.js +5 -5
- package/dist/esm/dropi-drawer.entry.js +7 -4
- package/dist/esm/dropi-dropdown.entry.js +3 -3
- package/dist/esm/dropi-empty-state.entry.js +2 -2
- package/dist/esm/dropi-favorite-button.entry.js +2 -2
- package/dist/esm/dropi-file-upload-progress-bar.entry.js +4 -2
- package/dist/esm/dropi-file-upload.entry.js +6 -5
- package/dist/esm/dropi-icon.entry.js +21 -4
- package/dist/esm/dropi-ilustration-icon.entry.js +2 -2
- package/dist/esm/dropi-image-miniature.entry.js +2 -2
- package/dist/esm/dropi-image-overlay.entry.js +3 -2
- package/dist/esm/dropi-input_3.entry.js +13 -11
- package/dist/esm/dropi-languages-selector.entry.js +6 -2
- package/dist/esm/dropi-logo.entry.js +12 -2
- package/dist/esm/dropi-lottie-loader.entry.js +1 -1
- package/dist/esm/dropi-media-player.entry.js +7 -4
- package/dist/esm/dropi-modal.entry.js +19 -12
- package/dist/esm/dropi-navbar.entry.js +3 -3
- package/dist/esm/dropi-otp-send-code.entry.js +7 -7
- package/dist/esm/dropi-phone-input.entry.js +4 -4
- package/dist/esm/dropi-radio-button.entry.js +2 -2
- package/dist/esm/dropi-radio-selection-list.entry.js +3 -3
- package/dist/esm/dropi-read-more.entry.js +2 -2
- package/dist/esm/dropi-search.entry.js +3 -3
- package/dist/esm/dropi-select.entry.js +6 -2
- package/dist/esm/dropi-sidebar.entry.js +2 -2
- package/dist/esm/dropi-simple-stepper.entry.js +2 -2
- package/dist/esm/dropi-skeleton.entry.js +2 -2
- package/dist/esm/dropi-steps.entry.js +2 -2
- package/dist/esm/dropi-switch.entry.js +2 -2
- package/dist/esm/dropi-table.entry.js +14 -7
- package/dist/esm/dropi-tabs.entry.js +2 -2
- package/dist/esm/dropi-tag-type-product.entry.js +2 -2
- package/dist/esm/dropi-text-area.entry.js +3 -3
- package/dist/esm/dropi-time-line.entry.js +2 -2
- package/dist/esm/dropi-toast.entry.js +6 -5
- package/dist/esm/dropi-tooltip-v2.entry.js +3 -3
- package/dist/esm/dropi-tooltip.entry.js +2 -2
- package/dist/esm/dropi-ui.js +3 -3
- package/dist/esm/dropi-vertical-steps.entry.js +2 -2
- package/dist/esm/dropi-youtube-lazy-video.entry.js +2 -2
- package/dist/esm/{index-TXz_09YZ.js → index-D5SAM1O2.js} +1041 -15
- package/dist/esm/loader.js +3 -3
- package/dist/types/components/dropi-alert-modal/dropi-alert-modal.d.ts +1 -1
- package/dist/types/components/dropi-banner-external/dropi-banner-external.d.ts +2 -0
- package/dist/types/components/dropi-carousel/dropi-carousel.d.ts +3 -3
- package/dist/types/components/dropi-drawer/dropi-drawer.d.ts +2 -2
- package/dist/types/components/dropi-icon/dropi-icon.d.ts +3 -1
- package/dist/types/components/dropi-image-overlay/dropi-image-overlay.d.ts +1 -1
- package/dist/types/components/dropi-input/dropi-input.d.ts +2 -2
- package/dist/types/components/dropi-logo/dropi-logo.d.ts +2 -0
- package/dist/types/components/dropi-modal/dropi-modal.d.ts +2 -2
- package/dist/types/components/dropi-table/dropi-table.d.ts +2 -0
- package/dist/types/components.d.ts +37 -37
- package/hydrate/index.d.ts +287 -0
- package/hydrate/index.js +30455 -0
- package/hydrate/index.mjs +30445 -0
- package/hydrate/package.json +12 -0
- package/package.json +9 -3
- package/readme.md +42 -12
- package/scripts/setup.js +193 -8
- package/dist/components/p-9KLpSviZ.js +0 -1
- package/dist/components/p-BVekazGL.js +0 -1
- package/dist/components/p-BYRcOZS4.js +0 -1
- package/dist/components/p-BuDg1d0S.js +0 -1
- package/dist/components/p-C2paYEIp.js +0 -1
- package/dist/components/p-CnALA9z_.js +0 -1
- package/dist/components/p-CtzCJQVR.js +0 -1
- package/dist/components/p-D_Y7tuEH.js +0 -1
- package/dist/dropi-ui/p-1d4c5364.entry.js +0 -1
- package/dist/dropi-ui/p-2e0623ba.entry.js +0 -1
- package/dist/dropi-ui/p-37c86c74.entry.js +0 -1
- package/dist/dropi-ui/p-392654b7.entry.js +0 -1
- package/dist/dropi-ui/p-39904430.entry.js +0 -1
- package/dist/dropi-ui/p-3a3b778f.entry.js +0 -1
- package/dist/dropi-ui/p-443ed5bd.entry.js +0 -1
- package/dist/dropi-ui/p-4967b619.entry.js +0 -1
- package/dist/dropi-ui/p-645da978.entry.js +0 -1
- package/dist/dropi-ui/p-710312bd.entry.js +0 -1
- package/dist/dropi-ui/p-74dfe8d1.entry.js +0 -1
- package/dist/dropi-ui/p-770afae3.entry.js +0 -1
- package/dist/dropi-ui/p-8188cca4.entry.js +0 -1
- package/dist/dropi-ui/p-87e9ba6d.entry.js +0 -1
- package/dist/dropi-ui/p-925852b1.entry.js +0 -1
- package/dist/dropi-ui/p-TXz_09YZ.js +0 -2
- package/dist/dropi-ui/p-aafaffa3.entry.js +0 -1
- package/dist/dropi-ui/p-ac345a0e.entry.js +0 -1
- package/dist/dropi-ui/p-af3691a0.entry.js +0 -1
- package/dist/dropi-ui/p-bd0ffb4a.entry.js +0 -1
- package/dist/dropi-ui/p-c2e96728.entry.js +0 -1
- package/dist/dropi-ui/p-c664f99f.entry.js +0 -1
- package/dist/dropi-ui/p-cfc19ca0.entry.js +0 -1
- package/dist/dropi-ui/p-dd4c6b40.entry.js +0 -1
- package/dist/dropi-ui/p-e0351b61.entry.js +0 -1
- package/dist/dropi-ui/p-e2361547.entry.js +0 -1
- package/dist/dropi-ui/p-e25b2680.entry.js +0 -1
- package/dist/dropi-ui/p-f95c11f8.entry.js +0 -1
|
@@ -1,17 +1,43 @@
|
|
|
1
1
|
const NAMESPACE = 'dropi-ui';
|
|
2
|
-
const BUILD = /* dropi-ui */ { hotModuleReplacement: false, hydratedSelectorName: "hydrated", lazyLoad: true, propChangeCallback: true, state: true, updatable: true};
|
|
2
|
+
const BUILD = /* dropi-ui */ { hotModuleReplacement: false, hydratedSelectorName: "hydrated", lazyLoad: true, propChangeCallback: true, slotRelocation: true, state: true, updatable: true};
|
|
3
3
|
|
|
4
4
|
const globalScripts = () => {};
|
|
5
|
-
const globalStyles = ":root{--Primary-Primary-50:#fef8f2;--Primary-Primary-100:#ffecda;--Primary-Primary-200:#fcddbd;--Primary-Primary-300:#f2bc85;--Primary-Primary-400:#f7b46f;--Primary-Primary-500:#f49a3d;--Primary-Primary-600:#e58017;--Primary-Primary-700:#99540f;--Primary-Primary-800:#66380a;--Primary-Primary-900:#331c05;--Secondary-Secondary-50:#f0fafc;--Secondary-Secondary-100:#cee8f2;--Secondary-Secondary-200:#95d0e5;--Secondary-Secondary-300:#62bad9;--Secondary-Secondary-400:#33a4cc;--Secondary-Secondary-500:#008dbf;--Secondary-Secondary-600:#007199;--Secondary-Secondary-700:#005573;--Secondary-Secondary-800:#00384d;--Secondary-Secondary-900:#001c26;--Neutral-White:#ffffff;--Neutral-Black:#000000;--Gray-Gray-50:#f7f8fa;--Gray-Gray-100:#e6eaf2;--Gray-Gray-200:#c3c9d9;--Gray-Gray-300:#a3abbf;--Gray-Gray-400:#858ea6;--Gray-Gray-500:#69738c;--Gray-Gray-600:#475066;--Gray-Gray-700:#32394d;--Gray-Gray-800:#1f2433;--Gray-Gray-900:#0e111a;--Success-Success-50:#e7f8f3;--Success-Success-100:#b3eada;--Success-Success-200:#8ee0c8;--Success-Success-300:#5bd1af;--Success-Success-400:#3bc99f;--Success-Success-500:#0abb87;--Success-Success-600:#09aa7b;--Success-Success-700:#078560;--Success-Success-800:#06674a;--Success-Success-900:#044f39;--Error-Error-50:#fef0f0;--Error-Error-100:#fcd1d1;--Error-Error-200:#fababb;--Error-Error-300:#f89b9c;--Error-Error-400:#f68889;--Error-Error-500:#f46a6b;--Error-Error-600:#de6061;--Error-Error-700:#ad4b4c;--Error-Error-800:#863a3b;--Error-Error-900:#662d2d;--Info-Info-50:#eef6fe;--Info-Info-100:#c9e3fb;--Info-Info-200:#afd6f9;--Info-Info-300:#8ac3f6;--Info-Info-400:#73b7f4;--Info-Info-500:#50a5f1;--Info-Info-600:#4996db;--Info-Info-700:#3975ab;--Info-Info-800:#2c5b85;--Info-Info-900:#224565;--Warning-Warning-50:#fef8ed;--Warning-Warning-100:#fbe8c8;--Warning-Warning-200:#f9ddad;--Warning-Warning-300:#f6cd87;--Warning-Warning-400:#f4c370;--Warning-Warning-500:#f1b44c;--Warning-Warning-600:#dba445;--Warning-Warning-700:#ab8036;--Warning-Warning-800:#85632a;--Warning-Warning-900:#654c20;--Orange-orange-50:#fef5ec;--Orange-orange-500:#f49a3d;--Size-1:4px;--Size-2:8px;--Size-3:12px;--Size-4:16px;--Size-5:24px;--Size-6:32px;--Size-7:40px;--Size-8:48px;--Size-9:56px;--Size-10:64px;--Border-1:4px;--Border-2:8px;--Border-3:12px;--Border-4:24px;--Border-5:32px;--Border-full:9999px;--font-size-xxxxl:36px;--font-size-xxxl:30px;--font-size-xxl:24px;--font-size-xl:20px;--font-size-l:18px;--font-size-m:16px;--font-size-s:14px;--font-size-xs:12px;--font-size-xxs:10px;--lineheight-simple:110%;--lineheight-large:150%;--font-weight-bold:700;--font-weight-semibold:600;--font-weight-medium:500;--font-weight-regular:400;--font-weight-light:300;--font-family-01:'Inter', sans-serif;--breakpoint-extra-small:576px;--breakpoint-small:600px;--breakpoint-medium:1000px;--breakpoint-large:1200px;--breakpoint-extra-large:1536px;--breakpoint-full-width:1920px;--Shadow-small:0px 0px 12px rgba(0, 0, 0, 0.04);--Shadow-medium:0.5px 4px 8px rgba(0, 0, 0, 0.08);--Shadow-large:0px 4px 16px rgba(0, 0, 0, 0.16);--Shadow-icon:0px 0px 4px rgba(0, 0, 0, 0.16);--Interrapidisimo:#383637;--Domina:#464ffe;--Coordinadora:#2686c5;--Servientrega:#1ba558;--99-minutos:#9cd453;--TCC:#f8dd49;--Veloces:#dc2e76;--Envia:#e7484e;--Restlogix:#90dd92;--Tiui:#0596a5;--Fedex:#4d148c;--Laarcourier:#faf063;--Gintracom:#ff3939;--Blue-express:#1542a3;--Lulu:#f03a3e;--Urbano:#e53237;--Tipsa:#1d3681}@media (max-width: 600px){:root{--font-size-xxxxl:32px;--font-size-xxxl:26px;--font-size-xxl:20px;--font-size-xl:18px;--font-size-l:16px;--font-size-m:16px;--font-size-s:14px;--font-size-xs:12px;--font-size-xxs:10px}}*{font-family:var(--font-family-01);box-sizing:border-box;text-align:left}h1{color:var(--Gray-Gray-700);font-size:var(--font-size-xxxxl);font-weight:var(--font-weight-bold);line-height:var(--lineheight-simple)}h2{color:var(--Gray-Gray-700);font-size:var(--font-size-xxxl);font-weight:var(--font-weight-bold);line-height:var(--lineheight-simple)}h3{color:var(--Gray-Gray-700);font-size:var(--font-size-xxl);font-weight:var(--font-weight-bold);line-height:var(--lineheight-simple)}h4{color:var(--Gray-Gray-700);font-size:var(--font-size-xl);font-weight:var(--font-weight-bold);line-height:var(--lineheight-simple)}h5{color:var(--Gray-Gray-700);font-size:var(--font-size-l);font-weight:var(--font-weight-bold);line-height:var(--lineheight-simple)}.Body-L-Medium{color:var(--Gray-Gray-700);font-size:var(--font-size-m);font-weight:var(--font-weight-medium);line-height:var(--lineheight-large)}.Body-L-Regular{color:var(--Gray-Gray-600);font-size:var(--font-size-m);font-weight:var(--font-weight-regular);line-height:var(--lineheight-large)}.Body-M-Medium{color:var(--Gray-Gray-700);font-size:var(--font-size-s);font-weight:var(--font-weight-medium);line-height:var(--lineheight-large)}.Body-M-Regular{color:var(--Gray-Gray-600);font-size:var(--font-size-s);font-weight:var(--font-weight-regular);line-height:var(--lineheight-large)}.Body-S-Medium{color:var(--Gray-Gray-700);font-size:var(--font-size-xs);font-weight:var(--font-weight-medium);line-height:var(--lineheight-large)}.Body-S-Regular{color:var(--Gray-Gray-600);font-size:var(--font-size-xs);font-weight:var(--font-weight-regular);line-height:var(--lineheight-large)}.Caption-M{color:var(--Gray-Gray-700);font-size:var(--font-size-xs);font-weight:var(--font-weight-bold);line-height:var(--lineheight-simple)}.Caption-S{color:var(--Gray-Gray-700);font-size:var(--font-size-xxs);font-weight:var(--font-weight-bold);line-height:var(--lineheight-simple)}.Label-L{color:var(--Gray-Gray-700);font-size:var(--font-size-m);font-weight:var(--font-weight-bold);line-height:var(--lineheight-simple)}.Label-M{color:var(--Gray-Gray-700);font-size:var(--font-size-s);font-weight:var(--font-weight-bold);line-height:var(--lineheight-simple)}.Label-S{color:var(--Gray-Gray-700);font-size:var(--font-size-xs);font-weight:var(--font-weight-bold);line-height:var(--lineheight-simple)}";
|
|
5
|
+
const globalStyles = ":root{--Primary-Primary-50:#fef8f2;--Primary-Primary-100:#ffecda;--Primary-Primary-200:#fcddbd;--Primary-Primary-300:#f2bc85;--Primary-Primary-400:#f7b46f;--Primary-Primary-500:#f49a3d;--Primary-Primary-600:#e58017;--Primary-Primary-700:#99540f;--Primary-Primary-800:#66380a;--Primary-Primary-900:#331c05;--Secondary-Secondary-50:#f0fafc;--Secondary-Secondary-100:#cee8f2;--Secondary-Secondary-200:#95d0e5;--Secondary-Secondary-300:#62bad9;--Secondary-Secondary-400:#33a4cc;--Secondary-Secondary-500:#008dbf;--Secondary-Secondary-600:#007199;--Secondary-Secondary-700:#005573;--Secondary-Secondary-800:#00384d;--Secondary-Secondary-900:#001c26;--Neutral-White:#ffffff;--Neutral-Black:#000000;--Gray-Gray-50:#f7f8fa;--Gray-Gray-100:#e6eaf2;--Gray-Gray-200:#c3c9d9;--Gray-Gray-300:#a3abbf;--Gray-Gray-400:#858ea6;--Gray-Gray-500:#69738c;--Gray-Gray-600:#475066;--Gray-Gray-700:#32394d;--Gray-Gray-800:#1f2433;--Gray-Gray-900:#0e111a;--Success-Success-50:#e7f8f3;--Success-Success-100:#b3eada;--Success-Success-200:#8ee0c8;--Success-Success-300:#5bd1af;--Success-Success-400:#3bc99f;--Success-Success-500:#0abb87;--Success-Success-600:#09aa7b;--Success-Success-700:#078560;--Success-Success-800:#06674a;--Success-Success-900:#044f39;--Error-Error-50:#fef0f0;--Error-Error-100:#fcd1d1;--Error-Error-200:#fababb;--Error-Error-300:#f89b9c;--Error-Error-400:#f68889;--Error-Error-500:#f46a6b;--Error-Error-600:#de6061;--Error-Error-700:#ad4b4c;--Error-Error-800:#863a3b;--Error-Error-900:#662d2d;--Info-Info-50:#eef6fe;--Info-Info-100:#c9e3fb;--Info-Info-200:#afd6f9;--Info-Info-300:#8ac3f6;--Info-Info-400:#73b7f4;--Info-Info-500:#50a5f1;--Info-Info-600:#4996db;--Info-Info-700:#3975ab;--Info-Info-800:#2c5b85;--Info-Info-900:#224565;--Warning-Warning-50:#fef8ed;--Warning-Warning-100:#fbe8c8;--Warning-Warning-200:#f9ddad;--Warning-Warning-300:#f6cd87;--Warning-Warning-400:#f4c370;--Warning-Warning-500:#f1b44c;--Warning-Warning-600:#dba445;--Warning-Warning-700:#ab8036;--Warning-Warning-800:#85632a;--Warning-Warning-900:#654c20;--Orange-orange-50:#fef5ec;--Orange-orange-500:#f49a3d;--Size-1:4px;--Size-2:8px;--Size-3:12px;--Size-4:16px;--Size-5:24px;--Size-6:32px;--Size-7:40px;--Size-8:48px;--Size-9:56px;--Size-10:64px;--Border-1:4px;--Border-2:8px;--Border-3:12px;--Border-4:24px;--Border-5:32px;--Border-full:9999px;--font-size-xxxxl:36px;--font-size-xxxl:30px;--font-size-xxl:24px;--font-size-xl:20px;--font-size-l:18px;--font-size-m:16px;--font-size-s:14px;--font-size-xs:12px;--font-size-xxs:10px;--lineheight-simple:110%;--lineheight-large:150%;--font-weight-bold:700;--font-weight-semibold:600;--font-weight-medium:500;--font-weight-regular:400;--font-weight-light:300;--font-family-01:'Inter', sans-serif;--breakpoint-extra-small:576px;--breakpoint-small:600px;--breakpoint-medium:1000px;--breakpoint-large:1200px;--breakpoint-extra-large:1536px;--breakpoint-full-width:1920px;--Shadow-small:0px 0px 12px rgba(0, 0, 0, 0.04);--Shadow-medium:0.5px 4px 8px rgba(0, 0, 0, 0.08);--Shadow-large:0px 4px 16px rgba(0, 0, 0, 0.16);--Shadow-icon:0px 0px 4px rgba(0, 0, 0, 0.16);--Interrapidisimo:#383637;--Domina:#464ffe;--Coordinadora:#2686c5;--Servientrega:#1ba558;--99-minutos:#9cd453;--TCC:#f8dd49;--Veloces:#dc2e76;--Envia:#e7484e;--Restlogix:#90dd92;--Tiui:#0596a5;--Fedex:#4d148c;--Laarcourier:#faf063;--Gintracom:#ff3939;--Blue-express:#1542a3;--Lulu:#f03a3e;--Urbano:#e53237;--Tipsa:#1d3681}@media (max-width: 600px){:root{--font-size-xxxxl:32px;--font-size-xxxl:26px;--font-size-xxl:20px;--font-size-xl:18px;--font-size-l:16px;--font-size-m:16px;--font-size-s:14px;--font-size-xs:12px;--font-size-xxs:10px}}*{font-family:var(--font-family-01);box-sizing:border-box;text-align:left}h1{color:var(--Gray-Gray-700);font-size:var(--font-size-xxxxl);font-weight:var(--font-weight-bold);line-height:var(--lineheight-simple)}h2{color:var(--Gray-Gray-700);font-size:var(--font-size-xxxl);font-weight:var(--font-weight-bold);line-height:var(--lineheight-simple)}h3{color:var(--Gray-Gray-700);font-size:var(--font-size-xxl);font-weight:var(--font-weight-bold);line-height:var(--lineheight-simple)}h4{color:var(--Gray-Gray-700);font-size:var(--font-size-xl);font-weight:var(--font-weight-bold);line-height:var(--lineheight-simple)}h5{color:var(--Gray-Gray-700);font-size:var(--font-size-l);font-weight:var(--font-weight-bold);line-height:var(--lineheight-simple)}.Body-L-Medium{color:var(--Gray-Gray-700);font-size:var(--font-size-m);font-weight:var(--font-weight-medium);line-height:var(--lineheight-large)}.Body-L-Regular{color:var(--Gray-Gray-600);font-size:var(--font-size-m);font-weight:var(--font-weight-regular);line-height:var(--lineheight-large)}.Body-M-Medium{color:var(--Gray-Gray-700);font-size:var(--font-size-s);font-weight:var(--font-weight-medium);line-height:var(--lineheight-large)}.Body-M-Regular{color:var(--Gray-Gray-600);font-size:var(--font-size-s);font-weight:var(--font-weight-regular);line-height:var(--lineheight-large)}.Body-S-Medium{color:var(--Gray-Gray-700);font-size:var(--font-size-xs);font-weight:var(--font-weight-medium);line-height:var(--lineheight-large)}.Body-S-Regular{color:var(--Gray-Gray-600);font-size:var(--font-size-xs);font-weight:var(--font-weight-regular);line-height:var(--lineheight-large)}.Caption-M{color:var(--Gray-Gray-700);font-size:var(--font-size-xs);font-weight:var(--font-weight-bold);line-height:var(--lineheight-simple)}.Caption-S{color:var(--Gray-Gray-700);font-size:var(--font-size-xxs);font-weight:var(--font-weight-bold);line-height:var(--lineheight-simple)}.Label-L{color:var(--Gray-Gray-700);font-size:var(--font-size-m);font-weight:var(--font-weight-bold);line-height:var(--lineheight-simple)}.Label-M{color:var(--Gray-Gray-700);font-size:var(--font-size-s);font-weight:var(--font-weight-bold);line-height:var(--lineheight-simple)}.Label-S{color:var(--Gray-Gray-700);font-size:var(--font-size-xs);font-weight:var(--font-weight-bold);line-height:var(--lineheight-simple)}body.dropi-modal-open{overflow:hidden !important}dropi-icon:not(:defined){display:inline-flex;width:24px;height:24px;overflow:hidden}";
|
|
6
6
|
|
|
7
7
|
/*
|
|
8
8
|
Stencil Client Platform v4.43.3 | MIT Licensed | https://stenciljs.com
|
|
9
9
|
*/
|
|
10
10
|
|
|
11
|
+
var Build = {
|
|
12
|
+
isBrowser: true};
|
|
11
13
|
|
|
12
14
|
// src/utils/constants.ts
|
|
13
15
|
var SVG_NS = "http://www.w3.org/2000/svg";
|
|
14
16
|
var HTML_NS = "http://www.w3.org/1999/xhtml";
|
|
17
|
+
var PrimitiveType = /* @__PURE__ */ ((PrimitiveType2) => {
|
|
18
|
+
PrimitiveType2["Undefined"] = "undefined";
|
|
19
|
+
PrimitiveType2["Null"] = "null";
|
|
20
|
+
PrimitiveType2["String"] = "string";
|
|
21
|
+
PrimitiveType2["Number"] = "number";
|
|
22
|
+
PrimitiveType2["SpecialNumber"] = "number";
|
|
23
|
+
PrimitiveType2["Boolean"] = "boolean";
|
|
24
|
+
PrimitiveType2["BigInt"] = "bigint";
|
|
25
|
+
return PrimitiveType2;
|
|
26
|
+
})(PrimitiveType || {});
|
|
27
|
+
var NonPrimitiveType = /* @__PURE__ */ ((NonPrimitiveType2) => {
|
|
28
|
+
NonPrimitiveType2["Array"] = "array";
|
|
29
|
+
NonPrimitiveType2["Date"] = "date";
|
|
30
|
+
NonPrimitiveType2["Map"] = "map";
|
|
31
|
+
NonPrimitiveType2["Object"] = "object";
|
|
32
|
+
NonPrimitiveType2["RegularExpression"] = "regexp";
|
|
33
|
+
NonPrimitiveType2["Set"] = "set";
|
|
34
|
+
NonPrimitiveType2["Channel"] = "channel";
|
|
35
|
+
NonPrimitiveType2["Symbol"] = "symbol";
|
|
36
|
+
return NonPrimitiveType2;
|
|
37
|
+
})(NonPrimitiveType || {});
|
|
38
|
+
var TYPE_CONSTANT = "type";
|
|
39
|
+
var VALUE_CONSTANT = "value";
|
|
40
|
+
var SERIALIZED_PREFIX = "serialized:";
|
|
15
41
|
|
|
16
42
|
// src/utils/get-prop-descriptor.ts
|
|
17
43
|
function getPropertyDescriptor(obj, memberName, getOnly) {
|
|
@@ -129,6 +155,16 @@ var loadModule = (cmpMeta, hostRef, hmrVersionId) => {
|
|
|
129
155
|
|
|
130
156
|
// src/client/client-style.ts
|
|
131
157
|
var styles = /* @__PURE__ */ new Map();
|
|
158
|
+
|
|
159
|
+
// src/runtime/runtime-constants.ts
|
|
160
|
+
var CONTENT_REF_ID = "r";
|
|
161
|
+
var ORG_LOCATION_ID = "o";
|
|
162
|
+
var SLOT_NODE_ID = "s";
|
|
163
|
+
var TEXT_NODE_ID = "t";
|
|
164
|
+
var COMMENT_NODE_ID = "c";
|
|
165
|
+
var HYDRATE_ID = "s-id";
|
|
166
|
+
var HYDRATED_STYLE_ID = "sty-id";
|
|
167
|
+
var HYDRATE_CHILD_ID = "c-id";
|
|
132
168
|
var HYDRATED_CSS = "{visibility:hidden}.hydrated{visibility:inherit}";
|
|
133
169
|
var SLOT_FB_CSS = "slot-fb{display:contents}slot-fb[hidden]{display:none}";
|
|
134
170
|
var FORM_ASSOCIATED_CUSTOM_ELEMENT_CALLBACKS = [
|
|
@@ -240,6 +276,153 @@ function createShadowRoot(cmpMeta) {
|
|
|
240
276
|
shadowRoot.prepend(styleElm);
|
|
241
277
|
}
|
|
242
278
|
}
|
|
279
|
+
var updateFallbackSlotVisibility = (elm) => {
|
|
280
|
+
const childNodes = internalCall(elm, "childNodes");
|
|
281
|
+
if (elm.tagName && elm.tagName.includes("-") && elm["s-cr"] && elm.tagName !== "SLOT-FB") {
|
|
282
|
+
getHostSlotNodes(childNodes, elm.tagName).forEach((slotNode) => {
|
|
283
|
+
if (slotNode.nodeType === 1 /* ElementNode */ && slotNode.tagName === "SLOT-FB") {
|
|
284
|
+
if (getSlotChildSiblings(slotNode, getSlotName(slotNode), false).length) {
|
|
285
|
+
slotNode.hidden = true;
|
|
286
|
+
} else {
|
|
287
|
+
slotNode.hidden = false;
|
|
288
|
+
}
|
|
289
|
+
}
|
|
290
|
+
});
|
|
291
|
+
}
|
|
292
|
+
let i2 = 0;
|
|
293
|
+
for (i2 = 0; i2 < childNodes.length; i2++) {
|
|
294
|
+
const childNode = childNodes[i2];
|
|
295
|
+
if (childNode.nodeType === 1 /* ElementNode */ && internalCall(childNode, "childNodes").length) {
|
|
296
|
+
updateFallbackSlotVisibility(childNode);
|
|
297
|
+
}
|
|
298
|
+
}
|
|
299
|
+
};
|
|
300
|
+
var getSlottedChildNodes = (childNodes) => {
|
|
301
|
+
const result = [];
|
|
302
|
+
for (let i2 = 0; i2 < childNodes.length; i2++) {
|
|
303
|
+
const slottedNode = childNodes[i2]["s-nr"] || void 0;
|
|
304
|
+
if (slottedNode && slottedNode.isConnected) {
|
|
305
|
+
result.push(slottedNode);
|
|
306
|
+
}
|
|
307
|
+
}
|
|
308
|
+
return result;
|
|
309
|
+
};
|
|
310
|
+
function getHostSlotNodes(childNodes, hostName, slotName) {
|
|
311
|
+
let i2 = 0;
|
|
312
|
+
let slottedNodes = [];
|
|
313
|
+
let childNode;
|
|
314
|
+
for (; i2 < childNodes.length; i2++) {
|
|
315
|
+
childNode = childNodes[i2];
|
|
316
|
+
if (childNode["s-sr"] && (!hostName || childNode["s-hn"] === hostName) && (slotName === void 0 || getSlotName(childNode) === slotName)) {
|
|
317
|
+
slottedNodes.push(childNode);
|
|
318
|
+
if (typeof slotName !== "undefined") return slottedNodes;
|
|
319
|
+
}
|
|
320
|
+
slottedNodes = [...slottedNodes, ...getHostSlotNodes(childNode.childNodes, hostName, slotName)];
|
|
321
|
+
}
|
|
322
|
+
return slottedNodes;
|
|
323
|
+
}
|
|
324
|
+
var getSlotChildSiblings = (slot, slotName, includeSlot = true) => {
|
|
325
|
+
const childNodes = [];
|
|
326
|
+
if (includeSlot && slot["s-sr"] || !slot["s-sr"]) childNodes.push(slot);
|
|
327
|
+
let node = slot;
|
|
328
|
+
while (node = node.nextSibling) {
|
|
329
|
+
if (getSlotName(node) === slotName && (includeSlot || !node["s-sr"])) childNodes.push(node);
|
|
330
|
+
}
|
|
331
|
+
return childNodes;
|
|
332
|
+
};
|
|
333
|
+
var isNodeLocatedInSlot = (nodeToRelocate, slotName) => {
|
|
334
|
+
if (nodeToRelocate.nodeType === 1 /* ElementNode */) {
|
|
335
|
+
if (nodeToRelocate.getAttribute("slot") === null && slotName === "") {
|
|
336
|
+
return true;
|
|
337
|
+
}
|
|
338
|
+
if (nodeToRelocate.getAttribute("slot") === slotName) {
|
|
339
|
+
return true;
|
|
340
|
+
}
|
|
341
|
+
return false;
|
|
342
|
+
}
|
|
343
|
+
if (nodeToRelocate["s-sn"] === slotName) {
|
|
344
|
+
return true;
|
|
345
|
+
}
|
|
346
|
+
return slotName === "";
|
|
347
|
+
};
|
|
348
|
+
var addSlotRelocateNode = (newChild, slotNode, prepend, position) => {
|
|
349
|
+
if (newChild["s-ol"] && newChild["s-ol"].isConnected) {
|
|
350
|
+
return;
|
|
351
|
+
}
|
|
352
|
+
const slottedNodeLocation = document.createTextNode("");
|
|
353
|
+
slottedNodeLocation["s-nr"] = newChild;
|
|
354
|
+
if (!slotNode["s-cr"] || !slotNode["s-cr"].parentNode) return;
|
|
355
|
+
const parent = slotNode["s-cr"].parentNode;
|
|
356
|
+
const appendMethod = internalCall(parent, "appendChild");
|
|
357
|
+
if (typeof position !== "undefined") {
|
|
358
|
+
slottedNodeLocation["s-oo"] = position;
|
|
359
|
+
const childNodes = internalCall(parent, "childNodes");
|
|
360
|
+
const slotRelocateNodes = [slottedNodeLocation];
|
|
361
|
+
childNodes.forEach((n) => {
|
|
362
|
+
if (n["s-nr"]) slotRelocateNodes.push(n);
|
|
363
|
+
});
|
|
364
|
+
slotRelocateNodes.sort((a, b) => {
|
|
365
|
+
if (!a["s-oo"] || a["s-oo"] < (b["s-oo"] || 0)) return -1;
|
|
366
|
+
else if (!b["s-oo"] || b["s-oo"] < a["s-oo"]) return 1;
|
|
367
|
+
return 0;
|
|
368
|
+
});
|
|
369
|
+
slotRelocateNodes.forEach((n) => appendMethod.call(parent, n));
|
|
370
|
+
} else {
|
|
371
|
+
appendMethod.call(parent, slottedNodeLocation);
|
|
372
|
+
}
|
|
373
|
+
newChild["s-ol"] = slottedNodeLocation;
|
|
374
|
+
newChild["s-sh"] = slotNode["s-hn"];
|
|
375
|
+
};
|
|
376
|
+
var getSlotName = (node) => typeof node["s-sn"] === "string" ? node["s-sn"] : node.nodeType === 1 && node.getAttribute("slot") || void 0;
|
|
377
|
+
function patchSlotNode(node) {
|
|
378
|
+
if (node.assignedElements || node.assignedNodes || !node["s-sr"]) return;
|
|
379
|
+
const assignedFactory = (elementsOnly) => (function(opts) {
|
|
380
|
+
const toReturn = [];
|
|
381
|
+
const slotName = this["s-sn"];
|
|
382
|
+
if (opts == null ? void 0 : opts.flatten) {
|
|
383
|
+
console.error(`
|
|
384
|
+
Flattening is not supported for Stencil non-shadow slots.
|
|
385
|
+
You can use \`.childNodes\` to nested slot fallback content.
|
|
386
|
+
If you have a particular use case, please open an issue on the Stencil repo.
|
|
387
|
+
`);
|
|
388
|
+
}
|
|
389
|
+
const parent = this["s-cr"].parentElement;
|
|
390
|
+
const slottedNodes = parent.__childNodes ? parent.childNodes : getSlottedChildNodes(parent.childNodes);
|
|
391
|
+
slottedNodes.forEach((n) => {
|
|
392
|
+
if (slotName === getSlotName(n)) {
|
|
393
|
+
toReturn.push(n);
|
|
394
|
+
}
|
|
395
|
+
});
|
|
396
|
+
if (elementsOnly) {
|
|
397
|
+
return toReturn.filter((n) => n.nodeType === 1 /* ElementNode */);
|
|
398
|
+
}
|
|
399
|
+
return toReturn;
|
|
400
|
+
}).bind(node);
|
|
401
|
+
node.assignedElements = assignedFactory(true);
|
|
402
|
+
node.assignedNodes = assignedFactory(false);
|
|
403
|
+
}
|
|
404
|
+
function dispatchSlotChangeEvent(elm) {
|
|
405
|
+
elm.dispatchEvent(new CustomEvent("slotchange", { bubbles: false, cancelable: false, composed: false }));
|
|
406
|
+
}
|
|
407
|
+
function findSlotFromSlottedNode(slottedNode, parentHost) {
|
|
408
|
+
var _a;
|
|
409
|
+
parentHost = parentHost || ((_a = slottedNode["s-ol"]) == null ? void 0 : _a.parentElement);
|
|
410
|
+
if (!parentHost) return { slotNode: null, slotName: "" };
|
|
411
|
+
const slotName = slottedNode["s-sn"] = getSlotName(slottedNode) || "";
|
|
412
|
+
const childNodes = internalCall(parentHost, "childNodes");
|
|
413
|
+
const slotNode = getHostSlotNodes(childNodes, parentHost.tagName, slotName)[0];
|
|
414
|
+
return { slotNode, slotName };
|
|
415
|
+
}
|
|
416
|
+
function internalCall(node, method) {
|
|
417
|
+
if ("__" + method in node) {
|
|
418
|
+
const toReturn = node["__" + method];
|
|
419
|
+
if (typeof toReturn !== "function") return toReturn;
|
|
420
|
+
return toReturn.bind(node);
|
|
421
|
+
} else {
|
|
422
|
+
if (typeof node[method] !== "function") return node[method];
|
|
423
|
+
return node[method].bind(node);
|
|
424
|
+
}
|
|
425
|
+
}
|
|
243
426
|
var createTime = (fnName, tagName = "") => {
|
|
244
427
|
{
|
|
245
428
|
return () => {
|
|
@@ -293,7 +476,10 @@ var addStyle = (styleContainerNode, cmpMeta, mode) => {
|
|
|
293
476
|
if (!appliedStyles) {
|
|
294
477
|
rootAppliedStyles.set(styleContainerNode, appliedStyles = /* @__PURE__ */ new Set());
|
|
295
478
|
}
|
|
296
|
-
|
|
479
|
+
const existingStyleElm = styleContainerNode.querySelector(`[${HYDRATED_STYLE_ID}="${scopeId2}"]`);
|
|
480
|
+
if (existingStyleElm) {
|
|
481
|
+
existingStyleElm.textContent = style;
|
|
482
|
+
} else if (!appliedStyles.has(scopeId2)) {
|
|
297
483
|
styleElm = win.document.createElement("style");
|
|
298
484
|
styleElm.textContent = style;
|
|
299
485
|
const nonce = (_a = plt.$nonce$) != null ? _a : queryNonceMetaTagContent(win.document);
|
|
@@ -362,6 +548,12 @@ var addStyle = (styleContainerNode, cmpMeta, mode) => {
|
|
|
362
548
|
styleContainerNode.adoptedStyleSheets = [...styleContainerNode.adoptedStyleSheets, stylesheet];
|
|
363
549
|
}
|
|
364
550
|
appliedStyles.add(scopeId2);
|
|
551
|
+
if ("host" in styleContainerNode) {
|
|
552
|
+
const ssrStyleElm = styleContainerNode.querySelector(`[${HYDRATED_STYLE_ID}="${scopeId2}"]`);
|
|
553
|
+
if (ssrStyleElm) {
|
|
554
|
+
writeTask(() => ssrStyleElm.remove());
|
|
555
|
+
}
|
|
556
|
+
}
|
|
365
557
|
}
|
|
366
558
|
}
|
|
367
559
|
}
|
|
@@ -382,6 +574,17 @@ var attachStyles = (hostRef) => {
|
|
|
382
574
|
endAttachStyles();
|
|
383
575
|
};
|
|
384
576
|
var getScopeId = (cmp, mode) => "sc-" + (cmp.$tagName$);
|
|
577
|
+
var convertScopedToShadow = (css) => css.replace(/\/\*!@([^\/]+)\*\/[^\{]+\{/g, "$1{");
|
|
578
|
+
var hydrateScopedToShadow = () => {
|
|
579
|
+
if (!win.document) {
|
|
580
|
+
return;
|
|
581
|
+
}
|
|
582
|
+
const styles2 = win.document.querySelectorAll(`[${HYDRATED_STYLE_ID}]`);
|
|
583
|
+
let i2 = 0;
|
|
584
|
+
for (; i2 < styles2.length; i2++) {
|
|
585
|
+
registerStyle(styles2[i2].getAttribute(HYDRATED_STYLE_ID), convertScopedToShadow(styles2[i2].innerHTML), true);
|
|
586
|
+
}
|
|
587
|
+
};
|
|
385
588
|
var isComplexType = (o) => {
|
|
386
589
|
o = typeof o;
|
|
387
590
|
return o === "object" || o === "function";
|
|
@@ -394,6 +597,7 @@ var h = (nodeName, vnodeData, ...children) => {
|
|
|
394
597
|
}
|
|
395
598
|
let child = null;
|
|
396
599
|
let key = null;
|
|
600
|
+
let slotName = null;
|
|
397
601
|
let simple = false;
|
|
398
602
|
let lastSimple = false;
|
|
399
603
|
const vNodeChildren = [];
|
|
@@ -420,6 +624,9 @@ var h = (nodeName, vnodeData, ...children) => {
|
|
|
420
624
|
if (vnodeData.key) {
|
|
421
625
|
key = vnodeData.key;
|
|
422
626
|
}
|
|
627
|
+
if (vnodeData.name) {
|
|
628
|
+
slotName = vnodeData.name;
|
|
629
|
+
}
|
|
423
630
|
{
|
|
424
631
|
const classData = vnodeData.className || vnodeData.class;
|
|
425
632
|
if (classData) {
|
|
@@ -435,6 +642,9 @@ var h = (nodeName, vnodeData, ...children) => {
|
|
|
435
642
|
{
|
|
436
643
|
vnode.$key$ = key;
|
|
437
644
|
}
|
|
645
|
+
{
|
|
646
|
+
vnode.$name$ = slotName;
|
|
647
|
+
}
|
|
438
648
|
return vnode;
|
|
439
649
|
};
|
|
440
650
|
var newVNode = (tag, text) => {
|
|
@@ -452,13 +662,514 @@ var newVNode = (tag, text) => {
|
|
|
452
662
|
{
|
|
453
663
|
vnode.$key$ = null;
|
|
454
664
|
}
|
|
665
|
+
{
|
|
666
|
+
vnode.$name$ = null;
|
|
667
|
+
}
|
|
455
668
|
return vnode;
|
|
456
669
|
};
|
|
457
670
|
var Host = {};
|
|
458
671
|
var isHost = (node) => node && node.$tag$ === Host;
|
|
459
672
|
|
|
673
|
+
// src/runtime/client-hydrate.ts
|
|
674
|
+
var initializeClientHydrate = (hostElm, tagName, hostId, hostRef) => {
|
|
675
|
+
var _a, _b, _c, _d;
|
|
676
|
+
const endHydrate = createTime("hydrateClient", tagName);
|
|
677
|
+
const shadowRoot = hostElm.shadowRoot;
|
|
678
|
+
const childRenderNodes = [];
|
|
679
|
+
const slotNodes = [];
|
|
680
|
+
const slottedNodes = [];
|
|
681
|
+
const shadowRootNodes = shadowRoot ? [] : null;
|
|
682
|
+
const vnode = newVNode(tagName, null);
|
|
683
|
+
vnode.$elm$ = hostElm;
|
|
684
|
+
if (win.document && (!plt.$orgLocNodes$ || !plt.$orgLocNodes$.size)) {
|
|
685
|
+
initializeDocumentHydrate(win.document.body, plt.$orgLocNodes$ = /* @__PURE__ */ new Map());
|
|
686
|
+
}
|
|
687
|
+
hostElm[HYDRATE_ID] = hostId;
|
|
688
|
+
hostElm.removeAttribute(HYDRATE_ID);
|
|
689
|
+
hostRef.$vnode$ = clientHydrate(
|
|
690
|
+
vnode,
|
|
691
|
+
childRenderNodes,
|
|
692
|
+
slotNodes,
|
|
693
|
+
shadowRootNodes,
|
|
694
|
+
hostElm,
|
|
695
|
+
hostElm,
|
|
696
|
+
hostId,
|
|
697
|
+
slottedNodes
|
|
698
|
+
);
|
|
699
|
+
let crIndex = 0;
|
|
700
|
+
const crLength = childRenderNodes.length;
|
|
701
|
+
let childRenderNode;
|
|
702
|
+
for (crIndex; crIndex < crLength; crIndex++) {
|
|
703
|
+
childRenderNode = childRenderNodes[crIndex];
|
|
704
|
+
const orgLocationId = childRenderNode.$hostId$ + "." + childRenderNode.$nodeId$;
|
|
705
|
+
const orgLocationNode = plt.$orgLocNodes$.get(orgLocationId);
|
|
706
|
+
const node = childRenderNode.$elm$;
|
|
707
|
+
if (!shadowRoot) {
|
|
708
|
+
node["s-hn"] = transformTag(tagName).toUpperCase();
|
|
709
|
+
if (childRenderNode.$tag$ === "slot") {
|
|
710
|
+
node["s-cr"] = hostElm["s-cr"];
|
|
711
|
+
}
|
|
712
|
+
} else if (((_a = childRenderNode.$tag$) == null ? void 0 : _a.toString().includes("-")) && childRenderNode.$tag$ !== "slot-fb" && !childRenderNode.$elm$.shadowRoot) {
|
|
713
|
+
const cmpMeta = getHostRef(childRenderNode.$elm$);
|
|
714
|
+
if (cmpMeta) {
|
|
715
|
+
const scopeId3 = getScopeId(
|
|
716
|
+
cmpMeta.$cmpMeta$);
|
|
717
|
+
const styleSheet = win.document.querySelector(`style[sty-id="${scopeId3}"]`);
|
|
718
|
+
if (styleSheet) {
|
|
719
|
+
shadowRootNodes.unshift(styleSheet.cloneNode(true));
|
|
720
|
+
}
|
|
721
|
+
}
|
|
722
|
+
}
|
|
723
|
+
if (childRenderNode.$tag$ === "slot") {
|
|
724
|
+
childRenderNode.$name$ = childRenderNode.$elm$["s-sn"] || childRenderNode.$elm$["name"] || null;
|
|
725
|
+
if (childRenderNode.$children$) {
|
|
726
|
+
childRenderNode.$flags$ |= 2 /* isSlotFallback */;
|
|
727
|
+
if (!childRenderNode.$elm$.childNodes.length) {
|
|
728
|
+
childRenderNode.$children$.forEach((c) => {
|
|
729
|
+
childRenderNode.$elm$.appendChild(c.$elm$);
|
|
730
|
+
});
|
|
731
|
+
}
|
|
732
|
+
} else {
|
|
733
|
+
childRenderNode.$flags$ |= 1 /* isSlotReference */;
|
|
734
|
+
}
|
|
735
|
+
}
|
|
736
|
+
if (orgLocationNode && orgLocationNode.isConnected) {
|
|
737
|
+
if (orgLocationNode.parentElement.shadowRoot && orgLocationNode["s-en"] === "") {
|
|
738
|
+
orgLocationNode.parentNode.insertBefore(node, orgLocationNode.nextSibling);
|
|
739
|
+
}
|
|
740
|
+
orgLocationNode.parentNode.removeChild(orgLocationNode);
|
|
741
|
+
if (!shadowRoot) {
|
|
742
|
+
node["s-oo"] = parseInt(childRenderNode.$nodeId$);
|
|
743
|
+
}
|
|
744
|
+
}
|
|
745
|
+
if (orgLocationNode && !orgLocationNode["s-id"]) {
|
|
746
|
+
plt.$orgLocNodes$.delete(orgLocationId);
|
|
747
|
+
}
|
|
748
|
+
}
|
|
749
|
+
const hosts = [];
|
|
750
|
+
const snLen = slottedNodes.length;
|
|
751
|
+
let snIndex = 0;
|
|
752
|
+
let slotGroup;
|
|
753
|
+
let snGroupIdx;
|
|
754
|
+
let snGroupLen;
|
|
755
|
+
let slottedItem;
|
|
756
|
+
let currentPos = 0;
|
|
757
|
+
for (snIndex; snIndex < snLen; snIndex++) {
|
|
758
|
+
slotGroup = slottedNodes[snIndex];
|
|
759
|
+
if (!slotGroup || !slotGroup.length) continue;
|
|
760
|
+
snGroupLen = slotGroup.length;
|
|
761
|
+
snGroupIdx = 0;
|
|
762
|
+
for (snGroupIdx; snGroupIdx < snGroupLen; snGroupIdx++) {
|
|
763
|
+
slottedItem = slotGroup[snGroupIdx];
|
|
764
|
+
if (!hosts[slottedItem.hostId]) {
|
|
765
|
+
hosts[slottedItem.hostId] = plt.$orgLocNodes$.get(slottedItem.hostId);
|
|
766
|
+
}
|
|
767
|
+
if (!hosts[slottedItem.hostId]) continue;
|
|
768
|
+
const hostEle = hosts[slottedItem.hostId];
|
|
769
|
+
if (hostEle.shadowRoot && slottedItem.node.parentElement !== hostEle) {
|
|
770
|
+
hostEle.insertBefore(slottedItem.node, (_c = (_b = slotGroup[snGroupIdx - 1]) == null ? void 0 : _b.node) == null ? void 0 : _c.nextSibling);
|
|
771
|
+
}
|
|
772
|
+
if (!hostEle.shadowRoot || !shadowRoot) {
|
|
773
|
+
if (!slottedItem.slot["s-cr"]) {
|
|
774
|
+
slottedItem.slot["s-cr"] = hostEle["s-cr"];
|
|
775
|
+
if (!slottedItem.slot["s-cr"] && hostEle.shadowRoot) {
|
|
776
|
+
slottedItem.slot["s-cr"] = hostEle;
|
|
777
|
+
} else {
|
|
778
|
+
slottedItem.slot["s-cr"] = (hostEle.__childNodes || hostEle.childNodes)[0];
|
|
779
|
+
}
|
|
780
|
+
}
|
|
781
|
+
addSlotRelocateNode(slottedItem.node, slottedItem.slot, false, slottedItem.node["s-oo"] || currentPos);
|
|
782
|
+
if (((_d = slottedItem.node.parentElement) == null ? void 0 : _d.shadowRoot) && slottedItem.node["getAttribute"] && slottedItem.node.getAttribute("slot")) {
|
|
783
|
+
slottedItem.node.removeAttribute("slot");
|
|
784
|
+
}
|
|
785
|
+
}
|
|
786
|
+
currentPos = (slottedItem.node["s-oo"] || currentPos) + 1;
|
|
787
|
+
}
|
|
788
|
+
}
|
|
789
|
+
if (shadowRoot && !shadowRoot.childNodes.length) {
|
|
790
|
+
let rnIdex = 0;
|
|
791
|
+
const rnLen = shadowRootNodes.length;
|
|
792
|
+
if (rnLen) {
|
|
793
|
+
for (rnIdex; rnIdex < rnLen; rnIdex++) {
|
|
794
|
+
const node = shadowRootNodes[rnIdex];
|
|
795
|
+
if (node) {
|
|
796
|
+
shadowRoot.appendChild(node);
|
|
797
|
+
}
|
|
798
|
+
}
|
|
799
|
+
Array.from(hostElm.childNodes).forEach((node) => {
|
|
800
|
+
if (typeof node["s-en"] !== "string" && typeof node["s-sn"] !== "string") {
|
|
801
|
+
if (node.nodeType === 1 /* ElementNode */ && node.slot && node.hidden) {
|
|
802
|
+
node.removeAttribute("hidden");
|
|
803
|
+
} else if (node.nodeType === 8 /* CommentNode */ && !node.nodeValue) {
|
|
804
|
+
node.parentNode.removeChild(node);
|
|
805
|
+
}
|
|
806
|
+
}
|
|
807
|
+
});
|
|
808
|
+
}
|
|
809
|
+
}
|
|
810
|
+
hostRef.$hostElement$ = hostElm;
|
|
811
|
+
endHydrate();
|
|
812
|
+
};
|
|
813
|
+
var clientHydrate = (parentVNode, childRenderNodes, slotNodes, shadowRootNodes, hostElm, node, hostId, slottedNodes = []) => {
|
|
814
|
+
let childNodeType;
|
|
815
|
+
let childIdSplt;
|
|
816
|
+
let childVNode;
|
|
817
|
+
let i2;
|
|
818
|
+
if (node.nodeType === 1 /* ElementNode */) {
|
|
819
|
+
childNodeType = node.getAttribute(HYDRATE_CHILD_ID);
|
|
820
|
+
if (childNodeType) {
|
|
821
|
+
childIdSplt = childNodeType.split(".");
|
|
822
|
+
if (childIdSplt[0] === hostId || childIdSplt[0] === "0") {
|
|
823
|
+
childVNode = createSimpleVNode({
|
|
824
|
+
$flags$: 0,
|
|
825
|
+
$hostId$: childIdSplt[0],
|
|
826
|
+
$nodeId$: childIdSplt[1],
|
|
827
|
+
$depth$: childIdSplt[2],
|
|
828
|
+
$index$: childIdSplt[3],
|
|
829
|
+
$tag$: node.tagName.toLowerCase(),
|
|
830
|
+
$elm$: node,
|
|
831
|
+
// If we don't add the initial classes to the VNode, the first `vdom-render.ts` patch
|
|
832
|
+
// won't try to reconcile them. Classes set on the node will be blown away.
|
|
833
|
+
$attrs$: { class: node.className || "" }
|
|
834
|
+
});
|
|
835
|
+
childRenderNodes.push(childVNode);
|
|
836
|
+
node.removeAttribute(HYDRATE_CHILD_ID);
|
|
837
|
+
if (!parentVNode.$children$) {
|
|
838
|
+
parentVNode.$children$ = [];
|
|
839
|
+
}
|
|
840
|
+
const slotName = childVNode.$elm$.getAttribute("s-sn");
|
|
841
|
+
if (typeof slotName === "string") {
|
|
842
|
+
if (childVNode.$tag$ === "slot-fb") {
|
|
843
|
+
addSlot(
|
|
844
|
+
slotName,
|
|
845
|
+
childIdSplt[2],
|
|
846
|
+
childVNode,
|
|
847
|
+
node,
|
|
848
|
+
parentVNode,
|
|
849
|
+
childRenderNodes,
|
|
850
|
+
slotNodes,
|
|
851
|
+
shadowRootNodes,
|
|
852
|
+
slottedNodes
|
|
853
|
+
);
|
|
854
|
+
}
|
|
855
|
+
childVNode.$elm$["s-sn"] = slotName;
|
|
856
|
+
childVNode.$elm$.removeAttribute("s-sn");
|
|
857
|
+
}
|
|
858
|
+
if (childVNode.$index$ !== void 0) {
|
|
859
|
+
parentVNode.$children$[childVNode.$index$] = childVNode;
|
|
860
|
+
}
|
|
861
|
+
parentVNode = childVNode;
|
|
862
|
+
if (shadowRootNodes && childVNode.$depth$ === "0") {
|
|
863
|
+
shadowRootNodes[childVNode.$index$] = childVNode.$elm$;
|
|
864
|
+
}
|
|
865
|
+
}
|
|
866
|
+
}
|
|
867
|
+
if (node.shadowRoot) {
|
|
868
|
+
for (i2 = node.shadowRoot.childNodes.length - 1; i2 >= 0; i2--) {
|
|
869
|
+
clientHydrate(
|
|
870
|
+
parentVNode,
|
|
871
|
+
childRenderNodes,
|
|
872
|
+
slotNodes,
|
|
873
|
+
shadowRootNodes,
|
|
874
|
+
hostElm,
|
|
875
|
+
node.shadowRoot.childNodes[i2],
|
|
876
|
+
hostId,
|
|
877
|
+
slottedNodes
|
|
878
|
+
);
|
|
879
|
+
}
|
|
880
|
+
}
|
|
881
|
+
const nonShadowNodes = node.__childNodes || node.childNodes;
|
|
882
|
+
for (i2 = nonShadowNodes.length - 1; i2 >= 0; i2--) {
|
|
883
|
+
clientHydrate(
|
|
884
|
+
parentVNode,
|
|
885
|
+
childRenderNodes,
|
|
886
|
+
slotNodes,
|
|
887
|
+
shadowRootNodes,
|
|
888
|
+
hostElm,
|
|
889
|
+
nonShadowNodes[i2],
|
|
890
|
+
hostId,
|
|
891
|
+
slottedNodes
|
|
892
|
+
);
|
|
893
|
+
}
|
|
894
|
+
} else if (node.nodeType === 8 /* CommentNode */) {
|
|
895
|
+
childIdSplt = node.nodeValue.split(".");
|
|
896
|
+
if (childIdSplt[1] === hostId || childIdSplt[1] === "0") {
|
|
897
|
+
childNodeType = childIdSplt[0];
|
|
898
|
+
childVNode = createSimpleVNode({
|
|
899
|
+
$hostId$: childIdSplt[1],
|
|
900
|
+
$nodeId$: childIdSplt[2],
|
|
901
|
+
$depth$: childIdSplt[3],
|
|
902
|
+
$index$: childIdSplt[4] || "0",
|
|
903
|
+
$elm$: node,
|
|
904
|
+
$attrs$: null,
|
|
905
|
+
$children$: null,
|
|
906
|
+
$key$: null,
|
|
907
|
+
$name$: null,
|
|
908
|
+
$tag$: null,
|
|
909
|
+
$text$: null
|
|
910
|
+
});
|
|
911
|
+
if (childNodeType === TEXT_NODE_ID) {
|
|
912
|
+
childVNode.$elm$ = findCorrespondingNode(node, 3 /* TextNode */);
|
|
913
|
+
if (childVNode.$elm$ && childVNode.$elm$.nodeType === 3 /* TextNode */) {
|
|
914
|
+
childVNode.$text$ = childVNode.$elm$.textContent;
|
|
915
|
+
childRenderNodes.push(childVNode);
|
|
916
|
+
node.remove();
|
|
917
|
+
if (hostId === childVNode.$hostId$) {
|
|
918
|
+
if (!parentVNode.$children$) {
|
|
919
|
+
parentVNode.$children$ = [];
|
|
920
|
+
}
|
|
921
|
+
parentVNode.$children$[childVNode.$index$] = childVNode;
|
|
922
|
+
}
|
|
923
|
+
if (shadowRootNodes && childVNode.$depth$ === "0") {
|
|
924
|
+
shadowRootNodes[childVNode.$index$] = childVNode.$elm$;
|
|
925
|
+
}
|
|
926
|
+
}
|
|
927
|
+
} else if (childNodeType === COMMENT_NODE_ID) {
|
|
928
|
+
childVNode.$elm$ = findCorrespondingNode(node, 8 /* CommentNode */);
|
|
929
|
+
if (childVNode.$elm$ && childVNode.$elm$.nodeType === 8 /* CommentNode */) {
|
|
930
|
+
childRenderNodes.push(childVNode);
|
|
931
|
+
node.remove();
|
|
932
|
+
}
|
|
933
|
+
} else if (childVNode.$hostId$ === hostId) {
|
|
934
|
+
if (childNodeType === SLOT_NODE_ID) {
|
|
935
|
+
const slotName = node["s-sn"] = childIdSplt[5] || "";
|
|
936
|
+
addSlot(
|
|
937
|
+
slotName,
|
|
938
|
+
childIdSplt[2],
|
|
939
|
+
childVNode,
|
|
940
|
+
node,
|
|
941
|
+
parentVNode,
|
|
942
|
+
childRenderNodes,
|
|
943
|
+
slotNodes,
|
|
944
|
+
shadowRootNodes,
|
|
945
|
+
slottedNodes
|
|
946
|
+
);
|
|
947
|
+
} else if (childNodeType === CONTENT_REF_ID) {
|
|
948
|
+
if (shadowRootNodes) {
|
|
949
|
+
node.remove();
|
|
950
|
+
} else {
|
|
951
|
+
hostElm["s-cr"] = node;
|
|
952
|
+
node["s-cn"] = true;
|
|
953
|
+
}
|
|
954
|
+
}
|
|
955
|
+
}
|
|
956
|
+
}
|
|
957
|
+
} else if (parentVNode && parentVNode.$tag$ === "style") {
|
|
958
|
+
const vnode = newVNode(null, node.textContent);
|
|
959
|
+
vnode.$elm$ = node;
|
|
960
|
+
vnode.$index$ = "0";
|
|
961
|
+
parentVNode.$children$ = [vnode];
|
|
962
|
+
}
|
|
963
|
+
return parentVNode;
|
|
964
|
+
};
|
|
965
|
+
var initializeDocumentHydrate = (node, orgLocNodes) => {
|
|
966
|
+
if (node.nodeType === 1 /* ElementNode */) {
|
|
967
|
+
const componentId = node[HYDRATE_ID] || node.getAttribute(HYDRATE_ID);
|
|
968
|
+
if (componentId) {
|
|
969
|
+
orgLocNodes.set(componentId, node);
|
|
970
|
+
}
|
|
971
|
+
let i2 = 0;
|
|
972
|
+
if (node.shadowRoot) {
|
|
973
|
+
for (; i2 < node.shadowRoot.childNodes.length; i2++) {
|
|
974
|
+
initializeDocumentHydrate(node.shadowRoot.childNodes[i2], orgLocNodes);
|
|
975
|
+
}
|
|
976
|
+
}
|
|
977
|
+
const nonShadowNodes = node.__childNodes || node.childNodes;
|
|
978
|
+
for (i2 = 0; i2 < nonShadowNodes.length; i2++) {
|
|
979
|
+
initializeDocumentHydrate(nonShadowNodes[i2], orgLocNodes);
|
|
980
|
+
}
|
|
981
|
+
} else if (node.nodeType === 8 /* CommentNode */) {
|
|
982
|
+
const childIdSplt = node.nodeValue.split(".");
|
|
983
|
+
if (childIdSplt[0] === ORG_LOCATION_ID) {
|
|
984
|
+
orgLocNodes.set(childIdSplt[1] + "." + childIdSplt[2], node);
|
|
985
|
+
node.nodeValue = "";
|
|
986
|
+
node["s-en"] = childIdSplt[3];
|
|
987
|
+
}
|
|
988
|
+
}
|
|
989
|
+
};
|
|
990
|
+
var createSimpleVNode = (vnode) => {
|
|
991
|
+
const defaultVNode = {
|
|
992
|
+
$flags$: 0,
|
|
993
|
+
$hostId$: null,
|
|
994
|
+
$nodeId$: null,
|
|
995
|
+
$depth$: null,
|
|
996
|
+
$index$: "0",
|
|
997
|
+
$elm$: null,
|
|
998
|
+
$attrs$: null,
|
|
999
|
+
$children$: null,
|
|
1000
|
+
$key$: null,
|
|
1001
|
+
$name$: null,
|
|
1002
|
+
$tag$: null,
|
|
1003
|
+
$text$: null
|
|
1004
|
+
};
|
|
1005
|
+
return { ...defaultVNode, ...vnode };
|
|
1006
|
+
};
|
|
1007
|
+
function addSlot(slotName, slotId, childVNode, node, parentVNode, childRenderNodes, slotNodes, shadowRootNodes, slottedNodes) {
|
|
1008
|
+
node["s-sr"] = true;
|
|
1009
|
+
childVNode.$name$ = slotName || null;
|
|
1010
|
+
childVNode.$tag$ = "slot";
|
|
1011
|
+
const parentNodeId = (parentVNode == null ? void 0 : parentVNode.$elm$) ? parentVNode.$elm$["s-id"] || parentVNode.$elm$.getAttribute("s-id") : "";
|
|
1012
|
+
if (shadowRootNodes && win.document) {
|
|
1013
|
+
const slot = childVNode.$elm$ = win.document.createElement(childVNode.$tag$);
|
|
1014
|
+
if (childVNode.$name$) {
|
|
1015
|
+
childVNode.$elm$.setAttribute("name", slotName);
|
|
1016
|
+
}
|
|
1017
|
+
if (parentVNode.$elm$.shadowRoot && parentNodeId && parentNodeId !== childVNode.$hostId$) {
|
|
1018
|
+
internalCall(parentVNode.$elm$, "insertBefore")(slot, internalCall(parentVNode.$elm$, "children")[0]);
|
|
1019
|
+
} else {
|
|
1020
|
+
internalCall(internalCall(node, "parentNode"), "insertBefore")(slot, node);
|
|
1021
|
+
}
|
|
1022
|
+
addSlottedNodes(slottedNodes, slotId, slotName, node, childVNode.$hostId$);
|
|
1023
|
+
node.remove();
|
|
1024
|
+
if (childVNode.$depth$ === "0") {
|
|
1025
|
+
shadowRootNodes[childVNode.$index$] = childVNode.$elm$;
|
|
1026
|
+
}
|
|
1027
|
+
} else {
|
|
1028
|
+
const slot = childVNode.$elm$;
|
|
1029
|
+
const shouldMove = parentNodeId && parentNodeId !== childVNode.$hostId$ && parentVNode.$elm$.shadowRoot;
|
|
1030
|
+
addSlottedNodes(slottedNodes, slotId, slotName, node, shouldMove ? parentNodeId : childVNode.$hostId$);
|
|
1031
|
+
patchSlotNode(node);
|
|
1032
|
+
if (shouldMove) {
|
|
1033
|
+
parentVNode.$elm$.insertBefore(slot, parentVNode.$elm$.children[0]);
|
|
1034
|
+
}
|
|
1035
|
+
}
|
|
1036
|
+
childRenderNodes.push(childVNode);
|
|
1037
|
+
slotNodes.push(childVNode);
|
|
1038
|
+
if (!parentVNode.$children$) {
|
|
1039
|
+
parentVNode.$children$ = [];
|
|
1040
|
+
}
|
|
1041
|
+
parentVNode.$children$[childVNode.$index$] = childVNode;
|
|
1042
|
+
}
|
|
1043
|
+
var addSlottedNodes = (slottedNodes, slotNodeId, slotName, slotNode, hostId) => {
|
|
1044
|
+
var _a, _b;
|
|
1045
|
+
let slottedNode = slotNode.nextSibling;
|
|
1046
|
+
slottedNodes[slotNodeId] = slottedNodes[slotNodeId] || [];
|
|
1047
|
+
if (!slottedNode || ((_a = slottedNode.nodeValue) == null ? void 0 : _a.startsWith(SLOT_NODE_ID + "."))) return;
|
|
1048
|
+
do {
|
|
1049
|
+
if (slottedNode && ((slottedNode["getAttribute"] && slottedNode.getAttribute("slot") || slottedNode["s-sn"]) === slotName || slotName === "" && !slottedNode["s-sn"] && (!slottedNode["getAttribute"] || !slottedNode.getAttribute("slot")) && (slottedNode.nodeType === 8 /* CommentNode */ || slottedNode.nodeType === 3 /* TextNode */))) {
|
|
1050
|
+
slottedNode["s-sn"] = slotName;
|
|
1051
|
+
slottedNodes[slotNodeId].push({ slot: slotNode, node: slottedNode, hostId });
|
|
1052
|
+
}
|
|
1053
|
+
slottedNode = slottedNode == null ? void 0 : slottedNode.nextSibling;
|
|
1054
|
+
} while (slottedNode && !((_b = slottedNode.nodeValue) == null ? void 0 : _b.startsWith(SLOT_NODE_ID + ".")));
|
|
1055
|
+
};
|
|
1056
|
+
var findCorrespondingNode = (node, type) => {
|
|
1057
|
+
let sibling = node;
|
|
1058
|
+
do {
|
|
1059
|
+
sibling = sibling.nextSibling;
|
|
1060
|
+
} while (sibling && (sibling.nodeType !== type || !sibling.nodeValue));
|
|
1061
|
+
return sibling;
|
|
1062
|
+
};
|
|
1063
|
+
|
|
1064
|
+
// src/utils/remote-value.ts
|
|
1065
|
+
var RemoteValue = class _RemoteValue {
|
|
1066
|
+
/**
|
|
1067
|
+
* Deserializes a LocalValue serialized object back to its original JavaScript representation
|
|
1068
|
+
*
|
|
1069
|
+
* @param serialized The serialized LocalValue object
|
|
1070
|
+
* @returns The original JavaScript value/object
|
|
1071
|
+
*/
|
|
1072
|
+
static fromLocalValue(serialized) {
|
|
1073
|
+
const type = serialized[TYPE_CONSTANT];
|
|
1074
|
+
const value = VALUE_CONSTANT in serialized ? serialized[VALUE_CONSTANT] : void 0;
|
|
1075
|
+
switch (type) {
|
|
1076
|
+
case "string" /* String */:
|
|
1077
|
+
return value;
|
|
1078
|
+
case "boolean" /* Boolean */:
|
|
1079
|
+
return value;
|
|
1080
|
+
case "bigint" /* BigInt */:
|
|
1081
|
+
return BigInt(value);
|
|
1082
|
+
case "undefined" /* Undefined */:
|
|
1083
|
+
return void 0;
|
|
1084
|
+
case "null" /* Null */:
|
|
1085
|
+
return null;
|
|
1086
|
+
case "number" /* Number */:
|
|
1087
|
+
if (value === "NaN") return NaN;
|
|
1088
|
+
if (value === "-0") return -0;
|
|
1089
|
+
if (value === "Infinity") return Infinity;
|
|
1090
|
+
if (value === "-Infinity") return -Infinity;
|
|
1091
|
+
return value;
|
|
1092
|
+
case "array" /* Array */:
|
|
1093
|
+
return value.map((item) => _RemoteValue.fromLocalValue(item));
|
|
1094
|
+
case "date" /* Date */:
|
|
1095
|
+
return new Date(value);
|
|
1096
|
+
case "map" /* Map */:
|
|
1097
|
+
const map = /* @__PURE__ */ new Map();
|
|
1098
|
+
for (const [key, val] of value) {
|
|
1099
|
+
const deserializedKey = typeof key === "object" && key !== null ? _RemoteValue.fromLocalValue(key) : key;
|
|
1100
|
+
const deserializedValue = _RemoteValue.fromLocalValue(val);
|
|
1101
|
+
map.set(deserializedKey, deserializedValue);
|
|
1102
|
+
}
|
|
1103
|
+
return map;
|
|
1104
|
+
case "object" /* Object */:
|
|
1105
|
+
const obj = {};
|
|
1106
|
+
for (const [key, val] of value) {
|
|
1107
|
+
obj[key] = _RemoteValue.fromLocalValue(val);
|
|
1108
|
+
}
|
|
1109
|
+
return obj;
|
|
1110
|
+
case "regexp" /* RegularExpression */:
|
|
1111
|
+
const { pattern, flags } = value;
|
|
1112
|
+
return new RegExp(pattern, flags);
|
|
1113
|
+
case "set" /* Set */:
|
|
1114
|
+
const set = /* @__PURE__ */ new Set();
|
|
1115
|
+
for (const item of value) {
|
|
1116
|
+
set.add(_RemoteValue.fromLocalValue(item));
|
|
1117
|
+
}
|
|
1118
|
+
return set;
|
|
1119
|
+
case "symbol" /* Symbol */:
|
|
1120
|
+
return Symbol(value);
|
|
1121
|
+
default:
|
|
1122
|
+
throw new Error(`Unsupported type: ${type}`);
|
|
1123
|
+
}
|
|
1124
|
+
}
|
|
1125
|
+
/**
|
|
1126
|
+
* Utility method to deserialize multiple LocalValues at once
|
|
1127
|
+
*
|
|
1128
|
+
* @param serializedValues Array of serialized LocalValue objects
|
|
1129
|
+
* @returns Array of deserialized JavaScript values
|
|
1130
|
+
*/
|
|
1131
|
+
static fromLocalValueArray(serializedValues) {
|
|
1132
|
+
return serializedValues.map((value) => _RemoteValue.fromLocalValue(value));
|
|
1133
|
+
}
|
|
1134
|
+
/**
|
|
1135
|
+
* Verifies if the given object matches the structure of a serialized LocalValue
|
|
1136
|
+
*
|
|
1137
|
+
* @param obj Object to verify
|
|
1138
|
+
* @returns boolean indicating if the object has LocalValue structure
|
|
1139
|
+
*/
|
|
1140
|
+
static isLocalValueObject(obj) {
|
|
1141
|
+
if (typeof obj !== "object" || obj === null) {
|
|
1142
|
+
return false;
|
|
1143
|
+
}
|
|
1144
|
+
if (!obj.hasOwnProperty(TYPE_CONSTANT)) {
|
|
1145
|
+
return false;
|
|
1146
|
+
}
|
|
1147
|
+
const type = obj[TYPE_CONSTANT];
|
|
1148
|
+
const hasTypeProperty = Object.values({ ...PrimitiveType, ...NonPrimitiveType }).includes(type);
|
|
1149
|
+
if (!hasTypeProperty) {
|
|
1150
|
+
return false;
|
|
1151
|
+
}
|
|
1152
|
+
if (type !== "null" /* Null */ && type !== "undefined" /* Undefined */) {
|
|
1153
|
+
return obj.hasOwnProperty(VALUE_CONSTANT);
|
|
1154
|
+
}
|
|
1155
|
+
return true;
|
|
1156
|
+
}
|
|
1157
|
+
};
|
|
1158
|
+
|
|
1159
|
+
// src/utils/serialize.ts
|
|
1160
|
+
function deserializeProperty(value) {
|
|
1161
|
+
if (typeof value !== "string" || !value.startsWith(SERIALIZED_PREFIX)) {
|
|
1162
|
+
return value;
|
|
1163
|
+
}
|
|
1164
|
+
return RemoteValue.fromLocalValue(JSON.parse(atob(value.slice(SERIALIZED_PREFIX.length))));
|
|
1165
|
+
}
|
|
1166
|
+
|
|
460
1167
|
// src/runtime/parse-property-value.ts
|
|
461
1168
|
var parsePropertyValue = (propValue, propType, isFormAssociated) => {
|
|
1169
|
+
if (typeof propValue === "string" && propValue.startsWith(SERIALIZED_PREFIX)) {
|
|
1170
|
+
propValue = deserializeProperty(propValue);
|
|
1171
|
+
return propValue;
|
|
1172
|
+
}
|
|
462
1173
|
if (propValue != null && !isComplexType(propValue)) {
|
|
463
1174
|
if (propType & 4 /* Boolean */) {
|
|
464
1175
|
if (isFormAssociated && typeof propValue === "string") {
|
|
@@ -511,7 +1222,15 @@ var setAccessor = (elm, memberName, oldValue, newValue, isSvg, flags, initialRen
|
|
|
511
1222
|
const classList = elm.classList;
|
|
512
1223
|
const oldClasses = parseClassList(oldValue);
|
|
513
1224
|
let newClasses = parseClassList(newValue);
|
|
514
|
-
{
|
|
1225
|
+
if ((elm["s-si"] || elm["s-sc"]) && initialRender) {
|
|
1226
|
+
const scopeId2 = elm["s-sc"] || elm["s-si"];
|
|
1227
|
+
newClasses.push(scopeId2);
|
|
1228
|
+
oldClasses.forEach((c) => {
|
|
1229
|
+
if (c.startsWith(scopeId2)) newClasses.push(c);
|
|
1230
|
+
});
|
|
1231
|
+
newClasses = [...new Set(newClasses)].filter((c) => c);
|
|
1232
|
+
classList.add(...newClasses);
|
|
1233
|
+
} else {
|
|
515
1234
|
classList.remove(...oldClasses.filter((c) => c && !newClasses.includes(c)));
|
|
516
1235
|
classList.add(...newClasses.filter((c) => c && !oldClasses.includes(c)));
|
|
517
1236
|
}
|
|
@@ -650,7 +1369,9 @@ var updateElement = (oldVnode, newVnode, isSvgMode2, isInitialRender) => {
|
|
|
650
1369
|
oldVnodeAttrs[memberName],
|
|
651
1370
|
void 0,
|
|
652
1371
|
isSvgMode2,
|
|
653
|
-
newVnode.$flags
|
|
1372
|
+
newVnode.$flags$,
|
|
1373
|
+
isInitialRender
|
|
1374
|
+
);
|
|
654
1375
|
}
|
|
655
1376
|
}
|
|
656
1377
|
}
|
|
@@ -661,7 +1382,9 @@ var updateElement = (oldVnode, newVnode, isSvgMode2, isInitialRender) => {
|
|
|
661
1382
|
oldVnodeAttrs[memberName],
|
|
662
1383
|
newVnodeAttrs[memberName],
|
|
663
1384
|
isSvgMode2,
|
|
664
|
-
newVnode.$flags
|
|
1385
|
+
newVnode.$flags$,
|
|
1386
|
+
isInitialRender
|
|
1387
|
+
);
|
|
665
1388
|
}
|
|
666
1389
|
};
|
|
667
1390
|
function sortedAttrNames(attrNames) {
|
|
@@ -673,18 +1396,43 @@ function sortedAttrNames(attrNames) {
|
|
|
673
1396
|
attrNames
|
|
674
1397
|
);
|
|
675
1398
|
}
|
|
1399
|
+
var contentRef;
|
|
676
1400
|
var hostTagName;
|
|
677
1401
|
var useNativeShadowDom = false;
|
|
1402
|
+
var checkSlotFallbackVisibility = false;
|
|
1403
|
+
var checkSlotRelocate = false;
|
|
678
1404
|
var isSvgMode = false;
|
|
679
1405
|
var refCallbacksToRemove = [];
|
|
680
1406
|
var refCallbacksToAttach = [];
|
|
681
1407
|
var createElm = (oldParentVNode, newParentVNode, childIndex) => {
|
|
1408
|
+
var _a;
|
|
682
1409
|
const newVNode2 = newParentVNode.$children$[childIndex];
|
|
683
1410
|
let i2 = 0;
|
|
684
1411
|
let elm;
|
|
685
1412
|
let childNode;
|
|
1413
|
+
let oldVNode;
|
|
1414
|
+
if (!useNativeShadowDom) {
|
|
1415
|
+
checkSlotRelocate = true;
|
|
1416
|
+
if (newVNode2.$tag$ === "slot") {
|
|
1417
|
+
newVNode2.$flags$ |= newVNode2.$children$ ? (
|
|
1418
|
+
// slot element has fallback content
|
|
1419
|
+
// still create an element that "mocks" the slot element
|
|
1420
|
+
2 /* isSlotFallback */
|
|
1421
|
+
) : (
|
|
1422
|
+
// slot element does not have fallback content
|
|
1423
|
+
// create an html comment we'll use to always reference
|
|
1424
|
+
// where actual slot content should sit next to
|
|
1425
|
+
1 /* isSlotReference */
|
|
1426
|
+
);
|
|
1427
|
+
}
|
|
1428
|
+
}
|
|
686
1429
|
if (newVNode2.$text$ != null) {
|
|
687
1430
|
elm = newVNode2.$elm$ = win.document.createTextNode(newVNode2.$text$);
|
|
1431
|
+
} else if (newVNode2.$flags$ & 1 /* isSlotReference */) {
|
|
1432
|
+
elm = newVNode2.$elm$ = win.document.createTextNode("");
|
|
1433
|
+
{
|
|
1434
|
+
updateElement(null, newVNode2, isSvgMode);
|
|
1435
|
+
}
|
|
688
1436
|
} else {
|
|
689
1437
|
if (!isSvgMode) {
|
|
690
1438
|
isSvgMode = newVNode2.$tag$ === "svg";
|
|
@@ -694,7 +1442,7 @@ var createElm = (oldParentVNode, newParentVNode, childIndex) => {
|
|
|
694
1442
|
}
|
|
695
1443
|
elm = newVNode2.$elm$ = win.document.createElementNS(
|
|
696
1444
|
isSvgMode ? SVG_NS : HTML_NS,
|
|
697
|
-
newVNode2.$tag$
|
|
1445
|
+
!useNativeShadowDom && BUILD.slotRelocation && newVNode2.$flags$ & 2 /* isSlotFallback */ ? "slot-fb" : newVNode2.$tag$
|
|
698
1446
|
) ;
|
|
699
1447
|
if (isSvgMode && newVNode2.$tag$ === "foreignObject") {
|
|
700
1448
|
isSvgMode = false;
|
|
@@ -720,6 +1468,19 @@ var createElm = (oldParentVNode, newParentVNode, childIndex) => {
|
|
|
720
1468
|
}
|
|
721
1469
|
}
|
|
722
1470
|
elm["s-hn"] = hostTagName;
|
|
1471
|
+
{
|
|
1472
|
+
if (newVNode2.$flags$ & (2 /* isSlotFallback */ | 1 /* isSlotReference */)) {
|
|
1473
|
+
elm["s-sr"] = true;
|
|
1474
|
+
elm["s-cr"] = contentRef;
|
|
1475
|
+
elm["s-sn"] = newVNode2.$name$ || "";
|
|
1476
|
+
elm["s-rf"] = (_a = newVNode2.$attrs$) == null ? void 0 : _a.ref;
|
|
1477
|
+
patchSlotNode(elm);
|
|
1478
|
+
oldVNode = oldParentVNode && oldParentVNode.$children$ && oldParentVNode.$children$[childIndex];
|
|
1479
|
+
if (oldVNode && oldVNode.$tag$ === newVNode2.$tag$ && oldParentVNode.$elm$) {
|
|
1480
|
+
relocateToHostRoot(oldParentVNode.$elm$);
|
|
1481
|
+
}
|
|
1482
|
+
}
|
|
1483
|
+
}
|
|
723
1484
|
return elm;
|
|
724
1485
|
};
|
|
725
1486
|
var relocateToHostRoot = (parentElm) => {
|
|
@@ -736,13 +1497,40 @@ var relocateToHostRoot = (parentElm) => {
|
|
|
736
1497
|
if (childNode["s-sh"] != null) {
|
|
737
1498
|
insertBefore(host, childNode, contentRefNode != null ? contentRefNode : null);
|
|
738
1499
|
childNode["s-sh"] = void 0;
|
|
1500
|
+
checkSlotRelocate = true;
|
|
1501
|
+
}
|
|
1502
|
+
}
|
|
1503
|
+
}
|
|
1504
|
+
plt.$flags$ &= -2 /* isTmpDisconnected */;
|
|
1505
|
+
};
|
|
1506
|
+
var putBackInOriginalLocation = (parentElm, recursive) => {
|
|
1507
|
+
plt.$flags$ |= 1 /* isTmpDisconnected */;
|
|
1508
|
+
const oldSlotChildNodes = Array.from(parentElm.__childNodes || parentElm.childNodes);
|
|
1509
|
+
if (parentElm["s-sr"]) {
|
|
1510
|
+
let node = parentElm;
|
|
1511
|
+
while (node = node.nextSibling) {
|
|
1512
|
+
if (node && node["s-sn"] === parentElm["s-sn"] && node["s-sh"] === hostTagName) {
|
|
1513
|
+
oldSlotChildNodes.push(node);
|
|
739
1514
|
}
|
|
740
1515
|
}
|
|
741
1516
|
}
|
|
1517
|
+
for (let i2 = oldSlotChildNodes.length - 1; i2 >= 0; i2--) {
|
|
1518
|
+
const childNode = oldSlotChildNodes[i2];
|
|
1519
|
+
if (childNode["s-hn"] !== hostTagName && childNode["s-ol"]) {
|
|
1520
|
+
insertBefore(referenceNode(childNode).parentNode, childNode, referenceNode(childNode));
|
|
1521
|
+
childNode["s-ol"].remove();
|
|
1522
|
+
childNode["s-ol"] = void 0;
|
|
1523
|
+
childNode["s-sh"] = void 0;
|
|
1524
|
+
checkSlotRelocate = true;
|
|
1525
|
+
}
|
|
1526
|
+
if (recursive) {
|
|
1527
|
+
putBackInOriginalLocation(childNode, recursive);
|
|
1528
|
+
}
|
|
1529
|
+
}
|
|
742
1530
|
plt.$flags$ &= -2 /* isTmpDisconnected */;
|
|
743
1531
|
};
|
|
744
1532
|
var addVnodes = (parentElm, before, parentVNode, vnodes, startIdx, endIdx) => {
|
|
745
|
-
let containerElm = parentElm;
|
|
1533
|
+
let containerElm = parentElm["s-cr"] && parentElm["s-cr"].parentNode || parentElm;
|
|
746
1534
|
let childNode;
|
|
747
1535
|
if (containerElm.shadowRoot && containerElm.tagName === hostTagName) {
|
|
748
1536
|
containerElm = containerElm.shadowRoot;
|
|
@@ -755,7 +1543,7 @@ var addVnodes = (parentElm, before, parentVNode, vnodes, startIdx, endIdx) => {
|
|
|
755
1543
|
childNode = createElm(null, parentVNode, startIdx);
|
|
756
1544
|
if (childNode) {
|
|
757
1545
|
vnodes[startIdx].$elm$ = childNode;
|
|
758
|
-
insertBefore(containerElm, childNode, before);
|
|
1546
|
+
insertBefore(containerElm, childNode, referenceNode(before) );
|
|
759
1547
|
}
|
|
760
1548
|
}
|
|
761
1549
|
}
|
|
@@ -767,6 +1555,14 @@ var removeVnodes = (vnodes, startIdx, endIdx) => {
|
|
|
767
1555
|
const elm = vnode.$elm$;
|
|
768
1556
|
nullifyVNodeRefs(vnode);
|
|
769
1557
|
if (elm) {
|
|
1558
|
+
{
|
|
1559
|
+
checkSlotFallbackVisibility = true;
|
|
1560
|
+
if (elm["s-ol"]) {
|
|
1561
|
+
elm["s-ol"].remove();
|
|
1562
|
+
} else {
|
|
1563
|
+
putBackInOriginalLocation(elm, true);
|
|
1564
|
+
}
|
|
1565
|
+
}
|
|
770
1566
|
elm.remove();
|
|
771
1567
|
}
|
|
772
1568
|
}
|
|
@@ -804,11 +1600,17 @@ var updateChildren = (parentElm, oldCh, newVNode2, newCh, isInitialRender = fals
|
|
|
804
1600
|
oldEndVnode = oldCh[--oldEndIdx];
|
|
805
1601
|
newEndVnode = newCh[--newEndIdx];
|
|
806
1602
|
} else if (isSameVnode(oldStartVnode, newEndVnode, isInitialRender)) {
|
|
1603
|
+
if ((oldStartVnode.$tag$ === "slot" || newEndVnode.$tag$ === "slot")) {
|
|
1604
|
+
putBackInOriginalLocation(oldStartVnode.$elm$.parentNode, false);
|
|
1605
|
+
}
|
|
807
1606
|
patch(oldStartVnode, newEndVnode, isInitialRender);
|
|
808
1607
|
insertBefore(containerElm, oldStartVnode.$elm$, oldEndVnode.$elm$.nextSibling);
|
|
809
1608
|
oldStartVnode = oldCh[++oldStartIdx];
|
|
810
1609
|
newEndVnode = newCh[--newEndIdx];
|
|
811
1610
|
} else if (isSameVnode(oldEndVnode, newStartVnode, isInitialRender)) {
|
|
1611
|
+
if ((oldStartVnode.$tag$ === "slot" || newEndVnode.$tag$ === "slot")) {
|
|
1612
|
+
putBackInOriginalLocation(oldEndVnode.$elm$.parentNode, false);
|
|
1613
|
+
}
|
|
812
1614
|
patch(oldEndVnode, newStartVnode, isInitialRender);
|
|
813
1615
|
insertBefore(containerElm, oldEndVnode.$elm$, oldStartVnode.$elm$);
|
|
814
1616
|
oldEndVnode = oldCh[--oldEndIdx];
|
|
@@ -839,7 +1641,11 @@ var updateChildren = (parentElm, oldCh, newVNode2, newCh, isInitialRender = fals
|
|
|
839
1641
|
}
|
|
840
1642
|
if (node) {
|
|
841
1643
|
{
|
|
842
|
-
insertBefore(
|
|
1644
|
+
insertBefore(
|
|
1645
|
+
referenceNode(oldStartVnode.$elm$).parentNode,
|
|
1646
|
+
node,
|
|
1647
|
+
referenceNode(oldStartVnode.$elm$)
|
|
1648
|
+
);
|
|
843
1649
|
}
|
|
844
1650
|
}
|
|
845
1651
|
}
|
|
@@ -859,6 +1665,9 @@ var updateChildren = (parentElm, oldCh, newVNode2, newCh, isInitialRender = fals
|
|
|
859
1665
|
};
|
|
860
1666
|
var isSameVnode = (leftVNode, rightVNode, isInitialRender = false) => {
|
|
861
1667
|
if (leftVNode.$tag$ === rightVNode.$tag$) {
|
|
1668
|
+
if (leftVNode.$tag$ === "slot") {
|
|
1669
|
+
return leftVNode.$name$ === rightVNode.$name$;
|
|
1670
|
+
}
|
|
862
1671
|
if (!isInitialRender) {
|
|
863
1672
|
return leftVNode.$key$ === rightVNode.$key$;
|
|
864
1673
|
}
|
|
@@ -869,12 +1678,14 @@ var isSameVnode = (leftVNode, rightVNode, isInitialRender = false) => {
|
|
|
869
1678
|
}
|
|
870
1679
|
return false;
|
|
871
1680
|
};
|
|
1681
|
+
var referenceNode = (node) => node && node["s-ol"] || node;
|
|
872
1682
|
var patch = (oldVNode, newVNode2, isInitialRender = false) => {
|
|
873
1683
|
const elm = newVNode2.$elm$ = oldVNode.$elm$;
|
|
874
1684
|
const oldChildren = oldVNode.$children$;
|
|
875
1685
|
const newChildren = newVNode2.$children$;
|
|
876
1686
|
const tag = newVNode2.$tag$;
|
|
877
1687
|
const text = newVNode2.$text$;
|
|
1688
|
+
let defaultHolder;
|
|
878
1689
|
if (text == null) {
|
|
879
1690
|
{
|
|
880
1691
|
isSvgMode = tag === "svg" ? true : tag === "foreignObject" ? false : isSvgMode;
|
|
@@ -886,7 +1697,7 @@ var patch = (oldVNode, newVNode2, isInitialRender = false) => {
|
|
|
886
1697
|
relocateToHostRoot(newVNode2.$elm$.parentElement);
|
|
887
1698
|
}
|
|
888
1699
|
}
|
|
889
|
-
updateElement(oldVNode, newVNode2, isSvgMode);
|
|
1700
|
+
updateElement(oldVNode, newVNode2, isSvgMode, isInitialRender);
|
|
890
1701
|
}
|
|
891
1702
|
if (oldChildren !== null && newChildren !== null) {
|
|
892
1703
|
updateChildren(elm, oldChildren, newVNode2, newChildren, isInitialRender);
|
|
@@ -900,14 +1711,68 @@ var patch = (oldVNode, newVNode2, isInitialRender = false) => {
|
|
|
900
1711
|
!isInitialRender && BUILD.updatable && oldChildren !== null
|
|
901
1712
|
) {
|
|
902
1713
|
removeVnodes(oldChildren, 0, oldChildren.length - 1);
|
|
903
|
-
} else
|
|
1714
|
+
} else if (isInitialRender && BUILD.updatable && oldChildren !== null && newChildren === null) {
|
|
1715
|
+
newVNode2.$children$ = oldChildren;
|
|
1716
|
+
}
|
|
904
1717
|
if (isSvgMode && tag === "svg") {
|
|
905
1718
|
isSvgMode = false;
|
|
906
1719
|
}
|
|
1720
|
+
} else if ((defaultHolder = elm["s-cr"])) {
|
|
1721
|
+
defaultHolder.parentNode.textContent = text;
|
|
907
1722
|
} else if (oldVNode.$text$ !== text) {
|
|
908
1723
|
elm.data = text;
|
|
909
1724
|
}
|
|
910
1725
|
};
|
|
1726
|
+
var relocateNodes = [];
|
|
1727
|
+
var markSlotContentForRelocation = (elm) => {
|
|
1728
|
+
let node;
|
|
1729
|
+
let hostContentNodes;
|
|
1730
|
+
let j;
|
|
1731
|
+
const children = elm.__childNodes || elm.childNodes;
|
|
1732
|
+
for (const childNode of children) {
|
|
1733
|
+
if (childNode["s-sr"] && (node = childNode["s-cr"]) && node.parentNode) {
|
|
1734
|
+
hostContentNodes = node.parentNode.__childNodes || node.parentNode.childNodes;
|
|
1735
|
+
const slotName = childNode["s-sn"];
|
|
1736
|
+
for (j = hostContentNodes.length - 1; j >= 0; j--) {
|
|
1737
|
+
node = hostContentNodes[j];
|
|
1738
|
+
if (!node["s-cn"] && !node["s-nr"] && node["s-hn"] !== childNode["s-hn"] && (!node["s-sh"] || node["s-sh"] !== childNode["s-hn"])) {
|
|
1739
|
+
if (isNodeLocatedInSlot(node, slotName)) {
|
|
1740
|
+
let relocateNodeData = relocateNodes.find((r) => r.$nodeToRelocate$ === node);
|
|
1741
|
+
checkSlotFallbackVisibility = true;
|
|
1742
|
+
node["s-sn"] = node["s-sn"] || slotName;
|
|
1743
|
+
if (relocateNodeData) {
|
|
1744
|
+
relocateNodeData.$nodeToRelocate$["s-sh"] = childNode["s-hn"];
|
|
1745
|
+
relocateNodeData.$slotRefNode$ = childNode;
|
|
1746
|
+
} else {
|
|
1747
|
+
node["s-sh"] = childNode["s-hn"];
|
|
1748
|
+
relocateNodes.push({
|
|
1749
|
+
$slotRefNode$: childNode,
|
|
1750
|
+
$nodeToRelocate$: node
|
|
1751
|
+
});
|
|
1752
|
+
}
|
|
1753
|
+
if (node["s-sr"]) {
|
|
1754
|
+
relocateNodes.map((relocateNode) => {
|
|
1755
|
+
if (isNodeLocatedInSlot(relocateNode.$nodeToRelocate$, node["s-sn"])) {
|
|
1756
|
+
relocateNodeData = relocateNodes.find((r) => r.$nodeToRelocate$ === node);
|
|
1757
|
+
if (relocateNodeData && !relocateNode.$slotRefNode$) {
|
|
1758
|
+
relocateNode.$slotRefNode$ = relocateNodeData.$slotRefNode$;
|
|
1759
|
+
}
|
|
1760
|
+
}
|
|
1761
|
+
});
|
|
1762
|
+
}
|
|
1763
|
+
} else if (!relocateNodes.some((r) => r.$nodeToRelocate$ === node)) {
|
|
1764
|
+
relocateNodes.push({
|
|
1765
|
+
$nodeToRelocate$: node
|
|
1766
|
+
});
|
|
1767
|
+
}
|
|
1768
|
+
}
|
|
1769
|
+
}
|
|
1770
|
+
}
|
|
1771
|
+
if (childNode.nodeType === 1 /* ElementNode */) {
|
|
1772
|
+
markSlotContentForRelocation(childNode);
|
|
1773
|
+
}
|
|
1774
|
+
}
|
|
1775
|
+
};
|
|
911
1776
|
var nullifyVNodeRefs = (vNode) => {
|
|
912
1777
|
{
|
|
913
1778
|
if (vNode.$attrs$ && vNode.$attrs$.ref) {
|
|
@@ -930,6 +1795,14 @@ var flushQueuedRefCallbacks = () => {
|
|
|
930
1795
|
}
|
|
931
1796
|
};
|
|
932
1797
|
var insertBefore = (parent, newNode, reference, isInitialLoad) => {
|
|
1798
|
+
{
|
|
1799
|
+
if (typeof newNode["s-sn"] === "string") {
|
|
1800
|
+
parent.insertBefore(newNode, reference);
|
|
1801
|
+
const { slotNode } = findSlotFromSlottedNode(newNode);
|
|
1802
|
+
if (slotNode && !isInitialLoad) dispatchSlotChangeEvent(slotNode);
|
|
1803
|
+
return newNode;
|
|
1804
|
+
}
|
|
1805
|
+
}
|
|
933
1806
|
if (parent.__insertBefore) {
|
|
934
1807
|
return parent.__insertBefore(newNode, reference);
|
|
935
1808
|
} else {
|
|
@@ -937,6 +1810,7 @@ var insertBefore = (parent, newNode, reference, isInitialLoad) => {
|
|
|
937
1810
|
}
|
|
938
1811
|
};
|
|
939
1812
|
var renderVdom = (hostRef, renderFnResults, isInitialLoad = false) => {
|
|
1813
|
+
var _a, _b, _c, _d, _e;
|
|
940
1814
|
const hostElm = hostRef.$hostElement$;
|
|
941
1815
|
const cmpMeta = hostRef.$cmpMeta$;
|
|
942
1816
|
const oldVNode = hostRef.$vnode$ || newVNode(null, null);
|
|
@@ -963,7 +1837,106 @@ var renderVdom = (hostRef, renderFnResults, isInitialLoad = false) => {
|
|
|
963
1837
|
hostRef.$vnode$ = rootVnode;
|
|
964
1838
|
rootVnode.$elm$ = oldVNode.$elm$ = hostElm.shadowRoot || hostElm ;
|
|
965
1839
|
useNativeShadowDom = !!(cmpMeta.$flags$ & 1 /* shadowDomEncapsulation */) && !(cmpMeta.$flags$ & 128 /* shadowNeedsScopedCss */);
|
|
1840
|
+
{
|
|
1841
|
+
contentRef = hostElm["s-cr"];
|
|
1842
|
+
checkSlotFallbackVisibility = false;
|
|
1843
|
+
}
|
|
966
1844
|
patch(oldVNode, rootVnode, isInitialLoad);
|
|
1845
|
+
{
|
|
1846
|
+
plt.$flags$ |= 1 /* isTmpDisconnected */;
|
|
1847
|
+
if (checkSlotRelocate) {
|
|
1848
|
+
markSlotContentForRelocation(rootVnode.$elm$);
|
|
1849
|
+
for (const relocateData of relocateNodes) {
|
|
1850
|
+
const nodeToRelocate = relocateData.$nodeToRelocate$;
|
|
1851
|
+
if (!nodeToRelocate["s-ol"] && win.document) {
|
|
1852
|
+
const orgLocationNode = win.document.createTextNode("");
|
|
1853
|
+
orgLocationNode["s-nr"] = nodeToRelocate;
|
|
1854
|
+
insertBefore(
|
|
1855
|
+
nodeToRelocate.parentNode,
|
|
1856
|
+
nodeToRelocate["s-ol"] = orgLocationNode,
|
|
1857
|
+
nodeToRelocate,
|
|
1858
|
+
isInitialLoad
|
|
1859
|
+
);
|
|
1860
|
+
}
|
|
1861
|
+
}
|
|
1862
|
+
for (const relocateData of relocateNodes) {
|
|
1863
|
+
const nodeToRelocate = relocateData.$nodeToRelocate$;
|
|
1864
|
+
const slotRefNode = relocateData.$slotRefNode$;
|
|
1865
|
+
if (nodeToRelocate.nodeType === 1 /* ElementNode */ && isInitialLoad) {
|
|
1866
|
+
nodeToRelocate["s-ih"] = (_a = nodeToRelocate.hidden) != null ? _a : false;
|
|
1867
|
+
}
|
|
1868
|
+
if (slotRefNode) {
|
|
1869
|
+
const parentNodeRef = slotRefNode.parentNode;
|
|
1870
|
+
let insertBeforeNode = slotRefNode.nextSibling;
|
|
1871
|
+
if (insertBeforeNode && insertBeforeNode.nodeType === 1 /* ElementNode */) {
|
|
1872
|
+
let orgLocationNode = (_b = nodeToRelocate["s-ol"]) == null ? void 0 : _b.previousSibling;
|
|
1873
|
+
while (orgLocationNode) {
|
|
1874
|
+
let refNode = (_c = orgLocationNode["s-nr"]) != null ? _c : null;
|
|
1875
|
+
if (refNode && refNode["s-sn"] === nodeToRelocate["s-sn"] && parentNodeRef === (refNode.__parentNode || refNode.parentNode)) {
|
|
1876
|
+
refNode = refNode.nextSibling;
|
|
1877
|
+
while (refNode === nodeToRelocate || (refNode == null ? void 0 : refNode["s-sr"])) {
|
|
1878
|
+
refNode = refNode == null ? void 0 : refNode.nextSibling;
|
|
1879
|
+
}
|
|
1880
|
+
if (!refNode || !refNode["s-nr"]) {
|
|
1881
|
+
insertBeforeNode = refNode;
|
|
1882
|
+
break;
|
|
1883
|
+
}
|
|
1884
|
+
}
|
|
1885
|
+
orgLocationNode = orgLocationNode.previousSibling;
|
|
1886
|
+
}
|
|
1887
|
+
}
|
|
1888
|
+
const parent = nodeToRelocate.__parentNode || nodeToRelocate.parentNode;
|
|
1889
|
+
const nextSibling = nodeToRelocate.__nextSibling || nodeToRelocate.nextSibling;
|
|
1890
|
+
if (!insertBeforeNode && parentNodeRef !== parent || nextSibling !== insertBeforeNode) {
|
|
1891
|
+
if (nodeToRelocate !== insertBeforeNode) {
|
|
1892
|
+
insertBefore(parentNodeRef, nodeToRelocate, insertBeforeNode, isInitialLoad);
|
|
1893
|
+
if (nodeToRelocate.nodeType === 8 /* CommentNode */ && nodeToRelocate.nodeValue.startsWith("s-nt-")) {
|
|
1894
|
+
const textNode = win.document.createTextNode(nodeToRelocate.nodeValue.replace(/^s-nt-/, ""));
|
|
1895
|
+
textNode["s-hn"] = nodeToRelocate["s-hn"];
|
|
1896
|
+
textNode["s-sn"] = nodeToRelocate["s-sn"];
|
|
1897
|
+
textNode["s-sh"] = nodeToRelocate["s-sh"];
|
|
1898
|
+
textNode["s-sr"] = nodeToRelocate["s-sr"];
|
|
1899
|
+
textNode["s-ol"] = nodeToRelocate["s-ol"];
|
|
1900
|
+
textNode["s-ol"]["s-nr"] = textNode;
|
|
1901
|
+
insertBefore(nodeToRelocate.parentNode, textNode, nodeToRelocate, isInitialLoad);
|
|
1902
|
+
nodeToRelocate.parentNode.removeChild(nodeToRelocate);
|
|
1903
|
+
}
|
|
1904
|
+
if (nodeToRelocate.nodeType === 1 /* ElementNode */ && nodeToRelocate.tagName !== "SLOT-FB") {
|
|
1905
|
+
nodeToRelocate.hidden = (_d = nodeToRelocate["s-ih"]) != null ? _d : false;
|
|
1906
|
+
}
|
|
1907
|
+
}
|
|
1908
|
+
}
|
|
1909
|
+
nodeToRelocate && typeof slotRefNode["s-rf"] === "function" && slotRefNode["s-rf"](slotRefNode);
|
|
1910
|
+
} else if (nodeToRelocate.nodeType === 1 /* ElementNode */) {
|
|
1911
|
+
nodeToRelocate.hidden = true;
|
|
1912
|
+
}
|
|
1913
|
+
}
|
|
1914
|
+
}
|
|
1915
|
+
if (checkSlotFallbackVisibility) {
|
|
1916
|
+
updateFallbackSlotVisibility(rootVnode.$elm$);
|
|
1917
|
+
}
|
|
1918
|
+
plt.$flags$ &= -2 /* isTmpDisconnected */;
|
|
1919
|
+
relocateNodes.length = 0;
|
|
1920
|
+
}
|
|
1921
|
+
if (!useNativeShadowDom && !(cmpMeta.$flags$ & 1 /* shadowDomEncapsulation */) && hostElm["s-cr"]) {
|
|
1922
|
+
const children = rootVnode.$elm$.__childNodes || rootVnode.$elm$.childNodes;
|
|
1923
|
+
for (const childNode of children) {
|
|
1924
|
+
if (childNode["s-hn"] !== hostTagName && !childNode["s-sh"]) {
|
|
1925
|
+
if (isInitialLoad && childNode["s-ih"] == null) {
|
|
1926
|
+
childNode["s-ih"] = (_e = childNode.hidden) != null ? _e : false;
|
|
1927
|
+
}
|
|
1928
|
+
if (childNode.nodeType === 1 /* ElementNode */) {
|
|
1929
|
+
childNode.hidden = true;
|
|
1930
|
+
} else if (childNode.nodeType === 3 /* TextNode */ && !!childNode.nodeValue.trim()) {
|
|
1931
|
+
const textCommentNode = win.document.createComment("s-nt-" + childNode.nodeValue);
|
|
1932
|
+
textCommentNode["s-sn"] = childNode["s-sn"];
|
|
1933
|
+
insertBefore(childNode.parentNode, textCommentNode, childNode, isInitialLoad);
|
|
1934
|
+
childNode.parentNode.removeChild(childNode);
|
|
1935
|
+
}
|
|
1936
|
+
}
|
|
1937
|
+
}
|
|
1938
|
+
}
|
|
1939
|
+
contentRef = void 0;
|
|
967
1940
|
flushQueuedRefCallbacks();
|
|
968
1941
|
};
|
|
969
1942
|
|
|
@@ -1010,6 +1983,10 @@ var dispatchHooks = (hostRef, isInitialLoad) => {
|
|
|
1010
1983
|
let maybePromise;
|
|
1011
1984
|
if (isInitialLoad) {
|
|
1012
1985
|
{
|
|
1986
|
+
if (hostRef.$deferredConnectedCallback$) {
|
|
1987
|
+
hostRef.$deferredConnectedCallback$ = false;
|
|
1988
|
+
safeCall(instance, "connectedCallback", void 0, elm);
|
|
1989
|
+
}
|
|
1013
1990
|
{
|
|
1014
1991
|
hostRef.$flags$ |= 256 /* isListenReady */;
|
|
1015
1992
|
if (hostRef.$queuedListeners$) {
|
|
@@ -1124,7 +2101,13 @@ var postUpdateComponent = (hostRef) => {
|
|
|
1124
2101
|
}
|
|
1125
2102
|
};
|
|
1126
2103
|
var appDidLoad = (who) => {
|
|
2104
|
+
var _a;
|
|
1127
2105
|
nextTick(() => emitEvent(win, "appload", { detail: { namespace: NAMESPACE } }));
|
|
2106
|
+
{
|
|
2107
|
+
if ((_a = plt.$orgLocNodes$) == null ? void 0 : _a.size) {
|
|
2108
|
+
plt.$orgLocNodes$.clear();
|
|
2109
|
+
}
|
|
2110
|
+
}
|
|
1128
2111
|
};
|
|
1129
2112
|
var safeCall = (instance, method, arg, elm) => {
|
|
1130
2113
|
if (instance && instance[method]) {
|
|
@@ -1430,8 +2413,11 @@ var initializeComponent = async (elm, hostRef, cmpMeta, hmrVersionId) => {
|
|
|
1430
2413
|
hostRef.$flags$ |= 128 /* isWatchReady */;
|
|
1431
2414
|
}
|
|
1432
2415
|
endNewInstance();
|
|
1433
|
-
|
|
2416
|
+
const needsDeferredCallback = cmpMeta.$flags$ & 4 /* hasSlotRelocation */;
|
|
2417
|
+
if (!needsDeferredCallback) {
|
|
1434
2418
|
fireConnectedCallback(hostRef.$lazyInstance$, elm);
|
|
2419
|
+
} else {
|
|
2420
|
+
hostRef.$deferredConnectedCallback$ = true;
|
|
1435
2421
|
}
|
|
1436
2422
|
} else {
|
|
1437
2423
|
Cstr = elm.constructor;
|
|
@@ -1486,10 +2472,27 @@ var connectedCallback = (elm) => {
|
|
|
1486
2472
|
const endConnected = createTime("connectedCallback", cmpMeta.$tagName$);
|
|
1487
2473
|
if (!(hostRef.$flags$ & 1 /* hasConnected */)) {
|
|
1488
2474
|
hostRef.$flags$ |= 1 /* hasConnected */;
|
|
2475
|
+
let hostId;
|
|
2476
|
+
{
|
|
2477
|
+
hostId = elm.getAttribute(HYDRATE_ID);
|
|
2478
|
+
if (hostId) {
|
|
2479
|
+
if (cmpMeta.$flags$ & 1 /* shadowDomEncapsulation */) {
|
|
2480
|
+
const scopeId2 = addStyle(elm.shadowRoot, cmpMeta);
|
|
2481
|
+
elm.classList.remove(scopeId2 + "-h", scopeId2 + "-s");
|
|
2482
|
+
}
|
|
2483
|
+
initializeClientHydrate(elm, cmpMeta.$tagName$, hostId, hostRef);
|
|
2484
|
+
}
|
|
2485
|
+
}
|
|
2486
|
+
if (!hostId) {
|
|
2487
|
+
if (// TODO(STENCIL-854): Remove code related to legacy shadowDomShim field
|
|
2488
|
+
cmpMeta.$flags$ & (4 /* hasSlotRelocation */ | 8 /* needsShadowDomShim */)) {
|
|
2489
|
+
setContentReference(elm);
|
|
2490
|
+
}
|
|
2491
|
+
}
|
|
1489
2492
|
{
|
|
1490
2493
|
let ancestorComponent = elm;
|
|
1491
2494
|
while (ancestorComponent = ancestorComponent.parentNode || ancestorComponent.host) {
|
|
1492
|
-
if (ancestorComponent["s-p"]) {
|
|
2495
|
+
if (ancestorComponent.nodeType === 1 /* ElementNode */ && ancestorComponent.hasAttribute("s-id") && ancestorComponent["s-p"] || ancestorComponent["s-p"]) {
|
|
1493
2496
|
attachToAncestor(hostRef, hostRef.$ancestorComponent$ = ancestorComponent);
|
|
1494
2497
|
break;
|
|
1495
2498
|
}
|
|
@@ -1518,6 +2521,16 @@ var connectedCallback = (elm) => {
|
|
|
1518
2521
|
endConnected();
|
|
1519
2522
|
}
|
|
1520
2523
|
};
|
|
2524
|
+
var setContentReference = (elm) => {
|
|
2525
|
+
if (!win.document) {
|
|
2526
|
+
return;
|
|
2527
|
+
}
|
|
2528
|
+
const contentRefElm = elm["s-cr"] = win.document.createComment(
|
|
2529
|
+
""
|
|
2530
|
+
);
|
|
2531
|
+
contentRefElm["s-cn"] = true;
|
|
2532
|
+
insertBefore(elm, contentRefElm, elm.firstChild);
|
|
2533
|
+
};
|
|
1521
2534
|
var disconnectInstance = (instance, elm) => {
|
|
1522
2535
|
{
|
|
1523
2536
|
safeCall(instance, "disconnectedCallback", void 0, elm || instance);
|
|
@@ -1565,6 +2578,13 @@ var bootstrapLazy = (lazyBundles, options = {}) => {
|
|
|
1565
2578
|
let isBootstrapping = true;
|
|
1566
2579
|
Object.assign(plt, options);
|
|
1567
2580
|
plt.$resourcesUrl$ = new URL(options.resourcesUrl || "./", win.document.baseURI).href;
|
|
2581
|
+
{
|
|
2582
|
+
plt.$flags$ |= 2 /* appLoaded */;
|
|
2583
|
+
}
|
|
2584
|
+
{
|
|
2585
|
+
hydrateScopedToShadow();
|
|
2586
|
+
}
|
|
2587
|
+
let hasSlotRelocation = false;
|
|
1568
2588
|
lazyBundles.map((lazyBundle) => {
|
|
1569
2589
|
lazyBundle[1].map((compactMeta) => {
|
|
1570
2590
|
var _a2, _b, _c;
|
|
@@ -1574,6 +2594,9 @@ var bootstrapLazy = (lazyBundles, options = {}) => {
|
|
|
1574
2594
|
$members$: compactMeta[2],
|
|
1575
2595
|
$listeners$: compactMeta[3]
|
|
1576
2596
|
};
|
|
2597
|
+
if (cmpMeta.$flags$ & 4 /* hasSlotRelocation */) {
|
|
2598
|
+
hasSlotRelocation = true;
|
|
2599
|
+
}
|
|
1577
2600
|
{
|
|
1578
2601
|
cmpMeta.$members$ = compactMeta[2];
|
|
1579
2602
|
}
|
|
@@ -1667,6 +2690,9 @@ var bootstrapLazy = (lazyBundles, options = {}) => {
|
|
|
1667
2690
|
});
|
|
1668
2691
|
});
|
|
1669
2692
|
if (cmpTags.length > 0) {
|
|
2693
|
+
if (hasSlotRelocation) {
|
|
2694
|
+
dataStyles.textContent += SLOT_FB_CSS;
|
|
2695
|
+
}
|
|
1670
2696
|
{
|
|
1671
2697
|
dataStyles.textContent += cmpTags.sort() + HYDRATED_CSS;
|
|
1672
2698
|
}
|
|
@@ -1734,4 +2760,4 @@ function transformTag(tag) {
|
|
|
1734
2760
|
return tag;
|
|
1735
2761
|
}
|
|
1736
2762
|
|
|
1737
|
-
export { getElement as a, bootstrapLazy as b, createEvent as c, globalScripts as g, h, promiseResolve as p, registerInstance as r, setNonce as s };
|
|
2763
|
+
export { Build as B, getElement as a, bootstrapLazy as b, createEvent as c, globalScripts as g, h, promiseResolve as p, registerInstance as r, setNonce as s };
|