@mhmo91/schmancy 0.10.26 → 0.10.28
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 +14 -18
- package/dist/agent/overlay.confirm-body-BZoUgkdK.js +4574 -0
- package/dist/agent/overlay.confirm-body-BZoUgkdK.js.map +1 -0
- package/dist/agent/schmancy.agent.js +3121 -4893
- package/dist/agent/schmancy.agent.js.map +1 -1
- package/dist/agent/schmancy.manifest.json +68 -24
- package/dist/{area-DkvO_oiO.cjs → area-BSVOYQDA.cjs} +1 -1
- package/dist/{area-DkvO_oiO.cjs.map → area-BSVOYQDA.cjs.map} +1 -1
- package/dist/{area-fC1_kvAW.js → area-C_Yvjmad.js} +1 -1
- package/dist/{area-fC1_kvAW.js.map → area-C_Yvjmad.js.map} +1 -1
- package/dist/area.cjs +1 -1
- package/dist/area.js +1 -1
- package/dist/{autocomplete-Aa2IstyX.cjs → autocomplete-B50VXUzw.cjs} +1 -1
- package/dist/{autocomplete-Aa2IstyX.cjs.map → autocomplete-B50VXUzw.cjs.map} +1 -1
- package/dist/{autocomplete-Hb-C11a3.js → autocomplete-C6I1mfOT.js} +2 -2
- package/dist/{autocomplete-Hb-C11a3.js.map → autocomplete-C6I1mfOT.js.map} +1 -1
- package/dist/autocomplete.cjs +1 -1
- package/dist/autocomplete.js +1 -1
- package/dist/avatar.cjs +2 -2
- package/dist/avatar.js +3 -3
- package/dist/badge.cjs +1 -1
- package/dist/badge.js +1 -1
- package/dist/{boat-BW6aRcdY.js → boat-C94QZ4Zt.js} +1 -1
- package/dist/{boat-BW6aRcdY.js.map → boat-C94QZ4Zt.js.map} +1 -1
- package/dist/{boat-BEq-AHmL.cjs → boat-DVQBNkk5.cjs} +1 -1
- package/dist/{boat-BEq-AHmL.cjs.map → boat-DVQBNkk5.cjs.map} +1 -1
- package/dist/boat.cjs +1 -1
- package/dist/boat.js +1 -1
- package/dist/breadcrumb.cjs +1 -1
- package/dist/breadcrumb.js +1 -1
- package/dist/{busy-D-ucQFSB.js → busy--bNb42rM.js} +1 -1
- package/dist/{busy-D-ucQFSB.js.map → busy--bNb42rM.js.map} +1 -1
- package/dist/{busy-CKpIblIO.cjs → busy-DuxFvEkY.cjs} +1 -1
- package/dist/{busy-CKpIblIO.cjs.map → busy-DuxFvEkY.cjs.map} +1 -1
- package/dist/busy.cjs +1 -1
- package/dist/busy.js +1 -1
- package/dist/{button-BU-X0a0S.js → button-B7b9L_h5.js} +26 -187
- package/dist/button-B7b9L_h5.js.map +1 -0
- package/dist/{button-HzLpB3NP.cjs → button-DAFZ5A4O.cjs} +2 -60
- package/dist/button-DAFZ5A4O.cjs.map +1 -0
- package/dist/button.cjs +59 -1
- package/dist/button.cjs.map +1 -0
- package/dist/button.js +170 -2
- package/dist/button.js.map +1 -0
- package/dist/{card-CcrUlgd3.cjs → card-DZPd24Sn.cjs} +1 -1
- package/dist/{card-CcrUlgd3.cjs.map → card-DZPd24Sn.cjs.map} +1 -1
- package/dist/{card-ueXBeJ6q.js → card-ixzxOW-Q.js} +1 -1
- package/dist/{card-ueXBeJ6q.js.map → card-ixzxOW-Q.js.map} +1 -1
- package/dist/card.cjs +1 -1
- package/dist/card.js +1 -1
- package/dist/{checkbox-qsp-I5C6.cjs → checkbox-Bi_Fm2mf.cjs} +1 -1
- package/dist/{checkbox-qsp-I5C6.cjs.map → checkbox-Bi_Fm2mf.cjs.map} +1 -1
- package/dist/{checkbox-CW1kk4Tu.js → checkbox-DdGpepTh.js} +1 -1
- package/dist/{checkbox-CW1kk4Tu.js.map → checkbox-DdGpepTh.js.map} +1 -1
- package/dist/checkbox.cjs +1 -1
- package/dist/checkbox.js +1 -1
- package/dist/{chips-C_F6-gfe.js → chips-DLTynyVB.js} +3 -3
- package/dist/{chips-C_F6-gfe.js.map → chips-DLTynyVB.js.map} +1 -1
- package/dist/{chips-Dluk6RV4.cjs → chips-DWQMZErr.cjs} +1 -1
- package/dist/{chips-Dluk6RV4.cjs.map → chips-DWQMZErr.cjs.map} +1 -1
- package/dist/chips.cjs +1 -1
- package/dist/chips.js +2 -2
- package/dist/connectivity.cjs +1 -1
- package/dist/connectivity.js +1 -1
- package/dist/content-drawer.cjs +1 -1
- package/dist/content-drawer.js +1 -1
- package/dist/{date-range-ASZ8h_Il.js → date-range-CJ6MiTpF.js} +90 -82
- package/dist/date-range-CJ6MiTpF.js.map +1 -0
- package/dist/{date-range-BFOqXAI2.cjs → date-range-DQpmMJH-.cjs} +6 -1
- package/dist/date-range-DQpmMJH-.cjs.map +1 -0
- package/dist/{date-range-inline-DHrgolLn.js → date-range-inline-Ho3CENTh.js} +1 -1
- package/dist/{date-range-inline-DHrgolLn.js.map → date-range-inline-Ho3CENTh.js.map} +1 -1
- package/dist/{date-range-inline-BNmNOpL0.cjs → date-range-inline-nPWIs-3C.cjs} +1 -1
- package/dist/{date-range-inline-BNmNOpL0.cjs.map → date-range-inline-nPWIs-3C.cjs.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 +1 -1
- package/dist/delay.js +2 -2
- package/dist/{details-Bx9c4XQR.cjs → details-BnRWMZdt.cjs} +1 -1
- package/dist/{details-Bx9c4XQR.cjs.map → details-BnRWMZdt.cjs.map} +1 -1
- package/dist/{details-B9RgRw6c.js → details-CcMTvYo7.js} +2 -2
- package/dist/{details-B9RgRw6c.js.map → details-CcMTvYo7.js.map} +1 -1
- package/dist/details.cjs +1 -1
- package/dist/details.js +1 -1
- package/dist/{directives-Dq0zi2KR.cjs → directives-BkSqmLBV.cjs} +11 -11
- package/dist/directives-BkSqmLBV.cjs.map +1 -0
- package/dist/{directives-sWKTEJDb.js → directives-DgPbz0lQ.js} +116 -153
- package/dist/directives-DgPbz0lQ.js.map +1 -0
- package/dist/directives.cjs +1 -1
- package/dist/directives.js +7 -6
- package/dist/discovery.cjs +1 -1
- package/dist/discovery.js +1 -1
- package/dist/{discovery.service-CVDXO9rH.cjs.map → discovery.service-CIa3Eeuk.cjs.map} +1 -1
- package/dist/{discovery.service-COmbHaoI.js.map → discovery.service-DZFxtRwW.js.map} +1 -1
- package/dist/{divider-DH0BvTOv.cjs → divider-C6yJSL1c.cjs} +1 -1
- package/dist/{divider-DH0BvTOv.cjs.map → divider-C6yJSL1c.cjs.map} +1 -1
- package/dist/{divider-C7BtzDcK.js → divider-CZCj0ioH.js} +1 -1
- package/dist/{divider-C7BtzDcK.js.map → divider-CZCj0ioH.js.map} +1 -1
- package/dist/divider.cjs +1 -1
- package/dist/divider.js +1 -1
- package/dist/dropdown.cjs +1 -1
- package/dist/dropdown.js +1 -1
- package/dist/{expand-DcMx9dHY.js → expand-Cc6ogXsR.js} +2 -2
- package/dist/{expand-DcMx9dHY.js.map → expand-Cc6ogXsR.js.map} +1 -1
- package/dist/{expand-CPMF44eL.cjs → expand-D4EhwOYh.cjs} +1 -1
- package/dist/{expand-CPMF44eL.cjs.map → expand-D4EhwOYh.cjs.map} +1 -1
- package/dist/expand.cjs +1 -1
- package/dist/expand.js +1 -1
- package/dist/{float-CgBN4H3g.cjs → float-B8EPc_OG.cjs} +1 -1
- package/dist/{float-CgBN4H3g.cjs.map → float-B8EPc_OG.cjs.map} +1 -1
- package/dist/{float-DkUw5TN4.js → float-BvI3HTtB.js} +1 -1
- package/dist/{float-DkUw5TN4.js.map → float-BvI3HTtB.js.map} +1 -1
- package/dist/float.cjs +1 -1
- package/dist/float.js +1 -1
- package/dist/{form-kSgJf_h4.js → form-FtYtZScl.js} +8 -8
- package/dist/{form-kSgJf_h4.js.map → form-FtYtZScl.js.map} +1 -1
- package/dist/form-SHg5FLsd.cjs +42 -0
- package/dist/{form-DxApnyVx.cjs.map → form-SHg5FLsd.cjs.map} +1 -1
- package/dist/form.cjs +1 -1
- package/dist/form.js +6 -6
- package/dist/gravity-6pL6CfIr.cjs +1 -0
- package/dist/gravity-6pL6CfIr.cjs.map +1 -0
- package/dist/gravity-sVK3zGBF.js +46 -0
- package/dist/gravity-sVK3zGBF.js.map +1 -0
- package/dist/handover/agent-runtime-followups.md +1 -1
- package/dist/handover/agent-runtime-v1.md +3 -3
- package/dist/{hashContent-Dgmzc32o.js.map → hashContent-BqU6v1Xr.js.map} +1 -1
- package/dist/{hashContent-Dh1VzIAb.cjs.map → hashContent-iRZJJWtE.cjs.map} +1 -1
- package/dist/{icons-DsfpmrVO.js → icon-B1eZr2ZL.js} +1 -1
- package/dist/icon-B1eZr2ZL.js.map +1 -0
- package/dist/{icons-3F1nQAn_.cjs → icon-CgIXAvKI.cjs} +1 -1
- package/dist/{icons-DsfpmrVO.js.map → icon-CgIXAvKI.cjs.map} +1 -1
- package/dist/icons.cjs +1 -1
- package/dist/icons.js +1 -1
- package/dist/{iframe-sTXBw6zB.cjs → iframe-BO3BpRLH.cjs} +1 -1
- package/dist/{iframe-sTXBw6zB.cjs.map → iframe-BO3BpRLH.cjs.map} +1 -1
- package/dist/{iframe-KrV4Cak-.js → iframe-CmpAZc61.js} +1 -1
- package/dist/{iframe-KrV4Cak-.js.map → iframe-CmpAZc61.js.map} +1 -1
- package/dist/iframe.cjs +1 -1
- package/dist/iframe.js +1 -1
- package/dist/index.cjs +1 -1
- package/dist/index.js +49 -47
- package/dist/{input-DMoggdSN.cjs → input-5YL2oUBr.cjs} +1 -1
- package/dist/{input-DMoggdSN.cjs.map → input-5YL2oUBr.cjs.map} +1 -1
- package/dist/{input-zj3eaZM_.js → input-_Hft9vov.js} +1 -1
- package/dist/{input-zj3eaZM_.js.map → input-_Hft9vov.js.map} +1 -1
- package/dist/{input-chip-DHbfUatc.js → input-chip-BNTojQT6.js} +1 -1
- package/dist/{input-chip-DHbfUatc.js.map → input-chip-BNTojQT6.js.map} +1 -1
- package/dist/{input-chip-B1iNQW2m.cjs → input-chip-DKMNpcED.cjs} +1 -1
- package/dist/{input-chip-B1iNQW2m.cjs.map → input-chip-DKMNpcED.cjs.map} +1 -1
- package/dist/input.cjs +1 -1
- package/dist/input.js +1 -1
- package/dist/json.cjs +1 -1
- package/dist/json.js +2 -2
- package/dist/kbd.cjs +1 -1
- package/dist/kbd.js +1 -1
- package/dist/layout.cjs +1 -1
- package/dist/layout.js +1 -1
- package/dist/{lightbox-CAcXlJlv.js → lightbox-CKlYcnHV.js} +1 -1
- package/dist/{lightbox-CAcXlJlv.js.map → lightbox-CKlYcnHV.js.map} +1 -1
- package/dist/{lightbox-86F2RgXy.cjs → lightbox-t4dvb8_A.cjs} +1 -1
- package/dist/{lightbox-86F2RgXy.cjs.map → lightbox-t4dvb8_A.cjs.map} +1 -1
- package/dist/lightbox.cjs +1 -1
- package/dist/lightbox.js +1 -1
- package/dist/{list-CUbI0RM6.cjs → list-21mWtDKg.cjs} +4 -4
- package/dist/list-21mWtDKg.cjs.map +1 -0
- package/dist/{list-BIjJ6T1c.js → list-B6QhxgRJ.js} +4 -7
- package/dist/list-B6QhxgRJ.js.map +1 -0
- package/dist/list.cjs +1 -1
- package/dist/list.js +1 -1
- package/dist/{magnetic-mHXl54Z8.js.map → magnetic-B2VKNfDu.js.map} +1 -1
- package/dist/{magnetic-D-ph029G.cjs.map → magnetic-MQ3HMHJi.cjs.map} +1 -1
- package/dist/{menu-CtFcvxgU.js → menu-C5qcgMnw.js} +3 -3
- package/dist/{menu-CtFcvxgU.js.map → menu-C5qcgMnw.js.map} +1 -1
- package/dist/{menu-DGMrjR_a.cjs → menu-Cuxt5K4Y.cjs} +2 -2
- package/dist/{menu-DGMrjR_a.cjs.map → menu-Cuxt5K4Y.cjs.map} +1 -1
- package/dist/menu.cjs +1 -1
- package/dist/menu.js +1 -1
- package/dist/mixins-8dT5j6CS.js +627 -0
- package/dist/mixins-8dT5j6CS.js.map +1 -0
- package/dist/mixins-BF3Vj8_c.cjs +242 -0
- package/dist/mixins-BF3Vj8_c.cjs.map +1 -0
- package/dist/mixins.cjs +1 -1
- package/dist/mixins.js +1 -1
- package/dist/nav-drawer.cjs +1 -1
- package/dist/nav-drawer.js +1 -1
- package/dist/navigation-bar.cjs +1 -1
- package/dist/navigation-bar.js +1 -1
- package/dist/navigation-rail.cjs +7 -5
- package/dist/navigation-rail.cjs.map +1 -1
- package/dist/navigation-rail.js +52 -38
- package/dist/navigation-rail.js.map +1 -1
- package/dist/notification-CDKBKh63.js +243 -0
- package/dist/notification-CDKBKh63.js.map +1 -0
- package/dist/notification-CcNoBFEJ.cjs +24 -0
- package/dist/notification-CcNoBFEJ.cjs.map +1 -0
- package/dist/notification.cjs +1 -1
- package/dist/notification.js +1 -1
- package/dist/{option-C3UyYQi_.js → option-BWfmDJvm.js} +1 -1
- package/dist/{option-C3UyYQi_.js.map → option-BWfmDJvm.js.map} +1 -1
- package/dist/{option-DJ3R-2Wn.cjs → option-DejeqOad.cjs} +1 -1
- package/dist/{option-DJ3R-2Wn.cjs.map → option-DejeqOad.cjs.map} +1 -1
- package/dist/option.cjs +1 -1
- package/dist/option.js +1 -1
- package/dist/{overlay-D1hFkcFA.js → overlay-D3c_NY18.js} +214 -265
- package/dist/overlay-D3c_NY18.js.map +1 -0
- package/dist/overlay-Dv2utO4C.cjs +43 -0
- package/dist/overlay-Dv2utO4C.cjs.map +1 -0
- package/dist/overlay.cjs +1 -1
- package/dist/overlay.confirm-body-B2ntyquG.cjs +79 -0
- package/dist/overlay.confirm-body-B2ntyquG.cjs.map +1 -0
- package/dist/overlay.confirm-body-B_v0ivkn.js +159 -0
- package/dist/overlay.confirm-body-B_v0ivkn.js.map +1 -0
- package/dist/overlay.js +3 -3
- package/dist/overlay.service-B3FjXCqc.js +143 -0
- package/dist/overlay.service-B3FjXCqc.js.map +1 -0
- package/dist/overlay.service-BkSeqXIv.cjs +1 -0
- package/dist/overlay.service-BkSeqXIv.cjs.map +1 -0
- package/dist/{progress-CY-UbvOB.cjs → progress-6_rb3Ah9.cjs} +1 -1
- package/dist/{progress-CY-UbvOB.cjs.map → progress-6_rb3Ah9.cjs.map} +1 -1
- package/dist/{progress-YjdEWDI5.js → progress-CFcmO0wv.js} +1 -1
- package/dist/{progress-YjdEWDI5.js.map → progress-CFcmO0wv.js.map} +1 -1
- package/dist/progress.cjs +1 -1
- package/dist/progress.js +1 -1
- package/dist/{radio-group-aKXKHqUp.js → radio-group-Bd8y9QpX.js} +1 -1
- package/dist/{radio-group-aKXKHqUp.js.map → radio-group-Bd8y9QpX.js.map} +1 -1
- package/dist/{radio-group--UamzqAm.cjs → radio-group-_WZg8EKM.cjs} +1 -1
- package/dist/{radio-group--UamzqAm.cjs.map → radio-group-_WZg8EKM.cjs.map} +1 -1
- package/dist/radio-group.cjs +1 -1
- package/dist/radio-group.js +1 -1
- package/dist/range.cjs +1 -1
- package/dist/range.js +1 -1
- package/dist/{rxjs-utils-CaC-tdot.cjs.map → rxjs-utils-Csnks202.cjs.map} +1 -1
- package/dist/{rxjs-utils-BXpvHN4-.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/{select-CIquL8LY.cjs → select-BaioT3yY.cjs} +2 -2
- package/dist/{select-CIquL8LY.cjs.map → select-BaioT3yY.cjs.map} +1 -1
- package/dist/{select-B0Qk4PfT.js → select-Czpl1ztD.js} +3 -3
- package/dist/{select-B0Qk4PfT.js.map → select-Czpl1ztD.js.map} +1 -1
- package/dist/select.cjs +1 -1
- package/dist/select.js +1 -1
- package/dist/skeleton.cjs +1 -1
- package/dist/skeleton.js +1 -1
- package/dist/skills/SKILL.md +1 -1
- package/dist/skills/list.md +0 -1
- package/dist/skills/schmancy/SKILL.md +1 -1
- package/dist/skills/schmancy/list.md +0 -1
- package/dist/slider.cjs +1 -1
- package/dist/slider.js +1 -1
- package/dist/{splash-screen-rg56AXCf.cjs → splash-screen-3FtgdVy3.cjs} +1 -1
- package/dist/{splash-screen-rg56AXCf.cjs.map → splash-screen-3FtgdVy3.cjs.map} +1 -1
- package/dist/{splash-screen-CP_Idse2.js → splash-screen-YtTVkJg8.js} +1 -1
- package/dist/{splash-screen-CP_Idse2.js.map → splash-screen-YtTVkJg8.js.map} +1 -1
- package/dist/splash-screen.cjs +1 -1
- package/dist/splash-screen.js +1 -1
- package/dist/{src-BAaNnqwc.cjs → src-AYRNg63f.cjs} +8 -8
- package/dist/{src-BAaNnqwc.cjs.map → src-AYRNg63f.cjs.map} +1 -1
- package/dist/{src-Do0IGupa.js → src-DKMEgT2z.js} +37 -37
- package/dist/{src-Do0IGupa.js.map → src-DKMEgT2z.js.map} +1 -1
- package/dist/steps.cjs +1 -1
- package/dist/steps.js +1 -1
- package/dist/{surface-B7a2O5-9.cjs → surface-BNvxLEDN.cjs} +1 -1
- package/dist/surface-BNvxLEDN.cjs.map +1 -0
- package/dist/{surface-DGewe6IV.js → surface-CVxyQPln.js} +1 -1
- package/dist/surface-CVxyQPln.js.map +1 -0
- package/dist/surface.cjs +1 -1
- package/dist/surface.js +1 -1
- package/dist/switch.cjs +1 -1
- package/dist/switch.js +1 -1
- package/dist/table.cjs +1 -1
- package/dist/table.js +1 -1
- package/dist/{tabs-g2aM43TH.js → tabs-CnPXvZuZ.js} +1 -1
- package/dist/{tabs-g2aM43TH.js.map → tabs-CnPXvZuZ.js.map} +1 -1
- package/dist/{tabs-n4dO5fo1.cjs → tabs-DTU7748z.cjs} +1 -1
- package/dist/{tabs-n4dO5fo1.cjs.map → tabs-DTU7748z.cjs.map} +1 -1
- package/dist/tabs.cjs +1 -1
- package/dist/tabs.js +1 -1
- package/dist/teleport.cjs +1 -1
- package/dist/teleport.js +1 -1
- package/dist/{textarea-DDx_7AfQ.cjs → textarea-Bqth6Q8P.cjs} +1 -1
- package/dist/{textarea-DDx_7AfQ.cjs.map → textarea-Bqth6Q8P.cjs.map} +1 -1
- package/dist/{textarea-D5hw4jsP.js → textarea-mQPsppmd.js} +1 -1
- package/dist/{textarea-D5hw4jsP.js.map → textarea-mQPsppmd.js.map} +1 -1
- package/dist/textarea.cjs +1 -1
- package/dist/textarea.js +1 -1
- package/dist/{theme-BMYkheaA.js → theme-BJqpv4cG.js} +2 -2
- package/dist/{theme-BMYkheaA.js.map → theme-BJqpv4cG.js.map} +1 -1
- package/dist/{theme-BdZAj0CO.cjs → theme-D4HGKt7N.cjs} +1 -1
- package/dist/{theme-BdZAj0CO.cjs.map → theme-D4HGKt7N.cjs.map} +1 -1
- package/dist/{theme-button-DdI6kxY3.js → theme-button-Jap7G_IH.js} +1 -1
- package/dist/{theme-button-DdI6kxY3.js.map → theme-button-Jap7G_IH.js.map} +1 -1
- package/dist/{theme-button-R2f_kLEl.cjs → theme-button-LP-Dgr17.cjs} +1 -1
- package/dist/{theme-button-R2f_kLEl.cjs.map → theme-button-LP-Dgr17.cjs.map} +1 -1
- package/dist/theme-button.cjs +1 -1
- package/dist/theme-button.js +1 -1
- package/dist/theme.cjs +1 -1
- package/dist/{theme.interface-B5xjEk74.cjs.map → theme.interface-CSt7JUBD.cjs.map} +1 -1
- package/dist/{theme.interface-DVEw3s8m.js.map → theme.interface-odQEpZZH.js.map} +1 -1
- package/dist/theme.js +3 -3
- package/dist/tree.cjs +1 -1
- package/dist/tree.js +1 -1
- package/dist/typography-BJMm6b0b.js +358 -0
- package/dist/typography-BJMm6b0b.js.map +1 -0
- package/dist/typography-Bc4MmSal.cjs +282 -0
- package/dist/typography-Bc4MmSal.cjs.map +1 -0
- package/dist/typography.cjs +1 -282
- package/dist/typography.js +2 -358
- package/dist/{utils-CVWUrECT.cjs.map → utils-DTa3QHxk.cjs.map} +1 -1
- package/dist/{utils-578eFTx4.js.map → utils-H8wNknWC.js.map} +1 -1
- package/dist/utils.cjs +1 -1
- package/dist/utils.js +1 -1
- package/dist/visually-hidden.cjs +1 -1
- package/dist/visually-hidden.js +1 -1
- package/dist/{window-LOGPpN8K.cjs → window-CNu_WnsY.cjs} +1 -1
- package/dist/{window-LOGPpN8K.cjs.map → window-CNu_WnsY.cjs.map} +1 -1
- package/dist/{window-MQxhTodp.js → window-DZTjkE24.js} +1 -1
- package/dist/{window-MQxhTodp.js.map → window-DZTjkE24.js.map} +1 -1
- package/dist/window.cjs +1 -1
- package/dist/window.js +1 -1
- package/package.json +1 -1
- package/skills/schmancy/SKILL.md +1 -1
- package/skills/schmancy/list.md +0 -1
- package/src/form/fields/date-range/date-range-dialog.ts +8 -1
- package/src/list/list.ts +1 -12
- package/src/menu/menu.ts +4 -1
- package/src/navigation-rail/navigation-rail.ts +558 -490
- package/src/notification/notification-service.ts +81 -263
- package/src/notification/notification.scss +93 -50
- package/src/notification/notification.ts +32 -69
- package/src/overlay/overlay.component.ts +99 -158
- package/src/overlay/overlay.confirm-body.ts +106 -61
- package/src/overlay/overlay.service.ts +81 -108
- package/src/surface/surface.styles.ts +0 -17
- package/src/surface/surface.ts +5 -7
- package/types/mixins/surface.mixin.d.ts +0 -3
- package/types/src/form/fields/date-range/date-range-dialog.d.ts +1 -0
- package/types/src/list/list.d.ts +0 -9
- package/types/src/navigation-rail/navigation-rail.d.ts +21 -1
- package/types/src/notification/notification-service.d.ts +3 -86
- package/types/src/notification/notification.d.ts +1 -1
- package/types/src/overlay/overlay.component.d.ts +1 -2
- package/types/src/overlay/overlay.confirm-body.d.ts +8 -4
- package/types/src/surface/surface.d.ts +5 -6
- package/types/src/surface/surface.styles.d.ts +0 -4
- package/dist/agent/overlay.confirm-body-DJrL6tio.js +0 -2859
- package/dist/agent/overlay.confirm-body-DJrL6tio.js.map +0 -1
- package/dist/button-BU-X0a0S.js.map +0 -1
- package/dist/button-HzLpB3NP.cjs.map +0 -1
- package/dist/date-range-ASZ8h_Il.js.map +0 -1
- package/dist/date-range-BFOqXAI2.cjs.map +0 -1
- package/dist/directives-Dq0zi2KR.cjs.map +0 -1
- package/dist/directives-sWKTEJDb.js.map +0 -1
- package/dist/form-DxApnyVx.cjs +0 -42
- package/dist/icons-3F1nQAn_.cjs.map +0 -1
- package/dist/list-BIjJ6T1c.js.map +0 -1
- package/dist/list-CUbI0RM6.cjs.map +0 -1
- package/dist/mixins-CKbQ6BJo.js +0 -642
- package/dist/mixins-CKbQ6BJo.js.map +0 -1
- package/dist/mixins-DSy-enUd.cjs +0 -254
- package/dist/mixins-DSy-enUd.cjs.map +0 -1
- package/dist/notification-BqyMYtP7.js +0 -306
- package/dist/notification-BqyMYtP7.js.map +0 -1
- package/dist/notification-D5eOdsMT.cjs +0 -23
- package/dist/notification-D5eOdsMT.cjs.map +0 -1
- package/dist/overlay-D1hFkcFA.js.map +0 -1
- package/dist/overlay-D7nQaT5U.cjs +0 -81
- package/dist/overlay-D7nQaT5U.cjs.map +0 -1
- package/dist/overlay.confirm-body-B4eCDLmU.js +0 -100
- package/dist/overlay.confirm-body-B4eCDLmU.js.map +0 -1
- package/dist/overlay.confirm-body-P18SmJL2.cjs +0 -45
- package/dist/overlay.confirm-body-P18SmJL2.cjs.map +0 -1
- package/dist/overlay.service-02ZLZ8Ib.js +0 -146
- package/dist/overlay.service-02ZLZ8Ib.js.map +0 -1
- package/dist/overlay.service-m-8omCA-.cjs +0 -1
- package/dist/overlay.service-m-8omCA-.cjs.map +0 -1
- package/dist/surface-B7a2O5-9.cjs.map +0 -1
- package/dist/surface-DGewe6IV.js.map +0 -1
- package/dist/typography.cjs.map +0 -1
- package/dist/typography.js.map +0 -1
- /package/dist/{discovery.service-CVDXO9rH.cjs → discovery.service-CIa3Eeuk.cjs} +0 -0
- /package/dist/{discovery.service-COmbHaoI.js → discovery.service-DZFxtRwW.js} +0 -0
- /package/dist/{hashContent-Dgmzc32o.js → hashContent-BqU6v1Xr.js} +0 -0
- /package/dist/{hashContent-Dh1VzIAb.cjs → hashContent-iRZJJWtE.cjs} +0 -0
- /package/dist/{magnetic-mHXl54Z8.js → magnetic-B2VKNfDu.js} +0 -0
- /package/dist/{magnetic-D-ph029G.cjs → magnetic-MQ3HMHJi.cjs} +0 -0
- /package/dist/{rxjs-utils-CaC-tdot.cjs → rxjs-utils-Csnks202.cjs} +0 -0
- /package/dist/{rxjs-utils-BXpvHN4-.js → rxjs-utils-d-ivVN84.js} +0 -0
- /package/dist/{theme.interface-B5xjEk74.cjs → theme.interface-CSt7JUBD.cjs} +0 -0
- /package/dist/{theme.interface-DVEw3s8m.js → theme.interface-odQEpZZH.js} +0 -0
- /package/dist/{utils-CVWUrECT.cjs → utils-DTa3QHxk.cjs} +0 -0
- /package/dist/{utils-578eFTx4.js → utils-H8wNknWC.js} +0 -0
|
@@ -0,0 +1,243 @@
|
|
|
1
|
+
import { c as e } from "./mixins-8dT5j6CS.js";
|
|
2
|
+
import { a as t } from "./active-host-BP0zy_Y9.js";
|
|
3
|
+
import { t as n } from "./audio-CxO5a2HL.js";
|
|
4
|
+
import "./progress-CFcmO0wv.js";
|
|
5
|
+
import { BehaviorSubject as r, NEVER as i, catchError as a, finalize as o, fromEvent as s, interval as c, tap as l, timer as u } from "rxjs";
|
|
6
|
+
import { distinctUntilChanged as d, map as f, switchMap as p, takeUntil as m, tap as h } from "rxjs/operators";
|
|
7
|
+
import { customElement as g, property as _, state as v } from "lit/decorators.js";
|
|
8
|
+
import { html as y, unsafeCSS as b } from "lit";
|
|
9
|
+
var x = class extends e {
|
|
10
|
+
constructor(...e) {
|
|
11
|
+
super(...e), this.title = "", this.message = "", this.type = "info", this.closable = !0, this.duration = 5e3, this.id = `notification-${Date.now()}-${Math.floor(1e4 * Math.random())}`, this.playSound = !0, this.showProgress = !1, this.startPosition = {
|
|
12
|
+
x: 0,
|
|
13
|
+
y: 0
|
|
14
|
+
}, this._visible = !0, this._progress = 100, this._hovered = !1, this._closing = !1, this.paused$ = new r(!1), this.startTime = 0, this.pausedAt = 0, this.elapsedBeforePause = 0;
|
|
15
|
+
}
|
|
16
|
+
static {
|
|
17
|
+
this.styles = [b(":host{display:block}.notification{outline:1px solid color-mix(in srgb, var(--schmancy-sys-color-outline-variant) 50%, transparent);background:linear-gradient(180deg, color-mix(in srgb, var(--schmancy-sys-color-surface-container) 100%, transparent), color-mix(in srgb, var(--schmancy-sys-color-surface-containerHigh) 100%, transparent));max-width:360px;color:var(--schmancy-sys-color-surface-on);--notification-glow-color:var(--schmancy-sys-color-primary-default);box-shadow:0 6px 28px -10px color-mix(in srgb, var(--notification-glow-color) 22%, transparent), 0 1px 0 0 color-mix(in srgb, var(--schmancy-sys-color-outline-variant) 30%, transparent);border-radius:4px 14px 14px 4px;align-items:stretch;transition:box-shadow .3s,transform .3s cubic-bezier(.34,1.56,.64,1);display:flex;position:relative;overflow:hidden}.notification.info{--notification-glow-color:var(--schmancy-sys-color-primary-default);--notification-accent:var(--schmancy-sys-color-primary-default)}.notification.success{--notification-glow-color:var(--schmancy-sys-color-success-default);--notification-accent:var(--schmancy-sys-color-success-default)}.notification.warning{--notification-glow-color:var(--schmancy-sys-color-tertiary-default);--notification-accent:var(--schmancy-sys-color-tertiary-default)}.notification.error{--notification-glow-color:var(--schmancy-sys-color-error-default);--notification-accent:var(--schmancy-sys-color-error-default)}.notification.hovered{box-shadow:0 10px 36px -8px color-mix(in srgb, var(--notification-glow-color) 34%, transparent), 0 1px 0 0 color-mix(in srgb, var(--schmancy-sys-color-outline-variant) 30%, transparent);transform:translateY(-2px)}.notification.hovered .accent-rail{width:4px}@media (prefers-reduced-motion:reduce){.notification{transition:box-shadow .2s}.notification.hovered{transform:none}}.accent-rail{background:var(--notification-accent,var(--schmancy-sys-color-primary-default));border-radius:4px 0 0 4px;flex-shrink:0;align-self:stretch;width:3px;transition:width .2s}.content{flex:1;min-width:0;padding:14px 36px 14px 18px}.type-tag{letter-spacing:.14em;text-transform:uppercase;opacity:.7;color:var(--notification-accent,var(--schmancy-sys-color-primary-default));margin-bottom:4px;font-family:ui-monospace,Cascadia Code,Source Code Pro,Menlo,Consolas,monospace;font-size:10px;line-height:1;display:block}.title{color:var(--schmancy-sys-color-surface-on);margin-bottom:3px;font-family:ui-serif,Georgia,Cambria,Times New Roman,serif;font-size:15px;font-weight:500;line-height:1.3}.message{opacity:.72;font-family:ui-sans-serif,system-ui,-apple-system,sans-serif;font-size:13px;line-height:1.45}.close{width:28px;height:28px;color:var(--schmancy-sys-color-surface-onVariant);cursor:pointer;opacity:.4;background:0 0;border:none;border-radius:50%;justify-content:center;align-items:center;padding:0;font-size:18px;font-weight:400;line-height:1;transition:opacity .2s;display:flex;position:absolute;top:6px;right:6px}.close:hover{opacity:.85}.close:focus-visible{opacity:1;box-shadow:0 0 0 2px var(--notification-accent,var(--schmancy-sys-color-primary-default));outline:none}.progress{position:absolute;inset:0 0 auto}")];
|
|
18
|
+
}
|
|
19
|
+
connectedCallback() {
|
|
20
|
+
super.connectedCallback(), this.style.position = "fixed", this.style.top = "16px", this.style.right = "16px", this.style.zIndex = "10001", this.style.opacity = "0", this.updateComplete.then(() => {
|
|
21
|
+
this.animateIn();
|
|
22
|
+
}), this.duration > 0 && (this.setupAutoClose(), this.setupProgressUpdates()), this.playSound && this._playSound();
|
|
23
|
+
}
|
|
24
|
+
async animateIn() {
|
|
25
|
+
let e = window.matchMedia("(prefers-reduced-motion: reduce)").matches;
|
|
26
|
+
await this.animate(e ? [{ opacity: 0 }, { opacity: 1 }] : [{
|
|
27
|
+
transform: "translateX(40px) scale(0.96)",
|
|
28
|
+
opacity: 0
|
|
29
|
+
}, {
|
|
30
|
+
transform: "translateX(0) scale(1)",
|
|
31
|
+
opacity: 1
|
|
32
|
+
}], {
|
|
33
|
+
duration: e ? 200 : 360,
|
|
34
|
+
easing: "cubic-bezier(0.22, 1, 0.36, 1)",
|
|
35
|
+
fill: "forwards"
|
|
36
|
+
}).finished;
|
|
37
|
+
}
|
|
38
|
+
setupAutoClose() {
|
|
39
|
+
this.duration <= 0 || (this.startTime = Date.now(), this.elapsedBeforePause = 0, this.paused$.pipe(p((e) => {
|
|
40
|
+
if (e) return this.pausedAt = Date.now(), this.elapsedBeforePause += this.pausedAt - this.startTime, i;
|
|
41
|
+
{
|
|
42
|
+
this.startTime = Date.now();
|
|
43
|
+
let e = this.duration - this.elapsedBeforePause;
|
|
44
|
+
return e <= 0 ? (this.close(), i) : u(e);
|
|
45
|
+
}
|
|
46
|
+
}), m(this.disconnecting)).subscribe(() => this.close()));
|
|
47
|
+
}
|
|
48
|
+
setupProgressUpdates() {
|
|
49
|
+
this.duration <= 0 || c(16).pipe(p(() => this.paused$.pipe(f((e) => {
|
|
50
|
+
if (e) return this._progress;
|
|
51
|
+
let t = this.elapsedBeforePause + (Date.now() - this.startTime);
|
|
52
|
+
return Math.max(0, this.duration - t) / this.duration * 100;
|
|
53
|
+
}))), d(), h((e) => {
|
|
54
|
+
this._progress = e;
|
|
55
|
+
}), m(this.disconnecting)).subscribe();
|
|
56
|
+
}
|
|
57
|
+
_playSound() {
|
|
58
|
+
this.dispatchEvent(new CustomEvent("playsound", {
|
|
59
|
+
detail: { type: this.type },
|
|
60
|
+
bubbles: !0,
|
|
61
|
+
composed: !0
|
|
62
|
+
}));
|
|
63
|
+
}
|
|
64
|
+
_handleMouseEnter() {
|
|
65
|
+
this._hovered = !0, this.paused$.next(!0);
|
|
66
|
+
}
|
|
67
|
+
_handleMouseLeave() {
|
|
68
|
+
this._hovered = !1, this.paused$.next(!1);
|
|
69
|
+
}
|
|
70
|
+
async close() {
|
|
71
|
+
this._closing || (this._closing = !0, this._visible = !1, await this.animate([{
|
|
72
|
+
transform: "translateX(0) scale(1)",
|
|
73
|
+
opacity: 1
|
|
74
|
+
}, {
|
|
75
|
+
transform: "translateX(20px) scale(0.98)",
|
|
76
|
+
opacity: 0
|
|
77
|
+
}], {
|
|
78
|
+
duration: 180,
|
|
79
|
+
easing: "cubic-bezier(0.4, 0, 1, 1)",
|
|
80
|
+
fill: "forwards"
|
|
81
|
+
}).finished, this.dispatchEvent(new CustomEvent("close", {
|
|
82
|
+
detail: { id: this.id },
|
|
83
|
+
bubbles: !0,
|
|
84
|
+
composed: !0
|
|
85
|
+
})));
|
|
86
|
+
}
|
|
87
|
+
_getTypeLabel() {
|
|
88
|
+
switch (this.type) {
|
|
89
|
+
case "success": return "SUCCESS";
|
|
90
|
+
case "warning": return "WARNING";
|
|
91
|
+
case "error": return "ERROR";
|
|
92
|
+
default: return "INFO";
|
|
93
|
+
}
|
|
94
|
+
}
|
|
95
|
+
render() {
|
|
96
|
+
return !this._visible && this._closing ? y`` : y`
|
|
97
|
+
<div
|
|
98
|
+
class="notification ${this.type} ${this._closing ? "closing" : ""} ${this._hovered ? "hovered" : ""}"
|
|
99
|
+
role="alert"
|
|
100
|
+
@mouseenter=${this._handleMouseEnter}
|
|
101
|
+
@mouseleave=${this._handleMouseLeave}
|
|
102
|
+
>
|
|
103
|
+
${this.showProgress || this.duration > 0 ? y`<schmancy-progress
|
|
104
|
+
class="progress"
|
|
105
|
+
size="xs"
|
|
106
|
+
.value=${this._progress}
|
|
107
|
+
?indeterminate=${this.showProgress && this.duration === 0}
|
|
108
|
+
></schmancy-progress>` : ""}
|
|
109
|
+
<div class="accent-rail"></div>
|
|
110
|
+
<div class="content">
|
|
111
|
+
<span class="type-tag">${this._getTypeLabel()}</span>
|
|
112
|
+
${this.title ? y`<div class="title">${this.title}</div>` : ""}
|
|
113
|
+
<div class="message">${this.message}</div>
|
|
114
|
+
</div>
|
|
115
|
+
${this.closable ? y`
|
|
116
|
+
<button class="close" aria-label="Close notification" @click=${this.close}>×</button>
|
|
117
|
+
` : ""}
|
|
118
|
+
</div>
|
|
119
|
+
`;
|
|
120
|
+
}
|
|
121
|
+
};
|
|
122
|
+
t([_({ type: String })], x.prototype, "title", void 0), t([_({ type: String })], x.prototype, "message", void 0), t([_({ type: String })], x.prototype, "type", void 0), t([_({ type: Boolean })], x.prototype, "closable", void 0), t([_({ type: Number })], x.prototype, "duration", void 0), t([_({ type: String })], x.prototype, "id", void 0), t([_({ type: Boolean })], x.prototype, "playSound", void 0), t([_({ type: Boolean })], x.prototype, "showProgress", void 0), t([_({ type: Object })], x.prototype, "startPosition", void 0), t([v()], x.prototype, "_visible", void 0), t([v()], x.prototype, "_progress", void 0), t([v()], x.prototype, "_hovered", void 0), t([v()], x.prototype, "_closing", void 0);
|
|
123
|
+
var S = x = t([g("sch-notification")], x), C = {
|
|
124
|
+
info: "curious",
|
|
125
|
+
success: "content",
|
|
126
|
+
warning: "anxious",
|
|
127
|
+
error: "disappointed"
|
|
128
|
+
}, w = 1500, T = 2e3, E = 2500, D = 2500;
|
|
129
|
+
n.setVolume(.1);
|
|
130
|
+
var O = {
|
|
131
|
+
x: window.innerWidth - 100,
|
|
132
|
+
y: 50
|
|
133
|
+
};
|
|
134
|
+
typeof window < "u" && s(window, "mousedown", {
|
|
135
|
+
capture: !0,
|
|
136
|
+
passive: !0
|
|
137
|
+
}).subscribe((e) => {
|
|
138
|
+
O = {
|
|
139
|
+
x: e.clientX,
|
|
140
|
+
y: e.clientY
|
|
141
|
+
};
|
|
142
|
+
});
|
|
143
|
+
var k = null, A = [];
|
|
144
|
+
function j(e) {
|
|
145
|
+
let t = e.id ?? `notification-${Date.now()}-${Math.floor(1e4 * Math.random())}`;
|
|
146
|
+
A.push(t), k &&= (k.remove(), null);
|
|
147
|
+
let r = document.createElement("sch-notification");
|
|
148
|
+
return r.id = t, r.title = e.title ?? "", r.message = e.message, r.type = e.type ?? "info", r.duration = e.duration ?? 1e3, r.closable = !1 !== e.closable, r.playSound = !1, r.showProgress = e.showProgress ?? !1, r.startPosition = { ...O }, !1 !== e.playSound && n.play(C[r.type]), s(r, "close").subscribe(() => {
|
|
149
|
+
let e = A.indexOf(t);
|
|
150
|
+
e > -1 && A.splice(e, 1), r.remove(), k === r && (k = null);
|
|
151
|
+
}), document.body.appendChild(r), k = r, t;
|
|
152
|
+
}
|
|
153
|
+
var M = {
|
|
154
|
+
show: j,
|
|
155
|
+
info: (e, t = {}) => j({
|
|
156
|
+
message: e ?? "",
|
|
157
|
+
type: "info",
|
|
158
|
+
duration: e ? t.duration ?? T : 1,
|
|
159
|
+
...t
|
|
160
|
+
}),
|
|
161
|
+
success: (e, t = {}) => j({
|
|
162
|
+
message: e ?? "",
|
|
163
|
+
type: "success",
|
|
164
|
+
duration: e ? t.duration ?? w : 1,
|
|
165
|
+
...t
|
|
166
|
+
}),
|
|
167
|
+
warning: (e, t = {}) => j({
|
|
168
|
+
message: e ?? "",
|
|
169
|
+
type: "warning",
|
|
170
|
+
duration: e ? t.duration ?? E : 1,
|
|
171
|
+
...t
|
|
172
|
+
}),
|
|
173
|
+
error: (e, t = {}) => j({
|
|
174
|
+
message: e ?? "",
|
|
175
|
+
type: "error",
|
|
176
|
+
duration: e ? t.duration ?? D : 1,
|
|
177
|
+
...t
|
|
178
|
+
}),
|
|
179
|
+
customDuration: (e, t, n = {}) => j({
|
|
180
|
+
message: e,
|
|
181
|
+
duration: t,
|
|
182
|
+
...n
|
|
183
|
+
}),
|
|
184
|
+
persistent: (e, t = {}) => j({
|
|
185
|
+
message: e,
|
|
186
|
+
duration: 0,
|
|
187
|
+
...t
|
|
188
|
+
}),
|
|
189
|
+
dismiss: (e) => {
|
|
190
|
+
let t = e ? A.splice(A.indexOf(e), 1)[0] : A.pop();
|
|
191
|
+
t && k?.id === t && k.close();
|
|
192
|
+
},
|
|
193
|
+
update: (e, t) => {
|
|
194
|
+
k?.id === e && (t.title !== void 0 && (k.title = t.title), t.message !== void 0 && (k.message = t.message), t.type !== void 0 && (k.type = t.type));
|
|
195
|
+
}
|
|
196
|
+
};
|
|
197
|
+
function N(e) {
|
|
198
|
+
return (t) => {
|
|
199
|
+
let n;
|
|
200
|
+
return e.loadingMessage && (n = M.show({
|
|
201
|
+
message: e.loadingMessage,
|
|
202
|
+
type: e.loadingType || "info",
|
|
203
|
+
duration: 0,
|
|
204
|
+
showProgress: !0
|
|
205
|
+
})), t.pipe(l((t) => {
|
|
206
|
+
if (n && typeof t == "object" && t) {
|
|
207
|
+
let r;
|
|
208
|
+
if ("progress" in t && typeof t.progress == "number") r = t.progress;
|
|
209
|
+
else if ("loaded" in t && "total" in t) {
|
|
210
|
+
let e = t.loaded, n = t.total;
|
|
211
|
+
typeof e == "number" && typeof n == "number" && n > 0 && (r = e / n * 100);
|
|
212
|
+
}
|
|
213
|
+
r !== void 0 && M.update?.(n, { message: `${e.loadingMessage} (${Math.round(r)}%)` });
|
|
214
|
+
}
|
|
215
|
+
typeof t == "object" && t && ("progress" in t || "loaded" in t && "total" in t) || (n && !1 !== e.autoDismissLoading && (M.dismiss(n), n = void 0), e.successMessage && M.show({
|
|
216
|
+
message: e.successMessage,
|
|
217
|
+
type: e.successType || "success",
|
|
218
|
+
duration: e.successDuration ?? 2e3
|
|
219
|
+
}));
|
|
220
|
+
}), a((t) => {
|
|
221
|
+
if (n && !1 !== e.autoDismissLoading && (M.dismiss(n), n = void 0), e.errorMessage) {
|
|
222
|
+
let n = typeof e.errorMessage == "function" ? e.errorMessage(t) : e.errorMessage;
|
|
223
|
+
M.show({
|
|
224
|
+
message: n,
|
|
225
|
+
type: e.errorType || "error",
|
|
226
|
+
duration: e.errorDuration ?? 3e3
|
|
227
|
+
});
|
|
228
|
+
}
|
|
229
|
+
throw t;
|
|
230
|
+
}), o(() => {
|
|
231
|
+
n && !1 !== e.autoDismissLoading && M.dismiss(n);
|
|
232
|
+
}));
|
|
233
|
+
};
|
|
234
|
+
}
|
|
235
|
+
function P(e, t, n) {
|
|
236
|
+
return N({
|
|
237
|
+
loadingMessage: e,
|
|
238
|
+
successMessage: t || void 0,
|
|
239
|
+
errorMessage: n || void 0,
|
|
240
|
+
autoDismissLoading: !0
|
|
241
|
+
});
|
|
242
|
+
}
|
|
243
|
+
export { S as i, P as n, M as r, N as t };
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"notification-CDKBKh63.js","names":[],"sources":["../src/notification/notification.scss?inline","../src/notification/notification.ts","../src/notification/notification-service.ts","../src/notification/notify.ts"],"sourcesContent":[":host {\n\tdisplay: block;\n}\n\n.notification {\n\tposition: relative;\n\tdisplay: flex;\n\talign-items: stretch;\n\tmax-width: 360px;\n\toverflow: hidden;\n\n\t/* Asymmetric radius: 4px left, 14px right */\n\tborder-radius: 4px 14px 14px 4px;\n\toutline: 1px solid color-mix(in srgb, var(--schmancy-sys-color-outline-variant) 50%, transparent);\n\n\tbackground: linear-gradient(\n\t\t180deg,\n\t\tcolor-mix(in srgb, var(--schmancy-sys-color-surface-container) 100%, transparent),\n\t\tcolor-mix(in srgb, var(--schmancy-sys-color-surface-containerHigh) 100%, transparent)\n\t);\n\n\tcolor: var(--schmancy-sys-color-surface-on);\n\n\t/* Type-colored luminous glow — tightened */\n\t--notification-glow-color: var(--schmancy-sys-color-primary-default);\n\tbox-shadow:\n\t\t0 6px 28px -10px color-mix(in srgb, var(--notification-glow-color) 22%, transparent),\n\t\t0 1px 0 0 color-mix(in srgb, var(--schmancy-sys-color-outline-variant) 30%, transparent);\n\n\ttransition:\n\t\tbox-shadow 300ms ease,\n\t\ttransform 300ms cubic-bezier(0.34, 1.56, 0.64, 1);\n\n\t&.info {\n\t\t--notification-glow-color: var(--schmancy-sys-color-primary-default);\n\t\t--notification-accent: var(--schmancy-sys-color-primary-default);\n\t}\n\t&.success {\n\t\t--notification-glow-color: var(--schmancy-sys-color-success-default);\n\t\t--notification-accent: var(--schmancy-sys-color-success-default);\n\t}\n\t&.warning {\n\t\t--notification-glow-color: var(--schmancy-sys-color-tertiary-default);\n\t\t--notification-accent: var(--schmancy-sys-color-tertiary-default);\n\t}\n\t&.error {\n\t\t--notification-glow-color: var(--schmancy-sys-color-error-default);\n\t\t--notification-accent: var(--schmancy-sys-color-error-default);\n\t}\n\n\t&.hovered {\n\t\tbox-shadow:\n\t\t\t0 10px 36px -8px color-mix(in srgb, var(--notification-glow-color) 34%, transparent),\n\t\t\t0 1px 0 0 color-mix(in srgb, var(--schmancy-sys-color-outline-variant) 30%, transparent);\n\t\ttransform: translateY(-2px);\n\n\t\t.accent-rail {\n\t\t\twidth: 4px;\n\t\t}\n\t}\n\n\t@media (prefers-reduced-motion: reduce) {\n\t\ttransition: box-shadow 200ms ease;\n\n\t\t&.hovered {\n\t\t\ttransform: none;\n\t\t}\n\t}\n}\n\n/* Vertical accent rail — left edge */\n.accent-rail {\n\tflex-shrink: 0;\n\twidth: 3px;\n\tbackground: var(--notification-accent, var(--schmancy-sys-color-primary-default));\n\tborder-radius: 4px 0 0 4px;\n\ttransition: width 200ms ease;\n\talign-self: stretch;\n}\n\n/* Card body */\n.content {\n\tflex: 1;\n\tmin-width: 0;\n\tpadding: 14px 36px 14px 18px;\n}\n\n/* Monospace uppercase type tag */\n.type-tag {\n\tdisplay: block;\n\tfont-family: ui-monospace, 'Cascadia Code', 'Source Code Pro', Menlo, Consolas, monospace;\n\tfont-size: 10px;\n\tletter-spacing: 0.14em;\n\ttext-transform: uppercase;\n\topacity: 0.7;\n\tcolor: var(--notification-accent, var(--schmancy-sys-color-primary-default));\n\tmargin-bottom: 4px;\n\tline-height: 1;\n}\n\n/* Serif display title */\n.title {\n\tfont-family: ui-serif, Georgia, Cambria, 'Times New Roman', serif;\n\tfont-weight: 500;\n\tfont-size: 15px;\n\tline-height: 1.3;\n\tmargin-bottom: 3px;\n\tcolor: var(--schmancy-sys-color-surface-on);\n}\n\n/* Body message */\n.message {\n\tfont-family: ui-sans-serif, system-ui, -apple-system, sans-serif;\n\tfont-size: 13px;\n\tline-height: 1.45;\n\topacity: 0.72;\n}\n\n/* Close button — 28×28 hit target, × glyph */\n.close {\n\tposition: absolute;\n\ttop: 6px;\n\tright: 6px;\n\twidth: 28px;\n\theight: 28px;\n\tdisplay: flex;\n\talign-items: center;\n\tjustify-content: center;\n\tbackground: none;\n\tborder: none;\n\tfont-size: 18px;\n\tfont-weight: 400;\n\tcolor: var(--schmancy-sys-color-surface-onVariant);\n\tcursor: pointer;\n\tpadding: 0;\n\tline-height: 1;\n\topacity: 0.4;\n\tborder-radius: 50%;\n\ttransition: opacity 200ms ease;\n\n\t&:hover {\n\t\topacity: 0.85;\n\t}\n\n\t&:focus-visible {\n\t\toutline: none;\n\t\topacity: 1;\n\t\tbox-shadow: 0 0 0 2px var(--notification-accent, var(--schmancy-sys-color-primary-default));\n\t}\n}\n\n/* Progress hairline — top edge */\n.progress {\n\tposition: absolute;\n\ttop: 0;\n\tbottom: auto;\n\tleft: 0;\n\tright: 0;\n}\n","import { SchmancyElement } from '@mixins/index'\nimport { html, unsafeCSS } from 'lit'\nimport { customElement, property, state } from 'lit/decorators.js'\nimport { BehaviorSubject, timer, interval, NEVER } from 'rxjs'\nimport { switchMap, takeUntil, map, tap, distinctUntilChanged } from 'rxjs/operators'\nimport '../progress/progress'\nimport style from './notification.scss?inline'\n\nexport type NotificationType = 'info' | 'success' | 'warning' | 'error'\n\n/**\n * @fires close - When notification is closed\n */\n@customElement('sch-notification')\nexport default class SchmancyNotification extends SchmancyElement {\n\tstatic styles = [unsafeCSS(style)]\n\n\t@property({ type: String }) title = ''\n\t@property({ type: String }) message = ''\n\t@property({ type: String }) type: NotificationType = 'info'\n\t@property({ type: Boolean }) closable = true\n\t@property({ type: Number }) duration = 5000\n\t@property({ type: String }) id = `notification-${Date.now()}-${Math.floor(Math.random() * 10000)}`\n\t@property({ type: Boolean }) playSound = true\n\t@property({ type: Boolean }) showProgress = false\n\t// startPosition retained for API compatibility — not used in entrance animation\n\t@property({ type: Object }) startPosition: { x: number; y: number } = { x: 0, y: 0 }\n\n\t@state() private _visible = true\n\t@state() private _progress = 100\n\t@state() private _hovered = false\n\t@state() private _closing = false\n\n\tprivate paused$ = new BehaviorSubject<boolean>(false)\n\tprivate startTime = 0\n\tprivate pausedAt = 0\n\tprivate elapsedBeforePause = 0\n\n\tconnectedCallback() {\n\t\tsuper.connectedCallback()\n\n\t\tthis.style.position = 'fixed'\n\t\tthis.style.top = '16px'\n\t\tthis.style.right = '16px'\n\t\tthis.style.zIndex = '10001'\n\t\tthis.style.opacity = '0'\n\n\t\tthis.updateComplete.then(() => {\n\t\t\tthis.animateIn()\n\t\t\treturn\n\t\t})\n\n\t\tif (this.duration > 0) {\n\t\t\tthis.setupAutoClose()\n\t\t\tthis.setupProgressUpdates()\n\t\t}\n\n\t\tif (this.playSound) {\n\t\t\tthis._playSound()\n\t\t}\n\t}\n\n\tprivate async animateIn() {\n\t\tconst reduced = window.matchMedia('(prefers-reduced-motion: reduce)').matches\n\t\tawait this.animate(\n\t\t\treduced\n\t\t\t\t? [{ opacity: 0 }, { opacity: 1 }]\n\t\t\t\t: [\n\t\t\t\t\t\t{ transform: 'translateX(40px) scale(0.96)', opacity: 0 },\n\t\t\t\t\t\t{ transform: 'translateX(0) scale(1)', opacity: 1 },\n\t\t\t\t\t],\n\t\t\t{\n\t\t\t\tduration: reduced ? 200 : 360,\n\t\t\t\teasing: 'cubic-bezier(0.22, 1, 0.36, 1)',\n\t\t\t\tfill: 'forwards',\n\t\t\t},\n\t\t).finished\n\t}\n\n\tprivate setupAutoClose() {\n\t\tif (this.duration <= 0) return\n\n\t\tthis.startTime = Date.now()\n\t\tthis.elapsedBeforePause = 0\n\n\t\tthis.paused$\n\t\t\t.pipe(\n\t\t\t\tswitchMap(paused => {\n\t\t\t\t\tif (paused) {\n\t\t\t\t\t\tthis.pausedAt = Date.now()\n\t\t\t\t\t\tthis.elapsedBeforePause += this.pausedAt - this.startTime\n\t\t\t\t\t\treturn NEVER\n\t\t\t\t\t} else {\n\t\t\t\t\t\tthis.startTime = Date.now()\n\t\t\t\t\t\tconst remaining = this.duration - this.elapsedBeforePause\n\t\t\t\t\t\tif (remaining <= 0) {\n\t\t\t\t\t\t\tthis.close()\n\t\t\t\t\t\t\treturn NEVER\n\t\t\t\t\t\t}\n\t\t\t\t\t\treturn timer(remaining)\n\t\t\t\t\t}\n\t\t\t\t}),\n\t\t\t\ttakeUntil(this.disconnecting),\n\t\t\t)\n\t\t\t.subscribe(() => this.close())\n\t}\n\n\tprivate setupProgressUpdates() {\n\t\tif (this.duration <= 0) return\n\n\t\tinterval(16)\n\t\t\t.pipe(\n\t\t\t\tswitchMap(() =>\n\t\t\t\t\tthis.paused$.pipe(\n\t\t\t\t\t\tmap(paused => {\n\t\t\t\t\t\t\tif (paused) return this._progress\n\t\t\t\t\t\t\tconst elapsed = this.elapsedBeforePause + (Date.now() - this.startTime)\n\t\t\t\t\t\t\tconst remaining = Math.max(0, this.duration - elapsed)\n\t\t\t\t\t\t\treturn (remaining / this.duration) * 100\n\t\t\t\t\t\t}),\n\t\t\t\t\t),\n\t\t\t\t),\n\t\t\t\tdistinctUntilChanged(),\n\t\t\t\ttap(progress => {\n\t\t\t\t\tthis._progress = progress\n\t\t\t\t}),\n\t\t\t\ttakeUntil(this.disconnecting),\n\t\t\t)\n\t\t\t.subscribe()\n\t}\n\n\tprivate _playSound() {\n\t\tthis.dispatchEvent(\n\t\t\tnew CustomEvent('playsound', {\n\t\t\t\tdetail: { type: this.type },\n\t\t\t\tbubbles: true,\n\t\t\t\tcomposed: true,\n\t\t\t}),\n\t\t)\n\t}\n\n\tprivate _handleMouseEnter() {\n\t\tthis._hovered = true\n\t\tthis.paused$.next(true)\n\t}\n\n\tprivate _handleMouseLeave() {\n\t\tthis._hovered = false\n\t\tthis.paused$.next(false)\n\t}\n\n\tpublic async close() {\n\t\tif (this._closing) return\n\t\tthis._closing = true\n\t\tthis._visible = false\n\n\t\tawait this.animate(\n\t\t\t[\n\t\t\t\t{ transform: 'translateX(0) scale(1)', opacity: 1 },\n\t\t\t\t{ transform: 'translateX(20px) scale(0.98)', opacity: 0 },\n\t\t\t],\n\t\t\t{\n\t\t\t\tduration: 180,\n\t\t\t\teasing: 'cubic-bezier(0.4, 0, 1, 1)',\n\t\t\t\tfill: 'forwards',\n\t\t\t},\n\t\t).finished\n\n\t\tthis.dispatchEvent(\n\t\t\tnew CustomEvent('close', {\n\t\t\t\tdetail: { id: this.id },\n\t\t\t\tbubbles: true,\n\t\t\t\tcomposed: true,\n\t\t\t}),\n\t\t)\n\t}\n\n\tprivate _getTypeLabel(): string {\n\t\tswitch (this.type) {\n\t\t\tcase 'success':\n\t\t\t\treturn 'SUCCESS'\n\t\t\tcase 'warning':\n\t\t\t\treturn 'WARNING'\n\t\t\tcase 'error':\n\t\t\t\treturn 'ERROR'\n\t\t\tdefault:\n\t\t\t\treturn 'INFO'\n\t\t}\n\t}\n\n\trender() {\n\t\tif (!this._visible && this._closing) return html``\n\n\t\treturn html`\n\t\t\t<div\n\t\t\t\tclass=\"notification ${this.type} ${this._closing ? 'closing' : ''} ${this._hovered ? 'hovered' : ''}\"\n\t\t\t\trole=\"alert\"\n\t\t\t\t@mouseenter=${this._handleMouseEnter}\n\t\t\t\t@mouseleave=${this._handleMouseLeave}\n\t\t\t>\n\t\t\t\t${this.showProgress || this.duration > 0\n\t\t\t\t\t? html`<schmancy-progress\n\t\t\t\t\t\t\tclass=\"progress\"\n\t\t\t\t\t\t\tsize=\"xs\"\n\t\t\t\t\t\t\t.value=${this._progress}\n\t\t\t\t\t\t\t?indeterminate=${this.showProgress && this.duration === 0}\n\t\t\t\t\t\t></schmancy-progress>`\n\t\t\t\t\t: ''}\n\t\t\t\t<div class=\"accent-rail\"></div>\n\t\t\t\t<div class=\"content\">\n\t\t\t\t\t<span class=\"type-tag\">${this._getTypeLabel()}</span>\n\t\t\t\t\t${this.title ? html`<div class=\"title\">${this.title}</div>` : ''}\n\t\t\t\t\t<div class=\"message\">${this.message}</div>\n\t\t\t\t</div>\n\t\t\t\t${this.closable\n\t\t\t\t\t? html`\n\t\t\t\t\t\t\t<button class=\"close\" aria-label=\"Close notification\" @click=${this.close}>×</button>\n\t\t\t\t\t\t`\n\t\t\t\t\t: ''}\n\t\t\t</div>\n\t\t`\n\t}\n}\n\ndeclare global {\n\tinterface HTMLElementTagNameMap {\n\t\t'sch-notification': SchmancyNotification\n\t}\n}\n","import { fromEvent } from 'rxjs'\nimport { $sounds, type Feeling } from '../audio'\nimport SchmancyNotification, { NotificationType } from './notification'\n\nexport interface NotificationOptions {\n\tid?: string\n\ttitle?: string\n\tmessage: string\n\ttype?: NotificationType\n\tduration?: number\n\tclosable?: boolean\n\tplaySound?: boolean\n\tshowProgress?: boolean\n}\n\nconst typeToFeeling: Record<NotificationType, Feeling> = {\n\tinfo: 'curious',\n\tsuccess: 'content',\n\twarning: 'anxious',\n\terror: 'disappointed',\n}\n\nconst typeDurations: Record<NotificationType, number> = {\n\tsuccess: 1500,\n\tinfo: 2000,\n\twarning: 2500,\n\terror: 2500,\n}\n\n$sounds.setVolume(0.1)\n\n// Track last mouse position via RxJS\nlet lastClickPosition = { x: window.innerWidth - 100, y: 50 }\nif (typeof window !== 'undefined') {\n\tfromEvent<MouseEvent>(window, 'mousedown', { capture: true, passive: true } as AddEventListenerOptions).subscribe(\n\t\te => {\n\t\t\tlastClickPosition = { x: e.clientX, y: e.clientY }\n\t\t},\n\t)\n}\n\nlet currentNotification: SchmancyNotification | null = null\nconst notificationStack: string[] = []\n\nfunction show(options: NotificationOptions): string {\n\tconst id = options.id ?? `notification-${Date.now()}-${Math.floor(Math.random() * 10000)}`\n\tnotificationStack.push(id)\n\n\tif (currentNotification) {\n\t\tcurrentNotification.remove()\n\t\tcurrentNotification = null\n\t}\n\n\tconst notification = document.createElement('sch-notification') as SchmancyNotification\n\tnotification.id = id\n\tnotification.title = options.title ?? ''\n\tnotification.message = options.message\n\tnotification.type = options.type ?? 'info'\n\tnotification.duration = options.duration ?? 1000\n\tnotification.closable = options.closable !== false\n\tnotification.playSound = false\n\tnotification.showProgress = options.showProgress ?? false\n\tnotification.startPosition = { ...lastClickPosition }\n\n\tif (options.playSound !== false) {\n\t\t$sounds.play(typeToFeeling[notification.type])\n\t}\n\n\tfromEvent(notification, 'close').subscribe(() => {\n\t\tconst index = notificationStack.indexOf(id)\n\t\tif (index > -1) notificationStack.splice(index, 1)\n\t\tnotification.remove()\n\t\tif (currentNotification === notification) currentNotification = null\n\t})\n\n\tdocument.body.appendChild(notification)\n\tcurrentNotification = notification\n\treturn id\n}\n\n/**\n * Global notification (toast) utility. Fire-and-forget API for success,\n * error, info, and warning toasts, plus a low-level `show` for custom\n * notifications.\n *\n * @service\n * @summary Toast notifications — success, error, info, warning.\n * @method show(options: NotificationOptions) - Low-level; show any NotificationOptions.\n * @method success(message, options?) - Green success toast.\n * @method error(message, options?) - Red error toast.\n * @method info(message, options?) - Blue informational toast.\n * @method warning(message, options?) - Amber warning toast.\n */\nexport const $notify = {\n\tshow,\n\n\tinfo: (message?: string, options: Partial<Omit<NotificationOptions, 'message' | 'type'>> = {}): string =>\n\t\tshow({\n\t\t\tmessage: message ?? '',\n\t\t\ttype: 'info',\n\t\t\tduration: message ? (options.duration ?? typeDurations.info) : 1,\n\t\t\t...options,\n\t\t}),\n\n\tsuccess: (message?: string, options: Partial<Omit<NotificationOptions, 'message' | 'type'>> = {}): string =>\n\t\tshow({\n\t\t\tmessage: message ?? '',\n\t\t\ttype: 'success',\n\t\t\tduration: message ? (options.duration ?? typeDurations.success) : 1,\n\t\t\t...options,\n\t\t}),\n\n\twarning: (message?: string, options: Partial<Omit<NotificationOptions, 'message' | 'type'>> = {}): string =>\n\t\tshow({\n\t\t\tmessage: message ?? '',\n\t\t\ttype: 'warning',\n\t\t\tduration: message ? (options.duration ?? typeDurations.warning) : 1,\n\t\t\t...options,\n\t\t}),\n\n\terror: (message?: string, options: Partial<Omit<NotificationOptions, 'message' | 'type'>> = {}): string =>\n\t\tshow({\n\t\t\tmessage: message ?? '',\n\t\t\ttype: 'error',\n\t\t\tduration: message ? (options.duration ?? typeDurations.error) : 1,\n\t\t\t...options,\n\t\t}),\n\n\tcustomDuration: (\n\t\tmessage: string,\n\t\tduration: number,\n\t\toptions: Partial<Omit<NotificationOptions, 'message' | 'duration'>> = {},\n\t): string => show({ message, duration, ...options }),\n\n\tpersistent: (message: string, options: Partial<Omit<NotificationOptions, 'message' | 'duration'>> = {}): string =>\n\t\tshow({ message, duration: 0, ...options }),\n\n\tdismiss: (id?: string): void => {\n\t\tconst targetId = id ? (notificationStack.splice(notificationStack.indexOf(id), 1)[0]) : notificationStack.pop()\n\t\tif (targetId && currentNotification?.id === targetId) currentNotification.close()\n\t},\n\n\tupdate: (id: string, options: Partial<NotificationOptions>): void => {\n\t\tif (currentNotification?.id !== id) return\n\t\tif (options.title !== undefined) currentNotification.title = options.title\n\t\tif (options.message !== undefined) currentNotification.message = options.message\n\t\tif (options.type !== undefined) currentNotification.type = options.type\n\t},\n}\n\n","import { Observable, tap, finalize, catchError } from 'rxjs'\r\nimport { $notify, NotificationOptions } from './notification-service'\r\n\r\nexport interface NotifyOptions {\r\n\t/**\r\n\t * Message to show while the operation is in progress\r\n\t */\r\n\tloadingMessage?: string\r\n\t/**\r\n\t * Message to show when the operation completes successfully\r\n\t */\r\n\tsuccessMessage?: string\r\n\t/**\r\n\t * Message to show when the operation fails (can be a function to format error)\r\n\t */\r\n\terrorMessage?: string | ((error: any) => string)\r\n\t/**\r\n\t * Type of notification for loading state\r\n\t */\r\n\tloadingType?: NotificationOptions['type']\r\n\t/**\r\n\t * Type of notification for success state\r\n\t */\r\n\tsuccessType?: NotificationOptions['type']\r\n\t/**\r\n\t * Type of notification for error state\r\n\t */\r\n\terrorType?: NotificationOptions['type']\r\n\t/**\r\n\t * Whether to auto-dismiss the loading notification on complete/error\r\n\t */\r\n\tautoDismissLoading?: boolean\r\n\t/**\r\n\t * Duration for success notification (ms). Use 0 for persistent\r\n\t */\r\n\tsuccessDuration?: number\r\n\t/**\r\n\t * Duration for error notification (ms). Use 0 for persistent\r\n\t */\r\n\terrorDuration?: number\r\n}\r\n\r\n/**\r\n * Wraps an Observable with notification lifecycle management.\r\n * Shows a loading notification with progress indicator, then auto-dismisses and shows success/error notification.\r\n * \r\n * @example\r\n * ```typescript\r\n * // Basic usage with progress indicator\r\n * someApiCall().pipe(\r\n * notify({\r\n * loadingMessage: 'Loading data...',\r\n * successMessage: 'Data loaded successfully!',\r\n * errorMessage: 'Failed to load data'\r\n * })\r\n * ).subscribe()\r\n * \r\n * // With custom durations\r\n * saveData().pipe(\r\n * notify({\r\n * loadingMessage: 'Saving...',\r\n * successMessage: 'Saved!',\r\n * successDuration: 5000, // Success stays for 5 seconds\r\n * errorMessage: (err) => `Save failed: ${err.message}`,\r\n * errorDuration: 0 // Error is persistent until dismissed\r\n * })\r\n * ).subscribe()\r\n * \r\n * // Full configuration example\r\n * uploadFile().pipe(\r\n * notify({\r\n * loadingMessage: 'Uploading file...',\r\n * loadingType: 'info',\r\n * successMessage: 'Upload complete!',\r\n * successType: 'success',\r\n * successDuration: 3000,\r\n * errorMessage: (err) => `Upload failed: ${err.message}`,\r\n * errorType: 'error',\r\n * errorDuration: 10000,\r\n * autoDismissLoading: true\r\n * })\r\n * ).subscribe()\r\n * ```\r\n */\r\nexport function notify<T>(options: NotifyOptions) {\r\n\treturn (source: Observable<T>): Observable<T> => {\r\n\t\tlet loadingNotificationId: string | undefined\r\n\r\n\t\t// Show loading notification if message provided\r\n\t\tif (options.loadingMessage) {\r\n\t\t\tloadingNotificationId = $notify.show({\r\n\t\t\t\tmessage: options.loadingMessage,\r\n\t\t\t\ttype: options.loadingType || 'info',\r\n\t\t\t\tduration: 0, // Persistent until dismissed\r\n\t\t\t\tshowProgress: true, // Show indeterminate progress by default\r\n\t\t\t})\r\n\t\t}\r\n\r\n\t\treturn source.pipe(\r\n\t\t\ttap((value) => {\r\n\t\t\t\t// Check if the emitted value contains progress information\r\n\t\t\t\t// Common patterns: { progress: number }, { loaded: number, total: number }, etc.\r\n\t\t\t\tif (loadingNotificationId && typeof value === 'object' && value !== null) {\r\n\t\t\t\t\tlet progress: number | undefined\r\n\t\t\t\t\t\r\n\t\t\t\t\t// Check for different progress patterns\r\n\t\t\t\t\tif ('progress' in value && typeof (value as any).progress === 'number') {\r\n\t\t\t\t\t\tprogress = (value as any).progress\r\n\t\t\t\t\t} else if ('loaded' in value && 'total' in value) {\r\n\t\t\t\t\t\tconst loaded = (value as any).loaded\r\n\t\t\t\t\t\tconst total = (value as any).total\r\n\t\t\t\t\t\tif (typeof loaded === 'number' && typeof total === 'number' && total > 0) {\r\n\t\t\t\t\t\t\tprogress = (loaded / total) * 100\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t}\r\n\t\t\t\t\t\r\n\t\t\t\t\t// Update notification with progress if available\r\n\t\t\t\t\tif (progress !== undefined) {\r\n\t\t\t\t\t\t// We need to update the progress of the notification\r\n\t\t\t\t\t\t// For now, we'll update the message to show progress percentage\r\n\t\t\t\t\t\t$notify.update?.(loadingNotificationId, {\r\n\t\t\t\t\t\t\tmessage: `${options.loadingMessage} (${Math.round(progress)}%)`,\r\n\t\t\t\t\t\t})\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\t\t\t\t\r\n\t\t\t\t// Check if this is the final success emission (not a progress update)\r\n\t\t\t\t// Typically file uploads emit progress events then a final result\r\n\t\t\t\tconst isProgressUpdate = typeof value === 'object' && value !== null && \r\n\t\t\t\t\t('progress' in value || ('loaded' in value && 'total' in value))\r\n\t\t\t\t\r\n\t\t\t\tif (!isProgressUpdate) {\r\n\t\t\t\t\t// On successful final emission, dismiss loading and show success\r\n\t\t\t\t\tif (loadingNotificationId && options.autoDismissLoading !== false) {\r\n\t\t\t\t\t\t$notify.dismiss(loadingNotificationId)\r\n\t\t\t\t\t\tloadingNotificationId = undefined\r\n\t\t\t\t\t}\r\n\r\n\t\t\t\t\tif (options.successMessage) {\r\n\t\t\t\t\t\t$notify.show({\r\n\t\t\t\t\t\t\tmessage: options.successMessage,\r\n\t\t\t\t\t\t\ttype: options.successType || 'success',\r\n\t\t\t\t\t\t\tduration: options.successDuration ?? 2000,\r\n\t\t\t\t\t\t})\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\t\t\t}),\r\n\t\t\tcatchError((error) => {\r\n\t\t\t\t// On error, dismiss loading and show error\r\n\t\t\t\tif (loadingNotificationId && options.autoDismissLoading !== false) {\r\n\t\t\t\t\t$notify.dismiss(loadingNotificationId)\r\n\t\t\t\t\tloadingNotificationId = undefined\r\n\t\t\t\t}\r\n\r\n\t\t\t\tif (options.errorMessage) {\r\n\t\t\t\t\tconst message = typeof options.errorMessage === 'function' \r\n\t\t\t\t\t\t? options.errorMessage(error)\r\n\t\t\t\t\t\t: options.errorMessage\r\n\t\t\t\t\t\r\n\t\t\t\t\t$notify.show({\r\n\t\t\t\t\t\tmessage,\r\n\t\t\t\t\t\ttype: options.errorType || 'error',\r\n\t\t\t\t\t\tduration: options.errorDuration ?? 3000,\r\n\t\t\t\t\t})\r\n\t\t\t\t}\r\n\r\n\t\t\t\t// Re-throw the error to maintain the error flow\r\n\t\t\t\tthrow error\r\n\t\t\t}),\r\n\t\t\tfinalize(() => {\r\n\t\t\t\t// Clean up any remaining loading notification\r\n\t\t\t\tif (loadingNotificationId && options.autoDismissLoading !== false) {\r\n\t\t\t\t\t$notify.dismiss(loadingNotificationId)\r\n\t\t\t\t}\r\n\t\t\t})\r\n\t\t)\r\n\t}\r\n}\r\n\r\n/**\r\n * Simplified version for API calls that just need loading and auto-dismiss.\r\n * Perfect for fire-and-forget operations where you want to show progress.\r\n * \r\n * @example\r\n * ```typescript\r\n * downloadData().pipe(\r\n * notifyProgress('Downloading...')\r\n * ).subscribe()\r\n * \r\n * // With custom messages\r\n * saveDocument().pipe(\r\n * notifyProgress('Saving document...', 'Document saved!', 'Save failed')\r\n * ).subscribe()\r\n * ```\r\n */\r\nexport function notifyProgress<T>(\r\n\tloadingMessage: string,\r\n\tsuccessMessage?: string,\r\n\terrorMessage?: string\r\n) {\r\n\treturn notify<T>({\r\n\t\tloadingMessage,\r\n\t\tsuccessMessage: successMessage || undefined,\r\n\t\terrorMessage: errorMessage || undefined,\r\n\t\tautoDismissLoading: true,\r\n\t})\r\n}"],"mappings":";;;;;;;;ICce,IAAA,cAAmC,EAAA;CAAA,YAAA,GAAA,GAAA;EAAA,MAAA,GAAA,EAAA,EAAA,KAAA,QAGb,IAAA,KAAA,UACE,IAAA,KAAA,OACe,QAAA,KAAA,WAAA,CACb,GAAA,KAAA,WACD,KAAA,KAAA,KACN,gBAAgB,KAAK,KAAA,CAAA,GAAS,KAAK,MAAsB,MAAhB,KAAK,QAAA,CAAA,IAAA,KAAA,YAAA,CACtC,GAAA,KAAA,eAAA,CACG,GAAA,KAAA,gBAE0B;GAAE,GAAG;GAAG,GAAG;GAAA,EAAA,KAAA,WA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ACzB,IAAM,IAA0C,OAAzB,EAAQ,gBAAiB,aAC7C,EAAQ,aAAa,EAAA,GACrB,EAAQ;IAEX,EAAQ,KAAK;KACZ,SAAA;KACA,MAAM,EAAQ,aAAa;KAC3B,UAAU,EAAQ,iBAAiB;KAAA,CAAA;;GAKrC,MAAM;IAAA,EAEP,QAAA;GAEK,KAAA,CAAwD,MAA/B,EAAQ,sBACpC,EAAQ,QAAQ,EAAA;IAAA,CAAA;;;AAuBrB,SAAgB,EACf,GACA,GACA,GAAA;CAEA,OAAO,EAAU;EAChB,gBAAA;EACA,gBAAgB,KAAA,KAAkB;EAClC,cAAc,KAAA,KAAgB;EAC9B,oBAAA,CAAoB;EAAA,CAAA;;AAAA,SAAA,KAAA,GAAA,KAAA,GAAA,KAAA,GAAA,KAAA"}
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
require(`./chunk-CncqDLb2.cjs`);const e=require(`./mixins-BF3Vj8_c.cjs`),t=require(`./active-host-jH3iloCR.cjs`),n=require(`./audio-Cvmemu84.cjs`);require(`./progress-6_rb3Ah9.cjs`);let r=require(`rxjs`),i=require(`rxjs/operators`),a=require(`lit/decorators.js`),o=require(`lit`);var s=class extends e.c{constructor(...e){super(...e),this.title=``,this.message=``,this.type=`info`,this.closable=!0,this.duration=5e3,this.id=`notification-${Date.now()}-${Math.floor(1e4*Math.random())}`,this.playSound=!0,this.showProgress=!1,this.startPosition={x:0,y:0},this._visible=!0,this._progress=100,this._hovered=!1,this._closing=!1,this.paused$=new r.BehaviorSubject(!1),this.startTime=0,this.pausedAt=0,this.elapsedBeforePause=0}static{this.styles=[(0,o.unsafeCSS)(`:host{display:block}.notification{outline:1px solid color-mix(in srgb, var(--schmancy-sys-color-outline-variant) 50%, transparent);background:linear-gradient(180deg, color-mix(in srgb, var(--schmancy-sys-color-surface-container) 100%, transparent), color-mix(in srgb, var(--schmancy-sys-color-surface-containerHigh) 100%, transparent));max-width:360px;color:var(--schmancy-sys-color-surface-on);--notification-glow-color:var(--schmancy-sys-color-primary-default);box-shadow:0 6px 28px -10px color-mix(in srgb, var(--notification-glow-color) 22%, transparent), 0 1px 0 0 color-mix(in srgb, var(--schmancy-sys-color-outline-variant) 30%, transparent);border-radius:4px 14px 14px 4px;align-items:stretch;transition:box-shadow .3s,transform .3s cubic-bezier(.34,1.56,.64,1);display:flex;position:relative;overflow:hidden}.notification.info{--notification-glow-color:var(--schmancy-sys-color-primary-default);--notification-accent:var(--schmancy-sys-color-primary-default)}.notification.success{--notification-glow-color:var(--schmancy-sys-color-success-default);--notification-accent:var(--schmancy-sys-color-success-default)}.notification.warning{--notification-glow-color:var(--schmancy-sys-color-tertiary-default);--notification-accent:var(--schmancy-sys-color-tertiary-default)}.notification.error{--notification-glow-color:var(--schmancy-sys-color-error-default);--notification-accent:var(--schmancy-sys-color-error-default)}.notification.hovered{box-shadow:0 10px 36px -8px color-mix(in srgb, var(--notification-glow-color) 34%, transparent), 0 1px 0 0 color-mix(in srgb, var(--schmancy-sys-color-outline-variant) 30%, transparent);transform:translateY(-2px)}.notification.hovered .accent-rail{width:4px}@media (prefers-reduced-motion:reduce){.notification{transition:box-shadow .2s}.notification.hovered{transform:none}}.accent-rail{background:var(--notification-accent,var(--schmancy-sys-color-primary-default));border-radius:4px 0 0 4px;flex-shrink:0;align-self:stretch;width:3px;transition:width .2s}.content{flex:1;min-width:0;padding:14px 36px 14px 18px}.type-tag{letter-spacing:.14em;text-transform:uppercase;opacity:.7;color:var(--notification-accent,var(--schmancy-sys-color-primary-default));margin-bottom:4px;font-family:ui-monospace,Cascadia Code,Source Code Pro,Menlo,Consolas,monospace;font-size:10px;line-height:1;display:block}.title{color:var(--schmancy-sys-color-surface-on);margin-bottom:3px;font-family:ui-serif,Georgia,Cambria,Times New Roman,serif;font-size:15px;font-weight:500;line-height:1.3}.message{opacity:.72;font-family:ui-sans-serif,system-ui,-apple-system,sans-serif;font-size:13px;line-height:1.45}.close{width:28px;height:28px;color:var(--schmancy-sys-color-surface-onVariant);cursor:pointer;opacity:.4;background:0 0;border:none;border-radius:50%;justify-content:center;align-items:center;padding:0;font-size:18px;font-weight:400;line-height:1;transition:opacity .2s;display:flex;position:absolute;top:6px;right:6px}.close:hover{opacity:.85}.close:focus-visible{opacity:1;box-shadow:0 0 0 2px var(--notification-accent,var(--schmancy-sys-color-primary-default));outline:none}.progress{position:absolute;inset:0 0 auto}`)]}connectedCallback(){super.connectedCallback(),this.style.position=`fixed`,this.style.top=`16px`,this.style.right=`16px`,this.style.zIndex=`10001`,this.style.opacity=`0`,this.updateComplete.then(()=>{this.animateIn()}),this.duration>0&&(this.setupAutoClose(),this.setupProgressUpdates()),this.playSound&&this._playSound()}async animateIn(){let e=window.matchMedia(`(prefers-reduced-motion: reduce)`).matches;await this.animate(e?[{opacity:0},{opacity:1}]:[{transform:`translateX(40px) scale(0.96)`,opacity:0},{transform:`translateX(0) scale(1)`,opacity:1}],{duration:e?200:360,easing:`cubic-bezier(0.22, 1, 0.36, 1)`,fill:`forwards`}).finished}setupAutoClose(){this.duration<=0||(this.startTime=Date.now(),this.elapsedBeforePause=0,this.paused$.pipe((0,i.switchMap)(e=>{if(e)return this.pausedAt=Date.now(),this.elapsedBeforePause+=this.pausedAt-this.startTime,r.NEVER;{this.startTime=Date.now();let e=this.duration-this.elapsedBeforePause;return e<=0?(this.close(),r.NEVER):(0,r.timer)(e)}}),(0,i.takeUntil)(this.disconnecting)).subscribe(()=>this.close()))}setupProgressUpdates(){this.duration<=0||(0,r.interval)(16).pipe((0,i.switchMap)(()=>this.paused$.pipe((0,i.map)(e=>{if(e)return this._progress;let t=this.elapsedBeforePause+(Date.now()-this.startTime);return Math.max(0,this.duration-t)/this.duration*100}))),(0,i.distinctUntilChanged)(),(0,i.tap)(e=>{this._progress=e}),(0,i.takeUntil)(this.disconnecting)).subscribe()}_playSound(){this.dispatchEvent(new CustomEvent(`playsound`,{detail:{type:this.type},bubbles:!0,composed:!0}))}_handleMouseEnter(){this._hovered=!0,this.paused$.next(!0)}_handleMouseLeave(){this._hovered=!1,this.paused$.next(!1)}async close(){this._closing||(this._closing=!0,this._visible=!1,await this.animate([{transform:`translateX(0) scale(1)`,opacity:1},{transform:`translateX(20px) scale(0.98)`,opacity:0}],{duration:180,easing:`cubic-bezier(0.4, 0, 1, 1)`,fill:`forwards`}).finished,this.dispatchEvent(new CustomEvent(`close`,{detail:{id:this.id},bubbles:!0,composed:!0})))}_getTypeLabel(){switch(this.type){case`success`:return`SUCCESS`;case`warning`:return`WARNING`;case`error`:return`ERROR`;default:return`INFO`}}render(){return!this._visible&&this._closing?o.html``:o.html`
|
|
2
|
+
<div
|
|
3
|
+
class="notification ${this.type} ${this._closing?`closing`:``} ${this._hovered?`hovered`:``}"
|
|
4
|
+
role="alert"
|
|
5
|
+
@mouseenter=${this._handleMouseEnter}
|
|
6
|
+
@mouseleave=${this._handleMouseLeave}
|
|
7
|
+
>
|
|
8
|
+
${this.showProgress||this.duration>0?o.html`<schmancy-progress
|
|
9
|
+
class="progress"
|
|
10
|
+
size="xs"
|
|
11
|
+
.value=${this._progress}
|
|
12
|
+
?indeterminate=${this.showProgress&&this.duration===0}
|
|
13
|
+
></schmancy-progress>`:``}
|
|
14
|
+
<div class="accent-rail"></div>
|
|
15
|
+
<div class="content">
|
|
16
|
+
<span class="type-tag">${this._getTypeLabel()}</span>
|
|
17
|
+
${this.title?o.html`<div class="title">${this.title}</div>`:``}
|
|
18
|
+
<div class="message">${this.message}</div>
|
|
19
|
+
</div>
|
|
20
|
+
${this.closable?o.html`
|
|
21
|
+
<button class="close" aria-label="Close notification" @click=${this.close}>×</button>
|
|
22
|
+
`:``}
|
|
23
|
+
</div>
|
|
24
|
+
`}};t.a([(0,a.property)({type:String})],s.prototype,`title`,void 0),t.a([(0,a.property)({type:String})],s.prototype,`message`,void 0),t.a([(0,a.property)({type:String})],s.prototype,`type`,void 0),t.a([(0,a.property)({type:Boolean})],s.prototype,`closable`,void 0),t.a([(0,a.property)({type:Number})],s.prototype,`duration`,void 0),t.a([(0,a.property)({type:String})],s.prototype,`id`,void 0),t.a([(0,a.property)({type:Boolean})],s.prototype,`playSound`,void 0),t.a([(0,a.property)({type:Boolean})],s.prototype,`showProgress`,void 0),t.a([(0,a.property)({type:Object})],s.prototype,`startPosition`,void 0),t.a([(0,a.state)()],s.prototype,`_visible`,void 0),t.a([(0,a.state)()],s.prototype,`_progress`,void 0),t.a([(0,a.state)()],s.prototype,`_hovered`,void 0),t.a([(0,a.state)()],s.prototype,`_closing`,void 0);var c=s=t.a([(0,a.customElement)(`sch-notification`)],s),l={info:`curious`,success:`content`,warning:`anxious`,error:`disappointed`},u=1500,d=2e3,f=2500,p=2500;n.t.setVolume(.1);var m={x:window.innerWidth-100,y:50};typeof window<`u`&&(0,r.fromEvent)(window,`mousedown`,{capture:!0,passive:!0}).subscribe(e=>{m={x:e.clientX,y:e.clientY}});var h=null,g=[];function _(e){let t=e.id??`notification-${Date.now()}-${Math.floor(1e4*Math.random())}`;g.push(t),h&&=(h.remove(),null);let i=document.createElement(`sch-notification`);return i.id=t,i.title=e.title??``,i.message=e.message,i.type=e.type??`info`,i.duration=e.duration??1e3,i.closable=!1!==e.closable,i.playSound=!1,i.showProgress=e.showProgress??!1,i.startPosition={...m},!1!==e.playSound&&n.t.play(l[i.type]),(0,r.fromEvent)(i,`close`).subscribe(()=>{let e=g.indexOf(t);e>-1&&g.splice(e,1),i.remove(),h===i&&(h=null)}),document.body.appendChild(i),h=i,t}var v={show:_,info:(e,t={})=>_({message:e??``,type:`info`,duration:e?t.duration??d:1,...t}),success:(e,t={})=>_({message:e??``,type:`success`,duration:e?t.duration??u:1,...t}),warning:(e,t={})=>_({message:e??``,type:`warning`,duration:e?t.duration??f:1,...t}),error:(e,t={})=>_({message:e??``,type:`error`,duration:e?t.duration??p:1,...t}),customDuration:(e,t,n={})=>_({message:e,duration:t,...n}),persistent:(e,t={})=>_({message:e,duration:0,...t}),dismiss:e=>{let t=e?g.splice(g.indexOf(e),1)[0]:g.pop();t&&h?.id===t&&h.close()},update:(e,t)=>{h?.id===e&&(t.title!==void 0&&(h.title=t.title),t.message!==void 0&&(h.message=t.message),t.type!==void 0&&(h.type=t.type))}};function y(e){return t=>{let n;return e.loadingMessage&&(n=v.show({message:e.loadingMessage,type:e.loadingType||`info`,duration:0,showProgress:!0})),t.pipe((0,r.tap)(t=>{if(n&&typeof t==`object`&&t){let r;if(`progress`in t&&typeof t.progress==`number`)r=t.progress;else if(`loaded`in t&&`total`in t){let e=t.loaded,n=t.total;typeof e==`number`&&typeof n==`number`&&n>0&&(r=e/n*100)}r!==void 0&&v.update?.(n,{message:`${e.loadingMessage} (${Math.round(r)}%)`})}typeof t==`object`&&t&&(`progress`in t||`loaded`in t&&`total`in t)||(n&&!1!==e.autoDismissLoading&&(v.dismiss(n),n=void 0),e.successMessage&&v.show({message:e.successMessage,type:e.successType||`success`,duration:e.successDuration??2e3}))}),(0,r.catchError)(t=>{if(n&&!1!==e.autoDismissLoading&&(v.dismiss(n),n=void 0),e.errorMessage){let n=typeof e.errorMessage==`function`?e.errorMessage(t):e.errorMessage;v.show({message:n,type:e.errorType||`error`,duration:e.errorDuration??3e3})}throw t}),(0,r.finalize)(()=>{n&&!1!==e.autoDismissLoading&&v.dismiss(n)}))}}function b(e,t,n){return y({loadingMessage:e,successMessage:t||void 0,errorMessage:n||void 0,autoDismissLoading:!0})}Object.defineProperty(exports,`i`,{enumerable:!0,get:function(){return c}}),Object.defineProperty(exports,`n`,{enumerable:!0,get:function(){return b}}),Object.defineProperty(exports,`r`,{enumerable:!0,get:function(){return v}}),Object.defineProperty(exports,`t`,{enumerable:!0,get:function(){return y}});
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"notification-CcNoBFEJ.cjs","names":[],"sources":["../src/notification/notification.scss?inline","../src/notification/notification.ts","../src/notification/notification-service.ts","../src/notification/notify.ts"],"sourcesContent":[":host {\n\tdisplay: block;\n}\n\n.notification {\n\tposition: relative;\n\tdisplay: flex;\n\talign-items: stretch;\n\tmax-width: 360px;\n\toverflow: hidden;\n\n\t/* Asymmetric radius: 4px left, 14px right */\n\tborder-radius: 4px 14px 14px 4px;\n\toutline: 1px solid color-mix(in srgb, var(--schmancy-sys-color-outline-variant) 50%, transparent);\n\n\tbackground: linear-gradient(\n\t\t180deg,\n\t\tcolor-mix(in srgb, var(--schmancy-sys-color-surface-container) 100%, transparent),\n\t\tcolor-mix(in srgb, var(--schmancy-sys-color-surface-containerHigh) 100%, transparent)\n\t);\n\n\tcolor: var(--schmancy-sys-color-surface-on);\n\n\t/* Type-colored luminous glow — tightened */\n\t--notification-glow-color: var(--schmancy-sys-color-primary-default);\n\tbox-shadow:\n\t\t0 6px 28px -10px color-mix(in srgb, var(--notification-glow-color) 22%, transparent),\n\t\t0 1px 0 0 color-mix(in srgb, var(--schmancy-sys-color-outline-variant) 30%, transparent);\n\n\ttransition:\n\t\tbox-shadow 300ms ease,\n\t\ttransform 300ms cubic-bezier(0.34, 1.56, 0.64, 1);\n\n\t&.info {\n\t\t--notification-glow-color: var(--schmancy-sys-color-primary-default);\n\t\t--notification-accent: var(--schmancy-sys-color-primary-default);\n\t}\n\t&.success {\n\t\t--notification-glow-color: var(--schmancy-sys-color-success-default);\n\t\t--notification-accent: var(--schmancy-sys-color-success-default);\n\t}\n\t&.warning {\n\t\t--notification-glow-color: var(--schmancy-sys-color-tertiary-default);\n\t\t--notification-accent: var(--schmancy-sys-color-tertiary-default);\n\t}\n\t&.error {\n\t\t--notification-glow-color: var(--schmancy-sys-color-error-default);\n\t\t--notification-accent: var(--schmancy-sys-color-error-default);\n\t}\n\n\t&.hovered {\n\t\tbox-shadow:\n\t\t\t0 10px 36px -8px color-mix(in srgb, var(--notification-glow-color) 34%, transparent),\n\t\t\t0 1px 0 0 color-mix(in srgb, var(--schmancy-sys-color-outline-variant) 30%, transparent);\n\t\ttransform: translateY(-2px);\n\n\t\t.accent-rail {\n\t\t\twidth: 4px;\n\t\t}\n\t}\n\n\t@media (prefers-reduced-motion: reduce) {\n\t\ttransition: box-shadow 200ms ease;\n\n\t\t&.hovered {\n\t\t\ttransform: none;\n\t\t}\n\t}\n}\n\n/* Vertical accent rail — left edge */\n.accent-rail {\n\tflex-shrink: 0;\n\twidth: 3px;\n\tbackground: var(--notification-accent, var(--schmancy-sys-color-primary-default));\n\tborder-radius: 4px 0 0 4px;\n\ttransition: width 200ms ease;\n\talign-self: stretch;\n}\n\n/* Card body */\n.content {\n\tflex: 1;\n\tmin-width: 0;\n\tpadding: 14px 36px 14px 18px;\n}\n\n/* Monospace uppercase type tag */\n.type-tag {\n\tdisplay: block;\n\tfont-family: ui-monospace, 'Cascadia Code', 'Source Code Pro', Menlo, Consolas, monospace;\n\tfont-size: 10px;\n\tletter-spacing: 0.14em;\n\ttext-transform: uppercase;\n\topacity: 0.7;\n\tcolor: var(--notification-accent, var(--schmancy-sys-color-primary-default));\n\tmargin-bottom: 4px;\n\tline-height: 1;\n}\n\n/* Serif display title */\n.title {\n\tfont-family: ui-serif, Georgia, Cambria, 'Times New Roman', serif;\n\tfont-weight: 500;\n\tfont-size: 15px;\n\tline-height: 1.3;\n\tmargin-bottom: 3px;\n\tcolor: var(--schmancy-sys-color-surface-on);\n}\n\n/* Body message */\n.message {\n\tfont-family: ui-sans-serif, system-ui, -apple-system, sans-serif;\n\tfont-size: 13px;\n\tline-height: 1.45;\n\topacity: 0.72;\n}\n\n/* Close button — 28×28 hit target, × glyph */\n.close {\n\tposition: absolute;\n\ttop: 6px;\n\tright: 6px;\n\twidth: 28px;\n\theight: 28px;\n\tdisplay: flex;\n\talign-items: center;\n\tjustify-content: center;\n\tbackground: none;\n\tborder: none;\n\tfont-size: 18px;\n\tfont-weight: 400;\n\tcolor: var(--schmancy-sys-color-surface-onVariant);\n\tcursor: pointer;\n\tpadding: 0;\n\tline-height: 1;\n\topacity: 0.4;\n\tborder-radius: 50%;\n\ttransition: opacity 200ms ease;\n\n\t&:hover {\n\t\topacity: 0.85;\n\t}\n\n\t&:focus-visible {\n\t\toutline: none;\n\t\topacity: 1;\n\t\tbox-shadow: 0 0 0 2px var(--notification-accent, var(--schmancy-sys-color-primary-default));\n\t}\n}\n\n/* Progress hairline — top edge */\n.progress {\n\tposition: absolute;\n\ttop: 0;\n\tbottom: auto;\n\tleft: 0;\n\tright: 0;\n}\n","import { SchmancyElement } from '@mixins/index'\nimport { html, unsafeCSS } from 'lit'\nimport { customElement, property, state } from 'lit/decorators.js'\nimport { BehaviorSubject, timer, interval, NEVER } from 'rxjs'\nimport { switchMap, takeUntil, map, tap, distinctUntilChanged } from 'rxjs/operators'\nimport '../progress/progress'\nimport style from './notification.scss?inline'\n\nexport type NotificationType = 'info' | 'success' | 'warning' | 'error'\n\n/**\n * @fires close - When notification is closed\n */\n@customElement('sch-notification')\nexport default class SchmancyNotification extends SchmancyElement {\n\tstatic styles = [unsafeCSS(style)]\n\n\t@property({ type: String }) title = ''\n\t@property({ type: String }) message = ''\n\t@property({ type: String }) type: NotificationType = 'info'\n\t@property({ type: Boolean }) closable = true\n\t@property({ type: Number }) duration = 5000\n\t@property({ type: String }) id = `notification-${Date.now()}-${Math.floor(Math.random() * 10000)}`\n\t@property({ type: Boolean }) playSound = true\n\t@property({ type: Boolean }) showProgress = false\n\t// startPosition retained for API compatibility — not used in entrance animation\n\t@property({ type: Object }) startPosition: { x: number; y: number } = { x: 0, y: 0 }\n\n\t@state() private _visible = true\n\t@state() private _progress = 100\n\t@state() private _hovered = false\n\t@state() private _closing = false\n\n\tprivate paused$ = new BehaviorSubject<boolean>(false)\n\tprivate startTime = 0\n\tprivate pausedAt = 0\n\tprivate elapsedBeforePause = 0\n\n\tconnectedCallback() {\n\t\tsuper.connectedCallback()\n\n\t\tthis.style.position = 'fixed'\n\t\tthis.style.top = '16px'\n\t\tthis.style.right = '16px'\n\t\tthis.style.zIndex = '10001'\n\t\tthis.style.opacity = '0'\n\n\t\tthis.updateComplete.then(() => {\n\t\t\tthis.animateIn()\n\t\t\treturn\n\t\t})\n\n\t\tif (this.duration > 0) {\n\t\t\tthis.setupAutoClose()\n\t\t\tthis.setupProgressUpdates()\n\t\t}\n\n\t\tif (this.playSound) {\n\t\t\tthis._playSound()\n\t\t}\n\t}\n\n\tprivate async animateIn() {\n\t\tconst reduced = window.matchMedia('(prefers-reduced-motion: reduce)').matches\n\t\tawait this.animate(\n\t\t\treduced\n\t\t\t\t? [{ opacity: 0 }, { opacity: 1 }]\n\t\t\t\t: [\n\t\t\t\t\t\t{ transform: 'translateX(40px) scale(0.96)', opacity: 0 },\n\t\t\t\t\t\t{ transform: 'translateX(0) scale(1)', opacity: 1 },\n\t\t\t\t\t],\n\t\t\t{\n\t\t\t\tduration: reduced ? 200 : 360,\n\t\t\t\teasing: 'cubic-bezier(0.22, 1, 0.36, 1)',\n\t\t\t\tfill: 'forwards',\n\t\t\t},\n\t\t).finished\n\t}\n\n\tprivate setupAutoClose() {\n\t\tif (this.duration <= 0) return\n\n\t\tthis.startTime = Date.now()\n\t\tthis.elapsedBeforePause = 0\n\n\t\tthis.paused$\n\t\t\t.pipe(\n\t\t\t\tswitchMap(paused => {\n\t\t\t\t\tif (paused) {\n\t\t\t\t\t\tthis.pausedAt = Date.now()\n\t\t\t\t\t\tthis.elapsedBeforePause += this.pausedAt - this.startTime\n\t\t\t\t\t\treturn NEVER\n\t\t\t\t\t} else {\n\t\t\t\t\t\tthis.startTime = Date.now()\n\t\t\t\t\t\tconst remaining = this.duration - this.elapsedBeforePause\n\t\t\t\t\t\tif (remaining <= 0) {\n\t\t\t\t\t\t\tthis.close()\n\t\t\t\t\t\t\treturn NEVER\n\t\t\t\t\t\t}\n\t\t\t\t\t\treturn timer(remaining)\n\t\t\t\t\t}\n\t\t\t\t}),\n\t\t\t\ttakeUntil(this.disconnecting),\n\t\t\t)\n\t\t\t.subscribe(() => this.close())\n\t}\n\n\tprivate setupProgressUpdates() {\n\t\tif (this.duration <= 0) return\n\n\t\tinterval(16)\n\t\t\t.pipe(\n\t\t\t\tswitchMap(() =>\n\t\t\t\t\tthis.paused$.pipe(\n\t\t\t\t\t\tmap(paused => {\n\t\t\t\t\t\t\tif (paused) return this._progress\n\t\t\t\t\t\t\tconst elapsed = this.elapsedBeforePause + (Date.now() - this.startTime)\n\t\t\t\t\t\t\tconst remaining = Math.max(0, this.duration - elapsed)\n\t\t\t\t\t\t\treturn (remaining / this.duration) * 100\n\t\t\t\t\t\t}),\n\t\t\t\t\t),\n\t\t\t\t),\n\t\t\t\tdistinctUntilChanged(),\n\t\t\t\ttap(progress => {\n\t\t\t\t\tthis._progress = progress\n\t\t\t\t}),\n\t\t\t\ttakeUntil(this.disconnecting),\n\t\t\t)\n\t\t\t.subscribe()\n\t}\n\n\tprivate _playSound() {\n\t\tthis.dispatchEvent(\n\t\t\tnew CustomEvent('playsound', {\n\t\t\t\tdetail: { type: this.type },\n\t\t\t\tbubbles: true,\n\t\t\t\tcomposed: true,\n\t\t\t}),\n\t\t)\n\t}\n\n\tprivate _handleMouseEnter() {\n\t\tthis._hovered = true\n\t\tthis.paused$.next(true)\n\t}\n\n\tprivate _handleMouseLeave() {\n\t\tthis._hovered = false\n\t\tthis.paused$.next(false)\n\t}\n\n\tpublic async close() {\n\t\tif (this._closing) return\n\t\tthis._closing = true\n\t\tthis._visible = false\n\n\t\tawait this.animate(\n\t\t\t[\n\t\t\t\t{ transform: 'translateX(0) scale(1)', opacity: 1 },\n\t\t\t\t{ transform: 'translateX(20px) scale(0.98)', opacity: 0 },\n\t\t\t],\n\t\t\t{\n\t\t\t\tduration: 180,\n\t\t\t\teasing: 'cubic-bezier(0.4, 0, 1, 1)',\n\t\t\t\tfill: 'forwards',\n\t\t\t},\n\t\t).finished\n\n\t\tthis.dispatchEvent(\n\t\t\tnew CustomEvent('close', {\n\t\t\t\tdetail: { id: this.id },\n\t\t\t\tbubbles: true,\n\t\t\t\tcomposed: true,\n\t\t\t}),\n\t\t)\n\t}\n\n\tprivate _getTypeLabel(): string {\n\t\tswitch (this.type) {\n\t\t\tcase 'success':\n\t\t\t\treturn 'SUCCESS'\n\t\t\tcase 'warning':\n\t\t\t\treturn 'WARNING'\n\t\t\tcase 'error':\n\t\t\t\treturn 'ERROR'\n\t\t\tdefault:\n\t\t\t\treturn 'INFO'\n\t\t}\n\t}\n\n\trender() {\n\t\tif (!this._visible && this._closing) return html``\n\n\t\treturn html`\n\t\t\t<div\n\t\t\t\tclass=\"notification ${this.type} ${this._closing ? 'closing' : ''} ${this._hovered ? 'hovered' : ''}\"\n\t\t\t\trole=\"alert\"\n\t\t\t\t@mouseenter=${this._handleMouseEnter}\n\t\t\t\t@mouseleave=${this._handleMouseLeave}\n\t\t\t>\n\t\t\t\t${this.showProgress || this.duration > 0\n\t\t\t\t\t? html`<schmancy-progress\n\t\t\t\t\t\t\tclass=\"progress\"\n\t\t\t\t\t\t\tsize=\"xs\"\n\t\t\t\t\t\t\t.value=${this._progress}\n\t\t\t\t\t\t\t?indeterminate=${this.showProgress && this.duration === 0}\n\t\t\t\t\t\t></schmancy-progress>`\n\t\t\t\t\t: ''}\n\t\t\t\t<div class=\"accent-rail\"></div>\n\t\t\t\t<div class=\"content\">\n\t\t\t\t\t<span class=\"type-tag\">${this._getTypeLabel()}</span>\n\t\t\t\t\t${this.title ? html`<div class=\"title\">${this.title}</div>` : ''}\n\t\t\t\t\t<div class=\"message\">${this.message}</div>\n\t\t\t\t</div>\n\t\t\t\t${this.closable\n\t\t\t\t\t? html`\n\t\t\t\t\t\t\t<button class=\"close\" aria-label=\"Close notification\" @click=${this.close}>×</button>\n\t\t\t\t\t\t`\n\t\t\t\t\t: ''}\n\t\t\t</div>\n\t\t`\n\t}\n}\n\ndeclare global {\n\tinterface HTMLElementTagNameMap {\n\t\t'sch-notification': SchmancyNotification\n\t}\n}\n","import { fromEvent } from 'rxjs'\nimport { $sounds, type Feeling } from '../audio'\nimport SchmancyNotification, { NotificationType } from './notification'\n\nexport interface NotificationOptions {\n\tid?: string\n\ttitle?: string\n\tmessage: string\n\ttype?: NotificationType\n\tduration?: number\n\tclosable?: boolean\n\tplaySound?: boolean\n\tshowProgress?: boolean\n}\n\nconst typeToFeeling: Record<NotificationType, Feeling> = {\n\tinfo: 'curious',\n\tsuccess: 'content',\n\twarning: 'anxious',\n\terror: 'disappointed',\n}\n\nconst typeDurations: Record<NotificationType, number> = {\n\tsuccess: 1500,\n\tinfo: 2000,\n\twarning: 2500,\n\terror: 2500,\n}\n\n$sounds.setVolume(0.1)\n\n// Track last mouse position via RxJS\nlet lastClickPosition = { x: window.innerWidth - 100, y: 50 }\nif (typeof window !== 'undefined') {\n\tfromEvent<MouseEvent>(window, 'mousedown', { capture: true, passive: true } as AddEventListenerOptions).subscribe(\n\t\te => {\n\t\t\tlastClickPosition = { x: e.clientX, y: e.clientY }\n\t\t},\n\t)\n}\n\nlet currentNotification: SchmancyNotification | null = null\nconst notificationStack: string[] = []\n\nfunction show(options: NotificationOptions): string {\n\tconst id = options.id ?? `notification-${Date.now()}-${Math.floor(Math.random() * 10000)}`\n\tnotificationStack.push(id)\n\n\tif (currentNotification) {\n\t\tcurrentNotification.remove()\n\t\tcurrentNotification = null\n\t}\n\n\tconst notification = document.createElement('sch-notification') as SchmancyNotification\n\tnotification.id = id\n\tnotification.title = options.title ?? ''\n\tnotification.message = options.message\n\tnotification.type = options.type ?? 'info'\n\tnotification.duration = options.duration ?? 1000\n\tnotification.closable = options.closable !== false\n\tnotification.playSound = false\n\tnotification.showProgress = options.showProgress ?? false\n\tnotification.startPosition = { ...lastClickPosition }\n\n\tif (options.playSound !== false) {\n\t\t$sounds.play(typeToFeeling[notification.type])\n\t}\n\n\tfromEvent(notification, 'close').subscribe(() => {\n\t\tconst index = notificationStack.indexOf(id)\n\t\tif (index > -1) notificationStack.splice(index, 1)\n\t\tnotification.remove()\n\t\tif (currentNotification === notification) currentNotification = null\n\t})\n\n\tdocument.body.appendChild(notification)\n\tcurrentNotification = notification\n\treturn id\n}\n\n/**\n * Global notification (toast) utility. Fire-and-forget API for success,\n * error, info, and warning toasts, plus a low-level `show` for custom\n * notifications.\n *\n * @service\n * @summary Toast notifications — success, error, info, warning.\n * @method show(options: NotificationOptions) - Low-level; show any NotificationOptions.\n * @method success(message, options?) - Green success toast.\n * @method error(message, options?) - Red error toast.\n * @method info(message, options?) - Blue informational toast.\n * @method warning(message, options?) - Amber warning toast.\n */\nexport const $notify = {\n\tshow,\n\n\tinfo: (message?: string, options: Partial<Omit<NotificationOptions, 'message' | 'type'>> = {}): string =>\n\t\tshow({\n\t\t\tmessage: message ?? '',\n\t\t\ttype: 'info',\n\t\t\tduration: message ? (options.duration ?? typeDurations.info) : 1,\n\t\t\t...options,\n\t\t}),\n\n\tsuccess: (message?: string, options: Partial<Omit<NotificationOptions, 'message' | 'type'>> = {}): string =>\n\t\tshow({\n\t\t\tmessage: message ?? '',\n\t\t\ttype: 'success',\n\t\t\tduration: message ? (options.duration ?? typeDurations.success) : 1,\n\t\t\t...options,\n\t\t}),\n\n\twarning: (message?: string, options: Partial<Omit<NotificationOptions, 'message' | 'type'>> = {}): string =>\n\t\tshow({\n\t\t\tmessage: message ?? '',\n\t\t\ttype: 'warning',\n\t\t\tduration: message ? (options.duration ?? typeDurations.warning) : 1,\n\t\t\t...options,\n\t\t}),\n\n\terror: (message?: string, options: Partial<Omit<NotificationOptions, 'message' | 'type'>> = {}): string =>\n\t\tshow({\n\t\t\tmessage: message ?? '',\n\t\t\ttype: 'error',\n\t\t\tduration: message ? (options.duration ?? typeDurations.error) : 1,\n\t\t\t...options,\n\t\t}),\n\n\tcustomDuration: (\n\t\tmessage: string,\n\t\tduration: number,\n\t\toptions: Partial<Omit<NotificationOptions, 'message' | 'duration'>> = {},\n\t): string => show({ message, duration, ...options }),\n\n\tpersistent: (message: string, options: Partial<Omit<NotificationOptions, 'message' | 'duration'>> = {}): string =>\n\t\tshow({ message, duration: 0, ...options }),\n\n\tdismiss: (id?: string): void => {\n\t\tconst targetId = id ? (notificationStack.splice(notificationStack.indexOf(id), 1)[0]) : notificationStack.pop()\n\t\tif (targetId && currentNotification?.id === targetId) currentNotification.close()\n\t},\n\n\tupdate: (id: string, options: Partial<NotificationOptions>): void => {\n\t\tif (currentNotification?.id !== id) return\n\t\tif (options.title !== undefined) currentNotification.title = options.title\n\t\tif (options.message !== undefined) currentNotification.message = options.message\n\t\tif (options.type !== undefined) currentNotification.type = options.type\n\t},\n}\n\n","import { Observable, tap, finalize, catchError } from 'rxjs'\r\nimport { $notify, NotificationOptions } from './notification-service'\r\n\r\nexport interface NotifyOptions {\r\n\t/**\r\n\t * Message to show while the operation is in progress\r\n\t */\r\n\tloadingMessage?: string\r\n\t/**\r\n\t * Message to show when the operation completes successfully\r\n\t */\r\n\tsuccessMessage?: string\r\n\t/**\r\n\t * Message to show when the operation fails (can be a function to format error)\r\n\t */\r\n\terrorMessage?: string | ((error: any) => string)\r\n\t/**\r\n\t * Type of notification for loading state\r\n\t */\r\n\tloadingType?: NotificationOptions['type']\r\n\t/**\r\n\t * Type of notification for success state\r\n\t */\r\n\tsuccessType?: NotificationOptions['type']\r\n\t/**\r\n\t * Type of notification for error state\r\n\t */\r\n\terrorType?: NotificationOptions['type']\r\n\t/**\r\n\t * Whether to auto-dismiss the loading notification on complete/error\r\n\t */\r\n\tautoDismissLoading?: boolean\r\n\t/**\r\n\t * Duration for success notification (ms). Use 0 for persistent\r\n\t */\r\n\tsuccessDuration?: number\r\n\t/**\r\n\t * Duration for error notification (ms). Use 0 for persistent\r\n\t */\r\n\terrorDuration?: number\r\n}\r\n\r\n/**\r\n * Wraps an Observable with notification lifecycle management.\r\n * Shows a loading notification with progress indicator, then auto-dismisses and shows success/error notification.\r\n * \r\n * @example\r\n * ```typescript\r\n * // Basic usage with progress indicator\r\n * someApiCall().pipe(\r\n * notify({\r\n * loadingMessage: 'Loading data...',\r\n * successMessage: 'Data loaded successfully!',\r\n * errorMessage: 'Failed to load data'\r\n * })\r\n * ).subscribe()\r\n * \r\n * // With custom durations\r\n * saveData().pipe(\r\n * notify({\r\n * loadingMessage: 'Saving...',\r\n * successMessage: 'Saved!',\r\n * successDuration: 5000, // Success stays for 5 seconds\r\n * errorMessage: (err) => `Save failed: ${err.message}`,\r\n * errorDuration: 0 // Error is persistent until dismissed\r\n * })\r\n * ).subscribe()\r\n * \r\n * // Full configuration example\r\n * uploadFile().pipe(\r\n * notify({\r\n * loadingMessage: 'Uploading file...',\r\n * loadingType: 'info',\r\n * successMessage: 'Upload complete!',\r\n * successType: 'success',\r\n * successDuration: 3000,\r\n * errorMessage: (err) => `Upload failed: ${err.message}`,\r\n * errorType: 'error',\r\n * errorDuration: 10000,\r\n * autoDismissLoading: true\r\n * })\r\n * ).subscribe()\r\n * ```\r\n */\r\nexport function notify<T>(options: NotifyOptions) {\r\n\treturn (source: Observable<T>): Observable<T> => {\r\n\t\tlet loadingNotificationId: string | undefined\r\n\r\n\t\t// Show loading notification if message provided\r\n\t\tif (options.loadingMessage) {\r\n\t\t\tloadingNotificationId = $notify.show({\r\n\t\t\t\tmessage: options.loadingMessage,\r\n\t\t\t\ttype: options.loadingType || 'info',\r\n\t\t\t\tduration: 0, // Persistent until dismissed\r\n\t\t\t\tshowProgress: true, // Show indeterminate progress by default\r\n\t\t\t})\r\n\t\t}\r\n\r\n\t\treturn source.pipe(\r\n\t\t\ttap((value) => {\r\n\t\t\t\t// Check if the emitted value contains progress information\r\n\t\t\t\t// Common patterns: { progress: number }, { loaded: number, total: number }, etc.\r\n\t\t\t\tif (loadingNotificationId && typeof value === 'object' && value !== null) {\r\n\t\t\t\t\tlet progress: number | undefined\r\n\t\t\t\t\t\r\n\t\t\t\t\t// Check for different progress patterns\r\n\t\t\t\t\tif ('progress' in value && typeof (value as any).progress === 'number') {\r\n\t\t\t\t\t\tprogress = (value as any).progress\r\n\t\t\t\t\t} else if ('loaded' in value && 'total' in value) {\r\n\t\t\t\t\t\tconst loaded = (value as any).loaded\r\n\t\t\t\t\t\tconst total = (value as any).total\r\n\t\t\t\t\t\tif (typeof loaded === 'number' && typeof total === 'number' && total > 0) {\r\n\t\t\t\t\t\t\tprogress = (loaded / total) * 100\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t}\r\n\t\t\t\t\t\r\n\t\t\t\t\t// Update notification with progress if available\r\n\t\t\t\t\tif (progress !== undefined) {\r\n\t\t\t\t\t\t// We need to update the progress of the notification\r\n\t\t\t\t\t\t// For now, we'll update the message to show progress percentage\r\n\t\t\t\t\t\t$notify.update?.(loadingNotificationId, {\r\n\t\t\t\t\t\t\tmessage: `${options.loadingMessage} (${Math.round(progress)}%)`,\r\n\t\t\t\t\t\t})\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\t\t\t\t\r\n\t\t\t\t// Check if this is the final success emission (not a progress update)\r\n\t\t\t\t// Typically file uploads emit progress events then a final result\r\n\t\t\t\tconst isProgressUpdate = typeof value === 'object' && value !== null && \r\n\t\t\t\t\t('progress' in value || ('loaded' in value && 'total' in value))\r\n\t\t\t\t\r\n\t\t\t\tif (!isProgressUpdate) {\r\n\t\t\t\t\t// On successful final emission, dismiss loading and show success\r\n\t\t\t\t\tif (loadingNotificationId && options.autoDismissLoading !== false) {\r\n\t\t\t\t\t\t$notify.dismiss(loadingNotificationId)\r\n\t\t\t\t\t\tloadingNotificationId = undefined\r\n\t\t\t\t\t}\r\n\r\n\t\t\t\t\tif (options.successMessage) {\r\n\t\t\t\t\t\t$notify.show({\r\n\t\t\t\t\t\t\tmessage: options.successMessage,\r\n\t\t\t\t\t\t\ttype: options.successType || 'success',\r\n\t\t\t\t\t\t\tduration: options.successDuration ?? 2000,\r\n\t\t\t\t\t\t})\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\t\t\t}),\r\n\t\t\tcatchError((error) => {\r\n\t\t\t\t// On error, dismiss loading and show error\r\n\t\t\t\tif (loadingNotificationId && options.autoDismissLoading !== false) {\r\n\t\t\t\t\t$notify.dismiss(loadingNotificationId)\r\n\t\t\t\t\tloadingNotificationId = undefined\r\n\t\t\t\t}\r\n\r\n\t\t\t\tif (options.errorMessage) {\r\n\t\t\t\t\tconst message = typeof options.errorMessage === 'function' \r\n\t\t\t\t\t\t? options.errorMessage(error)\r\n\t\t\t\t\t\t: options.errorMessage\r\n\t\t\t\t\t\r\n\t\t\t\t\t$notify.show({\r\n\t\t\t\t\t\tmessage,\r\n\t\t\t\t\t\ttype: options.errorType || 'error',\r\n\t\t\t\t\t\tduration: options.errorDuration ?? 3000,\r\n\t\t\t\t\t})\r\n\t\t\t\t}\r\n\r\n\t\t\t\t// Re-throw the error to maintain the error flow\r\n\t\t\t\tthrow error\r\n\t\t\t}),\r\n\t\t\tfinalize(() => {\r\n\t\t\t\t// Clean up any remaining loading notification\r\n\t\t\t\tif (loadingNotificationId && options.autoDismissLoading !== false) {\r\n\t\t\t\t\t$notify.dismiss(loadingNotificationId)\r\n\t\t\t\t}\r\n\t\t\t})\r\n\t\t)\r\n\t}\r\n}\r\n\r\n/**\r\n * Simplified version for API calls that just need loading and auto-dismiss.\r\n * Perfect for fire-and-forget operations where you want to show progress.\r\n * \r\n * @example\r\n * ```typescript\r\n * downloadData().pipe(\r\n * notifyProgress('Downloading...')\r\n * ).subscribe()\r\n * \r\n * // With custom messages\r\n * saveDocument().pipe(\r\n * notifyProgress('Saving document...', 'Document saved!', 'Save failed')\r\n * ).subscribe()\r\n * ```\r\n */\r\nexport function notifyProgress<T>(\r\n\tloadingMessage: string,\r\n\tsuccessMessage?: string,\r\n\terrorMessage?: string\r\n) {\r\n\treturn notify<T>({\r\n\t\tloadingMessage,\r\n\t\tsuccessMessage: successMessage || undefined,\r\n\t\terrorMessage: errorMessage || undefined,\r\n\t\tautoDismissLoading: true,\r\n\t})\r\n}"],"mappings":"4RCce,EAAA,cAAmC,EAAA,CAAA,CAAA,YAAA,GAAA,EAAA,CAAA,MAAA,GAAA,EAAA,CAAA,KAAA,MAGb,GAAA,KAAA,QACE,GAAA,KAAA,KACe,OAAA,KAAA,SAAA,CACb,EAAA,KAAA,SACD,IAAA,KAAA,GACN,gBAAgB,KAAK,KAAA,CAAA,GAAS,KAAK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A,UAAA,CAAA,OAAA,GAAA,CAAA,CAAA,OAAA,eAAA,QAAA,IAAA,CAAA,WAAA,CAAA,EAAA,IAAA,UAAA,CAAA,OAAA,GAAA,CAAA"}
|
package/dist/notification.cjs
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
Object.defineProperty(exports,Symbol.toStringTag,{value:`Module`});const e=require(`./notification-
|
|
1
|
+
Object.defineProperty(exports,Symbol.toStringTag,{value:`Module`});const e=require(`./notification-CcNoBFEJ.cjs`);exports.$notify=e.r,exports.SchmancyNotification=e.i,exports.notify=e.t,exports.notifyProgress=e.n;
|
package/dist/notification.js
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import { i as e, n as t, r as n, t as r } from "./notification-
|
|
1
|
+
import { i as e, n as t, r as n, t as r } from "./notification-CDKBKh63.js";
|
|
2
2
|
export { n as $notify, e as SchmancyNotification, r as notify, t as notifyProgress };
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { c as e } from "./mixins-
|
|
1
|
+
import { c as e } from "./mixins-8dT5j6CS.js";
|
|
2
2
|
import { a as t } from "./active-host-BP0zy_Y9.js";
|
|
3
3
|
import { fromEvent as n, takeUntil as r } from "rxjs";
|
|
4
4
|
import { customElement as i, property as a } from "lit/decorators.js";
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"option-
|
|
1
|
+
{"version":3,"file":"option-BWfmDJvm.js","names":[],"sources":["../src/option/option.ts"],"sourcesContent":["import { SchmancyElement } from '@mixins/index'\nimport { css, html } from 'lit'\nimport { customElement, property } from 'lit/decorators.js'\nimport { fromEvent, takeUntil } from 'rxjs'\n\n/**\n * `schmancy-option` is an option element for schmancy-select and schmancy-autocomplete components.\n *\n * @fires click - When the option is clicked\n */\n@customElement('schmancy-option')\nexport default class SchmancyOption extends SchmancyElement {\n\tstatic styles = [css`\n\t:host {\n\t\tdisplay: block;\n\t\tcursor: pointer;\n\t\tuser-select: none;\n\t\toutline: none;\n\t}\n\n\t:host(:focus-visible) {\n\t\toutline: 2px solid var(--schmancy-sys-color-primary-default);\n\t\toutline-offset: -2px;\n\t}\n\n\t:host([hidden]) {\n\t\tdisplay: none;\n\t}\n\n\t:host([disabled]) {\n\t\topacity: 0.5;\n\t\tpointer-events: none;\n\t}\n`];\n\t/**\n\t * The value of the option, will be used when selected.\n\t */\n\t@property({ type: String })\n\tvalue: string = ''\n\n\t/**\n\t * The human-readable label for the option.\n\t */\n\t@property({ type: String })\n\tlabel: string = ''\n\n\t/**\n\t * Whether the option is currently selected.\n\t */\n\t@property({ type: Boolean, reflect: true })\n\tselected: boolean = false\n\n\t/**\n\t * Whether the option is disabled.\n\t */\n\t@property({ type: Boolean, reflect: true })\n\tdisabled: boolean = false\n\n\t/**\n\t * Optional group this option belongs to (for option grouping).\n\t */\n\t@property({ type: String })\n\tgroup: string = ''\n\n\t/**\n\t * Optional icon or image to display before the label.\n\t */\n\t@property({ type: String })\n\ticon: string = ''\n\n\tconnectedCallback() {\n\t\tsuper.connectedCallback()\n\n\t\t// Ensure the option has an ID for accessibility\n\t\tif (!this.id) {\n\t\t\tthis.id = `schmancy-option-${Math.random().toString(36).substring(2, 9)}`\n\t\t}\n\n\t\t// If no label was provided, use the text content or value\n\t\tif (!this.label) {\n\t\t\tthis.label = this.textContent?.trim() || this.value\n\t\t}\n\n\t\t// If value wasn't set but there's text content, use that as the value\n\t\tif (!this.value && this.textContent) {\n\t\t\tthis.value = this.textContent.trim()\n\t\t}\n\n\t\t// Make the option clickable\n\t\tfromEvent<MouseEvent>(this, 'click')\n\t\t\t.pipe(takeUntil(this.disconnecting))\n\t\t\t.subscribe((e) => {\n\t\t\t\te.stopPropagation()\n\t\t\t\tif (this.disabled) return\n\t\t\t\t// Dispatch a custom event with this option's value\n\t\t\t\tthis.dispatchEvent(\n\t\t\t\t\tnew CustomEvent('option-select', {\n\t\t\t\t\t\tbubbles: true,\n\t\t\t\t\t\tcomposed: true,\n\t\t\t\t\t\tdetail: { value: this.value },\n\t\t\t\t\t}),\n\t\t\t\t)\n\t\t\t})\n\n\t\tfromEvent<KeyboardEvent>(this, 'keydown')\n\t\t\t.pipe(takeUntil(this.disconnecting))\n\t\t\t.subscribe((e) => {\n\t\t\t\t// Handle space and enter as clicks\n\t\t\t\tif (e.key === ' ' || e.key === 'Enter') {\n\t\t\t\t\te.preventDefault()\n\t\t\t\t\te.stopPropagation()\n\t\t\t\t\tif (this.disabled) return\n\t\t\t\t\t// Dispatch a custom event with this option's value\n\t\t\t\t\tthis.dispatchEvent(\n\t\t\t\t\t\tnew CustomEvent('option-select', {\n\t\t\t\t\t\t\tbubbles: true,\n\t\t\t\t\t\t\tcomposed: true,\n\t\t\t\t\t\t\tdetail: { value: this.value },\n\t\t\t\t\t\t}),\n\t\t\t\t\t)\n\t\t\t\t}\n\t\t\t})\n\t}\n\n\tdisconnectedCallback() {\n\t\t// Event listeners are automatically cleaned up via takeUntil(this.disconnecting)\n\t\tsuper.disconnectedCallback()\n\t}\n\n\n\trender() {\n\t\tconst classes = {\n\t\t\t'py-2': true,\n\t\t\t'px-3': true,\n\t\t\trounded: true,\n\t\t\t'text-sm': true,\n\t\t\t'w-full': true,\n\t\t\tflex: true,\n\t\t\t'items-center': true,\n\t\t\t'gap-2': true,\n\t\t\t// Selected state\n\t\t\t'bg-primary-container': this.selected,\n\t\t\t'text-primary-onContainer': this.selected,\n\t\t\t// Hover state (when not selected)\n\t\t\t'hover:bg-surface-high': !this.selected,\n\t\t\t// Focus state\n\t\t\t'focus:outline-none': true,\n\t\t}\n\n\t\treturn html`\n\t\t\t<div class=${this.classMap(classes)} role=\"option\" aria-selected=${this.selected} aria-disabled=${this.disabled}>\n\t\t\t\t${this.icon ? html`<span class=\"icon\">${this.icon}</span>` : ''}\n\t\t\t\t<span class=\"flex-1\">${this.label || this.value}</span>\n\t\t\t\t${this.selected\n\t\t\t\t\t? html`\n\t\t\t\t\t\t\t<span class=\"check\">\n\t\t\t\t\t\t\t\t<svg\n\t\t\t\t\t\t\t\t\twidth=\"16\"\n\t\t\t\t\t\t\t\t\theight=\"16\"\n\t\t\t\t\t\t\t\t\tviewBox=\"0 0 24 24\"\n\t\t\t\t\t\t\t\t\tfill=\"none\"\n\t\t\t\t\t\t\t\t\tstroke=\"currentColor\"\n\t\t\t\t\t\t\t\t\tstroke-width=\"2\"\n\t\t\t\t\t\t\t\t\tstroke-linecap=\"round\"\n\t\t\t\t\t\t\t\t\tstroke-linejoin=\"round\"\n\t\t\t\t\t\t\t\t>\n\t\t\t\t\t\t\t\t\t<polyline points=\"20 6 9 17 4 12\"></polyline>\n\t\t\t\t\t\t\t\t</svg>\n\t\t\t\t\t\t\t</span>\n\t\t\t\t\t\t`\n\t\t\t\t\t: ''}\n\t\t\t</div>\n\t\t`\n\t}\n}\n\ndeclare global {\n\tinterface HTMLElementTagNameMap {\n\t\t'schmancy-option': SchmancyOption\n\t}\n}\n"],"mappings":";;;;;AAWe,IAAA,IAAA,cAA6B,EAAA;CAAA,YAAA,GAAA,GAAA;EAAA,MAAA,GAAA,EAAA,EAAA,KAAA,QA2B3B,IAAA,KAAA,QAMA,IAAA,KAAA,WAAA,CAMI,GAAA,KAAA,WAAA,CAMA,GAAA,KAAA,QAMJ,IAAA,KAAA,OAMD;;CAAA;EAAA,KAAA,SAxDC,CAAC,CAAG;;;;;;;;;;;;;;;;;;;;;;;CA0DpB,oBAAA;EACC,MAAM,mBAAA,EAGD,AACJ,KAAK,OAAK,mBAAmB,KAAK,QAAA,CAAS,SAAS,GAAA,CAAI,UAAU,GAAG,EAAA,IAIjE,AACJ,KAAK,UAAQ,KAAK,aAAa,MAAA,IAAU,KAAK,OAAA,CAI1C,KAAK,SAAS,KAAK,gBACvB,KAAK,QAAQ,KAAK,YAAY,MAAA,GAI/B,EAAsB,MAAM,QAAA,CAC1B,KAAK,EAAU,KAAK,cAAA,CAAA,CACpB,WAAW,MAAA;GACX,EAAE,iBAAA,EACE,KAAK,YAET,KAAK,cACJ,IAAI,YAAY,iBAAiB;IA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AAA,EAAA,EAAA,EAAA,CAM1C,EAAS;CAAE,MAAM;CAAS,SAAA,CAAS;CAAA,CAAA,CAAA,EAAO,EAAA,WAAA,YAAA,KAAA,EAAA,EAAA,EAAA,CAM1C,EAAS,EAAE,MAAM,QAAA,CAAA,CAAA,EAAS,EAAA,WAAA,SAAA,KAAA,EAAA,EAAA,EAAA,CAM1B,EAAS,EAAE,MAAM,QAAA,CAAA,CAAA,EAAS,EAAA,WAAA,QAAA,KAAA,EAAA,EAAA,IAAA,EAAA,CAzD3B,EAAc,kBAAA,CAAA,EAAkB,EAAA"}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
require(`./chunk-CncqDLb2.cjs`);const e=require(`./mixins-
|
|
1
|
+
require(`./chunk-CncqDLb2.cjs`);const e=require(`./mixins-BF3Vj8_c.cjs`),t=require(`./active-host-jH3iloCR.cjs`);let n=require(`rxjs`),r=require(`lit/decorators.js`),i=require(`lit`);var a=class extends e.c{constructor(...e){super(...e),this.value=``,this.label=``,this.selected=!1,this.disabled=!1,this.group=``,this.icon=``}static{this.styles=[i.css`
|
|
2
2
|
:host {
|
|
3
3
|
display: block;
|
|
4
4
|
cursor: pointer;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"option-
|
|
1
|
+
{"version":3,"file":"option-DejeqOad.cjs","names":[],"sources":["../src/option/option.ts"],"sourcesContent":["import { SchmancyElement } from '@mixins/index'\nimport { css, html } from 'lit'\nimport { customElement, property } from 'lit/decorators.js'\nimport { fromEvent, takeUntil } from 'rxjs'\n\n/**\n * `schmancy-option` is an option element for schmancy-select and schmancy-autocomplete components.\n *\n * @fires click - When the option is clicked\n */\n@customElement('schmancy-option')\nexport default class SchmancyOption extends SchmancyElement {\n\tstatic styles = [css`\n\t:host {\n\t\tdisplay: block;\n\t\tcursor: pointer;\n\t\tuser-select: none;\n\t\toutline: none;\n\t}\n\n\t:host(:focus-visible) {\n\t\toutline: 2px solid var(--schmancy-sys-color-primary-default);\n\t\toutline-offset: -2px;\n\t}\n\n\t:host([hidden]) {\n\t\tdisplay: none;\n\t}\n\n\t:host([disabled]) {\n\t\topacity: 0.5;\n\t\tpointer-events: none;\n\t}\n`];\n\t/**\n\t * The value of the option, will be used when selected.\n\t */\n\t@property({ type: String })\n\tvalue: string = ''\n\n\t/**\n\t * The human-readable label for the option.\n\t */\n\t@property({ type: String })\n\tlabel: string = ''\n\n\t/**\n\t * Whether the option is currently selected.\n\t */\n\t@property({ type: Boolean, reflect: true })\n\tselected: boolean = false\n\n\t/**\n\t * Whether the option is disabled.\n\t */\n\t@property({ type: Boolean, reflect: true })\n\tdisabled: boolean = false\n\n\t/**\n\t * Optional group this option belongs to (for option grouping).\n\t */\n\t@property({ type: String })\n\tgroup: string = ''\n\n\t/**\n\t * Optional icon or image to display before the label.\n\t */\n\t@property({ type: String })\n\ticon: string = ''\n\n\tconnectedCallback() {\n\t\tsuper.connectedCallback()\n\n\t\t// Ensure the option has an ID for accessibility\n\t\tif (!this.id) {\n\t\t\tthis.id = `schmancy-option-${Math.random().toString(36).substring(2, 9)}`\n\t\t}\n\n\t\t// If no label was provided, use the text content or value\n\t\tif (!this.label) {\n\t\t\tthis.label = this.textContent?.trim() || this.value\n\t\t}\n\n\t\t// If value wasn't set but there's text content, use that as the value\n\t\tif (!this.value && this.textContent) {\n\t\t\tthis.value = this.textContent.trim()\n\t\t}\n\n\t\t// Make the option clickable\n\t\tfromEvent<MouseEvent>(this, 'click')\n\t\t\t.pipe(takeUntil(this.disconnecting))\n\t\t\t.subscribe((e) => {\n\t\t\t\te.stopPropagation()\n\t\t\t\tif (this.disabled) return\n\t\t\t\t// Dispatch a custom event with this option's value\n\t\t\t\tthis.dispatchEvent(\n\t\t\t\t\tnew CustomEvent('option-select', {\n\t\t\t\t\t\tbubbles: true,\n\t\t\t\t\t\tcomposed: true,\n\t\t\t\t\t\tdetail: { value: this.value },\n\t\t\t\t\t}),\n\t\t\t\t)\n\t\t\t})\n\n\t\tfromEvent<KeyboardEvent>(this, 'keydown')\n\t\t\t.pipe(takeUntil(this.disconnecting))\n\t\t\t.subscribe((e) => {\n\t\t\t\t// Handle space and enter as clicks\n\t\t\t\tif (e.key === ' ' || e.key === 'Enter') {\n\t\t\t\t\te.preventDefault()\n\t\t\t\t\te.stopPropagation()\n\t\t\t\t\tif (this.disabled) return\n\t\t\t\t\t// Dispatch a custom event with this option's value\n\t\t\t\t\tthis.dispatchEvent(\n\t\t\t\t\t\tnew CustomEvent('option-select', {\n\t\t\t\t\t\t\tbubbles: true,\n\t\t\t\t\t\t\tcomposed: true,\n\t\t\t\t\t\t\tdetail: { value: this.value },\n\t\t\t\t\t\t}),\n\t\t\t\t\t)\n\t\t\t\t}\n\t\t\t})\n\t}\n\n\tdisconnectedCallback() {\n\t\t// Event listeners are automatically cleaned up via takeUntil(this.disconnecting)\n\t\tsuper.disconnectedCallback()\n\t}\n\n\n\trender() {\n\t\tconst classes = {\n\t\t\t'py-2': true,\n\t\t\t'px-3': true,\n\t\t\trounded: true,\n\t\t\t'text-sm': true,\n\t\t\t'w-full': true,\n\t\t\tflex: true,\n\t\t\t'items-center': true,\n\t\t\t'gap-2': true,\n\t\t\t// Selected state\n\t\t\t'bg-primary-container': this.selected,\n\t\t\t'text-primary-onContainer': this.selected,\n\t\t\t// Hover state (when not selected)\n\t\t\t'hover:bg-surface-high': !this.selected,\n\t\t\t// Focus state\n\t\t\t'focus:outline-none': true,\n\t\t}\n\n\t\treturn html`\n\t\t\t<div class=${this.classMap(classes)} role=\"option\" aria-selected=${this.selected} aria-disabled=${this.disabled}>\n\t\t\t\t${this.icon ? html`<span class=\"icon\">${this.icon}</span>` : ''}\n\t\t\t\t<span class=\"flex-1\">${this.label || this.value}</span>\n\t\t\t\t${this.selected\n\t\t\t\t\t? html`\n\t\t\t\t\t\t\t<span class=\"check\">\n\t\t\t\t\t\t\t\t<svg\n\t\t\t\t\t\t\t\t\twidth=\"16\"\n\t\t\t\t\t\t\t\t\theight=\"16\"\n\t\t\t\t\t\t\t\t\tviewBox=\"0 0 24 24\"\n\t\t\t\t\t\t\t\t\tfill=\"none\"\n\t\t\t\t\t\t\t\t\tstroke=\"currentColor\"\n\t\t\t\t\t\t\t\t\tstroke-width=\"2\"\n\t\t\t\t\t\t\t\t\tstroke-linecap=\"round\"\n\t\t\t\t\t\t\t\t\tstroke-linejoin=\"round\"\n\t\t\t\t\t\t\t\t>\n\t\t\t\t\t\t\t\t\t<polyline points=\"20 6 9 17 4 12\"></polyline>\n\t\t\t\t\t\t\t\t</svg>\n\t\t\t\t\t\t\t</span>\n\t\t\t\t\t\t`\n\t\t\t\t\t: ''}\n\t\t\t</div>\n\t\t`\n\t}\n}\n\ndeclare global {\n\tinterface HTMLElementTagNameMap {\n\t\t'schmancy-option': SchmancyOption\n\t}\n}\n"],"mappings":"uLAWe,IAAA,EAAA,cAA6B,EAAA,CAAA,CAAA,YAAA,GAAA,EAAA,CAAA,MAAA,GAAA,EAAA,CAAA,KAAA,MA2B3B,GAAA,KAAA,MAMA,GAAA,KAAA,SAAA,CAMI,EAAA,KAAA,SAAA,CAMA,EAAA,KAAA,MAMJ,GAAA,KAAA,KAMD,GAAA,OAAA,KAAA,OAxDC,CAAC,EAAA,GAAG;;;;;;;;;;;;;;;;;;;;;GA0DpB,mBAAA,CACC,MAAM,mBAAA,CAGD,AACJ,KAAK,KAAK,mBAAmB,KAAK,QAAA,CAAS,SAAS,GAAA,CAAI,UAAU,EAAG,EAAA,GAIjE,AACJ,KAAK,QAAQ,KAAK,aAAa,MAAA,EAAU,KAAK,MAAA,CAI1C,KAAK,OAAS,KAAK,cACvB,KAAK,MAAQ,KAAK,YAAY,MAAA,GAI/B,EAAA,EAAA,WAAsB,KAAM,QAAA,CAC1B,MAAA,EAAA,EAAA,WAAe,KAAK,cAAA,CAAA,CACpB,UAAW,GAAA,CACX,EAAE,iBAAA,CACE,KAAK,UAET,KAAK,cACJ,IAAI,YAAY,gBAAiB,CAChC,QAAA,CAAS,EACT,SAAA,CAAU,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