@francofantomius/material-components 1.1.1 → 1.2.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/CHANGELOG.md +44 -0
- package/README.md +2 -1
- package/custom-elements.json +1049 -300
- package/dist/chunks/{account-menu-Dau0UHTl.js → account-menu-Bo7NghIm.js} +181 -223
- package/dist/chunks/{account-menu-Dau0UHTl.js.map → account-menu-Bo7NghIm.js.map} +1 -1
- package/dist/chunks/app-drawer-DjKSuatE.js +855 -0
- package/dist/chunks/{app-drawer-Du1ePzxZ.js.map → app-drawer-DjKSuatE.js.map} +1 -1
- package/dist/chunks/{badge-G4EjcMoy.js → badge-sZzNelZz.js} +30 -34
- package/dist/chunks/{badge-G4EjcMoy.js.map → badge-sZzNelZz.js.map} +1 -1
- package/dist/chunks/{bottom-sheet-q79BBYAj.js → bottom-sheet-BGgbUmKd.js} +98 -109
- package/dist/chunks/{bottom-sheet-q79BBYAj.js.map → bottom-sheet-BGgbUmKd.js.map} +1 -1
- package/dist/chunks/{button-D2vn7kJ8.js → button-DeQQlYds.js} +62 -72
- package/dist/chunks/{button-D2vn7kJ8.js.map → button-DeQQlYds.js.map} +1 -1
- package/dist/chunks/button-group-R2jN8FXK.js +136 -0
- package/dist/chunks/{button-group-CNqvJx1n.js.map → button-group-R2jN8FXK.js.map} +1 -1
- package/dist/chunks/{card-DVffdPpv.js → card-CVhWizDF.js} +45 -50
- package/dist/chunks/{card-DVffdPpv.js.map → card-CVhWizDF.js.map} +1 -1
- package/dist/chunks/{carousel-item-BG6kjjjk.js → carousel-item-DNp2zhP9.js} +62 -73
- package/dist/chunks/{carousel-item-BG6kjjjk.js.map → carousel-item-DNp2zhP9.js.map} +1 -1
- package/dist/chunks/{checkbox-BqlboAHd.js → checkbox-CsqUHVOF.js} +59 -64
- package/dist/chunks/{checkbox-BqlboAHd.js.map → checkbox-CsqUHVOF.js.map} +1 -1
- package/dist/chunks/{chip-CI1ZINnr.js → chip-B5c-I8bj.js} +56 -63
- package/dist/chunks/{chip-CI1ZINnr.js.map → chip-B5c-I8bj.js.map} +1 -1
- package/dist/chunks/code-CM6hIZNx.js +1531 -0
- package/dist/chunks/{code-C5UFBkCh.js.map → code-CM6hIZNx.js.map} +1 -1
- package/dist/chunks/date-picker-B15_rR0f.js +774 -0
- package/dist/chunks/date-picker-B15_rR0f.js.map +1 -0
- package/dist/chunks/decorate-DknOJ8FJ.js +40 -0
- package/dist/chunks/{decorate-DXuynaiA.js.map → decorate-DknOJ8FJ.js.map} +1 -1
- package/dist/chunks/{dialog-DGVEE5m_.js → dialog-Czknf8dl.js} +47 -52
- package/dist/chunks/{dialog-DGVEE5m_.js.map → dialog-Czknf8dl.js.map} +1 -1
- package/dist/chunks/divider-DIyCOosa.js +78 -0
- package/dist/chunks/{divider-DNepwoZv.js.map → divider-DIyCOosa.js.map} +1 -1
- package/dist/chunks/{fab-C9j3WBHE.js → fab-aZC0-lHo.js} +38 -44
- package/dist/chunks/{fab-C9j3WBHE.js.map → fab-aZC0-lHo.js.map} +1 -1
- package/dist/chunks/{fab-menu.css-3pu930sZ.js → fab-menu.css-BdVg1k4c.js} +5 -6
- package/dist/chunks/{fab-menu.css-3pu930sZ.js.map → fab-menu.css-BdVg1k4c.js.map} +1 -1
- package/dist/chunks/focus-ring-K6SY_mIm.js +69 -0
- package/dist/chunks/{focus-ring-CuiJuM-y.js.map → focus-ring-K6SY_mIm.js.map} +1 -1
- package/dist/chunks/form-associated-Do5uXckv.js +69 -0
- package/dist/chunks/{form-associated-Cty_ZaS9.js.map → form-associated-Do5uXckv.js.map} +1 -1
- package/dist/chunks/icon-FvKeXi61.js +59 -0
- package/dist/chunks/{icon-DrNqcNEL.js.map → icon-FvKeXi61.js.map} +1 -1
- package/dist/chunks/{icon-button-BQz73GLa.js → icon-button-CulnCZpZ.js} +58 -67
- package/dist/chunks/{icon-button-BQz73GLa.js.map → icon-button-CulnCZpZ.js.map} +1 -1
- package/dist/chunks/{list-D8olR7oZ.js → list-D7yrbJRL.js} +64 -72
- package/dist/chunks/{list-D8olR7oZ.js.map → list-D7yrbJRL.js.map} +1 -1
- package/dist/chunks/{loading-indicator-CvWnZr9o.js → loading-indicator-D9AyxNQh.js} +41 -46
- package/dist/chunks/{loading-indicator-CvWnZr9o.js.map → loading-indicator-D9AyxNQh.js.map} +1 -1
- package/dist/chunks/{menu-item-BBSp5Cqc.js → menu-item-C3entPo7.js} +77 -91
- package/dist/chunks/{menu-item-BBSp5Cqc.js.map → menu-item-C3entPo7.js.map} +1 -1
- package/dist/chunks/{navigation-bar-item-C9DfOEzg.js → navigation-bar-item-CWHCQeNw.js} +98 -115
- package/dist/chunks/{navigation-bar-item-C9DfOEzg.js.map → navigation-bar-item-CWHCQeNw.js.map} +1 -1
- package/dist/chunks/{navigation-drawer-CKl44Ef5.js → navigation-drawer-pGer0t4z.js} +116 -138
- package/dist/chunks/{navigation-drawer-CKl44Ef5.js.map → navigation-drawer-pGer0t4z.js.map} +1 -1
- package/dist/chunks/{navigation-rail-item-6pdhNHJK.js → navigation-rail-item-CWvGjLjC.js} +70 -86
- package/dist/chunks/{navigation-rail-item-6pdhNHJK.js.map → navigation-rail-item-CWvGjLjC.js.map} +1 -1
- package/dist/chunks/{player-C4ydiIpr.js → player-dT08kxeG.js} +423 -466
- package/dist/chunks/{player-C4ydiIpr.js.map → player-dT08kxeG.js.map} +1 -1
- package/dist/chunks/{progress-LQmLMDjX.js → progress-etZuX_VD.js} +46 -53
- package/dist/chunks/{progress-LQmLMDjX.js.map → progress-etZuX_VD.js.map} +1 -1
- package/dist/chunks/radio-jPCwykIa.js +197 -0
- package/dist/chunks/{radio-Bily78NT.js.map → radio-jPCwykIa.js.map} +1 -1
- package/dist/chunks/ripple-CBOKeVfm.js +132 -0
- package/dist/chunks/{ripple-squbKHhj.js.map → ripple-CBOKeVfm.js.map} +1 -1
- package/dist/chunks/{search-bar-fUD0qU2P.js → search-bar-B6xxVT7u.js} +244 -203
- package/dist/chunks/search-bar-B6xxVT7u.js.map +1 -0
- package/dist/chunks/segmented-button-Fon9kOHV.js +253 -0
- package/dist/chunks/{segmented-button-B0BvGSQ7.js.map → segmented-button-Fon9kOHV.js.map} +1 -1
- package/dist/chunks/{side-sheet-S2w081AK.js → side-sheet-sQ8qGKVm.js} +73 -81
- package/dist/chunks/{side-sheet-S2w081AK.js.map → side-sheet-sQ8qGKVm.js.map} +1 -1
- package/dist/chunks/slider-OIyEcUU9.js +448 -0
- package/dist/chunks/slider-OIyEcUU9.js.map +1 -0
- package/dist/chunks/{snackbar-Wsz3BzEY.js → snackbar-Yi6fF9vM.js} +57 -62
- package/dist/chunks/{snackbar-Wsz3BzEY.js.map → snackbar-Yi6fF9vM.js.map} +1 -1
- package/dist/chunks/{split-button-DUfjukQY.js → split-button-CLjVJe3I.js} +155 -172
- package/dist/chunks/{split-button-DUfjukQY.js.map → split-button-CLjVJe3I.js.map} +1 -1
- package/dist/chunks/{switch-DdukrvXb.js → switch-mtu6AVEh.js} +54 -57
- package/dist/chunks/{switch-DdukrvXb.js.map → switch-mtu6AVEh.js.map} +1 -1
- package/dist/chunks/table-C5rCvdFc.js +724 -0
- package/dist/chunks/{table-CqHnneAj.js.map → table-C5rCvdFc.js.map} +1 -1
- package/dist/chunks/tabs-C0mtURlT.js +182 -0
- package/dist/chunks/{tabs-BfOtoeir.js.map → tabs-C0mtURlT.js.map} +1 -1
- package/dist/chunks/{text-field-hN6-2HQy.js → text-field-MifFD7uk.js} +92 -110
- package/dist/chunks/{text-field-hN6-2HQy.js.map → text-field-MifFD7uk.js.map} +1 -1
- package/dist/chunks/time-picker-JTcLcJuz.js +810 -0
- package/dist/chunks/time-picker-JTcLcJuz.js.map +1 -0
- package/dist/chunks/{toolbar-DXVQbQKJ.js → toolbar-CsxKc2Yd.js} +48 -55
- package/dist/chunks/{toolbar-DXVQbQKJ.js.map → toolbar-CsxKc2Yd.js.map} +1 -1
- package/dist/chunks/tooltip-Ds3lNowS.js +380 -0
- package/dist/chunks/{tooltip-CE7JMHMu.js.map → tooltip-Ds3lNowS.js.map} +1 -1
- package/dist/chunks/{top-app-bar-Dgbp6CFv.js → top-app-bar-TrnjKzOX.js} +52 -53
- package/dist/chunks/top-app-bar-TrnjKzOX.js.map +1 -0
- package/dist/components/account-menu/account-menu.js +2 -8
- package/dist/components/app-drawer/app-drawer.js +2 -9
- package/dist/components/badge/badge.js +2 -4
- package/dist/components/bottom-sheet/bottom-sheet.js +2 -4
- package/dist/components/button/button.js +2 -4
- package/dist/components/button-group/button-group.js +2 -4
- package/dist/components/card/card.js +2 -4
- package/dist/components/carousel/carousel-item.js +2 -4
- package/dist/components/carousel/carousel.js +214 -232
- package/dist/components/carousel/carousel.js.map +1 -1
- package/dist/components/checkbox/checkbox.js +2 -4
- package/dist/components/chip/chip.js +2 -5
- package/dist/components/code/code.js +2 -5
- package/dist/components/date-picker/date-picker.js +2 -4
- package/dist/components/dialog/dialog.js +2 -4
- package/dist/components/divider/divider.js +2 -4
- package/dist/components/fab/fab.js +2 -4
- package/dist/components/fab-menu/fab-menu-item.js +53 -61
- package/dist/components/fab-menu/fab-menu-item.js.map +1 -1
- package/dist/components/fab-menu/fab-menu.js +98 -111
- package/dist/components/fab-menu/fab-menu.js.map +1 -1
- package/dist/components/icon/icon.js +2 -4
- package/dist/components/icon-button/icon-button.js +2 -4
- package/dist/components/list/list.js +2 -5
- package/dist/components/loading-indicator/loading-indicator.js +2 -4
- package/dist/components/menu/menu-item.js +2 -4
- package/dist/components/menu/menu.js +165 -183
- package/dist/components/menu/menu.js.map +1 -1
- package/dist/components/navigation-bar/navigation-bar-item.js +2 -5
- package/dist/components/navigation-bar/navigation-bar.js +131 -143
- package/dist/components/navigation-bar/navigation-bar.js.map +1 -1
- package/dist/components/navigation-drawer/navigation-drawer.js +2 -8
- package/dist/components/navigation-rail/navigation-rail-item.js +2 -5
- package/dist/components/navigation-rail/navigation-rail.js +92 -102
- package/dist/components/navigation-rail/navigation-rail.js.map +1 -1
- package/dist/components/player/player.js +2 -7
- package/dist/components/progress/progress.js +2 -5
- package/dist/components/radio/radio.js +2 -5
- package/dist/components/search-bar/search-bar.js +2 -5
- package/dist/components/segmented-button/segmented-button.js +2 -5
- package/dist/components/side-sheet/side-sheet.js +2 -4
- package/dist/components/slider/slider.js +2 -4
- package/dist/components/snackbar/snackbar.js +2 -4
- package/dist/components/split-button/split-button.js +2 -4
- package/dist/components/switch/switch.js +2 -4
- package/dist/components/table/table.js +2 -13
- package/dist/components/tabs/tabs.js +2 -5
- package/dist/components/text-field/text-field.js +2 -4
- package/dist/components/time-picker/time-picker.js +2 -4
- package/dist/components/toolbar/toolbar.js +2 -4
- package/dist/components/tooltip/tooltip.js +2 -4
- package/dist/components/top-app-bar/top-app-bar.js +2 -5
- package/dist/index.js +52 -150
- package/dist/internal/focus-ring/focus-ring.js +2 -4
- package/dist/internal/ripple/ripple.js +2 -4
- package/dist/tokens/index.js +468 -314
- package/dist/tokens/index.js.map +1 -1
- package/llms.txt +74 -8
- package/package.json +2 -14
- package/dist/chunks/app-drawer-Du1ePzxZ.js +0 -903
- package/dist/chunks/button-group-CNqvJx1n.js +0 -143
- package/dist/chunks/code-C5UFBkCh.js +0 -1830
- package/dist/chunks/date-picker-DJeHi4w-.js +0 -777
- package/dist/chunks/date-picker-DJeHi4w-.js.map +0 -1
- package/dist/chunks/decorate-DXuynaiA.js +0 -39
- package/dist/chunks/divider-DNepwoZv.js +0 -82
- package/dist/chunks/focus-ring-CuiJuM-y.js +0 -71
- package/dist/chunks/form-associated-Cty_ZaS9.js +0 -73
- package/dist/chunks/icon-DrNqcNEL.js +0 -62
- package/dist/chunks/radio-Bily78NT.js +0 -205
- package/dist/chunks/ripple-squbKHhj.js +0 -135
- package/dist/chunks/search-bar-fUD0qU2P.js.map +0 -1
- package/dist/chunks/segmented-button-B0BvGSQ7.js +0 -265
- package/dist/chunks/slider-D-mnO8yQ.js +0 -450
- package/dist/chunks/slider-D-mnO8yQ.js.map +0 -1
- package/dist/chunks/table-CqHnneAj.js +0 -773
- package/dist/chunks/tabs-BfOtoeir.js +0 -191
- package/dist/chunks/time-picker-CZnb2sWz.js +0 -785
- package/dist/chunks/time-picker-CZnb2sWz.js.map +0 -1
- package/dist/chunks/tooltip-CE7JMHMu.js +0 -398
- package/dist/chunks/top-app-bar-Dgbp6CFv.js.map +0 -1
- package/dist/components/account-menu/account-menu.css.d.ts +0 -3
- package/dist/components/account-menu/account-menu.css.d.ts.map +0 -1
- package/dist/components/account-menu/account-menu.d.ts +0 -111
- package/dist/components/account-menu/account-menu.d.ts.map +0 -1
- package/dist/components/app-drawer/app-drawer.css.d.ts +0 -3
- package/dist/components/app-drawer/app-drawer.css.d.ts.map +0 -1
- package/dist/components/app-drawer/app-drawer.d.ts +0 -173
- package/dist/components/app-drawer/app-drawer.d.ts.map +0 -1
- package/dist/components/badge/badge.css.d.ts +0 -2
- package/dist/components/badge/badge.css.d.ts.map +0 -1
- package/dist/components/badge/badge.d.ts +0 -16
- package/dist/components/badge/badge.d.ts.map +0 -1
- package/dist/components/bottom-sheet/bottom-sheet.css.d.ts +0 -2
- package/dist/components/bottom-sheet/bottom-sheet.css.d.ts.map +0 -1
- package/dist/components/bottom-sheet/bottom-sheet.d.ts +0 -69
- package/dist/components/bottom-sheet/bottom-sheet.d.ts.map +0 -1
- package/dist/components/button/button.css.d.ts +0 -2
- package/dist/components/button/button.css.d.ts.map +0 -1
- package/dist/components/button/button.d.ts +0 -25
- package/dist/components/button/button.d.ts.map +0 -1
- package/dist/components/button-group/button-group.css.d.ts +0 -2
- package/dist/components/button-group/button-group.css.d.ts.map +0 -1
- package/dist/components/button-group/button-group.d.ts +0 -28
- package/dist/components/button-group/button-group.d.ts.map +0 -1
- package/dist/components/card/card.css.d.ts +0 -2
- package/dist/components/card/card.css.d.ts.map +0 -1
- package/dist/components/card/card.d.ts +0 -18
- package/dist/components/card/card.d.ts.map +0 -1
- package/dist/components/carousel/carousel-item.d.ts +0 -33
- package/dist/components/carousel/carousel-item.d.ts.map +0 -1
- package/dist/components/carousel/carousel.css.d.ts +0 -3
- package/dist/components/carousel/carousel.css.d.ts.map +0 -1
- package/dist/components/carousel/carousel.d.ts +0 -81
- package/dist/components/carousel/carousel.d.ts.map +0 -1
- package/dist/components/checkbox/checkbox.css.d.ts +0 -2
- package/dist/components/checkbox/checkbox.css.d.ts.map +0 -1
- package/dist/components/checkbox/checkbox.d.ts +0 -24
- package/dist/components/checkbox/checkbox.d.ts.map +0 -1
- package/dist/components/chip/chip.css.d.ts +0 -3
- package/dist/components/chip/chip.css.d.ts.map +0 -1
- package/dist/components/chip/chip.d.ts +0 -27
- package/dist/components/chip/chip.d.ts.map +0 -1
- package/dist/components/code/code.css.d.ts +0 -2
- package/dist/components/code/code.css.d.ts.map +0 -1
- package/dist/components/code/code.d.ts +0 -106
- package/dist/components/code/code.d.ts.map +0 -1
- package/dist/components/code/highlighter.d.ts +0 -8
- package/dist/components/code/highlighter.d.ts.map +0 -1
- package/dist/components/code/linter.d.ts +0 -44
- package/dist/components/code/linter.d.ts.map +0 -1
- package/dist/components/date-picker/date-picker.css.d.ts +0 -2
- package/dist/components/date-picker/date-picker.css.d.ts.map +0 -1
- package/dist/components/date-picker/date-picker.d.ts +0 -59
- package/dist/components/date-picker/date-picker.d.ts.map +0 -1
- package/dist/components/dialog/dialog.css.d.ts +0 -2
- package/dist/components/dialog/dialog.css.d.ts.map +0 -1
- package/dist/components/dialog/dialog.d.ts +0 -22
- package/dist/components/dialog/dialog.d.ts.map +0 -1
- package/dist/components/divider/divider.css.d.ts +0 -2
- package/dist/components/divider/divider.css.d.ts.map +0 -1
- package/dist/components/divider/divider.d.ts +0 -16
- package/dist/components/divider/divider.d.ts.map +0 -1
- package/dist/components/fab/fab.css.d.ts +0 -2
- package/dist/components/fab/fab.css.d.ts.map +0 -1
- package/dist/components/fab/fab.d.ts +0 -19
- package/dist/components/fab/fab.d.ts.map +0 -1
- package/dist/components/fab-menu/fab-menu-item.d.ts +0 -35
- package/dist/components/fab-menu/fab-menu-item.d.ts.map +0 -1
- package/dist/components/fab-menu/fab-menu.css.d.ts +0 -3
- package/dist/components/fab-menu/fab-menu.css.d.ts.map +0 -1
- package/dist/components/fab-menu/fab-menu.d.ts +0 -72
- package/dist/components/fab-menu/fab-menu.d.ts.map +0 -1
- package/dist/components/icon/icon.css.d.ts +0 -2
- package/dist/components/icon/icon.css.d.ts.map +0 -1
- package/dist/components/icon/icon.d.ts +0 -15
- package/dist/components/icon/icon.d.ts.map +0 -1
- package/dist/components/icon-button/icon-button.css.d.ts +0 -2
- package/dist/components/icon-button/icon-button.css.d.ts.map +0 -1
- package/dist/components/icon-button/icon-button.d.ts +0 -22
- package/dist/components/icon-button/icon-button.d.ts.map +0 -1
- package/dist/components/list/list.css.d.ts +0 -3
- package/dist/components/list/list.css.d.ts.map +0 -1
- package/dist/components/list/list.d.ts +0 -25
- package/dist/components/list/list.d.ts.map +0 -1
- package/dist/components/loading-indicator/loading-indicator.css.d.ts +0 -2
- package/dist/components/loading-indicator/loading-indicator.css.d.ts.map +0 -1
- package/dist/components/loading-indicator/loading-indicator.d.ts +0 -48
- package/dist/components/loading-indicator/loading-indicator.d.ts.map +0 -1
- package/dist/components/menu/menu-item.d.ts +0 -41
- package/dist/components/menu/menu-item.d.ts.map +0 -1
- package/dist/components/menu/menu.css.d.ts +0 -3
- package/dist/components/menu/menu.css.d.ts.map +0 -1
- package/dist/components/menu/menu.d.ts +0 -91
- package/dist/components/menu/menu.d.ts.map +0 -1
- package/dist/components/navigation-bar/navigation-bar-item.d.ts +0 -49
- package/dist/components/navigation-bar/navigation-bar-item.d.ts.map +0 -1
- package/dist/components/navigation-bar/navigation-bar.css.d.ts +0 -3
- package/dist/components/navigation-bar/navigation-bar.css.d.ts.map +0 -1
- package/dist/components/navigation-bar/navigation-bar.d.ts +0 -50
- package/dist/components/navigation-bar/navigation-bar.d.ts.map +0 -1
- package/dist/components/navigation-drawer/navigation-drawer.css.d.ts +0 -3
- package/dist/components/navigation-drawer/navigation-drawer.css.d.ts.map +0 -1
- package/dist/components/navigation-drawer/navigation-drawer.d.ts +0 -76
- package/dist/components/navigation-drawer/navigation-drawer.d.ts.map +0 -1
- package/dist/components/navigation-rail/navigation-rail-item.d.ts +0 -36
- package/dist/components/navigation-rail/navigation-rail-item.d.ts.map +0 -1
- package/dist/components/navigation-rail/navigation-rail.css.d.ts +0 -3
- package/dist/components/navigation-rail/navigation-rail.css.d.ts.map +0 -1
- package/dist/components/navigation-rail/navigation-rail.d.ts +0 -43
- package/dist/components/navigation-rail/navigation-rail.d.ts.map +0 -1
- package/dist/components/player/player.css.d.ts +0 -2
- package/dist/components/player/player.css.d.ts.map +0 -1
- package/dist/components/player/player.d.ts +0 -99
- package/dist/components/player/player.d.ts.map +0 -1
- package/dist/components/progress/progress.css.d.ts +0 -2
- package/dist/components/progress/progress.css.d.ts.map +0 -1
- package/dist/components/progress/progress.d.ts +0 -21
- package/dist/components/progress/progress.d.ts.map +0 -1
- package/dist/components/radio/radio.css.d.ts +0 -3
- package/dist/components/radio/radio.css.d.ts.map +0 -1
- package/dist/components/radio/radio.d.ts +0 -38
- package/dist/components/radio/radio.d.ts.map +0 -1
- package/dist/components/search-bar/search-bar.css.d.ts +0 -2
- package/dist/components/search-bar/search-bar.css.d.ts.map +0 -1
- package/dist/components/search-bar/search-bar.d.ts +0 -81
- package/dist/components/search-bar/search-bar.d.ts.map +0 -1
- package/dist/components/segmented-button/segmented-button.css.d.ts +0 -3
- package/dist/components/segmented-button/segmented-button.css.d.ts.map +0 -1
- package/dist/components/segmented-button/segmented-button.d.ts +0 -40
- package/dist/components/segmented-button/segmented-button.d.ts.map +0 -1
- package/dist/components/side-sheet/side-sheet.css.d.ts +0 -2
- package/dist/components/side-sheet/side-sheet.css.d.ts.map +0 -1
- package/dist/components/side-sheet/side-sheet.d.ts +0 -57
- package/dist/components/side-sheet/side-sheet.d.ts.map +0 -1
- package/dist/components/slider/slider.css.d.ts +0 -2
- package/dist/components/slider/slider.css.d.ts.map +0 -1
- package/dist/components/slider/slider.d.ts +0 -51
- package/dist/components/slider/slider.d.ts.map +0 -1
- package/dist/components/snackbar/snackbar.css.d.ts +0 -2
- package/dist/components/snackbar/snackbar.css.d.ts.map +0 -1
- package/dist/components/snackbar/snackbar.d.ts +0 -24
- package/dist/components/snackbar/snackbar.d.ts.map +0 -1
- package/dist/components/split-button/split-button.css.d.ts +0 -2
- package/dist/components/split-button/split-button.css.d.ts.map +0 -1
- package/dist/components/split-button/split-button.d.ts +0 -89
- package/dist/components/split-button/split-button.d.ts.map +0 -1
- package/dist/components/switch/switch.css.d.ts +0 -2
- package/dist/components/switch/switch.css.d.ts.map +0 -1
- package/dist/components/switch/switch.d.ts +0 -22
- package/dist/components/switch/switch.d.ts.map +0 -1
- package/dist/components/table/table.css.d.ts +0 -8
- package/dist/components/table/table.css.d.ts.map +0 -1
- package/dist/components/table/table.d.ts +0 -158
- package/dist/components/table/table.d.ts.map +0 -1
- package/dist/components/tabs/tabs.css.d.ts +0 -3
- package/dist/components/tabs/tabs.css.d.ts.map +0 -1
- package/dist/components/tabs/tabs.d.ts +0 -33
- package/dist/components/tabs/tabs.d.ts.map +0 -1
- package/dist/components/text-field/text-field.css.d.ts +0 -2
- package/dist/components/text-field/text-field.css.d.ts.map +0 -1
- package/dist/components/text-field/text-field.d.ts +0 -40
- package/dist/components/text-field/text-field.d.ts.map +0 -1
- package/dist/components/time-picker/time-picker.css.d.ts +0 -2
- package/dist/components/time-picker/time-picker.css.d.ts.map +0 -1
- package/dist/components/time-picker/time-picker.d.ts +0 -87
- package/dist/components/time-picker/time-picker.d.ts.map +0 -1
- package/dist/components/toolbar/toolbar.css.d.ts +0 -2
- package/dist/components/toolbar/toolbar.css.d.ts.map +0 -1
- package/dist/components/toolbar/toolbar.d.ts +0 -53
- package/dist/components/toolbar/toolbar.d.ts.map +0 -1
- package/dist/components/tooltip/tooltip.css.d.ts +0 -2
- package/dist/components/tooltip/tooltip.css.d.ts.map +0 -1
- package/dist/components/tooltip/tooltip.d.ts +0 -89
- package/dist/components/tooltip/tooltip.d.ts.map +0 -1
- package/dist/components/top-app-bar/top-app-bar.css.d.ts +0 -2
- package/dist/components/top-app-bar/top-app-bar.css.d.ts.map +0 -1
- package/dist/components/top-app-bar/top-app-bar.d.ts +0 -29
- package/dist/components/top-app-bar/top-app-bar.d.ts.map +0 -1
- package/dist/index.d.ts +0 -52
- package/dist/index.d.ts.map +0 -1
- package/dist/internal/base-component.d.ts +0 -13
- package/dist/internal/base-component.d.ts.map +0 -1
- package/dist/internal/focus-ring/focus-ring.css.d.ts +0 -2
- package/dist/internal/focus-ring/focus-ring.css.d.ts.map +0 -1
- package/dist/internal/focus-ring/focus-ring.d.ts +0 -18
- package/dist/internal/focus-ring/focus-ring.d.ts.map +0 -1
- package/dist/internal/form-associated.d.ts +0 -26
- package/dist/internal/form-associated.d.ts.map +0 -1
- package/dist/internal/ripple/ripple.css.d.ts +0 -2
- package/dist/internal/ripple/ripple.css.d.ts.map +0 -1
- package/dist/internal/ripple/ripple.d.ts +0 -23
- package/dist/internal/ripple/ripple.d.ts.map +0 -1
- package/dist/tokens/colors.d.ts +0 -42
- package/dist/tokens/colors.d.ts.map +0 -1
- package/dist/tokens/elevation.d.ts +0 -9
- package/dist/tokens/elevation.d.ts.map +0 -1
- package/dist/tokens/index.d.ts +0 -7
- package/dist/tokens/index.d.ts.map +0 -1
- package/dist/tokens/motion.d.ts +0 -21
- package/dist/tokens/motion.d.ts.map +0 -1
- package/dist/tokens/shape.d.ts +0 -10
- package/dist/tokens/shape.d.ts.map +0 -1
- package/dist/tokens/theme.css.d.ts +0 -4
- package/dist/tokens/theme.css.d.ts.map +0 -1
- package/dist/tokens/typography.d.ts +0 -101
- package/dist/tokens/typography.d.ts.map +0 -1
|
@@ -1,10 +1,11 @@
|
|
|
1
|
-
import { n as
|
|
2
|
-
import "./ripple-
|
|
3
|
-
import "./focus-ring-
|
|
4
|
-
import "./icon-
|
|
5
|
-
import { css as
|
|
6
|
-
import { customElement as
|
|
7
|
-
|
|
1
|
+
import { n as e, t } from "./decorate-DknOJ8FJ.js";
|
|
2
|
+
import "./ripple-CBOKeVfm.js";
|
|
3
|
+
import "./focus-ring-K6SY_mIm.js";
|
|
4
|
+
import "./icon-FvKeXi61.js";
|
|
5
|
+
import { css as n, html as r, nothing as i } from "lit";
|
|
6
|
+
import { customElement as a, property as o, query as s, state as c } from "lit/decorators.js";
|
|
7
|
+
//#region src/components/player/player.css.ts
|
|
8
|
+
var l = n`
|
|
8
9
|
:host {
|
|
9
10
|
display: block;
|
|
10
11
|
width: 100%;
|
|
@@ -779,301 +780,298 @@ var k = w`
|
|
|
779
780
|
:host([variant="compact"]) .extra-content {
|
|
780
781
|
padding: 8px 16px;
|
|
781
782
|
}
|
|
782
|
-
`,
|
|
783
|
-
|
|
784
|
-
|
|
785
|
-
|
|
786
|
-
|
|
787
|
-
|
|
788
|
-
|
|
783
|
+
`, u = [
|
|
784
|
+
.5,
|
|
785
|
+
.75,
|
|
786
|
+
1,
|
|
787
|
+
1.25,
|
|
788
|
+
1.5,
|
|
789
|
+
2
|
|
789
790
|
];
|
|
790
|
-
function
|
|
791
|
-
|
|
792
|
-
|
|
793
|
-
|
|
791
|
+
function d(e) {
|
|
792
|
+
if (isNaN(e) || e < 0 || !isFinite(e)) return "0:00";
|
|
793
|
+
let t = Math.floor(e), n = Math.floor(t / 3600), r = Math.floor(t % 3600 / 60), i = t % 60, a = i < 10 ? `0${i}` : `${i}`;
|
|
794
|
+
return n > 0 ? `${n}:${r < 10 ? `0${r}` : `${r}`}:${a}` : `${r}:${a}`;
|
|
794
795
|
}
|
|
795
|
-
var
|
|
796
|
-
|
|
797
|
-
|
|
798
|
-
|
|
799
|
-
|
|
800
|
-
|
|
801
|
-
|
|
802
|
-
|
|
803
|
-
|
|
804
|
-
|
|
805
|
-
|
|
806
|
-
|
|
807
|
-
|
|
808
|
-
|
|
809
|
-
|
|
810
|
-
|
|
811
|
-
|
|
812
|
-
|
|
813
|
-
|
|
814
|
-
|
|
815
|
-
|
|
816
|
-
|
|
817
|
-
|
|
818
|
-
|
|
819
|
-
|
|
820
|
-
|
|
821
|
-
|
|
822
|
-
|
|
823
|
-
|
|
824
|
-
|
|
825
|
-
|
|
826
|
-
|
|
827
|
-
|
|
828
|
-
|
|
829
|
-
|
|
830
|
-
|
|
831
|
-
|
|
832
|
-
|
|
833
|
-
|
|
834
|
-
|
|
835
|
-
|
|
836
|
-
|
|
837
|
-
|
|
838
|
-
|
|
839
|
-
|
|
840
|
-
|
|
841
|
-
|
|
842
|
-
|
|
843
|
-
|
|
844
|
-
|
|
845
|
-
|
|
846
|
-
|
|
847
|
-
|
|
848
|
-
|
|
849
|
-
|
|
850
|
-
|
|
851
|
-
|
|
852
|
-
|
|
853
|
-
|
|
854
|
-
|
|
855
|
-
|
|
856
|
-
|
|
857
|
-
|
|
858
|
-
|
|
859
|
-
|
|
860
|
-
|
|
861
|
-
|
|
862
|
-
|
|
863
|
-
|
|
864
|
-
|
|
865
|
-
|
|
866
|
-
|
|
867
|
-
|
|
868
|
-
|
|
869
|
-
|
|
870
|
-
|
|
871
|
-
|
|
872
|
-
|
|
873
|
-
|
|
874
|
-
|
|
875
|
-
|
|
876
|
-
|
|
877
|
-
|
|
878
|
-
|
|
879
|
-
|
|
880
|
-
|
|
881
|
-
|
|
882
|
-
|
|
883
|
-
|
|
884
|
-
|
|
885
|
-
|
|
886
|
-
|
|
887
|
-
|
|
888
|
-
|
|
889
|
-
|
|
890
|
-
|
|
891
|
-
|
|
892
|
-
|
|
893
|
-
|
|
894
|
-
|
|
895
|
-
|
|
896
|
-
|
|
897
|
-
|
|
898
|
-
|
|
899
|
-
|
|
900
|
-
|
|
901
|
-
|
|
902
|
-
|
|
903
|
-
|
|
904
|
-
|
|
905
|
-
|
|
906
|
-
|
|
907
|
-
|
|
908
|
-
|
|
909
|
-
|
|
910
|
-
|
|
911
|
-
|
|
912
|
-
|
|
913
|
-
|
|
914
|
-
|
|
915
|
-
|
|
916
|
-
|
|
917
|
-
|
|
918
|
-
|
|
919
|
-
|
|
920
|
-
|
|
921
|
-
|
|
922
|
-
|
|
923
|
-
|
|
924
|
-
|
|
925
|
-
|
|
926
|
-
|
|
927
|
-
|
|
928
|
-
|
|
929
|
-
|
|
930
|
-
|
|
931
|
-
|
|
932
|
-
|
|
933
|
-
|
|
934
|
-
|
|
935
|
-
|
|
936
|
-
|
|
937
|
-
|
|
938
|
-
|
|
939
|
-
|
|
940
|
-
|
|
941
|
-
|
|
942
|
-
|
|
943
|
-
|
|
944
|
-
|
|
945
|
-
|
|
946
|
-
|
|
947
|
-
|
|
948
|
-
|
|
949
|
-
|
|
950
|
-
|
|
951
|
-
|
|
952
|
-
|
|
953
|
-
|
|
954
|
-
|
|
955
|
-
|
|
956
|
-
|
|
957
|
-
|
|
958
|
-
|
|
959
|
-
|
|
960
|
-
|
|
961
|
-
|
|
962
|
-
|
|
963
|
-
|
|
964
|
-
|
|
965
|
-
|
|
966
|
-
|
|
967
|
-
|
|
968
|
-
|
|
969
|
-
|
|
970
|
-
|
|
971
|
-
|
|
972
|
-
|
|
973
|
-
|
|
974
|
-
|
|
975
|
-
|
|
976
|
-
|
|
977
|
-
|
|
978
|
-
|
|
979
|
-
|
|
980
|
-
|
|
981
|
-
|
|
982
|
-
|
|
983
|
-
|
|
984
|
-
|
|
985
|
-
|
|
986
|
-
|
|
987
|
-
|
|
988
|
-
|
|
989
|
-
|
|
990
|
-
|
|
991
|
-
|
|
992
|
-
|
|
993
|
-
|
|
994
|
-
|
|
995
|
-
|
|
996
|
-
|
|
997
|
-
|
|
998
|
-
|
|
999
|
-
|
|
1000
|
-
|
|
1001
|
-
|
|
1002
|
-
|
|
1003
|
-
|
|
1004
|
-
|
|
1005
|
-
|
|
1006
|
-
|
|
1007
|
-
|
|
1008
|
-
|
|
1009
|
-
|
|
1010
|
-
|
|
1011
|
-
|
|
1012
|
-
|
|
1013
|
-
|
|
1014
|
-
|
|
1015
|
-
|
|
1016
|
-
|
|
1017
|
-
|
|
1018
|
-
|
|
1019
|
-
|
|
1020
|
-
|
|
1021
|
-
|
|
1022
|
-
|
|
1023
|
-
|
|
1024
|
-
|
|
1025
|
-
|
|
1026
|
-
|
|
1027
|
-
|
|
1028
|
-
|
|
1029
|
-
|
|
1030
|
-
|
|
1031
|
-
|
|
1032
|
-
|
|
1033
|
-
|
|
1034
|
-
|
|
1035
|
-
|
|
1036
|
-
|
|
1037
|
-
renderScrubber(e = !1) {
|
|
1038
|
-
const t = this.duration > 0 ? Math.min(1, Math.max(0, this.currentTime / this.duration)) : 0, r = (this.isDraggingScrubber ? this.scrubFraction : t) * 100, l = Math.min(1, Math.max(0, this.buffered)) * 100, u = !e && this.type !== "video", x = u && !this.paused;
|
|
1039
|
-
return a`
|
|
796
|
+
var f = class extends e {
|
|
797
|
+
constructor(...e) {
|
|
798
|
+
super(...e), this.type = "audio", this.variant = "elevated", this.src = "", this.trackTitle = "", this.artist = "", this.album = "", this.poster = "", this.currentTime = 0, this.duration = 0, this.volume = 1, this.muted = !1, this.playbackRate = 1, this.paused = !0, this.loop = !1, this.autoplay = !1, this.preload = "metadata", this.compact = !1, this.showSkip = !0, this.showSeek = !0, this.showVolume = !0, this.showPlaybackRate = !0, this.showQueue = !0, this.seekStep = 10, this.shuffle = !1, this.buffered = 0, this.crossorigin = "", this.isDraggingScrubber = !1, this.scrubFraction = 0, this.isFullscreen = !1, this.queueOpen = !1, this.controlsVisible = !0, this.hasExtraContent = !1, this.slottedMediaEl = null, this.controlsHideTimeout = null, this.handleDefaultSlotChange = (e) => {
|
|
799
|
+
let t = e.target.assignedNodes({ flatten: !0 });
|
|
800
|
+
this.hasExtraContent = t.some((e) => e.nodeType === Node.ELEMENT_NODE || e.textContent && e.textContent.trim().length > 0);
|
|
801
|
+
}, this.handleMediaSlotChange = (e) => {
|
|
802
|
+
let t = e.target.assignedElements().find((e) => e instanceof HTMLAudioElement || e instanceof HTMLVideoElement);
|
|
803
|
+
t ? (this.slottedMediaEl = t, this.bindMediaEvents(this.slottedMediaEl), this.syncMediaProperties()) : this.slottedMediaEl = null;
|
|
804
|
+
}, this.handleFullscreenChange = (e) => {
|
|
805
|
+
if (e && (e instanceof CustomEvent || e.detail !== void 0)) return;
|
|
806
|
+
if (this.type !== "video") {
|
|
807
|
+
this.isFullscreen = !1;
|
|
808
|
+
return;
|
|
809
|
+
}
|
|
810
|
+
let t = this.videoViewportEl || this.shadowRoot?.querySelector(".video-viewport"), n = !!(document.fullscreenElement === t || document.fullscreenElement === this || this.shadowRoot && this.shadowRoot.fullscreenElement === t || document.webkitFullscreenElement === t || document.webkitFullscreenElement === this || document.mozFullScreenElement === t);
|
|
811
|
+
this.isFullscreen = n, this.emitEvent("fullscreenchange", { fullscreen: n }, { bubbles: !1 });
|
|
812
|
+
}, this.handleMouseMove = () => {
|
|
813
|
+
this.controlsVisible = !0, this.controlsHideTimeout && clearTimeout(this.controlsHideTimeout), !this.paused && this.type === "video" && (this.controlsHideTimeout = setTimeout(() => {
|
|
814
|
+
this.controlsVisible = !1;
|
|
815
|
+
}, 3e3));
|
|
816
|
+
}, this.handleVolumeSliderInput = (e) => {
|
|
817
|
+
let t = e.target, n = parseFloat(t.value);
|
|
818
|
+
this.setVolume(n);
|
|
819
|
+
}, this.handleScrubberPointerDown = (e) => {
|
|
820
|
+
e.preventDefault(), this.sliderContainerEl && (this.isDraggingScrubber = !0, this.sliderContainerEl.classList.add("dragging"), this.sliderContainerEl.setPointerCapture(e.pointerId), this.updateScrubberFromPointer(e));
|
|
821
|
+
}, this.handleScrubberPointerMove = (e) => {
|
|
822
|
+
this.isDraggingScrubber && this.updateScrubberFromPointer(e);
|
|
823
|
+
}, this.handleScrubberPointerUp = (e) => {
|
|
824
|
+
if (this.isDraggingScrubber) {
|
|
825
|
+
if (this.isDraggingScrubber = !1, this.sliderContainerEl) {
|
|
826
|
+
this.sliderContainerEl.classList.remove("dragging");
|
|
827
|
+
try {
|
|
828
|
+
this.sliderContainerEl.releasePointerCapture(e.pointerId);
|
|
829
|
+
} catch {}
|
|
830
|
+
}
|
|
831
|
+
let t = (this.duration || 0) * this.scrubFraction;
|
|
832
|
+
this.seek(t);
|
|
833
|
+
}
|
|
834
|
+
}, this.handleKeyDown = (e) => {
|
|
835
|
+
let t = e.target;
|
|
836
|
+
if (t.tagName !== "INPUT" && t.tagName !== "TEXTAREA") switch (e.key) {
|
|
837
|
+
case " ":
|
|
838
|
+
case "k":
|
|
839
|
+
case "K":
|
|
840
|
+
e.preventDefault(), this.togglePlay();
|
|
841
|
+
break;
|
|
842
|
+
case "ArrowLeft":
|
|
843
|
+
case "j":
|
|
844
|
+
case "J":
|
|
845
|
+
e.preventDefault(), this.seekBy(-this.seekStep);
|
|
846
|
+
break;
|
|
847
|
+
case "ArrowRight":
|
|
848
|
+
case "l":
|
|
849
|
+
case "L":
|
|
850
|
+
e.preventDefault(), this.seekBy(this.seekStep);
|
|
851
|
+
break;
|
|
852
|
+
case "ArrowUp":
|
|
853
|
+
e.preventDefault(), this.setVolume(Math.min(1, this.volume + .1));
|
|
854
|
+
break;
|
|
855
|
+
case "ArrowDown":
|
|
856
|
+
e.preventDefault(), this.setVolume(Math.max(0, this.volume - .1));
|
|
857
|
+
break;
|
|
858
|
+
case "m":
|
|
859
|
+
case "M":
|
|
860
|
+
e.preventDefault(), this.toggleMute();
|
|
861
|
+
break;
|
|
862
|
+
case "f":
|
|
863
|
+
case "F": this.type === "video" && (e.preventDefault(), this.toggleFullscreen());
|
|
864
|
+
}
|
|
865
|
+
};
|
|
866
|
+
}
|
|
867
|
+
static {
|
|
868
|
+
this.styles = [e.styles, l];
|
|
869
|
+
}
|
|
870
|
+
connectedCallback() {
|
|
871
|
+
super.connectedCallback(), this.setAttribute("role", "region"), this.setAttribute("aria-label", this.trackTitle ? `Media Player: ${this.trackTitle}` : "Media Player"), document.addEventListener("fullscreenchange", this.handleFullscreenChange), document.addEventListener("webkitfullscreenchange", this.handleFullscreenChange), document.addEventListener("mozfullscreenchange", this.handleFullscreenChange), document.addEventListener("MSFullscreenChange", this.handleFullscreenChange);
|
|
872
|
+
}
|
|
873
|
+
disconnectedCallback() {
|
|
874
|
+
super.disconnectedCallback(), document.removeEventListener("fullscreenchange", this.handleFullscreenChange), document.removeEventListener("webkitfullscreenchange", this.handleFullscreenChange), document.removeEventListener("mozfullscreenchange", this.handleFullscreenChange), document.removeEventListener("MSFullscreenChange", this.handleFullscreenChange), this.controlsHideTimeout && clearTimeout(this.controlsHideTimeout);
|
|
875
|
+
}
|
|
876
|
+
firstUpdated() {
|
|
877
|
+
this.syncMediaProperties();
|
|
878
|
+
}
|
|
879
|
+
updated(e) {
|
|
880
|
+
super.updated(e), e.has("trackTitle") && this.setAttribute("aria-label", this.trackTitle ? `Media Player: ${this.trackTitle}` : "Media Player");
|
|
881
|
+
let t = this.getMediaElement();
|
|
882
|
+
t && (e.has("src") && this.src && t.src !== this.src && (t.src = this.src, t.load?.()), e.has("volume") && (t.volume = Math.max(0, Math.min(1, this.volume))), e.has("muted") && (t.muted = this.muted), e.has("playbackRate") && (t.playbackRate = this.playbackRate), e.has("loop") && (t.loop = this.loop));
|
|
883
|
+
}
|
|
884
|
+
getMediaElement() {
|
|
885
|
+
return this.slottedMediaEl ? this.slottedMediaEl : this.internalMediaEl || null;
|
|
886
|
+
}
|
|
887
|
+
syncMediaProperties() {
|
|
888
|
+
let e = this.getMediaElement();
|
|
889
|
+
e && (e.volume = this.volume, e.muted = this.muted, e.playbackRate = this.playbackRate, e.loop = this.loop, e.autoplay = this.autoplay, e.preload = this.preload);
|
|
890
|
+
}
|
|
891
|
+
bindMediaEvents(e) {
|
|
892
|
+
e.onplay = () => {
|
|
893
|
+
this.paused = !1, this.emitEvent("play");
|
|
894
|
+
}, e.onpause = () => {
|
|
895
|
+
this.paused = !0, this.emitEvent("pause");
|
|
896
|
+
}, e.ontimeupdate = () => {
|
|
897
|
+
this.isDraggingScrubber || (this.currentTime = e.currentTime || 0), this.emitEvent("timeupdate", {
|
|
898
|
+
currentTime: this.currentTime,
|
|
899
|
+
duration: this.duration,
|
|
900
|
+
progress: this.duration > 0 ? this.currentTime / this.duration : 0
|
|
901
|
+
});
|
|
902
|
+
}, e.ondurationchange = () => {
|
|
903
|
+
this.duration = e.duration || 0;
|
|
904
|
+
}, e.onloadedmetadata = () => {
|
|
905
|
+
this.duration = e.duration || 0, this.currentTime = e.currentTime || 0;
|
|
906
|
+
}, e.onprogress = () => {
|
|
907
|
+
if (e.buffered && e.buffered.length > 0) {
|
|
908
|
+
let t = e.buffered.end(e.buffered.length - 1);
|
|
909
|
+
this.buffered = this.duration > 0 ? t / this.duration : 0;
|
|
910
|
+
}
|
|
911
|
+
}, e.onvolumechange = () => {
|
|
912
|
+
this.volume = e.volume, this.muted = e.muted, this.emitEvent("volumechange", {
|
|
913
|
+
volume: this.volume,
|
|
914
|
+
muted: this.muted
|
|
915
|
+
});
|
|
916
|
+
}, e.onratechange = () => {
|
|
917
|
+
this.playbackRate = e.playbackRate, this.emitEvent("ratechange", { playbackRate: this.playbackRate });
|
|
918
|
+
}, e.onended = () => {
|
|
919
|
+
this.paused = !0, this.emitEvent("ended");
|
|
920
|
+
}, e.onseeking = () => {
|
|
921
|
+
this.emitEvent("seeking", { currentTime: e.currentTime });
|
|
922
|
+
}, e.onseeked = () => {
|
|
923
|
+
this.emitEvent("seeked", { currentTime: e.currentTime });
|
|
924
|
+
}, e.onerror = (e) => {
|
|
925
|
+
this.emitEvent("error", { error: e });
|
|
926
|
+
};
|
|
927
|
+
}
|
|
928
|
+
async play() {
|
|
929
|
+
let e = this.getMediaElement();
|
|
930
|
+
if (e) try {
|
|
931
|
+
await e.play();
|
|
932
|
+
} catch {
|
|
933
|
+
this.paused = !1;
|
|
934
|
+
}
|
|
935
|
+
else this.paused = !1;
|
|
936
|
+
this.paused = !1, this.emitEvent("play");
|
|
937
|
+
}
|
|
938
|
+
pause() {
|
|
939
|
+
let e = this.getMediaElement();
|
|
940
|
+
e && e.pause(), this.paused = !0, this.emitEvent("pause");
|
|
941
|
+
}
|
|
942
|
+
togglePlay() {
|
|
943
|
+
this.paused ? this.play() : this.pause();
|
|
944
|
+
}
|
|
945
|
+
seek(e) {
|
|
946
|
+
let t = Math.max(0, Math.min(this.duration || Infinity, e));
|
|
947
|
+
this.currentTime = t;
|
|
948
|
+
let n = this.getMediaElement();
|
|
949
|
+
n && (n.currentTime = t), this.emitEvent("seeked", { currentTime: t });
|
|
950
|
+
}
|
|
951
|
+
seekBy(e) {
|
|
952
|
+
this.seek(this.currentTime + e);
|
|
953
|
+
}
|
|
954
|
+
setVolume(e) {
|
|
955
|
+
let t = Math.max(0, Math.min(1, e));
|
|
956
|
+
this.volume = t, t > 0 && this.muted && (this.muted = !1);
|
|
957
|
+
let n = this.getMediaElement();
|
|
958
|
+
n && (n.volume = t, n.muted = this.muted), this.emitEvent("volumechange", {
|
|
959
|
+
volume: this.volume,
|
|
960
|
+
muted: this.muted
|
|
961
|
+
});
|
|
962
|
+
}
|
|
963
|
+
toggleMute() {
|
|
964
|
+
this.muted = !this.muted;
|
|
965
|
+
let e = this.getMediaElement();
|
|
966
|
+
e && (e.muted = this.muted), this.emitEvent("volumechange", {
|
|
967
|
+
volume: this.volume,
|
|
968
|
+
muted: this.muted
|
|
969
|
+
});
|
|
970
|
+
}
|
|
971
|
+
setPlaybackRate(e) {
|
|
972
|
+
this.playbackRate = e;
|
|
973
|
+
let t = this.getMediaElement();
|
|
974
|
+
t && (t.playbackRate = e), this.emitEvent("ratechange", { playbackRate: e });
|
|
975
|
+
}
|
|
976
|
+
cyclePlaybackRate() {
|
|
977
|
+
let e = u[(u.indexOf(this.playbackRate) + 1) % u.length] ?? 1;
|
|
978
|
+
this.setPlaybackRate(e);
|
|
979
|
+
}
|
|
980
|
+
toggleLoop() {
|
|
981
|
+
this.loop = !this.loop;
|
|
982
|
+
let e = this.getMediaElement();
|
|
983
|
+
e && (e.loop = this.loop);
|
|
984
|
+
}
|
|
985
|
+
toggleShuffle() {
|
|
986
|
+
this.shuffle = !this.shuffle, this.emitEvent("shuffle", { shuffle: this.shuffle });
|
|
987
|
+
}
|
|
988
|
+
toggleQueue() {
|
|
989
|
+
this.queueOpen = !this.queueOpen, this.emitEvent("queue", { open: this.queueOpen });
|
|
990
|
+
}
|
|
991
|
+
restart() {
|
|
992
|
+
this.seek(0), this.play();
|
|
993
|
+
}
|
|
994
|
+
async toggleFullscreen() {
|
|
995
|
+
if (this.type !== "video") return;
|
|
996
|
+
let e = this.videoViewportEl || this.shadowRoot?.querySelector(".video-viewport") || this;
|
|
997
|
+
if (document.fullscreenElement === e || document.fullscreenElement === this || this.shadowRoot && this.shadowRoot.fullscreenElement === e || document.webkitFullscreenElement === e || document.webkitFullscreenElement === this || document.mozFullScreenElement === e || document.msFullscreenElement === e) try {
|
|
998
|
+
document.exitFullscreen ? await document.exitFullscreen() : document.webkitExitFullscreen ? await document.webkitExitFullscreen() : document.mozCancelFullScreen ? await document.mozCancelFullScreen() : document.msExitFullscreen && await document.msExitFullscreen(), this.isFullscreen = !1;
|
|
999
|
+
} catch {
|
|
1000
|
+
this.isFullscreen = !1;
|
|
1001
|
+
}
|
|
1002
|
+
else try {
|
|
1003
|
+
if (e.requestFullscreen) await e.requestFullscreen();
|
|
1004
|
+
else if (e.webkitRequestFullscreen) await e.webkitRequestFullscreen();
|
|
1005
|
+
else if (e.mozRequestFullScreen) await e.mozRequestFullScreen();
|
|
1006
|
+
else if (e.msRequestFullscreen) await e.msRequestFullscreen();
|
|
1007
|
+
else {
|
|
1008
|
+
let e = this.getMediaElement();
|
|
1009
|
+
e && e.webkitEnterFullscreen && e.webkitEnterFullscreen();
|
|
1010
|
+
}
|
|
1011
|
+
this.isFullscreen = !0;
|
|
1012
|
+
} catch {
|
|
1013
|
+
this.isFullscreen = !0;
|
|
1014
|
+
}
|
|
1015
|
+
this.emitEvent("fullscreenchange", { fullscreen: this.isFullscreen }, { bubbles: !1 });
|
|
1016
|
+
}
|
|
1017
|
+
async togglePictureInPicture() {
|
|
1018
|
+
let e = this.getMediaElement();
|
|
1019
|
+
e instanceof HTMLVideoElement && "requestPictureInPicture" in e && (document.pictureInPictureElement ? await document.exitPictureInPicture() : await e.requestPictureInPicture());
|
|
1020
|
+
}
|
|
1021
|
+
previous() {
|
|
1022
|
+
this.emitEvent("previous");
|
|
1023
|
+
}
|
|
1024
|
+
next() {
|
|
1025
|
+
this.emitEvent("next");
|
|
1026
|
+
}
|
|
1027
|
+
updateScrubberFromPointer(e) {
|
|
1028
|
+
if (!this.sliderContainerEl) return;
|
|
1029
|
+
let t = this.sliderContainerEl.getBoundingClientRect(), n = Math.max(0, Math.min(t.width, e.clientX - t.left)), r = t.width > 0 ? n / t.width : 0;
|
|
1030
|
+
this.scrubFraction = Math.max(0, Math.min(1, r)), this.isDraggingScrubber && (this.currentTime = (this.duration || 0) * this.scrubFraction);
|
|
1031
|
+
}
|
|
1032
|
+
getVolumeIcon() {
|
|
1033
|
+
return this.muted || this.volume === 0 ? "volume_off" : this.volume < .5 ? "volume_down" : "volume_up";
|
|
1034
|
+
}
|
|
1035
|
+
renderScrubber(e = !1) {
|
|
1036
|
+
let t = this.duration > 0 ? Math.min(1, Math.max(0, this.currentTime / this.duration)) : 0, n = (this.isDraggingScrubber ? this.scrubFraction : t) * 100, a = Math.min(1, Math.max(0, this.buffered)) * 100, o = !e && this.type !== "video", s = o && !this.paused;
|
|
1037
|
+
return r`
|
|
1040
1038
|
<div class="scrubber-section">
|
|
1041
1039
|
<div
|
|
1042
|
-
class="progress-slider-container ${
|
|
1040
|
+
class="progress-slider-container ${s ? "playing-wave" : ""}"
|
|
1043
1041
|
role="slider"
|
|
1044
1042
|
aria-label="Seek track position"
|
|
1045
1043
|
aria-valuemin="0"
|
|
1046
1044
|
aria-valuemax=${this.duration || 100}
|
|
1047
1045
|
aria-valuenow=${this.currentTime}
|
|
1048
|
-
aria-valuetext="${
|
|
1046
|
+
aria-valuetext="${d(this.currentTime)} of ${d(this.duration)}"
|
|
1049
1047
|
tabindex="0"
|
|
1050
|
-
style="--progress-percent: ${
|
|
1048
|
+
style="--progress-percent: ${n}%;"
|
|
1051
1049
|
@pointerdown=${this.handleScrubberPointerDown}
|
|
1052
1050
|
@pointermove=${this.handleScrubberPointerMove}
|
|
1053
1051
|
@pointerup=${this.handleScrubberPointerUp}
|
|
1054
1052
|
@pointercancel=${this.handleScrubberPointerUp}
|
|
1055
1053
|
>
|
|
1056
1054
|
<div class="slider-track-bg">
|
|
1057
|
-
<div class="slider-buffer-bar" style="width: ${
|
|
1058
|
-
<div class="slider-active-bar" style="width: ${
|
|
1055
|
+
<div class="slider-buffer-bar" style="width: ${a}%"></div>
|
|
1056
|
+
<div class="slider-active-bar" style="width: ${n}%"></div>
|
|
1059
1057
|
</div>
|
|
1060
|
-
${
|
|
1061
|
-
<div class="slider-thumb" style="left: ${
|
|
1058
|
+
${o ? r`<div class="slider-sinus-wave" style="width: ${n}%"></div>` : i}
|
|
1059
|
+
<div class="slider-thumb" style="left: ${n}%"></div>
|
|
1062
1060
|
</div>
|
|
1063
1061
|
|
|
1064
1062
|
<div class="time-display">
|
|
1065
|
-
<span class="time-current">${
|
|
1066
|
-
<span class="time-duration">${
|
|
1063
|
+
<span class="time-current">${d(this.currentTime)}</span>
|
|
1064
|
+
<span class="time-duration">${d(this.duration)}</span>
|
|
1067
1065
|
</div>
|
|
1068
1066
|
</div>
|
|
1069
1067
|
`;
|
|
1070
|
-
|
|
1071
|
-
|
|
1072
|
-
|
|
1068
|
+
}
|
|
1069
|
+
renderControls(e = !1) {
|
|
1070
|
+
return r`
|
|
1073
1071
|
<div class="controls-row">
|
|
1074
1072
|
<!-- Left Group -->
|
|
1075
1073
|
<div class="controls-group-left">
|
|
1076
|
-
${e ?
|
|
1074
|
+
${e ? i : r`
|
|
1077
1075
|
<button
|
|
1078
1076
|
class="ctrl-btn ${this.shuffle ? "active" : ""}"
|
|
1079
1077
|
type="button"
|
|
@@ -1087,7 +1085,7 @@ var i = class extends v {
|
|
|
1087
1085
|
</button>
|
|
1088
1086
|
`}
|
|
1089
1087
|
|
|
1090
|
-
${this.showVolume ?
|
|
1088
|
+
${this.showVolume ? r`
|
|
1091
1089
|
<div class="volume-container">
|
|
1092
1090
|
<button
|
|
1093
1091
|
class="ctrl-btn"
|
|
@@ -1113,12 +1111,12 @@ var i = class extends v {
|
|
|
1113
1111
|
/>
|
|
1114
1112
|
</div>
|
|
1115
1113
|
</div>
|
|
1116
|
-
` :
|
|
1114
|
+
` : i}
|
|
1117
1115
|
</div>
|
|
1118
1116
|
|
|
1119
1117
|
<!-- Center Group (Primary controls) -->
|
|
1120
1118
|
<div class="controls-group-center">
|
|
1121
|
-
${this.showSkip ?
|
|
1119
|
+
${this.showSkip ? r`
|
|
1122
1120
|
<button
|
|
1123
1121
|
class="ctrl-btn"
|
|
1124
1122
|
type="button"
|
|
@@ -1129,9 +1127,9 @@ var i = class extends v {
|
|
|
1129
1127
|
<md-focus-ring></md-focus-ring>
|
|
1130
1128
|
<md-icon name="skip_previous"></md-icon>
|
|
1131
1129
|
</button>
|
|
1132
|
-
` :
|
|
1130
|
+
` : i}
|
|
1133
1131
|
|
|
1134
|
-
${this.showSeek ?
|
|
1132
|
+
${this.showSeek ? r`
|
|
1135
1133
|
<button
|
|
1136
1134
|
class="ctrl-btn"
|
|
1137
1135
|
type="button"
|
|
@@ -1142,7 +1140,7 @@ var i = class extends v {
|
|
|
1142
1140
|
<md-focus-ring></md-focus-ring>
|
|
1143
1141
|
<md-icon name="replay_10"></md-icon>
|
|
1144
1142
|
</button>
|
|
1145
|
-
` :
|
|
1143
|
+
` : i}
|
|
1146
1144
|
|
|
1147
1145
|
<button
|
|
1148
1146
|
class="play-pause-btn"
|
|
@@ -1155,7 +1153,7 @@ var i = class extends v {
|
|
|
1155
1153
|
<md-icon name=${this.paused ? "play_arrow" : "pause"}></md-icon>
|
|
1156
1154
|
</button>
|
|
1157
1155
|
|
|
1158
|
-
${this.showSeek ?
|
|
1156
|
+
${this.showSeek ? r`
|
|
1159
1157
|
<button
|
|
1160
1158
|
class="ctrl-btn"
|
|
1161
1159
|
type="button"
|
|
@@ -1166,9 +1164,9 @@ var i = class extends v {
|
|
|
1166
1164
|
<md-focus-ring></md-focus-ring>
|
|
1167
1165
|
<md-icon name="forward_10"></md-icon>
|
|
1168
1166
|
</button>
|
|
1169
|
-
` :
|
|
1167
|
+
` : i}
|
|
1170
1168
|
|
|
1171
|
-
${this.showSkip ?
|
|
1169
|
+
${this.showSkip ? r`
|
|
1172
1170
|
<button
|
|
1173
1171
|
class="ctrl-btn"
|
|
1174
1172
|
type="button"
|
|
@@ -1179,12 +1177,12 @@ var i = class extends v {
|
|
|
1179
1177
|
<md-focus-ring></md-focus-ring>
|
|
1180
1178
|
<md-icon name="skip_next"></md-icon>
|
|
1181
1179
|
</button>
|
|
1182
|
-
` :
|
|
1180
|
+
` : i}
|
|
1183
1181
|
</div>
|
|
1184
1182
|
|
|
1185
1183
|
<!-- Right Group -->
|
|
1186
1184
|
<div class="controls-group-right">
|
|
1187
|
-
${this.showPlaybackRate ?
|
|
1185
|
+
${this.showPlaybackRate ? r`
|
|
1188
1186
|
<button
|
|
1189
1187
|
class="speed-btn"
|
|
1190
1188
|
type="button"
|
|
@@ -1195,9 +1193,9 @@ var i = class extends v {
|
|
|
1195
1193
|
<md-focus-ring></md-focus-ring>
|
|
1196
1194
|
${this.playbackRate}x
|
|
1197
1195
|
</button>
|
|
1198
|
-
` :
|
|
1196
|
+
` : i}
|
|
1199
1197
|
|
|
1200
|
-
${e ?
|
|
1198
|
+
${e ? i : r`
|
|
1201
1199
|
<button
|
|
1202
1200
|
class="ctrl-btn ${this.loop ? "active" : ""}"
|
|
1203
1201
|
type="button"
|
|
@@ -1211,7 +1209,7 @@ var i = class extends v {
|
|
|
1211
1209
|
</button>
|
|
1212
1210
|
`}
|
|
1213
1211
|
|
|
1214
|
-
${!e && this.showQueue ?
|
|
1212
|
+
${!e && this.showQueue ? r`
|
|
1215
1213
|
<button
|
|
1216
1214
|
class="ctrl-btn ${this.queueOpen ? "active" : ""}"
|
|
1217
1215
|
type="button"
|
|
@@ -1223,30 +1221,30 @@ var i = class extends v {
|
|
|
1223
1221
|
<md-focus-ring></md-focus-ring>
|
|
1224
1222
|
<md-icon name="queue_music"></md-icon>
|
|
1225
1223
|
</button>
|
|
1226
|
-
` :
|
|
1224
|
+
` : i}
|
|
1227
1225
|
|
|
1228
|
-
${e ?
|
|
1226
|
+
${e ? r`
|
|
1229
1227
|
<button
|
|
1230
1228
|
class="ctrl-btn fullscreen-bottom-btn"
|
|
1231
1229
|
type="button"
|
|
1232
1230
|
aria-label="Fullscreen"
|
|
1233
|
-
@click=${(
|
|
1234
|
-
|
|
1235
|
-
|
|
1231
|
+
@click=${(e) => {
|
|
1232
|
+
e.stopPropagation(), this.toggleFullscreen();
|
|
1233
|
+
}}
|
|
1236
1234
|
>
|
|
1237
1235
|
<md-ripple></md-ripple>
|
|
1238
1236
|
<md-focus-ring></md-focus-ring>
|
|
1239
1237
|
<md-icon name=${this.isFullscreen ? "fullscreen_exit" : "fullscreen"}></md-icon>
|
|
1240
1238
|
</button>
|
|
1241
|
-
` :
|
|
1239
|
+
` : i}
|
|
1242
1240
|
|
|
1243
1241
|
<slot name="actions"></slot>
|
|
1244
1242
|
</div>
|
|
1245
1243
|
</div>
|
|
1246
1244
|
`;
|
|
1247
|
-
|
|
1248
|
-
|
|
1249
|
-
|
|
1245
|
+
}
|
|
1246
|
+
renderAudioLayout() {
|
|
1247
|
+
return r`
|
|
1250
1248
|
<div class="audio-layout">
|
|
1251
1249
|
<!-- Main Row: Image | text on left, and on small screens Previous | Stop/Play | Next on right -->
|
|
1252
1250
|
<div class="audio-main-row">
|
|
@@ -1254,7 +1252,7 @@ var i = class extends v {
|
|
|
1254
1252
|
<div class="audio-header">
|
|
1255
1253
|
<slot name="artwork">
|
|
1256
1254
|
<div class="artwork-container">
|
|
1257
|
-
${this.poster ?
|
|
1255
|
+
${this.poster ? r`<img class="artwork-img" src=${this.poster} alt=${this.trackTitle || "Track artwork"} />` : r`<md-icon class="artwork-fallback" name="music_note"></md-icon>`}
|
|
1258
1256
|
</div>
|
|
1259
1257
|
</slot>
|
|
1260
1258
|
|
|
@@ -1263,15 +1261,15 @@ var i = class extends v {
|
|
|
1263
1261
|
<span class="track-title">${this.trackTitle || "Unknown Title"}</span>
|
|
1264
1262
|
</slot>
|
|
1265
1263
|
<slot name="artist">
|
|
1266
|
-
${this.artist ?
|
|
1264
|
+
${this.artist ? r`<span class="track-artist">${this.artist}</span>` : i}
|
|
1267
1265
|
</slot>
|
|
1268
|
-
${this.album ?
|
|
1266
|
+
${this.album ? r`<span class="track-album">${this.album}</span>` : i}
|
|
1269
1267
|
</div>
|
|
1270
1268
|
</div>
|
|
1271
1269
|
|
|
1272
1270
|
<!-- Small screen compact controls: Previous song | Stop/Play | Next song on right -->
|
|
1273
1271
|
<div class="compact-controls-right">
|
|
1274
|
-
${this.showSkip ?
|
|
1272
|
+
${this.showSkip ? r`
|
|
1275
1273
|
<button
|
|
1276
1274
|
class="ctrl-btn"
|
|
1277
1275
|
type="button"
|
|
@@ -1282,7 +1280,7 @@ var i = class extends v {
|
|
|
1282
1280
|
<md-focus-ring></md-focus-ring>
|
|
1283
1281
|
<md-icon name="skip_previous"></md-icon>
|
|
1284
1282
|
</button>
|
|
1285
|
-
` :
|
|
1283
|
+
` : i}
|
|
1286
1284
|
|
|
1287
1285
|
<button
|
|
1288
1286
|
class="play-pause-btn compact-play-btn"
|
|
@@ -1295,7 +1293,7 @@ var i = class extends v {
|
|
|
1295
1293
|
<md-icon name=${this.paused ? "play_arrow" : "pause"}></md-icon>
|
|
1296
1294
|
</button>
|
|
1297
1295
|
|
|
1298
|
-
${this.showSkip ?
|
|
1296
|
+
${this.showSkip ? r`
|
|
1299
1297
|
<button
|
|
1300
1298
|
class="ctrl-btn"
|
|
1301
1299
|
type="button"
|
|
@@ -1306,7 +1304,7 @@ var i = class extends v {
|
|
|
1306
1304
|
<md-focus-ring></md-focus-ring>
|
|
1307
1305
|
<md-icon name="skip_next"></md-icon>
|
|
1308
1306
|
</button>
|
|
1309
|
-
` :
|
|
1307
|
+
` : i}
|
|
1310
1308
|
</div>
|
|
1311
1309
|
</div>
|
|
1312
1310
|
|
|
@@ -1321,52 +1319,52 @@ var i = class extends v {
|
|
|
1321
1319
|
</div>
|
|
1322
1320
|
</div>
|
|
1323
1321
|
`;
|
|
1324
|
-
|
|
1325
|
-
|
|
1326
|
-
|
|
1322
|
+
}
|
|
1323
|
+
renderVideoLayout() {
|
|
1324
|
+
return r`
|
|
1327
1325
|
<div
|
|
1328
1326
|
class="video-viewport ${this.controlsVisible ? "controls-visible" : ""}"
|
|
1329
1327
|
@mousemove=${this.handleMouseMove}
|
|
1330
1328
|
@click=${(e) => {
|
|
1331
|
-
|
|
1332
|
-
|
|
1333
|
-
|
|
1329
|
+
let t = e.target;
|
|
1330
|
+
t.closest("button") || t.closest("input") || t.closest(".progress-slider-container") || this.togglePlay();
|
|
1331
|
+
}}
|
|
1334
1332
|
>
|
|
1335
1333
|
<slot name="media" @slotchange=${this.handleMediaSlotChange}>
|
|
1336
|
-
${this.src ?
|
|
1334
|
+
${this.src ? r`
|
|
1337
1335
|
<video
|
|
1338
1336
|
src=${this.src}
|
|
1339
|
-
poster=${this.poster ||
|
|
1337
|
+
poster=${this.poster || i}
|
|
1340
1338
|
?autoplay=${this.autoplay}
|
|
1341
1339
|
?loop=${this.loop}
|
|
1342
1340
|
preload=${this.preload}
|
|
1343
|
-
crossorigin=${this.crossorigin ||
|
|
1341
|
+
crossorigin=${this.crossorigin || i}
|
|
1344
1342
|
@play=${() => {
|
|
1345
|
-
|
|
1346
|
-
|
|
1343
|
+
this.paused = !1, this.emitEvent("play");
|
|
1344
|
+
}}
|
|
1347
1345
|
@pause=${() => {
|
|
1348
|
-
|
|
1349
|
-
|
|
1346
|
+
this.paused = !0, this.emitEvent("pause");
|
|
1347
|
+
}}
|
|
1350
1348
|
@timeupdate=${() => {
|
|
1351
|
-
|
|
1352
|
-
|
|
1349
|
+
!this.isDraggingScrubber && this.internalMediaEl && (this.currentTime = this.internalMediaEl.currentTime);
|
|
1350
|
+
}}
|
|
1353
1351
|
@durationchange=${() => {
|
|
1354
|
-
|
|
1355
|
-
|
|
1352
|
+
this.internalMediaEl && (this.duration = this.internalMediaEl.duration);
|
|
1353
|
+
}}
|
|
1356
1354
|
@loadedmetadata=${() => {
|
|
1357
|
-
|
|
1358
|
-
|
|
1355
|
+
this.internalMediaEl && (this.duration = this.internalMediaEl.duration, this.currentTime = this.internalMediaEl.currentTime);
|
|
1356
|
+
}}
|
|
1359
1357
|
@progress=${() => {
|
|
1360
|
-
|
|
1361
|
-
|
|
1362
|
-
|
|
1363
|
-
|
|
1364
|
-
|
|
1358
|
+
if (this.internalMediaEl?.buffered?.length) {
|
|
1359
|
+
let e = this.internalMediaEl.buffered.end(this.internalMediaEl.buffered.length - 1);
|
|
1360
|
+
this.buffered = this.duration > 0 ? e / this.duration : 0;
|
|
1361
|
+
}
|
|
1362
|
+
}}
|
|
1365
1363
|
@ended=${() => {
|
|
1366
|
-
|
|
1367
|
-
|
|
1364
|
+
this.paused = !0, this.emitEvent("ended");
|
|
1365
|
+
}}
|
|
1368
1366
|
></video>
|
|
1369
|
-
` :
|
|
1367
|
+
` : i}
|
|
1370
1368
|
</slot>
|
|
1371
1369
|
|
|
1372
1370
|
<div class="video-overlay ${this.paused ? "" : "auto-hide"}">
|
|
@@ -1380,8 +1378,8 @@ var i = class extends v {
|
|
|
1380
1378
|
type="button"
|
|
1381
1379
|
aria-label="Picture in picture"
|
|
1382
1380
|
@click=${(e) => {
|
|
1383
|
-
|
|
1384
|
-
|
|
1381
|
+
e.stopPropagation(), this.togglePictureInPicture();
|
|
1382
|
+
}}
|
|
1385
1383
|
>
|
|
1386
1384
|
<md-ripple></md-ripple>
|
|
1387
1385
|
<md-focus-ring></md-focus-ring>
|
|
@@ -1392,8 +1390,8 @@ var i = class extends v {
|
|
|
1392
1390
|
type="button"
|
|
1393
1391
|
aria-label="Fullscreen"
|
|
1394
1392
|
@click=${(e) => {
|
|
1395
|
-
|
|
1396
|
-
|
|
1393
|
+
e.stopPropagation(), this.toggleFullscreen();
|
|
1394
|
+
}}
|
|
1397
1395
|
>
|
|
1398
1396
|
<md-ripple></md-ripple>
|
|
1399
1397
|
<md-focus-ring></md-focus-ring>
|
|
@@ -1408,8 +1406,8 @@ var i = class extends v {
|
|
|
1408
1406
|
type="button"
|
|
1409
1407
|
aria-label=${this.paused ? "Play" : "Pause"}
|
|
1410
1408
|
@click=${(e) => {
|
|
1411
|
-
|
|
1412
|
-
|
|
1409
|
+
e.stopPropagation(), this.togglePlay();
|
|
1410
|
+
}}
|
|
1413
1411
|
>
|
|
1414
1412
|
<md-ripple></md-ripple>
|
|
1415
1413
|
<md-focus-ring></md-focus-ring>
|
|
@@ -1424,48 +1422,48 @@ var i = class extends v {
|
|
|
1424
1422
|
</div>
|
|
1425
1423
|
</div>
|
|
1426
1424
|
`;
|
|
1427
|
-
|
|
1428
|
-
|
|
1429
|
-
|
|
1425
|
+
}
|
|
1426
|
+
render() {
|
|
1427
|
+
return r`
|
|
1430
1428
|
<div class="player-container" @keydown=${this.handleKeyDown}>
|
|
1431
1429
|
<!-- Hidden Native Audio when in audio mode with src -->
|
|
1432
|
-
${this.type === "audio" && this.src ?
|
|
1430
|
+
${this.type === "audio" && this.src ? r`
|
|
1433
1431
|
<audio
|
|
1434
1432
|
class="native-media"
|
|
1435
1433
|
src=${this.src}
|
|
1436
1434
|
?autoplay=${this.autoplay}
|
|
1437
1435
|
?loop=${this.loop}
|
|
1438
1436
|
preload=${this.preload}
|
|
1439
|
-
crossorigin=${this.crossorigin ||
|
|
1437
|
+
crossorigin=${this.crossorigin || i}
|
|
1440
1438
|
@play=${() => {
|
|
1441
|
-
|
|
1442
|
-
|
|
1439
|
+
this.paused = !1, this.emitEvent("play");
|
|
1440
|
+
}}
|
|
1443
1441
|
@pause=${() => {
|
|
1444
|
-
|
|
1445
|
-
|
|
1442
|
+
this.paused = !0, this.emitEvent("pause");
|
|
1443
|
+
}}
|
|
1446
1444
|
@timeupdate=${() => {
|
|
1447
|
-
|
|
1448
|
-
|
|
1445
|
+
!this.isDraggingScrubber && this.internalMediaEl && (this.currentTime = this.internalMediaEl.currentTime);
|
|
1446
|
+
}}
|
|
1449
1447
|
@durationchange=${() => {
|
|
1450
|
-
|
|
1451
|
-
|
|
1448
|
+
this.internalMediaEl && (this.duration = this.internalMediaEl.duration);
|
|
1449
|
+
}}
|
|
1452
1450
|
@loadedmetadata=${() => {
|
|
1453
|
-
|
|
1454
|
-
|
|
1451
|
+
this.internalMediaEl && (this.duration = this.internalMediaEl.duration, this.currentTime = this.internalMediaEl.currentTime);
|
|
1452
|
+
}}
|
|
1455
1453
|
@progress=${() => {
|
|
1456
|
-
|
|
1457
|
-
|
|
1458
|
-
|
|
1459
|
-
|
|
1460
|
-
|
|
1454
|
+
if (this.internalMediaEl?.buffered?.length) {
|
|
1455
|
+
let e = this.internalMediaEl.buffered.end(this.internalMediaEl.buffered.length - 1);
|
|
1456
|
+
this.buffered = this.duration > 0 ? e / this.duration : 0;
|
|
1457
|
+
}
|
|
1458
|
+
}}
|
|
1461
1459
|
@ended=${() => {
|
|
1462
|
-
|
|
1463
|
-
|
|
1460
|
+
this.paused = !0, this.emitEvent("ended");
|
|
1461
|
+
}}
|
|
1464
1462
|
></audio>
|
|
1465
|
-
` :
|
|
1463
|
+
` : i}
|
|
1466
1464
|
|
|
1467
1465
|
<!-- Audio Mode Slot Container (for slotted native audio) -->
|
|
1468
|
-
${this.type === "audio" ?
|
|
1466
|
+
${this.type === "audio" ? r`<div style="display:none;"><slot name="media" @slotchange=${this.handleMediaSlotChange}></slot></div>` : i}
|
|
1469
1467
|
|
|
1470
1468
|
${this.type === "video" ? this.renderVideoLayout() : this.renderAudioLayout()}
|
|
1471
1469
|
|
|
@@ -1474,109 +1472,68 @@ var i = class extends v {
|
|
|
1474
1472
|
</div>
|
|
1475
1473
|
</div>
|
|
1476
1474
|
`;
|
|
1477
|
-
|
|
1478
|
-
};
|
|
1479
|
-
o([s({
|
|
1480
|
-
type: String,
|
|
1481
|
-
reflect: !0
|
|
1482
|
-
})], i.prototype, "type", void 0);
|
|
1483
|
-
o([s({
|
|
1484
|
-
type: String,
|
|
1485
|
-
reflect: !0
|
|
1486
|
-
})], i.prototype, "variant", void 0);
|
|
1487
|
-
o([s({ type: String })], i.prototype, "src", void 0);
|
|
1488
|
-
o([s({
|
|
1489
|
-
type: String,
|
|
1490
|
-
attribute: "track-title"
|
|
1491
|
-
})], i.prototype, "trackTitle", void 0);
|
|
1492
|
-
o([s({ type: String })], i.prototype, "artist", void 0);
|
|
1493
|
-
o([s({ type: String })], i.prototype, "album", void 0);
|
|
1494
|
-
o([s({ type: String })], i.prototype, "poster", void 0);
|
|
1495
|
-
o([s({ type: Number })], i.prototype, "currentTime", void 0);
|
|
1496
|
-
o([s({ type: Number })], i.prototype, "duration", void 0);
|
|
1497
|
-
o([s({ type: Number })], i.prototype, "volume", void 0);
|
|
1498
|
-
o([s({
|
|
1499
|
-
type: Boolean,
|
|
1500
|
-
reflect: !0
|
|
1501
|
-
})], i.prototype, "muted", void 0);
|
|
1502
|
-
o([s({
|
|
1503
|
-
type: Number,
|
|
1504
|
-
attribute: "playback-rate"
|
|
1505
|
-
})], i.prototype, "playbackRate", void 0);
|
|
1506
|
-
o([s({
|
|
1507
|
-
type: Boolean,
|
|
1508
|
-
reflect: !0
|
|
1509
|
-
})], i.prototype, "paused", void 0);
|
|
1510
|
-
o([s({
|
|
1511
|
-
type: Boolean,
|
|
1512
|
-
reflect: !0
|
|
1513
|
-
})], i.prototype, "loop", void 0);
|
|
1514
|
-
o([s({
|
|
1515
|
-
type: Boolean,
|
|
1516
|
-
reflect: !0
|
|
1517
|
-
})], i.prototype, "autoplay", void 0);
|
|
1518
|
-
o([s({ type: String })], i.prototype, "preload", void 0);
|
|
1519
|
-
o([s({
|
|
1520
|
-
type: Boolean,
|
|
1521
|
-
reflect: !0
|
|
1522
|
-
})], i.prototype, "compact", void 0);
|
|
1523
|
-
o([s({
|
|
1524
|
-
type: Boolean,
|
|
1525
|
-
attribute: "show-skip"
|
|
1526
|
-
})], i.prototype, "showSkip", void 0);
|
|
1527
|
-
o([s({
|
|
1528
|
-
type: Boolean,
|
|
1529
|
-
attribute: "show-seek"
|
|
1530
|
-
})], i.prototype, "showSeek", void 0);
|
|
1531
|
-
o([s({
|
|
1532
|
-
type: Boolean,
|
|
1533
|
-
attribute: "show-volume"
|
|
1534
|
-
})], i.prototype, "showVolume", void 0);
|
|
1535
|
-
o([s({
|
|
1536
|
-
type: Boolean,
|
|
1537
|
-
attribute: "show-playback-rate"
|
|
1538
|
-
})], i.prototype, "showPlaybackRate", void 0);
|
|
1539
|
-
o([s({
|
|
1540
|
-
type: Boolean,
|
|
1541
|
-
attribute: "show-queue"
|
|
1542
|
-
})], i.prototype, "showQueue", void 0);
|
|
1543
|
-
o([s({
|
|
1544
|
-
type: Number,
|
|
1545
|
-
attribute: "seek-step"
|
|
1546
|
-
})], i.prototype, "seekStep", void 0);
|
|
1547
|
-
o([s({
|
|
1548
|
-
type: Boolean,
|
|
1549
|
-
reflect: !0
|
|
1550
|
-
})], i.prototype, "shuffle", void 0);
|
|
1551
|
-
o([s({ type: Number })], i.prototype, "buffered", void 0);
|
|
1552
|
-
o([s({ type: String })], i.prototype, "crossorigin", void 0);
|
|
1553
|
-
o([d()], i.prototype, "isDraggingScrubber", void 0);
|
|
1554
|
-
o([d()], i.prototype, "scrubFraction", void 0);
|
|
1555
|
-
o([d()], i.prototype, "isFullscreen", void 0);
|
|
1556
|
-
o([d()], i.prototype, "queueOpen", void 0);
|
|
1557
|
-
o([d()], i.prototype, "controlsVisible", void 0);
|
|
1558
|
-
o([d()], i.prototype, "hasExtraContent", void 0);
|
|
1559
|
-
o([b(".native-media")], i.prototype, "internalMediaEl", void 0);
|
|
1560
|
-
o([b(".progress-slider-container")], i.prototype, "sliderContainerEl", void 0);
|
|
1561
|
-
o([b(".video-viewport")], i.prototype, "videoViewportEl", void 0);
|
|
1562
|
-
i = o([h("md-player")], i);
|
|
1563
|
-
var f = class extends i {
|
|
1564
|
-
};
|
|
1565
|
-
f = o([h("md-media-player")], f);
|
|
1566
|
-
var y = class extends i {
|
|
1567
|
-
};
|
|
1568
|
-
y = o([h("md-audio-player")], y);
|
|
1569
|
-
var g = class extends i {
|
|
1570
|
-
constructor(...e) {
|
|
1571
|
-
super(...e), this.type = "video";
|
|
1572
|
-
}
|
|
1475
|
+
}
|
|
1573
1476
|
};
|
|
1574
|
-
|
|
1575
|
-
|
|
1576
|
-
|
|
1577
|
-
|
|
1578
|
-
|
|
1579
|
-
|
|
1477
|
+
t([o({
|
|
1478
|
+
type: String,
|
|
1479
|
+
reflect: !0
|
|
1480
|
+
})], f.prototype, "type", void 0), t([o({
|
|
1481
|
+
type: String,
|
|
1482
|
+
reflect: !0
|
|
1483
|
+
})], f.prototype, "variant", void 0), t([o({ type: String })], f.prototype, "src", void 0), t([o({
|
|
1484
|
+
type: String,
|
|
1485
|
+
attribute: "track-title"
|
|
1486
|
+
})], f.prototype, "trackTitle", void 0), t([o({ type: String })], f.prototype, "artist", void 0), t([o({ type: String })], f.prototype, "album", void 0), t([o({ type: String })], f.prototype, "poster", void 0), t([o({ type: Number })], f.prototype, "currentTime", void 0), t([o({ type: Number })], f.prototype, "duration", void 0), t([o({ type: Number })], f.prototype, "volume", void 0), t([o({
|
|
1487
|
+
type: Boolean,
|
|
1488
|
+
reflect: !0
|
|
1489
|
+
})], f.prototype, "muted", void 0), t([o({
|
|
1490
|
+
type: Number,
|
|
1491
|
+
attribute: "playback-rate"
|
|
1492
|
+
})], f.prototype, "playbackRate", void 0), t([o({
|
|
1493
|
+
type: Boolean,
|
|
1494
|
+
reflect: !0
|
|
1495
|
+
})], f.prototype, "paused", void 0), t([o({
|
|
1496
|
+
type: Boolean,
|
|
1497
|
+
reflect: !0
|
|
1498
|
+
})], f.prototype, "loop", void 0), t([o({
|
|
1499
|
+
type: Boolean,
|
|
1500
|
+
reflect: !0
|
|
1501
|
+
})], f.prototype, "autoplay", void 0), t([o({ type: String })], f.prototype, "preload", void 0), t([o({
|
|
1502
|
+
type: Boolean,
|
|
1503
|
+
reflect: !0
|
|
1504
|
+
})], f.prototype, "compact", void 0), t([o({
|
|
1505
|
+
type: Boolean,
|
|
1506
|
+
attribute: "show-skip"
|
|
1507
|
+
})], f.prototype, "showSkip", void 0), t([o({
|
|
1508
|
+
type: Boolean,
|
|
1509
|
+
attribute: "show-seek"
|
|
1510
|
+
})], f.prototype, "showSeek", void 0), t([o({
|
|
1511
|
+
type: Boolean,
|
|
1512
|
+
attribute: "show-volume"
|
|
1513
|
+
})], f.prototype, "showVolume", void 0), t([o({
|
|
1514
|
+
type: Boolean,
|
|
1515
|
+
attribute: "show-playback-rate"
|
|
1516
|
+
})], f.prototype, "showPlaybackRate", void 0), t([o({
|
|
1517
|
+
type: Boolean,
|
|
1518
|
+
attribute: "show-queue"
|
|
1519
|
+
})], f.prototype, "showQueue", void 0), t([o({
|
|
1520
|
+
type: Number,
|
|
1521
|
+
attribute: "seek-step"
|
|
1522
|
+
})], f.prototype, "seekStep", void 0), t([o({
|
|
1523
|
+
type: Boolean,
|
|
1524
|
+
reflect: !0
|
|
1525
|
+
})], f.prototype, "shuffle", void 0), t([o({ type: Number })], f.prototype, "buffered", void 0), t([o({ type: String })], f.prototype, "crossorigin", void 0), t([c()], f.prototype, "isDraggingScrubber", void 0), t([c()], f.prototype, "scrubFraction", void 0), t([c()], f.prototype, "isFullscreen", void 0), t([c()], f.prototype, "queueOpen", void 0), t([c()], f.prototype, "controlsVisible", void 0), t([c()], f.prototype, "hasExtraContent", void 0), t([s(".native-media")], f.prototype, "internalMediaEl", void 0), t([s(".progress-slider-container")], f.prototype, "sliderContainerEl", void 0), t([s(".video-viewport")], f.prototype, "videoViewportEl", void 0), f = t([a("md-player")], f);
|
|
1526
|
+
var p = class extends f {};
|
|
1527
|
+
p = t([a("md-media-player")], p);
|
|
1528
|
+
var m = class extends f {};
|
|
1529
|
+
m = t([a("md-audio-player")], m);
|
|
1530
|
+
var h = class extends f {
|
|
1531
|
+
constructor(...e) {
|
|
1532
|
+
super(...e), this.type = "video";
|
|
1533
|
+
}
|
|
1580
1534
|
};
|
|
1535
|
+
h = t([a("md-video-player")], h);
|
|
1536
|
+
//#endregion
|
|
1537
|
+
export { h as i, p as n, f as r, m as t };
|
|
1581
1538
|
|
|
1582
|
-
//# sourceMappingURL=player-
|
|
1539
|
+
//# sourceMappingURL=player-dT08kxeG.js.map
|