@mhmo91/schmancy 0.7.5 → 0.7.6
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/ai/directives.md +214 -7
- package/ai/typewriter.md +151 -33
- package/dist/ai/directives.md +214 -7
- package/dist/ai/typewriter.md +151 -33
- package/dist/{animated-text-DnFenRS1.cjs → animated-text-1FDC-OTA.cjs} +2 -2
- package/dist/{animated-text-DnFenRS1.cjs.map → animated-text-1FDC-OTA.cjs.map} +1 -1
- package/dist/{animated-text-YBgWXuVJ.js → animated-text-1_latidd.js} +3 -3
- package/dist/{animated-text-YBgWXuVJ.js.map → animated-text-1_latidd.js.map} +1 -1
- package/dist/animated-text.cjs +1 -1
- package/dist/animated-text.js +1 -1
- package/dist/area.cjs +1 -1
- package/dist/{area.component-C_nUxyiY.js → area.component-CQq-Mh0Z.js} +47 -39
- package/dist/area.component-CQq-Mh0Z.js.map +1 -0
- package/dist/{area.component-BojFAcRk.cjs → area.component-Ciw7vGsx.cjs} +4 -4
- package/dist/area.component-Ciw7vGsx.cjs.map +1 -0
- package/dist/area.js +1 -1
- package/dist/{autocomplete-B-X_D8MC.js → autocomplete-DT9MFPEG.js} +5 -5
- package/dist/{autocomplete-B-X_D8MC.js.map → autocomplete-DT9MFPEG.js.map} +1 -1
- package/dist/{autocomplete-B8oOdRsV.cjs → autocomplete-auTO_M_w.cjs} +2 -2
- package/dist/{autocomplete-B8oOdRsV.cjs.map → autocomplete-auTO_M_w.cjs.map} +1 -1
- package/dist/autocomplete.cjs +1 -1
- package/dist/autocomplete.js +1 -1
- package/dist/{avatar-DBdyON6Y.cjs → avatar-Bo8kRnA-.cjs} +2 -2
- package/dist/{avatar-DBdyON6Y.cjs.map → avatar-Bo8kRnA-.cjs.map} +1 -1
- package/dist/{avatar-Cro3M4Lw.js → avatar-Dm_qg-n1.js} +52 -52
- package/dist/{avatar-Cro3M4Lw.js.map → avatar-Dm_qg-n1.js.map} +1 -1
- package/dist/badge.cjs +1 -1
- package/dist/badge.js +1 -1
- package/dist/boat-98He5-K8.cjs +97 -0
- package/dist/boat-98He5-K8.cjs.map +1 -0
- package/dist/boat-RNCKlx8b.js +301 -0
- package/dist/boat-RNCKlx8b.js.map +1 -0
- package/dist/boat.cjs +1 -1
- package/dist/boat.js +1 -1
- package/dist/busy.cjs +1 -1
- package/dist/busy.js +1 -1
- package/dist/button.cjs +1 -1
- package/dist/button.js +1 -1
- package/dist/card.cjs +1 -1
- package/dist/card.js +1 -1
- package/dist/{checkbox-BOmazo-k.js → checkbox-Bdn1_WJg.js} +2 -2
- package/dist/{checkbox-BOmazo-k.js.map → checkbox-Bdn1_WJg.js.map} +1 -1
- package/dist/{checkbox-DMfwDgYx.cjs → checkbox-Dj06r6MD.cjs} +2 -2
- package/dist/{checkbox-DMfwDgYx.cjs.map → checkbox-Dj06r6MD.cjs.map} +1 -1
- package/dist/checkbox.cjs +1 -1
- package/dist/checkbox.js +1 -1
- package/dist/chips.cjs +1 -1
- package/dist/chips.js +2 -2
- package/dist/code-highlight.cjs +1 -1
- package/dist/code-highlight.js +1 -1
- package/dist/{code-preview-DgyY3Jlw.js → code-preview-Br7zBkyM.js} +2 -2
- package/dist/{code-preview-DgyY3Jlw.js.map → code-preview-Br7zBkyM.js.map} +1 -1
- package/dist/{code-preview-CbZzYTk2.cjs → code-preview-ByxcwPma.cjs} +2 -2
- package/dist/{code-preview-CbZzYTk2.cjs.map → code-preview-ByxcwPma.cjs.map} +1 -1
- package/dist/components.cjs +1 -1
- package/dist/components.js +1 -1
- package/dist/content-drawer.cjs +1 -1
- package/dist/content-drawer.js +1 -1
- package/dist/{date-range-BV0479CW.js → date-range-VkIMcQdT.js} +3 -3
- package/dist/{date-range-BV0479CW.js.map → date-range-VkIMcQdT.js.map} +1 -1
- package/dist/{date-range-inline-HNDLTnYi.cjs → date-range-inline-kbokz03Z.cjs} +2 -2
- package/dist/{date-range-inline-HNDLTnYi.cjs.map → date-range-inline-kbokz03Z.cjs.map} +1 -1
- package/dist/{date-range-inline-GfLao0NN.js → date-range-inline-l2G48xTX.js} +3 -3
- package/dist/{date-range-inline-GfLao0NN.js.map → date-range-inline-l2G48xTX.js.map} +1 -1
- package/dist/date-range-inline.cjs +1 -1
- package/dist/date-range-inline.js +1 -1
- package/dist/{date-range-47SnbVM6.cjs → date-range-xYUr_KKx.cjs} +2 -2
- package/dist/{date-range-47SnbVM6.cjs.map → date-range-xYUr_KKx.cjs.map} +1 -1
- package/dist/date-range.cjs +1 -1
- package/dist/date-range.js +1 -1
- package/dist/{delay-Dr3Fr5YB.cjs → delay-CCreUpYu.cjs} +2 -2
- package/dist/{delay-Dr3Fr5YB.cjs.map → delay-CCreUpYu.cjs.map} +1 -1
- package/dist/{delay-B40l99jW.js → delay-Nu7RVtYd.js} +2 -2
- package/dist/{delay-B40l99jW.js.map → delay-Nu7RVtYd.js.map} +1 -1
- package/dist/delay.cjs +1 -1
- package/dist/delay.js +1 -1
- package/dist/details-CjQrqBli.cjs +98 -0
- package/dist/details-CjQrqBli.cjs.map +1 -0
- package/dist/details-DVIWpEsI.js +137 -0
- package/dist/details-DVIWpEsI.js.map +1 -0
- package/dist/details.cjs +1 -1
- package/dist/details.js +1 -1
- package/dist/{dialog-content-B_amCfq7.js → dialog-content-BgxKi73O.js} +3 -3
- package/dist/{dialog-content-B_amCfq7.js.map → dialog-content-BgxKi73O.js.map} +1 -1
- package/dist/{dialog-content-Emd7BLQA.cjs → dialog-content-CM3-RXQQ.cjs} +2 -2
- package/dist/{dialog-content-Emd7BLQA.cjs.map → dialog-content-CM3-RXQQ.cjs.map} +1 -1
- package/dist/dialog.cjs +1 -1
- package/dist/dialog.js +1 -1
- package/dist/directives.cjs +1 -1
- package/dist/directives.js +10 -6
- package/dist/divider-0yHQS8kR.cjs +58 -0
- package/dist/divider-0yHQS8kR.cjs.map +1 -0
- package/dist/divider-CqyzFfn1.js +84 -0
- package/dist/divider-CqyzFfn1.js.map +1 -0
- package/dist/divider.cjs +1 -1
- package/dist/divider.js +1 -1
- package/dist/{dropdown-content-BpJq8Q1u.cjs → dropdown-content-BmHQE5-P.cjs} +2 -2
- package/dist/{dropdown-content-BpJq8Q1u.cjs.map → dropdown-content-BmHQE5-P.cjs.map} +1 -1
- package/dist/{dropdown-content-Bw9jnfCR.js → dropdown-content-iFlLupVo.js} +3 -3
- package/dist/{dropdown-content-Bw9jnfCR.js.map → dropdown-content-iFlLupVo.js.map} +1 -1
- package/dist/dropdown.cjs +1 -1
- package/dist/dropdown.js +1 -1
- package/dist/{email-recipients-Bxvu6zi9.cjs → email-recipients-Cioc3U0Z.cjs} +2 -2
- package/dist/{email-recipients-Bxvu6zi9.cjs.map → email-recipients-Cioc3U0Z.cjs.map} +1 -1
- package/dist/{email-recipients-DZGMhyg4.js → email-recipients-CmAEJDMC.js} +6 -6
- package/dist/{email-recipients-DZGMhyg4.js.map → email-recipients-CmAEJDMC.js.map} +1 -1
- package/dist/extra.cjs +1 -1
- package/dist/extra.js +1 -1
- package/dist/{flex-DakK9gco.cjs → flex-BEB1yuMF.cjs} +2 -2
- package/dist/{flex-DakK9gco.cjs.map → flex-BEB1yuMF.cjs.map} +1 -1
- package/dist/{flex-DUgMxT_9.js → flex-BgcbHlPo.js} +2 -2
- package/dist/{flex-DUgMxT_9.js.map → flex-BgcbHlPo.js.map} +1 -1
- package/dist/{form-yZ1fh3h9.js → form-CxrvY530.js} +2 -2
- package/dist/{form-yZ1fh3h9.js.map → form-CxrvY530.js.map} +1 -1
- package/dist/{form-CPmMvWvE.cjs → form-DFDTspmH.cjs} +2 -2
- package/dist/{form-CPmMvWvE.cjs.map → form-DFDTspmH.cjs.map} +1 -1
- package/dist/form.cjs +1 -1
- package/dist/form.js +1 -1
- package/dist/{formField.mixin-D51klHq7.cjs → formField.mixin-C7H5DaEl.cjs} +2 -2
- package/dist/{formField.mixin-D51klHq7.cjs.map → formField.mixin-C7H5DaEl.cjs.map} +1 -1
- package/dist/{formField.mixin-Cmb9YpmX.js → formField.mixin-hZ2qP4iG.js} +2 -2
- package/dist/{formField.mixin-Cmb9YpmX.js.map → formField.mixin-hZ2qP4iG.js.map} +1 -1
- package/dist/{icon-DHT8YsE3.js → icon-D0FAI5uJ.js} +2 -2
- package/dist/{icon-DHT8YsE3.js.map → icon-D0FAI5uJ.js.map} +1 -1
- package/dist/{icon-Dsa_BddL.cjs → icon-DJnGMAQ2.cjs} +2 -2
- package/dist/{icon-Dsa_BddL.cjs.map → icon-DJnGMAQ2.cjs.map} +1 -1
- package/dist/{icon-button-BRcfLsJL.cjs → icon-button-CSZtSmOy.cjs} +8 -8
- package/dist/icon-button-CSZtSmOy.cjs.map +1 -0
- package/dist/{icon-button-PpRHFLCj.js → icon-button-CbgQp3AL.js} +19 -19
- package/dist/icon-button-CbgQp3AL.js.map +1 -0
- package/dist/icons.cjs +1 -1
- package/dist/icons.js +1 -1
- package/dist/index.cjs +1 -1
- package/dist/index.js +196 -192
- package/dist/{input-CYGSlByl.js → input-DLnKAj3B.js} +4 -4
- package/dist/{input-CYGSlByl.js.map → input-DLnKAj3B.js.map} +1 -1
- package/dist/{input-chip-CKYO8Lww.cjs → input-chip-C3EPsHcP.cjs} +2 -2
- package/dist/{input-chip-CKYO8Lww.cjs.map → input-chip-C3EPsHcP.cjs.map} +1 -1
- package/dist/{input-chip-CTKPIRVA.js → input-chip-dmqYCExV.js} +2 -2
- package/dist/{input-chip-CTKPIRVA.js.map → input-chip-dmqYCExV.js.map} +1 -1
- package/dist/input-wZ6ORWru.cjs +51 -0
- package/dist/{input-DB269a2X.cjs.map → input-wZ6ORWru.cjs.map} +1 -1
- package/dist/input.cjs +1 -1
- package/dist/input.js +1 -1
- package/dist/layout.cjs +1 -1
- package/dist/layout.js +1 -1
- package/dist/{list-BbzeVuby.js → list-BegNkhOn.js} +2 -2
- package/dist/{list-BbzeVuby.js.map → list-BegNkhOn.js.map} +1 -1
- package/dist/{list-BQVTFNkq.cjs → list-CLKiZ6lk.cjs} +2 -2
- package/dist/{list-BQVTFNkq.cjs.map → list-CLKiZ6lk.cjs.map} +1 -1
- package/dist/list.cjs +1 -1
- package/dist/list.js +1 -1
- package/dist/{litElement.mixin-DzCpXwcY.cjs → litElement.mixin-CPQYJnK_.cjs} +2 -2
- package/dist/{litElement.mixin-DzCpXwcY.cjs.map → litElement.mixin-CPQYJnK_.cjs.map} +1 -1
- package/dist/{litElement.mixin-BzbZQbxa.js → litElement.mixin-DWDPaNoc.js} +2 -2
- package/dist/{litElement.mixin-BzbZQbxa.js.map → litElement.mixin-DWDPaNoc.js.map} +1 -1
- package/dist/mailbox.cjs +1 -1
- package/dist/mailbox.js +1 -1
- package/dist/{map-CgwU5Px4.js → map-CUKZ6LrR.js} +2 -2
- package/dist/{map-CgwU5Px4.js.map → map-CUKZ6LrR.js.map} +1 -1
- package/dist/{map-DuTFI2lm.cjs → map-w4Kdtycx.cjs} +2 -2
- package/dist/{map-DuTFI2lm.cjs.map → map-w4Kdtycx.cjs.map} +1 -1
- package/dist/map.cjs +1 -1
- package/dist/map.js +1 -1
- package/dist/{media-BnktmFRW.js → media-CjdCchz8.js} +2 -2
- package/dist/{media-BnktmFRW.js.map → media-CjdCchz8.js.map} +1 -1
- package/dist/{media-gtpSHRFx.cjs → media-DDNmuoV0.cjs} +2 -2
- package/dist/{media-gtpSHRFx.cjs.map → media-DDNmuoV0.cjs.map} +1 -1
- package/dist/menu-D9-9vipn.cjs +26 -0
- package/dist/menu-D9-9vipn.cjs.map +1 -0
- package/dist/menu-ofiPDY2a.js +61 -0
- package/dist/menu-ofiPDY2a.js.map +1 -0
- package/dist/menu.cjs +1 -1
- package/dist/menu.js +1 -1
- package/dist/mixins.cjs +1 -1
- package/dist/mixins.js +3 -3
- 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-D8otIR2P.cjs → navigation-rail-CEDLJTrH.cjs} +2 -2
- package/dist/{navigation-rail-D8otIR2P.cjs.map → navigation-rail-CEDLJTrH.cjs.map} +1 -1
- package/dist/{navigation-rail-CUMNSz0h.js → navigation-rail-weSW6BCv.js} +3 -3
- package/dist/{navigation-rail-CUMNSz0h.js.map → navigation-rail-weSW6BCv.js.map} +1 -1
- package/dist/navigation-rail.cjs +1 -1
- package/dist/navigation-rail.js +1 -1
- package/dist/{notification-service-E16lPsiT.js → notification-service-B4nvP2Jc.js} +5 -5
- package/dist/{notification-service-E16lPsiT.js.map → notification-service-B4nvP2Jc.js.map} +1 -1
- package/dist/{notification-service-CP6kGXVL.cjs → notification-service-B_pa74hl.cjs} +2 -2
- package/dist/{notification-service-CP6kGXVL.cjs.map → notification-service-B_pa74hl.cjs.map} +1 -1
- package/dist/notification.cjs +1 -1
- package/dist/notification.js +2 -2
- package/dist/{notify-D865xIlu.js → notify-Ci0HrUIo.js} +2 -2
- package/dist/{notify-D865xIlu.js.map → notify-Ci0HrUIo.js.map} +1 -1
- package/dist/{notify-Czdp7BbG.cjs → notify-aasSKQGA.cjs} +2 -2
- package/dist/{notify-Czdp7BbG.cjs.map → notify-aasSKQGA.cjs.map} +1 -1
- package/dist/{option-cJ8fM5qJ.js → option-Cs4e3CzF.js} +2 -2
- package/dist/{option-cJ8fM5qJ.js.map → option-Cs4e3CzF.js.map} +1 -1
- package/dist/{option-B1r0hb3H.cjs → option-Uze_q9Ef.cjs} +2 -2
- package/dist/{option-B1r0hb3H.cjs.map → option-Uze_q9Ef.cjs.map} +1 -1
- package/dist/option.cjs +1 -1
- package/dist/option.js +1 -1
- package/dist/{payment-card-form-RBjpMc2m.js → payment-card-form-BLoUTYiB.js} +3 -3
- package/dist/{payment-card-form-RBjpMc2m.js.map → payment-card-form-BLoUTYiB.js.map} +1 -1
- package/dist/{payment-card-form-EO3auDS8.cjs → payment-card-form-rJCPUtWE.cjs} +2 -2
- package/dist/{payment-card-form-EO3auDS8.cjs.map → payment-card-form-rJCPUtWE.cjs.map} +1 -1
- package/dist/{progress-4v9FzvOT.js → progress-B1f3y-Mf.js} +2 -2
- package/dist/{progress-4v9FzvOT.js.map → progress-B1f3y-Mf.js.map} +1 -1
- package/dist/{progress-DnhvJMz_.cjs → progress-DdBHNIMT.cjs} +2 -2
- package/dist/{progress-DnhvJMz_.cjs.map → progress-DdBHNIMT.cjs.map} +1 -1
- package/dist/progress.cjs +1 -1
- package/dist/progress.js +1 -1
- package/dist/{radio-button-BVegeFKE.cjs → radio-button-BAS7gKmA.cjs} +2 -2
- package/dist/{radio-button-BVegeFKE.cjs.map → radio-button-BAS7gKmA.cjs.map} +1 -1
- package/dist/{radio-button-DDavzgCz.js → radio-button-CaDaw5VH.js} +3 -3
- package/dist/{radio-button-DDavzgCz.js.map → radio-button-CaDaw5VH.js.map} +1 -1
- package/dist/radio-group.cjs +1 -1
- package/dist/radio-group.js +1 -1
- package/dist/ripple-QoNZUUw_.js +148 -0
- package/dist/ripple-QoNZUUw_.js.map +1 -0
- package/dist/ripple-Ujq_REH4.cjs +16 -0
- package/dist/ripple-Ujq_REH4.cjs.map +1 -0
- package/dist/{schmancy-steps-container-DN9c-HeX.js → schmancy-steps-container-BInNput3.js} +2 -2
- package/dist/{schmancy-steps-container-DN9c-HeX.js.map → schmancy-steps-container-BInNput3.js.map} +1 -1
- package/dist/{schmancy-steps-container-s6kZWhcr.cjs → schmancy-steps-container-wQsksygx.cjs} +2 -2
- package/dist/{schmancy-steps-container-s6kZWhcr.cjs.map → schmancy-steps-container-wQsksygx.cjs.map} +1 -1
- package/dist/search-B1s7thB0.cjs +2 -0
- package/dist/search-B1s7thB0.cjs.map +1 -0
- package/dist/search-DxxnLa5u.js +95 -0
- package/dist/search-DxxnLa5u.js.map +1 -0
- package/dist/{select--D6l5ru7.js → select-ApLZefMf.js} +4 -4
- package/dist/{select--D6l5ru7.js.map → select-ApLZefMf.js.map} +1 -1
- package/dist/{select-DVT_kFNR.cjs → select-_2Ag_znm.cjs} +2 -2
- package/dist/{select-DVT_kFNR.cjs.map → select-_2Ag_znm.cjs.map} +1 -1
- package/dist/select.cjs +1 -1
- package/dist/select.js +1 -1
- package/dist/selector-hook-Cok22ifx.cjs +2 -0
- package/dist/selector-hook-Cok22ifx.cjs.map +1 -0
- package/dist/selector-hook-l2fe2UO5.js +319 -0
- package/dist/selector-hook-l2fe2UO5.js.map +1 -0
- package/dist/{sheet-CNn_huhz.js → sheet-DovyNsok.js} +14 -14
- package/dist/sheet-DovyNsok.js.map +1 -0
- package/dist/{sheet-Bza5jVS2.cjs → sheet-wjDOQ8Hs.cjs} +4 -4
- package/dist/sheet-wjDOQ8Hs.cjs.map +1 -0
- package/dist/sheet.cjs +1 -1
- package/dist/sheet.js +2 -2
- package/dist/{sheet.service-CmNDL4f6.js → sheet.service-BvOiOFMm.js} +2 -2
- package/dist/{sheet.service-CmNDL4f6.js.map → sheet.service-BvOiOFMm.js.map} +1 -1
- package/dist/{sheet.service--zUgftN3.cjs → sheet.service-DfHrOxyc.cjs} +2 -2
- package/dist/{sheet.service--zUgftN3.cjs.map → sheet.service-DfHrOxyc.cjs.map} +1 -1
- package/dist/{slider-Cf0pED-U.cjs → slider-BgJccHrg.cjs} +2 -2
- package/dist/{slider-Cf0pED-U.cjs.map → slider-BgJccHrg.cjs.map} +1 -1
- package/dist/{slider-DPxBmmFD.js → slider-CeVgx4pL.js} +3 -3
- package/dist/{slider-DPxBmmFD.js.map → slider-CeVgx4pL.js.map} +1 -1
- package/dist/slider.cjs +1 -1
- package/dist/slider.js +1 -1
- package/dist/{spinner-BDSDxr_W.cjs → spinner-BKeA2bdB.cjs} +3 -3
- package/dist/spinner-BKeA2bdB.cjs.map +1 -0
- package/dist/{spinner-Dyz6HBFa.js → spinner-Brq1TenP.js} +3 -3
- package/dist/spinner-Brq1TenP.js.map +1 -0
- package/dist/steps.cjs +1 -1
- package/dist/steps.js +1 -1
- package/dist/store.cjs +1 -1
- package/dist/store.js +1 -1
- package/dist/{suggestion-chip-CCW8g_3S.js → suggestion-chip-CWBSzu7C.js} +3 -3
- package/dist/{suggestion-chip-CCW8g_3S.js.map → suggestion-chip-CWBSzu7C.js.map} +1 -1
- package/dist/{suggestion-chip-B7COqb4l.cjs → suggestion-chip-dq20NKWy.cjs} +2 -2
- package/dist/{suggestion-chip-B7COqb4l.cjs.map → suggestion-chip-dq20NKWy.cjs.map} +1 -1
- package/dist/{surface-B4CxtF38.js → surface-Bf8pvmdG.js} +34 -10
- package/dist/{surface-B4CxtF38.js.map → surface-Bf8pvmdG.js.map} +1 -1
- package/dist/{surface-CkzbeSYN.cjs → surface-fEPJ-cuu.cjs} +27 -3
- package/dist/{surface-CkzbeSYN.cjs.map → surface-fEPJ-cuu.cjs.map} +1 -1
- package/dist/surface.cjs +1 -1
- package/dist/surface.js +1 -1
- package/dist/{table-D-g4ZBys.cjs → table-DEnB9_Rf.cjs} +4 -3
- package/dist/{table-D-g4ZBys.cjs.map → table-DEnB9_Rf.cjs.map} +1 -1
- package/dist/{table-KPNVMJtn.js → table-MLd3oXm6.js} +14 -10
- package/dist/{table-KPNVMJtn.js.map → table-MLd3oXm6.js.map} +1 -1
- package/dist/table.cjs +1 -1
- package/dist/table.js +1 -1
- package/dist/{tabs-compatibility-sMoQP12I.cjs → tabs-compatibility-CXVHOR5X.cjs} +2 -2
- package/dist/{tabs-compatibility-sMoQP12I.cjs.map → tabs-compatibility-CXVHOR5X.cjs.map} +1 -1
- package/dist/{tabs-compatibility-xUK4vD1M.js → tabs-compatibility-KWKzYolX.js} +2 -2
- package/dist/{tabs-compatibility-xUK4vD1M.js.map → tabs-compatibility-KWKzYolX.js.map} +1 -1
- package/dist/tabs.cjs +1 -1
- package/dist/tabs.js +1 -1
- package/dist/tailwind.mixin-3TPVvhYf.cjs +2 -0
- package/dist/{tailwind.mixin-scDxsqaX.cjs.map → tailwind.mixin-3TPVvhYf.cjs.map} +1 -1
- package/dist/tailwind.mixin-DIW0B_of.js +67 -0
- package/dist/{tailwind.mixin-xIIxrXd8.js.map → tailwind.mixin-DIW0B_of.js.map} +1 -1
- package/dist/teleport.cjs +1 -1
- package/dist/teleport.js +1 -1
- package/dist/{textarea-BSBYVs99.cjs → textarea-B7arkA7y.cjs} +2 -2
- package/dist/{textarea-BSBYVs99.cjs.map → textarea-B7arkA7y.cjs.map} +1 -1
- package/dist/{textarea-CFrirT5y.js → textarea-BK1m_CFR.js} +3 -3
- package/dist/{textarea-CFrirT5y.js.map → textarea-BK1m_CFR.js.map} +1 -1
- package/dist/textarea.cjs +1 -1
- package/dist/textarea.js +1 -1
- package/dist/{theme-button-B8Xqrz1M.cjs → theme-button-BTKwL3oC.cjs} +2 -2
- package/dist/{theme-button-B8Xqrz1M.cjs.map → theme-button-BTKwL3oC.cjs.map} +1 -1
- package/dist/{theme-button-D-LTPh88.js → theme-button-C6kk8bay.js} +2 -2
- package/dist/{theme-button-D-LTPh88.js.map → theme-button-C6kk8bay.js.map} +1 -1
- package/dist/theme-button.cjs +1 -1
- package/dist/theme-button.js +1 -1
- package/dist/{theme-controller-boat-BOddzVdU.js → theme-controller-boat-BK59LqH9.js} +3 -3
- package/dist/{theme-controller-boat-BOddzVdU.js.map → theme-controller-boat-BK59LqH9.js.map} +1 -1
- package/dist/{theme-controller-boat-C2F-qRyu.cjs → theme-controller-boat-Y5QXwJxW.cjs} +2 -2
- package/dist/{theme-controller-boat-C2F-qRyu.cjs.map → theme-controller-boat-Y5QXwJxW.cjs.map} +1 -1
- package/dist/theme.cjs +1 -1
- package/dist/theme.js +1 -1
- package/dist/{timezone-BvOWa9Nt.js → timezone-D_skWX6Z.js} +3 -3
- package/dist/{timezone-BvOWa9Nt.js.map → timezone-D_skWX6Z.js.map} +1 -1
- package/dist/{timezone-xHmnktrm.cjs → timezone-nbn0o5GC.cjs} +2 -2
- package/dist/{timezone-xHmnktrm.cjs.map → timezone-nbn0o5GC.cjs.map} +1 -1
- package/dist/{tooltip-D3ZZJEAk.js → tooltip-Btl0IKYC.js} +2 -2
- package/dist/{tooltip-D3ZZJEAk.js.map → tooltip-Btl0IKYC.js.map} +1 -1
- package/dist/{tooltip-D24v5bvM.cjs → tooltip-DyuMJEjL.cjs} +2 -2
- package/dist/{tooltip-D24v5bvM.cjs.map → tooltip-DyuMJEjL.cjs.map} +1 -1
- package/dist/tooltip.cjs +1 -1
- package/dist/tooltip.js +1 -1
- package/dist/{tree-CfVyhRIH.js → tree-B_2eIFQi.js} +2 -2
- package/dist/{tree-CfVyhRIH.js.map → tree-B_2eIFQi.js.map} +1 -1
- package/dist/{tree-DC_jbDRu.cjs → tree-N4Y6MoQe.cjs} +2 -2
- package/dist/{tree-DC_jbDRu.cjs.map → tree-N4Y6MoQe.cjs.map} +1 -1
- package/dist/tree.cjs +1 -1
- package/dist/tree.js +1 -1
- package/dist/{typewriter-By-3T0Jm.js → typewriter-Blyrk_4c.js} +247 -118
- package/dist/typewriter-Blyrk_4c.js.map +1 -0
- package/dist/typewriter-CFQAeOaw.cjs +124 -0
- package/dist/typewriter-CFQAeOaw.cjs.map +1 -0
- package/dist/typewriter.cjs +1 -1
- package/dist/typewriter.js +1 -1
- package/dist/{typography-B7kvO8iJ.js → typography-DjGWK58I.js} +2 -2
- package/dist/{typography-B7kvO8iJ.js.map → typography-DjGWK58I.js.map} +1 -1
- package/dist/{typography-9lVCjAbj.cjs → typography-DsIU0TGe.cjs} +2 -2
- package/dist/{typography-9lVCjAbj.cjs.map → typography-DsIU0TGe.cjs.map} +1 -1
- package/dist/typography.cjs +1 -1
- package/dist/typography.js +1 -1
- package/dist/utils.cjs +1 -1
- package/dist/utils.js +1 -1
- package/package.json +1 -1
- package/types/src/area/router.types.d.ts +1 -0
- package/types/src/boat/boat.d.ts +0 -1
- package/types/src/button/button.d.ts +8 -0
- package/types/src/details/details.d.ts +3 -11
- package/types/src/directives/drag.d.ts +30 -0
- package/types/src/directives/index.d.ts +1 -0
- package/types/src/divider/divider.d.ts +6 -1
- package/types/src/menu/menu-item.d.ts +0 -1
- package/types/src/store/filter-directive.d.ts +1 -1
- package/types/src/surface/surface.d.ts +2 -1
- package/types/src/types/surface.d.ts +1 -1
- package/types/src/typewriter/typewriter.d.ts +15 -0
- package/types/src/utils/index.d.ts +4 -4
- package/types/src/utils/search.d.ts +39 -1
- package/dist/area.component-BojFAcRk.cjs.map +0 -1
- package/dist/area.component-C_nUxyiY.js.map +0 -1
- package/dist/boat-B7AKN6Ge.js +0 -276
- package/dist/boat-B7AKN6Ge.js.map +0 -1
- package/dist/boat-BhAuteUk.cjs +0 -93
- package/dist/boat-BhAuteUk.cjs.map +0 -1
- package/dist/details-CQPpI_la.js +0 -211
- package/dist/details-CQPpI_la.js.map +0 -1
- package/dist/details-DydvHvfw.cjs +0 -143
- package/dist/details-DydvHvfw.cjs.map +0 -1
- package/dist/divider-BF9xljgI.cjs +0 -2
- package/dist/divider-BF9xljgI.cjs.map +0 -1
- package/dist/divider-BHruVdsE.js +0 -23
- package/dist/divider-BHruVdsE.js.map +0 -1
- package/dist/icon-button-BRcfLsJL.cjs.map +0 -1
- package/dist/icon-button-PpRHFLCj.js.map +0 -1
- package/dist/input-DB269a2X.cjs +0 -51
- package/dist/menu-DA2pO48m.cjs +0 -26
- package/dist/menu-DA2pO48m.cjs.map +0 -1
- package/dist/menu-DwFriXTu.js +0 -63
- package/dist/menu-DwFriXTu.js.map +0 -1
- package/dist/ripple-Cy-nvO8W.js +0 -80
- package/dist/ripple-Cy-nvO8W.js.map +0 -1
- package/dist/ripple-DqQrvaTe.cjs +0 -16
- package/dist/ripple-DqQrvaTe.cjs.map +0 -1
- package/dist/search-BeEqIiuO.js +0 -53
- package/dist/search-BeEqIiuO.js.map +0 -1
- package/dist/search-bfOHCuHZ.cjs +0 -2
- package/dist/search-bfOHCuHZ.cjs.map +0 -1
- package/dist/selector-hook-BG6g_IEN.cjs +0 -2
- package/dist/selector-hook-BG6g_IEN.cjs.map +0 -1
- package/dist/selector-hook-CrwQCPxL.js +0 -313
- package/dist/selector-hook-CrwQCPxL.js.map +0 -1
- package/dist/sheet-Bza5jVS2.cjs.map +0 -1
- package/dist/sheet-CNn_huhz.js.map +0 -1
- package/dist/spinner-BDSDxr_W.cjs.map +0 -1
- package/dist/spinner-Dyz6HBFa.js.map +0 -1
- package/dist/tailwind.mixin-scDxsqaX.cjs +0 -2
- package/dist/tailwind.mixin-xIIxrXd8.js +0 -67
- package/dist/typewriter-By-3T0Jm.js.map +0 -1
- package/dist/typewriter-vit0P1N1.cjs +0 -9
- package/dist/typewriter-vit0P1N1.cjs.map +0 -1
package/dist/badge.cjs
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("./avatar-
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("./avatar-Bo8kRnA-.cjs");Object.defineProperty(exports,"ScBadgeV2",{enumerable:!0,get:()=>e.ScBadgeV2}),Object.defineProperty(exports,"SchmancyBadgeV2",{enumerable:!0,get:()=>e.SchmancyBadgeV2});
|
|
2
2
|
//# sourceMappingURL=badge.cjs.map
|
package/dist/badge.js
CHANGED
|
@@ -0,0 +1,97 @@
|
|
|
1
|
+
"use strict";const m=require("rxjs"),r=require("rxjs/operators");require("lit/directives/class-map.js"),require("lit/directives/style-map.js");const l=require("lit/decorators.js");require("./tailwind.mixin-3TPVvhYf.cjs");const v=require("./litElement.mixin-CPQYJnK_.cjs"),g=require("lit"),f=require("lit/directives/ref.js"),S=require("lit/directives/cache.js");var R=Object.defineProperty,C=Object.getOwnPropertyDescriptor,u=(t,i,o,n)=>{for(var e,a=n>1?void 0:n?C(i,o):i,s=t.length-1;s>=0;s--)(e=t[s])&&(a=(n?e(i,o,a):e(a))||a);return n&&a&&R(i,o,a),a};exports.SchmancyBoat=class extends v.$LitElement(g.css`
|
|
2
|
+
:host {
|
|
3
|
+
display: contents;
|
|
4
|
+
position: relative;
|
|
5
|
+
z-index: 1000;
|
|
6
|
+
}
|
|
7
|
+
`){constructor(){super(...arguments),this.id="default",this.containerRef=f.createRef(),this.contentRef=f.createRef(),this.iconRef=f.createRef(),this.headerRef=f.createRef(),this.ANIMATION_CONFIG={durations:{expand:350,minimize:250,hide:200,content:300},easing:{emphasized:"cubic-bezier(0.2, 0.0, 0, 1.0)",decelerate:"cubic-bezier(0.05, 0.7, 0.1, 1.0)",accelerate:"cubic-bezier(0.3, 0.0, 0.8, 0.15)",standard:"cubic-bezier(0.4, 0.0, 0.2, 1)"},shadows:{fab:"0px 3px 5px -1px rgba(0, 0, 0, 0.2), 0px 6px 10px 0px rgba(0, 0, 0, 0.14), 0px 1px 18px 0px rgba(0, 0, 0, 0.12)",fabLowered:"0px 1px 3px 0px rgba(0, 0, 0, 0.2), 0px 1px 1px 0px rgba(0, 0, 0, 0.14), 0px 2px 1px -1px rgba(0, 0, 0, 0.12)",expanded:"0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 10px 10px -5px rgba(0, 0, 0, 0.04)"}},this.currentState="minimized",this.isContentVisible=!1,this.isAnimating=!1,this.isLowered=!1,this.isDragging=!1,this.position={x:16,y:16},this.anchor="bottom-right"}get state(){return this.currentState}set state(t){this.isAnimating||t===this.currentState||this.animateToState(t)}get lowered(){return this.isLowered}set lowered(t){this.isLowered=t,this.requestUpdate()}connectedCallback(){super.connectedCallback(),typeof window<"u"&&(m.fromEvent(window,"resize").pipe(r.takeUntil(this.disconnecting)).subscribe(()=>{this.currentState==="expanded"&&this.updateExpandedWidth();const t=this.containerRef.value;if(t){const i=t.getBoundingClientRect();if(i.width>0&&i.height>0){const o=window.innerWidth,n=window.innerHeight,e=this.anchor.includes("right")?o-this.position.x-i.width:this.position.x,a=this.anchor.includes("bottom")?n-this.position.y-i.height:this.position.y;let s=!1,h=e,c=a;e<0&&(h=16,s=!0),e+i.width>o&&(h=o-i.width-16,s=!0),a<0&&(c=16,s=!0),a+i.height>n&&(c=n-i.height-16,s=!0),s&&(this.position.x=this.anchor.includes("right")?o-h-i.width:h,this.position.y=this.anchor.includes("bottom")?n-c-i.height:c,this.position.x=Math.max(0,this.position.x),this.position.y=Math.max(0,this.position.y),this.updateContainerPosition(),this.savePosition())}}}),m.fromEvent(window,"keydown").pipe(r.filter(t=>t.key==="Escape"&&this.currentState!=="hidden"),r.tap(t=>t.preventDefault()),r.takeUntil(this.disconnecting)).subscribe(()=>{this.currentState==="expanded"?this.toggleState():this.close()}))}async animateToState(t){if(this.isAnimating||t===this.currentState)return;const i=this.currentState;this.isAnimating=!0;try{await this.performTransition(i,t),this.currentState=t,this.isContentVisible=t==="expanded",this.dispatchEvent(new CustomEvent("toggle",{detail:t,bubbles:!0,composed:!0}))}catch{this.currentState=t,this.isContentVisible=t==="expanded"}finally{this.isAnimating=!1}}async performTransition(t,i){if(this.currentAnimation?.cancel(),!this.containerRef.value)return;i==="expanded"&&(this.isContentVisible=!0,await this.updateComplete);const o=this.createAnimations(t,i);if(o.container)if(this.currentAnimation=o.container,await o.container.finished,o.content&&await o.content.finished,i!=="expanded")this.isContentVisible=!1;else{const n=this.containerRef.value;if(n){const e=n.getBoundingClientRect();if(e.width>0&&e.height>0){const a=window.innerWidth,s=window.innerHeight,h=this.anchor.includes("right")?a-this.position.x-e.width:this.position.x,c=this.anchor.includes("bottom")?s-this.position.y-e.height:this.position.y;let p=!1,y=h,d=c;h<0&&(y=16,p=!0),h+e.width>a&&(y=a-e.width-16,p=!0),c<0&&(d=16,p=!0),c+e.height>s&&(d=s-e.height-16,p=!0),p&&(this.position.x=this.anchor.includes("right")?a-y-e.width:y,this.position.y=this.anchor.includes("bottom")?s-d-e.height:d,this.position.x=Math.max(0,this.position.x),this.position.y=Math.max(0,this.position.y),this.updateContainerPosition(),this.savePosition())}}}}createAnimations(t,i){const o=this.containerRef.value,n=this.contentRef.value,e=this.iconRef.value,a={};if(!o)return a;const s=this.ANIMATION_CONFIG,h=this.getStyleForState(t),c=this.getStyleForState(i);if(a.container=i==="expanded"?o.animate([h,c],{duration:s.durations.expand,easing:s.easing.decelerate,fill:"forwards"}):o.animate([h,c],{duration:i==="hidden"?s.durations.hide:s.durations.minimize,easing:s.easing.accelerate,fill:"forwards"}),n&&t==="expanded"&&i==="minimized"?a.content=n.animate([{opacity:1,transform:"translateY(0)"},{opacity:0,transform:"translateY(-8px)"}],{duration:150,easing:s.easing.standard,fill:"forwards"}):n&&i==="expanded"&&n.animate([{opacity:0,transform:"translateY(8px)"},{opacity:1,transform:"translateY(0)"}],{duration:s.durations.content,easing:s.easing.standard,fill:"forwards"}),e){const p=i==="expanded";(p||t==="expanded"&&i==="minimized")&&e.animate([{transform:p?"rotate(0deg)":"rotate(180deg)"},{transform:p?"rotate(180deg)":"rotate(0deg)"}],{duration:250,easing:s.easing.emphasized,fill:"forwards"})}return a}getStyleForState(t){const{shadows:i}=this.ANIMATION_CONFIG,o={maxWidth:"fit",maxHeight:"auto",borderRadius:"16px"};return{hidden:{...o,opacity:"0",pointerEvents:"none",boxShadow:"none",backdropFilter:"none"},minimized:{...o,opacity:"1",pointerEvents:"auto",boxShadow:this.isLowered?i.fabLowered:i.fab,backdropFilter:"none"},expanded:{opacity:"1",pointerEvents:"auto",width:this.getResponsiveWidth(),maxWidth:"100%",maxHeight:"80vh",boxShadow:i.expanded,borderRadius:"8px 8px 0 0",backdropFilter:"blur(12px)"}}[t]}getResponsiveWidth(){if(typeof window>"u")return"40vw";const t=window.innerWidth;return t<768?"calc(100vw - 32px)":t<1024?"70vw":t<1280?"60vw":"40vw"}updateExpandedWidth(){const t=this.containerRef.value;t&&this.currentState==="expanded"&&(t.style.width=this.getResponsiveWidth())}firstUpdated(){this.applyInitialStyles(),this.updateContainerPosition();const t=this.containerRef.value;t&&m.interval(10).pipe(r.startWith(!0),r.filter(()=>{const i=t.getBoundingClientRect();return i.width>0&&i.height>0}),r.take(1),r.takeUntil(this.disconnecting)).subscribe(()=>{const i=t.getBoundingClientRect(),o=window.innerWidth,n=window.innerHeight,e=this.anchor.includes("right")?o-this.position.x-i.width:this.position.x,a=this.anchor.includes("bottom")?n-this.position.y-i.height:this.position.y;let s=!1,h=e,c=a;e<0&&(h=16,s=!0),e+i.width>o&&(h=o-i.width-16,s=!0),a<0&&(c=16,s=!0),a+i.height>n&&(c=n-i.height-16,s=!0),s&&(this.position.x=this.anchor.includes("right")?o-h-i.width:h,this.position.y=this.anchor.includes("bottom")?n-c-i.height:c,this.position.x=Math.max(0,this.position.x),this.position.y=Math.max(0,this.position.y),this.updateContainerPosition(),this.savePosition())}),this.setupDragPipeline(),this.querySelector('[slot="header"]')&&!this.icon&&this.label}applyInitialStyles(){const t=this.containerRef.value,i=this.contentRef.value,o=this.iconRef.value;if(t){const n=this.getStyleForState(this.currentState);Object.assign(t.style,n),"webkitBackdropFilter"in t.style&&(t.style.webkitBackdropFilter=n.backdropFilter)}i&&(i.style.opacity=this.isContentVisible?"1":"0"),o&&this.currentState==="expanded"&&(o.style.transform="rotate(180deg)")}toggleState(){const t=this.currentState==="minimized"?"expanded":"minimized";this.animateToState(t)}close(){this.animateToState("hidden")}closeAndAddToNav(){m.race(this.discover("schmancy-navigation-rail"),this.discover("schmancy-navigation-bar"),this.discover("schmancy-nav-drawer"),this.discover("app-navigation-rail"),this.discover("app-navigation-bar"),this.discover("app-nav-drawer")).pipe(r.take(1),r.tap(t=>{if(t&&typeof t.addBoatItem=="function"){const i=this.icon||(this.querySelector('[slot="header"]')?.querySelector("schmancy-icon")?.textContent?.trim()||"widgets"),o=this.label||(()=>{let a=this.querySelector('[slot="header"]')?.textContent?.trim()||"Boat";return a.includes(i)&&(a=a.replace(i,"").trim()),a||this.id})(),n=t.addBoatItem({id:`boat-${this.id}`,title:o,icon:i});if(n){const e=this.containerRef.value;e?e.animate([{opacity:1},{opacity:0}],{duration:150,easing:"ease-out",fill:"forwards"}).finished.then(()=>{this.currentState="hidden",this.isContentVisible=!1}):(this.currentState="hidden",this.isContentVisible=!1),m.fromEvent(n,"click").pipe(r.tap(()=>this.state="expanded"),r.takeUntil(this.disconnecting)).subscribe()}}else this.close()})).subscribe()}calculateDragPosition(t,i,o,n,e){const a=t-o,s=i-n,h=window.innerWidth,c=window.innerHeight,p=Math.max(0,Math.min(a,h-e.width)),y=Math.max(0,Math.min(s,c-e.height)),d=this.anchor.includes("right")?h-(p+e.width):p,x=this.anchor.includes("bottom")?c-(y+e.height):y;return{x:Math.max(0,d),y:Math.max(0,x)}}savePosition(){if(typeof window>"u")return;const t={x:this.position.x,y:this.position.y,anchor:this.anchor},i=`schmancy-boat-${this.id}`;localStorage.setItem(i,JSON.stringify(t))}setupDragPipeline(){if(typeof window>"u")return;const t=this.headerRef.value,i=this.containerRef.value;if(!t||!i)return;let o=!1;m.merge(m.fromEvent(t,"mousedown").pipe(r.filter(n=>n.button===0),r.tap(n=>{n.preventDefault(),n.stopPropagation()}),r.map(n=>({clientX:n.clientX,clientY:n.clientY,type:"mouse"}))),m.fromEvent(t,"touchstart").pipe(r.map(n=>({clientX:n.touches[0].clientX,clientY:n.touches[0].clientY,type:"touch"})))).pipe(r.map(({clientX:n,clientY:e,type:a})=>{const s=i.getBoundingClientRect();return o=!1,{startX:n,startY:e,offsetX:n-s.left,offsetY:e-s.top,initialRect:s,type:a}})).pipe(r.switchMap(({startX:n,startY:e,offsetX:a,offsetY:s,initialRect:h,type:c})=>{const p=c==="mouse"?m.fromEvent(window,"mousemove").pipe(r.map(d=>({clientX:d.clientX,clientY:d.clientY}))):m.fromEvent(window,"touchmove").pipe(r.map(d=>({clientX:d.touches[0].clientX,clientY:d.touches[0].clientY}))),y=c==="mouse"?m.fromEvent(window,"mouseup"):m.fromEvent(window,"touchend");return p.pipe(r.map(({clientX:d,clientY:x})=>{const b=d-n,w=x-e;return Math.sqrt(b*b+w*w)>5&&!o&&(o=!0,this.isDragging=!0),o?this.calculateDragPosition(d,x,a,s,h):null}),r.filter(d=>d!==null),r.tap(d=>{d&&(this.position=d,this.updateContainerPosition())}),r.takeUntil(y))}),r.finalize(()=>{o?(this.updateAnchor(),this.savePosition()):this.toggleState(),this.isDragging=!1,o=!1}),r.takeUntil(this.disconnecting)).subscribe()}updateContainerPosition(){const t=this.containerRef.value;t&&(t.style.removeProperty("left"),t.style.removeProperty("right"),t.style.removeProperty("top"),t.style.removeProperty("bottom"),this.anchor.includes("right")?t.style.right=`${this.position.x}px`:t.style.left=`${this.position.x}px`,this.anchor.includes("bottom")?t.style.bottom=`${this.position.y}px`:t.style.top=`${this.position.y}px`)}updateAnchor(){if(typeof window>"u")return;const t=this.containerRef.value;if(!t)return;const i=t.getBoundingClientRect(),o=window.innerWidth,n=window.innerHeight,e=i.left>o/2,a=i.top>n/2,s=`${a?"bottom":"top"}-${e?"right":"left"}`;s!==this.anchor&&(this.position.x=e?o-i.right:i.left,this.position.y=a?n-i.bottom:i.top,this.anchor=s)}disconnectedCallback(){super.disconnectedCallback(),this.currentAnimation?.cancel()}render(){const t=this.currentState==="minimized"?this.isLowered?"1":"3":"4",i=this.currentState==="minimized",o=this.anchor.includes("bottom")?this.anchor.includes("right")?"bottom right":"bottom left":this.anchor.includes("right")?"top right":"top left",n={fixed:!0,"overflow-y-auto":!0,flex:!0,"flex-col":!0,"select-none":!0,"will-change-transform":!0,"[contain:layout_style]":!0,"[transform:translate3d(0,0,0)]":!0,"[backface-visibility:hidden]":!0,"transition-shadow":!0,"opacity-95":this.isDragging,"shadow-[0_24px_48px_-8px_rgba(0,0,0,0.2),0_12px_24px_-4px_rgba(0,0,0,0.12)]":this.isDragging};return g.html`
|
|
8
|
+
<div
|
|
9
|
+
class=${this.classMap(n)}
|
|
10
|
+
style="transform-origin: ${o}"
|
|
11
|
+
${f.ref(this.containerRef)}
|
|
12
|
+
>
|
|
13
|
+
<!-- Header section -->
|
|
14
|
+
<section class="sticky top-0 z-100">
|
|
15
|
+
<schmancy-surface
|
|
16
|
+
elevation="${t}"
|
|
17
|
+
rounded="${i?"none":"top"}"
|
|
18
|
+
type="containerLowest"
|
|
19
|
+
>
|
|
20
|
+
<div
|
|
21
|
+
class="group sticky top-0 px-3 py-2 flex items-center justify-between gap-3 ${this.isDragging?"cursor-grabbing":"cursor-move"}"
|
|
22
|
+
${f.ref(this.headerRef)}
|
|
23
|
+
title="Drag to move, double-click to toggle"
|
|
24
|
+
@dblclick=${e=>{e.preventDefault(),e.stopPropagation(),this.toggleState()}}
|
|
25
|
+
>
|
|
26
|
+
<!-- Drag handle indicator -->
|
|
27
|
+
<div
|
|
28
|
+
class="flex items-center text-surface-onVariant opacity-40 transition-opacity duration-200 group-hover:opacity-100"
|
|
29
|
+
>
|
|
30
|
+
<schmancy-icon style="font-size: 20px">drag_indicator</schmancy-icon>
|
|
31
|
+
</div>
|
|
32
|
+
|
|
33
|
+
<!-- Header content - use properties if provided, else fallback to slot -->
|
|
34
|
+
<div
|
|
35
|
+
class="flex-1 min-w-fit items-center flex justify-start ${i?"cursor-pointer":""}"
|
|
36
|
+
|
|
37
|
+
@dblclick=${e=>{i&&(e.preventDefault(),e.stopPropagation(),this.state="expanded")}}
|
|
38
|
+
title="${i?"Click to expand":""}"
|
|
39
|
+
>
|
|
40
|
+
${this.icon||this.label?g.html`
|
|
41
|
+
<div
|
|
42
|
+
class="flex gap-2 items-center">
|
|
43
|
+
${this.icon?g.html`<schmancy-icon>${this.icon}</schmancy-icon>`:""}
|
|
44
|
+
${this.label?g.html`<schmancy-typography type="title" token="md">${this.label}</schmancy-typography>`:""}
|
|
45
|
+
${this.badge!==void 0&&this.badge!==null&&this.badge!==""?g.html`<schmancy-badge>${this.badge}</schmancy-badge>`:""}
|
|
46
|
+
</div>
|
|
47
|
+
`:g.html`<slot name="header"></slot>`}
|
|
48
|
+
</div>
|
|
49
|
+
|
|
50
|
+
<!-- Control buttons -->
|
|
51
|
+
<div class="flex items-center gap-1 shrink-0">
|
|
52
|
+
${i?g.html`
|
|
53
|
+
<!-- Expand button (when minimized) -->
|
|
54
|
+
<schmancy-icon-button
|
|
55
|
+
size="sm"
|
|
56
|
+
variant="text"
|
|
57
|
+
@click=${e=>{e.stopPropagation(),this.state="expanded"}}
|
|
58
|
+
title="Expand"
|
|
59
|
+
${f.ref(this.iconRef)}
|
|
60
|
+
>
|
|
61
|
+
fullscreen
|
|
62
|
+
</schmancy-icon-button>
|
|
63
|
+
`:g.html`
|
|
64
|
+
<!-- Minimize button (when expanded) -->
|
|
65
|
+
<schmancy-icon-button
|
|
66
|
+
size="sm"
|
|
67
|
+
variant="filled tonal"
|
|
68
|
+
@click=${e=>{e.stopPropagation(),this.state="minimized"}}
|
|
69
|
+
title="Minimize"
|
|
70
|
+
${f.ref(this.iconRef)}
|
|
71
|
+
>
|
|
72
|
+
close_fullscreen
|
|
73
|
+
</schmancy-icon-button>
|
|
74
|
+
`}
|
|
75
|
+
|
|
76
|
+
<!-- Close button -->
|
|
77
|
+
<schmancy-icon-button
|
|
78
|
+
size="sm"
|
|
79
|
+
@click=${e=>{e.stopPropagation(),this.closeAndAddToNav()}}
|
|
80
|
+
title="Close and add to navigation"
|
|
81
|
+
>
|
|
82
|
+
remove
|
|
83
|
+
</schmancy-icon-button>
|
|
84
|
+
</div>
|
|
85
|
+
</div>
|
|
86
|
+
</schmancy-surface>
|
|
87
|
+
</section>
|
|
88
|
+
|
|
89
|
+
<!-- Content section -->
|
|
90
|
+
${S.cache(this.isContentVisible?g.html`
|
|
91
|
+
<schmancy-surface type="containerLow" class="flex-1" ${f.ref(this.contentRef)}>
|
|
92
|
+
<slot></slot>
|
|
93
|
+
</schmancy-surface>
|
|
94
|
+
`:g.html``)}
|
|
95
|
+
</div>
|
|
96
|
+
`}},u([l.property({type:String,reflect:!0})],exports.SchmancyBoat.prototype,"state",1),u([l.property({type:String})],exports.SchmancyBoat.prototype,"id",2),u([l.property({type:Boolean,reflect:!0})],exports.SchmancyBoat.prototype,"lowered",1),u([l.property({type:String})],exports.SchmancyBoat.prototype,"icon",2),u([l.property({type:String})],exports.SchmancyBoat.prototype,"label",2),u([l.property()],exports.SchmancyBoat.prototype,"badge",2),u([l.state()],exports.SchmancyBoat.prototype,"currentState",2),u([l.state()],exports.SchmancyBoat.prototype,"isContentVisible",2),u([l.state()],exports.SchmancyBoat.prototype,"isAnimating",2),u([l.state()],exports.SchmancyBoat.prototype,"isLowered",2),u([l.state()],exports.SchmancyBoat.prototype,"isDragging",2),u([l.state()],exports.SchmancyBoat.prototype,"position",2),u([l.state()],exports.SchmancyBoat.prototype,"anchor",2),exports.SchmancyBoat=u([l.customElement("schmancy-boat")],exports.SchmancyBoat);
|
|
97
|
+
//# sourceMappingURL=boat-98He5-K8.cjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"boat-98He5-K8.cjs","sources":["../src/boat/boat.ts"],"sourcesContent":["import { $LitElement } from '@mixins/index'\nimport { css, html } from 'lit'\nimport { customElement, property, state } from 'lit/decorators.js'\nimport { createRef, ref, Ref } from 'lit/directives/ref.js'\nimport { cache } from 'lit/directives/cache.js'\nimport { fromEvent, interval, merge, race } from 'rxjs'\nimport { filter, finalize, map, startWith, switchMap, take, takeUntil, tap } from 'rxjs/operators'\n\ntype BoatState = 'hidden' | 'minimized' | 'expanded'\n\ninterface Position {\n\tx: number\n\ty: number\n}\n\ninterface SavedPosition {\n\tx: number\n\ty: number\n\tanchor: 'bottom-right' | 'bottom-left' | 'top-right' | 'top-left'\n}\n\n@customElement('schmancy-boat')\nexport default class SchmancyBoat extends $LitElement(css`\n\t:host {\n\t\tdisplay: contents;\n\t\tposition: relative;\n\t\tz-index: 1000;\n\t}\n`) {\n\t@property({ type: String, reflect: true })\n\tget state(): BoatState {\n\t\treturn this.currentState\n\t}\n\tset state(value: BoatState) {\n\t\tif (this.isAnimating || value === this.currentState) return\n\t\tthis.animateToState(value)\n\t}\n\n\t@property({ type: String }) id: string = 'default'\n\n\t@property({ type: Boolean, reflect: true })\n\tget lowered(): boolean {\n\t\treturn this.isLowered\n\t}\n\tset lowered(value: boolean) {\n\t\tthis.isLowered = value\n\t\tthis.requestUpdate()\n\t}\n\n\t// New properties for simplified API\n\t@property({ type: String }) icon?: string\n\t@property({ type: String }) label?: string\n\t@property() badge?: string | number\n\n\t// Element references\n\tprivate containerRef: Ref<HTMLDivElement> = createRef()\n\tprivate contentRef: Ref<HTMLElement> = createRef()\n\tprivate iconRef: Ref<HTMLElement> = createRef()\n\tprivate headerRef: Ref<HTMLElement> = createRef()\n\n\t// Current animation reference\n\tprivate currentAnimation?: Animation\n\n\t// Animation configuration\n\tprivate readonly ANIMATION_CONFIG = {\n\t\tdurations: {\n\t\t\texpand: 350,\n\t\t\tminimize: 250,\n\t\t\thide: 200,\n\t\t\tcontent: 300,\n\t\t},\n\t\teasing: {\n\t\t\temphasized: 'cubic-bezier(0.2, 0.0, 0, 1.0)',\n\t\t\tdecelerate: 'cubic-bezier(0.05, 0.7, 0.1, 1.0)',\n\t\t\taccelerate: 'cubic-bezier(0.3, 0.0, 0.8, 0.15)',\n\t\t\tstandard: 'cubic-bezier(0.4, 0.0, 0.2, 1)',\n\t\t},\n\t\tshadows: {\n\t\t\tfab: '0px 3px 5px -1px rgba(0, 0, 0, 0.2), 0px 6px 10px 0px rgba(0, 0, 0, 0.14), 0px 1px 18px 0px rgba(0, 0, 0, 0.12)',\n\t\t\tfabLowered:\n\t\t\t\t'0px 1px 3px 0px rgba(0, 0, 0, 0.2), 0px 1px 1px 0px rgba(0, 0, 0, 0.14), 0px 2px 1px -1px rgba(0, 0, 0, 0.12)',\n\t\t\texpanded: '0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 10px 10px -5px rgba(0, 0, 0, 0.04)',\n\t\t},\n\t}\n\n\t// Reactive state for template\n\t@state() private currentState: BoatState = 'minimized'\n\t@state() private isContentVisible: boolean = false\n\t@state() private isAnimating: boolean = false\n\t@state() private isLowered: boolean = false\n\t@state() private isDragging: boolean = false\n\t@state() private position: Position = { x: 16, y: 16 }\n\t@state() private anchor: 'bottom-right' | 'bottom-left' | 'top-right' | 'top-left' = 'bottom-right'\n\n\tconnectedCallback() {\n\t\tsuper.connectedCallback()\n\n\t\tif (typeof window !== 'undefined') {\n\t\t\tfromEvent(window, 'resize')\n\t\t\t\t.pipe(takeUntil(this.disconnecting))\n\t\t\t\t.subscribe(() => {\n\t\t\t\t\tif (this.currentState === 'expanded') {\n\t\t\t\t\t\tthis.updateExpandedWidth()\n\t\t\t\t\t}\n\n\t\t\t\t\t// Validate viewport after resize to ensure boat stays visible\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\t// Only validate if dimensions are ready\n\t\t\t\t\t\tif (rect.width > 0 && rect.height > 0) {\n\t\t\t\t\t\t\tconst vw = window.innerWidth\n\t\t\t\t\t\t\tconst vh = window.innerHeight\n\n\t\t\t\t\t\t\tconst actualLeft = this.anchor.includes('right') ? vw - this.position.x - rect.width : this.position.x\n\n\t\t\t\t\t\t\tconst actualTop = this.anchor.includes('bottom') ? vh - this.position.y - rect.height : this.position.y\n\n\t\t\t\t\t\t\tlet needsUpdate = false\n\t\t\t\t\t\t\tlet newLeft = actualLeft\n\t\t\t\t\t\t\tlet newTop = actualTop\n\n\t\t\t\t\t\t\tif (actualLeft < 0) {\n\t\t\t\t\t\t\t\tnewLeft = 16\n\t\t\t\t\t\t\t\tneedsUpdate = true\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\tif (actualLeft + rect.width > vw) {\n\t\t\t\t\t\t\t\tnewLeft = vw - rect.width - 16\n\t\t\t\t\t\t\t\tneedsUpdate = true\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\tif (actualTop < 0) {\n\t\t\t\t\t\t\t\tnewTop = 16\n\t\t\t\t\t\t\t\tneedsUpdate = true\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\tif (actualTop + rect.height > vh) {\n\t\t\t\t\t\t\t\tnewTop = vh - rect.height - 16\n\t\t\t\t\t\t\t\tneedsUpdate = true\n\t\t\t\t\t\t\t}\n\n\t\t\t\t\t\t\tif (needsUpdate) {\n\t\t\t\t\t\t\t\tthis.position.x = this.anchor.includes('right') ? vw - newLeft - rect.width : newLeft\n\n\t\t\t\t\t\t\t\tthis.position.y = this.anchor.includes('bottom') ? vh - newTop - rect.height : newTop\n\n\t\t\t\t\t\t\t\tthis.position.x = Math.max(0, this.position.x)\n\t\t\t\t\t\t\t\tthis.position.y = Math.max(0, this.position.y)\n\n\t\t\t\t\t\t\t\tthis.updateContainerPosition()\n\t\t\t\t\t\t\t\tthis.savePosition()\n\t\t\t\t\t\t\t\tconsole.log(`✨ Boat \"${this.id}\" repositioned after resize:`, this.position)\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\n\t\t\t// Keyboard shortcut - Escape key\n\t\t\tfromEvent<KeyboardEvent>(window, 'keydown')\n\t\t\t\t.pipe(\n\t\t\t\t\tfilter(e => e.key === 'Escape' && this.currentState !== 'hidden'),\n\t\t\t\t\ttap(e => e.preventDefault()),\n\t\t\t\t\ttakeUntil(this.disconnecting),\n\t\t\t\t)\n\t\t\t\t.subscribe(() => {\n\t\t\t\t\tif (this.currentState === 'expanded') {\n\t\t\t\t\t\tthis.toggleState() // Minimize on Esc if expanded\n\t\t\t\t\t} else {\n\t\t\t\t\t\tthis.close() // Hide on Esc if minimized\n\t\t\t\t\t}\n\t\t\t\t})\n\t\t}\n\t}\n\n\n\tprivate async animateToState(targetState: BoatState) {\n\t\tif (this.isAnimating || targetState === this.currentState) return\n\n\t\tconst previousState = this.currentState\n\t\tthis.isAnimating = true\n\n\t\ttry {\n\t\t\tawait this.performTransition(previousState, targetState)\n\t\t\tthis.currentState = targetState\n\t\t\tthis.isContentVisible = targetState === 'expanded'\n\n\t\t\t// Dispatch event\n\t\t\tthis.dispatchEvent(\n\t\t\t\tnew CustomEvent('toggle', {\n\t\t\t\t\tdetail: targetState,\n\t\t\t\t\tbubbles: true,\n\t\t\t\t\tcomposed: true,\n\t\t\t\t}),\n\t\t\t)\n\t\t} catch (err) {\n\t\t\tconsole.warn('Animation error:', err)\n\t\t\tthis.currentState = targetState\n\t\t\tthis.isContentVisible = targetState === 'expanded'\n\t\t} finally {\n\t\t\tthis.isAnimating = false\n\t\t}\n\t}\n\n\t// Simplified animation transition\n\tprivate async performTransition(fromState: BoatState, toState: BoatState): Promise<void> {\n\t\tthis.currentAnimation?.cancel()\n\n\t\tconst container = this.containerRef.value\n\t\tif (!container) return\n\n\t\t// Update content visibility before expand and wait for render\n\t\tif (toState === 'expanded') {\n\t\t\tthis.isContentVisible = true\n\t\t\tawait this.updateComplete\n\t\t}\n\n\t\t// Create animations\n\t\tconst animations = this.createAnimations(fromState, toState)\n\n\t\t// Wait for main animation to complete\n\t\tif (animations.container) {\n\t\t\tthis.currentAnimation = animations.container\n\t\t\tawait animations.container.finished\n\n\t\t\t// Wait for content fade-out animation before removing from DOM\n\t\t\tif (animations.content) {\n\t\t\t\tawait animations.content.finished\n\t\t\t}\n\n\t\t\t// Hide content after minimize\n\t\t\tif (toState !== 'expanded') {\n\t\t\t\tthis.isContentVisible = false\n\t\t\t} else {\n\t\t\t\t// CRITICAL: After expanding, validate viewport bounds\n\t\t\t\t// The expanded boat is much larger and might go outside viewport\n\t\t\t\tconst container = this.containerRef.value\n\t\t\t\tif (container) {\n\t\t\t\t\tconst rect = container.getBoundingClientRect()\n\t\t\t\t\tif (rect.width > 0 && rect.height > 0) {\n\t\t\t\t\t\tconst vw = window.innerWidth\n\t\t\t\t\t\tconst vh = window.innerHeight\n\n\t\t\t\t\t\tconst actualLeft = this.anchor.includes('right') ? vw - this.position.x - rect.width : this.position.x\n\n\t\t\t\t\t\tconst actualTop = this.anchor.includes('bottom') ? vh - this.position.y - rect.height : this.position.y\n\n\t\t\t\t\t\tlet needsUpdate = false\n\t\t\t\t\t\tlet newLeft = actualLeft\n\t\t\t\t\t\tlet newTop = actualTop\n\n\t\t\t\t\t\tif (actualLeft < 0) {\n\t\t\t\t\t\t\tnewLeft = 16\n\t\t\t\t\t\t\tneedsUpdate = true\n\t\t\t\t\t\t}\n\t\t\t\t\t\tif (actualLeft + rect.width > vw) {\n\t\t\t\t\t\t\tnewLeft = vw - rect.width - 16\n\t\t\t\t\t\t\tneedsUpdate = true\n\t\t\t\t\t\t}\n\t\t\t\t\t\tif (actualTop < 0) {\n\t\t\t\t\t\t\tnewTop = 16\n\t\t\t\t\t\t\tneedsUpdate = true\n\t\t\t\t\t\t}\n\t\t\t\t\t\tif (actualTop + rect.height > vh) {\n\t\t\t\t\t\t\tnewTop = vh - rect.height - 16\n\t\t\t\t\t\t\tneedsUpdate = true\n\t\t\t\t\t\t}\n\n\t\t\t\t\t\tif (needsUpdate) {\n\t\t\t\t\t\t\tthis.position.x = this.anchor.includes('right') ? vw - newLeft - rect.width : newLeft\n\n\t\t\t\t\t\t\tthis.position.y = this.anchor.includes('bottom') ? vh - newTop - rect.height : newTop\n\n\t\t\t\t\t\t\tthis.position.x = Math.max(0, this.position.x)\n\t\t\t\t\t\t\tthis.position.y = Math.max(0, this.position.y)\n\n\t\t\t\t\t\t\tthis.updateContainerPosition()\n\t\t\t\t\t\t\tthis.savePosition()\n\t\t\t\t\t\t\tconsole.log(`✨ Boat \"${this.id}\" snapped after expand:`, this.position)\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}\n\n\t// Create animations for state transition\n\tprivate createAnimations(fromState: BoatState, toState: BoatState) {\n\t\tconst container = this.containerRef.value\n\t\tconst content = this.contentRef.value\n\t\tconst icon = this.iconRef.value\n\t\tconst animations: { container?: Animation; content?: Animation; icon?: Animation } = {}\n\n\t\tif (!container) return animations\n\n\t\tconst config = this.ANIMATION_CONFIG\n\t\tconst fromStyles = this.getStyleForState(fromState)\n\t\tconst toStyles = this.getStyleForState(toState)\n\n\t\t// Container animation\n\t\tif (toState === 'expanded') {\n\t\t\t// Expand animation without transform\n\t\t\tanimations.container = container.animate([fromStyles, toStyles], {\n\t\t\t\tduration: config.durations.expand,\n\t\t\t\teasing: config.easing.decelerate,\n\t\t\t\tfill: 'forwards',\n\t\t\t})\n\t\t} else {\n\t\t\tanimations.container = container.animate([fromStyles, toStyles], {\n\t\t\t\tduration: toState === 'hidden' ? config.durations.hide : config.durations.minimize,\n\t\t\t\teasing: config.easing.accelerate,\n\t\t\t\tfill: 'forwards',\n\t\t\t})\n\t\t}\n\n\t\t// Content animation (only for expand/minimize transitions)\n\t\tif (content && fromState === 'expanded' && toState === 'minimized') {\n\t\t\t// Fade out content before minimizing - MUST await this before removing from DOM\n\t\t\tanimations.content = content.animate(\n\t\t\t\t[\n\t\t\t\t\t{ opacity: 1, transform: 'translateY(0)' },\n\t\t\t\t\t{ opacity: 0, transform: 'translateY(-8px)' },\n\t\t\t\t],\n\t\t\t\t{\n\t\t\t\t\tduration: 150,\n\t\t\t\t\teasing: config.easing.standard,\n\t\t\t\t\tfill: 'forwards',\n\t\t\t\t},\n\t\t\t)\n\t\t} else if (content && toState === 'expanded') {\n\t\t\t// Fade in content when expanding\n\t\t\tcontent.animate(\n\t\t\t\t[\n\t\t\t\t\t{ opacity: 0, transform: 'translateY(8px)' },\n\t\t\t\t\t{ opacity: 1, transform: 'translateY(0)' },\n\t\t\t\t],\n\t\t\t\t{\n\t\t\t\t\tduration: config.durations.content,\n\t\t\t\t\teasing: config.easing.standard,\n\t\t\t\t\tfill: 'forwards',\n\t\t\t\t},\n\t\t\t)\n\t\t}\n\n\t\t// Icon rotation animation\n\t\tif (icon) {\n\t\t\tconst isExpanding = toState === 'expanded'\n\t\t\tconst isCollapsing = fromState === 'expanded' && toState === 'minimized'\n\n\t\t\tif (isExpanding || isCollapsing) {\n\t\t\t\ticon.animate(\n\t\t\t\t\t[\n\t\t\t\t\t\t{ transform: isExpanding ? 'rotate(0deg)' : 'rotate(180deg)' },\n\t\t\t\t\t\t{ transform: isExpanding ? 'rotate(180deg)' : 'rotate(0deg)' },\n\t\t\t\t\t],\n\t\t\t\t\t{\n\t\t\t\t\t\tduration: 250,\n\t\t\t\t\t\teasing: config.easing.emphasized,\n\t\t\t\t\t\tfill: 'forwards',\n\t\t\t\t\t},\n\t\t\t\t)\n\t\t\t}\n\t\t}\n\n\t\treturn animations\n\t}\n\n\t// Get styles for a specific state\n\tprivate getStyleForState(state: BoatState): Keyframe {\n\t\tconst { shadows } = this.ANIMATION_CONFIG\n\t\tconst baseStyles = {\n\t\t\tmaxWidth: 'fit',\n\t\t\tmaxHeight: 'auto',\n\t\t\tborderRadius: '16px',\n\t\t}\n\n\t\tconst stateStyles: Record<BoatState, Keyframe> = {\n\t\t\thidden: {\n\t\t\t\t...baseStyles,\n\t\t\t\topacity: '0',\n\t\t\t\tpointerEvents: 'none',\n\t\t\t\tboxShadow: 'none',\n\t\t\t\tbackdropFilter: 'none',\n\t\t\t},\n\t\t\tminimized: {\n\t\t\t\t...baseStyles,\n\t\t\t\topacity: '1',\n\t\t\t\tpointerEvents: 'auto',\n\t\t\t\tboxShadow: this.isLowered ? shadows.fabLowered : shadows.fab,\n\t\t\t\tbackdropFilter: 'none',\n\t\t\t},\n\t\t\texpanded: {\n\t\t\t\topacity: '1',\n\t\t\t\tpointerEvents: 'auto',\n\t\t\t\twidth: this.getResponsiveWidth(),\n\t\t\t\tmaxWidth: '100%',\n\t\t\t\tmaxHeight: '80vh',\n\t\t\t\tboxShadow: shadows.expanded,\n\t\t\t\tborderRadius: '8px 8px 0 0',\n\t\t\t\tbackdropFilter: 'blur(12px)',\n\t\t\t},\n\t\t}\n\n\t\treturn stateStyles[state] as Keyframe\n\t}\n\n\t// Calculate responsive width based on viewport\n\tprivate getResponsiveWidth(): string {\n\t\tif (typeof window === 'undefined') return '40vw'\n\n\t\tconst vw = window.innerWidth\n\t\tif (vw < 768) return 'calc(100vw - 32px)'\n\t\tif (vw < 1024) return '70vw'\n\t\tif (vw < 1280) return '60vw'\n\t\treturn '40vw'\n\t}\n\n\t// Update expanded width on window resize\n\tprivate updateExpandedWidth() {\n\t\tconst container = this.containerRef.value\n\t\tif (container && this.currentState === 'expanded') {\n\t\t\tcontainer.style.width = this.getResponsiveWidth()\n\t\t}\n\t}\n\n\tfirstUpdated() {\n\t\tthis.applyInitialStyles()\n\t\tthis.updateContainerPosition()\n\n\t\t// Wait for container to have actual dimensions before validation\n\t\t// Uses pattern from animated-text.ts - poll until dimensions are ready\n\t\tconst container = this.containerRef.value\n\t\tif (container) {\n\t\t\tinterval(10)\n\t\t\t\t.pipe(\n\t\t\t\t\tstartWith(true),\n\t\t\t\t\tfilter(() => {\n\t\t\t\t\t\tconst rect = container.getBoundingClientRect()\n\t\t\t\t\t\treturn rect.width > 0 && rect.height > 0\n\t\t\t\t\t}),\n\t\t\t\t\ttake(1),\n\t\t\t\t\ttakeUntil(this.disconnecting),\n\t\t\t\t)\n\t\t\t\t.subscribe(() => {\n\t\t\t\t\t// Validate and snap to viewport if needed\n\t\t\t\t\tconst rect = container.getBoundingClientRect()\n\t\t\t\t\tconst vw = window.innerWidth\n\t\t\t\t\tconst vh = window.innerHeight\n\n\t\t\t\t\t// Calculate actual position based on anchor\n\t\t\t\t\tconst actualLeft = this.anchor.includes('right') ? vw - this.position.x - rect.width : this.position.x\n\n\t\t\t\t\tconst actualTop = this.anchor.includes('bottom') ? vh - this.position.y - rect.height : this.position.y\n\n\t\t\t\t\t// Check if boat is outside viewport bounds\n\t\t\t\t\tlet needsUpdate = false\n\t\t\t\t\tlet newLeft = actualLeft\n\t\t\t\t\tlet newTop = actualTop\n\n\t\t\t\t\t// Snap to viewport edges if outside (16px padding)\n\t\t\t\t\tif (actualLeft < 0) {\n\t\t\t\t\t\tnewLeft = 16\n\t\t\t\t\t\tneedsUpdate = true\n\t\t\t\t\t}\n\t\t\t\t\tif (actualLeft + rect.width > vw) {\n\t\t\t\t\t\tnewLeft = vw - rect.width - 16\n\t\t\t\t\t\tneedsUpdate = true\n\t\t\t\t\t}\n\t\t\t\t\tif (actualTop < 0) {\n\t\t\t\t\t\tnewTop = 16\n\t\t\t\t\t\tneedsUpdate = true\n\t\t\t\t\t}\n\t\t\t\t\tif (actualTop + rect.height > vh) {\n\t\t\t\t\t\tnewTop = vh - rect.height - 16\n\t\t\t\t\t\tneedsUpdate = true\n\t\t\t\t\t}\n\n\t\t\t\t\t// Update position if boat was outside viewport\n\t\t\t\t\tif (needsUpdate) {\n\t\t\t\t\t\t// Convert back to anchor-relative coordinates\n\t\t\t\t\t\tthis.position.x = this.anchor.includes('right') ? vw - newLeft - rect.width : newLeft\n\n\t\t\t\t\t\tthis.position.y = this.anchor.includes('bottom') ? vh - newTop - rect.height : newTop\n\n\t\t\t\t\t\t// Ensure position is never negative\n\t\t\t\t\t\tthis.position.x = Math.max(0, this.position.x)\n\t\t\t\t\t\tthis.position.y = Math.max(0, this.position.y)\n\n\t\t\t\t\t\tthis.updateContainerPosition()\n\t\t\t\t\t\tthis.savePosition()\n\t\t\t\t\t\tconsole.log(`✨ Boat \"${this.id}\" snapped to viewport edge:`, this.position, this.anchor)\n\t\t\t\t\t}\n\t\t\t\t})\n\t\t}\n\n\t\tthis.setupDragPipeline()\n\n\t\t// Check for deprecated header slot usage\n\t\tconst hasHeaderSlot = this.querySelector('[slot=\"header\"]')\n\t\tif (hasHeaderSlot && !this.icon && !this.label) {\n\t\t\tconsole.warn(\n\t\t\t\t'[schmancy-boat] Using slot=\"header\" is deprecated. ' +\n\t\t\t\t\t'Please use the icon, label, and badge properties instead. ' +\n\t\t\t\t\t'Example: <schmancy-boat icon=\"info\" label=\"Title\" badge=\"5\">',\n\t\t\t)\n\t\t}\n\t}\n\n\t// Apply initial styles to elements\n\tprivate applyInitialStyles() {\n\t\tconst container = this.containerRef.value\n\t\tconst content = this.contentRef.value\n\t\tconst icon = this.iconRef.value\n\n\t\tif (container) {\n\t\t\tconst initialStyle = this.getStyleForState(this.currentState)\n\t\t\tObject.assign(container.style, initialStyle)\n\n\t\t\t// Safari compatibility for backdrop filter\n\t\t\tif ('webkitBackdropFilter' in container.style) {\n\t\t\t\t;(container.style as any).webkitBackdropFilter = initialStyle.backdropFilter\n\t\t\t}\n\t\t}\n\n\t\t// Set initial content opacity\n\t\tif (content) {\n\t\t\tcontent.style.opacity = this.isContentVisible ? '1' : '0'\n\t\t}\n\n\t\t// Set initial icon rotation\n\t\tif (icon && this.currentState === 'expanded') {\n\t\t\ticon.style.transform = 'rotate(180deg)'\n\t\t}\n\t}\n\n\t// Public method to toggle between minimized and expanded\n\ttoggleState() {\n\t\tconst newState = this.currentState === 'minimized' ? 'expanded' : 'minimized'\n\t\tthis.animateToState(newState)\n\t}\n\n\t// Public method to close (hide) the boat\n\tclose() {\n\t\tthis.animateToState('hidden')\n\t}\n\n\tprivate closeAndAddToNav() {\n\t\trace(\n\t\t\tthis.discover<any>('schmancy-navigation-rail'),\n\t\t\tthis.discover<any>('schmancy-navigation-bar'),\n\t\t\tthis.discover<any>('schmancy-nav-drawer'),\n\t\t\tthis.discover<any>('app-navigation-rail'),\n\t\t\tthis.discover<any>('app-navigation-bar'),\n\t\t\tthis.discover<any>('app-nav-drawer'),\n\t\t)\n\t\t\t.pipe(\n\t\t\t\ttake(1),\n\t\t\t\ttap(navComponent => {\n\t\t\t\t\tif (navComponent && typeof navComponent.addBoatItem === 'function') {\n\t\t\t\t\t\t// Use properties first, fall back to slot parsing\n\t\t\t\t\t\tconst icon =\n\t\t\t\t\t\t\tthis.icon ||\n\t\t\t\t\t\t\t(() => {\n\t\t\t\t\t\t\t\tconst headerSlot = this.querySelector('[slot=\"header\"]')\n\t\t\t\t\t\t\t\tconst iconElement = headerSlot?.querySelector('schmancy-icon')\n\t\t\t\t\t\t\t\treturn iconElement?.textContent?.trim() || 'widgets'\n\t\t\t\t\t\t\t})()\n\n\t\t\t\t\t\tconst label =\n\t\t\t\t\t\t\tthis.label ||\n\t\t\t\t\t\t\t(() => {\n\t\t\t\t\t\t\t\tconst headerSlot = this.querySelector('[slot=\"header\"]')\n\t\t\t\t\t\t\t\tlet title = headerSlot?.textContent?.trim() || 'Boat'\n\t\t\t\t\t\t\t\tif (icon && title.includes(icon)) {\n\t\t\t\t\t\t\t\t\ttitle = title.replace(icon, '').trim()\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\treturn title || this.id\n\t\t\t\t\t\t\t})()\n\n\t\t\t\t\t\t// Add the boat to navigation\n\t\t\t\t\t\tconst navItem = navComponent.addBoatItem({\n\t\t\t\t\t\t\tid: `boat-${this.id}`,\n\t\t\t\t\t\t\ttitle: label,\n\t\t\t\t\t\t\ticon: icon,\n\t\t\t\t\t\t})\n\n\t\t\t\t\t\tif (navItem) {\n\t\t\t\t\t\t\t// Simple fade out then hide\n\t\t\t\t\t\t\tconst container = this.containerRef.value\n\t\t\t\t\t\t\tif (container) {\n\t\t\t\t\t\t\t\tcontainer\n\t\t\t\t\t\t\t\t\t.animate([{ opacity: 1 }, { opacity: 0 }], { duration: 150, easing: 'ease-out', fill: 'forwards' })\n\t\t\t\t\t\t\t\t\t.finished.then(() => {\n\t\t\t\t\t\t\t\t\t\tthis.currentState = 'hidden'\n\t\t\t\t\t\t\t\t\t\tthis.isContentVisible = false\n\t\t\t\t\t\t\t\t\t})\n\t\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\t\tthis.currentState = 'hidden'\n\t\t\t\t\t\t\t\tthis.isContentVisible = false\n\t\t\t\t\t\t\t}\n\n\t\t\t\t\t\t\t// Set up click listener to reopen - using RxJS pattern\n\t\t\t\t\t\t\tfromEvent(navItem, 'click')\n\t\t\t\t\t\t\t\t.pipe(\n\t\t\t\t\t\t\t\t\ttap(() => (this.state = 'expanded')),\n\t\t\t\t\t\t\t\t\ttakeUntil(this.disconnecting),\n\t\t\t\t\t\t\t\t)\n\t\t\t\t\t\t\t\t.subscribe()\n\t\t\t\t\t\t}\n\t\t\t\t\t} else {\n\t\t\t\t\t\t// No nav component found, just hide\n\t\t\t\t\t\tthis.close()\n\t\t\t\t\t}\n\t\t\t\t}),\n\t\t\t)\n\t\t\t.subscribe()\n\t}\n\n\tprivate calculateDragPosition(\n\t\tclientX: number,\n\t\tclientY: number,\n\t\toffsetX: number,\n\t\toffsetY: number,\n\t\tinitialRect: DOMRect,\n\t): Position {\n\t\tconst targetLeft = clientX - offsetX\n\t\tconst targetTop = clientY - offsetY\n\t\tconst vw = window.innerWidth\n\t\tconst vh = window.innerHeight\n\t\tconst clampedLeft = Math.max(0, Math.min(targetLeft, vw - initialRect.width))\n\t\tconst clampedTop = Math.max(0, Math.min(targetTop, vh - initialRect.height))\n\n\t\tconst newX = this.anchor.includes('right') ? vw - (clampedLeft + initialRect.width) : clampedLeft\n\n\t\tconst newY = this.anchor.includes('bottom') ? vh - (clampedTop + initialRect.height) : clampedTop\n\n\t\treturn { x: Math.max(0, newX), y: Math.max(0, newY) }\n\t}\n\n\tprivate savePosition() {\n\t\tif (typeof window === 'undefined') return\n\n\t\tconst toSave: SavedPosition = {\n\t\t\tx: this.position.x,\n\t\t\ty: this.position.y,\n\t\t\tanchor: this.anchor,\n\t\t}\n\t\tconst key = `schmancy-boat-${this.id}`\n\t\tlocalStorage.setItem(key, JSON.stringify(toSave))\n\t\tconsole.log('💾 Saved position:', key, toSave)\n\t}\n\n\tprivate setupDragPipeline() {\n\t\tif (typeof window === 'undefined') return\n\n\t\tconst header = this.headerRef.value\n\t\tconst container = this.containerRef.value\n\t\tif (!header || !container) return\n\n\t\tlet hasDragged = false\n\t\tconst DRAG_THRESHOLD = 5\n\n\t\t// Merge mouse and touch start events\n\t\tmerge(\n\t\t\tfromEvent<MouseEvent>(header, 'mousedown').pipe(\n\t\t\t\tfilter(e => e.button === 0),\n\t\t\t\ttap(e => {\n\t\t\t\t\te.preventDefault()\n\t\t\t\t\te.stopPropagation()\n\t\t\t\t}),\n\t\t\t\tmap(e => ({\n\t\t\t\t\tclientX: e.clientX,\n\t\t\t\t\tclientY: e.clientY,\n\t\t\t\t\ttype: 'mouse' as const,\n\t\t\t\t})),\n\t\t\t),\n\t\t\tfromEvent<TouchEvent>(header, 'touchstart').pipe(\n\t\t\t\tmap(e => ({\n\t\t\t\t\tclientX: e.touches[0].clientX,\n\t\t\t\t\tclientY: e.touches[0].clientY,\n\t\t\t\t\ttype: 'touch' as const,\n\t\t\t\t})),\n\t\t\t),\n\t\t)\n\t\t\t.pipe(\n\t\t\t\tmap(({ clientX, clientY, type }) => {\n\t\t\t\t\tconst rect = container.getBoundingClientRect()\n\t\t\t\t\thasDragged = false\n\t\t\t\t\treturn {\n\t\t\t\t\t\tstartX: clientX,\n\t\t\t\t\t\tstartY: clientY,\n\t\t\t\t\t\toffsetX: clientX - rect.left,\n\t\t\t\t\t\toffsetY: clientY - rect.top,\n\t\t\t\t\t\tinitialRect: rect,\n\t\t\t\t\t\ttype,\n\t\t\t\t\t}\n\t\t\t\t}),\n\t\t\t)\n\t\t\t.pipe(\n\t\t\t\tswitchMap(({ startX, startY, offsetX, offsetY, initialRect, type }) => {\n\t\t\t\t\tconst move$ =\n\t\t\t\t\t\ttype === 'mouse'\n\t\t\t\t\t\t\t? fromEvent<MouseEvent>(window, 'mousemove').pipe(map(e => ({ clientX: e.clientX, clientY: e.clientY })))\n\t\t\t\t\t\t\t: fromEvent<TouchEvent>(window, 'touchmove').pipe(\n\t\t\t\t\t\t\t\t\tmap(e => ({ clientX: e.touches[0].clientX, clientY: e.touches[0].clientY })),\n\t\t\t\t\t\t\t\t)\n\n\t\t\t\t\tconst end$ = type === 'mouse' ? fromEvent(window, 'mouseup') : fromEvent(window, 'touchend')\n\n\t\t\t\t\treturn move$.pipe(\n\t\t\t\t\t\tmap(({ clientX, clientY }) => {\n\t\t\t\t\t\t\tconst deltaX = clientX - startX\n\t\t\t\t\t\t\tconst deltaY = clientY - startY\n\t\t\t\t\t\t\tconst distance = Math.sqrt(deltaX * deltaX + deltaY * deltaY)\n\n\t\t\t\t\t\t\tif (distance > DRAG_THRESHOLD && !hasDragged) {\n\t\t\t\t\t\t\t\thasDragged = true\n\t\t\t\t\t\t\t\tthis.isDragging = true\n\t\t\t\t\t\t\t}\n\n\t\t\t\t\t\t\tif (!hasDragged) return null\n\n\t\t\t\t\t\t\treturn this.calculateDragPosition(clientX, clientY, offsetX, offsetY, initialRect)\n\t\t\t\t\t\t}),\n\t\t\t\t\t\tfilter(position => position !== null),\n\t\t\t\t\t\ttap(position => {\n\t\t\t\t\t\t\tif (position) {\n\t\t\t\t\t\t\t\tthis.position = position\n\t\t\t\t\t\t\t\tthis.updateContainerPosition()\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}),\n\t\t\t\t\t\ttakeUntil(end$),\n\t\t\t\t\t)\n\t\t\t\t}),\n\t\t\t\tfinalize(() => {\n\t\t\t\t\tif (hasDragged) {\n\t\t\t\t\t\tthis.updateAnchor()\n\t\t\t\t\t\tthis.savePosition()\n\t\t\t\t\t} else {\n\t\t\t\t\t\tthis.toggleState()\n\t\t\t\t\t}\n\t\t\t\t\tthis.isDragging = false\n\t\t\t\t\thasDragged = false\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\t// Update container position based on anchor and position values\n\tprivate updateContainerPosition() {\n\t\tconst container = this.containerRef.value\n\t\tif (!container) return\n\n\t\t// Reset all position styles\n\t\tcontainer.style.removeProperty('left')\n\t\tcontainer.style.removeProperty('right')\n\t\tcontainer.style.removeProperty('top')\n\t\tcontainer.style.removeProperty('bottom')\n\n\t\t// Apply new position based on anchor\n\t\tif (this.anchor.includes('right')) {\n\t\t\tcontainer.style.right = `${this.position.x}px`\n\t\t} else {\n\t\t\tcontainer.style.left = `${this.position.x}px`\n\t\t}\n\n\t\tif (this.anchor.includes('bottom')) {\n\t\t\tcontainer.style.bottom = `${this.position.y}px`\n\t\t} else {\n\t\t\tcontainer.style.top = `${this.position.y}px`\n\t\t}\n\t}\n\n\t// Update anchor based on current position\n\tprivate updateAnchor() {\n\t\tif (typeof window === 'undefined') return\n\n\t\tconst container = this.containerRef.value\n\t\tif (!container) return\n\n\t\tconst rect = container.getBoundingClientRect()\n\t\tconst vw = window.innerWidth\n\t\tconst vh = window.innerHeight\n\n\t\tconst isRight = rect.left > vw / 2\n\t\tconst isBottom = rect.top > vh / 2\n\n\t\tconst newAnchor = `${isBottom ? 'bottom' : 'top'}-${isRight ? 'right' : 'left'}` as typeof this.anchor\n\n\t\tif (newAnchor !== this.anchor) {\n\t\t\t// Calculate new position values for the new anchor\n\t\t\tif (isRight) {\n\t\t\t\tthis.position.x = vw - rect.right\n\t\t\t} else {\n\t\t\t\tthis.position.x = rect.left\n\t\t\t}\n\n\t\t\tif (isBottom) {\n\t\t\t\tthis.position.y = vh - rect.bottom\n\t\t\t} else {\n\t\t\t\tthis.position.y = rect.top\n\t\t\t}\n\n\t\t\tthis.anchor = newAnchor\n\t\t}\n\t}\n\n\t// Cleanup on component disconnect\n\tdisconnectedCallback() {\n\t\tsuper.disconnectedCallback()\n\t\tthis.currentAnimation?.cancel()\n\t}\n\n\tprotected render(): unknown {\n\t\tconst surfaceElevation = this.currentState === 'minimized' ? (this.isLowered ? '1' : '3') : '4'\n\t\tconst isMinimized = this.currentState === 'minimized'\n\n\t\t// Set transform origin based on anchor for proper expansion\n\t\tconst transformOrigin = this.anchor.includes('bottom')\n\t\t\t? this.anchor.includes('right')\n\t\t\t\t? 'bottom right'\n\t\t\t\t: 'bottom left'\n\t\t\t: this.anchor.includes('right')\n\t\t\t\t? 'top right'\n\t\t\t\t: 'top left'\n\n\t\tconst containerClasses = {\n\t\t\tfixed: true,\n\t\t\t'overflow-y-auto': true,\n\t\t\tflex: true,\n\t\t\t'flex-col': true,\n\t\t\t'select-none': true,\n\t\t\t'will-change-transform': true,\n\t\t\t'[contain:layout_style]': true,\n\t\t\t'[transform:translate3d(0,0,0)]': true,\n\t\t\t'[backface-visibility:hidden]': true,\n\t\t\t'transition-shadow': true,\n\t\t\t'opacity-95': this.isDragging,\n\t\t\t'shadow-[0_24px_48px_-8px_rgba(0,0,0,0.2),0_12px_24px_-4px_rgba(0,0,0,0.12)]': this.isDragging,\n\t\t}\n\n\t\treturn html`\n\t\t\t<div\n\t\t\t\tclass=${this.classMap(containerClasses)}\n\t\t\t\tstyle=\"transform-origin: ${transformOrigin}\"\n\t\t\t\t${ref(this.containerRef)}\n\t\t\t>\n\t\t\t\t<!-- Header section -->\n\t\t\t\t<section class=\"sticky top-0 z-100\">\n\t\t\t\t\t<schmancy-surface\n\t\t\t\t\t\televation=\"${surfaceElevation}\"\n\t\t\t\t\t\trounded=\"${isMinimized ? 'none' : 'top'}\"\n\t\t\t\t\t\ttype=\"containerLowest\"\n\t\t\t\t\t>\n\t\t\t\t\t\t<div\n\t\t\t\t\t\t\tclass=\"group sticky top-0 px-3 py-2 flex items-center justify-between gap-3 ${this.isDragging\n\t\t\t\t\t\t\t\t? 'cursor-grabbing'\n\t\t\t\t\t\t\t\t: 'cursor-move'}\"\n\t\t\t\t\t\t\t${ref(this.headerRef)}\n\t\t\t\t\t\t\ttitle=\"Drag to move, double-click to toggle\"\n\t\t\t\t\t\t\t@dblclick=${(e: Event) => {\n\t\t\t\t\t\t\t\te.preventDefault()\n\t\t\t\t\t\t\t\te.stopPropagation()\n\t\t\t\t\t\t\t\tthis.toggleState()\n\t\t\t\t\t\t\t}}\n\t\t\t\t\t\t>\n\t\t\t\t\t\t\t<!-- Drag handle indicator -->\n\t\t\t\t\t\t\t<div\n\t\t\t\t\t\t\t\tclass=\"flex items-center text-surface-onVariant opacity-40 transition-opacity duration-200 group-hover:opacity-100\"\n\t\t\t\t\t\t\t>\n\t\t\t\t\t\t\t\t<schmancy-icon style=\"font-size: 20px\">drag_indicator</schmancy-icon>\n\t\t\t\t\t\t\t</div>\n\n\t\t\t\t\t\t\t<!-- Header content - use properties if provided, else fallback to slot -->\n\t\t\t\t\t\t\t<div\n\t\t\t\t\t\t\t\tclass=\"flex-1 min-w-fit items-center flex justify-start ${isMinimized ? 'cursor-pointer' : ''}\"\n\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t@dblclick=${(e: Event) => {\n\t\t\t\t\t\t\t\t\tif (isMinimized) {\n\t\t\t\t\t\t\t\t\t\te.preventDefault()\n\t\t\t\t\t\t\t\t\t\te.stopPropagation()\n\t\t\t\t\t\t\t\t\t\tthis.state = 'expanded'\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\ttitle=\"${isMinimized ? 'Click to expand' : ''}\"\n\t\t\t\t\t\t\t>\n\t\t\t\t\t\t\t\t${this.icon || this.label\n\t\t\t\t\t\t\t\t\t? html`\n\t\t\t\t\t\t\t\t\t\t\t<div\n\t\t\t\t\t\t\t\t\t\t\tclass=\"flex gap-2 items-center\">\n\t\t\t\t\t\t\t\t\t\t\t\t${this.icon ? html`<schmancy-icon>${this.icon}</schmancy-icon>` : ''}\n\t\t\t\t\t\t\t\t\t\t\t\t${this.label\n\t\t\t\t\t\t\t\t\t\t\t\t\t? html`<schmancy-typography type=\"title\" token=\"md\">${this.label}</schmancy-typography>`\n\t\t\t\t\t\t\t\t\t\t\t\t\t: ''}\n\t\t\t\t\t\t\t\t\t\t\t\t${this.badge !== undefined && this.badge !== null && this.badge !== ''\n\t\t\t\t\t\t\t\t\t\t\t\t\t? html`<schmancy-badge>${this.badge}</schmancy-badge>`\n\t\t\t\t\t\t\t\t\t\t\t\t\t: ''}\n\t\t\t\t\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t\t\t\t\t`\n\t\t\t\t\t\t\t\t\t: html`<slot name=\"header\"></slot>`}\n\t\t\t\t\t\t\t</div>\n\n\t\t\t\t\t\t\t<!-- Control buttons -->\n\t\t\t\t\t\t\t<div class=\"flex items-center gap-1 shrink-0\">\n\t\t\t\t\t\t\t\t${isMinimized\n\t\t\t\t\t\t\t\t\t? html`\n\t\t\t\t\t\t\t\t\t\t\t<!-- Expand button (when minimized) -->\n\t\t\t\t\t\t\t\t\t\t\t<schmancy-icon-button\n\t\t\t\t\t\t\t\t\t\t\t\tsize=\"sm\"\n\t\t\t\t\t\t\t\t\t\t\t\tvariant=\"text\"\n\t\t\t\t\t\t\t\t\t\t\t\t@click=${(e: Event) => {\n\t\t\t\t\t\t\t\t\t\t\t\t\te.stopPropagation()\n\t\t\t\t\t\t\t\t\t\t\t\t\tthis.state = 'expanded'\n\t\t\t\t\t\t\t\t\t\t\t\t}}\n\t\t\t\t\t\t\t\t\t\t\t\ttitle=\"Expand\"\n\t\t\t\t\t\t\t\t\t\t\t\t${ref(this.iconRef)}\n\t\t\t\t\t\t\t\t\t\t\t>\n\t\t\t\t\t\t\t\t\t\t\t\tfullscreen\n\t\t\t\t\t\t\t\t\t\t\t</schmancy-icon-button>\n\t\t\t\t\t\t\t\t\t\t`\n\t\t\t\t\t\t\t\t\t: html`\n\t\t\t\t\t\t\t\t\t\t\t<!-- Minimize button (when expanded) -->\n\t\t\t\t\t\t\t\t\t\t\t<schmancy-icon-button\n\t\t\t\t\t\t\t\t\t\t\t\tsize=\"sm\"\n\t\t\t\t\t\t\t\t\t\t\t\tvariant=\"filled tonal\"\n\t\t\t\t\t\t\t\t\t\t\t\t@click=${(e: Event) => {\n\t\t\t\t\t\t\t\t\t\t\t\t\te.stopPropagation()\n\t\t\t\t\t\t\t\t\t\t\t\t\tthis.state = 'minimized'\n\t\t\t\t\t\t\t\t\t\t\t\t}}\n\t\t\t\t\t\t\t\t\t\t\t\ttitle=\"Minimize\"\n\t\t\t\t\t\t\t\t\t\t\t\t${ref(this.iconRef)}\n\t\t\t\t\t\t\t\t\t\t\t>\n\t\t\t\t\t\t\t\t\t\t\t\tclose_fullscreen\n\t\t\t\t\t\t\t\t\t\t\t</schmancy-icon-button>\n\t\t\t\t\t\t\t\t\t\t`}\n\n\t\t\t\t\t\t\t\t<!-- Close button -->\n\t\t\t\t\t\t\t\t<schmancy-icon-button\n\t\t\t\t\t\t\t\t\tsize=\"sm\"\n\t\t\t\t\t\t\t\t\t@click=${(e: Event) => {\n\t\t\t\t\t\t\t\t\t\te.stopPropagation()\n\t\t\t\t\t\t\t\t\t\tthis.closeAndAddToNav()\n\t\t\t\t\t\t\t\t\t}}\n\t\t\t\t\t\t\t\t\ttitle=\"Close and add to navigation\"\n\t\t\t\t\t\t\t\t>\n\t\t\t\t\t\t\t\t\tremove\n\t\t\t\t\t\t\t\t</schmancy-icon-button>\n\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t</div>\n\t\t\t\t\t</schmancy-surface>\n\t\t\t\t</section>\n\n\t\t\t\t<!-- Content section -->\n\t\t\t\t${cache(\n\t\t\t\t\tthis.isContentVisible\n\t\t\t\t\t\t? html`\n\t\t\t\t\t\t\t\t<schmancy-surface type=\"containerLow\" class=\"flex-1\" ${ref(this.contentRef)}>\n\t\t\t\t\t\t\t\t\t<slot></slot>\n\t\t\t\t\t\t\t\t</schmancy-surface>\n\t\t\t\t\t\t `\n\t\t\t\t\t\t: html``,\n\t\t\t\t)}\n\t\t\t</div>\n\t\t`\n\t}\n}\n\ndeclare global {\n\tinterface HTMLElementTagNameMap {\n\t\t'schmancy-boat': SchmancyBoat\n\t}\n}\n"],"names":["SchmancyBoat","$LitElement","css","constructor","super","arguments","this","id","containerRef","createRef","contentRef","iconRef","headerRef","ANIMATION_CONFIG","durations","expand","minimize","hide","content","easing","emphasized","decelerate","accelerate","standard","shadows","fab","fabLowered","expanded","currentState","isContentVisible","isAnimating","isLowered","isDragging","position","x","y","anchor","state","value","animateToState","lowered","requestUpdate","connectedCallback","window","fromEvent","pipe","takeUntil","disconnecting","subscribe","updateExpandedWidth","container","rect","getBoundingClientRect","width","height","vw","innerWidth","vh","innerHeight","actualLeft","includes","actualTop","needsUpdate","newLeft","newTop","Math","max","updateContainerPosition","savePosition","filter","e","key","tap","preventDefault","toggleState","close","targetState","previousState","performTransition","dispatchEvent","CustomEvent","detail","bubbles","composed","err","fromState","toState","currentAnimation","cancel","updateComplete","animations","createAnimations","finished","icon","config","fromStyles","getStyleForState","toStyles","animate","duration","fill","opacity","transform","isExpanding","baseStyles","maxWidth","maxHeight","borderRadius","hidden","pointerEvents","boxShadow","backdropFilter","minimized","getResponsiveWidth","style","firstUpdated","applyInitialStyles","interval","startWith","take","setupDragPipeline","querySelector","label","initialStyle","Object","assign","webkitBackdropFilter","newState","closeAndAddToNav","race","discover","navComponent","addBoatItem","textContent","trim","title","replace","navItem","then","clientX","clientY","offsetX","offsetY","initialRect","targetLeft","targetTop","clampedLeft","min","clampedTop","newX","newY","toSave","localStorage","setItem","JSON","stringify","header","hasDragged","merge","button","stopPropagation","map","type","touches","startX","startY","left","top","switchMap","move$","end$","deltaX","deltaY","sqrt","calculateDragPosition","finalize","updateAnchor","removeProperty","right","bottom","isRight","isBottom","newAnchor","disconnectedCallback","surfaceElevation","isMinimized","transformOrigin","containerClasses","fixed","flex","html","classMap","ref","badge","cache","__decorateClass","property","String","reflect","prototype","Boolean","customElement"],"mappings":"yiBAsBqBA,QAAAA,aAArB,cAA0CC,EAAAA,YAAYC,EAAAA;AAAAA;AAAAA;AAAAA;AAAAA;AAAAA;AAAAA,GAAtD,aAAAC,CAAAC,MAAAA,GAAAC,SAAAA,EAgB6BC,KAAAC,GAAa,UAiBzCD,KAAQE,aAAoCC,cAC5CH,KAAQI,WAA+BD,cACvCH,KAAQK,QAA4BF,cACpCH,KAAQM,UAA8BH,cAMtCH,KAAiBO,iBAAmB,CACnCC,UAAW,CACVC,OAAQ,IACRC,SAAU,IACVC,KAAM,IACNC,QAAS,GAAA,EAEVC,OAAQ,CACPC,WAAY,iCACZC,WAAY,oCACZC,WAAY,oCACZC,SAAU,gCAAA,EAEXC,QAAS,CACRC,IAAK,kHACLC,WACC,gHACDC,SAAU,2EAAA,CAAA,EAKHrB,KAAQsB,aAA0B,YAClCtB,KAAQuB,iBAAAA,GACRvB,KAAQwB,YAAAA,GACRxB,KAAQyB,UAAAA,GACRzB,KAAQ0B,WAAAA,GACR1B,KAAQ2B,SAAqB,CAAEC,EAAG,GAAIC,EAAG,EAAA,EACzC7B,KAAQ8B,OAAoE,cAAA,CA9DrF,IAAA,OAAIC,CACH,OAAO/B,KAAKsB,YAAA,CAEb,IAAA,MAAUU,EAAAA,CACLhC,KAAKwB,aAAeQ,IAAUhC,KAAKsB,cACvCtB,KAAKiC,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Event as m, interval as P, race as A, merge as M } from "rxjs";
|
|
2
|
+
import { takeUntil as y, filter as R, tap as w, startWith as D, take as z, map as x, switchMap as Y, finalize as I } from "rxjs/operators";
|
|
3
|
+
import "lit/directives/class-map.js";
|
|
4
|
+
import "lit/directives/style-map.js";
|
|
5
|
+
import { property as b, state as f, customElement as W } from "lit/decorators.js";
|
|
6
|
+
import "./tailwind.mixin-DIW0B_of.js";
|
|
7
|
+
import { $ as X } from "./litElement.mixin-DWDPaNoc.js";
|
|
8
|
+
import { css as _, html as u } from "lit";
|
|
9
|
+
import { createRef as C, ref as v } from "lit/directives/ref.js";
|
|
10
|
+
import { cache as F } from "lit/directives/cache.js";
|
|
11
|
+
var B = Object.defineProperty, E = Object.getOwnPropertyDescriptor, l = (t, i, s, n) => {
|
|
12
|
+
for (var e, a = n > 1 ? void 0 : n ? E(i, s) : i, o = t.length - 1; o >= 0; o--) (e = t[o]) && (a = (n ? e(i, s, a) : e(a)) || a);
|
|
13
|
+
return n && a && B(i, s, a), a;
|
|
14
|
+
};
|
|
15
|
+
let d = class extends X(_`
|
|
16
|
+
:host {
|
|
17
|
+
display: contents;
|
|
18
|
+
position: relative;
|
|
19
|
+
z-index: 1000;
|
|
20
|
+
}
|
|
21
|
+
`) {
|
|
22
|
+
constructor() {
|
|
23
|
+
super(...arguments), this.id = "default", this.containerRef = C(), this.contentRef = C(), this.iconRef = C(), this.headerRef = C(), this.ANIMATION_CONFIG = { durations: { expand: 350, minimize: 250, hide: 200, content: 300 }, easing: { emphasized: "cubic-bezier(0.2, 0.0, 0, 1.0)", decelerate: "cubic-bezier(0.05, 0.7, 0.1, 1.0)", accelerate: "cubic-bezier(0.3, 0.0, 0.8, 0.15)", standard: "cubic-bezier(0.4, 0.0, 0.2, 1)" }, shadows: { fab: "0px 3px 5px -1px rgba(0, 0, 0, 0.2), 0px 6px 10px 0px rgba(0, 0, 0, 0.14), 0px 1px 18px 0px rgba(0, 0, 0, 0.12)", fabLowered: "0px 1px 3px 0px rgba(0, 0, 0, 0.2), 0px 1px 1px 0px rgba(0, 0, 0, 0.14), 0px 2px 1px -1px rgba(0, 0, 0, 0.12)", expanded: "0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 10px 10px -5px rgba(0, 0, 0, 0.04)" } }, this.currentState = "minimized", this.isContentVisible = !1, this.isAnimating = !1, this.isLowered = !1, this.isDragging = !1, this.position = { x: 16, y: 16 }, this.anchor = "bottom-right";
|
|
24
|
+
}
|
|
25
|
+
get state() {
|
|
26
|
+
return this.currentState;
|
|
27
|
+
}
|
|
28
|
+
set state(t) {
|
|
29
|
+
this.isAnimating || t === this.currentState || this.animateToState(t);
|
|
30
|
+
}
|
|
31
|
+
get lowered() {
|
|
32
|
+
return this.isLowered;
|
|
33
|
+
}
|
|
34
|
+
set lowered(t) {
|
|
35
|
+
this.isLowered = t, this.requestUpdate();
|
|
36
|
+
}
|
|
37
|
+
connectedCallback() {
|
|
38
|
+
super.connectedCallback(), typeof window < "u" && (m(window, "resize").pipe(y(this.disconnecting)).subscribe(() => {
|
|
39
|
+
this.currentState === "expanded" && this.updateExpandedWidth();
|
|
40
|
+
const t = this.containerRef.value;
|
|
41
|
+
if (t) {
|
|
42
|
+
const i = t.getBoundingClientRect();
|
|
43
|
+
if (i.width > 0 && i.height > 0) {
|
|
44
|
+
const s = window.innerWidth, n = window.innerHeight, e = this.anchor.includes("right") ? s - this.position.x - i.width : this.position.x, a = this.anchor.includes("bottom") ? n - this.position.y - i.height : this.position.y;
|
|
45
|
+
let o = !1, h = e, r = a;
|
|
46
|
+
e < 0 && (h = 16, o = !0), e + i.width > s && (h = s - i.width - 16, o = !0), a < 0 && (r = 16, o = !0), a + i.height > n && (r = n - i.height - 16, o = !0), o && (this.position.x = this.anchor.includes("right") ? s - h - i.width : h, this.position.y = this.anchor.includes("bottom") ? n - r - i.height : r, this.position.x = Math.max(0, this.position.x), this.position.y = Math.max(0, this.position.y), this.updateContainerPosition(), this.savePosition());
|
|
47
|
+
}
|
|
48
|
+
}
|
|
49
|
+
}), m(window, "keydown").pipe(R((t) => t.key === "Escape" && this.currentState !== "hidden"), w((t) => t.preventDefault()), y(this.disconnecting)).subscribe(() => {
|
|
50
|
+
this.currentState === "expanded" ? this.toggleState() : this.close();
|
|
51
|
+
}));
|
|
52
|
+
}
|
|
53
|
+
async animateToState(t) {
|
|
54
|
+
if (this.isAnimating || t === this.currentState) return;
|
|
55
|
+
const i = this.currentState;
|
|
56
|
+
this.isAnimating = !0;
|
|
57
|
+
try {
|
|
58
|
+
await this.performTransition(i, t), this.currentState = t, this.isContentVisible = t === "expanded", this.dispatchEvent(new CustomEvent("toggle", { detail: t, bubbles: !0, composed: !0 }));
|
|
59
|
+
} catch {
|
|
60
|
+
this.currentState = t, this.isContentVisible = t === "expanded";
|
|
61
|
+
} finally {
|
|
62
|
+
this.isAnimating = !1;
|
|
63
|
+
}
|
|
64
|
+
}
|
|
65
|
+
async performTransition(t, i) {
|
|
66
|
+
if (this.currentAnimation?.cancel(), !this.containerRef.value) return;
|
|
67
|
+
i === "expanded" && (this.isContentVisible = !0, await this.updateComplete);
|
|
68
|
+
const s = this.createAnimations(t, i);
|
|
69
|
+
if (s.container) if (this.currentAnimation = s.container, await s.container.finished, s.content && await s.content.finished, i !== "expanded") this.isContentVisible = !1;
|
|
70
|
+
else {
|
|
71
|
+
const n = this.containerRef.value;
|
|
72
|
+
if (n) {
|
|
73
|
+
const e = n.getBoundingClientRect();
|
|
74
|
+
if (e.width > 0 && e.height > 0) {
|
|
75
|
+
const a = window.innerWidth, o = window.innerHeight, h = this.anchor.includes("right") ? a - this.position.x - e.width : this.position.x, r = this.anchor.includes("bottom") ? o - this.position.y - e.height : this.position.y;
|
|
76
|
+
let p = !1, g = h, c = r;
|
|
77
|
+
h < 0 && (g = 16, p = !0), h + e.width > a && (g = a - e.width - 16, p = !0), r < 0 && (c = 16, p = !0), r + e.height > o && (c = o - e.height - 16, p = !0), p && (this.position.x = this.anchor.includes("right") ? a - g - e.width : g, this.position.y = this.anchor.includes("bottom") ? o - c - e.height : c, this.position.x = Math.max(0, this.position.x), this.position.y = Math.max(0, this.position.y), this.updateContainerPosition(), this.savePosition());
|
|
78
|
+
}
|
|
79
|
+
}
|
|
80
|
+
}
|
|
81
|
+
}
|
|
82
|
+
createAnimations(t, i) {
|
|
83
|
+
const s = this.containerRef.value, n = this.contentRef.value, e = this.iconRef.value, a = {};
|
|
84
|
+
if (!s) return a;
|
|
85
|
+
const o = this.ANIMATION_CONFIG, h = this.getStyleForState(t), r = this.getStyleForState(i);
|
|
86
|
+
if (a.container = i === "expanded" ? s.animate([h, r], { duration: o.durations.expand, easing: o.easing.decelerate, fill: "forwards" }) : s.animate([h, r], { duration: i === "hidden" ? o.durations.hide : o.durations.minimize, easing: o.easing.accelerate, fill: "forwards" }), n && t === "expanded" && i === "minimized" ? a.content = n.animate([{ opacity: 1, transform: "translateY(0)" }, { opacity: 0, transform: "translateY(-8px)" }], { duration: 150, easing: o.easing.standard, fill: "forwards" }) : n && i === "expanded" && n.animate([{ opacity: 0, transform: "translateY(8px)" }, { opacity: 1, transform: "translateY(0)" }], { duration: o.durations.content, easing: o.easing.standard, fill: "forwards" }), e) {
|
|
87
|
+
const p = i === "expanded";
|
|
88
|
+
(p || t === "expanded" && i === "minimized") && e.animate([{ transform: p ? "rotate(0deg)" : "rotate(180deg)" }, { transform: p ? "rotate(180deg)" : "rotate(0deg)" }], { duration: 250, easing: o.easing.emphasized, fill: "forwards" });
|
|
89
|
+
}
|
|
90
|
+
return a;
|
|
91
|
+
}
|
|
92
|
+
getStyleForState(t) {
|
|
93
|
+
const { shadows: i } = this.ANIMATION_CONFIG, s = { maxWidth: "fit", maxHeight: "auto", borderRadius: "16px" };
|
|
94
|
+
return { hidden: { ...s, opacity: "0", pointerEvents: "none", boxShadow: "none", backdropFilter: "none" }, minimized: { ...s, opacity: "1", pointerEvents: "auto", boxShadow: this.isLowered ? i.fabLowered : i.fab, backdropFilter: "none" }, expanded: { opacity: "1", pointerEvents: "auto", width: this.getResponsiveWidth(), maxWidth: "100%", maxHeight: "80vh", boxShadow: i.expanded, borderRadius: "8px 8px 0 0", backdropFilter: "blur(12px)" } }[t];
|
|
95
|
+
}
|
|
96
|
+
getResponsiveWidth() {
|
|
97
|
+
if (typeof window > "u") return "40vw";
|
|
98
|
+
const t = window.innerWidth;
|
|
99
|
+
return t < 768 ? "calc(100vw - 32px)" : t < 1024 ? "70vw" : t < 1280 ? "60vw" : "40vw";
|
|
100
|
+
}
|
|
101
|
+
updateExpandedWidth() {
|
|
102
|
+
const t = this.containerRef.value;
|
|
103
|
+
t && this.currentState === "expanded" && (t.style.width = this.getResponsiveWidth());
|
|
104
|
+
}
|
|
105
|
+
firstUpdated() {
|
|
106
|
+
this.applyInitialStyles(), this.updateContainerPosition();
|
|
107
|
+
const t = this.containerRef.value;
|
|
108
|
+
t && P(10).pipe(D(!0), R(() => {
|
|
109
|
+
const i = t.getBoundingClientRect();
|
|
110
|
+
return i.width > 0 && i.height > 0;
|
|
111
|
+
}), z(1), y(this.disconnecting)).subscribe(() => {
|
|
112
|
+
const i = t.getBoundingClientRect(), s = window.innerWidth, n = window.innerHeight, e = this.anchor.includes("right") ? s - this.position.x - i.width : this.position.x, a = this.anchor.includes("bottom") ? n - this.position.y - i.height : this.position.y;
|
|
113
|
+
let o = !1, h = e, r = a;
|
|
114
|
+
e < 0 && (h = 16, o = !0), e + i.width > s && (h = s - i.width - 16, o = !0), a < 0 && (r = 16, o = !0), a + i.height > n && (r = n - i.height - 16, o = !0), o && (this.position.x = this.anchor.includes("right") ? s - h - i.width : h, this.position.y = this.anchor.includes("bottom") ? n - r - i.height : r, this.position.x = Math.max(0, this.position.x), this.position.y = Math.max(0, this.position.y), this.updateContainerPosition(), this.savePosition());
|
|
115
|
+
}), this.setupDragPipeline(), this.querySelector('[slot="header"]') && !this.icon && this.label;
|
|
116
|
+
}
|
|
117
|
+
applyInitialStyles() {
|
|
118
|
+
const t = this.containerRef.value, i = this.contentRef.value, s = this.iconRef.value;
|
|
119
|
+
if (t) {
|
|
120
|
+
const n = this.getStyleForState(this.currentState);
|
|
121
|
+
Object.assign(t.style, n), "webkitBackdropFilter" in t.style && (t.style.webkitBackdropFilter = n.backdropFilter);
|
|
122
|
+
}
|
|
123
|
+
i && (i.style.opacity = this.isContentVisible ? "1" : "0"), s && this.currentState === "expanded" && (s.style.transform = "rotate(180deg)");
|
|
124
|
+
}
|
|
125
|
+
toggleState() {
|
|
126
|
+
const t = this.currentState === "minimized" ? "expanded" : "minimized";
|
|
127
|
+
this.animateToState(t);
|
|
128
|
+
}
|
|
129
|
+
close() {
|
|
130
|
+
this.animateToState("hidden");
|
|
131
|
+
}
|
|
132
|
+
closeAndAddToNav() {
|
|
133
|
+
A(this.discover("schmancy-navigation-rail"), this.discover("schmancy-navigation-bar"), this.discover("schmancy-nav-drawer"), this.discover("app-navigation-rail"), this.discover("app-navigation-bar"), this.discover("app-nav-drawer")).pipe(z(1), w((t) => {
|
|
134
|
+
if (t && typeof t.addBoatItem == "function") {
|
|
135
|
+
const i = this.icon || (this.querySelector('[slot="header"]')?.querySelector("schmancy-icon")?.textContent?.trim() || "widgets"), s = this.label || (() => {
|
|
136
|
+
let a = this.querySelector('[slot="header"]')?.textContent?.trim() || "Boat";
|
|
137
|
+
return a.includes(i) && (a = a.replace(i, "").trim()), a || this.id;
|
|
138
|
+
})(), n = t.addBoatItem({ id: `boat-${this.id}`, title: s, icon: i });
|
|
139
|
+
if (n) {
|
|
140
|
+
const e = this.containerRef.value;
|
|
141
|
+
e ? e.animate([{ opacity: 1 }, { opacity: 0 }], { duration: 150, easing: "ease-out", fill: "forwards" }).finished.then(() => {
|
|
142
|
+
this.currentState = "hidden", this.isContentVisible = !1;
|
|
143
|
+
}) : (this.currentState = "hidden", this.isContentVisible = !1), m(n, "click").pipe(w(() => this.state = "expanded"), y(this.disconnecting)).subscribe();
|
|
144
|
+
}
|
|
145
|
+
} else this.close();
|
|
146
|
+
})).subscribe();
|
|
147
|
+
}
|
|
148
|
+
calculateDragPosition(t, i, s, n, e) {
|
|
149
|
+
const a = t - s, o = i - n, h = window.innerWidth, r = window.innerHeight, p = Math.max(0, Math.min(a, h - e.width)), g = Math.max(0, Math.min(o, r - e.height)), c = this.anchor.includes("right") ? h - (p + e.width) : p, S = this.anchor.includes("bottom") ? r - (g + e.height) : g;
|
|
150
|
+
return { x: Math.max(0, c), y: Math.max(0, S) };
|
|
151
|
+
}
|
|
152
|
+
savePosition() {
|
|
153
|
+
if (typeof window > "u") return;
|
|
154
|
+
const t = { x: this.position.x, y: this.position.y, anchor: this.anchor }, i = `schmancy-boat-${this.id}`;
|
|
155
|
+
localStorage.setItem(i, JSON.stringify(t));
|
|
156
|
+
}
|
|
157
|
+
setupDragPipeline() {
|
|
158
|
+
if (typeof window > "u") return;
|
|
159
|
+
const t = this.headerRef.value, i = this.containerRef.value;
|
|
160
|
+
if (!t || !i) return;
|
|
161
|
+
let s = !1;
|
|
162
|
+
M(m(t, "mousedown").pipe(R((n) => n.button === 0), w((n) => {
|
|
163
|
+
n.preventDefault(), n.stopPropagation();
|
|
164
|
+
}), x((n) => ({ clientX: n.clientX, clientY: n.clientY, type: "mouse" }))), m(t, "touchstart").pipe(x((n) => ({ clientX: n.touches[0].clientX, clientY: n.touches[0].clientY, type: "touch" })))).pipe(x(({ clientX: n, clientY: e, type: a }) => {
|
|
165
|
+
const o = i.getBoundingClientRect();
|
|
166
|
+
return s = !1, { startX: n, startY: e, offsetX: n - o.left, offsetY: e - o.top, initialRect: o, type: a };
|
|
167
|
+
})).pipe(Y(({ startX: n, startY: e, offsetX: a, offsetY: o, initialRect: h, type: r }) => {
|
|
168
|
+
const p = r === "mouse" ? m(window, "mousemove").pipe(x((c) => ({ clientX: c.clientX, clientY: c.clientY }))) : m(window, "touchmove").pipe(x((c) => ({ clientX: c.touches[0].clientX, clientY: c.touches[0].clientY }))), g = m(window, r === "mouse" ? "mouseup" : "touchend");
|
|
169
|
+
return p.pipe(x(({ clientX: c, clientY: S }) => {
|
|
170
|
+
const $ = c - n, k = S - e;
|
|
171
|
+
return Math.sqrt($ * $ + k * k) > 5 && !s && (s = !0, this.isDragging = !0), s ? this.calculateDragPosition(c, S, a, o, h) : null;
|
|
172
|
+
}), R((c) => c !== null), w((c) => {
|
|
173
|
+
c && (this.position = c, this.updateContainerPosition());
|
|
174
|
+
}), y(g));
|
|
175
|
+
}), I(() => {
|
|
176
|
+
s ? (this.updateAnchor(), this.savePosition()) : this.toggleState(), this.isDragging = !1, s = !1;
|
|
177
|
+
}), y(this.disconnecting)).subscribe();
|
|
178
|
+
}
|
|
179
|
+
updateContainerPosition() {
|
|
180
|
+
const t = this.containerRef.value;
|
|
181
|
+
t && (t.style.removeProperty("left"), t.style.removeProperty("right"), t.style.removeProperty("top"), t.style.removeProperty("bottom"), this.anchor.includes("right") ? t.style.right = `${this.position.x}px` : t.style.left = `${this.position.x}px`, this.anchor.includes("bottom") ? t.style.bottom = `${this.position.y}px` : t.style.top = `${this.position.y}px`);
|
|
182
|
+
}
|
|
183
|
+
updateAnchor() {
|
|
184
|
+
if (typeof window > "u") return;
|
|
185
|
+
const t = this.containerRef.value;
|
|
186
|
+
if (!t) return;
|
|
187
|
+
const i = t.getBoundingClientRect(), s = window.innerWidth, n = window.innerHeight, e = i.left > s / 2, a = i.top > n / 2, o = `${a ? "bottom" : "top"}-${e ? "right" : "left"}`;
|
|
188
|
+
o !== this.anchor && (this.position.x = e ? s - i.right : i.left, this.position.y = a ? n - i.bottom : i.top, this.anchor = o);
|
|
189
|
+
}
|
|
190
|
+
disconnectedCallback() {
|
|
191
|
+
super.disconnectedCallback(), this.currentAnimation?.cancel();
|
|
192
|
+
}
|
|
193
|
+
render() {
|
|
194
|
+
const t = this.currentState === "minimized" ? this.isLowered ? "1" : "3" : "4", i = this.currentState === "minimized", s = this.anchor.includes("bottom") ? this.anchor.includes("right") ? "bottom right" : "bottom left" : this.anchor.includes("right") ? "top right" : "top left", n = { fixed: !0, "overflow-y-auto": !0, flex: !0, "flex-col": !0, "select-none": !0, "will-change-transform": !0, "[contain:layout_style]": !0, "[transform:translate3d(0,0,0)]": !0, "[backface-visibility:hidden]": !0, "transition-shadow": !0, "opacity-95": this.isDragging, "shadow-[0_24px_48px_-8px_rgba(0,0,0,0.2),0_12px_24px_-4px_rgba(0,0,0,0.12)]": this.isDragging };
|
|
195
|
+
return u`
|
|
196
|
+
<div
|
|
197
|
+
class=${this.classMap(n)}
|
|
198
|
+
style="transform-origin: ${s}"
|
|
199
|
+
${v(this.containerRef)}
|
|
200
|
+
>
|
|
201
|
+
<!-- Header section -->
|
|
202
|
+
<section class="sticky top-0 z-100">
|
|
203
|
+
<schmancy-surface
|
|
204
|
+
elevation="${t}"
|
|
205
|
+
rounded="${i ? "none" : "top"}"
|
|
206
|
+
type="containerLowest"
|
|
207
|
+
>
|
|
208
|
+
<div
|
|
209
|
+
class="group sticky top-0 px-3 py-2 flex items-center justify-between gap-3 ${this.isDragging ? "cursor-grabbing" : "cursor-move"}"
|
|
210
|
+
${v(this.headerRef)}
|
|
211
|
+
title="Drag to move, double-click to toggle"
|
|
212
|
+
@dblclick=${(e) => {
|
|
213
|
+
e.preventDefault(), e.stopPropagation(), this.toggleState();
|
|
214
|
+
}}
|
|
215
|
+
>
|
|
216
|
+
<!-- Drag handle indicator -->
|
|
217
|
+
<div
|
|
218
|
+
class="flex items-center text-surface-onVariant opacity-40 transition-opacity duration-200 group-hover:opacity-100"
|
|
219
|
+
>
|
|
220
|
+
<schmancy-icon style="font-size: 20px">drag_indicator</schmancy-icon>
|
|
221
|
+
</div>
|
|
222
|
+
|
|
223
|
+
<!-- Header content - use properties if provided, else fallback to slot -->
|
|
224
|
+
<div
|
|
225
|
+
class="flex-1 min-w-fit items-center flex justify-start ${i ? "cursor-pointer" : ""}"
|
|
226
|
+
|
|
227
|
+
@dblclick=${(e) => {
|
|
228
|
+
i && (e.preventDefault(), e.stopPropagation(), this.state = "expanded");
|
|
229
|
+
}}
|
|
230
|
+
title="${i ? "Click to expand" : ""}"
|
|
231
|
+
>
|
|
232
|
+
${this.icon || this.label ? u`
|
|
233
|
+
<div
|
|
234
|
+
class="flex gap-2 items-center">
|
|
235
|
+
${this.icon ? u`<schmancy-icon>${this.icon}</schmancy-icon>` : ""}
|
|
236
|
+
${this.label ? u`<schmancy-typography type="title" token="md">${this.label}</schmancy-typography>` : ""}
|
|
237
|
+
${this.badge !== void 0 && this.badge !== null && this.badge !== "" ? u`<schmancy-badge>${this.badge}</schmancy-badge>` : ""}
|
|
238
|
+
</div>
|
|
239
|
+
` : u`<slot name="header"></slot>`}
|
|
240
|
+
</div>
|
|
241
|
+
|
|
242
|
+
<!-- Control buttons -->
|
|
243
|
+
<div class="flex items-center gap-1 shrink-0">
|
|
244
|
+
${i ? u`
|
|
245
|
+
<!-- Expand button (when minimized) -->
|
|
246
|
+
<schmancy-icon-button
|
|
247
|
+
size="sm"
|
|
248
|
+
variant="text"
|
|
249
|
+
@click=${(e) => {
|
|
250
|
+
e.stopPropagation(), this.state = "expanded";
|
|
251
|
+
}}
|
|
252
|
+
title="Expand"
|
|
253
|
+
${v(this.iconRef)}
|
|
254
|
+
>
|
|
255
|
+
fullscreen
|
|
256
|
+
</schmancy-icon-button>
|
|
257
|
+
` : u`
|
|
258
|
+
<!-- Minimize button (when expanded) -->
|
|
259
|
+
<schmancy-icon-button
|
|
260
|
+
size="sm"
|
|
261
|
+
variant="filled tonal"
|
|
262
|
+
@click=${(e) => {
|
|
263
|
+
e.stopPropagation(), this.state = "minimized";
|
|
264
|
+
}}
|
|
265
|
+
title="Minimize"
|
|
266
|
+
${v(this.iconRef)}
|
|
267
|
+
>
|
|
268
|
+
close_fullscreen
|
|
269
|
+
</schmancy-icon-button>
|
|
270
|
+
`}
|
|
271
|
+
|
|
272
|
+
<!-- Close button -->
|
|
273
|
+
<schmancy-icon-button
|
|
274
|
+
size="sm"
|
|
275
|
+
@click=${(e) => {
|
|
276
|
+
e.stopPropagation(), this.closeAndAddToNav();
|
|
277
|
+
}}
|
|
278
|
+
title="Close and add to navigation"
|
|
279
|
+
>
|
|
280
|
+
remove
|
|
281
|
+
</schmancy-icon-button>
|
|
282
|
+
</div>
|
|
283
|
+
</div>
|
|
284
|
+
</schmancy-surface>
|
|
285
|
+
</section>
|
|
286
|
+
|
|
287
|
+
<!-- Content section -->
|
|
288
|
+
${F(this.isContentVisible ? u`
|
|
289
|
+
<schmancy-surface type="containerLow" class="flex-1" ${v(this.contentRef)}>
|
|
290
|
+
<slot></slot>
|
|
291
|
+
</schmancy-surface>
|
|
292
|
+
` : u``)}
|
|
293
|
+
</div>
|
|
294
|
+
`;
|
|
295
|
+
}
|
|
296
|
+
};
|
|
297
|
+
l([b({ type: String, reflect: !0 })], d.prototype, "state", 1), l([b({ type: String })], d.prototype, "id", 2), l([b({ type: Boolean, reflect: !0 })], d.prototype, "lowered", 1), l([b({ type: String })], d.prototype, "icon", 2), l([b({ type: String })], d.prototype, "label", 2), l([b()], d.prototype, "badge", 2), l([f()], d.prototype, "currentState", 2), l([f()], d.prototype, "isContentVisible", 2), l([f()], d.prototype, "isAnimating", 2), l([f()], d.prototype, "isLowered", 2), l([f()], d.prototype, "isDragging", 2), l([f()], d.prototype, "position", 2), l([f()], d.prototype, "anchor", 2), d = l([W("schmancy-boat")], d);
|
|
298
|
+
export {
|
|
299
|
+
d as S
|
|
300
|
+
};
|
|
301
|
+
//# sourceMappingURL=boat-RNCKlx8b.js.map
|