@mhmo91/schmancy 0.4.92 → 0.4.94
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/ai/area.md +181 -968
- package/dist/ai/area.md +181 -968
- package/dist/{animated-text-CUFCt7Zg.js → animated-text-BLDqQ33G.js} +3 -3
- package/dist/{animated-text-CUFCt7Zg.js.map → animated-text-BLDqQ33G.js.map} +1 -1
- package/dist/{animated-text-CM1zqBki.cjs → animated-text-CIgDmUF0.cjs} +2 -2
- package/dist/{animated-text-CM1zqBki.cjs.map → animated-text-CIgDmUF0.cjs.map} +1 -1
- package/dist/animated-text.cjs +1 -1
- package/dist/animated-text.js +1 -1
- package/dist/area.cjs +1 -1
- package/dist/area.js +1 -1
- package/dist/{autocomplete-CFREt7Vm.cjs → autocomplete-35wx4zfo.cjs} +6 -6
- package/dist/autocomplete-35wx4zfo.cjs.map +1 -0
- package/dist/{autocomplete-09_SfjsP.js → autocomplete-DMbJLodc.js} +35 -35
- package/dist/autocomplete-DMbJLodc.js.map +1 -0
- package/dist/autocomplete.cjs +1 -1
- package/dist/autocomplete.js +1 -1
- package/dist/{avatar-CKp3Ukk4.js → avatar-BqGZ5lKc.js} +152 -200
- package/dist/avatar-BqGZ5lKc.js.map +1 -0
- package/dist/{avatar-C8PC_n9i.cjs → avatar-UnP-o7T9.cjs} +21 -69
- package/dist/avatar-UnP-o7T9.cjs.map +1 -0
- package/dist/badge.cjs +1 -1
- package/dist/badge.js +1 -1
- package/dist/{boat-DDJK4CS4.js → boat-PVy1fXfm.js} +2 -2
- package/dist/{boat-DDJK4CS4.js.map → boat-PVy1fXfm.js.map} +1 -1
- package/dist/{boat-Ddi4PegB.cjs → boat-zVJF22wK.cjs} +2 -2
- package/dist/{boat-Ddi4PegB.cjs.map → boat-zVJF22wK.cjs.map} +1 -1
- package/dist/boat.cjs +1 -1
- package/dist/boat.js +1 -1
- package/dist/busy.cjs +1 -1
- package/dist/busy.js +1 -1
- package/dist/button.cjs +1 -1
- package/dist/button.js +1 -1
- package/dist/card.cjs +1 -1
- package/dist/card.js +1 -1
- package/dist/{checkbox-TclkD2h5.cjs → checkbox-BtZqKgPT.cjs} +2 -2
- package/dist/{checkbox-TclkD2h5.cjs.map → checkbox-BtZqKgPT.cjs.map} +1 -1
- package/dist/{checkbox-BU1x0W8U.js → checkbox-DAFDBz7J.js} +2 -2
- package/dist/{checkbox-BU1x0W8U.js.map → checkbox-DAFDBz7J.js.map} +1 -1
- package/dist/checkbox.cjs +1 -1
- package/dist/checkbox.js +1 -1
- package/dist/{chips-DQBHJNSu.cjs → chips-BRigd0oB.cjs} +10 -21
- package/dist/{chips-DQBHJNSu.cjs.map → chips-BRigd0oB.cjs.map} +1 -1
- package/dist/{chips-Bxsoq1vm.js → chips-BnA6mVWq.js} +56 -67
- package/dist/{chips-Bxsoq1vm.js.map → chips-BnA6mVWq.js.map} +1 -1
- package/dist/chips.cjs +1 -1
- package/dist/chips.js +1 -1
- package/dist/code-highlight.cjs +1 -1
- package/dist/code-highlight.js +1 -1
- package/dist/{code-preview-C9Imx-RX.cjs → code-preview-BYWzA52m.cjs} +2 -2
- package/dist/{code-preview-C9Imx-RX.cjs.map → code-preview-BYWzA52m.cjs.map} +1 -1
- package/dist/{code-preview-DnUM87ZB.js → code-preview-CUc2NHQu.js} +2 -2
- package/dist/{code-preview-DnUM87ZB.js.map → code-preview-CUc2NHQu.js.map} +1 -1
- package/dist/components.cjs +1 -1
- package/dist/components.js +1 -1
- package/dist/content-drawer.cjs +1 -1
- package/dist/content-drawer.js +1 -1
- package/dist/{date-range-DF7MnRi3.js → date-range-DFNdMN6p.js} +4 -4
- package/dist/{date-range-DF7MnRi3.js.map → date-range-DFNdMN6p.js.map} +1 -1
- package/dist/{date-range-D1A1Xrmw.cjs → date-range-DhWbY9Ph.cjs} +2 -2
- package/dist/{date-range-D1A1Xrmw.cjs.map → date-range-DhWbY9Ph.cjs.map} +1 -1
- package/dist/{date-range-inline-CwLJLOe1.cjs → date-range-inline-FiCLIta4.cjs} +2 -2
- package/dist/{date-range-inline-CwLJLOe1.cjs.map → date-range-inline-FiCLIta4.cjs.map} +1 -1
- package/dist/{date-range-inline-Ca4DPfeR.js → date-range-inline-xh0mrWH9.js} +3 -3
- package/dist/{date-range-inline-Ca4DPfeR.js.map → date-range-inline-xh0mrWH9.js.map} +1 -1
- package/dist/date-range-inline.cjs +1 -1
- package/dist/date-range-inline.js +1 -1
- package/dist/date-range.cjs +1 -1
- package/dist/date-range.js +1 -1
- package/dist/{delay-hXu_bFxW.js → delay-BTRy2v5H.js} +2 -2
- package/dist/{delay-hXu_bFxW.js.map → delay-BTRy2v5H.js.map} +1 -1
- package/dist/{delay-DQKt6VVn.cjs → delay-dCLgp1B7.cjs} +2 -2
- package/dist/{delay-DQKt6VVn.cjs.map → delay-dCLgp1B7.cjs.map} +1 -1
- package/dist/delay.cjs +1 -1
- package/dist/delay.js +1 -1
- package/dist/{details-Ft0ivj0F.cjs → details-Bf0qMDKW.cjs} +2 -2
- package/dist/{details-Ft0ivj0F.cjs.map → details-Bf0qMDKW.cjs.map} +1 -1
- package/dist/{details-Ci0XXz0g.js → details-BsmaD0yr.js} +2 -2
- package/dist/{details-Ci0XXz0g.js.map → details-BsmaD0yr.js.map} +1 -1
- package/dist/details.cjs +1 -1
- package/dist/details.js +1 -1
- package/dist/{dialog-content-7tFlrTFn.cjs → dialog-content-0w0WQYF3.cjs} +2 -2
- package/dist/{dialog-content-7tFlrTFn.cjs.map → dialog-content-0w0WQYF3.cjs.map} +1 -1
- package/dist/{dialog-content-DXnLwUtv.js → dialog-content-r1Ai3BZj.js} +4 -4
- package/dist/{dialog-content-DXnLwUtv.js.map → dialog-content-r1Ai3BZj.js.map} +1 -1
- package/dist/dialog-service-CgJH8clD.cjs +2 -0
- package/dist/dialog-service-CgJH8clD.cjs.map +1 -0
- package/dist/{dialog-service-DwhuICgc.js → dialog-service-PQ9ssbsY.js} +53 -47
- package/dist/dialog-service-PQ9ssbsY.js.map +1 -0
- package/dist/dialog.cjs +1 -1
- package/dist/dialog.js +2 -2
- package/dist/directives.cjs +1 -1
- package/dist/directives.js +1 -1
- package/dist/divider-BPsLFNzK.js +22 -0
- package/dist/divider-BPsLFNzK.js.map +1 -0
- package/dist/divider-CYPKRC_-.cjs +2 -0
- package/dist/divider-CYPKRC_-.cjs.map +1 -0
- package/dist/divider.cjs +1 -1
- package/dist/divider.js +1 -1
- package/dist/{dropdown-content-BCk2WbXc.js → dropdown-content-B51-eGbI.js} +40 -41
- package/dist/dropdown-content-B51-eGbI.js.map +1 -0
- package/dist/{dropdown-content-CXxTjA0j.cjs → dropdown-content-DelDUcfW.cjs} +5 -10
- package/dist/dropdown-content-DelDUcfW.cjs.map +1 -0
- package/dist/dropdown.cjs +1 -1
- package/dist/dropdown.js +1 -1
- package/dist/{email-recipients-BWIYYwA8.cjs → email-recipients-BlSATi3L.cjs} +24 -24
- package/dist/email-recipients-BlSATi3L.cjs.map +1 -0
- package/dist/{email-recipients-BT3xPoBN.js → email-recipients-hkvv_vgI.js} +141 -144
- package/dist/email-recipients-hkvv_vgI.js.map +1 -0
- package/dist/extra.cjs +1 -1
- package/dist/extra.js +1 -1
- package/dist/{flex-DJEZ1DdQ.js → flex-BDtCUg0s.js} +2 -2
- package/dist/{flex-DJEZ1DdQ.js.map → flex-BDtCUg0s.js.map} +1 -1
- package/dist/{flex-DflXFgVs.cjs → flex-_K-5RVZM.cjs} +2 -2
- package/dist/{flex-DflXFgVs.cjs.map → flex-_K-5RVZM.cjs.map} +1 -1
- package/dist/{form-7OiDtJT4.js → form-BTmhZIB8.js} +11 -23
- package/dist/form-BTmhZIB8.js.map +1 -0
- package/dist/form-jw1NVkyp.cjs +2 -0
- package/dist/form-jw1NVkyp.cjs.map +1 -0
- package/dist/form.cjs +1 -1
- package/dist/form.js +1 -1
- package/dist/{formField.mixin-3i7VOHMH.js → formField.mixin-D_1WwNWJ.js} +2 -2
- package/dist/{formField.mixin-3i7VOHMH.js.map → formField.mixin-D_1WwNWJ.js.map} +1 -1
- package/dist/{formField.mixin-B1vJlhmI.cjs → formField.mixin-HN79lSIE.cjs} +2 -2
- package/dist/{formField.mixin-B1vJlhmI.cjs.map → formField.mixin-HN79lSIE.cjs.map} +1 -1
- package/dist/{icon-BMhWh8Ib.js → icon-Clqcexag.js} +2 -2
- package/dist/{icon-BMhWh8Ib.js.map → icon-Clqcexag.js.map} +1 -1
- package/dist/{icon-button-DOZuY9x8.js → icon-button-Bu_eEqfk.js} +5 -5
- package/dist/icon-button-Bu_eEqfk.js.map +1 -0
- package/dist/{icon-button-CLDy5tUS.cjs → icon-button-M5CqyRR4.cjs} +4 -4
- package/dist/icon-button-M5CqyRR4.cjs.map +1 -0
- package/dist/{icon-TPLdDnCq.cjs → icon-pFAWVSGq.cjs} +2 -2
- package/dist/{icon-TPLdDnCq.cjs.map → icon-pFAWVSGq.cjs.map} +1 -1
- package/dist/icons.cjs +1 -1
- package/dist/icons.js +1 -1
- package/dist/index.cjs +1 -1
- package/dist/index.js +49 -49
- package/dist/{input-Dre3bMuF.js → input-CFlQ_9Cq.js} +40 -44
- package/dist/input-CFlQ_9Cq.js.map +1 -0
- package/dist/input-CWOVMdSb.cjs +51 -0
- package/dist/input-CWOVMdSb.cjs.map +1 -0
- package/dist/input.cjs +1 -1
- package/dist/input.js +1 -1
- package/dist/layout.cjs +1 -1
- package/dist/layout.js +1 -1
- package/dist/lazy-DObpkuL6.cjs.map +1 -1
- package/dist/lazy-E2LCDm7n.js.map +1 -1
- package/dist/{list-DZ43cTnR.cjs → list-CDXL73JQ.cjs} +2 -2
- package/dist/{list-DZ43cTnR.cjs.map → list-CDXL73JQ.cjs.map} +1 -1
- package/dist/{list-2mBZmMCP.js → list-rmfIuWZK.js} +2 -2
- package/dist/{list-2mBZmMCP.js.map → list-rmfIuWZK.js.map} +1 -1
- package/dist/list.cjs +1 -1
- package/dist/list.js +1 -1
- package/dist/{litElement.mixin-Bj0zv3lK.js → litElement.mixin-Dm9SOPDp.js} +2 -2
- package/dist/{litElement.mixin-Bj0zv3lK.js.map → litElement.mixin-Dm9SOPDp.js.map} +1 -1
- package/dist/{litElement.mixin-CjRG_9tZ.cjs → litElement.mixin-YJ8D9a8Z.cjs} +2 -2
- package/dist/{litElement.mixin-CjRG_9tZ.cjs.map → litElement.mixin-YJ8D9a8Z.cjs.map} +1 -1
- package/dist/mailbox.cjs +1 -1
- package/dist/mailbox.js +1 -1
- package/dist/{map-sSS6ACVH.js → map-BfP3ZVm_.js} +2 -2
- package/dist/{map-sSS6ACVH.js.map → map-BfP3ZVm_.js.map} +1 -1
- package/dist/{map-D69SEPpf.cjs → map-DQwGv46m.cjs} +2 -2
- package/dist/{map-D69SEPpf.cjs.map → map-DQwGv46m.cjs.map} +1 -1
- package/dist/map.cjs +1 -1
- package/dist/map.js +1 -1
- package/dist/media-B28J9yez.js +261 -0
- package/dist/media-B28J9yez.js.map +1 -0
- package/dist/media-DtYChqKs.cjs +177 -0
- package/dist/media-DtYChqKs.cjs.map +1 -0
- package/dist/{menu-CATzB9tA.js → menu-C0iTDVTM.js} +3 -3
- package/dist/{menu-CATzB9tA.js.map → menu-C0iTDVTM.js.map} +1 -1
- package/dist/{menu-BOeTdvk_.cjs → menu-jcodrTEA.cjs} +2 -2
- package/dist/{menu-BOeTdvk_.cjs.map → menu-jcodrTEA.cjs.map} +1 -1
- package/dist/menu.cjs +1 -1
- package/dist/menu.js +1 -1
- package/dist/nav-drawer.cjs +1 -1
- package/dist/nav-drawer.js +1 -1
- package/dist/{notification-service-DrwmIgoR.js → notification-service-BIH173dS.js} +62 -58
- package/dist/notification-service-BIH173dS.js.map +1 -0
- package/dist/{notification-service-LnNx5EDh.cjs → notification-service-CD-XzDeP.cjs} +7 -7
- package/dist/notification-service-CD-XzDeP.cjs.map +1 -0
- package/dist/notification.cjs +1 -1
- package/dist/notification.js +2 -2
- package/dist/{notify-C41nYdUf.js → notify-4u_P6A9W.js} +2 -2
- package/dist/{notify-C41nYdUf.js.map → notify-4u_P6A9W.js.map} +1 -1
- package/dist/{notify-DQMcgjgZ.cjs → notify-C95rxXiW.cjs} +2 -2
- package/dist/{notify-DQMcgjgZ.cjs.map → notify-C95rxXiW.cjs.map} +1 -1
- package/dist/{option-DbBr0StZ.js → option-CTkTl7Pz.js} +12 -12
- package/dist/option-CTkTl7Pz.js.map +1 -0
- package/dist/{option-BNKGfKgL.cjs → option-D-Itfwmu.cjs} +5 -5
- package/dist/option-D-Itfwmu.cjs.map +1 -0
- package/dist/option.cjs +1 -1
- package/dist/option.js +1 -1
- package/dist/{payment-card-form-_jHodv7G.js → payment-card-form-DcipYS1-.js} +3 -3
- package/dist/{payment-card-form-_jHodv7G.js.map → payment-card-form-DcipYS1-.js.map} +1 -1
- package/dist/{payment-card-form-ByWbYHhd.cjs → payment-card-form-HQsOp4z5.cjs} +2 -2
- package/dist/{payment-card-form-ByWbYHhd.cjs.map → payment-card-form-HQsOp4z5.cjs.map} +1 -1
- package/dist/{progress-BY7K7Etz.cjs → progress-B3Q1qs5e.cjs} +2 -2
- package/dist/{progress-BY7K7Etz.cjs.map → progress-B3Q1qs5e.cjs.map} +1 -1
- package/dist/{progress-Cix7Mu1p.js → progress-zOZKeIA7.js} +2 -2
- package/dist/{progress-Cix7Mu1p.js.map → progress-zOZKeIA7.js.map} +1 -1
- package/dist/progress.cjs +1 -1
- package/dist/progress.js +1 -1
- package/dist/{radio-button-BNmjg-i9.js → radio-button-C4TI0v9W.js} +27 -27
- package/dist/radio-button-C4TI0v9W.js.map +1 -0
- package/dist/radio-button-COzEX5Ar.cjs +41 -0
- package/dist/radio-button-COzEX5Ar.cjs.map +1 -0
- package/dist/radio-group.cjs +1 -1
- package/dist/radio-group.js +1 -1
- package/dist/{ripple-BumgqsDT.js → ripple-Cy-nvO8W.js} +24 -22
- package/dist/ripple-Cy-nvO8W.js.map +1 -0
- package/dist/ripple-DqQrvaTe.cjs +16 -0
- package/dist/ripple-DqQrvaTe.cjs.map +1 -0
- package/dist/route.component-Cr-M16SZ.cjs +12 -0
- package/dist/route.component-Cr-M16SZ.cjs.map +1 -0
- package/dist/route.component-Df4CQy4C.js +320 -0
- package/dist/route.component-Df4CQy4C.js.map +1 -0
- package/dist/{schmancy-steps-container-BUE4fG8_.js → schmancy-steps-container-DC6Ca6-A.js} +2 -2
- package/dist/{schmancy-steps-container-BUE4fG8_.js.map → schmancy-steps-container-DC6Ca6-A.js.map} +1 -1
- package/dist/{schmancy-steps-container-D69TfC2I.cjs → schmancy-steps-container-DfzodwEn.cjs} +2 -2
- package/dist/{schmancy-steps-container-D69TfC2I.cjs.map → schmancy-steps-container-DfzodwEn.cjs.map} +1 -1
- package/dist/{select-Bspcrc-h.js → select-Br2sY6MK.js} +16 -16
- package/dist/select-Br2sY6MK.js.map +1 -0
- package/dist/select-wUk1qE31.cjs +57 -0
- package/dist/select-wUk1qE31.cjs.map +1 -0
- package/dist/select.cjs +1 -1
- package/dist/select.js +1 -1
- package/dist/{sheet-BxOGSGJ0.js → sheet-BjJdVvvp.js} +3 -3
- package/dist/{sheet-BxOGSGJ0.js.map → sheet-BjJdVvvp.js.map} +1 -1
- package/dist/{sheet-CuE9tUeo.cjs → sheet-D3RmdvbL.cjs} +2 -2
- package/dist/{sheet-CuE9tUeo.cjs.map → sheet-D3RmdvbL.cjs.map} +1 -1
- package/dist/sheet.cjs +1 -1
- package/dist/sheet.js +1 -1
- package/dist/{slider-ChQVbnYO.js → slider-Dgwlzvr-.js} +3 -3
- package/dist/{slider-ChQVbnYO.js.map → slider-Dgwlzvr-.js.map} +1 -1
- package/dist/{slider-DeKwZONn.cjs → slider-XoN7Z9iO.cjs} +2 -2
- package/dist/{slider-DeKwZONn.cjs.map → slider-XoN7Z9iO.cjs.map} +1 -1
- package/dist/slider.cjs +1 -1
- package/dist/slider.js +1 -1
- package/dist/{spinner-C5tMQys5.cjs → spinner-D9l0j12i.cjs} +2 -2
- package/dist/{spinner-C5tMQys5.cjs.map → spinner-D9l0j12i.cjs.map} +1 -1
- package/dist/{spinner-y1dPMTQp.js → spinner-e06PNB2u.js} +2 -2
- package/dist/{spinner-y1dPMTQp.js.map → spinner-e06PNB2u.js.map} +1 -1
- package/dist/steps.cjs +1 -1
- package/dist/steps.js +1 -1
- package/dist/{surface-4MzhEaru.cjs → surface-BgLZnRcp.cjs} +2 -2
- package/dist/{surface-4MzhEaru.cjs.map → surface-BgLZnRcp.cjs.map} +1 -1
- package/dist/{surface-BYmdH754.js → surface-trk3Zpii.js} +2 -2
- package/dist/{surface-BYmdH754.js.map → surface-trk3Zpii.js.map} +1 -1
- package/dist/surface.cjs +1 -1
- package/dist/surface.js +1 -1
- package/dist/{table-YBHaxQzQ.js → table-BfFAQg7K.js} +2 -2
- package/dist/{table-YBHaxQzQ.js.map → table-BfFAQg7K.js.map} +1 -1
- package/dist/{table-J5EVvpXy.cjs → table-g0Wsm45r.cjs} +2 -2
- package/dist/{table-J5EVvpXy.cjs.map → table-g0Wsm45r.cjs.map} +1 -1
- package/dist/table.cjs +1 -1
- package/dist/table.js +1 -1
- package/dist/{tabs-compatibility-ezB19WI8.js → tabs-compatibility-D1RfuRqZ.js} +2 -2
- package/dist/{tabs-compatibility-ezB19WI8.js.map → tabs-compatibility-D1RfuRqZ.js.map} +1 -1
- package/dist/{tabs-compatibility-JMTsaND_.cjs → tabs-compatibility-FkpvGEG3.cjs} +2 -2
- package/dist/{tabs-compatibility-JMTsaND_.cjs.map → tabs-compatibility-FkpvGEG3.cjs.map} +1 -1
- package/dist/tabs.cjs +1 -1
- package/dist/tabs.js +1 -1
- package/dist/tailwind.mixin-CPuO9c5y.js +43 -0
- package/dist/{tailwind.mixin-Cwbr8x57.js.map → tailwind.mixin-CPuO9c5y.js.map} +1 -1
- package/dist/tailwind.mixin-Cb-fyJ_y.cjs +2 -0
- package/dist/{tailwind.mixin-B-VcpMHn.cjs.map → tailwind.mixin-Cb-fyJ_y.cjs.map} +1 -1
- package/dist/teleport.cjs +1 -1
- package/dist/teleport.js +1 -1
- package/dist/{textarea-B3nWhCra.cjs → textarea-DBKIOjBp.cjs} +2 -2
- package/dist/{textarea-B3nWhCra.cjs.map → textarea-DBKIOjBp.cjs.map} +1 -1
- package/dist/{textarea-yn7IFbnu.js → textarea-U-fvfv2M.js} +3 -3
- package/dist/{textarea-yn7IFbnu.js.map → textarea-U-fvfv2M.js.map} +1 -1
- package/dist/textarea.cjs +1 -1
- package/dist/textarea.js +1 -1
- package/dist/{theme-button-I_c1ZWWV.cjs → theme-button-C-6Y_Mib.cjs} +2 -2
- package/dist/{theme-button-I_c1ZWWV.cjs.map → theme-button-C-6Y_Mib.cjs.map} +1 -1
- package/dist/{theme-button-CGArg1pu.js → theme-button-CnWM9ZCv.js} +2 -2
- package/dist/{theme-button-CGArg1pu.js.map → theme-button-CnWM9ZCv.js.map} +1 -1
- package/dist/theme-button.cjs +1 -1
- package/dist/theme-button.js +1 -1
- package/dist/theme.cjs +1 -1
- package/dist/{theme.component-B5zp-4OG.js → theme.component-CfLAvCYi.js} +168 -168
- package/dist/{theme.component-B5zp-4OG.js.map → theme.component-CfLAvCYi.js.map} +1 -1
- package/dist/{theme.component-CdSDaeU0.cjs → theme.component-Dko2yi2n.cjs} +3 -3
- package/dist/{theme.component-CdSDaeU0.cjs.map → theme.component-Dko2yi2n.cjs.map} +1 -1
- package/dist/theme.js +1 -1
- package/dist/{timezone-CepyC8kw.js → timezone-CXGJk88N.js} +3 -3
- package/dist/{timezone-CepyC8kw.js.map → timezone-CXGJk88N.js.map} +1 -1
- package/dist/{timezone-DRBf5biI.cjs → timezone-Wy7jf5gf.cjs} +2 -2
- package/dist/{timezone-DRBf5biI.cjs.map → timezone-Wy7jf5gf.cjs.map} +1 -1
- package/dist/tooltip-BXCWSU_6.cjs +7 -0
- package/dist/tooltip-BXCWSU_6.cjs.map +1 -0
- package/dist/{tooltip-C6HlAqs2.js → tooltip-CuDCLzkr.js} +55 -55
- package/dist/tooltip-CuDCLzkr.js.map +1 -0
- package/dist/tooltip.cjs +1 -1
- package/dist/tooltip.js +1 -1
- package/dist/{tree-CpqWMdfb.cjs → tree-Bux6udiH.cjs} +2 -2
- package/dist/{tree-CpqWMdfb.cjs.map → tree-Bux6udiH.cjs.map} +1 -1
- package/dist/{tree-CxJAr7G3.js → tree-CfcLl-dV.js} +2 -2
- package/dist/{tree-CxJAr7G3.js.map → tree-CfcLl-dV.js.map} +1 -1
- package/dist/tree.cjs +1 -1
- package/dist/tree.js +1 -1
- package/dist/{typewriter-D3QLAVdz.js → typewriter-C63WkKf1.js} +64 -76
- package/dist/typewriter-C63WkKf1.js.map +1 -0
- package/dist/{typewriter-BWg7Otk8.cjs → typewriter-HZThI3m1.cjs} +3 -15
- package/dist/typewriter-HZThI3m1.cjs.map +1 -0
- package/dist/typewriter.cjs +1 -1
- package/dist/typewriter.js +1 -1
- package/dist/{typography-DGOOlbC1.cjs → typography-DNj4eHeR.cjs} +2 -2
- package/dist/{typography-DGOOlbC1.cjs.map → typography-DNj4eHeR.cjs.map} +1 -1
- package/dist/{typography-C8NCP_rr.js → typography-DRkYb9R0.js} +2 -2
- package/dist/{typography-C8NCP_rr.js.map → typography-DRkYb9R0.js.map} +1 -1
- package/dist/typography.cjs +1 -1
- package/dist/typography.js +1 -1
- package/package.json +1 -1
- package/types/src/area/area.component.d.ts +8 -3
- package/types/src/area/area.service.d.ts +1 -0
- package/types/src/area/route.component.d.ts +4 -5
- package/types/src/area/utils.d.ts +2 -1
- package/types/src/card/card.d.ts +56 -3
- package/types/src/directives/ripple.d.ts +2 -1
- package/types/src/dropdown/dropdown-component.d.ts +1 -0
- package/types/src/form/form-v2.d.ts +0 -1
- package/types/src/form/form.d.ts +0 -1
- package/types/src/mailbox/email-editor.d.ts +1 -2
- package/types/src/notification/notification-audio.d.ts +9 -0
- package/types/src/notification/notification-container.d.ts +1 -0
- package/dist/autocomplete-09_SfjsP.js.map +0 -1
- package/dist/autocomplete-CFREt7Vm.cjs.map +0 -1
- package/dist/avatar-C8PC_n9i.cjs.map +0 -1
- package/dist/avatar-CKp3Ukk4.js.map +0 -1
- package/dist/dialog-service-DwhuICgc.js.map +0 -1
- package/dist/dialog-service-juvsgc5X.cjs +0 -2
- package/dist/dialog-service-juvsgc5X.cjs.map +0 -1
- package/dist/divider-BG9uDpUp.js +0 -103
- package/dist/divider-BG9uDpUp.js.map +0 -1
- package/dist/divider-CWnAg2p-.cjs +0 -83
- package/dist/divider-CWnAg2p-.cjs.map +0 -1
- package/dist/dropdown-content-BCk2WbXc.js.map +0 -1
- package/dist/dropdown-content-CXxTjA0j.cjs.map +0 -1
- package/dist/email-recipients-BT3xPoBN.js.map +0 -1
- package/dist/email-recipients-BWIYYwA8.cjs.map +0 -1
- package/dist/form-7OiDtJT4.js.map +0 -1
- package/dist/form-nHwPpyhJ.cjs +0 -14
- package/dist/form-nHwPpyhJ.cjs.map +0 -1
- package/dist/icon-button-CLDy5tUS.cjs.map +0 -1
- package/dist/icon-button-DOZuY9x8.js.map +0 -1
- package/dist/input-CqLneJhz.cjs +0 -51
- package/dist/input-CqLneJhz.cjs.map +0 -1
- package/dist/input-Dre3bMuF.js.map +0 -1
- package/dist/media-B-VIbSH_.js +0 -151
- package/dist/media-B-VIbSH_.js.map +0 -1
- package/dist/media-Cew1Mxkj.cjs +0 -100
- package/dist/media-Cew1Mxkj.cjs.map +0 -1
- package/dist/notification-service-DrwmIgoR.js.map +0 -1
- package/dist/notification-service-LnNx5EDh.cjs.map +0 -1
- package/dist/option-BNKGfKgL.cjs.map +0 -1
- package/dist/option-DbBr0StZ.js.map +0 -1
- package/dist/radio-button-BNmjg-i9.js.map +0 -1
- package/dist/radio-button-CYq6qTSb.cjs +0 -41
- package/dist/radio-button-CYq6qTSb.cjs.map +0 -1
- package/dist/ripple-BumgqsDT.js.map +0 -1
- package/dist/ripple-C2BHbhcS.cjs +0 -16
- package/dist/ripple-C2BHbhcS.cjs.map +0 -1
- package/dist/route.component-CzCd2fMa.cjs +0 -12
- package/dist/route.component-CzCd2fMa.cjs.map +0 -1
- package/dist/route.component-Q3rCkryr.js +0 -321
- package/dist/route.component-Q3rCkryr.js.map +0 -1
- package/dist/select-B-yc3JB7.cjs +0 -57
- package/dist/select-B-yc3JB7.cjs.map +0 -1
- package/dist/select-Bspcrc-h.js.map +0 -1
- package/dist/tailwind.mixin-B-VcpMHn.cjs +0 -2
- package/dist/tailwind.mixin-Cwbr8x57.js +0 -43
- package/dist/tooltip-C6HlAqs2.js.map +0 -1
- package/dist/tooltip-CCX8PidC.cjs +0 -7
- package/dist/tooltip-CCX8PidC.cjs.map +0 -1
- package/dist/typewriter-BWg7Otk8.cjs.map +0 -1
- package/dist/typewriter-D3QLAVdz.js.map +0 -1
|
@@ -1,17 +1,17 @@
|
|
|
1
1
|
import { fromEvent as x, takeUntil as T } from "rxjs";
|
|
2
|
-
import { classMap as
|
|
2
|
+
import { classMap as S } from "lit/directives/class-map.js";
|
|
3
3
|
import { styleMap as A } from "lit/directives/style-map.js";
|
|
4
|
-
import { property as h, state as g, customElement as
|
|
5
|
-
import "./tailwind.mixin-
|
|
6
|
-
import { $ as C } from "./litElement.mixin-
|
|
7
|
-
import { c as V } from "./ripple-
|
|
4
|
+
import { property as h, state as g, customElement as _ } from "lit/decorators.js";
|
|
5
|
+
import "./tailwind.mixin-CPuO9c5y.js";
|
|
6
|
+
import { $ as C } from "./litElement.mixin-Dm9SOPDp.js";
|
|
7
|
+
import { c as V } from "./ripple-Cy-nvO8W.js";
|
|
8
8
|
import "lit/directives/guard.js";
|
|
9
9
|
import { S as l } from "./theme.interface-C5Kj6WjD.js";
|
|
10
10
|
import { html as p } from "lit";
|
|
11
|
-
import "./progress-
|
|
11
|
+
import "./progress-zOZKeIA7.js";
|
|
12
12
|
import { repeat as k } from "lit/directives/repeat.js";
|
|
13
13
|
var $ = Object.defineProperty, R = Object.getOwnPropertyDescriptor, d = (o, t, e, i) => {
|
|
14
|
-
for (var s, n = i > 1 ? void 0 : i ? R(t, e) : t,
|
|
14
|
+
for (var s, n = i > 1 ? void 0 : i ? R(t, e) : t, a = o.length - 1; a >= 0; a--) (s = o[a]) && (n = (i ? s(t, e, n) : s(n)) || n);
|
|
15
15
|
return i && n && $(t, e, n), n;
|
|
16
16
|
};
|
|
17
17
|
let u = class extends C(':host{display:block;margin-bottom:10px}:host:last-child{margin-bottom:0}.notification{width:100%;max-width:400px;box-shadow:var(--schmancy-sys-elevation-2);overflow:hidden;transform:translate(0);opacity:1;transition:transform .3s cubic-bezier(.4,0,.2,1),opacity .3s cubic-bezier(.4,0,.2,1);background-color:var(--schmancy-sys-color-surface-container);color:var(--schmancy-sys-color-surface-on);border-radius:16px;position:relative}.notification:before{content:"";position:absolute;inset:0;border-radius:inherit;pointer-events:none;background:linear-gradient(180deg,#ffffff14,#fff0);z-index:1}.notification.info{border-left:4px solid var(--schmancy-sys-color-primary-default);background-color:color-mix(in srgb,var(--schmancy-sys-color-surface-container) 90%,var(--schmancy-sys-color-primary-container) 10%)}.notification.success{border-left:4px solid var(--schmancy-sys-color-success-default);background-color:color-mix(in srgb,var(--schmancy-sys-color-surface-container) 90%,var(--schmancy-sys-color-success-container) 10%)}.notification.warning{border-left:4px solid var(--schmancy-sys-color-tertiary-default);background-color:color-mix(in srgb,var(--schmancy-sys-color-surface-container) 90%,var(--schmancy-sys-color-tertiary-container) 10%)}.notification.error{border-left:4px solid var(--schmancy-sys-color-error-default);background-color:color-mix(in srgb,var(--schmancy-sys-color-surface-container) 90%,var(--schmancy-sys-color-error-container) 10%)}.notification.closing{transform:translate(120%);opacity:0}.notification .notification-content{display:flex;padding:18px 20px;align-items:flex-start;position:relative;z-index:2}.notification .icon-container{flex-shrink:0;margin-right:14px;display:flex;align-items:center;justify-content:center;border-radius:50%;width:28px;height:28px;position:relative}.notification .content{flex:1;min-width:0;display:flex;flex-direction:column}.notification .title{font-weight:500;font-size:16px;line-height:1.5;margin-bottom:2px;word-break:break-word;letter-spacing:.15px}.notification .message{font-size:14px;line-height:1.5;word-break:break-word;letter-spacing:.25px;opacity:.92}.notification .close-button{background:transparent;border:none;cursor:pointer;color:var(--schmancy-sys-color-surface-onVariant);padding:8px;margin-left:8px;margin-right:-4px;margin-top:-4px;border-radius:50%;display:flex;align-items:center;justify-content:center;transition:background-color .2s ease,transform .2s ease}.notification .close-button:hover{background-color:color-mix(in srgb,var(--schmancy-sys-color-surface-onVariant) 8%,transparent);transform:scale(1.05)}.notification .close-button:active{transform:scale(.95)}.notification .close-button:focus-visible{outline:none;box-shadow:0 0 0 2px var(--schmancy-sys-color-primary-default)}') {
|
|
@@ -79,7 +79,7 @@ let u = class extends C(':host{display:block;margin-bottom:10px}:host:last-child
|
|
|
79
79
|
const o = this._getTypeStyles(), t = this._hovered ? "3" : "2";
|
|
80
80
|
return p`
|
|
81
81
|
<div
|
|
82
|
-
class=${
|
|
82
|
+
class=${S({ notification: !0, closing: this._closing, [this.type]: !0 })}
|
|
83
83
|
role="alert"
|
|
84
84
|
style=${A({ transform: this._closing ? "translateX(120%)" : "translateX(0)", opacity: this._closing ? "0" : "1", boxShadow: `var(--schmancy-sys-elevation-${t})`, transition: "transform 0.3s cubic-bezier(0.4, 0, 0.2, 1), opacity 0.3s cubic-bezier(0.4, 0, 0.2, 1), box-shadow 0.2s ease" })}
|
|
85
85
|
@mouseenter=${this._handleMouseEnter}
|
|
@@ -215,7 +215,7 @@ let u = class extends C(':host{display:block;margin-bottom:10px}:host:last-child
|
|
|
215
215
|
}
|
|
216
216
|
}
|
|
217
217
|
};
|
|
218
|
-
d([h({ type: String })], u.prototype, "title", 2), d([h({ type: String })], u.prototype, "message", 2), d([h({ type: String })], u.prototype, "type", 2), d([h({ type: Boolean })], u.prototype, "closable", 2), d([h({ type: Number })], u.prototype, "duration", 2), d([h({ type: String })], u.prototype, "id", 2), d([h({ type: Boolean })], u.prototype, "playSound", 2), d([h({ type: Boolean })], u.prototype, "showProgress", 2), d([g()], u.prototype, "_visible", 2), d([g()], u.prototype, "_progress", 2), d([g()], u.prototype, "_hovered", 2), d([g()], u.prototype, "_closing", 2), d([g()], u.prototype, "_autoCloseTimer", 2), d([g()], u.prototype, "_progressTimer", 2), u = d([
|
|
218
|
+
d([h({ type: String })], u.prototype, "title", 2), d([h({ type: String })], u.prototype, "message", 2), d([h({ type: String })], u.prototype, "type", 2), d([h({ type: Boolean })], u.prototype, "closable", 2), d([h({ type: Number })], u.prototype, "duration", 2), d([h({ type: String })], u.prototype, "id", 2), d([h({ type: Boolean })], u.prototype, "playSound", 2), d([h({ type: Boolean })], u.prototype, "showProgress", 2), d([g()], u.prototype, "_visible", 2), d([g()], u.prototype, "_progress", 2), d([g()], u.prototype, "_hovered", 2), d([g()], u.prototype, "_closing", 2), d([g()], u.prototype, "_autoCloseTimer", 2), d([g()], u.prototype, "_progressTimer", 2), u = d([_("sch-notification")], u);
|
|
219
219
|
class O {
|
|
220
220
|
constructor() {
|
|
221
221
|
this.audioContext = null;
|
|
@@ -228,71 +228,71 @@ class O {
|
|
|
228
228
|
return this.audioContext;
|
|
229
229
|
}
|
|
230
230
|
playInfoSound(t = 0.2) {
|
|
231
|
-
const e = this.getAudioContext(), i = e.currentTime, s = e.createOscillator(), n = e.createGain(),
|
|
232
|
-
s.type = "sine", s.frequency.setValueAtTime(392, i), s.frequency.exponentialRampToValueAtTime(523.25, i + 0.25),
|
|
231
|
+
const e = this.getAudioContext(), i = e.currentTime, s = e.createOscillator(), n = e.createGain(), a = e.createBiquadFilter();
|
|
232
|
+
s.type = "sine", s.frequency.setValueAtTime(392, i), s.frequency.exponentialRampToValueAtTime(523.25, i + 0.25), a.type = "lowpass", a.frequency.value = 1500, n.gain.setValueAtTime(1e-4, i), n.gain.exponentialRampToValueAtTime(t, i + 0.15), n.gain.exponentialRampToValueAtTime(1e-4, i + 0.4), s.connect(a).connect(n).connect(e.destination), s.start(i), s.stop(i + 0.45);
|
|
233
233
|
}
|
|
234
234
|
playSuccessSound(t = 0.2) {
|
|
235
|
-
const e = this.getAudioContext(), i = e.currentTime, s = (n,
|
|
235
|
+
const e = this.getAudioContext(), i = e.currentTime, s = (n, a, r) => {
|
|
236
236
|
const c = e.createOscillator(), w = e.createGain(), v = e.createBiquadFilter();
|
|
237
|
-
c.type = "sine", c.frequency.setValueAtTime(n, i), v.type = "lowpass", v.frequency.value = 4 * n, w.gain.setValueAtTime(1e-4, i), w.gain.exponentialRampToValueAtTime(t, i + 0.1), w.gain.exponentialRampToValueAtTime(1e-4, i +
|
|
237
|
+
c.type = "sine", c.frequency.setValueAtTime(n, i), v.type = "lowpass", v.frequency.value = 4 * n, w.gain.setValueAtTime(1e-4, i), w.gain.exponentialRampToValueAtTime(t, i + 0.1), w.gain.exponentialRampToValueAtTime(1e-4, i + r), c.connect(v).connect(w).connect(e.destination), c.start(i + a), c.stop(i + r);
|
|
238
238
|
};
|
|
239
239
|
s(659.25, 0, 0.6), s(523.25, 0.05, 0.55);
|
|
240
240
|
}
|
|
241
241
|
playWarningSound(t = 0.25) {
|
|
242
|
-
const e = this.getAudioContext(), i = e.currentTime, s = e.createOscillator(), n = e.createOscillator(),
|
|
243
|
-
s.type = "sine", n.type = "sine", s.frequency.setValueAtTime(349.23, i), n.frequency.setValueAtTime(440, i),
|
|
242
|
+
const e = this.getAudioContext(), i = e.currentTime, s = e.createOscillator(), n = e.createOscillator(), a = e.createGain(), r = e.createBiquadFilter();
|
|
243
|
+
s.type = "sine", n.type = "sine", s.frequency.setValueAtTime(349.23, i), n.frequency.setValueAtTime(440, i), r.type = "lowpass", r.frequency.value = 1e3, a.gain.setValueAtTime(1e-4, i), a.gain.exponentialRampToValueAtTime(t, i + 0.08), a.gain.exponentialRampToValueAtTime(1e-4, i + 0.5), s.connect(r), n.connect(r), r.connect(a).connect(e.destination), s.start(i), n.start(i), s.stop(i + 0.55), n.stop(i + 0.55);
|
|
244
244
|
}
|
|
245
245
|
playErrorSound(t = 0.25) {
|
|
246
|
-
const e = this.getAudioContext(), i = e.currentTime, s = e.createOscillator(), n = e.createGain(),
|
|
247
|
-
s.type = "triangle", s.frequency.setValueAtTime(220, i), s.frequency.exponentialRampToValueAtTime(1760, i + 0.3),
|
|
246
|
+
const e = this.getAudioContext(), i = e.currentTime, s = e.createOscillator(), n = e.createGain(), a = e.createBiquadFilter();
|
|
247
|
+
s.type = "triangle", s.frequency.setValueAtTime(220, i), s.frequency.exponentialRampToValueAtTime(1760, i + 0.3), a.type = "lowpass", a.frequency.value = 800, a.Q.value = 0.5, n.gain.setValueAtTime(1e-4, i), n.gain.exponentialRampToValueAtTime(0.8 * t, i + 0.1), n.gain.exponentialRampToValueAtTime(1e-4, i + 0.7), s.connect(a).connect(n).connect(e.destination), s.start(i), s.stop(i + 0.75);
|
|
248
248
|
}
|
|
249
249
|
async generateAudioFiles(t = 0.25) {
|
|
250
250
|
const i = {};
|
|
251
251
|
return i.info = await this.generateAudioFile(async (s) => {
|
|
252
252
|
const n = s.createOscillator();
|
|
253
253
|
n.type = "sine", n.frequency.setValueAtTime(320, 0), n.frequency.exponentialRampToValueAtTime(520, 0.3);
|
|
254
|
-
const
|
|
255
|
-
|
|
254
|
+
const a = s.createGain();
|
|
255
|
+
a.gain.setValueAtTime(0, 0), a.gain.linearRampToValueAtTime(t, 0.1), a.gain.linearRampToValueAtTime(0, 0.5), n.connect(a), a.connect(s.destination), n.start(), n.stop(0.5);
|
|
256
256
|
}, 44100, 1), i.success = await this.generateAudioFile(async (s) => {
|
|
257
257
|
const n = s.createOscillator();
|
|
258
258
|
n.type = "sine", n.frequency.setValueAtTime(660, 0);
|
|
259
|
-
const
|
|
260
|
-
|
|
261
|
-
const
|
|
262
|
-
|
|
259
|
+
const a = s.createOscillator();
|
|
260
|
+
a.type = "sine", a.frequency.setValueAtTime(440, 0);
|
|
261
|
+
const r = s.createGain();
|
|
262
|
+
r.gain.setValueAtTime(0, 0), r.gain.linearRampToValueAtTime(t, 0.1), r.gain.linearRampToValueAtTime(0, 0.5);
|
|
263
263
|
const c = s.createGain();
|
|
264
|
-
c.gain.setValueAtTime(0, 0), c.gain.linearRampToValueAtTime(0.6 * t, 0.15), c.gain.linearRampToValueAtTime(0, 0.7), n.connect(
|
|
264
|
+
c.gain.setValueAtTime(0, 0), c.gain.linearRampToValueAtTime(0.6 * t, 0.15), c.gain.linearRampToValueAtTime(0, 0.7), n.connect(r), r.connect(s.destination), a.connect(c), c.connect(s.destination), n.start(), a.start(0.15), n.stop(0.5), a.stop(0.7);
|
|
265
265
|
}, 44100, 1), i.warning = await this.generateAudioFile(async (s) => {
|
|
266
266
|
const n = s.createOscillator();
|
|
267
267
|
n.type = "sine", n.frequency.setValueAtTime(293.66, 0);
|
|
268
|
-
const
|
|
269
|
-
|
|
270
|
-
const
|
|
271
|
-
|
|
268
|
+
const a = s.createOscillator();
|
|
269
|
+
a.type = "sine", a.frequency.setValueAtTime(349.23, 0);
|
|
270
|
+
const r = s.createGain();
|
|
271
|
+
r.gain.setValueAtTime(0, 0), r.gain.linearRampToValueAtTime(t, 0.1), r.gain.linearRampToValueAtTime(0.6 * t, 0.2), r.gain.linearRampToValueAtTime(0.8 * t, 0.3), r.gain.linearRampToValueAtTime(0, 0.6), n.connect(r), a.connect(r), r.connect(s.destination), n.start(), a.start(), n.stop(0.6), a.stop(0.6);
|
|
272
272
|
}, 44100, 1), i.error = await this.generateAudioFile(async (s) => {
|
|
273
273
|
const n = s.createOscillator();
|
|
274
274
|
n.type = "sine", n.frequency.setValueAtTime(196, 0);
|
|
275
|
-
const
|
|
276
|
-
|
|
277
|
-
const
|
|
278
|
-
|
|
275
|
+
const a = s.createGain();
|
|
276
|
+
a.gain.setValueAtTime(0, 0), a.gain.linearRampToValueAtTime(t, 0.1), a.gain.linearRampToValueAtTime(0.4 * t, 0.2), a.gain.linearRampToValueAtTime(0.6 * t, 0.3), a.gain.linearRampToValueAtTime(0, 0.7);
|
|
277
|
+
const r = s.createBiquadFilter();
|
|
278
|
+
r.type = "lowpass", r.frequency.value = 600, r.Q.value = 0.7, n.connect(r), r.connect(a), a.connect(s.destination), n.start(), n.stop(0.7);
|
|
279
279
|
}, 44100, 1), i;
|
|
280
280
|
}
|
|
281
281
|
async generateAudioFile(t, e = 44100, i = 1) {
|
|
282
282
|
const s = new OfflineAudioContext(2, e * i, e);
|
|
283
283
|
await t(s);
|
|
284
|
-
const n = await s.startRendering(),
|
|
285
|
-
return URL.createObjectURL(
|
|
284
|
+
const n = await s.startRendering(), a = this.audioBufferToWav(n);
|
|
285
|
+
return URL.createObjectURL(a);
|
|
286
286
|
}
|
|
287
287
|
audioBufferToWav(t) {
|
|
288
|
-
const e = t.numberOfChannels, i = t.sampleRate, s = 2 * e, n = this.getAudioSamples(t, 16),
|
|
289
|
-
return this.writeString(c, 0, "RIFF"), c.setUint32(4, 36 +
|
|
288
|
+
const e = t.numberOfChannels, i = t.sampleRate, s = 2 * e, n = this.getAudioSamples(t, 16), a = 2 * n.length, r = new ArrayBuffer(44 + a), c = new DataView(r);
|
|
289
|
+
return this.writeString(c, 0, "RIFF"), c.setUint32(4, 36 + a, !0), this.writeString(c, 8, "WAVE"), this.writeString(c, 12, "fmt "), c.setUint32(16, 16, !0), c.setUint16(20, 1, !0), c.setUint16(22, e, !0), c.setUint32(24, i, !0), c.setUint32(28, i * s, !0), c.setUint16(32, s, !0), c.setUint16(34, 16, !0), this.writeString(c, 36, "data"), c.setUint32(40, a, !0), this.writeInt16Samples(c, 44, n), new Blob([r], { type: "audio/wav" });
|
|
290
290
|
}
|
|
291
291
|
getAudioSamples(t, e) {
|
|
292
|
-
const i = t.numberOfChannels, s = t.length, n = [],
|
|
293
|
-
for (let
|
|
294
|
-
const w = t.getChannelData(c)[
|
|
295
|
-
n.push(v *
|
|
292
|
+
const i = t.numberOfChannels, s = t.length, n = [], a = e === 16 ? 32768 : 128;
|
|
293
|
+
for (let r = 0; r < s; r++) for (let c = 0; c < i; c++) {
|
|
294
|
+
const w = t.getChannelData(c)[r], v = Math.max(-1, Math.min(1, w));
|
|
295
|
+
n.push(v * a);
|
|
296
296
|
}
|
|
297
297
|
return n;
|
|
298
298
|
}
|
|
@@ -303,9 +303,11 @@ class O {
|
|
|
303
303
|
for (let s = 0; s < i.length; s++) t.setUint8(e + s, i.charCodeAt(s));
|
|
304
304
|
}
|
|
305
305
|
}
|
|
306
|
-
class
|
|
306
|
+
class E {
|
|
307
307
|
constructor() {
|
|
308
|
-
this.audioContext = null, this.soundBuffers = /* @__PURE__ */ new Map(), this.volume = 0.5, this.muted = !1, this.soundGenerator = new O(), this.soundUrls = { info: "/assets/sounds/notification-info.mp3", success: "/assets/sounds/notification-success.mp3", warning: "/assets/sounds/notification-warning.mp3", error: "/assets/sounds/notification-error.mp3" }, this.
|
|
308
|
+
this.audioContext = null, this.soundBuffers = /* @__PURE__ */ new Map(), this.volume = 0.5, this.muted = !1, this.soundGenerator = new O(), this.disconnecting = new EventTarget(), this.soundUrls = { info: "/assets/sounds/notification-info.mp3", success: "/assets/sounds/notification-success.mp3", warning: "/assets/sounds/notification-warning.mp3", error: "/assets/sounds/notification-error.mp3" }, this.handleAudioEnded = (t) => () => {
|
|
309
|
+
t.remove();
|
|
310
|
+
}, this.initializeAudioFiles();
|
|
309
311
|
}
|
|
310
312
|
async initializeAudioFiles() {
|
|
311
313
|
try {
|
|
@@ -344,8 +346,8 @@ class B {
|
|
|
344
346
|
const e = this.getAudioContext();
|
|
345
347
|
if (e.state === "suspended" && await e.resume(), this.soundUrls[t].startsWith("blob:")) return void this.playFallbackSound(t);
|
|
346
348
|
if (!this.soundBuffers.has(t)) try {
|
|
347
|
-
const
|
|
348
|
-
this.soundBuffers.set(t,
|
|
349
|
+
const a = await this.loadSound(t);
|
|
350
|
+
this.soundBuffers.set(t, a);
|
|
349
351
|
} catch {
|
|
350
352
|
return void this.playDirectGeneratedSound(t);
|
|
351
353
|
}
|
|
@@ -380,9 +382,7 @@ class B {
|
|
|
380
382
|
playFallbackSound(t) {
|
|
381
383
|
if (!this.muted) try {
|
|
382
384
|
const e = new Audio(this.soundUrls[t]);
|
|
383
|
-
e.volume = this.volume, e.
|
|
384
|
-
e.remove();
|
|
385
|
-
}), e.play().catch((i) => {
|
|
385
|
+
e.volume = this.volume, x(e, "ended").pipe(T(x(this.disconnecting, "disconnect"))).subscribe(this.handleAudioEnded(e)), e.play().catch((i) => {
|
|
386
386
|
this.playDirectGeneratedSound(t);
|
|
387
387
|
});
|
|
388
388
|
} catch {
|
|
@@ -410,14 +410,20 @@ class B {
|
|
|
410
410
|
getSoundUrl(t) {
|
|
411
411
|
return this.soundUrls[t];
|
|
412
412
|
}
|
|
413
|
+
dispose() {
|
|
414
|
+
this.disconnecting.dispatchEvent(new Event("disconnect")), this.audioContext && this.audioContext.state !== "closed" && this.audioContext.close().catch((t) => {
|
|
415
|
+
});
|
|
416
|
+
}
|
|
413
417
|
}
|
|
414
|
-
var
|
|
415
|
-
for (var s, n = i > 1 ? void 0 : i ?
|
|
416
|
-
return i && n &&
|
|
418
|
+
var B = Object.defineProperty, U = Object.getOwnPropertyDescriptor, b = (o, t, e, i) => {
|
|
419
|
+
for (var s, n = i > 1 ? void 0 : i ? U(t, e) : t, a = o.length - 1; a >= 0; a--) (s = o[a]) && (n = (i ? s(t, e, n) : s(n)) || n);
|
|
420
|
+
return i && n && B(t, e, n), n;
|
|
417
421
|
};
|
|
418
422
|
let y = class extends C(":host{display:block}.notification-container{position:fixed;z-index:9999;padding:12px;pointer-events:none;width:100%;max-width:424px}.notification-container sch-notification{pointer-events:auto}.notification-container.top-right{top:0;right:0;display:flex;flex-direction:column-reverse}.notification-container.top-left{top:0;left:0;display:flex;flex-direction:column-reverse}.notification-container.bottom-right{bottom:0;right:0;display:flex;flex-direction:column}.notification-container.bottom-left{bottom:0;left:0;display:flex;flex-direction:column}.notification-container.top-center{top:0;left:50%;transform:translate(-50%);display:flex;flex-direction:column-reverse}.notification-container.bottom-center{bottom:0;left:50%;transform:translate(-50%);display:flex;flex-direction:column}") {
|
|
419
423
|
constructor() {
|
|
420
|
-
super(...arguments), this.position = "top-right", this.maxVisibleNotifications = 2, this.playSound = !1, this.audioVolume = 0.1, this._notifications = [], this._audioService = new
|
|
424
|
+
super(...arguments), this.position = "top-right", this.maxVisibleNotifications = 2, this.playSound = !1, this.audioVolume = 0.1, this._notifications = [], this._audioService = new E(), this.handlePlaySound = (o) => {
|
|
425
|
+
this.playSound && this._audioService.playSound(o.detail.type);
|
|
426
|
+
};
|
|
421
427
|
}
|
|
422
428
|
connectedCallback() {
|
|
423
429
|
super.connectedCallback(), this._audioService.setVolume(this.audioVolume), x(window, "schmancy-notification").pipe(T(this.disconnecting)).subscribe((o) => {
|
|
@@ -426,9 +432,7 @@ let y = class extends C(":host{display:block}.notification-container{position:fi
|
|
|
426
432
|
this.removeNotification(o.detail.id);
|
|
427
433
|
}), x(window, "schmancy-notification-update").pipe(T(this.disconnecting)).subscribe((o) => {
|
|
428
434
|
this.updateNotification(o.detail.id, o.detail);
|
|
429
|
-
}), this
|
|
430
|
-
this.playSound && this._audioService.playSound(o.detail.type);
|
|
431
|
-
});
|
|
435
|
+
}), x(this, "playsound").pipe(T(this.disconnecting)).subscribe(this.handlePlaySound);
|
|
432
436
|
}
|
|
433
437
|
addNotification(o) {
|
|
434
438
|
const t = o.id || `notification-${Date.now()}-${Math.floor(1e4 * Math.random())}`, e = { id: t, title: o.title || "", message: o.message, type: o.type || "info", duration: o.duration !== void 0 ? o.duration : 750, closable: o.closable === void 0 || o.closable, playSound: o.playSound !== void 0 ? o.playSound : this.playSound, showProgress: o.showProgress !== void 0 && o.showProgress };
|
|
@@ -448,7 +452,7 @@ let y = class extends C(":host{display:block}.notification-container{position:fi
|
|
|
448
452
|
render() {
|
|
449
453
|
return p`
|
|
450
454
|
<div
|
|
451
|
-
class=${
|
|
455
|
+
class=${S({ "notification-container": !0, [this.position]: !0 })}
|
|
452
456
|
>
|
|
453
457
|
${k(this._notifications, (o) => o.id, (o) => p`
|
|
454
458
|
<sch-notification
|
|
@@ -467,7 +471,7 @@ let y = class extends C(":host{display:block}.notification-container{position:fi
|
|
|
467
471
|
`;
|
|
468
472
|
}
|
|
469
473
|
};
|
|
470
|
-
b([h({ type: String })], y.prototype, "position", 2), b([h({ type: Number })], y.prototype, "maxVisibleNotifications", 2), b([h({ type: Boolean })], y.prototype, "playSound", 2), b([h({ type: Number })], y.prototype, "audioVolume", 2), b([g()], y.prototype, "_notifications", 2), y = b([
|
|
474
|
+
b([h({ type: String })], y.prototype, "position", 2), b([h({ type: Number })], y.prototype, "maxVisibleNotifications", 2), b([h({ type: Boolean })], y.prototype, "playSound", 2), b([h({ type: Number })], y.prototype, "audioVolume", 2), b([g()], y.prototype, "_notifications", 2), y = b([_("sch-notification-container")], y);
|
|
471
475
|
const f = class f {
|
|
472
476
|
constructor() {
|
|
473
477
|
this.notificationStack = [];
|
|
@@ -520,8 +524,8 @@ let m = f;
|
|
|
520
524
|
const Q = { show: (o) => m.getInstance().notify(o), info: (o, t = {}) => m.getInstance().info(o, t), success: (o, t = {}) => m.getInstance().success(o, t), warning: (o, t = {}) => m.getInstance().warning(o, t), error: (o, t = {}) => m.getInstance().error(o, t), customDuration: (o, t, e = {}) => m.getInstance().customDuration(o, t, e), persistent: (o, t = {}) => m.getInstance().persistent(o, t), dismiss: (o) => m.getInstance().dismiss(o), update: (o, t) => m.getInstance().update(o, t) };
|
|
521
525
|
export {
|
|
522
526
|
Q as $,
|
|
523
|
-
|
|
527
|
+
E as N,
|
|
524
528
|
u as S,
|
|
525
529
|
y as a
|
|
526
530
|
};
|
|
527
|
-
//# sourceMappingURL=notification-service-
|
|
531
|
+
//# sourceMappingURL=notification-service-BIH173dS.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"notification-service-BIH173dS.js","sources":["../src/notification/notification.ts","../src/notification/notification-audio-generator.ts","../src/notification/notification-audio.ts","../src/notification/notification-container.ts","../src/notification/notification-service.ts"],"sourcesContent":["import { $LitElement } from '@mixins/index'\nimport { color } from '@schmancy/directives'\nimport { SchmancyTheme } from '@schmancy/theme/theme.interface'\nimport { html, PropertyValues } from 'lit'\nimport { customElement, property, state } from 'lit/decorators.js'\nimport { classMap } from 'lit/directives/class-map.js'\nimport { styleMap } from 'lit/directives/style-map.js'\nimport '@schmancy/progress'\nimport style from './notification.scss?inline'\n\nexport type NotificationType = 'info' | 'success' | 'warning' | 'error'\n\n/**\n * @fires close - When notification is closed\n */\n@customElement('sch-notification')\nexport default class SchmancyNotification extends $LitElement(style) {\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\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\t@state() private _autoCloseTimer?: number\n\t@state() private _progressTimer?: number\n\n\tconnectedCallback() {\n\t\tsuper.connectedCallback()\n\n\t\tif (this.duration > 0) {\n\t\t\tthis._startAutoCloseTimer()\n\t\t}\n\n\t\tif (this.playSound) {\n\t\t\tthis._playSound()\n\t\t}\n\t}\n\n\tdisconnectedCallback() {\n\t\tthis._clearTimers()\n\t\tsuper.disconnectedCallback()\n\t}\n\n\tupdated(changedProps: PropertyValues) {\n\t\tsuper.updated(changedProps)\n\n\t\tif (changedProps.has('duration') && this.duration > 0) {\n\t\t\tthis._clearTimers()\n\t\t\tthis._startAutoCloseTimer()\n\t\t}\n\t}\n\n\tprivate _startAutoCloseTimer() {\n\t\tif (this.duration <= 0) return\n\n\t\tconst startTime = Date.now()\n\t\tconst endTime = startTime + this.duration\n\n\t\t// Setup the auto-close timer\n\t\tthis._autoCloseTimer = window.setTimeout(() => {\n\t\t\tthis.close()\n\t\t}, this.duration)\n\n\t\t// Setup the progress timer to update every 16ms (60fps)\n\t\tthis._progressTimer = window.setInterval(() => {\n\t\t\tif (this._hovered) return\n\n\t\t\tconst now = Date.now()\n\t\t\tconst remaining = Math.max(0, endTime - now)\n\t\t\tthis._progress = (remaining / this.duration) * 100\n\n\t\t\tif (remaining <= 0) {\n\t\t\t\tthis._clearTimers()\n\t\t\t}\n\t\t}, 16)\n\t}\n\n\tprivate _clearTimers() {\n\t\tif (this._autoCloseTimer) {\n\t\t\tclearTimeout(this._autoCloseTimer)\n\t\t\tthis._autoCloseTimer = undefined\n\t\t}\n\n\t\tif (this._progressTimer) {\n\t\t\tclearInterval(this._progressTimer)\n\t\t\tthis._progressTimer = undefined\n\t\t}\n\t}\n\n\tprivate _pauseTimers() {\n\t\tthis._clearTimers()\n\t}\n\n\tprivate _resumeTimers() {\n\t\tif (this.duration > 0) {\n\t\t\t// Calculate remaining time based on progress\n\t\t\tconst remainingTime = (this._progress / 100) * this.duration\n\n\t\t\tif (remainingTime > 0) {\n\t\t\t\tthis._autoCloseTimer = window.setTimeout(() => {\n\t\t\t\t\tthis.close()\n\t\t\t\t}, remainingTime)\n\n\t\t\t\tconst startTime = Date.now()\n\t\t\t\tconst endTime = startTime + remainingTime\n\n\t\t\t\tthis._progressTimer = window.setInterval(() => {\n\t\t\t\t\tif (this._hovered) return\n\n\t\t\t\t\tconst now = Date.now()\n\t\t\t\t\tconst remaining = Math.max(0, endTime - now)\n\t\t\t\t\tthis._progress = (remaining / remainingTime) * 100\n\n\t\t\t\t\tif (remaining <= 0) {\n\t\t\t\t\t\tthis._clearTimers()\n\t\t\t\t\t}\n\t\t\t\t}, 16)\n\t\t\t}\n\t\t}\n\t}\n\n\tprivate _playSound() {\n\t\t// Dispatch event to play sound through audio service\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._pauseTimers()\n\t}\n\n\tprivate _handleMouseLeave() {\n\t\tthis._hovered = false\n\t\tthis._resumeTimers()\n\t}\n\n\tpublic close() {\n\t\tif (this._closing) return\n\n\t\tthis._closing = true\n\t\tthis._clearTimers()\n\n\t\t// Add closing animation\n\t\tthis._visible = false\n\n\t\t// Dispatch close event\n\t\tsetTimeout(() => {\n\t\t\tthis.dispatchEvent(\n\t\t\t\tnew CustomEvent('close', {\n\t\t\t\t\tdetail: { id: this.id },\n\t\t\t\t\tbubbles: true,\n\t\t\t\t\tcomposed: true,\n\t\t\t\t}),\n\t\t\t)\n\t\t}, 300) // Match animation duration\n\t}\n\n\trender() {\n\t\tif (!this._visible && this._closing) return html``\n\n\t\tconst typeStyles = this._getTypeStyles()\n\n\t\t// Calculate elevation based on hover state\n\t\tconst elevationLevel = this._hovered ? '3' : '2'\n\n\t\treturn html`\n\t\t\t<div\n\t\t\t\tclass=${classMap({\n\t\t\t\t\tnotification: true,\n\t\t\t\t\tclosing: this._closing,\n\t\t\t\t\t[this.type]: true,\n\t\t\t\t})}\n\t\t\t\trole=\"alert\"\n\t\t\t\tstyle=${styleMap({\n\t\t\t\t\ttransform: this._closing ? 'translateX(120%)' : 'translateX(0)',\n\t\t\t\t\topacity: this._closing ? '0' : '1',\n\t\t\t\t\tboxShadow: `var(--schmancy-sys-elevation-${elevationLevel})`,\n\t\t\t\t\ttransition:\n\t\t\t\t\t\t'transform 0.3s cubic-bezier(0.4, 0, 0.2, 1), opacity 0.3s cubic-bezier(0.4, 0, 0.2, 1), box-shadow 0.2s ease',\n\t\t\t\t})}\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<div class=\"notification-content\">\n\t\t\t\t\t<div\n\t\t\t\t\t\tclass=\"icon-container\"\n\t\t\t\t\t\t${color({\n\t\t\t\t\t\t\tcolor: typeStyles.iconColor,\n\t\t\t\t\t\t\tbgColor: `color-mix(in srgb, ${typeStyles.iconColor} 10%, transparent)`,\n\t\t\t\t\t\t})}\n\t\t\t\t\t>\n\t\t\t\t\t\t${typeStyles.icon}\n\t\t\t\t\t</div>\n\n\t\t\t\t\t<div class=\"content\">\n\t\t\t\t\t\t${this.title\n\t\t\t\t\t\t\t? html`\n\t\t\t\t\t\t\t\t\t<div\n\t\t\t\t\t\t\t\t\t\tclass=\"title\"\n\t\t\t\t\t\t\t\t\t\tstyle=${styleMap({\n\t\t\t\t\t\t\t\t\t\t\tcolor:\n\t\t\t\t\t\t\t\t\t\t\t\tthis.type === 'info'\n\t\t\t\t\t\t\t\t\t\t\t\t\t? `color-mix(in srgb, ${SchmancyTheme.sys.color.primary.default} 90%, ${SchmancyTheme.sys.color.surface.on} 10%)`\n\t\t\t\t\t\t\t\t\t\t\t\t\t: this.type === 'success'\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t? `color-mix(in srgb, ${SchmancyTheme.sys.color.success.default} 90%, ${SchmancyTheme.sys.color.surface.on} 10%)`\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t: this.type === 'warning'\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t? `color-mix(in srgb, ${SchmancyTheme.sys.color.tertiary.default} 90%, ${SchmancyTheme.sys.color.surface.on} 10%)`\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t: `color-mix(in srgb, ${SchmancyTheme.sys.color.error.default} 90%, ${SchmancyTheme.sys.color.surface.on} 10%)`,\n\t\t\t\t\t\t\t\t\t\t})}\n\t\t\t\t\t\t\t\t\t>\n\t\t\t\t\t\t\t\t\t\t${this.title}\n\t\t\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t\t\t`\n\t\t\t\t\t\t\t: ''}\n\n\t\t\t\t\t\t<div class=\"message\">${this.message}</div>\n\t\t\t\t\t</div>\n\n\t\t\t\t\t${this.closable\n\t\t\t\t\t\t? html`\n\t\t\t\t\t\t\t\t<button\n\t\t\t\t\t\t\t\t\tclass=\"close-button\"\n\t\t\t\t\t\t\t\t\taria-label=\"Close notification\"\n\t\t\t\t\t\t\t\t\t@click=${this.close}\n\t\t\t\t\t\t\t\t\tstyle=${styleMap({\n\t\t\t\t\t\t\t\t\t\tcolor:\n\t\t\t\t\t\t\t\t\t\t\tthis.type === 'info'\n\t\t\t\t\t\t\t\t\t\t\t\t? SchmancyTheme.sys.color.surface.onVariant\n\t\t\t\t\t\t\t\t\t\t\t\t: `color-mix(in srgb, ${typeStyles.iconColor} 80%, ${SchmancyTheme.sys.color.surface.onVariant} 20%)`,\n\t\t\t\t\t\t\t\t\t})}\n\t\t\t\t\t\t\t\t>\n\t\t\t\t\t\t\t\t\t<svg\n\t\t\t\t\t\t\t\t\t\twidth=\"18\"\n\t\t\t\t\t\t\t\t\t\theight=\"18\"\n\t\t\t\t\t\t\t\t\t\tviewBox=\"0 0 24 24\"\n\t\t\t\t\t\t\t\t\t\tfill=\"none\"\n\t\t\t\t\t\t\t\t\t\tstroke=\"currentColor\"\n\t\t\t\t\t\t\t\t\t\tstroke-width=\"2\"\n\t\t\t\t\t\t\t\t\t\tstroke-linecap=\"round\"\n\t\t\t\t\t\t\t\t\t\tstroke-linejoin=\"round\"\n\t\t\t\t\t\t\t\t\t>\n\t\t\t\t\t\t\t\t\t\t<line x1=\"18\" y1=\"6\" x2=\"6\" y2=\"18\"></line>\n\t\t\t\t\t\t\t\t\t\t<line x1=\"6\" y1=\"6\" x2=\"18\" y2=\"18\"></line>\n\t\t\t\t\t\t\t\t\t</svg>\n\t\t\t\t\t\t\t\t</button>\n\t\t\t\t\t\t\t`\n\t\t\t\t\t\t: ''}\n\t\t\t\t</div>\n\n\t\t\t\t${this.showProgress || this.duration > 0\n\t\t\t\t\t? html`\n\t\t\t\t\t\t\t<schmancy-progress\n\t\t\t\t\t\t\t\tstyle=\"position: absolute; bottom: 0; left: 0; right: 0; width: 100%;\"\n\t\t\t\t\t\t\t\tsize=\"sm\"\n\t\t\t\t\t\t\t\t.color=${this.type === 'error' ? 'error' : this.type === 'success' ? 'success' : 'primary'}\n\t\t\t\t\t\t\t\t?indeterminate=${this.showProgress}\n\t\t\t\t\t\t\t\t.value=${this.showProgress ? 0 : this._progress}\n\t\t\t\t\t\t\t\t.max=${100}\n\t\t\t\t\t\t\t></schmancy-progress>\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\tprivate _getTypeStyles() {\n\t\tswitch (this.type) {\n\t\t\tcase 'success':\n\t\t\t\treturn {\n\t\t\t\t\ticon: html`\n\t\t\t\t\t\t<svg\n\t\t\t\t\t\t\twidth=\"20\"\n\t\t\t\t\t\t\theight=\"20\"\n\t\t\t\t\t\t\tviewBox=\"0 0 24 24\"\n\t\t\t\t\t\t\tfill=\"none\"\n\t\t\t\t\t\t\tstroke=\"currentColor\"\n\t\t\t\t\t\t\tstroke-width=\"2\"\n\t\t\t\t\t\t\tstroke-linecap=\"round\"\n\t\t\t\t\t\t\tstroke-linejoin=\"round\"\n\t\t\t\t\t\t>\n\t\t\t\t\t\t\t<path d=\"M22 11.08V12a10 10 0 1 1-5.93-9.14\"></path>\n\t\t\t\t\t\t\t<polyline points=\"22 4 12 14.01 9 11.01\"></polyline>\n\t\t\t\t\t\t</svg>\n\t\t\t\t\t`,\n\t\t\t\t\ticonColor: SchmancyTheme.sys.color.success.default,\n\t\t\t\t\tprogressColor: `color-mix(in srgb, ${SchmancyTheme.sys.color.success.default} 95%, ${SchmancyTheme.sys.color.success.container} 5%)`,\n\t\t\t\t}\n\t\t\tcase 'warning':\n\t\t\t\treturn {\n\t\t\t\t\ticon: html`\n\t\t\t\t\t\t<svg\n\t\t\t\t\t\t\twidth=\"20\"\n\t\t\t\t\t\t\theight=\"20\"\n\t\t\t\t\t\t\tviewBox=\"0 0 24 24\"\n\t\t\t\t\t\t\tfill=\"none\"\n\t\t\t\t\t\t\tstroke=\"currentColor\"\n\t\t\t\t\t\t\tstroke-width=\"2\"\n\t\t\t\t\t\t\tstroke-linecap=\"round\"\n\t\t\t\t\t\t\tstroke-linejoin=\"round\"\n\t\t\t\t\t\t>\n\t\t\t\t\t\t\t<path d=\"M10.29 3.86L1.82 18a2 2 0 0 0 1.71 3h16.94a2 2 0 0 0 1.71-3L13.71 3.86a2 2 0 0 0-3.42 0z\"></path>\n\t\t\t\t\t\t\t<line x1=\"12\" y1=\"9\" x2=\"12\" y2=\"13\"></line>\n\t\t\t\t\t\t\t<line x1=\"12\" y1=\"17\" x2=\"12.01\" y2=\"17\"></line>\n\t\t\t\t\t\t</svg>\n\t\t\t\t\t`,\n\t\t\t\t\ticonColor: SchmancyTheme.sys.color.tertiary.default,\n\t\t\t\t\tprogressColor: `color-mix(in srgb, ${SchmancyTheme.sys.color.tertiary.default} 90%, ${SchmancyTheme.sys.color.tertiary.container} 10%)`,\n\t\t\t\t}\n\t\t\tcase 'error':\n\t\t\t\treturn {\n\t\t\t\t\ticon: html`\n\t\t\t\t\t\t<svg\n\t\t\t\t\t\t\twidth=\"20\"\n\t\t\t\t\t\t\theight=\"20\"\n\t\t\t\t\t\t\tviewBox=\"0 0 24 24\"\n\t\t\t\t\t\t\tfill=\"none\"\n\t\t\t\t\t\t\tstroke=\"currentColor\"\n\t\t\t\t\t\t\tstroke-width=\"2\"\n\t\t\t\t\t\t\tstroke-linecap=\"round\"\n\t\t\t\t\t\t\tstroke-linejoin=\"round\"\n\t\t\t\t\t\t>\n\t\t\t\t\t\t\t<circle cx=\"12\" cy=\"12\" r=\"10\"></circle>\n\t\t\t\t\t\t\t<line x1=\"15\" y1=\"9\" x2=\"9\" y2=\"15\"></line>\n\t\t\t\t\t\t\t<line x1=\"9\" y1=\"9\" x2=\"15\" y2=\"15\"></line>\n\t\t\t\t\t\t</svg>\n\t\t\t\t\t`,\n\t\t\t\t\ticonColor: SchmancyTheme.sys.color.error.default,\n\t\t\t\t\tprogressColor: `color-mix(in srgb, ${SchmancyTheme.sys.color.error.default} 92%, ${SchmancyTheme.sys.color.error.container} 8%)`,\n\t\t\t\t}\n\t\t\tcase 'info':\n\t\t\tdefault:\n\t\t\t\treturn {\n\t\t\t\t\ticon: html`\n\t\t\t\t\t\t<svg\n\t\t\t\t\t\t\twidth=\"20\"\n\t\t\t\t\t\t\theight=\"20\"\n\t\t\t\t\t\t\tviewBox=\"0 0 24 24\"\n\t\t\t\t\t\t\tfill=\"none\"\n\t\t\t\t\t\t\tstroke=\"currentColor\"\n\t\t\t\t\t\t\tstroke-width=\"2\"\n\t\t\t\t\t\t\tstroke-linecap=\"round\"\n\t\t\t\t\t\t\tstroke-linejoin=\"round\"\n\t\t\t\t\t\t>\n\t\t\t\t\t\t\t<circle cx=\"12\" cy=\"12\" r=\"10\"></circle>\n\t\t\t\t\t\t\t<line x1=\"12\" y1=\"16\" x2=\"12\" y2=\"12\"></line>\n\t\t\t\t\t\t\t<line x1=\"12\" y1=\"8\" x2=\"12.01\" y2=\"8\"></line>\n\t\t\t\t\t\t</svg>\n\t\t\t\t\t`,\n\t\t\t\t\ticonColor: SchmancyTheme.sys.color.primary.default,\n\t\t\t\t\tprogressColor: `color-mix(in srgb, ${SchmancyTheme.sys.color.primary.default} 94%, ${SchmancyTheme.sys.color.primary.container} 6%)`,\n\t\t\t\t}\n\t\t}\n\t}\n}\n\ndeclare global {\n\tinterface HTMLElementTagNameMap {\n\t\t'sch-notification': SchmancyNotification\n\t}\n}\n","/**\n * Programmatic sound generator for Schmancy notifications\n * Uses Web Audio API to generate gentle, subtle and soft sounds for each notification type\n */\nexport class NotificationSoundGenerator {\n\tprivate audioContext: AudioContext | null = null\n\n\t/**\n\t * Get or create AudioContext\n\t */\n\tprivate getAudioContext(): AudioContext {\n\t\tif (!this.audioContext) {\n\t\t\tconst AudioContextClass = window.AudioContext || (window as any).webkitAudioContext\n\t\t\tthis.audioContext = new AudioContextClass()\n\t\t}\n\t\treturn this.audioContext\n\t}\n\n\tpublic playInfoSound(volume = 0.2): void {\n\t\tconst ctx = this.getAudioContext()\n\t\tconst now = ctx.currentTime\n\n\t\tconst oscillator = ctx.createOscillator()\n\t\tconst gainNode = ctx.createGain()\n\t\tconst filter = ctx.createBiquadFilter()\n\n\t\toscillator.type = 'sine'\n\t\toscillator.frequency.setValueAtTime(392, now) // G4\n\t\toscillator.frequency.exponentialRampToValueAtTime(523.25, now + 0.25) // C5\n\n\t\tfilter.type = 'lowpass'\n\t\tfilter.frequency.value = 1500\n\n\t\tgainNode.gain.setValueAtTime(0.0001, now)\n\t\tgainNode.gain.exponentialRampToValueAtTime(volume, now + 0.15)\n\t\tgainNode.gain.exponentialRampToValueAtTime(0.0001, now + 0.4)\n\n\t\toscillator.connect(filter).connect(gainNode).connect(ctx.destination)\n\t\toscillator.start(now)\n\t\toscillator.stop(now + 0.45)\n\t}\n\n\tpublic playSuccessSound(volume = 0.2): void {\n\t\tconst ctx = this.getAudioContext()\n\t\tconst now = ctx.currentTime\n\n\t\tconst createBell = (freq: number, start: number, duration: number) => {\n\t\t\tconst osc = ctx.createOscillator()\n\t\t\tconst gain = ctx.createGain()\n\t\t\tconst filter = ctx.createBiquadFilter()\n\n\t\t\tosc.type = 'sine'\n\t\t\tosc.frequency.setValueAtTime(freq, now)\n\t\t\tfilter.type = 'lowpass'\n\t\t\tfilter.frequency.value = freq * 4\n\n\t\t\tgain.gain.setValueAtTime(0.0001, now)\n\t\t\tgain.gain.exponentialRampToValueAtTime(volume, now + 0.1)\n\t\t\tgain.gain.exponentialRampToValueAtTime(0.0001, now + duration)\n\n\t\t\tosc.connect(filter).connect(gain).connect(ctx.destination)\n\t\t\tosc.start(now + start)\n\t\t\tosc.stop(now + duration)\n\t\t}\n\n\t\tcreateBell(659.25, 0, 0.6) // E5\n\t\tcreateBell(523.25, 0.05, 0.55) // C5\n\t}\n\n\tpublic playWarningSound(volume = 0.25): void {\n\t\tconst ctx = this.getAudioContext()\n\t\tconst now = ctx.currentTime\n\n\t\tconst osc1 = ctx.createOscillator()\n\t\tconst osc2 = ctx.createOscillator()\n\t\tconst gain = ctx.createGain()\n\t\tconst filter = ctx.createBiquadFilter()\n\n\t\tosc1.type = 'sine'\n\t\tosc2.type = 'sine'\n\t\tosc1.frequency.setValueAtTime(349.23, now) // F4\n\t\tosc2.frequency.setValueAtTime(440, now) // A4\n\n\t\tfilter.type = 'lowpass'\n\t\tfilter.frequency.value = 1000\n\n\t\tgain.gain.setValueAtTime(0.0001, now)\n\t\tgain.gain.exponentialRampToValueAtTime(volume, now + 0.08)\n\t\tgain.gain.exponentialRampToValueAtTime(0.0001, now + 0.5)\n\n\t\tosc1.connect(filter)\n\t\tosc2.connect(filter)\n\t\tfilter.connect(gain).connect(ctx.destination)\n\n\t\tosc1.start(now)\n\t\tosc2.start(now)\n\t\tosc1.stop(now + 0.55)\n\t\tosc2.stop(now + 0.55)\n\t}\n\n\tpublic playErrorSound(volume = 0.25): void {\n\t\tconst ctx = this.getAudioContext()\n\t\tconst now = ctx.currentTime\n\n\t\tconst osc = ctx.createOscillator()\n\t\tconst gain = ctx.createGain()\n\t\tconst filter = ctx.createBiquadFilter()\n\n\t\tosc.type = 'triangle'\n\t\tosc.frequency.setValueAtTime(220, now) // A3\n\t\tosc.frequency.exponentialRampToValueAtTime(1760, now + 0.3) // A6\n\n\t\tfilter.type = 'lowpass'\n\t\tfilter.frequency.value = 800\n\t\tfilter.Q.value = 0.5\n\n\t\tgain.gain.setValueAtTime(0.0001, now)\n\t\tgain.gain.exponentialRampToValueAtTime(volume * 0.8, now + 0.1)\n\t\tgain.gain.exponentialRampToValueAtTime(0.0001, now + 0.7)\n\n\t\tosc.connect(filter).connect(gain).connect(ctx.destination)\n\t\tosc.start(now)\n\t\tosc.stop(now + 0.75)\n\t}\n\n\t/**\n\t * Generate audio blob files for all notification sounds\n\t * Returns a Promise that resolves with URLs to the generated audio files\n\t */\n\tpublic async generateAudioFiles(volume = 0.25): Promise<Record<string, string>> {\n\t\t// Create offline audio context for rendering\n\t\tconst sampleRate = 44100\n\t\tconst duration = 1 // 1 second duration to capture the full sound\n\n\t\tconst audioUrls: Record<string, string> = {}\n\n\t\t// Generate info sound\n\t\taudioUrls.info = await this.generateAudioFile(\n\t\t\tasync ctx => {\n\t\t\t\t// Create oscillator for main tone\n\t\t\t\tconst oscillator = ctx.createOscillator()\n\t\t\t\toscillator.type = 'sine'\n\t\t\t\toscillator.frequency.setValueAtTime(320, 0)\n\t\t\t\toscillator.frequency.exponentialRampToValueAtTime(520, 0.3)\n\n\t\t\t\t// Create gain node for volume control with softer attack/release\n\t\t\t\tconst gainNode = ctx.createGain()\n\t\t\t\tgainNode.gain.setValueAtTime(0, 0)\n\t\t\t\tgainNode.gain.linearRampToValueAtTime(volume, 0.1)\n\t\t\t\tgainNode.gain.linearRampToValueAtTime(0, 0.5)\n\n\t\t\t\t// Connect and play\n\t\t\t\toscillator.connect(gainNode)\n\t\t\t\tgainNode.connect(ctx.destination)\n\t\t\t\toscillator.start()\n\t\t\t\toscillator.stop(0.5)\n\t\t\t},\n\t\t\tsampleRate,\n\t\t\tduration,\n\t\t)\n\n\t\t// Generate success sound\n\t\taudioUrls.success = await this.generateAudioFile(\n\t\t\tasync ctx => {\n\t\t\t\t// Create main oscillator (higher note)\n\t\t\t\tconst osc1 = ctx.createOscillator()\n\t\t\t\tosc1.type = 'sine'\n\t\t\t\tosc1.frequency.setValueAtTime(660, 0)\n\n\t\t\t\t// Create secondary oscillator (lower note)\n\t\t\t\tconst osc2 = ctx.createOscillator()\n\t\t\t\tosc2.type = 'sine'\n\t\t\t\tosc2.frequency.setValueAtTime(440, 0)\n\n\t\t\t\t// Create gain nodes with softer envelope\n\t\t\t\tconst gain1 = ctx.createGain()\n\t\t\t\tgain1.gain.setValueAtTime(0, 0)\n\t\t\t\tgain1.gain.linearRampToValueAtTime(volume, 0.1)\n\t\t\t\tgain1.gain.linearRampToValueAtTime(0, 0.5)\n\n\t\t\t\tconst gain2 = ctx.createGain()\n\t\t\t\tgain2.gain.setValueAtTime(0, 0)\n\t\t\t\tgain2.gain.linearRampToValueAtTime(volume * 0.6, 0.15)\n\t\t\t\tgain2.gain.linearRampToValueAtTime(0, 0.7)\n\n\t\t\t\t// Connect and play\n\t\t\t\tosc1.connect(gain1)\n\t\t\t\tgain1.connect(ctx.destination)\n\n\t\t\t\tosc2.connect(gain2)\n\t\t\t\tgain2.connect(ctx.destination)\n\n\t\t\t\tosc1.start()\n\t\t\t\tosc2.start(0.15)\n\n\t\t\t\tosc1.stop(0.5)\n\t\t\t\tosc2.stop(0.7)\n\t\t\t},\n\t\t\tsampleRate,\n\t\t\tduration,\n\t\t)\n\n\t\t// Generate warning sound\n\t\taudioUrls.warning = await this.generateAudioFile(\n\t\t\tasync ctx => {\n\t\t\t\t// Create oscillators for a two-tone warning\n\t\t\t\tconst osc1 = ctx.createOscillator()\n\t\t\t\tosc1.type = 'sine'\n\t\t\t\tosc1.frequency.setValueAtTime(293.66, 0)\n\n\t\t\t\tconst osc2 = ctx.createOscillator()\n\t\t\t\tosc2.type = 'sine'\n\t\t\t\tosc2.frequency.setValueAtTime(349.23, 0)\n\n\t\t\t\t// Create gain node with softer envelope\n\t\t\t\tconst gain = ctx.createGain()\n\t\t\t\tgain.gain.setValueAtTime(0, 0)\n\t\t\t\tgain.gain.linearRampToValueAtTime(volume, 0.1)\n\t\t\t\tgain.gain.linearRampToValueAtTime(volume * 0.6, 0.2)\n\t\t\t\tgain.gain.linearRampToValueAtTime(volume * 0.8, 0.3)\n\t\t\t\tgain.gain.linearRampToValueAtTime(0, 0.6)\n\n\t\t\t\t// Connect and play\n\t\t\t\tosc1.connect(gain)\n\t\t\t\tosc2.connect(gain)\n\t\t\t\tgain.connect(ctx.destination)\n\n\t\t\t\tosc1.start()\n\t\t\t\tosc2.start()\n\n\t\t\t\tosc1.stop(0.6)\n\t\t\t\tosc2.stop(0.6)\n\t\t\t},\n\t\t\tsampleRate,\n\t\t\tduration,\n\t\t)\n\n\t\t// Generate error sound\n\t\taudioUrls.error = await this.generateAudioFile(\n\t\t\tasync ctx => {\n\t\t\t\t// Create main oscillator\n\t\t\t\tconst osc = ctx.createOscillator()\n\t\t\t\tosc.type = 'sine'\n\t\t\t\tosc.frequency.setValueAtTime(196, 0)\n\n\t\t\t\t// Create gain node with softer envelope\n\t\t\t\tconst gain = ctx.createGain()\n\t\t\t\tgain.gain.setValueAtTime(0, 0)\n\t\t\t\tgain.gain.linearRampToValueAtTime(volume, 0.1)\n\t\t\t\tgain.gain.linearRampToValueAtTime(volume * 0.4, 0.2)\n\t\t\t\tgain.gain.linearRampToValueAtTime(volume * 0.6, 0.3)\n\t\t\t\tgain.gain.linearRampToValueAtTime(0, 0.7)\n\n\t\t\t\t// Additional filter to make it even softer\n\t\t\t\tconst filter = ctx.createBiquadFilter()\n\t\t\t\tfilter.type = 'lowpass'\n\t\t\t\tfilter.frequency.value = 600\n\t\t\t\tfilter.Q.value = 0.7\n\n\t\t\t\t// Connect and play\n\t\t\t\tosc.connect(filter)\n\t\t\t\tfilter.connect(gain)\n\t\t\t\tgain.connect(ctx.destination)\n\n\t\t\t\tosc.start()\n\t\t\t\tosc.stop(0.7)\n\t\t\t},\n\t\t\tsampleRate,\n\t\t\tduration,\n\t\t)\n\n\t\treturn audioUrls\n\t}\n\n\t/**\n\t * Generate an audio file from a sound generation function\n\t * @param renderFunction Function that creates the sound in the provided context\n\t * @param sampleRate Sample rate for the audio\n\t * @param duration Duration in seconds\n\t * @returns Promise that resolves with the URL to the generated audio file\n\t */\n\tprivate async generateAudioFile(\n\t\trenderFunction: (ctx: OfflineAudioContext) => Promise<void>,\n\t\tsampleRate = 44100,\n\t\tduration = 1,\n\t): Promise<string> {\n\t\t// Create offline context\n\t\tconst offlineCtx = new OfflineAudioContext(2, sampleRate * duration, sampleRate)\n\n\t\t// Render the sound\n\t\tawait renderFunction(offlineCtx)\n\n\t\t// Render the audio\n\t\tconst audioBuffer = await offlineCtx.startRendering()\n\n\t\t// Convert to WAV format\n\t\tconst wavBlob = this.audioBufferToWav(audioBuffer)\n\n\t\t// Create URL\n\t\treturn URL.createObjectURL(wavBlob)\n\t}\n\n\t/**\n\t * Convert AudioBuffer to WAV format\n\t * Based on https://github.com/Jam3/audiobuffer-to-wav\n\t */\n\tprivate audioBufferToWav(buffer: AudioBuffer): Blob {\n\t\tconst numChannels = buffer.numberOfChannels\n\t\tconst sampleRate = buffer.sampleRate\n\t\tconst format = 1 // PCM\n\t\tconst bitDepth = 16\n\n\t\tconst bytesPerSample = bitDepth / 8\n\t\tconst blockAlign = numChannels * bytesPerSample\n\n\t\tconst samples = this.getAudioSamples(buffer, bitDepth)\n\t\tconst dataLength = samples.length * bytesPerSample\n\n\t\t// Create WAV header\n\t\tconst headerLength = 44\n\t\tconst wavBuffer = new ArrayBuffer(headerLength + dataLength)\n\t\tconst view = new DataView(wavBuffer)\n\n\t\t// RIFF identifier\n\t\tthis.writeString(view, 0, 'RIFF')\n\t\t// File length minus RIFF identifier and file size\n\t\tview.setUint32(4, 36 + dataLength, true)\n\t\t// RIFF type\n\t\tthis.writeString(view, 8, 'WAVE')\n\t\t// Format chunk identifier\n\t\tthis.writeString(view, 12, 'fmt ')\n\t\t// Format chunk length\n\t\tview.setUint32(16, 16, true)\n\t\t// Sample format (PCM)\n\t\tview.setUint16(20, format, true)\n\t\t// Channel count\n\t\tview.setUint16(22, numChannels, true)\n\t\t// Sample rate\n\t\tview.setUint32(24, sampleRate, true)\n\t\t// Byte rate (sample rate * block align)\n\t\tview.setUint32(28, sampleRate * blockAlign, true)\n\t\t// Block align (channel count * bytes per sample)\n\t\tview.setUint16(32, blockAlign, true)\n\t\t// Bits per sample\n\t\tview.setUint16(34, bitDepth, true)\n\t\t// Data chunk identifier\n\t\tthis.writeString(view, 36, 'data')\n\t\t// Data chunk length\n\t\tview.setUint32(40, dataLength, true)\n\n\t\t// Write the audio data\n\t\tif (bitDepth === 16) {\n\t\t\tthis.writeInt16Samples(view, headerLength, samples)\n\t\t} else {\n\t\t\tthrow new Error('Only 16-bit audio is supported')\n\t\t}\n\n\t\treturn new Blob([wavBuffer], { type: 'audio/wav' })\n\t}\n\n\t/**\n\t * Get audio samples from an AudioBuffer\n\t */\n\tprivate getAudioSamples(buffer: AudioBuffer, bitDepth: number): number[] {\n\t\tconst numChannels = buffer.numberOfChannels\n\t\tconst length = buffer.length\n\t\tconst samples: number[] = []\n\t\tconst scale = bitDepth === 16 ? 32768 : 128\n\n\t\t// Get samples from all channels\n\t\tfor (let i = 0; i < length; i++) {\n\t\t\tfor (let channel = 0; channel < numChannels; channel++) {\n\t\t\t\tconst sample = buffer.getChannelData(channel)[i]\n\t\t\t\t// Convert float32 to int16 or int8\n\t\t\t\tconst intSample = Math.max(-1, Math.min(1, sample))\n\t\t\t\tsamples.push(intSample * scale)\n\t\t\t}\n\t\t}\n\n\t\treturn samples\n\t}\n\n\t/**\n\t * Write 16-bit samples to a DataView\n\t */\n\tprivate writeInt16Samples(view: DataView, offset: number, samples: number[]): void {\n\t\tfor (let i = 0; i < samples.length; i++) {\n\t\t\tview.setInt16(offset + i * 2, samples[i], true)\n\t\t}\n\t}\n\n\t/**\n\t * Write a string to a DataView\n\t */\n\tprivate writeString(view: DataView, offset: number, string: string): void {\n\t\tfor (let i = 0; i < string.length; i++) {\n\t\t\tview.setUint8(offset + i, string.charCodeAt(i))\n\t\t}\n\t}\n}\n","import { fromEvent, takeUntil } from 'rxjs'\nimport { NotificationType } from './notification'\nimport { NotificationSoundGenerator } from './notification-audio-generator'\n\n/**\n * Audio service for playing notification sounds.\n * Uses Web Audio API with fallback to HTML5 Audio.\n */\nexport class NotificationAudioService {\n\tprivate audioContext: AudioContext | null = null\n\tprivate soundBuffers: Map<NotificationType, AudioBuffer> = new Map()\n\tprivate volume: number = 0.5\n\tprivate muted: boolean = false\n\tprivate soundGenerator = new NotificationSoundGenerator()\n\tprivate disconnecting = new EventTarget()\n\n\t// Default sound URLs (will be generated programmatically as fallback)\n\tprivate soundUrls: Record<NotificationType, string> = {\n\t\tinfo: '/assets/sounds/notification-info.mp3',\n\t\tsuccess: '/assets/sounds/notification-success.mp3',\n\t\twarning: '/assets/sounds/notification-warning.mp3',\n\t\terror: '/assets/sounds/notification-error.mp3',\n\t}\n\n\tconstructor() {\n\t\t// Initialize audio context when first needed\n\t\tthis.initializeAudioFiles()\n\t}\n\n\t/**\n\t * Initialize audio files - generate programmatically if needed\n\t */\n\tprivate async initializeAudioFiles(): Promise<void> {\n\t\ttry {\n\t\t\t// Try to load from default URLs\n\t\t\tawait this.preloadSounds()\n\t\t} catch (err) {\n\n\t\t\t// If loading fails, generate programmatically\n\t\t\ttry {\n\t\t\t\tconst generatedUrls = await this.soundGenerator.generateAudioFiles(this.volume)\n\t\t\t\tthis.soundUrls = generatedUrls\n\t\t\t} catch (genErr) {\n\t\t\t\tconsole.warn('Failed to generate notification sounds:', genErr)\n\t\t\t\t// Will fall back to direct playback when needed\n\t\t\t}\n\t\t}\n\t}\n\n\t/**\n\t * Lazy-initialize the audio context\n\t */\n\tprivate getAudioContext(): AudioContext {\n\t\tif (!this.audioContext) {\n\t\t\t// Use AudioContext with webkit prefix fallback for Safari\n\t\t\tconst AudioContextClass = window.AudioContext || (window as any).webkitAudioContext\n\t\t\tthis.audioContext = new AudioContextClass()\n\t\t}\n\n\t\treturn this.audioContext\n\t}\n\n\t/**\n\t * Preload all notification sounds\n\t */\n\tprivate async preloadSounds(): Promise<void> {\n\t\tconst types: NotificationType[] = ['info', 'success', 'warning', 'error']\n\n\t\tfor (const type of types) {\n\t\t\ttry {\n\t\t\t\tconst buffer = await this.loadSound(type)\n\t\t\t\tthis.soundBuffers.set(type, buffer)\n\t\t\t} catch (err) {\n\t\t\t\tconsole.warn(`Failed to preload ${type} sound:`, err)\n\t\t\t}\n\t\t}\n\t}\n\n\t/**\n\t * Load a sound file and decode it\n\t */\n\tprivate async loadSound(type: NotificationType): Promise<AudioBuffer> {\n\t\tconst url = this.soundUrls[type]\n\t\tconst response = await fetch(url)\n\n\t\tif (!response.ok) {\n\t\t\tthrow new Error(`Failed to load sound from ${url}: ${response.statusText}`)\n\t\t}\n\n\t\tconst arrayBuffer = await response.arrayBuffer()\n\t\treturn await this.getAudioContext().decodeAudioData(arrayBuffer)\n\t}\n\n\t/**\n\t * Play a notification sound\n\t */\n\tpublic async playSound(type: NotificationType): Promise<void> {\n\t\tif (this.muted) return\n\n\t\ttry {\n\t\t\t// Try to use Web Audio API first\n\t\t\tconst context = this.getAudioContext()\n\n\t\t\t// Ensure audio context is resumed (needed due to autoplay policy)\n\t\t\tif (context.state === 'suspended') {\n\t\t\t\tawait context.resume()\n\t\t\t}\n\n\t\t\t// Try to use programmatically generated sound first\n\t\t\tif (this.soundUrls[type].startsWith('blob:')) {\n\t\t\t\tthis.playFallbackSound(type)\n\t\t\t\treturn\n\t\t\t}\n\n\t\t\t// Load sound if not already cached\n\t\t\tif (!this.soundBuffers.has(type)) {\n\t\t\t\ttry {\n\t\t\t\t\tconst buffer = await this.loadSound(type)\n\t\t\t\t\tthis.soundBuffers.set(type, buffer)\n\t\t\t\t} catch (err) {\n\t\t\t\t\t// Fall back to direct generator\n\t\t\t\t\tthis.playDirectGeneratedSound(type)\n\t\t\t\t\treturn\n\t\t\t\t}\n\t\t\t}\n\n\t\t\tconst buffer = this.soundBuffers.get(type)\n\t\t\tif (!buffer) {\n\t\t\t\tthrow new Error(`Sound buffer for ${type} not available`)\n\t\t\t}\n\n\t\t\t// Create source and gain nodes\n\t\t\tconst source = context.createBufferSource()\n\t\t\tsource.buffer = buffer\n\n\t\t\tconst gainNode = context.createGain()\n\t\t\tgainNode.gain.value = this.volume\n\n\t\t\t// Connect and play\n\t\t\tsource.connect(gainNode)\n\t\t\tgainNode.connect(context.destination)\n\t\t\tsource.start(0)\n\t\t} catch (err) {\n\t\t\tconsole.warn(`Web Audio API buffer playback failed, trying direct generation:`, err)\n\t\t\tthis.playDirectGeneratedSound(type)\n\t\t}\n\t}\n\n\t/**\n\t * Play a directly generated sound when other methods fail\n\t */\n\tprivate playDirectGeneratedSound(type: NotificationType): void {\n\t\tif (this.muted) return\n\n\t\ttry {\n\t\t\tswitch (type) {\n\t\t\t\tcase 'info':\n\t\t\t\t\tthis.soundGenerator.playInfoSound(this.volume)\n\t\t\t\t\tbreak\n\t\t\t\tcase 'success':\n\t\t\t\t\tthis.soundGenerator.playSuccessSound(this.volume)\n\t\t\t\t\tbreak\n\t\t\t\tcase 'warning':\n\t\t\t\t\tthis.soundGenerator.playWarningSound(this.volume)\n\t\t\t\t\tbreak\n\t\t\t\tcase 'error':\n\t\t\t\t\tthis.soundGenerator.playErrorSound(this.volume)\n\t\t\t\t\tbreak\n\t\t\t}\n\t\t} catch (err) {\n\t\t\tconsole.error(`Failed to play generated sound for ${type}:`, err)\n\t\t}\n\t}\n\n\t/**\n\t * Handle audio ended event for cleanup\n\t */\n\tprivate handleAudioEnded = (audio: HTMLAudioElement) => () => {\n\t\taudio.remove()\n\t}\n\n\t/**\n\t * Play sound using HTML5 Audio as a fallback\n\t */\n\tprivate playFallbackSound(type: NotificationType): void {\n\t\tif (this.muted) return\n\n\t\ttry {\n\t\t\tconst audio = new Audio(this.soundUrls[type])\n\t\t\taudio.volume = this.volume\n\n\t\t\t// Add event listener to clean up after playback using RxJS\n\t\t\tfromEvent(audio, 'ended').pipe(\n\t\t\t\ttakeUntil(fromEvent(this.disconnecting, 'disconnect'))\n\t\t\t).subscribe(this.handleAudioEnded(audio))\n\n\t\t\taudio.play().catch(err => {\n\t\t\t\tconsole.error(`Failed to play fallback sound for ${type}:`, err)\n\t\t\t\tthis.playDirectGeneratedSound(type)\n\t\t\t})\n\t\t} catch (err) {\n\t\t\tconsole.error('HTML5 Audio fallback failed:', err)\n\t\t\tthis.playDirectGeneratedSound(type)\n\t\t}\n\t}\n\n\t/**\n\t * Set volume for notification sounds (0.0 to 1.0)\n\t */\n\tpublic setVolume(volume: number): void {\n\t\tthis.volume = Math.max(0, Math.min(1, volume))\n\t}\n\n\t/**\n\t * Get current volume level\n\t */\n\tpublic getVolume(): number {\n\t\treturn this.volume\n\t}\n\n\t/**\n\t * Mute notification sounds\n\t */\n\tpublic mute(): void {\n\t\tthis.muted = true\n\t}\n\n\t/**\n\t * Unmute notification sounds\n\t */\n\tpublic unmute(): void {\n\t\tthis.muted = false\n\t}\n\n\t/**\n\t * Check if notification sounds are muted\n\t */\n\tpublic isMuted(): boolean {\n\t\treturn this.muted\n\t}\n\n\t/**\n\t * Set custom sound URL for a notification type\n\t */\n\tpublic setSoundUrl(type: NotificationType, url: string): void {\n\t\tthis.soundUrls[type] = url\n\n\t\t// Clear cached buffer to force reload\n\t\tthis.soundBuffers.delete(type)\n\t}\n\n\t/**\n\t * Get the current sound URL for a notification type\n\t */\n\tpublic getSoundUrl(type: NotificationType): string {\n\t\treturn this.soundUrls[type]\n\t}\n\n\t/**\n\t * Cleanup all subscriptions and resources\n\t */\n\tpublic dispose(): void {\n\t\tthis.disconnecting.dispatchEvent(new Event('disconnect'))\n\n\t\t// Close audio context if exists\n\t\tif (this.audioContext && this.audioContext.state !== 'closed') {\n\t\t\tthis.audioContext.close().catch(err => {\n\t\t\t\tconsole.warn('Failed to close audio context:', err)\n\t\t\t})\n\t\t}\n\t}\n}\n","import { $LitElement } from '@mixins/index'\nimport { html } from 'lit'\nimport { customElement, property, state } from 'lit/decorators.js'\nimport { classMap } from 'lit/directives/class-map.js'\nimport { repeat } from 'lit/directives/repeat.js'\nimport { fromEvent, takeUntil } from 'rxjs'\nimport { NotificationType } from './notification'\nimport { NotificationAudioService } from './notification-audio'\nimport style from './notification-container.scss?inline'\n\nexport interface NotificationItem {\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\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\n/**\n * Container component for displaying stacked notifications.\n *\n * @element sch-notification-container\n */\n@customElement('sch-notification-container')\nexport default class SchmancyNotificationContainer extends $LitElement(style) {\n\t@property({ type: String }) position:\n\t\t| 'top-right'\n\t\t| 'top-left'\n\t\t| 'bottom-right'\n\t\t| 'bottom-left'\n\t\t| 'top-center'\n\t\t| 'bottom-center' = 'top-right'\n\t@property({ type: Number }) maxVisibleNotifications = 2\n\t@property({ type: Boolean }) playSound = false\n\t@property({ type: Number }) audioVolume = 0.1\n\n\t@state() private _notifications: NotificationItem[] = []\n\n\t// Audio service\n\tprivate _audioService = new NotificationAudioService()\n\n\tconnectedCallback() {\n\t\tsuper.connectedCallback()\n\n\t\t// Set audio volume\n\t\tthis._audioService.setVolume(this.audioVolume)\n\n\t\t// Listen for notification events\n\t\tfromEvent<CustomEvent<NotificationOptions>>(window, 'schmancy-notification')\n\t\t\t.pipe(takeUntil(this.disconnecting))\n\t\t\t.subscribe(event => {\n\t\t\t\tthis.addNotification(event.detail)\n\t\t\t})\n\n\t\t// Listen for dismiss events\n\t\tfromEvent<CustomEvent<{ id: string }>>(window, 'schmancy-notification-dismiss')\n\t\t\t.pipe(takeUntil(this.disconnecting))\n\t\t\t.subscribe(event => {\n\t\t\t\tthis.removeNotification(event.detail.id)\n\t\t\t})\n\n\t\t// Listen for update events\n\t\tfromEvent<CustomEvent<{ id: string } & Partial<NotificationOptions>>>(window, 'schmancy-notification-update')\n\t\t\t.pipe(takeUntil(this.disconnecting))\n\t\t\t.subscribe(event => {\n\t\t\t\tthis.updateNotification(event.detail.id, event.detail)\n\t\t\t})\n\n\t\t// Listen for play sound events from child notifications\n\t\tfromEvent<CustomEvent>(this, 'playsound')\n\t\t\t.pipe(takeUntil(this.disconnecting))\n\t\t\t.subscribe(this.handlePlaySound)\n\t}\n\n\t// Public API to add notifications\n\tpublic addNotification(options: NotificationOptions): string {\n\t\tconst id = options.id || `notification-${Date.now()}-${Math.floor(Math.random() * 10000)}`\n\n\t\tconst notification: NotificationItem = {\n\t\t\tid,\n\t\t\ttitle: options.title || '',\n\t\t\tmessage: options.message,\n\t\t\ttype: options.type || 'info',\n\t\t\tduration: options.duration !== undefined ? options.duration : 750,\n\t\t\tclosable: options.closable !== undefined ? options.closable : true,\n\t\t\tplaySound: options.playSound !== undefined ? options.playSound : this.playSound,\n\t\t\tshowProgress: options.showProgress !== undefined ? options.showProgress : false,\n\t\t}\n\n\t\t// Add new notification (top for top-* positions, bottom for bottom-* positions)\n\t\tif (this.position.startsWith('top')) {\n\t\t\tthis._notifications = [...this._notifications, notification]\n\t\t} else {\n\t\t\tthis._notifications = [notification, ...this._notifications]\n\t\t}\n\n\t\t// Enforce max visible notifications\n\t\tif (this._notifications.length > this.maxVisibleNotifications) {\n\t\t\tthis._notifications = this._notifications.slice(-this.maxVisibleNotifications)\n\t\t}\n\n\t\t// Play sound if enabled\n\t\tif (notification.playSound) {\n\t\t\tthis._audioService.playSound(notification.type)\n\t\t}\n\n\t\treturn id\n\t}\n\n\tpublic removeNotification(id: string) {\n\t\tthis._notifications = this._notifications.filter(n => n.id !== id)\n\t}\n\n\tpublic updateNotification(id: string, options: Partial<NotificationOptions>) {\n\t\tconst index = this._notifications.findIndex(n => n.id === id)\n\t\tif (index !== -1) {\n\t\t\tthis._notifications[index] = {\n\t\t\t\t...this._notifications[index],\n\t\t\t\t...options,\n\t\t\t}\n\t\t\tthis.requestUpdate()\n\t\t}\n\t}\n\n\tprivate handlePlaySound = (event: CustomEvent) => {\n\t\tif (this.playSound) {\n\t\t\tthis._audioService.playSound(event.detail.type)\n\t\t}\n\t}\n\n\tprivate _handleClose(e: CustomEvent) {\n\t\tconst id = e.detail.id\n\t\tthis.removeNotification(id)\n\t}\n\n\trender() {\n\t\treturn html`\n\t\t\t<div\n\t\t\t\tclass=${classMap({\n\t\t\t\t\t'notification-container': true,\n\t\t\t\t\t[this.position]: true,\n\t\t\t\t})}\n\t\t\t>\n\t\t\t\t${repeat(\n\t\t\t\t\tthis._notifications,\n\t\t\t\t\tnotification => notification.id,\n\t\t\t\t\tnotification => html`\n <sch-notification\n .id=${notification.id}\n .title=${notification.title}\n .message=${notification.message}\n .type=${notification.type}\n .duration=${notification.duration}\n ?closable=${notification.closable}\n ?playSound=${false}\n ?showProgress=${notification.showProgress}\n @close=${this._handleClose}\n ></sch-notification>\n `,\n\t\t\t\t)}\n\t\t\t</div>\n\t\t`\n\t}\n}\n\ndeclare global {\n\tinterface HTMLElementTagNameMap {\n\t\t'sch-notification-container': SchmancyNotificationContainer\n\t}\n}\n","import { NotificationOptions } from './notification-container'\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\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// Private constructor for singleton pattern\n\tprivate constructor() {}\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// Create and dispatch event\n\t\tconst event = new CustomEvent('schmancy-notification', {\n\t\t\tbubbles: true,\n\t\t\tcomposed: true,\n\t\t\tdetail: {\n\t\t\t\t...completeOptions,\n\t\t\t\tid,\n\t\t\t},\n\t\t})\n\n\t\twindow.dispatchEvent(event)\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) {\n\t\t\t// Dispatch dismiss event\n\t\t\tconst event = new CustomEvent('schmancy-notification-dismiss', {\n\t\t\t\tbubbles: true,\n\t\t\t\tcomposed: true,\n\t\t\t\tdetail: { id: targetId },\n\t\t\t})\n\t\t\twindow.dispatchEvent(event)\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\tconst event = new CustomEvent('schmancy-notification-update', {\n\t\t\tbubbles: true,\n\t\t\tcomposed: true,\n\t\t\tdetail: { id, ...options },\n\t\t})\n\t\twindow.dispatchEvent(event)\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 : 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 : 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 : 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 : 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/**\n * Global notification utility - provides a quick way to show notifications\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\nexport default NotificationService\n"],"names":["SchmancyNotification","$LitElement","constructor","super","arguments","this","title","message","type","closable","duration","id","Date","now","Math","floor","random","playSound","showProgress","_visible","_progress","_hovered","_closing","connectedCallback","_startAutoCloseTimer","_playSound","disconnectedCallback","_clearTimers","changedProps","updated","has","endTime","_autoCloseTimer","window","setTimeout","close","_progressTimer","setInterval","remaining","max","clearTimeout","clearInterval","_pauseTimers","remainingTime","dispatchEvent","CustomEvent","detail","bubbles","composed","_handleMouseEnter","_resumeTimers","render","html","typeStyles","_getTypeStyles","elevationLevel","classMap","notification","closing","styleMap","transform","opacity","boxShadow","transition","_handleMouseLeave","color","iconColor","bgColor","icon","SchmancyTheme","sys","primary","default","surface","on","success","tertiary","error","onVariant","progressColor","container","__decorateClass","property","String","prototype","Boolean","Number","state","customElement","NotificationSoundGenerator","audioContext","getAudioContext","AudioContextClass","AudioContext","webkitAudioContext","volume","ctx","currentTime","oscillator","createOscillator","gainNode","createGain","filter","createBiquadFilter","frequency","setValueAtTime","exponentialRampToValueAtTime","value","gain","connect","destination","start","stop","createBell","freq","osc","osc1","osc2","Q","audioUrls","info","generateAudioFile","async","linearRampToValueAtTime","sampleRate","gain1","gain2","warning","renderFunction","offlineCtx","OfflineAudioContext","audioBuffer","startRendering","wavBlob","audioBufferToWav","URL","createObjectURL","buffer","numChannels","numberOfChannels","blockAlign","bitDepth","samples","getAudioSamples","dataLength","length","wavBuffer","ArrayBuffer","view","DataView","writeString","setUint32","setUint16","writeInt16Samples","Blob","scale","i","channel","sample","getChannelData","intSample","min","push","offset","setInt16","string","setUint8","charCodeAt","NotificationAudioService","soundBuffers","Map","muted","soundGenerator","disconnecting","EventTarget","soundUrls","handleAudioEnded","audio","remove","initializeAudioFiles","preloadSounds","err","generatedUrls","generateAudioFiles","genErr","types","loadSound","set","url","response","fetch","ok","Error","statusText","arrayBuffer","decodeAudioData","context","resume","startsWith","playFallbackSound","playDirectGeneratedSound","get","source","createBufferSource","playInfoSound","playSuccessSound","playWarningSound","playErrorSound","Audio","fromEvent","pipe","takeUntil","subscribe","play","catch","getVolume","mute","unmute","delete","dispose","Event","SchmancyNotificationContainer","position","maxVisibleNotifications","audioVolume","_notifications","_audioService","handlePlaySound","event","setVolume","addNotification","removeNotification","updateNotification","options","slice","n","index","findIndex","requestUpdate","e","repeat","_handleClose","NotificationService","notificationStack","getInstance","instance","completeOptions","DEFAULT_OPTIONS","targetId","indexOf","splice","pop","notify","_$","$notify","show","customDuration","persistent","dismiss","update"],"mappings":";;;;;;;;;;;;;;;;AAgBA,IAAqBA,IAArB,cAAkDC;EAAlD,cAAAC;AAAAC,UAAAA,GAAAC,YAC6BC,KAAAC,QAAQ,IACRD,KAAAE,UAAU,IACVF,KAAAG,OAAyB,QACxBH,KAAAI,WAAAA,IACDJ,KAAAK,WAAW,KACXL,KAAAM,KAAK,gBAAgBC,KAAKC,IAAAA,CA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lO,GACAG,GACA+N,IAAsE,CAAA;AAEtE,WAAOpO,KAAKuP,OAAO,EAClBrP,SAAAA,GACAG,UAAAA,GAAAA,GACG+N;EAEL;AAAA,EAKO,WAAWlO,GAAiBkO,IAAsE;AACxG,WAAOpO,KAAKuP,OAAO,EAClBrP,SAAAA,GACAG,UAAU,GAAA,GACP+N,EAAAA,CAAAA;AAAAA,EAEL;AAAA;AArKApO,EAAekP,kBAAgD,EAC9D7O,UAAU,KACVD,cACAQ,WAAAA;AARK,IAAMiO,IAANW;AAiLA,MAAMC,IAAU,EAItBC,MAAOtB,CAAAA,MACCS,EAAoBE,cAAcQ,OAAOnB,CAAAA,GAMjDjH,MAAM,CAACjH,GAAkBkO,IAAkE,OACnFS,EAAoBE,cAAc5H,KAAKjH,GAASkO,IAMxD9J,SAAS,CAACpE,GAAkBkO,IAAkE,OACtFS,EAAoBE,YAAAA,EAAczK,QAAQpE,GAASkO,CAAAA,GAM3D1G,SAAS,CAACxH,GAAkBkO,IAAkE,OACtFS,EAAoBE,YAAAA,EAAcrH,QAAQxH,GAASkO,CAAAA,GAM3D5J,OAAO,CAACtE,GAAkBkO,IAAkE,OACpFS,EAAoBE,cAAcvK,MAAMtE,GAASkO,CAAAA,GASzDuB,gBAAgB,CACfzP,GACAG,GACA+N,IAAsE,CAAA,MAE/DS,EAAoBE,YAAAA,EAAcY,eAAezP,GAASG,GAAU+N,CAAAA,GAM5EwB,YAAY,CAAC1P,GAAiBkO,IAAsE,OAC5FS,EAAoBE,YAAAA,EAAca,WAAW1P,GAASkO,CAAAA,GAO9DyB,SAAUvP,CAAAA,MACFuO,EAAoBE,YAAAA,EAAcc,QAAQvP,IAMlDwP,QAAQ,CAACxP,GAAY8N,MACbS,EAAoBE,YAAAA,EAAce,OAAOxP,GAAI8N,CAAAA,EAAAA;"}
|
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
"use strict";const
|
|
1
|
+
"use strict";const p=require("rxjs"),b=require("lit/directives/class-map.js"),w=require("lit/directives/style-map.js"),u=require("lit/decorators.js");require("./tailwind.mixin-Cb-fyJ_y.cjs");const x=require("./litElement.mixin-YJ8D9a8Z.cjs"),S=require("./ripple-DqQrvaTe.cjs");require("lit/directives/guard.js");const l=require("./theme.interface-Xg5Zi46a.cjs"),d=require("lit");require("./progress-B3Q1qs5e.cjs");const A=require("lit/directives/repeat.js");var C=Object.defineProperty,_=Object.getOwnPropertyDescriptor,h=(o,t,e,i)=>{for(var n,s=i>1?void 0:i?_(t,e):t,a=o.length-1;a>=0;a--)(n=o[a])&&(s=(i?n(t,e,s):n(s))||s);return i&&s&&C(t,e,s),s};exports.SchmancyNotification=class extends x.$LitElement(':host{display:block;margin-bottom:10px}:host:last-child{margin-bottom:0}.notification{width:100%;max-width:400px;box-shadow:var(--schmancy-sys-elevation-2);overflow:hidden;transform:translate(0);opacity:1;transition:transform .3s cubic-bezier(.4,0,.2,1),opacity .3s cubic-bezier(.4,0,.2,1);background-color:var(--schmancy-sys-color-surface-container);color:var(--schmancy-sys-color-surface-on);border-radius:16px;position:relative}.notification:before{content:"";position:absolute;inset:0;border-radius:inherit;pointer-events:none;background:linear-gradient(180deg,#ffffff14,#fff0);z-index:1}.notification.info{border-left:4px solid var(--schmancy-sys-color-primary-default);background-color:color-mix(in srgb,var(--schmancy-sys-color-surface-container) 90%,var(--schmancy-sys-color-primary-container) 10%)}.notification.success{border-left:4px solid var(--schmancy-sys-color-success-default);background-color:color-mix(in srgb,var(--schmancy-sys-color-surface-container) 90%,var(--schmancy-sys-color-success-container) 10%)}.notification.warning{border-left:4px solid var(--schmancy-sys-color-tertiary-default);background-color:color-mix(in srgb,var(--schmancy-sys-color-surface-container) 90%,var(--schmancy-sys-color-tertiary-container) 10%)}.notification.error{border-left:4px solid var(--schmancy-sys-color-error-default);background-color:color-mix(in srgb,var(--schmancy-sys-color-surface-container) 90%,var(--schmancy-sys-color-error-container) 10%)}.notification.closing{transform:translate(120%);opacity:0}.notification .notification-content{display:flex;padding:18px 20px;align-items:flex-start;position:relative;z-index:2}.notification .icon-container{flex-shrink:0;margin-right:14px;display:flex;align-items:center;justify-content:center;border-radius:50%;width:28px;height:28px;position:relative}.notification .content{flex:1;min-width:0;display:flex;flex-direction:column}.notification .title{font-weight:500;font-size:16px;line-height:1.5;margin-bottom:2px;word-break:break-word;letter-spacing:.15px}.notification .message{font-size:14px;line-height:1.5;word-break:break-word;letter-spacing:.25px;opacity:.92}.notification .close-button{background:transparent;border:none;cursor:pointer;color:var(--schmancy-sys-color-surface-onVariant);padding:8px;margin-left:8px;margin-right:-4px;margin-top:-4px;border-radius:50%;display:flex;align-items:center;justify-content:center;transition:background-color .2s ease,transform .2s ease}.notification .close-button:hover{background-color:color-mix(in srgb,var(--schmancy-sys-color-surface-onVariant) 8%,transparent);transform:scale(1.05)}.notification .close-button:active{transform:scale(.95)}.notification .close-button:focus-visible{outline:none;box-shadow:0 0 0 2px var(--schmancy-sys-color-primary-default)}'){constructor(){super(...arguments),this.title="",this.message="",this.type="info",this.closable=!0,this.duration=5e3,this.id=`notification-${Date.now()}-${Math.floor(1e4*Math.random())}`,this.playSound=!0,this.showProgress=!1,this._visible=!0,this._progress=100,this._hovered=!1,this._closing=!1}connectedCallback(){super.connectedCallback(),this.duration>0&&this._startAutoCloseTimer(),this.playSound&&this._playSound()}disconnectedCallback(){this._clearTimers(),super.disconnectedCallback()}updated(o){super.updated(o),o.has("duration")&&this.duration>0&&(this._clearTimers(),this._startAutoCloseTimer())}_startAutoCloseTimer(){if(this.duration<=0)return;const o=Date.now()+this.duration;this._autoCloseTimer=window.setTimeout(()=>{this.close()},this.duration),this._progressTimer=window.setInterval(()=>{if(this._hovered)return;const t=Date.now(),e=Math.max(0,o-t);this._progress=e/this.duration*100,e<=0&&this._clearTimers()},16)}_clearTimers(){this._autoCloseTimer&&(clearTimeout(this._autoCloseTimer),this._autoCloseTimer=void 0),this._progressTimer&&(clearInterval(this._progressTimer),this._progressTimer=void 0)}_pauseTimers(){this._clearTimers()}_resumeTimers(){if(this.duration>0){const o=this._progress/100*this.duration;if(o>0){this._autoCloseTimer=window.setTimeout(()=>{this.close()},o);const t=Date.now()+o;this._progressTimer=window.setInterval(()=>{if(this._hovered)return;const e=Date.now(),i=Math.max(0,t-e);this._progress=i/o*100,i<=0&&this._clearTimers()},16)}}}_playSound(){this.dispatchEvent(new CustomEvent("playsound",{detail:{type:this.type},bubbles:!0,composed:!0}))}_handleMouseEnter(){this._hovered=!0,this._pauseTimers()}_handleMouseLeave(){this._hovered=!1,this._resumeTimers()}close(){this._closing||(this._closing=!0,this._clearTimers(),this._visible=!1,setTimeout(()=>{this.dispatchEvent(new CustomEvent("close",{detail:{id:this.id},bubbles:!0,composed:!0}))},300))}render(){if(!this._visible&&this._closing)return d.html``;const o=this._getTypeStyles(),t=this._hovered?"3":"2";return d.html`
|
|
2
2
|
<div
|
|
3
3
|
class=${b.classMap({notification:!0,closing:this._closing,[this.type]:!0})}
|
|
4
4
|
role="alert"
|
|
5
|
-
style=${
|
|
5
|
+
style=${w.styleMap({transform:this._closing?"translateX(120%)":"translateX(0)",opacity:this._closing?"0":"1",boxShadow:`var(--schmancy-sys-elevation-${t})`,transition:"transform 0.3s cubic-bezier(0.4, 0, 0.2, 1), opacity 0.3s cubic-bezier(0.4, 0, 0.2, 1), box-shadow 0.2s ease"})}
|
|
6
6
|
@mouseenter=${this._handleMouseEnter}
|
|
7
7
|
@mouseleave=${this._handleMouseLeave}
|
|
8
8
|
>
|
|
@@ -18,7 +18,7 @@
|
|
|
18
18
|
${this.title?d.html`
|
|
19
19
|
<div
|
|
20
20
|
class="title"
|
|
21
|
-
style=${
|
|
21
|
+
style=${w.styleMap({color:this.type==="info"?`color-mix(in srgb, ${l.SchmancyTheme.sys.color.primary.default} 90%, ${l.SchmancyTheme.sys.color.surface.on} 10%)`:this.type==="success"?`color-mix(in srgb, ${l.SchmancyTheme.sys.color.success.default} 90%, ${l.SchmancyTheme.sys.color.surface.on} 10%)`:this.type==="warning"?`color-mix(in srgb, ${l.SchmancyTheme.sys.color.tertiary.default} 90%, ${l.SchmancyTheme.sys.color.surface.on} 10%)`:`color-mix(in srgb, ${l.SchmancyTheme.sys.color.error.default} 90%, ${l.SchmancyTheme.sys.color.surface.on} 10%)`})}
|
|
22
22
|
>
|
|
23
23
|
${this.title}
|
|
24
24
|
</div>
|
|
@@ -32,7 +32,7 @@
|
|
|
32
32
|
class="close-button"
|
|
33
33
|
aria-label="Close notification"
|
|
34
34
|
@click=${this.close}
|
|
35
|
-
style=${
|
|
35
|
+
style=${w.styleMap({color:this.type==="info"?l.SchmancyTheme.sys.color.surface.onVariant:`color-mix(in srgb, ${o.iconColor} 80%, ${l.SchmancyTheme.sys.color.surface.onVariant} 20%)`})}
|
|
36
36
|
>
|
|
37
37
|
<svg
|
|
38
38
|
width="18"
|
|
@@ -121,7 +121,7 @@
|
|
|
121
121
|
<line x1="12" y1="16" x2="12" y2="12"></line>
|
|
122
122
|
<line x1="12" y1="8" x2="12.01" y2="8"></line>
|
|
123
123
|
</svg>
|
|
124
|
-
`,iconColor:l.SchmancyTheme.sys.color.primary.default,progressColor:`color-mix(in srgb, ${l.SchmancyTheme.sys.color.primary.default} 94%, ${l.SchmancyTheme.sys.color.primary.container} 6%)`}}}},h([u.property({type:String})],exports.SchmancyNotification.prototype,"title",2),h([u.property({type:String})],exports.SchmancyNotification.prototype,"message",2),h([u.property({type:String})],exports.SchmancyNotification.prototype,"type",2),h([u.property({type:Boolean})],exports.SchmancyNotification.prototype,"closable",2),h([u.property({type:Number})],exports.SchmancyNotification.prototype,"duration",2),h([u.property({type:String})],exports.SchmancyNotification.prototype,"id",2),h([u.property({type:Boolean})],exports.SchmancyNotification.prototype,"playSound",2),h([u.property({type:Boolean})],exports.SchmancyNotification.prototype,"showProgress",2),h([u.state()],exports.SchmancyNotification.prototype,"_visible",2),h([u.state()],exports.SchmancyNotification.prototype,"_progress",2),h([u.state()],exports.SchmancyNotification.prototype,"_hovered",2),h([u.state()],exports.SchmancyNotification.prototype,"_closing",2),h([u.state()],exports.SchmancyNotification.prototype,"_autoCloseTimer",2),h([u.state()],exports.SchmancyNotification.prototype,"_progressTimer",2),exports.SchmancyNotification=h([u.customElement("sch-notification")],exports.SchmancyNotification);class V{constructor(){this.audioContext=null}getAudioContext(){if(!this.audioContext){const t=window.AudioContext||window.webkitAudioContext;this.audioContext=new t}return this.audioContext}playInfoSound(t=.2){const e=this.getAudioContext(),i=e.currentTime,n=e.createOscillator(),s=e.createGain(),a=e.createBiquadFilter();n.type="sine",n.frequency.setValueAtTime(392,i),n.frequency.exponentialRampToValueAtTime(523.25,i+.25),a.type="lowpass",a.frequency.value=1500,s.gain.setValueAtTime(1e-4,i),s.gain.exponentialRampToValueAtTime(t,i+.15),s.gain.exponentialRampToValueAtTime(1e-4,i+.4),n.connect(a).connect(s).connect(e.destination),n.start(i),n.stop(i+.45)}playSuccessSound(t=.2){const e=this.getAudioContext(),i=e.currentTime,n=(s,a,r)=>{const c=e.createOscillator(),y=e.createGain(),w=e.createBiquadFilter();c.type="sine",c.frequency.setValueAtTime(s,i),w.type="lowpass",w.frequency.value=4*s,y.gain.setValueAtTime(1e-4,i),y.gain.exponentialRampToValueAtTime(t,i+.1),y.gain.exponentialRampToValueAtTime(1e-4,i+r),c.connect(w).connect(y).connect(e.destination),c.start(i+a),c.stop(i+r)};n(659.25,0,.6),n(523.25,.05,.55)}playWarningSound(t=.25){const e=this.getAudioContext(),i=e.currentTime,n=e.createOscillator(),s=e.createOscillator(),a=e.createGain(),r=e.createBiquadFilter();n.type="sine",s.type="sine",n.frequency.setValueAtTime(349.23,i),s.frequency.setValueAtTime(440,i),r.type="lowpass",r.frequency.value=1e3,a.gain.setValueAtTime(1e-4,i),a.gain.exponentialRampToValueAtTime(t,i+.08),a.gain.exponentialRampToValueAtTime(1e-4,i+.5),n.connect(r),s.connect(r),r.connect(a).connect(e.destination),n.start(i),s.start(i),n.stop(i+.55),s.stop(i+.55)}playErrorSound(t=.25){const e=this.getAudioContext(),i=e.currentTime,n=e.createOscillator(),s=e.createGain(),a=e.createBiquadFilter();n.type="triangle",n.frequency.setValueAtTime(220,i),n.frequency.exponentialRampToValueAtTime(1760,i+.3),a.type="lowpass",a.frequency.value=800,a.Q.value=.5,s.gain.setValueAtTime(1e-4,i),s.gain.exponentialRampToValueAtTime(.8*t,i+.1),s.gain.exponentialRampToValueAtTime(1e-4,i+.7),n.connect(a).connect(s).connect(e.destination),n.start(i),n.stop(i+.75)}async generateAudioFiles(t=.25){const i={};return i.info=await this.generateAudioFile(async n=>{const s=n.createOscillator();s.type="sine",s.frequency.setValueAtTime(320,0),s.frequency.exponentialRampToValueAtTime(520,.3);const a=n.createGain();a.gain.setValueAtTime(0,0),a.gain.linearRampToValueAtTime(t,.1),a.gain.linearRampToValueAtTime(0,.5),s.connect(a),a.connect(n.destination),s.start(),s.stop(.5)},44100,1),i.success=await this.generateAudioFile(async n=>{const s=n.createOscillator();s.type="sine",s.frequency.setValueAtTime(660,0);const a=n.createOscillator();a.type="sine",a.frequency.setValueAtTime(440,0);const r=n.createGain();r.gain.setValueAtTime(0,0),r.gain.linearRampToValueAtTime(t,.1),r.gain.linearRampToValueAtTime(0,.5);const c=n.createGain();c.gain.setValueAtTime(0,0),c.gain.linearRampToValueAtTime(.6*t,.15),c.gain.linearRampToValueAtTime(0,.7),s.connect(r),r.connect(n.destination),a.connect(c),c.connect(n.destination),s.start(),a.start(.15),s.stop(.5),a.stop(.7)},44100,1),i.warning=await this.generateAudioFile(async n=>{const s=n.createOscillator();s.type="sine",s.frequency.setValueAtTime(293.66,0);const a=n.createOscillator();a.type="sine",a.frequency.setValueAtTime(349.23,0);const r=n.createGain();r.gain.setValueAtTime(0,0),r.gain.linearRampToValueAtTime(t,.1),r.gain.linearRampToValueAtTime(.6*t,.2),r.gain.linearRampToValueAtTime(.8*t,.3),r.gain.linearRampToValueAtTime(0,.6),s.connect(r),a.connect(r),r.connect(n.destination),s.start(),a.start(),s.stop(.6),a.stop(.6)},44100,1),i.error=await this.generateAudioFile(async n=>{const s=n.createOscillator();s.type="sine",s.frequency.setValueAtTime(196,0);const a=n.createGain();a.gain.setValueAtTime(0,0),a.gain.linearRampToValueAtTime(t,.1),a.gain.linearRampToValueAtTime(.4*t,.2),a.gain.linearRampToValueAtTime(.6*t,.3),a.gain.linearRampToValueAtTime(0,.7);const r=n.createBiquadFilter();r.type="lowpass",r.frequency.value=600,r.Q.value=.7,s.connect(r),r.connect(a),a.connect(n.destination),s.start(),s.stop(.7)},44100,1),i}async generateAudioFile(t,e=44100,i=1){const n=new OfflineAudioContext(2,e*i,e);await t(n);const s=await n.startRendering(),a=this.audioBufferToWav(s);return URL.createObjectURL(a)}audioBufferToWav(t){const e=t.numberOfChannels,i=t.sampleRate,n=2*e,s=this.getAudioSamples(t,16),a=2*s.length,r=new ArrayBuffer(44+a),c=new DataView(r);return this.writeString(c,0,"RIFF"),c.setUint32(4,36+a,!0),this.writeString(c,8,"WAVE"),this.writeString(c,12,"fmt "),c.setUint32(16,16,!0),c.setUint16(20,1,!0),c.setUint16(22,e,!0),c.setUint32(24,i,!0),c.setUint32(28,i*n,!0),c.setUint16(32,n,!0),c.setUint16(34,16,!0),this.writeString(c,36,"data"),c.setUint32(40,a,!0),this.writeInt16Samples(c,44,s),new Blob([r],{type:"audio/wav"})}getAudioSamples(t,e){const i=t.numberOfChannels,n=t.length,s=[],a=e===16?32768:128;for(let r=0;r<n;r++)for(let c=0;c<i;c++){const y=t.getChannelData(c)[r],w=Math.max(-1,Math.min(1,y));s.push(w*a)}return s}writeInt16Samples(t,e,i){for(let n=0;n<i.length;n++)t.setInt16(e+2*n,i[n],!0)}writeString(t,e,i){for(let n=0;n<i.length;n++)t.setUint8(e+n,i.charCodeAt(n))}}class x{constructor(){this.audioContext=null,this.soundBuffers=new Map,this.volume=.5,this.muted=!1,this.soundGenerator=new V,this.soundUrls={info:"/assets/sounds/notification-info.mp3",success:"/assets/sounds/notification-success.mp3",warning:"/assets/sounds/notification-warning.mp3",error:"/assets/sounds/notification-error.mp3"},this.initializeAudioFiles()}async initializeAudioFiles(){try{await this.preloadSounds()}catch{try{const e=await this.soundGenerator.generateAudioFiles(this.volume);this.soundUrls=e}catch{}}}getAudioContext(){if(!this.audioContext){const t=window.AudioContext||window.webkitAudioContext;this.audioContext=new t}return this.audioContext}async preloadSounds(){const t=["info","success","warning","error"];for(const e of t)try{const i=await this.loadSound(e);this.soundBuffers.set(e,i)}catch{}}async loadSound(t){const e=this.soundUrls[t],i=await fetch(e);if(!i.ok)throw new Error(`Failed to load sound from ${e}: ${i.statusText}`);const n=await i.arrayBuffer();return await this.getAudioContext().decodeAudioData(n)}async playSound(t){if(!this.muted)try{const e=this.getAudioContext();if(e.state==="suspended"&&await e.resume(),this.soundUrls[t].startsWith("blob:"))return void this.playFallbackSound(t);if(!this.soundBuffers.has(t))try{const a=await this.loadSound(t);this.soundBuffers.set(t,a)}catch{return void this.playDirectGeneratedSound(t)}const i=this.soundBuffers.get(t);if(!i)throw new Error(`Sound buffer for ${t} not available`);const n=e.createBufferSource();n.buffer=i;const s=e.createGain();s.gain.value=this.volume,n.connect(s),s.connect(e.destination),n.start(0)}catch{this.playDirectGeneratedSound(t)}}playDirectGeneratedSound(t){if(!this.muted)try{switch(t){case"info":this.soundGenerator.playInfoSound(this.volume);break;case"success":this.soundGenerator.playSuccessSound(this.volume);break;case"warning":this.soundGenerator.playWarningSound(this.volume);break;case"error":this.soundGenerator.playErrorSound(this.volume)}}catch{}}playFallbackSound(t){if(!this.muted)try{const e=new Audio(this.soundUrls[t]);e.volume=this.volume,e.addEventListener("ended",()=>{e.remove()}),e.play().catch(i=>{this.playDirectGeneratedSound(t)})}catch{this.playDirectGeneratedSound(t)}}setVolume(t){this.volume=Math.max(0,Math.min(1,t))}getVolume(){return this.volume}mute(){this.muted=!0}unmute(){this.muted=!1}isMuted(){return this.muted}setSoundUrl(t,e){this.soundUrls[t]=e,this.soundBuffers.delete(t)}getSoundUrl(t){return this.soundUrls[t]}}var $=Object.defineProperty,k=Object.getOwnPropertyDescriptor,g=(o,t,e,i)=>{for(var n,s=i>1?void 0:i?k(t,e):t,a=o.length-1;a>=0;a--)(n=o[a])&&(s=(i?n(t,e,s):n(s))||s);return i&&s&&$(t,e,s),s};exports.SchmancyNotificationContainer=class extends T.$LitElement(":host{display:block}.notification-container{position:fixed;z-index:9999;padding:12px;pointer-events:none;width:100%;max-width:424px}.notification-container sch-notification{pointer-events:auto}.notification-container.top-right{top:0;right:0;display:flex;flex-direction:column-reverse}.notification-container.top-left{top:0;left:0;display:flex;flex-direction:column-reverse}.notification-container.bottom-right{bottom:0;right:0;display:flex;flex-direction:column}.notification-container.bottom-left{bottom:0;left:0;display:flex;flex-direction:column}.notification-container.top-center{top:0;left:50%;transform:translate(-50%);display:flex;flex-direction:column-reverse}.notification-container.bottom-center{bottom:0;left:50%;transform:translate(-50%);display:flex;flex-direction:column}"){constructor(){super(...arguments),this.position="top-right",this.maxVisibleNotifications=2,this.playSound=!1,this.audioVolume=.1,this._notifications=[],this._audioService=new x}connectedCallback(){super.connectedCallback(),this._audioService.setVolume(this.audioVolume),f.fromEvent(window,"schmancy-notification").pipe(f.takeUntil(this.disconnecting)).subscribe(o=>{this.addNotification(o.detail)}),f.fromEvent(window,"schmancy-notification-dismiss").pipe(f.takeUntil(this.disconnecting)).subscribe(o=>{this.removeNotification(o.detail.id)}),f.fromEvent(window,"schmancy-notification-update").pipe(f.takeUntil(this.disconnecting)).subscribe(o=>{this.updateNotification(o.detail.id,o.detail)}),this.addEventListener("playsound",o=>{this.playSound&&this._audioService.playSound(o.detail.type)})}addNotification(o){const t=o.id||`notification-${Date.now()}-${Math.floor(1e4*Math.random())}`,e={id:t,title:o.title||"",message:o.message,type:o.type||"info",duration:o.duration!==void 0?o.duration:750,closable:o.closable===void 0||o.closable,playSound:o.playSound!==void 0?o.playSound:this.playSound,showProgress:o.showProgress!==void 0&&o.showProgress};return this.position.startsWith("top")?this._notifications=[...this._notifications,e]:this._notifications=[e,...this._notifications],this._notifications.length>this.maxVisibleNotifications&&(this._notifications=this._notifications.slice(-this.maxVisibleNotifications)),e.playSound&&this._audioService.playSound(e.type),t}removeNotification(o){this._notifications=this._notifications.filter(t=>t.id!==o)}updateNotification(o,t){const e=this._notifications.findIndex(i=>i.id===o);e!==-1&&(this._notifications[e]={...this._notifications[e],...t},this.requestUpdate())}_handleClose(o){const t=o.detail.id;this.removeNotification(t)}render(){return d.html`
|
|
124
|
+
`,iconColor:l.SchmancyTheme.sys.color.primary.default,progressColor:`color-mix(in srgb, ${l.SchmancyTheme.sys.color.primary.default} 94%, ${l.SchmancyTheme.sys.color.primary.container} 6%)`}}}},h([u.property({type:String})],exports.SchmancyNotification.prototype,"title",2),h([u.property({type:String})],exports.SchmancyNotification.prototype,"message",2),h([u.property({type:String})],exports.SchmancyNotification.prototype,"type",2),h([u.property({type:Boolean})],exports.SchmancyNotification.prototype,"closable",2),h([u.property({type:Number})],exports.SchmancyNotification.prototype,"duration",2),h([u.property({type:String})],exports.SchmancyNotification.prototype,"id",2),h([u.property({type:Boolean})],exports.SchmancyNotification.prototype,"playSound",2),h([u.property({type:Boolean})],exports.SchmancyNotification.prototype,"showProgress",2),h([u.state()],exports.SchmancyNotification.prototype,"_visible",2),h([u.state()],exports.SchmancyNotification.prototype,"_progress",2),h([u.state()],exports.SchmancyNotification.prototype,"_hovered",2),h([u.state()],exports.SchmancyNotification.prototype,"_closing",2),h([u.state()],exports.SchmancyNotification.prototype,"_autoCloseTimer",2),h([u.state()],exports.SchmancyNotification.prototype,"_progressTimer",2),exports.SchmancyNotification=h([u.customElement("sch-notification")],exports.SchmancyNotification);class V{constructor(){this.audioContext=null}getAudioContext(){if(!this.audioContext){const t=window.AudioContext||window.webkitAudioContext;this.audioContext=new t}return this.audioContext}playInfoSound(t=.2){const e=this.getAudioContext(),i=e.currentTime,n=e.createOscillator(),s=e.createGain(),a=e.createBiquadFilter();n.type="sine",n.frequency.setValueAtTime(392,i),n.frequency.exponentialRampToValueAtTime(523.25,i+.25),a.type="lowpass",a.frequency.value=1500,s.gain.setValueAtTime(1e-4,i),s.gain.exponentialRampToValueAtTime(t,i+.15),s.gain.exponentialRampToValueAtTime(1e-4,i+.4),n.connect(a).connect(s).connect(e.destination),n.start(i),n.stop(i+.45)}playSuccessSound(t=.2){const e=this.getAudioContext(),i=e.currentTime,n=(s,a,r)=>{const c=e.createOscillator(),f=e.createGain(),v=e.createBiquadFilter();c.type="sine",c.frequency.setValueAtTime(s,i),v.type="lowpass",v.frequency.value=4*s,f.gain.setValueAtTime(1e-4,i),f.gain.exponentialRampToValueAtTime(t,i+.1),f.gain.exponentialRampToValueAtTime(1e-4,i+r),c.connect(v).connect(f).connect(e.destination),c.start(i+a),c.stop(i+r)};n(659.25,0,.6),n(523.25,.05,.55)}playWarningSound(t=.25){const e=this.getAudioContext(),i=e.currentTime,n=e.createOscillator(),s=e.createOscillator(),a=e.createGain(),r=e.createBiquadFilter();n.type="sine",s.type="sine",n.frequency.setValueAtTime(349.23,i),s.frequency.setValueAtTime(440,i),r.type="lowpass",r.frequency.value=1e3,a.gain.setValueAtTime(1e-4,i),a.gain.exponentialRampToValueAtTime(t,i+.08),a.gain.exponentialRampToValueAtTime(1e-4,i+.5),n.connect(r),s.connect(r),r.connect(a).connect(e.destination),n.start(i),s.start(i),n.stop(i+.55),s.stop(i+.55)}playErrorSound(t=.25){const e=this.getAudioContext(),i=e.currentTime,n=e.createOscillator(),s=e.createGain(),a=e.createBiquadFilter();n.type="triangle",n.frequency.setValueAtTime(220,i),n.frequency.exponentialRampToValueAtTime(1760,i+.3),a.type="lowpass",a.frequency.value=800,a.Q.value=.5,s.gain.setValueAtTime(1e-4,i),s.gain.exponentialRampToValueAtTime(.8*t,i+.1),s.gain.exponentialRampToValueAtTime(1e-4,i+.7),n.connect(a).connect(s).connect(e.destination),n.start(i),n.stop(i+.75)}async generateAudioFiles(t=.25){const i={};return i.info=await this.generateAudioFile(async n=>{const s=n.createOscillator();s.type="sine",s.frequency.setValueAtTime(320,0),s.frequency.exponentialRampToValueAtTime(520,.3);const a=n.createGain();a.gain.setValueAtTime(0,0),a.gain.linearRampToValueAtTime(t,.1),a.gain.linearRampToValueAtTime(0,.5),s.connect(a),a.connect(n.destination),s.start(),s.stop(.5)},44100,1),i.success=await this.generateAudioFile(async n=>{const s=n.createOscillator();s.type="sine",s.frequency.setValueAtTime(660,0);const a=n.createOscillator();a.type="sine",a.frequency.setValueAtTime(440,0);const r=n.createGain();r.gain.setValueAtTime(0,0),r.gain.linearRampToValueAtTime(t,.1),r.gain.linearRampToValueAtTime(0,.5);const c=n.createGain();c.gain.setValueAtTime(0,0),c.gain.linearRampToValueAtTime(.6*t,.15),c.gain.linearRampToValueAtTime(0,.7),s.connect(r),r.connect(n.destination),a.connect(c),c.connect(n.destination),s.start(),a.start(.15),s.stop(.5),a.stop(.7)},44100,1),i.warning=await this.generateAudioFile(async n=>{const s=n.createOscillator();s.type="sine",s.frequency.setValueAtTime(293.66,0);const a=n.createOscillator();a.type="sine",a.frequency.setValueAtTime(349.23,0);const r=n.createGain();r.gain.setValueAtTime(0,0),r.gain.linearRampToValueAtTime(t,.1),r.gain.linearRampToValueAtTime(.6*t,.2),r.gain.linearRampToValueAtTime(.8*t,.3),r.gain.linearRampToValueAtTime(0,.6),s.connect(r),a.connect(r),r.connect(n.destination),s.start(),a.start(),s.stop(.6),a.stop(.6)},44100,1),i.error=await this.generateAudioFile(async n=>{const s=n.createOscillator();s.type="sine",s.frequency.setValueAtTime(196,0);const a=n.createGain();a.gain.setValueAtTime(0,0),a.gain.linearRampToValueAtTime(t,.1),a.gain.linearRampToValueAtTime(.4*t,.2),a.gain.linearRampToValueAtTime(.6*t,.3),a.gain.linearRampToValueAtTime(0,.7);const r=n.createBiquadFilter();r.type="lowpass",r.frequency.value=600,r.Q.value=.7,s.connect(r),r.connect(a),a.connect(n.destination),s.start(),s.stop(.7)},44100,1),i}async generateAudioFile(t,e=44100,i=1){const n=new OfflineAudioContext(2,e*i,e);await t(n);const s=await n.startRendering(),a=this.audioBufferToWav(s);return URL.createObjectURL(a)}audioBufferToWav(t){const e=t.numberOfChannels,i=t.sampleRate,n=2*e,s=this.getAudioSamples(t,16),a=2*s.length,r=new ArrayBuffer(44+a),c=new DataView(r);return this.writeString(c,0,"RIFF"),c.setUint32(4,36+a,!0),this.writeString(c,8,"WAVE"),this.writeString(c,12,"fmt "),c.setUint32(16,16,!0),c.setUint16(20,1,!0),c.setUint16(22,e,!0),c.setUint32(24,i,!0),c.setUint32(28,i*n,!0),c.setUint16(32,n,!0),c.setUint16(34,16,!0),this.writeString(c,36,"data"),c.setUint32(40,a,!0),this.writeInt16Samples(c,44,s),new Blob([r],{type:"audio/wav"})}getAudioSamples(t,e){const i=t.numberOfChannels,n=t.length,s=[],a=e===16?32768:128;for(let r=0;r<n;r++)for(let c=0;c<i;c++){const f=t.getChannelData(c)[r],v=Math.max(-1,Math.min(1,f));s.push(v*a)}return s}writeInt16Samples(t,e,i){for(let n=0;n<i.length;n++)t.setInt16(e+2*n,i[n],!0)}writeString(t,e,i){for(let n=0;n<i.length;n++)t.setUint8(e+n,i.charCodeAt(n))}}class T{constructor(){this.audioContext=null,this.soundBuffers=new Map,this.volume=.5,this.muted=!1,this.soundGenerator=new V,this.disconnecting=new EventTarget,this.soundUrls={info:"/assets/sounds/notification-info.mp3",success:"/assets/sounds/notification-success.mp3",warning:"/assets/sounds/notification-warning.mp3",error:"/assets/sounds/notification-error.mp3"},this.handleAudioEnded=t=>()=>{t.remove()},this.initializeAudioFiles()}async initializeAudioFiles(){try{await this.preloadSounds()}catch{try{const e=await this.soundGenerator.generateAudioFiles(this.volume);this.soundUrls=e}catch{}}}getAudioContext(){if(!this.audioContext){const t=window.AudioContext||window.webkitAudioContext;this.audioContext=new t}return this.audioContext}async preloadSounds(){const t=["info","success","warning","error"];for(const e of t)try{const i=await this.loadSound(e);this.soundBuffers.set(e,i)}catch{}}async loadSound(t){const e=this.soundUrls[t],i=await fetch(e);if(!i.ok)throw new Error(`Failed to load sound from ${e}: ${i.statusText}`);const n=await i.arrayBuffer();return await this.getAudioContext().decodeAudioData(n)}async playSound(t){if(!this.muted)try{const e=this.getAudioContext();if(e.state==="suspended"&&await e.resume(),this.soundUrls[t].startsWith("blob:"))return void this.playFallbackSound(t);if(!this.soundBuffers.has(t))try{const a=await this.loadSound(t);this.soundBuffers.set(t,a)}catch{return void this.playDirectGeneratedSound(t)}const i=this.soundBuffers.get(t);if(!i)throw new Error(`Sound buffer for ${t} not available`);const n=e.createBufferSource();n.buffer=i;const s=e.createGain();s.gain.value=this.volume,n.connect(s),s.connect(e.destination),n.start(0)}catch{this.playDirectGeneratedSound(t)}}playDirectGeneratedSound(t){if(!this.muted)try{switch(t){case"info":this.soundGenerator.playInfoSound(this.volume);break;case"success":this.soundGenerator.playSuccessSound(this.volume);break;case"warning":this.soundGenerator.playWarningSound(this.volume);break;case"error":this.soundGenerator.playErrorSound(this.volume)}}catch{}}playFallbackSound(t){if(!this.muted)try{const e=new Audio(this.soundUrls[t]);e.volume=this.volume,p.fromEvent(e,"ended").pipe(p.takeUntil(p.fromEvent(this.disconnecting,"disconnect"))).subscribe(this.handleAudioEnded(e)),e.play().catch(i=>{this.playDirectGeneratedSound(t)})}catch{this.playDirectGeneratedSound(t)}}setVolume(t){this.volume=Math.max(0,Math.min(1,t))}getVolume(){return this.volume}mute(){this.muted=!0}unmute(){this.muted=!1}isMuted(){return this.muted}setSoundUrl(t,e){this.soundUrls[t]=e,this.soundBuffers.delete(t)}getSoundUrl(t){return this.soundUrls[t]}dispose(){this.disconnecting.dispatchEvent(new Event("disconnect")),this.audioContext&&this.audioContext.state!=="closed"&&this.audioContext.close().catch(t=>{})}}var k=Object.defineProperty,$=Object.getOwnPropertyDescriptor,g=(o,t,e,i)=>{for(var n,s=i>1?void 0:i?$(t,e):t,a=o.length-1;a>=0;a--)(n=o[a])&&(s=(i?n(t,e,s):n(s))||s);return i&&s&&k(t,e,s),s};exports.SchmancyNotificationContainer=class extends x.$LitElement(":host{display:block}.notification-container{position:fixed;z-index:9999;padding:12px;pointer-events:none;width:100%;max-width:424px}.notification-container sch-notification{pointer-events:auto}.notification-container.top-right{top:0;right:0;display:flex;flex-direction:column-reverse}.notification-container.top-left{top:0;left:0;display:flex;flex-direction:column-reverse}.notification-container.bottom-right{bottom:0;right:0;display:flex;flex-direction:column}.notification-container.bottom-left{bottom:0;left:0;display:flex;flex-direction:column}.notification-container.top-center{top:0;left:50%;transform:translate(-50%);display:flex;flex-direction:column-reverse}.notification-container.bottom-center{bottom:0;left:50%;transform:translate(-50%);display:flex;flex-direction:column}"){constructor(){super(...arguments),this.position="top-right",this.maxVisibleNotifications=2,this.playSound=!1,this.audioVolume=.1,this._notifications=[],this._audioService=new T,this.handlePlaySound=o=>{this.playSound&&this._audioService.playSound(o.detail.type)}}connectedCallback(){super.connectedCallback(),this._audioService.setVolume(this.audioVolume),p.fromEvent(window,"schmancy-notification").pipe(p.takeUntil(this.disconnecting)).subscribe(o=>{this.addNotification(o.detail)}),p.fromEvent(window,"schmancy-notification-dismiss").pipe(p.takeUntil(this.disconnecting)).subscribe(o=>{this.removeNotification(o.detail.id)}),p.fromEvent(window,"schmancy-notification-update").pipe(p.takeUntil(this.disconnecting)).subscribe(o=>{this.updateNotification(o.detail.id,o.detail)}),p.fromEvent(this,"playsound").pipe(p.takeUntil(this.disconnecting)).subscribe(this.handlePlaySound)}addNotification(o){const t=o.id||`notification-${Date.now()}-${Math.floor(1e4*Math.random())}`,e={id:t,title:o.title||"",message:o.message,type:o.type||"info",duration:o.duration!==void 0?o.duration:750,closable:o.closable===void 0||o.closable,playSound:o.playSound!==void 0?o.playSound:this.playSound,showProgress:o.showProgress!==void 0&&o.showProgress};return this.position.startsWith("top")?this._notifications=[...this._notifications,e]:this._notifications=[e,...this._notifications],this._notifications.length>this.maxVisibleNotifications&&(this._notifications=this._notifications.slice(-this.maxVisibleNotifications)),e.playSound&&this._audioService.playSound(e.type),t}removeNotification(o){this._notifications=this._notifications.filter(t=>t.id!==o)}updateNotification(o,t){const e=this._notifications.findIndex(i=>i.id===o);e!==-1&&(this._notifications[e]={...this._notifications[e],...t},this.requestUpdate())}_handleClose(o){const t=o.detail.id;this.removeNotification(t)}render(){return d.html`
|
|
125
125
|
<div
|
|
126
126
|
class=${b.classMap({"notification-container":!0,[this.position]:!0})}
|
|
127
127
|
>
|
|
@@ -139,5 +139,5 @@
|
|
|
139
139
|
></sch-notification>
|
|
140
140
|
`)}
|
|
141
141
|
</div>
|
|
142
|
-
`}},g([u.property({type:String})],exports.SchmancyNotificationContainer.prototype,"position",2),g([u.property({type:Number})],exports.SchmancyNotificationContainer.prototype,"maxVisibleNotifications",2),g([u.property({type:Boolean})],exports.SchmancyNotificationContainer.prototype,"playSound",2),g([u.property({type:Number})],exports.SchmancyNotificationContainer.prototype,"audioVolume",2),g([u.state()],exports.SchmancyNotificationContainer.prototype,"_notifications",2),exports.SchmancyNotificationContainer=g([u.customElement("sch-notification-container")],exports.SchmancyNotificationContainer);const
|
|
143
|
-
//# sourceMappingURL=notification-service-
|
|
142
|
+
`}},g([u.property({type:String})],exports.SchmancyNotificationContainer.prototype,"position",2),g([u.property({type:Number})],exports.SchmancyNotificationContainer.prototype,"maxVisibleNotifications",2),g([u.property({type:Boolean})],exports.SchmancyNotificationContainer.prototype,"playSound",2),g([u.property({type:Number})],exports.SchmancyNotificationContainer.prototype,"audioVolume",2),g([u.state()],exports.SchmancyNotificationContainer.prototype,"_notifications",2),exports.SchmancyNotificationContainer=g([u.customElement("sch-notification-container")],exports.SchmancyNotificationContainer);const y=class y{constructor(){this.notificationStack=[]}static getInstance(){return y.instance||(y.instance=new y),y.instance}notify(t){const e={...y.DEFAULT_OPTIONS,...t,duration:t.duration??y.DEFAULT_OPTIONS.duration},i=e.id||`notification-${Date.now()}-${Math.floor(1e4*Math.random())}`;this.notificationStack.push(i);const n=new CustomEvent("schmancy-notification",{bubbles:!0,composed:!0,detail:{...e,id:i}});return window.dispatchEvent(n),i}dismiss(t){let e;if(t){const i=this.notificationStack.indexOf(t);i>-1&&(this.notificationStack.splice(i,1),e=t)}else e=this.notificationStack.pop();if(e){const i=new CustomEvent("schmancy-notification-dismiss",{bubbles:!0,composed:!0,detail:{id:e}});window.dispatchEvent(i)}}update(t,e){const i=new CustomEvent("schmancy-notification-update",{bubbles:!0,composed:!0,detail:{id:t,...e}});window.dispatchEvent(i)}info(t,e={}){return this.notify({message:t??"",type:"info",duration:t?e.duration:1,...e})}success(t,e={}){return this.notify({message:t??"",type:"success",duration:t?e.duration:1,...e})}warning(t,e={}){return this.notify({message:t??"",type:"warning",duration:t?e.duration:1,...e})}error(t,e={}){return this.notify({message:t??"",type:"error",duration:t?e.duration:1,...e})}customDuration(t,e,i={}){return this.notify({message:t,duration:e,...i})}persistent(t,e={}){return this.notify({message:t,duration:0,...e})}};y.DEFAULT_OPTIONS={duration:1e3,closable:!0,playSound:!0};let m=y;const N={show:o=>m.getInstance().notify(o),info:(o,t={})=>m.getInstance().info(o,t),success:(o,t={})=>m.getInstance().success(o,t),warning:(o,t={})=>m.getInstance().warning(o,t),error:(o,t={})=>m.getInstance().error(o,t),customDuration:(o,t,e={})=>m.getInstance().customDuration(o,t,e),persistent:(o,t={})=>m.getInstance().persistent(o,t),dismiss:o=>m.getInstance().dismiss(o),update:(o,t)=>m.getInstance().update(o,t)};exports.$notify=N,exports.NotificationAudioService=T;
|
|
143
|
+
//# sourceMappingURL=notification-service-CD-XzDeP.cjs.map
|