@mhmo91/schmancy 0.9.5 → 0.9.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/custom-elements.json +493 -718
- package/dist/{animation-CO_Csq84.cjs.map → animation-Bcwh107v.cjs.map} +1 -1
- package/dist/{animation-BK-8BwY8.js.map → animation-CXKSuUoE.js.map} +1 -1
- package/dist/{area-CRoGqD_u.js → area-BARjKpE9.js} +2 -2
- package/dist/{area-CRoGqD_u.js.map → area-BARjKpE9.js.map} +1 -1
- package/dist/{area-JPykB7A9.cjs → area-D9b9dHQr.cjs} +3 -3
- package/dist/{area-JPykB7A9.cjs.map → area-D9b9dHQr.cjs.map} +1 -1
- package/dist/area.cjs +1 -1
- package/dist/area.js +1 -1
- package/dist/{audio-kz8UgPTO.js → audio-C7TzWI8M.js} +1 -1
- package/dist/audio-C7TzWI8M.js.map +1 -0
- package/dist/{audio-DtYYgzYD.cjs → audio-DUVz7Ars.cjs} +1 -1
- package/dist/audio-DUVz7Ars.cjs.map +1 -0
- package/dist/audio.cjs +1 -1
- package/dist/audio.js +2 -2
- package/dist/autocomplete-AI2CCJmK.cjs +115 -0
- package/dist/autocomplete-AI2CCJmK.cjs.map +1 -0
- package/dist/{autocomplete-BllPQwr8.js → autocomplete-DOimwVMP.js} +48 -22
- package/dist/autocomplete-DOimwVMP.js.map +1 -0
- package/dist/autocomplete.cjs +1 -1
- package/dist/autocomplete.js +1 -1
- package/dist/badge.cjs +1 -1
- package/dist/badge.js +1 -1
- package/dist/{boat-DYEAZ8Qj.cjs → boat-Bk4u-LzT.cjs} +2 -2
- package/dist/{boat-DYEAZ8Qj.cjs.map → boat-Bk4u-LzT.cjs.map} +1 -1
- package/dist/{boat-BDTQ-du9.js → boat-DrghVeWK.js} +5 -5
- package/dist/{boat-BDTQ-du9.js.map → boat-DrghVeWK.js.map} +1 -1
- package/dist/boat.cjs +1 -1
- package/dist/boat.js +1 -1
- package/dist/breadcrumb.cjs +34 -0
- package/dist/breadcrumb.cjs.map +1 -0
- package/dist/breadcrumb.js +73 -0
- package/dist/breadcrumb.js.map +1 -0
- package/dist/{busy-ChDAeaKF.js → busy-BmFfwyz_.js} +7 -6
- package/dist/{busy-ChDAeaKF.js.map → busy-BmFfwyz_.js.map} +1 -1
- package/dist/{busy-Dj7Xn0Z0.cjs → busy-c_q_F8O0.cjs} +8 -8
- package/dist/{busy-Dj7Xn0Z0.cjs.map → busy-c_q_F8O0.cjs.map} +1 -1
- package/dist/busy.cjs +1 -1
- package/dist/busy.js +1 -1
- package/dist/button.cjs +4 -4
- package/dist/button.cjs.map +1 -1
- package/dist/button.js +25 -6
- package/dist/button.js.map +1 -1
- package/dist/{card-DZFPRPqs.js → card-BADJHUMA.js} +16 -15
- package/dist/{card-DZFPRPqs.js.map → card-BADJHUMA.js.map} +1 -1
- package/dist/{card-BvPWVEJX.cjs → card-C_E944_Z.cjs} +10 -10
- package/dist/{card-BvPWVEJX.cjs.map → card-C_E944_Z.cjs.map} +1 -1
- package/dist/card.cjs +1 -1
- package/dist/card.js +1 -1
- package/dist/charts.cjs +3 -3
- package/dist/charts.cjs.map +1 -1
- package/dist/charts.js +2 -2
- package/dist/{checkbox-GSSjqo6w.js → checkbox-D7rvCrGk.js} +28 -9
- package/dist/{checkbox-GSSjqo6w.js.map → checkbox-D7rvCrGk.js.map} +1 -1
- package/dist/{checkbox-BC_37rsG.cjs → checkbox-ZqDoCagB.cjs} +10 -10
- package/dist/{checkbox-BC_37rsG.cjs.map → checkbox-ZqDoCagB.cjs.map} +1 -1
- package/dist/checkbox.cjs +1 -1
- package/dist/checkbox.js +1 -1
- package/dist/{chips-B19XS8Xc.cjs → chips-Cux635Qs.cjs} +18 -18
- package/dist/chips-Cux635Qs.cjs.map +1 -0
- package/dist/{chips-B9oAEfE_.js → chips-vdzIsesI.js} +37 -27
- package/dist/chips-vdzIsesI.js.map +1 -0
- package/dist/chips.cjs +1 -1
- package/dist/chips.js +2 -2
- package/dist/{code-highlight-fSLrlgOb.cjs → code-highlight-C9lKek2p.cjs} +11 -11
- package/dist/{code-highlight-fSLrlgOb.cjs.map → code-highlight-C9lKek2p.cjs.map} +1 -1
- package/dist/{code-highlight-DCk5lJY-.js → code-highlight-D6yruol6.js} +6 -5
- package/dist/{code-highlight-DCk5lJY-.js.map → code-highlight-D6yruol6.js.map} +1 -1
- package/dist/code-highlight.cjs +1 -1
- package/dist/code-highlight.js +1 -1
- package/dist/components-ByRyEzz5.cjs +73 -0
- package/dist/{components-CyD6a7gQ.cjs.map → components-ByRyEzz5.cjs.map} +1 -1
- package/dist/{components-COsM6sJZ.js → components-DSvPKR9Q.js} +2 -2
- package/dist/{components-COsM6sJZ.js.map → components-DSvPKR9Q.js.map} +1 -1
- package/dist/components.cjs +1 -1
- package/dist/components.js +1 -1
- package/dist/connectivity.cjs +7 -7
- package/dist/connectivity.cjs.map +1 -1
- package/dist/connectivity.js +5 -4
- package/dist/connectivity.js.map +1 -1
- package/dist/content-drawer.cjs +1 -1
- package/dist/content-drawer.js +1 -1
- package/dist/{cursor-glow-DtSy_PJd.cjs → cursor-glow-82y5h3E4.cjs} +1 -1
- package/dist/{cursor-glow-DtSy_PJd.cjs.map → cursor-glow-82y5h3E4.cjs.map} +1 -1
- package/dist/{cursor-glow-Ah7VXSj7.js → cursor-glow-C2YRrB8Z.js} +1 -1
- package/dist/{cursor-glow-Ah7VXSj7.js.map → cursor-glow-C2YRrB8Z.js.map} +1 -1
- package/dist/{date-range-ZAaQB22I.cjs → date-range-DJsavigf.cjs} +3 -3
- package/dist/date-range-DJsavigf.cjs.map +1 -0
- package/dist/{date-range-inline-Bl8qbiQF.js → date-range-inline-B87TDYI6.js} +1 -1
- package/dist/{date-range-inline-Bl8qbiQF.js.map → date-range-inline-B87TDYI6.js.map} +1 -1
- package/dist/date-range-inline-De-M0VmL.cjs +43 -0
- package/dist/{date-range-inline-m7nLjOMI.cjs.map → date-range-inline-De-M0VmL.cjs.map} +1 -1
- package/dist/date-range-inline.cjs +1 -1
- package/dist/date-range-inline.js +1 -1
- package/dist/{date-range-Sfyco9-n.js → date-range-tEX2Jx2j.js} +4 -4
- package/dist/date-range-tEX2Jx2j.js.map +1 -0
- package/dist/date-range.cjs +1 -1
- package/dist/date-range.js +1 -1
- package/dist/delay-BvVdfhAR.cjs +9 -0
- package/dist/{delay-7boauN6N.cjs.map → delay-BvVdfhAR.cjs.map} +1 -1
- package/dist/{delay-CgX6m0HN.js → delay-CZw37zps.js} +9 -8
- package/dist/{delay-CgX6m0HN.js.map → delay-CZw37zps.js.map} +1 -1
- package/dist/delay.cjs +1 -1
- package/dist/delay.js +1 -1
- package/dist/{details-BHnk8l4q.cjs → details-Bhz8_whd.cjs} +9 -9
- package/dist/{details-BHnk8l4q.cjs.map → details-Bhz8_whd.cjs.map} +1 -1
- package/dist/{details-BPkUg8Cq.js → details-D7VTnLOh.js} +16 -15
- package/dist/{details-BPkUg8Cq.js.map → details-D7VTnLOh.js.map} +1 -1
- package/dist/details.cjs +1 -1
- package/dist/details.js +1 -1
- package/dist/{dialog-service-NZEvyEK-.js → dialog-service-ClFrOWf4.js} +2 -2
- package/dist/{dialog-service-NZEvyEK-.js.map → dialog-service-ClFrOWf4.js.map} +1 -1
- package/dist/{dialog-service-VnW4gkmE.cjs → dialog-service-DcuAavp2.cjs} +1 -1
- package/dist/{dialog-service-VnW4gkmE.cjs.map → dialog-service-DcuAavp2.cjs.map} +1 -1
- package/dist/dialog.cjs +18 -11
- package/dist/dialog.cjs.map +1 -1
- package/dist/dialog.js +66 -43
- package/dist/dialog.js.map +1 -1
- package/dist/directives.cjs +1 -1
- package/dist/directives.js +5 -5
- package/dist/{divider-_khrhrZo.cjs → divider-S0bHwCCS.cjs} +2 -2
- package/dist/{divider-_khrhrZo.cjs.map → divider-S0bHwCCS.cjs.map} +1 -1
- package/dist/{divider-CW9a7MMj.js → divider-zS232JDr.js} +2 -2
- package/dist/{divider-CW9a7MMj.js.map → divider-zS232JDr.js.map} +1 -1
- package/dist/divider.cjs +1 -1
- package/dist/divider.js +1 -1
- package/dist/dropdown.cjs +4 -4
- package/dist/dropdown.cjs.map +1 -1
- package/dist/dropdown.js +8 -7
- package/dist/dropdown.js.map +1 -1
- package/dist/{expand-iQ7EOMP7.js → expand-BXt9SqAF.js} +13 -12
- package/dist/{expand-iQ7EOMP7.js.map → expand-BXt9SqAF.js.map} +1 -1
- package/dist/{expand-Cp7-PH8b.cjs → expand-Dr7TFXpl.cjs} +18 -18
- package/dist/{expand-Cp7-PH8b.cjs.map → expand-Dr7TFXpl.cjs.map} +1 -1
- package/dist/expand.cjs +1 -1
- package/dist/expand.js +1 -1
- package/dist/{extra-IKAiJJhv.cjs → extra-BmZTXAp0.cjs} +3 -3
- package/dist/{extra-IKAiJJhv.cjs.map → extra-BmZTXAp0.cjs.map} +1 -1
- package/dist/{extra-wEpvEFbK.js → extra-COYhsOyZ.js} +2 -2
- package/dist/{extra-wEpvEFbK.js.map → extra-COYhsOyZ.js.map} +1 -1
- package/dist/extra.cjs +1 -1
- package/dist/extra.js +1 -1
- package/dist/float-CSRW-Rrd.cjs +1 -0
- package/dist/{float-D5rNC82i.cjs.map → float-CSRW-Rrd.cjs.map} +1 -1
- package/dist/{float-BQ_urmMs.js → float-DCXafWh6.js} +2 -2
- package/dist/{float-BQ_urmMs.js.map → float-DCXafWh6.js.map} +1 -1
- package/dist/float.cjs +1 -1
- package/dist/float.js +1 -1
- package/dist/{flow-CUj0fDT_.js.map → flow-CqgDEIqK.js.map} +1 -1
- package/dist/{flow-Bbwn6dRN.cjs.map → flow-DSu4PLt1.cjs.map} +1 -1
- package/dist/form-CAY9GSCd.cjs +1 -0
- package/dist/form-CAY9GSCd.cjs.map +1 -0
- package/dist/form-D2cJ58TB.js +68 -0
- package/dist/form-D2cJ58TB.js.map +1 -0
- package/dist/form.cjs +1 -1
- package/dist/form.js +2 -1
- package/dist/{hashContent-DaeGmY-p.cjs.map → hashContent-kKvXKFa9.cjs.map} +1 -1
- package/dist/{hashContent-DYM21p6t.js.map → hashContent-nD2uWwi2.js.map} +1 -1
- package/dist/{icons-BDqiGXrO.js → icons-BbaI9Zf-.js} +9 -8
- package/dist/icons-BbaI9Zf-.js.map +1 -0
- package/dist/{icons-B57_93VV.cjs → icons-DPUeLS_Y.cjs} +3 -3
- package/dist/icons-DPUeLS_Y.cjs.map +1 -0
- package/dist/icons.cjs +1 -1
- package/dist/icons.js +1 -1
- package/dist/{iframe-WnWPIrBG.js → iframe-CEDOvkql.js} +5 -4
- package/dist/{iframe-WnWPIrBG.js.map → iframe-CEDOvkql.js.map} +1 -1
- package/dist/{iframe-DNHL3GIk.cjs → iframe-Ct50FYXq.cjs} +3 -3
- package/dist/{iframe-DNHL3GIk.cjs.map → iframe-Ct50FYXq.cjs.map} +1 -1
- package/dist/iframe.cjs +1 -1
- package/dist/iframe.js +1 -1
- package/dist/index.cjs +1 -1
- package/dist/index.js +65 -59
- package/dist/{input-BiSrTcrR.cjs → input-DMjpf6V8.cjs} +2 -2
- package/dist/{input-BiSrTcrR.cjs.map → input-DMjpf6V8.cjs.map} +1 -1
- package/dist/{input-VaXHFrRn.js → input-Ri72dn5t.js} +1 -1
- package/dist/{input-VaXHFrRn.js.map → input-Ri72dn5t.js.map} +1 -1
- package/dist/{input-chip-Dy-AiP55.cjs → input-chip-BhjGVpc3.cjs} +9 -9
- package/dist/input-chip-BhjGVpc3.cjs.map +1 -0
- package/dist/{input-chip-QejNcRnS.js → input-chip-CI4__N8w.js} +13 -9
- package/dist/input-chip-CI4__N8w.js.map +1 -0
- package/dist/input.cjs +1 -1
- package/dist/input.js +1 -1
- package/dist/{intersection-CZpaIHeT.cjs.map → intersection-D1v1UCVv.cjs.map} +1 -1
- package/dist/{intersection-BPLpqYEd.js.map → intersection-LfEsy29T.js.map} +1 -1
- package/dist/json.cjs +3 -3
- package/dist/json.cjs.map +1 -1
- package/dist/json.js +5 -4
- package/dist/json.js.map +1 -1
- package/dist/kbd.cjs +28 -0
- package/dist/kbd.cjs.map +1 -0
- package/dist/kbd.js +45 -0
- package/dist/kbd.js.map +1 -0
- package/dist/{layout-yxSlLybo.js → layout-BE2ld1IY.js} +1 -1
- package/dist/{layout-yxSlLybo.js.map → layout-BE2ld1IY.js.map} +1 -1
- package/dist/layout-D7xOqMkJ.cjs +17 -0
- package/dist/{layout-DNYG3phx.cjs.map → layout-D7xOqMkJ.cjs.map} +1 -1
- package/dist/{layout-4C-6_cre.cjs → layout-PZCF3kwl.cjs} +1 -1
- package/dist/{layout-4C-6_cre.cjs.map → layout-PZCF3kwl.cjs.map} +1 -1
- package/dist/{layout-CnsXeCAy.js → layout-uAQpJN31.js} +20 -19
- package/dist/{layout-CnsXeCAy.js.map → layout-uAQpJN31.js.map} +1 -1
- package/dist/layout.cjs +1 -1
- package/dist/layout.js +2 -2
- package/dist/{lightbox-BrI1Z31s.js → lightbox-C0OEHns9.js} +10 -9
- package/dist/{lightbox-BrI1Z31s.js.map → lightbox-C0OEHns9.js.map} +1 -1
- package/dist/{lightbox-CmACf0t5.cjs → lightbox-cXRnvHMN.cjs} +20 -20
- package/dist/{lightbox-CmACf0t5.cjs.map → lightbox-cXRnvHMN.cjs.map} +1 -1
- package/dist/lightbox.cjs +1 -1
- package/dist/lightbox.js +1 -1
- package/dist/{list-swIL9VDv.cjs → list-CmJ5h35b.cjs} +5 -5
- package/dist/{list-swIL9VDv.cjs.map → list-CmJ5h35b.cjs.map} +1 -1
- package/dist/{list-Cm-jjXxM.js → list-d1mHar5p.js} +14 -13
- package/dist/{list-Cm-jjXxM.js.map → list-d1mHar5p.js.map} +1 -1
- package/dist/list.cjs +1 -1
- package/dist/list.js +1 -1
- package/dist/{litElement.mixin-3llHwB-8.cjs → litElement.mixin-Bj2q1yPw.cjs} +1 -1
- package/dist/{litElement.mixin-3llHwB-8.cjs.map → litElement.mixin-Bj2q1yPw.cjs.map} +1 -1
- package/dist/{litElement.mixin-6jJYHCrZ.js → litElement.mixin-CncaUoxz.js} +1 -1
- package/dist/{litElement.mixin-6jJYHCrZ.js.map → litElement.mixin-CncaUoxz.js.map} +1 -1
- package/dist/{magnetic-BZGFxAWG.js → magnetic-Dj52WplI.js} +2 -2
- package/dist/{magnetic-BZGFxAWG.js.map → magnetic-Dj52WplI.js.map} +1 -1
- package/dist/{magnetic-Dux4QwO4.cjs → magnetic-aBBnj_vk.cjs} +1 -1
- package/dist/{magnetic-Dux4QwO4.cjs.map → magnetic-aBBnj_vk.cjs.map} +1 -1
- package/dist/{mailbox-D6LkQcN5.cjs → mailbox-BmChskZc.cjs} +59 -59
- package/dist/{mailbox-D6LkQcN5.cjs.map → mailbox-BmChskZc.cjs.map} +1 -1
- package/dist/{mailbox-BuvsVaAQ.js → mailbox-C4-E93be.js} +13 -12
- package/dist/{mailbox-BuvsVaAQ.js.map → mailbox-C4-E93be.js.map} +1 -1
- package/dist/mailbox.cjs +1 -1
- package/dist/mailbox.js +1 -1
- package/dist/{map-CQiKAxC3.js → map-DHyYLhvy.js} +6 -5
- package/dist/{map-CQiKAxC3.js.map → map-DHyYLhvy.js.map} +1 -1
- package/dist/{map-D5NN4VET.cjs → map-DYEvlNl0.cjs} +7 -7
- package/dist/{map-D5NN4VET.cjs.map → map-DYEvlNl0.cjs.map} +1 -1
- package/dist/map.cjs +1 -1
- package/dist/map.js +1 -1
- package/dist/{menu-CkgMO9K5.cjs → menu-BlPTI6H9.cjs} +3 -3
- package/dist/{menu-CkgMO9K5.cjs.map → menu-BlPTI6H9.cjs.map} +1 -1
- package/dist/{menu-C1x04YZw.js → menu-DFDBADp4.js} +3 -3
- package/dist/{menu-C1x04YZw.js.map → menu-DFDBADp4.js.map} +1 -1
- package/dist/menu.cjs +1 -1
- package/dist/menu.js +1 -1
- package/dist/mixins.cjs +1 -1
- package/dist/mixins.cjs.map +1 -1
- package/dist/mixins.js +43 -15
- package/dist/mixins.js.map +1 -1
- package/dist/nav-drawer.cjs +1 -1
- package/dist/nav-drawer.js +1 -1
- package/dist/navigation-bar.cjs +1 -1
- package/dist/navigation-bar.js +1 -1
- package/dist/navigation-rail.cjs +3 -3
- package/dist/navigation-rail.cjs.map +1 -1
- package/dist/navigation-rail.js +2 -2
- package/dist/{notification-BnBgxjF-.js → notification-DGpv8g2H.js} +4 -4
- package/dist/{notification-BnBgxjF-.js.map → notification-DGpv8g2H.js.map} +1 -1
- package/dist/notification-DKVWYhqs.cjs +23 -0
- package/dist/{notification-CZFEhWxc.cjs.map → notification-DKVWYhqs.cjs.map} +1 -1
- package/dist/notification.cjs +1 -1
- package/dist/notification.js +1 -1
- package/dist/{option-DBO8xZwd.js → option-BD2eh458.js} +6 -5
- package/dist/{option-DBO8xZwd.js.map → option-BD2eh458.js.map} +1 -1
- package/dist/{option-BrxCVwSx.cjs → option-LtSDy2xf.cjs} +5 -5
- package/dist/{option-BrxCVwSx.cjs.map → option-LtSDy2xf.cjs.map} +1 -1
- package/dist/option.cjs +1 -1
- package/dist/option.js +1 -1
- package/dist/{overlay-stack-DQey9Qph.cjs.map → overlay-stack-CEYGD9T1.cjs.map} +1 -1
- package/dist/{overlay-stack-DT1SdaGW.js.map → overlay-stack-Ca4EK2Mu.js.map} +1 -1
- package/dist/page.cjs +2 -2
- package/dist/page.cjs.map +1 -1
- package/dist/page.js +5 -5
- package/dist/{progress-Db2e4_Zd.cjs → progress-B5ChDPbB.cjs} +2 -2
- package/dist/{progress-Db2e4_Zd.cjs.map → progress-B5ChDPbB.cjs.map} +1 -1
- package/dist/{progress-DeiHxXo7.js → progress-CE1Pk2hi.js} +2 -2
- package/dist/{progress-DeiHxXo7.js.map → progress-CE1Pk2hi.js.map} +1 -1
- package/dist/progress.cjs +1 -1
- package/dist/progress.js +1 -1
- package/dist/{provide-DHnhQtCH.cjs → provide-BZ9lq_Be.cjs} +1 -1
- package/dist/{provide-DHnhQtCH.cjs.map → provide-BZ9lq_Be.cjs.map} +1 -1
- package/dist/{provide-C1aQhxYo.js → provide-jn1Fj1vv.js} +1 -1
- package/dist/{provide-C1aQhxYo.js.map → provide-jn1Fj1vv.js.map} +1 -1
- package/dist/qr-scanner.cjs +2 -2
- package/dist/qr-scanner.cjs.map +1 -1
- package/dist/qr-scanner.js +2 -2
- package/dist/radio-group-Cd9pZ2MR.cjs +40 -0
- package/dist/{radio-group-Cspwd-Vw.cjs.map → radio-group-Cd9pZ2MR.cjs.map} +1 -1
- package/dist/{radio-group-zSO0AkJf.js → radio-group-CyRHgIF3.js} +7 -6
- package/dist/{radio-group-zSO0AkJf.js.map → radio-group-CyRHgIF3.js.map} +1 -1
- package/dist/radio-group.cjs +1 -1
- package/dist/radio-group.js +1 -1
- package/dist/range.cjs +4 -4
- package/dist/range.cjs.map +1 -1
- package/dist/range.js +4 -3
- package/dist/range.js.map +1 -1
- package/dist/{reduced-motion-D-L12p7G.js.map → reduced-motion-B83yZbcO.js.map} +1 -1
- package/dist/{reduced-motion-Ds05GPyz.cjs.map → reduced-motion-DR32yKEO.cjs.map} +1 -1
- package/dist/{rxjs-utils-BSjmI9-Q.js.map → rxjs-utils-Bldch1RO.js.map} +1 -1
- package/dist/{rxjs-utils-DCsfzeap.cjs.map → rxjs-utils-hAgKC7vk.cjs.map} +1 -1
- package/dist/rxjs-utils.cjs +1 -1
- package/dist/rxjs-utils.js +1 -1
- package/dist/{scroll-QMCmbbDv.cjs → scroll-C_iNOi7E.cjs} +2 -2
- package/dist/{scroll-QMCmbbDv.cjs.map → scroll-C_iNOi7E.cjs.map} +1 -1
- package/dist/{scroll-cBDzye64.js → scroll-DoliwpRu.js} +7 -6
- package/dist/{scroll-cBDzye64.js.map → scroll-DoliwpRu.js.map} +1 -1
- package/dist/{search-C4dFHYbX.js.map → search-BlGJ6uJv.js.map} +1 -1
- package/dist/{search-Ds8tt7Et.cjs.map → search-C8eAOzBm.cjs.map} +1 -1
- package/dist/{select-Ct37l3lg.cjs → select-CWWuZ2iJ.cjs} +2 -2
- package/dist/{select-Ct37l3lg.cjs.map → select-CWWuZ2iJ.cjs.map} +1 -1
- package/dist/{select-c6HbWvKP.js → select-_vHPXi30.js} +3 -3
- package/dist/{select-c6HbWvKP.js.map → select-_vHPXi30.js.map} +1 -1
- package/dist/select.cjs +1 -1
- package/dist/select.js +1 -1
- package/dist/{sheet-BMXcUiIm.js → sheet-i1KtxGIj.js} +5 -5
- package/dist/{sheet-BMXcUiIm.js.map → sheet-i1KtxGIj.js.map} +1 -1
- package/dist/{sheet-CQec-bCV.cjs → sheet-r0oEYIdi.cjs} +2 -2
- package/dist/{sheet-CQec-bCV.cjs.map → sheet-r0oEYIdi.cjs.map} +1 -1
- package/dist/sheet.cjs +1 -1
- package/dist/sheet.js +2 -2
- package/dist/{sheet.service-Dumvr1HT.cjs → sheet.service-Cr13Oo6G.cjs} +1 -1
- package/dist/{sheet.service-Dumvr1HT.cjs.map → sheet.service-Cr13Oo6G.cjs.map} +1 -1
- package/dist/{sheet.service-BcPV3Du4.js → sheet.service-DUO5_kmI.js} +3 -3
- package/dist/{sheet.service-BcPV3Du4.js.map → sheet.service-DUO5_kmI.js.map} +1 -1
- package/dist/skeleton.cjs +33 -0
- package/dist/skeleton.cjs.map +1 -0
- package/dist/skeleton.js +58 -0
- package/dist/skeleton.js.map +1 -0
- package/dist/skills/INDEX.md +7 -6
- package/dist/skills/breadcrumb.md +53 -0
- package/dist/skills/kbd.md +40 -0
- package/dist/skills/schmancy/INDEX.md +7 -6
- package/dist/skills/schmancy/breadcrumb.md +53 -0
- package/dist/skills/schmancy/kbd.md +40 -0
- package/dist/skills/schmancy/skeleton.md +40 -0
- package/dist/skills/schmancy/splash-screen.md +60 -0
- package/dist/skills/schmancy/switch.md +58 -0
- package/dist/skills/schmancy/tooltip.md +1 -1
- package/dist/skills/schmancy/visually-hidden.md +41 -0
- package/dist/skills/skeleton.md +40 -0
- package/dist/skills/splash-screen.md +60 -0
- package/dist/skills/switch.md +58 -0
- package/dist/skills/tooltip.md +1 -1
- package/dist/skills/visually-hidden.md +41 -0
- package/dist/slider.cjs +3 -3
- package/dist/slider.cjs.map +1 -1
- package/dist/slider.js +2 -2
- package/dist/{sound.service-Bu3EQLv2.cjs → sound.service-BjSoGjmT.cjs} +1 -1
- package/dist/{sound.service-Bu3EQLv2.cjs.map → sound.service-BjSoGjmT.cjs.map} +1 -1
- package/dist/{sound.service-m3BrSfuH.js → sound.service-cdkw3Wkv.js} +1 -1
- package/dist/{sound.service-m3BrSfuH.js.map → sound.service-cdkw3Wkv.js.map} +1 -1
- package/dist/splash-screen-CquyPP1C.cjs +41 -0
- package/dist/splash-screen-CquyPP1C.cjs.map +1 -0
- package/dist/splash-screen-CvucPkpD.js +83 -0
- package/dist/splash-screen-CvucPkpD.js.map +1 -0
- package/dist/splash-screen.cjs +1 -0
- package/dist/splash-screen.js +1 -0
- package/dist/src-Bemk2C2P.cjs +269 -0
- package/dist/{src-BtQVyqMy.cjs.map → src-Bemk2C2P.cjs.map} +1 -1
- package/dist/{src-BLngW2bl.js → src-f5a3W9Mj.js} +98 -91
- package/dist/{src-BLngW2bl.js.map → src-f5a3W9Mj.js.map} +1 -1
- package/dist/steps.cjs +10 -10
- package/dist/steps.cjs.map +1 -1
- package/dist/steps.js +10 -9
- package/dist/steps.js.map +1 -1
- package/dist/{store-DYqDLAvT.js.map → store-Bmj6rvZY.js.map} +1 -1
- package/dist/{store-CorvD3bT.cjs.map → store-CO4nJyGj.cjs.map} +1 -1
- package/dist/store.cjs +1 -1
- package/dist/store.js +1 -1
- package/dist/surface-CDufon40.cjs +7 -0
- package/dist/{surface-BjKZoJxK.cjs.map → surface-CDufon40.cjs.map} +1 -1
- package/dist/surface-CkEYJCae.js +22 -0
- package/dist/{surface-pK8hME5c.js.map → surface-CkEYJCae.js.map} +1 -1
- package/dist/surface.cjs +1 -1
- package/dist/surface.js +1 -1
- package/dist/{surface.mixin-C5sDI1-_.cjs → surface.mixin-CSKqQH-0.cjs} +2 -2
- package/dist/{surface.mixin-C5sDI1-_.cjs.map → surface.mixin-CSKqQH-0.cjs.map} +1 -1
- package/dist/{surface.mixin-CBNRpJum.js → surface.mixin-DqMwoddO.js} +1 -1
- package/dist/{surface.mixin-CBNRpJum.js.map → surface.mixin-DqMwoddO.js.map} +1 -1
- package/dist/switch.cjs +69 -0
- package/dist/switch.cjs.map +1 -0
- package/dist/switch.js +132 -0
- package/dist/switch.js.map +1 -0
- package/dist/{table-CiqgZzSd.cjs → table-DWc1mkpj.cjs} +3 -3
- package/dist/{table-CiqgZzSd.cjs.map → table-DWc1mkpj.cjs.map} +1 -1
- package/dist/{table-BXIHX9h4.js → table-P6VGG7NK.js} +4 -4
- package/dist/{table-BXIHX9h4.js.map → table-P6VGG7NK.js.map} +1 -1
- package/dist/table.cjs +1 -1
- package/dist/table.js +1 -1
- package/dist/{tabs-nbV5eblZ.js → tabs-CjGjGrqY.js} +13 -12
- package/dist/{tabs-nbV5eblZ.js.map → tabs-CjGjGrqY.js.map} +1 -1
- package/dist/{tabs-CKa-W4qA.cjs → tabs-DGJEKuhC.cjs} +4 -4
- package/dist/{tabs-CKa-W4qA.cjs.map → tabs-DGJEKuhC.cjs.map} +1 -1
- package/dist/tabs.cjs +1 -1
- package/dist/tabs.js +1 -1
- package/dist/{tailwind.mixin-BF1Huas7.cjs → tailwind.mixin-Cpa-VnnX.cjs} +2 -2
- package/dist/tailwind.mixin-Cpa-VnnX.cjs.map +1 -0
- package/dist/{tailwind.mixin-BCJOOX1_.js → tailwind.mixin-DufHBjmb.js} +57 -63
- package/dist/tailwind.mixin-DufHBjmb.js.map +1 -0
- package/dist/teleport.cjs +1 -1
- package/dist/teleport.js +1 -1
- package/dist/{textarea-D7q8exMg.js → textarea-DZT_Ofp5.js} +42 -28
- package/dist/textarea-DZT_Ofp5.js.map +1 -0
- package/dist/textarea-jmTOXrzl.cjs +39 -0
- package/dist/textarea-jmTOXrzl.cjs.map +1 -0
- package/dist/textarea.cjs +1 -1
- package/dist/textarea.js +1 -1
- package/dist/theme-CCKqaksQ.cjs +181 -0
- package/dist/{theme-Da4SPq9X.cjs.map → theme-CCKqaksQ.cjs.map} +1 -1
- package/dist/{theme-_VPV6Bxh.js → theme-CEc32pAv.js} +13 -12
- package/dist/{theme-_VPV6Bxh.js.map → theme-CEc32pAv.js.map} +1 -1
- package/dist/theme-button-BsJcv-Zv.cjs +8 -0
- package/dist/{theme-button-Ci8VQ7KW.cjs.map → theme-button-BsJcv-Zv.cjs.map} +1 -1
- package/dist/{theme-button--sX8A-m1.js → theme-button-dOiAvdKU.js} +4 -3
- package/dist/{theme-button--sX8A-m1.js.map → theme-button-dOiAvdKU.js.map} +1 -1
- package/dist/theme-button.cjs +1 -1
- package/dist/theme-button.js +1 -1
- package/dist/theme.cjs +1 -1
- package/dist/{theme.events-Cv7N4Toe.js.map → theme.events-Bw3mYjUA.js.map} +1 -1
- package/dist/{theme.events-DM4H5F2d.cjs.map → theme.events-EznKK2Y0.cjs.map} +1 -1
- package/dist/{theme.interface-Da23QAYb.cjs.map → theme.interface-CM26m9te.cjs.map} +1 -1
- package/dist/{theme.interface-CXloMUCw.js.map → theme.interface-FAUIgbIq.js.map} +1 -1
- package/dist/theme.js +5 -5
- package/dist/{theme.service-C_tjlqgy.cjs → theme.service-ETiKUwVy.cjs} +1 -1
- package/dist/{theme.service-C_tjlqgy.cjs.map → theme.service-ETiKUwVy.cjs.map} +1 -1
- package/dist/{theme.service-D9lEas89.js → theme.service-_qP5WvB9.js} +2 -2
- package/dist/{theme.service-D9lEas89.js.map → theme.service-_qP5WvB9.js.map} +1 -1
- package/dist/tooltip.cjs +1 -6
- package/dist/tooltip.cjs.map +1 -1
- package/dist/tooltip.js +51 -135
- package/dist/tooltip.js.map +1 -1
- package/dist/tree.cjs +14 -5
- package/dist/tree.cjs.map +1 -1
- package/dist/tree.js +28 -6
- package/dist/tree.js.map +1 -1
- package/dist/tslib.es6-Bd-92OW3.cjs +1 -0
- package/dist/{tslib.es6-D7BIeDVB.cjs.map → tslib.es6-Bd-92OW3.cjs.map} +1 -1
- package/dist/tslib.es6-CI1onEZb.js +7 -0
- package/dist/{tslib.es6-ErZEp3OO.js.map → tslib.es6-CI1onEZb.js.map} +1 -1
- package/dist/typewriter-ByIL2Mh-.cjs +123 -0
- package/dist/{typewriter-B2TnHPjw.cjs.map → typewriter-ByIL2Mh-.cjs.map} +1 -1
- package/dist/{typewriter-BrZNa8T-.js → typewriter-vOQ3bDLb.js} +8 -7
- package/dist/{typewriter-BrZNa8T-.js.map → typewriter-vOQ3bDLb.js.map} +1 -1
- package/dist/typewriter.cjs +1 -1
- package/dist/typewriter.js +1 -1
- package/dist/typography.cjs +4 -4
- package/dist/typography.cjs.map +1 -1
- package/dist/typography.js +10 -9
- package/dist/typography.js.map +1 -1
- package/dist/{utils-CoU7M2YS.js → utils-Cq0m3LYo.js} +3 -3
- package/dist/{utils-CoU7M2YS.js.map → utils-Cq0m3LYo.js.map} +1 -1
- package/dist/{utils-BcaKtQuA.cjs → utils-D2kE-6zc.cjs} +1 -1
- package/dist/{utils-BcaKtQuA.cjs.map → utils-D2kE-6zc.cjs.map} +1 -1
- package/dist/utils.cjs +1 -1
- package/dist/utils.js +5 -5
- package/dist/visually-hidden.cjs +13 -0
- package/dist/visually-hidden.cjs.map +1 -0
- package/dist/visually-hidden.js +24 -0
- package/dist/visually-hidden.js.map +1 -0
- package/dist/{window-Uii13x_r.cjs → window-BS7ZQjgH.cjs} +2 -2
- package/dist/window-BS7ZQjgH.cjs.map +1 -0
- package/dist/{window-CM1ycigo.js → window-WnAihpsA.js} +7 -7
- package/dist/window-WnAihpsA.js.map +1 -0
- package/dist/window.cjs +1 -1
- package/dist/window.js +1 -1
- package/mixins/formField.mixin.ts +96 -69
- package/mixins/tailwind.css +11 -0
- package/package.json +17 -26
- package/skills/schmancy/INDEX.md +7 -6
- package/skills/schmancy/breadcrumb.md +53 -0
- package/skills/schmancy/kbd.md +40 -0
- package/skills/schmancy/skeleton.md +40 -0
- package/skills/schmancy/splash-screen.md +60 -0
- package/skills/schmancy/switch.md +58 -0
- package/skills/schmancy/tooltip.md +1 -1
- package/skills/schmancy/visually-hidden.md +41 -0
- package/src/audio/emotional-sounds.ts +2 -4
- package/src/autocomplete/autocomplete.ts +52 -2
- package/src/breadcrumb/breadcrumb.ts +109 -0
- package/src/breadcrumb/index.ts +1 -0
- package/src/button/button.ts +40 -0
- package/src/button/icon-button.ts +2 -1
- package/src/checkbox/checkbox.test.ts +113 -0
- package/src/checkbox/checkbox.ts +41 -1
- package/src/chips/filter-chip.ts +15 -0
- package/src/chips/input-chip.ts +7 -0
- package/src/date-range/date-range-helpers.ts +0 -71
- package/src/dialog/dialog-base.mixin.ts +11 -0
- package/src/dialog/dialog.component.ts +28 -8
- package/src/dropdown/dropdown-content.ts +3 -1
- package/src/form/form.test.ts +137 -0
- package/src/form/form.ts +142 -158
- package/src/form/index.ts +2 -2
- package/src/icons/icon.ts +1 -0
- package/src/index.ts +6 -0
- package/src/kbd/index.ts +1 -0
- package/src/kbd/kbd.ts +59 -0
- package/src/skeleton/index.ts +1 -0
- package/src/skeleton/skeleton.ts +78 -0
- package/src/splash-screen/index.ts +1 -0
- package/src/splash-screen/splash-screen.ts +154 -0
- package/src/switch/index.ts +1 -0
- package/src/switch/switch.test.ts +93 -0
- package/src/switch/switch.ts +180 -0
- package/src/test-utils/a11y.ts +35 -0
- package/src/textarea/textarea.ts +32 -2
- package/src/tooltip/index.ts +1 -2
- package/src/tree/tree.ts +27 -2
- package/src/visually-hidden/index.ts +1 -0
- package/src/visually-hidden/visually-hidden.ts +39 -0
- package/src/window/window-position.ts +1 -74
- package/types/mixins/formField.mixin.d.ts +15 -8
- package/types/src/audio/emotional-sounds.d.ts +0 -2
- package/types/src/autocomplete/autocomplete.d.ts +7 -0
- package/types/src/breadcrumb/breadcrumb.d.ts +38 -0
- package/types/src/breadcrumb/index.d.ts +1 -0
- package/types/src/button/button.d.ts +7 -0
- package/types/src/button/icon-button.d.ts +2 -1
- package/types/src/checkbox/checkbox.d.ts +6 -0
- package/types/src/checkbox/checkbox.test.d.ts +1 -0
- package/types/src/chips/filter-chip.d.ts +3 -0
- package/types/src/chips/input-chip.d.ts +1 -0
- package/types/src/date-range/date-range-helpers.d.ts +0 -12
- package/types/src/dialog/dialog.component.d.ts +6 -0
- package/types/src/dropdown/dropdown-content.d.ts +3 -1
- package/types/src/form/form-v2.d.ts +12 -63
- package/types/src/form/form.d.ts +58 -40
- package/types/src/form/form.test.d.ts +4 -0
- package/types/src/form/index.d.ts +1 -1
- package/types/src/icons/icon.d.ts +1 -0
- package/types/src/index.d.ts +6 -0
- package/types/src/kbd/index.d.ts +1 -0
- package/types/src/kbd/kbd.d.ts +25 -0
- package/types/src/skeleton/index.d.ts +1 -0
- package/types/src/skeleton/skeleton.d.ts +27 -0
- package/types/src/splash-screen/index.d.ts +1 -0
- package/types/src/splash-screen/splash-screen.d.ts +60 -0
- package/types/src/switch/index.d.ts +1 -0
- package/types/src/switch/switch.d.ts +54 -0
- package/types/src/switch/switch.test.d.ts +1 -0
- package/types/src/test-utils/a11y.d.ts +11 -0
- package/types/src/textarea/textarea.d.ts +5 -1
- package/types/src/tooltip/index.d.ts +0 -1
- package/types/src/tree/tree.d.ts +5 -0
- package/types/src/visually-hidden/index.d.ts +1 -0
- package/types/src/visually-hidden/visually-hidden.d.ts +21 -0
- package/types/src/window/window-position.d.ts +1 -35
- package/dist/audio-DtYYgzYD.cjs.map +0 -1
- package/dist/audio-kz8UgPTO.js.map +0 -1
- package/dist/autocomplete-5rVhbieU.cjs +0 -111
- package/dist/autocomplete-5rVhbieU.cjs.map +0 -1
- package/dist/autocomplete-BllPQwr8.js.map +0 -1
- package/dist/chips-B19XS8Xc.cjs.map +0 -1
- package/dist/chips-B9oAEfE_.js.map +0 -1
- package/dist/components-CyD6a7gQ.cjs +0 -73
- package/dist/date-range-Sfyco9-n.js.map +0 -1
- package/dist/date-range-ZAaQB22I.cjs.map +0 -1
- package/dist/date-range-inline-m7nLjOMI.cjs +0 -43
- package/dist/delay-7boauN6N.cjs +0 -9
- package/dist/float-D5rNC82i.cjs +0 -1
- package/dist/form-BqN1AGFj.cjs +0 -1
- package/dist/form-BqN1AGFj.cjs.map +0 -1
- package/dist/form-CajC5HnO.js +0 -270
- package/dist/form-CajC5HnO.js.map +0 -1
- package/dist/icons-B57_93VV.cjs.map +0 -1
- package/dist/icons-BDqiGXrO.js.map +0 -1
- package/dist/input-chip-Dy-AiP55.cjs.map +0 -1
- package/dist/input-chip-QejNcRnS.js.map +0 -1
- package/dist/layout-DNYG3phx.cjs +0 -17
- package/dist/notification-CZFEhWxc.cjs +0 -23
- package/dist/radio-group-Cspwd-Vw.cjs +0 -40
- package/dist/src-BtQVyqMy.cjs +0 -269
- package/dist/surface-BjKZoJxK.cjs +0 -7
- package/dist/surface-pK8hME5c.js +0 -21
- package/dist/tailwind.mixin-BCJOOX1_.js.map +0 -1
- package/dist/tailwind.mixin-BF1Huas7.cjs.map +0 -1
- package/dist/textarea-Cp1ZE60O.cjs +0 -35
- package/dist/textarea-Cp1ZE60O.cjs.map +0 -1
- package/dist/textarea-D7q8exMg.js.map +0 -1
- package/dist/theme-Da4SPq9X.cjs +0 -181
- package/dist/theme-button-Ci8VQ7KW.cjs +0 -8
- package/dist/typewriter-B2TnHPjw.cjs +0 -123
- package/dist/window-CM1ycigo.js.map +0 -1
- package/dist/window-Uii13x_r.cjs.map +0 -1
- package/src/form/form-v2.ts +0 -268
- package/src/layout/v2/grid.ts +0 -93
- package/src/notification/outlet.ts +0 -16
- package/src/store/immer-integration.ts +0 -99
- package/src/tooltip/tooltip.ts +0 -216
- /package/dist/{animation-CO_Csq84.cjs → animation-Bcwh107v.cjs} +0 -0
- /package/dist/{animation-BK-8BwY8.js → animation-CXKSuUoE.js} +0 -0
- /package/dist/{tslib.es6-ErZEp3OO.js → decorate-D_utPUsC.js} +0 -0
- /package/dist/{tslib.es6-D7BIeDVB.cjs → decorate-F9CuyeHg.cjs} +0 -0
- /package/dist/{flow-CUj0fDT_.js → flow-CqgDEIqK.js} +0 -0
- /package/dist/{flow-Bbwn6dRN.cjs → flow-DSu4PLt1.cjs} +0 -0
- /package/dist/{hashContent-DaeGmY-p.cjs → hashContent-kKvXKFa9.cjs} +0 -0
- /package/dist/{hashContent-DYM21p6t.js → hashContent-nD2uWwi2.js} +0 -0
- /package/dist/{intersection-CZpaIHeT.cjs → intersection-D1v1UCVv.cjs} +0 -0
- /package/dist/{intersection-BPLpqYEd.js → intersection-LfEsy29T.js} +0 -0
- /package/dist/{overlay-stack-DQey9Qph.cjs → overlay-stack-CEYGD9T1.cjs} +0 -0
- /package/dist/{overlay-stack-DT1SdaGW.js → overlay-stack-Ca4EK2Mu.js} +0 -0
- /package/dist/{reduced-motion-D-L12p7G.js → reduced-motion-B83yZbcO.js} +0 -0
- /package/dist/{reduced-motion-Ds05GPyz.cjs → reduced-motion-DR32yKEO.cjs} +0 -0
- /package/dist/{rxjs-utils-BSjmI9-Q.js → rxjs-utils-Bldch1RO.js} +0 -0
- /package/dist/{rxjs-utils-DCsfzeap.cjs → rxjs-utils-hAgKC7vk.cjs} +0 -0
- /package/dist/{search-C4dFHYbX.js → search-BlGJ6uJv.js} +0 -0
- /package/dist/{search-Ds8tt7Et.cjs → search-C8eAOzBm.cjs} +0 -0
- /package/dist/{store-DYqDLAvT.js → store-Bmj6rvZY.js} +0 -0
- /package/dist/{store-CorvD3bT.cjs → store-CO4nJyGj.cjs} +0 -0
- /package/dist/{theme.events-Cv7N4Toe.js → theme.events-Bw3mYjUA.js} +0 -0
- /package/dist/{theme.events-DM4H5F2d.cjs → theme.events-EznKK2Y0.cjs} +0 -0
- /package/dist/{theme.interface-Da23QAYb.cjs → theme.interface-CM26m9te.cjs} +0 -0
- /package/dist/{theme.interface-CXloMUCw.js → theme.interface-FAUIgbIq.js} +0 -0
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
require(`./chunk-BCfY8kxB.cjs`);const e=require(`./
|
|
1
|
+
require(`./chunk-BCfY8kxB.cjs`);const e=require(`./decorate-F9CuyeHg.cjs`),t=require(`./litElement.mixin-Bj2q1yPw.cjs`);require(`./mixins.cjs`);const n=require(`./animation-Bcwh107v.cjs`),r=require(`./reduced-motion-DR32yKEO.cjs`),i=require(`./cursor-glow-82y5h3E4.cjs`),a=require(`./theme.service-ETiKUwVy.cjs`),o=require(`./overlay-stack-CEYGD9T1.cjs`);let s=require(`rxjs`),c=require(`lit/directives/class-map.js`),l=require(`lit/directives/style-map.js`),u=require(`lit/decorators.js`),d=require(`lit`),f=require(`lit/directives/ref.js`);var p=`schmancy-window-`,m=`schmancy-float-`;function h(e,t){return!(e.left>=t.left+t.width||e.left+e.width<=t.left||e.top>=t.top+t.height||e.top+e.height<=t.top)}var g,_=class e{constructor(){this._state$=new s.BehaviorSubject({windows:new Map,focusedId:null,stackOrder:[]}),this.state$=this._state$.asObservable()}static getInstance(){return e.instance||=new e,e.instance}get windows(){return this._state$.value.windows}get focusedId(){return this._state$.value.focusedId}register(e,t,n){let r=this._state$.value;if(r.windows.has(e))return;let i={id:e,bounds:t,visualState:`normal`,zIndex:o.t.assignZIndex(e),open:!1,snapTarget:n},a=new Map(r.windows);a.set(e,i);let s=o.t.getStackOrder();this._state$.next({...r,windows:a,stackOrder:s})}unregister(e){let t=this._state$.value;if(!t.windows.has(e))return;o.t.releaseId(e);let n=new Map(t.windows);n.delete(e);let r=o.t.getStackOrder(),i=t.focusedId===e?null:t.focusedId;this._state$.next({...t,windows:n,stackOrder:r,focusedId:i})}updateBounds(e,t){this._updateRecord(e,{bounds:t})}updateVisualState(e,t){this._updateRecord(e,{visualState:t})}updateOpen(e,t){this._updateRecord(e,{open:t})}focus(e){let t=this._state$.value;if(!t.windows.has(e)||t.focusedId===e)return;let n=o.t.bringToFront(e),r=new Map(t.windows),i=r.get(e);i&&r.set(e,{...i,zIndex:n});let a=o.t.getStackOrder();this._state$.next({...t,windows:r,stackOrder:a,focusedId:e})}findOverlaps(e,t){let n=[];for(let[r,i]of this._state$.value.windows)r!==t&&h(e,i.bounds)&&n.push(i);return n}getNeighbors(e){let t=[];for(let[n,r]of this._state$.value.windows)n!==e&&t.push(r);return t}selectWindow(e){return this._state$.pipe((0,s.map)(t=>t.windows.get(e)),(0,s.distinctUntilChanged)())}selectFocused(){return this._state$.pipe((0,s.map)(e=>e.focusedId),(0,s.distinctUntilChanged)())}loadPosition(e){try{let t=localStorage.getItem(p+e)??localStorage.getItem(m+e);return t?JSON.parse(t):null}catch{return null}}savePosition(e,t){try{localStorage.setItem(p+e,JSON.stringify(t))}catch{}}clearPosition(e){try{localStorage.removeItem(p+e),localStorage.removeItem(m+e)}catch{}}_updateRecord(e,t){let n=this._state$.value,r=n.windows.get(e);if(!r)return;let i=new Map(n.windows);i.set(e,{...r,...t}),this._state$.next({...n,windows:i})}}.getInstance();function v(e,t,n){let r={...e};for(let e=0;e<10&&t.some(e=>{return t=r,n=e.bounds,!(t.left>=n.left+n.width||t.left+t.width<=n.left||t.top>=n.top+n.height||t.top+t.height<=n.top);var t,n});e++)r={...r,left:r.left+44,top:r.top+44};return function(e,t){return{width:e.width,height:e.height,left:Math.max(0,Math.min(e.left,t.width-e.width)),top:Math.max(0,Math.min(e.top,t.height-e.height))}}(r,n)}var y=48,b=class extends t.t(d.css`
|
|
2
2
|
:host {
|
|
3
3
|
display: contents;
|
|
4
4
|
position: relative;
|
|
@@ -56,4 +56,4 @@ require(`./chunk-BCfY8kxB.cjs`);const e=require(`./tailwind.mixin-BF1Huas7.cjs`)
|
|
|
56
56
|
</div>
|
|
57
57
|
</section>
|
|
58
58
|
</schmancy-surface>
|
|
59
|
-
`}};e.
|
|
59
|
+
`}};e.t([(0,u.property)({type:String})],b.prototype,`id`,void 0),e.t([(0,u.property)({type:String})],b.prototype,`expandedWidth`,void 0),e.t([(0,u.property)({type:String})],b.prototype,`expandedHeight`,void 0),e.t([(0,u.property)({type:Boolean,reflect:!0})],b.prototype,`lowered`,void 0),e.t([(0,u.property)({type:String})],b.prototype,`corner`,void 0),e.t([(0,u.property)({type:Boolean})],b.prototype,`resizable`,void 0),e.t([(0,u.property)({type:Boolean})],b.prototype,`freePosition`,void 0),e.t([(0,u.property)({type:String,reflect:!0})],b.prototype,`visualState`,void 0),e.t([(0,u.property)({type:Number})],b.prototype,`minWidth`,void 0),e.t([(0,u.property)({type:Number})],b.prototype,`minHeight`,void 0),e.t([(0,u.property)({type:Boolean,reflect:!0})],b.prototype,`open`,void 0),e.t([(0,u.state)()],b.prototype,`_hasOpened`,void 0),e.t([(0,u.state)()],b.prototype,`_focused`,void 0),e.t([(0,u.state)()],b.prototype,`_currentCorner`,void 0);var x=b=g=e.t([(0,u.customElement)(`schmancy-window`)],b);Object.defineProperty(exports,`n`,{enumerable:!0,get:function(){return _}}),Object.defineProperty(exports,`t`,{enumerable:!0,get:function(){return x}});
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"window-BS7ZQjgH.cjs","names":[],"sources":["../src/window/window-manager.ts","../src/window/window-position.ts","../src/window/window.ts"],"sourcesContent":["/**\n * Window Manager — singleton service for multi-window coordination.\n *\n * Tracks all schmancy-window instances: positions, z-indices, focus, visual states.\n * Components register on connectedCallback, unregister on disconnectedCallback.\n * Focus changes, position updates, and overlap queries all flow through here.\n *\n * Follows the ThemeService singleton pattern (theme/theme.service.ts).\n *\n * Example:\n * windowManager.register('chat-1', bounds, 'bottom-right')\n * windowManager.focus('chat-1') // bumps z-index, updates focusedId\n * const overlaps = windowManager.findOverlaps(projectedBounds, 'chat-1')\n */\n\nimport { BehaviorSubject, Observable, distinctUntilChanged, map } from 'rxjs'\nimport { overlayStack } from '../utils/overlay-stack.js'\nimport type { WindowBounds, WindowRecord, WindowRegistryState, SnapTarget } from './window-registry.js'\n\nconst STORAGE_PREFIX = 'schmancy-window-'\nconst LEGACY_STORAGE_PREFIX = 'schmancy-float-'\n\nclass WindowManagerService {\n\tprivate static instance: WindowManagerService\n\n\tprivate readonly _state$ = new BehaviorSubject<WindowRegistryState>({\n\t\twindows: new Map(),\n\t\tfocusedId: null,\n\t\tstackOrder: [],\n\t})\n\n\treadonly state$ = this._state$.asObservable()\n\n\tprivate constructor() {}\n\n\tstatic getInstance(): WindowManagerService {\n\t\tif (!WindowManagerService.instance) {\n\t\t\tWindowManagerService.instance = new WindowManagerService()\n\t\t}\n\t\treturn WindowManagerService.instance\n\t}\n\n\t// ── Synchronous accessors ──────────────────────────────────────────\n\n\tget windows(): Map<string, WindowRecord> {\n\t\treturn this._state$.value.windows\n\t}\n\n\tget focusedId(): string | null {\n\t\treturn this._state$.value.focusedId\n\t}\n\n\t// ── Registration ───────────────────────────────────────────────────\n\n\tregister(id: string, initialBounds: WindowBounds, snapTarget: SnapTarget): void {\n\t\tconst state = this._state$.value\n\t\tif (state.windows.has(id)) return\n\n\t\tconst zIndex = overlayStack.assignZIndex(id)\n\t\tconst record: WindowRecord = {\n\t\t\tid,\n\t\t\tbounds: initialBounds,\n\t\t\tvisualState: 'normal',\n\t\t\tzIndex,\n\t\t\topen: false,\n\t\t\tsnapTarget,\n\t\t}\n\n\t\tconst windows = new Map(state.windows)\n\t\twindows.set(id, record)\n\t\tconst stackOrder = overlayStack.getStackOrder()\n\n\t\tthis._state$.next({ ...state, windows, stackOrder })\n\t}\n\n\tunregister(id: string): void {\n\t\tconst state = this._state$.value\n\t\tif (!state.windows.has(id)) return\n\n\t\toverlayStack.releaseId(id)\n\t\tconst windows = new Map(state.windows)\n\t\twindows.delete(id)\n\t\tconst stackOrder = overlayStack.getStackOrder()\n\t\tconst focusedId = state.focusedId === id ? null : state.focusedId\n\n\t\tthis._state$.next({ ...state, windows, stackOrder, focusedId })\n\t}\n\n\t// ── State mutations ────────────────────────────────────────────────\n\n\tupdateBounds(id: string, bounds: WindowBounds): void {\n\t\tthis._updateRecord(id, { bounds })\n\t}\n\n\tupdateVisualState(id: string, visualState: WindowRecord['visualState']): void {\n\t\tthis._updateRecord(id, { visualState })\n\t}\n\n\tupdateOpen(id: string, open: boolean): void {\n\t\tthis._updateRecord(id, { open })\n\t}\n\n\tfocus(id: string): void {\n\t\tconst state = this._state$.value\n\t\tif (!state.windows.has(id)) return\n\t\tif (state.focusedId === id) return\n\n\t\tconst zIndex = overlayStack.bringToFront(id)\n\t\tconst windows = new Map(state.windows)\n\t\tconst record = windows.get(id)\n\t\tif (record) {\n\t\t\twindows.set(id, { ...record, zIndex })\n\t\t}\n\t\tconst stackOrder = overlayStack.getStackOrder()\n\n\t\tthis._state$.next({ ...state, windows, stackOrder, focusedId: id })\n\t}\n\n\t// ── Queries ────────────────────────────────────────────────────────\n\n\tfindOverlaps(bounds: WindowBounds, excludeId: string): WindowRecord[] {\n\t\tconst result: WindowRecord[] = []\n\t\tfor (const [id, record] of this._state$.value.windows) {\n\t\t\tif (id === excludeId) continue\n\t\t\tif (rectsOverlap(bounds, record.bounds)) {\n\t\t\t\tresult.push(record)\n\t\t\t}\n\t\t}\n\t\treturn result\n\t}\n\n\tgetNeighbors(id: string): WindowRecord[] {\n\t\tconst result: WindowRecord[] = []\n\t\tfor (const [otherId, record] of this._state$.value.windows) {\n\t\t\tif (otherId !== id) result.push(record)\n\t\t}\n\t\treturn result\n\t}\n\n\t// ── Selectors ──────────────────────────────────────────────────────\n\n\tselectWindow(id: string): Observable<WindowRecord | undefined> {\n\t\treturn this._state$.pipe(\n\t\t\tmap(state => state.windows.get(id)),\n\t\t\tdistinctUntilChanged(),\n\t\t)\n\t}\n\n\tselectFocused(): Observable<string | null> {\n\t\treturn this._state$.pipe(\n\t\t\tmap(state => state.focusedId),\n\t\t\tdistinctUntilChanged(),\n\t\t)\n\t}\n\n\t// ── Persistence ────────────────────────────────────────────────────\n\n\tloadPosition(id: string): { x: number; y: number; anchor: string } | null {\n\t\ttry {\n\t\t\t// Try new key first, fall back to legacy\n\t\t\tconst raw = localStorage.getItem(STORAGE_PREFIX + id) ?? localStorage.getItem(LEGACY_STORAGE_PREFIX + id)\n\t\t\tif (!raw) return null\n\t\t\treturn JSON.parse(raw) as { x: number; y: number; anchor: string }\n\t\t} catch {\n\t\t\treturn null\n\t\t}\n\t}\n\n\tsavePosition(id: string, data: { x: number; y: number; anchor: string }): void {\n\t\ttry {\n\t\t\tlocalStorage.setItem(STORAGE_PREFIX + id, JSON.stringify(data))\n\t\t} catch {\n\t\t\t// ignore\n\t\t}\n\t}\n\n\tclearPosition(id: string): void {\n\t\ttry {\n\t\t\tlocalStorage.removeItem(STORAGE_PREFIX + id)\n\t\t\tlocalStorage.removeItem(LEGACY_STORAGE_PREFIX + id)\n\t\t} catch {\n\t\t\t// ignore\n\t\t}\n\t}\n\n\t// ── Internal ───────────────────────────────────────────────────────\n\n\tprivate _updateRecord(id: string, updates: Partial<WindowRecord>): void {\n\t\tconst state = this._state$.value\n\t\tconst record = state.windows.get(id)\n\t\tif (!record) return\n\n\t\tconst windows = new Map(state.windows)\n\t\twindows.set(id, { ...record, ...updates })\n\t\tthis._state$.next({ ...state, windows })\n\t}\n}\n\n/** Simple rect overlap check (inline — no circular import with window-position) */\nfunction rectsOverlap(a: WindowBounds, b: WindowBounds): boolean {\n\treturn !(a.left >= b.left + b.width || a.left + a.width <= b.left || a.top >= b.top + b.height || a.top + a.height <= b.top)\n}\n\nexport const windowManager = WindowManagerService.getInstance()\n","/**\n * Window Position — pure functions for overlap resolution, cascade, and snapping.\n *\n * All functions are stateless: they take window bounds and viewport dimensions,\n * return new bounds. No side effects, no DOM access, no subscriptions.\n *\n * Example:\n * const projected = { left: 100, top: 400, width: 360, height: 500 }\n * const neighbors = windowManager.findOverlaps(projected, 'my-id')\n * const resolved = resolveOverlap(projected, neighbors, { width: 1440, height: 900 })\n * // → { left: 144, top: 444, width: 360, height: 500 } (cascaded away from conflict)\n */\n\nimport type { WindowBounds, WindowRecord } from './window-registry.js'\n\nconst HEAD_HEIGHT = 44\nconst CASCADE_OFFSET = HEAD_HEIGHT\nconst MAX_CASCADE_ATTEMPTS = 10\n\n/** Check if two rectangles overlap (edges touching does NOT count as overlap) */\nexport function rectsOverlap(a: WindowBounds, b: WindowBounds): boolean {\n\treturn !(a.left >= b.left + b.width || a.left + a.width <= b.left || a.top >= b.top + b.height || a.top + a.height <= b.top)\n}\n\n/**\n * Resolve overlap by cascading diagonally until no conflict.\n * Shifts by (HEAD_HEIGHT, HEAD_HEIGHT) per attempt, clamped to viewport.\n */\nexport function resolveOverlap(\n\tcandidate: WindowBounds,\n\texisting: WindowRecord[],\n\tviewport: { width: number; height: number },\n): WindowBounds {\n\tlet bounds = { ...candidate }\n\n\tfor (let attempt = 0; attempt < MAX_CASCADE_ATTEMPTS; attempt++) {\n\t\tconst hasOverlap = existing.some(w => rectsOverlap(bounds, w.bounds))\n\t\tif (!hasOverlap) break\n\n\t\tbounds = {\n\t\t\t...bounds,\n\t\t\tleft: bounds.left + CASCADE_OFFSET,\n\t\t\ttop: bounds.top + CASCADE_OFFSET,\n\t\t}\n\t}\n\n\treturn clampToViewport(bounds, viewport)\n}\n\n/**\n * Clamp bounds so the window stays fully within the viewport.\n */\nexport function clampToViewport(\n\tbounds: WindowBounds,\n\tviewport: { width: number; height: number },\n): WindowBounds {\n\treturn {\n\t\twidth: bounds.width,\n\t\theight: bounds.height,\n\t\tleft: Math.max(0, Math.min(bounds.left, viewport.width - bounds.width)),\n\t\ttop: Math.max(0, Math.min(bounds.top, viewport.height - bounds.height)),\n\t}\n}\n","import { $LitElement } from '@mixins/index'\nimport { css, html, nothing } from 'lit'\nimport { customElement, property, state } from 'lit/decorators.js'\nimport { classMap } from 'lit/directives/class-map.js'\nimport { createRef, ref } from 'lit/directives/ref.js'\nimport { styleMap } from 'lit/directives/style-map.js'\nimport {\n\tanimationFrameScheduler,\n\tauditTime,\n\tcatchError,\n\tEMPTY,\n\tfilter,\n\tfinalize,\n\tfrom,\n\tfromEvent,\n\tmap,\n\tmerge,\n\tObservable,\n\tswitchMap,\n\ttake,\n\ttakeUntil,\n\ttap,\n} from 'rxjs'\nimport { SPRING_SMOOTH, SPRING_SNAPPY } from '../utils/animation.js'\nimport { cursorGlow } from '../directives/cursor-glow'\nimport { reducedMotion$ } from '../directives/reduced-motion'\nimport { theme } from '../theme/theme.service.js'\nimport type { SnapCorner, WindowBounds, WindowVisualState } from './window-registry.js'\nimport { windowManager } from './window-manager.js'\nimport { resolveOverlap } from './window-position.js'\n\nconst HEAD_HEIGHT = 48\nconst DRAG_THRESHOLD = 5\n\ninterface Position {\n\tx: number\n\ty: number\n}\n\n@customElement('schmancy-window')\nexport default class SchmancyWindow extends $LitElement(css`\n\t:host {\n\t\tdisplay: contents;\n\t\tposition: relative;\n\t\tz-index: 1000;\n\t}\n\t:host([hidden]) {\n\t\tdisplay: none !important;\n\t}\n`) {\n\t@property({ type: String }) id: string = 'default'\n\t/** Override the expanded panel width (e.g. '320px', '24rem'). Defaults to responsive sizing. */\n\t@property({ type: String }) expandedWidth?: string\n\t/** Override the expanded panel height (e.g. '400px', '50vh'). */\n\t@property({ type: String }) expandedHeight?: string\n\t/** When true, uses a lower elevation shadow in the collapsed state. */\n\t@property({ type: Boolean, reflect: true }) lowered: boolean = false\n\t/** Corner the window is anchored to. */\n\t@property({ type: String }) corner: SnapCorner = 'bottom-right'\n\t/** When true, window can be resized by the user. */\n\t@property({ type: Boolean }) resizable = false\n\t/** When true, window stays at its dragged position instead of snapping to a corner. */\n\t@property({ type: Boolean }) freePosition = false\n\t/** Visual state of the window (minimized, normal, maximized). */\n\t@property({ type: String, reflect: true }) visualState: WindowVisualState = 'normal'\n\t/** Minimum width in pixels. */\n\t@property({ type: Number }) minWidth = 280\n\t/** Minimum height in pixels. */\n\t@property({ type: Number }) minHeight = 200\n\n\t/** Whether the body is expanded. */\n\t@property({ type: Boolean, reflect: true }) open = false\n\n\tprivate _currentAnimation?: Animation\n\n\t/** Lazy rendering: body content not in DOM until first expand. */\n\t@state() private _hasOpened = false\n\t/** Whether this window is the focused window in the manager — drives visual ring */\n\t@state() private _focused = false\n\n\t// Internal position -- plain fields, updated directly during drag\n\tprivate _position: Position = { x: 16, y: 16 }\n\t@state() private _currentCorner: SnapCorner = 'bottom-right'\n\n\t// Track applied corner to avoid unnecessary style.removeProperty calls during drag\n\tprivate _appliedCorner: string = ''\n\n\t// Refs\n\tprivate _containerRef = createRef<HTMLElement>()\n\tprivate _bodyRef = createRef<HTMLElement>()\n\tprivate _headRef = createRef<HTMLElement>()\n\n\t// ============================================\n\t// COMPUTED\n\t// ============================================\n\n\tprivate get panelWidth(): string {\n\t\treturn this.expandedWidth ?? 'min(360px, calc(100vw - 32px))'\n\t}\n\n\tprivate get isBottomCorner(): boolean {\n\t\treturn this._currentCorner.startsWith('bottom')\n\t}\n\n\tprivate get closedClipPath(): string {\n\t\treturn this.isBottomCorner\n\t\t\t? `inset(calc(100% - ${HEAD_HEIGHT}px) 0px 0px 0px round 22px)`\n\t\t\t: `inset(0px 0px calc(100% - ${HEAD_HEIGHT}px) 0px round 22px)`\n\t}\n\n\tprivate get openClipPath(): string {\n\t\treturn 'inset(0px 0px 0px 0px round 12px)'\n\t}\n\n\tprivate get elevation(): string {\n\t\tif (this.open) return '4'\n\t\treturn this.lowered ? '1' : '3'\n\t}\n\n\t// ============================================\n\t// POSITION MANAGEMENT\n\t// ============================================\n\n\tprivate _applyContainerPosition() {\n\t\tconst container = this._containerRef.value\n\t\tif (!container) return\n\t\t// Only clear position properties when corner changes (avoids 4 style invalidations per drag frame)\n\t\tif (this._appliedCorner !== this._currentCorner) {\n\t\t\tcontainer.style.removeProperty('left')\n\t\t\tcontainer.style.removeProperty('right')\n\t\t\tcontainer.style.removeProperty('top')\n\t\t\tcontainer.style.removeProperty('bottom')\n\t\t\tthis._appliedCorner = this._currentCorner\n\t\t}\n\t\tconst { x, y } = this._position\n\t\tif (this._currentCorner.includes('right')) {\n\t\t\tcontainer.style.right = `${x}px`\n\t\t} else {\n\t\t\tcontainer.style.left = `${x}px`\n\t\t}\n\t\tif (this._currentCorner.includes('bottom')) {\n\t\t\tcontainer.style.bottom = `${y + theme.bottomOffset}px`\n\t\t} else {\n\t\t\tcontainer.style.top = `${y}px`\n\t\t}\n\t}\n\n\tprivate static readonly VALID_CORNERS = new Set<string>(['top-left', 'top-right', 'bottom-left', 'bottom-right'])\n\n\tprivate _loadPosition() {\n\t\tconst saved = windowManager.loadPosition(this.id)\n\t\tif (saved) {\n\t\t\tthis._position = { x: saved.x, y: saved.y }\n\t\t\tif (SchmancyWindow.VALID_CORNERS.has(saved.anchor)) {\n\t\t\t\tthis._currentCorner = saved.anchor as SnapCorner\n\t\t\t}\n\t\t}\n\t}\n\n\tprivate _savePosition() {\n\t\twindowManager.savePosition(this.id, { ...this._position, anchor: this._currentCorner })\n\t}\n\n\tprivate _validateBounds() {\n\t\tconst container = this._containerRef.value\n\t\tif (!container) return\n\t\tconst rect = container.getBoundingClientRect()\n\t\tif (rect.width === 0) return\n\t\tconst vw = window.innerWidth\n\t\tconst vh = window.innerHeight\n\t\tconst isRight = this._currentCorner.includes('right')\n\t\tconst isBottom = this._currentCorner.includes('bottom')\n\t\tconst actualLeft = isRight ? vw - this._position.x - rect.width : this._position.x\n\t\tconst actualTop = isBottom ? vh - this._position.y - rect.height : this._position.y\n\t\tconst newLeft = Math.max(0, Math.min(actualLeft, vw - rect.width))\n\t\tconst newTop = Math.max(0, Math.min(actualTop, vh - rect.height))\n\t\tthis._position = {\n\t\t\tx: isRight ? vw - newLeft - rect.width : newLeft,\n\t\t\ty: isBottom ? vh - newTop - rect.height : newTop,\n\t\t}\n\t\tthis._applyContainerPosition()\n\t}\n\n\t// ============================================\n\t// CORNER SNAPPING\n\t// ============================================\n\n\tprivate _reorientToNearestCorner(skipAnimation = false): void {\n\t\t// Free position mode: skip corner snapping\n\t\tif (this.freePosition) {\n\t\t\tthis._savePosition()\n\t\t\tconst rect = this._containerRef.value?.getBoundingClientRect()\n\t\t\tif (rect) {\n\t\t\t\twindowManager.updateBounds(this.id, { left: rect.left, top: rect.top, width: rect.width, height: rect.height })\n\t\t\t}\n\t\t\treturn\n\t\t}\n\n\t\tconst container = this._containerRef.value\n\t\tif (!container) return\n\n\t\t// F -- record current screen position before DOM mutation\n\t\tconst rect = container.getBoundingClientRect()\n\n\t\t// L -- calculate nearest corner using head visual center\n\t\tconst currentIsBottom = this._currentCorner.includes('bottom')\n\t\tconst headCenterX = rect.left + rect.width / 2\n\t\tconst headCenterY = currentIsBottom\n\t\t\t? rect.bottom - HEAD_HEIGHT / 2\n\t\t\t: rect.top + HEAD_HEIGHT / 2\n\t\tconst side = headCenterX > window.innerWidth / 2 ? 'right' : 'left'\n\t\tconst vert = headCenterY > window.innerHeight / 2 ? 'bottom' : 'top'\n\t\tconst newCorner: SnapCorner = `${vert}-${side}` as SnapCorner\n\n\t\t// Snap corner and reset offset to standard edge gap\n\t\tthis._currentCorner = newCorner\n\t\tthis._position = { x: 16, y: 16 }\n\t\tthis._applyContainerPosition()\n\t\t// Sync clip-path to new corner\n\t\tif (!this.open) {\n\t\t\tcontainer.style.clipPath = this.closedClipPath\n\t\t}\n\n\t\tif (skipAnimation || reducedMotion$.value) {\n\t\t\tthis._savePosition()\n\t\t\tconst snapRect = container.getBoundingClientRect()\n\t\t\twindowManager.updateBounds(this.id, { left: snapRect.left, top: snapRect.top, width: snapRect.width, height: snapRect.height })\n\t\t\treturn\n\t\t}\n\n\t\t// I -- invert: shift element back to its original visual position\n\t\tconst newRect = container.getBoundingClientRect()\n\t\tconst dx = rect.left - newRect.left\n\t\tconst dy = rect.top - newRect.top\n\t\tcontainer.style.translate = `${dx}px ${dy}px`\n\n\t\t// P -- play: animate from the inverse offset to natural resting position\n\t\tconst flipKeyframes: Keyframe[] = [{ translate: `${dx}px ${dy}px` }, { translate: '0px 0px' }]\n\t\tconst anim = container.animate(\n\t\t\tflipKeyframes,\n\t\t\t{\n\t\t\t\tduration: SPRING_SMOOTH.duration,\n\t\t\t\teasing: SPRING_SMOOTH.easingFallback,\n\t\t\t\tfill: 'forwards',\n\t\t\t},\n\t\t)\n\t\tfrom(anim.finished).pipe(\n\t\t\ttake(1),\n\t\t\ttap(() => {\n\t\t\t\tif (container.isConnected) container.style.translate = ''\n\t\t\t\t// Report final resting bounds after animation completes\n\t\t\t\tconst finalRect = container.getBoundingClientRect()\n\t\t\t\twindowManager.updateBounds(this.id, { left: finalRect.left, top: finalRect.top, width: finalRect.width, height: finalRect.height })\n\t\t\t}),\n\t\t\tcatchError(() => EMPTY),\n\t\t\ttakeUntil(this.disconnecting),\n\t\t).subscribe()\n\n\t\tthis._savePosition()\n\t}\n\n\t// ============================================\n\t// DRAG PIPELINE\n\t// ============================================\n\n\tprivate _drag$(): Observable<never> {\n\t\treturn new Observable(() => {\n\t\t\tconst head = this._headRef.value\n\t\t\tconst container = this._containerRef.value\n\t\t\tif (!head || !container) return\n\n\t\t\tlet didDrag = false\n\n\t\t\tconst sub = fromEvent<PointerEvent>(head, 'pointerdown').pipe(\n\t\t\t\tfilter(e => e.button === 0),\n\t\t\t\tfilter(e => {\n\t\t\t\t\tconst tag = (e.target as HTMLElement).tagName?.toLowerCase()\n\t\t\t\t\treturn !['input', 'textarea', 'select', 'button'].includes(tag)\n\t\t\t\t\t\t&& !(e.target as HTMLElement).closest('schmancy-input, schmancy-icon-button, button, a')\n\t\t\t\t}),\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)\n\t\t\t\t.pipe(\n\t\t\t\t\tmap(e => {\n\t\t\t\t\t\tconst rect = container.getBoundingClientRect()\n\t\t\t\t\t\tconst isBottom = this._currentCorner.includes('bottom')\n\t\t\t\t\t\tconst wasOpen = this.open\n\t\t\t\t\t\tdidDrag = false\n\t\t\t\t\t\treturn {\n\t\t\t\t\t\t\tstartX: e.clientX,\n\t\t\t\t\t\t\tstartY: e.clientY,\n\t\t\t\t\t\t\toffsetX: e.clientX - rect.left,\n\t\t\t\t\t\t\toffsetY: e.clientY - rect.top,\n\t\t\t\t\t\t\trect,\n\t\t\t\t\t\t\tvw: window.innerWidth,\n\t\t\t\t\t\t\tvh: window.innerHeight,\n\t\t\t\t\t\t\tisBottom,\n\t\t\t\t\t\t\twasOpen,\n\t\t\t\t\t\t\tpointerId: e.pointerId,\n\t\t\t\t\t\t}\n\t\t\t\t\t}),\n\t\t\t\t\tswitchMap(({ startX, startY, offsetX, offsetY, rect, vw, vh, isBottom, wasOpen, pointerId }) => {\n\t\t\t\t\t\tconst move$ = fromEvent<PointerEvent>(window, 'pointermove').pipe(\n\t\t\t\t\t\t\tfilter(e => e.pointerId === pointerId),\n\t\t\t\t\t\t\tauditTime(0, animationFrameScheduler),\n\t\t\t\t\t\t\tmap(e => ({ clientX: e.clientX, clientY: e.clientY })),\n\t\t\t\t\t\t)\n\t\t\t\t\t\tconst end$ = fromEvent<PointerEvent>(window, 'pointerup').pipe(\n\t\t\t\t\t\t\tfilter(e => e.pointerId === pointerId),\n\t\t\t\t\t\t)\n\n\t\t\t\t\t\treturn move$.pipe(\n\t\t\t\t\t\t\ttap(({ clientX, clientY }) => {\n\t\t\t\t\t\t\t\tconst dx = clientX - startX\n\t\t\t\t\t\t\t\tconst dy = clientY - startY\n\t\t\t\t\t\t\t\tif (Math.sqrt(dx * dx + dy * dy) > DRAG_THRESHOLD && !didDrag) {\n\t\t\t\t\t\t\t\t\tdidDrag = true\n\t\t\t\t\t\t\t\t\tthis._applyDragVisuals(true)\n\t\t\t\t\t\t\t\t\t// Collapse on first confirmed drag move\n\t\t\t\t\t\t\t\t\tif (wasOpen) {\n\t\t\t\t\t\t\t\t\t\tthis.open = false\n\t\t\t\t\t\t\t\t\t\tcontainer.style.clipPath = this.closedClipPath\n\t\t\t\t\t\t\t\t\t\tcontainer.style.overflow = 'hidden'\n\t\t\t\t\t\t\t\t\t\tconst body = this._bodyRef.value\n\t\t\t\t\t\t\t\t\t\tif (body) {\n\t\t\t\t\t\t\t\t\t\t\tbody.inert = true\n\t\t\t\t\t\t\t\t\t\t\tbody.style.visibility = 'hidden'\n\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\tif (!didDrag) return\n\n\t\t\t\t\t\t\t\tconst left = Math.max(0, Math.min(clientX - offsetX, vw - rect.width))\n\t\t\t\t\t\t\t\tconst minTop = isBottom ? HEAD_HEIGHT - rect.height : 0\n\t\t\t\t\t\t\t\tconst maxTop = isBottom ? vh - rect.height : vh - HEAD_HEIGHT\n\t\t\t\t\t\t\t\tconst top = Math.max(minTop, Math.min(clientY - offsetY, maxTop))\n\n\t\t\t\t\t\t\t\tthis._position = {\n\t\t\t\t\t\t\t\t\tx: this._currentCorner.includes('right') ? vw - left - rect.width : left,\n\t\t\t\t\t\t\t\t\ty: isBottom ? vh - top - rect.height : top,\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\tthis._applyContainerPosition()\n\t\t\t\t\t\t\t}),\n\t\t\t\t\t\t\ttakeUntil(end$),\n\t\t\t\t\t\t\tfinalize(() => {\n\t\t\t\t\t\t\t\tif (didDrag) {\n\t\t\t\t\t\t\t\t\tthis._reorientToNearestCorner()\n\t\t\t\t\t\t\t\t\tthis._applyDragVisuals(false)\n\t\t\t\t\t\t\t\t\tdidDrag = false\n\t\t\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\t\t\tdidDrag = false\n\t\t\t\t\t\t\t\t\tthis.toggle()\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t}),\n\t\t\t\t\t\t)\n\t\t\t\t\t}),\n\t\t\t\t)\n\t\t\t\t.subscribe()\n\n\t\t\treturn () => sub.unsubscribe()\n\t\t})\n\t}\n\n\t// ============================================\n\t// LIFECYCLE\n\t// ============================================\n\n\tconnectedCallback() {\n\t\tsuper.connectedCallback()\n\n\t\t// Pipeline 1: DOM setup + manager registration + drag + z-index sync\n\t\tfrom(this.updateComplete).pipe(\n\t\t\ttake(1),\n\t\t\ttap(() => {\n\t\t\t\tthis._currentCorner = this.corner\n\t\t\t\tthis._loadPosition()\n\t\t\t\tthis._applyContainerPosition()\n\t\t\t\tthis._initDOMState()\n\t\t\t\t// Register with window manager\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\tconst bounds: WindowBounds = { left: rect.left, top: rect.top, width: rect.width, height: rect.height }\n\t\t\t\t\twindowManager.register(this.id, bounds, this.freePosition ? 'free' : this._currentCorner)\n\t\t\t\t}\n\t\t\t}),\n\t\t\tswitchMap(() => merge(\n\t\t\t\tthis._drag$(),\n\t\t\t\twindowManager.selectWindow(this.id).pipe(\n\t\t\t\t\ttap(record => {\n\t\t\t\t\t\tif (!record) return\n\t\t\t\t\t\tconst container = this._containerRef.value\n\t\t\t\t\t\tif (container) container.style.zIndex = String(record.zIndex)\n\t\t\t\t\t}),\n\t\t\t\t),\n\t\t\t\twindowManager.selectFocused().pipe(\n\t\t\t\t\ttap(focusedId => {\n\t\t\t\t\t\tthis._focused = focusedId === this.id\n\t\t\t\t\t}),\n\t\t\t\t),\n\t\t\t)),\n\t\t\ttakeUntil(this.disconnecting),\n\t\t).subscribe()\n\n\n\t\t// Pipeline 3: Environment -- one subscription\n\t\tmerge(\n\t\t\tfromEvent(window, 'resize').pipe(\n\t\t\t\tauditTime(0, animationFrameScheduler),\n\t\t\t\ttap(() => this._validateBounds()),\n\t\t\t),\n\t\t\ttheme.bottomOffset$.pipe(\n\t\t\t\ttap(() => this._applyContainerPosition()),\n\t\t\t),\n\t\t).pipe(takeUntil(this.disconnecting)).subscribe()\n\t}\n\n\tdisconnectedCallback() {\n\t\tsuper.disconnectedCallback()\n\t\twindowManager.unregister(this.id)\n\t}\n\n\tprivate _initDOMState() {\n\t\tconst container = this._containerRef.value\n\t\tconst body = this._bodyRef.value\n\t\tif (!container) return\n\n\t\tthis._applyContainerPosition()\n\n\t\tif (this.open) {\n\t\t\tthis._hasOpened = true\n\t\t\tcontainer.style.overflow = ''\n\t\t\tif (body) {\n\t\t\t\tbody.inert = false\n\t\t\t\tbody.style.visibility = 'visible'\n\t\t\t}\n\t\t} else {\n\t\t\tcontainer.style.clipPath = this.closedClipPath\n\t\t\tcontainer.style.overflow = 'hidden'\n\t\t\tif (body) {\n\t\t\t\tbody.inert = true\n\t\t\t\tbody.style.visibility = 'hidden'\n\t\t\t}\n\t\t}\n\t}\n\n\t// ============================================\n\t// ANIMATION\n\t// ============================================\n\n\tprivate _animateOpen() {\n\t\tconst container = this._containerRef.value\n\t\tconst body = this._bodyRef.value\n\t\tif (!container) return\n\n\t\tthis._hasOpened = true\n\t\tthis.open = true\n\n\t\t// Overlap avoidance\n\t\tconst rect = container.getBoundingClientRect()\n\t\tconst projectedBounds: WindowBounds = {\n\t\t\tleft: rect.left,\n\t\t\ttop: this.isBottomCorner ? rect.top - 400 : rect.top,\n\t\t\twidth: rect.width,\n\t\t\theight: 400 + HEAD_HEIGHT,\n\t\t}\n\t\tconst overlaps = windowManager.findOverlaps(projectedBounds, this.id)\n\t\tif (overlaps.length > 0) {\n\t\t\tconst resolved = resolveOverlap(projectedBounds, overlaps, { width: window.innerWidth, height: window.innerHeight })\n\t\t\tif (Math.abs(resolved.left - projectedBounds.left) > 10 || Math.abs(resolved.top - projectedBounds.top) > 10) {\n\t\t\t\tconst isRight = this._currentCorner.includes('right')\n\t\t\t\tconst isBottom = this._currentCorner.includes('bottom')\n\t\t\t\tthis._position = {\n\t\t\t\t\tx: isRight ? window.innerWidth - resolved.left - resolved.width : resolved.left,\n\t\t\t\t\ty: isBottom ? window.innerHeight - resolved.top - resolved.height : resolved.top,\n\t\t\t\t}\n\t\t\t\tthis._applyContainerPosition()\n\t\t\t}\n\t\t}\n\n\t\tif (body) {\n\t\t\tbody.style.visibility = 'visible'\n\t\t\tbody.inert = false\n\t\t}\n\n\t\tif (reducedMotion$.value) {\n\t\t\tcontainer.style.clipPath = ''\n\t\t\tcontainer.style.overflow = ''\n\t\t\tthis.dispatchScopedEvent('window-toggle', { state: 'expanded' })\n\t\t\treturn\n\t\t}\n\n\t\tthis._currentAnimation?.cancel()\n\t\tcontainer.style.overflow = 'hidden'\n\t\tcontainer.style.willChange = 'opacity'\n\t\tconst openKeyframes: Keyframe[] = [\n\t\t\t{ clipPath: this.closedClipPath, opacity: 0.95 },\n\t\t\t{ clipPath: this.openClipPath, opacity: 1 },\n\t\t]\n\t\tconst anim = container.animate(openKeyframes, {\n\t\t\tduration: SPRING_SNAPPY.duration,\n\t\t\teasing: SPRING_SNAPPY.easingFallback,\n\t\t\tfill: 'forwards',\n\t\t})\n\t\tthis._currentAnimation = anim\n\n\t\tfrom(anim.finished).pipe(\n\t\t\ttake(1),\n\t\t\ttap(() => {\n\t\t\t\tif (container.isConnected) {\n\t\t\t\t\tcontainer.style.clipPath = ''\n\t\t\t\t\tcontainer.style.overflow = ''\n\t\t\t\t\tcontainer.style.willChange = ''\n\t\t\t\t}\n\t\t\t}),\n\t\t\tcatchError(() => EMPTY),\n\t\t\ttakeUntil(this.disconnecting),\n\t\t).subscribe()\n\n\t\tthis.dispatchScopedEvent('window-toggle', { state: 'expanded' })\n\t}\n\n\tprivate _animateClose() {\n\t\tconst container = this._containerRef.value\n\t\tif (!container) return\n\n\t\tif (reducedMotion$.value) {\n\t\t\tcontainer.style.clipPath = this.closedClipPath\n\t\t\tcontainer.style.overflow = 'hidden'\n\t\t\tthis.open = false\n\t\t\tconst body = this._bodyRef.value\n\t\t\tif (body) { body.inert = true; body.style.visibility = 'hidden' }\n\t\t\tthis.dispatchScopedEvent('window-toggle', { state: 'collapsed' })\n\t\t\treturn\n\t\t}\n\n\t\tthis._currentAnimation?.cancel()\n\t\tcontainer.style.overflow = 'hidden'\n\t\tcontainer.style.willChange = 'opacity'\n\t\tconst closeKeyframes: Keyframe[] = [\n\t\t\t{ clipPath: this.openClipPath, opacity: 1 },\n\t\t\t{ clipPath: this.closedClipPath, opacity: 0.95 },\n\t\t]\n\t\tconst anim = container.animate(closeKeyframes, {\n\t\t\tduration: Math.round(SPRING_SNAPPY.duration * 0.7),\n\t\t\teasing: 'cubic-bezier(0.4, 0, 0.8, 0.15)',\n\t\t\tfill: 'forwards',\n\t\t})\n\t\tthis._currentAnimation = anim\n\n\t\tfrom(anim.finished).pipe(\n\t\t\ttake(1),\n\t\t\ttap(() => {\n\t\t\t\tthis.open = false\n\t\t\t\tcontainer.style.willChange = ''\n\t\t\t\tconst body = this._bodyRef.value\n\t\t\t\tif (body) { body.inert = true; body.style.visibility = 'hidden' }\n\t\t\t}),\n\t\t\tcatchError(() => EMPTY),\n\t\t\ttakeUntil(this.disconnecting),\n\t\t).subscribe()\n\n\t\tthis.dispatchScopedEvent('window-toggle', { state: 'collapsed' })\n\t}\n\n\t// ============================================\n\t// VISUAL STATE HELPERS\n\t// ============================================\n\n\t/** Apply drag visuals directly on DOM refs — avoids full Lit re-render for cursor + opacity */\n\tprivate _applyDragVisuals(dragging: boolean) {\n\t\tconst head = this._headRef.value\n\t\tconst container = this._containerRef.value\n\t\tif (head) {\n\t\t\thead.classList.toggle('cursor-grabbing', dragging)\n\t\t\thead.classList.toggle('cursor-move', !dragging)\n\t\t}\n\t\tif (container) {\n\t\t\tcontainer.style.opacity = dragging ? '0.95' : ''\n\t\t}\n\t}\n\n\tprivate _handleFocus = () => windowManager.focus(this.id)\n\n\tprivate _handleHeadKeydown = (e: KeyboardEvent) => {\n\t\tif (e.key === 'Enter' || e.key === ' ') {\n\t\t\te.preventDefault()\n\t\t\tthis.toggle()\n\t\t\treturn\n\t\t}\n\t\tif (e.key === 'ArrowUp' || e.key === 'ArrowDown' || e.key === 'ArrowLeft' || e.key === 'ArrowRight') {\n\t\t\te.preventDefault()\n\t\t\tconst step = e.shiftKey ? 20 : 5\n\t\t\tconst dx = e.key === 'ArrowRight' ? step : e.key === 'ArrowLeft' ? -step : 0\n\t\t\tconst dy = e.key === 'ArrowDown' ? step : e.key === 'ArrowUp' ? -step : 0\n\t\t\tthis._position = { x: this._position.x + dx, y: this._position.y + dy }\n\t\t\tthis._applyContainerPosition()\n\t\t\tthis._savePosition()\n\t\t}\n\t}\n\n\t// ============================================\n\t// PUBLIC API\n\t// ============================================\n\n\ttoggle() {\n\t\tif (this.open) this._animateClose()\n\t\telse this._animateOpen()\n\t}\n\n\texpand() {\n\t\tif (this.open) return\n\t\tthis._animateOpen()\n\t}\n\n\tclose() {\n\t\tif (!this.open) return\n\t\tthis._animateClose()\n\t}\n\n\t// ============================================\n\t// RENDER\n\t// ============================================\n\n\tprotected render(): unknown {\n\t\tconst isBottom = this._currentCorner.startsWith('bottom')\n\n\t\tconst containerClasses = classMap({\n\t\t\tfixed: true,\n\t\t\tflex: true,\n\t\t\t'flex-col': isBottom,\n\t\t\t'flex-col-reverse': !isBottom,\n\t\t\t'z-1000': true,\n\t\t\t'ring-1': !this._focused,\n\t\t\t'ring-2': this._focused,\n\t\t\t'ring-primary-default/30': this._focused,\n\t\t\t'ring-primary-default/15': this.open && !this._focused,\n\t\t\t'rounded-2xl': this.open,\n\t\t\t'ring-outline-variant/40': !this.open && !this._focused,\n\t\t\t'rounded-[22px]': !this.open,\n\t\t\t'overflow-hidden': true,\n\t\t})\n\n\t\tconst containerStyles = styleMap({\n\t\t\twidth: this.panelWidth,\n\t\t\t'max-height': 'calc(100vh - 32px)',\n\t\t\t'pointer-events': 'none',\n\t\t})\n\n\t\tconst bodyStyles = styleMap({\n\t\t\t'pointer-events': this.open ? 'auto' : 'none',\n\t\t})\n\n\t\tconst headClasses = classMap({\n\t\t\t'h-full': true,\n\t\t\t'px-3': true,\n\t\t\tflex: true,\n\t\t\t'items-center': true,\n\t\t\t'gap-2': true,\n\t\t\t'select-none': true,\n\t\t\t'cursor-move': true,\n\t\t})\n\n\t\treturn html`\n\t\t\t<schmancy-surface\n\t\t\t\t${ref(this._containerRef)}\n\t\t\t\ttype=\"glass\"\n\t\t\t\televation=\"${this.elevation}\"\n\t\t\t\tclass=${containerClasses}\n\t\t\t\tstyle=${containerStyles}\n\t\t\t\taria-expanded=${this.open}\n\t\t\t\t@pointerdown=${this._handleFocus}\n\t\t\t>\n\t\t\t\t<!-- Details section (visually above summary for bottom corners) -->\n\t\t\t\t<section\n\t\t\t\t\t${ref(this._bodyRef)}\n\t\t\t\t\tclass=\"flex-1 min-h-0 overflow-hidden flex flex-col\"\n\t\t\t\t\tstyle=${bodyStyles}\n\t\t\t\t\trole=\"region\"\n\t\t\t\t\taria-label=\"Expandable content\"\n\t\t\t\t>\n\t\t\t\t\t${this._hasOpened ? html`<slot name=\"details\"></slot>` : nothing}\n\t\t\t\t</section>\n\n\t\t\t\t<!-- Summary section -- always interactive, always visible -->\n\t\t\t\t<section\n\t\t\t\t\tclass=\"shrink-0 bg-surface-lowest\"\n\t\t\t\t\tstyle=${styleMap({ 'pointer-events': 'auto', height: `${HEAD_HEIGHT}px` })}\n\t\t\t\t>\n\t\t\t\t\t<div\n\t\t\t\t\t\t${ref(this._headRef)}\n\t\t\t\t\t\t${cursorGlow({ radius: 200, intensity: 0.10 })}\n\t\t\t\t\t\tclass=${headClasses}\n\t\t\t\t\t\trole=\"button\"\n\t\t\t\t\t\ttabindex=\"0\"\n\t\t\t\t\t\ttitle=\"Drag to move, click to expand\"\n\t\t\t\t\t\taria-label=\"${this.open ? 'Collapse window' : 'Expand window'}\"\n\t\t\t\t\t\t@keydown=${this._handleHeadKeydown}\n\t\t\t\t\t>\n\t\t\t\t\t\t<div class=\"flex-1 min-w-0\">\n\t\t\t\t\t\t\t<slot></slot>\n\t\t\t\t\t\t</div>\n\t\t\t\t\t\t<svg\n\t\t\t\t\t\t\twidth=\"16\" height=\"16\" viewBox=\"0 0 24 24\" fill=\"none\"\n\t\t\t\t\t\t\tclass=\"shrink-0 text-surface-on/40 transition-transform duration-200 ${this.open ? 'rotate-180' : ''}\"\n\t\t\t\t\t\t\taria-hidden=\"true\"\n\t\t\t\t\t\t>\n\t\t\t\t\t\t\t<path d=\"M6 9L12 15L18 9\" stroke=\"currentColor\" stroke-width=\"2\" stroke-linecap=\"round\" stroke-linejoin=\"round\" />\n\t\t\t\t\t\t</svg>\n\t\t\t\t\t</div>\n\t\t\t\t</section>\n\t\t\t</schmancy-surface>\n\t\t`\n\t}\n}\n\ndeclare global {\n\tinterface HTMLEl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
1
|
+
import { t as e } from "./decorate-D_utPUsC.js";
|
|
2
|
+
import { t } from "./litElement.mixin-CncaUoxz.js";
|
|
3
3
|
import "./mixins.js";
|
|
4
|
-
import { d as n, f as r } from "./animation-
|
|
5
|
-
import { t as i } from "./reduced-motion-
|
|
6
|
-
import { t as a } from "./cursor-glow-
|
|
7
|
-
import { n as o } from "./theme.service-
|
|
8
|
-
import { t as s } from "./overlay-stack-
|
|
4
|
+
import { d as n, f as r } from "./animation-CXKSuUoE.js";
|
|
5
|
+
import { t as i } from "./reduced-motion-B83yZbcO.js";
|
|
6
|
+
import { t as a } from "./cursor-glow-C2YRrB8Z.js";
|
|
7
|
+
import { n as o } from "./theme.service-_qP5WvB9.js";
|
|
8
|
+
import { t as s } from "./overlay-stack-Ca4EK2Mu.js";
|
|
9
9
|
import { BehaviorSubject as c, EMPTY as l, Observable as u, animationFrameScheduler as d, auditTime as f, catchError as p, distinctUntilChanged as m, filter as h, finalize as g, from as _, fromEvent as v, map as y, merge as b, switchMap as x, take as S, takeUntil as C, tap as w } from "rxjs";
|
|
10
10
|
import { classMap as T } from "lit/directives/class-map.js";
|
|
11
11
|
import { styleMap as E } from "lit/directives/style-map.js";
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"window-WnAihpsA.js","names":[],"sources":["../src/window/window-manager.ts","../src/window/window-position.ts","../src/window/window.ts"],"sourcesContent":["/**\n * Window Manager — singleton service for multi-window coordination.\n *\n * Tracks all schmancy-window instances: positions, z-indices, focus, visual states.\n * Components register on connectedCallback, unregister on disconnectedCallback.\n * Focus changes, position updates, and overlap queries all flow through here.\n *\n * Follows the ThemeService singleton pattern (theme/theme.service.ts).\n *\n * Example:\n * windowManager.register('chat-1', bounds, 'bottom-right')\n * windowManager.focus('chat-1') // bumps z-index, updates focusedId\n * const overlaps = windowManager.findOverlaps(projectedBounds, 'chat-1')\n */\n\nimport { BehaviorSubject, Observable, distinctUntilChanged, map } from 'rxjs'\nimport { overlayStack } from '../utils/overlay-stack.js'\nimport type { WindowBounds, WindowRecord, WindowRegistryState, SnapTarget } from './window-registry.js'\n\nconst STORAGE_PREFIX = 'schmancy-window-'\nconst LEGACY_STORAGE_PREFIX = 'schmancy-float-'\n\nclass WindowManagerService {\n\tprivate static instance: WindowManagerService\n\n\tprivate readonly _state$ = new BehaviorSubject<WindowRegistryState>({\n\t\twindows: new Map(),\n\t\tfocusedId: null,\n\t\tstackOrder: [],\n\t})\n\n\treadonly state$ = this._state$.asObservable()\n\n\tprivate constructor() {}\n\n\tstatic getInstance(): WindowManagerService {\n\t\tif (!WindowManagerService.instance) {\n\t\t\tWindowManagerService.instance = new WindowManagerService()\n\t\t}\n\t\treturn WindowManagerService.instance\n\t}\n\n\t// ── Synchronous accessors ──────────────────────────────────────────\n\n\tget windows(): Map<string, WindowRecord> {\n\t\treturn this._state$.value.windows\n\t}\n\n\tget focusedId(): string | null {\n\t\treturn this._state$.value.focusedId\n\t}\n\n\t// ── Registration ───────────────────────────────────────────────────\n\n\tregister(id: string, initialBounds: WindowBounds, snapTarget: SnapTarget): void {\n\t\tconst state = this._state$.value\n\t\tif (state.windows.has(id)) return\n\n\t\tconst zIndex = overlayStack.assignZIndex(id)\n\t\tconst record: WindowRecord = {\n\t\t\tid,\n\t\t\tbounds: initialBounds,\n\t\t\tvisualState: 'normal',\n\t\t\tzIndex,\n\t\t\topen: false,\n\t\t\tsnapTarget,\n\t\t}\n\n\t\tconst windows = new Map(state.windows)\n\t\twindows.set(id, record)\n\t\tconst stackOrder = overlayStack.getStackOrder()\n\n\t\tthis._state$.next({ ...state, windows, stackOrder })\n\t}\n\n\tunregister(id: string): void {\n\t\tconst state = this._state$.value\n\t\tif (!state.windows.has(id)) return\n\n\t\toverlayStack.releaseId(id)\n\t\tconst windows = new Map(state.windows)\n\t\twindows.delete(id)\n\t\tconst stackOrder = overlayStack.getStackOrder()\n\t\tconst focusedId = state.focusedId === id ? null : state.focusedId\n\n\t\tthis._state$.next({ ...state, windows, stackOrder, focusedId })\n\t}\n\n\t// ── State mutations ────────────────────────────────────────────────\n\n\tupdateBounds(id: string, bounds: WindowBounds): void {\n\t\tthis._updateRecord(id, { bounds })\n\t}\n\n\tupdateVisualState(id: string, visualState: WindowRecord['visualState']): void {\n\t\tthis._updateRecord(id, { visualState })\n\t}\n\n\tupdateOpen(id: string, open: boolean): void {\n\t\tthis._updateRecord(id, { open })\n\t}\n\n\tfocus(id: string): void {\n\t\tconst state = this._state$.value\n\t\tif (!state.windows.has(id)) return\n\t\tif (state.focusedId === id) return\n\n\t\tconst zIndex = overlayStack.bringToFront(id)\n\t\tconst windows = new Map(state.windows)\n\t\tconst record = windows.get(id)\n\t\tif (record) {\n\t\t\twindows.set(id, { ...record, zIndex })\n\t\t}\n\t\tconst stackOrder = overlayStack.getStackOrder()\n\n\t\tthis._state$.next({ ...state, windows, stackOrder, focusedId: id })\n\t}\n\n\t// ── Queries ────────────────────────────────────────────────────────\n\n\tfindOverlaps(bounds: WindowBounds, excludeId: string): WindowRecord[] {\n\t\tconst result: WindowRecord[] = []\n\t\tfor (const [id, record] of this._state$.value.windows) {\n\t\t\tif (id === excludeId) continue\n\t\t\tif (rectsOverlap(bounds, record.bounds)) {\n\t\t\t\tresult.push(record)\n\t\t\t}\n\t\t}\n\t\treturn result\n\t}\n\n\tgetNeighbors(id: string): WindowRecord[] {\n\t\tconst result: WindowRecord[] = []\n\t\tfor (const [otherId, record] of this._state$.value.windows) {\n\t\t\tif (otherId !== id) result.push(record)\n\t\t}\n\t\treturn result\n\t}\n\n\t// ── Selectors ──────────────────────────────────────────────────────\n\n\tselectWindow(id: string): Observable<WindowRecord | undefined> {\n\t\treturn this._state$.pipe(\n\t\t\tmap(state => state.windows.get(id)),\n\t\t\tdistinctUntilChanged(),\n\t\t)\n\t}\n\n\tselectFocused(): Observable<string | null> {\n\t\treturn this._state$.pipe(\n\t\t\tmap(state => state.focusedId),\n\t\t\tdistinctUntilChanged(),\n\t\t)\n\t}\n\n\t// ── Persistence ────────────────────────────────────────────────────\n\n\tloadPosition(id: string): { x: number; y: number; anchor: string } | null {\n\t\ttry {\n\t\t\t// Try new key first, fall back to legacy\n\t\t\tconst raw = localStorage.getItem(STORAGE_PREFIX + id) ?? localStorage.getItem(LEGACY_STORAGE_PREFIX + id)\n\t\t\tif (!raw) return null\n\t\t\treturn JSON.parse(raw) as { x: number; y: number; anchor: string }\n\t\t} catch {\n\t\t\treturn null\n\t\t}\n\t}\n\n\tsavePosition(id: string, data: { x: number; y: number; anchor: string }): void {\n\t\ttry {\n\t\t\tlocalStorage.setItem(STORAGE_PREFIX + id, JSON.stringify(data))\n\t\t} catch {\n\t\t\t// ignore\n\t\t}\n\t}\n\n\tclearPosition(id: string): void {\n\t\ttry {\n\t\t\tlocalStorage.removeItem(STORAGE_PREFIX + id)\n\t\t\tlocalStorage.removeItem(LEGACY_STORAGE_PREFIX + id)\n\t\t} catch {\n\t\t\t// ignore\n\t\t}\n\t}\n\n\t// ── Internal ───────────────────────────────────────────────────────\n\n\tprivate _updateRecord(id: string, updates: Partial<WindowRecord>): void {\n\t\tconst state = this._state$.value\n\t\tconst record = state.windows.get(id)\n\t\tif (!record) return\n\n\t\tconst windows = new Map(state.windows)\n\t\twindows.set(id, { ...record, ...updates })\n\t\tthis._state$.next({ ...state, windows })\n\t}\n}\n\n/** Simple rect overlap check (inline — no circular import with window-position) */\nfunction rectsOverlap(a: WindowBounds, b: WindowBounds): boolean {\n\treturn !(a.left >= b.left + b.width || a.left + a.width <= b.left || a.top >= b.top + b.height || a.top + a.height <= b.top)\n}\n\nexport const windowManager = WindowManagerService.getInstance()\n","/**\n * Window Position — pure functions for overlap resolution, cascade, and snapping.\n *\n * All functions are stateless: they take window bounds and viewport dimensions,\n * return new bounds. No side effects, no DOM access, no subscriptions.\n *\n * Example:\n * const projected = { left: 100, top: 400, width: 360, height: 500 }\n * const neighbors = windowManager.findOverlaps(projected, 'my-id')\n * const resolved = resolveOverlap(projected, neighbors, { width: 1440, height: 900 })\n * // → { left: 144, top: 444, width: 360, height: 500 } (cascaded away from conflict)\n */\n\nimport type { WindowBounds, WindowRecord } from './window-registry.js'\n\nconst HEAD_HEIGHT = 44\nconst CASCADE_OFFSET = HEAD_HEIGHT\nconst MAX_CASCADE_ATTEMPTS = 10\n\n/** Check if two rectangles overlap (edges touching does NOT count as overlap) */\nexport function rectsOverlap(a: WindowBounds, b: WindowBounds): boolean {\n\treturn !(a.left >= b.left + b.width || a.left + a.width <= b.left || a.top >= b.top + b.height || a.top + a.height <= b.top)\n}\n\n/**\n * Resolve overlap by cascading diagonally until no conflict.\n * Shifts by (HEAD_HEIGHT, HEAD_HEIGHT) per attempt, clamped to viewport.\n */\nexport function resolveOverlap(\n\tcandidate: WindowBounds,\n\texisting: WindowRecord[],\n\tviewport: { width: number; height: number },\n): WindowBounds {\n\tlet bounds = { ...candidate }\n\n\tfor (let attempt = 0; attempt < MAX_CASCADE_ATTEMPTS; attempt++) {\n\t\tconst hasOverlap = existing.some(w => rectsOverlap(bounds, w.bounds))\n\t\tif (!hasOverlap) break\n\n\t\tbounds = {\n\t\t\t...bounds,\n\t\t\tleft: bounds.left + CASCADE_OFFSET,\n\t\t\ttop: bounds.top + CASCADE_OFFSET,\n\t\t}\n\t}\n\n\treturn clampToViewport(bounds, viewport)\n}\n\n/**\n * Clamp bounds so the window stays fully within the viewport.\n */\nexport function clampToViewport(\n\tbounds: WindowBounds,\n\tviewport: { width: number; height: number },\n): WindowBounds {\n\treturn {\n\t\twidth: bounds.width,\n\t\theight: bounds.height,\n\t\tleft: Math.max(0, Math.min(bounds.left, viewport.width - bounds.width)),\n\t\ttop: Math.max(0, Math.min(bounds.top, viewport.height - bounds.height)),\n\t}\n}\n","import { $LitElement } from '@mixins/index'\nimport { css, html, nothing } from 'lit'\nimport { customElement, property, state } from 'lit/decorators.js'\nimport { classMap } from 'lit/directives/class-map.js'\nimport { createRef, ref } from 'lit/directives/ref.js'\nimport { styleMap } from 'lit/directives/style-map.js'\nimport {\n\tanimationFrameScheduler,\n\tauditTime,\n\tcatchError,\n\tEMPTY,\n\tfilter,\n\tfinalize,\n\tfrom,\n\tfromEvent,\n\tmap,\n\tmerge,\n\tObservable,\n\tswitchMap,\n\ttake,\n\ttakeUntil,\n\ttap,\n} from 'rxjs'\nimport { SPRING_SMOOTH, SPRING_SNAPPY } from '../utils/animation.js'\nimport { cursorGlow } from '../directives/cursor-glow'\nimport { reducedMotion$ } from '../directives/reduced-motion'\nimport { theme } from '../theme/theme.service.js'\nimport type { SnapCorner, WindowBounds, WindowVisualState } from './window-registry.js'\nimport { windowManager } from './window-manager.js'\nimport { resolveOverlap } from './window-position.js'\n\nconst HEAD_HEIGHT = 48\nconst DRAG_THRESHOLD = 5\n\ninterface Position {\n\tx: number\n\ty: number\n}\n\n@customElement('schmancy-window')\nexport default class SchmancyWindow extends $LitElement(css`\n\t:host {\n\t\tdisplay: contents;\n\t\tposition: relative;\n\t\tz-index: 1000;\n\t}\n\t:host([hidden]) {\n\t\tdisplay: none !important;\n\t}\n`) {\n\t@property({ type: String }) id: string = 'default'\n\t/** Override the expanded panel width (e.g. '320px', '24rem'). Defaults to responsive sizing. */\n\t@property({ type: String }) expandedWidth?: string\n\t/** Override the expanded panel height (e.g. '400px', '50vh'). */\n\t@property({ type: String }) expandedHeight?: string\n\t/** When true, uses a lower elevation shadow in the collapsed state. */\n\t@property({ type: Boolean, reflect: true }) lowered: boolean = false\n\t/** Corner the window is anchored to. */\n\t@property({ type: String }) corner: SnapCorner = 'bottom-right'\n\t/** When true, window can be resized by the user. */\n\t@property({ type: Boolean }) resizable = false\n\t/** When true, window stays at its dragged position instead of snapping to a corner. */\n\t@property({ type: Boolean }) freePosition = false\n\t/** Visual state of the window (minimized, normal, maximized). */\n\t@property({ type: String, reflect: true }) visualState: WindowVisualState = 'normal'\n\t/** Minimum width in pixels. */\n\t@property({ type: Number }) minWidth = 280\n\t/** Minimum height in pixels. */\n\t@property({ type: Number }) minHeight = 200\n\n\t/** Whether the body is expanded. */\n\t@property({ type: Boolean, reflect: true }) open = false\n\n\tprivate _currentAnimation?: Animation\n\n\t/** Lazy rendering: body content not in DOM until first expand. */\n\t@state() private _hasOpened = false\n\t/** Whether this window is the focused window in the manager — drives visual ring */\n\t@state() private _focused = false\n\n\t// Internal position -- plain fields, updated directly during drag\n\tprivate _position: Position = { x: 16, y: 16 }\n\t@state() private _currentCorner: SnapCorner = 'bottom-right'\n\n\t// Track applied corner to avoid unnecessary style.removeProperty calls during drag\n\tprivate _appliedCorner: string = ''\n\n\t// Refs\n\tprivate _containerRef = createRef<HTMLElement>()\n\tprivate _bodyRef = createRef<HTMLElement>()\n\tprivate _headRef = createRef<HTMLElement>()\n\n\t// ============================================\n\t// COMPUTED\n\t// ============================================\n\n\tprivate get panelWidth(): string {\n\t\treturn this.expandedWidth ?? 'min(360px, calc(100vw - 32px))'\n\t}\n\n\tprivate get isBottomCorner(): boolean {\n\t\treturn this._currentCorner.startsWith('bottom')\n\t}\n\n\tprivate get closedClipPath(): string {\n\t\treturn this.isBottomCorner\n\t\t\t? `inset(calc(100% - ${HEAD_HEIGHT}px) 0px 0px 0px round 22px)`\n\t\t\t: `inset(0px 0px calc(100% - ${HEAD_HEIGHT}px) 0px round 22px)`\n\t}\n\n\tprivate get openClipPath(): string {\n\t\treturn 'inset(0px 0px 0px 0px round 12px)'\n\t}\n\n\tprivate get elevation(): string {\n\t\tif (this.open) return '4'\n\t\treturn this.lowered ? '1' : '3'\n\t}\n\n\t// ============================================\n\t// POSITION MANAGEMENT\n\t// ============================================\n\n\tprivate _applyContainerPosition() {\n\t\tconst container = this._containerRef.value\n\t\tif (!container) return\n\t\t// Only clear position properties when corner changes (avoids 4 style invalidations per drag frame)\n\t\tif (this._appliedCorner !== this._currentCorner) {\n\t\t\tcontainer.style.removeProperty('left')\n\t\t\tcontainer.style.removeProperty('right')\n\t\t\tcontainer.style.removeProperty('top')\n\t\t\tcontainer.style.removeProperty('bottom')\n\t\t\tthis._appliedCorner = this._currentCorner\n\t\t}\n\t\tconst { x, y } = this._position\n\t\tif (this._currentCorner.includes('right')) {\n\t\t\tcontainer.style.right = `${x}px`\n\t\t} else {\n\t\t\tcontainer.style.left = `${x}px`\n\t\t}\n\t\tif (this._currentCorner.includes('bottom')) {\n\t\t\tcontainer.style.bottom = `${y + theme.bottomOffset}px`\n\t\t} else {\n\t\t\tcontainer.style.top = `${y}px`\n\t\t}\n\t}\n\n\tprivate static readonly VALID_CORNERS = new Set<string>(['top-left', 'top-right', 'bottom-left', 'bottom-right'])\n\n\tprivate _loadPosition() {\n\t\tconst saved = windowManager.loadPosition(this.id)\n\t\tif (saved) {\n\t\t\tthis._position = { x: saved.x, y: saved.y }\n\t\t\tif (SchmancyWindow.VALID_CORNERS.has(saved.anchor)) {\n\t\t\t\tthis._currentCorner = saved.anchor as SnapCorner\n\t\t\t}\n\t\t}\n\t}\n\n\tprivate _savePosition() {\n\t\twindowManager.savePosition(this.id, { ...this._position, anchor: this._currentCorner })\n\t}\n\n\tprivate _validateBounds() {\n\t\tconst container = this._containerRef.value\n\t\tif (!container) return\n\t\tconst rect = container.getBoundingClientRect()\n\t\tif (rect.width === 0) return\n\t\tconst vw = window.innerWidth\n\t\tconst vh = window.innerHeight\n\t\tconst isRight = this._currentCorner.includes('right')\n\t\tconst isBottom = this._currentCorner.includes('bottom')\n\t\tconst actualLeft = isRight ? vw - this._position.x - rect.width : this._position.x\n\t\tconst actualTop = isBottom ? vh - this._position.y - rect.height : this._position.y\n\t\tconst newLeft = Math.max(0, Math.min(actualLeft, vw - rect.width))\n\t\tconst newTop = Math.max(0, Math.min(actualTop, vh - rect.height))\n\t\tthis._position = {\n\t\t\tx: isRight ? vw - newLeft - rect.width : newLeft,\n\t\t\ty: isBottom ? vh - newTop - rect.height : newTop,\n\t\t}\n\t\tthis._applyContainerPosition()\n\t}\n\n\t// ============================================\n\t// CORNER SNAPPING\n\t// ============================================\n\n\tprivate _reorientToNearestCorner(skipAnimation = false): void {\n\t\t// Free position mode: skip corner snapping\n\t\tif (this.freePosition) {\n\t\t\tthis._savePosition()\n\t\t\tconst rect = this._containerRef.value?.getBoundingClientRect()\n\t\t\tif (rect) {\n\t\t\t\twindowManager.updateBounds(this.id, { left: rect.left, top: rect.top, width: rect.width, height: rect.height })\n\t\t\t}\n\t\t\treturn\n\t\t}\n\n\t\tconst container = this._containerRef.value\n\t\tif (!container) return\n\n\t\t// F -- record current screen position before DOM mutation\n\t\tconst rect = container.getBoundingClientRect()\n\n\t\t// L -- calculate nearest corner using head visual center\n\t\tconst currentIsBottom = this._currentCorner.includes('bottom')\n\t\tconst headCenterX = rect.left + rect.width / 2\n\t\tconst headCenterY = currentIsBottom\n\t\t\t? rect.bottom - HEAD_HEIGHT / 2\n\t\t\t: rect.top + HEAD_HEIGHT / 2\n\t\tconst side = headCenterX > window.innerWidth / 2 ? 'right' : 'left'\n\t\tconst vert = headCenterY > window.innerHeight / 2 ? 'bottom' : 'top'\n\t\tconst newCorner: SnapCorner = `${vert}-${side}` as SnapCorner\n\n\t\t// Snap corner and reset offset to standard edge gap\n\t\tthis._currentCorner = newCorner\n\t\tthis._position = { x: 16, y: 16 }\n\t\tthis._applyContainerPosition()\n\t\t// Sync clip-path to new corner\n\t\tif (!this.open) {\n\t\t\tcontainer.style.clipPath = this.closedClipPath\n\t\t}\n\n\t\tif (skipAnimation || reducedMotion$.value) {\n\t\t\tthis._savePosition()\n\t\t\tconst snapRect = container.getBoundingClientRect()\n\t\t\twindowManager.updateBounds(this.id, { left: snapRect.left, top: snapRect.top, width: snapRect.width, height: snapRect.height })\n\t\t\treturn\n\t\t}\n\n\t\t// I -- invert: shift element back to its original visual position\n\t\tconst newRect = container.getBoundingClientRect()\n\t\tconst dx = rect.left - newRect.left\n\t\tconst dy = rect.top - newRect.top\n\t\tcontainer.style.translate = `${dx}px ${dy}px`\n\n\t\t// P -- play: animate from the inverse offset to natural resting position\n\t\tconst flipKeyframes: Keyframe[] = [{ translate: `${dx}px ${dy}px` }, { translate: '0px 0px' }]\n\t\tconst anim = container.animate(\n\t\t\tflipKeyframes,\n\t\t\t{\n\t\t\t\tduration: SPRING_SMOOTH.duration,\n\t\t\t\teasing: SPRING_SMOOTH.easingFallback,\n\t\t\t\tfill: 'forwards',\n\t\t\t},\n\t\t)\n\t\tfrom(anim.finished).pipe(\n\t\t\ttake(1),\n\t\t\ttap(() => {\n\t\t\t\tif (container.isConnected) container.style.translate = ''\n\t\t\t\t// Report final resting bounds after animation completes\n\t\t\t\tconst finalRect = container.getBoundingClientRect()\n\t\t\t\twindowManager.updateBounds(this.id, { left: finalRect.left, top: finalRect.top, width: finalRect.width, height: finalRect.height })\n\t\t\t}),\n\t\t\tcatchError(() => EMPTY),\n\t\t\ttakeUntil(this.disconnecting),\n\t\t).subscribe()\n\n\t\tthis._savePosition()\n\t}\n\n\t// ============================================\n\t// DRAG PIPELINE\n\t// ============================================\n\n\tprivate _drag$(): Observable<never> {\n\t\treturn new Observable(() => {\n\t\t\tconst head = this._headRef.value\n\t\t\tconst container = this._containerRef.value\n\t\t\tif (!head || !container) return\n\n\t\t\tlet didDrag = false\n\n\t\t\tconst sub = fromEvent<PointerEvent>(head, 'pointerdown').pipe(\n\t\t\t\tfilter(e => e.button === 0),\n\t\t\t\tfilter(e => {\n\t\t\t\t\tconst tag = (e.target as HTMLElement).tagName?.toLowerCase()\n\t\t\t\t\treturn !['input', 'textarea', 'select', 'button'].includes(tag)\n\t\t\t\t\t\t&& !(e.target as HTMLElement).closest('schmancy-input, schmancy-icon-button, button, a')\n\t\t\t\t}),\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)\n\t\t\t\t.pipe(\n\t\t\t\t\tmap(e => {\n\t\t\t\t\t\tconst rect = container.getBoundingClientRect()\n\t\t\t\t\t\tconst isBottom = this._currentCorner.includes('bottom')\n\t\t\t\t\t\tconst wasOpen = this.open\n\t\t\t\t\t\tdidDrag = false\n\t\t\t\t\t\treturn {\n\t\t\t\t\t\t\tstartX: e.clientX,\n\t\t\t\t\t\t\tstartY: e.clientY,\n\t\t\t\t\t\t\toffsetX: e.clientX - rect.left,\n\t\t\t\t\t\t\toffsetY: e.clientY - rect.top,\n\t\t\t\t\t\t\trect,\n\t\t\t\t\t\t\tvw: window.innerWidth,\n\t\t\t\t\t\t\tvh: window.innerHeight,\n\t\t\t\t\t\t\tisBottom,\n\t\t\t\t\t\t\twasOpen,\n\t\t\t\t\t\t\tpointerId: e.pointerId,\n\t\t\t\t\t\t}\n\t\t\t\t\t}),\n\t\t\t\t\tswitchMap(({ startX, startY, offsetX, offsetY, rect, vw, vh, isBottom, wasOpen, pointerId }) => {\n\t\t\t\t\t\tconst move$ = fromEvent<PointerEvent>(window, 'pointermove').pipe(\n\t\t\t\t\t\t\tfilter(e => e.pointerId === pointerId),\n\t\t\t\t\t\t\tauditTime(0, animationFrameScheduler),\n\t\t\t\t\t\t\tmap(e => ({ clientX: e.clientX, clientY: e.clientY })),\n\t\t\t\t\t\t)\n\t\t\t\t\t\tconst end$ = fromEvent<PointerEvent>(window, 'pointerup').pipe(\n\t\t\t\t\t\t\tfilter(e => e.pointerId === pointerId),\n\t\t\t\t\t\t)\n\n\t\t\t\t\t\treturn move$.pipe(\n\t\t\t\t\t\t\ttap(({ clientX, clientY }) => {\n\t\t\t\t\t\t\t\tconst dx = clientX - startX\n\t\t\t\t\t\t\t\tconst dy = clientY - startY\n\t\t\t\t\t\t\t\tif (Math.sqrt(dx * dx + dy * dy) > DRAG_THRESHOLD && !didDrag) {\n\t\t\t\t\t\t\t\t\tdidDrag = true\n\t\t\t\t\t\t\t\t\tthis._applyDragVisuals(true)\n\t\t\t\t\t\t\t\t\t// Collapse on first confirmed drag move\n\t\t\t\t\t\t\t\t\tif (wasOpen) {\n\t\t\t\t\t\t\t\t\t\tthis.open = false\n\t\t\t\t\t\t\t\t\t\tcontainer.style.clipPath = this.closedClipPath\n\t\t\t\t\t\t\t\t\t\tcontainer.style.overflow = 'hidden'\n\t\t\t\t\t\t\t\t\t\tconst body = this._bodyRef.value\n\t\t\t\t\t\t\t\t\t\tif (body) {\n\t\t\t\t\t\t\t\t\t\t\tbody.inert = true\n\t\t\t\t\t\t\t\t\t\t\tbody.style.visibility = 'hidden'\n\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\tif (!didDrag) return\n\n\t\t\t\t\t\t\t\tconst left = Math.max(0, Math.min(clientX - offsetX, vw - rect.width))\n\t\t\t\t\t\t\t\tconst minTop = isBottom ? HEAD_HEIGHT - rect.height : 0\n\t\t\t\t\t\t\t\tconst maxTop = isBottom ? vh - rect.height : vh - HEAD_HEIGHT\n\t\t\t\t\t\t\t\tconst top = Math.max(minTop, Math.min(clientY - offsetY, maxTop))\n\n\t\t\t\t\t\t\t\tthis._position = {\n\t\t\t\t\t\t\t\t\tx: this._currentCorner.includes('right') ? vw - left - rect.width : left,\n\t\t\t\t\t\t\t\t\ty: isBottom ? vh - top - rect.height : top,\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\tthis._applyContainerPosition()\n\t\t\t\t\t\t\t}),\n\t\t\t\t\t\t\ttakeUntil(end$),\n\t\t\t\t\t\t\tfinalize(() => {\n\t\t\t\t\t\t\t\tif (didDrag) {\n\t\t\t\t\t\t\t\t\tthis._reorientToNearestCorner()\n\t\t\t\t\t\t\t\t\tthis._applyDragVisuals(false)\n\t\t\t\t\t\t\t\t\tdidDrag = false\n\t\t\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\t\t\tdidDrag = false\n\t\t\t\t\t\t\t\t\tthis.toggle()\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t}),\n\t\t\t\t\t\t)\n\t\t\t\t\t}),\n\t\t\t\t)\n\t\t\t\t.subscribe()\n\n\t\t\treturn () => sub.unsubscribe()\n\t\t})\n\t}\n\n\t// ============================================\n\t// LIFECYCLE\n\t// ============================================\n\n\tconnectedCallback() {\n\t\tsuper.connectedCallback()\n\n\t\t// Pipeline 1: DOM setup + manager registration + drag + z-index sync\n\t\tfrom(this.updateComplete).pipe(\n\t\t\ttake(1),\n\t\t\ttap(() => {\n\t\t\t\tthis._currentCorner = this.corner\n\t\t\t\tthis._loadPosition()\n\t\t\t\tthis._applyContainerPosition()\n\t\t\t\tthis._initDOMState()\n\t\t\t\t// Register with window manager\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\tconst bounds: WindowBounds = { left: rect.left, top: rect.top, width: rect.width, height: rect.height }\n\t\t\t\t\twindowManager.register(this.id, bounds, this.freePosition ? 'free' : this._currentCorner)\n\t\t\t\t}\n\t\t\t}),\n\t\t\tswitchMap(() => merge(\n\t\t\t\tthis._drag$(),\n\t\t\t\twindowManager.selectWindow(this.id).pipe(\n\t\t\t\t\ttap(record => {\n\t\t\t\t\t\tif (!record) return\n\t\t\t\t\t\tconst container = this._containerRef.value\n\t\t\t\t\t\tif (container) container.style.zIndex = String(record.zIndex)\n\t\t\t\t\t}),\n\t\t\t\t),\n\t\t\t\twindowManager.selectFocused().pipe(\n\t\t\t\t\ttap(focusedId => {\n\t\t\t\t\t\tthis._focused = focusedId === this.id\n\t\t\t\t\t}),\n\t\t\t\t),\n\t\t\t)),\n\t\t\ttakeUntil(this.disconnecting),\n\t\t).subscribe()\n\n\n\t\t// Pipeline 3: Environment -- one subscription\n\t\tmerge(\n\t\t\tfromEvent(window, 'resize').pipe(\n\t\t\t\tauditTime(0, animationFrameScheduler),\n\t\t\t\ttap(() => this._validateBounds()),\n\t\t\t),\n\t\t\ttheme.bottomOffset$.pipe(\n\t\t\t\ttap(() => this._applyContainerPosition()),\n\t\t\t),\n\t\t).pipe(takeUntil(this.disconnecting)).subscribe()\n\t}\n\n\tdisconnectedCallback() {\n\t\tsuper.disconnectedCallback()\n\t\twindowManager.unregister(this.id)\n\t}\n\n\tprivate _initDOMState() {\n\t\tconst container = this._containerRef.value\n\t\tconst body = this._bodyRef.value\n\t\tif (!container) return\n\n\t\tthis._applyContainerPosition()\n\n\t\tif (this.open) {\n\t\t\tthis._hasOpened = true\n\t\t\tcontainer.style.overflow = ''\n\t\t\tif (body) {\n\t\t\t\tbody.inert = false\n\t\t\t\tbody.style.visibility = 'visible'\n\t\t\t}\n\t\t} else {\n\t\t\tcontainer.style.clipPath = this.closedClipPath\n\t\t\tcontainer.style.overflow = 'hidden'\n\t\t\tif (body) {\n\t\t\t\tbody.inert = true\n\t\t\t\tbody.style.visibility = 'hidden'\n\t\t\t}\n\t\t}\n\t}\n\n\t// ============================================\n\t// ANIMATION\n\t// ============================================\n\n\tprivate _animateOpen() {\n\t\tconst container = this._containerRef.value\n\t\tconst body = this._bodyRef.value\n\t\tif (!container) return\n\n\t\tthis._hasOpened = true\n\t\tthis.open = true\n\n\t\t// Overlap avoidance\n\t\tconst rect = container.getBoundingClientRect()\n\t\tconst projectedBounds: WindowBounds = {\n\t\t\tleft: rect.left,\n\t\t\ttop: this.isBottomCorner ? rect.top - 400 : rect.top,\n\t\t\twidth: rect.width,\n\t\t\theight: 400 + HEAD_HEIGHT,\n\t\t}\n\t\tconst overlaps = windowManager.findOverlaps(projectedBounds, this.id)\n\t\tif (overlaps.length > 0) {\n\t\t\tconst resolved = resolveOverlap(projectedBounds, overlaps, { width: window.innerWidth, height: window.innerHeight })\n\t\t\tif (Math.abs(resolved.left - projectedBounds.left) > 10 || Math.abs(resolved.top - projectedBounds.top) > 10) {\n\t\t\t\tconst isRight = this._currentCorner.includes('right')\n\t\t\t\tconst isBottom = this._currentCorner.includes('bottom')\n\t\t\t\tthis._position = {\n\t\t\t\t\tx: isRight ? window.innerWidth - resolved.left - resolved.width : resolved.left,\n\t\t\t\t\ty: isBottom ? window.innerHeight - resolved.top - resolved.height : resolved.top,\n\t\t\t\t}\n\t\t\t\tthis._applyContainerPosition()\n\t\t\t}\n\t\t}\n\n\t\tif (body) {\n\t\t\tbody.style.visibility = 'visible'\n\t\t\tbody.inert = false\n\t\t}\n\n\t\tif (reducedMotion$.value) {\n\t\t\tcontainer.style.clipPath = ''\n\t\t\tcontainer.style.overflow = ''\n\t\t\tthis.dispatchScopedEvent('window-toggle', { state: 'expanded' })\n\t\t\treturn\n\t\t}\n\n\t\tthis._currentAnimation?.cancel()\n\t\tcontainer.style.overflow = 'hidden'\n\t\tcontainer.style.willChange = 'opacity'\n\t\tconst openKeyframes: Keyframe[] = [\n\t\t\t{ clipPath: this.closedClipPath, opacity: 0.95 },\n\t\t\t{ clipPath: this.openClipPath, opacity: 1 },\n\t\t]\n\t\tconst anim = container.animate(openKeyframes, {\n\t\t\tduration: SPRING_SNAPPY.duration,\n\t\t\teasing: SPRING_SNAPPY.easingFallback,\n\t\t\tfill: 'forwards',\n\t\t})\n\t\tthis._currentAnimation = anim\n\n\t\tfrom(anim.finished).pipe(\n\t\t\ttake(1),\n\t\t\ttap(() => {\n\t\t\t\tif (container.isConnected) {\n\t\t\t\t\tcontainer.style.clipPath = ''\n\t\t\t\t\tcontainer.style.overflow = ''\n\t\t\t\t\tcontainer.style.willChange = ''\n\t\t\t\t}\n\t\t\t}),\n\t\t\tcatchError(() => EMPTY),\n\t\t\ttakeUntil(this.disconnecting),\n\t\t).subscribe()\n\n\t\tthis.dispatchScopedEvent('window-toggle', { state: 'expanded' })\n\t}\n\n\tprivate _animateClose() {\n\t\tconst container = this._containerRef.value\n\t\tif (!container) return\n\n\t\tif (reducedMotion$.value) {\n\t\t\tcontainer.style.clipPath = this.closedClipPath\n\t\t\tcontainer.style.overflow = 'hidden'\n\t\t\tthis.open = false\n\t\t\tconst body = this._bodyRef.value\n\t\t\tif (body) { body.inert = true; body.style.visibility = 'hidden' }\n\t\t\tthis.dispatchScopedEvent('window-toggle', { state: 'collapsed' })\n\t\t\treturn\n\t\t}\n\n\t\tthis._currentAnimation?.cancel()\n\t\tcontainer.style.overflow = 'hidden'\n\t\tcontainer.style.willChange = 'opacity'\n\t\tconst closeKeyframes: Keyframe[] = [\n\t\t\t{ clipPath: this.openClipPath, opacity: 1 },\n\t\t\t{ clipPath: this.closedClipPath, opacity: 0.95 },\n\t\t]\n\t\tconst anim = container.animate(closeKeyframes, {\n\t\t\tduration: Math.round(SPRING_SNAPPY.duration * 0.7),\n\t\t\teasing: 'cubic-bezier(0.4, 0, 0.8, 0.15)',\n\t\t\tfill: 'forwards',\n\t\t})\n\t\tthis._currentAnimation = anim\n\n\t\tfrom(anim.finished).pipe(\n\t\t\ttake(1),\n\t\t\ttap(() => {\n\t\t\t\tthis.open = false\n\t\t\t\tcontainer.style.willChange = ''\n\t\t\t\tconst body = this._bodyRef.value\n\t\t\t\tif (body) { body.inert = true; body.style.visibility = 'hidden' }\n\t\t\t}),\n\t\t\tcatchError(() => EMPTY),\n\t\t\ttakeUntil(this.disconnecting),\n\t\t).subscribe()\n\n\t\tthis.dispatchScopedEvent('window-toggle', { state: 'collapsed' })\n\t}\n\n\t// ============================================\n\t// VISUAL STATE HELPERS\n\t// ============================================\n\n\t/** Apply drag visuals directly on DOM refs — avoids full Lit re-render for cursor + opacity */\n\tprivate _applyDragVisuals(dragging: boolean) {\n\t\tconst head = this._headRef.value\n\t\tconst container = this._containerRef.value\n\t\tif (head) {\n\t\t\thead.classList.toggle('cursor-grabbing', dragging)\n\t\t\thead.classList.toggle('cursor-move', !dragging)\n\t\t}\n\t\tif (container) {\n\t\t\tcontainer.style.opacity = dragging ? '0.95' : ''\n\t\t}\n\t}\n\n\tprivate _handleFocus = () => windowManager.focus(this.id)\n\n\tprivate _handleHeadKeydown = (e: KeyboardEvent) => {\n\t\tif (e.key === 'Enter' || e.key === ' ') {\n\t\t\te.preventDefault()\n\t\t\tthis.toggle()\n\t\t\treturn\n\t\t}\n\t\tif (e.key === 'ArrowUp' || e.key === 'ArrowDown' || e.key === 'ArrowLeft' || e.key === 'ArrowRight') {\n\t\t\te.preventDefault()\n\t\t\tconst step = e.shiftKey ? 20 : 5\n\t\t\tconst dx = e.key === 'ArrowRight' ? step : e.key === 'ArrowLeft' ? -step : 0\n\t\t\tconst dy = e.key === 'ArrowDown' ? step : e.key === 'ArrowUp' ? -step : 0\n\t\t\tthis._position = { x: this._position.x + dx, y: this._position.y + dy }\n\t\t\tthis._applyContainerPosition()\n\t\t\tthis._savePosition()\n\t\t}\n\t}\n\n\t// ============================================\n\t// PUBLIC API\n\t// ============================================\n\n\ttoggle() {\n\t\tif (this.open) this._animateClose()\n\t\telse this._animateOpen()\n\t}\n\n\texpand() {\n\t\tif (this.open) return\n\t\tthis._animateOpen()\n\t}\n\n\tclose() {\n\t\tif (!this.open) return\n\t\tthis._animateClose()\n\t}\n\n\t// ============================================\n\t// RENDER\n\t// ============================================\n\n\tprotected render(): unknown {\n\t\tconst isBottom = this._currentCorner.startsWith('bottom')\n\n\t\tconst containerClasses = classMap({\n\t\t\tfixed: true,\n\t\t\tflex: true,\n\t\t\t'flex-col': isBottom,\n\t\t\t'flex-col-reverse': !isBottom,\n\t\t\t'z-1000': true,\n\t\t\t'ring-1': !this._focused,\n\t\t\t'ring-2': this._focused,\n\t\t\t'ring-primary-default/30': this._focused,\n\t\t\t'ring-primary-default/15': this.open && !this._focused,\n\t\t\t'rounded-2xl': this.open,\n\t\t\t'ring-outline-variant/40': !this.open && !this._focused,\n\t\t\t'rounded-[22px]': !this.open,\n\t\t\t'overflow-hidden': true,\n\t\t})\n\n\t\tconst containerStyles = styleMap({\n\t\t\twidth: this.panelWidth,\n\t\t\t'max-height': 'calc(100vh - 32px)',\n\t\t\t'pointer-events': 'none',\n\t\t})\n\n\t\tconst bodyStyles = styleMap({\n\t\t\t'pointer-events': this.open ? 'auto' : 'none',\n\t\t})\n\n\t\tconst headClasses = classMap({\n\t\t\t'h-full': true,\n\t\t\t'px-3': true,\n\t\t\tflex: true,\n\t\t\t'items-center': true,\n\t\t\t'gap-2': true,\n\t\t\t'select-none': true,\n\t\t\t'cursor-move': true,\n\t\t})\n\n\t\treturn html`\n\t\t\t<schmancy-surface\n\t\t\t\t${ref(this._containerRef)}\n\t\t\t\ttype=\"glass\"\n\t\t\t\televation=\"${this.elevation}\"\n\t\t\t\tclass=${containerClasses}\n\t\t\t\tstyle=${containerStyles}\n\t\t\t\taria-expanded=${this.open}\n\t\t\t\t@pointerdown=${this._handleFocus}\n\t\t\t>\n\t\t\t\t<!-- Details section (visually above summary for bottom corners) -->\n\t\t\t\t<section\n\t\t\t\t\t${ref(this._bodyRef)}\n\t\t\t\t\tclass=\"flex-1 min-h-0 overflow-hidden flex flex-col\"\n\t\t\t\t\tstyle=${bodyStyles}\n\t\t\t\t\trole=\"region\"\n\t\t\t\t\taria-label=\"Expandable content\"\n\t\t\t\t>\n\t\t\t\t\t${this._hasOpened ? html`<slot name=\"details\"></slot>` : nothing}\n\t\t\t\t</section>\n\n\t\t\t\t<!-- Summary section -- always interactive, always visible -->\n\t\t\t\t<section\n\t\t\t\t\tclass=\"shrink-0 bg-surface-lowest\"\n\t\t\t\t\tstyle=${styleMap({ 'pointer-events': 'auto', height: `${HEAD_HEIGHT}px` })}\n\t\t\t\t>\n\t\t\t\t\t<div\n\t\t\t\t\t\t${ref(this._headRef)}\n\t\t\t\t\t\t${cursorGlow({ radius: 200, intensity: 0.10 })}\n\t\t\t\t\t\tclass=${headClasses}\n\t\t\t\t\t\trole=\"button\"\n\t\t\t\t\t\ttabindex=\"0\"\n\t\t\t\t\t\ttitle=\"Drag to move, click to expand\"\n\t\t\t\t\t\taria-label=\"${this.open ? 'Collapse window' : 'Expand window'}\"\n\t\t\t\t\t\t@keydown=${this._handleHeadKeydown}\n\t\t\t\t\t>\n\t\t\t\t\t\t<div class=\"flex-1 min-w-0\">\n\t\t\t\t\t\t\t<slot></slot>\n\t\t\t\t\t\t</div>\n\t\t\t\t\t\t<svg\n\t\t\t\t\t\t\twidth=\"16\" height=\"16\" viewBox=\"0 0 24 24\" fill=\"none\"\n\t\t\t\t\t\t\tclass=\"shrink-0 text-surface-on/40 transition-transform duration-200 ${this.open ? 'rotate-180' : ''}\"\n\t\t\t\t\t\t\taria-hidden=\"true\"\n\t\t\t\t\t\t>\n\t\t\t\t\t\t\t<path d=\"M6 9L12 15L18 9\" stroke=\"currentColor\" stroke-width=\"2\" stroke-linecap=\"round\" stroke-linejoin=\"round\" />\n\t\t\t\t\t\t</svg>\n\t\t\t\t\t</div>\n\t\t\t\t</section>\n\t\t\t</schmancy-surface>\n\t\t`\n\t}\n}\n\ndeclare global {\n\tinterface HTMLElementTagNameMap {\n\t\t'schmancy-window': SchmancyWindow\n\t}\n}\n"],"mappings":";;;;;;;;;;;;;;AAmBA,IAAM,IAAiB,oBACjB,IAAwB;AAmL9B,SAAS,EAAa,GAAiB,GAAA;AACtC,QAAA,EAAS,EAAE,QAAQ,EAAE,OAAO,EAAE,SAAS,EAAE,OAAO,EAAE,SAAS,EAAE,QAAQ,EAAE,OAAO,EAAE,MAAM,EAAE,UAAU,EAAE,MAAM,EAAE,UAAU,EAAE;;AAGzH,IAAA,GAAa,IArLb,MAAM,EAAA;CAWL,cAAA;AAAA,OAAA,UAR2B,IAAI,EAAqC;GACnE,yBAAS,IAAI,KAAA;GACb,WAAW;GACX,YAAY,EAAA;GAAA,CAAA,EAAA,KAAA,SAGK,KAAK,QAAQ,cAAA;;CAI/B,OAAA,cAAO;AAIN,SAHK,AACJ,EAAqB,aAAW,IAAI,GAAA,EAE9B,EAAqB;;CAK7B,IAAA,UAAI;AACH,SAAO,KAAK,QAAQ,MAAM;;CAG3B,IAAA,YAAI;AACH,SAAO,KAAK,QAAQ,MAAM;;CAK3B,SAAS,GAAY,GAA6B,GAAA;EACjD,IAAM,IAAQ,KAAK,QAAQ;AAC3B,MAAI,EAAM,QAAQ,IAAI,EAAA,CAAK;EAG3B,IAAM,IAAuB;GAC5B,IAAA;GACA,QAAQ;GACR,aAAa;GACb,QALc,EAAa,aAAa,EAAA;GAMxC,MAAA,CAAM;GACN,YAAA;GAAA,EAGK,IAAU,IAAI,IAAI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;CAAS,SAAA,CAAS;CAAA,CAAA,CAAA,EAAO,EAAA,WAAA,QAAA,KAAA,EAAA,EAAA,EAAA,CAK1C,GAAA,CAAA,EAAO,EAAA,WAAA,cAAA,KAAA,EAAA,EAAA,EAAA,CAEP,GAAA,CAAA,EAAO,EAAA,WAAA,YAAA,KAAA,EAAA,EAAA,EAAA,CAIP,GAAA,CAAA,EAAO,EAAA,WAAA,kBAAA,KAAA,EAAA;AAAA,IAAA,IAAA,IAAA,IAAA,EAAA,CA3CR,EAAc,kBAAA,CAAA,EAAkB,EAAA;AAAA,SAAA,KAAA,GAAA,KAAA"}
|
package/dist/window.cjs
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
Object.defineProperty(exports,Symbol.toStringTag,{value:`Module`});const e=require(`./window-
|
|
1
|
+
Object.defineProperty(exports,Symbol.toStringTag,{value:`Module`});const e=require(`./window-BS7ZQjgH.cjs`);exports.SchmancyWindow=e.t,exports.windowManager=e.n;
|
package/dist/window.js
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import { n as e, t } from "./window-
|
|
1
|
+
import { n as e, t } from "./window-WnAihpsA.js";
|
|
2
2
|
export { t as SchmancyWindow, e as windowManager };
|
|
@@ -4,11 +4,17 @@ import { IBaseMixin } from './baseElement'
|
|
|
4
4
|
import { Constructor } from './constructor'
|
|
5
5
|
import { ITailwindElementMixin, TailwindElement } from './tailwind.mixin'
|
|
6
6
|
|
|
7
|
+
/**
|
|
8
|
+
* Cross-realm brand used by `<schmancy-form>` to discover form fields by
|
|
9
|
+
* inheritance rather than tag-name allowlists. `Symbol.for` puts the symbol in
|
|
10
|
+
* the global registry so detection works across module realms/bundles.
|
|
11
|
+
*/
|
|
12
|
+
export const SCHMANCY_FORM_FIELD = Symbol.for('schmancy.form-field')
|
|
13
|
+
|
|
7
14
|
/**
|
|
8
15
|
* Interface defining the properties and methods that the FormFieldMixin adds.
|
|
9
16
|
*/
|
|
10
17
|
export interface IFormFieldMixin extends Element {
|
|
11
|
-
// Properties
|
|
12
18
|
name: string
|
|
13
19
|
value: string | string[] | boolean | number | undefined
|
|
14
20
|
label: string
|
|
@@ -20,21 +26,30 @@ export interface IFormFieldMixin extends Element {
|
|
|
20
26
|
hint?: string
|
|
21
27
|
id: string
|
|
22
28
|
|
|
23
|
-
// Form association
|
|
24
29
|
form: HTMLFormElement | null
|
|
25
30
|
|
|
26
|
-
// Methods
|
|
27
31
|
checkValidity(): boolean
|
|
28
32
|
reportValidity(): boolean
|
|
29
33
|
setCustomValidity(message: string): void
|
|
30
34
|
|
|
31
|
-
|
|
35
|
+
toFormEntries(): Array<[string, FormDataEntryValue]>
|
|
36
|
+
resetForm(): void
|
|
37
|
+
|
|
32
38
|
emitChange(detail: any): void
|
|
33
39
|
}
|
|
34
40
|
|
|
41
|
+
/** Predicate used by `<schmancy-form>` to detect mixin descendants. */
|
|
42
|
+
export function isSchmancyFormField(el: unknown): el is IFormFieldMixin {
|
|
43
|
+
return !!el && typeof el === 'object' && (el as any).constructor?.[SCHMANCY_FORM_FIELD] === true
|
|
44
|
+
}
|
|
45
|
+
|
|
35
46
|
/**
|
|
36
47
|
* A mixin that adds form field capabilities to a LitElement class.
|
|
37
|
-
*
|
|
48
|
+
* Components that extend this mixin are automatically discovered and
|
|
49
|
+
* collected by `<schmancy-form>` — no tag-name registration needed.
|
|
50
|
+
*
|
|
51
|
+
* Subclasses may override `toFormEntries()` to contribute multiple
|
|
52
|
+
* name/value pairs to FormData (e.g. date-range, tag-input).
|
|
38
53
|
*
|
|
39
54
|
* @example
|
|
40
55
|
* ```ts
|
|
@@ -47,67 +62,42 @@ export function FormFieldMixin<T extends Constructor<LitElement>>(superClass: T)
|
|
|
47
62
|
class FormFieldMixinClass extends superClass {
|
|
48
63
|
static formAssociated = true
|
|
49
64
|
|
|
65
|
+
/** Brand for cross-realm detection by `<schmancy-form>`. */
|
|
66
|
+
static readonly [SCHMANCY_FORM_FIELD] = true
|
|
67
|
+
|
|
50
68
|
// Element internals for form association
|
|
51
|
-
|
|
69
|
+
internals: ElementInternals | undefined
|
|
70
|
+
|
|
71
|
+
/** Value snapshot captured at first render, used by `resetForm()`. */
|
|
72
|
+
protected _defaultValue: string | string[] | boolean | number | undefined = undefined
|
|
52
73
|
|
|
53
|
-
// Properties common to form fields
|
|
54
|
-
/**
|
|
55
|
-
* The name of the form field (used for form submission)
|
|
56
|
-
*/
|
|
57
74
|
@property({ type: String })
|
|
58
75
|
name: string = ''
|
|
59
76
|
|
|
60
|
-
/**
|
|
61
|
-
* The current value of the form field
|
|
62
|
-
*/
|
|
63
77
|
@property({ reflect: true })
|
|
64
78
|
value: string | string[] | boolean | number | undefined = ''
|
|
65
79
|
|
|
66
|
-
/**
|
|
67
|
-
* Label text for the form field
|
|
68
|
-
*/
|
|
69
80
|
@property({ type: String })
|
|
70
81
|
label: string = ''
|
|
71
82
|
|
|
72
|
-
/**
|
|
73
|
-
* Whether the field is required
|
|
74
|
-
*/
|
|
75
83
|
@property({ type: Boolean, reflect: true })
|
|
76
84
|
required: boolean = false
|
|
77
85
|
|
|
78
|
-
/**
|
|
79
|
-
* Whether the field is disabled
|
|
80
|
-
*/
|
|
81
86
|
@property({ type: Boolean, reflect: true })
|
|
82
87
|
disabled: boolean = false
|
|
83
88
|
|
|
84
|
-
/**
|
|
85
|
-
* Whether the field is read-only
|
|
86
|
-
*/
|
|
87
89
|
@property({ type: Boolean, reflect: true })
|
|
88
90
|
readonly: boolean = false
|
|
89
91
|
|
|
90
|
-
/**
|
|
91
|
-
* Whether the field is in an error state
|
|
92
|
-
*/
|
|
93
92
|
@property({ type: Boolean, reflect: true })
|
|
94
93
|
error: boolean = false
|
|
95
94
|
|
|
96
|
-
/**
|
|
97
|
-
* The validation message to display
|
|
98
|
-
*/
|
|
99
95
|
@property({ type: String })
|
|
100
96
|
validationMessage: string = ''
|
|
101
97
|
|
|
102
|
-
/**
|
|
103
|
-
* Optional hint text to display below the field
|
|
104
|
-
*/
|
|
105
98
|
@property({ type: String })
|
|
106
99
|
hint?: string
|
|
107
100
|
|
|
108
|
-
/**
|
|
109
|
-
* Unique identifier for the field
|
|
110
|
-
*/
|
|
111
101
|
@property({ reflect: true })
|
|
112
102
|
override id: string = `schmancy-field-${Date.now()}-${Math.floor(Math.random() * 1000)}`
|
|
113
103
|
|
|
@@ -120,25 +110,23 @@ export function FormFieldMixin<T extends Constructor<LitElement>>(superClass: T)
|
|
|
120
110
|
}
|
|
121
111
|
}
|
|
122
112
|
|
|
123
|
-
/**
|
|
124
|
-
* Gets the form this element is associated with
|
|
125
|
-
*/
|
|
113
|
+
/** The form this element is associated with (native FACE behavior). */
|
|
126
114
|
get form(): HTMLFormElement | null {
|
|
127
115
|
return this.internals?.form ?? null
|
|
128
116
|
}
|
|
129
117
|
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
|
|
118
|
+
protected firstUpdated(changedProps: PropertyValueMap<any>): void {
|
|
119
|
+
super.firstUpdated?.(changedProps)
|
|
120
|
+
if (this._defaultValue === undefined) this._defaultValue = this.value
|
|
121
|
+
}
|
|
122
|
+
|
|
133
123
|
protected willUpdate(changedProps: PropertyValueMap<any>): void {
|
|
134
124
|
super.willUpdate(changedProps)
|
|
135
125
|
|
|
136
|
-
// Update form value when value changes
|
|
137
126
|
if (changedProps.has('value')) {
|
|
138
127
|
this.internals?.setFormValue(this.value as string | File | FormData | null)
|
|
139
128
|
}
|
|
140
129
|
|
|
141
|
-
// Update validation state when error or validation message changes
|
|
142
130
|
if (changedProps.has('error') || changedProps.has('validationMessage')) {
|
|
143
131
|
if (this.error && this.validationMessage) {
|
|
144
132
|
this.internals?.setValidity({ customError: true }, this.validationMessage)
|
|
@@ -146,37 +134,87 @@ export function FormFieldMixin<T extends Constructor<LitElement>>(superClass: T)
|
|
|
146
134
|
this.internals?.setValidity({})
|
|
147
135
|
}
|
|
148
136
|
}
|
|
137
|
+
|
|
138
|
+
// Broadcast standard field states for consumer CSS: :state(invalid),
|
|
139
|
+
// :state(required), :state(disabled), :state(readonly).
|
|
140
|
+
if (changedProps.has('error')) {
|
|
141
|
+
if (this.error) this.internals?.states.add('invalid')
|
|
142
|
+
else this.internals?.states.delete('invalid')
|
|
143
|
+
}
|
|
144
|
+
if (changedProps.has('required')) {
|
|
145
|
+
if (this.required) this.internals?.states.add('required')
|
|
146
|
+
else this.internals?.states.delete('required')
|
|
147
|
+
}
|
|
148
|
+
if (changedProps.has('disabled')) {
|
|
149
|
+
if (this.disabled) this.internals?.states.add('disabled')
|
|
150
|
+
else this.internals?.states.delete('disabled')
|
|
151
|
+
}
|
|
152
|
+
if (changedProps.has('readonly')) {
|
|
153
|
+
if (this.readonly) this.internals?.states.add('readonly')
|
|
154
|
+
else this.internals?.states.delete('readonly')
|
|
155
|
+
}
|
|
156
|
+
}
|
|
157
|
+
|
|
158
|
+
/**
|
|
159
|
+
* Native FACE lifecycle — called by the browser when the owning form
|
|
160
|
+
* is reset. Delegates to `resetForm()` so subclasses have one
|
|
161
|
+
* override point for both programmatic and user-initiated resets.
|
|
162
|
+
*/
|
|
163
|
+
formResetCallback(): void {
|
|
164
|
+
this.resetForm()
|
|
165
|
+
}
|
|
166
|
+
|
|
167
|
+
/** Native FACE lifecycle — called when the form's disabled state changes. */
|
|
168
|
+
formDisabledCallback(disabled: boolean): void {
|
|
169
|
+
this.disabled = disabled
|
|
170
|
+
}
|
|
171
|
+
|
|
172
|
+
/**
|
|
173
|
+
* Native FACE lifecycle — restore value after bfcache / form autofill.
|
|
174
|
+
*/
|
|
175
|
+
formStateRestoreCallback(state: string | File | FormData | null): void {
|
|
176
|
+
if (state == null) return
|
|
177
|
+
this.value = state as any
|
|
178
|
+
}
|
|
179
|
+
|
|
180
|
+
/** Override to customize reset behavior; default restores `_defaultValue`. */
|
|
181
|
+
resetForm(): void {
|
|
182
|
+
this.value = this._defaultValue ?? ''
|
|
183
|
+
this.error = false
|
|
184
|
+
this.validationMessage = ''
|
|
185
|
+
this.internals?.setValidity({})
|
|
149
186
|
}
|
|
150
187
|
|
|
151
188
|
/**
|
|
152
|
-
*
|
|
189
|
+
* Contribute entries to a parent FormData. Default: a single
|
|
190
|
+
* `[name, value]` pair when `name` is set and value is meaningful.
|
|
191
|
+
* Override for multi-entry controls (e.g. date range).
|
|
153
192
|
*/
|
|
193
|
+
toFormEntries(): Array<[string, FormDataEntryValue]> {
|
|
194
|
+
if (!this.name || this.disabled) return []
|
|
195
|
+
const v = this.value
|
|
196
|
+
if (v === undefined || v === null || v === '') return []
|
|
197
|
+
if (Array.isArray(v)) return v.map(item => [this.name, String(item)] as [string, FormDataEntryValue])
|
|
198
|
+
if (typeof v === 'boolean') return v ? [[this.name, 'on']] : []
|
|
199
|
+
return [[this.name, String(v)]]
|
|
200
|
+
}
|
|
201
|
+
|
|
154
202
|
checkValidity(): boolean {
|
|
155
203
|
if (this.disabled) return true
|
|
156
|
-
|
|
157
204
|
if (this.required && (this.value === '' || this.value === undefined || this.value === null)) {
|
|
158
205
|
this.error = true
|
|
159
206
|
this.validationMessage = 'This field is required'
|
|
160
207
|
return false
|
|
161
208
|
}
|
|
162
|
-
|
|
163
|
-
return true
|
|
209
|
+
return this.internals?.checkValidity() ?? true
|
|
164
210
|
}
|
|
165
211
|
|
|
166
|
-
/**
|
|
167
|
-
* Reports validity and shows validation UI if invalid
|
|
168
|
-
*/
|
|
169
212
|
reportValidity(): boolean {
|
|
170
213
|
const isValid = this.checkValidity()
|
|
171
|
-
if (!isValid)
|
|
172
|
-
this.internals?.reportValidity()
|
|
173
|
-
}
|
|
214
|
+
if (!isValid) this.internals?.reportValidity()
|
|
174
215
|
return isValid
|
|
175
216
|
}
|
|
176
217
|
|
|
177
|
-
/**
|
|
178
|
-
* Sets a custom validation message
|
|
179
|
-
*/
|
|
180
218
|
setCustomValidity(message: string): void {
|
|
181
219
|
this.validationMessage = message
|
|
182
220
|
this.error = message !== ''
|
|
@@ -187,11 +225,7 @@ export function FormFieldMixin<T extends Constructor<LitElement>>(superClass: T)
|
|
|
187
225
|
}
|
|
188
226
|
}
|
|
189
227
|
|
|
190
|
-
/**
|
|
191
|
-
* Helper method to emit change events using dispatchScopedEvent for instance isolation
|
|
192
|
-
*/
|
|
193
228
|
emitChange(detail: any): void {
|
|
194
|
-
// Use dispatchScopedEvent if available (from BaseElement mixin)
|
|
195
229
|
if ('dispatchScopedEvent' in this && typeof this.dispatchScopedEvent === 'function') {
|
|
196
230
|
this.dispatchScopedEvent('change', detail, { bubbles: true })
|
|
197
231
|
} else {
|
|
@@ -212,13 +246,6 @@ export function FormFieldMixin<T extends Constructor<LitElement>>(superClass: T)
|
|
|
212
246
|
/**
|
|
213
247
|
* A convenience function that composes FormFieldMixin with TailwindElement
|
|
214
248
|
* to create a base class for Schmancy form components.
|
|
215
|
-
*
|
|
216
|
-
* @example
|
|
217
|
-
* ```ts
|
|
218
|
-
* class MyInput extends SchmancyFormField(css`...`) {
|
|
219
|
-
* // Your component code here
|
|
220
|
-
* }
|
|
221
|
-
* ```
|
|
222
249
|
*/
|
|
223
250
|
export function SchmancyFormField<T extends CSSResult>(componentStyle?: T) {
|
|
224
251
|
return FormFieldMixin(TailwindElement(componentStyle)) as Constructor<IFormFieldMixin> &
|
package/mixins/tailwind.css
CHANGED
|
@@ -1,7 +1,17 @@
|
|
|
1
1
|
@import 'tailwindcss';
|
|
2
|
+
|
|
3
|
+
/* Cascade-layer order contract. Consumer (unlayered) CSS always overrides
|
|
4
|
+
library styles regardless of specificity. Library-internal tokens and
|
|
5
|
+
components live in named layers so consumers can target them precisely. */
|
|
6
|
+
@layer schmancy.tokens, schmancy.base, schmancy.components;
|
|
7
|
+
|
|
8
|
+
@layer schmancy.base {
|
|
2
9
|
:host,
|
|
3
10
|
:root {
|
|
4
11
|
font-family: var(--schmancy-font-family);
|
|
12
|
+
/* Advertise both schemes so UA form controls, scrollbars, and
|
|
13
|
+
`light-dark()` all render correctly until a theme resolves it. */
|
|
14
|
+
color-scheme: light dark;
|
|
5
15
|
}
|
|
6
16
|
:host,
|
|
7
17
|
:host *,
|
|
@@ -547,3 +557,4 @@
|
|
|
547
557
|
--ease-smooth: cubic-bezier(0.4, 0, 0.2, 1);
|
|
548
558
|
--ease-snap: cubic-bezier(0.34, 1.2, 0.64, 1);
|
|
549
559
|
}
|
|
560
|
+
} /* end @layer schmancy.base */
|