@mhmo91/schmancy 0.10.22 → 0.10.24
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 +0 -106
- package/dist/agent/{overlay.confirm-body-xfOh5Q28.js → overlay.confirm-body-CvdVfCnN.js} +1 -1
- package/dist/agent/{overlay.confirm-body-xfOh5Q28.js.map → overlay.confirm-body-CvdVfCnN.js.map} +1 -1
- package/dist/agent/schmancy.agent.js +1844 -1961
- package/dist/agent/schmancy.agent.js.map +1 -1
- package/dist/agent/schmancy.manifest.json +1 -89
- package/dist/{area-Ddk7P5wD.js → area-A_oUP4P1.js} +1 -1
- package/dist/{area-Ddk7P5wD.js.map → area-A_oUP4P1.js.map} +1 -1
- package/dist/{area-Cbkt0NX4.cjs → area-BuqdaUpQ.cjs} +1 -1
- package/dist/{area-Cbkt0NX4.cjs.map → area-BuqdaUpQ.cjs.map} +1 -1
- package/dist/area.cjs +1 -1
- package/dist/area.js +1 -1
- package/dist/{autocomplete-Ds3Q2cwR.js → autocomplete-BoCWO26L.js} +2 -2
- package/dist/{autocomplete-Ds3Q2cwR.js.map → autocomplete-BoCWO26L.js.map} +1 -1
- package/dist/{autocomplete-CfBFDSc3.cjs → autocomplete-Cy46gJxK.cjs} +1 -1
- package/dist/{autocomplete-CfBFDSc3.cjs.map → autocomplete-Cy46gJxK.cjs.map} +1 -1
- package/dist/autocomplete.cjs +1 -1
- package/dist/autocomplete.js +1 -1
- package/dist/avatar.cjs +1 -1
- package/dist/avatar.js +1 -1
- package/dist/badge.cjs +1 -1
- package/dist/badge.js +1 -1
- package/dist/{boat-BF5P6p_f.js → boat-B0h5fuAA.js} +1 -1
- package/dist/{boat-BF5P6p_f.js.map → boat-B0h5fuAA.js.map} +1 -1
- package/dist/{boat-BPN8HLzZ.cjs → boat-RRtBhD3x.cjs} +1 -1
- package/dist/{boat-BPN8HLzZ.cjs.map → boat-RRtBhD3x.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-C7ejPa-Q.cjs → busy-Bn6Pioo8.cjs} +1 -1
- package/dist/{busy-C7ejPa-Q.cjs.map → busy-Bn6Pioo8.cjs.map} +1 -1
- package/dist/{busy-BuACDJy6.js → busy-DObY7lfu.js} +1 -1
- package/dist/{busy-BuACDJy6.js.map → busy-DObY7lfu.js.map} +1 -1
- package/dist/busy.cjs +1 -1
- package/dist/busy.js +1 -1
- package/dist/button-DEi3M2nV.js +446 -0
- package/dist/button-DEi3M2nV.js.map +1 -0
- package/dist/button-XfdPzfZQ.cjs +120 -0
- package/dist/button-XfdPzfZQ.cjs.map +1 -0
- package/dist/button.cjs +1 -120
- package/dist/button.js +2 -447
- package/dist/{card-BIzaLuEg.cjs → card-BjUgRzFh.cjs} +1 -1
- package/dist/{card-BIzaLuEg.cjs.map → card-BjUgRzFh.cjs.map} +1 -1
- package/dist/{card-CgQwXO8L.js → card-jzUQK0EQ.js} +1 -1
- package/dist/{card-CgQwXO8L.js.map → card-jzUQK0EQ.js.map} +1 -1
- package/dist/card.cjs +1 -1
- package/dist/card.js +1 -1
- package/dist/{checkbox-BNdg57Om.js → checkbox-CfCm1vGN.js} +1 -1
- package/dist/{checkbox-BNdg57Om.js.map → checkbox-CfCm1vGN.js.map} +1 -1
- package/dist/{checkbox-BAqE3sTx.cjs → checkbox-rskgUBxQ.cjs} +1 -1
- package/dist/{checkbox-BAqE3sTx.cjs.map → checkbox-rskgUBxQ.cjs.map} +1 -1
- package/dist/checkbox.cjs +1 -1
- package/dist/checkbox.js +1 -1
- package/dist/{chips-DS3y4Lbn.cjs → chips-BiNZKu0J.cjs} +1 -1
- package/dist/{chips-DS3y4Lbn.cjs.map → chips-BiNZKu0J.cjs.map} +1 -1
- package/dist/{chips-DnqLaOb1.js → chips-Dfim_tQv.js} +2 -2
- package/dist/{chips-DnqLaOb1.js.map → chips-Dfim_tQv.js.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-CAqB-B0M.js → date-range-B8zoj6Cj.js} +2 -2
- package/dist/{date-range-CAqB-B0M.js.map → date-range-B8zoj6Cj.js.map} +1 -1
- package/dist/{date-range-VA1mi1N7.cjs → date-range-em7OwhlK.cjs} +1 -1
- package/dist/{date-range-VA1mi1N7.cjs.map → date-range-em7OwhlK.cjs.map} +1 -1
- package/dist/{date-range-inline-PeRt1iIF.js → date-range-inline-BfUL8_vX.js} +1 -1
- package/dist/{date-range-inline-PeRt1iIF.js.map → date-range-inline-BfUL8_vX.js.map} +1 -1
- package/dist/{date-range-inline-CAa0_4EI.cjs → date-range-inline-DYeqoBIO.cjs} +1 -1
- package/dist/{date-range-inline-CAa0_4EI.cjs.map → date-range-inline-DYeqoBIO.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 +1 -1
- package/dist/{details-BnXbDpt7.cjs → details-CNM1tuma.cjs} +1 -1
- package/dist/{details-BnXbDpt7.cjs.map → details-CNM1tuma.cjs.map} +1 -1
- package/dist/{details-BpFjVclg.js → details-D246xN83.js} +1 -1
- package/dist/{details-BpFjVclg.js.map → details-D246xN83.js.map} +1 -1
- package/dist/details.cjs +1 -1
- package/dist/details.js +1 -1
- package/dist/{divider-D8cBBkdG.js → divider-CbIp1je9.js} +1 -1
- package/dist/{divider-D8cBBkdG.js.map → divider-CbIp1je9.js.map} +1 -1
- package/dist/{divider-B84lt1A3.cjs → divider-DaKsGNW-.cjs} +1 -1
- package/dist/{divider-B84lt1A3.cjs.map → divider-DaKsGNW-.cjs.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-DK-O37-j.cjs → expand-CQDm3BF3.cjs} +1 -1
- package/dist/{expand-DK-O37-j.cjs.map → expand-CQDm3BF3.cjs.map} +1 -1
- package/dist/{expand-BJiKggfg.js → expand-DRkiO4vw.js} +2 -2
- package/dist/{expand-BJiKggfg.js.map → expand-DRkiO4vw.js.map} +1 -1
- package/dist/expand.cjs +1 -1
- package/dist/expand.js +1 -1
- package/dist/{float-RWR6Q1Hh.cjs → float-5O26zNRh.cjs} +1 -1
- package/dist/{float-RWR6Q1Hh.cjs.map → float-5O26zNRh.cjs.map} +1 -1
- package/dist/{float-B4FDN40h.js → float-CZtu8FnO.js} +1 -1
- package/dist/{float-B4FDN40h.js.map → float-CZtu8FnO.js.map} +1 -1
- package/dist/float.cjs +1 -1
- package/dist/float.js +1 -1
- package/dist/{form-ha3df3K7.cjs → form-B90CMeqs.cjs} +1 -1
- package/dist/{form-ha3df3K7.cjs.map → form-B90CMeqs.cjs.map} +1 -1
- package/dist/{form-B-Sm6u25.js → form-CE6Gwz4r.js} +8 -8
- package/dist/{form-B-Sm6u25.js.map → form-CE6Gwz4r.js.map} +1 -1
- package/dist/form.cjs +1 -1
- package/dist/form.js +6 -6
- package/dist/handover/agent-runtime-followups.md +1 -1
- package/dist/handover/agent-runtime-v1.md +3 -3
- package/dist/icons-B7ppo07M.cjs +33 -0
- package/dist/icons-B7ppo07M.cjs.map +1 -0
- package/dist/icons-CGhozJ5v.js +48 -0
- package/dist/icons-CGhozJ5v.js.map +1 -0
- package/dist/icons.cjs +1 -1
- package/dist/icons.js +1 -1
- package/dist/{iframe-CByrVlZy.js → iframe-C3PMj1MD.js} +1 -1
- package/dist/{iframe-CByrVlZy.js.map → iframe-C3PMj1MD.js.map} +1 -1
- package/dist/{iframe-BXe1TPx1.cjs → iframe-D98csbEo.cjs} +1 -1
- package/dist/{iframe-BXe1TPx1.cjs.map → iframe-D98csbEo.cjs.map} +1 -1
- package/dist/iframe.cjs +1 -1
- package/dist/iframe.js +1 -1
- package/dist/index.cjs +1 -1
- package/dist/index.js +27 -27
- package/dist/{input-Q0fm34Co.js → input-CCOkeeVM.js} +1 -1
- package/dist/{input-Q0fm34Co.js.map → input-CCOkeeVM.js.map} +1 -1
- package/dist/{input-BY9OCQWr.cjs → input-_y92Pzon.cjs} +1 -1
- package/dist/{input-BY9OCQWr.cjs.map → input-_y92Pzon.cjs.map} +1 -1
- package/dist/{input-chip-CytUirVS.js → input-chip-Bzwr5-XL.js} +1 -1
- package/dist/{input-chip-CytUirVS.js.map → input-chip-Bzwr5-XL.js.map} +1 -1
- package/dist/{input-chip-BwNf3GD0.cjs → input-chip-CR66MWml.cjs} +1 -1
- package/dist/{input-chip-BwNf3GD0.cjs.map → input-chip-CR66MWml.cjs.map} +1 -1
- package/dist/input.cjs +1 -1
- package/dist/input.js +1 -1
- package/dist/json.cjs +2 -2
- package/dist/json.cjs.map +1 -1
- package/dist/json.js +3 -3
- package/dist/json.js.map +1 -1
- 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-p2E0oVR0.cjs → lightbox-Bk3ovcVu.cjs} +1 -1
- package/dist/{lightbox-p2E0oVR0.cjs.map → lightbox-Bk3ovcVu.cjs.map} +1 -1
- package/dist/{lightbox-Ckvn5YNF.js → lightbox-Dl--fEbP.js} +1 -1
- package/dist/{lightbox-Ckvn5YNF.js.map → lightbox-Dl--fEbP.js.map} +1 -1
- package/dist/lightbox.cjs +1 -1
- package/dist/lightbox.js +1 -1
- package/dist/{list-CsrPVvmm.js → list-B3WI_Nfs.js} +1 -1
- package/dist/{list-CsrPVvmm.js.map → list-B3WI_Nfs.js.map} +1 -1
- package/dist/{list-r57UFHu3.cjs → list-DWngbP2X.cjs} +1 -1
- package/dist/{list-r57UFHu3.cjs.map → list-DWngbP2X.cjs.map} +1 -1
- package/dist/list.cjs +1 -1
- package/dist/list.js +1 -1
- package/dist/{menu-DBuZiPyW.cjs → menu-CdYjxJqm.cjs} +1 -1
- package/dist/{menu-DBuZiPyW.cjs.map → menu-CdYjxJqm.cjs.map} +1 -1
- package/dist/{menu-Csm6Fg88.js → menu-IDhVp6zm.js} +2 -2
- package/dist/{menu-Csm6Fg88.js.map → menu-IDhVp6zm.js.map} +1 -1
- package/dist/menu.cjs +1 -1
- package/dist/menu.js +1 -1
- package/dist/{mixins-DTCHPEd4.cjs → mixins-BPUR4Kc4.cjs} +1 -1
- package/dist/{mixins-DTCHPEd4.cjs.map → mixins-BPUR4Kc4.cjs.map} +1 -1
- package/dist/{mixins-pU53qf6R.js → mixins-C42OILRS.js} +1 -1
- package/dist/{mixins-pU53qf6R.js.map → mixins-C42OILRS.js.map} +1 -1
- 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 +1 -1
- package/dist/navigation-rail.js +1 -1
- package/dist/{notification-58tkVys8.cjs → notification-B3wVUC8l.cjs} +1 -1
- package/dist/{notification-58tkVys8.cjs.map → notification-B3wVUC8l.cjs.map} +1 -1
- package/dist/{notification-CgTBiAdf.js → notification-CllYkvlR.js} +2 -2
- package/dist/{notification-CgTBiAdf.js.map → notification-CllYkvlR.js.map} +1 -1
- package/dist/notification.cjs +1 -1
- package/dist/notification.js +1 -1
- package/dist/{option-Bicf6xpI.js → option-CPOL0nHL.js} +1 -1
- package/dist/{option-Bicf6xpI.js.map → option-CPOL0nHL.js.map} +1 -1
- package/dist/{option-61YE3gub.cjs → option-cRsdshy8.cjs} +1 -1
- package/dist/{option-61YE3gub.cjs.map → option-cRsdshy8.cjs.map} +1 -1
- package/dist/option.cjs +1 -1
- package/dist/option.js +1 -1
- package/dist/{overlay-CpvmytrQ.cjs → overlay-BnTvnNDc.cjs} +1 -1
- package/dist/{overlay-CpvmytrQ.cjs.map → overlay-BnTvnNDc.cjs.map} +1 -1
- package/dist/{overlay-CAI2FAp7.js → overlay-DJ-vlwtR.js} +3 -3
- package/dist/{overlay-CAI2FAp7.js.map → overlay-DJ-vlwtR.js.map} +1 -1
- package/dist/overlay.cjs +1 -1
- package/dist/{overlay.confirm-body-QD-5cj3_.cjs → overlay.confirm-body-CQ-FwySO.cjs} +1 -1
- package/dist/{overlay.confirm-body-QD-5cj3_.cjs.map → overlay.confirm-body-CQ-FwySO.cjs.map} +1 -1
- package/dist/{overlay.confirm-body-Cq25CkTw.js → overlay.confirm-body-DEb9xw5N.js} +1 -1
- package/dist/{overlay.confirm-body-Cq25CkTw.js.map → overlay.confirm-body-DEb9xw5N.js.map} +1 -1
- package/dist/overlay.js +3 -3
- package/dist/{overlay.service-BG0bqPwJ.cjs → overlay.service-CKBCIP2f.cjs} +1 -1
- package/dist/{overlay.service-BG0bqPwJ.cjs.map → overlay.service-CKBCIP2f.cjs.map} +1 -1
- package/dist/{overlay.service-Bpjrhaxh.js → overlay.service-XM1YHkTk.js} +2 -2
- package/dist/{overlay.service-Bpjrhaxh.js.map → overlay.service-XM1YHkTk.js.map} +1 -1
- package/dist/{progress-D8XZJVl5.cjs → progress-CcfLfHOE.cjs} +1 -1
- package/dist/{progress-D8XZJVl5.cjs.map → progress-CcfLfHOE.cjs.map} +1 -1
- package/dist/{progress-Zqx-S9NZ.js → progress-CnMPp-9a.js} +1 -1
- package/dist/{progress-Zqx-S9NZ.js.map → progress-CnMPp-9a.js.map} +1 -1
- package/dist/progress.cjs +1 -1
- package/dist/progress.js +1 -1
- package/dist/{radio-group-D9MU1Mxz.js → radio-group-BUJgfQFi.js} +1 -1
- package/dist/{radio-group-D9MU1Mxz.js.map → radio-group-BUJgfQFi.js.map} +1 -1
- package/dist/{radio-group-bl8K4Gls.cjs → radio-group-D97hflrE.cjs} +1 -1
- package/dist/{radio-group-bl8K4Gls.cjs.map → radio-group-D97hflrE.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/{select-CMwkl-D6.js → select-BWEh5nRM.js} +1 -1
- package/dist/{select-CMwkl-D6.js.map → select-BWEh5nRM.js.map} +1 -1
- package/dist/{select-COIfVtZl.cjs → select-Cv5Oev6d.cjs} +1 -1
- package/dist/{select-COIfVtZl.cjs.map → select-Cv5Oev6d.cjs.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/overlay.md +4 -0
- package/dist/skills/schmancy/overlay.md +4 -0
- package/dist/slider.cjs +1 -1
- package/dist/slider.js +1 -1
- package/dist/{splash-screen-xrMNpzkm.js → splash-screen-B6w7X2z9.js} +1 -1
- package/dist/{splash-screen-xrMNpzkm.js.map → splash-screen-B6w7X2z9.js.map} +1 -1
- package/dist/{splash-screen-2hxq8Sft.cjs → splash-screen-DFtxtO2D.cjs} +1 -1
- package/dist/{splash-screen-2hxq8Sft.cjs.map → splash-screen-DFtxtO2D.cjs.map} +1 -1
- package/dist/splash-screen.cjs +1 -1
- package/dist/splash-screen.js +1 -1
- package/dist/{src-BoHs3kDi.cjs → src-Asw6A018.cjs} +3 -3
- package/dist/src-Asw6A018.cjs.map +1 -0
- package/dist/{src-DhbXaOrS.js → src-D_NK-vMA.js} +40 -40
- package/dist/src-D_NK-vMA.js.map +1 -0
- package/dist/steps.cjs +1 -1
- package/dist/steps.js +1 -1
- package/dist/{surface-BkQ44Wuo.cjs → surface-B94ka2LY.cjs} +1 -1
- package/dist/{surface-BkQ44Wuo.cjs.map → surface-B94ka2LY.cjs.map} +1 -1
- package/dist/{surface-3nnvlxeE.js → surface-ctBcRGSZ.js} +1 -1
- package/dist/{surface-3nnvlxeE.js.map → surface-ctBcRGSZ.js.map} +1 -1
- 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 +2 -2
- package/dist/table.cjs.map +1 -1
- package/dist/table.js +2 -2
- package/dist/table.js.map +1 -1
- package/dist/{tabs-Dql0rcqZ.cjs → tabs-B7kaZIom.cjs} +1 -1
- package/dist/{tabs-Dql0rcqZ.cjs.map → tabs-B7kaZIom.cjs.map} +1 -1
- package/dist/{tabs-CnLIe8nE.js → tabs-CrMx5z_y.js} +1 -1
- package/dist/{tabs-CnLIe8nE.js.map → tabs-CrMx5z_y.js.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-CGD6lAEe.cjs → textarea-D1crj8JD.cjs} +1 -1
- package/dist/{textarea-CGD6lAEe.cjs.map → textarea-D1crj8JD.cjs.map} +1 -1
- package/dist/{textarea-BAogS_Ff.js → textarea-DeHFl80i.js} +1 -1
- package/dist/{textarea-BAogS_Ff.js.map → textarea-DeHFl80i.js.map} +1 -1
- package/dist/textarea.cjs +1 -1
- package/dist/textarea.js +1 -1
- package/dist/{theme-CUK0HrS3.js → theme-C7Yo33nh.js} +2 -2
- package/dist/{theme-CUK0HrS3.js.map → theme-C7Yo33nh.js.map} +1 -1
- package/dist/{theme-button-CmTwFm3l.cjs → theme-button-CXSM5We4.cjs} +1 -1
- package/dist/{theme-button-CmTwFm3l.cjs.map → theme-button-CXSM5We4.cjs.map} +1 -1
- package/dist/{theme-button-Bb8qW2IH.js → theme-button-Cpc_hs2O.js} +1 -1
- package/dist/{theme-button-Bb8qW2IH.js.map → theme-button-Cpc_hs2O.js.map} +1 -1
- package/dist/theme-button.cjs +1 -1
- package/dist/theme-button.js +1 -1
- package/dist/{theme-DKrrQ-ic.cjs → theme-wE2N7Yu9.cjs} +2 -2
- package/dist/{theme-DKrrQ-ic.cjs.map → theme-wE2N7Yu9.cjs.map} +1 -1
- package/dist/theme.cjs +1 -1
- package/dist/theme.js +2 -2
- package/dist/tree.cjs +1 -1
- package/dist/tree.js +1 -1
- package/dist/typography.cjs +1 -1
- package/dist/typography.js +1 -1
- package/dist/visually-hidden.cjs +1 -1
- package/dist/visually-hidden.js +1 -1
- package/dist/{window-BbWlaPZv.cjs → window-Ck_zS4bb.cjs} +1 -1
- package/dist/{window-BbWlaPZv.cjs.map → window-Ck_zS4bb.cjs.map} +1 -1
- package/dist/{window-DuDAQa6y.js → window-JtkeHoxS.js} +1 -1
- package/dist/{window-DuDAQa6y.js.map → window-JtkeHoxS.js.map} +1 -1
- package/dist/window.cjs +1 -1
- package/dist/window.js +1 -1
- package/package.json +1 -1
- package/skills/schmancy/overlay.md +4 -0
- package/src/badge/badge.ts +7 -11
- package/src/button/icon-button.ts +3 -4
- package/src/icons/icon.ts +43 -293
- package/src/json/json.ts +1 -1
- package/src/table/table.ts +2 -2
- package/src/theme/theme-audio-player.ts +1 -1
- package/types/src/badge/badge.d.ts +1 -1
- package/types/src/icons/icon.d.ts +0 -81
- package/dist/button.cjs.map +0 -1
- package/dist/button.js.map +0 -1
- package/dist/context-6oXCZmZN.js +0 -3
- package/dist/context-6oXCZmZN.js.map +0 -1
- package/dist/context-CRZeiCqq.cjs +0 -1
- package/dist/context-CRZeiCqq.cjs.map +0 -1
- package/dist/icons-BgUbHwy8.js +0 -169
- package/dist/icons-BgUbHwy8.js.map +0 -1
- package/dist/icons-morK4hHz.cjs +0 -52
- package/dist/icons-morK4hHz.cjs.map +0 -1
- package/dist/src-BoHs3kDi.cjs.map +0 -1
- package/dist/src-DhbXaOrS.js.map +0 -1
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"notification-58tkVys8.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: flex-start;\n\tgap: 10px;\n\tpadding: 12px;\n\tpadding-right: 32px;\n\tbackground: var(--schmancy-sys-color-surface-container);\n\tborder-radius: var(--schmancy-sys-shape-corner-extraLarge, 16px);\n\tcolor: var(--schmancy-sys-color-surface-on);\n\tmax-width: 320px;\n\toverflow: hidden;\n\n\t/* Type-colored luminous glow */\n\t--notification-glow-color: var(--schmancy-sys-color-primary-default);\n\tbox-shadow: 0 4px 24px -6px color-mix(in srgb, var(--notification-glow-color) 18%, 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 { --notification-glow-color: var(--schmancy-sys-color-primary-default); }\n\t&.success { --notification-glow-color: var(--schmancy-sys-color-success-default); }\n\t&.warning { --notification-glow-color: var(--schmancy-sys-color-warning-default); }\n\t&.error { --notification-glow-color: var(--schmancy-sys-color-error-default); }\n\n\t&.hovered {\n\t\tbox-shadow: 0 8px 32px -4px color-mix(in srgb, var(--notification-glow-color) 28%, transparent);\n\t\ttransform: translateY(-2px);\n\t}\n\n\t@media (prefers-reduced-motion: reduce) {\n\t\ttransition: box-shadow 200ms ease;\n\t\t&.hovered { transform: none; }\n\t}\n}\n\n.emoji {\n\tfont-size: 20px;\n\tline-height: 1;\n\tflex-shrink: 0;\n\tmargin-top: 1px;\n}\n\n.content {\n\tflex: 1;\n\tmin-width: 0;\n}\n\n.title {\n\tfont-weight: 500;\n\tfont-size: 13px;\n\tline-height: 1.4;\n\tmargin-bottom: 2px;\n\tletter-spacing: 0.01em;\n\n\t.info & {\n\t\tcolor: var(--schmancy-sys-color-primary-default);\n\t}\n\t.success & {\n\t\tcolor: var(--schmancy-sys-color-success-default);\n\t}\n\t.warning & {\n\t\tcolor: var(--schmancy-sys-color-tertiary-default);\n\t}\n\t.error & {\n\t\tcolor: var(--schmancy-sys-color-error-default);\n\t}\n}\n\n.message {\n\tfont-size: 13px;\n\tline-height: 1.4;\n\topacity: 0.75;\n\tletter-spacing: 0.01em;\n}\n\n.close {\n\tposition: absolute;\n\ttop: 8px;\n\tright: 6px;\n\tbackground: none;\n\tborder: none;\n\tfont-size: 16px;\n\tfont-weight: 300;\n\tcolor: var(--schmancy-sys-color-surface-onVariant);\n\tcursor: pointer;\n\tpadding: 4px 6px;\n\tline-height: 1;\n\topacity: 0.4;\n\tborder-radius: var(--schmancy-sys-shape-corner-full, 50%);\n\ttransition: opacity 200ms ease;\n\n\t&:hover {\n\t\topacity: 0.8;\n\t}\n\n\t&:focus-visible {\n\t\toutline: none;\n\t\topacity: 1;\n\t\tbox-shadow:\n\t\t\t0 0 0 2px var(--schmancy-sys-color-primary-default),\n\t\t\t0 0 8px -2px color-mix(in srgb, var(--schmancy-sys-color-primary-default) 25%, transparent);\n\t}\n}\n\n.progress {\n\tposition: absolute;\n\tbottom: 0;\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 * Calculate a point on an arc between two points\n */\nfunction calculateArcPoint(\n\tstart: { x: number; y: number },\n\tend: { x: number; y: number },\n\tarcDirection: 'up' | 'down' = 'up',\n\tintensity: number = 0.3,\n): { x: number; y: number } {\n\tconst midX = (start.x + end.x) / 2\n\tconst midY = (start.y + end.y) / 2\n\tconst distance = Math.sqrt(Math.pow(end.x - start.x, 2) + Math.pow(end.y - start.y, 2))\n\tconst arcHeight = Math.min(distance * intensity, 150)\n\treturn {\n\t\tx: midX,\n\t\ty: arcDirection === 'up' ? midY - arcHeight : midY + arcHeight,\n\t}\n}\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 // 0 means no auto-close\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 // Show indeterminate progress bar\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\t// Set fixed positioning for blackbird animation\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\t// Animate in after first render\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\t// Get the notification element's final position\n\t\tconst rect = this.getBoundingClientRect()\n\t\tconst targetX = rect.left + rect.width / 2\n\t\tconst targetY = rect.top + rect.height / 2\n\n\t\t// Calculate arc point for upward arc\n\t\tconst arcPoint = calculateArcPoint(this.startPosition, { x: targetX, y: targetY }, 'up', 0.3)\n\n\t\t// Animate from click position to final position with arc\n\t\tawait this.animate(\n\t\t\t[\n\t\t\t\t{\n\t\t\t\t\ttransform: `translate(${this.startPosition.x - targetX}px, ${this.startPosition.y - targetY}px) scale(0.1)`,\n\t\t\t\t\topacity: 0,\n\t\t\t\t},\n\t\t\t\t{\n\t\t\t\t\ttransform: `translate(${arcPoint.x - targetX}px, ${arcPoint.y - targetY}px) scale(0.6)`,\n\t\t\t\t\topacity: 0.9,\n\t\t\t\t\toffset: 0.5,\n\t\t\t\t},\n\t\t\t\t{\n\t\t\t\t\ttransform: 'translate(0, 0) scale(1)',\n\t\t\t\t\topacity: 1,\n\t\t\t\t},\n\t\t\t],\n\t\t\t{\n\t\t\t\tduration: 400,\n\t\t\t\teasing: 'cubic-bezier(0.34, 1.2, 0.64, 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\t// Animate out before dispatching close event\n\t\tawait this.animate(\n\t\t\t[\n\t\t\t\t{ transform: 'translate(0, 0) scale(1)', opacity: 1 },\n\t\t\t\t{ transform: 'translate(0, -20px) scale(0.8)', opacity: 0 },\n\t\t\t],\n\t\t\t{\n\t\t\t\tduration: 200,\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 _getEmoji(): string {\n\t\tswitch (this.type) {\n\t\t\tcase 'success':\n\t\t\t\treturn '\\u2705'\n\t\t\tcase 'warning':\n\t\t\t\treturn '\\u26A0\\uFE0F'\n\t\t\tcase 'error':\n\t\t\t\treturn '\\u274C'\n\t\t\tdefault:\n\t\t\t\treturn '\\u{1F4A1}'\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<span class=\"emoji\">${this._getEmoji()}</span>\n\t\t\t\t<div class=\"content\">\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}>x</button>\n\t\t\t\t\t\t`\n\t\t\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\tclass=\"progress\"\n\t\t\t\t\t\tsize=\"xs\"\n\t\t\t\t\t\t.value=${this._progress}\n\t\t\t\t\t\t?indeterminate=${this.showProgress && this.duration === 0}\n\t\t\t\t\t></schmancy-progress>`\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 { $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\n// Track last mouse position\nlet lastClickPosition = { x: window.innerWidth - 100, y: 50 }\n\n// Global mousedown listener to track click position\nif (typeof window !== 'undefined') {\n\twindow.addEventListener(\n\t\t'mousedown',\n\t\t(e: MouseEvent) => {\n\t\t\tlastClickPosition = { x: e.clientX, y: e.clientY }\n\t\t},\n\t\t{ capture: true, passive: true },\n\t)\n}\n\n// Track current notification element\nlet currentNotification: SchmancyNotification | null = null\n\n/**\n * Notification service for centralized notification management.\n * Provides a simple API for showing notifications.\n */\nexport class NotificationService {\n\tprivate static instance: NotificationService\n\tprivate notificationStack: string[] = []\n\tprivate audioVolume = 0.1\n\n\t// Default notification options\n\tprivate static DEFAULT_OPTIONS: Partial<NotificationOptions> = {\n\t\tduration: 1000, // 1 seconds - long enough to be readable\n\t\tclosable: true,\n\t\tplaySound: true,\n\t}\n\n\t// Type-specific default durations (in milliseconds)\n\tprivate static TYPE_DURATIONS: Record<NotificationType, number> = {\n\t\tsuccess: 1500, // 1.5 seconds - quick confirmation\n\t\tinfo: 2000, // 2 seconds - informational\n\t\twarning: 2500, // 2.5 seconds - needs attention\n\t\terror: 2500, // 2.5 seconds - important\n\t}\n\n\t// Private constructor for singleton pattern\n\tprivate constructor() {\n\t\t$sounds.setVolume(this.audioVolume)\n\t}\n\n\t/**\n\t * Get the singleton instance\n\t */\n\tpublic static getInstance(): NotificationService {\n\t\tif (!NotificationService.instance) {\n\t\t\tNotificationService.instance = new NotificationService()\n\t\t}\n\t\treturn NotificationService.instance\n\t}\n\n\t/**\n\t * Show a notification\n\t * @returns The ID of the created notification\n\t */\n\tpublic notify(options: NotificationOptions): string {\n\t\t// Apply default options\n\t\tconst completeOptions = {\n\t\t\t...NotificationService.DEFAULT_OPTIONS,\n\t\t\t...options,\n\t\t\t// Override with duraton from options if provided, otherwise use default\n\t\t\tduration: options.duration ?? NotificationService.DEFAULT_OPTIONS.duration,\n\t\t}\n\n\t\tconst id = completeOptions.id || `notification-${Date.now()}-${Math.floor(Math.random() * 10000)}`\n\n\t\t// Add to stack for tracking\n\t\tthis.notificationStack.push(id)\n\n\t\t// Remove existing notification if any (only 1 at a time)\n\t\tif (currentNotification) {\n\t\t\tcurrentNotification.remove()\n\t\t\tcurrentNotification = null\n\t\t}\n\n\t\t// Create the notification element directly\n\t\tconst notification = document.createElement('sch-notification') as SchmancyNotification\n\t\tnotification.id = id\n\t\tnotification.title = completeOptions.title || ''\n\t\tnotification.message = completeOptions.message\n\t\tnotification.type = completeOptions.type || 'info'\n\t\tnotification.duration = completeOptions.duration ?? 1000\n\t\tnotification.closable = completeOptions.closable !== false\n\t\tnotification.playSound = false // We handle sound here\n\t\tnotification.showProgress = completeOptions.showProgress || false\n\t\tnotification.startPosition = { ...lastClickPosition }\n\n\t\t// Play sound if enabled\n\t\tif (completeOptions.playSound !== false) {\n\t\t\t$sounds.play(typeToFeeling[notification.type])\n\t\t}\n\n\t\t// Listen for close event\n\t\tnotification.addEventListener('close', () => {\n\t\t\tconst index = this.notificationStack.indexOf(id)\n\t\t\tif (index > -1) {\n\t\t\t\tthis.notificationStack.splice(index, 1)\n\t\t\t}\n\t\t\tnotification.remove()\n\t\t\tif (currentNotification === notification) {\n\t\t\t\tcurrentNotification = null\n\t\t\t}\n\t\t})\n\n\t\t// Append to body\n\t\tdocument.body.appendChild(notification)\n\t\tcurrentNotification = notification\n\n\t\treturn id\n\t}\n\n\t/**\n\t * Dismiss a notification\n\t * @param id Optional notification ID. If not provided, dismisses the most recent notification\n\t */\n\tpublic dismiss(id?: string): void {\n\t\tlet targetId: string | undefined\n\n\t\tif (id) {\n\t\t\t// Remove specific notification from stack\n\t\t\tconst index = this.notificationStack.indexOf(id)\n\t\t\tif (index > -1) {\n\t\t\t\tthis.notificationStack.splice(index, 1)\n\t\t\t\ttargetId = id\n\t\t\t}\n\t\t} else {\n\t\t\t// Remove most recent notification (last in stack)\n\t\t\ttargetId = this.notificationStack.pop()\n\t\t}\n\n\t\tif (targetId && currentNotification && currentNotification.id === targetId) {\n\t\t\tcurrentNotification.close()\n\t\t}\n\t}\n\n\t/**\n\t * Update a notification's content\n\t */\n\tpublic update(id: string, options: Partial<NotificationOptions>): void {\n\t\tif (currentNotification && currentNotification.id === id) {\n\t\t\tif (options.title !== undefined) currentNotification.title = options.title\n\t\t\tif (options.message !== undefined) currentNotification.message = options.message\n\t\t\tif (options.type !== undefined) currentNotification.type = options.type\n\t\t}\n\t}\n\n\t/**\n\t * Show an info notification\n\t */\n\tpublic info(message?: string, options: Partial<Omit<NotificationOptions, 'message' | 'type'>> = {}): string {\n\t\treturn this.notify({\n\t\t\tmessage: message ?? '',\n\t\t\ttype: 'info',\n\t\t\tduration: message ? (options.duration ?? NotificationService.TYPE_DURATIONS.info) : 1,\n\t\t\t...options,\n\t\t})\n\t}\n\n\t/**\n\t * Show a success notification\n\t */\n\tpublic success(message?: string, options: Partial<Omit<NotificationOptions, 'message' | 'type'>> = {}): string {\n\t\treturn this.notify({\n\t\t\tmessage: message ?? '',\n\t\t\ttype: 'success',\n\t\t\tduration: message ? (options.duration ?? NotificationService.TYPE_DURATIONS.success) : 1,\n\t\t\t...options,\n\t\t})\n\t}\n\n\t/**\n\t * Show a warning notification\n\t */\n\tpublic warning(message?: string, options: Partial<Omit<NotificationOptions, 'message' | 'type'>> = {}): string {\n\t\treturn this.notify({\n\t\t\tmessage: message ?? '',\n\t\t\ttype: 'warning',\n\t\t\tduration: message ? (options.duration ?? NotificationService.TYPE_DURATIONS.warning) : 1,\n\t\t\t...options,\n\t\t})\n\t}\n\n\t/**\n\t * Show an error notification\n\t */\n\tpublic error(message?: string, options: Partial<Omit<NotificationOptions, 'message' | 'type'>> = {}): string {\n\t\treturn this.notify({\n\t\t\tmessage: message ?? '',\n\t\t\ttype: 'error',\n\t\t\tduration: message ? (options.duration ?? NotificationService.TYPE_DURATIONS.error) : 1,\n\t\t\t...options,\n\t\t})\n\t}\n\n\t/**\n\t * Show a notification with a custom duration\n\t */\n\tpublic customDuration(\n\t\tmessage: string,\n\t\tduration: number,\n\t\toptions: Partial<Omit<NotificationOptions, 'message' | 'duration'>> = {},\n\t): string {\n\t\treturn this.notify({\n\t\t\tmessage,\n\t\t\tduration,\n\t\t\t...options,\n\t\t})\n\t}\n\n\t/**\n\t * Show a persistent notification (won't auto-dismiss)\n\t */\n\tpublic persistent(message: string, options: Partial<Omit<NotificationOptions, 'message' | 'duration'>> = {}): string {\n\t\treturn this.notify({\n\t\t\tmessage,\n\t\t\tduration: 0, // Zero duration means no auto-close\n\t\t\t...options,\n\t\t})\n\t}\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\t/**\n\t * Show a notification\n\t */\n\tshow: (options: NotificationOptions): string => {\n\t\treturn NotificationService.getInstance().notify(options)\n\t},\n\n\t/**\n\t * Show an info notification\n\t */\n\tinfo: (message?: string, options: Partial<Omit<NotificationOptions, 'message' | 'type'>> = {}): string => {\n\t\treturn NotificationService.getInstance().info(message, options)\n\t},\n\n\t/**\n\t * Show a success notification\n\t */\n\tsuccess: (message?: string, options: Partial<Omit<NotificationOptions, 'message' | 'type'>> = {}): string => {\n\t\treturn NotificationService.getInstance().success(message, options)\n\t},\n\n\t/**\n\t * Show a warning notification\n\t */\n\twarning: (message?: string, options: Partial<Omit<NotificationOptions, 'message' | 'type'>> = {}): string => {\n\t\treturn NotificationService.getInstance().warning(message, options)\n\t},\n\n\t/**\n\t * Show an error notification\n\t */\n\terror: (message?: string, options: Partial<Omit<NotificationOptions, 'message' | 'type'>> = {}): string => {\n\t\treturn NotificationService.getInstance().error(message, options)\n\t},\n\n\t/**\n\t * Show a notification with a custom duration\n\t * @param message The notification message\n\t * @param duration Duration in milliseconds before auto-dismissing (0 for no auto-dismiss)\n\t * @param options Additional notification options\n\t */\n\tcustomDuration: (\n\t\tmessage: string,\n\t\tduration: number,\n\t\toptions: Partial<Omit<NotificationOptions, 'message' | 'duration'>> = {},\n\t): string => {\n\t\treturn NotificationService.getInstance().customDuration(message, duration, options)\n\t},\n\n\t/**\n\t * Show a persistent notification that won't auto-dismiss\n\t */\n\tpersistent: (message: string, options: Partial<Omit<NotificationOptions, 'message' | 'duration'>> = {}): string => {\n\t\treturn NotificationService.getInstance().persistent(message, options)\n\t},\n\n\t/**\n\t * Dismiss a notification\n\t * @param id Optional notification ID. If not provided, dismisses the most recent notification (queue-like behavior)\n\t */\n\tdismiss: (id?: string): void => {\n\t\treturn NotificationService.getInstance().dismiss(id)\n\t},\n\n\t/**\n\t * Update a notification's content\n\t */\n\tupdate: (id: string, options: Partial<NotificationOptions>): void => {\n\t\treturn NotificationService.getInstance().update(id, options)\n\t},\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":"wRCiCe,IAAA,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,MAAsB,IAAhB,KAAK,QAAA,CAAA,GAAA,KAAA,UAAA,CACtC,EAAA,KAAA,aAAA,CACG,EAAA,KAAA,cAC0B,CAAE,EAAG,EAAG,EAAG,EAAA,CAAA,KAAA,SAAA,CAErD,EAAA,KAAA,UACC,IAAA,KAAA,SAAA,CACD,EAAA,KAAA,SAAA,CACA,EAAA,KAAA,QAEV,IAAI,EAAA,gBAAA,CAAyB,EAAA,CAAA,KAAA,UAC3B,EAAA,KAAA,SACD,EAAA,KAAA,mBACU,EAAA,OAAA,KAAA,OApBb,EAAA,EAAA,EAAA,WAAA,8rEAAA,CAAA,CAsBhB,mBAAA,CACC,MAAM,mBAAA,CAGN,KAAK,MAAM,SAAW,QACtB,KAAK,MAAM,IAAM,OACjB,KAAK,MAAM,MAAQ,OACnB,KAAK,MAAM,OAAS,QACpB,KAAK,MAAM,QAAU,IAGrB,KAAK,eAAe,SAAA,CACnB,KAAK,WAAA,EAAA,CAIF,KAAK,SAAW,IACnB,KAAK,gBAAA,CACL,KAAK,sBAAA,EAGF,KAAK,WACR,KAAK,YAAA,CAIP,MAAA,WAAc,CAEb,IAAM,EAAO,KAAK,uBAAA,CACZ,EAAU,EAAK,KAAO,EAAK,MAAQ,EACnC,EAAU,EAAK,IAAM,EAAK,OAAS,EAGnC,EA5ER,SACC,EAC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jB,KAAM,EAAQ,aAAe,UAC7B,SAAU,EAAQ,iBAAmB,IAAA,CAAA,GAAA,EAIvC,EAAA,EAAA,YACU,GAAA,CAOX,GALI,GAAA,CAAwD,IAA/B,EAAQ,qBACpC,EAAQ,QAAQ,EAAA,CAChB,EAAA,IAAwB,IAGrB,EAAQ,aAAc,CACzB,IAAM,EAA0C,OAAzB,EAAQ,cAAiB,WAC7C,EAAQ,aAAa,EAAA,CACrB,EAAQ,aAEX,EAAQ,KAAK,CACZ,QAAA,EACA,KAAM,EAAQ,WAAa,QAC3B,SAAU,EAAQ,eAAiB,IAAA,CAAA,CAKrC,MAAM,GAAA,EACL,EAAA,EAAA,cAAA,CAGG,GAAA,CAAwD,IAA/B,EAAQ,oBACpC,EAAQ,QAAQ,EAAA,EAAA,CAAA,EAuBrB,SAAgB,EACf,EACA,EACA,EAAA,CAEA,OAAO,EAAU,CAChB,eAAA,EACA,eAAgB,GAAA,IAAkB,GAClC,aAAc,GAAA,IAAgB,GAC9B,mBAAA,CAAoB,EAAA,CAAA,CAAA,OAAA,eAAA,QAAA,IAAA,CAAA,WAAA,CAAA,EAAA,IAAA,UAAA,CAAA,OAAA,GAAA,CAAA,CAAA,OAAA,eAAA,QAAA,IAAA,CAAA,WAAA,CAAA,EAAA,IAAA,UAAA,CAAA,OAAA,GAAA,CAAA,CAAA,OAAA,eAAA,QAAA,IAAA,CAAA,WAAA,CAAA,EAAA,IAAA,UAAA,CAAA,OAAA,GAAA,CAAA,CAAA,OAAA,eAAA,QAAA,IAAA,CAAA,WAAA,CAAA,EAAA,IAAA,UAAA,CAAA,OAAA,GAAA,CAAA"}
|
|
1
|
+
{"version":3,"file":"notification-B3wVUC8l.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: flex-start;\n\tgap: 10px;\n\tpadding: 12px;\n\tpadding-right: 32px;\n\tbackground: var(--schmancy-sys-color-surface-container);\n\tborder-radius: var(--schmancy-sys-shape-corner-extraLarge, 16px);\n\tcolor: var(--schmancy-sys-color-surface-on);\n\tmax-width: 320px;\n\toverflow: hidden;\n\n\t/* Type-colored luminous glow */\n\t--notification-glow-color: var(--schmancy-sys-color-primary-default);\n\tbox-shadow: 0 4px 24px -6px color-mix(in srgb, var(--notification-glow-color) 18%, 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 { --notification-glow-color: var(--schmancy-sys-color-primary-default); }\n\t&.success { --notification-glow-color: var(--schmancy-sys-color-success-default); }\n\t&.warning { --notification-glow-color: var(--schmancy-sys-color-warning-default); }\n\t&.error { --notification-glow-color: var(--schmancy-sys-color-error-default); }\n\n\t&.hovered {\n\t\tbox-shadow: 0 8px 32px -4px color-mix(in srgb, var(--notification-glow-color) 28%, transparent);\n\t\ttransform: translateY(-2px);\n\t}\n\n\t@media (prefers-reduced-motion: reduce) {\n\t\ttransition: box-shadow 200ms ease;\n\t\t&.hovered { transform: none; }\n\t}\n}\n\n.emoji {\n\tfont-size: 20px;\n\tline-height: 1;\n\tflex-shrink: 0;\n\tmargin-top: 1px;\n}\n\n.content {\n\tflex: 1;\n\tmin-width: 0;\n}\n\n.title {\n\tfont-weight: 500;\n\tfont-size: 13px;\n\tline-height: 1.4;\n\tmargin-bottom: 2px;\n\tletter-spacing: 0.01em;\n\n\t.info & {\n\t\tcolor: var(--schmancy-sys-color-primary-default);\n\t}\n\t.success & {\n\t\tcolor: var(--schmancy-sys-color-success-default);\n\t}\n\t.warning & {\n\t\tcolor: var(--schmancy-sys-color-tertiary-default);\n\t}\n\t.error & {\n\t\tcolor: var(--schmancy-sys-color-error-default);\n\t}\n}\n\n.message {\n\tfont-size: 13px;\n\tline-height: 1.4;\n\topacity: 0.75;\n\tletter-spacing: 0.01em;\n}\n\n.close {\n\tposition: absolute;\n\ttop: 8px;\n\tright: 6px;\n\tbackground: none;\n\tborder: none;\n\tfont-size: 16px;\n\tfont-weight: 300;\n\tcolor: var(--schmancy-sys-color-surface-onVariant);\n\tcursor: pointer;\n\tpadding: 4px 6px;\n\tline-height: 1;\n\topacity: 0.4;\n\tborder-radius: var(--schmancy-sys-shape-corner-full, 50%);\n\ttransition: opacity 200ms ease;\n\n\t&:hover {\n\t\topacity: 0.8;\n\t}\n\n\t&:focus-visible {\n\t\toutline: none;\n\t\topacity: 1;\n\t\tbox-shadow:\n\t\t\t0 0 0 2px var(--schmancy-sys-color-primary-default),\n\t\t\t0 0 8px -2px color-mix(in srgb, var(--schmancy-sys-color-primary-default) 25%, transparent);\n\t}\n}\n\n.progress {\n\tposition: absolute;\n\tbottom: 0;\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 * Calculate a point on an arc between two points\n */\nfunction calculateArcPoint(\n\tstart: { x: number; y: number },\n\tend: { x: number; y: number },\n\tarcDirection: 'up' | 'down' = 'up',\n\tintensity: number = 0.3,\n): { x: number; y: number } {\n\tconst midX = (start.x + end.x) / 2\n\tconst midY = (start.y + end.y) / 2\n\tconst distance = Math.sqrt(Math.pow(end.x - start.x, 2) + Math.pow(end.y - start.y, 2))\n\tconst arcHeight = Math.min(distance * intensity, 150)\n\treturn {\n\t\tx: midX,\n\t\ty: arcDirection === 'up' ? midY - arcHeight : midY + arcHeight,\n\t}\n}\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 // 0 means no auto-close\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 // Show indeterminate progress bar\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\t// Set fixed positioning for blackbird animation\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\t// Animate in after first render\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\t// Get the notification element's final position\n\t\tconst rect = this.getBoundingClientRect()\n\t\tconst targetX = rect.left + rect.width / 2\n\t\tconst targetY = rect.top + rect.height / 2\n\n\t\t// Calculate arc point for upward arc\n\t\tconst arcPoint = calculateArcPoint(this.startPosition, { x: targetX, y: targetY }, 'up', 0.3)\n\n\t\t// Animate from click position to final position with arc\n\t\tawait this.animate(\n\t\t\t[\n\t\t\t\t{\n\t\t\t\t\ttransform: `translate(${this.startPosition.x - targetX}px, ${this.startPosition.y - targetY}px) scale(0.1)`,\n\t\t\t\t\topacity: 0,\n\t\t\t\t},\n\t\t\t\t{\n\t\t\t\t\ttransform: `translate(${arcPoint.x - targetX}px, ${arcPoint.y - targetY}px) scale(0.6)`,\n\t\t\t\t\topacity: 0.9,\n\t\t\t\t\toffset: 0.5,\n\t\t\t\t},\n\t\t\t\t{\n\t\t\t\t\ttransform: 'translate(0, 0) scale(1)',\n\t\t\t\t\topacity: 1,\n\t\t\t\t},\n\t\t\t],\n\t\t\t{\n\t\t\t\tduration: 400,\n\t\t\t\teasing: 'cubic-bezier(0.34, 1.2, 0.64, 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\t// Animate out before dispatching close event\n\t\tawait this.animate(\n\t\t\t[\n\t\t\t\t{ transform: 'translate(0, 0) scale(1)', opacity: 1 },\n\t\t\t\t{ transform: 'translate(0, -20px) scale(0.8)', opacity: 0 },\n\t\t\t],\n\t\t\t{\n\t\t\t\tduration: 200,\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 _getEmoji(): string {\n\t\tswitch (this.type) {\n\t\t\tcase 'success':\n\t\t\t\treturn '\\u2705'\n\t\t\tcase 'warning':\n\t\t\t\treturn '\\u26A0\\uFE0F'\n\t\t\tcase 'error':\n\t\t\t\treturn '\\u274C'\n\t\t\tdefault:\n\t\t\t\treturn '\\u{1F4A1}'\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<span class=\"emoji\">${this._getEmoji()}</span>\n\t\t\t\t<div class=\"content\">\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}>x</button>\n\t\t\t\t\t\t`\n\t\t\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\tclass=\"progress\"\n\t\t\t\t\t\tsize=\"xs\"\n\t\t\t\t\t\t.value=${this._progress}\n\t\t\t\t\t\t?indeterminate=${this.showProgress && this.duration === 0}\n\t\t\t\t\t></schmancy-progress>`\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 { $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\n// Track last mouse position\nlet lastClickPosition = { x: window.innerWidth - 100, y: 50 }\n\n// Global mousedown listener to track click position\nif (typeof window !== 'undefined') {\n\twindow.addEventListener(\n\t\t'mousedown',\n\t\t(e: MouseEvent) => {\n\t\t\tlastClickPosition = { x: e.clientX, y: e.clientY }\n\t\t},\n\t\t{ capture: true, passive: true },\n\t)\n}\n\n// Track current notification element\nlet currentNotification: SchmancyNotification | null = null\n\n/**\n * Notification service for centralized notification management.\n * Provides a simple API for showing notifications.\n */\nexport class NotificationService {\n\tprivate static instance: NotificationService\n\tprivate notificationStack: string[] = []\n\tprivate audioVolume = 0.1\n\n\t// Default notification options\n\tprivate static DEFAULT_OPTIONS: Partial<NotificationOptions> = {\n\t\tduration: 1000, // 1 seconds - long enough to be readable\n\t\tclosable: true,\n\t\tplaySound: true,\n\t}\n\n\t// Type-specific default durations (in milliseconds)\n\tprivate static TYPE_DURATIONS: Record<NotificationType, number> = {\n\t\tsuccess: 1500, // 1.5 seconds - quick confirmation\n\t\tinfo: 2000, // 2 seconds - informational\n\t\twarning: 2500, // 2.5 seconds - needs attention\n\t\terror: 2500, // 2.5 seconds - important\n\t}\n\n\t// Private constructor for singleton pattern\n\tprivate constructor() {\n\t\t$sounds.setVolume(this.audioVolume)\n\t}\n\n\t/**\n\t * Get the singleton instance\n\t */\n\tpublic static getInstance(): NotificationService {\n\t\tif (!NotificationService.instance) {\n\t\t\tNotificationService.instance = new NotificationService()\n\t\t}\n\t\treturn NotificationService.instance\n\t}\n\n\t/**\n\t * Show a notification\n\t * @returns The ID of the created notification\n\t */\n\tpublic notify(options: NotificationOptions): string {\n\t\t// Apply default options\n\t\tconst completeOptions = {\n\t\t\t...NotificationService.DEFAULT_OPTIONS,\n\t\t\t...options,\n\t\t\t// Override with duraton from options if provided, otherwise use default\n\t\t\tduration: options.duration ?? NotificationService.DEFAULT_OPTIONS.duration,\n\t\t}\n\n\t\tconst id = completeOptions.id || `notification-${Date.now()}-${Math.floor(Math.random() * 10000)}`\n\n\t\t// Add to stack for tracking\n\t\tthis.notificationStack.push(id)\n\n\t\t// Remove existing notification if any (only 1 at a time)\n\t\tif (currentNotification) {\n\t\t\tcurrentNotification.remove()\n\t\t\tcurrentNotification = null\n\t\t}\n\n\t\t// Create the notification element directly\n\t\tconst notification = document.createElement('sch-notification') as SchmancyNotification\n\t\tnotification.id = id\n\t\tnotification.title = completeOptions.title || ''\n\t\tnotification.message = completeOptions.message\n\t\tnotification.type = completeOptions.type || 'info'\n\t\tnotification.duration = completeOptions.duration ?? 1000\n\t\tnotification.closable = completeOptions.closable !== false\n\t\tnotification.playSound = false // We handle sound here\n\t\tnotification.showProgress = completeOptions.showProgress || false\n\t\tnotification.startPosition = { ...lastClickPosition }\n\n\t\t// Play sound if enabled\n\t\tif (completeOptions.playSound !== false) {\n\t\t\t$sounds.play(typeToFeeling[notification.type])\n\t\t}\n\n\t\t// Listen for close event\n\t\tnotification.addEventListener('close', () => {\n\t\t\tconst index = this.notificationStack.indexOf(id)\n\t\t\tif (index > -1) {\n\t\t\t\tthis.notificationStack.splice(index, 1)\n\t\t\t}\n\t\t\tnotification.remove()\n\t\t\tif (currentNotification === notification) {\n\t\t\t\tcurrentNotification = null\n\t\t\t}\n\t\t})\n\n\t\t// Append to body\n\t\tdocument.body.appendChild(notification)\n\t\tcurrentNotification = notification\n\n\t\treturn id\n\t}\n\n\t/**\n\t * Dismiss a notification\n\t * @param id Optional notification ID. If not provided, dismisses the most recent notification\n\t */\n\tpublic dismiss(id?: string): void {\n\t\tlet targetId: string | undefined\n\n\t\tif (id) {\n\t\t\t// Remove specific notification from stack\n\t\t\tconst index = this.notificationStack.indexOf(id)\n\t\t\tif (index > -1) {\n\t\t\t\tthis.notificationStack.splice(index, 1)\n\t\t\t\ttargetId = id\n\t\t\t}\n\t\t} else {\n\t\t\t// Remove most recent notification (last in stack)\n\t\t\ttargetId = this.notificationStack.pop()\n\t\t}\n\n\t\tif (targetId && currentNotification && currentNotification.id === targetId) {\n\t\t\tcurrentNotification.close()\n\t\t}\n\t}\n\n\t/**\n\t * Update a notification's content\n\t */\n\tpublic update(id: string, options: Partial<NotificationOptions>): void {\n\t\tif (currentNotification && currentNotification.id === id) {\n\t\t\tif (options.title !== undefined) currentNotification.title = options.title\n\t\t\tif (options.message !== undefined) currentNotification.message = options.message\n\t\t\tif (options.type !== undefined) currentNotification.type = options.type\n\t\t}\n\t}\n\n\t/**\n\t * Show an info notification\n\t */\n\tpublic info(message?: string, options: Partial<Omit<NotificationOptions, 'message' | 'type'>> = {}): string {\n\t\treturn this.notify({\n\t\t\tmessage: message ?? '',\n\t\t\ttype: 'info',\n\t\t\tduration: message ? (options.duration ?? NotificationService.TYPE_DURATIONS.info) : 1,\n\t\t\t...options,\n\t\t})\n\t}\n\n\t/**\n\t * Show a success notification\n\t */\n\tpublic success(message?: string, options: Partial<Omit<NotificationOptions, 'message' | 'type'>> = {}): string {\n\t\treturn this.notify({\n\t\t\tmessage: message ?? '',\n\t\t\ttype: 'success',\n\t\t\tduration: message ? (options.duration ?? NotificationService.TYPE_DURATIONS.success) : 1,\n\t\t\t...options,\n\t\t})\n\t}\n\n\t/**\n\t * Show a warning notification\n\t */\n\tpublic warning(message?: string, options: Partial<Omit<NotificationOptions, 'message' | 'type'>> = {}): string {\n\t\treturn this.notify({\n\t\t\tmessage: message ?? '',\n\t\t\ttype: 'warning',\n\t\t\tduration: message ? (options.duration ?? NotificationService.TYPE_DURATIONS.warning) : 1,\n\t\t\t...options,\n\t\t})\n\t}\n\n\t/**\n\t * Show an error notification\n\t */\n\tpublic error(message?: string, options: Partial<Omit<NotificationOptions, 'message' | 'type'>> = {}): string {\n\t\treturn this.notify({\n\t\t\tmessage: message ?? '',\n\t\t\ttype: 'error',\n\t\t\tduration: message ? (options.duration ?? NotificationService.TYPE_DURATIONS.error) : 1,\n\t\t\t...options,\n\t\t})\n\t}\n\n\t/**\n\t * Show a notification with a custom duration\n\t */\n\tpublic customDuration(\n\t\tmessage: string,\n\t\tduration: number,\n\t\toptions: Partial<Omit<NotificationOptions, 'message' | 'duration'>> = {},\n\t): string {\n\t\treturn this.notify({\n\t\t\tmessage,\n\t\t\tduration,\n\t\t\t...options,\n\t\t})\n\t}\n\n\t/**\n\t * Show a persistent notification (won't auto-dismiss)\n\t */\n\tpublic persistent(message: string, options: Partial<Omit<NotificationOptions, 'message' | 'duration'>> = {}): string {\n\t\treturn this.notify({\n\t\t\tmessage,\n\t\t\tduration: 0, // Zero duration means no auto-close\n\t\t\t...options,\n\t\t})\n\t}\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\t/**\n\t * Show a notification\n\t */\n\tshow: (options: NotificationOptions): string => {\n\t\treturn NotificationService.getInstance().notify(options)\n\t},\n\n\t/**\n\t * Show an info notification\n\t */\n\tinfo: (message?: string, options: Partial<Omit<NotificationOptions, 'message' | 'type'>> = {}): string => {\n\t\treturn NotificationService.getInstance().info(message, options)\n\t},\n\n\t/**\n\t * Show a success notification\n\t */\n\tsuccess: (message?: string, options: Partial<Omit<NotificationOptions, 'message' | 'type'>> = {}): string => {\n\t\treturn NotificationService.getInstance().success(message, options)\n\t},\n\n\t/**\n\t * Show a warning notification\n\t */\n\twarning: (message?: string, options: Partial<Omit<NotificationOptions, 'message' | 'type'>> = {}): string => {\n\t\treturn NotificationService.getInstance().warning(message, options)\n\t},\n\n\t/**\n\t * Show an error notification\n\t */\n\terror: (message?: string, options: Partial<Omit<NotificationOptions, 'message' | 'type'>> = {}): string => {\n\t\treturn NotificationService.getInstance().error(message, options)\n\t},\n\n\t/**\n\t * Show a notification with a custom duration\n\t * @param message The notification message\n\t * @param duration Duration in milliseconds before auto-dismissing (0 for no auto-dismiss)\n\t * @param options Additional notification options\n\t */\n\tcustomDuration: (\n\t\tmessage: string,\n\t\tduration: number,\n\t\toptions: Partial<Omit<NotificationOptions, 'message' | 'duration'>> = {},\n\t): string => {\n\t\treturn NotificationService.getInstance().customDuration(message, duration, options)\n\t},\n\n\t/**\n\t * Show a persistent notification that won't auto-dismiss\n\t */\n\tpersistent: (message: string, options: Partial<Omit<NotificationOptions, 'message' | 'duration'>> = {}): string => {\n\t\treturn NotificationService.getInstance().persistent(message, options)\n\t},\n\n\t/**\n\t * Dismiss a notification\n\t * @param id Optional notification ID. If not provided, dismisses the most recent notification (queue-like behavior)\n\t */\n\tdismiss: (id?: string): void => {\n\t\treturn NotificationService.getInstance().dismiss(id)\n\t},\n\n\t/**\n\t * Update a notification's content\n\t */\n\tupdate: (id: string, options: Partial<NotificationOptions>): void => {\n\t\treturn NotificationService.getInstance().update(id, options)\n\t},\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":"wRCiCe,IAAA,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,MAAsB,IAAhB,KAAK,QAAA,CAAA,GAAA,KAAA,UAAA,CACtC,EAAA,KAAA,aAAA,CACG,EAAA,KAAA,cAC0B,CAAE,EAAG,EAAG,EAAG,EAAA,CAAA,KAAA,SAAA,CAErD,EAAA,KAAA,UACC,IAAA,KAAA,SAAA,CACD,EAAA,KAAA,SAAA,CACA,EAAA,KAAA,QAEV,IAAI,EAAA,gBAAA,CAAyB,EAAA,CAAA,KAAA,UAC3B,EAAA,KAAA,SACD,EAAA,KAAA,mBACU,EAAA,OAAA,KAAA,OApBb,EAAA,EAAA,EAAA,WAAA,8rEAAA,CAAA,CAsBhB,mBAAA,CACC,MAAM,mBAAA,CAGN,KAAK,MAAM,SAAW,QACtB,KAAK,MAAM,IAAM,OACjB,KAAK,MAAM,MAAQ,OACnB,KAAK,MAAM,OAAS,QACpB,KAAK,MAAM,QAAU,IAGrB,KAAK,eAAe,SAAA,CACnB,KAAK,WAAA,EAAA,CAIF,KAAK,SAAW,IACnB,KAAK,gBAAA,CACL,KAAK,sBAAA,EAGF,KAAK,WACR,KAAK,YAAA,CAIP,MAAA,WAAc,CAEb,IAAM,EAAO,KAAK,uBAAA,CACZ,EAAU,EAAK,KAAO,EAAK,MAAQ,EACnC,EAAU,EAAK,IAAM,EAAK,OAAS,EAGnC,EA5ER,SACC,EACA,EACA,EAA8B,KAC9B,EAAoB,GAA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AU,EAAQ,iBAAmB,IAAA,CAAA,GAAA,EAIvC,EAAA,EAAA,YACU,GAAA,CAOX,GALI,GAAA,CAAwD,IAA/B,EAAQ,qBACpC,EAAQ,QAAQ,EAAA,CAChB,EAAA,IAAwB,IAGrB,EAAQ,aAAc,CACzB,IAAM,EAA0C,OAAzB,EAAQ,cAAiB,WAC7C,EAAQ,aAAa,EAAA,CACrB,EAAQ,aAEX,EAAQ,KAAK,CACZ,QAAA,EACA,KAAM,EAAQ,WAAa,QAC3B,SAAU,EAAQ,eAAiB,IAAA,CAAA,CAKrC,MAAM,GAAA,EACL,EAAA,EAAA,cAAA,CAGG,GAAA,CAAwD,IAA/B,EAAQ,oBACpC,EAAQ,QAAQ,EAAA,EAAA,CAAA,EAuBrB,SAAgB,EACf,EACA,EACA,EAAA,CAEA,OAAO,EAAU,CAChB,eAAA,EACA,eAAgB,GAAA,IAAkB,GAClC,aAAc,GAAA,IAAgB,GAC9B,mBAAA,CAAoB,EAAA,CAAA,CAAA,OAAA,eAAA,QAAA,IAAA,CAAA,WAAA,CAAA,EAAA,IAAA,UAAA,CAAA,OAAA,GAAA,CAAA,CAAA,OAAA,eAAA,QAAA,IAAA,CAAA,WAAA,CAAA,EAAA,IAAA,UAAA,CAAA,OAAA,GAAA,CAAA,CAAA,OAAA,eAAA,QAAA,IAAA,CAAA,WAAA,CAAA,EAAA,IAAA,UAAA,CAAA,OAAA,GAAA,CAAA,CAAA,OAAA,eAAA,QAAA,IAAA,CAAA,WAAA,CAAA,EAAA,IAAA,UAAA,CAAA,OAAA,GAAA,CAAA"}
|
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import { c as e } from "./mixins-
|
|
1
|
+
import { c as e } from "./mixins-C42OILRS.js";
|
|
2
2
|
import { a as t } from "./active-host-BP0zy_Y9.js";
|
|
3
3
|
import { t as n } from "./audio-CxO5a2HL.js";
|
|
4
|
-
import "./progress-
|
|
4
|
+
import "./progress-CnMPp-9a.js";
|
|
5
5
|
import { BehaviorSubject as r, NEVER as i, catchError as a, finalize as o, interval as s, tap as c, timer as l } from "rxjs";
|
|
6
6
|
import { distinctUntilChanged as u, map as d, switchMap as f, takeUntil as p, tap as m } from "rxjs/operators";
|
|
7
7
|
import { customElement as h, property as g, state as _ } from "lit/decorators.js";
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"notification-CgTBiAdf.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: flex-start;\n\tgap: 10px;\n\tpadding: 12px;\n\tpadding-right: 32px;\n\tbackground: var(--schmancy-sys-color-surface-container);\n\tborder-radius: var(--schmancy-sys-shape-corner-extraLarge, 16px);\n\tcolor: var(--schmancy-sys-color-surface-on);\n\tmax-width: 320px;\n\toverflow: hidden;\n\n\t/* Type-colored luminous glow */\n\t--notification-glow-color: var(--schmancy-sys-color-primary-default);\n\tbox-shadow: 0 4px 24px -6px color-mix(in srgb, var(--notification-glow-color) 18%, 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 { --notification-glow-color: var(--schmancy-sys-color-primary-default); }\n\t&.success { --notification-glow-color: var(--schmancy-sys-color-success-default); }\n\t&.warning { --notification-glow-color: var(--schmancy-sys-color-warning-default); }\n\t&.error { --notification-glow-color: var(--schmancy-sys-color-error-default); }\n\n\t&.hovered {\n\t\tbox-shadow: 0 8px 32px -4px color-mix(in srgb, var(--notification-glow-color) 28%, transparent);\n\t\ttransform: translateY(-2px);\n\t}\n\n\t@media (prefers-reduced-motion: reduce) {\n\t\ttransition: box-shadow 200ms ease;\n\t\t&.hovered { transform: none; }\n\t}\n}\n\n.emoji {\n\tfont-size: 20px;\n\tline-height: 1;\n\tflex-shrink: 0;\n\tmargin-top: 1px;\n}\n\n.content {\n\tflex: 1;\n\tmin-width: 0;\n}\n\n.title {\n\tfont-weight: 500;\n\tfont-size: 13px;\n\tline-height: 1.4;\n\tmargin-bottom: 2px;\n\tletter-spacing: 0.01em;\n\n\t.info & {\n\t\tcolor: var(--schmancy-sys-color-primary-default);\n\t}\n\t.success & {\n\t\tcolor: var(--schmancy-sys-color-success-default);\n\t}\n\t.warning & {\n\t\tcolor: var(--schmancy-sys-color-tertiary-default);\n\t}\n\t.error & {\n\t\tcolor: var(--schmancy-sys-color-error-default);\n\t}\n}\n\n.message {\n\tfont-size: 13px;\n\tline-height: 1.4;\n\topacity: 0.75;\n\tletter-spacing: 0.01em;\n}\n\n.close {\n\tposition: absolute;\n\ttop: 8px;\n\tright: 6px;\n\tbackground: none;\n\tborder: none;\n\tfont-size: 16px;\n\tfont-weight: 300;\n\tcolor: var(--schmancy-sys-color-surface-onVariant);\n\tcursor: pointer;\n\tpadding: 4px 6px;\n\tline-height: 1;\n\topacity: 0.4;\n\tborder-radius: var(--schmancy-sys-shape-corner-full, 50%);\n\ttransition: opacity 200ms ease;\n\n\t&:hover {\n\t\topacity: 0.8;\n\t}\n\n\t&:focus-visible {\n\t\toutline: none;\n\t\topacity: 1;\n\t\tbox-shadow:\n\t\t\t0 0 0 2px var(--schmancy-sys-color-primary-default),\n\t\t\t0 0 8px -2px color-mix(in srgb, var(--schmancy-sys-color-primary-default) 25%, transparent);\n\t}\n}\n\n.progress {\n\tposition: absolute;\n\tbottom: 0;\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 * Calculate a point on an arc between two points\n */\nfunction calculateArcPoint(\n\tstart: { x: number; y: number },\n\tend: { x: number; y: number },\n\tarcDirection: 'up' | 'down' = 'up',\n\tintensity: number = 0.3,\n): { x: number; y: number } {\n\tconst midX = (start.x + end.x) / 2\n\tconst midY = (start.y + end.y) / 2\n\tconst distance = Math.sqrt(Math.pow(end.x - start.x, 2) + Math.pow(end.y - start.y, 2))\n\tconst arcHeight = Math.min(distance * intensity, 150)\n\treturn {\n\t\tx: midX,\n\t\ty: arcDirection === 'up' ? midY - arcHeight : midY + arcHeight,\n\t}\n}\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 // 0 means no auto-close\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 // Show indeterminate progress bar\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\t// Set fixed positioning for blackbird animation\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\t// Animate in after first render\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\t// Get the notification element's final position\n\t\tconst rect = this.getBoundingClientRect()\n\t\tconst targetX = rect.left + rect.width / 2\n\t\tconst targetY = rect.top + rect.height / 2\n\n\t\t// Calculate arc point for upward arc\n\t\tconst arcPoint = calculateArcPoint(this.startPosition, { x: targetX, y: targetY }, 'up', 0.3)\n\n\t\t// Animate from click position to final position with arc\n\t\tawait this.animate(\n\t\t\t[\n\t\t\t\t{\n\t\t\t\t\ttransform: `translate(${this.startPosition.x - targetX}px, ${this.startPosition.y - targetY}px) scale(0.1)`,\n\t\t\t\t\topacity: 0,\n\t\t\t\t},\n\t\t\t\t{\n\t\t\t\t\ttransform: `translate(${arcPoint.x - targetX}px, ${arcPoint.y - targetY}px) scale(0.6)`,\n\t\t\t\t\topacity: 0.9,\n\t\t\t\t\toffset: 0.5,\n\t\t\t\t},\n\t\t\t\t{\n\t\t\t\t\ttransform: 'translate(0, 0) scale(1)',\n\t\t\t\t\topacity: 1,\n\t\t\t\t},\n\t\t\t],\n\t\t\t{\n\t\t\t\tduration: 400,\n\t\t\t\teasing: 'cubic-bezier(0.34, 1.2, 0.64, 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\t// Animate out before dispatching close event\n\t\tawait this.animate(\n\t\t\t[\n\t\t\t\t{ transform: 'translate(0, 0) scale(1)', opacity: 1 },\n\t\t\t\t{ transform: 'translate(0, -20px) scale(0.8)', opacity: 0 },\n\t\t\t],\n\t\t\t{\n\t\t\t\tduration: 200,\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 _getEmoji(): string {\n\t\tswitch (this.type) {\n\t\t\tcase 'success':\n\t\t\t\treturn '\\u2705'\n\t\t\tcase 'warning':\n\t\t\t\treturn '\\u26A0\\uFE0F'\n\t\t\tcase 'error':\n\t\t\t\treturn '\\u274C'\n\t\t\tdefault:\n\t\t\t\treturn '\\u{1F4A1}'\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<span class=\"emoji\">${this._getEmoji()}</span>\n\t\t\t\t<div class=\"content\">\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}>x</button>\n\t\t\t\t\t\t`\n\t\t\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\tclass=\"progress\"\n\t\t\t\t\t\tsize=\"xs\"\n\t\t\t\t\t\t.value=${this._progress}\n\t\t\t\t\t\t?indeterminate=${this.showProgress && this.duration === 0}\n\t\t\t\t\t></schmancy-progress>`\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 { $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\n// Track last mouse position\nlet lastClickPosition = { x: window.innerWidth - 100, y: 50 }\n\n// Global mousedown listener to track click position\nif (typeof window !== 'undefined') {\n\twindow.addEventListener(\n\t\t'mousedown',\n\t\t(e: MouseEvent) => {\n\t\t\tlastClickPosition = { x: e.clientX, y: e.clientY }\n\t\t},\n\t\t{ capture: true, passive: true },\n\t)\n}\n\n// Track current notification element\nlet currentNotification: SchmancyNotification | null = null\n\n/**\n * Notification service for centralized notification management.\n * Provides a simple API for showing notifications.\n */\nexport class NotificationService {\n\tprivate static instance: NotificationService\n\tprivate notificationStack: string[] = []\n\tprivate audioVolume = 0.1\n\n\t// Default notification options\n\tprivate static DEFAULT_OPTIONS: Partial<NotificationOptions> = {\n\t\tduration: 1000, // 1 seconds - long enough to be readable\n\t\tclosable: true,\n\t\tplaySound: true,\n\t}\n\n\t// Type-specific default durations (in milliseconds)\n\tprivate static TYPE_DURATIONS: Record<NotificationType, number> = {\n\t\tsuccess: 1500, // 1.5 seconds - quick confirmation\n\t\tinfo: 2000, // 2 seconds - informational\n\t\twarning: 2500, // 2.5 seconds - needs attention\n\t\terror: 2500, // 2.5 seconds - important\n\t}\n\n\t// Private constructor for singleton pattern\n\tprivate constructor() {\n\t\t$sounds.setVolume(this.audioVolume)\n\t}\n\n\t/**\n\t * Get the singleton instance\n\t */\n\tpublic static getInstance(): NotificationService {\n\t\tif (!NotificationService.instance) {\n\t\t\tNotificationService.instance = new NotificationService()\n\t\t}\n\t\treturn NotificationService.instance\n\t}\n\n\t/**\n\t * Show a notification\n\t * @returns The ID of the created notification\n\t */\n\tpublic notify(options: NotificationOptions): string {\n\t\t// Apply default options\n\t\tconst completeOptions = {\n\t\t\t...NotificationService.DEFAULT_OPTIONS,\n\t\t\t...options,\n\t\t\t// Override with duraton from options if provided, otherwise use default\n\t\t\tduration: options.duration ?? NotificationService.DEFAULT_OPTIONS.duration,\n\t\t}\n\n\t\tconst id = completeOptions.id || `notification-${Date.now()}-${Math.floor(Math.random() * 10000)}`\n\n\t\t// Add to stack for tracking\n\t\tthis.notificationStack.push(id)\n\n\t\t// Remove existing notification if any (only 1 at a time)\n\t\tif (currentNotification) {\n\t\t\tcurrentNotification.remove()\n\t\t\tcurrentNotification = null\n\t\t}\n\n\t\t// Create the notification element directly\n\t\tconst notification = document.createElement('sch-notification') as SchmancyNotification\n\t\tnotification.id = id\n\t\tnotification.title = completeOptions.title || ''\n\t\tnotification.message = completeOptions.message\n\t\tnotification.type = completeOptions.type || 'info'\n\t\tnotification.duration = completeOptions.duration ?? 1000\n\t\tnotification.closable = completeOptions.closable !== false\n\t\tnotification.playSound = false // We handle sound here\n\t\tnotification.showProgress = completeOptions.showProgress || false\n\t\tnotification.startPosition = { ...lastClickPosition }\n\n\t\t// Play sound if enabled\n\t\tif (completeOptions.playSound !== false) {\n\t\t\t$sounds.play(typeToFeeling[notification.type])\n\t\t}\n\n\t\t// Listen for close event\n\t\tnotification.addEventListener('close', () => {\n\t\t\tconst index = this.notificationStack.indexOf(id)\n\t\t\tif (index > -1) {\n\t\t\t\tthis.notificationStack.splice(index, 1)\n\t\t\t}\n\t\t\tnotification.remove()\n\t\t\tif (currentNotification === notification) {\n\t\t\t\tcurrentNotification = null\n\t\t\t}\n\t\t})\n\n\t\t// Append to body\n\t\tdocument.body.appendChild(notification)\n\t\tcurrentNotification = notification\n\n\t\treturn id\n\t}\n\n\t/**\n\t * Dismiss a notification\n\t * @param id Optional notification ID. If not provided, dismisses the most recent notification\n\t */\n\tpublic dismiss(id?: string): void {\n\t\tlet targetId: string | undefined\n\n\t\tif (id) {\n\t\t\t// Remove specific notification from stack\n\t\t\tconst index = this.notificationStack.indexOf(id)\n\t\t\tif (index > -1) {\n\t\t\t\tthis.notificationStack.splice(index, 1)\n\t\t\t\ttargetId = id\n\t\t\t}\n\t\t} else {\n\t\t\t// Remove most recent notification (last in stack)\n\t\t\ttargetId = this.notificationStack.pop()\n\t\t}\n\n\t\tif (targetId && currentNotification && currentNotification.id === targetId) {\n\t\t\tcurrentNotification.close()\n\t\t}\n\t}\n\n\t/**\n\t * Update a notification's content\n\t */\n\tpublic update(id: string, options: Partial<NotificationOptions>): void {\n\t\tif (currentNotification && currentNotification.id === id) {\n\t\t\tif (options.title !== undefined) currentNotification.title = options.title\n\t\t\tif (options.message !== undefined) currentNotification.message = options.message\n\t\t\tif (options.type !== undefined) currentNotification.type = options.type\n\t\t}\n\t}\n\n\t/**\n\t * Show an info notification\n\t */\n\tpublic info(message?: string, options: Partial<Omit<NotificationOptions, 'message' | 'type'>> = {}): string {\n\t\treturn this.notify({\n\t\t\tmessage: message ?? '',\n\t\t\ttype: 'info',\n\t\t\tduration: message ? (options.duration ?? NotificationService.TYPE_DURATIONS.info) : 1,\n\t\t\t...options,\n\t\t})\n\t}\n\n\t/**\n\t * Show a success notification\n\t */\n\tpublic success(message?: string, options: Partial<Omit<NotificationOptions, 'message' | 'type'>> = {}): string {\n\t\treturn this.notify({\n\t\t\tmessage: message ?? '',\n\t\t\ttype: 'success',\n\t\t\tduration: message ? (options.duration ?? NotificationService.TYPE_DURATIONS.success) : 1,\n\t\t\t...options,\n\t\t})\n\t}\n\n\t/**\n\t * Show a warning notification\n\t */\n\tpublic warning(message?: string, options: Partial<Omit<NotificationOptions, 'message' | 'type'>> = {}): string {\n\t\treturn this.notify({\n\t\t\tmessage: message ?? '',\n\t\t\ttype: 'warning',\n\t\t\tduration: message ? (options.duration ?? NotificationService.TYPE_DURATIONS.warning) : 1,\n\t\t\t...options,\n\t\t})\n\t}\n\n\t/**\n\t * Show an error notification\n\t */\n\tpublic error(message?: string, options: Partial<Omit<NotificationOptions, 'message' | 'type'>> = {}): string {\n\t\treturn this.notify({\n\t\t\tmessage: message ?? '',\n\t\t\ttype: 'error',\n\t\t\tduration: message ? (options.duration ?? NotificationService.TYPE_DURATIONS.error) : 1,\n\t\t\t...options,\n\t\t})\n\t}\n\n\t/**\n\t * Show a notification with a custom duration\n\t */\n\tpublic customDuration(\n\t\tmessage: string,\n\t\tduration: number,\n\t\toptions: Partial<Omit<NotificationOptions, 'message' | 'duration'>> = {},\n\t): string {\n\t\treturn this.notify({\n\t\t\tmessage,\n\t\t\tduration,\n\t\t\t...options,\n\t\t})\n\t}\n\n\t/**\n\t * Show a persistent notification (won't auto-dismiss)\n\t */\n\tpublic persistent(message: string, options: Partial<Omit<NotificationOptions, 'message' | 'duration'>> = {}): string {\n\t\treturn this.notify({\n\t\t\tmessage,\n\t\t\tduration: 0, // Zero duration means no auto-close\n\t\t\t...options,\n\t\t})\n\t}\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\t/**\n\t * Show a notification\n\t */\n\tshow: (options: NotificationOptions): string => {\n\t\treturn NotificationService.getInstance().notify(options)\n\t},\n\n\t/**\n\t * Show an info notification\n\t */\n\tinfo: (message?: string, options: Partial<Omit<NotificationOptions, 'message' | 'type'>> = {}): string => {\n\t\treturn NotificationService.getInstance().info(message, options)\n\t},\n\n\t/**\n\t * Show a success notification\n\t */\n\tsuccess: (message?: string, options: Partial<Omit<NotificationOptions, 'message' | 'type'>> = {}): string => {\n\t\treturn NotificationService.getInstance().success(message, options)\n\t},\n\n\t/**\n\t * Show a warning notification\n\t */\n\twarning: (message?: string, options: Partial<Omit<NotificationOptions, 'message' | 'type'>> = {}): string => {\n\t\treturn NotificationService.getInstance().warning(message, options)\n\t},\n\n\t/**\n\t * Show an error notification\n\t */\n\terror: (message?: string, options: Partial<Omit<NotificationOptions, 'message' | 'type'>> = {}): string => {\n\t\treturn NotificationService.getInstance().error(message, options)\n\t},\n\n\t/**\n\t * Show a notification with a custom duration\n\t * @param message The notification message\n\t * @param duration Duration in milliseconds before auto-dismissing (0 for no auto-dismiss)\n\t * @param options Additional notification options\n\t */\n\tcustomDuration: (\n\t\tmessage: string,\n\t\tduration: number,\n\t\toptions: Partial<Omit<NotificationOptions, 'message' | 'duration'>> = {},\n\t): string => {\n\t\treturn NotificationService.getInstance().customDuration(message, duration, options)\n\t},\n\n\t/**\n\t * Show a persistent notification that won't auto-dismiss\n\t */\n\tpersistent: (message: string, options: Partial<Omit<NotificationOptions, 'message' | 'duration'>> = {}): string => {\n\t\treturn NotificationService.getInstance().persistent(message, options)\n\t},\n\n\t/**\n\t * Dismiss a notification\n\t * @param id Optional notification ID. If not provided, dismisses the most recent notification (queue-like behavior)\n\t */\n\tdismiss: (id?: string): void => {\n\t\treturn NotificationService.getInstance().dismiss(id)\n\t},\n\n\t/**\n\t * Update a notification's content\n\t */\n\tupdate: (id: string, options: Partial<NotificationOptions>): void => {\n\t\treturn NotificationService.getInstance().update(id, options)\n\t},\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":";;;;;;;;ACiCe,IAAA,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,gBAC0B;GAAE,GAAG;GAAG,GAAG;GAAA,EAAA,KAAA,WAAA,CAErD,GAAA,KAAA,YACC,KAAA,KAAA,WAAA,CACD,GAAA,KAAA,WAAA,CACA,GAAA,KAAA,UAEV,IAAI,EAAA,CAAyB,EAAA,EAAA,KAAA,YAC3B,GAAA,KAAA,WACD,GAAA,KAAA,qBACU;;CAAA;EAAA,KAAA,SApBb,CAAC,EAAA,8rEAAA,CAAA;;CAsBjB,oBAAA;EACC,MAAM,mBAAA,EAGN,KAAK,MAAM,WAAW,SACtB,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KAAK;IACZ,SAAS,EAAQ;IACjB,MAAM,EAAQ,eAAe;IAC7B,UAAU,EAAQ,mBAAmB;IAAA,CAAA;IAAA,EAKzC,GAAY,MAAA;GAOX,IALI,KAAA,CAAwD,MAA/B,EAAQ,uBACpC,EAAQ,QAAQ,EAAA,EAChB,IAAA,KAAwB,IAGrB,EAAQ,cAAc;IACzB,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"}
|
|
1
|
+
{"version":3,"file":"notification-CllYkvlR.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: flex-start;\n\tgap: 10px;\n\tpadding: 12px;\n\tpadding-right: 32px;\n\tbackground: var(--schmancy-sys-color-surface-container);\n\tborder-radius: var(--schmancy-sys-shape-corner-extraLarge, 16px);\n\tcolor: var(--schmancy-sys-color-surface-on);\n\tmax-width: 320px;\n\toverflow: hidden;\n\n\t/* Type-colored luminous glow */\n\t--notification-glow-color: var(--schmancy-sys-color-primary-default);\n\tbox-shadow: 0 4px 24px -6px color-mix(in srgb, var(--notification-glow-color) 18%, 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 { --notification-glow-color: var(--schmancy-sys-color-primary-default); }\n\t&.success { --notification-glow-color: var(--schmancy-sys-color-success-default); }\n\t&.warning { --notification-glow-color: var(--schmancy-sys-color-warning-default); }\n\t&.error { --notification-glow-color: var(--schmancy-sys-color-error-default); }\n\n\t&.hovered {\n\t\tbox-shadow: 0 8px 32px -4px color-mix(in srgb, var(--notification-glow-color) 28%, transparent);\n\t\ttransform: translateY(-2px);\n\t}\n\n\t@media (prefers-reduced-motion: reduce) {\n\t\ttransition: box-shadow 200ms ease;\n\t\t&.hovered { transform: none; }\n\t}\n}\n\n.emoji {\n\tfont-size: 20px;\n\tline-height: 1;\n\tflex-shrink: 0;\n\tmargin-top: 1px;\n}\n\n.content {\n\tflex: 1;\n\tmin-width: 0;\n}\n\n.title {\n\tfont-weight: 500;\n\tfont-size: 13px;\n\tline-height: 1.4;\n\tmargin-bottom: 2px;\n\tletter-spacing: 0.01em;\n\n\t.info & {\n\t\tcolor: var(--schmancy-sys-color-primary-default);\n\t}\n\t.success & {\n\t\tcolor: var(--schmancy-sys-color-success-default);\n\t}\n\t.warning & {\n\t\tcolor: var(--schmancy-sys-color-tertiary-default);\n\t}\n\t.error & {\n\t\tcolor: var(--schmancy-sys-color-error-default);\n\t}\n}\n\n.message {\n\tfont-size: 13px;\n\tline-height: 1.4;\n\topacity: 0.75;\n\tletter-spacing: 0.01em;\n}\n\n.close {\n\tposition: absolute;\n\ttop: 8px;\n\tright: 6px;\n\tbackground: none;\n\tborder: none;\n\tfont-size: 16px;\n\tfont-weight: 300;\n\tcolor: var(--schmancy-sys-color-surface-onVariant);\n\tcursor: pointer;\n\tpadding: 4px 6px;\n\tline-height: 1;\n\topacity: 0.4;\n\tborder-radius: var(--schmancy-sys-shape-corner-full, 50%);\n\ttransition: opacity 200ms ease;\n\n\t&:hover {\n\t\topacity: 0.8;\n\t}\n\n\t&:focus-visible {\n\t\toutline: none;\n\t\topacity: 1;\n\t\tbox-shadow:\n\t\t\t0 0 0 2px var(--schmancy-sys-color-primary-default),\n\t\t\t0 0 8px -2px color-mix(in srgb, var(--schmancy-sys-color-primary-default) 25%, transparent);\n\t}\n}\n\n.progress {\n\tposition: absolute;\n\tbottom: 0;\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 * Calculate a point on an arc between two points\n */\nfunction calculateArcPoint(\n\tstart: { x: number; y: number },\n\tend: { x: number; y: number },\n\tarcDirection: 'up' | 'down' = 'up',\n\tintensity: number = 0.3,\n): { x: number; y: number } {\n\tconst midX = (start.x + end.x) / 2\n\tconst midY = (start.y + end.y) / 2\n\tconst distance = Math.sqrt(Math.pow(end.x - start.x, 2) + Math.pow(end.y - start.y, 2))\n\tconst arcHeight = Math.min(distance * intensity, 150)\n\treturn {\n\t\tx: midX,\n\t\ty: arcDirection === 'up' ? midY - arcHeight : midY + arcHeight,\n\t}\n}\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 // 0 means no auto-close\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 // Show indeterminate progress bar\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\t// Set fixed positioning for blackbird animation\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\t// Animate in after first render\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\t// Get the notification element's final position\n\t\tconst rect = this.getBoundingClientRect()\n\t\tconst targetX = rect.left + rect.width / 2\n\t\tconst targetY = rect.top + rect.height / 2\n\n\t\t// Calculate arc point for upward arc\n\t\tconst arcPoint = calculateArcPoint(this.startPosition, { x: targetX, y: targetY }, 'up', 0.3)\n\n\t\t// Animate from click position to final position with arc\n\t\tawait this.animate(\n\t\t\t[\n\t\t\t\t{\n\t\t\t\t\ttransform: `translate(${this.startPosition.x - targetX}px, ${this.startPosition.y - targetY}px) scale(0.1)`,\n\t\t\t\t\topacity: 0,\n\t\t\t\t},\n\t\t\t\t{\n\t\t\t\t\ttransform: `translate(${arcPoint.x - targetX}px, ${arcPoint.y - targetY}px) scale(0.6)`,\n\t\t\t\t\topacity: 0.9,\n\t\t\t\t\toffset: 0.5,\n\t\t\t\t},\n\t\t\t\t{\n\t\t\t\t\ttransform: 'translate(0, 0) scale(1)',\n\t\t\t\t\topacity: 1,\n\t\t\t\t},\n\t\t\t],\n\t\t\t{\n\t\t\t\tduration: 400,\n\t\t\t\teasing: 'cubic-bezier(0.34, 1.2, 0.64, 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\t// Animate out before dispatching close event\n\t\tawait this.animate(\n\t\t\t[\n\t\t\t\t{ transform: 'translate(0, 0) scale(1)', opacity: 1 },\n\t\t\t\t{ transform: 'translate(0, -20px) scale(0.8)', opacity: 0 },\n\t\t\t],\n\t\t\t{\n\t\t\t\tduration: 200,\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 _getEmoji(): string {\n\t\tswitch (this.type) {\n\t\t\tcase 'success':\n\t\t\t\treturn '\\u2705'\n\t\t\tcase 'warning':\n\t\t\t\treturn '\\u26A0\\uFE0F'\n\t\t\tcase 'error':\n\t\t\t\treturn '\\u274C'\n\t\t\tdefault:\n\t\t\t\treturn '\\u{1F4A1}'\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<span class=\"emoji\">${this._getEmoji()}</span>\n\t\t\t\t<div class=\"content\">\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}>x</button>\n\t\t\t\t\t\t`\n\t\t\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\tclass=\"progress\"\n\t\t\t\t\t\tsize=\"xs\"\n\t\t\t\t\t\t.value=${this._progress}\n\t\t\t\t\t\t?indeterminate=${this.showProgress && this.duration === 0}\n\t\t\t\t\t></schmancy-progress>`\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 { $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\n// Track last mouse position\nlet lastClickPosition = { x: window.innerWidth - 100, y: 50 }\n\n// Global mousedown listener to track click position\nif (typeof window !== 'undefined') {\n\twindow.addEventListener(\n\t\t'mousedown',\n\t\t(e: MouseEvent) => {\n\t\t\tlastClickPosition = { x: e.clientX, y: e.clientY }\n\t\t},\n\t\t{ capture: true, passive: true },\n\t)\n}\n\n// Track current notification element\nlet currentNotification: SchmancyNotification | null = null\n\n/**\n * Notification service for centralized notification management.\n * Provides a simple API for showing notifications.\n */\nexport class NotificationService {\n\tprivate static instance: NotificationService\n\tprivate notificationStack: string[] = []\n\tprivate audioVolume = 0.1\n\n\t// Default notification options\n\tprivate static DEFAULT_OPTIONS: Partial<NotificationOptions> = {\n\t\tduration: 1000, // 1 seconds - long enough to be readable\n\t\tclosable: true,\n\t\tplaySound: true,\n\t}\n\n\t// Type-specific default durations (in milliseconds)\n\tprivate static TYPE_DURATIONS: Record<NotificationType, number> = {\n\t\tsuccess: 1500, // 1.5 seconds - quick confirmation\n\t\tinfo: 2000, // 2 seconds - informational\n\t\twarning: 2500, // 2.5 seconds - needs attention\n\t\terror: 2500, // 2.5 seconds - important\n\t}\n\n\t// Private constructor for singleton pattern\n\tprivate constructor() {\n\t\t$sounds.setVolume(this.audioVolume)\n\t}\n\n\t/**\n\t * Get the singleton instance\n\t */\n\tpublic static getInstance(): NotificationService {\n\t\tif (!NotificationService.instance) {\n\t\t\tNotificationService.instance = new NotificationService()\n\t\t}\n\t\treturn NotificationService.instance\n\t}\n\n\t/**\n\t * Show a notification\n\t * @returns The ID of the created notification\n\t */\n\tpublic notify(options: NotificationOptions): string {\n\t\t// Apply default options\n\t\tconst completeOptions = {\n\t\t\t...NotificationService.DEFAULT_OPTIONS,\n\t\t\t...options,\n\t\t\t// Override with duraton from options if provided, otherwise use default\n\t\t\tduration: options.duration ?? NotificationService.DEFAULT_OPTIONS.duration,\n\t\t}\n\n\t\tconst id = completeOptions.id || `notification-${Date.now()}-${Math.floor(Math.random() * 10000)}`\n\n\t\t// Add to stack for tracking\n\t\tthis.notificationStack.push(id)\n\n\t\t// Remove existing notification if any (only 1 at a time)\n\t\tif (currentNotification) {\n\t\t\tcurrentNotification.remove()\n\t\t\tcurrentNotification = null\n\t\t}\n\n\t\t// Create the notification element directly\n\t\tconst notification = document.createElement('sch-notification') as SchmancyNotification\n\t\tnotification.id = id\n\t\tnotification.title = completeOptions.title || ''\n\t\tnotification.message = completeOptions.message\n\t\tnotification.type = completeOptions.type || 'info'\n\t\tnotification.duration = completeOptions.duration ?? 1000\n\t\tnotification.closable = completeOptions.closable !== false\n\t\tnotification.playSound = false // We handle sound here\n\t\tnotification.showProgress = completeOptions.showProgress || false\n\t\tnotification.startPosition = { ...lastClickPosition }\n\n\t\t// Play sound if enabled\n\t\tif (completeOptions.playSound !== false) {\n\t\t\t$sounds.play(typeToFeeling[notification.type])\n\t\t}\n\n\t\t// Listen for close event\n\t\tnotification.addEventListener('close', () => {\n\t\t\tconst index = this.notificationStack.indexOf(id)\n\t\t\tif (index > -1) {\n\t\t\t\tthis.notificationStack.splice(index, 1)\n\t\t\t}\n\t\t\tnotification.remove()\n\t\t\tif (currentNotification === notification) {\n\t\t\t\tcurrentNotification = null\n\t\t\t}\n\t\t})\n\n\t\t// Append to body\n\t\tdocument.body.appendChild(notification)\n\t\tcurrentNotification = notification\n\n\t\treturn id\n\t}\n\n\t/**\n\t * Dismiss a notification\n\t * @param id Optional notification ID. If not provided, dismisses the most recent notification\n\t */\n\tpublic dismiss(id?: string): void {\n\t\tlet targetId: string | undefined\n\n\t\tif (id) {\n\t\t\t// Remove specific notification from stack\n\t\t\tconst index = this.notificationStack.indexOf(id)\n\t\t\tif (index > -1) {\n\t\t\t\tthis.notificationStack.splice(index, 1)\n\t\t\t\ttargetId = id\n\t\t\t}\n\t\t} else {\n\t\t\t// Remove most recent notification (last in stack)\n\t\t\ttargetId = this.notificationStack.pop()\n\t\t}\n\n\t\tif (targetId && currentNotification && currentNotification.id === targetId) {\n\t\t\tcurrentNotification.close()\n\t\t}\n\t}\n\n\t/**\n\t * Update a notification's content\n\t */\n\tpublic update(id: string, options: Partial<NotificationOptions>): void {\n\t\tif (currentNotification && currentNotification.id === id) {\n\t\t\tif (options.title !== undefined) currentNotification.title = options.title\n\t\t\tif (options.message !== undefined) currentNotification.message = options.message\n\t\t\tif (options.type !== undefined) currentNotification.type = options.type\n\t\t}\n\t}\n\n\t/**\n\t * Show an info notification\n\t */\n\tpublic info(message?: string, options: Partial<Omit<NotificationOptions, 'message' | 'type'>> = {}): string {\n\t\treturn this.notify({\n\t\t\tmessage: message ?? '',\n\t\t\ttype: 'info',\n\t\t\tduration: message ? (options.duration ?? NotificationService.TYPE_DURATIONS.info) : 1,\n\t\t\t...options,\n\t\t})\n\t}\n\n\t/**\n\t * Show a success notification\n\t */\n\tpublic success(message?: string, options: Partial<Omit<NotificationOptions, 'message' | 'type'>> = {}): string {\n\t\treturn this.notify({\n\t\t\tmessage: message ?? '',\n\t\t\ttype: 'success',\n\t\t\tduration: message ? (options.duration ?? NotificationService.TYPE_DURATIONS.success) : 1,\n\t\t\t...options,\n\t\t})\n\t}\n\n\t/**\n\t * Show a warning notification\n\t */\n\tpublic warning(message?: string, options: Partial<Omit<NotificationOptions, 'message' | 'type'>> = {}): string {\n\t\treturn this.notify({\n\t\t\tmessage: message ?? '',\n\t\t\ttype: 'warning',\n\t\t\tduration: message ? (options.duration ?? NotificationService.TYPE_DURATIONS.warning) : 1,\n\t\t\t...options,\n\t\t})\n\t}\n\n\t/**\n\t * Show an error notification\n\t */\n\tpublic error(message?: string, options: Partial<Omit<NotificationOptions, 'message' | 'type'>> = {}): string {\n\t\treturn this.notify({\n\t\t\tmessage: message ?? '',\n\t\t\ttype: 'error',\n\t\t\tduration: message ? (options.duration ?? NotificationService.TYPE_DURATIONS.error) : 1,\n\t\t\t...options,\n\t\t})\n\t}\n\n\t/**\n\t * Show a notification with a custom duration\n\t */\n\tpublic customDuration(\n\t\tmessage: string,\n\t\tduration: number,\n\t\toptions: Partial<Omit<NotificationOptions, 'message' | 'duration'>> = {},\n\t): string {\n\t\treturn this.notify({\n\t\t\tmessage,\n\t\t\tduration,\n\t\t\t...options,\n\t\t})\n\t}\n\n\t/**\n\t * Show a persistent notification (won't auto-dismiss)\n\t */\n\tpublic persistent(message: string, options: Partial<Omit<NotificationOptions, 'message' | 'duration'>> = {}): string {\n\t\treturn this.notify({\n\t\t\tmessage,\n\t\t\tduration: 0, // Zero duration means no auto-close\n\t\t\t...options,\n\t\t})\n\t}\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\t/**\n\t * Show a notification\n\t */\n\tshow: (options: NotificationOptions): string => {\n\t\treturn NotificationService.getInstance().notify(options)\n\t},\n\n\t/**\n\t * Show an info notification\n\t */\n\tinfo: (message?: string, options: Partial<Omit<NotificationOptions, 'message' | 'type'>> = {}): string => {\n\t\treturn NotificationService.getInstance().info(message, options)\n\t},\n\n\t/**\n\t * Show a success notification\n\t */\n\tsuccess: (message?: string, options: Partial<Omit<NotificationOptions, 'message' | 'type'>> = {}): string => {\n\t\treturn NotificationService.getInstance().success(message, options)\n\t},\n\n\t/**\n\t * Show a warning notification\n\t */\n\twarning: (message?: string, options: Partial<Omit<NotificationOptions, 'message' | 'type'>> = {}): string => {\n\t\treturn NotificationService.getInstance().warning(message, options)\n\t},\n\n\t/**\n\t * Show an error notification\n\t */\n\terror: (message?: string, options: Partial<Omit<NotificationOptions, 'message' | 'type'>> = {}): string => {\n\t\treturn NotificationService.getInstance().error(message, options)\n\t},\n\n\t/**\n\t * Show a notification with a custom duration\n\t * @param message The notification message\n\t * @param duration Duration in milliseconds before auto-dismissing (0 for no auto-dismiss)\n\t * @param options Additional notification options\n\t */\n\tcustomDuration: (\n\t\tmessage: string,\n\t\tduration: number,\n\t\toptions: Partial<Omit<NotificationOptions, 'message' | 'duration'>> = {},\n\t): string => {\n\t\treturn NotificationService.getInstance().customDuration(message, duration, options)\n\t},\n\n\t/**\n\t * Show a persistent notification that won't auto-dismiss\n\t */\n\tpersistent: (message: string, options: Partial<Omit<NotificationOptions, 'message' | 'duration'>> = {}): string => {\n\t\treturn NotificationService.getInstance().persistent(message, options)\n\t},\n\n\t/**\n\t * Dismiss a notification\n\t * @param id Optional notification ID. If not provided, dismisses the most recent notification (queue-like behavior)\n\t */\n\tdismiss: (id?: string): void => {\n\t\treturn NotificationService.getInstance().dismiss(id)\n\t},\n\n\t/**\n\t * Update a notification's content\n\t */\n\tupdate: (id: string, options: Partial<NotificationOptions>): void => {\n\t\treturn NotificationService.getInstance().update(id, options)\n\t},\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":";;;;;;;;ACiCe,IAAA,IAAA,cAAmC,EAAA;CAAA,YAAA,GAAA,GAAA;EAAA,MAAA,GAAA,EAAA,EAAA,KAAA,QAGb,IAAA,KAAA,UACE,IAAA,KAAA,OACe,QAAA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KAAA"}
|
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-B3wVUC8l.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-CllYkvlR.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-C42OILRS.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-CPOL0nHL.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;IAChC,SAAA,CAAS;IACT,UAAA,CAAU;IACV,QAAQ,EAAE,OAAO,KAAK,OAAA;IAAA,CAAA,CAAA;IAAA,EAK1B,EAAyB,MAAM,UAAA,C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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-BPUR4Kc4.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-cRsdshy8.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,EACV,OAAQ,CAAE,MAAO,KAAK,MAAA,CAAA,CAAA,CAAA,EAAA,EAK1B,EAAA,EAAA,WAAyB,KAAM,UAAA,CAC7B,MAAA,EAAA,E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A,CAAA,CAAA,CAAO,EAAA,UAAA,WAAA,IAAA,GAAA,CAAA,EAAA,EAAA,EAAA,EAAA,EAAA,UAMjC,CAAE,KAAM,OAAA,CAAA,CAAA,CAAS,EAAA,UAAA,QAAA,IAAA,GAAA,CAAA,EAAA,EAAA,EAAA,EAAA,EAAA,UAMjB,CAAE,KAAM,OAAA,CAAA,CAAA,CAAS,EAAA,UAAA,OAAA,IAAA,GAAA,CAAA,EAAA,EAAA,EAAA,EAAA,EAAA,EAAA,eAzDb,kBAAA,CAAA,CAAkB,EAAA"}
|
package/dist/option.cjs
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
require(`./option-
|
|
1
|
+
require(`./option-cRsdshy8.cjs`);
|
package/dist/option.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
import "./option-
|
|
1
|
+
import "./option-CPOL0nHL.js";
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
require(`./chunk-CncqDLb2.cjs`);const e=require(`./mixins-
|
|
1
|
+
require(`./chunk-CncqDLb2.cjs`);const e=require(`./mixins-BPUR4Kc4.cjs`),t=require(`./active-host-jH3iloCR.cjs`),n=require(`./animation-CCOIW4wJ.cjs`),r=require(`./reduced-motion-Dzfp_w5x.cjs`),i=require(`./layout-BbCIfIgo.cjs`);require(`./overlay.service-CKBCIP2f.cjs`),require(`./overlay.confirm-body-CQ-FwySO.cjs`);let a=require(`rxjs`),o=require(`lit/decorators.js`),s=require(`lit`),c=require(`lit/directives/when.js`),l=require(`@floating-ui/dom`);var u=r.t.value;r.t.subscribe(e=>{u=e});var d=`--schmancy-overlay-origin-x`,f=`--schmancy-overlay-origin-y`,p=`var(${d}, 50%) var(${f}, 50%)`;function m(e){return Number.isNaN(e)||!Number.isFinite(e)?50:Math.max(0,Math.min(100,e))}function h(e,t){if(u)return t===`in`?{keyframes:[{opacity:0,transform:`none`},{opacity:1,transform:`none`}],options:{duration:1,easing:`linear`,fill:`forwards`}}:{keyframes:[{opacity:1,transform:`none`},{opacity:0,transform:`none`}],options:{duration:1,easing:`linear`,fill:`forwards`}};switch(e){case`centered`:return t===`in`?{keyframes:[{opacity:0,transform:`scale(0.6)`,transformOrigin:p},{opacity:1,transform:`scale(1)`,transformOrigin:p}],options:{duration:n.f.duration,easing:n._(n.f),fill:`forwards`}}:{keyframes:[{opacity:1,transform:`scale(1)`,transformOrigin:p},{opacity:0,transform:`scale(0.95)`,transformOrigin:p}],options:{duration:150,easing:n._(n.d),fill:`forwards`}};case`sheet`:return t===`in`?{keyframes:[{opacity:0,transform:`translateY(100%)`},{opacity:1,transform:`translateY(0)`}],options:{duration:n.u.duration,easing:n._(n.u),fill:`forwards`}}:{keyframes:[{opacity:1,transform:`translateY(0)`},{opacity:0,transform:`translateY(100%)`}],options:{duration:150,easing:n._(n.d),fill:`forwards`}};case`anchored`:return t===`in`?{keyframes:[{opacity:0,transform:`scale(0.85)`,transformOrigin:p},{opacity:1,transform:`scale(1)`,transformOrigin:p}],options:{duration:n.f.duration,easing:n._(n.f),fill:`forwards`}}:{keyframes:[{opacity:1,transform:`scale(1)`,transformOrigin:p},{opacity:0,transform:`scale(0.92)`,transformOrigin:p}],options:{duration:150,easing:n._(n.d),fill:`forwards`}}}}function g(e){let{surface:t,dragHandle:n,until$:r}=e;return new a.Observable(e=>{let i=n??t,o=new a.Subject,s=!1,c=null,l=0,u=0,d=0;return(0,a.merge)((0,a.fromEvent)(i,`pointerdown`).pipe((0,a.filter)(e=>e.isPrimary&&(e.pointerType!==`mouse`||e.button===0)),(0,a.filter)(e=>{if(n)return!0;let r=t.getBoundingClientRect();return e.clientY-r.top<=40}),(0,a.tap)(e=>{s=!0,c=e.pointerId,l=e.clientY,u=performance.now(),d=0,t.style.transition=`none`,t.style.willChange=`transform`;try{i.setPointerCapture?.(e.pointerId)}catch{}})),(0,a.fromEvent)(i,`pointermove`).pipe((0,a.filter)(()=>s),(0,a.filter)(e=>e.pointerId===c),(0,a.tap)(e=>{d=function(e){if(e>=0)return e;let t=-e;return-Math.max(0,8*(Math.log(t+1)-2))}(e.clientY-l),t.style.transform=`translateY(${d}px)`,e.cancelable&&e.preventDefault()})),(0,a.merge)((0,a.fromEvent)(i,`pointerup`),(0,a.fromEvent)(i,`pointercancel`),(0,a.fromEvent)(i,`lostpointercapture`)).pipe((0,a.filter)(()=>s),(0,a.filter)(e=>e.pointerId===c),(0,a.tap)(()=>{s=!1;let n=c;c=null;try{n!==null&&i.releasePointerCapture?.(n)}catch{}let r=Math.max(1,performance.now()-u),a=d/r,o=t.getBoundingClientRect().height,l=Math.min(80,.25*o),f=d>l||d>20&&a>.4;t.style.willChange=``,f?(t.style.transition=`transform 300ms cubic-bezier(0.16, 1, 0.3, 1)`,t.style.transform=`translateY(100%)`,e.next(`dismiss`),e.complete()):(t.style.transition=`transform 300ms cubic-bezier(0.16, 1, 0.3, 1)`,t.style.transform=`translateY(0)`)}))).pipe((0,a.takeUntil)((0,a.merge)(o,r))).subscribe(),()=>{o.next(),o.complete(),t.style.transition=``,t.style.transform=``,t.style.willChange=``}}).pipe((0,a.take)(1))}function _(e){let{anchor:t,content:n,viewport:r}=e,i=r.width<640,a=r.isCoarsePointer,o=n.height>.8*r.height,s=n.width>.9*r.width;return i||a||o||s?`sheet`:t===void 0?`centered`:`anchored`}function v(){return{width:window.innerWidth,height:window.innerHeight,isCoarsePointer:window.matchMedia(`(pointer: coarse)`).matches}}function y(e,t){return{x:e,y:t,width:0,height:0,left:e,right:e,top:t,bottom:t,toJSON:()=>({x:e,y:t,width:0,height:0,left:e,right:e,top:t,bottom:t})}}var b=Object.freeze({popover:typeof HTMLElement<`u`&&`popover`in HTMLElement.prototype&&typeof HTMLElement.prototype.showPopover==`function`,cssAnchor:typeof CSS<`u`&&typeof CSS.supports==`function`&&CSS.supports(`anchor-name: --x`)});function x(e){if(!b.popover)throw Error(`positionPopoverAPI requires Popover API support`);e.setAttribute(`popover`,`manual`);try{e.showPopover()}catch{}return()=>{try{e.hidePopover?.()}catch{}e.removeAttribute(`popover`)}}function S(e,t,n={}){return new a.Observable(r=>{let i=t.el??t.virtual;if(!i)return void r.error(Error(`positionFloatingUI requires an element or virtual anchor`));let a=n.placement??`bottom-start`,o=n.padding??16,s=n.offsetPx??8,c=(0,l.autoUpdate)(i,e,async()=>{try{let{x:t,y:n}=await(0,l.computePosition)(i,e,{strategy:`fixed`,placement:a,middleware:[(0,l.offset)(s),(0,l.flip)({padding:o,fallbackPlacements:C(a)}),(0,l.shift)({padding:o}),(0,l.size)({padding:o,apply({availableWidth:e,availableHeight:t,elements:n}){n.floating.style.maxWidth=`${Math.max(0,e)}px`,n.floating.style.maxHeight=`${Math.max(0,t)}px`}})]});Object.assign(e.style,{position:`fixed`,left:`${Math.round(t)}px`,top:`${Math.round(n)}px`,transform:`none`}),r.next()}catch(e){r.error(e)}},{ancestorScroll:!0,ancestorResize:!0,elementResize:!1!==n.track});return()=>{c()}})}function C(e){switch(e){case`bottom-start`:return[`top-start`,`bottom-end`,`top-end`];case`bottom-end`:return[`top-end`,`bottom-start`,`top-start`];case`top-start`:return[`bottom-start`,`top-end`,`bottom-end`];case`top-end`:return[`bottom-end`,`top-start`,`bottom-start`];case`left-start`:return[`right-start`,`left-end`,`right-end`];case`left-end`:return[`right-end`,`left-start`,`right-start`];case`right-start`:return[`left-start`,`right-end`,`left-end`];case`right-end`:return[`left-end`,`right-start`,`left-start`];case`top`:return[`bottom`,`left`,`right`];case`bottom`:return[`top`,`left`,`right`];case`left`:return[`right`,`top`,`bottom`];case`right`:return[`left`,`top`,`bottom`];default:return[`top-start`,`bottom-end`]}}var w=`overlay-mount`,T=class extends e.c{constructor(...e){super(...e),this.layout=`centered`,this.dismissable=!0,this.modal=!0,this.tier=`modal`,this._active=!1,this._closed$=new a.Subject,this._mounted=!1,this._closing=!1,this._lastFocusedElement=null,this._inertedSiblings=[],this._lastReResolveAt=0,this.onBackdropClick=()=>{this.dismissable&&this.close(`backdrop`)}}static{this.styles=[s.css`
|
|
2
2
|
:host {
|
|
3
3
|
position: fixed;
|
|
4
4
|
inset: 0;
|