@mhmo91/schmancy 0.2.160 → 0.2.162
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/dist/{animated-text-ButDz3vC.cjs → animated-text-CSOz5SCF.cjs} +2 -2
- package/dist/{animated-text-ButDz3vC.cjs.map → animated-text-CSOz5SCF.cjs.map} +1 -1
- package/dist/{animated-text-Be992jA_.js → animated-text-DUB2OEsp.js} +3 -3
- package/dist/{animated-text-Be992jA_.js.map → animated-text-DUB2OEsp.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-BNFH4xlv.js → area.component-BWaTpFPB.js} +6 -6
- package/dist/{area.component-BNFH4xlv.js.map → area.component-BWaTpFPB.js.map} +1 -1
- package/dist/{area.component-H7yKE0i1.cjs → area.component-kK1WKJY2.cjs} +2 -2
- package/dist/{area.component-H7yKE0i1.cjs.map → area.component-kK1WKJY2.cjs.map} +1 -1
- package/dist/area.js +1 -1
- package/dist/{autocomplete-BoqVyf_5.cjs → autocomplete-BKPUk9e5.cjs} +2 -2
- package/dist/{autocomplete-BoqVyf_5.cjs.map → autocomplete-BKPUk9e5.cjs.map} +1 -1
- package/dist/{autocomplete-Dq94h33i.js → autocomplete-Di9kiTER.js} +3 -3
- package/dist/{autocomplete-Dq94h33i.js.map → autocomplete-Di9kiTER.js.map} +1 -1
- package/dist/autocomplete.cjs +1 -1
- package/dist/autocomplete.js +1 -1
- package/dist/badge.cjs +1 -1
- package/dist/badge.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-C3oCN6-m.cjs → checkbox-CwMYYFc5.cjs} +2 -2
- package/dist/{checkbox-C3oCN6-m.cjs.map → checkbox-CwMYYFc5.cjs.map} +1 -1
- package/dist/{checkbox-D82AhpUU.js → checkbox-Dr_Nv_NO.js} +2 -2
- package/dist/{checkbox-D82AhpUU.js.map → checkbox-Dr_Nv_NO.js.map} +1 -1
- package/dist/checkbox.cjs +1 -1
- package/dist/checkbox.js +1 -1
- package/dist/{chips-C1lJe-VM.cjs → chips-CMSDxpu9.cjs} +2 -2
- package/dist/{chips-C1lJe-VM.cjs.map → chips-CMSDxpu9.cjs.map} +1 -1
- package/dist/{chips-BImfI_Cy.js → chips-Dy8t83by.js} +3 -3
- package/dist/{chips-BImfI_Cy.js.map → chips-Dy8t83by.js.map} +1 -1
- package/dist/chips.cjs +1 -1
- package/dist/chips.js +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-D_TITodq.cjs → date-range-B2cD9hQe.cjs} +2 -2
- package/dist/{date-range-D_TITodq.cjs.map → date-range-B2cD9hQe.cjs.map} +1 -1
- package/dist/{date-range-B36NwQJj.js → date-range-BSRsyfMM.js} +3 -3
- package/dist/{date-range-B36NwQJj.js.map → date-range-BSRsyfMM.js.map} +1 -1
- package/dist/date-range.cjs +1 -1
- package/dist/date-range.js +1 -1
- package/dist/{delay-u3ZtuHuD.js → delay-DN-mtGtE.js} +11 -11
- package/dist/{delay-u3ZtuHuD.js.map → delay-DN-mtGtE.js.map} +1 -1
- package/dist/{delay-BZANXguW.cjs → delay-DUjqSk9U.cjs} +2 -2
- package/dist/{delay-BZANXguW.cjs.map → delay-DUjqSk9U.cjs.map} +1 -1
- package/dist/delay.cjs +1 -1
- package/dist/delay.js +1 -1
- package/dist/{divider-4xKbeJOK.js → divider-CwrrRepk.js} +3 -3
- package/dist/{divider-4xKbeJOK.js.map → divider-CwrrRepk.js.map} +1 -1
- package/dist/{divider-BGh7WiTm.cjs → divider-D-3b8xBH.cjs} +2 -2
- package/dist/{divider-BGh7WiTm.cjs.map → divider-D-3b8xBH.cjs.map} +1 -1
- package/dist/divider.cjs +1 -1
- package/dist/divider.js +1 -1
- package/dist/extra.cjs +1 -1
- package/dist/extra.js +1 -1
- package/dist/flex-BJPUKHgq.cjs +41 -0
- package/dist/flex-BJPUKHgq.cjs.map +1 -0
- package/dist/flex-D4HMvbL2.js +238 -0
- package/dist/flex-D4HMvbL2.js.map +1 -0
- package/dist/{form-DwRU18it.cjs → form-CPm25cLE.cjs} +2 -2
- package/dist/{form-DwRU18it.cjs.map → form-CPm25cLE.cjs.map} +1 -1
- package/dist/{form-DEWs5VTx.js → form-D-CN4Npb.js} +2 -2
- package/dist/{form-DEWs5VTx.js.map → form-D-CN4Npb.js.map} +1 -1
- package/dist/form.cjs +1 -1
- package/dist/form.js +1 -1
- package/dist/{icon-Bpgf3d2W.cjs → icon-DUTbI5sF.cjs} +2 -2
- package/dist/{icon-Bpgf3d2W.cjs.map → icon-DUTbI5sF.cjs.map} +1 -1
- package/dist/{icon-D8bGIsnU.js → icon-baMFKlix.js} +3 -3
- package/dist/{icon-D8bGIsnU.js.map → icon-baMFKlix.js.map} +1 -1
- package/dist/{icon-button-BShbUJzz.js → icon-button-Dytz2u7f.js} +3 -3
- package/dist/{icon-button-BShbUJzz.js.map → icon-button-Dytz2u7f.js.map} +1 -1
- package/dist/{icon-button-Rmv2a0U5.cjs → icon-button-M79Lwelv.cjs} +2 -2
- package/dist/{icon-button-Rmv2a0U5.cjs.map → icon-button-M79Lwelv.cjs.map} +1 -1
- package/dist/icons.cjs +1 -1
- package/dist/icons.js +1 -1
- package/dist/index.cjs +1 -1
- package/dist/index.js +119 -121
- package/dist/index.js.map +1 -1
- package/dist/{input-CAJ-MBq7.cjs → input-C2wFU_S6.cjs} +2 -2
- package/dist/{input-CAJ-MBq7.cjs.map → input-C2wFU_S6.cjs.map} +1 -1
- package/dist/{input-D211jB9f.js → input-D390Osy4.js} +2 -2
- package/dist/{input-D211jB9f.js.map → input-D390Osy4.js.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-DMXqpSCh.js → list-BJFvg0LF.js} +2 -2
- package/dist/{list-DMXqpSCh.js.map → list-BJFvg0LF.js.map} +1 -1
- package/dist/{list-CwdYlei9.cjs → list-Bn-B6Pbl.cjs} +2 -2
- package/dist/{list-CwdYlei9.cjs.map → list-Bn-B6Pbl.cjs.map} +1 -1
- package/dist/list.cjs +1 -1
- package/dist/list.js +1 -1
- package/dist/{litElement.mixin-B1zxT55T.js → litElement.mixin-CRbxrdrS.js} +2 -2
- package/dist/{litElement.mixin-B1zxT55T.js.map → litElement.mixin-CRbxrdrS.js.map} +1 -1
- package/dist/{litElement.mixin-Bl5r_3iS.cjs → litElement.mixin-CwAqMl79.cjs} +2 -2
- package/dist/{litElement.mixin-Bl5r_3iS.cjs.map → litElement.mixin-CwAqMl79.cjs.map} +1 -1
- package/dist/{menu-phn2-8UA.js → menu-5krKi7zq.js} +3 -3
- package/dist/{menu-phn2-8UA.js.map → menu-5krKi7zq.js.map} +1 -1
- package/dist/{menu-CBin71yi.cjs → menu-D6SHzgaV.cjs} +2 -2
- package/dist/{menu-CBin71yi.cjs.map → menu-D6SHzgaV.cjs.map} +1 -1
- package/dist/menu.cjs +1 -1
- package/dist/menu.js +1 -1
- package/dist/nav-drawer.cjs +1 -1
- package/dist/nav-drawer.js +1 -1
- package/dist/{notification-container-CRjLSf2l.cjs → notification-service-BFfFPd1Q.cjs} +19 -19
- package/dist/notification-service-BFfFPd1Q.cjs.map +1 -0
- package/dist/{notification-container-C5o2dqpe.js → notification-service-DA3l75i3.js} +127 -94
- package/dist/notification-service-DA3l75i3.js.map +1 -0
- package/dist/notification.cjs +1 -1
- package/dist/notification.js +5 -7
- package/dist/notification.js.map +1 -1
- package/dist/{option-CAZq8vIE.js → option-BAMNOMye.js} +2 -2
- package/dist/{option-CAZq8vIE.js.map → option-BAMNOMye.js.map} +1 -1
- package/dist/{option-DO30M5mj.cjs → option-DBh0pEws.cjs} +2 -2
- package/dist/{option-DO30M5mj.cjs.map → option-DBh0pEws.cjs.map} +1 -1
- package/dist/option.cjs +1 -1
- package/dist/option.js +1 -1
- package/dist/{payment-card-form-CFYt0jpm.js → payment-card-form-CNWsIJhu.js} +3 -3
- package/dist/{payment-card-form-CFYt0jpm.js.map → payment-card-form-CNWsIJhu.js.map} +1 -1
- package/dist/{payment-card-form-C0ib712J.cjs → payment-card-form-CklVDo7L.cjs} +2 -2
- package/dist/{payment-card-form-C0ib712J.cjs.map → payment-card-form-CklVDo7L.cjs.map} +1 -1
- package/dist/{radio-group-Xgv957h3.cjs → radio-group-8d4MJqaa.cjs} +2 -2
- package/dist/{radio-group-Xgv957h3.cjs.map → radio-group-8d4MJqaa.cjs.map} +1 -1
- package/dist/{radio-group-yCmH2g1m.js → radio-group-CRXQ4ajE.js} +2 -2
- package/dist/{radio-group-yCmH2g1m.js.map → radio-group-CRXQ4ajE.js.map} +1 -1
- package/dist/radio-group.cjs +1 -1
- package/dist/radio-group.js +1 -1
- package/dist/rxjs-utils.js +4 -4
- package/dist/{schmancy-steps-container-DozeItXT.js → schmancy-steps-container-DzeJED2U.js} +2 -2
- package/dist/{schmancy-steps-container-DozeItXT.js.map → schmancy-steps-container-DzeJED2U.js.map} +1 -1
- package/dist/{schmancy-steps-container-BUUNK6-a.cjs → schmancy-steps-container-KinQK3rz.cjs} +2 -2
- package/dist/{schmancy-steps-container-BUUNK6-a.cjs.map → schmancy-steps-container-KinQK3rz.cjs.map} +1 -1
- package/dist/{select-hrpNF0ay.cjs → select-DlblA74_.cjs} +2 -2
- package/dist/{select-hrpNF0ay.cjs.map → select-DlblA74_.cjs.map} +1 -1
- package/dist/{select-D1GqH9az.js → select-dxNE4mnd.js} +3 -3
- package/dist/{select-D1GqH9az.js.map → select-dxNE4mnd.js.map} +1 -1
- package/dist/select.cjs +1 -1
- package/dist/select.js +1 -1
- package/dist/selector-hook-omsuyAOu.js.map +1 -1
- package/dist/{sheet-BheMSUgv.js → sheet-BmIoE7Ej.js} +12 -12
- package/dist/{sheet-BheMSUgv.js.map → sheet-BmIoE7Ej.js.map} +1 -1
- package/dist/{sheet-j8iBPQ6T.cjs → sheet-D2sUghqi.cjs} +2 -2
- package/dist/{sheet-j8iBPQ6T.cjs.map → sheet-D2sUghqi.cjs.map} +1 -1
- package/dist/sheet.cjs +1 -1
- package/dist/sheet.js +1 -1
- package/dist/{slider-5_06CQZJ.js → slider-DCysIErg.js} +3 -3
- package/dist/{slider-5_06CQZJ.js.map → slider-DCysIErg.js.map} +1 -1
- package/dist/{slider-Dk2AGCrw.cjs → slider-VShAooYp.cjs} +2 -2
- package/dist/{slider-Dk2AGCrw.cjs.map → slider-VShAooYp.cjs.map} +1 -1
- package/dist/slider.cjs +1 -1
- package/dist/slider.js +1 -1
- package/dist/{spinner-CmaRhtzu.cjs → spinner-Dv-uGeoR.cjs} +2 -2
- package/dist/{spinner-CmaRhtzu.cjs.map → spinner-Dv-uGeoR.cjs.map} +1 -1
- package/dist/{spinner-DQPVv48S.js → spinner-UC31R_xS.js} +3 -3
- package/dist/{spinner-DQPVv48S.js.map → spinner-UC31R_xS.js.map} +1 -1
- package/dist/steps.cjs +1 -1
- package/dist/steps.js +1 -1
- package/dist/{surface-D5Jqe0bf.js → surface-B3v9NfAj.js} +2 -2
- package/dist/{surface-D5Jqe0bf.js.map → surface-B3v9NfAj.js.map} +1 -1
- package/dist/{surface-DAkIsvJB.cjs → surface-ClnnQP3o.cjs} +2 -2
- package/dist/{surface-DAkIsvJB.cjs.map → surface-ClnnQP3o.cjs.map} +1 -1
- package/dist/surface.cjs +1 -1
- package/dist/surface.js +1 -1
- package/dist/{table-CdsT8VSZ.js → table-BZ4h621V.js} +2 -2
- package/dist/{table-CdsT8VSZ.js.map → table-BZ4h621V.js.map} +1 -1
- package/dist/{table-CljxYE7x.cjs → table-CWDtSTrW.cjs} +2 -2
- package/dist/{table-CljxYE7x.cjs.map → table-CWDtSTrW.cjs.map} +1 -1
- package/dist/table.cjs +1 -1
- package/dist/table.js +1 -1
- package/dist/{tabs-group-DLwYQyDv.cjs → tabs-group-Bb4uOpJc.cjs} +2 -2
- package/dist/{tabs-group-DLwYQyDv.cjs.map → tabs-group-Bb4uOpJc.cjs.map} +1 -1
- package/dist/{tabs-group-BmHljUlz.js → tabs-group-WJjM75TT.js} +2 -2
- package/dist/{tabs-group-BmHljUlz.js.map → tabs-group-WJjM75TT.js.map} +1 -1
- package/dist/tabs.cjs +1 -1
- package/dist/tabs.js +1 -1
- package/dist/tailwind.mixin-B_hJc1PP.js +43 -0
- package/dist/{tailwind.mixin-Q2P-9IKt.js.map → tailwind.mixin-B_hJc1PP.js.map} +1 -1
- package/dist/tailwind.mixin-DLuYz9Iz.cjs +2 -0
- package/dist/{tailwind.mixin-CryL2ZOy.cjs.map → tailwind.mixin-DLuYz9Iz.cjs.map} +1 -1
- package/dist/teleport.cjs +1 -1
- package/dist/{teleport.component-CnH7tw9d.cjs → teleport.component-CNVTORt3.cjs} +2 -2
- package/dist/{teleport.component-CnH7tw9d.cjs.map → teleport.component-CNVTORt3.cjs.map} +1 -1
- package/dist/{teleport.component-CX0EcZsB.js → teleport.component-DSs12GIK.js} +38 -38
- package/dist/{teleport.component-CX0EcZsB.js.map → teleport.component-DSs12GIK.js.map} +1 -1
- package/dist/teleport.js +1 -1
- package/dist/{textarea-BFtirUYQ.cjs → textarea-B3_G9W-u.cjs} +2 -2
- package/dist/{textarea-BFtirUYQ.cjs.map → textarea-B3_G9W-u.cjs.map} +1 -1
- package/dist/{textarea-C-ZczaeA.js → textarea-B5V4jvIX.js} +2 -2
- package/dist/{textarea-C-ZczaeA.js.map → textarea-B5V4jvIX.js.map} +1 -1
- package/dist/textarea.cjs +1 -1
- package/dist/textarea.js +1 -1
- package/dist/{theme-button-Co1FWQZy.cjs → theme-button-C6pyxtwQ.cjs} +2 -2
- package/dist/{theme-button-Co1FWQZy.cjs.map → theme-button-C6pyxtwQ.cjs.map} +1 -1
- package/dist/{theme-button-DkSJ3DGG.js → theme-button-D-ojrnYh.js} +2 -2
- package/dist/{theme-button-DkSJ3DGG.js.map → theme-button-D-ojrnYh.js.map} +1 -1
- package/dist/theme-button.cjs +1 -1
- package/dist/theme-button.js +1 -1
- package/dist/theme.cjs +1 -1
- package/dist/{theme.component-DPvN4am3.js → theme.component-B6Hvc574.js} +2 -2
- package/dist/{theme.component-DPvN4am3.js.map → theme.component-B6Hvc574.js.map} +1 -1
- package/dist/{theme.component-kt0rSKAw.cjs → theme.component-DR4uOck9.cjs} +2 -2
- package/dist/{theme.component-kt0rSKAw.cjs.map → theme.component-DR4uOck9.cjs.map} +1 -1
- package/dist/theme.js +1 -1
- package/dist/{timezone-CoXF6uCH.js → timezone-CyDIsW4A.js} +3 -3
- package/dist/{timezone-CoXF6uCH.js.map → timezone-CyDIsW4A.js.map} +1 -1
- package/dist/{timezone-BAw4bWdz.cjs → timezone-vGpDPCRT.cjs} +2 -2
- package/dist/{timezone-BAw4bWdz.cjs.map → timezone-vGpDPCRT.cjs.map} +1 -1
- package/dist/{tooltip-FWNQFOV4.cjs → tooltip-BJ_lQc8I.cjs} +2 -2
- package/dist/{tooltip-FWNQFOV4.cjs.map → tooltip-BJ_lQc8I.cjs.map} +1 -1
- package/dist/{tooltip-Dl2N0nLg.js → tooltip-Ck-JUG_m.js} +2 -2
- package/dist/{tooltip-Dl2N0nLg.js.map → tooltip-Ck-JUG_m.js.map} +1 -1
- package/dist/tooltip.cjs +1 -1
- package/dist/tooltip.js +1 -1
- package/dist/{tree-DNotOnkS.js → tree-BE0sci4r.js} +2 -2
- package/dist/{tree-DNotOnkS.js.map → tree-BE0sci4r.js.map} +1 -1
- package/dist/{tree-DE0EGUP8.cjs → tree-plC4VSNF.cjs} +2 -2
- package/dist/{tree-DE0EGUP8.cjs.map → tree-plC4VSNF.cjs.map} +1 -1
- package/dist/tree.cjs +1 -1
- package/dist/tree.js +1 -1
- package/dist/{typewriter--Sc6E-hJ.js → typewriter-CFULjoNm.js} +11 -11
- package/dist/{typewriter--Sc6E-hJ.js.map → typewriter-CFULjoNm.js.map} +1 -1
- package/dist/{typewriter-DxMBpsNX.cjs → typewriter-CwrZhpWq.cjs} +2 -2
- package/dist/{typewriter-DxMBpsNX.cjs.map → typewriter-CwrZhpWq.cjs.map} +1 -1
- package/dist/typewriter.cjs +1 -1
- package/dist/typewriter.js +1 -1
- package/dist/{typography-CXGW5mh2.js → typography-BB5uUnkZ.js} +2 -2
- package/dist/{typography-CXGW5mh2.js.map → typography-BB5uUnkZ.js.map} +1 -1
- package/dist/{typography-CbJoawFE.cjs → typography-CRoZbt0O.cjs} +2 -2
- package/dist/{typography-CbJoawFE.cjs.map → typography-CRoZbt0O.cjs.map} +1 -1
- package/dist/typography.cjs +1 -1
- package/dist/typography.js +1 -1
- package/package.json +1 -1
- package/types/src/layout/scroll/scroll.d.ts +36 -1
- package/types/src/notification/index.d.ts +1 -1
- package/types/src/notification/notification-service.d.ts +20 -0
- package/dist/flex-5tU3sgUP.js +0 -232
- package/dist/flex-5tU3sgUP.js.map +0 -1
- package/dist/flex-M_YoqXnB.cjs +0 -41
- package/dist/flex-M_YoqXnB.cjs.map +0 -1
- package/dist/notification-container-C5o2dqpe.js.map +0 -1
- package/dist/notification-container-CRjLSf2l.cjs.map +0 -1
- package/dist/notification-service-DWeUoHi2.js +0 -29
- package/dist/notification-service-DWeUoHi2.js.map +0 -1
- package/dist/notification-service-DXXrRCmK.cjs +0 -2
- package/dist/notification-service-DXXrRCmK.cjs.map +0 -1
- package/dist/tailwind.mixin-CryL2ZOy.cjs +0 -2
- package/dist/tailwind.mixin-Q2P-9IKt.js +0 -43
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"menu-
|
|
1
|
+
{"version":3,"file":"menu-5krKi7zq.js","sources":["../src/menu/menu-item.ts","../src/menu/menu.ts"],"sourcesContent":["import { $LitElement } from '@mixins/index'\nimport { css, html } from 'lit'\nimport { customElement } from 'lit/decorators.js'\nimport { fromEvent, takeUntil } from 'rxjs'\n\n@customElement('schmancy-menu-item')\nexport default class SchmancyMenuItem extends $LitElement(css`\n\t:host {\n\t\tdisplay: block;\n\t}\n`) {\n\tconnectedCallback(): void {\n\t\tsuper.connectedCallback()\n\t\tfromEvent(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\tthis.dispatchEvent(\n\t\t\t\t\tnew CustomEvent('schmancy-menu-item-click', {\n\t\t\t\t\t\tbubbles: true,\n\t\t\t\t\t\tcomposed: true,\n\t\t\t\t\t}),\n\t\t\t\t)\n\t\t\t})\n\t}\n\tprotected render(): unknown {\n\t\treturn html`\n\t\t\t<schmancy-list-item>\n\t\t\t\t<slot></slot>\n\t\t\t</schmancy-list-item>\n\t\t`\n\t}\n}\n\ndeclare global {\n\tinterface HTMLElementTagNameMap {\n\t\t'schmancy-menu-item': SchmancyMenuItem\n\t}\n}\n","import { autoUpdate, computePosition, flip, offset, shift, size } from '@floating-ui/dom'\nimport { TailwindElement } from '@mixins/index'\nimport { css, html } from 'lit'\nimport { customElement, query, queryAssignedElements } from 'lit/decorators.js'\nimport { filter, fromEvent, takeUntil, tap } from 'rxjs'\n\n@customElement('schmancy-menu')\nexport default class SchmancyMenu extends TailwindElement(css`\n\t:host {\n\t\tposition: relative;\n\t\tdisplay: inline-block;\n\t}\n\n\t#menu {\n\t\tdisplay: none;\n\t}\n\n\t#menu[data-show='true'] {\n\t\tdisplay: block;\n\t}\n`) {\n\t@queryAssignedElements({ flatten: true, slot: 'button' })\n\tbuttonElement!: Array<HTMLElement>\n\n\t@query('#menu') menuElement!: HTMLElement\n\n\tprivate cleanup?: any\n\n\tprivate getMiddleware() {\n\t\treturn [\n\t\t\toffset(5),\n\t\t\tflip(),\n\t\t\tshift({ padding: 5 }),\n\t\t\tsize({\n\t\t\t\tapply({ availableHeight, elements }) {\n\t\t\t\t\telements.floating.style.maxHeight = `${availableHeight}px`\n\t\t\t\t},\n\t\t\t}),\n\t\t]\n\t}\n\n\tasync updatePosition() {\n\t\tif (!this.buttonElement[0] || !this.menuElement) {\n\t\t\treturn\n\t\t}\n\n\t\tawait computePosition(this.buttonElement[0], this.menuElement, {\n\t\t\tplacement: 'bottom-start',\n\t\t\tmiddleware: this.getMiddleware(),\n\t\t}).then(({ x, y }) => {\n\t\t\tObject.assign(this.menuElement.style, {\n\t\t\t\tleft: `${x}px`,\n\t\t\t\ttop: `${y}px`,\n\t\t\t})\n\t\t})\n\t}\n\n\tprivate showMenu() {\n\t\tif (!this.buttonElement[0] || !this.menuElement) return\n\n\t\tthis.menuElement.dataset.show = 'true'\n\n\t\tthis.cleanup = autoUpdate(this.buttonElement[0], this.menuElement, () => {\n\t\t\tcomputePosition(this.buttonElement[0], this.menuElement, {\n\t\t\t\tplacement: 'bottom-start',\n\t\t\t\tmiddleware: this.getMiddleware(),\n\t\t\t}).then(({ x, y, strategy }) => {\n\t\t\t\tObject.assign(this.menuElement.style, {\n\t\t\t\t\tleft: `${x}px`,\n\t\t\t\t\ttop: `${y}px`,\n\t\t\t\t\tposition: strategy,\n\t\t\t\t})\n\t\t\t})\n\t\t})\n\n\t\tconst animation = this.menuElement.animate(\n\t\t\t[\n\t\t\t\t{ opacity: 0, transform: 'scale(0.95)' },\n\t\t\t\t{ opacity: 1, transform: 'scale(1)' },\n\t\t\t],\n\t\t\t{\n\t\t\t\tduration: 100,\n\t\t\t\teasing: 'cubic-bezier(0.55, 0.085, 0.68, 0.53)',\n\t\t\t},\n\t\t)\n\n\t\tanimation.onfinish = () => {}\n\t}\n\n\tprivate async hideMenu() {\n\t\t// Make hideMenu async\n\t\tif (this.cleanup) {\n\t\t\tawait this.cleanup() // Await the cleanup!\n\t\t\tthis.cleanup = undefined\n\t\t}\n\t\tthis.menuElement.dataset.show = 'false'\n\n\t\tconst animation = this.menuElement.animate(\n\t\t\t[\n\t\t\t\t{ opacity: 1, transform: 'scale(1)' },\n\t\t\t\t{ opacity: 0, transform: 'scale(0.95)' },\n\t\t\t],\n\t\t\t{\n\t\t\t\tduration: 75,\n\t\t\t\teasing: 'cubic-bezier(0.55, 0.085, 0.68, 0.53)',\n\t\t\t},\n\t\t)\n\t\tanimation.onfinish = () => {} // No need for a promise now\n\t}\n\n\tfirstUpdated(): void {\n\t\tfromEvent(this.buttonElement, 'click')\n\t\t\t.pipe(\n\t\t\t\ttap(e => e.stopPropagation()),\n\t\t\t\ttakeUntil(this.disconnecting),\n\t\t\t)\n\t\t\t.subscribe(() => {\n\t\t\t\tthis.showMenu()\n\t\t\t})\n\n\t\tfromEvent(this, 'schmancy-menu-item-click')\n\t\t\t.pipe(\n\t\t\t\ttap(e => e.stopPropagation()),\n\t\t\t\ttakeUntil(this.disconnecting),\n\t\t\t)\n\t\t\t.subscribe(() => {\n\t\t\t\tthis.hideMenu()\n\t\t\t})\n\n\t\tfromEvent(document, 'click')\n\t\t\t.pipe(\n\t\t\t\tfilter((e: Event) => !this.contains(e.target as Node)),\n\t\t\t\ttakeUntil(this.disconnecting),\n\t\t\t\ttap(() => {\n\t\t\t\t\tif (this.menuElement.dataset.show === 'true') {\n\t\t\t\t\t\tthis.hideMenu()\n\t\t\t\t\t}\n\t\t\t\t}),\n\t\t\t)\n\t\t\t.subscribe()\n\t}\n\n\trender() {\n\t\treturn html`\n\t\t\t<slot name=\"button\">\n\t\t\t\t<schmancy-icon-button> more_vert </schmancy-icon-button>\n\t\t\t</slot>\n\t\t\t<ul\n\t\t\t\tid=\"menu\"\n\t\t\t\tclass=\"absolute z-50 border-outlineVariant rounded-md min-w-[160px] max-w-[320px] w-max bg-surface-default max-h-[90vh] shadow-1 overflow-y-auto\"\n\t\t\t\trole=\"menu\"\n\t\t\t\taria-orientation=\"vertical\"\n\t\t\t\taria-labelledby=\"options-menu-4-button\"\n\t\t\t>\n\t\t\t\t<slot></slot>\n\t\t\t</ul>\n\t\t`\n\t}\n}\n\ndeclare global {\n\tinterface HTMLElementTagNameMap {\n\t\t'schmancy-menu': SchmancyMenu\n\t}\n}\n"],"names":["SchmancyMenuItem","$LitElement","css","super","connectedCallback","fromEvent","this","pipe","takeUntil","disconnecting","subscribe","e","stopPropagation","dispatchEvent","CustomEvent","bubbles","composed","render","html","customElement","SchmancyMenu","TailwindElement","getMiddleware","offset","flip","shift","padding","size","availableHeight","elements","floating","style","maxHeight","updatePosition","buttonElement","menuElement","computePosition","placement","middleware","then","x","y","Object","assign","left","top","dataset","show","cleanup","autoUpdate","strategy","position","animate","opacity","transform","duration","easing","onfinish","firstUpdated","tap","showMenu","hideMenu","document","filter","contains","target","__decorateClass","queryAssignedElements","flatten","slot","prototype","query"],"mappings":";;;;;;;;;AAMA,IAAqBA,IAArB,cAA8CC,EAAYC;AAAAA;AAAAA;AAAAA;AAAAA,CAKzD,EAAA;AAAA,EAAA,oBACCC;AAAAA,UAAMC,kBACIC,GAAAA,EAAAC,MAAM,OAAA,EACdC,KAAKC,EAAUF,KAAKG,aAAAA,CAAAA,EACpBC,UAAeC,OAAAA;AACfA,QAAEC,gBAAAA,GACGN,KAAAO,cACJ,IAAIC,YAAY,4BAA4B,EAC3CC,SAAS,IACTC,UAAU,GAAA,CAAA,CAAA;AAAA,IAEZ,CACA;AAAA,EAAA;AAAA,EAEO,SAAAC;AACF,WAAAC;AAAAA;AAAAA;AAAAA;AAAAA;AAAAA,EAAA;AApBYlB;AAAAA;;;GAArB,CADCmB,EAAc,wBACMnB;;;;;ACCrB,IAAqBoB,IAArB,cAA0CC,EAAgBnB;AAAAA;AAAAA;AAAAA;AAAAA;AAAAA;AAAAA;AAAAA;AAAAA;AAAAA;AAAAA;AAAAA;AAAAA;AAAAA;EAqBjD,gBAAAoB;AACA,WAAA,CACNC,EAAO,CAAA,GACPC,EACAC,GAAAA,EAAM,EAAEC,SAAS,EACjBC,CAAAA,GAAAA,EAAK,EACJ,QAAMC,iBAAEA,GAAiBC,UAAAA,EAAAA,GAAAA;AACxBA,MAAAA,EAASC,SAASC,MAAMC,YAAY,GAAGJ,CAAAA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AA,iBAAA,CAAA,GAEgBJ,EAAA,CAAfK,EAAM,OAjBanD,CAAAA,GAAAA,EAiBJkD,WAAA,eAAA,IAjBIlD,IAArB8C,EAAA,CADC/C,EAAc,eACMC,CAAAA,GAAAA,CAAAA;"}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
"use strict";const i=require("rxjs");require("lit/directives/class-map.js"),require("lit/directives/style-map.js");const d=require("./litElement.mixin-
|
|
1
|
+
"use strict";const i=require("rxjs");require("lit/directives/class-map.js"),require("lit/directives/style-map.js");const d=require("./litElement.mixin-CwAqMl79.cjs"),b=require("./tailwind.mixin-DLuYz9Iz.cjs"),u=require("lit"),c=require("lit/decorators.js"),l=require("@floating-ui/dom");var y=Object.getOwnPropertyDescriptor;let p=class extends d.$LitElement(u.css`
|
|
2
2
|
:host {
|
|
3
3
|
display: block;
|
|
4
4
|
}
|
|
@@ -33,4 +33,4 @@
|
|
|
33
33
|
<slot></slot>
|
|
34
34
|
</ul>
|
|
35
35
|
`}};h([c.queryAssignedElements({flatten:!0,slot:"button"})],m.prototype,"buttonElement",2),h([c.query("#menu")],m.prototype,"menuElement",2),m=h([c.customElement("schmancy-menu")],m);
|
|
36
|
-
//# sourceMappingURL=menu-
|
|
36
|
+
//# sourceMappingURL=menu-D6SHzgaV.cjs.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"menu-
|
|
1
|
+
{"version":3,"file":"menu-D6SHzgaV.cjs","sources":["../src/menu/menu-item.ts","../src/menu/menu.ts"],"sourcesContent":["import { $LitElement } from '@mixins/index'\nimport { css, html } from 'lit'\nimport { customElement } from 'lit/decorators.js'\nimport { fromEvent, takeUntil } from 'rxjs'\n\n@customElement('schmancy-menu-item')\nexport default class SchmancyMenuItem extends $LitElement(css`\n\t:host {\n\t\tdisplay: block;\n\t}\n`) {\n\tconnectedCallback(): void {\n\t\tsuper.connectedCallback()\n\t\tfromEvent(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\tthis.dispatchEvent(\n\t\t\t\t\tnew CustomEvent('schmancy-menu-item-click', {\n\t\t\t\t\t\tbubbles: true,\n\t\t\t\t\t\tcomposed: true,\n\t\t\t\t\t}),\n\t\t\t\t)\n\t\t\t})\n\t}\n\tprotected render(): unknown {\n\t\treturn html`\n\t\t\t<schmancy-list-item>\n\t\t\t\t<slot></slot>\n\t\t\t</schmancy-list-item>\n\t\t`\n\t}\n}\n\ndeclare global {\n\tinterface HTMLElementTagNameMap {\n\t\t'schmancy-menu-item': SchmancyMenuItem\n\t}\n}\n","import { autoUpdate, computePosition, flip, offset, shift, size } from '@floating-ui/dom'\nimport { TailwindElement } from '@mixins/index'\nimport { css, html } from 'lit'\nimport { customElement, query, queryAssignedElements } from 'lit/decorators.js'\nimport { filter, fromEvent, takeUntil, tap } from 'rxjs'\n\n@customElement('schmancy-menu')\nexport default class SchmancyMenu extends TailwindElement(css`\n\t:host {\n\t\tposition: relative;\n\t\tdisplay: inline-block;\n\t}\n\n\t#menu {\n\t\tdisplay: none;\n\t}\n\n\t#menu[data-show='true'] {\n\t\tdisplay: block;\n\t}\n`) {\n\t@queryAssignedElements({ flatten: true, slot: 'button' })\n\tbuttonElement!: Array<HTMLElement>\n\n\t@query('#menu') menuElement!: HTMLElement\n\n\tprivate cleanup?: any\n\n\tprivate getMiddleware() {\n\t\treturn [\n\t\t\toffset(5),\n\t\t\tflip(),\n\t\t\tshift({ padding: 5 }),\n\t\t\tsize({\n\t\t\t\tapply({ availableHeight, elements }) {\n\t\t\t\t\telements.floating.style.maxHeight = `${availableHeight}px`\n\t\t\t\t},\n\t\t\t}),\n\t\t]\n\t}\n\n\tasync updatePosition() {\n\t\tif (!this.buttonElement[0] || !this.menuElement) {\n\t\t\treturn\n\t\t}\n\n\t\tawait computePosition(this.buttonElement[0], this.menuElement, {\n\t\t\tplacement: 'bottom-start',\n\t\t\tmiddleware: this.getMiddleware(),\n\t\t}).then(({ x, y }) => {\n\t\t\tObject.assign(this.menuElement.style, {\n\t\t\t\tleft: `${x}px`,\n\t\t\t\ttop: `${y}px`,\n\t\t\t})\n\t\t})\n\t}\n\n\tprivate showMenu() {\n\t\tif (!this.buttonElement[0] || !this.menuElement) return\n\n\t\tthis.menuElement.dataset.show = 'true'\n\n\t\tthis.cleanup = autoUpdate(this.buttonElement[0], this.menuElement, () => {\n\t\t\tcomputePosition(this.buttonElement[0], this.menuElement, {\n\t\t\t\tplacement: 'bottom-start',\n\t\t\t\tmiddleware: this.getMiddleware(),\n\t\t\t}).then(({ x, y, strategy }) => {\n\t\t\t\tObject.assign(this.menuElement.style, {\n\t\t\t\t\tleft: `${x}px`,\n\t\t\t\t\ttop: `${y}px`,\n\t\t\t\t\tposition: strategy,\n\t\t\t\t})\n\t\t\t})\n\t\t})\n\n\t\tconst animation = this.menuElement.animate(\n\t\t\t[\n\t\t\t\t{ opacity: 0, transform: 'scale(0.95)' },\n\t\t\t\t{ opacity: 1, transform: 'scale(1)' },\n\t\t\t],\n\t\t\t{\n\t\t\t\tduration: 100,\n\t\t\t\teasing: 'cubic-bezier(0.55, 0.085, 0.68, 0.53)',\n\t\t\t},\n\t\t)\n\n\t\tanimation.onfinish = () => {}\n\t}\n\n\tprivate async hideMenu() {\n\t\t// Make hideMenu async\n\t\tif (this.cleanup) {\n\t\t\tawait this.cleanup() // Await the cleanup!\n\t\t\tthis.cleanup = undefined\n\t\t}\n\t\tthis.menuElement.dataset.show = 'false'\n\n\t\tconst animation = this.menuElement.animate(\n\t\t\t[\n\t\t\t\t{ opacity: 1, transform: 'scale(1)' },\n\t\t\t\t{ opacity: 0, transform: 'scale(0.95)' },\n\t\t\t],\n\t\t\t{\n\t\t\t\tduration: 75,\n\t\t\t\teasing: 'cubic-bezier(0.55, 0.085, 0.68, 0.53)',\n\t\t\t},\n\t\t)\n\t\tanimation.onfinish = () => {} // No need for a promise now\n\t}\n\n\tfirstUpdated(): void {\n\t\tfromEvent(this.buttonElement, 'click')\n\t\t\t.pipe(\n\t\t\t\ttap(e => e.stopPropagation()),\n\t\t\t\ttakeUntil(this.disconnecting),\n\t\t\t)\n\t\t\t.subscribe(() => {\n\t\t\t\tthis.showMenu()\n\t\t\t})\n\n\t\tfromEvent(this, 'schmancy-menu-item-click')\n\t\t\t.pipe(\n\t\t\t\ttap(e => e.stopPropagation()),\n\t\t\t\ttakeUntil(this.disconnecting),\n\t\t\t)\n\t\t\t.subscribe(() => {\n\t\t\t\tthis.hideMenu()\n\t\t\t})\n\n\t\tfromEvent(document, 'click')\n\t\t\t.pipe(\n\t\t\t\tfilter((e: Event) => !this.contains(e.target as Node)),\n\t\t\t\ttakeUntil(this.disconnecting),\n\t\t\t\ttap(() => {\n\t\t\t\t\tif (this.menuElement.dataset.show === 'true') {\n\t\t\t\t\t\tthis.hideMenu()\n\t\t\t\t\t}\n\t\t\t\t}),\n\t\t\t)\n\t\t\t.subscribe()\n\t}\n\n\trender() {\n\t\treturn html`\n\t\t\t<slot name=\"button\">\n\t\t\t\t<schmancy-icon-button> more_vert </schmancy-icon-button>\n\t\t\t</slot>\n\t\t\t<ul\n\t\t\t\tid=\"menu\"\n\t\t\t\tclass=\"absolute z-50 border-outlineVariant rounded-md min-w-[160px] max-w-[320px] w-max bg-surface-default max-h-[90vh] shadow-1 overflow-y-auto\"\n\t\t\t\trole=\"menu\"\n\t\t\t\taria-orientation=\"vertical\"\n\t\t\t\taria-labelledby=\"options-menu-4-button\"\n\t\t\t>\n\t\t\t\t<slot></slot>\n\t\t\t</ul>\n\t\t`\n\t}\n}\n\ndeclare global {\n\tinterface HTMLElementTagNameMap {\n\t\t'schmancy-menu': SchmancyMenu\n\t}\n}\n"],"names":["SchmancyMenuItem","$LitElement","css","super","connectedCallback","fromEvent","this","pipe","takeUntil","disconnecting","subscribe","e","stopPropagation","dispatchEvent","CustomEvent","bubbles","composed","html","customElement","SchmancyMenu","TailwindElement","offset","flip","shift","padding","size","apply","availableHeight","elements","floating","style","maxHeight","updatePosition","buttonElement","menuElement","computePosition","placement","middleware","getMiddleware","then","x","y","Object","assign","left","top","dataset","show","cleanup","autoUpdate","strategy","position","animate","opacity","transform","duration","easing","onfinish","tap","showMenu","hideMenu","document","filter","contains","target","__decorateClass","queryAssignedElements","flatten","slot","prototype","query"],"mappings":"qUAMA,IAAqBA,EAArB,cAA8CC,EAAAA,YAAYC,EAAAA;AAAAA;AAAAA;AAAAA;AAAAA,CAKzD,CAAA,CAAA,mBACCC,CAAAA,MAAMC,kBACIC,EAAAA,EAAAA,UAAAC,KAAM,OAAA,EACdC,KAAKC,EAAAA,UAAUF,KAAKG,aACpBC,CAAAA,EAAAA,UAAeC,IACfA,EAAEC,gBAAAA,EACGN,KAAAO,cACJ,IAAIC,YAAY,2BAA4B,CAC3CC,WACAC,SAAAA,EAEF,CAAA,CAAA,CAAA,CAAA,CACA,CAEO,QACF,CAAA,OAAAC,EAAAA;AAAAA;AAAAA;AAAAA;AAAAA,GAAA,CApBYjB,EAAAA,wGAArB,CADCkB,EAAAA,cAAc,oBAAA,CAAA,EACMlB,mMCCrB,IAAqBmB,EAArB,cAA0CC,EAAAA,gBAAgBlB,EAAAA;AAAAA;AAAAA;AAAAA;AAAAA;AAAAA;AAAAA;AAAAA;AAAAA;AAAAA;AAAAA;AAAAA;AAAAA;AAAAA,CAqBjD,CAAA,CAAA,eACA,CAAA,MAAA,CACNmB,EAAAA,OAAO,CAAA,EACPC,SACAC,QAAM,CAAEC,QAAS,CACjBC,CAAAA,EAAAA,OAAK,CACJ,MAAAC,CAAMC,gBAAEA,EAAiBC,SAAAA,CAAAA,EAAAA,CACxBA,EAASC,SAASC,MAAMC,UAAY,GAAGJ,CAAAA,IAAe,CAGzD,CAAA,CAAA,CAAA,CAGD,MAAMK,gBAAAA,CACA1B,KAAK2B,cAAc,CAAO3B,GAAAA,KAAK4B,aAI9BC,MAAAA,EAAAA,gBAAgB7B,KAAK2B,cAAc,CAAA,EAAI3B,KAAK4B,YAAa,CAC9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"use strict";require("./menu-
|
|
1
|
+
"use strict";require("./menu-D6SHzgaV.cjs");
|
|
2
2
|
//# sourceMappingURL=menu.cjs.map
|
package/dist/menu.js
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import "./menu-
|
|
1
|
+
import "./menu-5krKi7zq.js";
|
|
2
2
|
//# sourceMappingURL=menu.js.map
|
package/dist/nav-drawer.cjs
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("./teleport.component-
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("./teleport.component-CNVTORt3.cjs");exports.$drawer=e.$drawer,Object.defineProperty(exports,"SchmancyDrawerAppbar",{enumerable:!0,get:()=>e.SchmancyDrawerAppbar}),exports.SchmancyDrawerNavbarMode=e.SchmancyDrawerNavbarMode,exports.SchmancyDrawerNavbarState=e.SchmancyDrawerNavbarState,Object.defineProperty(exports,"SchmancyNavigationDrawer",{enumerable:!0,get:()=>e.SchmancyNavigationDrawer}),Object.defineProperty(exports,"SchmancyNavigationDrawerContent",{enumerable:!0,get:()=>e.SchmancyNavigationDrawerContent}),Object.defineProperty(exports,"SchmancyNavigationDrawerSidebar",{enumerable:!0,get:()=>e.SchmancyNavigationDrawerSidebar}),exports.schmancyNavDrawer=e.schmancyNavDrawer;
|
|
2
2
|
//# sourceMappingURL=nav-drawer.cjs.map
|
package/dist/nav-drawer.js
CHANGED
|
@@ -1,13 +1,13 @@
|
|
|
1
|
-
"use strict";const
|
|
1
|
+
"use strict";const w=require("rxjs"),v=require("lit/directives/class-map.js"),b=require("lit/directives/style-map.js"),x=require("./litElement.mixin-CwAqMl79.cjs");require("./tailwind.mixin-DLuYz9Iz.cjs");const T=require("./ripple-C2BHbhcS.cjs"),m=require("./theme.interface-Xg5Zi46a.cjs"),d=require("lit"),l=require("lit/decorators.js"),A=require("lit/directives/repeat.js");var _=Object.defineProperty,C=Object.getOwnPropertyDescriptor,u=(s,t,e,i)=>{for(var o,n=i>1?void 0:i?C(t,e):t,a=s.length-1;a>=0;a--)(o=s[a])&&(n=(i?o(t,e,n):o(n))||n);return i&&n&&_(t,e,n),n};exports.SchmancyNotification=class extends x.$LitElement(":host{display:block;margin-bottom:10px}:host:last-child{margin-bottom:0}.notification{width:100%;max-width:400px;border-radius:8px;box-shadow:var(--schmancy-sys-elevation-2);overflow:hidden;transform:translate(0);opacity:1;transition:transform .3s ease-out,opacity .3s ease-out;background-color:var(--schmancy-sys-color-surface-container);color:var(--schmancy-sys-color-surface-on)}.notification.info{border-left:4px solid var(--schmancy-sys-color-primary-default)}.notification.success{border-left:4px solid var(--schmancy-sys-color-success-default)}.notification.warning{border-left:4px solid var(--schmancy-sys-color-tertiary-default)}.notification.error{border-left:4px solid var(--schmancy-sys-color-error-default)}.notification.closing{transform:translate(120%);opacity:0}.notification .notification-content{display:flex;padding:16px;align-items:flex-start;position:relative}.notification .icon-container{flex-shrink:0;margin-right:12px;display:flex;align-items:center;justify-content:center}.notification .content{flex:1;min-width:0;display:flex;flex-direction:column}.notification .title{font-weight:600;font-size:16px;margin-bottom:4px;word-break:break-word}.notification .message{font-size:14px;word-break:break-word}.notification .close-button{background:transparent;border:none;cursor:pointer;color:var(--schmancy-sys-color-surface-onVariant);padding:4px;margin-left:8px;border-radius:4px;display:flex;align-items:center;justify-content:center}.notification .close-button:hover{background-color:#0000000d}.notification .close-button:focus{outline:none;box-shadow:0 0 0 2px var(--schmancy-sys-color-primary-default)}.notification .progress-bar-container{height:4px;width:100%;background-color:#0000001a;overflow:hidden}.notification .progress-bar{height:100%;width:100%;transition:width .1s linear}"){constructor(){super(...arguments),this.title="",this.message="",this.type="info",this.closable=!0,this.duration=5e3,this.id=`notification-${Date.now()}-${Math.floor(1e4*Math.random())}`,this.playSound=!0,this._visible=!0,this._progress=100,this._hovered=!1,this._closing=!1}connectedCallback(){super.connectedCallback(),this.duration>0&&this._startAutoCloseTimer(),this.playSound&&this._playSound()}disconnectedCallback(){this._clearTimers(),super.disconnectedCallback()}updated(s){super.updated(s),s.has("duration")&&this.duration>0&&(this._clearTimers(),this._startAutoCloseTimer())}_startAutoCloseTimer(){if(this.duration<=0)return;const s=Date.now()+this.duration;this._autoCloseTimer=window.setTimeout(()=>{this.close()},this.duration),this._progressTimer=window.setInterval(()=>{if(this._hovered)return;const t=Date.now(),e=Math.max(0,s-t);this._progress=e/this.duration*100,e<=0&&this._clearTimers()},16)}_clearTimers(){this._autoCloseTimer&&(clearTimeout(this._autoCloseTimer),this._autoCloseTimer=void 0),this._progressTimer&&(clearInterval(this._progressTimer),this._progressTimer=void 0)}_pauseTimers(){this._clearTimers()}_resumeTimers(){if(this.duration>0){const s=this._progress/100*this.duration;if(s>0){this._autoCloseTimer=window.setTimeout(()=>{this.close()},s);const t=Date.now()+s;this._progressTimer=window.setInterval(()=>{if(this._hovered)return;const e=Date.now(),i=Math.max(0,t-e);this._progress=i/s*100,i<=0&&this._clearTimers()},16)}}}_playSound(){this.dispatchEvent(new CustomEvent("playsound",{detail:{type:this.type},bubbles:!0,composed:!0}))}_handleMouseEnter(){this._hovered=!0,this._pauseTimers()}_handleMouseLeave(){this._hovered=!1,this._resumeTimers()}close(){this._closing||(this._closing=!0,this._clearTimers(),this._visible=!1,setTimeout(()=>{this.dispatchEvent(new CustomEvent("close",{detail:{id:this.id},bubbles:!0,composed:!0}))},300))}render(){if(!this._visible&&this._closing)return d.html``;const s=this._getTypeStyles();return d.html`
|
|
2
2
|
<div
|
|
3
|
-
class=${
|
|
3
|
+
class=${v.classMap({notification:!0,closing:this._closing,[this.type]:!0})}
|
|
4
4
|
role="alert"
|
|
5
|
-
style=${
|
|
5
|
+
style=${b.styleMap({transform:this._closing?"translateX(120%)":"translateX(0)",opacity:this._closing?"0":"1"})}
|
|
6
6
|
@mouseenter=${this._handleMouseEnter}
|
|
7
7
|
@mouseleave=${this._handleMouseLeave}
|
|
8
8
|
>
|
|
9
9
|
<div class="notification-content">
|
|
10
|
-
<div class="icon-container" ${
|
|
10
|
+
<div class="icon-container" ${T.color({color:s.iconColor})}>${s.icon}</div>
|
|
11
11
|
|
|
12
12
|
<div class="content">
|
|
13
13
|
${this.title?d.html` <div class="title">${this.title}</div> `:""}
|
|
@@ -39,7 +39,7 @@
|
|
|
39
39
|
<div
|
|
40
40
|
class="progress-bar"
|
|
41
41
|
style="width: ${this._progress}%"
|
|
42
|
-
${
|
|
42
|
+
${T.color({bgColor:s.progressColor})}
|
|
43
43
|
></div>
|
|
44
44
|
</div>
|
|
45
45
|
`:""}
|
|
@@ -58,7 +58,7 @@
|
|
|
58
58
|
<path d="M22 11.08V12a10 10 0 1 1-5.93-9.14"></path>
|
|
59
59
|
<polyline points="22 4 12 14.01 9 11.01"></polyline>
|
|
60
60
|
</svg>
|
|
61
|
-
`,iconColor:
|
|
61
|
+
`,iconColor:m.SchmancyTheme.sys.color.success.default,progressColor:m.SchmancyTheme.sys.color.success.default};case"warning":return{icon:d.html`
|
|
62
62
|
<svg
|
|
63
63
|
width="20"
|
|
64
64
|
height="20"
|
|
@@ -73,7 +73,7 @@
|
|
|
73
73
|
<line x1="12" y1="9" x2="12" y2="13"></line>
|
|
74
74
|
<line x1="12" y1="17" x2="12.01" y2="17"></line>
|
|
75
75
|
</svg>
|
|
76
|
-
`,iconColor:
|
|
76
|
+
`,iconColor:m.SchmancyTheme.sys.color.tertiary.default,progressColor:m.SchmancyTheme.sys.color.tertiary.default};case"error":return{icon:d.html`
|
|
77
77
|
<svg
|
|
78
78
|
width="20"
|
|
79
79
|
height="20"
|
|
@@ -88,7 +88,7 @@
|
|
|
88
88
|
<line x1="15" y1="9" x2="9" y2="15"></line>
|
|
89
89
|
<line x1="9" y1="9" x2="15" y2="15"></line>
|
|
90
90
|
</svg>
|
|
91
|
-
`,iconColor:
|
|
91
|
+
`,iconColor:m.SchmancyTheme.sys.color.error.default,progressColor:m.SchmancyTheme.sys.color.error.default};default:return{icon:d.html`
|
|
92
92
|
<svg
|
|
93
93
|
width="20"
|
|
94
94
|
height="20"
|
|
@@ -103,22 +103,22 @@
|
|
|
103
103
|
<line x1="12" y1="16" x2="12" y2="12"></line>
|
|
104
104
|
<line x1="12" y1="8" x2="12.01" y2="8"></line>
|
|
105
105
|
</svg>
|
|
106
|
-
`,iconColor:h.SchmancyTheme.sys.color.primary.default,progressColor:h.SchmancyTheme.sys.color.primary.default}}}},u([l.property({type:String})],exports.SchmancyNotification.prototype,"title",2),u([l.property({type:String})],exports.SchmancyNotification.prototype,"message",2),u([l.property({type:String})],exports.SchmancyNotification.prototype,"type",2),u([l.property({type:Boolean})],exports.SchmancyNotification.prototype,"closable",2),u([l.property({type:Number})],exports.SchmancyNotification.prototype,"duration",2),u([l.property({type:String})],exports.SchmancyNotification.prototype,"id",2),u([l.property({type:Boolean})],exports.SchmancyNotification.prototype,"playSound",2),u([l.state()],exports.SchmancyNotification.prototype,"_visible",2),u([l.state()],exports.SchmancyNotification.prototype,"_progress",2),u([l.state()],exports.SchmancyNotification.prototype,"_hovered",2),u([l.state()],exports.SchmancyNotification.prototype,"_closing",2),u([l.state()],exports.SchmancyNotification.prototype,"_autoCloseTimer",2),u([l.state()],exports.SchmancyNotification.prototype,"_progressTimer",2),exports.SchmancyNotification=u([l.customElement("sch-notification")],exports.SchmancyNotification);class _{constructor(){this.audioContext=null}getAudioContext(){if(!this.audioContext){const t=window.AudioContext||window.webkitAudioContext;this.audioContext=new t}return this.audioContext}playInfoSound(t=.2){const e=this.getAudioContext(),i=e.currentTime,o=e.createOscillator(),n=e.createGain(),s=e.createBiquadFilter();o.type="sine",o.frequency.setValueAtTime(392,i),o.frequency.exponentialRampToValueAtTime(523.25,i+.25),s.type="lowpass",s.frequency.value=1500,n.gain.setValueAtTime(1e-4,i),n.gain.exponentialRampToValueAtTime(t,i+.15),n.gain.exponentialRampToValueAtTime(1e-4,i+.4),o.connect(s).connect(n).connect(e.destination),o.start(i),o.stop(i+.45)}playSuccessSound(t=.2){const e=this.getAudioContext(),i=e.currentTime,o=(n,s,r)=>{const c=e.createOscillator(),p=e.createGain(),y=e.createBiquadFilter();c.type="sine",c.frequency.setValueAtTime(n,i),y.type="lowpass",y.frequency.value=4*n,p.gain.setValueAtTime(1e-4,i),p.gain.exponentialRampToValueAtTime(t,i+.1),p.gain.exponentialRampToValueAtTime(1e-4,i+r),c.connect(y).connect(p).connect(e.destination),c.start(i+s),c.stop(i+r)};o(659.25,0,.6),o(523.25,.05,.55)}playWarningSound(t=.25){const e=this.getAudioContext(),i=e.currentTime,o=e.createOscillator(),n=e.createOscillator(),s=e.createGain(),r=e.createBiquadFilter();o.type="sine",n.type="sine",o.frequency.setValueAtTime(349.23,i),n.frequency.setValueAtTime(440,i),r.type="lowpass",r.frequency.value=1e3,s.gain.setValueAtTime(1e-4,i),s.gain.exponentialRampToValueAtTime(t,i+.08),s.gain.exponentialRampToValueAtTime(1e-4,i+.5),o.connect(r),n.connect(r),r.connect(s).connect(e.destination),o.start(i),n.start(i),o.stop(i+.55),n.stop(i+.55)}playErrorSound(t=.25){const e=this.getAudioContext(),i=e.currentTime,o=e.createOscillator(),n=e.createGain(),s=e.createBiquadFilter();o.type="triangle",o.frequency.setValueAtTime(220,i),o.frequency.exponentialRampToValueAtTime(1760,i+.3),s.type="lowpass",s.frequency.value=800,s.Q.value=.5,n.gain.setValueAtTime(1e-4,i),n.gain.exponentialRampToValueAtTime(.8*t,i+.1),n.gain.exponentialRampToValueAtTime(1e-4,i+.7),o.connect(s).connect(n).connect(e.destination),o.start(i),o.stop(i+.75)}async generateAudioFiles(t=.25){const i={};return i.info=await this.generateAudioFile(async o=>{const n=o.createOscillator();n.type="sine",n.frequency.setValueAtTime(320,0),n.frequency.exponentialRampToValueAtTime(520,.3);const s=o.createGain();s.gain.setValueAtTime(0,0),s.gain.linearRampToValueAtTime(t,.1),s.gain.linearRampToValueAtTime(0,.5),n.connect(s),s.connect(o.destination),n.start(),n.stop(.5)},44100,1),i.success=await this.generateAudioFile(async o=>{const n=o.createOscillator();n.type="sine",n.frequency.setValueAtTime(660,0);const s=o.createOscillator();s.type="sine",s.frequency.setValueAtTime(440,0);const r=o.createGain();r.gain.setValueAtTime(0,0),r.gain.linearRampToValueAtTime(t,.1),r.gain.linearRampToValueAtTime(0,.5);const c=o.createGain();c.gain.setValueAtTime(0,0),c.gain.linearRampToValueAtTime(.6*t,.15),c.gain.linearRampToValueAtTime(0,.7),n.connect(r),r.connect(o.destination),s.connect(c),c.connect(o.destination),n.start(),s.start(.15),n.stop(.5),s.stop(.7)},44100,1),i.warning=await this.generateAudioFile(async o=>{const n=o.createOscillator();n.type="sine",n.frequency.setValueAtTime(293.66,0);const s=o.createOscillator();s.type="sine",s.frequency.setValueAtTime(349.23,0);const r=o.createGain();r.gain.setValueAtTime(0,0),r.gain.linearRampToValueAtTime(t,.1),r.gain.linearRampToValueAtTime(.6*t,.2),r.gain.linearRampToValueAtTime(.8*t,.3),r.gain.linearRampToValueAtTime(0,.6),n.connect(r),s.connect(r),r.connect(o.destination),n.start(),s.start(),n.stop(.6),s.stop(.6)},44100,1),i.error=await this.generateAudioFile(async o=>{const n=o.createOscillator();n.type="sine",n.frequency.setValueAtTime(196,0);const s=o.createGain();s.gain.setValueAtTime(0,0),s.gain.linearRampToValueAtTime(t,.1),s.gain.linearRampToValueAtTime(.4*t,.2),s.gain.linearRampToValueAtTime(.6*t,.3),s.gain.linearRampToValueAtTime(0,.7);const r=o.createBiquadFilter();r.type="lowpass",r.frequency.value=600,r.Q.value=.7,n.connect(r),r.connect(s),s.connect(o.destination),n.start(),n.stop(.7)},44100,1),i}async generateAudioFile(t,e=44100,i=1){const o=new OfflineAudioContext(2,e*i,e);await t(o);const n=await o.startRendering(),s=this.audioBufferToWav(n);return URL.createObjectURL(s)}audioBufferToWav(t){const e=t.numberOfChannels,i=t.sampleRate,o=2*e,n=this.getAudioSamples(t,16),s=2*n.length,r=new ArrayBuffer(44+s),c=new DataView(r);return this.writeString(c,0,"RIFF"),c.setUint32(4,36+s,!0),this.writeString(c,8,"WAVE"),this.writeString(c,12,"fmt "),c.setUint32(16,16,!0),c.setUint16(20,1,!0),c.setUint16(22,e,!0),c.setUint32(24,i,!0),c.setUint32(28,i*o,!0),c.setUint16(32,o,!0),c.setUint16(34,16,!0),this.writeString(c,36,"data"),c.setUint32(40,s,!0),this.writeInt16Samples(c,44,n),new Blob([r],{type:"audio/wav"})}getAudioSamples(t,e){const i=t.numberOfChannels,o=t.length,n=[],s=e===16?32768:128;for(let r=0;r<o;r++)for(let c=0;c<i;c++){const p=t.getChannelData(c)[r],y=Math.max(-1,Math.min(1,p));n.push(y*s)}return n}writeInt16Samples(t,e,i){for(let o=0;o<i.length;o++)t.setInt16(e+2*o,i[o],!0)}writeString(t,e,i){for(let o=0;o<i.length;o++)t.setUint8(e+o,i.charCodeAt(o))}}class v{constructor(){this.audioContext=null,this.soundBuffers=new Map,this.volume=.5,this.muted=!1,this.soundGenerator=new _,this.soundUrls={info:"/assets/sounds/notification-info.mp3",success:"/assets/sounds/notification-success.mp3",warning:"/assets/sounds/notification-warning.mp3",error:"/assets/sounds/notification-error.mp3"},this.initializeAudioFiles()}async initializeAudioFiles(){try{await this.preloadSounds()}catch{try{const e=await this.soundGenerator.generateAudioFiles(this.volume);this.soundUrls=e}catch{}}}getAudioContext(){if(!this.audioContext){const t=window.AudioContext||window.webkitAudioContext;this.audioContext=new t}return this.audioContext}async preloadSounds(){const t=["info","success","warning","error"];for(const e of t)try{const i=await this.loadSound(e);this.soundBuffers.set(e,i)}catch{}}async loadSound(t){const e=this.soundUrls[t],i=await fetch(e);if(!i.ok)throw new Error(`Failed to load sound from ${e}: ${i.statusText}`);const o=await i.arrayBuffer();return await this.getAudioContext().decodeAudioData(o)}async playSound(t){if(!this.muted)try{const e=this.getAudioContext();if(e.state==="suspended"&&await e.resume(),this.soundUrls[t].startsWith("blob:"))return void this.playFallbackSound(t);if(!this.soundBuffers.has(t))try{const s=await this.loadSound(t);this.soundBuffers.set(t,s)}catch{return void this.playDirectGeneratedSound(t)}const i=this.soundBuffers.get(t);if(!i)throw new Error(`Sound buffer for ${t} not available`);const o=e.createBufferSource();o.buffer=i;const n=e.createGain();n.gain.value=this.volume,o.connect(n),n.connect(e.destination),o.start(0)}catch{this.playDirectGeneratedSound(t)}}playDirectGeneratedSound(t){if(!this.muted)try{switch(t){case"info":this.soundGenerator.playInfoSound(this.volume);break;case"success":this.soundGenerator.playSuccessSound(this.volume);break;case"warning":this.soundGenerator.playWarningSound(this.volume);break;case"error":this.soundGenerator.playErrorSound(this.volume)}}catch{}}playFallbackSound(t){if(!this.muted)try{const e=new Audio(this.soundUrls[t]);e.volume=this.volume,e.addEventListener("ended",()=>{e.remove()}),e.play().catch(i=>{this.playDirectGeneratedSound(t)})}catch{this.playDirectGeneratedSound(t)}}setVolume(t){this.volume=Math.max(0,Math.min(1,t))}getVolume(){return this.volume}mute(){this.muted=!0}unmute(){this.muted=!1}isMuted(){return this.muted}setSoundUrl(t,e){this.soundUrls[t]=e,this.soundBuffers.delete(t)}getSoundUrl(t){return this.soundUrls[t]}}var C=Object.defineProperty,V=Object.getOwnPropertyDescriptor,m=(a,t,e,i)=>{for(var o,n=i>1?void 0:i?V(t,e):t,s=a.length-1;s>=0;s--)(o=a[s])&&(n=(i?o(t,e,n):o(n))||n);return i&&n&&C(t,e,n),n};exports.SchmancyNotificationContainer=class extends w.$LitElement(":host{display:block}.notification-container{position:fixed;z-index:9999;padding:12px;pointer-events:none;width:100%;max-width:424px}.notification-container sch-notification{pointer-events:auto}.notification-container.top-right{top:0;right:0;display:flex;flex-direction:column-reverse}.notification-container.top-left{top:0;left:0;display:flex;flex-direction:column-reverse}.notification-container.bottom-right{bottom:0;right:0;display:flex;flex-direction:column}.notification-container.bottom-left{bottom:0;left:0;display:flex;flex-direction:column}.notification-container.top-center{top:0;left:50%;transform:translate(-50%);display:flex;flex-direction:column-reverse}.notification-container.bottom-center{bottom:0;left:50%;transform:translate(-50%);display:flex;flex-direction:column}"){constructor(){super(...arguments),this.position="top-right",this.maxVisibleNotifications=5,this.playSound=!1,this.audioVolume=.5,this._notifications=[],this._audioService=new v}connectedCallback(){super.connectedCallback(),this._audioService.setVolume(this.audioVolume),f.fromEvent(window,"schmancy-notification").pipe(f.takeUntil(this.disconnecting)).subscribe(a=>{this.addNotification(a.detail)}),this.addEventListener("playsound",a=>{this.playSound&&this._audioService.playSound(a.detail.type)})}addNotification(a){const t=a.id||`notification-${Date.now()}-${Math.floor(1e4*Math.random())}`,e={id:t,title:a.title||"",message:a.message,type:a.type||"info",duration:a.duration!==void 0?a.duration:750,closable:a.closable===void 0||a.closable,playSound:a.playSound!==void 0?a.playSound:this.playSound};return this.position.startsWith("top")?this._notifications=[...this._notifications,e]:this._notifications=[e,...this._notifications],this._notifications.length>this.maxVisibleNotifications&&(this._notifications=this._notifications.slice(-this.maxVisibleNotifications)),e.playSound&&this._audioService.playSound(e.type),t}removeNotification(a){this._notifications=this._notifications.filter(t=>t.id!==a)}_handleClose(a){const t=a.detail.id;this.removeNotification(t)}render(){return d.html`
|
|
106
|
+
`,iconColor:m.SchmancyTheme.sys.color.primary.default,progressColor:m.SchmancyTheme.sys.color.primary.default}}}},u([l.property({type:String})],exports.SchmancyNotification.prototype,"title",2),u([l.property({type:String})],exports.SchmancyNotification.prototype,"message",2),u([l.property({type:String})],exports.SchmancyNotification.prototype,"type",2),u([l.property({type:Boolean})],exports.SchmancyNotification.prototype,"closable",2),u([l.property({type:Number})],exports.SchmancyNotification.prototype,"duration",2),u([l.property({type:String})],exports.SchmancyNotification.prototype,"id",2),u([l.property({type:Boolean})],exports.SchmancyNotification.prototype,"playSound",2),u([l.state()],exports.SchmancyNotification.prototype,"_visible",2),u([l.state()],exports.SchmancyNotification.prototype,"_progress",2),u([l.state()],exports.SchmancyNotification.prototype,"_hovered",2),u([l.state()],exports.SchmancyNotification.prototype,"_closing",2),u([l.state()],exports.SchmancyNotification.prototype,"_autoCloseTimer",2),u([l.state()],exports.SchmancyNotification.prototype,"_progressTimer",2),exports.SchmancyNotification=u([l.customElement("sch-notification")],exports.SchmancyNotification);class V{constructor(){this.audioContext=null}getAudioContext(){if(!this.audioContext){const t=window.AudioContext||window.webkitAudioContext;this.audioContext=new t}return this.audioContext}playInfoSound(t=.2){const e=this.getAudioContext(),i=e.currentTime,o=e.createOscillator(),n=e.createGain(),a=e.createBiquadFilter();o.type="sine",o.frequency.setValueAtTime(392,i),o.frequency.exponentialRampToValueAtTime(523.25,i+.25),a.type="lowpass",a.frequency.value=1500,n.gain.setValueAtTime(1e-4,i),n.gain.exponentialRampToValueAtTime(t,i+.15),n.gain.exponentialRampToValueAtTime(1e-4,i+.4),o.connect(a).connect(n).connect(e.destination),o.start(i),o.stop(i+.45)}playSuccessSound(t=.2){const e=this.getAudioContext(),i=e.currentTime,o=(n,a,r)=>{const c=e.createOscillator(),y=e.createGain(),g=e.createBiquadFilter();c.type="sine",c.frequency.setValueAtTime(n,i),g.type="lowpass",g.frequency.value=4*n,y.gain.setValueAtTime(1e-4,i),y.gain.exponentialRampToValueAtTime(t,i+.1),y.gain.exponentialRampToValueAtTime(1e-4,i+r),c.connect(g).connect(y).connect(e.destination),c.start(i+a),c.stop(i+r)};o(659.25,0,.6),o(523.25,.05,.55)}playWarningSound(t=.25){const e=this.getAudioContext(),i=e.currentTime,o=e.createOscillator(),n=e.createOscillator(),a=e.createGain(),r=e.createBiquadFilter();o.type="sine",n.type="sine",o.frequency.setValueAtTime(349.23,i),n.frequency.setValueAtTime(440,i),r.type="lowpass",r.frequency.value=1e3,a.gain.setValueAtTime(1e-4,i),a.gain.exponentialRampToValueAtTime(t,i+.08),a.gain.exponentialRampToValueAtTime(1e-4,i+.5),o.connect(r),n.connect(r),r.connect(a).connect(e.destination),o.start(i),n.start(i),o.stop(i+.55),n.stop(i+.55)}playErrorSound(t=.25){const e=this.getAudioContext(),i=e.currentTime,o=e.createOscillator(),n=e.createGain(),a=e.createBiquadFilter();o.type="triangle",o.frequency.setValueAtTime(220,i),o.frequency.exponentialRampToValueAtTime(1760,i+.3),a.type="lowpass",a.frequency.value=800,a.Q.value=.5,n.gain.setValueAtTime(1e-4,i),n.gain.exponentialRampToValueAtTime(.8*t,i+.1),n.gain.exponentialRampToValueAtTime(1e-4,i+.7),o.connect(a).connect(n).connect(e.destination),o.start(i),o.stop(i+.75)}async generateAudioFiles(t=.25){const i={};return i.info=await this.generateAudioFile(async o=>{const n=o.createOscillator();n.type="sine",n.frequency.setValueAtTime(320,0),n.frequency.exponentialRampToValueAtTime(520,.3);const a=o.createGain();a.gain.setValueAtTime(0,0),a.gain.linearRampToValueAtTime(t,.1),a.gain.linearRampToValueAtTime(0,.5),n.connect(a),a.connect(o.destination),n.start(),n.stop(.5)},44100,1),i.success=await this.generateAudioFile(async o=>{const n=o.createOscillator();n.type="sine",n.frequency.setValueAtTime(660,0);const a=o.createOscillator();a.type="sine",a.frequency.setValueAtTime(440,0);const r=o.createGain();r.gain.setValueAtTime(0,0),r.gain.linearRampToValueAtTime(t,.1),r.gain.linearRampToValueAtTime(0,.5);const c=o.createGain();c.gain.setValueAtTime(0,0),c.gain.linearRampToValueAtTime(.6*t,.15),c.gain.linearRampToValueAtTime(0,.7),n.connect(r),r.connect(o.destination),a.connect(c),c.connect(o.destination),n.start(),a.start(.15),n.stop(.5),a.stop(.7)},44100,1),i.warning=await this.generateAudioFile(async o=>{const n=o.createOscillator();n.type="sine",n.frequency.setValueAtTime(293.66,0);const a=o.createOscillator();a.type="sine",a.frequency.setValueAtTime(349.23,0);const r=o.createGain();r.gain.setValueAtTime(0,0),r.gain.linearRampToValueAtTime(t,.1),r.gain.linearRampToValueAtTime(.6*t,.2),r.gain.linearRampToValueAtTime(.8*t,.3),r.gain.linearRampToValueAtTime(0,.6),n.connect(r),a.connect(r),r.connect(o.destination),n.start(),a.start(),n.stop(.6),a.stop(.6)},44100,1),i.error=await this.generateAudioFile(async o=>{const n=o.createOscillator();n.type="sine",n.frequency.setValueAtTime(196,0);const a=o.createGain();a.gain.setValueAtTime(0,0),a.gain.linearRampToValueAtTime(t,.1),a.gain.linearRampToValueAtTime(.4*t,.2),a.gain.linearRampToValueAtTime(.6*t,.3),a.gain.linearRampToValueAtTime(0,.7);const r=o.createBiquadFilter();r.type="lowpass",r.frequency.value=600,r.Q.value=.7,n.connect(r),r.connect(a),a.connect(o.destination),n.start(),n.stop(.7)},44100,1),i}async generateAudioFile(t,e=44100,i=1){const o=new OfflineAudioContext(2,e*i,e);await t(o);const n=await o.startRendering(),a=this.audioBufferToWav(n);return URL.createObjectURL(a)}audioBufferToWav(t){const e=t.numberOfChannels,i=t.sampleRate,o=2*e,n=this.getAudioSamples(t,16),a=2*n.length,r=new ArrayBuffer(44+a),c=new DataView(r);return this.writeString(c,0,"RIFF"),c.setUint32(4,36+a,!0),this.writeString(c,8,"WAVE"),this.writeString(c,12,"fmt "),c.setUint32(16,16,!0),c.setUint16(20,1,!0),c.setUint16(22,e,!0),c.setUint32(24,i,!0),c.setUint32(28,i*o,!0),c.setUint16(32,o,!0),c.setUint16(34,16,!0),this.writeString(c,36,"data"),c.setUint32(40,a,!0),this.writeInt16Samples(c,44,n),new Blob([r],{type:"audio/wav"})}getAudioSamples(t,e){const i=t.numberOfChannels,o=t.length,n=[],a=e===16?32768:128;for(let r=0;r<o;r++)for(let c=0;c<i;c++){const y=t.getChannelData(c)[r],g=Math.max(-1,Math.min(1,y));n.push(g*a)}return n}writeInt16Samples(t,e,i){for(let o=0;o<i.length;o++)t.setInt16(e+2*o,i[o],!0)}writeString(t,e,i){for(let o=0;o<i.length;o++)t.setUint8(e+o,i.charCodeAt(o))}}class S{constructor(){this.audioContext=null,this.soundBuffers=new Map,this.volume=.5,this.muted=!1,this.soundGenerator=new V,this.soundUrls={info:"/assets/sounds/notification-info.mp3",success:"/assets/sounds/notification-success.mp3",warning:"/assets/sounds/notification-warning.mp3",error:"/assets/sounds/notification-error.mp3"},this.initializeAudioFiles()}async initializeAudioFiles(){try{await this.preloadSounds()}catch{try{const e=await this.soundGenerator.generateAudioFiles(this.volume);this.soundUrls=e}catch{}}}getAudioContext(){if(!this.audioContext){const t=window.AudioContext||window.webkitAudioContext;this.audioContext=new t}return this.audioContext}async preloadSounds(){const t=["info","success","warning","error"];for(const e of t)try{const i=await this.loadSound(e);this.soundBuffers.set(e,i)}catch{}}async loadSound(t){const e=this.soundUrls[t],i=await fetch(e);if(!i.ok)throw new Error(`Failed to load sound from ${e}: ${i.statusText}`);const o=await i.arrayBuffer();return await this.getAudioContext().decodeAudioData(o)}async playSound(t){if(!this.muted)try{const e=this.getAudioContext();if(e.state==="suspended"&&await e.resume(),this.soundUrls[t].startsWith("blob:"))return void this.playFallbackSound(t);if(!this.soundBuffers.has(t))try{const a=await this.loadSound(t);this.soundBuffers.set(t,a)}catch{return void this.playDirectGeneratedSound(t)}const i=this.soundBuffers.get(t);if(!i)throw new Error(`Sound buffer for ${t} not available`);const o=e.createBufferSource();o.buffer=i;const n=e.createGain();n.gain.value=this.volume,o.connect(n),n.connect(e.destination),o.start(0)}catch{this.playDirectGeneratedSound(t)}}playDirectGeneratedSound(t){if(!this.muted)try{switch(t){case"info":this.soundGenerator.playInfoSound(this.volume);break;case"success":this.soundGenerator.playSuccessSound(this.volume);break;case"warning":this.soundGenerator.playWarningSound(this.volume);break;case"error":this.soundGenerator.playErrorSound(this.volume)}}catch{}}playFallbackSound(t){if(!this.muted)try{const e=new Audio(this.soundUrls[t]);e.volume=this.volume,e.addEventListener("ended",()=>{e.remove()}),e.play().catch(i=>{this.playDirectGeneratedSound(t)})}catch{this.playDirectGeneratedSound(t)}}setVolume(t){this.volume=Math.max(0,Math.min(1,t))}getVolume(){return this.volume}mute(){this.muted=!0}unmute(){this.muted=!1}isMuted(){return this.muted}setSoundUrl(t,e){this.soundUrls[t]=e,this.soundBuffers.delete(t)}getSoundUrl(t){return this.soundUrls[t]}}var k=Object.defineProperty,N=Object.getOwnPropertyDescriptor,f=(s,t,e,i)=>{for(var o,n=i>1?void 0:i?N(t,e):t,a=s.length-1;a>=0;a--)(o=s[a])&&(n=(i?o(t,e,n):o(n))||n);return i&&n&&k(t,e,n),n};exports.SchmancyNotificationContainer=class extends x.$LitElement(":host{display:block}.notification-container{position:fixed;z-index:9999;padding:12px;pointer-events:none;width:100%;max-width:424px}.notification-container sch-notification{pointer-events:auto}.notification-container.top-right{top:0;right:0;display:flex;flex-direction:column-reverse}.notification-container.top-left{top:0;left:0;display:flex;flex-direction:column-reverse}.notification-container.bottom-right{bottom:0;right:0;display:flex;flex-direction:column}.notification-container.bottom-left{bottom:0;left:0;display:flex;flex-direction:column}.notification-container.top-center{top:0;left:50%;transform:translate(-50%);display:flex;flex-direction:column-reverse}.notification-container.bottom-center{bottom:0;left:50%;transform:translate(-50%);display:flex;flex-direction:column}"){constructor(){super(...arguments),this.position="top-right",this.maxVisibleNotifications=2,this.playSound=!1,this.audioVolume=.1,this._notifications=[],this._audioService=new S}connectedCallback(){super.connectedCallback(),this._audioService.setVolume(this.audioVolume),w.fromEvent(window,"schmancy-notification").pipe(w.takeUntil(this.disconnecting)).subscribe(s=>{this.addNotification(s.detail)}),this.addEventListener("playsound",s=>{this.playSound&&this._audioService.playSound(s.detail.type)})}addNotification(s){const t=s.id||`notification-${Date.now()}-${Math.floor(1e4*Math.random())}`,e={id:t,title:s.title||"",message:s.message,type:s.type||"info",duration:s.duration!==void 0?s.duration:750,closable:s.closable===void 0||s.closable,playSound:s.playSound!==void 0?s.playSound:this.playSound};return this.position.startsWith("top")?this._notifications=[...this._notifications,e]:this._notifications=[e,...this._notifications],this._notifications.length>this.maxVisibleNotifications&&(this._notifications=this._notifications.slice(-this.maxVisibleNotifications)),e.playSound&&this._audioService.playSound(e.type),t}removeNotification(s){this._notifications=this._notifications.filter(t=>t.id!==s)}_handleClose(s){const t=s.detail.id;this.removeNotification(t)}render(){return d.html`
|
|
107
107
|
<div
|
|
108
|
-
class=${
|
|
108
|
+
class=${v.classMap({"notification-container":!0,[this.position]:!0})}
|
|
109
109
|
>
|
|
110
|
-
${
|
|
110
|
+
${A.repeat(this._notifications,s=>s.id,s=>d.html`
|
|
111
111
|
<sch-notification
|
|
112
|
-
.id=${
|
|
113
|
-
.title=${
|
|
114
|
-
.message=${
|
|
115
|
-
.type=${
|
|
116
|
-
.duration=${
|
|
117
|
-
?closable=${
|
|
112
|
+
.id=${s.id}
|
|
113
|
+
.title=${s.title}
|
|
114
|
+
.message=${s.message}
|
|
115
|
+
.type=${s.type}
|
|
116
|
+
.duration=${s.duration}
|
|
117
|
+
?closable=${s.closable}
|
|
118
118
|
?playSound=${!1} /* We already played the sound on add */
|
|
119
119
|
@close=${this._handleClose}
|
|
120
120
|
></sch-notification>
|
|
121
121
|
`)}
|
|
122
122
|
</div>
|
|
123
|
-
`}},
|
|
124
|
-
//# sourceMappingURL=notification-
|
|
123
|
+
`}},f([l.property({type:String})],exports.SchmancyNotificationContainer.prototype,"position",2),f([l.property({type:Number})],exports.SchmancyNotificationContainer.prototype,"maxVisibleNotifications",2),f([l.property({type:Boolean})],exports.SchmancyNotificationContainer.prototype,"playSound",2),f([l.property({type:Number})],exports.SchmancyNotificationContainer.prototype,"audioVolume",2),f([l.state()],exports.SchmancyNotificationContainer.prototype,"_notifications",2),exports.SchmancyNotificationContainer=f([l.customElement("sch-notification-container")],exports.SchmancyNotificationContainer);const p=class p{constructor(){}static getInstance(){return p.instance||(p.instance=new p),p.instance}notify(t){const e={...p.DEFAULT_OPTIONS,...t,duration:t.duration??p.DEFAULT_OPTIONS.duration},i=e.id||`notification-${Date.now()}-${Math.floor(1e4*Math.random())}`,o=new CustomEvent("schmancy-notification",{bubbles:!0,composed:!0,detail:{...e,id:i}});return window.dispatchEvent(o),i}info(t,e={}){return this.notify({message:t,type:"info",...e})}success(t,e={}){return this.notify({message:t,type:"success",...e})}warning(t,e={}){return this.notify({message:t,type:"warning",...e})}error(t,e={}){return this.notify({message:t,type:"error",...e})}customDuration(t,e,i={}){return this.notify({message:t,duration:e,...i})}persistent(t,e={}){return this.notify({message:t,duration:0,...e})}};p.DEFAULT_OPTIONS={duration:1e3,closable:!0,playSound:!0};let h=p;const $={show:s=>h.getInstance().notify(s),info:(s,t={})=>h.getInstance().info(s,t),success:(s,t={})=>h.getInstance().success(s,t),warning:(s,t={})=>h.getInstance().warning(s,t),error:(s,t={})=>h.getInstance().error(s,t),customDuration:(s,t,e={})=>h.getInstance().customDuration(s,t,e),persistent:(s,t={})=>h.getInstance().persistent(s,t)};exports.$notify=$,exports.NotificationAudioService=S;
|
|
124
|
+
//# sourceMappingURL=notification-service-BFfFPd1Q.cjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"notification-service-BFfFPd1Q.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 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\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\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})}\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 class=\"icon-container\" ${color({ color: typeStyles.iconColor })}>${typeStyles.icon}</div>\n\n\t\t\t\t\t<div class=\"content\">\n\t\t\t\t\t\t${this.title ? html` <div class=\"title\">${this.title}</div> ` : ''}\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 class=\"close-button\" aria-label=\"Close notification\" @click=${this.close}>\n\t\t\t\t\t\t\t\t\t<svg\n\t\t\t\t\t\t\t\t\t\twidth=\"16\"\n\t\t\t\t\t\t\t\t\t\theight=\"16\"\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.duration > 0\n\t\t\t\t\t? html`\n\t\t\t\t\t\t\t<div class=\"progress-bar-container\">\n\t\t\t\t\t\t\t\t<div\n\t\t\t\t\t\t\t\t\tclass=\"progress-bar\"\n\t\t\t\t\t\t\t\t\tstyle=\"width: ${this._progress}%\"\n\t\t\t\t\t\t\t\t\t${color({ bgColor: typeStyles.progressColor })}\n\t\t\t\t\t\t\t\t></div>\n\t\t\t\t\t\t\t</div>\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: SchmancyTheme.sys.color.success.default,\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: SchmancyTheme.sys.color.tertiary.default,\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: SchmancyTheme.sys.color.error.default,\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: SchmancyTheme.sys.color.primary.default,\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 { 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\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\t\t\tconsole.log('Generating programmatic notification sounds')\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 * 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\n\t\t\taudio.addEventListener('ended', () => {\n\t\t\t\taudio.remove()\n\t\t\t})\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","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}\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}\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 play sound events from child notifications\n\t\tthis.addEventListener('playsound', ((event: CustomEvent) => {\n\t\t\tif (this.playSound) {\n\t\t\t\tthis._audioService.playSound(event.detail.type)\n\t\t\t}\n\t\t}) as EventListener)\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}\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\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} /* We already played the sound on add */\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\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// 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 * 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,\n\t\t\ttype: 'info',\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,\n\t\t\ttype: 'success',\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,\n\t\t\ttype: 'warning',\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,\n\t\t\ttype: 'error',\n\t\t\t...options,\n\t\t})\n\t}\n\n\t/**\n\t * Show a notification with a custom duration\n\t */\n\tpublic customDuration(\n\t\tmessage: string,\n\t\tduration: number,\n\t\toptions: Partial<Omit<NotificationOptions, 'message' | 'duration'>> = {},\n\t): string {\n\t\treturn this.notify({\n\t\t\tmessage,\n\t\t\tduration,\n\t\t\t...options,\n\t\t})\n\t}\n\n\t/**\n\t * Show a persistent notification (won't auto-dismiss)\n\t */\n\tpublic persistent(message: string, options: Partial<Omit<NotificationOptions, 'message' | 'duration'>> = {}): string {\n\t\treturn this.notify({\n\t\t\tmessage,\n\t\t\tduration: 0, // Zero duration means no auto-close\n\t\t\t...options,\n\t\t})\n\t}\n}\n\n/**\n * Global notification 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\nexport default NotificationService\n"],"names":["SchmancyNotification","$LitElement","constructor","super","arguments","this","title","message","type","closable","duration","id","Date","now","Math","floor","random","playSound","_visible","_progress","_hovered","_closing","connectedCallback","_startAutoCloseTimer","_playSound","_clearTimers","disconnectedCallback","changedProps","updated","has","endTime","_autoCloseTimer","window","setTimeout","close","_progressTimer","setInterval","remaining","max","clearTimeout","clearInterval","remainingTime","dispatchEvent","CustomEvent","detail","bubbles","composed","_pauseTimers","_resumeTimers","render","html","typeStyles","_getTypeStyles","classMap","notification","closing","styleMap","transform","opacity","_handleMouseEnter","_handleMouseLeave","color","iconColor","icon","bgColor","progressColor","SchmancyTheme","sys","success","default","tertiary","error","primary","__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","generateAudioFiles","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","soundUrls","initializeAudioFiles","preloadSounds","err","generatedUrls","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","Audio","addEventListener","remove","play","catch","mute","isMuted","delete","SchmancyNotificationContainer","position","maxVisibleNotifications","audioVolume","_notifications","_audioService","setVolume","fromEvent","pipe","takeUntil","disconnecting","subscribe","event","addNotification","options","slice","n","e","removeNotification","repeat","_handleClose","NotificationService","instance","completeOptions","DEFAULT_OPTIONS","notify","_x","$notify","show","getInstance","customDuration","persistent"],"mappings":"wjBAeqBA,QAAAA,qBAArB,cAAkDC,myDAAlD,aAAAC,CAAAC,SAAAC,SACqCC,EAAAA,KAAAC,MAAA,GACED,KAAAE,QAAA,GACeF,KAAAG,KAAA,OACbH,KAAAI,SAAAA,GACDJ,KAAAK,SAAA,IACNL,KAAAM,GAAA,gBAAgBC,KAAKC,IAAAA,CAAAA,IAASC,KAAKC,MAAsB,IAAhBD,KAAKE,OACtCX,CAAAA,CAAAA,GAAAA,KAAAY,UAAA,GAEhCZ,KAAQa,SAAAA,GACRb,KAAQc,UAAY,IACpBd,KAAQe,SAAAA,GACRf,KAAQgB,SAAAA,EAAW,CAI5B,oBACClB,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