@mhmo91/schmancy 0.9.28 → 0.10.2
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 +1005 -2215
- package/dist/active-host-CcIa2tmW.cjs +1 -0
- package/dist/active-host-CcIa2tmW.cjs.map +1 -0
- package/dist/active-host-CvNYoprt.js +57 -0
- package/dist/active-host-CvNYoprt.js.map +1 -0
- package/dist/agent/{flow-CvG1fLW5.js.map → flow-CaPi2G8y.js.map} +1 -1
- package/dist/agent/{rolldown-runtime-BIIoCavz.js → rolldown-runtime-DsMetpgY.js} +2 -9
- package/dist/agent/schmancy.agent.js +12678 -7791
- package/dist/agent/schmancy.agent.js.map +1 -1
- package/dist/agent/schmancy.manifest.json +265 -1453
- package/dist/agent/{vendor-highlight-Dow87ZL_.js → vendor-highlight-CHJZQQB7.js} +85 -90
- package/dist/agent/{vendor-highlight-Dow87ZL_.js.map → vendor-highlight-CHJZQQB7.js.map} +1 -1
- package/dist/agent/{vendor-jsqr-Bl4iAtKC.js → vendor-jsqr-r7GNh4P3.js} +1 -1
- package/dist/agent/{vendor-jsqr-Bl4iAtKC.js.map → vendor-jsqr-r7GNh4P3.js.map} +1 -1
- package/dist/agent/{vendor-material-color-DcL7ZPxx.js.map → vendor-material-color-Be96dpGE.js.map} +1 -1
- package/dist/{animation-hXFClrIn.js.map → animation-BK-8BwY8.js.map} +1 -1
- package/dist/{animation-CQRdLgzX.cjs.map → animation-CO_Csq84.cjs.map} +1 -1
- package/dist/{area-BGBCMC79.js → area-DHVANBbr.js} +20 -15
- package/dist/area-DHVANBbr.js.map +1 -0
- package/dist/area-ZupIezvU.cjs +12 -0
- package/dist/area-ZupIezvU.cjs.map +1 -0
- package/dist/area.cjs +1 -1
- package/dist/area.js +2 -2
- package/dist/{audio-Dvr-RBzE.cjs → audio-CluX8Qpq.cjs} +1 -1
- package/dist/{audio-Dvr-RBzE.cjs.map → audio-CluX8Qpq.cjs.map} +1 -1
- package/dist/{audio-ql6nvY0y.js → audio-DcXphulJ.js} +1 -1
- package/dist/{audio-ql6nvY0y.js.map → audio-DcXphulJ.js.map} +1 -1
- package/dist/audio.cjs +1 -1
- package/dist/audio.js +2 -2
- package/dist/autocomplete-Bn525CTp.cjs +115 -0
- package/dist/autocomplete-Bn525CTp.cjs.map +1 -0
- package/dist/{autocomplete-C2P0Soht.js → autocomplete-pHvsyfbH.js} +29 -26
- package/dist/autocomplete-pHvsyfbH.js.map +1 -0
- package/dist/autocomplete.cjs +1 -1
- package/dist/autocomplete.js +1 -1
- package/dist/avatar.cjs +7 -0
- package/dist/avatar.cjs.map +1 -0
- package/dist/avatar.js +87 -0
- package/dist/avatar.js.map +1 -0
- package/dist/badge.cjs +1 -1
- package/dist/badge.js +1 -1
- package/dist/boat-IyEtsNI4.cjs +80 -0
- package/dist/boat-IyEtsNI4.cjs.map +1 -0
- package/dist/{boat-DXZ0k7oa.js → boat-_Yv3M6YM.js} +43 -54
- package/dist/boat-_Yv3M6YM.js.map +1 -0
- package/dist/boat.cjs +1 -1
- package/dist/boat.js +1 -1
- package/dist/breadcrumb.cjs +4 -4
- package/dist/breadcrumb.cjs.map +1 -1
- package/dist/breadcrumb.js +16 -11
- package/dist/breadcrumb.js.map +1 -1
- package/dist/{busy-DGYhpTnO.cjs → busy-CjM39APN.cjs} +4 -4
- package/dist/busy-CjM39APN.cjs.map +1 -0
- package/dist/{busy-iRjq6Nvd.js → busy-Ck2IXJ4r.js} +14 -9
- package/dist/busy-Ck2IXJ4r.js.map +1 -0
- package/dist/busy.cjs +1 -1
- package/dist/busy.js +1 -1
- package/dist/button.cjs +24 -24
- package/dist/button.cjs.map +1 -1
- package/dist/button.js +42 -37
- package/dist/button.js.map +1 -1
- package/dist/{card-DjYnCckw.cjs → card-DIxDuuth.cjs} +6 -6
- package/dist/card-DIxDuuth.cjs.map +1 -0
- package/dist/{card-wUTjx0EC.js → card-DUWZmMHc.js} +41 -30
- package/dist/card-DUWZmMHc.js.map +1 -0
- package/dist/card.cjs +1 -1
- package/dist/card.js +1 -1
- package/dist/charts.cjs +5 -5
- package/dist/charts.cjs.map +1 -1
- package/dist/charts.js +21 -16
- package/dist/charts.js.map +1 -1
- package/dist/checkbox-CGdFXuWQ.cjs +39 -0
- package/dist/checkbox-CGdFXuWQ.cjs.map +1 -0
- package/dist/{checkbox-VBSenxgb.js → checkbox-DPS1mWG-.js} +86 -82
- package/dist/checkbox-DPS1mWG-.js.map +1 -0
- package/dist/checkbox.cjs +1 -1
- package/dist/checkbox.js +1 -1
- package/dist/{chips-BDS9lkPa.js → chips-BnnXQSA-.js} +146 -136
- package/dist/chips-BnnXQSA-.js.map +1 -0
- package/dist/{chips-D6ptH5re.cjs → chips-UoFbwmlG.cjs} +19 -19
- package/dist/chips-UoFbwmlG.cjs.map +1 -0
- package/dist/chips.cjs +1 -1
- package/dist/chips.js +2 -2
- package/dist/{code-highlight-BzRmBZzz.cjs → code-highlight-CMilN0B8.cjs} +15 -15
- package/dist/code-highlight-CMilN0B8.cjs.map +1 -0
- package/dist/{code-highlight-Bi91XHJN.js → code-highlight-kFUJ1Eet.js} +37 -40
- package/dist/code-highlight-kFUJ1Eet.js.map +1 -0
- package/dist/code-highlight.cjs +1 -1
- package/dist/code-highlight.js +1 -1
- package/dist/connectivity.cjs +2 -2
- package/dist/connectivity.cjs.map +1 -1
- package/dist/connectivity.js +10 -7
- package/dist/connectivity.js.map +1 -1
- package/dist/content-drawer.cjs +1 -1
- package/dist/content-drawer.js +2 -2
- package/dist/context-Bdu1xt0W.js +3 -0
- package/dist/{context-BerzpUhI.js.map → context-Bdu1xt0W.js.map} +1 -1
- package/dist/context-daN5G6HS.cjs +1 -0
- package/dist/{context-C6dHUHhi.cjs.map → context-daN5G6HS.cjs.map} +1 -1
- package/dist/{cursor-glow-BydlDInj.js → cursor-glow-Ah7VXSj7.js} +1 -1
- package/dist/{cursor-glow-BydlDInj.js.map → cursor-glow-Ah7VXSj7.js.map} +1 -1
- package/dist/{cursor-glow-Duw9jHmh.cjs → cursor-glow-Bulq-38P.cjs} +1 -1
- package/dist/{cursor-glow-Duw9jHmh.cjs.map → cursor-glow-Bulq-38P.cjs.map} +1 -1
- package/dist/date-range-BIyrzTRZ.cjs +131 -0
- package/dist/date-range-BIyrzTRZ.cjs.map +1 -0
- package/dist/{date-range-ClTMg1AB.js → date-range-DOstCIg8.js} +16 -17
- package/dist/date-range-DOstCIg8.js.map +1 -0
- package/dist/date-range-inline-4P7zqeVe.cjs +43 -0
- package/dist/{date-range-inline-B9Dp2z6C.cjs.map → date-range-inline-4P7zqeVe.cjs.map} +1 -1
- package/dist/{date-range-inline-CpKG6qt2.js → date-range-inline-BVycTWLb.js} +5 -5
- package/dist/{date-range-inline-CpKG6qt2.js.map → date-range-inline-BVycTWLb.js.map} +1 -1
- package/dist/date-range-inline.cjs +1 -1
- package/dist/date-range-inline.js +1 -1
- package/dist/date-range.cjs +1 -1
- package/dist/date-range.js +1 -1
- package/dist/delay.cjs +9 -1
- package/dist/delay.cjs.map +1 -0
- package/dist/delay.js +77 -2
- package/dist/delay.js.map +1 -0
- package/dist/{details-Cz9ok9si.cjs → details-BJBbZOO6.cjs} +9 -9
- package/dist/details-BJBbZOO6.cjs.map +1 -0
- package/dist/{details-CPjlqQD4.js → details-DPc5GxPa.js} +19 -18
- package/dist/details-DPc5GxPa.js.map +1 -0
- package/dist/details.cjs +1 -1
- package/dist/details.js +1 -1
- package/dist/{dialog-service-DH-tjPuE.js → dialog-service-DI9PPy4H.js} +2 -2
- package/dist/dialog-service-DI9PPy4H.js.map +1 -0
- package/dist/{dialog-service-CzDO08Gy.cjs → dialog-service-DJd5L0f5.cjs} +1 -1
- package/dist/dialog-service-DJd5L0f5.cjs.map +1 -0
- package/dist/dialog.cjs +2 -2
- package/dist/dialog.cjs.map +1 -1
- package/dist/dialog.js +13 -14
- package/dist/dialog.js.map +1 -1
- package/dist/directives.cjs +2 -11
- package/dist/directives.cjs.map +1 -1
- package/dist/directives.js +141 -227
- package/dist/directives.js.map +1 -1
- package/dist/discovery.cjs +1 -1
- package/dist/discovery.cjs.map +1 -1
- package/dist/discovery.js +1 -1
- package/dist/discovery.js.map +1 -1
- package/dist/{divider-ghgyw5CU.js → divider-BvJsmSPH.js} +11 -9
- package/dist/divider-BvJsmSPH.js.map +1 -0
- package/dist/{divider-CILo3_vi.cjs → divider-DPT3XnG5.cjs} +3 -3
- package/dist/divider-DPT3XnG5.cjs.map +1 -0
- 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 +29 -28
- package/dist/dropdown.js.map +1 -1
- package/dist/{expand-CbjBr_Ds.js → expand-BMzocdtj.js} +24 -20
- package/dist/expand-BMzocdtj.js.map +1 -0
- package/dist/expand-CTqBWVXo.cjs +141 -0
- package/dist/expand-CTqBWVXo.cjs.map +1 -0
- package/dist/expand.cjs +1 -1
- package/dist/expand.js +1 -1
- package/dist/{extra-DK9MQtPJ.js → extra-BeHlUhzv.js} +19 -14
- package/dist/extra-BeHlUhzv.js.map +1 -0
- package/dist/{extra-BZeZOMBI.cjs → extra-h_cuxRII.cjs} +6 -6
- package/dist/extra-h_cuxRII.cjs.map +1 -0
- package/dist/extra.cjs +1 -1
- package/dist/extra.js +1 -1
- package/dist/{float-BfCvGeY9.js → float-CTc1xxqH.js} +2 -2
- package/dist/{float-BfCvGeY9.js.map → float-CTc1xxqH.js.map} +1 -1
- package/dist/float-CwVBs11k.cjs +1 -0
- package/dist/{float-CuZ8LOgB.cjs.map → float-CwVBs11k.cjs.map} +1 -1
- package/dist/float.cjs +1 -1
- package/dist/float.js +1 -1
- package/dist/{form-rCZqoAoK.js → form-BtwOBMZ9.js} +1 -1
- package/dist/form-BtwOBMZ9.js.map +1 -0
- package/dist/{form-wI58M85H.cjs → form-CSJp687X.cjs} +1 -1
- package/dist/form-CSJp687X.cjs.map +1 -0
- package/dist/form.cjs +1 -1
- package/dist/form.js +1 -1
- package/dist/handover/agent-runtime-followups.md +1 -1
- package/dist/handover/agent-runtime-v1.md +3 -3
- package/dist/handover/claude-design-brief.md +19 -54
- package/dist/handover/claude-design-setup.md +57 -0
- package/dist/{hashContent-B2IntJQf.js.map → hashContent-1ARKIsx9.js.map} +1 -1
- package/dist/{hashContent-CahnEuut.cjs.map → hashContent-Bp5S6T4U.cjs.map} +1 -1
- package/dist/{icons-Drq4kKy2.js → icons-BbCVrcas.js} +27 -24
- package/dist/icons-BbCVrcas.js.map +1 -0
- package/dist/icons-qEQW4pjM.cjs +52 -0
- package/dist/icons-qEQW4pjM.cjs.map +1 -0
- package/dist/icons.cjs +1 -1
- package/dist/icons.js +1 -1
- package/dist/{iframe-BmyHW8km.js → iframe-BJfDIEJf.js} +17 -11
- package/dist/iframe-BJfDIEJf.js.map +1 -0
- package/dist/iframe-D6HTruav.cjs +24 -0
- package/dist/iframe-D6HTruav.cjs.map +1 -0
- package/dist/iframe.cjs +1 -1
- package/dist/iframe.js +1 -1
- package/dist/index.cjs +1 -1
- package/dist/index.js +77 -77
- package/dist/{input-Bc3bVISm.js → input-LTK3cctF.js} +34 -34
- package/dist/input-LTK3cctF.js.map +1 -0
- package/dist/input-U26axtcs.cjs +51 -0
- package/dist/input-U26axtcs.cjs.map +1 -0
- package/dist/{input-chip-DN-cwf11.cjs → input-chip-CADXt0X5.cjs} +2 -2
- package/dist/input-chip-CADXt0X5.cjs.map +1 -0
- package/dist/{input-chip-BQrjpjaQ.js → input-chip-Ch-aCs3c.js} +7 -4
- package/dist/input-chip-Ch-aCs3c.js.map +1 -0
- package/dist/input.cjs +1 -1
- package/dist/input.js +1 -1
- package/dist/json.cjs +1 -1
- package/dist/json.cjs.map +1 -1
- package/dist/json.js +7 -5
- package/dist/json.js.map +1 -1
- package/dist/kbd.cjs +2 -2
- package/dist/kbd.cjs.map +1 -1
- package/dist/kbd.js +9 -7
- package/dist/kbd.js.map +1 -1
- package/dist/{layout-fjM1DWlF.js → layout-C4xmnU4n.js} +1 -1
- package/dist/{layout-fjM1DWlF.js.map → layout-C4xmnU4n.js.map} +1 -1
- package/dist/{layout-CTfRXQoz.cjs → layout-Dmh6fxh0.cjs} +1 -1
- package/dist/{layout-CTfRXQoz.cjs.map → layout-Dmh6fxh0.cjs.map} +1 -1
- package/dist/layout.cjs +1 -1
- package/dist/layout.js +2 -3
- package/dist/{lazy-D6R5N5v4.js.map → lazy-B0ia54tT.js.map} +1 -1
- package/dist/{lazy-BDNnH_r7.cjs.map → lazy-Dq9mRRjT.cjs.map} +1 -1
- package/dist/lightbox-DbYUSfVl.cjs +202 -0
- package/dist/lightbox-DbYUSfVl.cjs.map +1 -0
- package/dist/{lightbox-CY52Z_ig.js → lightbox-DqG2z3Cn.js} +13 -12
- package/dist/lightbox-DqG2z3Cn.js.map +1 -0
- package/dist/lightbox.cjs +1 -1
- package/dist/lightbox.js +1 -1
- package/dist/list-CLX4sSAw.cjs +40 -0
- package/dist/list-CLX4sSAw.cjs.map +1 -0
- package/dist/{list-D7wUxu1C.js → list-D6-_E5ZD.js} +26 -21
- package/dist/list-D6-_E5ZD.js.map +1 -0
- package/dist/list.cjs +1 -1
- package/dist/list.js +1 -1
- package/dist/{magnetic-CVXEkYTA.cjs → magnetic-BH0TsofV.cjs} +1 -1
- package/dist/{magnetic-CVXEkYTA.cjs.map → magnetic-BH0TsofV.cjs.map} +1 -1
- package/dist/{magnetic-BhXebqF3.js → magnetic-BZGFxAWG.js} +2 -2
- package/dist/{magnetic-BhXebqF3.js.map → magnetic-BZGFxAWG.js.map} +1 -1
- package/dist/{mailbox-DLiBGJhY.cjs → mailbox-Ct6iYe-4.cjs} +64 -66
- package/dist/mailbox-Ct6iYe-4.cjs.map +1 -0
- package/dist/{mailbox--EN-JhjV.js → mailbox-DsPII8HR.js} +137 -126
- package/dist/mailbox-DsPII8HR.js.map +1 -0
- package/dist/mailbox.cjs +1 -1
- package/dist/mailbox.js +1 -1
- package/dist/{map-B0S_q3ma.js → map-Dhy3ta9v.js} +11 -9
- package/dist/map-Dhy3ta9v.js.map +1 -0
- package/dist/map-WXeVkx2K.cjs +80 -0
- package/dist/map-WXeVkx2K.cjs.map +1 -0
- package/dist/map.cjs +1 -1
- package/dist/map.js +1 -1
- package/dist/{menu-COeFpb6n.js → menu-Bhd3EapX.js} +15 -10
- package/dist/menu-Bhd3EapX.js.map +1 -0
- package/dist/{menu-3edZGQ1x.cjs → menu-Cg2aaDjs.cjs} +5 -5
- package/dist/menu-Cg2aaDjs.cjs.map +1 -0
- package/dist/menu.cjs +1 -1
- package/dist/menu.js +1 -1
- package/dist/mixins-CcIWET41.js +627 -0
- package/dist/mixins-CcIWET41.js.map +1 -0
- package/dist/mixins-De3xfjrm.cjs +298 -0
- package/dist/mixins-De3xfjrm.cjs.map +1 -0
- package/dist/mixins.cjs +1 -1
- package/dist/mixins.js +2 -87
- package/dist/nav-drawer.cjs +1 -1
- package/dist/nav-drawer.js +2 -2
- 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 +15 -16
- package/dist/navigation-rail.js.map +1 -1
- package/dist/{notification-CC-TFN5v.js → notification-CVLqQ8c_.js} +40 -38
- package/dist/notification-CVLqQ8c_.js.map +1 -0
- package/dist/notification-D_PQjBSf.cjs +23 -0
- package/dist/notification-D_PQjBSf.cjs.map +1 -0
- package/dist/notification.cjs +1 -1
- package/dist/notification.js +1 -1
- package/dist/option-DDU_goh1.cjs +43 -0
- package/dist/option-DDU_goh1.cjs.map +1 -0
- package/dist/{option-BwAF4nAw.js → option-rm4HebVs.js} +9 -7
- package/dist/option-rm4HebVs.js.map +1 -0
- package/dist/option.cjs +1 -1
- package/dist/option.js +1 -1
- package/dist/{overlay-stack-7bs4ZNnh.cjs → overlay-stack-BprhAE9a.cjs} +1 -1
- package/dist/{overlay-stack-7bs4ZNnh.cjs.map → overlay-stack-BprhAE9a.cjs.map} +1 -1
- package/dist/{overlay-stack-DXPYHPhk.js → overlay-stack-CAQno0CK.js} +1 -1
- package/dist/{overlay-stack-DXPYHPhk.js.map → overlay-stack-CAQno0CK.js.map} +1 -1
- package/dist/overlay.cjs +43 -45
- package/dist/overlay.cjs.map +1 -1
- package/dist/overlay.js +684 -268
- package/dist/overlay.js.map +1 -1
- package/dist/page.cjs +3 -3
- package/dist/page.cjs.map +1 -1
- package/dist/page.js +15 -13
- package/dist/page.js.map +1 -1
- package/dist/{components-DZgJWHdZ.js → payment-card-form-C0dHYZIv.js} +21 -22
- package/dist/{components-DZgJWHdZ.js.map → payment-card-form-C0dHYZIv.js.map} +1 -1
- package/dist/payment-card-form-DNvmZxs4.cjs +73 -0
- package/dist/{components-DkmEgyAc.cjs.map → payment-card-form-DNvmZxs4.cjs.map} +1 -1
- package/dist/payment-card-form.cjs +1 -0
- package/dist/payment-card-form.js +2 -0
- package/dist/{progress-Bk_Q1Shy.js → progress-BRerM5Bn.js} +16 -13
- package/dist/progress-BRerM5Bn.js.map +1 -0
- package/dist/{progress-Yz6EMNSu.cjs → progress-U3LQkpM2.cjs} +3 -3
- package/dist/progress-U3LQkpM2.cjs.map +1 -0
- package/dist/progress.cjs +1 -1
- package/dist/progress.js +1 -1
- package/dist/qr-scanner.cjs +5 -5
- package/dist/qr-scanner.cjs.map +1 -1
- package/dist/qr-scanner.js +14 -15
- package/dist/qr-scanner.js.map +1 -1
- package/dist/{radio-group-BcdcjLNC.js → radio-group-BZ2WoOXJ.js} +14 -12
- package/dist/radio-group-BZ2WoOXJ.js.map +1 -0
- package/dist/radio-group-D7mm-yvJ.cjs +40 -0
- package/dist/radio-group-D7mm-yvJ.cjs.map +1 -0
- package/dist/radio-group.cjs +1 -1
- package/dist/radio-group.js +1 -1
- package/dist/range.cjs +2 -2
- package/dist/range.cjs.map +1 -1
- package/dist/range.js +9 -7
- package/dist/range.js.map +1 -1
- package/dist/{reduced-motion-BZTLqAyl.js.map → reduced-motion-D-L12p7G.js.map} +1 -1
- package/dist/{reduced-motion-9RjNnhIg.cjs.map → reduced-motion-Ds-HjMzn.cjs.map} +1 -1
- package/dist/{rxjs-utils-DJbZRjp3.cjs.map → rxjs-utils-Csnks202.cjs.map} +1 -1
- package/dist/{rxjs-utils-CKTnEKUH.js.map → rxjs-utils-d-ivVN84.js.map} +1 -1
- package/dist/rxjs-utils.cjs +1 -1
- package/dist/rxjs-utils.js +1 -1
- package/dist/scroll-DJTjNIT_.cjs +26 -0
- package/dist/scroll-DJTjNIT_.cjs.map +1 -0
- package/dist/{scroll-DXQv0ejL.js → scroll-qL-HkMdP.js} +9 -7
- package/dist/scroll-qL-HkMdP.js.map +1 -0
- package/dist/search-BLCRsxIC.cjs +1 -0
- package/dist/{search-CwMav5QB.cjs.map → search-BLCRsxIC.cjs.map} +1 -1
- package/dist/{search-CvUZRLF1.js → search-BTz7-Rev.js} +1 -1
- package/dist/{search-CvUZRLF1.js.map → search-BTz7-Rev.js.map} +1 -1
- package/dist/{select-BV4lK2zy.cjs → select-BvA7v-gL.cjs} +6 -6
- package/dist/select-BvA7v-gL.cjs.map +1 -0
- package/dist/{select-DKyGWDsG.js → select-CnPXUeSf.js} +23 -20
- package/dist/select-CnPXUeSf.js.map +1 -0
- package/dist/select.cjs +1 -1
- package/dist/select.js +1 -1
- package/dist/{sheet-C3TLKItO.js → sheet-BRL07BB4.js} +22 -20
- package/dist/sheet-BRL07BB4.js.map +1 -0
- package/dist/sheet-BYQJAHQn.cjs +35 -0
- package/dist/sheet-BYQJAHQn.cjs.map +1 -0
- package/dist/sheet.cjs +1 -1
- package/dist/sheet.js +2 -2
- package/dist/sheet.service-B25bsrYG.cjs +1 -0
- package/dist/{sheet.service-RcDBwHmv.cjs.map → sheet.service-B25bsrYG.cjs.map} +1 -1
- package/dist/{sheet.service-Dlv20Zfc.js → sheet.service-SPQ8oLCi.js} +3 -3
- package/dist/{sheet.service-Dlv20Zfc.js.map → sheet.service-SPQ8oLCi.js.map} +1 -1
- package/dist/skeleton.cjs +2 -2
- package/dist/skeleton.cjs.map +1 -1
- package/dist/skeleton.js +9 -7
- package/dist/skeleton.js.map +1 -1
- package/dist/skills/INDEX.md +1 -1
- package/dist/skills/SKILL.md +17 -5
- package/dist/skills/mixins.md +78 -20
- package/dist/skills/schmancy/INDEX.md +1 -1
- package/dist/skills/schmancy/SKILL.md +17 -5
- package/dist/skills/schmancy/mixins.md +78 -20
- package/dist/skills/schmancy/state.md +501 -0
- package/dist/skills/schmancy/theme.md +15 -0
- package/dist/skills/schmancy/timeline-tile.md +95 -0
- package/dist/skills/state.md +501 -0
- package/dist/skills/theme.md +15 -0
- package/dist/skills/timeline-tile.md +95 -0
- package/dist/slider.cjs +5 -5
- package/dist/slider.cjs.map +1 -1
- package/dist/slider.js +18 -13
- package/dist/slider.js.map +1 -1
- package/dist/sound.service-BGs6m0Cm.cjs +1 -0
- package/dist/sound.service-BGs6m0Cm.cjs.map +1 -0
- package/dist/{sound.service-DWZe6swU.js → sound.service-kKfsN0m-.js} +3 -3
- package/dist/sound.service-kKfsN0m-.js.map +1 -0
- package/dist/splash-screen-BDt4PInk.cjs +41 -0
- package/dist/splash-screen-BDt4PInk.cjs.map +1 -0
- package/dist/{splash-screen-DbI5RgBf.js → splash-screen-C8JCqX5L.js} +12 -9
- package/dist/splash-screen-C8JCqX5L.js.map +1 -0
- package/dist/splash-screen.cjs +1 -1
- package/dist/splash-screen.js +1 -1
- package/dist/src-CpRNClhg.cjs +263 -0
- package/dist/src-CpRNClhg.cjs.map +1 -0
- package/dist/{src-00DfxCJq.js → src-CqdnWGgr.js} +299 -351
- package/dist/src-CqdnWGgr.js.map +1 -0
- package/dist/state-BusMG6sM.js +868 -0
- package/dist/state-BusMG6sM.js.map +1 -0
- package/dist/state-DNdCPITt.cjs +1 -0
- package/dist/state-DNdCPITt.cjs.map +1 -0
- package/dist/state.cjs +1 -0
- package/dist/state.js +3 -0
- package/dist/steps.cjs +10 -10
- package/dist/steps.cjs.map +1 -1
- package/dist/steps.js +29 -24
- package/dist/steps.js.map +1 -1
- package/dist/surface-C8jQy8Ym.js +24 -0
- package/dist/surface-C8jQy8Ym.js.map +1 -0
- package/dist/surface-Du2Y4vXd.cjs +7 -0
- package/dist/surface-Du2Y4vXd.cjs.map +1 -0
- package/dist/surface.cjs +1 -1
- package/dist/surface.js +1 -1
- package/dist/switch.cjs +2 -2
- package/dist/switch.cjs.map +1 -1
- package/dist/switch.js +7 -5
- package/dist/switch.js.map +1 -1
- package/dist/table.cjs +72 -1
- package/dist/table.cjs.map +1 -0
- package/dist/table.js +174 -2
- package/dist/table.js.map +1 -0
- package/dist/tabs-0RfeCa00.cjs +31 -0
- package/dist/tabs-0RfeCa00.cjs.map +1 -0
- package/dist/{tabs-Ce55RbwF.js → tabs-Cyahh9Q6.js} +22 -22
- package/dist/tabs-Cyahh9Q6.js.map +1 -0
- package/dist/tabs.cjs +1 -1
- package/dist/tabs.js +1 -1
- package/dist/teleport.cjs +1 -1
- package/dist/teleport.js +2 -2
- package/dist/{textarea-DjN1D9u0.js → textarea-CXCcTVnf.js} +30 -28
- package/dist/textarea-CXCcTVnf.js.map +1 -0
- package/dist/textarea-jqRrLxmo.cjs +39 -0
- package/dist/textarea-jqRrLxmo.cjs.map +1 -0
- package/dist/textarea.cjs +1 -1
- package/dist/textarea.js +1 -1
- package/dist/{theme-pbxlt72h.js → theme-2KZW2Rfs.js} +45 -41
- package/dist/{theme-pbxlt72h.js.map → theme-2KZW2Rfs.js.map} +1 -1
- package/dist/theme-Hjz9sCN-.cjs +181 -0
- package/dist/{theme-B-IJ2r7Q.cjs.map → theme-Hjz9sCN-.cjs.map} +1 -1
- package/dist/{theme-button-CEMeAUOL.js → theme-button-9uF1eoHz.js} +3 -4
- package/dist/theme-button-9uF1eoHz.js.map +1 -0
- package/dist/theme-button-C7QIbke1.cjs +8 -0
- package/dist/theme-button-C7QIbke1.cjs.map +1 -0
- package/dist/theme-button.cjs +1 -1
- package/dist/theme-button.js +1 -1
- package/dist/theme.cjs +1 -1
- package/dist/{theme.events-NuihzD_p.js.map → theme.events-Cv7N4Toe.js.map} +1 -1
- package/dist/{theme.events-DakXxZeP.cjs.map → theme.events-DM4H5F2d.cjs.map} +1 -1
- package/dist/{theme.interface-DTwkuAKJ.cjs.map → theme.interface-D9l33b-M.cjs.map} +1 -1
- package/dist/{theme.interface-Buged9Cg.js.map → theme.interface-DnVNre4O.js.map} +1 -1
- package/dist/theme.js +5 -5
- package/dist/theme.service-BrUbGoeQ.cjs +1 -0
- package/dist/theme.service-BrUbGoeQ.cjs.map +1 -0
- package/dist/{theme.service-cOfPrtfe.js → theme.service-CmbOGMA8.js} +4 -4
- package/dist/theme.service-CmbOGMA8.js.map +1 -0
- package/dist/timeline.cjs +277 -0
- package/dist/timeline.cjs.map +1 -0
- package/dist/timeline.js +326 -0
- package/dist/timeline.js.map +1 -0
- package/dist/tree.cjs +2 -2
- package/dist/tree.cjs.map +1 -1
- package/dist/tree.js +15 -13
- package/dist/tree.js.map +1 -1
- package/dist/typewriter.cjs +10 -123
- package/dist/typewriter.cjs.map +1 -1
- package/dist/typewriter.js +90 -212
- package/dist/typewriter.js.map +1 -1
- package/dist/typography.cjs +3 -3
- package/dist/typography.cjs.map +1 -1
- package/dist/typography.js +18 -112
- package/dist/typography.js.map +1 -1
- package/dist/utils-Cr-YO4Np.cjs +1 -0
- package/dist/utils-Cr-YO4Np.cjs.map +1 -0
- package/dist/{utils-Bp2jhyZc.js → utils-hp-DnFf5.js} +16 -6
- package/dist/utils-hp-DnFf5.js.map +1 -0
- package/dist/utils.cjs +1 -1
- package/dist/utils.js +4 -5
- package/dist/visually-hidden.cjs +2 -2
- package/dist/visually-hidden.cjs.map +1 -1
- package/dist/visually-hidden.js +7 -5
- package/dist/visually-hidden.js.map +1 -1
- package/dist/{window-CrjZdf7Y.js → window-C7yY9yp5.js} +28 -30
- package/dist/window-C7yY9yp5.js.map +1 -0
- package/dist/window-DtUOWiAj.cjs +59 -0
- package/dist/window-DtUOWiAj.cjs.map +1 -0
- package/dist/window.cjs +1 -1
- package/dist/window.js +1 -1
- package/package.json +15 -4
- package/plugins/vite-plugin-schmancy-auto-import.ts +143 -0
- package/plugins/vite-plugin-schmancy-manifest.ts +438 -0
- package/skills/schmancy/INDEX.md +1 -1
- package/skills/schmancy/SKILL.md +17 -5
- package/skills/schmancy/mixins.md +78 -20
- package/skills/schmancy/state.md +501 -0
- package/skills/schmancy/theme.md +15 -0
- package/skills/schmancy/timeline-tile.md +95 -0
- package/src/agent/agent-bundle.test.ts +71 -54
- package/src/agent/agent-entry.ts +5 -21
- package/src/agent/helpers.ts +159 -0
- package/src/agent/schmancy-skill.ts +71 -0
- package/src/agent/virtual-manifest.d.ts +1 -12
- package/src/area/area.component.ts +7 -19
- package/src/area/area.service.test.ts +4 -5
- package/src/area/area.service.ts +4 -3
- package/src/area/route.component.ts +17 -4
- package/src/area/utils.ts +3 -2
- package/src/audio/emotional-sounds.ts +0 -2
- package/src/audio/sound.service.ts +7 -13
- package/src/autocomplete/autocomplete.ts +18 -21
- package/src/{avatar.ts → avatar/avatar.ts} +2 -2
- package/src/avatar/index.ts +1 -0
- package/src/badge/badge.ts +4 -3
- package/src/boat/boat.ts +28 -36
- package/src/breadcrumb/breadcrumb.ts +11 -19
- package/src/busy/busy.ts +4 -3
- package/src/busy/spinner.ts +4 -3
- package/src/button/button.ts +6 -11
- package/src/button/icon-button.ts +8 -12
- package/src/card/actions.ts +4 -12
- package/src/card/card.ts +5 -23
- package/src/card/content.ts +4 -12
- package/src/card/media.ts +4 -9
- package/src/charts/area-chart.ts +7 -4
- package/src/charts/pills.ts +6 -4
- package/src/checkbox/checkbox.test.ts +2 -2
- package/src/checkbox/checkbox.ts +3 -9
- package/src/chips/assist-chip.ts +6 -14
- package/src/chips/chips.ts +7 -21
- package/src/chips/filter-chip.ts +4 -3
- package/src/chips/input-chip.ts +10 -9
- package/src/chips/suggestion-chip.ts +10 -12
- package/src/code-highlight/code-highlight.ts +28 -59
- package/src/code-highlight/code-preview.ts +11 -9
- package/src/connectivity/connectivity-status.ts +4 -3
- package/src/content-drawer/drawer.ts +5 -3
- package/src/content-drawer/main.ts +5 -3
- package/src/content-drawer/sheet.ts +6 -4
- package/src/date-range/date-range-dialog.ts +2 -2
- package/src/date-range/date-range.ts +3 -2
- package/src/delay/delay.ts +2 -2
- package/src/details/details.ts +4 -17
- package/src/dialog/dialog-service.ts +2 -0
- package/src/dialog/dialog.component.ts +9 -9
- package/src/directives/drag.ts +1 -9
- package/src/directives/index.ts +0 -1
- package/src/discovery/discovery.service.ts +1 -1
- package/src/divider/divider.ts +5 -14
- package/src/dropdown/dropdown-component.ts +5 -16
- package/src/dropdown/dropdown-content.ts +7 -14
- package/src/expand/expand-root.component.ts +5 -15
- package/src/expand/expand.component.ts +4 -17
- package/src/extra/countries/countries.ts +5 -13
- package/src/extra/timezone/timezone.ts +7 -12
- package/src/form/form.test.ts +2 -2
- package/src/form/form.ts +2 -9
- package/src/icons/icon.ts +4 -3
- package/src/iframe/iframe.ts +13 -4
- package/src/index.ts +3 -3
- package/src/input/input.ts +6 -13
- package/src/json/json.ts +4 -3
- package/src/kbd/kbd.ts +4 -3
- package/src/layout/index.ts +1 -5
- package/src/layout/scroll/scroll.ts +5 -8
- package/src/lightbox/flip-directive.ts +1 -1
- package/src/lightbox/lightbox.ts +5 -14
- package/src/list/list-item.ts +4 -13
- package/src/list/list.ts +12 -10
- package/src/mailbox/email-editor.ts +17 -11
- package/src/mailbox/email-layout-selector.ts +2 -2
- package/src/mailbox/email-recipients.ts +13 -8
- package/src/mailbox/email-template-picker.ts +6 -5
- package/src/mailbox/email-viewer.ts +5 -3
- package/src/mailbox/mailbox.ts +6 -5
- package/src/map/map.ts +8 -6
- package/src/menu/menu-item.ts +5 -16
- package/src/menu/menu.ts +27 -13
- package/src/nav-drawer/appbar.ts +4 -14
- package/src/nav-drawer/content.ts +5 -14
- package/src/nav-drawer/drawer.ts +5 -18
- package/src/nav-drawer/navbar.ts +3 -17
- package/src/navigation-bar/navigation-bar-item.ts +8 -6
- package/src/navigation-bar/navigation-bar.ts +19 -19
- package/src/navigation-rail/navigation-rail-item.ts +9 -5
- package/src/navigation-rail/navigation-rail.ts +10 -14
- package/src/notification/notification-service.ts +0 -2
- package/src/notification/notification.ts +6 -3
- package/src/option/option.ts +4 -3
- package/src/overlay/overlay.animations.ts +183 -37
- package/src/overlay/overlay.component.ts +397 -190
- package/src/overlay/overlay.confirm-body.ts +21 -7
- package/src/overlay/overlay.gestures.ts +72 -36
- package/src/overlay/overlay.layout.ts +103 -1
- package/src/overlay/overlay.positioning.ts +301 -0
- package/src/overlay/overlay.service.ts +81 -3
- package/src/overlay/overlay.stack.ts +8 -10
- package/src/overlay/overlay.types.ts +83 -5
- package/src/page/page.ts +16 -11
- package/src/payment-card-form/index.ts +1 -0
- package/src/{components/form-elements → payment-card-form}/payment-card-form.ts +23 -23
- package/src/progress/progress.ts +5 -3
- package/src/qr-scanner/qr-scanner.ts +7 -30
- package/src/radio-group/radio-button.ts +3 -13
- package/src/radio-group/radio-group.ts +5 -22
- package/src/range/range.ts +4 -3
- package/src/rxjs-utils/waitForElements.ts +1 -1
- package/src/rxjs-utils/waitForElementsAll.ts +1 -1
- package/src/select/select.ts +10 -18
- package/src/sheet/hook.ts +1 -1
- package/src/sheet/sheet.ts +5 -20
- package/src/skeleton/skeleton.ts +4 -3
- package/src/slider/slide.ts +5 -3
- package/src/slider/slider.ts +5 -3
- package/src/splash-screen/splash-screen.ts +5 -3
- package/src/state/CLAUDE.md +161 -0
- package/src/state/MIGRATION.md +258 -0
- package/src/state/SCOPING.md +134 -0
- package/src/state/active-host.ts +190 -0
- package/src/state/index.ts +877 -0
- package/src/state/persist.ts +208 -0
- package/src/state/schmancy-context.ts +130 -0
- package/src/state/state.test-d.ts +227 -0
- package/src/state/state.test.ts +868 -0
- package/src/steps/schmancy-step.ts +5 -3
- package/src/steps/schmancy-steps-container.ts +5 -3
- package/src/surface/surface.ts +14 -9
- package/src/switch/switch.test.ts +2 -2
- package/src/switch/switch.ts +8 -10
- package/src/table/row.ts +7 -4
- package/src/table/table.ts +17 -14
- package/src/tabs/index.ts +0 -2
- package/src/tabs/tab.ts +2 -2
- package/src/tabs/tabs-group.ts +7 -4
- package/src/teleport/teleport.component.ts +5 -3
- package/src/textarea/textarea.ts +6 -12
- package/src/theme/theme-audio-player.ts +7 -5
- package/src/theme/theme-controller.ts +2 -2
- package/src/theme/theme.component.ts +22 -15
- package/src/theme/theme.service.ts +6 -7
- package/src/theme/theme.style.css +1 -0
- package/src/theme-button/theme-button.ts +2 -2
- package/src/timeline/index.ts +1 -0
- package/src/timeline/timeline-tile.ts +431 -0
- package/src/tree/tree.ts +4 -16
- package/src/typewriter/index.ts +1 -1
- package/src/typography/typography.ts +5 -98
- package/src/utils/intersection.ts +5 -1
- package/src/utils/overlay-stack.ts +1 -1
- package/src/utils/search.ts +2 -2
- package/src/visually-hidden/visually-hidden.ts +4 -3
- package/src/window/window-position.ts +3 -6
- package/src/window/window.ts +9 -7
- package/types/mixins/SchmancyElement.d.ts +49 -0
- package/types/mixins/formField.mixin.d.ts +4 -2
- package/types/mixins/index.d.ts +1 -0
- package/types/mixins/litElement.mixin.d.ts +11 -0
- package/types/src/agent/agent-entry.d.ts +2 -19
- package/types/src/agent/helpers.d.ts +0 -27
- package/types/src/agent/schmancy-skill.d.ts +3 -5
- package/types/src/area/area.component.d.ts +3 -17
- package/types/src/area/route.component.d.ts +14 -4
- package/types/src/audio/emotional-sounds.d.ts +0 -1
- package/types/src/audio/sound.service.d.ts +1 -1
- package/types/src/autocomplete/autocomplete.d.ts +4 -15
- package/types/src/{avatar.d.ts → avatar/avatar.d.ts} +2 -3
- package/types/src/avatar/index.d.ts +1 -0
- package/types/src/badge/badge.d.ts +3 -3
- package/types/src/boat/boat.d.ts +3 -2
- package/types/src/breadcrumb/breadcrumb.d.ts +9 -19
- package/types/src/busy/busy.d.ts +3 -3
- package/types/src/busy/spinner.d.ts +3 -3
- package/types/src/button/button.d.ts +4 -10
- package/types/src/button/icon-button.d.ts +5 -11
- package/types/src/card/actions.d.ts +3 -12
- package/types/src/card/card.d.ts +4 -24
- package/types/src/card/content.d.ts +3 -12
- package/types/src/card/media.d.ts +3 -9
- package/types/src/charts/area-chart.d.ts +3 -3
- package/types/src/charts/pills.d.ts +3 -3
- package/types/src/checkbox/checkbox.d.ts +3 -10
- package/types/src/chips/assist-chip.d.ts +5 -15
- package/types/src/chips/chips.d.ts +3 -17
- package/types/src/chips/filter-chip.d.ts +3 -3
- package/types/src/chips/input-chip.d.ts +9 -10
- package/types/src/chips/suggestion-chip.d.ts +9 -13
- package/types/src/code-highlight/code-highlight.d.ts +4 -11
- package/types/src/code-highlight/code-preview.d.ts +3 -3
- package/types/src/connectivity/connectivity-status.d.ts +3 -3
- package/types/src/content-drawer/drawer.d.ts +4 -4
- package/types/src/content-drawer/main.d.ts +3 -3
- package/types/src/content-drawer/sheet.d.ts +4 -4
- package/types/src/date-range/date-range-dialog.d.ts +2 -3
- package/types/src/date-range/date-range.d.ts +2 -3
- package/types/src/delay/delay.d.ts +2 -3
- package/types/src/details/details.d.ts +3 -14
- package/types/src/dialog/dialog.component.d.ts +9 -9
- package/types/src/directives/drag.d.ts +1 -3
- package/types/src/directives/index.d.ts +0 -1
- package/types/src/divider/divider.d.ts +3 -14
- package/types/src/dropdown/dropdown-component.d.ts +4 -17
- package/types/src/dropdown/dropdown-content.d.ts +6 -14
- package/types/src/expand/expand-root.component.d.ts +4 -14
- package/types/src/expand/expand.component.d.ts +3 -17
- package/types/src/extra/countries/countries.d.ts +3 -13
- package/types/src/extra/timezone/timezone.d.ts +4 -11
- package/types/src/form/form.d.ts +2 -9
- package/types/src/icons/icon.d.ts +3 -3
- package/types/src/iframe/iframe.d.ts +5 -3
- package/types/src/index.d.ts +3 -3
- package/types/src/input/input.d.ts +4 -11
- package/types/src/json/json.d.ts +3 -3
- package/types/src/kbd/kbd.d.ts +3 -3
- package/types/src/layout/index.d.ts +0 -4
- package/types/src/layout/scroll/scroll.d.ts +4 -8
- package/types/src/lightbox/lightbox.d.ts +3 -14
- package/types/src/list/list-item.d.ts +3 -13
- package/types/src/list/list.d.ts +11 -10
- package/types/src/mailbox/email-editor.d.ts +3 -3
- package/types/src/mailbox/email-layout-selector.d.ts +2 -3
- package/types/src/mailbox/email-recipients.d.ts +7 -3
- package/types/src/mailbox/email-template-picker.d.ts +4 -4
- package/types/src/mailbox/email-viewer.d.ts +3 -3
- package/types/src/mailbox/mailbox.d.ts +4 -4
- package/types/src/map/map.d.ts +4 -3
- package/types/src/menu/menu-item.d.ts +3 -16
- package/types/src/menu/menu.d.ts +25 -13
- package/types/src/nav-drawer/appbar.d.ts +3 -14
- package/types/src/nav-drawer/content.d.ts +3 -14
- package/types/src/nav-drawer/drawer.d.ts +3 -18
- package/types/src/nav-drawer/navbar.d.ts +3 -18
- package/types/src/navigation-bar/navigation-bar-item.d.ts +7 -6
- package/types/src/navigation-bar/navigation-bar.d.ts +13 -7
- package/types/src/navigation-rail/navigation-rail-item.d.ts +9 -6
- package/types/src/navigation-rail/navigation-rail.d.ts +10 -15
- package/types/src/notification/notification-service.d.ts +0 -1
- package/types/src/notification/notification.d.ts +3 -3
- package/types/src/option/option.d.ts +3 -3
- package/types/src/overlay/overlay.animations.d.ts +54 -6
- package/types/src/overlay/overlay.component.d.ts +39 -15
- package/types/src/overlay/overlay.confirm-body.d.ts +4 -4
- package/types/src/overlay/overlay.gestures.d.ts +26 -17
- package/types/src/overlay/overlay.layout.d.ts +27 -1
- package/types/src/overlay/overlay.positioning.d.ts +87 -0
- package/types/src/overlay/overlay.stack.d.ts +0 -2
- package/types/src/overlay/overlay.types.d.ts +59 -5
- package/types/src/page/page.d.ts +14 -11
- package/types/src/{components/form-elements → payment-card-form}/payment-card-form.d.ts +2 -3
- package/types/src/progress/progress.d.ts +3 -3
- package/types/src/qr-scanner/qr-scanner.d.ts +3 -3
- package/types/src/radio-group/radio-button.d.ts +3 -12
- package/types/src/radio-group/radio-group.d.ts +4 -20
- package/types/src/range/range.d.ts +3 -3
- package/types/src/rxjs-utils/waitForElements.d.ts +1 -1
- package/types/src/rxjs-utils/waitForElementsAll.d.ts +1 -1
- package/types/src/select/select.d.ts +4 -15
- package/types/src/sheet/sheet.d.ts +3 -20
- package/types/src/skeleton/skeleton.d.ts +3 -3
- package/types/src/slider/slide.d.ts +3 -2
- package/types/src/slider/slider.d.ts +3 -3
- package/types/src/splash-screen/splash-screen.d.ts +3 -3
- package/types/src/state/active-host.d.ts +23 -0
- package/types/src/state/index.d.ts +145 -0
- package/types/src/state/persist.d.ts +14 -0
- package/types/src/state/schmancy-context.d.ts +32 -0
- package/types/src/state/state.test-d.d.ts +131 -0
- package/types/src/state/state.test.d.ts +1 -0
- package/types/src/steps/schmancy-step.d.ts +3 -3
- package/types/src/steps/schmancy-steps-container.d.ts +3 -3
- package/types/src/surface/surface.d.ts +13 -5
- package/types/src/switch/switch.d.ts +7 -11
- package/types/src/table/row.d.ts +2 -3
- package/types/src/table/table.d.ts +4 -11
- package/types/src/tabs/index.d.ts +0 -2
- package/types/src/tabs/tab.d.ts +2 -3
- package/types/src/tabs/tabs-group.d.ts +3 -3
- package/types/src/teleport/teleport.component.d.ts +3 -3
- package/types/src/textarea/textarea.d.ts +5 -12
- package/types/src/theme/theme-audio-player.d.ts +3 -3
- package/types/src/theme/theme-controller.d.ts +2 -2
- package/types/src/theme/theme.component.d.ts +18 -13
- package/types/src/theme-button/theme-button.d.ts +2 -3
- package/types/src/timeline/index.d.ts +1 -0
- package/types/src/timeline/timeline-tile.d.ts +44 -0
- package/types/src/tree/tree.d.ts +3 -16
- package/types/src/typewriter/index.d.ts +1 -1
- package/types/src/typography/typography.d.ts +3 -36
- package/types/src/visually-hidden/visually-hidden.d.ts +3 -3
- package/types/src/window/window.d.ts +3 -3
- package/dist/agent/index.es-Dymj8REP.js +0 -489
- package/dist/agent/index.es-Dymj8REP.js.map +0 -1
- package/dist/area-BGBCMC79.js.map +0 -1
- package/dist/area-D7l9KR2N.cjs +0 -12
- package/dist/area-D7l9KR2N.cjs.map +0 -1
- package/dist/autocomplete-BPD5uraA.cjs +0 -115
- package/dist/autocomplete-BPD5uraA.cjs.map +0 -1
- package/dist/autocomplete-C2P0Soht.js.map +0 -1
- package/dist/boat-BkIO-0No.cjs +0 -80
- package/dist/boat-BkIO-0No.cjs.map +0 -1
- package/dist/boat-DXZ0k7oa.js.map +0 -1
- package/dist/busy-DGYhpTnO.cjs.map +0 -1
- package/dist/busy-iRjq6Nvd.js.map +0 -1
- package/dist/card-DjYnCckw.cjs.map +0 -1
- package/dist/card-wUTjx0EC.js.map +0 -1
- package/dist/checkbox-CiYEtw9F.cjs +0 -39
- package/dist/checkbox-CiYEtw9F.cjs.map +0 -1
- package/dist/checkbox-VBSenxgb.js.map +0 -1
- package/dist/chips-BDS9lkPa.js.map +0 -1
- package/dist/chips-D6ptH5re.cjs.map +0 -1
- package/dist/code-highlight-Bi91XHJN.js.map +0 -1
- package/dist/code-highlight-BzRmBZzz.cjs.map +0 -1
- package/dist/components-DkmEgyAc.cjs +0 -73
- package/dist/components.cjs +0 -1
- package/dist/components.js +0 -2
- package/dist/context-BerzpUhI.js +0 -3
- package/dist/context-C6dHUHhi.cjs +0 -1
- package/dist/date-range-BmFxTXiU.cjs +0 -131
- package/dist/date-range-BmFxTXiU.cjs.map +0 -1
- package/dist/date-range-ClTMg1AB.js.map +0 -1
- package/dist/date-range-inline-B9Dp2z6C.cjs +0 -43
- package/dist/delay-BHODnTg-.cjs +0 -9
- package/dist/delay-BHODnTg-.cjs.map +0 -1
- package/dist/delay-Dlk0A3he.js +0 -347
- package/dist/delay-Dlk0A3he.js.map +0 -1
- package/dist/details-CPjlqQD4.js.map +0 -1
- package/dist/details-Cz9ok9si.cjs.map +0 -1
- package/dist/dialog-service-CzDO08Gy.cjs.map +0 -1
- package/dist/dialog-service-DH-tjPuE.js.map +0 -1
- package/dist/divider-CILo3_vi.cjs.map +0 -1
- package/dist/divider-ghgyw5CU.js.map +0 -1
- package/dist/expand-CbjBr_Ds.js.map +0 -1
- package/dist/expand-r3OrSoDk.cjs +0 -141
- package/dist/expand-r3OrSoDk.cjs.map +0 -1
- package/dist/extra-BZeZOMBI.cjs.map +0 -1
- package/dist/extra-DK9MQtPJ.js.map +0 -1
- package/dist/float-CuZ8LOgB.cjs +0 -1
- package/dist/flow-BPDtbhLe.js +0 -386
- package/dist/flow-BPDtbhLe.js.map +0 -1
- package/dist/flow-Dn9AZktE.cjs +0 -1
- package/dist/flow-Dn9AZktE.cjs.map +0 -1
- package/dist/form-rCZqoAoK.js.map +0 -1
- package/dist/form-wI58M85H.cjs.map +0 -1
- package/dist/handover/agent-runtime-v2-loopback.md +0 -71
- package/dist/handover/claude-design-v2-paste.md +0 -42
- package/dist/icons-Drq4kKy2.js.map +0 -1
- package/dist/icons-DtdhaZdc.cjs +0 -52
- package/dist/icons-DtdhaZdc.cjs.map +0 -1
- package/dist/iframe-BkwwWIbQ.cjs +0 -24
- package/dist/iframe-BkwwWIbQ.cjs.map +0 -1
- package/dist/iframe-BmyHW8km.js.map +0 -1
- package/dist/index.es-BgmFX1JM.cjs +0 -1
- package/dist/index.es-BgmFX1JM.cjs.map +0 -1
- package/dist/index.es-CLyb_o3Y.js +0 -489
- package/dist/index.es-CLyb_o3Y.js.map +0 -1
- package/dist/input-BGNZlfL8.cjs +0 -51
- package/dist/input-BGNZlfL8.cjs.map +0 -1
- package/dist/input-Bc3bVISm.js.map +0 -1
- package/dist/input-chip-BQrjpjaQ.js.map +0 -1
- package/dist/input-chip-DN-cwf11.cjs.map +0 -1
- package/dist/intersection-BrXp4YTO.js +0 -12
- package/dist/intersection-BrXp4YTO.js.map +0 -1
- package/dist/intersection-DqBqnpgh.cjs +0 -1
- package/dist/intersection-DqBqnpgh.cjs.map +0 -1
- package/dist/layout-7eyMBmZk.cjs +0 -17
- package/dist/layout-7eyMBmZk.cjs.map +0 -1
- package/dist/layout-Ox6nJkzC.js +0 -268
- package/dist/layout-Ox6nJkzC.js.map +0 -1
- package/dist/lightbox-CY52Z_ig.js.map +0 -1
- package/dist/lightbox-H8Uq3AXy.cjs +0 -202
- package/dist/lightbox-H8Uq3AXy.cjs.map +0 -1
- package/dist/list-BGjVo6zb.cjs +0 -40
- package/dist/list-BGjVo6zb.cjs.map +0 -1
- package/dist/list-D7wUxu1C.js.map +0 -1
- package/dist/litElement.mixin-CszkJuNl.js +0 -12
- package/dist/litElement.mixin-CszkJuNl.js.map +0 -1
- package/dist/litElement.mixin-qh5-IIUq.cjs +0 -1
- package/dist/litElement.mixin-qh5-IIUq.cjs.map +0 -1
- package/dist/mailbox--EN-JhjV.js.map +0 -1
- package/dist/mailbox-DLiBGJhY.cjs.map +0 -1
- package/dist/map-B0S_q3ma.js.map +0 -1
- package/dist/map-EDQN0I6e.cjs +0 -80
- package/dist/map-EDQN0I6e.cjs.map +0 -1
- package/dist/menu-3edZGQ1x.cjs.map +0 -1
- package/dist/menu-COeFpb6n.js.map +0 -1
- package/dist/metric.cjs +0 -69
- package/dist/metric.cjs.map +0 -1
- package/dist/metric.js +0 -93
- package/dist/metric.js.map +0 -1
- package/dist/mixins.cjs.map +0 -1
- package/dist/mixins.js.map +0 -1
- package/dist/notification-CC-TFN5v.js.map +0 -1
- package/dist/notification-P4c-kFdH.cjs +0 -23
- package/dist/notification-P4c-kFdH.cjs.map +0 -1
- package/dist/option-BwAF4nAw.js.map +0 -1
- package/dist/option-Cu0ertuF.cjs +0 -43
- package/dist/option-Cu0ertuF.cjs.map +0 -1
- package/dist/progress-Bk_Q1Shy.js.map +0 -1
- package/dist/progress-Yz6EMNSu.cjs.map +0 -1
- package/dist/provide-CYgj58u_.cjs +0 -1
- package/dist/provide-CYgj58u_.cjs.map +0 -1
- package/dist/provide-ydIskwf2.js +0 -107
- package/dist/provide-ydIskwf2.js.map +0 -1
- package/dist/radio-group-BcdcjLNC.js.map +0 -1
- package/dist/radio-group-BpBz5tRA.cjs +0 -40
- package/dist/radio-group-BpBz5tRA.cjs.map +0 -1
- package/dist/scroll-DXQv0ejL.js.map +0 -1
- package/dist/scroll-DbZMTv0K.cjs +0 -26
- package/dist/scroll-DbZMTv0K.cjs.map +0 -1
- package/dist/search-CwMav5QB.cjs +0 -1
- package/dist/select-BV4lK2zy.cjs.map +0 -1
- package/dist/select-DKyGWDsG.js.map +0 -1
- package/dist/sheet-BAI_jH1t.cjs +0 -35
- package/dist/sheet-BAI_jH1t.cjs.map +0 -1
- package/dist/sheet-C3TLKItO.js.map +0 -1
- package/dist/sheet.service-RcDBwHmv.cjs +0 -1
- package/dist/skills/schmancy/store.md +0 -126
- package/dist/skills/store.md +0 -126
- package/dist/sound.service-BEN6Xjy_.cjs +0 -1
- package/dist/sound.service-BEN6Xjy_.cjs.map +0 -1
- package/dist/sound.service-DWZe6swU.js.map +0 -1
- package/dist/splash-screen-DbI5RgBf.js.map +0 -1
- package/dist/splash-screen-DoHRTHi8.cjs +0 -41
- package/dist/splash-screen-DoHRTHi8.cjs.map +0 -1
- package/dist/src-00DfxCJq.js.map +0 -1
- package/dist/src-C_JjQovE.cjs +0 -269
- package/dist/src-C_JjQovE.cjs.map +0 -1
- package/dist/store-CjFHCSDb.cjs +0 -1
- package/dist/store-CjFHCSDb.cjs.map +0 -1
- package/dist/store-CjzZDQt8.js +0 -1654
- package/dist/store-CjzZDQt8.js.map +0 -1
- package/dist/store.cjs +0 -1
- package/dist/store.js +0 -2
- package/dist/surface-D-GWBcsh.cjs +0 -7
- package/dist/surface-D-GWBcsh.cjs.map +0 -1
- package/dist/surface-D23JtxYP.js +0 -22
- package/dist/surface-D23JtxYP.js.map +0 -1
- package/dist/surface.mixin-DqMwoddO.js +0 -320
- package/dist/surface.mixin-DqMwoddO.js.map +0 -1
- package/dist/surface.mixin-DxOi-xo0.cjs +0 -297
- package/dist/surface.mixin-DxOi-xo0.cjs.map +0 -1
- package/dist/table-C7b73kdg.cjs +0 -63
- package/dist/table-C7b73kdg.cjs.map +0 -1
- package/dist/table-CTrhV9-k.js +0 -631
- package/dist/table-CTrhV9-k.js.map +0 -1
- package/dist/tabs-Ce55RbwF.js.map +0 -1
- package/dist/tabs-DAzB8O7w.cjs +0 -31
- package/dist/tabs-DAzB8O7w.cjs.map +0 -1
- package/dist/tailwind.mixin-DRI1oTYQ.cjs +0 -2
- package/dist/tailwind.mixin-DRI1oTYQ.cjs.map +0 -1
- package/dist/tailwind.mixin-mdQR3BEO.js +0 -219
- package/dist/tailwind.mixin-mdQR3BEO.js.map +0 -1
- package/dist/textarea-DjN1D9u0.js.map +0 -1
- package/dist/textarea-PuHxBvJA.cjs +0 -39
- package/dist/textarea-PuHxBvJA.cjs.map +0 -1
- package/dist/theme-B-IJ2r7Q.cjs +0 -181
- package/dist/theme-button-BSbYmS4p.cjs +0 -8
- package/dist/theme-button-BSbYmS4p.cjs.map +0 -1
- package/dist/theme-button-CEMeAUOL.js.map +0 -1
- package/dist/theme.service-DxJPUGlu.cjs +0 -1
- package/dist/theme.service-DxJPUGlu.cjs.map +0 -1
- package/dist/theme.service-cOfPrtfe.js.map +0 -1
- package/dist/tslib.es6-Cnt75pb6.cjs +0 -1
- package/dist/tslib.es6-Cnt75pb6.cjs.map +0 -1
- package/dist/tslib.es6-DMzzJKHV.js +0 -7
- package/dist/tslib.es6-DMzzJKHV.js.map +0 -1
- package/dist/utils-Bp2jhyZc.js.map +0 -1
- package/dist/utils-CBPQvxNW.cjs +0 -1
- package/dist/utils-CBPQvxNW.cjs.map +0 -1
- package/dist/window-CrjZdf7Y.js.map +0 -1
- package/dist/window-DTUARSrU.cjs +0 -59
- package/dist/window-DTUARSrU.cjs.map +0 -1
- package/skills/schmancy/store.md +0 -126
- package/src/components/form-elements/index.ts +0 -1
- package/src/components/index.ts +0 -1
- package/src/layout/flex/flex.scss +0 -4
- package/src/layout/flex/flex.ts +0 -74
- package/src/layout/flex/index.ts +0 -1
- package/src/layout/grid/.readme +0 -79
- package/src/layout/grid/grid.scss +0 -5
- package/src/layout/grid/grid.ts +0 -121
- package/src/layout/grid/index.ts +0 -1
- package/src/layout/layout.ts +0 -122
- package/src/layout/v2/flex.ts +0 -243
- package/src/layout/v2/index.ts +0 -1
- package/src/metric/index.ts +0 -1
- package/src/metric/metric.ts +0 -127
- package/src/store/context-array.ts +0 -358
- package/src/store/context-collection.ts +0 -218
- package/src/store/context-create.ts +0 -284
- package/src/store/context-object.ts +0 -298
- package/src/store/filter-directive.ts +0 -614
- package/src/store/index.ts +0 -10
- package/src/store/selector-hook.ts +0 -259
- package/src/store/selectors.ts +0 -289
- package/src/store/storage-manager.ts +0 -269
- package/src/store/store.class.ts +0 -239
- package/src/store/types.ts +0 -327
- package/src/tabs/tabs-compatibility.ts +0 -20
- package/src/typewriter/typewriter.ts +0 -410
- package/types/src/agent/index.d.ts +0 -1
- package/types/src/area/route.test.d.ts +0 -20
- package/types/src/button/button.test.d.ts +0 -1
- package/types/src/chips/chip.d.ts +0 -3
- package/types/src/components/index.d.ts +0 -1
- package/types/src/content-drawer/$sheet.d.ts +0 -14
- package/types/src/dialog/dailog.d.ts +0 -116
- package/types/src/dialog/dialog-content.d.ts +0 -17
- package/types/src/directives/guard.d.ts +0 -1
- package/types/src/directives/visibility.d.ts +0 -11
- package/types/src/form/form-v2.d.ts +0 -22
- package/types/src/input/input-v2.d.ts +0 -250
- package/types/src/layout/flex/flex.d.ts +0 -26
- package/types/src/layout/flex/index.d.ts +0 -1
- package/types/src/layout/grid/grid.d.ts +0 -39
- package/types/src/layout/grid/index.d.ts +0 -1
- package/types/src/layout/layout.d.ts +0 -59
- package/types/src/layout/v2/flex.d.ts +0 -65
- package/types/src/layout/v2/grid.d.ts +0 -51
- package/types/src/layout/v2/index.d.ts +0 -1
- package/types/src/lightbox/flip.directive.d.ts +0 -22
- package/types/src/metric/index.d.ts +0 -1
- package/types/src/metric/metric.d.ts +0 -39
- package/types/src/notification/outlet.d.ts +0 -10
- package/types/src/sheet/header.d.ts +0 -10
- package/types/src/store/context-array.d.ts +0 -83
- package/types/src/store/context-collection.d.ts +0 -74
- package/types/src/store/context-create.d.ts +0 -43
- package/types/src/store/context-object.d.ts +0 -46
- package/types/src/store/filter-directive.d.ts +0 -116
- package/types/src/store/immer-integration.d.ts +0 -54
- package/types/src/store/index.d.ts +0 -10
- package/types/src/store/selector-hook.d.ts +0 -46
- package/types/src/store/selectors.d.ts +0 -90
- package/types/src/store/storage-manager.d.ts +0 -48
- package/types/src/store/store.class.d.ts +0 -73
- package/types/src/store/types.d.ts +0 -241
- package/types/src/tabs/tabs-compatibility.d.ts +0 -13
- package/types/src/theme/theme.elevation.d.ts +0 -131
- package/types/src/theme/theme.motion.d.ts +0 -198
- package/types/src/theme/theme.shape.d.ts +0 -144
- package/types/src/theme/theme.state.d.ts +0 -546
- package/types/src/theme/theme.typography.d.ts +0 -74
- package/types/src/tooltip/tooltip.d.ts +0 -33
- package/types/src/typewriter/typewriter.d.ts +0 -94
- /package/dist/agent/{flow-CvG1fLW5.js → flow-CaPi2G8y.js} +0 -0
- /package/dist/agent/{vendor-material-color-DcL7ZPxx.js → vendor-material-color-Be96dpGE.js} +0 -0
- /package/dist/{animation-hXFClrIn.js → animation-BK-8BwY8.js} +0 -0
- /package/dist/{animation-CQRdLgzX.cjs → animation-CO_Csq84.cjs} +0 -0
- /package/dist/{decorate-D_utPUsC.js → decorate-23nYs4Le.js} +0 -0
- /package/dist/{decorate-F9CuyeHg.cjs → decorate-DpFmy0nm.cjs} +0 -0
- /package/dist/{hashContent-B2IntJQf.js → hashContent-1ARKIsx9.js} +0 -0
- /package/dist/{hashContent-CahnEuut.cjs → hashContent-Bp5S6T4U.cjs} +0 -0
- /package/dist/{lazy-D6R5N5v4.js → lazy-B0ia54tT.js} +0 -0
- /package/dist/{lazy-BDNnH_r7.cjs → lazy-Dq9mRRjT.cjs} +0 -0
- /package/dist/{reduced-motion-BZTLqAyl.js → reduced-motion-D-L12p7G.js} +0 -0
- /package/dist/{reduced-motion-9RjNnhIg.cjs → reduced-motion-Ds-HjMzn.cjs} +0 -0
- /package/dist/{rxjs-utils-DJbZRjp3.cjs → rxjs-utils-Csnks202.cjs} +0 -0
- /package/dist/{rxjs-utils-CKTnEKUH.js → rxjs-utils-d-ivVN84.js} +0 -0
- /package/dist/{theme.events-NuihzD_p.js → theme.events-Cv7N4Toe.js} +0 -0
- /package/dist/{theme.events-DakXxZeP.cjs → theme.events-DM4H5F2d.cjs} +0 -0
- /package/dist/{theme.interface-DTwkuAKJ.cjs → theme.interface-D9l33b-M.cjs} +0 -0
- /package/dist/{theme.interface-Buged9Cg.js → theme.interface-DnVNre4O.js} +0 -0
- /package/src/{directives/typewriter.ts → typewriter/typewriter.directive.ts} +0 -0
- /package/types/src/{components/form-elements → payment-card-form}/index.d.ts +0 -0
- /package/types/src/{directives/typewriter.d.ts → typewriter/typewriter.directive.d.ts} +0 -0
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"theme.service-cOfPrtfe.js","names":[],"sources":["../src/theme/theme.service.ts"],"sourcesContent":["import {\n BehaviorSubject,\n Observable,\n fromEvent,\n timer,\n map,\n takeUntil,\n defaultIfEmpty,\n distinctUntilChanged,\n shareReplay,\n tap,\n switchMap,\n of\n} from 'rxjs'\nimport { ThemeHereIAm, ThemeHereIAmEvent, ThemeWhereAreYou } from './theme.events'\nimport type { SchmancyThemeComponent } from './theme.component'\nimport type { TSchmancyTheme } from './theme.interface'\nimport { createContext } from '../store'\n\ninterface ThemeSettings {\n scheme: 'dark' | 'light' | 'auto'\n color: string\n}\n\n// Single context for all theme settings\nconst ThemeContext = createContext<ThemeSettings>(\n { scheme: 'auto', color: '#6200ee' },\n 'local',\n 'schmancy-theme-settings'\n)\n\n/**\n * Theme Service - Provides centralized theme management for Schmancy components.\n *\n * This service acts as a singleton interface to interact with the theme system,\n * providing reactive observables for theme state and methods to control theming.\n *\n * @example\n * ```typescript\n * import { theme } from '@schmancy/theme'\n *\n * // Subscribe to theme changes\n * theme.scheme$.subscribe(scheme => {\n * console.log('Current scheme:', scheme) // 'light' | 'dark' | 'auto'\n * })\n *\n * // Get current values synchronously\n * const currentScheme = theme.scheme\n * const currentColor = theme.color\n *\n * // Toggle between light and dark mode\n * theme.toggleScheme()\n *\n * // Set specific scheme\n * theme.setScheme('dark')\n *\n * // Check if dark mode is active\n * theme.isDarkMode().subscribe(isDark => {\n * console.log('Is dark mode:', isDark)\n * })\n * ```\n */\nclass ThemeService {\n private static instance: ThemeService\n\n // Observable properties for theme values\n private _theme$ = new BehaviorSubject<Partial<TSchmancyTheme>>({})\n private _themeComponent$ = new BehaviorSubject<SchmancyThemeComponent | null>(null)\n private _fullscreen$ = new BehaviorSubject<boolean>(false)\n private _bottomOffset$ = new BehaviorSubject<number>(0)\n\n // Public observables derived from context\n public readonly scheme$ = ThemeContext.$.pipe(\n map(settings => settings.scheme),\n distinctUntilChanged(),\n shareReplay(1)\n )\n\n public readonly color$ = ThemeContext.$.pipe(\n map(settings => settings.color),\n distinctUntilChanged(),\n shareReplay(1)\n )\n\n public readonly theme$ = this._theme$.asObservable().pipe(\n distinctUntilChanged((a, b) => JSON.stringify(a) === JSON.stringify(b)),\n shareReplay(1)\n )\n\n public readonly themeComponent$ = this._themeComponent$.asObservable().pipe(\n distinctUntilChanged(),\n shareReplay(1)\n )\n\n public readonly fullscreen$ = this._fullscreen$.asObservable().pipe(\n distinctUntilChanged(),\n shareReplay(1)\n )\n\n public readonly bottomOffset$ = this._bottomOffset$.asObservable().pipe(\n distinctUntilChanged(),\n shareReplay(1)\n )\n\n // Getters for synchronous access to current values\n get scheme(): 'dark' | 'light' | 'auto' {\n return ThemeContext.value.scheme\n }\n\n get color(): string {\n return ThemeContext.value.color\n }\n\n get theme(): Partial<TSchmancyTheme> {\n return this._theme$.getValue()\n }\n\n get themeComponent(): SchmancyThemeComponent | null {\n return this._themeComponent$.getValue()\n }\n\n get fullscreen(): boolean {\n return this._fullscreen$.getValue()\n }\n\n get bottomOffset(): number {\n return this._bottomOffset$.getValue()\n }\n\n // Computed observable for actual scheme (resolving 'auto')\n public readonly resolvedScheme$ = this.scheme$.pipe(\n switchMap(scheme => {\n if (scheme === 'auto') {\n // Listen to system preference changes\n const mediaQuery = window.matchMedia('(prefers-color-scheme: dark)')\n return new Observable<'dark' | 'light'>(subscriber => {\n const handler = (e: MediaQueryListEvent) => {\n subscriber.next(e.matches ? 'dark' : 'light')\n }\n mediaQuery.addEventListener('change', handler)\n\n // Emit initial value\n subscriber.next(mediaQuery.matches ? 'dark' : 'light')\n\n // Cleanup\n return () => mediaQuery.removeEventListener('change', handler)\n })\n }\n return of(scheme as 'dark' | 'light')\n }),\n distinctUntilChanged(),\n shareReplay(1)\n )\n\n constructor() {\n this.discoverTheme()\n }\n\n /**\n * Discover the nearest theme component in the DOM.\n * This method can be called to refresh the theme discovery process.\n *\n * @returns {Observable<SchmancyThemeComponent | null>} Observable that emits the discovered theme component or null\n *\n * @example\n * ```typescript\n * theme.discoverTheme().subscribe(component => {\n * if (component) {\n * console.log('Theme component found:', component)\n * } else {\n * console.log('No theme component found')\n * }\n * })\n * ```\n */\n public discoverTheme(): Observable<SchmancyThemeComponent | null> {\n // Dispatch discovery event and wait for response\n return fromEvent<ThemeHereIAmEvent>(window, ThemeHereIAm).pipe(\n takeUntil(timer(100)), // Wait up to 100ms for response\n map(e => e.detail.theme as SchmancyThemeComponent),\n defaultIfEmpty(null),\n tap(themeComponent => {\n if (themeComponent) {\n this.registerThemeComponent(themeComponent)\n }\n })\n ).pipe(\n tap(() => {\n // Trigger theme discovery\n window.dispatchEvent(\n new CustomEvent(ThemeWhereAreYou, {\n bubbles: true,\n composed: true,\n })\n )\n }),\n switchMap(() =>\n fromEvent<ThemeHereIAmEvent>(window, ThemeHereIAm).pipe(\n takeUntil(timer(100)),\n map(e => e.detail.theme as SchmancyThemeComponent),\n defaultIfEmpty(null),\n tap(themeComponent => {\n if (themeComponent) {\n this.registerThemeComponent(themeComponent)\n }\n })\n )\n )\n )\n }\n\n /**\n * Register a theme component and subscribe to its changes.\n * This is typically called internally by theme components when they mount or update.\n *\n * @param {SchmancyThemeComponent} component - The theme component to register\n *\n * @internal\n */\n public registerThemeComponent(component: SchmancyThemeComponent): void {\n this._themeComponent$.next(component)\n\n // Update values from the component\n ThemeContext.set({ scheme: component.scheme, color: component.color })\n this._theme$.next(component.theme)\n }\n\n /**\n * Update theme values. Usually called internally by theme components.\n *\n * @param {Object} values - Theme values to update\n * @param {'dark' | 'light' | 'auto'} [values.scheme] - Color scheme to set\n * @param {string} [values.color] - Primary color in hex format\n * @param {Partial<TSchmancyTheme>} [values.theme] - Theme configuration object\n *\n * @internal\n */\n public updateTheme(values: {\n scheme?: 'dark' | 'light' | 'auto'\n color?: string\n theme?: Partial<TSchmancyTheme>\n }): void {\n const updates: Partial<ThemeSettings> = {}\n if (values.scheme !== undefined) {\n updates.scheme = values.scheme\n }\n if (values.color !== undefined) {\n updates.color = values.color\n }\n if (Object.keys(updates).length > 0) {\n ThemeContext.set(updates)\n }\n if (values.theme !== undefined) {\n this._theme$.next(values.theme)\n }\n }\n\n /**\n * Set the color scheme for the application.\n *\n * @param {'dark' | 'light' | 'auto'} scheme - The color scheme to set\n *\n * @example\n * ```typescript\n * // Set to dark mode\n * theme.setScheme('dark')\n *\n * // Set to auto (follows system preference)\n * theme.setScheme('auto')\n * ```\n */\n public setScheme(scheme: 'dark' | 'light' | 'auto'): void {\n const component = this.themeComponent\n if (component) {\n component.scheme = scheme\n ThemeContext.set({ scheme })\n } else {\n console.warn('No theme component found. Scheme change may not persist.')\n ThemeContext.set({ scheme })\n }\n }\n\n /**\n * Set the primary color for the theme.\n *\n * @param {string} color - Primary color in hex format (e.g., '#6200ee')\n *\n * @example\n * ```typescript\n * // Set primary color to purple\n * theme.setColor('#6200ee')\n *\n * // Set primary color to blue\n * theme.setColor('#2196f3')\n * ```\n */\n public setColor(color: string): void {\n const component = this.themeComponent\n if (component) {\n component.color = color\n ThemeContext.set({ color })\n } else {\n console.warn('No theme component found. Color change may not persist.')\n ThemeContext.set({ color })\n }\n }\n\n /**\n * Check if dark mode is currently active.\n * This resolves 'auto' scheme to the actual value based on system preference.\n *\n * @returns {Observable<boolean>} Observable that emits true if dark mode is active, false otherwise\n *\n * @example\n * ```typescript\n * theme.isDarkMode().subscribe(isDark => {\n * if (isDark) {\n * console.log('Dark mode is active')\n * } else {\n * console.log('Light mode is active')\n * }\n * })\n * ```\n */\n public isDarkMode(): Observable<boolean> {\n return this.resolvedScheme$.pipe(\n map(scheme => scheme === 'dark')\n )\n }\n\n /**\n * Toggle between light and dark mode.\n * If currently in 'auto' mode, defaults to 'light'.\n *\n * @example\n * ```typescript\n * // Toggle theme on button click\n * button.addEventListener('click', () => {\n * theme.toggleScheme()\n * })\n * ```\n */\n public toggleScheme(): void {\n const currentScheme = this.scheme\n const newScheme = currentScheme === 'dark' ? 'light' :\n currentScheme === 'light' ? 'dark' :\n 'light' // If 'auto', default to 'light'\n this.setScheme(newScheme)\n }\n\n /**\n * Get the current value of a CSS variable from the theme.\n *\n * @param {string} variableName - Name of the CSS variable (without '--schmancy-' prefix)\n * @returns {string} The CSS variable value or empty string if not found\n *\n * @example\n * ```typescript\n * // Get primary color variable\n * const primaryColor = theme.getCSSVariable('color-primary')\n *\n * // Get surface color\n * const surfaceColor = theme.getCSSVariable('color-surface')\n * ```\n */\n public getCSSVariable(variableName: string): string {\n const component = this.themeComponent\n if (component) {\n const host = component.root ? document.body : (component.shadowRoot?.host as HTMLElement)\n if (host) {\n return getComputedStyle(host).getPropertyValue(`--schmancy-${variableName}`).trim()\n }\n }\n return ''\n }\n\n /**\n * Subscribe to changes of a specific CSS variable.\n *\n * @param {string} variableName - Name of the CSS variable to watch (without '--schmancy-' prefix)\n * @returns {Observable<string>} Observable that emits the CSS variable value when it changes\n *\n * @example\n * ```typescript\n * // Watch for primary color changes\n * theme.watchCSSVariable('color-primary').subscribe(color => {\n * console.log('Primary color changed to:', color)\n * })\n *\n * // Watch for surface color changes\n * theme.watchCSSVariable('color-surface').subscribe(color => {\n * console.log('Surface color changed to:', color)\n * })\n * ```\n */\n public watchCSSVariable(variableName: string): Observable<string> {\n return this.theme$.pipe(\n map(() => this.getCSSVariable(variableName)),\n distinctUntilChanged()\n )\n }\n\n /**\n * Set the fullscreen state for the application.\n * This emits a custom event that navigation components can listen to.\n *\n * @param {boolean} value - Whether fullscreen mode is active\n *\n * @example\n * ```typescript\n * // Enter fullscreen mode\n * theme.setFullscreen(true)\n *\n * // Exit fullscreen mode\n * theme.setFullscreen(false)\n * ```\n */\n public setFullscreen(value: boolean): void {\n this._fullscreen$.next(value)\n\n // Emit custom event for components to listen to\n window.dispatchEvent(\n new CustomEvent('fullscreen', {\n detail: value,\n bubbles: true,\n composed: true\n })\n )\n }\n\n /**\n * Toggle fullscreen mode.\n *\n * @example\n * ```typescript\n * // Toggle fullscreen mode on button click\n * button.addEventListener('click', () => {\n * theme.toggleFullscreen()\n * })\n * ```\n */\n public toggleFullscreen(): void {\n this.setFullscreen(!this.fullscreen)\n }\n\n /**\n * Set the bottom offset for viewport calculations.\n * Used by navigation bars to inform fullHeight directive of reserved space.\n *\n * @param {number} value - Bottom offset in pixels\n *\n * @example\n * ```typescript\n * // Set bottom offset when nav bar is visible\n * theme.setBottomOffset(80)\n *\n * // Clear bottom offset when nav bar is hidden\n * theme.setBottomOffset(0)\n * ```\n */\n public setBottomOffset(value: number): void {\n this._bottomOffset$.next(value)\n }\n\n /**\n * Convenience method to update theme state including fullscreen.\n * Can be called with next() like syntax for familiarity.\n *\n * @param {Object} values - Theme values to update\n * @param {boolean} [values.fullscreen] - Fullscreen state\n * @param {'dark' | 'light' | 'auto'} [values.scheme] - Color scheme\n * @param {string} [values.color] - Primary color\n *\n * @example\n * ```typescript\n * // Set fullscreen mode\n * theme.next({ fullscreen: true })\n *\n * // Update multiple values\n * theme.next({\n * fullscreen: true,\n * scheme: 'dark'\n * })\n * ```\n */\n public next(values: {\n fullscreen?: boolean\n scheme?: 'dark' | 'light' | 'auto'\n color?: string\n }): void {\n if (values.fullscreen !== undefined) {\n this.setFullscreen(values.fullscreen)\n }\n if (values.scheme !== undefined) {\n this.setScheme(values.scheme)\n }\n if (values.color !== undefined) {\n this.setColor(values.color)\n }\n }\n\n /**\n * Get the singleton instance of ThemeService.\n *\n * @returns {ThemeService} The singleton ThemeService instance\n *\n * @internal\n */\n static getInstance(): ThemeService {\n if (!ThemeService.instance) {\n ThemeService.instance = new ThemeService()\n }\n return ThemeService.instance\n }\n}\n\n/**\n * Theme singleton. Reads and mutates the active theme (scheme, source color,\n * locale); persists the user's scheme choice. Components subscribe via\n * `theme.theme$` for changes.\n *\n * @service\n * @summary Theme service — active scheme, source color, locale.\n * @method next({ scheme?, source?, locale? }) - Update theme state.\n * @method theme$ - Observable<TSchmancyTheme>; emits on every theme change.\n * @method toggle() - Toggle between light and dark schemes.\n */\nexport const theme = ThemeService.getInstance()\nexport const schmancyTheme = theme // Alias for convenience\nexport default theme"],"mappings":";;;AAyBA,IAAM,IAAe,EACnB;CAAE,QAAQ;CAAQ,OAAO;CAAA,EACzB,SACA,0BAAA,EAmfW,IAjdb,MAAM,EAAA;CA2CJ,IAAA,SAAI;AACF,SAAO,EAAa,MAAM;;CAG5B,IAAA,QAAI;AACF,SAAO,EAAa,MAAM;;CAG5B,IAAA,QAAI;AACF,SAAO,KAAK,QAAQ,UAAA;;CAGtB,IAAA,iBAAI;AACF,SAAO,KAAK,iBAAiB,UAAA;;CAG/B,IAAA,aAAI;AACF,SAAO,KAAK,aAAa,UAAA;;CAG3B,IAAA,eAAI;AACF,SAAO,KAAK,eAAe,UAAA;;CA4B7B,cAAA;AAAA,OAAA,UAxFkB,IAAI,EAAyC,EAAA,CAAA,EAAA,KAAA,mBACpC,IAAI,EAA+C,KAAA,EAAA,KAAA,eACvD,IAAI,EAAA,CAAyB,EAAA,EAAA,KAAA,iBAC3B,IAAI,EAAwB,EAAA,EAAA,KAAA,UAG3B,EAAa,EAAE,KACvC,GAAI,MAAY,EAAS,OAAA,EACzB,GAA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AAc,IAAA,CAAgB,MAAA;;AAGjF,SAAO;;CAsBT,iBAAwB,GAAA;AACtB,SAAO,KAAK,OAAO,KACjB,QAAU,KAAK,eAAe,EAAA,CAAA,EAC9B,GAAA,CAAA;;CAmBJ,cAAqB,GAAA;AACnB,OAAK,aAAa,KAAK,EAAA,EAGvB,OAAO,cACL,IAAI,YAAY,cAAc;GAC5B,QAAQ;GACR,SAAA,CAAS;GACT,UAAA,CAAU;GAAA,CAAA,CAAA;;CAgBhB,mBAAA;AACE,OAAK,cAAA,CAAe,KAAK,WAAA;;CAkB3B,gBAAuB,GAAA;AACrB,OAAK,eAAe,KAAK,EAAA;;CAwB3B,KAAY,GAAA;AAAA,EAKN,EAAO,eALD,KAKgB,KACxB,KAAK,cAAc,EAAO,WAAA,EAExB,EAAO,WAFiB,KAEN,KACpB,KAAK,UAAU,EAAO,OAAA,EAEpB,EAAO,UAFa,KAEH,KACnB,KAAK,SAAS,EAAO,MAAA;;CAWzB,OAAA,cAAO;AAIL,SAHK,AACH,EAAa,aAAW,IAAI,GAAA,EAEvB,EAAa;;EAeU,aAAA,EACrB,IAAgB;AAAA,SAAA,KAAA,GAAA,KAAA"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
function e(e,t,n,r){var i,a=arguments.length,o=a<3?t:r===null?r=Object.getOwnPropertyDescriptor(t,n):r;if(typeof Reflect==`object`&&typeof Reflect.decorate==`function`)o=Reflect.decorate(e,t,n,r);else for(var s=e.length-1;s>=0;s--)(i=e[s])&&(o=(a<3?i(o):a>3?i(t,n,o):i(t,n))||o);return a>3&&o&&Object.defineProperty(t,n,o),o}Object.defineProperty(exports,`t`,{enumerable:!0,get:function(){return e}});
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"tslib.es6-Cnt75pb6.cjs","names":[],"sources":["../node_modules/tslib/tslib.es6.mjs"],"sourcesContent":["/******************************************************************************\nCopyright (c) Microsoft Corporation.\n\nPermission to use, copy, modify, and/or distribute this software for any\npurpose with or without fee is hereby granted.\n\nTHE SOFTWARE IS PROVIDED \"AS IS\" AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH\nREGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY\nAND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT,\nINDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM\nLOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR\nOTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR\nPERFORMANCE OF THIS SOFTWARE.\n***************************************************************************** */\n/* global Reflect, Promise, SuppressedError, Symbol, Iterator */\n\nvar extendStatics = function(d, b) {\n extendStatics = Object.setPrototypeOf ||\n ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||\n function (d, b) { for (var p in b) if (Object.prototype.hasOwnProperty.call(b, p)) d[p] = b[p]; };\n return extendStatics(d, b);\n};\n\nexport function __extends(d, b) {\n if (typeof b !== \"function\" && b !== null)\n throw new TypeError(\"Class extends value \" + String(b) + \" is not a constructor or null\");\n extendStatics(d, b);\n function __() { this.constructor = d; }\n d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());\n}\n\nexport var __assign = function() {\n __assign = Object.assign || function __assign(t) {\n for (var s, i = 1, n = arguments.length; i < n; i++) {\n s = arguments[i];\n for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p)) t[p] = s[p];\n }\n return t;\n }\n return __assign.apply(this, arguments);\n}\n\nexport function __rest(s, e) {\n var t = {};\n for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0)\n t[p] = s[p];\n if (s != null && typeof Object.getOwnPropertySymbols === \"function\")\n for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) {\n if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i]))\n t[p[i]] = s[p[i]];\n }\n return t;\n}\n\nexport function __decorate(decorators, target, key, desc) {\n var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;\n if (typeof Reflect === \"object\" && typeof Reflect.decorate === \"function\") r = Reflect.decorate(decorators, target, key, desc);\n else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;\n return c > 3 && r && Object.defineProperty(target, key, r), r;\n}\n\nexport function __param(paramIndex, decorator) {\n return function (target, key) { decorator(target, key, paramIndex); }\n}\n\nexport function __esDecorate(ctor, descriptorIn, decorators, contextIn, initializers, extraInitializers) {\n function accept(f) { if (f !== void 0 && typeof f !== \"function\") throw new TypeError(\"Function expected\"); return f; }\n var kind = contextIn.kind, key = kind === \"getter\" ? \"get\" : kind === \"setter\" ? \"set\" : \"value\";\n var target = !descriptorIn && ctor ? contextIn[\"static\"] ? ctor : ctor.prototype : null;\n var descriptor = descriptorIn || (target ? Object.getOwnPropertyDescriptor(target, contextIn.name) : {});\n var _, done = false;\n for (var i = decorators.length - 1; i >= 0; i--) {\n var context = {};\n for (var p in contextIn) context[p] = p === \"access\" ? {} : contextIn[p];\n for (var p in contextIn.access) context.access[p] = contextIn.access[p];\n context.addInitializer = function (f) { if (done) throw new TypeError(\"Cannot add initializers after decoration has completed\"); extraInitializers.push(accept(f || null)); };\n var result = (0, decorators[i])(kind === \"accessor\" ? { get: descriptor.get, set: descriptor.set } : descriptor[key], context);\n if (kind === \"accessor\") {\n if (result === void 0) continue;\n if (result === null || typeof result !== \"object\") throw new TypeError(\"Object expected\");\n if (_ = accept(result.get)) descriptor.get = _;\n if (_ = accept(result.set)) descriptor.set = _;\n if (_ = accept(result.init)) initializers.unshift(_);\n }\n else if (_ = accept(result)) {\n if (kind === \"field\") initializers.unshift(_);\n else descriptor[key] = _;\n }\n }\n if (target) Object.defineProperty(target, contextIn.name, descriptor);\n done = true;\n};\n\nexport function __runInitializers(thisArg, initializers, value) {\n var useValue = arguments.length > 2;\n for (var i = 0; i < initializers.length; i++) {\n value = useValue ? initializers[i].call(thisArg, value) : initializers[i].call(thisArg);\n }\n return useValue ? value : void 0;\n};\n\nexport function __propKey(x) {\n return typeof x === \"symbol\" ? x : \"\".concat(x);\n};\n\nexport function __setFunctionName(f, name, prefix) {\n if (typeof name === \"symbol\") name = name.description ? \"[\".concat(name.description, \"]\") : \"\";\n return Object.defineProperty(f, \"name\", { configurable: true, value: prefix ? \"\".concat(prefix, \" \", name) : name });\n};\n\nexport function __metadata(metadataKey, metadataValue) {\n if (typeof Reflect === \"object\" && typeof Reflect.metadata === \"function\") return Reflect.metadata(metadataKey, metadataValue);\n}\n\nexport function __awaiter(thisArg, _arguments, P, generator) {\n function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }\n return new (P || (P = Promise))(function (resolve, reject) {\n function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }\n function rejected(value) { try { step(generator[\"throw\"](value)); } catch (e) { reject(e); } }\n function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }\n step((generator = generator.apply(thisArg, _arguments || [])).next());\n });\n}\n\nexport function __generator(thisArg, body) {\n var _ = { label: 0, sent: function() { if (t[0] & 1) throw t[1]; return t[1]; }, trys: [], ops: [] }, f, y, t, g = Object.create((typeof Iterator === \"function\" ? Iterator : Object).prototype);\n return g.next = verb(0), g[\"throw\"] = verb(1), g[\"return\"] = verb(2), typeof Symbol === \"function\" && (g[Symbol.iterator] = function() { return this; }), g;\n function verb(n) { return function (v) { return step([n, v]); }; }\n function step(op) {\n if (f) throw new TypeError(\"Generator is already executing.\");\n while (g && (g = 0, op[0] && (_ = 0)), _) try {\n if (f = 1, y && (t = op[0] & 2 ? y[\"return\"] : op[0] ? y[\"throw\"] || ((t = y[\"return\"]) && t.call(y), 0) : y.next) && !(t = t.call(y, op[1])).done) return t;\n if (y = 0, t) op = [op[0] & 2, t.value];\n switch (op[0]) {\n case 0: case 1: t = op; break;\n case 4: _.label++; return { value: op[1], done: false };\n case 5: _.label++; y = op[1]; op = [0]; continue;\n case 7: op = _.ops.pop(); _.trys.pop(); continue;\n default:\n if (!(t = _.trys, t = t.length > 0 && t[t.length - 1]) && (op[0] === 6 || op[0] === 2)) { _ = 0; continue; }\n if (op[0] === 3 && (!t || (op[1] > t[0] && op[1] < t[3]))) { _.label = op[1]; break; }\n if (op[0] === 6 && _.label < t[1]) { _.label = t[1]; t = op; break; }\n if (t && _.label < t[2]) { _.label = t[2]; _.ops.push(op); break; }\n if (t[2]) _.ops.pop();\n _.trys.pop(); continue;\n }\n op = body.call(thisArg, _);\n } catch (e) { op = [6, e]; y = 0; } finally { f = t = 0; }\n if (op[0] & 5) throw op[1]; return { value: op[0] ? op[1] : void 0, done: true };\n }\n}\n\nexport var __createBinding = Object.create ? (function(o, m, k, k2) {\n if (k2 === undefined) k2 = k;\n var desc = Object.getOwnPropertyDescriptor(m, k);\n if (!desc || (\"get\" in desc ? !m.__esModule : desc.writable || desc.configurable)) {\n desc = { enumerable: true, get: function() { return m[k]; } };\n }\n Object.defineProperty(o, k2, desc);\n}) : (function(o, m, k, k2) {\n if (k2 === undefined) k2 = k;\n o[k2] = m[k];\n});\n\nexport function __exportStar(m, o) {\n for (var p in m) if (p !== \"default\" && !Object.prototype.hasOwnProperty.call(o, p)) __createBinding(o, m, p);\n}\n\nexport function __values(o) {\n var s = typeof Symbol === \"function\" && Symbol.iterator, m = s && o[s], i = 0;\n if (m) return m.call(o);\n if (o && typeof o.length === \"number\") return {\n next: function () {\n if (o && i >= o.length) o = void 0;\n return { value: o && o[i++], done: !o };\n }\n };\n throw new TypeError(s ? \"Object is not iterable.\" : \"Symbol.iterator is not defined.\");\n}\n\nexport function __read(o, n) {\n var m = typeof Symbol === \"function\" && o[Symbol.iterator];\n if (!m) return o;\n var i = m.call(o), r, ar = [], e;\n try {\n while ((n === void 0 || n-- > 0) && !(r = i.next()).done) ar.push(r.value);\n }\n catch (error) { e = { error: error }; }\n finally {\n try {\n if (r && !r.done && (m = i[\"return\"])) m.call(i);\n }\n finally { if (e) throw e.error; }\n }\n return ar;\n}\n\n/** @deprecated */\nexport function __spread() {\n for (var ar = [], i = 0; i < arguments.length; i++)\n ar = ar.concat(__read(arguments[i]));\n return ar;\n}\n\n/** @deprecated */\nexport function __spreadArrays() {\n for (var s = 0, i = 0, il = arguments.length; i < il; i++) s += arguments[i].length;\n for (var r = Array(s), k = 0, i = 0; i < il; i++)\n for (var a = arguments[i], j = 0, jl = a.length; j < jl; j++, k++)\n r[k] = a[j];\n return r;\n}\n\nexport function __spreadArray(to, from, pack) {\n if (pack || arguments.length === 2) for (var i = 0, l = from.length, ar; i < l; i++) {\n if (ar || !(i in from)) {\n if (!ar) ar = Array.prototype.slice.call(from, 0, i);\n ar[i] = from[i];\n }\n }\n return to.concat(ar || Array.prototype.slice.call(from));\n}\n\nexport function __await(v) {\n return this instanceof __await ? (this.v = v, this) : new __await(v);\n}\n\nexport function __asyncGenerator(thisArg, _arguments, generator) {\n if (!Symbol.asyncIterator) throw new TypeError(\"Symbol.asyncIterator is not defined.\");\n var g = generator.apply(thisArg, _arguments || []), i, q = [];\n return i = Object.create((typeof AsyncIterator === \"function\" ? AsyncIterator : Object).prototype), verb(\"next\"), verb(\"throw\"), verb(\"return\", awaitReturn), i[Symbol.asyncIterator] = function () { return this; }, i;\n function awaitReturn(f) { return function (v) { return Promise.resolve(v).then(f, reject); }; }\n function verb(n, f) { if (g[n]) { i[n] = function (v) { return new Promise(function (a, b) { q.push([n, v, a, b]) > 1 || resume(n, v); }); }; if (f) i[n] = f(i[n]); } }\n function resume(n, v) { try { step(g[n](v)); } catch (e) { settle(q[0][3], e); } }\n function step(r) { r.value instanceof __await ? Promise.resolve(r.value.v).then(fulfill, reject) : settle(q[0][2], r); }\n function fulfill(value) { resume(\"next\", value); }\n function reject(value) { resume(\"throw\", value); }\n function settle(f, v) { if (f(v), q.shift(), q.length) resume(q[0][0], q[0][1]); }\n}\n\nexport function __asyncDelegator(o) {\n var i, p;\n return i = {}, verb(\"next\"), verb(\"throw\", function (e) { throw e; }), verb(\"return\"), i[Symbol.iterator] = function () { return this; }, i;\n function verb(n, f) { i[n] = o[n] ? function (v) { return (p = !p) ? { value: __await(o[n](v)), done: false } : f ? f(v) : v; } : f; }\n}\n\nexport function __asyncValues(o) {\n if (!Symbol.asyncIterator) throw new TypeError(\"Symbol.asyncIterator is not defined.\");\n var m = o[Symbol.asyncIterator], i;\n return m ? m.call(o) : (o = typeof __values === \"function\" ? __values(o) : o[Symbol.iterator](), i = {}, verb(\"next\"), verb(\"throw\"), verb(\"return\"), i[Symbol.asyncIterator] = function () { return this; }, i);\n function verb(n) { i[n] = o[n] && function (v) { return new Promise(function (resolve, reject) { v = o[n](v), settle(resolve, reject, v.done, v.value); }); }; }\n function settle(resolve, reject, d, v) { Promise.resolve(v).then(function(v) { resolve({ value: v, done: d }); }, reject); }\n}\n\nexport function __makeTemplateObject(cooked, raw) {\n if (Object.defineProperty) { Object.defineProperty(cooked, \"raw\", { value: raw }); } else { cooked.raw = raw; }\n return cooked;\n};\n\nvar __setModuleDefault = Object.create ? (function(o, v) {\n Object.defineProperty(o, \"default\", { enumerable: true, value: v });\n}) : function(o, v) {\n o[\"default\"] = v;\n};\n\nvar ownKeys = function(o) {\n ownKeys = Object.getOwnPropertyNames || function (o) {\n var ar = [];\n for (var k in o) if (Object.prototype.hasOwnProperty.call(o, k)) ar[ar.length] = k;\n return ar;\n };\n return ownKeys(o);\n};\n\nexport function __importStar(mod) {\n if (mod && mod.__esModule) return mod;\n var result = {};\n if (mod != null) for (var k = ownKeys(mod), i = 0; i < k.length; i++) if (k[i] !== \"default\") __createBinding(result, mod, k[i]);\n __setModuleDefault(result, mod);\n return result;\n}\n\nexport function __importDefault(mod) {\n return (mod && mod.__esModule) ? mod : { default: mod };\n}\n\nexport function __classPrivateFieldGet(receiver, state, kind, f) {\n if (kind === \"a\" && !f) throw new TypeError(\"Private accessor was defined without a getter\");\n if (typeof state === \"function\" ? receiver !== state || !f : !state.has(receiver)) throw new TypeError(\"Cannot read private member from an object whose class did not declare it\");\n return kind === \"m\" ? f : kind === \"a\" ? f.call(receiver) : f ? f.value : state.get(receiver);\n}\n\nexport function __classPrivateFieldSet(receiver, state, value, kind, f) {\n if (kind === \"m\") throw new TypeError(\"Private method is not writable\");\n if (kind === \"a\" && !f) throw new TypeError(\"Private accessor was defined without a setter\");\n if (typeof state === \"function\" ? receiver !== state || !f : !state.has(receiver)) throw new TypeError(\"Cannot write private member to an object whose class did not declare it\");\n return (kind === \"a\" ? f.call(receiver, value) : f ? f.value = value : state.set(receiver, value)), value;\n}\n\nexport function __classPrivateFieldIn(state, receiver) {\n if (receiver === null || (typeof receiver !== \"object\" && typeof receiver !== \"function\")) throw new TypeError(\"Cannot use 'in' operator on non-object\");\n return typeof state === \"function\" ? receiver === state : state.has(receiver);\n}\n\nexport function __addDisposableResource(env, value, async) {\n if (value !== null && value !== void 0) {\n if (typeof value !== \"object\" && typeof value !== \"function\") throw new TypeError(\"Object expected.\");\n var dispose, inner;\n if (async) {\n if (!Symbol.asyncDispose) throw new TypeError(\"Symbol.asyncDispose is not defined.\");\n dispose = value[Symbol.asyncDispose];\n }\n if (dispose === void 0) {\n if (!Symbol.dispose) throw new TypeError(\"Symbol.dispose is not defined.\");\n dispose = value[Symbol.dispose];\n if (async) inner = dispose;\n }\n if (typeof dispose !== \"function\") throw new TypeError(\"Object not disposable.\");\n if (inner) dispose = function() { try { inner.call(this); } catch (e) { return Promise.reject(e); } };\n env.stack.push({ value: value, dispose: dispose, async: async });\n }\n else if (async) {\n env.stack.push({ async: true });\n }\n return value;\n}\n\nvar _SuppressedError = typeof SuppressedError === \"function\" ? SuppressedError : function (error, suppressed, message) {\n var e = new Error(message);\n return e.name = \"SuppressedError\", e.error = error, e.suppressed = suppressed, e;\n};\n\nexport function __disposeResources(env) {\n function fail(e) {\n env.error = env.hasError ? new _SuppressedError(e, env.error, \"An error was suppressed during disposal.\") : e;\n env.hasError = true;\n }\n var r, s = 0;\n function next() {\n while (r = env.stack.pop()) {\n try {\n if (!r.async && s === 1) return s = 0, env.stack.push(r), Promise.resolve().then(next);\n if (r.dispose) {\n var result = r.dispose.call(r.value);\n if (r.async) return s |= 2, Promise.resolve(result).then(next, function(e) { fail(e); return next(); });\n }\n else s |= 1;\n }\n catch (e) {\n fail(e);\n }\n }\n if (s === 1) return env.hasError ? Promise.reject(env.error) : Promise.resolve();\n if (env.hasError) throw env.error;\n }\n return next();\n}\n\nexport function __rewriteRelativeImportExtension(path, preserveJsx) {\n if (typeof path === \"string\" && /^\\.\\.?\\//.test(path)) {\n return path.replace(/\\.(tsx)$|((?:\\.d)?)((?:\\.[^./]+?)?)\\.([cm]?)ts$/i, function (m, tsx, d, ext, cm) {\n return tsx ? preserveJsx ? \".jsx\" : \".js\" : d && (!ext || !cm) ? m : (d + ext + \".\" + cm.toLowerCase() + \"js\");\n });\n }\n return path;\n}\n\nexport default {\n __extends,\n __assign,\n __rest,\n __decorate,\n __param,\n __esDecorate,\n __runInitializers,\n __propKey,\n __setFunctionName,\n __metadata,\n __awaiter,\n __generator,\n __createBinding,\n __exportStar,\n __values,\n __read,\n __spread,\n __spreadArrays,\n __spreadArray,\n __await,\n __asyncGenerator,\n __asyncDelegator,\n __asyncValues,\n __makeTemplateObject,\n __importStar,\n __importDefault,\n __classPrivateFieldGet,\n __classPrivateFieldSet,\n __classPrivateFieldIn,\n __addDisposableResource,\n __disposeResources,\n __rewriteRelativeImportExtension,\n};\n"],"x_google_ignoreList":[0],"mappings":"AAsDA,SAAgB,EAAW,EAAY,EAAQ,EAAK,EAAA,CAClD,IAA2H,EAAvH,EAAI,UAAU,OAAQ,EAAI,EAAI,EAAI,EAAS,IAAS,KAAO,EAAO,OAAO,yBAAyB,EAAQ,EAAA,CAAO,EACrH,GAAuB,OAAZ,SAAY,UAAwC,OAArB,QAAQ,UAAa,WAAY,EAAI,QAAQ,SAAS,EAAY,EAAQ,EAAK,EAAA,MACpH,IAAK,IAAI,EAAI,EAAW,OAAS,EAAG,GAAK,EAAG,KAAS,EAAI,EAAW,MAAI,GAAK,EAAI,EAAI,EAAE,EAAA,CAAK,EAAI,EAAI,EAAE,EAAQ,EAAK,EAAA,CAAK,EAAE,EAAQ,EAAA,GAAS,GAChJ,OAAO,EAAI,GAAK,GAAK,OAAO,eAAe,EAAQ,EAAK,EAAA,CAAI,EAAA,OAAA,eAAA,QAAA,IAAA,CAAA,WAAA,CAAA,EAAA,IAAA,UAAA,CAAA,OAAA,GAAA,CAAA"}
|
|
@@ -1,7 +0,0 @@
|
|
|
1
|
-
function e(e, t, n, r) {
|
|
2
|
-
var i, a = arguments.length, o = a < 3 ? t : r === null ? r = Object.getOwnPropertyDescriptor(t, n) : r;
|
|
3
|
-
if (typeof Reflect == "object" && typeof Reflect.decorate == "function") o = Reflect.decorate(e, t, n, r);
|
|
4
|
-
else for (var s = e.length - 1; s >= 0; s--) (i = e[s]) && (o = (a < 3 ? i(o) : a > 3 ? i(t, n, o) : i(t, n)) || o);
|
|
5
|
-
return a > 3 && o && Object.defineProperty(t, n, o), o;
|
|
6
|
-
}
|
|
7
|
-
export { e as t };
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"tslib.es6-DMzzJKHV.js","names":[],"sources":["../node_modules/tslib/tslib.es6.mjs"],"sourcesContent":["/******************************************************************************\nCopyright (c) Microsoft Corporation.\n\nPermission to use, copy, modify, and/or distribute this software for any\npurpose with or without fee is hereby granted.\n\nTHE SOFTWARE IS PROVIDED \"AS IS\" AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH\nREGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY\nAND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT,\nINDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM\nLOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR\nOTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR\nPERFORMANCE OF THIS SOFTWARE.\n***************************************************************************** */\n/* global Reflect, Promise, SuppressedError, Symbol, Iterator */\n\nvar extendStatics = function(d, b) {\n extendStatics = Object.setPrototypeOf ||\n ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||\n function (d, b) { for (var p in b) if (Object.prototype.hasOwnProperty.call(b, p)) d[p] = b[p]; };\n return extendStatics(d, b);\n};\n\nexport function __extends(d, b) {\n if (typeof b !== \"function\" && b !== null)\n throw new TypeError(\"Class extends value \" + String(b) + \" is not a constructor or null\");\n extendStatics(d, b);\n function __() { this.constructor = d; }\n d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());\n}\n\nexport var __assign = function() {\n __assign = Object.assign || function __assign(t) {\n for (var s, i = 1, n = arguments.length; i < n; i++) {\n s = arguments[i];\n for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p)) t[p] = s[p];\n }\n return t;\n }\n return __assign.apply(this, arguments);\n}\n\nexport function __rest(s, e) {\n var t = {};\n for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0)\n t[p] = s[p];\n if (s != null && typeof Object.getOwnPropertySymbols === \"function\")\n for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) {\n if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i]))\n t[p[i]] = s[p[i]];\n }\n return t;\n}\n\nexport function __decorate(decorators, target, key, desc) {\n var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;\n if (typeof Reflect === \"object\" && typeof Reflect.decorate === \"function\") r = Reflect.decorate(decorators, target, key, desc);\n else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;\n return c > 3 && r && Object.defineProperty(target, key, r), r;\n}\n\nexport function __param(paramIndex, decorator) {\n return function (target, key) { decorator(target, key, paramIndex); }\n}\n\nexport function __esDecorate(ctor, descriptorIn, decorators, contextIn, initializers, extraInitializers) {\n function accept(f) { if (f !== void 0 && typeof f !== \"function\") throw new TypeError(\"Function expected\"); return f; }\n var kind = contextIn.kind, key = kind === \"getter\" ? \"get\" : kind === \"setter\" ? \"set\" : \"value\";\n var target = !descriptorIn && ctor ? contextIn[\"static\"] ? ctor : ctor.prototype : null;\n var descriptor = descriptorIn || (target ? Object.getOwnPropertyDescriptor(target, contextIn.name) : {});\n var _, done = false;\n for (var i = decorators.length - 1; i >= 0; i--) {\n var context = {};\n for (var p in contextIn) context[p] = p === \"access\" ? {} : contextIn[p];\n for (var p in contextIn.access) context.access[p] = contextIn.access[p];\n context.addInitializer = function (f) { if (done) throw new TypeError(\"Cannot add initializers after decoration has completed\"); extraInitializers.push(accept(f || null)); };\n var result = (0, decorators[i])(kind === \"accessor\" ? { get: descriptor.get, set: descriptor.set } : descriptor[key], context);\n if (kind === \"accessor\") {\n if (result === void 0) continue;\n if (result === null || typeof result !== \"object\") throw new TypeError(\"Object expected\");\n if (_ = accept(result.get)) descriptor.get = _;\n if (_ = accept(result.set)) descriptor.set = _;\n if (_ = accept(result.init)) initializers.unshift(_);\n }\n else if (_ = accept(result)) {\n if (kind === \"field\") initializers.unshift(_);\n else descriptor[key] = _;\n }\n }\n if (target) Object.defineProperty(target, contextIn.name, descriptor);\n done = true;\n};\n\nexport function __runInitializers(thisArg, initializers, value) {\n var useValue = arguments.length > 2;\n for (var i = 0; i < initializers.length; i++) {\n value = useValue ? initializers[i].call(thisArg, value) : initializers[i].call(thisArg);\n }\n return useValue ? value : void 0;\n};\n\nexport function __propKey(x) {\n return typeof x === \"symbol\" ? x : \"\".concat(x);\n};\n\nexport function __setFunctionName(f, name, prefix) {\n if (typeof name === \"symbol\") name = name.description ? \"[\".concat(name.description, \"]\") : \"\";\n return Object.defineProperty(f, \"name\", { configurable: true, value: prefix ? \"\".concat(prefix, \" \", name) : name });\n};\n\nexport function __metadata(metadataKey, metadataValue) {\n if (typeof Reflect === \"object\" && typeof Reflect.metadata === \"function\") return Reflect.metadata(metadataKey, metadataValue);\n}\n\nexport function __awaiter(thisArg, _arguments, P, generator) {\n function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }\n return new (P || (P = Promise))(function (resolve, reject) {\n function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }\n function rejected(value) { try { step(generator[\"throw\"](value)); } catch (e) { reject(e); } }\n function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }\n step((generator = generator.apply(thisArg, _arguments || [])).next());\n });\n}\n\nexport function __generator(thisArg, body) {\n var _ = { label: 0, sent: function() { if (t[0] & 1) throw t[1]; return t[1]; }, trys: [], ops: [] }, f, y, t, g = Object.create((typeof Iterator === \"function\" ? Iterator : Object).prototype);\n return g.next = verb(0), g[\"throw\"] = verb(1), g[\"return\"] = verb(2), typeof Symbol === \"function\" && (g[Symbol.iterator] = function() { return this; }), g;\n function verb(n) { return function (v) { return step([n, v]); }; }\n function step(op) {\n if (f) throw new TypeError(\"Generator is already executing.\");\n while (g && (g = 0, op[0] && (_ = 0)), _) try {\n if (f = 1, y && (t = op[0] & 2 ? y[\"return\"] : op[0] ? y[\"throw\"] || ((t = y[\"return\"]) && t.call(y), 0) : y.next) && !(t = t.call(y, op[1])).done) return t;\n if (y = 0, t) op = [op[0] & 2, t.value];\n switch (op[0]) {\n case 0: case 1: t = op; break;\n case 4: _.label++; return { value: op[1], done: false };\n case 5: _.label++; y = op[1]; op = [0]; continue;\n case 7: op = _.ops.pop(); _.trys.pop(); continue;\n default:\n if (!(t = _.trys, t = t.length > 0 && t[t.length - 1]) && (op[0] === 6 || op[0] === 2)) { _ = 0; continue; }\n if (op[0] === 3 && (!t || (op[1] > t[0] && op[1] < t[3]))) { _.label = op[1]; break; }\n if (op[0] === 6 && _.label < t[1]) { _.label = t[1]; t = op; break; }\n if (t && _.label < t[2]) { _.label = t[2]; _.ops.push(op); break; }\n if (t[2]) _.ops.pop();\n _.trys.pop(); continue;\n }\n op = body.call(thisArg, _);\n } catch (e) { op = [6, e]; y = 0; } finally { f = t = 0; }\n if (op[0] & 5) throw op[1]; return { value: op[0] ? op[1] : void 0, done: true };\n }\n}\n\nexport var __createBinding = Object.create ? (function(o, m, k, k2) {\n if (k2 === undefined) k2 = k;\n var desc = Object.getOwnPropertyDescriptor(m, k);\n if (!desc || (\"get\" in desc ? !m.__esModule : desc.writable || desc.configurable)) {\n desc = { enumerable: true, get: function() { return m[k]; } };\n }\n Object.defineProperty(o, k2, desc);\n}) : (function(o, m, k, k2) {\n if (k2 === undefined) k2 = k;\n o[k2] = m[k];\n});\n\nexport function __exportStar(m, o) {\n for (var p in m) if (p !== \"default\" && !Object.prototype.hasOwnProperty.call(o, p)) __createBinding(o, m, p);\n}\n\nexport function __values(o) {\n var s = typeof Symbol === \"function\" && Symbol.iterator, m = s && o[s], i = 0;\n if (m) return m.call(o);\n if (o && typeof o.length === \"number\") return {\n next: function () {\n if (o && i >= o.length) o = void 0;\n return { value: o && o[i++], done: !o };\n }\n };\n throw new TypeError(s ? \"Object is not iterable.\" : \"Symbol.iterator is not defined.\");\n}\n\nexport function __read(o, n) {\n var m = typeof Symbol === \"function\" && o[Symbol.iterator];\n if (!m) return o;\n var i = m.call(o), r, ar = [], e;\n try {\n while ((n === void 0 || n-- > 0) && !(r = i.next()).done) ar.push(r.value);\n }\n catch (error) { e = { error: error }; }\n finally {\n try {\n if (r && !r.done && (m = i[\"return\"])) m.call(i);\n }\n finally { if (e) throw e.error; }\n }\n return ar;\n}\n\n/** @deprecated */\nexport function __spread() {\n for (var ar = [], i = 0; i < arguments.length; i++)\n ar = ar.concat(__read(arguments[i]));\n return ar;\n}\n\n/** @deprecated */\nexport function __spreadArrays() {\n for (var s = 0, i = 0, il = arguments.length; i < il; i++) s += arguments[i].length;\n for (var r = Array(s), k = 0, i = 0; i < il; i++)\n for (var a = arguments[i], j = 0, jl = a.length; j < jl; j++, k++)\n r[k] = a[j];\n return r;\n}\n\nexport function __spreadArray(to, from, pack) {\n if (pack || arguments.length === 2) for (var i = 0, l = from.length, ar; i < l; i++) {\n if (ar || !(i in from)) {\n if (!ar) ar = Array.prototype.slice.call(from, 0, i);\n ar[i] = from[i];\n }\n }\n return to.concat(ar || Array.prototype.slice.call(from));\n}\n\nexport function __await(v) {\n return this instanceof __await ? (this.v = v, this) : new __await(v);\n}\n\nexport function __asyncGenerator(thisArg, _arguments, generator) {\n if (!Symbol.asyncIterator) throw new TypeError(\"Symbol.asyncIterator is not defined.\");\n var g = generator.apply(thisArg, _arguments || []), i, q = [];\n return i = Object.create((typeof AsyncIterator === \"function\" ? AsyncIterator : Object).prototype), verb(\"next\"), verb(\"throw\"), verb(\"return\", awaitReturn), i[Symbol.asyncIterator] = function () { return this; }, i;\n function awaitReturn(f) { return function (v) { return Promise.resolve(v).then(f, reject); }; }\n function verb(n, f) { if (g[n]) { i[n] = function (v) { return new Promise(function (a, b) { q.push([n, v, a, b]) > 1 || resume(n, v); }); }; if (f) i[n] = f(i[n]); } }\n function resume(n, v) { try { step(g[n](v)); } catch (e) { settle(q[0][3], e); } }\n function step(r) { r.value instanceof __await ? Promise.resolve(r.value.v).then(fulfill, reject) : settle(q[0][2], r); }\n function fulfill(value) { resume(\"next\", value); }\n function reject(value) { resume(\"throw\", value); }\n function settle(f, v) { if (f(v), q.shift(), q.length) resume(q[0][0], q[0][1]); }\n}\n\nexport function __asyncDelegator(o) {\n var i, p;\n return i = {}, verb(\"next\"), verb(\"throw\", function (e) { throw e; }), verb(\"return\"), i[Symbol.iterator] = function () { return this; }, i;\n function verb(n, f) { i[n] = o[n] ? function (v) { return (p = !p) ? { value: __await(o[n](v)), done: false } : f ? f(v) : v; } : f; }\n}\n\nexport function __asyncValues(o) {\n if (!Symbol.asyncIterator) throw new TypeError(\"Symbol.asyncIterator is not defined.\");\n var m = o[Symbol.asyncIterator], i;\n return m ? m.call(o) : (o = typeof __values === \"function\" ? __values(o) : o[Symbol.iterator](), i = {}, verb(\"next\"), verb(\"throw\"), verb(\"return\"), i[Symbol.asyncIterator] = function () { return this; }, i);\n function verb(n) { i[n] = o[n] && function (v) { return new Promise(function (resolve, reject) { v = o[n](v), settle(resolve, reject, v.done, v.value); }); }; }\n function settle(resolve, reject, d, v) { Promise.resolve(v).then(function(v) { resolve({ value: v, done: d }); }, reject); }\n}\n\nexport function __makeTemplateObject(cooked, raw) {\n if (Object.defineProperty) { Object.defineProperty(cooked, \"raw\", { value: raw }); } else { cooked.raw = raw; }\n return cooked;\n};\n\nvar __setModuleDefault = Object.create ? (function(o, v) {\n Object.defineProperty(o, \"default\", { enumerable: true, value: v });\n}) : function(o, v) {\n o[\"default\"] = v;\n};\n\nvar ownKeys = function(o) {\n ownKeys = Object.getOwnPropertyNames || function (o) {\n var ar = [];\n for (var k in o) if (Object.prototype.hasOwnProperty.call(o, k)) ar[ar.length] = k;\n return ar;\n };\n return ownKeys(o);\n};\n\nexport function __importStar(mod) {\n if (mod && mod.__esModule) return mod;\n var result = {};\n if (mod != null) for (var k = ownKeys(mod), i = 0; i < k.length; i++) if (k[i] !== \"default\") __createBinding(result, mod, k[i]);\n __setModuleDefault(result, mod);\n return result;\n}\n\nexport function __importDefault(mod) {\n return (mod && mod.__esModule) ? mod : { default: mod };\n}\n\nexport function __classPrivateFieldGet(receiver, state, kind, f) {\n if (kind === \"a\" && !f) throw new TypeError(\"Private accessor was defined without a getter\");\n if (typeof state === \"function\" ? receiver !== state || !f : !state.has(receiver)) throw new TypeError(\"Cannot read private member from an object whose class did not declare it\");\n return kind === \"m\" ? f : kind === \"a\" ? f.call(receiver) : f ? f.value : state.get(receiver);\n}\n\nexport function __classPrivateFieldSet(receiver, state, value, kind, f) {\n if (kind === \"m\") throw new TypeError(\"Private method is not writable\");\n if (kind === \"a\" && !f) throw new TypeError(\"Private accessor was defined without a setter\");\n if (typeof state === \"function\" ? receiver !== state || !f : !state.has(receiver)) throw new TypeError(\"Cannot write private member to an object whose class did not declare it\");\n return (kind === \"a\" ? f.call(receiver, value) : f ? f.value = value : state.set(receiver, value)), value;\n}\n\nexport function __classPrivateFieldIn(state, receiver) {\n if (receiver === null || (typeof receiver !== \"object\" && typeof receiver !== \"function\")) throw new TypeError(\"Cannot use 'in' operator on non-object\");\n return typeof state === \"function\" ? receiver === state : state.has(receiver);\n}\n\nexport function __addDisposableResource(env, value, async) {\n if (value !== null && value !== void 0) {\n if (typeof value !== \"object\" && typeof value !== \"function\") throw new TypeError(\"Object expected.\");\n var dispose, inner;\n if (async) {\n if (!Symbol.asyncDispose) throw new TypeError(\"Symbol.asyncDispose is not defined.\");\n dispose = value[Symbol.asyncDispose];\n }\n if (dispose === void 0) {\n if (!Symbol.dispose) throw new TypeError(\"Symbol.dispose is not defined.\");\n dispose = value[Symbol.dispose];\n if (async) inner = dispose;\n }\n if (typeof dispose !== \"function\") throw new TypeError(\"Object not disposable.\");\n if (inner) dispose = function() { try { inner.call(this); } catch (e) { return Promise.reject(e); } };\n env.stack.push({ value: value, dispose: dispose, async: async });\n }\n else if (async) {\n env.stack.push({ async: true });\n }\n return value;\n}\n\nvar _SuppressedError = typeof SuppressedError === \"function\" ? SuppressedError : function (error, suppressed, message) {\n var e = new Error(message);\n return e.name = \"SuppressedError\", e.error = error, e.suppressed = suppressed, e;\n};\n\nexport function __disposeResources(env) {\n function fail(e) {\n env.error = env.hasError ? new _SuppressedError(e, env.error, \"An error was suppressed during disposal.\") : e;\n env.hasError = true;\n }\n var r, s = 0;\n function next() {\n while (r = env.stack.pop()) {\n try {\n if (!r.async && s === 1) return s = 0, env.stack.push(r), Promise.resolve().then(next);\n if (r.dispose) {\n var result = r.dispose.call(r.value);\n if (r.async) return s |= 2, Promise.resolve(result).then(next, function(e) { fail(e); return next(); });\n }\n else s |= 1;\n }\n catch (e) {\n fail(e);\n }\n }\n if (s === 1) return env.hasError ? Promise.reject(env.error) : Promise.resolve();\n if (env.hasError) throw env.error;\n }\n return next();\n}\n\nexport function __rewriteRelativeImportExtension(path, preserveJsx) {\n if (typeof path === \"string\" && /^\\.\\.?\\//.test(path)) {\n return path.replace(/\\.(tsx)$|((?:\\.d)?)((?:\\.[^./]+?)?)\\.([cm]?)ts$/i, function (m, tsx, d, ext, cm) {\n return tsx ? preserveJsx ? \".jsx\" : \".js\" : d && (!ext || !cm) ? m : (d + ext + \".\" + cm.toLowerCase() + \"js\");\n });\n }\n return path;\n}\n\nexport default {\n __extends,\n __assign,\n __rest,\n __decorate,\n __param,\n __esDecorate,\n __runInitializers,\n __propKey,\n __setFunctionName,\n __metadata,\n __awaiter,\n __generator,\n __createBinding,\n __exportStar,\n __values,\n __read,\n __spread,\n __spreadArrays,\n __spreadArray,\n __await,\n __asyncGenerator,\n __asyncDelegator,\n __asyncValues,\n __makeTemplateObject,\n __importStar,\n __importDefault,\n __classPrivateFieldGet,\n __classPrivateFieldSet,\n __classPrivateFieldIn,\n __addDisposableResource,\n __disposeResources,\n __rewriteRelativeImportExtension,\n};\n"],"x_google_ignoreList":[0],"mappings":"AAsDA,SAAgB,EAAW,GAAY,GAAQ,GAAK,GAAA;CAClD,IAA2H,GAAvH,IAAI,UAAU,QAAQ,IAAI,IAAI,IAAI,IAAS,MAAS,OAAO,IAAO,OAAO,yBAAyB,GAAQ,EAAA,GAAO;AACrH,KAAuB,OAAZ,WAAY,YAAwC,OAArB,QAAQ,YAAa,WAAY,KAAI,QAAQ,SAAS,GAAY,GAAQ,GAAK,EAAA;KACpH,MAAK,IAAI,IAAI,EAAW,SAAS,GAAG,KAAK,GAAG,IAAA,EAAS,IAAI,EAAW,QAAI,KAAK,IAAI,IAAI,EAAE,EAAA,GAAK,IAAI,IAAI,EAAE,GAAQ,GAAK,EAAA,GAAK,EAAE,GAAQ,EAAA,KAAS;AAChJ,QAAO,IAAI,KAAK,KAAK,OAAO,eAAe,GAAQ,GAAK,EAAA,EAAI;;AAAA,SAAA,KAAA"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"utils-Bp2jhyZc.js","names":[],"sources":["../src/utils/number.ts"],"sourcesContent":["/**\n * Gets the user's system locale from browser settings.\n * Falls back to 'de-DE' if not available (e.g., in Node.js environment).\n */\nconst getSystemLocale = (): string => {\n if (typeof navigator !== 'undefined' && navigator.language) {\n return navigator.language\n }\n return 'de-DE'\n}\n\nexport class Numbers {\n /**\n * The system locale detected from user's browser/OS settings.\n * Use this for display formatting. For exports, use explicit locale like 'de-DE'.\n */\n readonly systemLocale = getSystemLocale()\n\n /**\n * Rounds a number to the specified number of decimal places.\n * @param {number} number - The number to round.\n * @param {number} [decimalPlaces=2] - The number of decimal places to round to.\n * @returns {number} - The rounded number.\n */\n roundNumber(number: number, decimalPlaces: number = 2): number {\n const factor = Math.pow(10, decimalPlaces);\n return Math.round(number * factor) / factor;\n }\n\n /**\n * Formats a number according to the specified locale and options.\n * Uses the user's system locale by default for display formatting.\n *\n * @param {number} number - The number to format.\n * @param {string} [locale] - The locale string (e.g., 'de-DE'). Defaults to system locale.\n * @param {Intl.NumberFormatOptions} [options={}] - Additional formatting options.\n * @returns {string} - The formatted number as a string.\n *\n * @example\n * // Uses system locale (e.g., user's browser setting)\n * numbers.formatNumber(1234.56)\n *\n * // Explicit locale for exports (bank systems expect German format)\n * numbers.formatNumber(1234.56, 'de-DE', { useGrouping: false })\n */\n formatNumber(\n number: number,\n locale: string = this.systemLocale,\n options: Intl.NumberFormatOptions = {},\n ): string {\n return new Intl.NumberFormat(locale, options).format(number);\n }\n\n /**\n * Parses a string with a specified decimal separator into a number.\n * @param {string} numberString - The string to parse.\n * @param {string} [decimalSeparator=','] - The decimal separator used in the string.\n * @returns {number} - The parsed number.\n */\n parseToPureNumber(\n numberString: string,\n decimalSeparator: string = \",\",\n ): number {\n const normalizedString = numberString.replace(decimalSeparator, \".\");\n return parseFloat(normalizedString);\n }\n\n /**\n * Rounds a number to the specified decimal places and formats it according to the specified locale and options.\n * Uses the user's system locale by default.\n *\n * @param {number} number - The number to process.\n * @param {number} [decimalPlaces=2] - The number of decimal places to round to.\n * @param {string} [locale] - The locale string. Defaults to system locale.\n * @param {Intl.NumberFormatOptions} [options={}] - Additional formatting options.\n * @returns {string} - The formatted number as a string.\n */\n doIt(\n number: number,\n decimalPlaces: number = 2,\n locale: string = this.systemLocale,\n options: Intl.NumberFormatOptions = {},\n ): string {\n const roundedNumber = this.roundNumber(number, decimalPlaces);\n return this.formatNumber(roundedNumber, locale, options);\n }\n\n /**\n * Format a currency amount consistently across the application\n *\n * @param amount The amount to format\n * @param currency The currency symbol to display (default: '€')\n * @returns Formatted amount with currency symbol\n */\n formatCurrency(amount: number, currency: string = \"€\"): string {\n return `${currency}${this.doIt(amount)}`;\n }\n\n /**\n * Format a delta value with appropriate directional indicator\n *\n * @param delta The delta amount to format\n * @param currency The currency symbol to display (default: '€')\n * @returns Formatted delta with direction indicator and currency symbol\n */\n formatDelta(delta: number, currency: string = \"€\"): string {\n const symbol = delta > 0 ? \"↑\" : delta < 0 ? \"↓\" : \"→\";\n return `${symbol} ${currency}${this.doIt(Math.abs(delta))}`;\n }\n\n /**\n * Get CSS class for delta value\n *\n * @param delta The delta amount\n * @returns CSS class based on delta direction\n */\n getDeltaClass(delta: number): string {\n return delta > 0\n ? \"text-error-default\"\n : delta < 0\n ? \"text-primary-default\"\n : \"text-neutral\";\n }\n\n /**\n * Converts a decimal number to a mixed fraction string\n * For example: 1.5 becomes \"1 1/2\", 2.25 becomes \"2 1/4\"\n *\n * @param number The decimal number to convert\n * @param precision The precision level for fraction approximation (default: 16)\n * @param maxDenominator The maximum allowed denominator (default: 4)\n * @returns A string representing the mixed fraction\n */\n toMixedFraction(\n number: number,\n precision: number = 16,\n maxDenominator: number = 4,\n ): string {\n // Handle negative numbers\n const isNegative = number < 0;\n number = Math.abs(number);\n\n // Extract whole number part\n const wholePart = Math.floor(number);\n\n // Extract decimal part and convert to fraction\n let decimalPart = number - wholePart;\n\n // If the decimal part is very small or zero, just return the whole number\n if (decimalPart < 1 / Math.pow(10, precision)) {\n return isNegative ? `-${wholePart}` : `${wholePart}`;\n }\n\n // Find the best fraction approximation using precision and max denominator\n const { numerator, denominator } = this.decimalToFraction(\n decimalPart,\n precision,\n maxDenominator,\n );\n\n // Format based on whether there's a whole part\n if (wholePart === 0) {\n return isNegative\n ? `-${numerator}/${denominator}`\n : `${numerator}/${denominator}`;\n } else {\n return isNegative\n ? `-${wholePart} ${numerator}/${denominator}`\n : `${wholePart} ${numerator}/${denominator}`;\n }\n }\n\n /**\n * Converts a decimal to a simplified fraction with a maximum denominator\n *\n * @param decimal The decimal part to convert (0 <= decimal < 1)\n * @param precision The precision level for approximation\n * @param maxDenominator The maximum allowed denominator (default: 4)\n * @returns Object containing numerator and denominator\n */\n private decimalToFraction(\n decimal: number,\n precision: number,\n maxDenominator: number = 4,\n ): { numerator: number; denominator: number } {\n if (decimal === 0) {\n return { numerator: 0, denominator: 1 };\n }\n\n // Initialize best approximation\n let bestError = Infinity;\n let bestNumerator = 0;\n let bestDenominator = 1;\n\n // Check common fractions first for better user experience\n // Filter to only include fractions with denominators <= maxDenominator\n const commonFractions = [\n { n: 1, d: 2 }, // 1/2\n { n: 1, d: 3 }, // 1/3\n { n: 2, d: 3 }, // 2/3\n { n: 1, d: 4 }, // 1/4\n { n: 3, d: 4 }, // 3/4\n ];\n\n // Add additional fractions only if maxDenominator allows\n const additionalFractions = [];\n if (maxDenominator >= 5) {\n additionalFractions.push(\n { n: 1, d: 5 }, // 1/5\n { n: 2, d: 5 }, // 2/5\n { n: 3, d: 5 }, // 3/5\n { n: 4, d: 5 }, // 4/5\n );\n }\n if (maxDenominator >= 6) {\n additionalFractions.push(\n { n: 1, d: 6 }, // 1/6\n { n: 5, d: 6 }, // 5/6\n );\n }\n if (maxDenominator >= 8) {\n additionalFractions.push(\n { n: 1, d: 8 }, // 1/8\n { n: 3, d: 8 }, // 3/8\n { n: 5, d: 8 }, // 5/8\n { n: 7, d: 8 }, // 7/8\n );\n }\n if (maxDenominator >= 10) {\n additionalFractions.push(\n { n: 1, d: 10 }, // 1/10\n { n: 3, d: 10 }, // 3/10\n { n: 7, d: 10 }, // 7/10\n { n: 9, d: 10 }, // 9/10\n );\n }\n if (maxDenominator >= 12) {\n additionalFractions.push(\n { n: 1, d: 12 }, // 1/12\n { n: 5, d: 12 }, // 5/12\n { n: 7, d: 12 }, // 7/12\n { n: 11, d: 12 }, // 11/12\n );\n }\n if (maxDenominator >= 16) {\n additionalFractions.push(\n { n: 1, d: 16 }, // 1/16\n { n: 3, d: 16 }, // 3/16\n { n: 5, d: 16 }, // 5/16\n { n: 7, d: 16 }, // 7/16\n { n: 9, d: 16 }, // 9/16\n { n: 11, d: 16 }, // 11/16\n { n: 13, d: 16 }, // 13/16\n { n: 15, d: 16 }, // 15/16\n );\n }\n\n // Combine all applicable fractions\n const allFractions = [...commonFractions, ...additionalFractions];\n\n // Check common fractions first\n for (const frac of allFractions) {\n if (frac.d <= maxDenominator) {\n const error = Math.abs(decimal - frac.n / frac.d);\n if (error < bestError) {\n bestError = error;\n bestNumerator = frac.n;\n bestDenominator = frac.d;\n\n // If we're very close to a common fraction, just use it\n if (error < 1 / Math.pow(10, precision)) {\n return { numerator: frac.n, denominator: frac.d };\n }\n }\n }\n }\n\n // If no suitable common fraction found, use a more sophisticated approach\n // for denominators up to maxDenominator\n\n // Find the best approximation with denominator <= maxDenominator\n for (let d = 1; d <= maxDenominator; d++) {\n // Find best numerator for this denominator\n const n = Math.round(decimal * d);\n const error = Math.abs(decimal - n / d);\n\n if (error < bestError) {\n bestError = error;\n bestNumerator = n;\n bestDenominator = d;\n }\n }\n\n // Only use continued fraction expansion if we're significantly off\n // and maxDenominator allows for larger denominators\n if (bestError > 1 / Math.pow(10, precision / 2) && maxDenominator > 4) {\n // Implementation of continued fraction expansion\n let n1 = 1,\n n2 = 0;\n let d1 = 0,\n d2 = 1;\n let b = decimal;\n\n do {\n let a = Math.floor(b);\n let aux = n1;\n n1 = a * n1 + n2;\n n2 = aux;\n\n aux = d1;\n d1 = a * d1 + d2;\n d2 = aux;\n\n b = 1 / (b - a);\n\n // Calculate the current approximation\n const currentError = Math.abs(decimal - n1 / d1);\n\n // If we hit the precision limit or if the denominator gets too large, use this approximation\n if (currentError < 1 / Math.pow(10, precision) || d1 > maxDenominator) {\n // If d1 exceeds maxDenominator, return the previous best result\n if (d1 > maxDenominator) {\n return { numerator: bestNumerator, denominator: bestDenominator };\n }\n\n // Otherwise return this result\n return { numerator: n1, denominator: d1 };\n }\n } while (b !== Infinity);\n\n bestNumerator = n1;\n bestDenominator = d1;\n }\n\n // Simplify the fraction\n const gcd = this.findGCD(bestNumerator, bestDenominator);\n return {\n numerator: bestNumerator / gcd,\n denominator: bestDenominator / gcd,\n };\n }\n\n /**\n * Calculates the greatest common divisor of two numbers\n */\n private findGCD(a: number, b: number): number {\n return b === 0 ? a : this.findGCD(b, a % b);\n }\n\n /**\n * Alternative method to get a formatted mixed fraction with a specified format\n *\n * @param number The decimal number to convert\n * @param format The format specification ('unicode', 'ascii', 'superscript')\n * @param precision The precision level for fraction approximation\n * @param maxDenominator The maximum allowed denominator (default: 4)\n * @returns A formatted string representing the mixed fraction\n */\n formatMixedFraction(\n number: number,\n format: \"unicode\" | \"ascii\" | \"superscript\" = \"ascii\",\n precision: number = 16,\n maxDenominator: number = 4,\n ): string {\n // Get the basic mixed fraction\n const basicFraction = this.toMixedFraction(\n number,\n precision,\n maxDenominator,\n );\n\n // If the format is ascii, just return the basic fraction\n if (format === \"ascii\") {\n return basicFraction;\n }\n\n // For unicode and superscript formats, we need to parse the basic fraction\n const isNegative = basicFraction.startsWith(\"-\");\n const withoutSign = isNegative ? basicFraction.substring(1) : basicFraction;\n\n // Check if it's a pure fraction or mixed fraction\n const hasMixedPart = withoutSign.includes(\" \");\n\n if (!withoutSign.includes(\"/\")) {\n // If there's no fraction part, just return the number\n return basicFraction;\n }\n\n let wholePart = \"\";\n let fractionPart = withoutSign;\n\n if (hasMixedPart) {\n // Split the whole and fraction parts\n const parts = withoutSign.split(\" \");\n wholePart = parts[0];\n fractionPart = parts[1];\n }\n\n // Split the fraction part into numerator and denominator\n const [numerator, denominator] = fractionPart.split(\"/\");\n\n if (format === \"unicode\") {\n // Try to find a unicode fraction character\n const unicodeFraction = this.getUnicodeFraction(\n parseInt(numerator),\n parseInt(denominator),\n );\n\n if (unicodeFraction) {\n return isNegative\n ? `-${wholePart}${hasMixedPart ? \" \" : \"\"}${unicodeFraction}`\n : `${wholePart}${hasMixedPart ? \" \" : \"\"}${unicodeFraction}`;\n }\n\n // Fallback to basic format if no unicode fraction is available\n return basicFraction;\n }\n\n // Handle superscript format\n if (format === \"superscript\") {\n const superNumerator = this.toSuperscript(numerator);\n const subDenominator = this.toSubscript(denominator);\n\n if (hasMixedPart) {\n return isNegative\n ? `-${wholePart} ${superNumerator}⁄${subDenominator}`\n : `${wholePart} ${superNumerator}⁄${subDenominator}`;\n } else {\n return isNegative\n ? `-${superNumerator}⁄${subDenominator}`\n : `${superNumerator}⁄${subDenominator}`;\n }\n }\n\n // Fallback to basic format\n return basicFraction;\n }\n\n /**\n * Gets the Unicode fraction character if available\n *\n * @param numerator The numerator\n * @param denominator The denominator\n * @returns Unicode fraction character or null if not available\n */\n private getUnicodeFraction(\n numerator: number,\n denominator: number,\n ): string | null {\n // Map common fractions to their Unicode characters\n const fractionMap: Record<string, string> = {\n \"1/4\": \"¼\",\n \"1/2\": \"½\",\n \"3/4\": \"¾\",\n \"1/3\": \"⅓\",\n \"2/3\": \"⅔\",\n \"1/5\": \"⅕\",\n \"2/5\": \"⅖\",\n \"3/5\": \"⅗\",\n \"4/5\": \"⅘\",\n \"1/6\": \"⅙\",\n \"5/6\": \"⅚\",\n \"1/7\": \"⅐\",\n \"1/8\": \"⅛\",\n \"3/8\": \"⅜\",\n \"5/8\": \"⅝\",\n \"7/8\": \"⅞\",\n \"1/9\": \"⅑\",\n \"1/10\": \"⅒\",\n };\n\n const key = `${numerator}/${denominator}`;\n return fractionMap[key] || null;\n }\n\n /**\n * Converts digits to superscript\n */\n private toSuperscript(str: string): string {\n const superscriptMap: Record<string, string> = {\n \"0\": \"⁰\",\n \"1\": \"¹\",\n \"2\": \"²\",\n \"3\": \"³\",\n \"4\": \"⁴\",\n \"5\": \"⁵\",\n \"6\": \"⁶\",\n \"7\": \"⁷\",\n \"8\": \"⁸\",\n \"9\": \"⁹\",\n \"-\": \"⁻\",\n };\n\n return str\n .split(\"\")\n .map((char) => superscriptMap[char] || char)\n .join(\"\");\n }\n\n /**\n * Converts digits to subscript\n */\n private toSubscript(str: string): string {\n const subscriptMap: Record<string, string> = {\n \"0\": \"₀\",\n \"1\": \"₁\",\n \"2\": \"₂\",\n \"3\": \"₃\",\n \"4\": \"₄\",\n \"5\": \"₅\",\n \"6\": \"₆\",\n \"7\": \"₇\",\n \"8\": \"₈\",\n \"9\": \"₉\",\n \"-\": \"₋\",\n };\n\n return str\n .split(\"\")\n .map((char) => subscriptMap[char] || char)\n .join(\"\");\n }\n}\n\n\n\nconst numbers = new Numbers()\n\nexport default numbers"],"mappings":";;;AAIA,IAOa,IAAb,MAAA;CAAA,cAAA;AAAA,OAAA,eAN2B,OAAd,YAAc,OAAe,UAAU,WACzC,UAAU,WAEZ;;CAgBP,YAAY,GAAgB,IAAwB,GAAA;EAClD,IAAM,IAAkB,MAAI;AAC5B,SAAO,KAAK,MAAM,IAAS,EAAA,GAAU;;CAmBvC,aACE,GACA,IAAiB,KAAK,cACtB,IAAoC,EAAA,EAAA;AAEpC,SAAO,IAAI,KAAK,aAAa,GAAQ,EAAA,CAAS,OAAO,EAAA;;CASvD,kBACE,GACA,IAA2B,KAAA;EAE3B,IAAM,IAAmB,EAAa,QAAQ,GAAkB,IAAA;AAChE,SAAO,WAAW,EAAA;;CAapB,KACE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,EAAA,CACtC,KAAK,GAAA;;CAMV,YAAoB,GAAA;EAClB,IAAM,IAAuC;GAC3C,GAAK;GACL,GAAK;GACL,GAAK;GACL,GAAK;GACL,GAAK;GACL,GAAK;GACL,GAAK;GACL,GAAK;GACL,GAAK;GACL,GAAK;GACL,KAAK;GAAA;AAGP,SAAO,EACJ,MAAM,GAAA,CACN,KAAK,MAAS,EAAa,MAAS,EAAA,CACpC,KAAK,GAAA;;;AAMI,IAAI,GAAA;AAAA,SAAA"}
|
package/dist/utils-CBPQvxNW.cjs
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
require(`./animation-CQRdLgzX.cjs`),require(`./overlay-stack-7bs4ZNnh.cjs`),require(`./intersection-DqBqnpgh.cjs`);var e=class{constructor(){this.systemLocale=typeof navigator<`u`&&navigator.language?navigator.language:`de-DE`}roundNumber(e,t=2){let n=10**t;return Math.round(e*n)/n}formatNumber(e,t=this.systemLocale,n={}){return new Intl.NumberFormat(t,n).format(e)}parseToPureNumber(e,t=`,`){let n=e.replace(t,`.`);return parseFloat(n)}doIt(e,t=2,n=this.systemLocale,r={}){let i=this.roundNumber(e,t);return this.formatNumber(i,n,r)}formatCurrency(e,t=`€`){return`${t}${this.doIt(e)}`}formatDelta(e,t=`€`){return`${e>0?`↑`:e<0?`↓`:`→`} ${t}${this.doIt(Math.abs(e))}`}getDeltaClass(e){return e>0?`text-error-default`:e<0?`text-primary-default`:`text-neutral`}toMixedFraction(e,t=16,n=4){let r=e<0;e=Math.abs(e);let i=Math.floor(e),a=e-i;if(a<1/10**t)return r?`-${i}`:`${i}`;let{numerator:o,denominator:s}=this.decimalToFraction(a,t,n);return i===0?r?`-${o}/${s}`:`${o}/${s}`:r?`-${i} ${o}/${s}`:`${i} ${o}/${s}`}decimalToFraction(e,t,n=4){if(e===0)return{numerator:0,denominator:1};let r=1/0,i=0,a=1,o=[];n>=5&&o.push({n:1,d:5},{n:2,d:5},{n:3,d:5},{n:4,d:5}),n>=6&&o.push({n:1,d:6},{n:5,d:6}),n>=8&&o.push({n:1,d:8},{n:3,d:8},{n:5,d:8},{n:7,d:8}),n>=10&&o.push({n:1,d:10},{n:3,d:10},{n:7,d:10},{n:9,d:10}),n>=12&&o.push({n:1,d:12},{n:5,d:12},{n:7,d:12},{n:11,d:12}),n>=16&&o.push({n:1,d:16},{n:3,d:16},{n:5,d:16},{n:7,d:16},{n:9,d:16},{n:11,d:16},{n:13,d:16},{n:15,d:16});let s=[{n:1,d:2},{n:1,d:3},{n:2,d:3},{n:1,d:4},{n:3,d:4},...o];for(let o of s)if(o.d<=n){let n=Math.abs(e-o.n/o.d);if(n<r&&(r=n,i=o.n,a=o.d,n<1/10**t))return{numerator:o.n,denominator:o.d}}for(let t=1;t<=n;t++){let n=Math.round(e*t),o=Math.abs(e-n/t);o<r&&(r=o,i=n,a=t)}if(r>1/10**(t/2)&&n>4){let r=1,o=0,s=0,c=1,l=e;do{let u=Math.floor(l),d=r;if(r=u*r+o,o=d,d=s,s=u*s+c,c=d,l=1/(l-u),Math.abs(e-r/s)<1/10**t||s>n)return s>n?{numerator:i,denominator:a}:{numerator:r,denominator:s}}while(l!==1/0);i=r,a=s}let c=this.findGCD(i,a);return{numerator:i/c,denominator:a/c}}findGCD(e,t){return t===0?e:this.findGCD(t,e%t)}formatMixedFraction(e,t=`ascii`,n=16,r=4){let i=this.toMixedFraction(e,n,r);if(t===`ascii`)return i;let a=i.startsWith(`-`),o=a?i.substring(1):i,s=o.includes(` `);if(!o.includes(`/`))return i;let c=``,l=o;if(s){let e=o.split(` `);c=e[0],l=e[1]}let[u,d]=l.split(`/`);if(t===`unicode`){let e=this.getUnicodeFraction(parseInt(u),parseInt(d));return e?a?`-${c}${s?` `:``}${e}`:`${c}${s?` `:``}${e}`:i}if(t===`superscript`){let e=this.toSuperscript(u),t=this.toSubscript(d);return s?a?`-${c} ${e}⁄${t}`:`${c} ${e}⁄${t}`:a?`-${e}⁄${t}`:`${e}⁄${t}`}return i}getUnicodeFraction(e,t){return{"1/4":`¼`,"1/2":`½`,"3/4":`¾`,"1/3":`⅓`,"2/3":`⅔`,"1/5":`⅕`,"2/5":`⅖`,"3/5":`⅗`,"4/5":`⅘`,"1/6":`⅙`,"5/6":`⅚`,"1/7":`⅐`,"1/8":`⅛`,"3/8":`⅜`,"5/8":`⅝`,"7/8":`⅞`,"1/9":`⅑`,"1/10":`⅒`}[`${e}/${t}`]||null}toSuperscript(e){let t={0:`⁰`,1:`¹`,2:`²`,3:`³`,4:`⁴`,5:`⁵`,6:`⁶`,7:`⁷`,8:`⁸`,9:`⁹`,"-":`⁻`};return e.split(``).map(e=>t[e]||e).join(``)}toSubscript(e){let t={0:`₀`,1:`₁`,2:`₂`,3:`₃`,4:`₄`,5:`₅`,6:`₆`,7:`₇`,8:`₈`,9:`₉`,"-":`₋`};return e.split(``).map(e=>t[e]||e).join(``)}};new e,Object.defineProperty(exports,`t`,{enumerable:!0,get:function(){return e}});
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"utils-CBPQvxNW.cjs","names":[],"sources":["../src/utils/number.ts"],"sourcesContent":["/**\n * Gets the user's system locale from browser settings.\n * Falls back to 'de-DE' if not available (e.g., in Node.js environment).\n */\nconst getSystemLocale = (): string => {\n if (typeof navigator !== 'undefined' && navigator.language) {\n return navigator.language\n }\n return 'de-DE'\n}\n\nexport class Numbers {\n /**\n * The system locale detected from user's browser/OS settings.\n * Use this for display formatting. For exports, use explicit locale like 'de-DE'.\n */\n readonly systemLocale = getSystemLocale()\n\n /**\n * Rounds a number to the specified number of decimal places.\n * @param {number} number - The number to round.\n * @param {number} [decimalPlaces=2] - The number of decimal places to round to.\n * @returns {number} - The rounded number.\n */\n roundNumber(number: number, decimalPlaces: number = 2): number {\n const factor = Math.pow(10, decimalPlaces);\n return Math.round(number * factor) / factor;\n }\n\n /**\n * Formats a number according to the specified locale and options.\n * Uses the user's system locale by default for display formatting.\n *\n * @param {number} number - The number to format.\n * @param {string} [locale] - The locale string (e.g., 'de-DE'). Defaults to system locale.\n * @param {Intl.NumberFormatOptions} [options={}] - Additional formatting options.\n * @returns {string} - The formatted number as a string.\n *\n * @example\n * // Uses system locale (e.g., user's browser setting)\n * numbers.formatNumber(1234.56)\n *\n * // Explicit locale for exports (bank systems expect German format)\n * numbers.formatNumber(1234.56, 'de-DE', { useGrouping: false })\n */\n formatNumber(\n number: number,\n locale: string = this.systemLocale,\n options: Intl.NumberFormatOptions = {},\n ): string {\n return new Intl.NumberFormat(locale, options).format(number);\n }\n\n /**\n * Parses a string with a specified decimal separator into a number.\n * @param {string} numberString - The string to parse.\n * @param {string} [decimalSeparator=','] - The decimal separator used in the string.\n * @returns {number} - The parsed number.\n */\n parseToPureNumber(\n numberString: string,\n decimalSeparator: string = \",\",\n ): number {\n const normalizedString = numberString.replace(decimalSeparator, \".\");\n return parseFloat(normalizedString);\n }\n\n /**\n * Rounds a number to the specified decimal places and formats it according to the specified locale and options.\n * Uses the user's system locale by default.\n *\n * @param {number} number - The number to process.\n * @param {number} [decimalPlaces=2] - The number of decimal places to round to.\n * @param {string} [locale] - The locale string. Defaults to system locale.\n * @param {Intl.NumberFormatOptions} [options={}] - Additional formatting options.\n * @returns {string} - The formatted number as a string.\n */\n doIt(\n number: number,\n decimalPlaces: number = 2,\n locale: string = this.systemLocale,\n options: Intl.NumberFormatOptions = {},\n ): string {\n const roundedNumber = this.roundNumber(number, decimalPlaces);\n return this.formatNumber(roundedNumber, locale, options);\n }\n\n /**\n * Format a currency amount consistently across the application\n *\n * @param amount The amount to format\n * @param currency The currency symbol to display (default: '€')\n * @returns Formatted amount with currency symbol\n */\n formatCurrency(amount: number, currency: string = \"€\"): string {\n return `${currency}${this.doIt(amount)}`;\n }\n\n /**\n * Format a delta value with appropriate directional indicator\n *\n * @param delta The delta amount to format\n * @param currency The currency symbol to display (default: '€')\n * @returns Formatted delta with direction indicator and currency symbol\n */\n formatDelta(delta: number, currency: string = \"€\"): string {\n const symbol = delta > 0 ? \"↑\" : delta < 0 ? \"↓\" : \"→\";\n return `${symbol} ${currency}${this.doIt(Math.abs(delta))}`;\n }\n\n /**\n * Get CSS class for delta value\n *\n * @param delta The delta amount\n * @returns CSS class based on delta direction\n */\n getDeltaClass(delta: number): string {\n return delta > 0\n ? \"text-error-default\"\n : delta < 0\n ? \"text-primary-default\"\n : \"text-neutral\";\n }\n\n /**\n * Converts a decimal number to a mixed fraction string\n * For example: 1.5 becomes \"1 1/2\", 2.25 becomes \"2 1/4\"\n *\n * @param number The decimal number to convert\n * @param precision The precision level for fraction approximation (default: 16)\n * @param maxDenominator The maximum allowed denominator (default: 4)\n * @returns A string representing the mixed fraction\n */\n toMixedFraction(\n number: number,\n precision: number = 16,\n maxDenominator: number = 4,\n ): string {\n // Handle negative numbers\n const isNegative = number < 0;\n number = Math.abs(number);\n\n // Extract whole number part\n const wholePart = Math.floor(number);\n\n // Extract decimal part and convert to fraction\n let decimalPart = number - wholePart;\n\n // If the decimal part is very small or zero, just return the whole number\n if (decimalPart < 1 / Math.pow(10, precision)) {\n return isNegative ? `-${wholePart}` : `${wholePart}`;\n }\n\n // Find the best fraction approximation using precision and max denominator\n const { numerator, denominator } = this.decimalToFraction(\n decimalPart,\n precision,\n maxDenominator,\n );\n\n // Format based on whether there's a whole part\n if (wholePart === 0) {\n return isNegative\n ? `-${numerator}/${denominator}`\n : `${numerator}/${denominator}`;\n } else {\n return isNegative\n ? `-${wholePart} ${numerator}/${denominator}`\n : `${wholePart} ${numerator}/${denominator}`;\n }\n }\n\n /**\n * Converts a decimal to a simplified fraction with a maximum denominator\n *\n * @param decimal The decimal part to convert (0 <= decimal < 1)\n * @param precision The precision level for approximation\n * @param maxDenominator The maximum allowed denominator (default: 4)\n * @returns Object containing numerator and denominator\n */\n private decimalToFraction(\n decimal: number,\n precision: number,\n maxDenominator: number = 4,\n ): { numerator: number; denominator: number } {\n if (decimal === 0) {\n return { numerator: 0, denominator: 1 };\n }\n\n // Initialize best approximation\n let bestError = Infinity;\n let bestNumerator = 0;\n let bestDenominator = 1;\n\n // Check common fractions first for better user experience\n // Filter to only include fractions with denominators <= maxDenominator\n const commonFractions = [\n { n: 1, d: 2 }, // 1/2\n { n: 1, d: 3 }, // 1/3\n { n: 2, d: 3 }, // 2/3\n { n: 1, d: 4 }, // 1/4\n { n: 3, d: 4 }, // 3/4\n ];\n\n // Add additional fractions only if maxDenominator allows\n const additionalFractions = [];\n if (maxDenominator >= 5) {\n additionalFractions.push(\n { n: 1, d: 5 }, // 1/5\n { n: 2, d: 5 }, // 2/5\n { n: 3, d: 5 }, // 3/5\n { n: 4, d: 5 }, // 4/5\n );\n }\n if (maxDenominator >= 6) {\n additionalFractions.push(\n { n: 1, d: 6 }, // 1/6\n { n: 5, d: 6 }, // 5/6\n );\n }\n if (maxDenominator >= 8) {\n additionalFractions.push(\n { n: 1, d: 8 }, // 1/8\n { n: 3, d: 8 }, // 3/8\n { n: 5, d: 8 }, // 5/8\n { n: 7, d: 8 }, // 7/8\n );\n }\n if (maxDenominator >= 10) {\n additionalFractions.push(\n { n: 1, d: 10 }, // 1/10\n { n: 3, d: 10 }, // 3/10\n { n: 7, d: 10 }, // 7/10\n { n: 9, d: 10 }, // 9/10\n );\n }\n if (maxDenominator >= 12) {\n additionalFractions.push(\n { n: 1, d: 12 }, // 1/12\n { n: 5, d: 12 }, // 5/12\n { n: 7, d: 12 }, // 7/12\n { n: 11, d: 12 }, // 11/12\n );\n }\n if (maxDenominator >= 16) {\n additionalFractions.push(\n { n: 1, d: 16 }, // 1/16\n { n: 3, d: 16 }, // 3/16\n { n: 5, d: 16 }, // 5/16\n { n: 7, d: 16 }, // 7/16\n { n: 9, d: 16 }, // 9/16\n { n: 11, d: 16 }, // 11/16\n { n: 13, d: 16 }, // 13/16\n { n: 15, d: 16 }, // 15/16\n );\n }\n\n // Combine all applicable fractions\n const allFractions = [...commonFractions, ...additionalFractions];\n\n // Check common fractions first\n for (const frac of allFractions) {\n if (frac.d <= maxDenominator) {\n const error = Math.abs(decimal - frac.n / frac.d);\n if (error < bestError) {\n bestError = error;\n bestNumerator = frac.n;\n bestDenominator = frac.d;\n\n // If we're very close to a common fraction, just use it\n if (error < 1 / Math.pow(10, precision)) {\n return { numerator: frac.n, denominator: frac.d };\n }\n }\n }\n }\n\n // If no suitable common fraction found, use a more sophisticated approach\n // for denominators up to maxDenominator\n\n // Find the best approximation with denominator <= maxDenominator\n for (let d = 1; d <= maxDenominator; d++) {\n // Find best numerator for this denominator\n const n = Math.round(decimal * d);\n const error = Math.abs(decimal - n / d);\n\n if (error < bestError) {\n bestError = error;\n bestNumerator = n;\n bestDenominator = d;\n }\n }\n\n // Only use continued fraction expansion if we're significantly off\n // and maxDenominator allows for larger denominators\n if (bestError > 1 / Math.pow(10, precision / 2) && maxDenominator > 4) {\n // Implementation of continued fraction expansion\n let n1 = 1,\n n2 = 0;\n let d1 = 0,\n d2 = 1;\n let b = decimal;\n\n do {\n let a = Math.floor(b);\n let aux = n1;\n n1 = a * n1 + n2;\n n2 = aux;\n\n aux = d1;\n d1 = a * d1 + d2;\n d2 = aux;\n\n b = 1 / (b - a);\n\n // Calculate the current approximation\n const currentError = Math.abs(decimal - n1 / d1);\n\n // If we hit the precision limit or if the denominator gets too large, use this approximation\n if (currentError < 1 / Math.pow(10, precision) || d1 > maxDenominator) {\n // If d1 exceeds maxDenominator, return the previous best result\n if (d1 > maxDenominator) {\n return { numerator: bestNumerator, denominator: bestDenominator };\n }\n\n // Otherwise return this result\n return { numerator: n1, denominator: d1 };\n }\n } while (b !== Infinity);\n\n bestNumerator = n1;\n bestDenominator = d1;\n }\n\n // Simplify the fraction\n const gcd = this.findGCD(bestNumerator, bestDenominator);\n return {\n numerator: bestNumerator / gcd,\n denominator: bestDenominator / gcd,\n };\n }\n\n /**\n * Calculates the greatest common divisor of two numbers\n */\n private findGCD(a: number, b: number): number {\n return b === 0 ? a : this.findGCD(b, a % b);\n }\n\n /**\n * Alternative method to get a formatted mixed fraction with a specified format\n *\n * @param number The decimal number to convert\n * @param format The format specification ('unicode', 'ascii', 'superscript')\n * @param precision The precision level for fraction approximation\n * @param maxDenominator The maximum allowed denominator (default: 4)\n * @returns A formatted string representing the mixed fraction\n */\n formatMixedFraction(\n number: number,\n format: \"unicode\" | \"ascii\" | \"superscript\" = \"ascii\",\n precision: number = 16,\n maxDenominator: number = 4,\n ): string {\n // Get the basic mixed fraction\n const basicFraction = this.toMixedFraction(\n number,\n precision,\n maxDenominator,\n );\n\n // If the format is ascii, just return the basic fraction\n if (format === \"ascii\") {\n return basicFraction;\n }\n\n // For unicode and superscript formats, we need to parse the basic fraction\n const isNegative = basicFraction.startsWith(\"-\");\n const withoutSign = isNegative ? basicFraction.substring(1) : basicFraction;\n\n // Check if it's a pure fraction or mixed fraction\n const hasMixedPart = withoutSign.includes(\" \");\n\n if (!withoutSign.includes(\"/\")) {\n // If there's no fraction part, just return the number\n return basicFraction;\n }\n\n let wholePart = \"\";\n let fractionPart = withoutSign;\n\n if (hasMixedPart) {\n // Split the whole and fraction parts\n const parts = withoutSign.split(\" \");\n wholePart = parts[0];\n fractionPart = parts[1];\n }\n\n // Split the fraction part into numerator and denominator\n const [numerator, denominator] = fractionPart.split(\"/\");\n\n if (format === \"unicode\") {\n // Try to find a unicode fraction character\n const unicodeFraction = this.getUnicodeFraction(\n parseInt(numerator),\n parseInt(denominator),\n );\n\n if (unicodeFraction) {\n return isNegative\n ? `-${wholePart}${hasMixedPart ? \" \" : \"\"}${unicodeFraction}`\n : `${wholePart}${hasMixedPart ? \" \" : \"\"}${unicodeFraction}`;\n }\n\n // Fallback to basic format if no unicode fraction is available\n return basicFraction;\n }\n\n // Handle superscript format\n if (format === \"superscript\") {\n const superNumerator = this.toSuperscript(numerator);\n const subDenominator = this.toSubscript(denominator);\n\n if (hasMixedPart) {\n return isNegative\n ? `-${wholePart} ${superNumerator}⁄${subDenominator}`\n : `${wholePart} ${superNumerator}⁄${subDenominator}`;\n } else {\n return isNegative\n ? `-${superNumerator}⁄${subDenominator}`\n : `${superNumerator}⁄${subDenominator}`;\n }\n }\n\n // Fallback to basic format\n return basicFraction;\n }\n\n /**\n * Gets the Unicode fraction character if available\n *\n * @param numerator The numerator\n * @param denominator The denominator\n * @returns Unicode fraction character or null if not available\n */\n private getUnicodeFraction(\n numerator: number,\n denominator: number,\n ): string | null {\n // Map common fractions to their Unicode characters\n const fractionMap: Record<string, string> = {\n \"1/4\": \"¼\",\n \"1/2\": \"½\",\n \"3/4\": \"¾\",\n \"1/3\": \"⅓\",\n \"2/3\": \"⅔\",\n \"1/5\": \"⅕\",\n \"2/5\": \"⅖\",\n \"3/5\": \"⅗\",\n \"4/5\": \"⅘\",\n \"1/6\": \"⅙\",\n \"5/6\": \"⅚\",\n \"1/7\": \"⅐\",\n \"1/8\": \"⅛\",\n \"3/8\": \"⅜\",\n \"5/8\": \"⅝\",\n \"7/8\": \"⅞\",\n \"1/9\": \"⅑\",\n \"1/10\": \"⅒\",\n };\n\n const key = `${numerator}/${denominator}`;\n return fractionMap[key] || null;\n }\n\n /**\n * Converts digits to superscript\n */\n private toSuperscript(str: string): string {\n const superscriptMap: Record<string, string> = {\n \"0\": \"⁰\",\n \"1\": \"¹\",\n \"2\": \"²\",\n \"3\": \"³\",\n \"4\": \"⁴\",\n \"5\": \"⁵\",\n \"6\": \"⁶\",\n \"7\": \"⁷\",\n \"8\": \"⁸\",\n \"9\": \"⁹\",\n \"-\": \"⁻\",\n };\n\n return str\n .split(\"\")\n .map((char) => superscriptMap[char] || char)\n .join(\"\");\n }\n\n /**\n * Converts digits to subscript\n */\n private toSubscript(str: string): string {\n const subscriptMap: Record<string, string> = {\n \"0\": \"₀\",\n \"1\": \"₁\",\n \"2\": \"₂\",\n \"3\": \"₃\",\n \"4\": \"₄\",\n \"5\": \"₅\",\n \"6\": \"₆\",\n \"7\": \"₇\",\n \"8\": \"₈\",\n \"9\": \"₉\",\n \"-\": \"₋\",\n };\n\n return str\n .split(\"\")\n .map((char) => subscriptMap[char] || char)\n .join(\"\");\n }\n}\n\n\n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,MAAO,IACP,MAAO,IACP,MAAO,IACP,MAAO,IACP,MAAO,IACP,MAAO,IACP,MAAO,IACP,MAAO,IACP,MAAO,IACP,MAAO,IACP,MAAO,IACP,MAAO,IACP,MAAO,IACP,MAAO,IACP,MAAO,IACP,MAAO,IACP,MAAO,IACP,OAAQ,IAAA,CAIS,GADJ,EAAA,GAAa,MACD,KAM7B,cAAsB,EAAA,CACpB,IAAM,EAAyC,CAC7C,EAAK,IACL,EAAK,IACL,EAAK,IACL,EAAK,IACL,EAAK,IACL,EAAK,IACL,EAAK,IACL,EAAK,IACL,EAAK,IACL,EAAK,IACL,IAAK,IAAA,CAGP,OAAO,EACJ,MAAM,GAAA,CACN,IAAK,GAAS,EAAe,IAAS,EAAA,CACtC,KAAK,GAAA,CAMV,YAAoB,EAAA,CAClB,IAAM,EAAuC,CAC3C,EAAK,IACL,EAAK,IACL,EAAK,IACL,EAAK,IACL,EAAK,IACL,EAAK,IACL,EAAK,IACL,EAAK,IACL,EAAK,IACL,EAAK,IACL,IAAK,IAAA,CAGP,OAAO,EACJ,MAAM,GAAA,CACN,IAAK,GAAS,EAAa,IAAS,EAAA,CACpC,KAAK,GAAA,GAMI,IAAI,EAAA,OAAA,eAAA,QAAA,IAAA,CAAA,WAAA,CAAA,EAAA,IAAA,UAAA,CAAA,OAAA,GAAA,CAAA"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"window-CrjZdf7Y.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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AAM,QAAA,CAAA,CAAA,EAAS,EAAA,WAAA,aAAA,KAAA,EAAA,EAAA,EAAA,CAG1B,EAAS;CAAE,MAAM;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-DTUARSrU.cjs
DELETED
|
@@ -1,59 +0,0 @@
|
|
|
1
|
-
require(`./chunk-CncqDLb2.cjs`);const e=require(`./decorate-F9CuyeHg.cjs`),t=require(`./litElement.mixin-qh5-IIUq.cjs`);require(`./mixins.cjs`);const n=require(`./animation-CQRdLgzX.cjs`),r=require(`./reduced-motion-9RjNnhIg.cjs`),i=require(`./cursor-glow-Duw9jHmh.cjs`),a=require(`./theme.service-DxJPUGlu.cjs`),o=require(`./overlay-stack-7bs4ZNnh.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
|
-
:host {
|
|
3
|
-
display: contents;
|
|
4
|
-
position: relative;
|
|
5
|
-
z-index: 1000;
|
|
6
|
-
}
|
|
7
|
-
:host([hidden]) {
|
|
8
|
-
display: none !important;
|
|
9
|
-
}
|
|
10
|
-
`){static{g=this}constructor(...e){super(...e),this.id=`default`,this.lowered=!1,this.corner=`bottom-right`,this.resizable=!1,this.freePosition=!1,this.visualState=`normal`,this.minWidth=280,this.minHeight=200,this.open=!1,this._hasOpened=!1,this._focused=!1,this._position={x:16,y:16},this._currentCorner=`bottom-right`,this._appliedCorner=``,this._containerRef=(0,f.createRef)(),this._bodyRef=(0,f.createRef)(),this._headRef=(0,f.createRef)(),this._handleFocus=()=>_.focus(this.id),this._handleHeadKeydown=e=>{if(e.key===`Enter`||e.key===` `)return e.preventDefault(),void this.toggle();if(e.key===`ArrowUp`||e.key===`ArrowDown`||e.key===`ArrowLeft`||e.key===`ArrowRight`){e.preventDefault();let t=e.shiftKey?20:5,n=e.key===`ArrowRight`?t:e.key===`ArrowLeft`?-t:0,r=e.key===`ArrowDown`?t:e.key===`ArrowUp`?-t:0;this._position={x:this._position.x+n,y:this._position.y+r},this._applyContainerPosition(),this._savePosition()}}}get panelWidth(){return this.expandedWidth??`min(360px, calc(100vw - 32px))`}get isBottomCorner(){return this._currentCorner.startsWith(`bottom`)}get closedClipPath(){return this.isBottomCorner?`inset(calc(100% - 48px) 0px 0px 0px round 22px)`:`inset(0px 0px calc(100% - 48px) 0px round 22px)`}get openClipPath(){return`inset(0px 0px 0px 0px round 12px)`}get elevation(){return this.open?`4`:this.lowered?`1`:`3`}_applyContainerPosition(){let e=this._containerRef.value;if(!e)return;this._appliedCorner!==this._currentCorner&&(e.style.removeProperty(`left`),e.style.removeProperty(`right`),e.style.removeProperty(`top`),e.style.removeProperty(`bottom`),this._appliedCorner=this._currentCorner);let{x:t,y:n}=this._position;this._currentCorner.includes(`right`)?e.style.right=`${t}px`:e.style.left=`${t}px`,this._currentCorner.includes(`bottom`)?e.style.bottom=`${n+a.n.bottomOffset}px`:e.style.top=`${n}px`}static{this.VALID_CORNERS=new Set([`top-left`,`top-right`,`bottom-left`,`bottom-right`])}_loadPosition(){let e=_.loadPosition(this.id);e&&(this._position={x:e.x,y:e.y},g.VALID_CORNERS.has(e.anchor)&&(this._currentCorner=e.anchor))}_savePosition(){_.savePosition(this.id,{...this._position,anchor:this._currentCorner})}_validateBounds(){let e=this._containerRef.value;if(!e)return;let t=e.getBoundingClientRect();if(t.width===0)return;let n=window.innerWidth,r=window.innerHeight,i=this._currentCorner.includes(`right`),a=this._currentCorner.includes(`bottom`),o=i?n-this._position.x-t.width:this._position.x,s=a?r-this._position.y-t.height:this._position.y,c=Math.max(0,Math.min(o,n-t.width)),l=Math.max(0,Math.min(s,r-t.height));this._position={x:i?n-c-t.width:c,y:a?r-l-t.height:l},this._applyContainerPosition()}_reorientToNearestCorner(e=!1){if(this.freePosition){this._savePosition();let e=this._containerRef.value?.getBoundingClientRect();e&&_.updateBounds(this.id,{left:e.left,top:e.top,width:e.width,height:e.height});return}let t=this._containerRef.value;if(!t)return;let i=t.getBoundingClientRect(),a=this._currentCorner.includes(`bottom`),o=i.left+i.width/2,c=a?i.bottom-24:i.top+24,l=o>window.innerWidth/2?`right`:`left`,u=`${c>window.innerHeight/2?`bottom`:`top`}-${l}`;if(this._currentCorner=u,this._position={x:16,y:16},this._applyContainerPosition(),this.open||(t.style.clipPath=this.closedClipPath),e||r.t.value){this._savePosition();let e=t.getBoundingClientRect();_.updateBounds(this.id,{left:e.left,top:e.top,width:e.width,height:e.height});return}let d=t.getBoundingClientRect(),f=i.left-d.left,p=i.top-d.top;t.style.translate=`${f}px ${p}px`;let m=[{translate:`${f}px ${p}px`},{translate:`0px 0px`}];(0,s.from)(t.animate(m,{duration:n.d.duration,easing:n.d.easingFallback,fill:`forwards`}).finished).pipe((0,s.take)(1),(0,s.tap)(()=>{t.isConnected&&(t.style.translate=``);let e=t.getBoundingClientRect();_.updateBounds(this.id,{left:e.left,top:e.top,width:e.width,height:e.height})}),(0,s.catchError)(()=>s.EMPTY),(0,s.takeUntil)(this.disconnecting)).subscribe(),this._savePosition()}_drag$(){return new s.Observable(()=>{let e=this._headRef.value,t=this._containerRef.value;if(!e||!t)return;let n=!1,r=(0,s.fromEvent)(e,`pointerdown`).pipe((0,s.filter)(e=>e.button===0),(0,s.filter)(e=>{let t=e.target.tagName?.toLowerCase();return![`input`,`textarea`,`select`,`button`].includes(t)&&!e.target.closest(`schmancy-input, schmancy-icon-button, button, a`)}),(0,s.tap)(e=>{e.preventDefault(),e.stopPropagation()})).pipe((0,s.map)(e=>{let r=t.getBoundingClientRect(),i=this._currentCorner.includes(`bottom`),a=this.open;return n=!1,{startX:e.clientX,startY:e.clientY,offsetX:e.clientX-r.left,offsetY:e.clientY-r.top,rect:r,vw:window.innerWidth,vh:window.innerHeight,isBottom:i,wasOpen:a,pointerId:e.pointerId}}),(0,s.switchMap)(({startX:e,startY:r,offsetX:i,offsetY:a,rect:o,vw:c,vh:l,isBottom:u,wasOpen:d,pointerId:f})=>{let p=(0,s.fromEvent)(window,`pointermove`).pipe((0,s.filter)(e=>e.pointerId===f),(0,s.auditTime)(0,s.animationFrameScheduler),(0,s.map)(e=>({clientX:e.clientX,clientY:e.clientY}))),m=(0,s.fromEvent)(window,`pointerup`).pipe((0,s.filter)(e=>e.pointerId===f));return p.pipe((0,s.tap)(({clientX:s,clientY:f})=>{let p=s-e,m=f-r;if(Math.sqrt(p*p+m*m)>5&&!n&&(n=!0,this._applyDragVisuals(!0),d)){this.open=!1,t.style.clipPath=this.closedClipPath,t.style.overflow=`hidden`;let e=this._bodyRef.value;e&&(e.inert=!0,e.style.visibility=`hidden`)}if(!n)return;let h=Math.max(0,Math.min(s-i,c-o.width)),g=u?y-o.height:0,_=u?l-o.height:l-y,v=Math.max(g,Math.min(f-a,_));this._position={x:this._currentCorner.includes(`right`)?c-h-o.width:h,y:u?l-v-o.height:v},this._applyContainerPosition()}),(0,s.takeUntil)(m),(0,s.finalize)(()=>{n?(this._reorientToNearestCorner(),this._applyDragVisuals(!1),n=!1):(n=!1,this.toggle())}))})).subscribe();return()=>r.unsubscribe()})}connectedCallback(){super.connectedCallback(),(0,s.from)(this.updateComplete).pipe((0,s.take)(1),(0,s.tap)(()=>{this._currentCorner=this.corner,this._loadPosition(),this._applyContainerPosition(),this._initDOMState();let e=this._containerRef.value;if(e){let t=e.getBoundingClientRect(),n={left:t.left,top:t.top,width:t.width,height:t.height};_.register(this.id,n,this.freePosition?`free`:this._currentCorner)}}),(0,s.switchMap)(()=>(0,s.merge)(this._drag$(),_.selectWindow(this.id).pipe((0,s.tap)(e=>{if(!e)return;let t=this._containerRef.value;t&&(t.style.zIndex=String(e.zIndex))})),_.selectFocused().pipe((0,s.tap)(e=>{this._focused=e===this.id})))),(0,s.takeUntil)(this.disconnecting)).subscribe(),(0,s.merge)((0,s.fromEvent)(window,`resize`).pipe((0,s.auditTime)(0,s.animationFrameScheduler),(0,s.tap)(()=>this._validateBounds())),a.n.bottomOffset$.pipe((0,s.tap)(()=>this._applyContainerPosition()))).pipe((0,s.takeUntil)(this.disconnecting)).subscribe()}disconnectedCallback(){super.disconnectedCallback(),_.unregister(this.id)}_initDOMState(){let e=this._containerRef.value,t=this._bodyRef.value;e&&(this._applyContainerPosition(),this.open?(this._hasOpened=!0,e.style.overflow=``,t&&(t.inert=!1,t.style.visibility=`visible`)):(e.style.clipPath=this.closedClipPath,e.style.overflow=`hidden`,t&&(t.inert=!0,t.style.visibility=`hidden`)))}_animateOpen(){let e=this._containerRef.value,t=this._bodyRef.value;if(!e)return;this._hasOpened=!0,this.open=!0;let i=e.getBoundingClientRect(),a={left:i.left,top:this.isBottomCorner?i.top-400:i.top,width:i.width,height:448},o=_.findOverlaps(a,this.id);if(o.length>0){let e=v(a,o,{width:window.innerWidth,height:window.innerHeight});if(Math.abs(e.left-a.left)>10||Math.abs(e.top-a.top)>10){let t=this._currentCorner.includes(`right`),n=this._currentCorner.includes(`bottom`);this._position={x:t?window.innerWidth-e.left-e.width:e.left,y:n?window.innerHeight-e.top-e.height:e.top},this._applyContainerPosition()}}if(t&&(t.style.visibility=`visible`,t.inert=!1),r.t.value)return e.style.clipPath=``,e.style.overflow=``,void this.dispatchScopedEvent(`window-toggle`,{state:`expanded`});this._currentAnimation?.cancel(),e.style.overflow=`hidden`,e.style.willChange=`opacity`;let c=[{clipPath:this.closedClipPath,opacity:.95},{clipPath:this.openClipPath,opacity:1}],l=e.animate(c,{duration:n.f.duration,easing:n.f.easingFallback,fill:`forwards`});this._currentAnimation=l,(0,s.from)(l.finished).pipe((0,s.take)(1),(0,s.tap)(()=>{e.isConnected&&(e.style.clipPath=``,e.style.overflow=``,e.style.willChange=``)}),(0,s.catchError)(()=>s.EMPTY),(0,s.takeUntil)(this.disconnecting)).subscribe(),this.dispatchScopedEvent(`window-toggle`,{state:`expanded`})}_animateClose(){let e=this._containerRef.value;if(!e)return;if(r.t.value){e.style.clipPath=this.closedClipPath,e.style.overflow=`hidden`,this.open=!1;let t=this._bodyRef.value;t&&(t.inert=!0,t.style.visibility=`hidden`),this.dispatchScopedEvent(`window-toggle`,{state:`collapsed`});return}this._currentAnimation?.cancel(),e.style.overflow=`hidden`,e.style.willChange=`opacity`;let t=[{clipPath:this.openClipPath,opacity:1},{clipPath:this.closedClipPath,opacity:.95}],i=e.animate(t,{duration:Math.round(.7*n.f.duration),easing:`cubic-bezier(0.4, 0, 0.8, 0.15)`,fill:`forwards`});this._currentAnimation=i,(0,s.from)(i.finished).pipe((0,s.take)(1),(0,s.tap)(()=>{this.open=!1,e.style.willChange=``;let t=this._bodyRef.value;t&&(t.inert=!0,t.style.visibility=`hidden`)}),(0,s.catchError)(()=>s.EMPTY),(0,s.takeUntil)(this.disconnecting)).subscribe(),this.dispatchScopedEvent(`window-toggle`,{state:`collapsed`})}_applyDragVisuals(e){let t=this._headRef.value,n=this._containerRef.value;t&&(t.classList.toggle(`cursor-grabbing`,e),t.classList.toggle(`cursor-move`,!e)),n&&(n.style.opacity=e?`0.95`:``)}toggle(){this.open?this._animateClose():this._animateOpen()}expand(){this.open||this._animateOpen()}close(){this.open&&this._animateClose()}render(){let e=this._currentCorner.startsWith(`bottom`),t=(0,c.classMap)({fixed:!0,flex:!0,"flex-col":e,"flex-col-reverse":!e,"z-1000":!0,"ring-1":!this._focused,"ring-2":this._focused,"ring-primary-default/30":this._focused,"ring-primary-default/15":this.open&&!this._focused,"rounded-2xl":this.open,"ring-outline-variant/40":!this.open&&!this._focused,"rounded-[22px]":!this.open,"overflow-hidden":!0}),n=(0,l.styleMap)({width:this.panelWidth,"max-height":`calc(100vh - 32px)`,"pointer-events":`none`}),r=(0,l.styleMap)({"pointer-events":this.open?`auto`:`none`}),a=(0,c.classMap)({"h-full":!0,"px-3":!0,flex:!0,"items-center":!0,"gap-2":!0,"select-none":!0,"cursor-move":!0});return d.html`
|
|
11
|
-
<schmancy-surface
|
|
12
|
-
${(0,f.ref)(this._containerRef)}
|
|
13
|
-
type="glass"
|
|
14
|
-
elevation="${this.elevation}"
|
|
15
|
-
class=${t}
|
|
16
|
-
style=${n}
|
|
17
|
-
aria-expanded=${this.open}
|
|
18
|
-
@pointerdown=${this._handleFocus}
|
|
19
|
-
>
|
|
20
|
-
<!-- Details section (visually above summary for bottom corners) -->
|
|
21
|
-
<section
|
|
22
|
-
${(0,f.ref)(this._bodyRef)}
|
|
23
|
-
class="flex-1 min-h-0 overflow-hidden flex flex-col"
|
|
24
|
-
style=${r}
|
|
25
|
-
role="region"
|
|
26
|
-
aria-label="Expandable content"
|
|
27
|
-
>
|
|
28
|
-
${this._hasOpened?d.html`<slot name="details"></slot>`:d.nothing}
|
|
29
|
-
</section>
|
|
30
|
-
|
|
31
|
-
<!-- Summary section -- always interactive, always visible -->
|
|
32
|
-
<section
|
|
33
|
-
class="shrink-0 bg-surface-lowest"
|
|
34
|
-
style=${(0,l.styleMap)({"pointer-events":`auto`,height:`48px`})}
|
|
35
|
-
>
|
|
36
|
-
<div
|
|
37
|
-
${(0,f.ref)(this._headRef)}
|
|
38
|
-
${i.t({radius:200,intensity:.1})}
|
|
39
|
-
class=${a}
|
|
40
|
-
role="button"
|
|
41
|
-
tabindex="0"
|
|
42
|
-
title="Drag to move, click to expand"
|
|
43
|
-
aria-label="${this.open?`Collapse window`:`Expand window`}"
|
|
44
|
-
@keydown=${this._handleHeadKeydown}
|
|
45
|
-
>
|
|
46
|
-
<div class="flex-1 min-w-0">
|
|
47
|
-
<slot></slot>
|
|
48
|
-
</div>
|
|
49
|
-
<svg
|
|
50
|
-
width="16" height="16" viewBox="0 0 24 24" fill="none"
|
|
51
|
-
class="shrink-0 text-surface-on/40 transition-transform duration-200 ${this.open?`rotate-180`:``}"
|
|
52
|
-
aria-hidden="true"
|
|
53
|
-
>
|
|
54
|
-
<path d="M6 9L12 15L18 9" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" />
|
|
55
|
-
</svg>
|
|
56
|
-
</div>
|
|
57
|
-
</section>
|
|
58
|
-
</schmancy-surface>
|
|
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}});
|