@mintplayer/web-components 3.4.0 → 3.6.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +5 -5
- package/a11y/index.mjs +248 -1
- package/a11y/src/index.d.ts +0 -2
- package/accordion/index.mjs +117 -144
- package/accordion/src/generated/accordion-tab.view.generated.d.ts +13 -0
- package/accordion/src/generated/accordion.view.generated.d.ts +10 -0
- package/accordion/src/generated/index.d.ts +2 -0
- package/accordion/src/generated/mp-accordion-tab.generated.d.ts +50 -0
- package/accordion/src/generated/mp-accordion.generated.d.ts +47 -0
- package/accordion/src/index.d.ts +2 -3
- package/alert/index.mjs +82 -0
- package/alert/src/generated/alert.view.generated.d.ts +10 -0
- package/alert/src/generated/index.d.ts +1 -0
- package/alert/src/generated/mp-alert.generated.d.ts +66 -0
- package/alert/src/index.d.ts +1 -0
- package/badge/index.mjs +71 -0
- package/badge/src/generated/badge.view.generated.d.ts +11 -0
- package/badge/src/generated/index.d.ts +1 -0
- package/badge/src/generated/mp-badge.generated.d.ts +48 -0
- package/badge/src/index.d.ts +1 -0
- package/breadcrumb/index.mjs +110 -0
- package/breadcrumb/src/generated/breadcrumb-item.view.generated.d.ts +10 -0
- package/breadcrumb/src/generated/breadcrumb.view.generated.d.ts +13 -0
- package/breadcrumb/src/generated/index.d.ts +2 -0
- package/breadcrumb/src/generated/mp-breadcrumb-item.generated.d.ts +31 -0
- package/breadcrumb/src/generated/mp-breadcrumb.generated.d.ts +30 -0
- package/breadcrumb/src/index.d.ts +1 -0
- package/button-group/index.d.ts +1 -0
- package/button-group/index.mjs +68 -0
- package/button-group/src/generated/button-group.view.generated.d.ts +10 -0
- package/button-group/src/generated/index.d.ts +1 -0
- package/button-group/src/generated/mp-button-group.generated.d.ts +48 -0
- package/button-group/src/index.d.ts +1 -0
- package/card/index.mjs +421 -19
- package/card/src/generated/card-img.view.generated.d.ts +13 -0
- package/card/src/generated/card-link.view.generated.d.ts +13 -0
- package/card/src/generated/card-part.view.generated.d.ts +10 -0
- package/card/src/generated/index.d.ts +10 -0
- package/card/src/generated/mp-card-body.generated.d.ts +20 -0
- package/card/src/generated/mp-card-footer.generated.d.ts +30 -0
- package/card/src/generated/mp-card-group.generated.d.ts +20 -0
- package/card/src/generated/mp-card-header.generated.d.ts +30 -0
- package/card/src/generated/mp-card-img.generated.d.ts +46 -0
- package/card/src/generated/mp-card-link.generated.d.ts +30 -0
- package/card/src/generated/mp-card-subtitle.generated.d.ts +20 -0
- package/card/src/generated/mp-card-text.generated.d.ts +20 -0
- package/card/src/generated/mp-card-title.generated.d.ts +30 -0
- package/card/src/generated/mp-card.generated.d.ts +38 -0
- package/card/src/index.d.ts +2 -2
- package/charts/sparkline/index.mjs +85 -109
- package/charts/sparkline/src/generated/index.d.ts +1 -0
- package/charts/sparkline/src/generated/mp-sparkline.generated.d.ts +81 -0
- package/charts/sparkline/src/generated/sparkline.view.generated.d.ts +11 -0
- package/charts/sparkline/src/index.d.ts +2 -1
- package/checkbox/index.mjs +256 -261
- package/checkbox/src/generated/checkbox-group.view.generated.d.ts +10 -0
- package/checkbox/src/generated/checkbox.view.generated.d.ts +13 -0
- package/checkbox/src/generated/index.d.ts +3 -0
- package/{navbar/src/generated/mp-navbar-dropdown.generated.d.ts → checkbox/src/generated/mp-checkbox-group.generated.d.ts} +17 -14
- package/checkbox/src/generated/mp-checkbox.generated.d.ts +120 -0
- package/checkbox/src/generated/mp-toggle-button.generated.d.ts +100 -0
- package/checkbox/src/index.d.ts +1 -2
- package/chunks/{datatable-wRsV3aob.mjs → datatable-wcZQMo-4.mjs} +5 -5
- package/chunks/{treeview-BFyPrpxn.mjs → treeview-CKndcfiq.mjs} +38 -36
- package/close/index.d.ts +1 -0
- package/close/index.mjs +55 -0
- package/close/src/generated/close.view.generated.d.ts +11 -0
- package/close/src/generated/index.d.ts +1 -0
- package/close/src/generated/mp-close.generated.d.ts +33 -0
- package/close/src/index.d.ts +1 -0
- package/color-picker/index.d.ts +1 -0
- package/color-picker/index.mjs +108 -0
- package/color-picker/src/generated/color-picker.view.generated.d.ts +8 -0
- package/color-picker/src/generated/index.d.ts +1 -0
- package/color-picker/src/generated/mp-color-picker.generated.d.ts +83 -0
- package/color-picker/src/index.d.ts +2 -0
- package/context-menu/index.d.ts +1 -0
- package/context-menu/index.mjs +75 -0
- package/context-menu/src/generated/context-menu-panel.view.generated.d.ts +10 -0
- package/context-menu/src/generated/context-menu.directive.generated.d.ts +5 -0
- package/context-menu/src/generated/index.d.ts +2 -0
- package/context-menu/src/generated/mp-context-menu-panel.generated.d.ts +40 -0
- package/context-menu/src/index.d.ts +1 -0
- package/custom-elements.json +13883 -6471
- package/datatable/index.mjs +1 -1
- package/dropdown/index.d.ts +1 -0
- package/dropdown/index.mjs +295 -0
- package/dropdown/src/generated/dropdown-divider.view.generated.d.ts +8 -0
- package/dropdown/src/generated/dropdown-header.view.generated.d.ts +10 -0
- package/dropdown/src/generated/dropdown-item.view.generated.d.ts +10 -0
- package/dropdown/src/generated/dropdown-menu.view.generated.d.ts +16 -0
- package/dropdown/src/generated/dropdown-panel.view.generated.d.ts +10 -0
- package/dropdown/src/generated/dropdown.directive.generated.d.ts +5 -0
- package/dropdown/src/generated/index.d.ts +6 -0
- package/dropdown/src/generated/mp-dropdown-divider.generated.d.ts +13 -0
- package/dropdown/src/generated/mp-dropdown-header.generated.d.ts +20 -0
- package/dropdown/src/generated/mp-dropdown-item.generated.d.ts +43 -0
- package/dropdown/src/generated/mp-dropdown-menu.generated.d.ts +61 -0
- package/dropdown/src/generated/mp-dropdown-panel.generated.d.ts +67 -0
- package/dropdown/src/index.d.ts +1 -0
- package/file-manager/index.mjs +19 -19
- package/file-upload/index.d.ts +1 -0
- package/file-upload/index.mjs +136 -0
- package/file-upload/src/generated/file-upload.view.generated.d.ts +18 -0
- package/file-upload/src/generated/index.d.ts +1 -0
- package/file-upload/src/generated/mp-file-upload.generated.d.ts +117 -0
- package/file-upload/src/index.d.ts +3 -0
- package/floating-labels/index.d.ts +1 -0
- package/floating-labels/index.mjs +45 -0
- package/floating-labels/src/generated/floating-label.view.generated.d.ts +10 -0
- package/floating-labels/src/generated/index.d.ts +1 -0
- package/floating-labels/src/generated/mp-floating-label.generated.d.ts +20 -0
- package/floating-labels/src/index.d.ts +1 -0
- package/form/index.d.ts +1 -0
- package/form/index.mjs +84 -0
- package/form/src/generated/col-form-label.directive.generated.d.ts +2 -0
- package/form/src/generated/form-control.directive.generated.d.ts +2 -0
- package/form/src/generated/form.view.generated.d.ts +13 -0
- package/form/src/generated/index.d.ts +3 -0
- package/form/src/generated/mp-form.generated.d.ts +41 -0
- package/form/src/index.d.ts +1 -0
- package/grid/index.d.ts +1 -0
- package/grid/index.mjs +93 -0
- package/grid/src/generated/col.directive.generated.d.ts +2 -0
- package/grid/src/generated/column.directive.generated.d.ts +2 -0
- package/grid/src/generated/grid.view.generated.d.ts +10 -0
- package/grid/src/generated/index.d.ts +4 -0
- package/grid/src/generated/mp-grid.generated.d.ts +31 -0
- package/grid/src/generated/row.directive.generated.d.ts +2 -0
- package/grid/src/index.d.ts +1 -0
- package/input-group/index.mjs +59 -34
- package/input-group/src/generated/index.d.ts +1 -0
- package/input-group/src/generated/input-group.view.generated.d.ts +10 -0
- package/input-group/src/generated/mp-input-group.generated.d.ts +39 -0
- package/input-group/src/index.d.ts +1 -1
- package/list-group/index.d.ts +1 -0
- package/list-group/index.mjs +117 -0
- package/list-group/src/generated/index.d.ts +2 -0
- package/list-group/src/generated/list-group-item.view.generated.d.ts +10 -0
- package/list-group/src/generated/list-group.view.generated.d.ts +10 -0
- package/list-group/src/generated/mp-list-group-item.generated.d.ts +48 -0
- package/list-group/src/generated/mp-list-group.generated.d.ts +31 -0
- package/list-group/src/index.d.ts +1 -0
- package/machine/index.mjs +164 -55
- package/machine/src/body-teleport-directive.d.ts +3 -0
- package/machine/src/content-query.d.ts +4 -0
- package/machine/src/core-controller.d.ts +5 -0
- package/machine/src/core-directive.d.ts +21 -0
- package/machine/src/host-props.d.ts +21 -0
- package/machine/src/index.d.ts +3 -0
- package/machine/src/instance-style-directive.d.ts +17 -0
- package/machine/src/mark-links.d.ts +3 -3
- package/marquee/index.d.ts +1 -0
- package/marquee/index.mjs +74 -0
- package/marquee/src/generated/index.d.ts +1 -0
- package/marquee/src/generated/marquee.view.generated.d.ts +13 -0
- package/marquee/src/generated/mp-marquee.generated.d.ts +48 -0
- package/marquee/src/index.d.ts +1 -0
- package/modal/index.d.ts +1 -0
- package/modal/index.mjs +134 -0
- package/modal/src/generated/index.d.ts +1 -0
- package/modal/src/generated/modal.view.generated.d.ts +12 -0
- package/modal/src/generated/mp-modal.generated.d.ts +103 -0
- package/modal/src/index.d.ts +2 -0
- package/multi-range/src/generated/mp-multi-range.generated.d.ts +1 -1
- package/nav/index.mjs +1 -1
- package/navbar/index.mjs +23 -88
- package/navbar/src/generated/index.d.ts +0 -1
- package/navbar/src/generated/mp-navbar-item.generated.d.ts +1 -1
- package/navbar/src/generated/mp-navbar-nav.generated.d.ts +4 -1
- package/navbar/src/index.d.ts +1 -1
- package/navbar/src/navbar-item.lit.d.ts +1 -1
- package/navbar-toggler/index.d.ts +1 -0
- package/navbar-toggler/index.mjs +70 -0
- package/navbar-toggler/src/generated/index.d.ts +1 -0
- package/navbar-toggler/src/generated/mp-navbar-toggler.generated.d.ts +52 -0
- package/navbar-toggler/src/generated/navbar-toggler.view.generated.d.ts +11 -0
- package/navbar-toggler/src/index.d.ts +1 -0
- package/offcanvas/index.d.ts +1 -0
- package/offcanvas/index.mjs +133 -0
- package/offcanvas/src/generated/index.d.ts +1 -0
- package/offcanvas/src/generated/mp-offcanvas.generated.d.ts +108 -0
- package/offcanvas/src/generated/offcanvas.view.generated.d.ts +11 -0
- package/offcanvas/src/index.d.ts +2 -0
- package/otp-input/index.mjs +33 -29
- package/otp-input/src/generated/otp-input.view.generated.d.ts +4 -1
- package/package.json +123 -11
- package/pagination/index.mjs +88 -144
- package/pagination/src/generated/index.d.ts +1 -0
- package/pagination/src/generated/mp-pagination.generated.d.ts +69 -0
- package/pagination/src/generated/pagination.view.generated.d.ts +11 -0
- package/pagination/src/index.d.ts +3 -2
- package/parallax/index.d.ts +1 -0
- package/parallax/index.mjs +50 -0
- package/parallax/src/generated/index.d.ts +1 -0
- package/parallax/src/generated/mp-parallax.generated.d.ts +32 -0
- package/parallax/src/generated/parallax.view.generated.d.ts +8 -0
- package/parallax/src/index.d.ts +1 -0
- package/phone-input/index.mjs +52 -48
- package/phone-input/src/generated/phone-input.view.generated.d.ts +4 -1
- package/placeholder/index.d.ts +1 -0
- package/placeholder/index.mjs +64 -0
- package/placeholder/src/generated/index.d.ts +1 -0
- package/placeholder/src/generated/mp-placeholder.generated.d.ts +43 -0
- package/placeholder/src/generated/placeholder.view.generated.d.ts +10 -0
- package/placeholder/src/index.d.ts +1 -0
- package/playlist-toggler/index.d.ts +1 -0
- package/playlist-toggler/index.mjs +69 -0
- package/playlist-toggler/src/generated/index.d.ts +1 -0
- package/playlist-toggler/src/generated/mp-playlist-toggler.generated.d.ts +52 -0
- package/playlist-toggler/src/generated/playlist-toggler.view.generated.d.ts +11 -0
- package/playlist-toggler/src/index.d.ts +1 -0
- package/popover/index.d.ts +1 -0
- package/popover/index.mjs +104 -0
- package/popover/src/generated/index.d.ts +2 -0
- package/popover/src/generated/mp-popover-panel.generated.d.ts +66 -0
- package/popover/src/generated/popover-panel.view.generated.d.ts +10 -0
- package/popover/src/generated/popover.directive.generated.d.ts +5 -0
- package/popover/src/index.d.ts +1 -0
- package/priority-nav/index.d.ts +1 -0
- package/priority-nav/index.mjs +149 -0
- package/priority-nav/src/generated/index.d.ts +1 -0
- package/priority-nav/src/generated/mp-priority-nav.generated.d.ts +78 -0
- package/priority-nav/src/generated/priority-nav.view.generated.d.ts +21 -0
- package/priority-nav/src/index.d.ts +2 -0
- package/progress-bar/index.d.ts +1 -0
- package/progress-bar/index.mjs +157 -0
- package/progress-bar/src/generated/index.d.ts +2 -0
- package/progress-bar/src/generated/mp-progress-bar.generated.d.ts +87 -0
- package/progress-bar/src/generated/mp-progress.generated.d.ts +46 -0
- package/progress-bar/src/generated/progress-bar.view.generated.d.ts +12 -0
- package/progress-bar/src/generated/progress.view.generated.d.ts +10 -0
- package/progress-bar/src/index.d.ts +1 -0
- package/query-builder/index.mjs +19 -19
- package/radio/index.mjs +186 -1
- package/radio/src/generated/index.d.ts +2 -0
- package/radio/src/generated/mp-radio-group.generated.d.ts +59 -0
- package/radio/src/generated/mp-radio.generated.d.ts +120 -0
- package/radio/src/generated/radio-group.view.generated.d.ts +10 -0
- package/radio/src/generated/radio.view.generated.d.ts +13 -0
- package/radio/src/index.d.ts +1 -2
- package/range/index.d.ts +1 -0
- package/range/index.mjs +75 -0
- package/range/src/generated/index.d.ts +1 -0
- package/range/src/generated/mp-range.generated.d.ts +64 -0
- package/range/src/generated/range.view.generated.d.ts +11 -0
- package/range/src/index.d.ts +1 -0
- package/rating/index.d.ts +1 -0
- package/rating/index.mjs +74 -0
- package/rating/src/generated/index.d.ts +1 -0
- package/rating/src/generated/mp-rating.generated.d.ts +64 -0
- package/rating/src/generated/rating.view.generated.d.ts +8 -0
- package/rating/src/index.d.ts +1 -0
- package/resizable/index.d.ts +1 -0
- package/resizable/index.mjs +79 -0
- package/resizable/src/generated/index.d.ts +1 -0
- package/resizable/src/generated/mp-resizable.generated.d.ts +66 -0
- package/resizable/src/generated/resizable.view.generated.d.ts +10 -0
- package/resizable/src/index.d.ts +2 -0
- package/scheduler/index.mjs +7 -1
- package/scrollspy/index.d.ts +1 -0
- package/scrollspy/index.mjs +76 -0
- package/scrollspy/src/generated/index.d.ts +1 -0
- package/scrollspy/src/generated/mp-scrollspy.generated.d.ts +49 -0
- package/scrollspy/src/generated/scrollspy.view.generated.d.ts +13 -0
- package/scrollspy/src/index.d.ts +1 -0
- package/select/index.mjs +48 -46
- package/select/src/generated/select.view.generated.d.ts +4 -1
- package/shell/index.mjs +88 -81
- package/shell/src/generated/index.d.ts +1 -0
- package/shell/src/generated/mp-shell.generated.d.ts +90 -0
- package/shell/src/generated/shell.view.generated.d.ts +12 -0
- package/shell/src/index.d.ts +2 -3
- package/sticky-footer/index.d.ts +1 -0
- package/sticky-footer/index.mjs +57 -0
- package/sticky-footer/src/generated/index.d.ts +2 -0
- package/sticky-footer/src/generated/mp-sticky-footer.generated.d.ts +20 -0
- package/sticky-footer/src/generated/sticky-footer-parent.directive.generated.d.ts +2 -0
- package/sticky-footer/src/generated/sticky-footer.view.generated.d.ts +13 -0
- package/sticky-footer/src/index.d.ts +1 -0
- package/tab-control/index.mjs +142 -182
- package/tab-control/src/generated/index.d.ts +2 -0
- package/tab-control/src/generated/mp-tab-control.generated.d.ts +65 -0
- package/tab-control/src/generated/mp-tab-page.generated.d.ts +44 -0
- package/tab-control/src/generated/tab-control.view.generated.d.ts +12 -0
- package/tab-control/src/index.d.ts +2 -4
- package/table/index.d.ts +1 -0
- package/table/index.mjs +75 -0
- package/table/src/generated/index.d.ts +1 -0
- package/table/src/generated/mp-table.generated.d.ts +57 -0
- package/table/src/generated/table.view.generated.d.ts +13 -0
- package/table/src/index.d.ts +1 -0
- package/tile-manager/index.mjs +110 -143
- package/tile-manager/src/generated/index.d.ts +1 -0
- package/tile-manager/src/generated/mp-tile-manager.generated.d.ts +139 -0
- package/tile-manager/src/generated/tile-manager.view.generated.d.ts +21 -0
- package/tile-manager/src/index.d.ts +2 -2
- package/toast/index.d.ts +1 -0
- package/toast/index.mjs +227 -0
- package/toast/src/generated/index.d.ts +4 -0
- package/toast/src/generated/mp-toast-body.generated.d.ts +20 -0
- package/toast/src/generated/mp-toast-header.generated.d.ts +39 -0
- package/toast/src/generated/mp-toast.generated.d.ts +41 -0
- package/toast/src/generated/mp-toaster.generated.d.ts +39 -0
- package/toast/src/generated/toast-body.view.generated.d.ts +10 -0
- package/toast/src/generated/toast-header.view.generated.d.ts +11 -0
- package/toast/src/generated/toast.view.generated.d.ts +10 -0
- package/toast/src/generated/toaster.view.generated.d.ts +15 -0
- package/toast/src/index.d.ts +1 -0
- package/tooltip/index.d.ts +1 -0
- package/tooltip/index.mjs +87 -0
- package/tooltip/src/generated/index.d.ts +2 -0
- package/tooltip/src/generated/mp-tooltip-panel.generated.d.ts +48 -0
- package/tooltip/src/generated/tooltip-panel.view.generated.d.ts +10 -0
- package/tooltip/src/generated/tooltip.directive.generated.d.ts +5 -0
- package/tooltip/src/index.d.ts +1 -0
- package/treeview/index.mjs +1 -1
- package/treeview/src/generated/treeview.view.generated.d.ts +4 -1
- package/typeahead/index.mjs +131 -221
- package/typeahead/src/generated/index.d.ts +1 -0
- package/typeahead/src/generated/mp-typeahead.generated.d.ts +126 -0
- package/typeahead/src/generated/typeahead.view.generated.d.ts +20 -0
- package/typeahead/src/index.d.ts +3 -3
- package/a11y/src/form-associated.d.ts +0 -48
- package/accordion/src/components/index.d.ts +0 -3
- package/accordion/src/components/mp-accordion-tab.d.ts +0 -30
- package/accordion/src/components/mp-accordion.d.ts +0 -54
- package/accordion/src/styles/accordion.styles.d.ts +0 -2
- package/accordion/src/styles/index.d.ts +0 -1
- package/card/src/card-global.styles.d.ts +0 -2
- package/card/src/mp-card.element.d.ts +0 -43
- package/card/src/mp-card.element.template.d.ts +0 -2
- package/charts/sparkline/src/components/index.d.ts +0 -1
- package/charts/sparkline/src/components/mp-sparkline.d.ts +0 -50
- package/charts/sparkline/src/styles/index.d.ts +0 -1
- package/charts/sparkline/src/styles/sparkline.styles.d.ts +0 -2
- package/checkbox/src/components/index.d.ts +0 -2
- package/checkbox/src/components/mp-checkbox.d.ts +0 -128
- package/chunks/a11y-CXIVMaQ_.mjs +0 -287
- package/chunks/radio-fSMWIPFk.mjs +0 -150
- package/chunks/toggle-button-DWLu9iCm.mjs +0 -172
- package/dropdown-menu/index.mjs +0 -48
- package/dropdown-menu/src/components/index.d.ts +0 -1
- package/dropdown-menu/src/components/mp-dropdown-menu.d.ts +0 -46
- package/dropdown-menu/src/index.d.ts +0 -2
- package/input-group/src/mp-input-group.d.ts +0 -29
- package/navbar/src/generated/navbar-dropdown.view.generated.d.ts +0 -14
- package/pagination/src/components/index.d.ts +0 -2
- package/pagination/src/components/mp-pagination.d.ts +0 -57
- package/pagination/src/styles/index.d.ts +0 -1
- package/pagination/src/styles/pagination.styles.d.ts +0 -2
- package/radio/src/components/index.d.ts +0 -2
- package/radio/src/components/mp-radio.d.ts +0 -80
- package/radio-group/index.mjs +0 -64
- package/radio-group/src/components/mp-radio-group.d.ts +0 -39
- package/radio-group/src/index.d.ts +0 -1
- package/radio-group/src/styles/radio-group.styles.d.ts +0 -2
- package/shell/src/components/index.d.ts +0 -2
- package/shell/src/components/mp-shell.d.ts +0 -69
- package/shell/src/styles/shell.styles.d.ts +0 -2
- package/tab-control/src/components/index.d.ts +0 -3
- package/tab-control/src/components/mp-tab-control.d.ts +0 -50
- package/tab-control/src/components/mp-tab-page.d.ts +0 -35
- package/tab-control/src/styles/index.d.ts +0 -1
- package/tab-control/src/styles/tab-control.styles.d.ts +0 -2
- package/tab-control/src/types/index.d.ts +0 -1
- package/tab-control/src/types/tabs-position.d.ts +0 -1
- package/tile-manager/src/components/index.d.ts +0 -1
- package/tile-manager/src/components/mp-tile-manager.d.ts +0 -107
- package/toggle-button/index.mjs +0 -1
- package/toggle-button/src/components/index.d.ts +0 -2
- package/toggle-button/src/components/mp-toggle-button.d.ts +0 -76
- package/toggle-button/src/index.d.ts +0 -3
- package/toggle-button/src/styles/index.d.ts +0 -1
- package/toggle-button/src/styles/toggle-button.styles.d.ts +0 -2
- package/typeahead/src/components/mp-typeahead.d.ts +0 -68
- /package/{dropdown-menu → alert}/index.d.ts +0 -0
- /package/{radio-group → badge}/index.d.ts +0 -0
- /package/{toggle-button → breadcrumb}/index.d.ts +0 -0
package/machine/index.mjs
CHANGED
|
@@ -1,8 +1,10 @@
|
|
|
1
1
|
import { noChange as e, nothing as t, render as n } from "lit";
|
|
2
|
-
import {
|
|
3
|
-
import {
|
|
2
|
+
import { createBodyHost as r, removeBodyHost as i } from "@mintplayer/ui-core/overlay";
|
|
3
|
+
import { Directive as a, PartType as o, directive as s } from "lit/directive.js";
|
|
4
|
+
import { coreRuntime as c, directiveInputs as l, elementCore as u, sameContent as d, scopedHost as f } from "@mintplayer/ui-core/component";
|
|
5
|
+
import { AsyncDirective as p, PartType as m, directive as h } from "lit/async-directive.js";
|
|
4
6
|
//#region libs/mintplayer-web-components/machine/src/machine-controller.ts
|
|
5
|
-
var
|
|
7
|
+
var g = class {
|
|
6
8
|
#e = null;
|
|
7
9
|
constructor(e, t, n = !0) {
|
|
8
10
|
this.host = e, this.machine = t, this.ownsMachine = n, e.addController(this);
|
|
@@ -19,7 +21,7 @@ var c = class {
|
|
|
19
21
|
dispose() {
|
|
20
22
|
this.hostDisconnected(), this.ownsMachine && this.machine.destroy();
|
|
21
23
|
}
|
|
22
|
-
},
|
|
24
|
+
}, _ = /* @__PURE__ */ new Set([
|
|
23
25
|
"href",
|
|
24
26
|
"src",
|
|
25
27
|
"srcdoc",
|
|
@@ -28,10 +30,10 @@ var c = class {
|
|
|
28
30
|
"action",
|
|
29
31
|
"formaction",
|
|
30
32
|
"data"
|
|
31
|
-
]),
|
|
33
|
+
]), v = s(class extends a {
|
|
32
34
|
#e = {};
|
|
33
35
|
constructor(e) {
|
|
34
|
-
if (super(e), e.type !==
|
|
36
|
+
if (super(e), e.type !== o.ELEMENT) throw Error("props() must be used in element position");
|
|
35
37
|
}
|
|
36
38
|
render(t) {
|
|
37
39
|
return e;
|
|
@@ -39,22 +41,39 @@ var c = class {
|
|
|
39
41
|
update(t, [n]) {
|
|
40
42
|
let r = t.element, i = (e) => e == null || e === !1;
|
|
41
43
|
return Object.keys(this.#e).filter((e) => !(e in n) || i(n[e])).forEach((e) => r.removeAttribute(e)), Object.entries(n).filter(([, e]) => !i(e)).filter(([e]) => {
|
|
42
|
-
if (
|
|
44
|
+
if (_.has(e) || e.startsWith("on")) throw Error(`props() refuses to set "${e}"`);
|
|
43
45
|
return !0;
|
|
44
46
|
}).filter(([e, t]) => !Object.is(this.#e[e], t)).forEach(([e, t]) => r.setAttribute(e, t === !0 ? "" : String(t))), this.#e = { ...n }, e;
|
|
45
47
|
}
|
|
46
|
-
}),
|
|
48
|
+
}), y = {
|
|
47
49
|
attrs: {},
|
|
48
50
|
classes: []
|
|
49
|
-
},
|
|
50
|
-
function
|
|
51
|
+
}, b = (e) => e == null || e === !1;
|
|
52
|
+
function x(e, t, n) {
|
|
51
53
|
let { class: r, ...i } = n, a = typeof r == "string" ? r.split(/\s+/).filter(Boolean) : [];
|
|
52
|
-
return e.classList.remove(...t.classes.filter((e) => !a.includes(e))), a.length && e.classList.add(...a), Object.keys(t.attrs).filter((e) =>
|
|
54
|
+
return e.classList.remove(...t.classes.filter((e) => !a.includes(e))), a.length && e.classList.add(...a), Object.keys(t.attrs).filter((e) => b(i[e])).forEach((t) => e.removeAttribute(t)), Object.entries(i).filter(([, e]) => !b(e)).filter(([e, n]) => !Object.is(t.attrs[e], n)).forEach(([t, n]) => e.setAttribute(t, n === !0 ? "" : String(n))), {
|
|
53
55
|
attrs: i,
|
|
54
56
|
classes: a
|
|
55
57
|
};
|
|
56
58
|
}
|
|
57
|
-
|
|
59
|
+
function S(e) {
|
|
60
|
+
let t = Object.fromEntries(Array.from(e.attributes).filter(({ name: e }) => e.startsWith("aria-") || e === "id" || e === "tabindex").map(({ name: e, value: t }) => [e, t]));
|
|
61
|
+
return ["id", "tabindex"].filter((e) => e in t).forEach((t) => e.removeAttribute(t)), {
|
|
62
|
+
host: e,
|
|
63
|
+
attrs: t
|
|
64
|
+
};
|
|
65
|
+
}
|
|
66
|
+
function C(e, t) {
|
|
67
|
+
let n = e ?? {};
|
|
68
|
+
if (!t) return n;
|
|
69
|
+
let { id: r, ...i } = t.attrs, a = n.id !== null && n.id !== void 0;
|
|
70
|
+
return a && r && t.host.id !== r && (t.host.id = r), {
|
|
71
|
+
...n,
|
|
72
|
+
...i,
|
|
73
|
+
...r && !a ? { id: r } : {}
|
|
74
|
+
};
|
|
75
|
+
}
|
|
76
|
+
var w = (e) => e.nodeType === Node.COMMENT_NODE || e.nodeType === Node.TEXT_NODE && !e.textContent?.trim() || e instanceof Element && (e.hasAttribute("data-mp-owned") || e.hasAttribute("data-mps") && !e.localName.includes("-")), T = class {
|
|
58
77
|
#e = null;
|
|
59
78
|
#t = null;
|
|
60
79
|
constructor(e) {
|
|
@@ -64,7 +83,7 @@ var m = (e) => e.nodeType === Node.COMMENT_NODE || e.nodeType === Node.TEXT_NODE
|
|
|
64
83
|
return this.#e ?? {};
|
|
65
84
|
}
|
|
66
85
|
capture() {
|
|
67
|
-
this.#e ??=
|
|
86
|
+
this.#e ??= E(this.host);
|
|
68
87
|
}
|
|
69
88
|
hostConnected() {
|
|
70
89
|
this.#t = new MutationObserver((e) => this.#n(e, !0)), this.#t.observe(this.host, { childList: !0 });
|
|
@@ -80,11 +99,11 @@ var m = (e) => e.nodeType === Node.COMMENT_NODE || e.nodeType === Node.TEXT_NODE
|
|
|
80
99
|
}
|
|
81
100
|
#n(e, t) {
|
|
82
101
|
if (!this.#e) return;
|
|
83
|
-
let n = new Set(e.flatMap((e) => [...e.addedNodes])), r = new Set(Object.values(this.#e).flat()), i =
|
|
102
|
+
let n = new Set(e.flatMap((e) => [...e.addedNodes])), r = new Set(Object.values(this.#e).flat()), i = E(this.host, (e) => !n.has(e) || r.has(e) || w(e));
|
|
84
103
|
Object.keys(i).length !== 0 && (Object.entries(i).forEach(([e, t]) => this.#e[e] = [...this.#e[e] ?? [], ...t]), t && this.host.requestUpdate());
|
|
85
104
|
}
|
|
86
105
|
};
|
|
87
|
-
function
|
|
106
|
+
function E(e, t = () => !1) {
|
|
88
107
|
let n = {};
|
|
89
108
|
return [...e.childNodes].filter((e) => !t(e)).forEach((e) => {
|
|
90
109
|
if (e.parentNode?.removeChild(e), e.nodeType === Node.COMMENT_NODE || e.nodeType === Node.TEXT_NODE && !e.textContent?.trim()) return;
|
|
@@ -92,36 +111,36 @@ function g(e, t = () => !1) {
|
|
|
92
111
|
(n[t ?? "default"] ??= []).push(e);
|
|
93
112
|
}), n;
|
|
94
113
|
}
|
|
95
|
-
var
|
|
114
|
+
var D = (e) => ({
|
|
96
115
|
fromAttribute: (t) => t === null ? e : t !== "false",
|
|
97
116
|
toAttribute: (e) => e ? "" : null
|
|
98
|
-
}),
|
|
117
|
+
}), O = (e, t) => ({
|
|
99
118
|
fromAttribute: (n) => n === null || t && !t.includes(n) ? e : n,
|
|
100
119
|
toAttribute: (e) => e == null ? null : String(e)
|
|
101
|
-
}),
|
|
120
|
+
}), k = (e) => ({
|
|
102
121
|
fromAttribute: (t) => {
|
|
103
122
|
let n = t === null || t.trim() === "" ? NaN : Number(t);
|
|
104
123
|
return Number.isFinite(n) ? n : e;
|
|
105
124
|
},
|
|
106
125
|
toAttribute: (e) => e == null ? null : String(e)
|
|
107
|
-
}),
|
|
108
|
-
function
|
|
109
|
-
let t =
|
|
110
|
-
return t || (t = Symbol(e.name),
|
|
126
|
+
}), A = /* @__PURE__ */ new WeakMap();
|
|
127
|
+
function j(e) {
|
|
128
|
+
let t = A.get(e);
|
|
129
|
+
return t || (t = Symbol(e.name), A.set(e, t)), t;
|
|
111
130
|
}
|
|
112
|
-
var
|
|
113
|
-
function
|
|
114
|
-
let n =
|
|
131
|
+
var M = /* @__PURE__ */ new WeakMap();
|
|
132
|
+
function N(e, t) {
|
|
133
|
+
let n = j(t);
|
|
115
134
|
for (let t = e.parentNode; t; t = t instanceof ShadowRoot ? t.host : t.parentNode) {
|
|
116
135
|
let r = t[n];
|
|
117
136
|
if (r) {
|
|
118
|
-
let n =
|
|
119
|
-
return
|
|
137
|
+
let n = M.get(t) ?? /* @__PURE__ */ new Set();
|
|
138
|
+
return M.set(t, n.add(e)), r();
|
|
120
139
|
}
|
|
121
140
|
}
|
|
122
141
|
return t.defaultValue;
|
|
123
142
|
}
|
|
124
|
-
var
|
|
143
|
+
var P = (e, t) => e === t || !!e && !!t && typeof e == "object" && typeof t == "object" && Object.keys(e).length === Object.keys(t).length && Object.entries(e).every(([e, n]) => t[e] === n), F = 0, I = class {
|
|
125
144
|
#e;
|
|
126
145
|
#t;
|
|
127
146
|
#n;
|
|
@@ -130,24 +149,33 @@ var w = (e, t) => e === t || !!e && !!t && typeof e == "object" && typeof t == "
|
|
|
130
149
|
#a;
|
|
131
150
|
#o;
|
|
132
151
|
#s = !1;
|
|
133
|
-
#c =
|
|
152
|
+
#c = y;
|
|
134
153
|
#l;
|
|
135
154
|
#u;
|
|
136
155
|
constructor(e, t, n) {
|
|
137
|
-
this.#e = e, this.#t = t, this.#n = n, this.#r = `${n.idPrefix}-${++
|
|
156
|
+
this.#e = e, this.#t = t, this.#n = n, this.#r = `${n.idPrefix}-${++F}`, this.#i = c(t, {
|
|
138
157
|
inputs: n.inputs,
|
|
139
158
|
state: () => this.#d,
|
|
140
159
|
setState: (t) => {
|
|
141
160
|
this.#a = t, e.requestUpdate();
|
|
142
161
|
},
|
|
143
162
|
models: n.models,
|
|
144
|
-
writeModel: (t, n) =>
|
|
163
|
+
writeModel: (t, n) => {
|
|
164
|
+
e[t] = n, e.dispatchEvent(new CustomEvent(`${t}change`.toLowerCase(), {
|
|
165
|
+
detail: n,
|
|
166
|
+
bubbles: !0,
|
|
167
|
+
composed: !0
|
|
168
|
+
}));
|
|
169
|
+
},
|
|
170
|
+
syncModel: (t, n) => {
|
|
171
|
+
e[t] = n;
|
|
172
|
+
},
|
|
145
173
|
emit: (t, n) => e.dispatchEvent(new CustomEvent(t.toLowerCase(), {
|
|
146
174
|
detail: n,
|
|
147
175
|
bubbles: !0,
|
|
148
176
|
composed: !0
|
|
149
177
|
}))
|
|
150
|
-
}), e.addController(this), t.provides && (e[
|
|
178
|
+
}), e.addController(this), t.provides && (e[j(t.provides)] = () => t.provide?.(this.#f()));
|
|
151
179
|
}
|
|
152
180
|
get #d() {
|
|
153
181
|
return this.#a ??= this.#t.state ? this.#t.state(this.#n.inputs()) : {};
|
|
@@ -158,7 +186,7 @@ var w = (e, t) => e === t || !!e && !!t && typeof e == "object" && typeof t == "
|
|
|
158
186
|
state: this.#d,
|
|
159
187
|
id: this.#r,
|
|
160
188
|
hydrated: this.#s,
|
|
161
|
-
context: this.#t.consume ?
|
|
189
|
+
context: this.#t.consume ? N(this.#e, this.#t.consume) : void 0,
|
|
162
190
|
label: this.#o ?? null,
|
|
163
191
|
api: () => this.#i.api
|
|
164
192
|
};
|
|
@@ -182,27 +210,27 @@ var w = (e, t) => e === t || !!e && !!t && typeof e == "object" && typeof t == "
|
|
|
182
210
|
}
|
|
183
211
|
#p() {
|
|
184
212
|
let e = this.#e.getAttribute("aria-label"), t = this.#c.attrs["aria-label"];
|
|
185
|
-
e !==
|
|
213
|
+
e !== null && t != null && t !== !1 && e === String(t) || e === this.#o || (this.#o = e, this.#e.requestUpdate());
|
|
186
214
|
}
|
|
187
215
|
#m() {
|
|
188
|
-
for (let e = this.#e.parentNode; e; e = e instanceof ShadowRoot ? e.host : e.parentNode)
|
|
216
|
+
for (let e = this.#e.parentNode; e; e = e instanceof ShadowRoot ? e.host : e.parentNode) M.get(e)?.delete(this.#e);
|
|
189
217
|
}
|
|
190
218
|
#h() {
|
|
191
219
|
if (!this.#t.provides || !this.#t.provide) return;
|
|
192
220
|
let e = this.#t.provide(this.#f());
|
|
193
|
-
|
|
221
|
+
P(e, this.#l) || (this.#l = e, M.get(this.#e)?.forEach((e) => e.isConnected ? e.requestUpdate() : M.get(this.#e)?.delete(e)));
|
|
194
222
|
}
|
|
195
223
|
props() {
|
|
196
|
-
let e = this.#t.view(this.#f()), t = this.#n.hostBag ?? this.#t.host?.bind(this.#t);
|
|
197
|
-
return t && (this.#c =
|
|
224
|
+
let e = this.#t.view(this.#f()), t = this.#n.hostBag ?? f(this.#t.host?.bind(this.#t), this.#n.hostScope);
|
|
225
|
+
return t && (this.#c = x(this.#e, this.#c, t(e) ?? {})), e;
|
|
198
226
|
}
|
|
199
227
|
call(e, t) {
|
|
200
228
|
return this.#i.call(e, t);
|
|
201
229
|
}
|
|
202
|
-
},
|
|
230
|
+
}, L = s(class extends a {
|
|
203
231
|
#e = null;
|
|
204
232
|
constructor(e) {
|
|
205
|
-
if (super(e), e.type !==
|
|
233
|
+
if (super(e), e.type !== o.CHILD) throw Error("teleport() must be used in child position");
|
|
206
234
|
}
|
|
207
235
|
render(e, n) {
|
|
208
236
|
return t;
|
|
@@ -211,14 +239,14 @@ var w = (e, t) => e === t || !!e && !!t && typeof e == "object" && typeof t == "
|
|
|
211
239
|
let a = r ?? null;
|
|
212
240
|
return this.#e && this.#e !== a && n(t, this.#e), this.#e = a, a && n(i, a), t;
|
|
213
241
|
}
|
|
214
|
-
}),
|
|
215
|
-
function
|
|
216
|
-
e.dispatchEvent(new Event(
|
|
242
|
+
}), R = "mp-content-change";
|
|
243
|
+
function z(e) {
|
|
244
|
+
e.dispatchEvent(new Event(R, { bubbles: !0 }));
|
|
217
245
|
}
|
|
218
|
-
var
|
|
246
|
+
var B = (e, t) => e.length === t.length && e.every((e, n) => [.../* @__PURE__ */ new Set([...Object.keys(e), ...Object.keys(t[n])])].every((r) => e[r] === t[n][r])), V = class {
|
|
219
247
|
#e;
|
|
220
248
|
constructor(e, t, n) {
|
|
221
|
-
this.host = e, this.tag = t, this.within = n, this.value = [], this.#e = null, this.#n = () => {
|
|
249
|
+
this.host = e, this.tag = t, this.within = n, this.value = [], this.lent = [], this.#e = null, this.#n = () => {
|
|
222
250
|
this.#r() && this.host.requestUpdate();
|
|
223
251
|
}, e.addController(this);
|
|
224
252
|
}
|
|
@@ -228,10 +256,10 @@ var A = class {
|
|
|
228
256
|
}), this.#e.observe(this.host, {
|
|
229
257
|
childList: !0,
|
|
230
258
|
subtree: !0
|
|
231
|
-
}), this.host.addEventListener(
|
|
259
|
+
}), this.host.addEventListener(R, this.#n);
|
|
232
260
|
}
|
|
233
261
|
hostDisconnected() {
|
|
234
|
-
this.#e?.disconnect(), this.#e = null, this.host.removeEventListener(
|
|
262
|
+
this.#e?.disconnect(), this.#e = null, this.host.removeEventListener(R, this.#n);
|
|
235
263
|
}
|
|
236
264
|
hostUpdate() {
|
|
237
265
|
this.#r();
|
|
@@ -243,22 +271,103 @@ var A = class {
|
|
|
243
271
|
}
|
|
244
272
|
#n;
|
|
245
273
|
#r() {
|
|
246
|
-
let e = [...this.host.querySelectorAll(this.tag)].map((e) => {
|
|
274
|
+
let e = this.host.localName, t = [...this.host.querySelectorAll(this.tag)].filter((t) => t.parentElement?.closest(e) === this.host), n = t.map((e) => ({ ...e.lentSlots ?? {} })), r = t.map((e) => {
|
|
247
275
|
let t = this.within ? e.parentElement?.closest(this.within) : null;
|
|
248
276
|
return {
|
|
249
277
|
inputs: e.contentInputs ?? {},
|
|
250
278
|
within: t && this.host.contains(t) ? t.contentInputs ?? {} : null
|
|
251
279
|
};
|
|
252
|
-
});
|
|
253
|
-
return !
|
|
280
|
+
}), i = d(this.value, r), a = B(this.lent, n);
|
|
281
|
+
return i && a ? !1 : (i || (this.value = r), a || (this.lent = n), !0);
|
|
254
282
|
}
|
|
255
283
|
};
|
|
256
284
|
//#endregion
|
|
257
285
|
//#region libs/mintplayer-web-components/machine/src/mark-links.ts
|
|
258
|
-
function
|
|
259
|
-
e.filter((e) => e instanceof Element).forEach((e) =>
|
|
260
|
-
|
|
261
|
-
|
|
286
|
+
function H(e, t) {
|
|
287
|
+
e.filter((e) => e instanceof Element).forEach((e) => e.classList.add(t));
|
|
288
|
+
}
|
|
289
|
+
//#endregion
|
|
290
|
+
//#region libs/mintplayer-web-components/machine/src/core-directive.ts
|
|
291
|
+
var U = 0;
|
|
292
|
+
function W(a, o) {
|
|
293
|
+
class s extends p {
|
|
294
|
+
#e = null;
|
|
295
|
+
#t = null;
|
|
296
|
+
#n;
|
|
297
|
+
#r = `mp-overlay-d${++U}`;
|
|
298
|
+
#i = null;
|
|
299
|
+
#a(e) {
|
|
300
|
+
let t = o.overlay?.(e, this.#n) ?? null;
|
|
301
|
+
if (typeof document < "u" && document.body) {
|
|
302
|
+
if (t === null || !this.isConnected) return this.#o();
|
|
303
|
+
this.#i ??= r(document, this.#r, this.#t), n(t, this.#i);
|
|
304
|
+
}
|
|
305
|
+
}
|
|
306
|
+
#o() {
|
|
307
|
+
this.#i &&= (n(t, this.#i), i(document, this.#r), null);
|
|
308
|
+
}
|
|
309
|
+
constructor(e) {
|
|
310
|
+
if (super(e), e.type !== m.ELEMENT) throw Error(`${o.idPrefix} is an element directive: put it in an element's attribute position`);
|
|
311
|
+
}
|
|
312
|
+
render(t, n) {
|
|
313
|
+
return e;
|
|
314
|
+
}
|
|
315
|
+
update(t, [n, r]) {
|
|
316
|
+
let i = l(o.defaults, n);
|
|
317
|
+
if (this.#n = r, !this.#e || this.#t !== t.element) {
|
|
318
|
+
this.#e?.detach(), this.#t = t.element;
|
|
319
|
+
let e = this.#e = u(a, t.element, i, o.overlay ? {
|
|
320
|
+
...o,
|
|
321
|
+
onProps: (e) => this.#a(e)
|
|
322
|
+
} : o);
|
|
323
|
+
queueMicrotask(() => {
|
|
324
|
+
this.#e === e && this.isConnected && e.attach();
|
|
325
|
+
});
|
|
326
|
+
} else this.#e.update(i);
|
|
327
|
+
return e;
|
|
328
|
+
}
|
|
329
|
+
disconnected() {
|
|
330
|
+
this.#e?.detach(), this.#o();
|
|
331
|
+
}
|
|
332
|
+
reconnected() {
|
|
333
|
+
this.#e?.attach();
|
|
334
|
+
}
|
|
335
|
+
}
|
|
336
|
+
return h(s);
|
|
262
337
|
}
|
|
263
338
|
//#endregion
|
|
264
|
-
|
|
339
|
+
//#region libs/mintplayer-web-components/machine/src/body-teleport-directive.ts
|
|
340
|
+
var G = 0, K = h(class extends p {
|
|
341
|
+
#e = `mp-overlay-${++G}`;
|
|
342
|
+
#t = null;
|
|
343
|
+
#n = t;
|
|
344
|
+
#r = null;
|
|
345
|
+
constructor(e) {
|
|
346
|
+
if (super(e), e.type !== m.CHILD) throw Error("bodyTeleport() must be used in child position");
|
|
347
|
+
}
|
|
348
|
+
render(e) {
|
|
349
|
+
return t;
|
|
350
|
+
}
|
|
351
|
+
update(e, [n]) {
|
|
352
|
+
return this.#n = n, this.#r = e.parentNode instanceof Element ? e.parentNode : e.parentNode?.parentElement ?? null, this.isConnected && this.#i(), t;
|
|
353
|
+
}
|
|
354
|
+
#i() {
|
|
355
|
+
typeof document < "u" && document.body && (this.#t ??= r(document, this.#e, this.#r), n(this.#n, this.#t));
|
|
356
|
+
}
|
|
357
|
+
disconnected() {
|
|
358
|
+
this.#t &&= (n(t, this.#t), i(document, this.#e), null);
|
|
359
|
+
}
|
|
360
|
+
reconnected() {
|
|
361
|
+
this.#i();
|
|
362
|
+
}
|
|
363
|
+
}), q = s(class extends a {
|
|
364
|
+
#e = null;
|
|
365
|
+
constructor(e) {
|
|
366
|
+
if (super(e), e.type !== o.CHILD) throw Error("instanceStyle() must be used in child position");
|
|
367
|
+
}
|
|
368
|
+
render(e) {
|
|
369
|
+
return e ? (this.#e ??= document.createElement("style"), this.#e.textContent !== e && (this.#e.textContent = e), this.#e) : t;
|
|
370
|
+
}
|
|
371
|
+
});
|
|
372
|
+
//#endregion
|
|
373
|
+
export { V as ContentQuery, I as CoreController, y as EMPTY_HOST_PROPS, T as LightChildren, g as MachineController, x as applyHostProps, K as bodyTeleport, D as booleanAttribute, W as coreDirective, C as forwardHostAttrs, q as instanceStyle, H as markLinks, z as notifyContentChange, k as numberAttribute, w as ownedByTemplate, v as props, O as stringAttribute, S as takeHostAttrs, E as takeLightChildren, L as teleport };
|
|
@@ -2,6 +2,7 @@ import { ReactiveController, ReactiveControllerHost } from 'lit';
|
|
|
2
2
|
import { ContentChild } from '@mintplayer/ui-core/component';
|
|
3
3
|
/** Fired by a generated element that a parent's content query reads. */
|
|
4
4
|
export declare function notifyContentChange(element: HTMLElement): void;
|
|
5
|
+
type LentSlots = Readonly<Record<string, Node[] | undefined>>;
|
|
5
6
|
/**
|
|
6
7
|
* A manifest content query in Lit (PRD #437 D10): every `tag` element in the
|
|
7
8
|
* host's light content, in document order, with the inputs of the nearest
|
|
@@ -14,8 +15,11 @@ export declare class ContentQuery implements ReactiveController {
|
|
|
14
15
|
private readonly tag;
|
|
15
16
|
private readonly within;
|
|
16
17
|
value: readonly ContentChild[];
|
|
18
|
+
/** Each child's lent slots (a declaration's captured `slot=` children), in the same order (#458 Q15). */
|
|
19
|
+
lent: readonly LentSlots[];
|
|
17
20
|
constructor(host: ReactiveControllerHost & HTMLElement, tag: string, within: string | null);
|
|
18
21
|
hostConnected(): void;
|
|
19
22
|
hostDisconnected(): void;
|
|
20
23
|
hostUpdate(): void;
|
|
21
24
|
}
|
|
25
|
+
export {};
|
|
@@ -6,6 +6,11 @@ export interface CoreControllerOptions<I, P> {
|
|
|
6
6
|
readonly idPrefix: string;
|
|
7
7
|
/** The host element's bag, where the template root is the host (`mp-host`). Default: `core.host`. */
|
|
8
8
|
readonly hostBag?: (props: P) => CoreBag | null | undefined;
|
|
9
|
+
/**
|
|
10
|
+
* The group's scope, stamped as `data-mps` on the bag `core.host` writes where the template root is
|
|
11
|
+
* NOT the host (#460). Unlike `hostBag`, it does not make the host the core's root.
|
|
12
|
+
*/
|
|
13
|
+
readonly hostScope?: string;
|
|
9
14
|
/** Two-way inputs: properties written back when the core changes the state of the same name. */
|
|
10
15
|
readonly models?: readonly string[];
|
|
11
16
|
}
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
import { DirectiveResult } from 'lit/async-directive.js';
|
|
2
|
+
import { ComponentCore, ElementCoreOptions } from '@mintplayer/ui-core/component';
|
|
3
|
+
/** The content an overlay directive's panel renders: its second argument. */
|
|
4
|
+
export type OverlayContent = () => unknown;
|
|
5
|
+
export interface CoreDirectiveOptions<P, I> extends ElementCoreOptions<P, I> {
|
|
6
|
+
/**
|
|
7
|
+
* An overlay directive (#458 M6): the panel to render from the props, null while hidden. It renders
|
|
8
|
+
* into a body host at the end of <body>, with the directive's content.
|
|
9
|
+
*/
|
|
10
|
+
readonly overlay?: (props: P, content: OverlayContent | undefined) => unknown;
|
|
11
|
+
}
|
|
12
|
+
/**
|
|
13
|
+
* A directive core as a Lit element-part directive (#458 §4.3):
|
|
14
|
+
*
|
|
15
|
+
* html`<div ${bsRow()}><div ${bsCol({ md: 6 })}>…</div></div>`
|
|
16
|
+
*
|
|
17
|
+
* The argument is the inputs object. Outputs are DOM events on the element,
|
|
18
|
+
* lowercased. The core attaches once the element is connected, after the
|
|
19
|
+
* render that created it, and detaches while the part is disconnected.
|
|
20
|
+
*/
|
|
21
|
+
export declare function coreDirective<I, S, P, E, C, PC, M>(core: ComponentCore<I, S, P, E, C, PC, M>, options: CoreDirectiveOptions<P, I>): (inputs?: Partial<I>, content?: OverlayContent) => DirectiveResult;
|
|
@@ -15,6 +15,27 @@ export declare const EMPTY_HOST_PROPS: HostPropsState;
|
|
|
15
15
|
* this.#host = applyHostProps(this, this.#host, view.root);
|
|
16
16
|
*/
|
|
17
17
|
export declare function applyHostProps(host: Element, previous: HostPropsState, bag: AttrBag): HostPropsState;
|
|
18
|
+
/** A host's forwarded attributes (`takeHostAttrs`), and the host they came from. */
|
|
19
|
+
export interface HostAttrs {
|
|
20
|
+
readonly host: HTMLElement;
|
|
21
|
+
readonly attrs: Readonly<Record<string, string>>;
|
|
22
|
+
}
|
|
23
|
+
/**
|
|
24
|
+
* Host transparency for a compiled template whose role lives on an inner
|
|
25
|
+
* `mp-attrs` node (#458): the Lit twin of Angular's `useHostAttrs`. A
|
|
26
|
+
* consumer's `aria-*`, `id` and `tabindex` on the element belong on that node.
|
|
27
|
+
* `id` and `tabindex` are moved (no duplicate id, no dead tab stop on the
|
|
28
|
+
* host); `aria-*` are copied. Read once, before the first render. A consumer
|
|
29
|
+
* `role` is never taken: the inner node's role is the core's contract.
|
|
30
|
+
*/
|
|
31
|
+
export declare function takeHostAttrs(host: HTMLElement): HostAttrs;
|
|
32
|
+
/**
|
|
33
|
+
* The inner node's bag with the host's forwarded attributes written over it:
|
|
34
|
+
* the consumer's word wins. Except an `id` the bag sets itself, which the
|
|
35
|
+
* core's own references (a `label for`, an `aria-controls`) point at: then the
|
|
36
|
+
* consumer's id goes back to the host instead.
|
|
37
|
+
*/
|
|
38
|
+
export declare function forwardHostAttrs(bag: AttrBag | null | undefined, forwarded: HostAttrs | null | undefined): AttrBag;
|
|
18
39
|
/**
|
|
19
40
|
* A top-level node a compiled template rendered into a light-DOM host: a
|
|
20
41
|
* stamped native element, a composed child it marked `data-mp-owned`, or lit's
|
package/machine/src/index.d.ts
CHANGED
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
import { nothing } from 'lit';
|
|
2
|
+
import { Directive, DirectiveResult, PartInfo } from 'lit/directive.js';
|
|
3
|
+
/**
|
|
4
|
+
* The compiled form of a view's `<instance-style :name :css />` (#458 M4): a `<style>`
|
|
5
|
+
* holding one instance's own sheet, rendered where the tag sits. Lit does not bind
|
|
6
|
+
* inside a template's `<style>`, so the directive owns the element and rewrites its
|
|
7
|
+
* text; a null `css` renders nothing.
|
|
8
|
+
*
|
|
9
|
+
* html`${instanceStyle(view.layoutCss)}`
|
|
10
|
+
*/
|
|
11
|
+
declare class InstanceStyleDirective extends Directive {
|
|
12
|
+
#private;
|
|
13
|
+
constructor(partInfo: PartInfo);
|
|
14
|
+
render(css: string | null | undefined): HTMLStyleElement | typeof nothing;
|
|
15
|
+
}
|
|
16
|
+
export declare const instanceStyle: (css: string | null | undefined) => DirectiveResult<typeof InstanceStyleDirective>;
|
|
17
|
+
export {};
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
/**
|
|
2
2
|
* A component's consumer links (its captured child elements), marked with a
|
|
3
|
-
* Bootstrap class
|
|
4
|
-
* (`.nav-link:where([data-mps])`)
|
|
3
|
+
* Bootstrap class only. Consumer DOM is never stamped: the nav part reaches
|
|
4
|
+
* it through its anchor (`.nav-link:where([data-mps], :is(.nav, .navbar-nav)[data-mps] *)`). Idempotent: an element calls it on every update.
|
|
5
5
|
*/
|
|
6
|
-
export declare function markLinks(nodes: readonly Node[], className: string
|
|
6
|
+
export declare function markLinks(nodes: readonly Node[], className: string): void;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from './src';
|
|
@@ -0,0 +1,74 @@
|
|
|
1
|
+
import { CoreController as e, LightChildren as t, forwardHostAttrs as n, props as r, stringAttribute as i, takeHostAttrs as a } from "../machine/index.mjs";
|
|
2
|
+
import { LitElement as o, html as s, nothing as c } from "lit";
|
|
3
|
+
import { installLightStyles as l } from "@mintplayer/ui-core/scoped-styles";
|
|
4
|
+
import { marqueeCore as u, marqueeScopedStyles as d } from "@mintplayer/ui-core/marquee";
|
|
5
|
+
//#region libs/mintplayer-web-components/marquee/src/generated/marquee.view.generated.ts
|
|
6
|
+
function f({ view: e, slots: t = {}, hostAttrs: i }) {
|
|
7
|
+
return s`
|
|
8
|
+
<span data-mps="marquee" ${r(n(e.region, i))}>
|
|
9
|
+
<span data-mps="marquee" ${r(e.track)}>
|
|
10
|
+
${t.default === void 0 ? c : t.default}
|
|
11
|
+
</span>
|
|
12
|
+
</span>
|
|
13
|
+
<button data-mps="marquee" ${r(e.button)}>${e.buttonText}</button>
|
|
14
|
+
`;
|
|
15
|
+
}
|
|
16
|
+
//#endregion
|
|
17
|
+
//#region libs/mintplayer-web-components/marquee/src/generated/mp-marquee.generated.ts
|
|
18
|
+
var p = class extends o {
|
|
19
|
+
static {
|
|
20
|
+
this.properties = {
|
|
21
|
+
label: {
|
|
22
|
+
type: String,
|
|
23
|
+
converter: i(null)
|
|
24
|
+
},
|
|
25
|
+
pauseText: {
|
|
26
|
+
type: String,
|
|
27
|
+
converter: i("Pause"),
|
|
28
|
+
attribute: "pause-text"
|
|
29
|
+
},
|
|
30
|
+
resumeText: {
|
|
31
|
+
type: String,
|
|
32
|
+
converter: i("Resume"),
|
|
33
|
+
attribute: "resume-text"
|
|
34
|
+
},
|
|
35
|
+
defaultRenderer: { attribute: !1 }
|
|
36
|
+
};
|
|
37
|
+
}
|
|
38
|
+
#e = new t(this);
|
|
39
|
+
#t = new e(this, u, {
|
|
40
|
+
idPrefix: "mp-marquee",
|
|
41
|
+
inputs: () => ({
|
|
42
|
+
label: this.label,
|
|
43
|
+
pauseText: this.pauseText,
|
|
44
|
+
resumeText: this.resumeText
|
|
45
|
+
}),
|
|
46
|
+
hostBag: (e) => ({
|
|
47
|
+
...e.view.root,
|
|
48
|
+
"data-mps": "marquee"
|
|
49
|
+
})
|
|
50
|
+
});
|
|
51
|
+
constructor() {
|
|
52
|
+
super(), this.label = null, this.pauseText = "Pause", this.resumeText = "Resume";
|
|
53
|
+
}
|
|
54
|
+
createRenderRoot() {
|
|
55
|
+
return this;
|
|
56
|
+
}
|
|
57
|
+
willUpdate() {
|
|
58
|
+
this.#e.capture();
|
|
59
|
+
}
|
|
60
|
+
#n = null;
|
|
61
|
+
render() {
|
|
62
|
+
return f({
|
|
63
|
+
...this.#t.props(),
|
|
64
|
+
slots: {
|
|
65
|
+
...this.#e.slots,
|
|
66
|
+
...this.defaultRenderer ? { default: this.defaultRenderer() } : {}
|
|
67
|
+
},
|
|
68
|
+
hostAttrs: this.#n ??= a(this)
|
|
69
|
+
});
|
|
70
|
+
}
|
|
71
|
+
};
|
|
72
|
+
typeof document < "u" && document.head && l("marquee", d), customElements.get("mp-marquee") || customElements.define("mp-marquee", p);
|
|
73
|
+
//#endregion
|
|
74
|
+
export { p as MpMarquee };
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export { MpMarquee } from './mp-marquee.generated';
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import { TemplateResult } from 'lit';
|
|
2
|
+
import { HostAttrs } from '@mintplayer/web-components/machine';
|
|
3
|
+
import { MarqueeView } from '@mintplayer/ui-core/marquee';
|
|
4
|
+
export type MarqueeTemplateProps = {
|
|
5
|
+
view: MarqueeView;
|
|
6
|
+
} & {
|
|
7
|
+
slots?: {
|
|
8
|
+
default?: unknown;
|
|
9
|
+
};
|
|
10
|
+
/** The element's forwarded aria-* / id / tabindex (takeHostAttrs), for its mp-attrs node. */
|
|
11
|
+
hostAttrs?: HostAttrs | null;
|
|
12
|
+
};
|
|
13
|
+
export declare function marqueeTemplate({ view, slots, hostAttrs }: MarqueeTemplateProps): TemplateResult;
|
|
@@ -0,0 +1,48 @@
|
|
|
1
|
+
import { LitElement } from 'lit';
|
|
2
|
+
import { MarqueeInputs } from '@mintplayer/ui-core/marquee';
|
|
3
|
+
/** A scrolling ticker with a pause button (`pauseText` / `resumeText`), named by `label`. Hover, focus and reduced motion stop it. */
|
|
4
|
+
export declare class MpMarquee extends LitElement {
|
|
5
|
+
#private;
|
|
6
|
+
static properties: {
|
|
7
|
+
label: {
|
|
8
|
+
type: StringConstructor;
|
|
9
|
+
converter: {
|
|
10
|
+
fromAttribute: (value: string | null) => string | null;
|
|
11
|
+
toAttribute: (value: unknown) => string | null;
|
|
12
|
+
};
|
|
13
|
+
};
|
|
14
|
+
pauseText: {
|
|
15
|
+
type: StringConstructor;
|
|
16
|
+
converter: {
|
|
17
|
+
fromAttribute: (value: string | null) => string;
|
|
18
|
+
toAttribute: (value: unknown) => string | null;
|
|
19
|
+
};
|
|
20
|
+
attribute: string;
|
|
21
|
+
};
|
|
22
|
+
resumeText: {
|
|
23
|
+
type: StringConstructor;
|
|
24
|
+
converter: {
|
|
25
|
+
fromAttribute: (value: string | null) => string;
|
|
26
|
+
toAttribute: (value: unknown) => string | null;
|
|
27
|
+
};
|
|
28
|
+
attribute: string;
|
|
29
|
+
};
|
|
30
|
+
defaultRenderer: {
|
|
31
|
+
attribute: boolean;
|
|
32
|
+
};
|
|
33
|
+
};
|
|
34
|
+
label: MarqueeInputs['label'];
|
|
35
|
+
pauseText: MarqueeInputs['pauseText'];
|
|
36
|
+
resumeText: MarqueeInputs['resumeText'];
|
|
37
|
+
/** Renders the default slot; wins over slot="default" children. */
|
|
38
|
+
defaultRenderer: (() => unknown) | null | undefined;
|
|
39
|
+
constructor();
|
|
40
|
+
protected createRenderRoot(): HTMLElement;
|
|
41
|
+
protected willUpdate(): void;
|
|
42
|
+
render(): import('lit-html').TemplateResult;
|
|
43
|
+
}
|
|
44
|
+
declare global {
|
|
45
|
+
interface HTMLElementTagNameMap {
|
|
46
|
+
'mp-marquee': MpMarquee;
|
|
47
|
+
}
|
|
48
|
+
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from './generated';
|
package/modal/index.d.ts
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from './src';
|