@mhmo91/schmancy 0.10.42 → 0.10.44
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/custom-elements.json +264 -79
- package/dist/SchmancyElement-CeKrBW2j.cjs +2 -0
- package/dist/SchmancyElement-CeKrBW2j.cjs.map +1 -0
- package/dist/SchmancyElement-Ob9yGkiG.js +286 -0
- package/dist/SchmancyElement-Ob9yGkiG.js.map +1 -0
- package/dist/agent/schmancy.agent.js +4032 -3886
- package/dist/agent/schmancy.agent.js.map +1 -1
- package/dist/agent/schmancy.manifest.json +215 -58
- package/dist/animation-CCOIW4wJ.cjs.map +1 -1
- package/dist/animation-DCznELuT.js.map +1 -1
- package/dist/area-CbajcnmJ.cjs +21 -0
- package/dist/area-CbajcnmJ.cjs.map +1 -0
- package/dist/{area-DtCNCb8w.js → area-MxLAyWgV.js} +22 -22
- package/dist/area-MxLAyWgV.js.map +1 -0
- package/dist/area.cjs +1 -1
- package/dist/area.js +1 -1
- package/dist/{audio-DdN76ikW.js → audio-B_0PGwYC.js} +1 -1
- package/dist/audio-B_0PGwYC.js.map +1 -0
- package/dist/{audio-B924fI5N.cjs → audio-CpwrIaw-.cjs} +1 -1
- package/dist/audio-CpwrIaw-.cjs.map +1 -0
- package/dist/audio.cjs +1 -1
- package/dist/audio.js +2 -2
- package/dist/autocomplete-CILzaDB7.cjs +115 -0
- package/dist/autocomplete-CILzaDB7.cjs.map +1 -0
- package/dist/{autocomplete-UNOknYUz.js → autocomplete-DV9RxCun.js} +113 -113
- package/dist/autocomplete-DV9RxCun.js.map +1 -0
- package/dist/autocomplete.cjs +1 -1
- package/dist/autocomplete.js +1 -1
- package/dist/avatar.cjs +1 -1
- package/dist/avatar.cjs.map +1 -1
- package/dist/avatar.js +4 -4
- package/dist/avatar.js.map +1 -1
- package/dist/badge.cjs +1 -1
- package/dist/badge.js +1 -1
- package/dist/{boat-BZah1Sf9.js → boat-DoZGgQ0P.js} +5 -5
- package/dist/{boat-BZah1Sf9.js.map → boat-DoZGgQ0P.js.map} +1 -1
- package/dist/{boat-D3bEjxf8.cjs → boat-sg0cWO8a.cjs} +2 -2
- package/dist/{boat-D3bEjxf8.cjs.map → boat-sg0cWO8a.cjs.map} +1 -1
- package/dist/boat.cjs +1 -1
- package/dist/boat.js +1 -1
- package/dist/breadcrumb.cjs +32 -31
- package/dist/breadcrumb.cjs.map +1 -1
- package/dist/breadcrumb.js +33 -32
- package/dist/breadcrumb.js.map +1 -1
- package/dist/busy-Brs-TDh9.cjs +133 -0
- package/dist/busy-Brs-TDh9.cjs.map +1 -0
- package/dist/busy-g4LoQmhB.js +172 -0
- package/dist/busy-g4LoQmhB.js.map +1 -0
- package/dist/busy.cjs +1 -1
- package/dist/busy.js +1 -1
- package/dist/{button-CTvS5YX4.cjs → button-Cml67Y_d.cjs} +41 -32
- package/dist/button-Cml67Y_d.cjs.map +1 -0
- package/dist/{button-DgoDfcJx.js → button-DWANpZfD.js} +43 -34
- package/dist/button-DWANpZfD.js.map +1 -0
- package/dist/button.cjs +40 -33
- package/dist/button.cjs.map +1 -1
- package/dist/button.js +42 -35
- package/dist/button.js.map +1 -1
- package/dist/calendar-2dJrw9pR.cjs +58 -0
- package/dist/calendar-2dJrw9pR.cjs.map +1 -0
- package/dist/calendar-kCe5LaBa.js +434 -0
- package/dist/calendar-kCe5LaBa.js.map +1 -0
- package/dist/calendar.cjs +1 -0
- package/dist/calendar.js +2 -0
- package/dist/{card-C6ijJZpF.js → card-CS_hYJbz.js} +136 -136
- package/dist/card-CS_hYJbz.js.map +1 -0
- package/dist/card-d0KhTnx5.cjs +177 -0
- package/dist/card-d0KhTnx5.cjs.map +1 -0
- package/dist/card.cjs +1 -1
- package/dist/card.js +1 -1
- package/dist/{checkbox-7vEPZuGC.js → checkbox-Bjp7kWuE.js} +2 -2
- package/dist/{checkbox-7vEPZuGC.js.map → checkbox-Bjp7kWuE.js.map} +1 -1
- package/dist/{checkbox-DXKdxkXE.cjs → checkbox-DZ2Wrz7Y.cjs} +1 -1
- package/dist/{checkbox-DXKdxkXE.cjs.map → checkbox-DZ2Wrz7Y.cjs.map} +1 -1
- package/dist/checkbox.cjs +1 -1
- package/dist/checkbox.js +1 -1
- package/dist/{chips-9eG-96_D.cjs → chips-BHBVkxsa.cjs} +142 -153
- package/dist/chips-BHBVkxsa.cjs.map +1 -0
- package/dist/{chips-DF7akwz7.js → chips-DACeW7YL.js} +127 -138
- package/dist/chips-DACeW7YL.js.map +1 -0
- package/dist/chips.cjs +1 -1
- package/dist/chips.js +2 -2
- package/dist/connectivity.cjs +53 -35
- package/dist/connectivity.cjs.map +1 -1
- package/dist/connectivity.js +55 -37
- package/dist/connectivity.js.map +1 -1
- package/dist/content-drawer.cjs +1 -1
- package/dist/content-drawer.js +1 -1
- package/dist/cursor-glow-Ah7VXSj7.js.map +1 -1
- package/dist/cursor-glow-Bulq-38P.cjs.map +1 -1
- package/dist/date-range-B2VN7cl_.cjs +138 -0
- package/dist/date-range-B2VN7cl_.cjs.map +1 -0
- package/dist/date-range-CDF_5ju_.js +439 -0
- package/dist/date-range-CDF_5ju_.js.map +1 -0
- package/dist/{date-range-inline-DV2c_gWM.cjs → date-range-inline-CGM0SPK9.cjs} +2 -4
- package/dist/date-range-inline-CGM0SPK9.cjs.map +1 -0
- package/dist/{date-range-inline-BnOD-ddB.js → date-range-inline-D6Ozerzw.js} +3 -5
- package/dist/date-range-inline-D6Ozerzw.js.map +1 -0
- package/dist/date-range-inline.cjs +1 -1
- package/dist/date-range-inline.js +1 -1
- package/dist/date-range.cjs +1 -1
- package/dist/date-range.js +2 -2
- package/dist/dayjs.min-CvRZTfam.cjs +1 -0
- package/dist/dayjs.min-CvRZTfam.cjs.map +1 -0
- package/dist/dayjs.min-DnELezPs.js +296 -0
- package/dist/dayjs.min-DnELezPs.js.map +1 -0
- package/dist/delay.cjs +1 -1
- package/dist/delay.js +3 -3
- package/dist/{details-ByF66CyY.js → details-Ct1_GwKr.js} +104 -93
- package/dist/details-Ct1_GwKr.js.map +1 -0
- package/dist/{details-B2-jECBh.cjs → details-D4fVOaj4.cjs} +109 -98
- package/dist/details-D4fVOaj4.cjs.map +1 -0
- package/dist/details.cjs +1 -1
- package/dist/details.js +1 -1
- package/dist/{directives-DCb_LA9R.cjs → directives-B2VxfwRL.cjs} +1 -1
- package/dist/directives-B2VxfwRL.cjs.map +1 -0
- package/dist/{directives-BL7mzVsA.js → directives-Dj8jlv-Q.js} +3 -3
- package/dist/directives-Dj8jlv-Q.js.map +1 -0
- package/dist/directives.cjs +1 -1
- package/dist/directives.js +2 -2
- package/dist/discovery.service-CIa3Eeuk.cjs.map +1 -1
- package/dist/discovery.service-DZFxtRwW.js.map +1 -1
- package/dist/divider-B3v33OnX.cjs +57 -0
- package/dist/divider-B3v33OnX.cjs.map +1 -0
- package/dist/divider-BJHW3q11.js +89 -0
- package/dist/divider-BJHW3q11.js.map +1 -0
- package/dist/divider.cjs +1 -1
- package/dist/divider.js +1 -1
- package/dist/dropdown.cjs +40 -40
- package/dist/dropdown.cjs.map +1 -1
- package/dist/dropdown.js +41 -41
- package/dist/dropdown.js.map +1 -1
- package/dist/{expand-cZ8rfCWP.js → expand-BT8mOu8Q.js} +103 -97
- package/dist/expand-BT8mOu8Q.js.map +1 -0
- package/dist/expand-D0YdR9nR.cjs +147 -0
- package/dist/expand-D0YdR9nR.cjs.map +1 -0
- package/dist/expand.cjs +1 -1
- package/dist/expand.js +1 -1
- package/dist/fab.cjs +1 -1
- package/dist/fab.cjs.map +1 -1
- package/dist/fab.js +2 -2
- package/dist/fab.js.map +1 -1
- package/dist/{float-DkGyWSWy.cjs → float-BPQlDyai.cjs} +1 -1
- package/dist/{float-DkGyWSWy.cjs.map → float-BPQlDyai.cjs.map} +1 -1
- package/dist/{float-zn3DgXBT.js → float-BQcxj3i_.js} +2 -2
- package/dist/{float-zn3DgXBT.js.map → float-BQcxj3i_.js.map} +1 -1
- package/dist/float.cjs +1 -1
- package/dist/float.js +1 -1
- package/dist/{form-DowzVsgI.cjs → form-CoWFnClb.cjs} +8 -13
- package/dist/form-CoWFnClb.cjs.map +1 -0
- package/dist/{form-tG7LwDm4.js → form-hC2LvCHX.js} +10 -15
- package/dist/form-hC2LvCHX.js.map +1 -0
- package/dist/form.cjs +12 -13
- package/dist/form.cjs.map +1 -1
- package/dist/form.js +23 -24
- package/dist/form.js.map +1 -1
- package/dist/gravity-6pL6CfIr.cjs.map +1 -1
- package/dist/gravity-sVK3zGBF.js.map +1 -1
- package/dist/handover/agent-runtime-followups.md +1 -1
- package/dist/handover/agent-runtime-v1.md +3 -3
- package/dist/{hashContent-iRZJJWtE.cjs.map → hashContent--s09Ed_g.cjs.map} +1 -1
- package/dist/{hashContent-BqU6v1Xr.js.map → hashContent-CAvrQ56N.js.map} +1 -1
- package/dist/icons-BeGKDZ-k.cjs +22 -0
- package/dist/icons-BeGKDZ-k.cjs.map +1 -0
- package/dist/{icons-Dup5skuk.js → icons-DEJnIxml.js} +20 -22
- package/dist/icons-DEJnIxml.js.map +1 -0
- package/dist/icons.cjs +1 -1
- package/dist/icons.js +1 -1
- package/dist/{iframe-CDJjnNmo.cjs → iframe-BkSukM9C.cjs} +9 -9
- package/dist/iframe-BkSukM9C.cjs.map +1 -0
- package/dist/{iframe-Xc3EPMZT.js → iframe-V3S-bwEY.js} +10 -10
- package/dist/iframe-V3S-bwEY.js.map +1 -0
- package/dist/iframe.cjs +1 -1
- package/dist/iframe.js +1 -1
- package/dist/index.cjs +1 -1
- package/dist/index.js +61 -60
- package/dist/{input-cTyDxW9L.js → input-CPFCSQld.js} +3 -10
- package/dist/input-CPFCSQld.js.map +1 -0
- package/dist/{input-DnmC6J1T.cjs → input-DSfwfhhj.cjs} +2 -9
- package/dist/input-DSfwfhhj.cjs.map +1 -0
- package/dist/input-chip-BUuFJUky.cjs +129 -0
- package/dist/input-chip-BUuFJUky.cjs.map +1 -0
- package/dist/{input-chip-CYI17YOq.js → input-chip-C3a1fwKB.js} +87 -104
- package/dist/input-chip-C3a1fwKB.js.map +1 -0
- package/dist/input.cjs +1 -1
- package/dist/input.js +1 -1
- package/dist/json.cjs +5 -1
- package/dist/json.cjs.map +1 -1
- package/dist/json.js +8 -4
- package/dist/json.js.map +1 -1
- package/dist/kbd.cjs +28 -28
- package/dist/kbd.cjs.map +1 -1
- package/dist/kbd.js +29 -29
- package/dist/kbd.js.map +1 -1
- package/dist/{layout-CNlZSJFU.cjs → layout-CdyHy_oX.cjs} +1 -1
- package/dist/layout-CdyHy_oX.cjs.map +1 -0
- package/dist/{layout-DDxw0EwL.js → layout-k6fOkpif.js} +1 -1
- package/dist/layout-k6fOkpif.js.map +1 -0
- package/dist/layout.cjs +26 -26
- package/dist/layout.cjs.map +1 -1
- package/dist/layout.js +27 -27
- package/dist/layout.js.map +1 -1
- package/dist/lazy-BaAiIUru.js.map +1 -1
- package/dist/lazy-C-7a4FAe.cjs.map +1 -1
- package/dist/{lightbox-CH-y3rYB.js → lightbox-DIG0VLOK.js} +8 -14
- package/dist/lightbox-DIG0VLOK.js.map +1 -0
- package/dist/{lightbox-CvtqoInF.cjs → lightbox-E5rgd-hu.cjs} +7 -13
- package/dist/lightbox-E5rgd-hu.cjs.map +1 -0
- package/dist/lightbox.cjs +1 -1
- package/dist/lightbox.js +1 -1
- package/dist/list-BRz0rDSH.cjs +47 -0
- package/dist/list-BRz0rDSH.cjs.map +1 -0
- package/dist/{list-DrsawQ5R.js → list-NrOYDPBo.js} +42 -35
- package/dist/list-NrOYDPBo.js.map +1 -0
- package/dist/list.cjs +1 -1
- package/dist/list.js +1 -1
- package/dist/magnetic-DKtc4umC.cjs.map +1 -1
- package/dist/magnetic-DaOOv5Dz.js.map +1 -1
- package/dist/{menu-CsY5lMqY.js → menu-B1Ei9SVj.js} +12 -12
- package/dist/menu-B1Ei9SVj.js.map +1 -0
- package/dist/{menu-BFRcTe3o.cjs → menu-Duvl66Nl.cjs} +10 -10
- package/dist/menu-Duvl66Nl.cjs.map +1 -0
- package/dist/menu.cjs +1 -1
- package/dist/menu.js +1 -1
- package/dist/{mixins-BoMURWag.cjs → mixins-Cjn20BQH.cjs} +42 -100
- package/dist/mixins-Cjn20BQH.cjs.map +1 -0
- package/dist/{mixins-bCEXbwJV.js → mixins-q4KAL8Xr.js} +42 -100
- package/dist/mixins-q4KAL8Xr.js.map +1 -0
- package/dist/mixins.cjs +1 -1
- package/dist/mixins.js +2 -2
- package/dist/nav-drawer.cjs +1 -1
- package/dist/nav-drawer.js +1 -1
- package/dist/navigation-bar.cjs +1 -1
- package/dist/navigation-bar.js +1 -1
- package/dist/navigation-rail.cjs +2 -4
- package/dist/navigation-rail.cjs.map +1 -1
- package/dist/navigation-rail.js +3 -5
- package/dist/navigation-rail.js.map +1 -1
- package/dist/{notification-DFKRMmSq.js → notification-COhUhUCr.js} +5 -7
- package/dist/notification-COhUhUCr.js.map +1 -0
- package/dist/{notification-FBf3Mb2e.cjs → notification-DsdA_MJe.cjs} +2 -4
- package/dist/notification-DsdA_MJe.cjs.map +1 -0
- package/dist/notification.cjs +1 -1
- package/dist/notification.js +1 -1
- package/dist/{option-Ct0lGdH3.js → option-BIzgTbXz.js} +20 -20
- package/dist/option-BIzgTbXz.js.map +1 -0
- package/dist/option-C5hhqR2z.cjs +43 -0
- package/dist/option-C5hhqR2z.cjs.map +1 -0
- package/dist/option.cjs +1 -1
- package/dist/option.js +1 -1
- package/dist/{overlay-sRXiMkjn.cjs → overlay-BzgF8P7i.cjs} +48 -41
- package/dist/overlay-BzgF8P7i.cjs.map +1 -0
- package/dist/{overlay-Bh8Q_R01.js → overlay-LoRRemny.js} +52 -45
- package/dist/overlay-LoRRemny.js.map +1 -0
- package/dist/overlay-stack-Bdr9lOqi.cjs.map +1 -1
- package/dist/overlay-stack-D2rgxQLh.js.map +1 -1
- package/dist/overlay.cjs +1 -1
- package/dist/{overlay.confirm-body-CQihsR20.js → overlay.confirm-body-D0b1MoCw.js} +30 -45
- package/dist/overlay.confirm-body-D0b1MoCw.js.map +1 -0
- package/dist/{overlay.confirm-body-Jc1EuMGs.cjs → overlay.confirm-body-DCneq73Z.cjs} +22 -37
- package/dist/overlay.confirm-body-DCneq73Z.cjs.map +1 -0
- package/dist/overlay.js +3 -3
- package/dist/{overlay.service-BXPgS7ay.js → overlay.service-BuUeti6X.js} +2 -2
- package/dist/overlay.service-BuUeti6X.js.map +1 -0
- package/dist/{overlay.service-9Dp3g7ot.cjs → overlay.service-MMTiW2T3.cjs} +1 -1
- package/dist/overlay.service-MMTiW2T3.cjs.map +1 -0
- package/dist/{progress-CYLshdo2.js → progress-D7n3SKAO.js} +50 -50
- package/dist/progress-D7n3SKAO.js.map +1 -0
- package/dist/progress-DsCnFsH5.cjs +51 -0
- package/dist/progress-DsCnFsH5.cjs.map +1 -0
- package/dist/progress.cjs +1 -1
- package/dist/progress.js +1 -1
- package/dist/{radio-group-6kCgOgBL.cjs → radio-group-CaAjg9UV.cjs} +1 -1
- package/dist/radio-group-CaAjg9UV.cjs.map +1 -0
- package/dist/{radio-group-bZtZHOj_.js → radio-group-Drpl6Pl8.js} +2 -2
- package/dist/radio-group-Drpl6Pl8.js.map +1 -0
- package/dist/radio-group.cjs +1 -1
- package/dist/radio-group.js +1 -1
- package/dist/range.cjs +4 -2
- package/dist/range.cjs.map +1 -1
- package/dist/range.js +5 -3
- package/dist/range.js.map +1 -1
- package/dist/reduced-motion-D-L12p7G.js.map +1 -1
- package/dist/reduced-motion-Ds-HjMzn.cjs.map +1 -1
- package/dist/{rxjs-utils-Csnks202.cjs.map → rxjs-utils-4P2v57ke.cjs.map} +1 -1
- package/dist/{rxjs-utils-d-ivVN84.js.map → rxjs-utils-JMFdgQSl.js.map} +1 -1
- package/dist/rxjs-utils.cjs +1 -1
- package/dist/rxjs-utils.js +1 -1
- package/dist/search-DPKoC-dT.cjs.map +1 -1
- package/dist/search-MvIBA93K.js.map +1 -1
- package/dist/{select-CU3X-PIa.js → select-CTXkrrVZ.js} +13 -13
- package/dist/select-CTXkrrVZ.js.map +1 -0
- package/dist/select-DcLcpPCh.cjs +56 -0
- package/dist/select-DcLcpPCh.cjs.map +1 -0
- package/dist/select.cjs +1 -1
- package/dist/select.js +1 -1
- package/dist/skeleton.cjs +37 -33
- package/dist/skeleton.cjs.map +1 -1
- package/dist/skeleton.js +38 -34
- package/dist/skeleton.js.map +1 -1
- package/dist/skills/schmancy/surface.md +38 -22
- package/dist/skills/surface.md +38 -22
- package/dist/slider.cjs +31 -31
- package/dist/slider.cjs.map +1 -1
- package/dist/slider.js +32 -32
- package/dist/slider.js.map +1 -1
- package/dist/{sound.service-B4ZmXpH9.js → sound.service-AJwuk3yr.js} +1 -1
- package/dist/sound.service-AJwuk3yr.js.map +1 -0
- package/dist/{sound.service-DjlMvicQ.cjs → sound.service-CVsxhQkX.cjs} +1 -1
- package/dist/sound.service-CVsxhQkX.cjs.map +1 -0
- package/dist/{splash-screen-emCLYoVl.js → splash-screen-DANfqvlo.js} +23 -26
- package/dist/splash-screen-DANfqvlo.js.map +1 -0
- package/dist/splash-screen-K74cgU6S.cjs +38 -0
- package/dist/splash-screen-K74cgU6S.cjs.map +1 -0
- package/dist/splash-screen.cjs +1 -1
- package/dist/splash-screen.js +1 -1
- package/dist/{src-DGDTkOvC.js → src-Bo-vvN6m.js} +173 -175
- package/dist/src-Bo-vvN6m.js.map +1 -0
- package/dist/src-MdpH1zth.cjs +237 -0
- package/dist/src-MdpH1zth.cjs.map +1 -0
- package/dist/{state-CumAEPQH.cjs → state-BWQiqN6I.cjs} +1 -1
- package/dist/state-BWQiqN6I.cjs.map +1 -0
- package/dist/{state-DMd_FUeA.js → state-DBA_gzJO.js} +1 -1
- package/dist/state-DBA_gzJO.js.map +1 -0
- package/dist/state.cjs +1 -1
- package/dist/state.js +2 -2
- package/dist/steps.cjs +20 -12
- package/dist/steps.cjs.map +1 -1
- package/dist/steps.js +21 -13
- package/dist/steps.js.map +1 -1
- package/dist/surface-COBvWWFb.cjs +7 -0
- package/dist/surface-COBvWWFb.cjs.map +1 -0
- package/dist/{surface-DNiYigsX.js → surface-DXk1X1tL.js} +9 -9
- package/dist/{surface-DNiYigsX.js.map → surface-DXk1X1tL.js.map} +1 -1
- package/dist/surface.cjs +1 -1
- package/dist/surface.js +1 -1
- package/dist/switch.cjs +13 -4
- package/dist/switch.cjs.map +1 -1
- package/dist/switch.js +14 -5
- package/dist/switch.js.map +1 -1
- package/dist/table.cjs +4 -10
- package/dist/table.cjs.map +1 -1
- package/dist/table.js +5 -11
- package/dist/table.js.map +1 -1
- package/dist/{tabs-4T_4kCf-.js → tabs-BYhFWnsx.js} +7 -7
- package/dist/tabs-BYhFWnsx.js.map +1 -0
- package/dist/{tabs-Byxxt-AH.cjs → tabs-CJwB0fr0.cjs} +6 -6
- package/dist/tabs-CJwB0fr0.cjs.map +1 -0
- package/dist/tabs.cjs +1 -1
- package/dist/tabs.js +1 -1
- package/dist/teleport.cjs +1 -1
- package/dist/teleport.js +1 -1
- package/dist/{textarea-kkYNk1ET.js → textarea-BjDx1w2g.js} +37 -41
- package/dist/textarea-BjDx1w2g.js.map +1 -0
- package/dist/{textarea-BwYwH9fu.cjs → textarea-CGgznhd6.cjs} +36 -40
- package/dist/textarea-CGgznhd6.cjs.map +1 -0
- package/dist/textarea.cjs +1 -1
- package/dist/textarea.js +1 -1
- package/dist/{theme-BG0EnzYP.cjs → theme-BVul7lHS.cjs} +6 -6
- package/dist/{theme-BG0EnzYP.cjs.map → theme-BVul7lHS.cjs.map} +1 -1
- package/dist/{theme-DwQBl6sr.js → theme-Dvm5J8nh.js} +11 -11
- package/dist/{theme-DwQBl6sr.js.map → theme-Dvm5J8nh.js.map} +1 -1
- package/dist/{theme-button-BD8anzsZ.js → theme-button-Bko5ohFP.js} +2 -2
- package/dist/{theme-button-BD8anzsZ.js.map → theme-button-Bko5ohFP.js.map} +1 -1
- package/dist/{theme-button-DlrNoCMA.cjs → theme-button-YLY7zR1c.cjs} +1 -1
- package/dist/{theme-button-DlrNoCMA.cjs.map → theme-button-YLY7zR1c.cjs.map} +1 -1
- package/dist/theme-button.cjs +1 -1
- package/dist/theme-button.js +1 -1
- package/dist/theme.cjs +1 -1
- package/dist/{theme.interface-CSt7JUBD.cjs.map → theme.interface-B-qxDsZQ.cjs.map} +1 -1
- package/dist/{theme.interface-odQEpZZH.js.map → theme.interface-B7caS5cg.js.map} +1 -1
- package/dist/theme.js +4 -4
- package/dist/{theme.service-Dv_55nfE.js → theme.service-D94nm7Bf.js} +1 -1
- package/dist/theme.service-D94nm7Bf.js.map +1 -0
- package/dist/{theme.service-pjkTM209.cjs → theme.service-h2fXQq7x.cjs} +1 -1
- package/dist/theme.service-h2fXQq7x.cjs.map +1 -0
- package/dist/tooltip.cjs.map +1 -1
- package/dist/tooltip.js.map +1 -1
- package/dist/tree.cjs +14 -14
- package/dist/tree.cjs.map +1 -1
- package/dist/tree.js +15 -15
- package/dist/tree.js.map +1 -1
- package/dist/types.cjs +1 -1
- package/dist/types.cjs.map +1 -1
- package/dist/types.js +19 -2
- package/dist/types.js.map +1 -1
- package/dist/typewriter.cjs.map +1 -1
- package/dist/typewriter.js.map +1 -1
- package/dist/typography-ByF2k5yW.js +358 -0
- package/dist/typography-ByF2k5yW.js.map +1 -0
- package/dist/typography-Cfav17it.cjs +282 -0
- package/dist/typography-Cfav17it.cjs.map +1 -0
- package/dist/typography.cjs +1 -1
- package/dist/typography.js +1 -1
- package/dist/utils-DIXndz6Q.cjs.map +1 -0
- package/dist/utils-dSPH7Oh9.js.map +1 -0
- package/dist/utils.cjs +1 -1
- package/dist/utils.js +1 -1
- package/dist/visually-hidden.cjs +13 -13
- package/dist/visually-hidden.cjs.map +1 -1
- package/dist/visually-hidden.js +14 -14
- package/dist/visually-hidden.js.map +1 -1
- package/dist/window-Br1OmpL-.cjs +67 -0
- package/dist/window-Br1OmpL-.cjs.map +1 -0
- package/dist/{window-C76zstbV.js → window-CCmN4but.js} +24 -15
- package/dist/window-CCmN4but.js.map +1 -0
- package/dist/window.cjs +1 -1
- package/dist/window.js +1 -1
- package/package.json +1 -1
- package/skills/schmancy/surface.md +38 -22
- package/src/area/area.component.ts +249 -163
- package/src/area/area.service.test.ts +994 -1006
- package/src/area/area.service.ts +76 -72
- package/src/area/index.ts +7 -7
- package/src/area/lazy.ts +39 -42
- package/src/area/route.component.ts +54 -52
- package/src/area/router.types.ts +7 -7
- package/src/audio/emotional-sounds.ts +880 -801
- package/src/audio/sound.service.ts +26 -5
- package/src/avatar/avatar.ts +4 -4
- package/src/badge/badge.ts +15 -12
- package/src/badge/index.ts +1 -1
- package/src/boat/boat.ts +1 -1
- package/src/breadcrumb/breadcrumb.ts +37 -32
- package/src/busy/busy.ts +15 -12
- package/src/busy/index.ts +2 -2
- package/src/busy/spinner.ts +132 -119
- package/src/button/button.test.ts +5 -1
- package/src/button/button.ts +113 -72
- package/src/button/icon-button.ts +64 -46
- package/src/button/index.ts +2 -2
- package/src/calendar/calendar.test.ts +504 -0
- package/src/calendar/calendar.ts +587 -0
- package/src/calendar/index.ts +2 -0
- package/src/card/actions.ts +11 -9
- package/src/card/card.ts +79 -77
- package/src/card/content.ts +8 -6
- package/src/card/index.ts +4 -4
- package/src/card/media.ts +50 -50
- package/src/chips/assist-chip.ts +1 -1
- package/src/chips/chips.ts +1 -1
- package/src/chips/filter-chip.ts +1 -1
- package/src/chips/index.ts +1 -1
- package/src/chips/input-chip.ts +1 -1
- package/src/chips/suggestion-chip.ts +1 -1
- package/src/connectivity/connectivity-status.ts +90 -62
- package/src/content-drawer/drawer.service.ts +47 -36
- package/src/content-drawer/drawer.ts +31 -18
- package/src/content-drawer/index.ts +5 -5
- package/src/content-drawer/main.ts +9 -7
- package/src/content-drawer/sheet.ts +8 -6
- package/src/date-range-inline/date-range-inline.ts +523 -522
- package/src/date-range-inline/index.ts +2 -2
- package/src/delay/index.ts +1 -1
- package/src/details/details.ts +119 -105
- package/src/details/index.ts +1 -1
- package/src/directives/ai-badge.ts +1 -5
- package/src/directives/animate-text.ts +43 -31
- package/src/directives/art/effects/howl.ts +1 -4
- package/src/directives/art/effects/samwa.ts +11 -5
- package/src/directives/art/effects/snow.ts +1 -2
- package/src/directives/battery.ts +21 -12
- package/src/directives/confirm-click.ts +9 -17
- package/src/directives/cursor-glow.ts +1 -1
- package/src/directives/cycle-text.ts +7 -21
- package/src/directives/drag.ts +50 -45
- package/src/directives/fyi.ts +1 -6
- package/src/directives/gravity.ts +10 -8
- package/src/directives/hummingbird.ts +256 -107
- package/src/directives/index.ts +29 -29
- package/src/directives/intersect.ts +11 -11
- package/src/directives/layout.ts +25 -36
- package/src/directives/liquid.ts +4 -10
- package/src/directives/living-border.ts +7 -5
- package/src/directives/long-press.ts +2 -1
- package/src/directives/magnetic.ts +7 -6
- package/src/directives/nebula.ts +34 -28
- package/src/directives/overflow-within.ts +18 -20
- package/src/directives/reduced-motion.ts +9 -9
- package/src/directives/reveal.ts +193 -195
- package/src/directives/ripple.ts +9 -7
- package/src/directives/urgent.ts +3 -1
- package/src/directives/working-snake.ts +1 -1
- package/src/discovery/discovery.service.ts +198 -210
- package/src/discovery/index.ts +1 -1
- package/src/divider/divider.ts +49 -47
- package/src/divider/index.ts +1 -1
- package/src/dropdown/dropdown-content.ts +42 -40
- package/src/dropdown/index.ts +2 -2
- package/src/expand/expand-root.component.ts +70 -61
- package/src/expand/expand.component.ts +48 -43
- package/src/fab/fab.test.ts +1 -2
- package/src/fab/fab.ts +2 -4
- package/src/form/fields/autocomplete/autocomplete.scss +6 -2
- package/src/form/fields/autocomplete/autocomplete.ts +712 -724
- package/src/form/fields/autocomplete/index.ts +1 -1
- package/src/form/fields/checkbox/checkbox.ts +1 -4
- package/src/form/fields/chips/assist-chip.ts +69 -72
- package/src/form/fields/chips/chips.ts +14 -15
- package/src/form/fields/chips/filter-chip.ts +36 -32
- package/src/form/fields/chips/index.ts +5 -5
- package/src/form/fields/chips/input-chip.ts +130 -142
- package/src/form/fields/chips/suggestion-chip.ts +69 -72
- package/src/form/fields/date-range/date-range-dialog.ts +154 -194
- package/src/form/fields/date-range/date-range-helpers.ts +63 -64
- package/src/form/fields/date-range/date-range.test.ts +575 -121
- package/src/form/fields/date-range/date-range.ts +343 -395
- package/src/form/fields/date-range/index.ts +2 -2
- package/src/form/fields/input/index.ts +8 -8
- package/src/form/fields/input/input.scss +30 -26
- package/src/form/fields/input/input.test.ts +4 -1
- package/src/form/fields/input/input.ts +4 -20
- package/src/form/fields/radio-group/index.ts +2 -2
- package/src/form/fields/radio-group/radio-button.ts +8 -8
- package/src/form/fields/radio-group/radio-group.ts +4 -1
- package/src/form/fields/range/range.ts +3 -1
- package/src/form/fields/select/index.ts +2 -2
- package/src/form/fields/select/select.ts +51 -45
- package/src/form/fields/switch/switch.ts +13 -7
- package/src/form/fields/textarea/index.ts +1 -1
- package/src/form/fields/textarea/textarea.ts +44 -49
- package/src/form/form-summary.ts +15 -14
- package/src/form/form.test.ts +0 -1
- package/src/form/form.ts +11 -23
- package/src/icons/icon.ts +25 -25
- package/src/icons/index.ts +1 -1
- package/src/iframe/iframe.ts +11 -9
- package/src/index.ts +1 -0
- package/src/json/json.ts +9 -2
- package/src/kbd/kbd.ts +30 -28
- package/src/layout/scroll/index.ts +1 -1
- package/src/layout/scroll/scroll.ts +54 -54
- package/src/lightbox/lightbox-service.ts +27 -18
- package/src/lightbox/lightbox.directive.ts +2 -1
- package/src/lightbox/lightbox.ts +21 -38
- package/src/list/index.ts +3 -3
- package/src/list/list-item.ts +32 -26
- package/src/list/list.ts +13 -8
- package/src/menu/index.ts +2 -2
- package/src/menu/menu-item.ts +7 -5
- package/src/menu/menu.ts +8 -6
- package/src/nav-drawer/appbar.ts +9 -7
- package/src/nav-drawer/content.ts +10 -8
- package/src/nav-drawer/drawer.ts +29 -25
- package/src/nav-drawer/index.ts +6 -6
- package/src/navigation-bar/index.ts +2 -2
- package/src/navigation-bar/navigation-bar-item.ts +127 -118
- package/src/navigation-bar/navigation-bar.ts +103 -91
- package/src/navigation-rail/index.ts +2 -2
- package/src/navigation-rail/navigation-rail.ts +21 -22
- package/src/notification/index.ts +6 -6
- package/src/notification/notification-service.ts +1 -2
- package/src/notification/notification.scss +5 -1
- package/src/notification/notification.ts +1 -3
- package/src/notification/notify.ts +204 -207
- package/src/option/index.ts +1 -1
- package/src/option/option.ts +26 -25
- package/src/overlay/overlay.animations.ts +4 -14
- package/src/overlay/overlay.component.ts +110 -131
- package/src/overlay/overlay.confirm-body.ts +26 -48
- package/src/overlay/overlay.gestures.ts +8 -10
- package/src/overlay/overlay.layout.ts +1 -4
- package/src/overlay/overlay.positioning.ts +4 -15
- package/src/overlay/overlay.service.ts +9 -24
- package/src/overlay/overlay.stack.test.ts +4 -1
- package/src/overlay/overlay.stack.ts +4 -4
- package/src/overlay/overlay.types.ts +11 -20
- package/src/progress/index.ts +1 -1
- package/src/progress/progress.ts +135 -133
- package/src/rxjs-utils/index.ts +6 -6
- package/src/rxjs-utils/waitForElement.ts +20 -20
- package/src/rxjs-utils/waitForElementAll.ts +21 -21
- package/src/rxjs-utils/waitForElements.ts +27 -27
- package/src/rxjs-utils/waitForElementsAll.ts +27 -29
- package/src/rxjs-utils/waitUntil.ts +7 -12
- package/src/skeleton/skeleton.ts +39 -33
- package/src/slider/index.ts +2 -2
- package/src/slider/slide.ts +14 -12
- package/src/slider/slider.ts +24 -22
- package/src/splash-screen/index.ts +1 -1
- package/src/splash-screen/splash-screen.ts +26 -27
- package/src/state/active-host.ts +4 -5
- package/src/state/index.ts +34 -53
- package/src/state/persist.ts +14 -11
- package/src/state/schmancy-context.ts +88 -88
- package/src/state/state.test-d.ts +3 -13
- package/src/state/state.test.ts +1 -4
- package/src/steps/index.ts +3 -3
- package/src/steps/schmancy-step.ts +41 -31
- package/src/steps/schmancy-steps.ts +7 -5
- package/src/surface/index.ts +1 -1
- package/src/surface/surface.styles.ts +53 -104
- package/src/surface/surface.ts +10 -8
- package/src/table/index.ts +2 -2
- package/src/table/row.ts +1 -4
- package/src/table/table.ts +2 -5
- package/src/tabs/index.ts +2 -2
- package/src/tabs/tabs-group.ts +8 -6
- package/src/teleport/index.ts +2 -2
- package/src/test-utils/a11y.ts +1 -3
- package/src/theme/index.ts +17 -17
- package/src/theme/theme-audio-player.ts +18 -16
- package/src/theme/theme-controller-boat.ts +1 -1
- package/src/theme/theme-controller.ts +36 -32
- package/src/theme/theme.component.ts +5 -9
- package/src/theme/theme.events.ts +1 -1
- package/src/theme/theme.format.ts +7 -7
- package/src/theme/theme.service.ts +453 -468
- package/src/theme/theme.style.css +78 -23
- package/src/theme-button/index.ts +1 -1
- package/src/tooltip/tooltip.directive.ts +1 -1
- package/src/tree/index.ts +1 -1
- package/src/tree/tree.ts +24 -16
- package/src/types/surface.ts +38 -44
- package/src/typewriter/typewriter.directive.ts +30 -39
- package/src/typography/typography.ts +289 -269
- package/src/utils/animation.ts +2 -8
- package/src/utils/index.ts +6 -6
- package/src/utils/number.ts +480 -517
- package/src/utils/overlay-stack.ts +1 -3
- package/src/utils/search.ts +5 -9
- package/src/visually-hidden/visually-hidden.ts +15 -13
- package/src/window/window-manager.ts +6 -1
- package/src/window/window-position.ts +7 -5
- package/src/window/window.ts +143 -108
- package/types/src/calendar/calendar.d.ts +108 -0
- package/types/src/calendar/calendar.test.d.ts +1 -0
- package/types/src/calendar/index.d.ts +2 -0
- package/types/src/directives/cursor-glow.d.ts +1 -1
- package/types/src/directives/hummingbird.d.ts +3 -3
- package/types/src/form/fields/date-range/date-range-dialog.d.ts +24 -28
- package/types/src/form/fields/date-range/date-range.d.ts +39 -66
- package/types/src/form/fields/date-range/date-range.test.d.ts +1 -0
- package/types/src/form/fields/date-range/index.d.ts +1 -1
- package/types/src/index.d.ts +1 -0
- package/types/src/surface/surface.styles.d.ts +13 -6
- package/types/src/types/surface.d.ts +17 -22
- package/types/src/utils/number.d.ts +1 -1
- package/dist/SchmancyElement-OG71FtNv.js +0 -286
- package/dist/SchmancyElement-OG71FtNv.js.map +0 -1
- package/dist/SchmancyElement-PS1u0j1B.cjs +0 -2
- package/dist/SchmancyElement-PS1u0j1B.cjs.map +0 -1
- package/dist/area-CaEI33G0.cjs +0 -21
- package/dist/area-CaEI33G0.cjs.map +0 -1
- package/dist/area-DtCNCb8w.js.map +0 -1
- package/dist/audio-B924fI5N.cjs.map +0 -1
- package/dist/audio-DdN76ikW.js.map +0 -1
- package/dist/autocomplete-Dq3BkitV.cjs +0 -115
- package/dist/autocomplete-Dq3BkitV.cjs.map +0 -1
- package/dist/autocomplete-UNOknYUz.js.map +0 -1
- package/dist/busy--WqiXKnl.cjs +0 -134
- package/dist/busy--WqiXKnl.cjs.map +0 -1
- package/dist/busy-DzXyO0z6.js +0 -173
- package/dist/busy-DzXyO0z6.js.map +0 -1
- package/dist/button-CTvS5YX4.cjs.map +0 -1
- package/dist/button-DgoDfcJx.js.map +0 -1
- package/dist/card-C6ijJZpF.js.map +0 -1
- package/dist/card-Ci3_9Dd4.cjs +0 -177
- package/dist/card-Ci3_9Dd4.cjs.map +0 -1
- package/dist/chips-9eG-96_D.cjs.map +0 -1
- package/dist/chips-DF7akwz7.js.map +0 -1
- package/dist/date-range-C13_R3OA.js +0 -966
- package/dist/date-range-C13_R3OA.js.map +0 -1
- package/dist/date-range-Q2xj5Syc.cjs +0 -142
- package/dist/date-range-Q2xj5Syc.cjs.map +0 -1
- package/dist/date-range-inline-BnOD-ddB.js.map +0 -1
- package/dist/date-range-inline-DV2c_gWM.cjs.map +0 -1
- package/dist/details-B2-jECBh.cjs.map +0 -1
- package/dist/details-ByF66CyY.js.map +0 -1
- package/dist/directives-BL7mzVsA.js.map +0 -1
- package/dist/directives-DCb_LA9R.cjs.map +0 -1
- package/dist/divider-Bv2QiOZL.cjs +0 -57
- package/dist/divider-Bv2QiOZL.cjs.map +0 -1
- package/dist/divider-gYuz0zDU.js +0 -89
- package/dist/divider-gYuz0zDU.js.map +0 -1
- package/dist/expand-B9IUGVtc.cjs +0 -141
- package/dist/expand-B9IUGVtc.cjs.map +0 -1
- package/dist/expand-cZ8rfCWP.js.map +0 -1
- package/dist/form-DowzVsgI.cjs.map +0 -1
- package/dist/form-tG7LwDm4.js.map +0 -1
- package/dist/icons-BZeCloP9.cjs +0 -24
- package/dist/icons-BZeCloP9.cjs.map +0 -1
- package/dist/icons-Dup5skuk.js.map +0 -1
- package/dist/iframe-CDJjnNmo.cjs.map +0 -1
- package/dist/iframe-Xc3EPMZT.js.map +0 -1
- package/dist/input-DnmC6J1T.cjs.map +0 -1
- package/dist/input-cTyDxW9L.js.map +0 -1
- package/dist/input-chip-CV91URyU.cjs +0 -146
- package/dist/input-chip-CV91URyU.cjs.map +0 -1
- package/dist/input-chip-CYI17YOq.js.map +0 -1
- package/dist/layout-CNlZSJFU.cjs.map +0 -1
- package/dist/layout-DDxw0EwL.js.map +0 -1
- package/dist/lightbox-CH-y3rYB.js.map +0 -1
- package/dist/lightbox-CvtqoInF.cjs.map +0 -1
- package/dist/list-Dl8KfxrF.cjs +0 -40
- package/dist/list-Dl8KfxrF.cjs.map +0 -1
- package/dist/list-DrsawQ5R.js.map +0 -1
- package/dist/menu-BFRcTe3o.cjs.map +0 -1
- package/dist/menu-CsY5lMqY.js.map +0 -1
- package/dist/mixins-BoMURWag.cjs.map +0 -1
- package/dist/mixins-bCEXbwJV.js.map +0 -1
- package/dist/notification-DFKRMmSq.js.map +0 -1
- package/dist/notification-FBf3Mb2e.cjs.map +0 -1
- package/dist/option-Ct0lGdH3.js.map +0 -1
- package/dist/option-Il1KpU8M.cjs +0 -43
- package/dist/option-Il1KpU8M.cjs.map +0 -1
- package/dist/overlay-Bh8Q_R01.js.map +0 -1
- package/dist/overlay-sRXiMkjn.cjs.map +0 -1
- package/dist/overlay.confirm-body-CQihsR20.js.map +0 -1
- package/dist/overlay.confirm-body-Jc1EuMGs.cjs.map +0 -1
- package/dist/overlay.service-9Dp3g7ot.cjs.map +0 -1
- package/dist/overlay.service-BXPgS7ay.js.map +0 -1
- package/dist/progress-CWC5XYZ_.cjs +0 -51
- package/dist/progress-CWC5XYZ_.cjs.map +0 -1
- package/dist/progress-CYLshdo2.js.map +0 -1
- package/dist/radio-group-6kCgOgBL.cjs.map +0 -1
- package/dist/radio-group-bZtZHOj_.js.map +0 -1
- package/dist/select-CU3X-PIa.js.map +0 -1
- package/dist/select-MXsF8KsU.cjs +0 -56
- package/dist/select-MXsF8KsU.cjs.map +0 -1
- package/dist/sound.service-B4ZmXpH9.js.map +0 -1
- package/dist/sound.service-DjlMvicQ.cjs.map +0 -1
- package/dist/splash-screen-CN9dZcqC.cjs +0 -41
- package/dist/splash-screen-CN9dZcqC.cjs.map +0 -1
- package/dist/splash-screen-emCLYoVl.js.map +0 -1
- package/dist/src-DGDTkOvC.js.map +0 -1
- package/dist/src-DK3111z_.cjs +0 -240
- package/dist/src-DK3111z_.cjs.map +0 -1
- package/dist/state-CumAEPQH.cjs.map +0 -1
- package/dist/state-DMd_FUeA.js.map +0 -1
- package/dist/surface-DGI-FBoi.cjs +0 -7
- package/dist/surface-DGI-FBoi.cjs.map +0 -1
- package/dist/tabs-4T_4kCf-.js.map +0 -1
- package/dist/tabs-Byxxt-AH.cjs.map +0 -1
- package/dist/textarea-BwYwH9fu.cjs.map +0 -1
- package/dist/textarea-kkYNk1ET.js.map +0 -1
- package/dist/theme.service-Dv_55nfE.js.map +0 -1
- package/dist/theme.service-pjkTM209.cjs.map +0 -1
- package/dist/typography-BVkU11_q.js +0 -358
- package/dist/typography-BVkU11_q.js.map +0 -1
- package/dist/typography-aaQaIcNc.cjs +0 -282
- package/dist/typography-aaQaIcNc.cjs.map +0 -1
- package/dist/utils-DTa3QHxk.cjs.map +0 -1
- package/dist/utils-H8wNknWC.js.map +0 -1
- package/dist/window-C76zstbV.js.map +0 -1
- package/dist/window-CmB9XZzT.cjs +0 -58
- package/dist/window-CmB9XZzT.cjs.map +0 -1
- package/src/form/fields/date-range/date-range-presets.ts +0 -220
- package/src/form/fields/date-range/date-utils.ts +0 -58
- package/types/src/form/fields/date-range/date-range-presets.d.ts +0 -18
- package/types/src/form/fields/date-range/date-utils.d.ts +0 -15
- /package/dist/{hashContent-iRZJJWtE.cjs → hashContent--s09Ed_g.cjs} +0 -0
- /package/dist/{hashContent-BqU6v1Xr.js → hashContent-CAvrQ56N.js} +0 -0
- /package/dist/{rxjs-utils-Csnks202.cjs → rxjs-utils-4P2v57ke.cjs} +0 -0
- /package/dist/{rxjs-utils-d-ivVN84.js → rxjs-utils-JMFdgQSl.js} +0 -0
- /package/dist/{theme.interface-CSt7JUBD.cjs → theme.interface-B-qxDsZQ.cjs} +0 -0
- /package/dist/{theme.interface-odQEpZZH.js → theme.interface-B7caS5cg.js} +0 -0
- /package/dist/{utils-DTa3QHxk.cjs → utils-DIXndz6Q.cjs} +0 -0
- /package/dist/{utils-H8wNknWC.js → utils-dSPH7Oh9.js} +0 -0
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"typography-Cfav17it.cjs","names":[],"sources":["../src/typography/typography.ts"],"sourcesContent":["import { SchmancyElement } from '@mixins/index'\nimport { css, html } from 'lit'\nimport { customElement, property } from 'lit/decorators.js'\nimport { createRef, ref } from 'lit/directives/ref.js'\nimport { fromEvent } from 'rxjs'\nimport { filter, tap, takeUntil } from 'rxjs/operators'\n\n// Material Design 3 typography - https://m3.material.io/styles/typography/type-scale-tokens\n\n/**\n * @element schmancy-typography\n * @slot - The text for the typography.\n */\n@customElement('schmancy-typography')\nexport class SchmancyTypography extends SchmancyElement {\n\tstatic styles = [\n\t\tcss`\n\t\t\t:host {\n\t\t\t\tdisplay: block;\n\t\t\t\tfont-family: inherit;\n\t\t\t\thyphens: none;\n\t\t\t}\n\n\t\t\t/* Text alignment */\n\t\t\t:host([align='center']) {\n\t\t\t\ttext-align: center;\n\t\t\t}\n\n\t\t\t:host([align='left']) {\n\t\t\t\ttext-align: start;\n\t\t\t}\n\n\t\t\t:host([align='right']) {\n\t\t\t\ttext-align: right;\n\t\t\t}\n\n\t\t\t:host([align='justify']) {\n\t\t\t\ttext-align: justify;\n\t\t\t}\n\n\t\t\t/* Font weight */\n\t\t\t:host([weight='bold']) {\n\t\t\t\tfont-weight: 700;\n\t\t\t}\n\n\t\t\t:host([weight='medium']) {\n\t\t\t\tfont-weight: 500;\n\t\t\t}\n\n\t\t\t:host([weight='normal']) {\n\t\t\t\tfont-weight: 400;\n\t\t\t}\n\n\t\t\t/* Text transform */\n\t\t\t:host([transform='uppercase']) {\n\t\t\t\ttext-transform: uppercase;\n\t\t\t}\n\n\t\t\t:host([transform='lowercase']) {\n\t\t\t\ttext-transform: lowercase;\n\t\t\t}\n\n\t\t\t:host([transform='capitalize']) {\n\t\t\t\ttext-transform: capitalize;\n\t\t\t}\n\n\t\t\t:host([transform='normal']) {\n\t\t\t\ttext-transform: none;\n\t\t\t}\n\n\t\t\t/* Type-based weight defaults (when using Tailwind classes without token) */\n\t\t\t:host([type='display']),\n\t\t\t:host([type='headline']),\n\t\t\t:host([type='body']) {\n\t\t\t\tfont-weight: 400;\n\t\t\t}\n\n\t\t\t:host([type='label']),\n\t\t\t:host([type='subtitle']),\n\t\t\t:host([type='title']) {\n\t\t\t\tfont-weight: 500;\n\t\t\t}\n\n\t\t\t/* Display typography variants - Material Design 3 + Extended */\n\t\t\t:host([type='display'][token='xl']) {\n\t\t\t\tfont-size: 72px;\n\t\t\t\tline-height: 80px;\n\t\t\t\tfont-weight: 400;\n\t\t\t}\n\n\t\t\t:host([type='display'][token='lg']) {\n\t\t\t\tfont-size: 57px;\n\t\t\t\tline-height: 64px;\n\t\t\t\tfont-weight: 400;\n\t\t\t}\n\n\t\t\t:host([type='display'][token='md']) {\n\t\t\t\tfont-size: 45px;\n\t\t\t\tline-height: 52px;\n\t\t\t\tfont-weight: 400;\n\t\t\t}\n\n\t\t\t:host([type='display'][token='sm']) {\n\t\t\t\tfont-size: 36px;\n\t\t\t\tline-height: 44px;\n\t\t\t\tfont-weight: 400;\n\t\t\t}\n\n\t\t\t:host([type='display'][token='xs']) {\n\t\t\t\tfont-size: 28px;\n\t\t\t\tline-height: 36px;\n\t\t\t\tfont-weight: 400;\n\t\t\t}\n\n\t\t\t/* Headline typography variants - Material Design 3 + Extended */\n\t\t\t:host([type='headline'][token='xl']) {\n\t\t\t\tfont-size: 36px;\n\t\t\t\tline-height: 44px;\n\t\t\t\tfont-weight: 400;\n\t\t\t}\n\n\t\t\t:host([type='headline'][token='lg']) {\n\t\t\t\tfont-size: 32px;\n\t\t\t\tline-height: 40px;\n\t\t\t\tfont-weight: 400;\n\t\t\t}\n\n\t\t\t:host([type='headline'][token='md']) {\n\t\t\t\tfont-size: 28px;\n\t\t\t\tline-height: 36px;\n\t\t\t\tfont-weight: 400;\n\t\t\t}\n\n\t\t\t:host([type='headline'][token='sm']) {\n\t\t\t\tfont-size: 24px;\n\t\t\t\tline-height: 32px;\n\t\t\t\tfont-weight: 400;\n\t\t\t}\n\n\t\t\t:host([type='headline'][token='xs']) {\n\t\t\t\tfont-size: 20px;\n\t\t\t\tline-height: 28px;\n\t\t\t\tfont-weight: 400;\n\t\t\t}\n\n\t\t\t/* Title typography variants - Material Design 3 + Extended */\n\t\t\t:host([type='title'][token='xl']) {\n\t\t\t\tfont-size: 24px;\n\t\t\t\tline-height: 32px;\n\t\t\t\tfont-weight: 400;\n\t\t\t}\n\n\t\t\t:host([type='title'][token='lg']) {\n\t\t\t\tfont-size: 22px;\n\t\t\t\tline-height: 28px;\n\t\t\t\tfont-weight: 400;\n\t\t\t}\n\n\t\t\t:host([type='title'][token='md']) {\n\t\t\t\tfont-size: 16px;\n\t\t\t\tline-height: 24px;\n\t\t\t\tfont-weight: 500;\n\t\t\t}\n\n\t\t\t:host([type='title'][token='sm']) {\n\t\t\t\tfont-size: 14px;\n\t\t\t\tline-height: 20px;\n\t\t\t\tfont-weight: 500;\n\t\t\t}\n\n\t\t\t:host([type='title'][token='xs']) {\n\t\t\t\tfont-size: 12px;\n\t\t\t\tline-height: 16px;\n\t\t\t\tfont-weight: 500;\n\t\t\t}\n\n\t\t\t/* Subtitle typography variants - Extended from Material Design 3 */\n\t\t\t:host([type='subtitle'][token='xl']) {\n\t\t\t\tfont-size: 20px;\n\t\t\t\tline-height: 28px;\n\t\t\t\tfont-weight: 500;\n\t\t\t}\n\n\t\t\t:host([type='subtitle'][token='lg']) {\n\t\t\t\tfont-size: 18px;\n\t\t\t\tline-height: 24px;\n\t\t\t\tfont-weight: 500;\n\t\t\t}\n\n\t\t\t:host([type='subtitle'][token='md']) {\n\t\t\t\tfont-size: 16px;\n\t\t\t\tline-height: 24px;\n\t\t\t\tfont-weight: 500;\n\t\t\t}\n\n\t\t\t:host([type='subtitle'][token='sm']) {\n\t\t\t\tfont-size: 14px;\n\t\t\t\tline-height: 20px;\n\t\t\t\tfont-weight: 500;\n\t\t\t}\n\n\t\t\t:host([type='subtitle'][token='xs']) {\n\t\t\t\tfont-size: 12px;\n\t\t\t\tline-height: 16px;\n\t\t\t\tfont-weight: 500;\n\t\t\t}\n\n\t\t\t/* Body typography variants - Material Design 3 + Extended */\n\t\t\t:host([type='body'][token='xl']) {\n\t\t\t\tfont-size: 18px;\n\t\t\t\tline-height: 28px;\n\t\t\t\tfont-weight: 400;\n\t\t\t}\n\n\t\t\t:host([type='body'][token='lg']) {\n\t\t\t\tfont-size: 16px;\n\t\t\t\tline-height: 24px;\n\t\t\t\tfont-weight: 400;\n\t\t\t}\n\n\t\t\t:host([type='body'][token='md']) {\n\t\t\t\tfont-size: 14px;\n\t\t\t\tline-height: 20px;\n\t\t\t\tfont-weight: 400;\n\t\t\t}\n\n\t\t\t:host([type='body'][token='sm']) {\n\t\t\t\tfont-size: 12px;\n\t\t\t\tline-height: 16px;\n\t\t\t\tfont-weight: 400;\n\t\t\t}\n\n\t\t\t:host([type='body'][token='xs']) {\n\t\t\t\tfont-size: 10px;\n\t\t\t\tline-height: 14px;\n\t\t\t\tfont-weight: 400;\n\t\t\t}\n\n\t\t\t/* Label typography variants - Material Design 3 + Extended */\n\t\t\t:host([type='label'][token='xl']) {\n\t\t\t\tfont-size: 16px;\n\t\t\t\tline-height: 22px;\n\t\t\t\tfont-weight: 500;\n\t\t\t}\n\n\t\t\t:host([type='label'][token='lg']) {\n\t\t\t\tfont-size: 14px;\n\t\t\t\tline-height: 20px;\n\t\t\t\tfont-weight: 500;\n\t\t\t}\n\n\t\t\t:host([type='label'][token='md']) {\n\t\t\t\tfont-size: 12px;\n\t\t\t\tline-height: 16px;\n\t\t\t\tfont-weight: 500;\n\t\t\t}\n\n\t\t\t:host([type='label'][token='sm']) {\n\t\t\t\tfont-size: 11px;\n\t\t\t\tline-height: 16px;\n\t\t\t\tfont-weight: 500;\n\t\t\t}\n\n\t\t\t:host([type='label'][token='xs']) {\n\t\t\t\tfont-size: 10px;\n\t\t\t\tline-height: 14px;\n\t\t\t\tfont-weight: 500;\n\t\t\t}\n\n\t\t\t/* Note: Custom letter-spacing, font-size, and line-height should be applied via inline styles or Tailwind classes */\n\n\t\t\t:host([editable]) {\n\t\t\t\tcursor: text;\n\t\t\t\tborder-radius: 4px;\n\t\t\t\ttransition: background 150ms;\n\t\t\t\tmin-height: 1em;\n\t\t\t}\n\t\t\t/* Editable div lives in shadow DOM so light DOM (Lit markers) is untouched */\n\t\t\t.edit {\n\t\t\t\toutline: none;\n\t\t\t\tmin-height: 1em;\n\t\t\t\tfont: inherit;\n\t\t\t\tcolor: inherit;\n\t\t\t\tletter-spacing: inherit;\n\t\t\t\tline-height: inherit;\n\t\t\t}\n\t\t\t.edit:empty::before {\n\t\t\t\tcontent: attr(data-placeholder);\n\t\t\t\tpointer-events: none;\n\t\t\t\tdisplay: block;\n\t\t\t\topacity: 0.35;\n\t\t\t}\n\t\t`,\n\t]\n\tstatic shadowRootOptions: ShadowRootInit = {\n\t\tmode: 'open',\n\t\tdelegatesFocus: true,\n\t}\n\n\t/**\n\t * @attr type - The type of the typography.\n\t * @default 'body'\n\t * @type {'display' | 'headline' | 'title' | 'subtitle' | 'body' | 'label'}\n\t */\n\t@property({ type: String, reflect: true })\n\ttype: 'display' | 'headline' | 'title' | 'subtitle' | 'body' | 'label' = 'body'\n\n\t/**\n\t * @attr token - The size token.\n\t * @deprecated Prefer using Tailwind responsive text classes for better responsive design.\n\t * Set token=\"\" and use class=\"text-sm md:text-base lg:text-lg\" instead.\n\t * Example: <schmancy-typography type=\"display\" token=\"\" class=\"text-2xl sm:text-3xl md:text-4xl\">\n\t * @default 'md'\n\t * @type {'xs' | 'sm' | 'md' | 'lg' | 'xl' | ''}\n\t */\n\t@property({ type: String, reflect: true })\n\ttoken: 'xs' | 'sm' | 'md' | 'lg' | 'xl' | '' = 'md'\n\n\t/**\n\t * @attr\n\t * @default inherit\n\t * @type {'left' |'center' |'right'}\n\t */\n\t@property({ type: String, reflect: true })\n\talign: 'left' | 'center' | 'justify' | 'right' | undefined\n\n\t/**\n\t * @attr\n\t * @default inherit\n\t * @type {'normal' | 'medium' |'bold'}\n\t * @public\n\t */\n\t@property({ type: String, reflect: true })\n\tweight: 'normal' | 'medium' | 'bold' | undefined\n\n\t/**\n\t *\n\t * @attr\n\t * @default inherit\n\t * @type {'uppercase' |'lowercase' |'capitalize' |'normal'}\n\t * @public\n\t */\n\t@property({ type: String, reflect: true })\n\ttransform: 'uppercase' | 'lowercase' | 'capitalize' | 'normal' | undefined\n\n\t@property({ type: Number })\n\tmaxLines: 1 | 2 | 3 | 4 | 5 | 6 | undefined\n\n\t/** When true, the element becomes contenteditable and dispatches 'change' events on blur/Enter */\n\t@property({ type: Boolean, reflect: true }) editable = false\n\t/** The text value when in editable mode. Set via property binding: .value=${...} */\n\t@property({ type: String }) value = ''\n\t/** Placeholder shown when editable and empty */\n\t@property({ type: String }) placeholder = ''\n\n\tprivate editRef = createRef<HTMLDivElement>()\n\n\t/** Focus and select all text in editable mode */\n\tselectAll() {\n\t\tconst el = this.editRef.value\n\t\tif (!el) return\n\t\tel.focus()\n\t\tconst sel = window.getSelection()\n\t\tif (sel && el.textContent) {\n\t\t\tconst range = document.createRange()\n\t\t\trange.selectNodeContents(el)\n\t\t\tsel.removeAllRanges()\n\t\t\tsel.addRange(range)\n\t\t}\n\t}\n\n\tconnectedCallback() {\n\t\tsuper.connectedCallback()\n\n\t\tfromEvent<FocusEvent>(this, 'focusout')\n\t\t\t.pipe(\n\t\t\t\tfilter(() => this.editable),\n\t\t\t\ttap(() => {\n\t\t\t\t\tconst el = this.editRef.value\n\t\t\t\t\tif (!el) return\n\t\t\t\t\tconst newValue = el.innerText.trim()\n\t\t\t\t\tif (newValue !== this.value) {\n\t\t\t\t\t\tthis.dispatchEvent(\n\t\t\t\t\t\t\tnew CustomEvent('change', {\n\t\t\t\t\t\t\t\tdetail: { value: newValue },\n\t\t\t\t\t\t\t\tbubbles: true,\n\t\t\t\t\t\t\t\tcomposed: true,\n\t\t\t\t\t\t\t}),\n\t\t\t\t\t\t)\n\t\t\t\t\t}\n\t\t\t\t\t// Ensure truly empty so :empty CSS placeholder works\n\t\t\t\t\tif (!newValue) el.textContent = ''\n\t\t\t\t}),\n\t\t\t\ttakeUntil(this.disconnecting),\n\t\t\t)\n\t\t\t.subscribe()\n\n\t\t// Clean stray <br> / whitespace nodes so :empty CSS matches\n\t\tfromEvent(this, 'input')\n\t\t\t.pipe(\n\t\t\t\tfilter(() => this.editable),\n\t\t\t\ttap(() => {\n\t\t\t\t\tconst el = this.editRef.value\n\t\t\t\t\tif (el && !el.innerText.trim()) el.textContent = ''\n\t\t\t\t}),\n\t\t\t\ttakeUntil(this.disconnecting),\n\t\t\t)\n\t\t\t.subscribe()\n\n\t\tfromEvent<KeyboardEvent>(this, 'keydown')\n\t\t\t.pipe(\n\t\t\t\tfilter(() => this.editable),\n\t\t\t\tfilter(e => e.key === 'Enter'),\n\t\t\t\ttap(e => {\n\t\t\t\t\te.preventDefault()\n\t\t\t\t\t;(this.editRef.value ?? this).blur()\n\t\t\t\t}),\n\t\t\t\ttakeUntil(this.disconnecting),\n\t\t\t)\n\t\t\t.subscribe()\n\t}\n\n\tprotected updated(changedProperties: Map<string, unknown>): void {\n\t\tsuper.updated(changedProperties)\n\t\tif (changedProperties.has('maxLines')) {\n\t\t\t// Remove all line-clamp classes\n\t\t\tthis.classList.remove(\n\t\t\t\t'line-clamp-1',\n\t\t\t\t'line-clamp-2',\n\t\t\t\t'line-clamp-3',\n\t\t\t\t'line-clamp-4',\n\t\t\t\t'line-clamp-5',\n\t\t\t\t'line-clamp-6',\n\t\t\t)\n\t\t\t// Add the appropriate one\n\t\t\tif (this.maxLines) {\n\t\t\t\tthis.classList.add(`line-clamp-${this.maxLines}`)\n\t\t\t}\n\t\t}\n\t\tif ((changedProperties.has('value') || changedProperties.has('editable')) && this.editable) {\n\t\t\tconst el = this.editRef.value\n\t\t\tif (el && document.activeElement !== el) {\n\t\t\t\tif (this.value) {\n\t\t\t\t\tel.innerText = this.value\n\t\t\t\t} else {\n\t\t\t\t\tel.textContent = ''\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}\n\n\tprotected render(): unknown {\n\t\tif (this.editable) {\n\t\t\treturn html`<div\n\t\t\t\t${ref(this.editRef)}\n\t\t\t\tclass=\"edit\"\n\t\t\t\tcontenteditable=\"true\"\n\t\t\t\tdata-placeholder=${this.placeholder ?? ''}\n\t\t\t></div>`\n\t\t}\n\t\treturn html`<slot></slot>`\n\t}\n}\n\ndeclare global {\n\tinterface HTMLElementTagNameMap {\n\t\t'schmancy-typography': SchmancyTypography\n\t}\n}\n"],"mappings":"wPAcO,IAAA,EAAA,cAAiC,EAAA,CAAA,CAAA,YAAA,GAAA,EAAA,CAAA,MAAA,GAAA,CAAA,EAAA,KAAA,KAmSkC,OAAA,KAAA,MAW1B,KAAA,KAAA,SAAA,CAiCQ,EAAA,KAAA,MAEnB,GAAA,KAAA,YAEM,GAAA,KAAA,SAAA,EAAA,EAAA,WAAA,CAAA,CAAA,OAAA,KAAA,OAlV1B,CACf,EAAA,GAAG;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;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AAA,CAAS,CAAA,CAAA,CAAA,EAAM,EAAA,UAAA,SAAA,IAAA,EAAA,EAAA,EAAA,EAAA,EAAA,EAAA,EAAA,UAU/B,CAAE,KAAM,OAAQ,QAAA,CAAS,CAAA,CAAA,CAAA,EAAM,EAAA,UAAA,YAAA,IAAA,EAAA,EAAA,EAAA,EAAA,EAAA,EAAA,EAAA,UAG/B,CAAE,KAAM,MAAA,CAAA,CAAA,EAAQ,EAAA,UAAA,WAAA,IAAA,EAAA,EAAA,EAAA,EAAA,EAAA,EAAA,EAAA,UAIhB,CAAE,KAAM,QAAS,QAAA,CAAS,CAAA,CAAA,CAAA,EAAM,EAAA,UAAA,WAAA,IAAA,EAAA,EAAA,EAAA,EAAA,EAAA,EAAA,EAAA,UAEhC,CAAE,KAAM,MAAA,CAAA,CAAA,EAAQ,EAAA,UAAA,QAAA,IAAA,EAAA,EAAA,EAAA,EAAA,EAAA,EAAA,EAAA,UAEhB,CAAE,KAAM,MAAA,CAAA,CAAA,EAAQ,EAAA,UAAA,cAAA,IAAA,EAAA,EAAA,EAAA,EAAA,EAAA,EAAA,EAAA,EAAA,eApVZ,qBAAA,CAAA,EAAqB,CAAA,EAAA,OAAA,eAAA,QAAA,IAAA,CAAA,WAAA,CAAA,EAAA,IAAA,UAAA,CAAA,OAAA,CAAA,CAAA,CAAA"}
|
package/dist/typography.cjs
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
Object.defineProperty(exports,Symbol.toStringTag,{value:`Module`});const e=require(`./typography-
|
|
1
|
+
Object.defineProperty(exports,Symbol.toStringTag,{value:`Module`});const e=require(`./typography-Cfav17it.cjs`);Object.defineProperty(exports,`SchmancyTypography`,{enumerable:!0,get:function(){return e.t}});
|
package/dist/typography.js
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import { t as e } from "./typography-
|
|
1
|
+
import { t as e } from "./typography-ByF2k5yW.js";
|
|
2
2
|
export { e as SchmancyTypography };
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"utils-DIXndz6Q.cjs","names":[],"sources":["../src/utils/intersection.ts","../src/utils/number.ts"],"sourcesContent":["import { Observable } from 'rxjs'\n\nexport function intersection$(\n\telement: Element | Element[],\n\toptions = {\n\t\tthreshold: 0.5,\n\t},\n) {\n\treturn new Observable(subscriber => {\n\t\tconst observer = new IntersectionObserver(entries => {\n\t\t\tsubscriber.next(entries) // Emit the entries array\n\t\t}, options)\n\n\t\t// Observe each element\n\t\tif (Array.isArray(element)) {\n\t\t\telement.forEach(el => observer.observe(el))\n\t\t} else {\n\t\t\tobserver.observe(element)\n\t\t}\n\n\t\t// Cleanup on unsubscription\n\t\treturn () => {\n\t\t\tobserver.disconnect()\n\t\t}\n\t})\n}\n","/**\n * Gets the user's system locale from browser settings.\n * Falls back to 'de-DE' if not available (e.g., in Node.js environment).\n */\nconst getSystemLocale = (): string => {\n\tif (typeof navigator !== 'undefined' && navigator.language) {\n\t\treturn navigator.language\n\t}\n\treturn 'de-DE'\n}\n\nexport class Numbers {\n\t/**\n\t * The system locale detected from user's browser/OS settings.\n\t * Use this for display formatting. For exports, use explicit locale like 'de-DE'.\n\t */\n\treadonly systemLocale = getSystemLocale()\n\n\t/**\n\t * Rounds a number to the specified number of decimal places.\n\t * @param {number} number - The number to round.\n\t * @param {number} [decimalPlaces=2] - The number of decimal places to round to.\n\t * @returns {number} - The rounded number.\n\t */\n\troundNumber(number: number, decimalPlaces: number = 2): number {\n\t\tconst factor = Math.pow(10, decimalPlaces)\n\t\treturn Math.round(number * factor) / factor\n\t}\n\n\t/**\n\t * Formats a number according to the specified locale and options.\n\t * Uses the user's system locale by default for display formatting.\n\t *\n\t * @param {number} number - The number to format.\n\t * @param {string} [locale] - The locale string (e.g., 'de-DE'). Defaults to system locale.\n\t * @param {Intl.NumberFormatOptions} [options={}] - Additional formatting options.\n\t * @returns {string} - The formatted number as a string.\n\t *\n\t * @example\n\t * // Uses system locale (e.g., user's browser setting)\n\t * numbers.formatNumber(1234.56)\n\t *\n\t * // Explicit locale for exports (bank systems expect German format)\n\t * numbers.formatNumber(1234.56, 'de-DE', { useGrouping: false })\n\t */\n\tformatNumber(number: number, locale: string = this.systemLocale, options: Intl.NumberFormatOptions = {}): string {\n\t\treturn new Intl.NumberFormat(locale, options).format(number)\n\t}\n\n\t/**\n\t * Parses a string with a specified decimal separator into a number.\n\t * @param {string} numberString - The string to parse.\n\t * @param {string} [decimalSeparator=','] - The decimal separator used in the string.\n\t * @returns {number} - The parsed number.\n\t */\n\tparseToPureNumber(numberString: string, decimalSeparator: string = ','): number {\n\t\tconst normalizedString = numberString.replace(decimalSeparator, '.')\n\t\treturn parseFloat(normalizedString)\n\t}\n\n\t/**\n\t * Rounds a number to the specified decimal places and formats it according to the specified locale and options.\n\t * Uses the user's system locale by default.\n\t *\n\t * @param {number} number - The number to process.\n\t * @param {number} [decimalPlaces=2] - The number of decimal places to round to.\n\t * @param {string} [locale] - The locale string. Defaults to system locale.\n\t * @param {Intl.NumberFormatOptions} [options={}] - Additional formatting options.\n\t * @returns {string} - The formatted number as a string.\n\t */\n\tdoIt(\n\t\tnumber: number,\n\t\tdecimalPlaces: number = 2,\n\t\tlocale: string = this.systemLocale,\n\t\toptions: Intl.NumberFormatOptions = {},\n\t): string {\n\t\tconst roundedNumber = this.roundNumber(number, decimalPlaces)\n\t\treturn this.formatNumber(roundedNumber, locale, options)\n\t}\n\n\t/**\n\t * Format a currency amount consistently across the application\n\t *\n\t * @param amount The amount to format\n\t * @param currency The currency symbol to display (default: '€')\n\t * @returns Formatted amount with currency symbol\n\t */\n\tformatCurrency(amount: number, currency: string = '€'): string {\n\t\treturn `${currency}${this.doIt(amount)}`\n\t}\n\n\t/**\n\t * Format a delta value with appropriate directional indicator\n\t *\n\t * @param delta The delta amount to format\n\t * @param currency The currency symbol to display (default: '€')\n\t * @returns Formatted delta with direction indicator and currency symbol\n\t */\n\tformatDelta(delta: number, currency: string = '€'): string {\n\t\tconst symbol = delta > 0 ? '↑' : delta < 0 ? '↓' : '→'\n\t\treturn `${symbol} ${currency}${this.doIt(Math.abs(delta))}`\n\t}\n\n\t/**\n\t * Get CSS class for delta value\n\t *\n\t * @param delta The delta amount\n\t * @returns CSS class based on delta direction\n\t */\n\tgetDeltaClass(delta: number): string {\n\t\treturn delta > 0 ? 'text-error-default' : delta < 0 ? 'text-primary-default' : 'text-neutral'\n\t}\n\n\t/**\n\t * Converts a decimal number to a mixed fraction string\n\t * For example: 1.5 becomes \"1 1/2\", 2.25 becomes \"2 1/4\"\n\t *\n\t * @param number The decimal number to convert\n\t * @param precision The precision level for fraction approximation (default: 16)\n\t * @param maxDenominator The maximum allowed denominator (default: 4)\n\t * @returns A string representing the mixed fraction\n\t */\n\ttoMixedFraction(number: number, precision: number = 16, maxDenominator: number = 4): string {\n\t\t// Handle negative numbers\n\t\tconst isNegative = number < 0\n\t\tnumber = Math.abs(number)\n\n\t\t// Extract whole number part\n\t\tconst wholePart = Math.floor(number)\n\n\t\t// Extract decimal part and convert to fraction\n\t\tlet decimalPart = number - wholePart\n\n\t\t// If the decimal part is very small or zero, just return the whole number\n\t\tif (decimalPart < 1 / Math.pow(10, precision)) {\n\t\t\treturn isNegative ? `-${wholePart}` : `${wholePart}`\n\t\t}\n\n\t\t// Find the best fraction approximation using precision and max denominator\n\t\tconst { numerator, denominator } = this.decimalToFraction(decimalPart, precision, maxDenominator)\n\n\t\t// Format based on whether there's a whole part\n\t\tif (wholePart === 0) {\n\t\t\treturn isNegative ? `-${numerator}/${denominator}` : `${numerator}/${denominator}`\n\t\t} else {\n\t\t\treturn isNegative ? `-${wholePart} ${numerator}/${denominator}` : `${wholePart} ${numerator}/${denominator}`\n\t\t}\n\t}\n\n\t/**\n\t * Converts a decimal to a simplified fraction with a maximum denominator\n\t *\n\t * @param decimal The decimal part to convert (0 <= decimal < 1)\n\t * @param precision The precision level for approximation\n\t * @param maxDenominator The maximum allowed denominator (default: 4)\n\t * @returns Object containing numerator and denominator\n\t */\n\tprivate decimalToFraction(\n\t\tdecimal: number,\n\t\tprecision: number,\n\t\tmaxDenominator: number = 4,\n\t): { numerator: number; denominator: number } {\n\t\tif (decimal === 0) {\n\t\t\treturn { numerator: 0, denominator: 1 }\n\t\t}\n\n\t\t// Initialize best approximation\n\t\tlet bestError = Infinity\n\t\tlet bestNumerator = 0\n\t\tlet bestDenominator = 1\n\n\t\t// Check common fractions first for better user experience\n\t\t// Filter to only include fractions with denominators <= maxDenominator\n\t\tconst commonFractions = [\n\t\t\t{ n: 1, d: 2 }, // 1/2\n\t\t\t{ n: 1, d: 3 }, // 1/3\n\t\t\t{ n: 2, d: 3 }, // 2/3\n\t\t\t{ n: 1, d: 4 }, // 1/4\n\t\t\t{ n: 3, d: 4 }, // 3/4\n\t\t]\n\n\t\t// Add additional fractions only if maxDenominator allows\n\t\tconst additionalFractions = []\n\t\tif (maxDenominator >= 5) {\n\t\t\tadditionalFractions.push(\n\t\t\t\t{ n: 1, d: 5 }, // 1/5\n\t\t\t\t{ n: 2, d: 5 }, // 2/5\n\t\t\t\t{ n: 3, d: 5 }, // 3/5\n\t\t\t\t{ n: 4, d: 5 }, // 4/5\n\t\t\t)\n\t\t}\n\t\tif (maxDenominator >= 6) {\n\t\t\tadditionalFractions.push(\n\t\t\t\t{ n: 1, d: 6 }, // 1/6\n\t\t\t\t{ n: 5, d: 6 }, // 5/6\n\t\t\t)\n\t\t}\n\t\tif (maxDenominator >= 8) {\n\t\t\tadditionalFractions.push(\n\t\t\t\t{ n: 1, d: 8 }, // 1/8\n\t\t\t\t{ n: 3, d: 8 }, // 3/8\n\t\t\t\t{ n: 5, d: 8 }, // 5/8\n\t\t\t\t{ n: 7, d: 8 }, // 7/8\n\t\t\t)\n\t\t}\n\t\tif (maxDenominator >= 10) {\n\t\t\tadditionalFractions.push(\n\t\t\t\t{ n: 1, d: 10 }, // 1/10\n\t\t\t\t{ n: 3, d: 10 }, // 3/10\n\t\t\t\t{ n: 7, d: 10 }, // 7/10\n\t\t\t\t{ n: 9, d: 10 }, // 9/10\n\t\t\t)\n\t\t}\n\t\tif (maxDenominator >= 12) {\n\t\t\tadditionalFractions.push(\n\t\t\t\t{ n: 1, d: 12 }, // 1/12\n\t\t\t\t{ n: 5, d: 12 }, // 5/12\n\t\t\t\t{ n: 7, d: 12 }, // 7/12\n\t\t\t\t{ n: 11, d: 12 }, // 11/12\n\t\t\t)\n\t\t}\n\t\tif (maxDenominator >= 16) {\n\t\t\tadditionalFractions.push(\n\t\t\t\t{ n: 1, d: 16 }, // 1/16\n\t\t\t\t{ n: 3, d: 16 }, // 3/16\n\t\t\t\t{ n: 5, d: 16 }, // 5/16\n\t\t\t\t{ n: 7, d: 16 }, // 7/16\n\t\t\t\t{ n: 9, d: 16 }, // 9/16\n\t\t\t\t{ n: 11, d: 16 }, // 11/16\n\t\t\t\t{ n: 13, d: 16 }, // 13/16\n\t\t\t\t{ n: 15, d: 16 }, // 15/16\n\t\t\t)\n\t\t}\n\n\t\t// Combine all applicable fractions\n\t\tconst allFractions = [...commonFractions, ...additionalFractions]\n\n\t\t// Check common fractions first\n\t\tfor (const frac of allFractions) {\n\t\t\tif (frac.d <= maxDenominator) {\n\t\t\t\tconst error = Math.abs(decimal - frac.n / frac.d)\n\t\t\t\tif (error < bestError) {\n\t\t\t\t\tbestError = error\n\t\t\t\t\tbestNumerator = frac.n\n\t\t\t\t\tbestDenominator = frac.d\n\n\t\t\t\t\t// If we're very close to a common fraction, just use it\n\t\t\t\t\tif (error < 1 / Math.pow(10, precision)) {\n\t\t\t\t\t\treturn { numerator: frac.n, denominator: frac.d }\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t\t// If no suitable common fraction found, use a more sophisticated approach\n\t\t// for denominators up to maxDenominator\n\n\t\t// Find the best approximation with denominator <= maxDenominator\n\t\tfor (let d = 1; d <= maxDenominator; d++) {\n\t\t\t// Find best numerator for this denominator\n\t\t\tconst n = Math.round(decimal * d)\n\t\t\tconst error = Math.abs(decimal - n / d)\n\n\t\t\tif (error < bestError) {\n\t\t\t\tbestError = error\n\t\t\t\tbestNumerator = n\n\t\t\t\tbestDenominator = d\n\t\t\t}\n\t\t}\n\n\t\t// Only use continued fraction expansion if we're significantly off\n\t\t// and maxDenominator allows for larger denominators\n\t\tif (bestError > 1 / Math.pow(10, precision / 2) && maxDenominator > 4) {\n\t\t\t// Implementation of continued fraction expansion\n\t\t\tlet n1 = 1,\n\t\t\t\tn2 = 0\n\t\t\tlet d1 = 0,\n\t\t\t\td2 = 1\n\t\t\tlet b = decimal\n\n\t\t\tdo {\n\t\t\t\tlet a = Math.floor(b)\n\t\t\t\tlet aux = n1\n\t\t\t\tn1 = a * n1 + n2\n\t\t\t\tn2 = aux\n\n\t\t\t\taux = d1\n\t\t\t\td1 = a * d1 + d2\n\t\t\t\td2 = aux\n\n\t\t\t\tb = 1 / (b - a)\n\n\t\t\t\t// Calculate the current approximation\n\t\t\t\tconst currentError = Math.abs(decimal - n1 / d1)\n\n\t\t\t\t// If we hit the precision limit or if the denominator gets too large, use this approximation\n\t\t\t\tif (currentError < 1 / Math.pow(10, precision) || d1 > maxDenominator) {\n\t\t\t\t\t// If d1 exceeds maxDenominator, return the previous best result\n\t\t\t\t\tif (d1 > maxDenominator) {\n\t\t\t\t\t\treturn { numerator: bestNumerator, denominator: bestDenominator }\n\t\t\t\t\t}\n\n\t\t\t\t\t// Otherwise return this result\n\t\t\t\t\treturn { numerator: n1, denominator: d1 }\n\t\t\t\t}\n\t\t\t} while (b !== Infinity)\n\n\t\t\tbestNumerator = n1\n\t\t\tbestDenominator = d1\n\t\t}\n\n\t\t// Simplify the fraction\n\t\tconst gcd = this.findGCD(bestNumerator, bestDenominator)\n\t\treturn {\n\t\t\tnumerator: bestNumerator / gcd,\n\t\t\tdenominator: bestDenominator / gcd,\n\t\t}\n\t}\n\n\t/**\n\t * Calculates the greatest common divisor of two numbers\n\t */\n\tprivate findGCD(a: number, b: number): number {\n\t\treturn b === 0 ? a : this.findGCD(b, a % b)\n\t}\n\n\t/**\n\t * Alternative method to get a formatted mixed fraction with a specified format\n\t *\n\t * @param number The decimal number to convert\n\t * @param format The format specification ('unicode', 'ascii', 'superscript')\n\t * @param precision The precision level for fraction approximation\n\t * @param maxDenominator The maximum allowed denominator (default: 4)\n\t * @returns A formatted string representing the mixed fraction\n\t */\n\tformatMixedFraction(\n\t\tnumber: number,\n\t\tformat: 'unicode' | 'ascii' | 'superscript' = 'ascii',\n\t\tprecision: number = 16,\n\t\tmaxDenominator: number = 4,\n\t): string {\n\t\t// Get the basic mixed fraction\n\t\tconst basicFraction = this.toMixedFraction(number, precision, maxDenominator)\n\n\t\t// If the format is ascii, just return the basic fraction\n\t\tif (format === 'ascii') {\n\t\t\treturn basicFraction\n\t\t}\n\n\t\t// For unicode and superscript formats, we need to parse the basic fraction\n\t\tconst isNegative = basicFraction.startsWith('-')\n\t\tconst withoutSign = isNegative ? basicFraction.substring(1) : basicFraction\n\n\t\t// Check if it's a pure fraction or mixed fraction\n\t\tconst hasMixedPart = withoutSign.includes(' ')\n\n\t\tif (!withoutSign.includes('/')) {\n\t\t\t// If there's no fraction part, just return the number\n\t\t\treturn basicFraction\n\t\t}\n\n\t\tlet wholePart = ''\n\t\tlet fractionPart = withoutSign\n\n\t\tif (hasMixedPart) {\n\t\t\t// Split the whole and fraction parts\n\t\t\tconst parts = withoutSign.split(' ')\n\t\t\twholePart = parts[0]\n\t\t\tfractionPart = parts[1]\n\t\t}\n\n\t\t// Split the fraction part into numerator and denominator\n\t\tconst [numerator, denominator] = fractionPart.split('/')\n\n\t\tif (format === 'unicode') {\n\t\t\t// Try to find a unicode fraction character\n\t\t\tconst unicodeFraction = this.getUnicodeFraction(parseInt(numerator), parseInt(denominator))\n\n\t\t\tif (unicodeFraction) {\n\t\t\t\treturn isNegative\n\t\t\t\t\t? `-${wholePart}${hasMixedPart ? ' ' : ''}${unicodeFraction}`\n\t\t\t\t\t: `${wholePart}${hasMixedPart ? ' ' : ''}${unicodeFraction}`\n\t\t\t}\n\n\t\t\t// Fallback to basic format if no unicode fraction is available\n\t\t\treturn basicFraction\n\t\t}\n\n\t\t// Handle superscript format\n\t\tif (format === 'superscript') {\n\t\t\tconst superNumerator = this.toSuperscript(numerator)\n\t\t\tconst subDenominator = this.toSubscript(denominator)\n\n\t\t\tif (hasMixedPart) {\n\t\t\t\treturn isNegative\n\t\t\t\t\t? `-${wholePart} ${superNumerator}⁄${subDenominator}`\n\t\t\t\t\t: `${wholePart} ${superNumerator}⁄${subDenominator}`\n\t\t\t} else {\n\t\t\t\treturn isNegative ? `-${superNumerator}⁄${subDenominator}` : `${superNumerator}⁄${subDenominator}`\n\t\t\t}\n\t\t}\n\n\t\t// Fallback to basic format\n\t\treturn basicFraction\n\t}\n\n\t/**\n\t * Gets the Unicode fraction character if available\n\t *\n\t * @param numerator The numerator\n\t * @param denominator The denominator\n\t * @returns Unicode fraction character or null if not available\n\t */\n\tprivate getUnicodeFraction(numerator: number, denominator: number): string | null {\n\t\t// Map common fractions to their Unicode characters\n\t\tconst fractionMap: Record<string, string> = {\n\t\t\t'1/4': '¼',\n\t\t\t'1/2': '½',\n\t\t\t'3/4': '¾',\n\t\t\t'1/3': '⅓',\n\t\t\t'2/3': '⅔',\n\t\t\t'1/5': '⅕',\n\t\t\t'2/5': '⅖',\n\t\t\t'3/5': '⅗',\n\t\t\t'4/5': '⅘',\n\t\t\t'1/6': '⅙',\n\t\t\t'5/6': '⅚',\n\t\t\t'1/7': '⅐',\n\t\t\t'1/8': '⅛',\n\t\t\t'3/8': '⅜',\n\t\t\t'5/8': '⅝',\n\t\t\t'7/8': '⅞',\n\t\t\t'1/9': '⅑',\n\t\t\t'1/10': '⅒',\n\t\t}\n\n\t\tconst key = `${numerator}/${denominator}`\n\t\treturn fractionMap[key] || null\n\t}\n\n\t/**\n\t * Converts digits to superscript\n\t */\n\tprivate toSuperscript(str: string): string {\n\t\tconst superscriptMap: Record<string, string> = {\n\t\t\t'0': '⁰',\n\t\t\t'1': '¹',\n\t\t\t'2': '²',\n\t\t\t'3': '³',\n\t\t\t'4': '⁴',\n\t\t\t'5': '⁵',\n\t\t\t'6': '⁶',\n\t\t\t'7': '⁷',\n\t\t\t'8': '⁸',\n\t\t\t'9': '⁹',\n\t\t\t'-': '⁻',\n\t\t}\n\n\t\treturn str\n\t\t\t.split('')\n\t\t\t.map(char => superscriptMap[char] || char)\n\t\t\t.join('')\n\t}\n\n\t/**\n\t * Converts digits to subscript\n\t */\n\tprivate toSubscript(str: string): string {\n\t\tconst subscriptMap: Record<string, string> = {\n\t\t\t'0': '₀',\n\t\t\t'1': '₁',\n\t\t\t'2': '₂',\n\t\t\t'3': '₃',\n\t\t\t'4': '₄',\n\t\t\t'5': '₅',\n\t\t\t'6': '₆',\n\t\t\t'7': '₇',\n\t\t\t'8': '₈',\n\t\t\t'9': '₉',\n\t\t\t'-': '₋',\n\t\t}\n\n\t\treturn str\n\t\t\t.split('')\n\t\t\t.map(char => subscriptMap[char] || char)\n\t\t\t.join('')\n\t}\n}\n\nconst numbers = new Numbers()\n\nexport default numbers\n"],"mappings":"kIAEA,SAAgB,EACf,EACA,EAAU,CACT,UAAW,EAAA,EAAA,CAGZ,OAAO,IAAI,EAAA,WAAW,GAAA,CACrB,IAAM,EAAW,IAAI,qBAAqB,GAAA,CACzC,EAAW,KAAK,CAAA,CAAA,EACd,CAAA,EAUH,OAPI,MAAM,QAAQ,CAAA,EACjB,EAAQ,QAAQ,GAAM,EAAS,QAAQ,CAAA,CAAA,EAEvC,EAAS,QAAQ,CAAA,MAIlB,CACC,EAAS,WAAA,CAAA,CAAA,CAAA,CAGZ,CCrBA,IAOa,EAAb,KAAA,CAAA,aAAA,CAAA,KAAA,aAN0B,OAAd,UAAc,KAAe,UAAU,SAC1C,UAAU,SAEX,OAAA,CAgBP,YAAY,EAAgB,EAAwB,EAAA,CACnD,IAAM,EAAkB,IAAI,EAC5B,OAAO,KAAK,MAAM,EAAS,CAAA,EAAU,CACtC,CAkBA,aAAa,EAAgB,EAAi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IACP,MAAO,IACP,MAAO,IACP,MAAO,IACP,MAAO,IACP,MAAO,IACP,OAAQ,GAAA,EAIU,GADJ,EAAA,GAAa,MACD,IAC5B,CAKA,cAAsB,EAAA,CACrB,IAAM,EAAyC,CAC9C,EAAK,IACL,EAAK,IACL,EAAK,IACL,EAAK,IACL,EAAK,IACL,EAAK,IACL,EAAK,IACL,EAAK,IACL,EAAK,IACL,EAAK,IACL,IAAK,GAAA,EAGN,OAAO,EACL,MAAM,EAAA,EACN,IAAI,GAAQ,EAAe,IAAS,CAAA,EACpC,KAAK,EAAA,CACR,CAKA,YAAoB,EAAA,CACnB,IAAM,EAAuC,CAC5C,EAAK,IACL,EAAK,IACL,EAAK,IACL,EAAK,IACL,EAAK,IACL,EAAK,IACL,EAAK,IACL,EAAK,IACL,EAAK,IACL,EAAK,IACL,IAAK,GAAA,EAGN,OAAO,EACL,MAAM,EAAA,EACN,IAAI,GAAQ,EAAa,IAAS,CAAA,EAClC,KAAK,EAAA,CACR,CAAA,EAGe,IAAI,EAAA,OAAA,eAAA,QAAA,IAAA,CAAA,WAAA,CAAA,EAAA,IAAA,UAAA,CAAA,OAAA,CAAA,CAAA,CAAA,EAAA,OAAA,eAAA,QAAA,IAAA,CAAA,WAAA,CAAA,EAAA,IAAA,UAAA,CAAA,OAAA,CAAA,CAAA,CAAA"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"utils-dSPH7Oh9.js","names":[],"sources":["../src/utils/intersection.ts","../src/utils/number.ts"],"sourcesContent":["import { Observable } from 'rxjs'\n\nexport function intersection$(\n\telement: Element | Element[],\n\toptions = {\n\t\tthreshold: 0.5,\n\t},\n) {\n\treturn new Observable(subscriber => {\n\t\tconst observer = new IntersectionObserver(entries => {\n\t\t\tsubscriber.next(entries) // Emit the entries array\n\t\t}, options)\n\n\t\t// Observe each element\n\t\tif (Array.isArray(element)) {\n\t\t\telement.forEach(el => observer.observe(el))\n\t\t} else {\n\t\t\tobserver.observe(element)\n\t\t}\n\n\t\t// Cleanup on unsubscription\n\t\treturn () => {\n\t\t\tobserver.disconnect()\n\t\t}\n\t})\n}\n","/**\n * Gets the user's system locale from browser settings.\n * Falls back to 'de-DE' if not available (e.g., in Node.js environment).\n */\nconst getSystemLocale = (): string => {\n\tif (typeof navigator !== 'undefined' && navigator.language) {\n\t\treturn navigator.language\n\t}\n\treturn 'de-DE'\n}\n\nexport class Numbers {\n\t/**\n\t * The system locale detected from user's browser/OS settings.\n\t * Use this for display formatting. For exports, use explicit locale like 'de-DE'.\n\t */\n\treadonly systemLocale = getSystemLocale()\n\n\t/**\n\t * Rounds a number to the specified number of decimal places.\n\t * @param {number} number - The number to round.\n\t * @param {number} [decimalPlaces=2] - The number of decimal places to round to.\n\t * @returns {number} - The rounded number.\n\t */\n\troundNumber(number: number, decimalPlaces: number = 2): number {\n\t\tconst factor = Math.pow(10, decimalPlaces)\n\t\treturn Math.round(number * factor) / factor\n\t}\n\n\t/**\n\t * Formats a number according to the specified locale and options.\n\t * Uses the user's system locale by default for display formatting.\n\t *\n\t * @param {number} number - The number to format.\n\t * @param {string} [locale] - The locale string (e.g., 'de-DE'). Defaults to system locale.\n\t * @param {Intl.NumberFormatOptions} [options={}] - Additional formatting options.\n\t * @returns {string} - The formatted number as a string.\n\t *\n\t * @example\n\t * // Uses system locale (e.g., user's browser setting)\n\t * numbers.formatNumber(1234.56)\n\t *\n\t * // Explicit locale for exports (bank systems expect German format)\n\t * numbers.formatNumber(1234.56, 'de-DE', { useGrouping: false })\n\t */\n\tformatNumber(number: number, locale: string = this.systemLocale, options: Intl.NumberFormatOptions = {}): string {\n\t\treturn new Intl.NumberFormat(locale, options).format(number)\n\t}\n\n\t/**\n\t * Parses a string with a specified decimal separator into a number.\n\t * @param {string} numberString - The string to parse.\n\t * @param {string} [decimalSeparator=','] - The decimal separator used in the string.\n\t * @returns {number} - The parsed number.\n\t */\n\tparseToPureNumber(numberString: string, decimalSeparator: string = ','): number {\n\t\tconst normalizedString = numberString.replace(decimalSeparator, '.')\n\t\treturn parseFloat(normalizedString)\n\t}\n\n\t/**\n\t * Rounds a number to the specified decimal places and formats it according to the specified locale and options.\n\t * Uses the user's system locale by default.\n\t *\n\t * @param {number} number - The number to process.\n\t * @param {number} [decimalPlaces=2] - The number of decimal places to round to.\n\t * @param {string} [locale] - The locale string. Defaults to system locale.\n\t * @param {Intl.NumberFormatOptions} [options={}] - Additional formatting options.\n\t * @returns {string} - The formatted number as a string.\n\t */\n\tdoIt(\n\t\tnumber: number,\n\t\tdecimalPlaces: number = 2,\n\t\tlocale: string = this.systemLocale,\n\t\toptions: Intl.NumberFormatOptions = {},\n\t): string {\n\t\tconst roundedNumber = this.roundNumber(number, decimalPlaces)\n\t\treturn this.formatNumber(roundedNumber, locale, options)\n\t}\n\n\t/**\n\t * Format a currency amount consistently across the application\n\t *\n\t * @param amount The amount to format\n\t * @param currency The currency symbol to display (default: '€')\n\t * @returns Formatted amount with currency symbol\n\t */\n\tformatCurrency(amount: number, currency: string = '€'): string {\n\t\treturn `${currency}${this.doIt(amount)}`\n\t}\n\n\t/**\n\t * Format a delta value with appropriate directional indicator\n\t *\n\t * @param delta The delta amount to format\n\t * @param currency The currency symbol to display (default: '€')\n\t * @returns Formatted delta with direction indicator and currency symbol\n\t */\n\tformatDelta(delta: number, currency: string = '€'): string {\n\t\tconst symbol = delta > 0 ? '↑' : delta < 0 ? '↓' : '→'\n\t\treturn `${symbol} ${currency}${this.doIt(Math.abs(delta))}`\n\t}\n\n\t/**\n\t * Get CSS class for delta value\n\t *\n\t * @param delta The delta amount\n\t * @returns CSS class based on delta direction\n\t */\n\tgetDeltaClass(delta: number): string {\n\t\treturn delta > 0 ? 'text-error-default' : delta < 0 ? 'text-primary-default' : 'text-neutral'\n\t}\n\n\t/**\n\t * Converts a decimal number to a mixed fraction string\n\t * For example: 1.5 becomes \"1 1/2\", 2.25 becomes \"2 1/4\"\n\t *\n\t * @param number The decimal number to convert\n\t * @param precision The precision level for fraction approximation (default: 16)\n\t * @param maxDenominator The maximum allowed denominator (default: 4)\n\t * @returns A string representing the mixed fraction\n\t */\n\ttoMixedFraction(number: number, precision: number = 16, maxDenominator: number = 4): string {\n\t\t// Handle negative numbers\n\t\tconst isNegative = number < 0\n\t\tnumber = Math.abs(number)\n\n\t\t// Extract whole number part\n\t\tconst wholePart = Math.floor(number)\n\n\t\t// Extract decimal part and convert to fraction\n\t\tlet decimalPart = number - wholePart\n\n\t\t// If the decimal part is very small or zero, just return the whole number\n\t\tif (decimalPart < 1 / Math.pow(10, precision)) {\n\t\t\treturn isNegative ? `-${wholePart}` : `${wholePart}`\n\t\t}\n\n\t\t// Find the best fraction approximation using precision and max denominator\n\t\tconst { numerator, denominator } = this.decimalToFraction(decimalPart, precision, maxDenominator)\n\n\t\t// Format based on whether there's a whole part\n\t\tif (wholePart === 0) {\n\t\t\treturn isNegative ? `-${numerator}/${denominator}` : `${numerator}/${denominator}`\n\t\t} else {\n\t\t\treturn isNegative ? `-${wholePart} ${numerator}/${denominator}` : `${wholePart} ${numerator}/${denominator}`\n\t\t}\n\t}\n\n\t/**\n\t * Converts a decimal to a simplified fraction with a maximum denominator\n\t *\n\t * @param decimal The decimal part to convert (0 <= decimal < 1)\n\t * @param precision The precision level for approximation\n\t * @param maxDenominator The maximum allowed denominator (default: 4)\n\t * @returns Object containing numerator and denominator\n\t */\n\tprivate decimalToFraction(\n\t\tdecimal: number,\n\t\tprecision: number,\n\t\tmaxDenominator: number = 4,\n\t): { numerator: number; denominator: number } {\n\t\tif (decimal === 0) {\n\t\t\treturn { numerator: 0, denominator: 1 }\n\t\t}\n\n\t\t// Initialize best approximation\n\t\tlet bestError = Infinity\n\t\tlet bestNumerator = 0\n\t\tlet bestDenominator = 1\n\n\t\t// Check common fractions first for better user experience\n\t\t// Filter to only include fractions with denominators <= maxDenominator\n\t\tconst commonFractions = [\n\t\t\t{ n: 1, d: 2 }, // 1/2\n\t\t\t{ n: 1, d: 3 }, // 1/3\n\t\t\t{ n: 2, d: 3 }, // 2/3\n\t\t\t{ n: 1, d: 4 }, // 1/4\n\t\t\t{ n: 3, d: 4 }, // 3/4\n\t\t]\n\n\t\t// Add additional fractions only if maxDenominator allows\n\t\tconst additionalFractions = []\n\t\tif (maxDenominator >= 5) {\n\t\t\tadditionalFractions.push(\n\t\t\t\t{ n: 1, d: 5 }, // 1/5\n\t\t\t\t{ n: 2, d: 5 }, // 2/5\n\t\t\t\t{ n: 3, d: 5 }, // 3/5\n\t\t\t\t{ n: 4, d: 5 }, // 4/5\n\t\t\t)\n\t\t}\n\t\tif (maxDenominator >= 6) {\n\t\t\tadditionalFractions.push(\n\t\t\t\t{ n: 1, d: 6 }, // 1/6\n\t\t\t\t{ n: 5, d: 6 }, // 5/6\n\t\t\t)\n\t\t}\n\t\tif (maxDenominator >= 8) {\n\t\t\tadditionalFractions.push(\n\t\t\t\t{ n: 1, d: 8 }, // 1/8\n\t\t\t\t{ n: 3, d: 8 }, // 3/8\n\t\t\t\t{ n: 5, d: 8 }, // 5/8\n\t\t\t\t{ n: 7, d: 8 }, // 7/8\n\t\t\t)\n\t\t}\n\t\tif (maxDenominator >= 10) {\n\t\t\tadditionalFractions.push(\n\t\t\t\t{ n: 1, d: 10 }, // 1/10\n\t\t\t\t{ n: 3, d: 10 }, // 3/10\n\t\t\t\t{ n: 7, d: 10 }, // 7/10\n\t\t\t\t{ n: 9, d: 10 }, // 9/10\n\t\t\t)\n\t\t}\n\t\tif (maxDenominator >= 12) {\n\t\t\tadditionalFractions.push(\n\t\t\t\t{ n: 1, d: 12 }, // 1/12\n\t\t\t\t{ n: 5, d: 12 }, // 5/12\n\t\t\t\t{ n: 7, d: 12 }, // 7/12\n\t\t\t\t{ n: 11, d: 12 }, // 11/12\n\t\t\t)\n\t\t}\n\t\tif (maxDenominator >= 16) {\n\t\t\tadditionalFractions.push(\n\t\t\t\t{ n: 1, d: 16 }, // 1/16\n\t\t\t\t{ n: 3, d: 16 }, // 3/16\n\t\t\t\t{ n: 5, d: 16 }, // 5/16\n\t\t\t\t{ n: 7, d: 16 }, // 7/16\n\t\t\t\t{ n: 9, d: 16 }, // 9/16\n\t\t\t\t{ n: 11, d: 16 }, // 11/16\n\t\t\t\t{ n: 13, d: 16 }, // 13/16\n\t\t\t\t{ n: 15, d: 16 }, // 15/16\n\t\t\t)\n\t\t}\n\n\t\t// Combine all applicable fractions\n\t\tconst allFractions = [...commonFractions, ...additionalFractions]\n\n\t\t// Check common fractions first\n\t\tfor (const frac of allFractions) {\n\t\t\tif (frac.d <= maxDenominator) {\n\t\t\t\tconst error = Math.abs(decimal - frac.n / frac.d)\n\t\t\t\tif (error < bestError) {\n\t\t\t\t\tbestError = error\n\t\t\t\t\tbestNumerator = frac.n\n\t\t\t\t\tbestDenominator = frac.d\n\n\t\t\t\t\t// If we're very close to a common fraction, just use it\n\t\t\t\t\tif (error < 1 / Math.pow(10, precision)) {\n\t\t\t\t\t\treturn { numerator: frac.n, denominator: frac.d }\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t\t// If no suitable common fraction found, use a more sophisticated approach\n\t\t// for denominators up to maxDenominator\n\n\t\t// Find the best approximation with denominator <= maxDenominator\n\t\tfor (let d = 1; d <= maxDenominator; d++) {\n\t\t\t// Find best numerator for this denominator\n\t\t\tconst n = Math.round(decimal * d)\n\t\t\tconst error = Math.abs(decimal - n / d)\n\n\t\t\tif (error < bestError) {\n\t\t\t\tbestError = error\n\t\t\t\tbestNumerator = n\n\t\t\t\tbestDenominator = d\n\t\t\t}\n\t\t}\n\n\t\t// Only use continued fraction expansion if we're significantly off\n\t\t// and maxDenominator allows for larger denominators\n\t\tif (bestError > 1 / Math.pow(10, precision / 2) && maxDenominator > 4) {\n\t\t\t// Implementation of continued fraction expansion\n\t\t\tlet n1 = 1,\n\t\t\t\tn2 = 0\n\t\t\tlet d1 = 0,\n\t\t\t\td2 = 1\n\t\t\tlet b = decimal\n\n\t\t\tdo {\n\t\t\t\tlet a = Math.floor(b)\n\t\t\t\tlet aux = n1\n\t\t\t\tn1 = a * n1 + n2\n\t\t\t\tn2 = aux\n\n\t\t\t\taux = d1\n\t\t\t\td1 = a * d1 + d2\n\t\t\t\td2 = aux\n\n\t\t\t\tb = 1 / (b - a)\n\n\t\t\t\t// Calculate the current approximation\n\t\t\t\tconst currentError = Math.abs(decimal - n1 / d1)\n\n\t\t\t\t// If we hit the precision limit or if the denominator gets too large, use this approximation\n\t\t\t\tif (currentError < 1 / Math.pow(10, precision) || d1 > maxDenominator) {\n\t\t\t\t\t// If d1 exceeds maxDenominator, return the previous best result\n\t\t\t\t\tif (d1 > maxDenominator) {\n\t\t\t\t\t\treturn { numerator: bestNumerator, denominator: bestDenominator }\n\t\t\t\t\t}\n\n\t\t\t\t\t// Otherwise return this result\n\t\t\t\t\treturn { numerator: n1, denominator: d1 }\n\t\t\t\t}\n\t\t\t} while (b !== Infinity)\n\n\t\t\tbestNumerator = n1\n\t\t\tbestDenominator = d1\n\t\t}\n\n\t\t// Simplify the fraction\n\t\tconst gcd = this.findGCD(bestNumerator, bestDenominator)\n\t\treturn {\n\t\t\tnumerator: bestNumerator / gcd,\n\t\t\tdenominator: bestDenominator / gcd,\n\t\t}\n\t}\n\n\t/**\n\t * Calculates the greatest common divisor of two numbers\n\t */\n\tprivate findGCD(a: number, b: number): number {\n\t\treturn b === 0 ? a : this.findGCD(b, a % b)\n\t}\n\n\t/**\n\t * Alternative method to get a formatted mixed fraction with a specified format\n\t *\n\t * @param number The decimal number to convert\n\t * @param format The format specification ('unicode', 'ascii', 'superscript')\n\t * @param precision The precision level for fraction approximation\n\t * @param maxDenominator The maximum allowed denominator (default: 4)\n\t * @returns A formatted string representing the mixed fraction\n\t */\n\tformatMixedFraction(\n\t\tnumber: number,\n\t\tformat: 'unicode' | 'ascii' | 'superscript' = 'ascii',\n\t\tprecision: number = 16,\n\t\tmaxDenominator: number = 4,\n\t): string {\n\t\t// Get the basic mixed fraction\n\t\tconst basicFraction = this.toMixedFraction(number, precision, maxDenominator)\n\n\t\t// If the format is ascii, just return the basic fraction\n\t\tif (format === 'ascii') {\n\t\t\treturn basicFraction\n\t\t}\n\n\t\t// For unicode and superscript formats, we need to parse the basic fraction\n\t\tconst isNegative = basicFraction.startsWith('-')\n\t\tconst withoutSign = isNegative ? basicFraction.substring(1) : basicFraction\n\n\t\t// Check if it's a pure fraction or mixed fraction\n\t\tconst hasMixedPart = withoutSign.includes(' ')\n\n\t\tif (!withoutSign.includes('/')) {\n\t\t\t// If there's no fraction part, just return the number\n\t\t\treturn basicFraction\n\t\t}\n\n\t\tlet wholePart = ''\n\t\tlet fractionPart = withoutSign\n\n\t\tif (hasMixedPart) {\n\t\t\t// Split the whole and fraction parts\n\t\t\tconst parts = withoutSign.split(' ')\n\t\t\twholePart = parts[0]\n\t\t\tfractionPart = parts[1]\n\t\t}\n\n\t\t// Split the fraction part into numerator and denominator\n\t\tconst [numerator, denominator] = fractionPart.split('/')\n\n\t\tif (format === 'unicode') {\n\t\t\t// Try to find a unicode fraction character\n\t\t\tconst unicodeFraction = this.getUnicodeFraction(parseInt(numerator), parseInt(denominator))\n\n\t\t\tif (unicodeFraction) {\n\t\t\t\treturn isNegative\n\t\t\t\t\t? `-${wholePart}${hasMixedPart ? ' ' : ''}${unicodeFraction}`\n\t\t\t\t\t: `${wholePart}${hasMixedPart ? ' ' : ''}${unicodeFraction}`\n\t\t\t}\n\n\t\t\t// Fallback to basic format if no unicode fraction is available\n\t\t\treturn basicFraction\n\t\t}\n\n\t\t// Handle superscript format\n\t\tif (format === 'superscript') {\n\t\t\tconst superNumerator = this.toSuperscript(numerator)\n\t\t\tconst subDenominator = this.toSubscript(denominator)\n\n\t\t\tif (hasMixedPart) {\n\t\t\t\treturn isNegative\n\t\t\t\t\t? `-${wholePart} ${superNumerator}⁄${subDenominator}`\n\t\t\t\t\t: `${wholePart} ${superNumerator}⁄${subDenominator}`\n\t\t\t} else {\n\t\t\t\treturn isNegative ? `-${superNumerator}⁄${subDenominator}` : `${superNumerator}⁄${subDenominator}`\n\t\t\t}\n\t\t}\n\n\t\t// Fallback to basic format\n\t\treturn basicFraction\n\t}\n\n\t/**\n\t * Gets the Unicode fraction character if available\n\t *\n\t * @param numerator The numerator\n\t * @param denominator The denominator\n\t * @returns Unicode fraction character or null if not available\n\t */\n\tprivate getUnicodeFraction(numerator: number, denominator: number): string | null {\n\t\t// Map common fractions to their Unicode characters\n\t\tconst fractionMap: Record<string, string> = {\n\t\t\t'1/4': '¼',\n\t\t\t'1/2': '½',\n\t\t\t'3/4': '¾',\n\t\t\t'1/3': '⅓',\n\t\t\t'2/3': '⅔',\n\t\t\t'1/5': '⅕',\n\t\t\t'2/5': '⅖',\n\t\t\t'3/5': '⅗',\n\t\t\t'4/5': '⅘',\n\t\t\t'1/6': '⅙',\n\t\t\t'5/6': '⅚',\n\t\t\t'1/7': '⅐',\n\t\t\t'1/8': '⅛',\n\t\t\t'3/8': '⅜',\n\t\t\t'5/8': '⅝',\n\t\t\t'7/8': '⅞',\n\t\t\t'1/9': '⅑',\n\t\t\t'1/10': '⅒',\n\t\t}\n\n\t\tconst key = `${numerator}/${denominator}`\n\t\treturn fractionMap[key] || null\n\t}\n\n\t/**\n\t * Converts digits to superscript\n\t */\n\tprivate toSuperscript(str: string): string {\n\t\tconst superscriptMap: Record<string, string> = {\n\t\t\t'0': '⁰',\n\t\t\t'1': '¹',\n\t\t\t'2': '²',\n\t\t\t'3': '³',\n\t\t\t'4': '⁴',\n\t\t\t'5': '⁵',\n\t\t\t'6': '⁶',\n\t\t\t'7': '⁷',\n\t\t\t'8': '⁸',\n\t\t\t'9': '⁹',\n\t\t\t'-': '⁻',\n\t\t}\n\n\t\treturn str\n\t\t\t.split('')\n\t\t\t.map(char => superscriptMap[char] || char)\n\t\t\t.join('')\n\t}\n\n\t/**\n\t * Converts digits to subscript\n\t */\n\tprivate toSubscript(str: string): string {\n\t\tconst subscriptMap: Record<string, string> = {\n\t\t\t'0': '₀',\n\t\t\t'1': '₁',\n\t\t\t'2': '₂',\n\t\t\t'3': '₃',\n\t\t\t'4': '₄',\n\t\t\t'5': '₅',\n\t\t\t'6': '₆',\n\t\t\t'7': '₇',\n\t\t\t'8': '₈',\n\t\t\t'9': '₉',\n\t\t\t'-': '₋',\n\t\t}\n\n\t\treturn str\n\t\t\t.split('')\n\t\t\t.map(char => subscriptMap[char] || char)\n\t\t\t.join('')\n\t}\n}\n\nconst numbers = new Numbers()\n\nexport default numbers\n"],"mappings":";;;AAEA,SAAgB,EACf,GACA,IAAU,EACT,WAAW,GAAA,GAAA;CAGZ,OAAO,IAAI,GAAW,MAAA;EACrB,IAAM,IAAW,IAAI,sBAAqB,MAAA;GACzC,EAAW,KAAK,CAAA;EAAA,GACd,CAAA;EAUH,OAPI,MAAM,QAAQ,CAAA,IACjB,EAAQ,SAAQ,MAAM,EAAS,QAAQ,CAAA,CAAA,IAEvC,EAAS,QAAQ,CAAA,SAIlB;GACC,EAAS,WAAA;EAAA;CAAA,CAAA;AAGZ;ACrBA,IAOa,IAAb,MAAA;CAAA,cAAA;EAAA,KAAA,eAN0B,OAAd,YAAc,OAAe,UAAU,WAC1C,UAAU,WAEX;CAAA;CAgBP,YAAY,GAAgB,IAAwB,GAAA;EACnD,IAAM,IAAkB,MAAI;EAC5B,OAAO,KAAK,MAAM,IAAS,CAAA,IAAU;CACtC;CAkBA,aAAa,GAAgB,IAAiB,KAAK,cAAc,IAAoC,CAAC,GAAA;EACrG,OAAO,IAAI,KAAK,aAAa,GAAQ,CAAA,EAAS,OAAO,CAAA;CACtD;CAQA,kBAAkB,GAAsB,IAA2B,KAAA;EAClE,IAAM,IAAmB,EAAa,QAAQ,GAAkB,GAAA;EAChE,OAAO,WAAW,CAAA;CACnB;CAYA,KACC,GACA,IAAwB,GACxB,IAAiB,KAAK,cACtB,IAAoC,CAAC,GAAA;EAErC,IAAM,IAAgB,KAAK,YAAY,GAAQ,CAAA;EAC/C,OAAO,KAAK,aAAa,GAAe,GAAQ,CAAA;CACjD;CASA,eAA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ACnB,IAAM,IAAuC;GAC5C,GAAK;GACL,GAAK;GACL,GAAK;GACL,GAAK;GACL,GAAK;GACL,GAAK;GACL,GAAK;GACL,GAAK;GACL,GAAK;GACL,GAAK;GACL,KAAK;EAAA;EAGN,OAAO,EACL,MAAM,EAAA,EACN,KAAI,MAAQ,EAAa,MAAS,CAAA,EAClC,KAAK,EAAA;CACR;AAAA;AAGe,IAAI;AAAA,SAAA,QAAA,KAAA"}
|
package/dist/utils.cjs
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
Object.defineProperty(exports,Symbol.toStringTag,{value:`Module`});const e=require(`./search-DPKoC-dT.cjs`),t=require(`./animation-CCOIW4wJ.cjs`),n=require(`./overlay-stack-Bdr9lOqi.cjs`),r=require(`./utils-
|
|
1
|
+
Object.defineProperty(exports,Symbol.toStringTag,{value:`Module`});const e=require(`./search-DPKoC-dT.cjs`),t=require(`./animation-CCOIW4wJ.cjs`),n=require(`./overlay-stack-Bdr9lOqi.cjs`),r=require(`./utils-DIXndz6Q.cjs`);exports.ANIMATION_CSS_VARS=t.t,exports.BLACKBIRD_EASING=t.n,exports.DURATION_BACKDROP=t.r,exports.DURATION_ENTER=t.i,exports.DURATION_EXIT=t.a,exports.EASE_IN=t.o,exports.EASE_OUT=t.s,exports.GRID_ANIMATION_CSS=t.c,exports.Numbers=r.t,exports.SPRING_BOUNCY=t.l,exports.SPRING_GENTLE=t.u,exports.SPRING_SMOOTH=t.d,exports.SPRING_SNAPPY=t.f,exports.createAnimation=t.p,exports.createDismissAnimation=t.m,exports.createRevealAnimation=t.h,exports.createScaleAnimation=t.g,exports.getEasing=t._,exports.intersection$=r.n,exports.overlayStack=n.t,exports.prefersReducedMotion=t.v,exports.similarity=e.t,exports.tailwindAnimations=t.y;
|
package/dist/utils.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { t as e } from "./search-MvIBA93K.js";
|
|
2
2
|
import { _ as t, a as n, c as r, d as i, f as a, g as o, h as s, i as c, l, m as u, n as d, o as f, p, r as m, s as h, t as g, u as _, v, y } from "./animation-DCznELuT.js";
|
|
3
3
|
import { t as b } from "./overlay-stack-D2rgxQLh.js";
|
|
4
|
-
import { n as x, t as S } from "./utils-
|
|
4
|
+
import { n as x, t as S } from "./utils-dSPH7Oh9.js";
|
|
5
5
|
export { g as ANIMATION_CSS_VARS, d as BLACKBIRD_EASING, m as DURATION_BACKDROP, c as DURATION_ENTER, n as DURATION_EXIT, f as EASE_IN, h as EASE_OUT, r as GRID_ANIMATION_CSS, S as Numbers, l as SPRING_BOUNCY, _ as SPRING_GENTLE, i as SPRING_SMOOTH, a as SPRING_SNAPPY, p as createAnimation, u as createDismissAnimation, s as createRevealAnimation, o as createScaleAnimation, t as getEasing, x as intersection$, b as overlayStack, v as prefersReducedMotion, e as similarity, y as tailwindAnimations };
|
package/dist/visually-hidden.cjs
CHANGED
|
@@ -1,13 +1,13 @@
|
|
|
1
|
-
Object.defineProperty(exports,Symbol.toStringTag,{value:`Module`}),require(`./chunk-CncqDLb2.cjs`);const e=require(`./SchmancyElement-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
`]}render(){return n.html`<slot></slot>`}};r=e.u([(0,t.customElement)(`schmancy-visually-hidden`)],r),Object.defineProperty(exports,`SchmancyVisuallyHidden`,{enumerable:!0,get:function(){return r}});
|
|
1
|
+
Object.defineProperty(exports,Symbol.toStringTag,{value:`Module`}),require(`./chunk-CncqDLb2.cjs`);const e=require(`./SchmancyElement-CeKrBW2j.cjs`);require(`./mixins-Cjn20BQH.cjs`);let t=require(`lit/decorators.js`),n=require(`lit`);var r=class extends e.t{static{this.styles=[n.css`
|
|
2
|
+
:host {
|
|
3
|
+
position: absolute;
|
|
4
|
+
width: 1px;
|
|
5
|
+
height: 1px;
|
|
6
|
+
padding: 0;
|
|
7
|
+
margin: -1px;
|
|
8
|
+
overflow: hidden;
|
|
9
|
+
clip: rect(0, 0, 0, 0);
|
|
10
|
+
white-space: nowrap;
|
|
11
|
+
border-width: 0;
|
|
12
|
+
}
|
|
13
|
+
`]}render(){return n.html`<slot></slot>`}};r=e.u([(0,t.customElement)(`schmancy-visually-hidden`)],r),Object.defineProperty(exports,`SchmancyVisuallyHidden`,{enumerable:!0,get:function(){return r}});
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"visually-hidden.cjs","names":[],"sources":["../src/visually-hidden/visually-hidden.ts"],"sourcesContent":["import { SchmancyElement } from '@mixins/index'\nimport { css, html } from 'lit'\nimport { customElement } from 'lit/decorators.js'\n\n/**\n * Hides content visually while keeping it in the accessibility tree. Use for\n * screen-reader-only labels, supplemental descriptions, and live-region text\n * that sighted users don't need to see.\n *\n * Uses the WCAG-recommended clip pattern rather than `display: none` or\n * `visibility: hidden` so assistive tech still reads the content.\n *\n * @element schmancy-visually-hidden\n * @slot - Content hidden from sighted users but exposed to assistive tech.\n */\n@customElement('schmancy-visually-hidden')\nexport class SchmancyVisuallyHidden extends SchmancyElement {\n\tstatic styles = [
|
|
1
|
+
{"version":3,"file":"visually-hidden.cjs","names":[],"sources":["../src/visually-hidden/visually-hidden.ts"],"sourcesContent":["import { SchmancyElement } from '@mixins/index'\nimport { css, html } from 'lit'\nimport { customElement } from 'lit/decorators.js'\n\n/**\n * Hides content visually while keeping it in the accessibility tree. Use for\n * screen-reader-only labels, supplemental descriptions, and live-region text\n * that sighted users don't need to see.\n *\n * Uses the WCAG-recommended clip pattern rather than `display: none` or\n * `visibility: hidden` so assistive tech still reads the content.\n *\n * @element schmancy-visually-hidden\n * @slot - Content hidden from sighted users but exposed to assistive tech.\n */\n@customElement('schmancy-visually-hidden')\nexport class SchmancyVisuallyHidden extends SchmancyElement {\n\tstatic styles = [\n\t\tcss`\n\t\t\t:host {\n\t\t\t\tposition: absolute;\n\t\t\t\twidth: 1px;\n\t\t\t\theight: 1px;\n\t\t\t\tpadding: 0;\n\t\t\t\tmargin: -1px;\n\t\t\t\toverflow: hidden;\n\t\t\t\tclip: rect(0, 0, 0, 0);\n\t\t\t\twhite-space: nowrap;\n\t\t\t\tborder-width: 0;\n\t\t\t}\n\t\t`,\n\t]\n\trender() {\n\t\treturn html`<slot></slot>`\n\t}\n}\n\ndeclare global {\n\tinterface HTMLElementTagNameMap {\n\t\t'schmancy-visually-hidden': SchmancyVisuallyHidden\n\t}\n}\n"],"mappings":"0OAgBO,IAAA,EAAA,cAAqC,EAAA,CAAA,CAAA,OAAA,KAAA,OAC3B,CACf,EAAA,GAAG;;;;;;;;;;;;KAcJ,QAAA,CACC,MAAO,GAAA,IAAI,eACZ,CAAA,EAAA,EAAA,EAAA,EAAA,EAAA,EAAA,EAAA,eAnBc,0BAAA,CAAA,EAA0B,CAAA,EAAA,OAAA,eAAA,QAAA,yBAAA,CAAA,WAAA,CAAA,EAAA,IAAA,UAAA,CAAA,OAAA,CAAA,CAAA,CAAA"}
|
package/dist/visually-hidden.js
CHANGED
|
@@ -1,22 +1,22 @@
|
|
|
1
|
-
import { t as e, u as t } from "./SchmancyElement-
|
|
2
|
-
import "./mixins-
|
|
1
|
+
import { t as e, u as t } from "./SchmancyElement-Ob9yGkiG.js";
|
|
2
|
+
import "./mixins-q4KAL8Xr.js";
|
|
3
3
|
import { customElement as n } from "lit/decorators.js";
|
|
4
4
|
import { css as r, html as i } from "lit";
|
|
5
5
|
var a = class extends e {
|
|
6
6
|
static {
|
|
7
7
|
this.styles = [r`
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
`];
|
|
8
|
+
:host {
|
|
9
|
+
position: absolute;
|
|
10
|
+
width: 1px;
|
|
11
|
+
height: 1px;
|
|
12
|
+
padding: 0;
|
|
13
|
+
margin: -1px;
|
|
14
|
+
overflow: hidden;
|
|
15
|
+
clip: rect(0, 0, 0, 0);
|
|
16
|
+
white-space: nowrap;
|
|
17
|
+
border-width: 0;
|
|
18
|
+
}
|
|
19
|
+
`];
|
|
20
20
|
}
|
|
21
21
|
render() {
|
|
22
22
|
return i`<slot></slot>`;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"visually-hidden.js","names":[],"sources":["../src/visually-hidden/visually-hidden.ts"],"sourcesContent":["import { SchmancyElement } from '@mixins/index'\nimport { css, html } from 'lit'\nimport { customElement } from 'lit/decorators.js'\n\n/**\n * Hides content visually while keeping it in the accessibility tree. Use for\n * screen-reader-only labels, supplemental descriptions, and live-region text\n * that sighted users don't need to see.\n *\n * Uses the WCAG-recommended clip pattern rather than `display: none` or\n * `visibility: hidden` so assistive tech still reads the content.\n *\n * @element schmancy-visually-hidden\n * @slot - Content hidden from sighted users but exposed to assistive tech.\n */\n@customElement('schmancy-visually-hidden')\nexport class SchmancyVisuallyHidden extends SchmancyElement {\n\tstatic styles = [
|
|
1
|
+
{"version":3,"file":"visually-hidden.js","names":[],"sources":["../src/visually-hidden/visually-hidden.ts"],"sourcesContent":["import { SchmancyElement } from '@mixins/index'\nimport { css, html } from 'lit'\nimport { customElement } from 'lit/decorators.js'\n\n/**\n * Hides content visually while keeping it in the accessibility tree. Use for\n * screen-reader-only labels, supplemental descriptions, and live-region text\n * that sighted users don't need to see.\n *\n * Uses the WCAG-recommended clip pattern rather than `display: none` or\n * `visibility: hidden` so assistive tech still reads the content.\n *\n * @element schmancy-visually-hidden\n * @slot - Content hidden from sighted users but exposed to assistive tech.\n */\n@customElement('schmancy-visually-hidden')\nexport class SchmancyVisuallyHidden extends SchmancyElement {\n\tstatic styles = [\n\t\tcss`\n\t\t\t:host {\n\t\t\t\tposition: absolute;\n\t\t\t\twidth: 1px;\n\t\t\t\theight: 1px;\n\t\t\t\tpadding: 0;\n\t\t\t\tmargin: -1px;\n\t\t\t\toverflow: hidden;\n\t\t\t\tclip: rect(0, 0, 0, 0);\n\t\t\t\twhite-space: nowrap;\n\t\t\t\tborder-width: 0;\n\t\t\t}\n\t\t`,\n\t]\n\trender() {\n\t\treturn html`<slot></slot>`\n\t}\n}\n\ndeclare global {\n\tinterface HTMLElementTagNameMap {\n\t\t'schmancy-visually-hidden': SchmancyVisuallyHidden\n\t}\n}\n"],"mappings":";;;;AAgBO,IAAA,IAAA,cAAqC,EAAA;CAAA;EAAA,KAAA,SAC3B,CACf,CAAG;;;;;;;;;;;;;;CAcJ,SAAA;EACC,OAAO,CAAI;CACZ;AAAA;AAAA,IAAA,EAAA,CAnBA,EAAc,0BAAA,CAAA,GAA0B,CAAA;AAAA,SAAA,KAAA"}
|
|
@@ -0,0 +1,67 @@
|
|
|
1
|
+
require(`./chunk-CncqDLb2.cjs`);const e=require(`./SchmancyElement-CeKrBW2j.cjs`);require(`./mixins-Cjn20BQH.cjs`);const t=require(`./animation-CCOIW4wJ.cjs`),n=require(`./reduced-motion-Ds-HjMzn.cjs`),r=require(`./cursor-glow-Bulq-38P.cjs`),i=require(`./theme.service-h2fXQq7x.cjs`),a=require(`./overlay-stack-Bdr9lOqi.cjs`);let o=require(`rxjs`),s=require(`lit/directives/class-map.js`),c=require(`lit/directives/style-map.js`),l=require(`lit/decorators.js`),u=require(`lit`),d=require(`lit/directives/ref.js`);var f=`schmancy-window-`,p=`schmancy-float-`;function m(e,t){return!(e.left>=t.left+t.width||e.left+e.width<=t.left||e.top>=t.top+t.height||e.top+e.height<=t.top)}var h,g=class e{#e;constructor(){this.#e=new o.BehaviorSubject({windows:new Map,focusedId:null,stackOrder:[]}),this.state$=this.#e.asObservable()}static getInstance(){return e.instance||=new e,e.instance}get windows(){return this.#e.value.windows}get focusedId(){return this.#e.value.focusedId}register(e,t,n){let r=this.#e.value;if(r.windows.has(e))return;let i={id:e,bounds:t,visualState:`normal`,zIndex:a.t.assignZIndex(e),open:!1,snapTarget:n},o=new Map(r.windows);o.set(e,i);let s=a.t.getStackOrder();this.#e.next({...r,windows:o,stackOrder:s})}unregister(e){let t=this.#e.value;if(!t.windows.has(e))return;a.t.releaseId(e);let n=new Map(t.windows);n.delete(e);let r=a.t.getStackOrder(),i=t.focusedId===e?null:t.focusedId;this.#e.next({...t,windows:n,stackOrder:r,focusedId:i})}updateBounds(e,t){this.updateRecord(e,{bounds:t})}updateVisualState(e,t){this.updateRecord(e,{visualState:t})}updateOpen(e,t){this.updateRecord(e,{open:t})}focus(e){let t=this.#e.value;if(!t.windows.has(e)||t.focusedId===e)return;let n=a.t.bringToFront(e),r=new Map(t.windows),i=r.get(e);i&&r.set(e,{...i,zIndex:n});let o=a.t.getStackOrder();this.#e.next({...t,windows:r,stackOrder:o,focusedId:e})}findOverlaps(e,t){let n=[];for(let[r,i]of this.#e.value.windows)r!==t&&m(e,i.bounds)&&n.push(i);return n}getNeighbors(e){let t=[];for(let[n,r]of this.#e.value.windows)n!==e&&t.push(r);return t}selectWindow(e){return this.#e.pipe((0,o.map)(t=>t.windows.get(e)),(0,o.distinctUntilChanged)())}selectFocused(){return this.#e.pipe((0,o.map)(e=>e.focusedId),(0,o.distinctUntilChanged)())}loadPosition(e){try{let t=localStorage.getItem(f+e)??localStorage.getItem(p+e);return t?JSON.parse(t):null}catch{return null}}savePosition(e,t){try{localStorage.setItem(f+e,JSON.stringify(t))}catch{}}clearPosition(e){try{localStorage.removeItem(f+e),localStorage.removeItem(p+e)}catch{}}updateRecord(e,t){let n=this.#e.value,r=n.windows.get(e);if(!r)return;let i=new Map(n.windows);i.set(e,{...r,...t}),this.#e.next({...n,windows:i})}}.getInstance();function _(e,t,n){let r={...e};for(let e=0;e<10&&t.some(e=>{return t=r,n=e.bounds,!(t.left>=n.left+n.width||t.left+t.width<=n.left||t.top>=n.top+n.height||t.top+t.height<=n.top);var t,n});e++)r.left+=44,r.top+=44;return function(e,t){return{width:e.width,height:e.height,left:Math.max(0,Math.min(e.left,t.width-e.width)),top:Math.max(0,Math.min(e.top,t.height-e.height))}}(r,n)}var v=48,y=class extends e.t{static{h=this}constructor(...e){super(...e),this.id=`default`,this.lowered=!1,this.corner=`bottom-right`,this.resizable=!1,this.freePosition=!1,this.visualState=`normal`,this.minWidth=280,this.minHeight=200,this.open=!1,this.hasOpened=!1,this.position={x:16,y:16},this.currentCorner=`bottom-right`,this.appliedCorner=``,this.containerRef=(0,d.createRef)(),this.bodyRef=(0,d.createRef)(),this.headRef=(0,d.createRef)(),this.handleFocus=()=>g.focus(this.id),this.handleHeadKeydown=e=>{if(e.key===`Enter`||e.key===` `)return e.preventDefault(),void this.toggle();if(e.key===`ArrowUp`||e.key===`ArrowDown`||e.key===`ArrowLeft`||e.key===`ArrowRight`){e.preventDefault();let t=e.shiftKey?20:5,n=e.key===`ArrowRight`?t:e.key===`ArrowLeft`?-t:0,r=e.key===`ArrowDown`?t:e.key===`ArrowUp`?-t:0;this.position={x:this.position.x+n,y:this.position.y+r},this.applyContainerPosition(),this.savePosition()}}}static{this.styles=[u.css`
|
|
2
|
+
:host {
|
|
3
|
+
display: contents;
|
|
4
|
+
position: relative;
|
|
5
|
+
z-index: 1000;
|
|
6
|
+
}
|
|
7
|
+
:host([hidden]) {
|
|
8
|
+
display: none !important;
|
|
9
|
+
}
|
|
10
|
+
`]}get panelWidth(){return this.expandedWidth??`min(360px, calc(100vw - 32px))`}get isBottomCorner(){return this.currentCorner.startsWith(`bottom`)}get closedClipPath(){return this.isBottomCorner?`inset(calc(100% - 48px) 0px 0px 0px round 22px)`:`inset(0px 0px calc(100% - 48px) 0px round 22px)`}get openClipPath(){return`inset(0px 0px 0px 0px round 12px)`}applyContainerPosition(){let e=this.containerRef.value;if(!e)return;this.appliedCorner!==this.currentCorner&&(e.style.removeProperty(`left`),e.style.removeProperty(`right`),e.style.removeProperty(`top`),e.style.removeProperty(`bottom`),this.appliedCorner=this.currentCorner);let{x:t,y:n}=this.position;this.currentCorner.includes(`right`)?e.style.right=`${t}px`:e.style.left=`${t}px`,this.currentCorner.includes(`bottom`)?e.style.bottom=`${n+i.n.bottomOffset}px`:e.style.top=`${n}px`}static{this.VALID_CORNERS=new Set([`top-left`,`top-right`,`bottom-left`,`bottom-right`])}loadPosition(){let e=g.loadPosition(this.id);e&&(this.position={x:e.x,y:e.y},h.VALID_CORNERS.has(e.anchor)&&(this.currentCorner=e.anchor))}savePosition(){g.savePosition(this.id,{...this.position,anchor:this.currentCorner})}validateBounds(){let e=this.containerRef.value;if(!e)return;let t=e.getBoundingClientRect();if(t.width===0)return;let n=window.innerWidth,r=window.innerHeight,i=this.currentCorner.includes(`right`),a=this.currentCorner.includes(`bottom`),o=i?n-this.position.x-t.width:this.position.x,s=a?r-this.position.y-t.height:this.position.y,c=Math.max(0,Math.min(o,n-t.width)),l=Math.max(0,Math.min(s,r-t.height));this.position={x:i?n-c-t.width:c,y:a?r-l-t.height:l},this.applyContainerPosition()}reorientToNearestCorner(e=!1){if(this.freePosition){this.savePosition();let e=this.containerRef.value?.getBoundingClientRect();e&&g.updateBounds(this.id,{left:e.left,top:e.top,width:e.width,height:e.height});return}let r=this.containerRef.value;if(!r)return;let i=r.getBoundingClientRect(),a=this.currentCorner.includes(`bottom`),s=i.left+i.width/2,c=a?i.bottom-24:i.top+24,l=s>window.innerWidth/2?`right`:`left`,u=`${c>window.innerHeight/2?`bottom`:`top`}-${l}`;if(this.currentCorner=u,this.position={x:16,y:16},this.applyContainerPosition(),this.open||(r.style.clipPath=this.closedClipPath),e||n.t.value){this.savePosition();let e=r.getBoundingClientRect();g.updateBounds(this.id,{left:e.left,top:e.top,width:e.width,height:e.height});return}let d=r.getBoundingClientRect(),f=i.left-d.left,p=i.top-d.top;r.style.translate=`${f}px ${p}px`;let m=[{translate:`${f}px ${p}px`},{translate:`0px 0px`}];(0,o.from)(r.animate(m,{duration:t.d.duration,easing:t.d.easingFallback,fill:`forwards`}).finished).pipe((0,o.take)(1),(0,o.tap)(()=>{r.isConnected&&(r.style.translate=``);let e=r.getBoundingClientRect();g.updateBounds(this.id,{left:e.left,top:e.top,width:e.width,height:e.height})}),(0,o.catchError)(()=>o.EMPTY),(0,o.takeUntil)(this.disconnecting)).subscribe(),this.savePosition()}drag$(){return new o.Observable(()=>{let e=this.headRef.value,t=this.containerRef.value;if(!e||!t)return;let n=!1,r=(0,o.fromEvent)(e,`pointerdown`).pipe((0,o.filter)(e=>e.button===0),(0,o.filter)(e=>{let t=e.target.tagName?.toLowerCase();return![`input`,`textarea`,`select`,`button`].includes(t)&&!e.target.closest(`schmancy-input, schmancy-icon-button, button, a`)}),(0,o.tap)(e=>{e.preventDefault(),e.stopPropagation()})).pipe((0,o.map)(e=>{let r=t.getBoundingClientRect(),i=this.currentCorner.includes(`bottom`),a=this.open;return n=!1,{startX:e.clientX,startY:e.clientY,offsetX:e.clientX-r.left,offsetY:e.clientY-r.top,rect:r,vw:window.innerWidth,vh:window.innerHeight,isBottom:i,wasOpen:a,pointerId:e.pointerId}}),(0,o.switchMap)(({startX:e,startY:r,offsetX:i,offsetY:a,rect:s,vw:c,vh:l,isBottom:u,wasOpen:d,pointerId:f})=>{let p=(0,o.fromEvent)(window,`pointermove`).pipe((0,o.filter)(e=>e.pointerId===f),(0,o.auditTime)(0,o.animationFrameScheduler),(0,o.map)(e=>({clientX:e.clientX,clientY:e.clientY}))),m=(0,o.fromEvent)(window,`pointerup`).pipe((0,o.filter)(e=>e.pointerId===f));return p.pipe((0,o.tap)(({clientX:o,clientY:f})=>{let p=o-e,m=f-r;if(Math.sqrt(p*p+m*m)>5&&!n&&(n=!0,this.applyDragVisuals(!0),d)){this.open=!1,t.style.clipPath=this.closedClipPath,t.style.overflow=`hidden`;let e=this.bodyRef.value;e&&(e.inert=!0,e.style.visibility=`hidden`)}if(!n)return;let h=Math.max(0,Math.min(o-i,c-s.width)),g=u?v-s.height:0,_=u?l-s.height:l-v,y=Math.max(g,Math.min(f-a,_));this.position={x:this.currentCorner.includes(`right`)?c-h-s.width:h,y:u?l-y-s.height:y},this.applyContainerPosition()}),(0,o.takeUntil)(m),(0,o.finalize)(()=>{n?(this.reorientToNearestCorner(),this.applyDragVisuals(!1),n=!1):(n=!1,this.toggle())}))})).subscribe();return()=>r.unsubscribe()})}connectedCallback(){super.connectedCallback(),(0,o.from)(this.updateComplete).pipe((0,o.take)(1),(0,o.tap)(()=>{this.currentCorner=this.corner,this.loadPosition(),this.applyContainerPosition(),this.initDOMState();let e=this.containerRef.value;if(e){let t=e.getBoundingClientRect(),n={left:t.left,top:t.top,width:t.width,height:t.height};g.register(this.id,n,this.freePosition?`free`:this.currentCorner)}}),(0,o.switchMap)(()=>(0,o.merge)(this.drag$(),g.selectWindow(this.id).pipe((0,o.tap)(e=>{if(!e)return;let t=this.containerRef.value;t&&(t.style.zIndex=String(e.zIndex))})))),(0,o.takeUntil)(this.disconnecting)).subscribe(),(0,o.merge)((0,o.fromEvent)(window,`resize`).pipe((0,o.auditTime)(0,o.animationFrameScheduler),(0,o.tap)(()=>this.validateBounds())),i.n.bottomOffset$.pipe((0,o.tap)(()=>this.applyContainerPosition()))).pipe((0,o.takeUntil)(this.disconnecting)).subscribe()}disconnectedCallback(){super.disconnectedCallback(),g.unregister(this.id)}initDOMState(){let e=this.containerRef.value,t=this.bodyRef.value;e&&(this.applyContainerPosition(),this.open?(this.hasOpened=!0,e.style.overflow=``,t&&(t.inert=!1,t.style.visibility=`visible`)):(e.style.clipPath=this.closedClipPath,e.style.overflow=`hidden`,t&&(t.inert=!0,t.style.visibility=`hidden`)))}animateOpen(){let e=this.containerRef.value,r=this.bodyRef.value;if(!e)return;this.hasOpened=!0,this.open=!0;let i=e.getBoundingClientRect(),a={left:i.left,top:this.isBottomCorner?i.top-400:i.top,width:i.width,height:448},s=g.findOverlaps(a,this.id);if(s.length>0){let e=_(a,s,{width:window.innerWidth,height:window.innerHeight});if(Math.abs(e.left-a.left)>10||Math.abs(e.top-a.top)>10){let t=this.currentCorner.includes(`right`),n=this.currentCorner.includes(`bottom`);this.position={x:t?window.innerWidth-e.left-e.width:e.left,y:n?window.innerHeight-e.top-e.height:e.top},this.applyContainerPosition()}}if(r&&(r.style.visibility=`visible`,r.inert=!1),n.t.value)return e.style.clipPath=``,e.style.overflow=``,void this.dispatchScopedEvent(`window-toggle`,{state:`expanded`});this.currentAnimation?.cancel(),e.style.overflow=`hidden`,e.style.willChange=`opacity`;let c=[{clipPath:this.closedClipPath,opacity:.95},{clipPath:this.openClipPath,opacity:1}],l=e.animate(c,{duration:t.f.duration,easing:t.f.easingFallback,fill:`forwards`});this.currentAnimation=l,(0,o.from)(l.finished).pipe((0,o.take)(1),(0,o.tap)(()=>{e.isConnected&&(e.style.clipPath=``,e.style.overflow=``,e.style.willChange=``)}),(0,o.catchError)(()=>o.EMPTY),(0,o.takeUntil)(this.disconnecting)).subscribe(),this.dispatchScopedEvent(`window-toggle`,{state:`expanded`})}animateClose(){let e=this.containerRef.value;if(!e)return;if(n.t.value){e.style.clipPath=this.closedClipPath,e.style.overflow=`hidden`,this.open=!1;let t=this.bodyRef.value;t&&(t.inert=!0,t.style.visibility=`hidden`),this.dispatchScopedEvent(`window-toggle`,{state:`collapsed`});return}this.currentAnimation?.cancel(),e.style.overflow=`hidden`,e.style.willChange=`opacity`;let r=[{clipPath:this.openClipPath,opacity:1},{clipPath:this.closedClipPath,opacity:.95}],i=e.animate(r,{duration:Math.round(.7*t.f.duration),easing:`cubic-bezier(0.4, 0, 0.8, 0.15)`,fill:`forwards`});this.currentAnimation=i,(0,o.from)(i.finished).pipe((0,o.take)(1),(0,o.tap)(()=>{this.open=!1,e.style.willChange=``;let t=this.bodyRef.value;t&&(t.inert=!0,t.style.visibility=`hidden`)}),(0,o.catchError)(()=>o.EMPTY),(0,o.takeUntil)(this.disconnecting)).subscribe(),this.dispatchScopedEvent(`window-toggle`,{state:`collapsed`})}applyDragVisuals(e){let t=this.headRef.value,n=this.containerRef.value;t&&(t.classList.toggle(`cursor-grabbing`,e),t.classList.toggle(`cursor-move`,!e)),n&&(n.style.opacity=e?`0.95`:``)}toggle(){this.open?this.animateClose():this.animateOpen()}expand(){this.open||this.animateOpen()}close(){this.open&&this.animateClose()}render(){let e=this.currentCorner.startsWith(`bottom`),t=(0,s.classMap)({fixed:!0,flex:!0,"flex-col":e,"flex-col-reverse":!e,"z-1000":!0,"rounded-2xl":this.open,"rounded-[22px]":!this.open,"overflow-hidden":!0,"shadow-sm":!this.open&&this.lowered,"shadow-md":!this.open&&!this.lowered,"shadow-lg":this.open}),n=(0,c.styleMap)({width:this.panelWidth,"max-height":`calc(100vh - 32px)`,"pointer-events":`none`}),i=(0,c.styleMap)({"pointer-events":this.open?`auto`:`none`}),a=(0,s.classMap)({"h-full":!0,"px-3":!0,flex:!0,"items-center":!0,"gap-2":!0,"select-none":!0,"cursor-move":!0});return u.html`
|
|
11
|
+
<schmancy-surface
|
|
12
|
+
${(0,d.ref)(this.containerRef)}
|
|
13
|
+
type="container"
|
|
14
|
+
class=${t}
|
|
15
|
+
style=${n}
|
|
16
|
+
aria-expanded=${this.open}
|
|
17
|
+
@pointerdown=${this.handleFocus}
|
|
18
|
+
>
|
|
19
|
+
<!-- Details section (visually above summary for bottom corners) -->
|
|
20
|
+
<section
|
|
21
|
+
${(0,d.ref)(this.bodyRef)}
|
|
22
|
+
class="flex-1 min-h-0 overflow-hidden flex flex-col"
|
|
23
|
+
style=${i}
|
|
24
|
+
role="region"
|
|
25
|
+
aria-label="Expandable content"
|
|
26
|
+
>
|
|
27
|
+
${this.hasOpened?u.html`<slot name="details"></slot>`:u.nothing}
|
|
28
|
+
</section>
|
|
29
|
+
|
|
30
|
+
<!-- Summary section -- always interactive, always visible -->
|
|
31
|
+
<section
|
|
32
|
+
class="shrink-0 bg-surface-lowest"
|
|
33
|
+
style=${(0,c.styleMap)({"pointer-events":`auto`,height:`48px`})}
|
|
34
|
+
>
|
|
35
|
+
<div
|
|
36
|
+
${(0,d.ref)(this.headRef)}
|
|
37
|
+
${r.t({radius:200,intensity:.1})}
|
|
38
|
+
class=${a}
|
|
39
|
+
role="button"
|
|
40
|
+
tabindex="0"
|
|
41
|
+
title="Drag to move, click to expand"
|
|
42
|
+
aria-label="${this.open?`Collapse window`:`Expand window`}"
|
|
43
|
+
@keydown=${this.handleHeadKeydown}
|
|
44
|
+
>
|
|
45
|
+
<div class="flex-1 min-w-0">
|
|
46
|
+
<slot></slot>
|
|
47
|
+
</div>
|
|
48
|
+
<svg
|
|
49
|
+
width="16"
|
|
50
|
+
height="16"
|
|
51
|
+
viewBox="0 0 24 24"
|
|
52
|
+
fill="none"
|
|
53
|
+
class="shrink-0 text-surface-on/40 transition-transform duration-200 ${this.open?`rotate-180`:``}"
|
|
54
|
+
aria-hidden="true"
|
|
55
|
+
>
|
|
56
|
+
<path
|
|
57
|
+
d="M6 9L12 15L18 9"
|
|
58
|
+
stroke="currentColor"
|
|
59
|
+
stroke-width="2"
|
|
60
|
+
stroke-linecap="round"
|
|
61
|
+
stroke-linejoin="round"
|
|
62
|
+
/>
|
|
63
|
+
</svg>
|
|
64
|
+
</div>
|
|
65
|
+
</section>
|
|
66
|
+
</schmancy-surface>
|
|
67
|
+
`}};e.u([(0,l.property)({type:String})],y.prototype,`id`,void 0),e.u([(0,l.property)({type:String})],y.prototype,`expandedWidth`,void 0),e.u([(0,l.property)({type:String})],y.prototype,`expandedHeight`,void 0),e.u([(0,l.property)({type:Boolean,reflect:!0})],y.prototype,`lowered`,void 0),e.u([(0,l.property)({type:String})],y.prototype,`corner`,void 0),e.u([(0,l.property)({type:Boolean})],y.prototype,`resizable`,void 0),e.u([(0,l.property)({type:Boolean})],y.prototype,`freePosition`,void 0),e.u([(0,l.property)({type:String,reflect:!0})],y.prototype,`visualState`,void 0),e.u([(0,l.property)({type:Number})],y.prototype,`minWidth`,void 0),e.u([(0,l.property)({type:Number})],y.prototype,`minHeight`,void 0),e.u([(0,l.property)({type:Boolean,reflect:!0})],y.prototype,`open`,void 0),e.u([(0,l.state)()],y.prototype,`hasOpened`,void 0),e.u([(0,l.state)()],y.prototype,`currentCorner`,void 0);var b=y=h=e.u([(0,l.customElement)(`schmancy-window`)],y);Object.defineProperty(exports,`n`,{enumerable:!0,get:function(){return g}}),Object.defineProperty(exports,`t`,{enumerable:!0,get:function(){return b}});
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"window-Br1OmpL-.cjs","names":["#state$"],"sources":["../src/window/window-manager.ts","../src/window/window-position.ts","../src/window/window.ts"],"sourcesContent":["/**\n * Window Manager — singleton service for multi-window coordination.\n *\n * Tracks all schmancy-window instances: positions, z-indices, focus, visual states.\n * Components register on connectedCallback, unregister on disconnectedCallback.\n * Focus changes, position updates, and overlap queries all flow through here.\n *\n * Follows the ThemeService singleton pattern (theme/theme.service.ts).\n *\n * Example:\n * windowManager.register('chat-1', bounds, 'bottom-right')\n * windowManager.focus('chat-1') // bumps z-index, updates focusedId\n * const overlaps = windowManager.findOverlaps(projectedBounds, 'chat-1')\n */\n\nimport { BehaviorSubject, Observable, distinctUntilChanged, map } from 'rxjs'\nimport { overlayStack } from '../utils/overlay-stack.js'\nimport type { WindowBounds, WindowRecord, WindowRegistryState, SnapTarget } from './window-registry.js'\n\nconst STORAGE_PREFIX = 'schmancy-window-'\nconst LEGACY_STORAGE_PREFIX = 'schmancy-float-'\n\nclass WindowManagerService {\n\tprivate static instance: WindowManagerService\n\n\treadonly #state$ = new BehaviorSubject<WindowRegistryState>({\n\t\twindows: new Map(),\n\t\tfocusedId: null,\n\t\tstackOrder: [],\n\t})\n\n\treadonly state$ = this.#state$.asObservable()\n\n\tprivate constructor() {}\n\n\tstatic getInstance(): WindowManagerService {\n\t\tif (!WindowManagerService.instance) {\n\t\t\tWindowManagerService.instance = new WindowManagerService()\n\t\t}\n\t\treturn WindowManagerService.instance\n\t}\n\n\t// ── Synchronous accessors ──────────────────────────────────────────\n\n\tget windows(): Map<string, WindowRecord> {\n\t\treturn this.#state$.value.windows\n\t}\n\n\tget focusedId(): string | null {\n\t\treturn this.#state$.value.focusedId\n\t}\n\n\t// ── Registration ───────────────────────────────────────────────────\n\n\tregister(id: string, initialBounds: WindowBounds, snapTarget: SnapTarget): void {\n\t\tconst state = this.#state$.value\n\t\tif (state.windows.has(id)) return\n\n\t\tconst zIndex = overlayStack.assignZIndex(id)\n\t\tconst record: WindowRecord = {\n\t\t\tid,\n\t\t\tbounds: initialBounds,\n\t\t\tvisualState: 'normal',\n\t\t\tzIndex,\n\t\t\topen: false,\n\t\t\tsnapTarget,\n\t\t}\n\n\t\tconst windows = new Map(state.windows)\n\t\twindows.set(id, record)\n\t\tconst stackOrder = overlayStack.getStackOrder()\n\n\t\tthis.#state$.next({ ...state, windows, stackOrder })\n\t}\n\n\tunregister(id: string): void {\n\t\tconst state = this.#state$.value\n\t\tif (!state.windows.has(id)) return\n\n\t\toverlayStack.releaseId(id)\n\t\tconst windows = new Map(state.windows)\n\t\twindows.delete(id)\n\t\tconst stackOrder = overlayStack.getStackOrder()\n\t\tconst focusedId = state.focusedId === id ? null : state.focusedId\n\n\t\tthis.#state$.next({ ...state, windows, stackOrder, focusedId })\n\t}\n\n\t// ── State mutations ────────────────────────────────────────────────\n\n\tupdateBounds(id: string, bounds: WindowBounds): void {\n\t\tthis.updateRecord(id, { bounds })\n\t}\n\n\tupdateVisualState(id: string, visualState: WindowRecord['visualState']): void {\n\t\tthis.updateRecord(id, { visualState })\n\t}\n\n\tupdateOpen(id: string, open: boolean): void {\n\t\tthis.updateRecord(id, { open })\n\t}\n\n\tfocus(id: string): void {\n\t\tconst state = this.#state$.value\n\t\tif (!state.windows.has(id)) return\n\t\tif (state.focusedId === id) return\n\n\t\tconst zIndex = overlayStack.bringToFront(id)\n\t\tconst windows = new Map(state.windows)\n\t\tconst record = windows.get(id)\n\t\tif (record) {\n\t\t\twindows.set(id, { ...record, zIndex })\n\t\t}\n\t\tconst stackOrder = overlayStack.getStackOrder()\n\n\t\tthis.#state$.next({ ...state, windows, stackOrder, focusedId: id })\n\t}\n\n\t// ── Queries ────────────────────────────────────────────────────────\n\n\tfindOverlaps(bounds: WindowBounds, excludeId: string): WindowRecord[] {\n\t\tconst result: WindowRecord[] = []\n\t\tfor (const [id, record] of this.#state$.value.windows) {\n\t\t\tif (id === excludeId) continue\n\t\t\tif (rectsOverlap(bounds, record.bounds)) {\n\t\t\t\tresult.push(record)\n\t\t\t}\n\t\t}\n\t\treturn result\n\t}\n\n\tgetNeighbors(id: string): WindowRecord[] {\n\t\tconst result: WindowRecord[] = []\n\t\tfor (const [otherId, record] of this.#state$.value.windows) {\n\t\t\tif (otherId !== id) result.push(record)\n\t\t}\n\t\treturn result\n\t}\n\n\t// ── Selectors ──────────────────────────────────────────────────────\n\n\tselectWindow(id: string): Observable<WindowRecord | undefined> {\n\t\treturn this.#state$.pipe(\n\t\t\tmap(state => state.windows.get(id)),\n\t\t\tdistinctUntilChanged(),\n\t\t)\n\t}\n\n\tselectFocused(): Observable<string | null> {\n\t\treturn this.#state$.pipe(\n\t\t\tmap(state => state.focusedId),\n\t\t\tdistinctUntilChanged(),\n\t\t)\n\t}\n\n\t// ── Persistence ────────────────────────────────────────────────────\n\n\tloadPosition(id: string): { x: number; y: number; anchor: string } | null {\n\t\ttry {\n\t\t\t// Try new key first, fall back to legacy\n\t\t\tconst raw = localStorage.getItem(STORAGE_PREFIX + id) ?? localStorage.getItem(LEGACY_STORAGE_PREFIX + id)\n\t\t\tif (!raw) return null\n\t\t\treturn JSON.parse(raw) as { x: number; y: number; anchor: string }\n\t\t} catch {\n\t\t\treturn null\n\t\t}\n\t}\n\n\tsavePosition(id: string, data: { x: number; y: number; anchor: string }): void {\n\t\ttry {\n\t\t\tlocalStorage.setItem(STORAGE_PREFIX + id, JSON.stringify(data))\n\t\t} catch {\n\t\t\t// ignore\n\t\t}\n\t}\n\n\tclearPosition(id: string): void {\n\t\ttry {\n\t\t\tlocalStorage.removeItem(STORAGE_PREFIX + id)\n\t\t\tlocalStorage.removeItem(LEGACY_STORAGE_PREFIX + id)\n\t\t} catch {\n\t\t\t// ignore\n\t\t}\n\t}\n\n\t// ── Internal ───────────────────────────────────────────────────────\n\n\tprivate updateRecord(id: string, updates: Partial<WindowRecord>): void {\n\t\tconst state = this.#state$.value\n\t\tconst record = state.windows.get(id)\n\t\tif (!record) return\n\n\t\tconst windows = new Map(state.windows)\n\t\twindows.set(id, { ...record, ...updates })\n\t\tthis.#state$.next({ ...state, windows })\n\t}\n}\n\n/** Simple rect overlap check (inline — no circular import with window-position) */\nfunction rectsOverlap(a: WindowBounds, b: WindowBounds): boolean {\n\treturn !(\n\t\ta.left >= b.left + b.width ||\n\t\ta.left + a.width <= b.left ||\n\t\ta.top >= b.top + b.height ||\n\t\ta.top + a.height <= b.top\n\t)\n}\n\nexport const windowManager = WindowManagerService.getInstance()\n","/**\n * Window Position — pure functions for overlap resolution, cascade, and snapping.\n *\n * All functions are stateless: they take window bounds and viewport dimensions,\n * return new bounds. No side effects, no DOM access, no subscriptions.\n *\n * Example:\n * const projected = { left: 100, top: 400, width: 360, height: 500 }\n * const neighbors = windowManager.findOverlaps(projected, 'my-id')\n * const resolved = resolveOverlap(projected, neighbors, { width: 1440, height: 900 })\n * // → { left: 144, top: 444, width: 360, height: 500 } (cascaded away from conflict)\n */\n\nimport type { WindowBounds, WindowRecord } from './window-registry.js'\n\nconst HEAD_HEIGHT = 44\nconst CASCADE_OFFSET = HEAD_HEIGHT\nconst MAX_CASCADE_ATTEMPTS = 10\n\n/** Check if two rectangles overlap (edges touching does NOT count as overlap) */\nexport function rectsOverlap(a: WindowBounds, b: WindowBounds): boolean {\n\treturn !(\n\t\ta.left >= b.left + b.width ||\n\t\ta.left + a.width <= b.left ||\n\t\ta.top >= b.top + b.height ||\n\t\ta.top + a.height <= b.top\n\t)\n}\n\n/**\n * Resolve overlap by cascading diagonally until no conflict.\n * Shifts by (HEAD_HEIGHT, HEAD_HEIGHT) per attempt, clamped to viewport.\n */\nexport function resolveOverlap(\n\tcandidate: WindowBounds,\n\texisting: WindowRecord[],\n\tviewport: { width: number; height: number },\n): WindowBounds {\n\tconst bounds = { ...candidate }\n\n\tfor (let attempt = 0; attempt < MAX_CASCADE_ATTEMPTS; attempt++) {\n\t\tconst hasOverlap = existing.some(w => rectsOverlap(bounds, w.bounds))\n\t\tif (!hasOverlap) break\n\n\t\tbounds.left += CASCADE_OFFSET\n\t\tbounds.top += CASCADE_OFFSET\n\t}\n\n\treturn clampToViewport(bounds, viewport)\n}\n\n/**\n * Clamp bounds so the window stays fully within the viewport.\n */\nexport function clampToViewport(bounds: WindowBounds, viewport: { width: number; height: number }): WindowBounds {\n\treturn {\n\t\twidth: bounds.width,\n\t\theight: bounds.height,\n\t\tleft: Math.max(0, Math.min(bounds.left, viewport.width - bounds.width)),\n\t\ttop: Math.max(0, Math.min(bounds.top, viewport.height - bounds.height)),\n\t}\n}\n","import { SchmancyElement } from '@mixins/index'\nimport { css, html, nothing } from 'lit'\nimport { customElement, property, state } from 'lit/decorators.js'\nimport { classMap } from 'lit/directives/class-map.js'\nimport { createRef, ref } from 'lit/directives/ref.js'\nimport { styleMap } from 'lit/directives/style-map.js'\nimport {\n\tanimationFrameScheduler,\n\tauditTime,\n\tcatchError,\n\tEMPTY,\n\tfilter,\n\tfinalize,\n\tfrom,\n\tfromEvent,\n\tmap,\n\tmerge,\n\tObservable,\n\tswitchMap,\n\ttake,\n\ttakeUntil,\n\ttap,\n} from 'rxjs'\nimport { SPRING_SMOOTH, SPRING_SNAPPY } from '../utils/animation.js'\nimport { cursorGlow } from '../directives/cursor-glow'\nimport { reducedMotion$ } from '../directives/reduced-motion'\nimport { theme } from '../theme/theme.service.js'\nimport type { SnapCorner, WindowBounds, WindowVisualState } from './window-registry.js'\nimport { windowManager } from './window-manager.js'\nimport { resolveOverlap } from './window-position.js'\n\nconst HEAD_HEIGHT = 48\nconst DRAG_THRESHOLD = 5\n\ninterface Position {\n\tx: number\n\ty: number\n}\n\n@customElement('schmancy-window')\nexport default class SchmancyWindow extends SchmancyElement {\n\tstatic styles = [\n\t\tcss`\n\t\t\t:host {\n\t\t\t\tdisplay: contents;\n\t\t\t\tposition: relative;\n\t\t\t\tz-index: 1000;\n\t\t\t}\n\t\t\t:host([hidden]) {\n\t\t\t\tdisplay: none !important;\n\t\t\t}\n\t\t`,\n\t]\n\n\t@property({ type: String }) id: string = 'default'\n\t/** Override the expanded panel width (e.g. '320px', '24rem'). Defaults to responsive sizing. */\n\t@property({ type: String }) expandedWidth?: string\n\t/** Override the expanded panel height (e.g. '400px', '50vh'). */\n\t@property({ type: String }) expandedHeight?: string\n\t/** When true, uses a lower elevation shadow in the collapsed state. */\n\t@property({ type: Boolean, reflect: true }) lowered: boolean = false\n\t/** Corner the window is anchored to. */\n\t@property({ type: String }) corner: SnapCorner = 'bottom-right'\n\t/** When true, window can be resized by the user. */\n\t@property({ type: Boolean }) resizable = false\n\t/** When true, window stays at its dragged position instead of snapping to a corner. */\n\t@property({ type: Boolean }) freePosition = false\n\t/** Visual state of the window (minimized, normal, maximized). */\n\t@property({ type: String, reflect: true }) visualState: WindowVisualState = 'normal'\n\t/** Minimum width in pixels. */\n\t@property({ type: Number }) minWidth = 280\n\t/** Minimum height in pixels. */\n\t@property({ type: Number }) minHeight = 200\n\n\t/** Whether the body is expanded. */\n\t@property({ type: Boolean, reflect: true }) open = false\n\n\tprivate currentAnimation?: Animation\n\n\t/** Lazy rendering: body content not in DOM until first expand. */\n\t@state() private hasOpened = false\n\n\t// Internal position -- plain fields, updated directly during drag\n\tprivate position: Position = { x: 16, y: 16 }\n\t@state() private currentCorner: SnapCorner = 'bottom-right'\n\n\t// Track applied corner to avoid unnecessary style.removeProperty calls during drag\n\tprivate appliedCorner: string = ''\n\n\t// Refs\n\tprivate containerRef = createRef<HTMLElement>()\n\tprivate bodyRef = createRef<HTMLElement>()\n\tprivate headRef = createRef<HTMLElement>()\n\n\t// ============================================\n\t// COMPUTED\n\t// ============================================\n\n\tprivate get panelWidth(): string {\n\t\treturn this.expandedWidth ?? 'min(360px, calc(100vw - 32px))'\n\t}\n\n\tprivate get isBottomCorner(): boolean {\n\t\treturn this.currentCorner.startsWith('bottom')\n\t}\n\n\tprivate get closedClipPath(): string {\n\t\treturn this.isBottomCorner\n\t\t\t? `inset(calc(100% - ${HEAD_HEIGHT}px) 0px 0px 0px round 22px)`\n\t\t\t: `inset(0px 0px calc(100% - ${HEAD_HEIGHT}px) 0px round 22px)`\n\t}\n\n\tprivate get openClipPath(): string {\n\t\treturn 'inset(0px 0px 0px 0px round 12px)'\n\t}\n\n\t// ============================================\n\t// POSITION MANAGEMENT\n\t// ============================================\n\n\tprivate applyContainerPosition() {\n\t\tconst container = this.containerRef.value\n\t\tif (!container) return\n\t\t// Only clear position properties when corner changes (avoids 4 style invalidations per drag frame)\n\t\tif (this.appliedCorner !== this.currentCorner) {\n\t\t\tcontainer.style.removeProperty('left')\n\t\t\tcontainer.style.removeProperty('right')\n\t\t\tcontainer.style.removeProperty('top')\n\t\t\tcontainer.style.removeProperty('bottom')\n\t\t\tthis.appliedCorner = this.currentCorner\n\t\t}\n\t\tconst { x, y } = this.position\n\t\tif (this.currentCorner.includes('right')) {\n\t\t\tcontainer.style.right = `${x}px`\n\t\t} else {\n\t\t\tcontainer.style.left = `${x}px`\n\t\t}\n\t\tif (this.currentCorner.includes('bottom')) {\n\t\t\tcontainer.style.bottom = `${y + theme.bottomOffset}px`\n\t\t} else {\n\t\t\tcontainer.style.top = `${y}px`\n\t\t}\n\t}\n\n\tprivate static readonly VALID_CORNERS = new Set<string>(['top-left', 'top-right', 'bottom-left', 'bottom-right'])\n\n\tprivate loadPosition() {\n\t\tconst saved = windowManager.loadPosition(this.id)\n\t\tif (saved) {\n\t\t\tthis.position = { x: saved.x, y: saved.y }\n\t\t\tif (SchmancyWindow.VALID_CORNERS.has(saved.anchor)) {\n\t\t\t\tthis.currentCorner = saved.anchor as SnapCorner\n\t\t\t}\n\t\t}\n\t}\n\n\tprivate savePosition() {\n\t\twindowManager.savePosition(this.id, { ...this.position, anchor: this.currentCorner })\n\t}\n\n\tprivate validateBounds() {\n\t\tconst container = this.containerRef.value\n\t\tif (!container) return\n\t\tconst rect = container.getBoundingClientRect()\n\t\tif (rect.width === 0) return\n\t\tconst vw = window.innerWidth\n\t\tconst vh = window.innerHeight\n\t\tconst isRight = this.currentCorner.includes('right')\n\t\tconst isBottom = this.currentCorner.includes('bottom')\n\t\tconst actualLeft = isRight ? vw - this.position.x - rect.width : this.position.x\n\t\tconst actualTop = isBottom ? vh - this.position.y - rect.height : this.position.y\n\t\tconst newLeft = Math.max(0, Math.min(actualLeft, vw - rect.width))\n\t\tconst newTop = Math.max(0, Math.min(actualTop, vh - rect.height))\n\t\tthis.position = {\n\t\t\tx: isRight ? vw - newLeft - rect.width : newLeft,\n\t\t\ty: isBottom ? vh - newTop - rect.height : newTop,\n\t\t}\n\t\tthis.applyContainerPosition()\n\t}\n\n\t// ============================================\n\t// CORNER SNAPPING\n\t// ============================================\n\n\tprivate reorientToNearestCorner(skipAnimation = false): void {\n\t\t// Free position mode: skip corner snapping\n\t\tif (this.freePosition) {\n\t\t\tthis.savePosition()\n\t\t\tconst rect = this.containerRef.value?.getBoundingClientRect()\n\t\t\tif (rect) {\n\t\t\t\twindowManager.updateBounds(this.id, { left: rect.left, top: rect.top, width: rect.width, height: rect.height })\n\t\t\t}\n\t\t\treturn\n\t\t}\n\n\t\tconst container = this.containerRef.value\n\t\tif (!container) return\n\n\t\t// F -- record current screen position before DOM mutation\n\t\tconst rect = container.getBoundingClientRect()\n\n\t\t// L -- calculate nearest corner using head visual center\n\t\tconst currentIsBottom = this.currentCorner.includes('bottom')\n\t\tconst headCenterX = rect.left + rect.width / 2\n\t\tconst headCenterY = currentIsBottom ? rect.bottom - HEAD_HEIGHT / 2 : rect.top + HEAD_HEIGHT / 2\n\t\tconst side = headCenterX > window.innerWidth / 2 ? 'right' : 'left'\n\t\tconst vert = headCenterY > window.innerHeight / 2 ? 'bottom' : 'top'\n\t\tconst newCorner: SnapCorner = `${vert}-${side}` as SnapCorner\n\n\t\t// Snap corner and reset offset to standard edge gap\n\t\tthis.currentCorner = newCorner\n\t\tthis.position = { x: 16, y: 16 }\n\t\tthis.applyContainerPosition()\n\t\t// Sync clip-path to new corner\n\t\tif (!this.open) {\n\t\t\tcontainer.style.clipPath = this.closedClipPath\n\t\t}\n\n\t\tif (skipAnimation || reducedMotion$.value) {\n\t\t\tthis.savePosition()\n\t\t\tconst snapRect = container.getBoundingClientRect()\n\t\t\twindowManager.updateBounds(this.id, {\n\t\t\t\tleft: snapRect.left,\n\t\t\t\ttop: snapRect.top,\n\t\t\t\twidth: snapRect.width,\n\t\t\t\theight: snapRect.height,\n\t\t\t})\n\t\t\treturn\n\t\t}\n\n\t\t// I -- invert: shift element back to its original visual position\n\t\tconst newRect = container.getBoundingClientRect()\n\t\tconst dx = rect.left - newRect.left\n\t\tconst dy = rect.top - newRect.top\n\t\tcontainer.style.translate = `${dx}px ${dy}px`\n\n\t\t// P -- play: animate from the inverse offset to natural resting position\n\t\tconst flipKeyframes: Keyframe[] = [{ translate: `${dx}px ${dy}px` }, { translate: '0px 0px' }]\n\t\tconst anim = container.animate(flipKeyframes, {\n\t\t\tduration: SPRING_SMOOTH.duration,\n\t\t\teasing: SPRING_SMOOTH.easingFallback,\n\t\t\tfill: 'forwards',\n\t\t})\n\t\tfrom(anim.finished)\n\t\t\t.pipe(\n\t\t\t\ttake(1),\n\t\t\t\ttap(() => {\n\t\t\t\t\tif (container.isConnected) container.style.translate = ''\n\t\t\t\t\t// Report final resting bounds after animation completes\n\t\t\t\t\tconst finalRect = container.getBoundingClientRect()\n\t\t\t\t\twindowManager.updateBounds(this.id, {\n\t\t\t\t\t\tleft: finalRect.left,\n\t\t\t\t\t\ttop: finalRect.top,\n\t\t\t\t\t\twidth: finalRect.width,\n\t\t\t\t\t\theight: finalRect.height,\n\t\t\t\t\t})\n\t\t\t\t}),\n\t\t\t\tcatchError(() => EMPTY),\n\t\t\t\ttakeUntil(this.disconnecting),\n\t\t\t)\n\t\t\t.subscribe()\n\n\t\tthis.savePosition()\n\t}\n\n\t// ============================================\n\t// DRAG PIPELINE\n\t// ============================================\n\n\tprivate drag$(): Observable<never> {\n\t\treturn new Observable(() => {\n\t\t\tconst head = this.headRef.value\n\t\t\tconst container = this.containerRef.value\n\t\t\tif (!head || !container) return\n\n\t\t\tlet didDrag = false\n\n\t\t\tconst sub = fromEvent<PointerEvent>(head, 'pointerdown')\n\t\t\t\t.pipe(\n\t\t\t\t\tfilter(e => e.button === 0),\n\t\t\t\t\tfilter(e => {\n\t\t\t\t\t\tconst tag = (e.target as HTMLElement).tagName?.toLowerCase()\n\t\t\t\t\t\treturn (\n\t\t\t\t\t\t\t!['input', 'textarea', 'select', 'button'].includes(tag) &&\n\t\t\t\t\t\t\t!(e.target as HTMLElement).closest('schmancy-input, schmancy-icon-button, button, a')\n\t\t\t\t\t\t)\n\t\t\t\t\t}),\n\t\t\t\t\ttap(e => {\n\t\t\t\t\t\te.preventDefault()\n\t\t\t\t\t\te.stopPropagation()\n\t\t\t\t\t}),\n\t\t\t\t)\n\t\t\t\t.pipe(\n\t\t\t\t\tmap(e => {\n\t\t\t\t\t\tconst rect = container.getBoundingClientRect()\n\t\t\t\t\t\tconst isBottom = this.currentCorner.includes('bottom')\n\t\t\t\t\t\tconst wasOpen = this.open\n\t\t\t\t\t\tdidDrag = false\n\t\t\t\t\t\treturn {\n\t\t\t\t\t\t\tstartX: e.clientX,\n\t\t\t\t\t\t\tstartY: e.clientY,\n\t\t\t\t\t\t\toffsetX: e.clientX - rect.left,\n\t\t\t\t\t\t\toffsetY: e.clientY - rect.top,\n\t\t\t\t\t\t\trect,\n\t\t\t\t\t\t\tvw: window.innerWidth,\n\t\t\t\t\t\t\tvh: window.innerHeight,\n\t\t\t\t\t\t\tisBottom,\n\t\t\t\t\t\t\twasOpen,\n\t\t\t\t\t\t\tpointerId: e.pointerId,\n\t\t\t\t\t\t}\n\t\t\t\t\t}),\n\t\t\t\t\tswitchMap(({ startX, startY, offsetX, offsetY, rect, vw, vh, isBottom, wasOpen, pointerId }) => {\n\t\t\t\t\t\tconst move$ = fromEvent<PointerEvent>(window, 'pointermove').pipe(\n\t\t\t\t\t\t\tfilter(e => e.pointerId === pointerId),\n\t\t\t\t\t\t\tauditTime(0, animationFrameScheduler),\n\t\t\t\t\t\t\tmap(e => ({ clientX: e.clientX, clientY: e.clientY })),\n\t\t\t\t\t\t)\n\t\t\t\t\t\tconst end$ = fromEvent<PointerEvent>(window, 'pointerup').pipe(filter(e => e.pointerId === pointerId))\n\n\t\t\t\t\t\treturn move$.pipe(\n\t\t\t\t\t\t\ttap(({ clientX, clientY }) => {\n\t\t\t\t\t\t\t\tconst dx = clientX - startX\n\t\t\t\t\t\t\t\tconst dy = clientY - startY\n\t\t\t\t\t\t\t\tif (Math.sqrt(dx * dx + dy * dy) > DRAG_THRESHOLD && !didDrag) {\n\t\t\t\t\t\t\t\t\tdidDrag = true\n\t\t\t\t\t\t\t\t\tthis.applyDragVisuals(true)\n\t\t\t\t\t\t\t\t\t// Collapse on first confirmed drag move\n\t\t\t\t\t\t\t\t\tif (wasOpen) {\n\t\t\t\t\t\t\t\t\t\tthis.open = false\n\t\t\t\t\t\t\t\t\t\tcontainer.style.clipPath = this.closedClipPath\n\t\t\t\t\t\t\t\t\t\tcontainer.style.overflow = 'hidden'\n\t\t\t\t\t\t\t\t\t\tconst body = this.bodyRef.value\n\t\t\t\t\t\t\t\t\t\tif (body) {\n\t\t\t\t\t\t\t\t\t\t\tbody.inert = true\n\t\t\t\t\t\t\t\t\t\t\tbody.style.visibility = 'hidden'\n\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\tif (!didDrag) return\n\n\t\t\t\t\t\t\t\tconst left = Math.max(0, Math.min(clientX - offsetX, vw - rect.width))\n\t\t\t\t\t\t\t\tconst minTop = isBottom ? HEAD_HEIGHT - rect.height : 0\n\t\t\t\t\t\t\t\tconst maxTop = isBottom ? vh - rect.height : vh - HEAD_HEIGHT\n\t\t\t\t\t\t\t\tconst top = Math.max(minTop, Math.min(clientY - offsetY, maxTop))\n\n\t\t\t\t\t\t\t\tthis.position = {\n\t\t\t\t\t\t\t\t\tx: this.currentCorner.includes('right') ? vw - left - rect.width : left,\n\t\t\t\t\t\t\t\t\ty: isBottom ? vh - top - rect.height : top,\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\tthis.applyContainerPosition()\n\t\t\t\t\t\t\t}),\n\t\t\t\t\t\t\ttakeUntil(end$),\n\t\t\t\t\t\t\tfinalize(() => {\n\t\t\t\t\t\t\t\tif (didDrag) {\n\t\t\t\t\t\t\t\t\tthis.reorientToNearestCorner()\n\t\t\t\t\t\t\t\t\tthis.applyDragVisuals(false)\n\t\t\t\t\t\t\t\t\tdidDrag = false\n\t\t\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\t\t\tdidDrag = false\n\t\t\t\t\t\t\t\t\tthis.toggle()\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t}),\n\t\t\t\t\t\t)\n\t\t\t\t\t}),\n\t\t\t\t)\n\t\t\t\t.subscribe()\n\n\t\t\treturn () => sub.unsubscribe()\n\t\t})\n\t}\n\n\t// ============================================\n\t// LIFECYCLE\n\t// ============================================\n\n\tconnectedCallback() {\n\t\tsuper.connectedCallback()\n\n\t\t// Pipeline 1: DOM setup + manager registration + drag + z-index sync\n\t\tfrom(this.updateComplete)\n\t\t\t.pipe(\n\t\t\t\ttake(1),\n\t\t\t\ttap(() => {\n\t\t\t\t\tthis.currentCorner = this.corner\n\t\t\t\t\tthis.loadPosition()\n\t\t\t\t\tthis.applyContainerPosition()\n\t\t\t\t\tthis.initDOMState()\n\t\t\t\t\t// Register with window manager\n\t\t\t\t\tconst container = this.containerRef.value\n\t\t\t\t\tif (container) {\n\t\t\t\t\t\tconst rect = container.getBoundingClientRect()\n\t\t\t\t\t\tconst bounds: WindowBounds = { left: rect.left, top: rect.top, width: rect.width, height: rect.height }\n\t\t\t\t\t\twindowManager.register(this.id, bounds, this.freePosition ? 'free' : this.currentCorner)\n\t\t\t\t\t}\n\t\t\t\t}),\n\t\t\t\tswitchMap(() =>\n\t\t\t\t\tmerge(\n\t\t\t\t\t\tthis.drag$(),\n\t\t\t\t\t\twindowManager.selectWindow(this.id).pipe(\n\t\t\t\t\t\t\ttap(record => {\n\t\t\t\t\t\t\t\tif (!record) return\n\t\t\t\t\t\t\t\tconst container = this.containerRef.value\n\t\t\t\t\t\t\t\tif (container) container.style.zIndex = String(record.zIndex)\n\t\t\t\t\t\t\t}),\n\t\t\t\t\t\t),\n\t\t\t\t\t),\n\t\t\t\t),\n\t\t\t\ttakeUntil(this.disconnecting),\n\t\t\t)\n\t\t\t.subscribe()\n\n\t\t// Pipeline 3: Environment -- one subscription\n\t\tmerge(\n\t\t\tfromEvent(window, 'resize').pipe(\n\t\t\t\tauditTime(0, animationFrameScheduler),\n\t\t\t\ttap(() => this.validateBounds()),\n\t\t\t),\n\t\t\ttheme.bottomOffset$.pipe(tap(() => this.applyContainerPosition())),\n\t\t)\n\t\t\t.pipe(takeUntil(this.disconnecting))\n\t\t\t.subscribe()\n\t}\n\n\tdisconnectedCallback() {\n\t\tsuper.disconnectedCallback()\n\t\twindowManager.unregister(this.id)\n\t}\n\n\tprivate initDOMState() {\n\t\tconst container = this.containerRef.value\n\t\tconst body = this.bodyRef.value\n\t\tif (!container) return\n\n\t\tthis.applyContainerPosition()\n\n\t\tif (this.open) {\n\t\t\tthis.hasOpened = true\n\t\t\tcontainer.style.overflow = ''\n\t\t\tif (body) {\n\t\t\t\tbody.inert = false\n\t\t\t\tbody.style.visibility = 'visible'\n\t\t\t}\n\t\t} else {\n\t\t\tcontainer.style.clipPath = this.closedClipPath\n\t\t\tcontainer.style.overflow = 'hidden'\n\t\t\tif (body) {\n\t\t\t\tbody.inert = true\n\t\t\t\tbody.style.visibility = 'hidden'\n\t\t\t}\n\t\t}\n\t}\n\n\t// ============================================\n\t// ANIMATION\n\t// ============================================\n\n\tprivate animateOpen() {\n\t\tconst container = this.containerRef.value\n\t\tconst body = this.bodyRef.value\n\t\tif (!container) return\n\n\t\tthis.hasOpened = true\n\t\tthis.open = true\n\n\t\t// Overlap avoidance\n\t\tconst rect = container.getBoundingClientRect()\n\t\tconst projectedBounds: WindowBounds = {\n\t\t\tleft: rect.left,\n\t\t\ttop: this.isBottomCorner ? rect.top - 400 : rect.top,\n\t\t\twidth: rect.width,\n\t\t\theight: 400 + HEAD_HEIGHT,\n\t\t}\n\t\tconst overlaps = windowManager.findOverlaps(projectedBounds, this.id)\n\t\tif (overlaps.length > 0) {\n\t\t\tconst resolved = resolveOverlap(projectedBounds, overlaps, {\n\t\t\t\twidth: window.innerWidth,\n\t\t\t\theight: window.innerHeight,\n\t\t\t})\n\t\t\tif (Math.abs(resolved.left - projectedBounds.left) > 10 || Math.abs(resolved.top - projectedBounds.top) > 10) {\n\t\t\t\tconst isRight = this.currentCorner.includes('right')\n\t\t\t\tconst isBottom = this.currentCorner.includes('bottom')\n\t\t\t\tthis.position = {\n\t\t\t\t\tx: isRight ? window.innerWidth - resolved.left - resolved.width : resolved.left,\n\t\t\t\t\ty: isBottom ? window.innerHeight - resolved.top - resolved.height : resolved.top,\n\t\t\t\t}\n\t\t\t\tthis.applyContainerPosition()\n\t\t\t}\n\t\t}\n\n\t\tif (body) {\n\t\t\tbody.style.visibility = 'visible'\n\t\t\tbody.inert = false\n\t\t}\n\n\t\tif (reducedMotion$.value) {\n\t\t\tcontainer.style.clipPath = ''\n\t\t\tcontainer.style.overflow = ''\n\t\t\tthis.dispatchScopedEvent('window-toggle', { state: 'expanded' })\n\t\t\treturn\n\t\t}\n\n\t\tthis.currentAnimation?.cancel()\n\t\tcontainer.style.overflow = 'hidden'\n\t\tcontainer.style.willChange = 'opacity'\n\t\tconst openKeyframes: Keyframe[] = [\n\t\t\t{ clipPath: this.closedClipPath, opacity: 0.95 },\n\t\t\t{ clipPath: this.openClipPath, opacity: 1 },\n\t\t]\n\t\tconst anim = container.animate(openKeyframes, {\n\t\t\tduration: SPRING_SNAPPY.duration,\n\t\t\teasing: SPRING_SNAPPY.easingFallback,\n\t\t\tfill: 'forwards',\n\t\t})\n\t\tthis.currentAnimation = anim\n\n\t\tfrom(anim.finished)\n\t\t\t.pipe(\n\t\t\t\ttake(1),\n\t\t\t\ttap(() => {\n\t\t\t\t\tif (container.isConnected) {\n\t\t\t\t\t\tcontainer.style.clipPath = ''\n\t\t\t\t\t\tcontainer.style.overflow = ''\n\t\t\t\t\t\tcontainer.style.willChange = ''\n\t\t\t\t\t}\n\t\t\t\t}),\n\t\t\t\tcatchError(() => EMPTY),\n\t\t\t\ttakeUntil(this.disconnecting),\n\t\t\t)\n\t\t\t.subscribe()\n\n\t\tthis.dispatchScopedEvent('window-toggle', { state: 'expanded' })\n\t}\n\n\tprivate animateClose() {\n\t\tconst container = this.containerRef.value\n\t\tif (!container) return\n\n\t\tif (reducedMotion$.value) {\n\t\t\tcontainer.style.clipPath = this.closedClipPath\n\t\t\tcontainer.style.overflow = 'hidden'\n\t\t\tthis.open = false\n\t\t\tconst body = this.bodyRef.value\n\t\t\tif (body) {\n\t\t\t\tbody.inert = true\n\t\t\t\tbody.style.visibility = 'hidden'\n\t\t\t}\n\t\t\tthis.dispatchScopedEvent('window-toggle', { state: 'collapsed' })\n\t\t\treturn\n\t\t}\n\n\t\tthis.currentAnimation?.cancel()\n\t\tcontainer.style.overflow = 'hidden'\n\t\tcontainer.style.willChange = 'opacity'\n\t\tconst closeKeyframes: Keyframe[] = [\n\t\t\t{ clipPath: this.openClipPath, opacity: 1 },\n\t\t\t{ clipPath: this.closedClipPath, opacity: 0.95 },\n\t\t]\n\t\tconst anim = container.animate(closeKeyframes, {\n\t\t\tduration: Math.round(SPRING_SNAPPY.duration * 0.7),\n\t\t\teasing: 'cubic-bezier(0.4, 0, 0.8, 0.15)',\n\t\t\tfill: 'forwards',\n\t\t})\n\t\tthis.currentAnimation = anim\n\n\t\tfrom(anim.finished)\n\t\t\t.pipe(\n\t\t\t\ttake(1),\n\t\t\t\ttap(() => {\n\t\t\t\t\tthis.open = false\n\t\t\t\t\tcontainer.style.willChange = ''\n\t\t\t\t\tconst body = this.bodyRef.value\n\t\t\t\t\tif (body) {\n\t\t\t\t\t\tbody.inert = true\n\t\t\t\t\t\tbody.style.visibility = 'hidden'\n\t\t\t\t\t}\n\t\t\t\t}),\n\t\t\t\tcatchError(() => EMPTY),\n\t\t\t\ttakeUntil(this.disconnecting),\n\t\t\t)\n\t\t\t.subscribe()\n\n\t\tthis.dispatchScopedEvent('window-toggle', { state: 'collapsed' })\n\t}\n\n\t// ============================================\n\t// VISUAL STATE HELPERS\n\t// ============================================\n\n\t/** Apply drag visuals directly on DOM refs — avoids full Lit re-render for cursor + opacity */\n\tprivate applyDragVisuals(dragging: boolean) {\n\t\tconst head = this.headRef.value\n\t\tconst container = this.containerRef.value\n\t\tif (head) {\n\t\t\thead.classList.toggle('cursor-grabbing', dragging)\n\t\t\thead.classList.toggle('cursor-move', !dragging)\n\t\t}\n\t\tif (container) {\n\t\t\tcontainer.style.opacity = dragging ? '0.95' : ''\n\t\t}\n\t}\n\n\tprivate handleFocus = () => windowManager.focus(this.id)\n\n\tprivate handleHeadKeydown = (e: KeyboardEvent) => {\n\t\tif (e.key === 'Enter' || e.key === ' ') {\n\t\t\te.preventDefault()\n\t\t\tthis.toggle()\n\t\t\treturn\n\t\t}\n\t\tif (e.key === 'ArrowUp' || e.key === 'ArrowDown' || e.key === 'ArrowLeft' || e.key === 'ArrowRight') {\n\t\t\te.preventDefault()\n\t\t\tconst step = e.shiftKey ? 20 : 5\n\t\t\tconst dx = e.key === 'ArrowRight' ? step : e.key === 'ArrowLeft' ? -step : 0\n\t\t\tconst dy = e.key === 'ArrowDown' ? step : e.key === 'ArrowUp' ? -step : 0\n\t\t\tthis.position = { x: this.position.x + dx, y: this.position.y + dy }\n\t\t\tthis.applyContainerPosition()\n\t\t\tthis.savePosition()\n\t\t}\n\t}\n\n\t// ============================================\n\t// PUBLIC API\n\t// ============================================\n\n\ttoggle() {\n\t\tif (this.open) this.animateClose()\n\t\telse this.animateOpen()\n\t}\n\n\texpand() {\n\t\tif (this.open) return\n\t\tthis.animateOpen()\n\t}\n\n\tclose() {\n\t\tif (!this.open) return\n\t\tthis.animateClose()\n\t}\n\n\t// ============================================\n\t// RENDER\n\t// ============================================\n\n\tprotected render(): unknown {\n\t\tconst isBottom = this.currentCorner.startsWith('bottom')\n\n\t\tconst containerClasses = classMap({\n\t\t\tfixed: true,\n\t\t\tflex: true,\n\t\t\t'flex-col': isBottom,\n\t\t\t'flex-col-reverse': !isBottom,\n\t\t\t'z-1000': true,\n\t\t\t'rounded-2xl': this.open,\n\t\t\t'rounded-[22px]': !this.open,\n\t\t\t'overflow-hidden': true,\n\t\t\t'shadow-sm': !this.open && this.lowered,\n\t\t\t'shadow-md': !this.open && !this.lowered,\n\t\t\t'shadow-lg': this.open,\n\t\t})\n\n\t\tconst containerStyles = styleMap({\n\t\t\twidth: this.panelWidth,\n\t\t\t'max-height': 'calc(100vh - 32px)',\n\t\t\t'pointer-events': 'none',\n\t\t})\n\n\t\tconst bodyStyles = styleMap({\n\t\t\t'pointer-events': this.open ? 'auto' : 'none',\n\t\t})\n\n\t\tconst headClasses = classMap({\n\t\t\t'h-full': true,\n\t\t\t'px-3': true,\n\t\t\tflex: true,\n\t\t\t'items-center': true,\n\t\t\t'gap-2': true,\n\t\t\t'select-none': true,\n\t\t\t'cursor-move': true,\n\t\t})\n\n\t\treturn html`\n\t\t\t<schmancy-surface\n\t\t\t\t${ref(this.containerRef)}\n\t\t\t\ttype=\"container\"\n\t\t\t\tclass=${containerClasses}\n\t\t\t\tstyle=${containerStyles}\n\t\t\t\taria-expanded=${this.open}\n\t\t\t\t@pointerdown=${this.handleFocus}\n\t\t\t>\n\t\t\t\t<!-- Details section (visually above summary for bottom corners) -->\n\t\t\t\t<section\n\t\t\t\t\t${ref(this.bodyRef)}\n\t\t\t\t\tclass=\"flex-1 min-h-0 overflow-hidden flex flex-col\"\n\t\t\t\t\tstyle=${bodyStyles}\n\t\t\t\t\trole=\"region\"\n\t\t\t\t\taria-label=\"Expandable content\"\n\t\t\t\t>\n\t\t\t\t\t${this.hasOpened ? html`<slot name=\"details\"></slot>` : nothing}\n\t\t\t\t</section>\n\n\t\t\t\t<!-- Summary section -- always interactive, always visible -->\n\t\t\t\t<section\n\t\t\t\t\tclass=\"shrink-0 bg-surface-lowest\"\n\t\t\t\t\tstyle=${styleMap({ 'pointer-events': 'auto', height: `${HEAD_HEIGHT}px` })}\n\t\t\t\t>\n\t\t\t\t\t<div\n\t\t\t\t\t\t${ref(this.headRef)}\n\t\t\t\t\t\t${cursorGlow({ radius: 200, intensity: 0.1 })}\n\t\t\t\t\t\tclass=${headClasses}\n\t\t\t\t\t\trole=\"button\"\n\t\t\t\t\t\ttabindex=\"0\"\n\t\t\t\t\t\ttitle=\"Drag to move, click to expand\"\n\t\t\t\t\t\taria-label=\"${this.open ? 'Collapse window' : 'Expand window'}\"\n\t\t\t\t\t\t@keydown=${this.handleHeadKeydown}\n\t\t\t\t\t>\n\t\t\t\t\t\t<div class=\"flex-1 min-w-0\">\n\t\t\t\t\t\t\t<slot></slot>\n\t\t\t\t\t\t</div>\n\t\t\t\t\t\t<svg\n\t\t\t\t\t\t\twidth=\"16\"\n\t\t\t\t\t\t\theight=\"16\"\n\t\t\t\t\t\t\tviewBox=\"0 0 24 24\"\n\t\t\t\t\t\t\tfill=\"none\"\n\t\t\t\t\t\t\tclass=\"shrink-0 text-surface-on/40 transition-transform duration-200 ${this.open ? 'rotate-180' : ''}\"\n\t\t\t\t\t\t\taria-hidden=\"true\"\n\t\t\t\t\t\t>\n\t\t\t\t\t\t\t<path\n\t\t\t\t\t\t\t\td=\"M6 9L12 15L18 9\"\n\t\t\t\t\t\t\t\tstroke=\"currentColor\"\n\t\t\t\t\t\t\t\tstroke-width=\"2\"\n\t\t\t\t\t\t\t\tstroke-linecap=\"round\"\n\t\t\t\t\t\t\t\tstroke-linejoin=\"round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AAA,EAAA,EAAA,EAAA,EAAA,EAAA,EAAA,eA7CO,iBAAA,CAAA,EAAiB,CAAA,EAAA,OAAA,eAAA,QAAA,IAAA,CAAA,WAAA,CAAA,EAAA,IAAA,UAAA,CAAA,OAAA,CAAA,CAAA,CAAA,EAAA,OAAA,eAAA,QAAA,IAAA,CAAA,WAAA,CAAA,EAAA,IAAA,UAAA,CAAA,OAAA,CAAA,CAAA,CAAA"}
|
|
@@ -1,9 +1,9 @@
|
|
|
1
|
-
import { t as e, u as t } from "./SchmancyElement-
|
|
2
|
-
import "./mixins-
|
|
1
|
+
import { t as e, u as t } from "./SchmancyElement-Ob9yGkiG.js";
|
|
2
|
+
import "./mixins-q4KAL8Xr.js";
|
|
3
3
|
import { d as n, f as r } from "./animation-DCznELuT.js";
|
|
4
4
|
import { t as i } from "./reduced-motion-D-L12p7G.js";
|
|
5
5
|
import { t as a } from "./cursor-glow-Ah7VXSj7.js";
|
|
6
|
-
import { n as o } from "./theme.service-
|
|
6
|
+
import { n as o } from "./theme.service-D94nm7Bf.js";
|
|
7
7
|
import { t as s } from "./overlay-stack-D2rgxQLh.js";
|
|
8
8
|
import { BehaviorSubject as c, EMPTY as l, Observable as u, animationFrameScheduler as d, auditTime as f, catchError as p, distinctUntilChanged as m, filter as h, finalize as g, from as _, fromEvent as v, map as y, merge as b, switchMap as x, take as S, takeUntil as C, tap as w } from "rxjs";
|
|
9
9
|
import { classMap as T } from "lit/directives/class-map.js";
|
|
@@ -175,15 +175,15 @@ var V = 48, H = class extends e {
|
|
|
175
175
|
}
|
|
176
176
|
static {
|
|
177
177
|
this.styles = [A`
|
|
178
|
-
|
|
179
|
-
|
|
180
|
-
|
|
181
|
-
|
|
182
|
-
|
|
183
|
-
|
|
184
|
-
|
|
185
|
-
|
|
186
|
-
`];
|
|
178
|
+
:host {
|
|
179
|
+
display: contents;
|
|
180
|
+
position: relative;
|
|
181
|
+
z-index: 1000;
|
|
182
|
+
}
|
|
183
|
+
:host([hidden]) {
|
|
184
|
+
display: none !important;
|
|
185
|
+
}
|
|
186
|
+
`];
|
|
187
187
|
}
|
|
188
188
|
get panelWidth() {
|
|
189
189
|
return this.expandedWidth ?? "min(360px, calc(100vw - 32px))";
|
|
@@ -471,7 +471,7 @@ var V = 48, H = class extends e {
|
|
|
471
471
|
return j`
|
|
472
472
|
<schmancy-surface
|
|
473
473
|
${P(this.containerRef)}
|
|
474
|
-
type="
|
|
474
|
+
type="container"
|
|
475
475
|
class=${t}
|
|
476
476
|
style=${n}
|
|
477
477
|
aria-expanded=${this.open}
|
|
@@ -513,11 +513,20 @@ var V = 48, H = class extends e {
|
|
|
513
513
|
<slot></slot>
|
|
514
514
|
</div>
|
|
515
515
|
<svg
|
|
516
|
-
width="16"
|
|
516
|
+
width="16"
|
|
517
|
+
height="16"
|
|
518
|
+
viewBox="0 0 24 24"
|
|
519
|
+
fill="none"
|
|
517
520
|
class="shrink-0 text-surface-on/40 transition-transform duration-200 ${this.open ? "rotate-180" : ""}"
|
|
518
521
|
aria-hidden="true"
|
|
519
522
|
>
|
|
520
|
-
<path
|
|
523
|
+
<path
|
|
524
|
+
d="M6 9L12 15L18 9"
|
|
525
|
+
stroke="currentColor"
|
|
526
|
+
stroke-width="2"
|
|
527
|
+
stroke-linecap="round"
|
|
528
|
+
stroke-linejoin="round"
|
|
529
|
+
/>
|
|
521
530
|
</svg>
|
|
522
531
|
</div>
|
|
523
532
|
</section>
|