@mhmo91/schmancy 0.7.5 → 0.7.6
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/ai/directives.md +214 -7
- package/ai/typewriter.md +151 -33
- package/dist/ai/directives.md +214 -7
- package/dist/ai/typewriter.md +151 -33
- package/dist/{animated-text-DnFenRS1.cjs → animated-text-1FDC-OTA.cjs} +2 -2
- package/dist/{animated-text-DnFenRS1.cjs.map → animated-text-1FDC-OTA.cjs.map} +1 -1
- package/dist/{animated-text-YBgWXuVJ.js → animated-text-1_latidd.js} +3 -3
- package/dist/{animated-text-YBgWXuVJ.js.map → animated-text-1_latidd.js.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.component-C_nUxyiY.js → area.component-CQq-Mh0Z.js} +47 -39
- package/dist/area.component-CQq-Mh0Z.js.map +1 -0
- package/dist/{area.component-BojFAcRk.cjs → area.component-Ciw7vGsx.cjs} +4 -4
- package/dist/area.component-Ciw7vGsx.cjs.map +1 -0
- package/dist/area.js +1 -1
- package/dist/{autocomplete-B-X_D8MC.js → autocomplete-DT9MFPEG.js} +5 -5
- package/dist/{autocomplete-B-X_D8MC.js.map → autocomplete-DT9MFPEG.js.map} +1 -1
- package/dist/{autocomplete-B8oOdRsV.cjs → autocomplete-auTO_M_w.cjs} +2 -2
- package/dist/{autocomplete-B8oOdRsV.cjs.map → autocomplete-auTO_M_w.cjs.map} +1 -1
- package/dist/autocomplete.cjs +1 -1
- package/dist/autocomplete.js +1 -1
- package/dist/{avatar-DBdyON6Y.cjs → avatar-Bo8kRnA-.cjs} +2 -2
- package/dist/{avatar-DBdyON6Y.cjs.map → avatar-Bo8kRnA-.cjs.map} +1 -1
- package/dist/{avatar-Cro3M4Lw.js → avatar-Dm_qg-n1.js} +52 -52
- package/dist/{avatar-Cro3M4Lw.js.map → avatar-Dm_qg-n1.js.map} +1 -1
- package/dist/badge.cjs +1 -1
- package/dist/badge.js +1 -1
- package/dist/boat-98He5-K8.cjs +97 -0
- package/dist/boat-98He5-K8.cjs.map +1 -0
- package/dist/boat-RNCKlx8b.js +301 -0
- package/dist/boat-RNCKlx8b.js.map +1 -0
- 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-BOmazo-k.js → checkbox-Bdn1_WJg.js} +2 -2
- package/dist/{checkbox-BOmazo-k.js.map → checkbox-Bdn1_WJg.js.map} +1 -1
- package/dist/{checkbox-DMfwDgYx.cjs → checkbox-Dj06r6MD.cjs} +2 -2
- package/dist/{checkbox-DMfwDgYx.cjs.map → checkbox-Dj06r6MD.cjs.map} +1 -1
- package/dist/checkbox.cjs +1 -1
- package/dist/checkbox.js +1 -1
- package/dist/chips.cjs +1 -1
- package/dist/chips.js +2 -2
- package/dist/code-highlight.cjs +1 -1
- package/dist/code-highlight.js +1 -1
- package/dist/{code-preview-DgyY3Jlw.js → code-preview-Br7zBkyM.js} +2 -2
- package/dist/{code-preview-DgyY3Jlw.js.map → code-preview-Br7zBkyM.js.map} +1 -1
- package/dist/{code-preview-CbZzYTk2.cjs → code-preview-ByxcwPma.cjs} +2 -2
- package/dist/{code-preview-CbZzYTk2.cjs.map → code-preview-ByxcwPma.cjs.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-BV0479CW.js → date-range-VkIMcQdT.js} +3 -3
- package/dist/{date-range-BV0479CW.js.map → date-range-VkIMcQdT.js.map} +1 -1
- package/dist/{date-range-inline-HNDLTnYi.cjs → date-range-inline-kbokz03Z.cjs} +2 -2
- package/dist/{date-range-inline-HNDLTnYi.cjs.map → date-range-inline-kbokz03Z.cjs.map} +1 -1
- package/dist/{date-range-inline-GfLao0NN.js → date-range-inline-l2G48xTX.js} +3 -3
- package/dist/{date-range-inline-GfLao0NN.js.map → date-range-inline-l2G48xTX.js.map} +1 -1
- package/dist/date-range-inline.cjs +1 -1
- package/dist/date-range-inline.js +1 -1
- package/dist/{date-range-47SnbVM6.cjs → date-range-xYUr_KKx.cjs} +2 -2
- package/dist/{date-range-47SnbVM6.cjs.map → date-range-xYUr_KKx.cjs.map} +1 -1
- package/dist/date-range.cjs +1 -1
- package/dist/date-range.js +1 -1
- package/dist/{delay-Dr3Fr5YB.cjs → delay-CCreUpYu.cjs} +2 -2
- package/dist/{delay-Dr3Fr5YB.cjs.map → delay-CCreUpYu.cjs.map} +1 -1
- package/dist/{delay-B40l99jW.js → delay-Nu7RVtYd.js} +2 -2
- package/dist/{delay-B40l99jW.js.map → delay-Nu7RVtYd.js.map} +1 -1
- package/dist/delay.cjs +1 -1
- package/dist/delay.js +1 -1
- package/dist/details-CjQrqBli.cjs +98 -0
- package/dist/details-CjQrqBli.cjs.map +1 -0
- package/dist/details-DVIWpEsI.js +137 -0
- package/dist/details-DVIWpEsI.js.map +1 -0
- package/dist/details.cjs +1 -1
- package/dist/details.js +1 -1
- package/dist/{dialog-content-B_amCfq7.js → dialog-content-BgxKi73O.js} +3 -3
- package/dist/{dialog-content-B_amCfq7.js.map → dialog-content-BgxKi73O.js.map} +1 -1
- package/dist/{dialog-content-Emd7BLQA.cjs → dialog-content-CM3-RXQQ.cjs} +2 -2
- package/dist/{dialog-content-Emd7BLQA.cjs.map → dialog-content-CM3-RXQQ.cjs.map} +1 -1
- package/dist/dialog.cjs +1 -1
- package/dist/dialog.js +1 -1
- package/dist/directives.cjs +1 -1
- package/dist/directives.js +10 -6
- package/dist/divider-0yHQS8kR.cjs +58 -0
- package/dist/divider-0yHQS8kR.cjs.map +1 -0
- package/dist/divider-CqyzFfn1.js +84 -0
- package/dist/divider-CqyzFfn1.js.map +1 -0
- package/dist/divider.cjs +1 -1
- package/dist/divider.js +1 -1
- package/dist/{dropdown-content-BpJq8Q1u.cjs → dropdown-content-BmHQE5-P.cjs} +2 -2
- package/dist/{dropdown-content-BpJq8Q1u.cjs.map → dropdown-content-BmHQE5-P.cjs.map} +1 -1
- package/dist/{dropdown-content-Bw9jnfCR.js → dropdown-content-iFlLupVo.js} +3 -3
- package/dist/{dropdown-content-Bw9jnfCR.js.map → dropdown-content-iFlLupVo.js.map} +1 -1
- package/dist/dropdown.cjs +1 -1
- package/dist/dropdown.js +1 -1
- package/dist/{email-recipients-Bxvu6zi9.cjs → email-recipients-Cioc3U0Z.cjs} +2 -2
- package/dist/{email-recipients-Bxvu6zi9.cjs.map → email-recipients-Cioc3U0Z.cjs.map} +1 -1
- package/dist/{email-recipients-DZGMhyg4.js → email-recipients-CmAEJDMC.js} +6 -6
- package/dist/{email-recipients-DZGMhyg4.js.map → email-recipients-CmAEJDMC.js.map} +1 -1
- package/dist/extra.cjs +1 -1
- package/dist/extra.js +1 -1
- package/dist/{flex-DakK9gco.cjs → flex-BEB1yuMF.cjs} +2 -2
- package/dist/{flex-DakK9gco.cjs.map → flex-BEB1yuMF.cjs.map} +1 -1
- package/dist/{flex-DUgMxT_9.js → flex-BgcbHlPo.js} +2 -2
- package/dist/{flex-DUgMxT_9.js.map → flex-BgcbHlPo.js.map} +1 -1
- package/dist/{form-yZ1fh3h9.js → form-CxrvY530.js} +2 -2
- package/dist/{form-yZ1fh3h9.js.map → form-CxrvY530.js.map} +1 -1
- package/dist/{form-CPmMvWvE.cjs → form-DFDTspmH.cjs} +2 -2
- package/dist/{form-CPmMvWvE.cjs.map → form-DFDTspmH.cjs.map} +1 -1
- package/dist/form.cjs +1 -1
- package/dist/form.js +1 -1
- package/dist/{formField.mixin-D51klHq7.cjs → formField.mixin-C7H5DaEl.cjs} +2 -2
- package/dist/{formField.mixin-D51klHq7.cjs.map → formField.mixin-C7H5DaEl.cjs.map} +1 -1
- package/dist/{formField.mixin-Cmb9YpmX.js → formField.mixin-hZ2qP4iG.js} +2 -2
- package/dist/{formField.mixin-Cmb9YpmX.js.map → formField.mixin-hZ2qP4iG.js.map} +1 -1
- package/dist/{icon-DHT8YsE3.js → icon-D0FAI5uJ.js} +2 -2
- package/dist/{icon-DHT8YsE3.js.map → icon-D0FAI5uJ.js.map} +1 -1
- package/dist/{icon-Dsa_BddL.cjs → icon-DJnGMAQ2.cjs} +2 -2
- package/dist/{icon-Dsa_BddL.cjs.map → icon-DJnGMAQ2.cjs.map} +1 -1
- package/dist/{icon-button-BRcfLsJL.cjs → icon-button-CSZtSmOy.cjs} +8 -8
- package/dist/icon-button-CSZtSmOy.cjs.map +1 -0
- package/dist/{icon-button-PpRHFLCj.js → icon-button-CbgQp3AL.js} +19 -19
- package/dist/icon-button-CbgQp3AL.js.map +1 -0
- package/dist/icons.cjs +1 -1
- package/dist/icons.js +1 -1
- package/dist/index.cjs +1 -1
- package/dist/index.js +196 -192
- package/dist/{input-CYGSlByl.js → input-DLnKAj3B.js} +4 -4
- package/dist/{input-CYGSlByl.js.map → input-DLnKAj3B.js.map} +1 -1
- package/dist/{input-chip-CKYO8Lww.cjs → input-chip-C3EPsHcP.cjs} +2 -2
- package/dist/{input-chip-CKYO8Lww.cjs.map → input-chip-C3EPsHcP.cjs.map} +1 -1
- package/dist/{input-chip-CTKPIRVA.js → input-chip-dmqYCExV.js} +2 -2
- package/dist/{input-chip-CTKPIRVA.js.map → input-chip-dmqYCExV.js.map} +1 -1
- package/dist/input-wZ6ORWru.cjs +51 -0
- package/dist/{input-DB269a2X.cjs.map → input-wZ6ORWru.cjs.map} +1 -1
- 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/{list-BbzeVuby.js → list-BegNkhOn.js} +2 -2
- package/dist/{list-BbzeVuby.js.map → list-BegNkhOn.js.map} +1 -1
- package/dist/{list-BQVTFNkq.cjs → list-CLKiZ6lk.cjs} +2 -2
- package/dist/{list-BQVTFNkq.cjs.map → list-CLKiZ6lk.cjs.map} +1 -1
- package/dist/list.cjs +1 -1
- package/dist/list.js +1 -1
- package/dist/{litElement.mixin-DzCpXwcY.cjs → litElement.mixin-CPQYJnK_.cjs} +2 -2
- package/dist/{litElement.mixin-DzCpXwcY.cjs.map → litElement.mixin-CPQYJnK_.cjs.map} +1 -1
- package/dist/{litElement.mixin-BzbZQbxa.js → litElement.mixin-DWDPaNoc.js} +2 -2
- package/dist/{litElement.mixin-BzbZQbxa.js.map → litElement.mixin-DWDPaNoc.js.map} +1 -1
- package/dist/mailbox.cjs +1 -1
- package/dist/mailbox.js +1 -1
- package/dist/{map-CgwU5Px4.js → map-CUKZ6LrR.js} +2 -2
- package/dist/{map-CgwU5Px4.js.map → map-CUKZ6LrR.js.map} +1 -1
- package/dist/{map-DuTFI2lm.cjs → map-w4Kdtycx.cjs} +2 -2
- package/dist/{map-DuTFI2lm.cjs.map → map-w4Kdtycx.cjs.map} +1 -1
- package/dist/map.cjs +1 -1
- package/dist/map.js +1 -1
- package/dist/{media-BnktmFRW.js → media-CjdCchz8.js} +2 -2
- package/dist/{media-BnktmFRW.js.map → media-CjdCchz8.js.map} +1 -1
- package/dist/{media-gtpSHRFx.cjs → media-DDNmuoV0.cjs} +2 -2
- package/dist/{media-gtpSHRFx.cjs.map → media-DDNmuoV0.cjs.map} +1 -1
- package/dist/menu-D9-9vipn.cjs +26 -0
- package/dist/menu-D9-9vipn.cjs.map +1 -0
- package/dist/menu-ofiPDY2a.js +61 -0
- package/dist/menu-ofiPDY2a.js.map +1 -0
- package/dist/menu.cjs +1 -1
- package/dist/menu.js +1 -1
- package/dist/mixins.cjs +1 -1
- package/dist/mixins.js +3 -3
- package/dist/nav-drawer.cjs +1 -1
- package/dist/nav-drawer.js +1 -1
- package/dist/navigation-bar.cjs +1 -1
- package/dist/navigation-bar.js +1 -1
- package/dist/{navigation-rail-D8otIR2P.cjs → navigation-rail-CEDLJTrH.cjs} +2 -2
- package/dist/{navigation-rail-D8otIR2P.cjs.map → navigation-rail-CEDLJTrH.cjs.map} +1 -1
- package/dist/{navigation-rail-CUMNSz0h.js → navigation-rail-weSW6BCv.js} +3 -3
- package/dist/{navigation-rail-CUMNSz0h.js.map → navigation-rail-weSW6BCv.js.map} +1 -1
- package/dist/navigation-rail.cjs +1 -1
- package/dist/navigation-rail.js +1 -1
- package/dist/{notification-service-E16lPsiT.js → notification-service-B4nvP2Jc.js} +5 -5
- package/dist/{notification-service-E16lPsiT.js.map → notification-service-B4nvP2Jc.js.map} +1 -1
- package/dist/{notification-service-CP6kGXVL.cjs → notification-service-B_pa74hl.cjs} +2 -2
- package/dist/{notification-service-CP6kGXVL.cjs.map → notification-service-B_pa74hl.cjs.map} +1 -1
- package/dist/notification.cjs +1 -1
- package/dist/notification.js +2 -2
- package/dist/{notify-D865xIlu.js → notify-Ci0HrUIo.js} +2 -2
- package/dist/{notify-D865xIlu.js.map → notify-Ci0HrUIo.js.map} +1 -1
- package/dist/{notify-Czdp7BbG.cjs → notify-aasSKQGA.cjs} +2 -2
- package/dist/{notify-Czdp7BbG.cjs.map → notify-aasSKQGA.cjs.map} +1 -1
- package/dist/{option-cJ8fM5qJ.js → option-Cs4e3CzF.js} +2 -2
- package/dist/{option-cJ8fM5qJ.js.map → option-Cs4e3CzF.js.map} +1 -1
- package/dist/{option-B1r0hb3H.cjs → option-Uze_q9Ef.cjs} +2 -2
- package/dist/{option-B1r0hb3H.cjs.map → option-Uze_q9Ef.cjs.map} +1 -1
- package/dist/option.cjs +1 -1
- package/dist/option.js +1 -1
- package/dist/{payment-card-form-RBjpMc2m.js → payment-card-form-BLoUTYiB.js} +3 -3
- package/dist/{payment-card-form-RBjpMc2m.js.map → payment-card-form-BLoUTYiB.js.map} +1 -1
- package/dist/{payment-card-form-EO3auDS8.cjs → payment-card-form-rJCPUtWE.cjs} +2 -2
- package/dist/{payment-card-form-EO3auDS8.cjs.map → payment-card-form-rJCPUtWE.cjs.map} +1 -1
- package/dist/{progress-4v9FzvOT.js → progress-B1f3y-Mf.js} +2 -2
- package/dist/{progress-4v9FzvOT.js.map → progress-B1f3y-Mf.js.map} +1 -1
- package/dist/{progress-DnhvJMz_.cjs → progress-DdBHNIMT.cjs} +2 -2
- package/dist/{progress-DnhvJMz_.cjs.map → progress-DdBHNIMT.cjs.map} +1 -1
- package/dist/progress.cjs +1 -1
- package/dist/progress.js +1 -1
- package/dist/{radio-button-BVegeFKE.cjs → radio-button-BAS7gKmA.cjs} +2 -2
- package/dist/{radio-button-BVegeFKE.cjs.map → radio-button-BAS7gKmA.cjs.map} +1 -1
- package/dist/{radio-button-DDavzgCz.js → radio-button-CaDaw5VH.js} +3 -3
- package/dist/{radio-button-DDavzgCz.js.map → radio-button-CaDaw5VH.js.map} +1 -1
- package/dist/radio-group.cjs +1 -1
- package/dist/radio-group.js +1 -1
- package/dist/ripple-QoNZUUw_.js +148 -0
- package/dist/ripple-QoNZUUw_.js.map +1 -0
- package/dist/ripple-Ujq_REH4.cjs +16 -0
- package/dist/ripple-Ujq_REH4.cjs.map +1 -0
- package/dist/{schmancy-steps-container-DN9c-HeX.js → schmancy-steps-container-BInNput3.js} +2 -2
- package/dist/{schmancy-steps-container-DN9c-HeX.js.map → schmancy-steps-container-BInNput3.js.map} +1 -1
- package/dist/{schmancy-steps-container-s6kZWhcr.cjs → schmancy-steps-container-wQsksygx.cjs} +2 -2
- package/dist/{schmancy-steps-container-s6kZWhcr.cjs.map → schmancy-steps-container-wQsksygx.cjs.map} +1 -1
- package/dist/search-B1s7thB0.cjs +2 -0
- package/dist/search-B1s7thB0.cjs.map +1 -0
- package/dist/search-DxxnLa5u.js +95 -0
- package/dist/search-DxxnLa5u.js.map +1 -0
- package/dist/{select--D6l5ru7.js → select-ApLZefMf.js} +4 -4
- package/dist/{select--D6l5ru7.js.map → select-ApLZefMf.js.map} +1 -1
- package/dist/{select-DVT_kFNR.cjs → select-_2Ag_znm.cjs} +2 -2
- package/dist/{select-DVT_kFNR.cjs.map → select-_2Ag_znm.cjs.map} +1 -1
- package/dist/select.cjs +1 -1
- package/dist/select.js +1 -1
- package/dist/selector-hook-Cok22ifx.cjs +2 -0
- package/dist/selector-hook-Cok22ifx.cjs.map +1 -0
- package/dist/selector-hook-l2fe2UO5.js +319 -0
- package/dist/selector-hook-l2fe2UO5.js.map +1 -0
- package/dist/{sheet-CNn_huhz.js → sheet-DovyNsok.js} +14 -14
- package/dist/sheet-DovyNsok.js.map +1 -0
- package/dist/{sheet-Bza5jVS2.cjs → sheet-wjDOQ8Hs.cjs} +4 -4
- package/dist/sheet-wjDOQ8Hs.cjs.map +1 -0
- package/dist/sheet.cjs +1 -1
- package/dist/sheet.js +2 -2
- package/dist/{sheet.service-CmNDL4f6.js → sheet.service-BvOiOFMm.js} +2 -2
- package/dist/{sheet.service-CmNDL4f6.js.map → sheet.service-BvOiOFMm.js.map} +1 -1
- package/dist/{sheet.service--zUgftN3.cjs → sheet.service-DfHrOxyc.cjs} +2 -2
- package/dist/{sheet.service--zUgftN3.cjs.map → sheet.service-DfHrOxyc.cjs.map} +1 -1
- package/dist/{slider-Cf0pED-U.cjs → slider-BgJccHrg.cjs} +2 -2
- package/dist/{slider-Cf0pED-U.cjs.map → slider-BgJccHrg.cjs.map} +1 -1
- package/dist/{slider-DPxBmmFD.js → slider-CeVgx4pL.js} +3 -3
- package/dist/{slider-DPxBmmFD.js.map → slider-CeVgx4pL.js.map} +1 -1
- package/dist/slider.cjs +1 -1
- package/dist/slider.js +1 -1
- package/dist/{spinner-BDSDxr_W.cjs → spinner-BKeA2bdB.cjs} +3 -3
- package/dist/spinner-BKeA2bdB.cjs.map +1 -0
- package/dist/{spinner-Dyz6HBFa.js → spinner-Brq1TenP.js} +3 -3
- package/dist/spinner-Brq1TenP.js.map +1 -0
- package/dist/steps.cjs +1 -1
- package/dist/steps.js +1 -1
- package/dist/store.cjs +1 -1
- package/dist/store.js +1 -1
- package/dist/{suggestion-chip-CCW8g_3S.js → suggestion-chip-CWBSzu7C.js} +3 -3
- package/dist/{suggestion-chip-CCW8g_3S.js.map → suggestion-chip-CWBSzu7C.js.map} +1 -1
- package/dist/{suggestion-chip-B7COqb4l.cjs → suggestion-chip-dq20NKWy.cjs} +2 -2
- package/dist/{suggestion-chip-B7COqb4l.cjs.map → suggestion-chip-dq20NKWy.cjs.map} +1 -1
- package/dist/{surface-B4CxtF38.js → surface-Bf8pvmdG.js} +34 -10
- package/dist/{surface-B4CxtF38.js.map → surface-Bf8pvmdG.js.map} +1 -1
- package/dist/{surface-CkzbeSYN.cjs → surface-fEPJ-cuu.cjs} +27 -3
- package/dist/{surface-CkzbeSYN.cjs.map → surface-fEPJ-cuu.cjs.map} +1 -1
- package/dist/surface.cjs +1 -1
- package/dist/surface.js +1 -1
- package/dist/{table-D-g4ZBys.cjs → table-DEnB9_Rf.cjs} +4 -3
- package/dist/{table-D-g4ZBys.cjs.map → table-DEnB9_Rf.cjs.map} +1 -1
- package/dist/{table-KPNVMJtn.js → table-MLd3oXm6.js} +14 -10
- package/dist/{table-KPNVMJtn.js.map → table-MLd3oXm6.js.map} +1 -1
- package/dist/table.cjs +1 -1
- package/dist/table.js +1 -1
- package/dist/{tabs-compatibility-sMoQP12I.cjs → tabs-compatibility-CXVHOR5X.cjs} +2 -2
- package/dist/{tabs-compatibility-sMoQP12I.cjs.map → tabs-compatibility-CXVHOR5X.cjs.map} +1 -1
- package/dist/{tabs-compatibility-xUK4vD1M.js → tabs-compatibility-KWKzYolX.js} +2 -2
- package/dist/{tabs-compatibility-xUK4vD1M.js.map → tabs-compatibility-KWKzYolX.js.map} +1 -1
- package/dist/tabs.cjs +1 -1
- package/dist/tabs.js +1 -1
- package/dist/tailwind.mixin-3TPVvhYf.cjs +2 -0
- package/dist/{tailwind.mixin-scDxsqaX.cjs.map → tailwind.mixin-3TPVvhYf.cjs.map} +1 -1
- package/dist/tailwind.mixin-DIW0B_of.js +67 -0
- package/dist/{tailwind.mixin-xIIxrXd8.js.map → tailwind.mixin-DIW0B_of.js.map} +1 -1
- package/dist/teleport.cjs +1 -1
- package/dist/teleport.js +1 -1
- package/dist/{textarea-BSBYVs99.cjs → textarea-B7arkA7y.cjs} +2 -2
- package/dist/{textarea-BSBYVs99.cjs.map → textarea-B7arkA7y.cjs.map} +1 -1
- package/dist/{textarea-CFrirT5y.js → textarea-BK1m_CFR.js} +3 -3
- package/dist/{textarea-CFrirT5y.js.map → textarea-BK1m_CFR.js.map} +1 -1
- package/dist/textarea.cjs +1 -1
- package/dist/textarea.js +1 -1
- package/dist/{theme-button-B8Xqrz1M.cjs → theme-button-BTKwL3oC.cjs} +2 -2
- package/dist/{theme-button-B8Xqrz1M.cjs.map → theme-button-BTKwL3oC.cjs.map} +1 -1
- package/dist/{theme-button-D-LTPh88.js → theme-button-C6kk8bay.js} +2 -2
- package/dist/{theme-button-D-LTPh88.js.map → theme-button-C6kk8bay.js.map} +1 -1
- package/dist/theme-button.cjs +1 -1
- package/dist/theme-button.js +1 -1
- package/dist/{theme-controller-boat-BOddzVdU.js → theme-controller-boat-BK59LqH9.js} +3 -3
- package/dist/{theme-controller-boat-BOddzVdU.js.map → theme-controller-boat-BK59LqH9.js.map} +1 -1
- package/dist/{theme-controller-boat-C2F-qRyu.cjs → theme-controller-boat-Y5QXwJxW.cjs} +2 -2
- package/dist/{theme-controller-boat-C2F-qRyu.cjs.map → theme-controller-boat-Y5QXwJxW.cjs.map} +1 -1
- package/dist/theme.cjs +1 -1
- package/dist/theme.js +1 -1
- package/dist/{timezone-BvOWa9Nt.js → timezone-D_skWX6Z.js} +3 -3
- package/dist/{timezone-BvOWa9Nt.js.map → timezone-D_skWX6Z.js.map} +1 -1
- package/dist/{timezone-xHmnktrm.cjs → timezone-nbn0o5GC.cjs} +2 -2
- package/dist/{timezone-xHmnktrm.cjs.map → timezone-nbn0o5GC.cjs.map} +1 -1
- package/dist/{tooltip-D3ZZJEAk.js → tooltip-Btl0IKYC.js} +2 -2
- package/dist/{tooltip-D3ZZJEAk.js.map → tooltip-Btl0IKYC.js.map} +1 -1
- package/dist/{tooltip-D24v5bvM.cjs → tooltip-DyuMJEjL.cjs} +2 -2
- package/dist/{tooltip-D24v5bvM.cjs.map → tooltip-DyuMJEjL.cjs.map} +1 -1
- package/dist/tooltip.cjs +1 -1
- package/dist/tooltip.js +1 -1
- package/dist/{tree-CfVyhRIH.js → tree-B_2eIFQi.js} +2 -2
- package/dist/{tree-CfVyhRIH.js.map → tree-B_2eIFQi.js.map} +1 -1
- package/dist/{tree-DC_jbDRu.cjs → tree-N4Y6MoQe.cjs} +2 -2
- package/dist/{tree-DC_jbDRu.cjs.map → tree-N4Y6MoQe.cjs.map} +1 -1
- package/dist/tree.cjs +1 -1
- package/dist/tree.js +1 -1
- package/dist/{typewriter-By-3T0Jm.js → typewriter-Blyrk_4c.js} +247 -118
- package/dist/typewriter-Blyrk_4c.js.map +1 -0
- package/dist/typewriter-CFQAeOaw.cjs +124 -0
- package/dist/typewriter-CFQAeOaw.cjs.map +1 -0
- package/dist/typewriter.cjs +1 -1
- package/dist/typewriter.js +1 -1
- package/dist/{typography-B7kvO8iJ.js → typography-DjGWK58I.js} +2 -2
- package/dist/{typography-B7kvO8iJ.js.map → typography-DjGWK58I.js.map} +1 -1
- package/dist/{typography-9lVCjAbj.cjs → typography-DsIU0TGe.cjs} +2 -2
- package/dist/{typography-9lVCjAbj.cjs.map → typography-DsIU0TGe.cjs.map} +1 -1
- package/dist/typography.cjs +1 -1
- package/dist/typography.js +1 -1
- package/dist/utils.cjs +1 -1
- package/dist/utils.js +1 -1
- package/package.json +1 -1
- package/types/src/area/router.types.d.ts +1 -0
- package/types/src/boat/boat.d.ts +0 -1
- package/types/src/button/button.d.ts +8 -0
- package/types/src/details/details.d.ts +3 -11
- package/types/src/directives/drag.d.ts +30 -0
- package/types/src/directives/index.d.ts +1 -0
- package/types/src/divider/divider.d.ts +6 -1
- package/types/src/menu/menu-item.d.ts +0 -1
- package/types/src/store/filter-directive.d.ts +1 -1
- package/types/src/surface/surface.d.ts +2 -1
- package/types/src/types/surface.d.ts +1 -1
- package/types/src/typewriter/typewriter.d.ts +15 -0
- package/types/src/utils/index.d.ts +4 -4
- package/types/src/utils/search.d.ts +39 -1
- package/dist/area.component-BojFAcRk.cjs.map +0 -1
- package/dist/area.component-C_nUxyiY.js.map +0 -1
- package/dist/boat-B7AKN6Ge.js +0 -276
- package/dist/boat-B7AKN6Ge.js.map +0 -1
- package/dist/boat-BhAuteUk.cjs +0 -93
- package/dist/boat-BhAuteUk.cjs.map +0 -1
- package/dist/details-CQPpI_la.js +0 -211
- package/dist/details-CQPpI_la.js.map +0 -1
- package/dist/details-DydvHvfw.cjs +0 -143
- package/dist/details-DydvHvfw.cjs.map +0 -1
- package/dist/divider-BF9xljgI.cjs +0 -2
- package/dist/divider-BF9xljgI.cjs.map +0 -1
- package/dist/divider-BHruVdsE.js +0 -23
- package/dist/divider-BHruVdsE.js.map +0 -1
- package/dist/icon-button-BRcfLsJL.cjs.map +0 -1
- package/dist/icon-button-PpRHFLCj.js.map +0 -1
- package/dist/input-DB269a2X.cjs +0 -51
- package/dist/menu-DA2pO48m.cjs +0 -26
- package/dist/menu-DA2pO48m.cjs.map +0 -1
- package/dist/menu-DwFriXTu.js +0 -63
- package/dist/menu-DwFriXTu.js.map +0 -1
- package/dist/ripple-Cy-nvO8W.js +0 -80
- package/dist/ripple-Cy-nvO8W.js.map +0 -1
- package/dist/ripple-DqQrvaTe.cjs +0 -16
- package/dist/ripple-DqQrvaTe.cjs.map +0 -1
- package/dist/search-BeEqIiuO.js +0 -53
- package/dist/search-BeEqIiuO.js.map +0 -1
- package/dist/search-bfOHCuHZ.cjs +0 -2
- package/dist/search-bfOHCuHZ.cjs.map +0 -1
- package/dist/selector-hook-BG6g_IEN.cjs +0 -2
- package/dist/selector-hook-BG6g_IEN.cjs.map +0 -1
- package/dist/selector-hook-CrwQCPxL.js +0 -313
- package/dist/selector-hook-CrwQCPxL.js.map +0 -1
- package/dist/sheet-Bza5jVS2.cjs.map +0 -1
- package/dist/sheet-CNn_huhz.js.map +0 -1
- package/dist/spinner-BDSDxr_W.cjs.map +0 -1
- package/dist/spinner-Dyz6HBFa.js.map +0 -1
- package/dist/tailwind.mixin-scDxsqaX.cjs +0 -2
- package/dist/tailwind.mixin-xIIxrXd8.js +0 -67
- package/dist/typewriter-By-3T0Jm.js.map +0 -1
- package/dist/typewriter-vit0P1N1.cjs +0 -9
- package/dist/typewriter-vit0P1N1.cjs.map +0 -1
package/dist/{notification-service-CP6kGXVL.cjs.map → notification-service-B_pa74hl.cjs.map}
RENAMED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"notification-service-CP6kGXVL.cjs","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","_resumeTimers","remainingTime","dispatchEvent","CustomEvent","detail","bubbles","composed","_handleMouseEnter","_pauseTimers","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","render","repeat","_handleClose","NotificationService","notificationStack","getInstance","instance","completeOptions","DEFAULT_OPTIONS","targetId","indexOf","splice","pop","notify","_x","$notify","show","customDuration","persistent","dismiss","update"],"mappings":"0qBAgBqBA,QAAAA,qBAArB,cAAkDC,kuFAAlD,aAAAC,CAAAC,MAAAA,GAAAC,WAC6BC,KAAAC,MAAQ,GACRD,KAAAE,QAAU,GACVF,KAAAG,KAAyB,OACxBH,KAAAI,SAAAA,GACDJ,KAAAK,SAAW,IACXL,KAAAM,GAAK,gBAAgBC,KAAKC,IAAAA,CAAAA,IAASC,KAAKC,MAAsB,IAAhBD,KAAKE,OAAAA,CAAAA,CAAAA,GAClDX,KAAAY,UAAAA,GACAZ,KAAAa,aAAAA,GAEpBb,KAAQc,SAAAA,GACRd,KAAQe,UAAY,IACpBf,KAAQgB,YACRhB,KAAQiB,WAAW,CAI5B,mBAAAC,CACCpB,MAAMoB,kBAAAA,EAEFlB,KAAKK,SAAW,GACnBL,KAAKmB,qBAAAA,EAGFnB,KAAKY,WACRZ,KAAKoB,WAAAA,CAEP,CAEA,sBAAAC,CACCrB,KAAKsB,aAAAA,EACLxB,MAAMuB,qBAAAA,CACP,CAEA,QAAQE,GACPzB,MAAM0B,QAAQD,GAEVA,EAAaE,IAAI,UAAA,GAAezB,KAAKK,SAAW,IACnDL,KAAKsB,aAAAA,EACLtB,KAAKmB,uBAEP,CAEQ,uBACP,GAAInB,KAAKK,UAAY,EAAG,OAExB,MACMqB,EADYnB,KAAKC,IAAAA,EACKR,KAA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KO,eACNjO,EACAG,EACA8N,EAAsE,CAAA,EAAA,CAEtE,OAAOnO,KAAKuP,OAAO,CAClBrP,QAAAA,EACAG,cACG8N,CAAAA,CAAAA,CAEL,CAKO,WAAWjO,EAAiBiO,EAAsE,IACxG,OAAOnO,KAAKuP,OAAO,CAClBrP,UACAG,SAAU,EAAA,GACP8N,CAAAA,CAAAA,CAEL,CAAA,EArKAnO,EAAekP,gBAAgD,CAC9D7O,SAAU,IACVD,YACAQ,UAAAA,EAAW,EARN,IAAMiO,EAANW,EAiLA,MAAMC,EAAU,CAItBC,KAAOvB,GACCU,EAAoBE,YAAAA,EAAcQ,OAAOpB,CAAAA,EAMjDjH,KAAM,CAAChH,EAAkBiO,EAAkE,KACnFU,EAAoBE,cAAc7H,KAAKhH,EAASiO,GAMxD9J,QAAS,CAACnE,EAAkBiO,EAAkE,KACtFU,EAAoBE,YAAAA,EAAc1K,QAAQnE,EAASiO,CAAAA,EAM3D1G,QAAS,CAACvH,EAAkBiO,EAAkE,KACtFU,EAAoBE,YAAAA,EAActH,QAAQvH,EAASiO,CAAAA,EAM3D5J,MAAO,CAACrE,EAAkBiO,EAAkE,KACpFU,EAAoBE,cAAcxK,MAAMrE,EAASiO,CAAAA,EASzDwB,eAAgB,CACfzP,EACAG,EACA8N,EAAsE,CAAA,IAE/DU,EAAoBE,YAAAA,EAAcY,eAAezP,EAASG,EAAU8N,CAAAA,EAM5EyB,WAAY,CAAC1P,EAAiBiO,EAAsE,KAC5FU,EAAoBE,YAAAA,EAAca,WAAW1P,EAASiO,CAAAA,EAO9D0B,QAAUvP,GACFuO,EAAoBE,YAAAA,EAAcc,QAAQvP,CAAAA,EAMlDwP,OAAQ,CAACxP,EAAY6N,IACbU,EAAoBE,YAAAA,EAAce,OAAOxP,EAAI6N"}
|
|
1
|
+
{"version":3,"file":"notification-service-B_pa74hl.cjs","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","_resumeTimers","remainingTime","dispatchEvent","CustomEvent","detail","bubbles","composed","_handleMouseEnter","_pauseTimers","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","render","repeat","_handleClose","NotificationService","notificationStack","getInstance","instance","completeOptions","DEFAULT_OPTIONS","targetId","indexOf","splice","pop","notify","_x","$notify","show","customDuration","persistent","dismiss","update"],"mappings":"0qBAgBqBA,QAAAA,qBAArB,cAAkDC,kuFAAlD,aAAAC,CAAAC,MAAAA,GAAAC,WAC6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MxD9J,QAAS,CAACnE,EAAkBiO,EAAkE,KACtFU,EAAoBE,YAAAA,EAAc1K,QAAQnE,EAASiO,CAAAA,EAM3D1G,QAAS,CAACvH,EAAkBiO,EAAkE,KACtFU,EAAoBE,YAAAA,EAActH,QAAQvH,EAASiO,CAAAA,EAM3D5J,MAAO,CAACrE,EAAkBiO,EAAkE,KACpFU,EAAoBE,cAAcxK,MAAMrE,EAASiO,CAAAA,EASzDwB,eAAgB,CACfzP,EACAG,EACA8N,EAAsE,CAAA,IAE/DU,EAAoBE,YAAAA,EAAcY,eAAezP,EAASG,EAAU8N,CAAAA,EAM5EyB,WAAY,CAAC1P,EAAiBiO,EAAsE,KAC5FU,EAAoBE,YAAAA,EAAca,WAAW1P,EAASiO,CAAAA,EAO9D0B,QAAUvP,GACFuO,EAAoBE,YAAAA,EAAcc,QAAQvP,CAAAA,EAMlDwP,OAAQ,CAACxP,EAAY6N,IACbU,EAAoBE,YAAAA,EAAce,OAAOxP,EAAI6N"}
|
package/dist/notification.cjs
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const i=require("./notification-service-
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const i=require("./notification-service-B_pa74hl.cjs"),e=require("./notify-aasSKQGA.cjs");exports.$notify=i.$notify,exports.NotificationAudioService=i.NotificationAudioService,Object.defineProperty(exports,"SchmancyNotification",{enumerable:!0,get:()=>i.SchmancyNotification}),Object.defineProperty(exports,"SchmancyNotificationContainer",{enumerable:!0,get:()=>i.SchmancyNotificationContainer}),exports.notify=e.notify,exports.notifyProgress=e.notifyProgress;
|
|
2
2
|
//# sourceMappingURL=notification.cjs.map
|
package/dist/notification.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { $ as a, N as t, S as n, a as c } from "./notification-service-
|
|
2
|
-
import { n as r, a as s } from "./notify-
|
|
1
|
+
import { $ as a, N as t, S as n, a as c } from "./notification-service-B4nvP2Jc.js";
|
|
2
|
+
import { n as r, a as s } from "./notify-Ci0HrUIo.js";
|
|
3
3
|
export {
|
|
4
4
|
a as $notify,
|
|
5
5
|
t as NotificationAudioService,
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { tap as g, catchError as d, finalize as u } from "rxjs";
|
|
2
|
-
import { $ as r } from "./notification-service-
|
|
2
|
+
import { $ as r } from "./notification-service-B4nvP2Jc.js";
|
|
3
3
|
function p(s) {
|
|
4
4
|
return (t) => {
|
|
5
5
|
let o;
|
|
@@ -32,4 +32,4 @@ export {
|
|
|
32
32
|
m as a,
|
|
33
33
|
p as n
|
|
34
34
|
};
|
|
35
|
-
//# sourceMappingURL=notify-
|
|
35
|
+
//# sourceMappingURL=notify-Ci0HrUIo.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"notify-
|
|
1
|
+
{"version":3,"file":"notify-Ci0HrUIo.js","sources":["../src/notification/notify.ts"],"sourcesContent":["import { Observable, tap, finalize, catchError } from 'rxjs'\r\nimport { $notify } from './notification-service'\r\nimport { NotificationOptions } from './notification-container'\r\n\r\nexport interface NotifyOptions {\r\n\t/**\r\n\t * Message to show while the operation is in progress\r\n\t */\r\n\tloadingMessage?: string\r\n\t/**\r\n\t * Message to show when the operation completes successfully\r\n\t */\r\n\tsuccessMessage?: string\r\n\t/**\r\n\t * Message to show when the operation fails (can be a function to format error)\r\n\t */\r\n\terrorMessage?: string | ((error: any) => string)\r\n\t/**\r\n\t * Type of notification for loading state\r\n\t */\r\n\tloadingType?: NotificationOptions['type']\r\n\t/**\r\n\t * Type of notification for success state\r\n\t */\r\n\tsuccessType?: NotificationOptions['type']\r\n\t/**\r\n\t * Type of notification for error state\r\n\t */\r\n\terrorType?: NotificationOptions['type']\r\n\t/**\r\n\t * Whether to auto-dismiss the loading notification on complete/error\r\n\t */\r\n\tautoDismissLoading?: boolean\r\n\t/**\r\n\t * Duration for success notification (ms). Use 0 for persistent\r\n\t */\r\n\tsuccessDuration?: number\r\n\t/**\r\n\t * Duration for error notification (ms). Use 0 for persistent\r\n\t */\r\n\terrorDuration?: number\r\n}\r\n\r\n/**\r\n * Wraps an Observable with notification lifecycle management.\r\n * Shows a loading notification with progress indicator, then auto-dismisses and shows success/error notification.\r\n * \r\n * @example\r\n * ```typescript\r\n * // Basic usage with progress indicator\r\n * someApiCall().pipe(\r\n * notify({\r\n * loadingMessage: 'Loading data...',\r\n * successMessage: 'Data loaded successfully!',\r\n * errorMessage: 'Failed to load data'\r\n * })\r\n * ).subscribe()\r\n * \r\n * // With custom durations\r\n * saveData().pipe(\r\n * notify({\r\n * loadingMessage: 'Saving...',\r\n * successMessage: 'Saved!',\r\n * successDuration: 5000, // Success stays for 5 seconds\r\n * errorMessage: (err) => `Save failed: ${err.message}`,\r\n * errorDuration: 0 // Error is persistent until dismissed\r\n * })\r\n * ).subscribe()\r\n * \r\n * // Full configuration example\r\n * uploadFile().pipe(\r\n * notify({\r\n * loadingMessage: 'Uploading file...',\r\n * loadingType: 'info',\r\n * successMessage: 'Upload complete!',\r\n * successType: 'success',\r\n * successDuration: 3000,\r\n * errorMessage: (err) => `Upload failed: ${err.message}`,\r\n * errorType: 'error',\r\n * errorDuration: 10000,\r\n * autoDismissLoading: true\r\n * })\r\n * ).subscribe()\r\n * ```\r\n */\r\nexport function notify<T>(options: NotifyOptions) {\r\n\treturn (source: Observable<T>): Observable<T> => {\r\n\t\tlet loadingNotificationId: string | undefined\r\n\r\n\t\t// Show loading notification if message provided\r\n\t\tif (options.loadingMessage) {\r\n\t\t\tloadingNotificationId = $notify.show({\r\n\t\t\t\tmessage: options.loadingMessage,\r\n\t\t\t\ttype: options.loadingType || 'info',\r\n\t\t\t\tduration: 0, // Persistent until dismissed\r\n\t\t\t\tshowProgress: true, // Show indeterminate progress by default\r\n\t\t\t})\r\n\t\t}\r\n\r\n\t\treturn source.pipe(\r\n\t\t\ttap((value) => {\r\n\t\t\t\t// Check if the emitted value contains progress information\r\n\t\t\t\t// Common patterns: { progress: number }, { loaded: number, total: number }, etc.\r\n\t\t\t\tif (loadingNotificationId && typeof value === 'object' && value !== null) {\r\n\t\t\t\t\tlet progress: number | undefined\r\n\t\t\t\t\t\r\n\t\t\t\t\t// Check for different progress patterns\r\n\t\t\t\t\tif ('progress' in value && typeof (value as any).progress === 'number') {\r\n\t\t\t\t\t\tprogress = (value as any).progress\r\n\t\t\t\t\t} else if ('loaded' in value && 'total' in value) {\r\n\t\t\t\t\t\tconst loaded = (value as any).loaded\r\n\t\t\t\t\t\tconst total = (value as any).total\r\n\t\t\t\t\t\tif (typeof loaded === 'number' && typeof total === 'number' && total > 0) {\r\n\t\t\t\t\t\t\tprogress = (loaded / total) * 100\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t}\r\n\t\t\t\t\t\r\n\t\t\t\t\t// Update notification with progress if available\r\n\t\t\t\t\tif (progress !== undefined) {\r\n\t\t\t\t\t\t// We need to update the progress of the notification\r\n\t\t\t\t\t\t// For now, we'll update the message to show progress percentage\r\n\t\t\t\t\t\t$notify.update?.(loadingNotificationId, {\r\n\t\t\t\t\t\t\tmessage: `${options.loadingMessage} (${Math.round(progress)}%)`,\r\n\t\t\t\t\t\t})\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\t\t\t\t\r\n\t\t\t\t// Check if this is the final success emission (not a progress update)\r\n\t\t\t\t// Typically file uploads emit progress events then a final result\r\n\t\t\t\tconst isProgressUpdate = typeof value === 'object' && value !== null && \r\n\t\t\t\t\t('progress' in value || ('loaded' in value && 'total' in value))\r\n\t\t\t\t\r\n\t\t\t\tif (!isProgressUpdate) {\r\n\t\t\t\t\t// On successful final emission, dismiss loading and show success\r\n\t\t\t\t\tif (loadingNotificationId && options.autoDismissLoading !== false) {\r\n\t\t\t\t\t\t$notify.dismiss(loadingNotificationId)\r\n\t\t\t\t\t\tloadingNotificationId = undefined\r\n\t\t\t\t\t}\r\n\r\n\t\t\t\t\tif (options.successMessage) {\r\n\t\t\t\t\t\t$notify.show({\r\n\t\t\t\t\t\t\tmessage: options.successMessage,\r\n\t\t\t\t\t\t\ttype: options.successType || 'success',\r\n\t\t\t\t\t\t\tduration: options.successDuration ?? 2000,\r\n\t\t\t\t\t\t})\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\t\t\t}),\r\n\t\t\tcatchError((error) => {\r\n\t\t\t\t// On error, dismiss loading and show error\r\n\t\t\t\tif (loadingNotificationId && options.autoDismissLoading !== false) {\r\n\t\t\t\t\t$notify.dismiss(loadingNotificationId)\r\n\t\t\t\t\tloadingNotificationId = undefined\r\n\t\t\t\t}\r\n\r\n\t\t\t\tif (options.errorMessage) {\r\n\t\t\t\t\tconst message = typeof options.errorMessage === 'function' \r\n\t\t\t\t\t\t? options.errorMessage(error)\r\n\t\t\t\t\t\t: options.errorMessage\r\n\t\t\t\t\t\r\n\t\t\t\t\t$notify.show({\r\n\t\t\t\t\t\tmessage,\r\n\t\t\t\t\t\ttype: options.errorType || 'error',\r\n\t\t\t\t\t\tduration: options.errorDuration ?? 3000,\r\n\t\t\t\t\t})\r\n\t\t\t\t}\r\n\r\n\t\t\t\t// Re-throw the error to maintain the error flow\r\n\t\t\t\tthrow error\r\n\t\t\t}),\r\n\t\t\tfinalize(() => {\r\n\t\t\t\t// Clean up any remaining loading notification\r\n\t\t\t\tif (loadingNotificationId && options.autoDismissLoading !== false) {\r\n\t\t\t\t\t$notify.dismiss(loadingNotificationId)\r\n\t\t\t\t}\r\n\t\t\t})\r\n\t\t)\r\n\t}\r\n}\r\n\r\n/**\r\n * Simplified version for API calls that just need loading and auto-dismiss.\r\n * Perfect for fire-and-forget operations where you want to show progress.\r\n * \r\n * @example\r\n * ```typescript\r\n * downloadData().pipe(\r\n * notifyProgress('Downloading...')\r\n * ).subscribe()\r\n * \r\n * // With custom messages\r\n * saveDocument().pipe(\r\n * notifyProgress('Saving document...', 'Document saved!', 'Save failed')\r\n * ).subscribe()\r\n * ```\r\n */\r\nexport function notifyProgress<T>(\r\n\tloadingMessage: string,\r\n\tsuccessMessage?: string,\r\n\terrorMessage?: string\r\n) {\r\n\treturn notify<T>({\r\n\t\tloadingMessage,\r\n\t\tsuccessMessage: successMessage || undefined,\r\n\t\terrorMessage: errorMessage || undefined,\r\n\t\tautoDismissLoading: true,\r\n\t})\r\n}"],"names":["notify","options","source","loadingNotificationId","loadingMessage","$notify","show","message","type","loadingType","duration","showProgress","pipe","tap","value","progress","loaded","total","update","Math","round","autoDismissLoading","dismiss","successMessage","successType","successDuration","catchError","error","errorMessage","errorType","errorDuration","finalize","notifyProgress"],"mappings":";;AAqFO,SAASA,EAAUC;AACzB,SAAQC,CAAAA,MAAAA;AACP,QAAIC;AAYJ,WATIF,EAAQG,mBACXD,IAAwBE,EAAQC,KAAK,EACpCC,SAASN,EAAQG,gBACjBI,MAAMP,EAAQQ,eAAe,QAC7BC,UAAU,GACVC,iBAAc,CAAA,IAITT,EAAOU,KACbC,EAAKC,OAAAA;AAGJ,UAAIX,KAA0C,OAAVW,KAAU,YAAYA,MAAU,MAAM;AACzE,YAAIC;AAGJ,YAAI,cAAcD,KAA4C,OAA3BA,EAAcC,YAAa,SAC7DA,CAAAA,IAAYD,EAAcC;AAAAA,iBAChB,YAAYD,KAAS,WAAWA,GAAO;AACjD,gBAAME,IAAUF,EAAcE,QACxBC,IAASH,EAAcG;AACP,iBAAXD,KAAW,YAA6B,OAAVC,KAAU,YAAYA,IAAQ,MACtEF,IAAYC,IAASC,IAAS;AAAA,QAEhC;AAAA,QAGIF,MAHJ,UAMCV,EAAQa,SAASf,GAAuB,EACvCI,SAAS,GAAGN,EAAQG,cAAAA,KAAmBe,KAAKC,MAAML,CAAAA,CAAAA,KAAAA,CAAAA;AAAAA,MAGrD;AAI0C,MAAA,OAAVD,KAAU,YAAYA,MAAU,SAC9D,cAAcA,KAAU,YAAYA,KAAS,WAAWA,OAIrDX,KAAyBF,EAAQoB,uBAAjClB,OACHE,EAAQiB,QAAQnB,CAAAA,GAChBA,IAAAA,SAGGF,EAAQsB,kBACXlB,EAAQC,KAAK,EACZC,SAASN,EAAQsB,gBACjBf,MAAMP,EAAQuB,eAAe,WAC7Bd,UAAUT,EAAQwB,mBAAmB,IAAA,CAAA;AAAA,IAAA,CAAA,GAKzCC,EAAYC;AAOX,UALIxB,KAAyBF,EAAQoB,uBAAjClB,OACHE,EAAQiB,QAAQnB,CAAAA,GAChBA,aAGGF,EAAQ2B,cAAc;AACzB,cAAMrB,IAA0C,OAAzBN,EAAQ2B,gBAAiB,aAC7C3B,EAAQ2B,aAAaD,CAAAA,IACrB1B,EAAQ2B;AAEXvB,QAAAA,EAAQC,KAAK,EACZC,SAAAA,GACAC,MAAMP,EAAQ4B,aAAa,SAC3BnB,UAAUT,EAAQ6B,iBAAiB,IAAA,CAAA;AAAA,MAErC;AAGA,YAAMH;AAAAA,IAAAA,CAAAA,GAEPI,EAAS,MAAA;AAEJ5B,MAAAA,KAAyBF,EAAQoB,uBAAjClB,MACHE,EAAQiB,QAAQnB;;;AAKrB;AAkBO,SAAS6B,EACf5B,GACAmB,GACAK;AAEA,SAAO5B,EAAU,EAChBI,gBAAAA,GACAmB,gBAAgBA,aAChBK,cAAcA,aACdP,oBAAAA,GAAoB,CAAA;AAEtB;"}
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
"use strict";const a=require("rxjs"),i=require("./notification-service-
|
|
2
|
-
//# sourceMappingURL=notify-
|
|
1
|
+
"use strict";const a=require("rxjs"),i=require("./notification-service-B_pa74hl.cjs");function u(s){return t=>{let o;return s.loadingMessage&&(o=i.$notify.show({message:s.loadingMessage,type:s.loadingType||"info",duration:0,showProgress:!0})),t.pipe(a.tap(e=>{if(o&&typeof e=="object"&&e!==null){let r;if("progress"in e&&typeof e.progress=="number")r=e.progress;else if("loaded"in e&&"total"in e){const g=e.loaded,n=e.total;typeof g=="number"&&typeof n=="number"&&n>0&&(r=g/n*100)}r!==void 0&&i.$notify.update?.(o,{message:`${s.loadingMessage} (${Math.round(r)}%)`})}typeof e=="object"&&e!==null&&("progress"in e||"loaded"in e&&"total"in e)||(o&&s.autoDismissLoading!==!1&&(i.$notify.dismiss(o),o=void 0),s.successMessage&&i.$notify.show({message:s.successMessage,type:s.successType||"success",duration:s.successDuration??2e3}))}),a.catchError(e=>{if(o&&s.autoDismissLoading!==!1&&(i.$notify.dismiss(o),o=void 0),s.errorMessage){const r=typeof s.errorMessage=="function"?s.errorMessage(e):s.errorMessage;i.$notify.show({message:r,type:s.errorType||"error",duration:s.errorDuration??3e3})}throw e}),a.finalize(()=>{o&&s.autoDismissLoading!==!1&&i.$notify.dismiss(o)}))}}exports.notify=u,exports.notifyProgress=function(s,t,o){return u({loadingMessage:s,successMessage:t||void 0,errorMessage:o||void 0,autoDismissLoading:!0})};
|
|
2
|
+
//# sourceMappingURL=notify-aasSKQGA.cjs.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"notify-
|
|
1
|
+
{"version":3,"file":"notify-aasSKQGA.cjs","sources":["../src/notification/notify.ts"],"sourcesContent":["import { Observable, tap, finalize, catchError } from 'rxjs'\r\nimport { $notify } from './notification-service'\r\nimport { NotificationOptions } from './notification-container'\r\n\r\nexport interface NotifyOptions {\r\n\t/**\r\n\t * Message to show while the operation is in progress\r\n\t */\r\n\tloadingMessage?: string\r\n\t/**\r\n\t * Message to show when the operation completes successfully\r\n\t */\r\n\tsuccessMessage?: string\r\n\t/**\r\n\t * Message to show when the operation fails (can be a function to format error)\r\n\t */\r\n\terrorMessage?: string | ((error: any) => string)\r\n\t/**\r\n\t * Type of notification for loading state\r\n\t */\r\n\tloadingType?: NotificationOptions['type']\r\n\t/**\r\n\t * Type of notification for success state\r\n\t */\r\n\tsuccessType?: NotificationOptions['type']\r\n\t/**\r\n\t * Type of notification for error state\r\n\t */\r\n\terrorType?: NotificationOptions['type']\r\n\t/**\r\n\t * Whether to auto-dismiss the loading notification on complete/error\r\n\t */\r\n\tautoDismissLoading?: boolean\r\n\t/**\r\n\t * Duration for success notification (ms). Use 0 for persistent\r\n\t */\r\n\tsuccessDuration?: number\r\n\t/**\r\n\t * Duration for error notification (ms). Use 0 for persistent\r\n\t */\r\n\terrorDuration?: number\r\n}\r\n\r\n/**\r\n * Wraps an Observable with notification lifecycle management.\r\n * Shows a loading notification with progress indicator, then auto-dismisses and shows success/error notification.\r\n * \r\n * @example\r\n * ```typescript\r\n * // Basic usage with progress indicator\r\n * someApiCall().pipe(\r\n * notify({\r\n * loadingMessage: 'Loading data...',\r\n * successMessage: 'Data loaded successfully!',\r\n * errorMessage: 'Failed to load data'\r\n * })\r\n * ).subscribe()\r\n * \r\n * // With custom durations\r\n * saveData().pipe(\r\n * notify({\r\n * loadingMessage: 'Saving...',\r\n * successMessage: 'Saved!',\r\n * successDuration: 5000, // Success stays for 5 seconds\r\n * errorMessage: (err) => `Save failed: ${err.message}`,\r\n * errorDuration: 0 // Error is persistent until dismissed\r\n * })\r\n * ).subscribe()\r\n * \r\n * // Full configuration example\r\n * uploadFile().pipe(\r\n * notify({\r\n * loadingMessage: 'Uploading file...',\r\n * loadingType: 'info',\r\n * successMessage: 'Upload complete!',\r\n * successType: 'success',\r\n * successDuration: 3000,\r\n * errorMessage: (err) => `Upload failed: ${err.message}`,\r\n * errorType: 'error',\r\n * errorDuration: 10000,\r\n * autoDismissLoading: true\r\n * })\r\n * ).subscribe()\r\n * ```\r\n */\r\nexport function notify<T>(options: NotifyOptions) {\r\n\treturn (source: Observable<T>): Observable<T> => {\r\n\t\tlet loadingNotificationId: string | undefined\r\n\r\n\t\t// Show loading notification if message provided\r\n\t\tif (options.loadingMessage) {\r\n\t\t\tloadingNotificationId = $notify.show({\r\n\t\t\t\tmessage: options.loadingMessage,\r\n\t\t\t\ttype: options.loadingType || 'info',\r\n\t\t\t\tduration: 0, // Persistent until dismissed\r\n\t\t\t\tshowProgress: true, // Show indeterminate progress by default\r\n\t\t\t})\r\n\t\t}\r\n\r\n\t\treturn source.pipe(\r\n\t\t\ttap((value) => {\r\n\t\t\t\t// Check if the emitted value contains progress information\r\n\t\t\t\t// Common patterns: { progress: number }, { loaded: number, total: number }, etc.\r\n\t\t\t\tif (loadingNotificationId && typeof value === 'object' && value !== null) {\r\n\t\t\t\t\tlet progress: number | undefined\r\n\t\t\t\t\t\r\n\t\t\t\t\t// Check for different progress patterns\r\n\t\t\t\t\tif ('progress' in value && typeof (value as any).progress === 'number') {\r\n\t\t\t\t\t\tprogress = (value as any).progress\r\n\t\t\t\t\t} else if ('loaded' in value && 'total' in value) {\r\n\t\t\t\t\t\tconst loaded = (value as any).loaded\r\n\t\t\t\t\t\tconst total = (value as any).total\r\n\t\t\t\t\t\tif (typeof loaded === 'number' && typeof total === 'number' && total > 0) {\r\n\t\t\t\t\t\t\tprogress = (loaded / total) * 100\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t}\r\n\t\t\t\t\t\r\n\t\t\t\t\t// Update notification with progress if available\r\n\t\t\t\t\tif (progress !== undefined) {\r\n\t\t\t\t\t\t// We need to update the progress of the notification\r\n\t\t\t\t\t\t// For now, we'll update the message to show progress percentage\r\n\t\t\t\t\t\t$notify.update?.(loadingNotificationId, {\r\n\t\t\t\t\t\t\tmessage: `${options.loadingMessage} (${Math.round(progress)}%)`,\r\n\t\t\t\t\t\t})\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\t\t\t\t\r\n\t\t\t\t// Check if this is the final success emission (not a progress update)\r\n\t\t\t\t// Typically file uploads emit progress events then a final result\r\n\t\t\t\tconst isProgressUpdate = typeof value === 'object' && value !== null && \r\n\t\t\t\t\t('progress' in value || ('loaded' in value && 'total' in value))\r\n\t\t\t\t\r\n\t\t\t\tif (!isProgressUpdate) {\r\n\t\t\t\t\t// On successful final emission, dismiss loading and show success\r\n\t\t\t\t\tif (loadingNotificationId && options.autoDismissLoading !== false) {\r\n\t\t\t\t\t\t$notify.dismiss(loadingNotificationId)\r\n\t\t\t\t\t\tloadingNotificationId = undefined\r\n\t\t\t\t\t}\r\n\r\n\t\t\t\t\tif (options.successMessage) {\r\n\t\t\t\t\t\t$notify.show({\r\n\t\t\t\t\t\t\tmessage: options.successMessage,\r\n\t\t\t\t\t\t\ttype: options.successType || 'success',\r\n\t\t\t\t\t\t\tduration: options.successDuration ?? 2000,\r\n\t\t\t\t\t\t})\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\t\t\t}),\r\n\t\t\tcatchError((error) => {\r\n\t\t\t\t// On error, dismiss loading and show error\r\n\t\t\t\tif (loadingNotificationId && options.autoDismissLoading !== false) {\r\n\t\t\t\t\t$notify.dismiss(loadingNotificationId)\r\n\t\t\t\t\tloadingNotificationId = undefined\r\n\t\t\t\t}\r\n\r\n\t\t\t\tif (options.errorMessage) {\r\n\t\t\t\t\tconst message = typeof options.errorMessage === 'function' \r\n\t\t\t\t\t\t? options.errorMessage(error)\r\n\t\t\t\t\t\t: options.errorMessage\r\n\t\t\t\t\t\r\n\t\t\t\t\t$notify.show({\r\n\t\t\t\t\t\tmessage,\r\n\t\t\t\t\t\ttype: options.errorType || 'error',\r\n\t\t\t\t\t\tduration: options.errorDuration ?? 3000,\r\n\t\t\t\t\t})\r\n\t\t\t\t}\r\n\r\n\t\t\t\t// Re-throw the error to maintain the error flow\r\n\t\t\t\tthrow error\r\n\t\t\t}),\r\n\t\t\tfinalize(() => {\r\n\t\t\t\t// Clean up any remaining loading notification\r\n\t\t\t\tif (loadingNotificationId && options.autoDismissLoading !== false) {\r\n\t\t\t\t\t$notify.dismiss(loadingNotificationId)\r\n\t\t\t\t}\r\n\t\t\t})\r\n\t\t)\r\n\t}\r\n}\r\n\r\n/**\r\n * Simplified version for API calls that just need loading and auto-dismiss.\r\n * Perfect for fire-and-forget operations where you want to show progress.\r\n * \r\n * @example\r\n * ```typescript\r\n * downloadData().pipe(\r\n * notifyProgress('Downloading...')\r\n * ).subscribe()\r\n * \r\n * // With custom messages\r\n * saveDocument().pipe(\r\n * notifyProgress('Saving document...', 'Document saved!', 'Save failed')\r\n * ).subscribe()\r\n * ```\r\n */\r\nexport function notifyProgress<T>(\r\n\tloadingMessage: string,\r\n\tsuccessMessage?: string,\r\n\terrorMessage?: string\r\n) {\r\n\treturn notify<T>({\r\n\t\tloadingMessage,\r\n\t\tsuccessMessage: successMessage || undefined,\r\n\t\terrorMessage: errorMessage || undefined,\r\n\t\tautoDismissLoading: true,\r\n\t})\r\n}"],"names":["notify","options","source","loadingNotificationId","loadingMessage","$notify","show","message","type","loadingType","duration","showProgress","pipe","tap","value","progress","loaded","total","update","Math","round","autoDismissLoading","dismiss","successMessage","successType","successDuration","catchError","error","errorMessage","errorType","errorDuration","finalize"],"mappings":"sFAqFO,SAASA,EAAUC,EAAAA,CACzB,OAAQC,IACP,IAAIC,EAYJ,OATIF,EAAQG,iBACXD,EAAwBE,EAAAA,QAAQC,KAAK,CACpCC,QAASN,EAAQG,eACjBI,KAAMP,EAAQQ,aAAe,OAC7BC,SAAU,EACVC,aAAAA,EAAc,CAAA,GAITT,EAAOU,KACbC,EAAAA,IAAKC,IAGJ,GAAIX,UAAgCW,GAAU,UAAYA,IAAU,KAAM,CACzE,IAAIC,EAGJ,GAAI,aAAcD,UAAiBA,EAAcC,UAAa,SAC7DA,EAAYD,EAAcC,iBAChB,WAAYD,GAAS,UAAWA,EAAO,CACjD,MAAME,EAAUF,EAAcE,OACxBC,EAASH,EAAcG,aAClBD,GAAW,UAA6B,OAAVC,GAAU,UAAYA,EAAQ,IACtEF,EAAYC,EAASC,EAAS,IAEhC,CAGIF,YAGHV,EAAAA,QAAQa,SAASf,EAAuB,CACvCI,QAAS,GAAGN,EAAQG,cAAAA,KAAmBe,KAAKC,MAAML,CAAAA,CAAAA,IAAAA,CAAAA,CAGrD,CAI0C,OAAVD,GAAU,UAAYA,IAAU,OAC9D,aAAcA,GAAU,WAAYA,GAAS,UAAWA,KAIrDX,GAAyBF,EAAQoB,qBAAjClB,KACHE,EAAAA,QAAQiB,QAAQnB,CAAAA,EAChBA,EAAAA,QAGGF,EAAQsB,gBACXlB,EAAAA,QAAQC,KAAK,CACZC,QAASN,EAAQsB,eACjBf,KAAMP,EAAQuB,aAAe,UAC7Bd,SAAUT,EAAQwB,iBAAmB,GAAA,CAAA,EAAA,CAAA,EAKzCC,EAAAA,WAAYC,GAAAA,CAOX,GALIxB,GAAyBF,EAAQoB,qBAAjClB,KACHE,EAAAA,QAAQiB,QAAQnB,CAAAA,EAChBA,EAAAA,QAGGF,EAAQ2B,aAAc,CACzB,MAAMrB,EAA0C,OAAzBN,EAAQ2B,cAAiB,WAC7C3B,EAAQ2B,aAAaD,GACrB1B,EAAQ2B,aAEXvB,EAAAA,QAAQC,KAAK,CACZC,QAAAA,EACAC,KAAMP,EAAQ4B,WAAa,QAC3BnB,SAAUT,EAAQ6B,eAAiB,GAAA,CAAA,CAErC,CAGA,MAAMH,CAAAA,CAAAA,EAEPI,EAAAA,SAAS,IAAA,CAEJ5B,GAAyBF,EAAQoB,qBAAjClB,IACHE,EAAAA,QAAQiB,QAAQnB,MAKrB,yCAkBO,SACNC,EACAmB,EACAK,GAEA,OAAO5B,EAAU,CAChBI,eAAAA,EACAmB,eAAgBA,GAAAA,OAChBK,aAAcA,GAAAA,OACdP,mBAAAA,EAAoB,CAAA,CAEtB"}
|
|
@@ -3,7 +3,7 @@ import "rxjs/operators";
|
|
|
3
3
|
import "lit/directives/class-map.js";
|
|
4
4
|
import "lit/directives/style-map.js";
|
|
5
5
|
import { property as o, customElement as u } from "lit/decorators.js";
|
|
6
|
-
import { T as b } from "./tailwind.mixin-
|
|
6
|
+
import { T as b } from "./tailwind.mixin-DIW0B_of.js";
|
|
7
7
|
import { css as m, html as c } from "lit";
|
|
8
8
|
var y = Object.defineProperty, v = Object.getOwnPropertyDescriptor, i = (e, n, r, l) => {
|
|
9
9
|
for (var a, s = l > 1 ? void 0 : l ? v(n, r) : n, p = e.length - 1; p >= 0; p--) (a = e[p]) && (s = (l ? a(n, r, s) : a(s)) || s);
|
|
@@ -74,4 +74,4 @@ let t = class extends b(m`
|
|
|
74
74
|
}
|
|
75
75
|
};
|
|
76
76
|
i([o({ type: String })], t.prototype, "value", 2), i([o({ type: String })], t.prototype, "label", 2), i([o({ type: Boolean, reflect: !0 })], t.prototype, "selected", 2), i([o({ type: Boolean, reflect: !0 })], t.prototype, "disabled", 2), i([o({ type: String })], t.prototype, "group", 2), i([o({ type: String })], t.prototype, "icon", 2), t = i([u("schmancy-option")], t);
|
|
77
|
-
//# sourceMappingURL=option-
|
|
77
|
+
//# sourceMappingURL=option-Cs4e3CzF.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"option-
|
|
1
|
+
{"version":3,"file":"option-Cs4e3CzF.js","sources":["../src/option/option.ts"],"sourcesContent":["import { TailwindElement } from '@mixins/index'\nimport { css, html } from 'lit'\nimport { customElement, property } from 'lit/decorators.js'\nimport { fromEvent, takeUntil } from 'rxjs'\n\n/**\n * `schmancy-option` is an option element for schmancy-select and schmancy-autocomplete components.\n *\n * @fires click - When the option is clicked\n */\n@customElement('schmancy-option')\nexport default class SchmancyOption extends TailwindElement(css`\n\t:host {\n\t\tdisplay: block;\n\t\tcursor: pointer;\n\t\tuser-select: none;\n\t\toutline: none;\n\t}\n\n\t:host(:focus-visible) {\n\t\toutline: 2px solid var(--schmancy-sys-color-primary-default);\n\t\toutline-offset: -2px;\n\t}\n\n\t:host([hidden]) {\n\t\tdisplay: none;\n\t}\n\n\t:host([disabled]) {\n\t\topacity: 0.5;\n\t\tpointer-events: none;\n\t}\n`) {\n\t/**\n\t * The value of the option, will be used when selected.\n\t */\n\t@property({ type: String })\n\tvalue: string = ''\n\n\t/**\n\t * The human-readable label for the option.\n\t */\n\t@property({ type: String })\n\tlabel: string = ''\n\n\t/**\n\t * Whether the option is currently selected.\n\t */\n\t@property({ type: Boolean, reflect: true })\n\tselected: boolean = false\n\n\t/**\n\t * Whether the option is disabled.\n\t */\n\t@property({ type: Boolean, reflect: true })\n\tdisabled: boolean = false\n\n\t/**\n\t * Optional group this option belongs to (for option grouping).\n\t */\n\t@property({ type: String })\n\tgroup: string = ''\n\n\t/**\n\t * Optional icon or image to display before the label.\n\t */\n\t@property({ type: String })\n\ticon: string = ''\n\n\tconnectedCallback() {\n\t\tsuper.connectedCallback()\n\n\t\t// Ensure the option has an ID for accessibility\n\t\tif (!this.id) {\n\t\t\tthis.id = `schmancy-option-${Math.random().toString(36).substring(2, 9)}`\n\t\t}\n\n\t\t// If no label was provided, use the text content or value\n\t\tif (!this.label) {\n\t\t\tthis.label = this.textContent?.trim() || this.value\n\t\t}\n\n\t\t// If value wasn't set but there's text content, use that as the value\n\t\tif (!this.value && this.textContent) {\n\t\t\tthis.value = this.textContent.trim()\n\t\t}\n\n\t\t// Make the option clickable\n\t\tfromEvent<MouseEvent>(this, 'click')\n\t\t\t.pipe(takeUntil(this.disconnecting))\n\t\t\t.subscribe((e) => {\n\t\t\t\te.stopPropagation()\n\t\t\t\tif (this.disabled) return\n\t\t\t\t// Dispatch a custom event with this option's value\n\t\t\t\tthis.dispatchEvent(\n\t\t\t\t\tnew CustomEvent('option-select', {\n\t\t\t\t\t\tbubbles: true,\n\t\t\t\t\t\tcomposed: true,\n\t\t\t\t\t\tdetail: { value: this.value },\n\t\t\t\t\t}),\n\t\t\t\t)\n\t\t\t})\n\n\t\tfromEvent<KeyboardEvent>(this, 'keydown')\n\t\t\t.pipe(takeUntil(this.disconnecting))\n\t\t\t.subscribe((e) => {\n\t\t\t\t// Handle space and enter as clicks\n\t\t\t\tif (e.key === ' ' || e.key === 'Enter') {\n\t\t\t\t\te.preventDefault()\n\t\t\t\t\te.stopPropagation()\n\t\t\t\t\tif (this.disabled) return\n\t\t\t\t\t// Dispatch a custom event with this option's value\n\t\t\t\t\tthis.dispatchEvent(\n\t\t\t\t\t\tnew CustomEvent('option-select', {\n\t\t\t\t\t\t\tbubbles: true,\n\t\t\t\t\t\t\tcomposed: true,\n\t\t\t\t\t\t\tdetail: { value: this.value },\n\t\t\t\t\t\t}),\n\t\t\t\t\t)\n\t\t\t\t}\n\t\t\t})\n\t}\n\n\tdisconnectedCallback() {\n\t\t// Event listeners are automatically cleaned up via takeUntil(this.disconnecting)\n\t\tsuper.disconnectedCallback()\n\t}\n\n\n\trender() {\n\t\tconst classes = {\n\t\t\t'py-2': true,\n\t\t\t'px-3': true,\n\t\t\trounded: true,\n\t\t\t'text-sm': true,\n\t\t\t'w-full': true,\n\t\t\tflex: true,\n\t\t\t'items-center': true,\n\t\t\t'gap-2': true,\n\t\t\t// Selected state\n\t\t\t'bg-primary-container': this.selected,\n\t\t\t'text-primary-onContainer': this.selected,\n\t\t\t// Hover state (when not selected)\n\t\t\t'hover:bg-surface-high': !this.selected,\n\t\t\t// Focus state\n\t\t\t'focus:outline-none': true,\n\t\t}\n\n\t\treturn html`\n\t\t\t<div class=${this.classMap(classes)} role=\"option\" aria-selected=${this.selected} aria-disabled=${this.disabled}>\n\t\t\t\t${this.icon ? html`<span class=\"icon\">${this.icon}</span>` : ''}\n\t\t\t\t<span class=\"flex-1\">${this.label || this.value}</span>\n\t\t\t\t${this.selected\n\t\t\t\t\t? html`\n\t\t\t\t\t\t\t<span class=\"check\">\n\t\t\t\t\t\t\t\t<svg\n\t\t\t\t\t\t\t\t\twidth=\"16\"\n\t\t\t\t\t\t\t\t\theight=\"16\"\n\t\t\t\t\t\t\t\t\tviewBox=\"0 0 24 24\"\n\t\t\t\t\t\t\t\t\tfill=\"none\"\n\t\t\t\t\t\t\t\t\tstroke=\"currentColor\"\n\t\t\t\t\t\t\t\t\tstroke-width=\"2\"\n\t\t\t\t\t\t\t\t\tstroke-linecap=\"round\"\n\t\t\t\t\t\t\t\t\tstroke-linejoin=\"round\"\n\t\t\t\t\t\t\t\t>\n\t\t\t\t\t\t\t\t\t<polyline points=\"20 6 9 17 4 12\"></polyline>\n\t\t\t\t\t\t\t\t</svg>\n\t\t\t\t\t\t\t</span>\n\t\t\t\t\t\t`\n\t\t\t\t\t: ''}\n\t\t\t</div>\n\t\t`\n\t}\n}\n\ndeclare global {\n\tinterface HTMLElementTagNameMap {\n\t\t'schmancy-option': SchmancyOption\n\t}\n}\n"],"names":["SchmancyOption","TailwindElement","css","super","arguments","this","value","label","selected","disabled","group","icon","connectedCallback","id","Math","random","toString","substring","textContent","trim","fromEvent","pipe","takeUntil","disconnecting","subscribe","e","stopPropagation","dispatchEvent","CustomEvent","bubbles","composed","detail","key","preventDefault","disconnectedCallback","render","classes","rounded","flex","html","classMap","__decorateClass","property","type","String","prototype","Boolean","reflect","customElement"],"mappings":";;;;;;;;;;;AAWA,IAAqBA,IAArB,cAA4CC,EAAgBC;AAAAA;AAAAA;AAAAA;AAAAA;AAAAA;AAAAA;AAAAA;AAAAA;AAAAA;AAAAA;AAAAA;AAAAA;AAAAA;AAAAA;AAAAA;AAAAA;AAAAA;AAAAA;AAAAA;AAAAA;AAAAA,CAA5D,EAAA;AAAA,EAAA;AAAAC,UAAAA,GAAAC,SAAAA,GA0BCC,KAAAC,QAAgB,IAMhBD,KAAAE,QAAgB,IAMhBF,KAAAG,eAMAH,KAAAI,eAMAJ,KAAAK,QAAgB,IAMhBL,KAAAM,OAAe;AAAA,EAAA;AAAA,EAEf,oBAAAC;AACCT,UAAMS,kBAAAA,GAGDP,KAAKQ,OACTR,KAAKQ,KAAK,mBAAmBC,KAAKC,OAAAA,EAASC,SAAS,IAAIC,UAAU,GAAG,OAIjEZ,KAAKE,UACTF,KAAKE,QAAQF,KAAKa,aAAaC,KAAAA,KAAUd,KAAKC,QAAAA,CAI1CD,KAAKC,SAASD,KAAKa,gBACvBb,KAAKC,QAAQD,KAAKa,YAAYC,SAI/BC,EAAsBf,MAAM,SAC1BgB,KAAKC,EAAUjB,KAAKkB,aAAAA,CAAAA,EACpBC,UAAWC,CAAAA,MAAAA;AACXA,MAAAA,EAAEC,gBAAAA,GACErB,KAAKI,YAETJ,KAAKsB,cACJ,IAAIC,YAAY,iBAAiB,EAChCC,SAAAA,IACAC,UAAAA,IACAC,QAAQ,EAAEzB,OAAOD,KAA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CAAA,GAMAJ,EAAA,CADCC,EAAS,EAAEC,MAAMC,OAAAA,CAAAA,CAAAA,GA/BE5C,EAgCpB6C,WAAA,SAAA,CAAA,GAMAJ,EAAA,CADCC,EAAS,EAAEC,MAAMG,SAASC,SAAAA,GAAS,CAAA,CAAA,GArChB/C,EAsCpB6C,WAAA,YAAA,IAMAJ,EAAA,CADCC,EAAS,EAAEC,MAAMG,SAASC,SAAAA,GAAS,CAAA,CAAA,GA3ChB/C,EA4CpB6C,WAAA,YAAA,CAAA,GAMAJ,EAAA,CADCC,EAAS,EAAEC,MAAMC,YAjDE5C,EAkDpB6C,WAAA,SAAA,CAAA,GAMAJ,EAAA,CADCC,EAAS,EAAEC,MAAMC,OAAAA,CAAAA,CAAAA,GAvDE5C,EAwDpB6C,WAAA,QAAA,CAAA,GAxDoB7C,IAArByC,EAAA,CADCO,EAAc,iBAAA,CAAA,GACMhD,CAAAA;"}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
"use strict";const l=require("rxjs");require("rxjs/operators"),require("lit/directives/class-map.js"),require("lit/directives/style-map.js");const i=require("lit/decorators.js"),d=require("./tailwind.mixin-
|
|
1
|
+
"use strict";const l=require("rxjs");require("rxjs/operators"),require("lit/directives/class-map.js"),require("lit/directives/style-map.js");const i=require("lit/decorators.js"),d=require("./tailwind.mixin-3TPVvhYf.cjs"),a=require("lit");var u=Object.defineProperty,y=Object.getOwnPropertyDescriptor,o=(e,n,p,r)=>{for(var c,s=r>1?void 0:r?y(n,p):n,h=e.length-1;h>=0;h--)(c=e[h])&&(s=(r?c(n,p,s):c(s))||s);return r&&s&&u(n,p,s),s};let t=class extends d.TailwindElement(a.css`
|
|
2
2
|
:host {
|
|
3
3
|
display: block;
|
|
4
4
|
cursor: pointer;
|
|
@@ -41,4 +41,4 @@
|
|
|
41
41
|
`:""}
|
|
42
42
|
</div>
|
|
43
43
|
`}};o([i.property({type:String})],t.prototype,"value",2),o([i.property({type:String})],t.prototype,"label",2),o([i.property({type:Boolean,reflect:!0})],t.prototype,"selected",2),o([i.property({type:Boolean,reflect:!0})],t.prototype,"disabled",2),o([i.property({type:String})],t.prototype,"group",2),o([i.property({type:String})],t.prototype,"icon",2),t=o([i.customElement("schmancy-option")],t);
|
|
44
|
-
//# sourceMappingURL=option-
|
|
44
|
+
//# sourceMappingURL=option-Uze_q9Ef.cjs.map
|