@mhmo91/schmancy 0.4.69 → 0.4.70

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.
Files changed (322) hide show
  1. package/dist/{animated-text-DhaihRNU.js → animated-text-CMITbL1U.js} +3 -3
  2. package/dist/{animated-text-DhaihRNU.js.map → animated-text-CMITbL1U.js.map} +1 -1
  3. package/dist/{animated-text-Bm1G50ol.cjs → animated-text-DefVTtAq.cjs} +2 -2
  4. package/dist/{animated-text-Bm1G50ol.cjs.map → animated-text-DefVTtAq.cjs.map} +1 -1
  5. package/dist/animated-text.cjs +1 -1
  6. package/dist/animated-text.js +1 -1
  7. package/dist/area.cjs +1 -1
  8. package/dist/{area.component-Cybfl9fo.js → area.component-CVnJvyK0.js} +3 -3
  9. package/dist/{area.component-Cybfl9fo.js.map → area.component-CVnJvyK0.js.map} +1 -1
  10. package/dist/{area.component-e7ccHmOi.cjs → area.component-CxVp3gZp.cjs} +2 -2
  11. package/dist/{area.component-e7ccHmOi.cjs.map → area.component-CxVp3gZp.cjs.map} +1 -1
  12. package/dist/area.js +1 -1
  13. package/dist/{autocomplete-CHPr_eII.js → autocomplete-DTm45vy3.js} +3 -3
  14. package/dist/{autocomplete-CHPr_eII.js.map → autocomplete-DTm45vy3.js.map} +1 -1
  15. package/dist/{autocomplete-DhRURo6G.cjs → autocomplete-DZgp2iwf.cjs} +2 -2
  16. package/dist/{autocomplete-DhRURo6G.cjs.map → autocomplete-DZgp2iwf.cjs.map} +1 -1
  17. package/dist/autocomplete.cjs +1 -1
  18. package/dist/autocomplete.js +1 -1
  19. package/dist/{avatar-B3rxuPbq.js → avatar-Cp3pBHJ0.js} +54 -53
  20. package/dist/{avatar-B3rxuPbq.js.map → avatar-Cp3pBHJ0.js.map} +1 -1
  21. package/dist/{avatar-BREyQJqy.cjs → avatar-Dexe_o7K.cjs} +2 -2
  22. package/dist/{avatar-BREyQJqy.cjs.map → avatar-Dexe_o7K.cjs.map} +1 -1
  23. package/dist/badge.cjs +1 -1
  24. package/dist/badge.js +1 -1
  25. package/dist/{boat-IQenN8zy.cjs → boat-DTLpjckT.cjs} +2 -2
  26. package/dist/{boat-IQenN8zy.cjs.map → boat-DTLpjckT.cjs.map} +1 -1
  27. package/dist/{boat-Ch2Dn8n_.js → boat-DiWtHOng.js} +2 -2
  28. package/dist/{boat-Ch2Dn8n_.js.map → boat-DiWtHOng.js.map} +1 -1
  29. package/dist/boat.cjs +1 -1
  30. package/dist/boat.js +1 -1
  31. package/dist/busy.cjs +1 -1
  32. package/dist/busy.js +1 -1
  33. package/dist/button.cjs +1 -1
  34. package/dist/button.js +1 -1
  35. package/dist/card.cjs +1 -1
  36. package/dist/card.js +1 -1
  37. package/dist/{checkbox-DTtOgNWH.js → checkbox-CatOf2np.js} +2 -2
  38. package/dist/{checkbox-DTtOgNWH.js.map → checkbox-CatOf2np.js.map} +1 -1
  39. package/dist/{checkbox-EV_8e4Q9.cjs → checkbox-DIbnOfL2.cjs} +2 -2
  40. package/dist/{checkbox-EV_8e4Q9.cjs.map → checkbox-DIbnOfL2.cjs.map} +1 -1
  41. package/dist/checkbox.cjs +1 -1
  42. package/dist/checkbox.js +1 -1
  43. package/dist/{chips-D9bYHkvu.cjs → chips-DtPe3B90.cjs} +2 -2
  44. package/dist/{chips-D9bYHkvu.cjs.map → chips-DtPe3B90.cjs.map} +1 -1
  45. package/dist/{chips-xlNsY8Dl.js → chips-zrYIeivA.js} +3 -3
  46. package/dist/{chips-xlNsY8Dl.js.map → chips-zrYIeivA.js.map} +1 -1
  47. package/dist/chips.cjs +1 -1
  48. package/dist/chips.js +1 -1
  49. package/dist/code-highlight.cjs +1 -1
  50. package/dist/code-highlight.js +1 -1
  51. package/dist/{code-preview-Dy4fNmOI.js → code-preview-CnfzlCWq.js} +2 -2
  52. package/dist/{code-preview-Dy4fNmOI.js.map → code-preview-CnfzlCWq.js.map} +1 -1
  53. package/dist/{code-preview-CC_QZwlB.cjs → code-preview-DMIT_oTX.cjs} +2 -2
  54. package/dist/{code-preview-CC_QZwlB.cjs.map → code-preview-DMIT_oTX.cjs.map} +1 -1
  55. package/dist/components.cjs +1 -1
  56. package/dist/components.js +1 -1
  57. package/dist/content-drawer.cjs +1 -1
  58. package/dist/content-drawer.js +1 -1
  59. package/dist/{date-range-XTs2K2Rp.cjs → date-range-CAAjykaN.cjs} +2 -2
  60. package/dist/{date-range-XTs2K2Rp.cjs.map → date-range-CAAjykaN.cjs.map} +1 -1
  61. package/dist/{date-range-CEhn7Gvg.js → date-range-alXAlxtp.js} +4 -4
  62. package/dist/{date-range-CEhn7Gvg.js.map → date-range-alXAlxtp.js.map} +1 -1
  63. package/dist/{date-range-inline-BW6v6aDq.cjs → date-range-inline-DCYLf0py.cjs} +2 -2
  64. package/dist/{date-range-inline-BW6v6aDq.cjs.map → date-range-inline-DCYLf0py.cjs.map} +1 -1
  65. package/dist/{date-range-inline-D-F8YwDL.js → date-range-inline-GGJ-b5Ji.js} +3 -3
  66. package/dist/{date-range-inline-D-F8YwDL.js.map → date-range-inline-GGJ-b5Ji.js.map} +1 -1
  67. package/dist/date-range-inline.cjs +1 -1
  68. package/dist/date-range-inline.js +1 -1
  69. package/dist/date-range.cjs +1 -1
  70. package/dist/date-range.js +1 -1
  71. package/dist/{delay-CqcMq7V3.js → delay-BX1HD8i5.js} +12 -12
  72. package/dist/{delay-CqcMq7V3.js.map → delay-BX1HD8i5.js.map} +1 -1
  73. package/dist/{delay-BYwpzSYY.cjs → delay-DnJcmVMd.cjs} +2 -2
  74. package/dist/{delay-BYwpzSYY.cjs.map → delay-DnJcmVMd.cjs.map} +1 -1
  75. package/dist/delay.cjs +1 -1
  76. package/dist/delay.js +1 -1
  77. package/dist/{details-C9Vr2c8F.cjs → details-B-SW_Fin.cjs} +2 -2
  78. package/dist/{details-C9Vr2c8F.cjs.map → details-B-SW_Fin.cjs.map} +1 -1
  79. package/dist/{details-gxjy3noS.js → details-DJdIO2Op.js} +2 -2
  80. package/dist/{details-gxjy3noS.js.map → details-DJdIO2Op.js.map} +1 -1
  81. package/dist/details.cjs +1 -1
  82. package/dist/details.js +1 -1
  83. package/dist/{dialog-content-CJ21oAff.js → dialog-content-CDfCvaaL.js} +4 -4
  84. package/dist/{dialog-content-CJ21oAff.js.map → dialog-content-CDfCvaaL.js.map} +1 -1
  85. package/dist/{dialog-content-DfXB0r6A.cjs → dialog-content-DBlOSail.cjs} +2 -2
  86. package/dist/{dialog-content-DfXB0r6A.cjs.map → dialog-content-DBlOSail.cjs.map} +1 -1
  87. package/dist/{dialog-service-ClZa-7cE.cjs → dialog-service-C4ko20zk.cjs} +2 -2
  88. package/dist/{dialog-service-ClZa-7cE.cjs.map → dialog-service-C4ko20zk.cjs.map} +1 -1
  89. package/dist/{dialog-service-Dwnyl4Gg.js → dialog-service-DoKaWw88.js} +2 -2
  90. package/dist/{dialog-service-Dwnyl4Gg.js.map → dialog-service-DoKaWw88.js.map} +1 -1
  91. package/dist/dialog.cjs +1 -1
  92. package/dist/dialog.js +2 -2
  93. package/dist/{divider-Dw3OYKoH.js → divider-TH_rknPx.js} +3 -3
  94. package/dist/{divider-Dw3OYKoH.js.map → divider-TH_rknPx.js.map} +1 -1
  95. package/dist/{divider-ZX6UG8fE.cjs → divider-xwxPJtAX.cjs} +2 -2
  96. package/dist/{divider-ZX6UG8fE.cjs.map → divider-xwxPJtAX.cjs.map} +1 -1
  97. package/dist/divider.cjs +1 -1
  98. package/dist/divider.js +1 -1
  99. package/dist/{dropdown-content-ULdb1NeW.cjs → dropdown-content-BdHciywm.cjs} +2 -2
  100. package/dist/{dropdown-content-ULdb1NeW.cjs.map → dropdown-content-BdHciywm.cjs.map} +1 -1
  101. package/dist/{dropdown-content-QWlP1OxV.js → dropdown-content-CSwcyUQ9.js} +3 -3
  102. package/dist/{dropdown-content-QWlP1OxV.js.map → dropdown-content-CSwcyUQ9.js.map} +1 -1
  103. package/dist/dropdown.cjs +1 -1
  104. package/dist/dropdown.js +1 -1
  105. package/dist/{email-recipients-H9HVkFvE.cjs → email-recipients-B9F9tbTi.cjs} +549 -86
  106. package/dist/email-recipients-B9F9tbTi.cjs.map +1 -0
  107. package/dist/{email-recipients-DQ36ickQ.js → email-recipients-BH3-shuO.js} +782 -258
  108. package/dist/email-recipients-BH3-shuO.js.map +1 -0
  109. package/dist/extra.cjs +1 -1
  110. package/dist/extra.js +1 -1
  111. package/dist/{flex-Cam0G_h7.js → flex-D8gAI_hG.js} +2 -2
  112. package/dist/{flex-Cam0G_h7.js.map → flex-D8gAI_hG.js.map} +1 -1
  113. package/dist/{flex-DEiJ9fDk.cjs → flex-DpTCuZUb.cjs} +2 -2
  114. package/dist/{flex-DEiJ9fDk.cjs.map → flex-DpTCuZUb.cjs.map} +1 -1
  115. package/dist/{form-EPO5N6pI.js → form-BZjCPbr9.js} +2 -2
  116. package/dist/{form-EPO5N6pI.js.map → form-BZjCPbr9.js.map} +1 -1
  117. package/dist/{form-B87v130C.cjs → form-CVRfikGe.cjs} +2 -2
  118. package/dist/{form-B87v130C.cjs.map → form-CVRfikGe.cjs.map} +1 -1
  119. package/dist/form.cjs +1 -1
  120. package/dist/form.js +1 -1
  121. package/dist/{formField.mixin-B6XjIwKN.js → formField.mixin-Ljb1niLU.js} +2 -2
  122. package/dist/{formField.mixin-B6XjIwKN.js.map → formField.mixin-Ljb1niLU.js.map} +1 -1
  123. package/dist/{formField.mixin-Dpx2Zk8-.cjs → formField.mixin-OMhAnwUx.cjs} +2 -2
  124. package/dist/{formField.mixin-Dpx2Zk8-.cjs.map → formField.mixin-OMhAnwUx.cjs.map} +1 -1
  125. package/dist/{icon-MrlToWLJ.cjs → icon-DX0oxbGd.cjs} +2 -2
  126. package/dist/{icon-MrlToWLJ.cjs.map → icon-DX0oxbGd.cjs.map} +1 -1
  127. package/dist/{icon-C6CXTo3Z.js → icon-P0BSH_XX.js} +2 -2
  128. package/dist/{icon-C6CXTo3Z.js.map → icon-P0BSH_XX.js.map} +1 -1
  129. package/dist/{icon-button-Csj8jwj8.js → icon-button-CHc7Bgkr.js} +3 -3
  130. package/dist/{icon-button-Csj8jwj8.js.map → icon-button-CHc7Bgkr.js.map} +1 -1
  131. package/dist/{icon-button-BwAStx3H.cjs → icon-button-GkluRkNE.cjs} +2 -2
  132. package/dist/{icon-button-BwAStx3H.cjs.map → icon-button-GkluRkNE.cjs.map} +1 -1
  133. package/dist/icons.cjs +1 -1
  134. package/dist/icons.js +1 -1
  135. package/dist/index.cjs +1 -1
  136. package/dist/index.js +225 -224
  137. package/dist/index.js.map +1 -1
  138. package/dist/{input-B9PDbNB9.js → input-BxzFCM0j.js} +3 -3
  139. package/dist/{input-B9PDbNB9.js.map → input-BxzFCM0j.js.map} +1 -1
  140. package/dist/{input-D4L413yG.cjs → input-qI9CER23.cjs} +2 -2
  141. package/dist/{input-D4L413yG.cjs.map → input-qI9CER23.cjs.map} +1 -1
  142. package/dist/input.cjs +1 -1
  143. package/dist/input.js +1 -1
  144. package/dist/layout.cjs +1 -1
  145. package/dist/layout.js +1 -1
  146. package/dist/{list-DLUbjS69.cjs → list-BBCV7EZh.cjs} +2 -2
  147. package/dist/{list-DLUbjS69.cjs.map → list-BBCV7EZh.cjs.map} +1 -1
  148. package/dist/{list-Cdd7ht2E.js → list-CD6Ue96E.js} +2 -2
  149. package/dist/{list-Cdd7ht2E.js.map → list-CD6Ue96E.js.map} +1 -1
  150. package/dist/list.cjs +1 -1
  151. package/dist/list.js +1 -1
  152. package/dist/{litElement.mixin-BYVS1wwl.js → litElement.mixin-BSsJVIyj.js} +2 -2
  153. package/dist/{litElement.mixin-BYVS1wwl.js.map → litElement.mixin-BSsJVIyj.js.map} +1 -1
  154. package/dist/{litElement.mixin-CbFQ2uxn.cjs → litElement.mixin-D8xYT3dQ.cjs} +2 -2
  155. package/dist/{litElement.mixin-CbFQ2uxn.cjs.map → litElement.mixin-D8xYT3dQ.cjs.map} +1 -1
  156. package/dist/mailbox.cjs +1 -1
  157. package/dist/mailbox.js +1 -1
  158. package/dist/{map-DxUajvGo.cjs → map-CVeIZTSC.cjs} +2 -2
  159. package/dist/{map-DxUajvGo.cjs.map → map-CVeIZTSC.cjs.map} +1 -1
  160. package/dist/{map-DmjQ1Izx.js → map-D637QcQS.js} +2 -2
  161. package/dist/{map-DmjQ1Izx.js.map → map-D637QcQS.js.map} +1 -1
  162. package/dist/map.cjs +1 -1
  163. package/dist/map.js +1 -1
  164. package/dist/{media-DPurU9FS.js → media-CXv34EUE.js} +2 -2
  165. package/dist/{media-DPurU9FS.js.map → media-CXv34EUE.js.map} +1 -1
  166. package/dist/{media-DCIVM-cE.cjs → media-ng9D3LV4.cjs} +2 -2
  167. package/dist/{media-DCIVM-cE.cjs.map → media-ng9D3LV4.cjs.map} +1 -1
  168. package/dist/{menu-CwRGjbC-.js → menu-B5aEANFb.js} +3 -3
  169. package/dist/{menu-CwRGjbC-.js.map → menu-B5aEANFb.js.map} +1 -1
  170. package/dist/{menu-CIObvZ7n.cjs → menu-BKqFx_Sg.cjs} +2 -2
  171. package/dist/{menu-CIObvZ7n.cjs.map → menu-BKqFx_Sg.cjs.map} +1 -1
  172. package/dist/menu.cjs +1 -1
  173. package/dist/menu.js +1 -1
  174. package/dist/nav-drawer.cjs +1 -1
  175. package/dist/nav-drawer.js +1 -1
  176. package/dist/{notification-service-BMnjQVrQ.cjs → notification-service-BL_SA5r6.cjs} +2 -2
  177. package/dist/{notification-service-BMnjQVrQ.cjs.map → notification-service-BL_SA5r6.cjs.map} +1 -1
  178. package/dist/{notification-service-DypTYarw.js → notification-service-BO0LiH62.js} +4 -4
  179. package/dist/{notification-service-DypTYarw.js.map → notification-service-BO0LiH62.js.map} +1 -1
  180. package/dist/notification.cjs +1 -1
  181. package/dist/notification.js +2 -2
  182. package/dist/{notify-CqCSy8Ek.cjs → notify-DiIsT6_U.cjs} +2 -2
  183. package/dist/{notify-CqCSy8Ek.cjs.map → notify-DiIsT6_U.cjs.map} +1 -1
  184. package/dist/{notify-DUMaApt7.js → notify-sR_wpqSL.js} +2 -2
  185. package/dist/{notify-DUMaApt7.js.map → notify-sR_wpqSL.js.map} +1 -1
  186. package/dist/{option-BuN5MSy7.cjs → option-Bna3I9yk.cjs} +2 -2
  187. package/dist/{option-BuN5MSy7.cjs.map → option-Bna3I9yk.cjs.map} +1 -1
  188. package/dist/{option-CvjLp3CB.js → option-Wdzvm3xE.js} +2 -2
  189. package/dist/{option-CvjLp3CB.js.map → option-Wdzvm3xE.js.map} +1 -1
  190. package/dist/option.cjs +1 -1
  191. package/dist/option.js +1 -1
  192. package/dist/{payment-card-form-CFDdmSH2.js → payment-card-form-BanESqh4.js} +3 -3
  193. package/dist/{payment-card-form-CFDdmSH2.js.map → payment-card-form-BanESqh4.js.map} +1 -1
  194. package/dist/{payment-card-form-C9VN_H07.cjs → payment-card-form-D_F0Qk8m.cjs} +2 -2
  195. package/dist/{payment-card-form-C9VN_H07.cjs.map → payment-card-form-D_F0Qk8m.cjs.map} +1 -1
  196. package/dist/{progress-C-6ieScw.cjs → progress-DWUvgJRQ.cjs} +2 -2
  197. package/dist/{progress-C-6ieScw.cjs.map → progress-DWUvgJRQ.cjs.map} +1 -1
  198. package/dist/{progress-BeOOCcPN.js → progress-lCHm-5Qd.js} +2 -2
  199. package/dist/{progress-BeOOCcPN.js.map → progress-lCHm-5Qd.js.map} +1 -1
  200. package/dist/progress.cjs +1 -1
  201. package/dist/progress.js +1 -1
  202. package/dist/{radio-button-Bi4ywYhW.cjs → radio-button-BgvPoY5w.cjs} +2 -2
  203. package/dist/{radio-button-Bi4ywYhW.cjs.map → radio-button-BgvPoY5w.cjs.map} +1 -1
  204. package/dist/{radio-button-D6zvMVQb.js → radio-button-CXX8rL5Z.js} +3 -3
  205. package/dist/{radio-button-D6zvMVQb.js.map → radio-button-CXX8rL5Z.js.map} +1 -1
  206. package/dist/radio-group.cjs +1 -1
  207. package/dist/radio-group.js +1 -1
  208. package/dist/{schmancy-steps-container-i8rqaPet.cjs → schmancy-steps-container-WmpbfnAv.cjs} +2 -2
  209. package/dist/{schmancy-steps-container-i8rqaPet.cjs.map → schmancy-steps-container-WmpbfnAv.cjs.map} +1 -1
  210. package/dist/{schmancy-steps-container-CfDatUf8.js → schmancy-steps-container-dAv2AQ1o.js} +2 -2
  211. package/dist/{schmancy-steps-container-CfDatUf8.js.map → schmancy-steps-container-dAv2AQ1o.js.map} +1 -1
  212. package/dist/{select-X7b74OI8.js → select-BFHRO7D1.js} +3 -3
  213. package/dist/{select-X7b74OI8.js.map → select-BFHRO7D1.js.map} +1 -1
  214. package/dist/{select-BPkJhj-o.cjs → select-C4ysSiyb.cjs} +2 -2
  215. package/dist/{select-BPkJhj-o.cjs.map → select-C4ysSiyb.cjs.map} +1 -1
  216. package/dist/select.cjs +1 -1
  217. package/dist/select.js +1 -1
  218. package/dist/sheet-Bm7AdMAf.js +144 -0
  219. package/dist/sheet-Bm7AdMAf.js.map +1 -0
  220. package/dist/sheet-BrWQNETX.cjs +52 -0
  221. package/dist/sheet-BrWQNETX.cjs.map +1 -0
  222. package/dist/sheet.cjs +1 -1
  223. package/dist/sheet.js +6 -5
  224. package/dist/sheet.js.map +1 -1
  225. package/dist/sheet.service-CgKnOzZN.js +87 -0
  226. package/dist/sheet.service-CgKnOzZN.js.map +1 -0
  227. package/dist/sheet.service-DGYkGKzX.cjs +2 -0
  228. package/dist/sheet.service-DGYkGKzX.cjs.map +1 -0
  229. package/dist/{slider-py-bz6Vv.js → slider-DtMki7JS.js} +3 -3
  230. package/dist/{slider-py-bz6Vv.js.map → slider-DtMki7JS.js.map} +1 -1
  231. package/dist/{slider-DWO4L_qC.cjs → slider-zzIaOtVV.cjs} +2 -2
  232. package/dist/{slider-DWO4L_qC.cjs.map → slider-zzIaOtVV.cjs.map} +1 -1
  233. package/dist/slider.cjs +1 -1
  234. package/dist/slider.js +1 -1
  235. package/dist/{spinner-Dv1WJaIf.cjs → spinner-DpiguU2b.cjs} +2 -2
  236. package/dist/{spinner-Dv1WJaIf.cjs.map → spinner-DpiguU2b.cjs.map} +1 -1
  237. package/dist/{spinner-DpmMO5_E.js → spinner-yQpcUe1F.js} +2 -2
  238. package/dist/{spinner-DpmMO5_E.js.map → spinner-yQpcUe1F.js.map} +1 -1
  239. package/dist/steps.cjs +1 -1
  240. package/dist/steps.js +1 -1
  241. package/dist/{surface-Bn4-n1lT.cjs → surface-BQkqeqQL.cjs} +2 -2
  242. package/dist/{surface-Bn4-n1lT.cjs.map → surface-BQkqeqQL.cjs.map} +1 -1
  243. package/dist/{surface-CFNIITaq.js → surface-uQy_g3S3.js} +2 -2
  244. package/dist/{surface-CFNIITaq.js.map → surface-uQy_g3S3.js.map} +1 -1
  245. package/dist/surface.cjs +1 -1
  246. package/dist/surface.js +1 -1
  247. package/dist/{table-DNUpAcQk.js → table-D_NfwO-r.js} +2 -2
  248. package/dist/{table-DNUpAcQk.js.map → table-D_NfwO-r.js.map} +1 -1
  249. package/dist/{table-A_oEWQzm.cjs → table-P5rTnqC_.cjs} +2 -2
  250. package/dist/{table-A_oEWQzm.cjs.map → table-P5rTnqC_.cjs.map} +1 -1
  251. package/dist/table.cjs +1 -1
  252. package/dist/table.js +1 -1
  253. package/dist/{tabs-compatibility-Bxoz71f7.js → tabs-compatibility-8_k_UM2J.js} +2 -2
  254. package/dist/{tabs-compatibility-Bxoz71f7.js.map → tabs-compatibility-8_k_UM2J.js.map} +1 -1
  255. package/dist/{tabs-compatibility-DNVqDoQh.cjs → tabs-compatibility-BdJ2pRM4.cjs} +2 -2
  256. package/dist/{tabs-compatibility-DNVqDoQh.cjs.map → tabs-compatibility-BdJ2pRM4.cjs.map} +1 -1
  257. package/dist/tabs.cjs +1 -1
  258. package/dist/tabs.js +1 -1
  259. package/dist/tailwind.mixin-BFHdirqy.cjs +2 -0
  260. package/dist/{tailwind.mixin-BU9fMdfc.cjs.map → tailwind.mixin-BFHdirqy.cjs.map} +1 -1
  261. package/dist/tailwind.mixin-C3MkWn0v.js +43 -0
  262. package/dist/{tailwind.mixin-Bpgmqass.js.map → tailwind.mixin-C3MkWn0v.js.map} +1 -1
  263. package/dist/teleport.cjs +1 -1
  264. package/dist/teleport.js +1 -1
  265. package/dist/{textarea-BE5TqYmx.js → textarea-BIa-VJgn.js} +2 -2
  266. package/dist/{textarea-BE5TqYmx.js.map → textarea-BIa-VJgn.js.map} +1 -1
  267. package/dist/{textarea-DTlpsJ-V.cjs → textarea-d0QK9I_W.cjs} +2 -2
  268. package/dist/{textarea-DTlpsJ-V.cjs.map → textarea-d0QK9I_W.cjs.map} +1 -1
  269. package/dist/textarea.cjs +1 -1
  270. package/dist/textarea.js +1 -1
  271. package/dist/{theme-button-DG8sPYM-.cjs → theme-button-2R4gqt1Z.cjs} +2 -2
  272. package/dist/{theme-button-DG8sPYM-.cjs.map → theme-button-2R4gqt1Z.cjs.map} +1 -1
  273. package/dist/{theme-button-BsojGTM7.js → theme-button-BXkmh4nn.js} +2 -2
  274. package/dist/{theme-button-BsojGTM7.js.map → theme-button-BXkmh4nn.js.map} +1 -1
  275. package/dist/theme-button.cjs +1 -1
  276. package/dist/theme-button.js +1 -1
  277. package/dist/theme.cjs +1 -1
  278. package/dist/{theme.component-BG4oCMuV.js → theme.component-Cta_ZGr5.js} +2 -2
  279. package/dist/{theme.component-BG4oCMuV.js.map → theme.component-Cta_ZGr5.js.map} +1 -1
  280. package/dist/{theme.component-D7TpDD6q.cjs → theme.component-DHuNvHEP.cjs} +3 -3
  281. package/dist/{theme.component-D7TpDD6q.cjs.map → theme.component-DHuNvHEP.cjs.map} +1 -1
  282. package/dist/theme.js +1 -1
  283. package/dist/{timezone-DtsS7reI.js → timezone-DLuRf9_q.js} +3 -3
  284. package/dist/{timezone-DtsS7reI.js.map → timezone-DLuRf9_q.js.map} +1 -1
  285. package/dist/{timezone-dc6VVlU0.cjs → timezone-DZMzss0f.cjs} +2 -2
  286. package/dist/{timezone-dc6VVlU0.cjs.map → timezone-DZMzss0f.cjs.map} +1 -1
  287. package/dist/{tooltip-C5C8KN_9.js → tooltip-BbSE2kUb.js} +2 -2
  288. package/dist/{tooltip-C5C8KN_9.js.map → tooltip-BbSE2kUb.js.map} +1 -1
  289. package/dist/{tooltip-CA2yHZN6.cjs → tooltip-CK-XmbzO.cjs} +2 -2
  290. package/dist/{tooltip-CA2yHZN6.cjs.map → tooltip-CK-XmbzO.cjs.map} +1 -1
  291. package/dist/tooltip.cjs +1 -1
  292. package/dist/tooltip.js +1 -1
  293. package/dist/{tree-D7CAcAHa.cjs → tree-COFL10bn.cjs} +2 -2
  294. package/dist/{tree-D7CAcAHa.cjs.map → tree-COFL10bn.cjs.map} +1 -1
  295. package/dist/{tree-jBMmDqPl.js → tree-DQJIF5Zw.js} +2 -2
  296. package/dist/{tree-jBMmDqPl.js.map → tree-DQJIF5Zw.js.map} +1 -1
  297. package/dist/tree.cjs +1 -1
  298. package/dist/tree.js +1 -1
  299. package/dist/{typewriter-BMfjokvJ.cjs → typewriter-DTuH_jfH.cjs} +2 -2
  300. package/dist/{typewriter-BMfjokvJ.cjs.map → typewriter-DTuH_jfH.cjs.map} +1 -1
  301. package/dist/{typewriter-DDgmwo1Z.js → typewriter-DWfh9dQx.js} +7 -7
  302. package/dist/{typewriter-DDgmwo1Z.js.map → typewriter-DWfh9dQx.js.map} +1 -1
  303. package/dist/typewriter.cjs +1 -1
  304. package/dist/typewriter.js +1 -1
  305. package/dist/{typography-CeAzj0Al.cjs → typography-CVIqatrO.cjs} +2 -2
  306. package/dist/{typography-CeAzj0Al.cjs.map → typography-CVIqatrO.cjs.map} +1 -1
  307. package/dist/{typography-D0JH1nwp.js → typography-CbfOMwD6.js} +2 -2
  308. package/dist/{typography-D0JH1nwp.js.map → typography-CbfOMwD6.js.map} +1 -1
  309. package/dist/typography.cjs +1 -1
  310. package/dist/typography.js +1 -1
  311. package/package.json +1 -1
  312. package/types/src/mailbox/email-editor.d.ts +9 -10
  313. package/types/src/mailbox/email-template-picker.d.ts +64 -0
  314. package/types/src/mailbox/types.d.ts +3 -0
  315. package/dist/email-recipients-DQ36ickQ.js.map +0 -1
  316. package/dist/email-recipients-H9HVkFvE.cjs.map +0 -1
  317. package/dist/sheet-BBT4JQ3Z.cjs +0 -52
  318. package/dist/sheet-BBT4JQ3Z.cjs.map +0 -1
  319. package/dist/sheet-DvCIJGFo.js +0 -228
  320. package/dist/sheet-DvCIJGFo.js.map +0 -1
  321. package/dist/tailwind.mixin-BU9fMdfc.cjs +0 -2
  322. package/dist/tailwind.mixin-Bpgmqass.js +0 -43
@@ -1,9 +1,9 @@
1
- "use strict";require("rxjs"),require("lit/directives/class-map.js"),require("lit/directives/style-map.js");const $=require("./litElement.mixin-CbFQ2uxn.cjs"),w=require("./tailwind.mixin-BU9fMdfc.cjs"),c=require("lit/decorators.js"),r=require("lit"),p=require("lit/directives/when.js"),f=require("lit/directives/ref.js"),x=require("lit/directives/repeat.js"),g=require("./notification-service-BMnjQVrQ.cjs");require("./dialog-content-DfXB0r6A.cjs");const S=require("./dialog-service-ClZa-7cE.cjs");var R=Object.defineProperty,E=Object.getOwnPropertyDescriptor,m=(e,t,i,s)=>{for(var a,n=s>1?void 0:s?E(t,i):t,l=e.length-1;l>=0;l--)(a=e[l])&&(n=(s?a(t,i,n):a(n))||n);return s&&n&&R(t,i,n),n};exports.SchmancyMailbox=class extends $.$LitElement(r.css`
1
+ "use strict";require("rxjs"),require("lit/directives/class-map.js"),require("lit/directives/style-map.js");const S=require("./litElement.mixin-D8xYT3dQ.cjs"),R=require("./tailwind.mixin-BFHdirqy.cjs"),r=require("lit/decorators.js"),c=require("lit"),d=require("lit/directives/when.js"),g=require("lit/directives/ref.js"),$=require("lit/directives/repeat.js"),u=require("./notification-service-BL_SA5r6.cjs");require("./dialog-content-DBlOSail.cjs");const E=require("./dialog-service-C4ko20zk.cjs"),k=require("./sheet.service-DGYkGKzX.cjs");var C=Object.defineProperty,T=Object.getOwnPropertyDescriptor,m=(e,t,i,s)=>{for(var a,n=s>1?void 0:s?T(t,i):t,o=e.length-1;o>=0;o--)(a=e[o])&&(n=(s?a(t,i,n):a(n))||n);return s&&n&&C(t,i,n),n};exports.SchmancyMailbox=class extends S.$LitElement(c.css`
2
2
  :host {
3
3
  display: block;
4
4
  height: 100%;
5
5
  }
6
- `){constructor(){super(...arguments),this.config={},this.templates=[],this.importSources=[],this.disabled=!1,this.recipientsTitle="Recipients",this.recipientsEmptyTitle="No recipients yet",this.recipientsEmptyMessage="Import from sources or upload a CSV",this.enableCsvImport=!0,this.enableDragDrop=!0,this.recipients=[],this.selectedRecipients=[],this.subject="",this.body="",this.templateId=null,this.attachments=[],this.isSending=!1,this.handleEmailsImported=e=>{const{emails:t}=e.detail,i=[...new Set([...this.recipients,...t])],s=t.filter(a=>!this.recipients.includes(a));this.recipients=i,this.selectedRecipients=[...new Set([...this.selectedRecipients,...s])],this.dispatchEvent(new CustomEvent("emails-imported",{detail:{emails:s,source:e.detail.source},bubbles:!0,composed:!0}))},this.handleRecipientRemoved=e=>{const{email:t}=e.detail;this.recipients=this.recipients.filter(i=>i!==t),this.selectedRecipients=this.selectedRecipients.filter(i=>i!==t),this.dispatchEvent(new CustomEvent("recipient-removed",{detail:{email:t},bubbles:!0,composed:!0}))},this.handleRecipientsCleared=()=>{this.recipients=[],this.selectedRecipients=[],this.dispatchEvent(new CustomEvent("recipients-cleared",{bubbles:!0,composed:!0}))},this.handleSelectionChanged=e=>{const{selectedEmails:t}=e.detail;this.selectedRecipients=t,this.dispatchEvent(new CustomEvent("selection-changed",{detail:{selectedEmails:t},bubbles:!0,composed:!0}))},this.handleEditorChange=e=>{const{subject:t,body:i,templateId:s,attachments:a}=e.detail;this.subject=t,this.body=i,this.templateId=s,this.attachments=a,this.dispatchEvent(new CustomEvent("compose-changed",{detail:{subject:t,body:i,templateId:s,attachments:a},bubbles:!0,composed:!0}))},this.handleSend=async()=>{if(this.selectedRecipients.length!==0)if(this.subject.trim())if(this.body.trim()){this.isSending=!0;try{const e={recipients:this.selectedRecipients,subject:this.subject,body:this.body,attachments:this.attachments,templateId:this.templateId};this.dispatchEvent(new CustomEvent("send-email",{detail:{request:e},bubbles:!0,composed:!0}))}catch(e){this.dispatchEvent(new CustomEvent("send-error",{detail:{error:e instanceof Error?e.message:"Failed to send email"},bubbles:!0,composed:!0}))}finally{this.isSending=!1}}else this.dispatchEvent(new CustomEvent("send-error",{detail:{error:"Please enter a message body"},bubbles:!0,composed:!0}));else this.dispatchEvent(new CustomEvent("send-error",{detail:{error:"Please enter a subject"},bubbles:!0,composed:!0}));else this.dispatchEvent(new CustomEvent("send-error",{detail:{error:"Please select at least one recipient"},bubbles:!0,composed:!0}))}}connectedCallback(){super.connectedCallback(),this.setSending(this.disabled)}updated(e){super.updated(e),e.has("disabled")&&this.setSending(this.disabled)}addRecipients(e){const t=[...new Set([...this.recipients,...e])],i=e.filter(s=>!this.recipients.includes(s));this.recipients=t,this.selectedRecipients=[...new Set([...this.selectedRecipients,...i])]}setSubject(e){this.subject=e}setBody(e){this.body=e}setTemplate(e){this.templateId=e}clearCompose(){this.recipients=[],this.selectedRecipients=[],this.subject="",this.body="",this.templateId=null,this.attachments=[]}setSending(e){this.isSending=e}render(){const e=this.selectedRecipients.length>0&&this.subject.trim()&&this.body.trim()&&!this.isSending&&!this.disabled;return r.html`
6
+ `){constructor(){super(...arguments),this.config={},this.templates=[],this.importSources=[],this.disabled=!1,this.recipientsTitle="Recipients",this.recipientsEmptyTitle="No recipients yet",this.recipientsEmptyMessage="Import from sources or upload a CSV",this.enableCsvImport=!0,this.enableDragDrop=!0,this.recipients=[],this.selectedRecipients=[],this.subject="",this.body="",this.templateId=null,this.attachments=[],this.isSending=!1,this.handleEmailsImported=e=>{const{emails:t}=e.detail,i=[...new Set([...this.recipients,...t])],s=t.filter(a=>!this.recipients.includes(a));this.recipients=i,this.selectedRecipients=[...new Set([...this.selectedRecipients,...s])],this.dispatchEvent(new CustomEvent("emails-imported",{detail:{emails:s,source:e.detail.source},bubbles:!0,composed:!0}))},this.handleRecipientRemoved=e=>{const{email:t}=e.detail;this.recipients=this.recipients.filter(i=>i!==t),this.selectedRecipients=this.selectedRecipients.filter(i=>i!==t),this.dispatchEvent(new CustomEvent("recipient-removed",{detail:{email:t},bubbles:!0,composed:!0}))},this.handleRecipientsCleared=()=>{this.recipients=[],this.selectedRecipients=[],this.dispatchEvent(new CustomEvent("recipients-cleared",{bubbles:!0,composed:!0}))},this.handleSelectionChanged=e=>{const{selectedEmails:t}=e.detail;this.selectedRecipients=t,this.dispatchEvent(new CustomEvent("selection-changed",{detail:{selectedEmails:t},bubbles:!0,composed:!0}))},this.handleEditorChange=e=>{const{subject:t,body:i,templateId:s,attachments:a}=e.detail;this.subject=t,this.body=i,this.templateId=s,this.attachments=a,this.dispatchEvent(new CustomEvent("compose-changed",{detail:{subject:t,body:i,templateId:s,attachments:a},bubbles:!0,composed:!0}))},this.handleSend=async()=>{if(this.selectedRecipients.length!==0)if(this.subject.trim())if(this.body.trim()){this.isSending=!0;try{const e={recipients:this.selectedRecipients,subject:this.subject,body:this.body,attachments:this.attachments,templateId:this.templateId};this.dispatchEvent(new CustomEvent("send-email",{detail:{request:e},bubbles:!0,composed:!0}))}catch(e){this.dispatchEvent(new CustomEvent("send-error",{detail:{error:e instanceof Error?e.message:"Failed to send email"},bubbles:!0,composed:!0}))}finally{this.isSending=!1}}else this.dispatchEvent(new CustomEvent("send-error",{detail:{error:"Please enter a message body"},bubbles:!0,composed:!0}));else this.dispatchEvent(new CustomEvent("send-error",{detail:{error:"Please enter a subject"},bubbles:!0,composed:!0}));else this.dispatchEvent(new CustomEvent("send-error",{detail:{error:"Please select at least one recipient"},bubbles:!0,composed:!0}))}}connectedCallback(){super.connectedCallback(),this.setSending(this.disabled)}updated(e){super.updated(e),e.has("disabled")&&this.setSending(this.disabled)}addRecipients(e){const t=[...new Set([...this.recipients,...e])],i=e.filter(s=>!this.recipients.includes(s));this.recipients=t,this.selectedRecipients=[...new Set([...this.selectedRecipients,...i])]}setSubject(e){this.subject=e}setBody(e){this.body=e}setTemplate(e){this.templateId=e}clearCompose(){this.recipients=[],this.selectedRecipients=[],this.subject="",this.body="",this.templateId=null,this.attachments=[]}setSending(e){this.isSending=e}render(){const e=this.selectedRecipients.length>0&&this.subject.trim()&&this.body.trim()&&!this.isSending&&!this.disabled;return c.html`
7
7
  <!-- Main Layout Container -->
8
8
  <div class="flex flex-col h-full gap-6 p-6">
9
9
 
@@ -50,7 +50,7 @@
50
50
  <schmancy-typography type="body" token="sm" class="font-medium">
51
51
  ${this.selectedRecipients.length} recipient${this.selectedRecipients.length===1?"":"s"} selected
52
52
  </schmancy-typography>
53
- ${p.when(this.attachments.length>0,()=>r.html`
53
+ ${d.when(this.attachments.length>0,()=>c.html`
54
54
  <schmancy-typography type="body" token="xs">
55
55
  ${this.attachments.length} attachment${this.attachments.length===1?"":"s"}
56
56
  </schmancy-typography>
@@ -90,9 +90,9 @@
90
90
  @recipients-cleared=${this.handleRecipientsCleared}
91
91
  @selection-changed=${this.handleSelectionChanged}
92
92
  ></schmancy-email-recipients>
93
- `}},m([c.property({type:Object})],exports.SchmancyMailbox.prototype,"config",2),m([c.property({type:Array})],exports.SchmancyMailbox.prototype,"templates",2),m([c.property({type:Array})],exports.SchmancyMailbox.prototype,"importSources",2),m([c.property({type:Boolean})],exports.SchmancyMailbox.prototype,"disabled",2),m([c.property({type:String})],exports.SchmancyMailbox.prototype,"recipientsTitle",2),m([c.property({type:String})],exports.SchmancyMailbox.prototype,"recipientsEmptyTitle",2),m([c.property({type:String})],exports.SchmancyMailbox.prototype,"recipientsEmptyMessage",2),m([c.property({type:Boolean})],exports.SchmancyMailbox.prototype,"enableCsvImport",2),m([c.property({type:Boolean})],exports.SchmancyMailbox.prototype,"enableDragDrop",2),m([c.state()],exports.SchmancyMailbox.prototype,"recipients",2),m([c.state()],exports.SchmancyMailbox.prototype,"selectedRecipients",2),m([c.state()],exports.SchmancyMailbox.prototype,"subject",2),m([c.state()],exports.SchmancyMailbox.prototype,"body",2),m([c.state()],exports.SchmancyMailbox.prototype,"templateId",2),m([c.state()],exports.SchmancyMailbox.prototype,"attachments",2),m([c.state()],exports.SchmancyMailbox.prototype,"isSending",2),exports.SchmancyMailbox=m([c.customElement("schmancy-mailbox")],exports.SchmancyMailbox);var C=Object.getOwnPropertyDescriptor;exports.SchmancyEmailLayoutSelector=class extends w.TailwindElement(){constructor(){super(...arguments),this.layouts=[{id:"columns-2",icon:"view_week",label:"2 Col"},{id:"columns-3",icon:"view_column",label:"3 Col"},{id:"sidebar-left",icon:"view_sidebar",label:"Left"},{id:"sidebar-right",icon:"view_sidebar",label:"Right",flipped:!0},{id:"image-row",icon:"collections",label:"Images"}]}selectLayout(e){this.dispatchEvent(new CustomEvent("layout-select",{detail:{layout:e},bubbles:!0,composed:!0}))}render(){return r.html`
93
+ `}},m([r.property({type:Object})],exports.SchmancyMailbox.prototype,"config",2),m([r.property({type:Array})],exports.SchmancyMailbox.prototype,"templates",2),m([r.property({type:Array})],exports.SchmancyMailbox.prototype,"importSources",2),m([r.property({type:Boolean})],exports.SchmancyMailbox.prototype,"disabled",2),m([r.property({type:String})],exports.SchmancyMailbox.prototype,"recipientsTitle",2),m([r.property({type:String})],exports.SchmancyMailbox.prototype,"recipientsEmptyTitle",2),m([r.property({type:String})],exports.SchmancyMailbox.prototype,"recipientsEmptyMessage",2),m([r.property({type:Boolean})],exports.SchmancyMailbox.prototype,"enableCsvImport",2),m([r.property({type:Boolean})],exports.SchmancyMailbox.prototype,"enableDragDrop",2),m([r.state()],exports.SchmancyMailbox.prototype,"recipients",2),m([r.state()],exports.SchmancyMailbox.prototype,"selectedRecipients",2),m([r.state()],exports.SchmancyMailbox.prototype,"subject",2),m([r.state()],exports.SchmancyMailbox.prototype,"body",2),m([r.state()],exports.SchmancyMailbox.prototype,"templateId",2),m([r.state()],exports.SchmancyMailbox.prototype,"attachments",2),m([r.state()],exports.SchmancyMailbox.prototype,"isSending",2),exports.SchmancyMailbox=m([r.customElement("schmancy-mailbox")],exports.SchmancyMailbox);var I=Object.getOwnPropertyDescriptor;exports.SchmancyEmailLayoutSelector=class extends R.TailwindElement(){constructor(){super(...arguments),this.layouts=[{id:"columns-2",icon:"view_week",label:"2 Col"},{id:"columns-3",icon:"view_column",label:"3 Col"},{id:"sidebar-left",icon:"view_sidebar",label:"Left"},{id:"sidebar-right",icon:"view_sidebar",label:"Right",flipped:!0},{id:"image-row",icon:"collections",label:"Images"}]}selectLayout(e){this.dispatchEvent(new CustomEvent("layout-select",{detail:{layout:e},bubbles:!0,composed:!0}))}render(){return c.html`
94
94
  <div class="grid p-3 gap-2">
95
- ${this.layouts.map(e=>r.html`
95
+ ${this.layouts.map(e=>c.html`
96
96
  <schmancy-button
97
97
  variant="outlined"
98
98
  @click=${()=>this.selectLayout(e.id)}
@@ -108,16 +108,309 @@
108
108
  </schmancy-button>
109
109
  `)}
110
110
  </div>
111
- `}},exports.SchmancyEmailLayoutSelector=((e,t,i,s)=>{for(var a,n=s>1?void 0:s?C(t,i):t,l=e.length-1;l>=0;l--)(a=e[l])&&(n=a(n)||n);return n})([c.customElement("schmancy-email-layout-selector")],exports.SchmancyEmailLayoutSelector);var k=Object.defineProperty,I=Object.getOwnPropertyDescriptor,u=(e,t,i,s)=>{for(var a,n=s>1?void 0:s?I(t,i):t,l=e.length-1;l>=0;l--)(a=e[l])&&(n=(s?a(t,i,n):a(n))||n);return s&&n&&k(t,i,n),n};exports.SchmancyEmailEditor=class extends $.$LitElement(r.css`
111
+ `}},exports.SchmancyEmailLayoutSelector=((e,t,i,s)=>{for(var a,n=s>1?void 0:s?I(t,i):t,o=e.length-1;o>=0;o--)(a=e[o])&&(n=a(n)||n);return n})([r.customElement("schmancy-email-layout-selector")],exports.SchmancyEmailLayoutSelector);var D=Object.defineProperty,A=Object.getOwnPropertyDescriptor,w=(e,t,i,s)=>{for(var a,n=s>1?void 0:s?A(t,i):t,o=e.length-1;o>=0;o--)(a=e[o])&&(n=(s?a(t,i,n):a(n))||n);return s&&n&&D(t,i,n),n};let v=class extends S.$LitElement(c.css`
112
+ :host {
113
+ display: block;
114
+ }
115
+ `){constructor(){super(...arguments),this.templates=[],this.searchQuery="",this.selectedTemplate=null,this.filteredTemplates=[],this.showPreview=!1,this.selectedCategory="all",this.handleSearch=e=>{const t=e.target;this.searchQuery=t.value},this.handleCategorySelect=e=>{this.selectedCategory=e,this.updateFilteredTemplates()},this.selectTemplate=e=>{this.selectedTemplate=e,this.showPreview=!0},this.confirmSelection=()=>{this.selectedTemplate&&(this.dispatchEvent(new CustomEvent("template-selected",{detail:this.selectedTemplate,bubbles:!0,composed:!0})),k.sheet.dismiss())},this.close=()=>{k.sheet.dismiss()},this.backToList=()=>{this.showPreview=!1,this.selectedTemplate=null}}connectedCallback(){super.connectedCallback(),this.updateFilteredTemplates()}updated(e){(e.has("templates")||e.has("searchQuery")||e.has("selectedCategory"))&&this.updateFilteredTemplates()}get categories(){const e=new Set;return this.templates.forEach(t=>{t.category&&e.add(t.category)}),["all",...Array.from(e)]}updateFilteredTemplates(){let e=[...this.templates];if(this.selectedCategory!=="all"&&(e=e.filter(t=>t.category===this.selectedCategory)),this.searchQuery.trim()){const t=this.searchQuery.toLowerCase();e=e.filter(i=>i.name.toLowerCase().includes(t)||i.category?.toLowerCase().includes(t)||i.description?.toLowerCase().includes(t))}this.filteredTemplates=e}render(){return c.html`
116
+ <div class="flex flex-col h-full overflow-hidden">
117
+ <!-- Header -->
118
+ <div class="flex items-center justify-between px-6 py-4 border-b border-outline-variant">
119
+ <div class="flex items-center gap-3">
120
+ <schmancy-icon size="24px" class="text-primary">
121
+ ${this.showPreview?"preview":"mail"}
122
+ </schmancy-icon>
123
+ <schmancy-typography type="headline" token="md">
124
+ ${this.showPreview?"Template Preview":"Choose Email Template"}
125
+ </schmancy-typography>
126
+ </div>
127
+ <schmancy-button
128
+ variant="text"
129
+ @click=${this.close}
130
+ class="hover:bg-surface-container rounded-full w-10 h-10 p-0"
131
+ >
132
+ <schmancy-icon>close</schmancy-icon>
133
+ </schmancy-button>
134
+ </div>
135
+
136
+ <!-- Body -->
137
+ <div class="flex-1 flex flex-col overflow-hidden">
138
+ ${d.when(this.showPreview&&this.selectedTemplate,()=>this.renderPreview(),()=>this.renderTemplateList())}
139
+ </div>
140
+
141
+ <!-- Footer -->
142
+ <div class="flex justify-between px-6 py-4 border-t border-outline-variant bg-surface-containerLow">
143
+ ${d.when(this.showPreview,()=>c.html`
144
+ <schmancy-button
145
+ variant="outlined"
146
+ @click=${this.backToList}
147
+ class="px-6 py-3"
148
+ >
149
+ <schmancy-icon slot="prefix">arrow_back</schmancy-icon>
150
+ Back to Templates
151
+ </schmancy-button>
152
+ <schmancy-button
153
+ variant="filled"
154
+ @click=${this.confirmSelection}
155
+ class="px-8 py-3 bg-primary text-primary-on shadow-md hover:shadow-lg transition-shadow"
156
+ >
157
+ <schmancy-icon slot="prefix">check_circle</schmancy-icon>
158
+ Use This Template
159
+ </schmancy-button>
160
+ `,()=>c.html`
161
+ <div class="flex gap-3">
162
+ <schmancy-button
163
+ variant="text"
164
+ @click=${this.close}
165
+ class="px-6 py-3"
166
+ >
167
+ Cancel
168
+ </schmancy-button>
169
+ </div>
170
+ `)}
171
+ </div>
172
+ </div>
173
+ `}renderTemplateList(){return c.html`
174
+ <!-- Search and Filter Bar -->
175
+ <div class="px-6 py-4 border-b border-outline-variant bg-surface-containerLow">
176
+ <div class="flex flex-col gap-4">
177
+ <!-- Search Input -->
178
+ <schmancy-input
179
+ type="search"
180
+ placeholder="Search templates by name, category, or description..."
181
+ .value=${this.searchQuery}
182
+ @input=${this.handleSearch}
183
+ class="w-full"
184
+ >
185
+ <schmancy-icon slot="prefix" size="20px" class="text-surface-onVariant">search</schmancy-icon>
186
+ ${d.when(this.searchQuery,()=>c.html`
187
+ <schmancy-button
188
+ slot="suffix"
189
+ variant="text"
190
+ @click=${()=>{this.searchQuery=""}}
191
+ class="rounded-full w-8 h-8 p-0"
192
+ >
193
+ <schmancy-icon size="16px">close</schmancy-icon>
194
+ </schmancy-button>
195
+ `)}
196
+ </schmancy-input>
197
+
198
+ <!-- Category Filter -->
199
+ ${d.when(this.categories.length>1,()=>c.html`
200
+ <div class="flex gap-2 flex-wrap">
201
+ ${$.repeat(this.categories,e=>e,e=>c.html`
202
+ <schmancy-chip
203
+ class="cursor-pointer transition-all hover:shadow-sm ${this.selectedCategory===e?"bg-primary text-primary-on":"border border-outline"}"
204
+ @click=${()=>this.handleCategorySelect(e)}
205
+ >
206
+ ${e==="all"?"All Templates":e}
207
+ </schmancy-chip>
208
+ `)}
209
+ </div>
210
+ `)}
211
+ </div>
212
+ </div>
213
+
214
+ <!-- Template List -->
215
+ <div class="flex-1 overflow-y-auto px-6 py-6">
216
+ ${d.when(this.filteredTemplates.length>0,()=>c.html`
217
+ <div class="space-y-4">
218
+ ${$.repeat(this.filteredTemplates,e=>e.id,e=>c.html`
219
+ <schmancy-surface
220
+ type="containerLow"
221
+ elevation="1"
222
+ rounded="all"
223
+ class="group cursor-pointer hover:elevation-3 transition-all duration-200 p-4"
224
+ @click=${()=>this.selectTemplate(e)}
225
+ >
226
+ <div class="flex items-start justify-between gap-4">
227
+ <div class="flex-1">
228
+ <!-- Template Header -->
229
+ <div class="flex items-start justify-between mb-2">
230
+ <schmancy-typography type="title" token="md" class="font-semibold leading-tight">
231
+ ${e.name}
232
+ </schmancy-typography>
233
+ ${d.when(e.isDefault,()=>c.html`
234
+ <schmancy-chip class="bg-primary text-primary-on text-xs">
235
+ <schmancy-icon slot="prefix" size="12px">star</schmancy-icon>
236
+ Default
237
+ </schmancy-chip>
238
+ `)}
239
+ </div>
240
+
241
+ <!-- Category Badge -->
242
+ ${d.when(e.category,()=>c.html`
243
+ <div class="mb-2">
244
+ <schmancy-chip class="text-xs border border-outline">
245
+ ${e.category}
246
+ </schmancy-chip>
247
+ </div>
248
+ `)}
249
+
250
+ <!-- Description -->
251
+ ${d.when(e.description,()=>c.html`
252
+ <schmancy-typography type="body" token="sm" class="text-surface-onVariant leading-relaxed">
253
+ ${e.description}
254
+ </schmancy-typography>
255
+ `,()=>c.html`
256
+ <schmancy-typography type="body" token="sm" class="text-surface-onVariant opacity-60 italic">
257
+ No description available
258
+ </schmancy-typography>
259
+ `)}
260
+ </div>
261
+
262
+ <!-- Preview Button -->
263
+ <div class="flex-shrink-0">
264
+ <schmancy-button variant="outlined" size="sm">
265
+ <schmancy-icon slot="prefix">preview</schmancy-icon>
266
+ Preview
267
+ </schmancy-button>
268
+ </div>
269
+ </div>
270
+ </schmancy-surface>
271
+ `)}
272
+ </div>
273
+ `,()=>c.html`
274
+ <div class="flex flex-col items-center justify-center h-96 text-center">
275
+ <div class="mb-6">
276
+ <schmancy-icon size="64px" class="text-surface-onVariant opacity-20">mail_outline</schmancy-icon>
277
+ </div>
278
+ <schmancy-typography type="headline" token="sm" class="mb-2">
279
+ ${this.searchQuery||this.selectedCategory!=="all"?"No templates found":"No templates available"}
280
+ </schmancy-typography>
281
+ <schmancy-typography type="body" token="md" class="text-surface-onVariant mb-6 max-w-md">
282
+ ${this.searchQuery?`No templates match your search for "${this.searchQuery}"`:this.selectedCategory!=="all"?`No templates found in the "${this.selectedCategory}" category`:"Start by creating your first email template"}
283
+ </schmancy-typography>
284
+ ${d.when(this.searchQuery||this.selectedCategory!=="all",()=>c.html`
285
+ <div class="flex gap-3">
286
+ ${d.when(this.searchQuery,()=>c.html`
287
+ <schmancy-button
288
+ variant="outlined"
289
+ @click=${()=>{this.searchQuery=""}}
290
+ >
291
+ <schmancy-icon slot="prefix">clear</schmancy-icon>
292
+ Clear Search
293
+ </schmancy-button>
294
+ `)}
295
+ ${d.when(this.selectedCategory!=="all",()=>c.html`
296
+ <schmancy-button
297
+ variant="filled"
298
+ @click=${()=>this.handleCategorySelect("all")}
299
+ >
300
+ <schmancy-icon slot="prefix">view_list</schmancy-icon>
301
+ Show All Templates
302
+ </schmancy-button>
303
+ `)}
304
+ </div>
305
+ `)}
306
+ </div>
307
+ `)}
308
+ </div>
309
+ `}renderPreview(){return this.selectedTemplate?c.html`
310
+ <div class="flex-1 overflow-y-auto">
311
+ <!-- Template Header Section -->
312
+ <div class="px-6 py-6 border-b border-outline-variant bg-surface-containerLow">
313
+ <div class="flex items-start gap-6">
314
+ <!-- Template Thumbnail -->
315
+ ${d.when(this.selectedTemplate.thumbnail,()=>c.html`
316
+ <div class="flex-shrink-0">
317
+ <schmancy-surface elevation="2" rounded="all" class="overflow-hidden w-32 h-24">
318
+ <img
319
+ src=${this.selectedTemplate.thumbnail}
320
+ alt=${this.selectedTemplate.name}
321
+ class="w-full h-full object-cover"
322
+ />
323
+ </schmancy-surface>
324
+ </div>
325
+ `,()=>c.html`
326
+ <div class="flex-shrink-0">
327
+ <schmancy-surface elevation="1" rounded="all" class="w-32 h-24 bg-gradient-to-br from-surface-container to-surface-containerLow flex items-center justify-center">
328
+ <schmancy-icon size="32px" class="text-surface-onVariant opacity-40">mail</schmancy-icon>
329
+ </schmancy-surface>
330
+ </div>
331
+ `)}
332
+
333
+ <!-- Template Info -->
334
+ <div class="flex-1">
335
+ <div class="flex items-start justify-between mb-3">
336
+ <schmancy-typography type="headline" token="lg" class="font-semibold">
337
+ ${this.selectedTemplate.name}
338
+ </schmancy-typography>
339
+ ${d.when(this.selectedTemplate.isDefault,()=>c.html`
340
+ <schmancy-chip class="bg-primary text-primary-on">
341
+ <schmancy-icon slot="prefix" size="12px">star</schmancy-icon>
342
+ Default
343
+ </schmancy-chip>
344
+ `)}
345
+ </div>
346
+
347
+ <div class="flex flex-wrap gap-2 mb-3">
348
+ ${d.when(this.selectedTemplate.category,()=>c.html`
349
+ <schmancy-chip class="border border-outline">
350
+ <schmancy-icon slot="prefix" size="12px">category</schmancy-icon>
351
+ ${this.selectedTemplate.category}
352
+ </schmancy-chip>
353
+ `)}
354
+ ${d.when(this.selectedTemplate.createdAt,()=>c.html`
355
+ <schmancy-chip class="border border-outline">
356
+ <schmancy-icon slot="prefix" size="12px">schedule</schmancy-icon>
357
+ Created ${new Date(this.selectedTemplate.createdAt).toLocaleDateString()}
358
+ </schmancy-chip>
359
+ `)}
360
+ </div>
361
+
362
+ ${d.when(this.selectedTemplate.description,()=>c.html`
363
+ <schmancy-typography type="body" token="md" class="text-surface-onVariant leading-relaxed">
364
+ ${this.selectedTemplate.description}
365
+ </schmancy-typography>
366
+ `)}
367
+ </div>
368
+ </div>
369
+ </div>
370
+
371
+ <!-- Template Content -->
372
+ <div class="px-6 py-6 space-y-8">
373
+ <!-- Subject Preview -->
374
+ <div>
375
+ <div class="flex items-center gap-2 mb-4">
376
+ <schmancy-icon size="20px" class="text-primary">subject</schmancy-icon>
377
+ <schmancy-typography type="title" token="md" class="text-primary">
378
+ Subject Line
379
+ </schmancy-typography>
380
+ </div>
381
+ <schmancy-surface elevation="1" type="surface" class="p-4 border-l-4 border-primary">
382
+ <schmancy-typography type="body" token="md" class="font-medium">
383
+ ${this.selectedTemplate.subject}
384
+ </schmancy-typography>
385
+ </schmancy-surface>
386
+ </div>
387
+
388
+ <!-- Body Preview -->
389
+ <div>
390
+ <div class="flex items-center gap-2 mb-4">
391
+ <schmancy-icon size="20px" class="text-primary">article</schmancy-icon>
392
+ <schmancy-typography type="title" token="md" class="text-primary">
393
+ Email Preview
394
+ </schmancy-typography>
395
+ </div>
396
+ <schmancy-email-viewer
397
+ subject=${this.selectedTemplate.subject}
398
+ body=${this.selectedTemplate.body}
399
+ mode="desktop"
400
+ ></schmancy-email-viewer>
401
+ </div>
402
+ </div>
403
+ </div>
404
+ `:null}};w([r.property({type:Array})],v.prototype,"templates",2),w([r.state()],v.prototype,"searchQuery",2),w([r.state()],v.prototype,"selectedTemplate",2),w([r.state()],v.prototype,"filteredTemplates",2),w([r.state()],v.prototype,"showPreview",2),w([r.state()],v.prototype,"selectedCategory",2),v=w([r.customElement("schmancy-email-template-picker")],v);var L=Object.defineProperty,j=Object.getOwnPropertyDescriptor,f=(e,t,i,s)=>{for(var a,n=s>1?void 0:s?j(t,i):t,o=e.length-1;o>=0;o--)(a=e[o])&&(n=(s?a(t,i,n):a(n))||n);return s&&n&&L(t,i,n),n};exports.SchmancyEmailEditor=class extends S.$LitElement(c.css`
112
405
  :host {
113
406
  display: block;
114
407
  height: 100%;
115
408
  }
116
- `){constructor(){super(...arguments),this.subject="",this.body="",this.templates=[],this.disabled=!1,this.attachments=[],this.config={},this.selectedTemplate=null,this.dragOver=!1,this.isUploading=!1,this.subjectInputRef=f.createRef(),this.bodyTextAreaRef=f.createRef(),this.fileInputRef=f.createRef(),this.imageInputRef=f.createRef(),this.handleKeyDown=e=>{if(this.disabled)return;const t=this.bodyTextAreaRef.value?.shadowRoot?.querySelector("textarea");e.key==="Tab"&&e.target===t&&(e.preventDefault(),this.insertAtCursor(" "))},this.handlePaste=e=>{const t=this.bodyTextAreaRef.value?.shadowRoot?.querySelector("textarea");if(this.disabled||document.activeElement!==t)return;const i=e.clipboardData?.items;if(i)for(let s=0;s<i.length;s++){const a=i[s];if(a.type.indexOf("image")!==-1){e.preventDefault();const n=a.getAsFile();n&&this.uploadImage(n);break}}},this.handleSubjectChange=e=>{const t=e.target;this.subject=t.value,this.dispatchChange()},this.handleBodyChange=e=>{this.body=e.detail.value,this.dispatchChange()},this.selectTemplate=e=>{const t=this.templates.find(i=>i.id===e);t&&(this.subject=t.subject,this.body=t.body,this.selectedTemplate=e,this.dispatchChange())},this.clearTemplate=()=>{this.subject="",this.body="",this.selectedTemplate=null,this.dispatchChange()},this.dispatchChange=()=>{this.dispatchEvent(new CustomEvent("editor-change",{detail:{subject:this.subject,body:this.body,templateId:this.selectedTemplate,attachments:this.attachments},bubbles:!0,composed:!0}))},this.openLayoutDialog=()=>{S.$dialog.component(r.html`
409
+ `){constructor(){super(...arguments),this.subject="",this.body="",this.disabled=!1,this.attachments=[],this.config={},this.templates=this.getDefaultTemplates(),this.dragOver=!1,this.isUploading=!1,this.subjectInputRef=g.createRef(),this.bodyTextAreaRef=g.createRef(),this.fileInputRef=g.createRef(),this.imageInputRef=g.createRef(),this.handleKeyDown=e=>{if(this.disabled)return;const t=this.bodyTextAreaRef.value?.shadowRoot?.querySelector("textarea");e.key==="Tab"&&e.target===t&&(e.preventDefault(),this.insertAtCursor(" "))},this.handlePaste=e=>{const t=this.bodyTextAreaRef.value?.shadowRoot?.querySelector("textarea");if(this.disabled||document.activeElement!==t)return;const i=e.clipboardData?.items;if(i)for(let s=0;s<i.length;s++){const a=i[s];if(a.type.indexOf("image")!==-1){e.preventDefault();const n=a.getAsFile();n&&this.uploadImage(n);break}}},this.handleSubjectChange=e=>{const t=e.target;this.subject=t.value,this.dispatchChange()},this.handleBodyChange=e=>{this.body=e.detail.value,this.dispatchChange()},this.dispatchChange=()=>{this.dispatchEvent(new CustomEvent("editor-change",{detail:{subject:this.subject,body:this.body,attachments:this.attachments},bubbles:!0,composed:!0}))},this.openLayoutDialog=()=>{E.$dialog.component(c.html`
117
410
  <schmancy-email-layout-selector
118
- @layout-select=${e=>{this.applyLayout(e.detail.layout),S.$dialog.close()}}
411
+ @layout-select=${e=>{this.applyLayout(e.detail.layout),E.$dialog.close()}}
119
412
  ></schmancy-email-layout-selector>
120
- `)},this.applyLayout=e=>{const t={"columns-2":`
413
+ `)},this.openTemplatePicker=()=>{const e=new v;e.templates=this.templates,e.addEventListener("template-selected",this.handleTemplateSelected),k.sheet.open({component:e,title:"Choose Email Template"})},this.handleTemplateSelected=e=>{const t=e.detail;this.subject=t.subject,this.body=t.body,this.dispatchChange(),u.$notify.success(`Template "${t.name}" applied successfully`)},this.applyLayout=e=>{const t={"columns-2":`
121
414
  :::layout columns-2
122
415
  <div class="column">
123
416
  ![Left Photo](https://via.placeholder.com/400x300?text=Replace+with+your+photo){height=300px}
@@ -207,7 +500,196 @@ Your primary content goes here. This area takes up most of the width while the s
207
500
  ![Gallery Image 3](https://via.placeholder.com/400x250?text=Gallery+Image+3){height=250px}
208
501
  </div>
209
502
  :::
210
- `}[e];t&&this.insertAtCursor(t)},this.uploadImage=async e=>{if(!e.type.startsWith("image/"))return void g.$notify.error(`File "${e.name}" is not an image`);if(e.size>10485760)g.$notify.error(`Image "${e.name}" is too large. Maximum size is 10MB.`);else{this.isUploading=!0;try{let t;this.config.imageUploadHandler?t=await this.config.imageUploadHandler(e):this.config.uploadHandler?t=await this.config.uploadHandler(e):(t=await this.createDataUrl(e),g.$notify.warning("No upload handler configured. Using local preview."));const i=await this.getImageDimensions(e);this.insertImageMarkdown(t,e.name,i.width,i.height),g.$notify.success("Image uploaded successfully")}catch{g.$notify.error("Failed to upload image")}finally{this.isUploading=!1}}},this.createDataUrl=e=>new Promise((t,i)=>{const s=new FileReader;s.onload=()=>t(s.result),s.onerror=i,s.readAsDataURL(e)}),this.getImageDimensions=e=>new Promise(t=>{const i=new Image;i.onload=()=>{t({width:i.width,height:i.height}),URL.revokeObjectURL(i.src)},i.onerror=()=>{t({width:400,height:300}),URL.revokeObjectURL(i.src)},i.src=URL.createObjectURL(e)}),this.insertImageMarkdown=(e,t,i,s)=>{const a=this.bodyTextAreaRef.value?.shadowRoot?.querySelector("textarea");if(!a)return;const n=`![${t}](${e}){width=${Math.min(i,600)}px height=auto}`,l=a.selectionStart,o=a.selectionEnd,h=this.body.substring(0,l)+n+this.body.substring(o);this.body=h,this.dispatchChange(),this.updateComplete.then(()=>{const d=this.bodyTextAreaRef.value?.shadowRoot?.querySelector("textarea");if(d){const v=l+n.length;d.setSelectionRange(v,v),d.focus()}})},this.handleFileChange=e=>{const t=e.target,i=t.files;if(i)for(let s=0;s<i.length;s++){const a=i[s];a.type.startsWith("image/")?this.uploadImage(a):this.addFile(a)}t.value=""},this.handleImageSelect=e=>{const t=e.target,i=t.files?.[0];i&&i.type.startsWith("image/")&&this.uploadImage(i),t.value=""},this.handleDrop=e=>{e.preventDefault(),this.dragOver=!1;const t=e.dataTransfer?.files;if(t)for(let i=0;i<t.length;i++){const s=t[i];s.type.startsWith("image/")?this.uploadImage(s):this.addFile(s)}},this.handleDragEnter=e=>{e.preventDefault(),this.dragOver=!0},this.handleDocumentDragLeave=e=>{e.preventDefault(),this.dragOver=!1},this.handleDocumentDrop=e=>{e.preventDefault(),this.dragOver=!1},this.handleDragOver=e=>{e.preventDefault()},this.handleDragLeave=e=>{e.preventDefault()},this.addFile=e=>{if(e.size>10485760)return void g.$notify.error(`File "${e.name}" is too large. Maximum size is 10MB.`);if(this.attachments.some(i=>i.name===e.name&&i.size===e.size))return void g.$notify.warning(`File "${e.name}" is already attached.`);const t={id:crypto.randomUUID(),file:e,name:e.name,size:e.size,type:e.type||"application/octet-stream"};this.attachments=[...this.attachments,t],this.dispatchChange()},this.removeAttachment=e=>{this.attachments=this.attachments.filter(t=>t.id!==e),this.dispatchChange()}}connectedCallback(){super.connectedCallback(),this.addKeyboardListeners(),this.addDragListeners()}disconnectedCallback(){super.disconnectedCallback(),document.removeEventListener("paste",this.handlePaste),document.removeEventListener("dragenter",this.handleDragEnter),document.removeEventListener("dragleave",this.handleDocumentDragLeave),document.removeEventListener("drop",this.handleDocumentDrop)}addKeyboardListeners(){this.addEventListener("keydown",this.handleKeyDown),document.addEventListener("paste",this.handlePaste)}addDragListeners(){document.addEventListener("dragenter",this.handleDragEnter),document.addEventListener("dragleave",this.handleDocumentDragLeave),document.addEventListener("drop",this.handleDocumentDrop)}insertAtCursor(e,t){if(!this.bodyTextAreaRef.value)return;const i=this.bodyTextAreaRef.value.shadowRoot?.querySelector("textarea");if(!i)return;const s=i.selectionStart,a=i.selectionEnd,n=i.value.substring(0,s)+e+i.value.substring(a);this.body=n,this.dispatchChange(),this.updateComplete.then(()=>{const l=this.bodyTextAreaRef.value?.shadowRoot?.querySelector("textarea");if(l)if(l.focus(),t){const o=s+e.indexOf(t),h=o+t.length;l.setSelectionRange(o,h)}else l.setSelectionRange(s+e.length,s+e.length)})}wrapSelection(e,t,i){if(!this.bodyTextAreaRef.value)return;const s=this.bodyTextAreaRef.value.shadowRoot?.querySelector("textarea");if(!s)return;const a=s.selectionStart,n=s.selectionEnd,l=s.value.substring(a,n),o=e+(l||i)+t,h=s.value.substring(0,a)+o+s.value.substring(n);this.body=h,this.dispatchChange(),this.updateComplete.then(()=>{const d=this.bodyTextAreaRef.value?.shadowRoot?.querySelector("textarea");d&&(d.focus(),l?d.setSelectionRange(a+o.length,a+o.length):d.setSelectionRange(a+e.length,a+e.length+i.length))})}render(){return r.html`
503
+ `}[e];t&&this.insertAtCursor(t)},this.uploadImage=async e=>{if(!e.type.startsWith("image/"))return void u.$notify.error(`File "${e.name}" is not an image`);if(e.size>10485760)u.$notify.error(`Image "${e.name}" is too large. Maximum size is 10MB.`);else{this.isUploading=!0;try{let t;this.config.imageUploadHandler?t=await this.config.imageUploadHandler(e):this.config.uploadHandler?t=await this.config.uploadHandler(e):(t=await this.createDataUrl(e),u.$notify.warning("No upload handler configured. Using local preview."));const i=await this.getImageDimensions(e);this.insertImageMarkdown(t,e.name,i.width,i.height),u.$notify.success("Image uploaded successfully")}catch{u.$notify.error("Failed to upload image")}finally{this.isUploading=!1}}},this.createDataUrl=e=>new Promise((t,i)=>{const s=new FileReader;s.onload=()=>t(s.result),s.onerror=i,s.readAsDataURL(e)}),this.getImageDimensions=e=>new Promise(t=>{const i=new Image;i.onload=()=>{t({width:i.width,height:i.height}),URL.revokeObjectURL(i.src)},i.onerror=()=>{t({width:400,height:300}),URL.revokeObjectURL(i.src)},i.src=URL.createObjectURL(e)}),this.insertImageMarkdown=(e,t,i,s)=>{const a=this.bodyTextAreaRef.value?.shadowRoot?.querySelector("textarea");if(!a)return;const n=`![${t}](${e}){width=${Math.min(i,600)}px height=auto}`,o=a.selectionStart,l=a.selectionEnd,h=this.body.substring(0,o)+n+this.body.substring(l);this.body=h,this.dispatchChange(),this.updateComplete.then(()=>{const p=this.bodyTextAreaRef.value?.shadowRoot?.querySelector("textarea");if(p){const x=o+n.length;p.setSelectionRange(x,x),p.focus()}})},this.handleFileChange=e=>{const t=e.target,i=t.files;if(i)for(let s=0;s<i.length;s++){const a=i[s];a.type.startsWith("image/")?this.uploadImage(a):this.addFile(a)}t.value=""},this.handleImageSelect=e=>{const t=e.target,i=t.files?.[0];i&&i.type.startsWith("image/")&&this.uploadImage(i),t.value=""},this.handleDrop=e=>{e.preventDefault(),this.dragOver=!1;const t=e.dataTransfer?.files;if(t)for(let i=0;i<t.length;i++){const s=t[i];s.type.startsWith("image/")?this.uploadImage(s):this.addFile(s)}},this.handleDragEnter=e=>{e.preventDefault(),this.dragOver=!0},this.handleDocumentDragLeave=e=>{e.preventDefault(),this.dragOver=!1},this.handleDocumentDrop=e=>{e.preventDefault(),this.dragOver=!1},this.handleDragOver=e=>{e.preventDefault()},this.handleDragLeave=e=>{e.preventDefault()},this.addFile=e=>{if(e.size>10485760)return void u.$notify.error(`File "${e.name}" is too large. Maximum size is 10MB.`);if(this.attachments.some(i=>i.name===e.name&&i.size===e.size))return void u.$notify.warning(`File "${e.name}" is already attached.`);const t={id:crypto.randomUUID(),file:e,name:e.name,size:e.size,type:e.type||"application/octet-stream"};this.attachments=[...this.attachments,t],this.dispatchChange()},this.removeAttachment=e=>{this.attachments=this.attachments.filter(t=>t.id!==e),this.dispatchChange()}}connectedCallback(){super.connectedCallback(),this.addKeyboardListeners(),this.addDragListeners()}disconnectedCallback(){super.disconnectedCallback(),document.removeEventListener("paste",this.handlePaste),document.removeEventListener("dragenter",this.handleDragEnter),document.removeEventListener("dragleave",this.handleDocumentDragLeave),document.removeEventListener("drop",this.handleDocumentDrop)}getDefaultTemplates(){return[{id:"welcome",name:"Welcome Email",subject:"Welcome to Our Community! 🌟",description:"A warm welcome message for new users",category:"onboarding",body:`# Welcome to Our Community!
504
+
505
+ We're thrilled to have you on board. Thank you for joining us on this journey.
506
+
507
+ ## What's Next?
508
+
509
+ * **Explore** your dashboard and discover all the features
510
+ * **Connect** with other community members
511
+ * **Get support** whenever you need it - we're here to help
512
+
513
+ ---
514
+
515
+ *Need assistance? Simply reply to this email and we'll get back to you within 24 hours.*
516
+
517
+ Best regards,
518
+ The Team`},{id:"newsletter",name:"Newsletter",subject:"Weekly Insights & Updates",description:"Regular newsletter template with updates and insights",category:"communication",body:`# This Week's Highlights
519
+
520
+ ## Featured Story
521
+
522
+ **[Article Title]**
523
+ Brief description of the main story or update that you want to highlight this week.
524
+
525
+ [Read More](https://example.com)
526
+
527
+ ## Quick Updates
528
+
529
+ * **Update 1**: Brief description of an important update
530
+ * **Update 2**: Another noteworthy development
531
+ * **Update 3**: Additional news worth sharing
532
+
533
+ ## Upcoming Events
534
+
535
+ **[Event Name]** - *Date*
536
+ Short description of the upcoming event.
537
+
538
+ ---
539
+
540
+ *Thanks for reading! Forward this to a friend who might enjoy it.*
541
+
542
+ Until next week,
543
+ The Team`},{id:"product-launch",name:"Product Launch",subject:"Introducing Our Latest Innovation 🚀",description:"Announce new products or features",category:"marketing",body:`# Something Amazing is Here
544
+
545
+ We've been working hard behind the scenes, and today we're excited to introduce our latest creation.
546
+
547
+ ## Key Features
548
+
549
+ * **Feature 1**: Benefit that matters to your users
550
+ * **Feature 2**: Another compelling capability
551
+ * **Feature 3**: The feature that sets you apart
552
+
553
+ ## Early Access
554
+
555
+ As a valued member, you get **exclusive early access** starting today.
556
+
557
+ [Get Started Now](https://example.com)
558
+
559
+ ---
560
+
561
+ *Questions? We'd love to hear from you. Just hit reply!*
562
+
563
+ Best,
564
+ The Product Team`},{id:"event-invitation",name:"Event Invitation",subject:"You're Invited: [Event Name]",description:"Professional event invitation template",category:"events",body:`# You're Invited!
565
+
566
+ ## [Event Name]
567
+
568
+ **When**: [Date & Time]
569
+ **Where**: [Location or Virtual Link]
570
+ **Duration**: [Duration]
571
+
572
+ Join us for an exclusive gathering where we'll explore [brief event description].
573
+
574
+ ## What to Expect
575
+
576
+ * **Networking** with industry professionals
577
+ * **Insights** from leading experts
578
+ * **Interactive** sessions and discussions
579
+
580
+ ## RSVP Required
581
+
582
+ Space is limited, so please confirm your attendance by [RSVP Date].
583
+
584
+ [Confirm Attendance](https://example.com)
585
+
586
+ ---
587
+
588
+ *Can't make it? Let us know and we'll share the key highlights with you.*
589
+
590
+ Looking forward to seeing you there,
591
+ The Events Team`},{id:"thank-you",name:"Thank You",subject:"Thank You - It Means Everything",description:"Express gratitude to customers or supporters",category:"appreciation",body:`# Thank You
592
+
593
+ Your support means the world to us.
594
+
595
+ Whether you've been with us from the beginning or just joined our community, we want you to know how much we appreciate you.
596
+
597
+ ## Because of You
598
+
599
+ * We've been able to improve our service
600
+ * Our community has grown stronger
601
+ * We've achieved milestones we never thought possible
602
+
603
+ ## What's Next
604
+
605
+ We're committed to continuing to earn your trust and providing even more value in the coming months.
606
+
607
+ ---
608
+
609
+ *Your feedback shapes everything we do. Reply anytime with thoughts or suggestions.*
610
+
611
+ With genuine gratitude,
612
+ The Team`},{id:"feedback-request",name:"Feedback Request",subject:"Your Opinion Matters - 2 Minutes?",description:"Request feedback or reviews from users",category:"feedback",body:`# We'd Love Your Feedback
613
+
614
+ Your experience matters to us, and we're always looking for ways to improve.
615
+
616
+ ## Quick Favor?
617
+
618
+ Could you spare **2 minutes** to share your thoughts? Your honest feedback helps us serve you better.
619
+
620
+ [Share Your Feedback](https://example.com)
621
+
622
+ ## What We're Asking
623
+
624
+ * How has your experience been so far?
625
+ * What's working well for you?
626
+ * What could we improve?
627
+
628
+ ## Thank You Gift
629
+
630
+ As a small token of appreciation, everyone who completes our feedback form receives [incentive].
631
+
632
+ ---
633
+
634
+ *Every response is read personally by our team. We take your input seriously.*
635
+
636
+ Thanks in advance,
637
+ The Team`},{id:"password-reset",name:"Password Reset",subject:"Reset Your Password - Action Required",description:"Secure password reset instructions",category:"security",body:`# Password Reset Request
638
+
639
+ We received a request to reset the password for your account.
640
+
641
+ ## Reset Your Password
642
+
643
+ Click the button below to create a new password. This link will expire in **24 hours** for your security.
644
+
645
+ [Reset Password](https://example.com/reset)
646
+
647
+ ## Didn't Request This?
648
+
649
+ If you didn't request a password reset, please ignore this email. Your account remains secure.
650
+
651
+ ## Need Help?
652
+
653
+ If you're having trouble with the reset process, contact our support team and we'll assist you right away.
654
+
655
+ ---
656
+
657
+ *For security reasons, this link can only be used once and expires in 24 hours.*
658
+
659
+ Best regards,
660
+ Security Team`},{id:"order-confirmation",name:"Order Confirmation",subject:"Order Confirmed - #[ORDER-NUMBER]",description:"Professional order confirmation template",category:"commerce",body:`# Order Confirmation
661
+
662
+ Thanks for your order! We've received your payment and are preparing your items for shipment.
663
+
664
+ ## Order Details
665
+
666
+ **Order Number**: #[ORDER-NUMBER]
667
+ **Order Date**: [DATE]
668
+ **Total**: $[AMOUNT]
669
+
670
+ ## Items Ordered
671
+
672
+ * **[Item 1]** - Quantity: [QTY] - $[PRICE]
673
+ * **[Item 2]** - Quantity: [QTY] - $[PRICE]
674
+
675
+ ## Shipping Information
676
+
677
+ **Address**: [SHIPPING ADDRESS]
678
+ **Method**: [SHIPPING METHOD]
679
+ **Estimated Delivery**: [DELIVERY DATE]
680
+
681
+ ## Next Steps
682
+
683
+ You'll receive a tracking number via email once your order ships (usually within 1-2 business days).
684
+
685
+ [Track Your Order](https://example.com/track)
686
+
687
+ ---
688
+
689
+ *Questions about your order? Reply to this email or contact our support team.*
690
+
691
+ Thank you for your business,
692
+ The Fulfillment Team`}]}addKeyboardListeners(){this.addEventListener("keydown",this.handleKeyDown),document.addEventListener("paste",this.handlePaste)}addDragListeners(){document.addEventListener("dragenter",this.handleDragEnter),document.addEventListener("dragleave",this.handleDocumentDragLeave),document.addEventListener("drop",this.handleDocumentDrop)}insertAtCursor(e,t){if(!this.bodyTextAreaRef.value)return;const i=this.bodyTextAreaRef.value.shadowRoot?.querySelector("textarea");if(!i)return;const s=i.selectionStart,a=i.selectionEnd,n=i.value.substring(0,s)+e+i.value.substring(a);this.body=n,this.dispatchChange(),this.updateComplete.then(()=>{const o=this.bodyTextAreaRef.value?.shadowRoot?.querySelector("textarea");if(o)if(o.focus(),t){const l=s+e.indexOf(t),h=l+t.length;o.setSelectionRange(l,h)}else o.setSelectionRange(s+e.length,s+e.length)})}wrapSelection(e,t,i){if(!this.bodyTextAreaRef.value)return;const s=this.bodyTextAreaRef.value.shadowRoot?.querySelector("textarea");if(!s)return;const a=s.selectionStart,n=s.selectionEnd,o=s.value.substring(a,n),l=e+(o||i)+t,h=s.value.substring(0,a)+l+s.value.substring(n);this.body=h,this.dispatchChange(),this.updateComplete.then(()=>{const p=this.bodyTextAreaRef.value?.shadowRoot?.querySelector("textarea");p&&(p.focus(),o?p.setSelectionRange(a+l.length,a+l.length):p.setSelectionRange(a+e.length,a+e.length+i.length))})}render(){return c.html`
211
693
  <schmancy-surface
212
694
  type="surface"
213
695
  rounded="all"
@@ -218,44 +700,15 @@ Your primary content goes here. This area takes up most of the width while the s
218
700
  >
219
701
  <div class="flex flex-col h-full gap-4">
220
702
 
221
- <!-- Header Section with Templates and Subject -->
703
+ <!-- Header Section with Subject -->
222
704
  <div class="flex-shrink-0 p-4 pb-0 space-y-4">
223
- <!-- Template Selector -->
224
- ${p.when(this.templates.length>0,()=>r.html`
225
- <div class="space-y-3">
226
- <schmancy-typography type="label" token="md">
227
- Email Templates
228
- </schmancy-typography>
229
- <div class="flex flex-wrap gap-2">
230
- ${x.repeat(this.templates,e=>e.id,e=>r.html`
231
- <schmancy-chip
232
- ?selected=${this.selectedTemplate===e.id}
233
- @click=${()=>this.selectTemplate(e.id)}
234
- class="text-sm"
235
- >
236
- ${e.name}
237
- </schmancy-chip>
238
- `)}
239
- ${p.when(this.selectedTemplate,()=>r.html`
240
- <schmancy-button
241
- variant="text"
242
- @click=${this.clearTemplate}
243
- >
244
- <schmancy-icon slot="prefix" size="16px">clear</schmancy-icon>
245
- Clear
246
- </schmancy-button>
247
- `)}
248
- </div>
249
- </div>
250
- `)}
251
-
252
705
  <!-- Subject Field -->
253
706
  <div class="space-y-2">
254
707
  <schmancy-typography type="label" token="md">
255
708
  Subject *
256
709
  </schmancy-typography>
257
710
  <schmancy-input
258
- ${f.ref(this.subjectInputRef)}
711
+ ${g.ref(this.subjectInputRef)}
259
712
  .value=${this.subject}
260
713
  @input=${this.handleSubjectChange}
261
714
  placeholder="Enter email subject..."
@@ -341,7 +794,7 @@ Your primary content goes here. This area takes up most of the width while the s
341
794
  ?disabled=${this.disabled||this.isUploading}
342
795
  @click=${()=>this.imageInputRef.value?.click()}
343
796
  >
344
- ${p.when(this.isUploading,()=>r.html`<schmancy-progress size="sm" class="w-4 h-4"></schmancy-progress>`,()=>r.html`<schmancy-icon>image</schmancy-icon>`)}
797
+ ${d.when(this.isUploading,()=>c.html`<schmancy-progress size="sm" class="w-4 h-4"></schmancy-progress>`,()=>c.html`<schmancy-icon>image</schmancy-icon>`)}
345
798
  </schmancy-icon-button>
346
799
  <schmancy-icon-button
347
800
  size="sm"
@@ -350,7 +803,16 @@ Your primary content goes here. This area takes up most of the width while the s
350
803
  ?disabled=${this.disabled}
351
804
  @click=${this.openLayoutDialog}
352
805
  >
353
- <schmancy-icon>view_column</schmancy-icon>
806
+ <schmancy-icon>mobile_layout</schmancy-icon>
807
+ </schmancy-icon-button>
808
+ <schmancy-icon-button
809
+ size="sm"
810
+ variant="text"
811
+ title="Use Template"
812
+ ?disabled=${this.disabled||this.templates.length===0}
813
+ @click=${this.openTemplatePicker}
814
+ >
815
+ <schmancy-icon>description</schmancy-icon>
354
816
  </schmancy-icon-button>
355
817
  </div>
356
818
  </div>
@@ -360,7 +822,7 @@ Your primary content goes here. This area takes up most of the width while the s
360
822
  <!-- Textarea Container - Takes remaining space -->
361
823
  <div class="flex-1 px-4 relative min-h-0">
362
824
  <schmancy-textarea
363
- ${f.ref(this.bodyTextAreaRef)}
825
+ ${g.ref(this.bodyTextAreaRef)}
364
826
  .value=${this.body}
365
827
  @change=${this.handleBodyChange}
366
828
  placeholder="Enter your email message here...
@@ -377,7 +839,7 @@ Tab key inserts 2 spaces for better formatting."
377
839
  ></schmancy-textarea>
378
840
 
379
841
  <!-- Upload Progress Overlay -->
380
- ${p.when(this.isUploading,()=>r.html`
842
+ ${d.when(this.isUploading,()=>c.html`
381
843
  <div class="absolute top-3 right-3 z-10">
382
844
  <schmancy-surface type="container" rounded="all" class="p-2">
383
845
  <div class="flex items-center gap-2">
@@ -399,14 +861,14 @@ Tab key inserts 2 spaces for better formatting."
399
861
  </div>
400
862
 
401
863
  <!-- Attachments Display (if any) -->
402
- ${p.when(this.attachments.length>0,()=>r.html`
864
+ ${d.when(this.attachments.length>0,()=>c.html`
403
865
  <div class="space-y-2">
404
866
  <schmancy-typography type="label" token="sm" class="flex items-center gap-2">
405
867
  <schmancy-icon size="16px">attach_file</schmancy-icon>
406
868
  Attachments (${this.attachments.length})
407
869
  </schmancy-typography>
408
870
  <div class="flex flex-wrap gap-2">
409
- ${x.repeat(this.attachments,e=>e.id,e=>r.html`
871
+ ${$.repeat(this.attachments,e=>e.id,e=>c.html`
410
872
  <schmancy-chip class="text-xs">
411
873
  <span class="truncate max-w-32">${e.name}</span>
412
874
  <button
@@ -426,13 +888,13 @@ Tab key inserts 2 spaces for better formatting."
426
888
  <!-- Hidden File Inputs -->
427
889
  <div class="hidden">
428
890
  <input
429
- ${f.ref(this.fileInputRef)}
891
+ ${g.ref(this.fileInputRef)}
430
892
  type="file"
431
893
  multiple
432
894
  @change=${this.handleFileChange}
433
895
  >
434
896
  <input
435
- ${f.ref(this.imageInputRef)}
897
+ ${g.ref(this.imageInputRef)}
436
898
  type="file"
437
899
  accept="image/*"
438
900
  @change=${this.handleImageSelect}
@@ -441,19 +903,20 @@ Tab key inserts 2 spaces for better formatting."
441
903
 
442
904
  </div>
443
905
  </schmancy-surface>
444
- `}},u([c.property({type:String})],exports.SchmancyEmailEditor.prototype,"subject",2),u([c.property({type:String})],exports.SchmancyEmailEditor.prototype,"body",2),u([c.property({type:Array})],exports.SchmancyEmailEditor.prototype,"templates",2),u([c.property({type:Boolean})],exports.SchmancyEmailEditor.prototype,"disabled",2),u([c.property({type:Array})],exports.SchmancyEmailEditor.prototype,"attachments",2),u([c.property({type:Object})],exports.SchmancyEmailEditor.prototype,"config",2),u([c.state()],exports.SchmancyEmailEditor.prototype,"selectedTemplate",2),u([c.state()],exports.SchmancyEmailEditor.prototype,"dragOver",2),u([c.state()],exports.SchmancyEmailEditor.prototype,"isUploading",2),exports.SchmancyEmailEditor=u([c.customElement("schmancy-email-editor")],exports.SchmancyEmailEditor);var A=Object.defineProperty,D=Object.getOwnPropertyDescriptor,b=(e,t,i,s)=>{for(var a,n=s>1?void 0:s?D(t,i):t,l=e.length-1;l>=0;l--)(a=e[l])&&(n=(s?a(t,i,n):a(n))||n);return s&&n&&A(t,i,n),n};exports.SchmancyEmailViewer=class extends $.$LitElement(r.css`
906
+
907
+ `}},f([r.property({type:String})],exports.SchmancyEmailEditor.prototype,"subject",2),f([r.property({type:String})],exports.SchmancyEmailEditor.prototype,"body",2),f([r.property({type:Boolean})],exports.SchmancyEmailEditor.prototype,"disabled",2),f([r.property({type:Array})],exports.SchmancyEmailEditor.prototype,"attachments",2),f([r.property({type:Object})],exports.SchmancyEmailEditor.prototype,"config",2),f([r.property({type:Array})],exports.SchmancyEmailEditor.prototype,"templates",2),f([r.state()],exports.SchmancyEmailEditor.prototype,"dragOver",2),f([r.state()],exports.SchmancyEmailEditor.prototype,"isUploading",2),exports.SchmancyEmailEditor=f([r.customElement("schmancy-email-editor")],exports.SchmancyEmailEditor);var z=Object.defineProperty,P=Object.getOwnPropertyDescriptor,b=(e,t,i,s)=>{for(var a,n=s>1?void 0:s?P(t,i):t,o=e.length-1;o>=0;o--)(a=e[o])&&(n=(s?a(t,i,n):a(n))||n);return s&&n&&z(t,i,n),n};exports.SchmancyEmailViewer=class extends S.$LitElement(c.css`
445
908
  :host {
446
909
  display: block;
447
910
  }
448
- `){constructor(){super(...arguments),this.subject="",this.body="",this.attachments=[],this.recipients=[],this.fromAddress="sender@example.com",this.toAddress="recipient@example.com",this.viewMode="html"}parseLayoutBlocks(e){return e.replace(/:::layout\s+([a-zA-Z0-9-]+)\n([\s\S]*?)\n:::/g,(t,i,s)=>{switch(i){case"columns-2":return this.parseColumnsLayout(s,2);case"columns-3":return this.parseColumnsLayout(s,3);case"sidebar-left":return this.parseSidebarLayout(s,"left");case"sidebar-right":return this.parseSidebarLayout(s,"right");case"image-row":return this.parseImageRowLayout(s);default:return s}})}parseColumnsLayout(e,t){const i=/<div class="column">([\s\S]*?)<\/div>/g,s=[];let a;for(;(a=i.exec(e))!==null;)s.push(a[1].trim());if(s.length===0)return e;const n=Math.floor(100/t),l="0 10px 0 0";let o="<tr>";for(let h=0;h<t&&h<s.length;h++)o+=`
449
- <td width="${n}%" style="padding: ${h===t-1?"0":l}; vertical-align: top; font-family: Arial, Helvetica, sans-serif; font-size: 14px; line-height: 1.6; color: #333333;">
911
+ `){constructor(){super(...arguments),this.subject="",this.body="",this.attachments=[],this.recipients=[],this.fromAddress="sender@example.com",this.toAddress="recipient@example.com",this.viewMode="html"}parseLayoutBlocks(e){return e.replace(/:::layout\s+([a-zA-Z0-9-]+)\n([\s\S]*?)\n:::/g,(t,i,s)=>{switch(i){case"columns-2":return this.parseColumnsLayout(s,2);case"columns-3":return this.parseColumnsLayout(s,3);case"sidebar-left":return this.parseSidebarLayout(s,"left");case"sidebar-right":return this.parseSidebarLayout(s,"right");case"image-row":return this.parseImageRowLayout(s);default:return s}})}parseColumnsLayout(e,t){const i=/<div class="column">([\s\S]*?)<\/div>/g,s=[];let a;for(;(a=i.exec(e))!==null;)s.push(a[1].trim());if(s.length===0)return e;const n=Math.floor(100/t),o="0 10px 0 0";let l="<tr>";for(let h=0;h<t&&h<s.length;h++)l+=`
912
+ <td width="${n}%" style="padding: ${h===t-1?"0":o}; vertical-align: top; font-family: Arial, Helvetica, sans-serif; font-size: 14px; line-height: 1.6; color: #333333;">
450
913
  ${this.parseBasicMarkdown(s[h])}
451
- </td>`;for(let h=s.length;h<t;h++)o+=`
452
- <td width="${n}%" style="padding: ${h===t-1?"0":l}; vertical-align: top;">
914
+ </td>`;for(let h=s.length;h<t;h++)l+=`
915
+ <td width="${n}%" style="padding: ${h===t-1?"0":o}; vertical-align: top;">
453
916
  &nbsp;
454
- </td>`;return o+="</tr>",`
917
+ </td>`;return l+="</tr>",`
455
918
  <table cellpadding="0" cellspacing="0" border="0" width="100%" style="margin: 16px 0;">
456
- ${o}
919
+ ${l}
457
920
  </table>`}parseSidebarLayout(e,t){const i=e.match(/<div class="sidebar">([\s\S]*?)<\/div>/),s=e.match(/<div class="main">([\s\S]*?)<\/div>/);if(!i||!s)return e;const a=`
458
921
  <td width="30%" style="padding: 0 16px 0 0; vertical-align: top; font-family: Arial, Helvetica, sans-serif; font-size: 14px; line-height: 1.6; color: #333333;">
459
922
  ${this.parseBasicMarkdown(i[1].trim())}
@@ -463,13 +926,13 @@ Tab key inserts 2 spaces for better formatting."
463
926
  </td>`;return`
464
927
  <table cellpadding="0" cellspacing="0" border="0" width="100%" style="margin: 16px 0;">
465
928
  ${t==="left"?`<tr>${a}${n}</tr>`:`<tr>${n}${a.replace("0 16px 0 0","0 0 0 16px")}</tr>`}
466
- </table>`}parseImageRowLayout(e){const t=/<div class="image">([\s\S]*?)<\/div>/g,i=[];let s;for(;(s=t.exec(e))!==null;){const l=s[1].trim().match(/!\[([^\]]*)\]\(([^)]+)\)/);if(l){const[,o,h]=l;i.push(`<img src="${h}" alt="${o||"Image"}" style="display: block; max-width: 100%; height: auto;" border="0">`)}}if(i.length===0)return e;const a=Math.floor(100/i.length);let n="<tr>";return i.forEach((l,o)=>{const h=o===i.length-1;n+=`
929
+ </table>`}parseImageRowLayout(e){const t=/<div class="image">([\s\S]*?)<\/div>/g,i=[];let s;for(;(s=t.exec(e))!==null;){const o=s[1].trim().match(/!\[([^\]]*)\]\(([^)]+)\)/);if(o){const[,l,h]=o;i.push(`<img src="${h}" alt="${l||"Image"}" style="display: block; max-width: 100%; height: auto;" border="0">`)}}if(i.length===0)return e;const a=Math.floor(100/i.length);let n="<tr>";return i.forEach((o,l)=>{const h=l===i.length-1;n+=`
467
930
  <td width="${a}%" style="padding: ${h?"0":"0 8px 0 0"}; vertical-align: top; text-align: center;">
468
- ${l}
931
+ ${o}
469
932
  </td>`}),n+="</tr>",`
470
933
  <table cellpadding="0" cellspacing="0" border="0" width="100%" style="margin: 16px 0;">
471
934
  ${n}
472
- </table>`}parseImageAttributes(e){const t={};if(!e)return t;const i=e.match(/width=([^\s}]+)/);i&&(t.width=i[1]);const s=e.match(/height=([^\s}]+)/);return s&&(t.height=s[1]),e.includes("cover")&&(t.cover=!0),e.includes("contain")&&(t.contain=!0),t}generateImageStyles(e,t=!1){let i,s,a="display: block; margin: 8px 0; border: 0;";return e.width?e.width==="auto"?a+=t?" max-width: 100%; height: auto;":" height: auto;":e.width.endsWith("%")?(a+=` width: ${e.width}; max-width: 100%;`,e.height||(a+=" height: auto;")):e.width.endsWith("px")&&(i=e.width.replace("px",""),a+=" max-width: 100%;",e.height||(a+=" height: auto;")):a+=t?" width: 100%; max-width: 100%; height: auto;":" max-width: 100%; height: auto;",e.height&&(e.height==="auto"?a+=" height: auto;":e.height.endsWith("px")&&(s=e.height.replace("px",""),e.width||(a+=" max-width: 100%;"))),(e.cover||e.contain)&&(e.width||e.height||(a+=" width: 100%;")),{imgStyle:a,imgWidth:i,imgHeight:s}}parseBasicMarkdown(e){return e.replace(/!\[([^\]]*)\]\(([^)]+)\)(?:\{([^}]+)\})?/g,(t,i,s,a)=>{const n=this.parseImageAttributes(a),{imgStyle:l,imgWidth:o,imgHeight:h}=this.generateImageStyles(n,!0);let d=`<img src="${s}" alt="${i||"Image"}" style="${l}" border="0"`;return o&&(d+=` width="${o}"`),h&&(d+=` height="${h}"`),d+=">",d}).replace(/\n\n/g,'</p><p style="margin: 0 0 16px 0; padding: 0; font-family: Arial, Helvetica, sans-serif; font-size: 14px; line-height: 1.6; color: #333333;">').replace(/\n/g,"<br>").replace(/\*\*(.*?)\*\*/g,'<strong style="font-weight: bold;">$1</strong>').replace(/\*(.*?)\*/g,'<em style="font-style: italic;">$1</em>').replace(/\[([^\]]+)\]\(([^)]+)\)/g,'<a href="$2" style="color: #0066cc; text-decoration: underline;">$1</a>').replace(/^# (.*$)/gim,'<h2 style="margin: 16px 0 8px 0; padding: 0; font-family: Arial, Helvetica, sans-serif; font-size: 18px; font-weight: bold; color: #1a1a1a;">$1</h2>').replace(/^\* (.*$)/gim,'<li style="margin: 4px 0; font-family: Arial, Helvetica, sans-serif; font-size: 14px; color: #333333;">$1</li>').replace(/^\d+\. (.*$)/gim,'<li style="margin: 4px 0; font-family: Arial, Helvetica, sans-serif; font-size: 14px; color: #333333;">$1</li>').replace(/(<li[^>]*>.*?<\/li>(?:\s*<li[^>]*>.*?<\/li>)*)/gs,t=>{const i=/^\d+\./.test(t.replace(/<[^>]*>/g,""))?"ol":"ul";return`<${i} style="margin: 8px 0; padding: 0 0 0 20px; font-family: Arial, Helvetica, sans-serif;">${t}</${i}>`}).replace(/^(?!<[h\d]|<p|<ul|<ol|<li|<img)(.+)$/gim,'<p style="margin: 0 0 16px 0; padding: 0; font-family: Arial, Helvetica, sans-serif; font-size: 14px; line-height: 1.6; color: #333333;">$1</p>')}parseExtendedMarkdown(e){let t=e;return t=this.parseLayoutBlocks(t),t=t.replace(/:::images\s+(row|grid(?:=\d+)?)\n((?:!\[.*?\]\(.*?\)(?:\{.*?\})?\s*\n?)*?):::/g,"[Multiple Images - View in web browser]"),t=t.replace(/!\[([^\]]*)\]\(([^)]+)\)(?:\{([^}]+)\})?/g,(i,s,a,n)=>{const l=this.parseImageAttributes(n),{imgStyle:o,imgWidth:h,imgHeight:d}=this.generateImageStyles(l,!1);let v=`<img src="${a}" alt="${s||"Image"}" style="${o}" border="0"`;return h&&(v+=` width="${h}"`),d&&(v+=` height="${d}"`),v+=">",`<table cellpadding="0" cellspacing="0" border="0" style="margin: 16px 0;"><tr><td>${v}</td></tr></table>`}),t=t.replace(/\n\n/g,'</p><p style="margin: 0 0 16px 0; padding: 0; font-family: Arial, Helvetica, sans-serif; font-size: 14px; line-height: 1.6; color: #333333;">').replace(/\n/g,"<br>").replace(/\*\*(.*?)\*\*/g,'<strong style="font-weight: bold;">$1</strong>').replace(/\*(.*?)\*/g,'<em style="font-style: italic;">$1</em>').replace(/\[([^\]]+)\]\(([^)]+)\)/g,'<a href="$2" style="color: #0066cc; text-decoration: underline;">$1</a>').replace(/^# (.*$)/gim,'<table cellpadding="0" cellspacing="0" border="0" width="100%" style="margin: 24px 0 16px 0;"><tr><td><h1 style="margin: 0; padding: 0; font-family: Arial, Helvetica, sans-serif; font-size: 24px; font-weight: bold; color: #1a1a1a;">$1</h1></td></tr></table>').replace(/^\* (.*$)/gim,'<li style="margin: 4px 0; font-family: Arial, Helvetica, sans-serif; font-size: 14px; color: #333333;">$1</li>').replace(/^\d+\. (.*$)/gim,'<li style="margin: 4px 0; font-family: Arial, Helvetica, sans-serif; font-size: 14px; color: #333333;">$1</li>').replace(/^---$/gim,'<table cellpadding="0" cellspacing="0" border="0" width="100%" style="margin: 24px 0;"><tr><td style="border-top: 1px solid #e0e0e0; height: 1px; line-height: 1px;">&nbsp;</td></tr></table>'),t=t.replace(/(<li[^>]*>.*?<\/li>(?:\s*<li[^>]*>.*?<\/li>)*)/gs,i=>{const s=/^\d+\./.test(i.replace(/<[^>]*>/g,"")),a=s?"ol":"ul";return`<table cellpadding="0" cellspacing="0" border="0" width="100%"><tr><td><${a} style="margin: 16px 0; padding: 0 0 0 20px; font-family: Arial, Helvetica, sans-serif;">${i}</${a}></td></tr></table>`}),t.includes("<table>")||t.includes("<h1>")||(t=`<p style="margin: 0 0 16px 0; padding: 0; font-family: Arial, Helvetica, sans-serif; font-size: 14px; line-height: 1.6; color: #333333;">${t}</p>`),t=`<table cellpadding="0" cellspacing="0" border="0" width="100%" style="max-width: 600px; margin: 0 auto;">
935
+ </table>`}parseImageAttributes(e){const t={};if(!e)return t;const i=e.match(/width=([^\s}]+)/);i&&(t.width=i[1]);const s=e.match(/height=([^\s}]+)/);return s&&(t.height=s[1]),e.includes("cover")&&(t.cover=!0),e.includes("contain")&&(t.contain=!0),t}generateImageStyles(e,t=!1){let i,s,a="display: block; margin: 8px 0; border: 0;";return e.width?e.width==="auto"?a+=t?" max-width: 100%; height: auto;":" height: auto;":e.width.endsWith("%")?(a+=` width: ${e.width}; max-width: 100%;`,e.height||(a+=" height: auto;")):e.width.endsWith("px")&&(i=e.width.replace("px",""),a+=" max-width: 100%;",e.height||(a+=" height: auto;")):a+=t?" width: 100%; max-width: 100%; height: auto;":" max-width: 100%; height: auto;",e.height&&(e.height==="auto"?a+=" height: auto;":e.height.endsWith("px")&&(s=e.height.replace("px",""),e.width||(a+=" max-width: 100%;"))),(e.cover||e.contain)&&(e.width||e.height||(a+=" width: 100%;")),{imgStyle:a,imgWidth:i,imgHeight:s}}parseBasicMarkdown(e){return e.replace(/!\[([^\]]*)\]\(([^)]+)\)(?:\{([^}]+)\})?/g,(t,i,s,a)=>{const n=this.parseImageAttributes(a),{imgStyle:o,imgWidth:l,imgHeight:h}=this.generateImageStyles(n,!0);let p=`<img src="${s}" alt="${i||"Image"}" style="${o}" border="0"`;return l&&(p+=` width="${l}"`),h&&(p+=` height="${h}"`),p+=">",p}).replace(/\n\n/g,'</p><p style="margin: 0 0 16px 0; padding: 0; font-family: Arial, Helvetica, sans-serif; font-size: 14px; line-height: 1.6; color: #333333;">').replace(/\n/g,"<br>").replace(/\*\*(.*?)\*\*/g,'<strong style="font-weight: bold;">$1</strong>').replace(/\*(.*?)\*/g,'<em style="font-style: italic;">$1</em>').replace(/\[([^\]]+)\]\(([^)]+)\)/g,'<a href="$2" style="color: #0066cc; text-decoration: underline;">$1</a>').replace(/^# (.*$)/gim,'<h2 style="margin: 16px 0 8px 0; padding: 0; font-family: Arial, Helvetica, sans-serif; font-size: 18px; font-weight: bold; color: #1a1a1a;">$1</h2>').replace(/^\* (.*$)/gim,'<li style="margin: 4px 0; font-family: Arial, Helvetica, sans-serif; font-size: 14px; color: #333333;">$1</li>').replace(/^\d+\. (.*$)/gim,'<li style="margin: 4px 0; font-family: Arial, Helvetica, sans-serif; font-size: 14px; color: #333333;">$1</li>').replace(/(<li[^>]*>.*?<\/li>(?:\s*<li[^>]*>.*?<\/li>)*)/gs,t=>{const i=/^\d+\./.test(t.replace(/<[^>]*>/g,""))?"ol":"ul";return`<${i} style="margin: 8px 0; padding: 0 0 0 20px; font-family: Arial, Helvetica, sans-serif;">${t}</${i}>`}).replace(/^(?!<[h\d]|<p|<ul|<ol|<li|<img)(.+)$/gim,'<p style="margin: 0 0 16px 0; padding: 0; font-family: Arial, Helvetica, sans-serif; font-size: 14px; line-height: 1.6; color: #333333;">$1</p>')}parseExtendedMarkdown(e){let t=e;return t=this.parseLayoutBlocks(t),t=t.replace(/:::images\s+(row|grid(?:=\d+)?)\n((?:!\[.*?\]\(.*?\)(?:\{.*?\})?\s*\n?)*?):::/g,"[Multiple Images - View in web browser]"),t=t.replace(/!\[([^\]]*)\]\(([^)]+)\)(?:\{([^}]+)\})?/g,(i,s,a,n)=>{const o=this.parseImageAttributes(n),{imgStyle:l,imgWidth:h,imgHeight:p}=this.generateImageStyles(o,!1);let x=`<img src="${a}" alt="${s||"Image"}" style="${l}" border="0"`;return h&&(x+=` width="${h}"`),p&&(x+=` height="${p}"`),x+=">",`<table cellpadding="0" cellspacing="0" border="0" style="margin: 16px 0;"><tr><td>${x}</td></tr></table>`}),t=t.replace(/\n\n/g,'</p><p style="margin: 0 0 16px 0; padding: 0; font-family: Arial, Helvetica, sans-serif; font-size: 14px; line-height: 1.6; color: #333333;">').replace(/\n/g,"<br>").replace(/\*\*(.*?)\*\*/g,'<strong style="font-weight: bold;">$1</strong>').replace(/\*(.*?)\*/g,'<em style="font-style: italic;">$1</em>').replace(/\[([^\]]+)\]\(([^)]+)\)/g,'<a href="$2" style="color: #0066cc; text-decoration: underline;">$1</a>').replace(/^# (.*$)/gim,'<table cellpadding="0" cellspacing="0" border="0" width="100%" style="margin: 24px 0 16px 0;"><tr><td><h1 style="margin: 0; padding: 0; font-family: Arial, Helvetica, sans-serif; font-size: 24px; font-weight: bold; color: #1a1a1a;">$1</h1></td></tr></table>').replace(/^\* (.*$)/gim,'<li style="margin: 4px 0; font-family: Arial, Helvetica, sans-serif; font-size: 14px; color: #333333;">$1</li>').replace(/^\d+\. (.*$)/gim,'<li style="margin: 4px 0; font-family: Arial, Helvetica, sans-serif; font-size: 14px; color: #333333;">$1</li>').replace(/^---$/gim,'<table cellpadding="0" cellspacing="0" border="0" width="100%" style="margin: 24px 0;"><tr><td style="border-top: 1px solid #e0e0e0; height: 1px; line-height: 1px;">&nbsp;</td></tr></table>'),t=t.replace(/(<li[^>]*>.*?<\/li>(?:\s*<li[^>]*>.*?<\/li>)*)/gs,i=>{const s=/^\d+\./.test(i.replace(/<[^>]*>/g,"")),a=s?"ol":"ul";return`<table cellpadding="0" cellspacing="0" border="0" width="100%"><tr><td><${a} style="margin: 16px 0; padding: 0 0 0 20px; font-family: Arial, Helvetica, sans-serif;">${i}</${a}></td></tr></table>`}),t.includes("<table>")||t.includes("<h1>")||(t=`<p style="margin: 0 0 16px 0; padding: 0; font-family: Arial, Helvetica, sans-serif; font-size: 14px; line-height: 1.6; color: #333333;">${t}</p>`),t=`<table cellpadding="0" cellspacing="0" border="0" width="100%" style="max-width: 600px; margin: 0 auto;">
473
936
  <tr>
474
937
  <td style="padding: 0; font-family: Arial, Helvetica, sans-serif; font-size: 14px; line-height: 1.6; color: #333333;">
475
938
  ${t}
@@ -481,7 +944,7 @@ Tab key inserts 2 spaces for better formatting."
481
944
 
482
945
  `).trim()).replace(/:::images\s+(row|grid(?:=\d+)?)\n((?:!\[.*?\]\(.*?\)(?:\{.*?\})?\s*\n?)*?):::/g,"[Images]").replace(/!\[([^\]]*)\]\(([^)]+)\)(?:\{([^}]+)\})?/g,"[Image: $1]").replace(/\*\*(.*?)\*\*/g,"$1").replace(/\*(.*?)\*/g,"$1").replace(/__(.*?)__/g,"$1").replace(/~~(.*?)~~/g,"$1").replace(/`(.*?)`/g,"$1").replace(/^#{1,3} (.*$)/gim,"$1").replace(/^> (.*$)/gim,"$1").replace(/^\* (.*$)/gim,"• $1").replace(/^\d+\. (.*$)/gim,"$1").replace(/\[([^\]]+)\]\(([^)]+)\)/g,"$1 ($2)").replace(/^---$/gim,"---").replace(/\n\n+/g,`
483
946
 
484
- `)}formatFileSize(e){if(e===0)return"0 Bytes";const t=Math.floor(Math.log(e)/Math.log(1024));return parseFloat((e/Math.pow(1024,t)).toFixed(2))+" "+["Bytes","KB","MB","GB"][t]}render(){const e=this.parseExtendedMarkdown(this.body),t=this.convertToPlainText(this.body),i=this.recipients[0]||this.toAddress;return r.html`
947
+ `)}formatFileSize(e){if(e===0)return"0 Bytes";const t=Math.floor(Math.log(e)/Math.log(1024));return parseFloat((e/Math.pow(1024,t)).toFixed(2))+" "+["Bytes","KB","MB","GB"][t]}render(){const e=this.parseExtendedMarkdown(this.body),t=this.convertToPlainText(this.body),i=this.recipients[0]||this.toAddress;return c.html`
485
948
  <schmancy-surface type="surface" rounded="all" class="h-full flex flex-col">
486
949
 
487
950
  <!-- Header Section -->
@@ -564,7 +1027,7 @@ Tab key inserts 2 spaces for better formatting."
564
1027
  </schmancy-typography>
565
1028
  </div>
566
1029
  <schmancy-typography type="body" token="sm" class="font-medium flex-1">
567
- ${this.subject||r.html`<span class="italic text-surface-onVariant">(No subject)</span>`}
1030
+ ${this.subject||c.html`<span class="italic text-surface-onVariant">(No subject)</span>`}
568
1031
  </schmancy-typography>
569
1032
  </div>
570
1033
  </div>
@@ -572,17 +1035,17 @@ Tab key inserts 2 spaces for better formatting."
572
1035
 
573
1036
  <!-- Email Body Content -->
574
1037
  <div class="flex-1 overflow-y-auto min-h-0">
575
- ${p.when(this.body,()=>r.html`
576
- ${p.when(this.viewMode==="html",()=>r.html`
1038
+ ${d.when(this.body,()=>c.html`
1039
+ ${d.when(this.viewMode==="html",()=>c.html`
577
1040
  <div class="p-6 bg-white" style="color: #333; line-height: 1.6; font-family: system-ui, -apple-system, sans-serif; font-size: 14px;">
578
1041
  <div .innerHTML=${e}></div>
579
1042
  </div>
580
- `,()=>r.html`
1043
+ `,()=>c.html`
581
1044
  <div class="p-6 bg-white" style="color: #333; line-height: 1.6; font-family: 'Courier New', monospace; font-size: 13px; white-space: pre-wrap;">
582
1045
  ${t}
583
1046
  </div>
584
1047
  `)}
585
- `,()=>r.html`
1048
+ `,()=>c.html`
586
1049
  <!-- Empty State -->
587
1050
  <div class="flex-1 flex items-center justify-center p-8">
588
1051
  <div class="text-center space-y-3">
@@ -599,7 +1062,7 @@ Tab key inserts 2 spaces for better formatting."
599
1062
  </div>
600
1063
 
601
1064
  <!-- Attachments Section -->
602
- ${p.when(this.attachments.length>0,()=>r.html`
1065
+ ${d.when(this.attachments.length>0,()=>c.html`
603
1066
  <div class="flex-shrink-0 p-4 border-t border-outline-variant bg-surface-containerLowest">
604
1067
  <div class="space-y-3">
605
1068
  <!-- Attachments Header -->
@@ -612,7 +1075,7 @@ Tab key inserts 2 spaces for better formatting."
612
1075
 
613
1076
  <!-- Attachments List -->
614
1077
  <div class="grid gap-2 sm:grid-cols-2 lg:grid-cols-1 xl:grid-cols-2">
615
- ${x.repeat(this.attachments,s=>s.id,s=>r.html`
1078
+ ${$.repeat(this.attachments,s=>s.id,s=>c.html`
616
1079
  <schmancy-surface type="container" rounded="all" class="p-3">
617
1080
  <div class="flex items-center gap-3">
618
1081
  <!-- File Icon -->
@@ -640,7 +1103,7 @@ Tab key inserts 2 spaces for better formatting."
640
1103
  </div>
641
1104
 
642
1105
  <!-- Preview Stats -->
643
- ${p.when(this.body,()=>r.html`
1106
+ ${d.when(this.body,()=>c.html`
644
1107
  <div class="flex-shrink-0">
645
1108
  <schmancy-surface type="container" rounded="all" class="p-3">
646
1109
  <div class="flex items-center justify-center gap-6 text-center">
@@ -661,7 +1124,7 @@ Tab key inserts 2 spaces for better formatting."
661
1124
  ${this.body.trim()?this.body.trim().split(/\s+/).length:0}
662
1125
  </schmancy-typography>
663
1126
  </div>
664
- ${p.when(this.attachments.length>0,()=>r.html`
1127
+ ${d.when(this.attachments.length>0,()=>c.html`
665
1128
  <div class="w-px h-8 bg-outline-variant"></div>
666
1129
  <div>
667
1130
  <schmancy-typography type="body" token="xs" class="text-surface-onVariant">
@@ -679,19 +1142,19 @@ Tab key inserts 2 spaces for better formatting."
679
1142
 
680
1143
  </div>
681
1144
  </schmancy-surface>
682
- `}},b([c.property({type:String})],exports.SchmancyEmailViewer.prototype,"subject",2),b([c.property({type:String})],exports.SchmancyEmailViewer.prototype,"body",2),b([c.property({type:Array})],exports.SchmancyEmailViewer.prototype,"attachments",2),b([c.property({type:Array})],exports.SchmancyEmailViewer.prototype,"recipients",2),b([c.property({type:String})],exports.SchmancyEmailViewer.prototype,"fromAddress",2),b([c.property({type:String})],exports.SchmancyEmailViewer.prototype,"toAddress",2),b([c.state()],exports.SchmancyEmailViewer.prototype,"viewMode",2),exports.SchmancyEmailViewer=b([c.customElement("schmancy-email-viewer")],exports.SchmancyEmailViewer);var z=Object.defineProperty,L=Object.getOwnPropertyDescriptor,y=(e,t,i,s)=>{for(var a,n=s>1?void 0:s?L(t,i):t,l=e.length-1;l>=0;l--)(a=e[l])&&(n=(s?a(t,i,n):a(n))||n);return s&&n&&z(t,i,n),n};exports.SchmancyEmailRecipients=class extends $.$LitElement(r.css`
1145
+ `}},b([r.property({type:String})],exports.SchmancyEmailViewer.prototype,"subject",2),b([r.property({type:String})],exports.SchmancyEmailViewer.prototype,"body",2),b([r.property({type:Array})],exports.SchmancyEmailViewer.prototype,"attachments",2),b([r.property({type:Array})],exports.SchmancyEmailViewer.prototype,"recipients",2),b([r.property({type:String})],exports.SchmancyEmailViewer.prototype,"fromAddress",2),b([r.property({type:String})],exports.SchmancyEmailViewer.prototype,"toAddress",2),b([r.state()],exports.SchmancyEmailViewer.prototype,"viewMode",2),exports.SchmancyEmailViewer=b([r.customElement("schmancy-email-viewer")],exports.SchmancyEmailViewer);var M=Object.defineProperty,F=Object.getOwnPropertyDescriptor,y=(e,t,i,s)=>{for(var a,n=s>1?void 0:s?F(t,i):t,o=e.length-1;o>=0;o--)(a=e[o])&&(n=(s?a(t,i,n):a(n))||n);return s&&n&&M(t,i,n),n};exports.SchmancyEmailRecipients=class extends S.$LitElement(c.css`
683
1146
  :host {
684
1147
  display: block;
685
1148
  height: 100%;
686
1149
  }
687
- `){constructor(){super(...arguments),this.disabled=!1,this.recipients=[],this.selectedRecipients=[],this.enableCsvImport=!0,this.enableDragDrop=!0,this.title="Recipients",this.emptyStateTitle="No recipients yet",this.emptyStateMessage="Import from sources or upload a CSV",this.dragOver=!1,this.localSelectedRecipients=new Set,this.searchQuery="",this.filteredRecipients=[],this.boatState="minimized",this.fileInputRef=f.createRef(),this.handleEmailsImported=()=>{this.updateFilteredRecipients(),this.requestUpdate()},this.handleImportFromCSV=()=>{this.enableCsvImport&&this.fileInputRef.value?.click()},this.handleFileSelect=e=>{const t=e.target,i=t.files?.[0];i&&this.processCSVFile(i)},this.handleDrop=e=>{if(!this.enableDragDrop)return;e.preventDefault(),this.dragOver=!1;const t=e.dataTransfer?.files[0];t&&this.processCSVFile(t)},this.processCSVFile=e=>{if(!e.name.endsWith(".csv"))return void g.$notify.error("Please select a CSV file");const t=new FileReader;t.onload=i=>{const s=i.target?.result;try{const a=this.parseCSV(s);if(a.length===0)return void g.$notify.error("No valid email addresses found in CSV");this.dispatchEvent(new CustomEvent("emails-imported",{detail:{emails:a,source:"csv"},bubbles:!0,composed:!0})),g.$notify.success(`Imported ${a.length} emails from CSV file`)}catch{g.$notify.error("Failed to parse CSV file")}},t.readAsText(e)},this.toggleRecipientSelection=e=>{this.localSelectedRecipients.has(e)?this.localSelectedRecipients.delete(e):this.localSelectedRecipients.add(e),this.localSelectedRecipients=new Set(this.localSelectedRecipients),this.dispatchSelectionChange()},this.selectAll=()=>{this.localSelectedRecipients=new Set(this.filteredRecipients),this.dispatchSelectionChange()},this.selectNone=()=>{this.localSelectedRecipients.clear(),this.localSelectedRecipients=new Set,this.dispatchSelectionChange()},this.removeRecipient=e=>{this.dispatchEvent(new CustomEvent("recipient-removed",{detail:{email:e},bubbles:!0,composed:!0}))},this.clearAll=()=>{this.dispatchEvent(new CustomEvent("recipients-cleared",{bubbles:!0,composed:!0}))},this.updateFilteredRecipients=()=>{const e=Array.isArray(this.recipients)?this.recipients:[];if(this.searchQuery.trim()){const t=this.searchQuery.toLowerCase();this.filteredRecipients=e.filter(i=>i.toLowerCase().includes(t))}else this.filteredRecipients=[...e]},this.handleSearchInput=e=>{const t=e.target;this.searchQuery=t.value},this.clearSearch=()=>{this.searchQuery=""},this.dispatchSelectionChange=()=>{this.dispatchEvent(new CustomEvent("selection-changed",{detail:{selectedEmails:Array.from(this.localSelectedRecipients)},bubbles:!0,composed:!0}))},this.handleBoatStateChange=e=>{this.boatState=e.detail}}connectedCallback(){super.connectedCallback(),this.localSelectedRecipients=new Set(this.selectedRecipients),this.updateFilteredRecipients(),this.addEventListener("emails-imported",this.handleEmailsImported)}updated(e){super.updated(e),e.has("selectedRecipients")&&(this.localSelectedRecipients=new Set(this.selectedRecipients)),(e.has("recipients")||e.has("searchQuery"))&&this.updateFilteredRecipients(),e.has("recipients")&&this.requestUpdate()}parseCSV(e){const t=[];let i;i=this.csvParser?this.csvParser.parse(e,{header:!0,skipEmptyLines:!0,dynamicTyping:!0,delimiter:"",transformHeader:o=>o.trim()}):this.simpleCSVParse(e);const s=i.data,a=i.meta.fields||[];let n=a.find(o=>o.toLowerCase().includes("email"));if(!n)for(const o of a){const h=s[0]?.[o]?.toString();if(h&&this.isValidEmail(h)){n=o;break}}if(!n)throw new Error("No email column found in CSV");const l=new Set;for(const o of s){const h=o[n]?.toString();if(!h)continue;const d=h.toLowerCase().trim();this.isValidEmail(d)&&!l.has(d)&&(l.add(d),t.push(d))}return t}simpleCSVParse(e){const t=e.split(`
688
- `).filter(a=>a.trim());if(t.length===0)return{data:[],meta:{}};const i=t[0].split(",").map(a=>a.trim().replace(/"/g,"")),s=[];for(let a=1;a<t.length;a++){const n=t[a].split(",").map(o=>o.trim().replace(/"/g,"")),l={};i.forEach((o,h)=>{l[o]=n[h]||""}),s.push(l)}return{data:s,meta:{fields:i}}}isValidEmail(e){return/^[^\s@]+@[^\s@]+\.[^\s@]+$/.test(e.trim())}addRecipients(e){if(!e.length)return;const t=[...new Set([...this.recipients,...e])],i=e.filter(s=>!this.recipients.includes(s));this.recipients=t,this.selectedRecipients=[...new Set([...this.selectedRecipients,...i])],this.localSelectedRecipients=new Set(this.selectedRecipients),this.updateFilteredRecipients(),this.requestUpdate()}showBoat(){this.boatState="minimized"}hideBoat(){this.boatState="hidden"}expandBoat(){this.boatState="expanded"}toggleBoat(){this.boatState=this.boatState==="hidden"?"minimized":this.boatState==="minimized"?"expanded":"hidden"}render(){return this.renderBoatLayout()}renderBoatLayout(){return r.html`
1150
+ `){constructor(){super(...arguments),this.disabled=!1,this.recipients=[],this.selectedRecipients=[],this.enableCsvImport=!0,this.enableDragDrop=!0,this.title="Recipients",this.emptyStateTitle="No recipients yet",this.emptyStateMessage="Import from sources or upload a CSV",this.dragOver=!1,this.localSelectedRecipients=new Set,this.searchQuery="",this.filteredRecipients=[],this.boatState="minimized",this.fileInputRef=g.createRef(),this.handleEmailsImported=()=>{this.updateFilteredRecipients(),this.requestUpdate()},this.handleImportFromCSV=()=>{this.enableCsvImport&&this.fileInputRef.value?.click()},this.handleFileSelect=e=>{const t=e.target,i=t.files?.[0];i&&this.processCSVFile(i)},this.handleDrop=e=>{if(!this.enableDragDrop)return;e.preventDefault(),this.dragOver=!1;const t=e.dataTransfer?.files[0];t&&this.processCSVFile(t)},this.processCSVFile=e=>{if(!e.name.endsWith(".csv"))return void u.$notify.error("Please select a CSV file");const t=new FileReader;t.onload=i=>{const s=i.target?.result;try{const a=this.parseCSV(s);if(a.length===0)return void u.$notify.error("No valid email addresses found in CSV");this.dispatchEvent(new CustomEvent("emails-imported",{detail:{emails:a,source:"csv"},bubbles:!0,composed:!0})),u.$notify.success(`Imported ${a.length} emails from CSV file`)}catch{u.$notify.error("Failed to parse CSV file")}},t.readAsText(e)},this.toggleRecipientSelection=e=>{this.localSelectedRecipients.has(e)?this.localSelectedRecipients.delete(e):this.localSelectedRecipients.add(e),this.localSelectedRecipients=new Set(this.localSelectedRecipients),this.dispatchSelectionChange()},this.selectAll=()=>{this.localSelectedRecipients=new Set(this.filteredRecipients),this.dispatchSelectionChange()},this.selectNone=()=>{this.localSelectedRecipients.clear(),this.localSelectedRecipients=new Set,this.dispatchSelectionChange()},this.removeRecipient=e=>{this.dispatchEvent(new CustomEvent("recipient-removed",{detail:{email:e},bubbles:!0,composed:!0}))},this.clearAll=()=>{this.dispatchEvent(new CustomEvent("recipients-cleared",{bubbles:!0,composed:!0}))},this.updateFilteredRecipients=()=>{const e=Array.isArray(this.recipients)?this.recipients:[];if(this.searchQuery.trim()){const t=this.searchQuery.toLowerCase();this.filteredRecipients=e.filter(i=>i.toLowerCase().includes(t))}else this.filteredRecipients=[...e]},this.handleSearchInput=e=>{const t=e.target;this.searchQuery=t.value},this.clearSearch=()=>{this.searchQuery=""},this.dispatchSelectionChange=()=>{this.dispatchEvent(new CustomEvent("selection-changed",{detail:{selectedEmails:Array.from(this.localSelectedRecipients)},bubbles:!0,composed:!0}))},this.handleBoatStateChange=e=>{this.boatState=e.detail}}connectedCallback(){super.connectedCallback(),this.localSelectedRecipients=new Set(this.selectedRecipients),this.updateFilteredRecipients(),this.addEventListener("emails-imported",this.handleEmailsImported)}updated(e){super.updated(e),e.has("selectedRecipients")&&(this.localSelectedRecipients=new Set(this.selectedRecipients)),(e.has("recipients")||e.has("searchQuery"))&&this.updateFilteredRecipients(),e.has("recipients")&&this.requestUpdate()}parseCSV(e){const t=[];let i;i=this.csvParser?this.csvParser.parse(e,{header:!0,skipEmptyLines:!0,dynamicTyping:!0,delimiter:"",transformHeader:l=>l.trim()}):this.simpleCSVParse(e);const s=i.data,a=i.meta.fields||[];let n=a.find(l=>l.toLowerCase().includes("email"));if(!n)for(const l of a){const h=s[0]?.[l]?.toString();if(h&&this.isValidEmail(h)){n=l;break}}if(!n)throw new Error("No email column found in CSV");const o=new Set;for(const l of s){const h=l[n]?.toString();if(!h)continue;const p=h.toLowerCase().trim();this.isValidEmail(p)&&!o.has(p)&&(o.add(p),t.push(p))}return t}simpleCSVParse(e){const t=e.split(`
1151
+ `).filter(a=>a.trim());if(t.length===0)return{data:[],meta:{}};const i=t[0].split(",").map(a=>a.trim().replace(/"/g,"")),s=[];for(let a=1;a<t.length;a++){const n=t[a].split(",").map(l=>l.trim().replace(/"/g,"")),o={};i.forEach((l,h)=>{o[l]=n[h]||""}),s.push(o)}return{data:s,meta:{fields:i}}}isValidEmail(e){return/^[^\s@]+@[^\s@]+\.[^\s@]+$/.test(e.trim())}addRecipients(e){if(!e.length)return;const t=[...new Set([...this.recipients,...e])],i=e.filter(s=>!this.recipients.includes(s));this.recipients=t,this.selectedRecipients=[...new Set([...this.selectedRecipients,...i])],this.localSelectedRecipients=new Set(this.selectedRecipients),this.updateFilteredRecipients(),this.requestUpdate()}showBoat(){this.boatState="minimized"}hideBoat(){this.boatState="hidden"}expandBoat(){this.boatState="expanded"}toggleBoat(){this.boatState=this.boatState==="hidden"?"minimized":this.boatState==="minimized"?"expanded":"hidden"}render(){return this.renderBoatLayout()}renderBoatLayout(){return c.html`
689
1152
  <!-- Hidden file input for CSV import -->
690
- ${p.when(this.enableCsvImport,()=>r.html`
1153
+ ${d.when(this.enableCsvImport,()=>c.html`
691
1154
  <input
692
1155
  type="file"
693
1156
  accept=".csv"
694
- ${f.ref(this.fileInputRef)}
1157
+ ${g.ref(this.fileInputRef)}
695
1158
  @change=${this.handleFileSelect}
696
1159
  class="hidden"
697
1160
  />
@@ -708,7 +1171,7 @@ Tab key inserts 2 spaces for better formatting."
708
1171
  <schmancy-typography type="title" token="md" class="font-semibold">
709
1172
  ${this.title}
710
1173
  </schmancy-typography>
711
- ${p.when(this.recipients.length>0,()=>r.html`
1174
+ ${d.when(this.recipients.length>0,()=>c.html`
712
1175
  <schmancy-badge>
713
1176
  ${this.localSelectedRecipients.size}/${this.recipients.length}
714
1177
  </schmancy-badge>
@@ -721,7 +1184,7 @@ Tab key inserts 2 spaces for better formatting."
721
1184
  ${this.renderBoatContent()}
722
1185
  </div>
723
1186
  </schmancy-boat>
724
- `}renderBoatContent(){return r.html`
1187
+ `}renderBoatContent(){return c.html`
725
1188
  <!-- Search Bar and CSV Import on one line -->
726
1189
  <div class="p-4 flex gap-3">
727
1190
  <schmancy-input
@@ -731,7 +1194,7 @@ Tab key inserts 2 spaces for better formatting."
731
1194
  @input=${this.handleSearchInput}
732
1195
  class="flex-1"
733
1196
  >
734
- ${p.when(this.searchQuery,()=>r.html`
1197
+ ${d.when(this.searchQuery,()=>c.html`
735
1198
  <schmancy-button
736
1199
  slot="suffix"
737
1200
  variant="text"
@@ -742,7 +1205,7 @@ Tab key inserts 2 spaces for better formatting."
742
1205
  `)}
743
1206
  </schmancy-input>
744
1207
 
745
- ${p.when(this.enableCsvImport,()=>r.html`
1208
+ ${d.when(this.enableCsvImport,()=>c.html`
746
1209
  <schmancy-button
747
1210
  variant="outlined"
748
1211
  @click=${this.handleImportFromCSV}
@@ -754,7 +1217,7 @@ Tab key inserts 2 spaces for better formatting."
754
1217
  `)}
755
1218
  </div>
756
1219
 
757
- ${p.when(this.recipients.length>0,()=>r.html`
1220
+ ${d.when(this.recipients.length>0,()=>c.html`
758
1221
  <!-- Bulk Actions -->
759
1222
  <div class="px-4 pb-4">
760
1223
  <div class="flex items-center gap-3">
@@ -787,9 +1250,9 @@ Tab key inserts 2 spaces for better formatting."
787
1250
 
788
1251
  <!-- Recipients List -->
789
1252
  <div class="flex-1 overflow-y-auto px-4 pb-4">
790
- ${p.when(this.filteredRecipients.length>0,()=>r.html`
1253
+ ${d.when(this.filteredRecipients.length>0,()=>c.html`
791
1254
  <div class="flex flex-wrap gap-3">
792
- ${x.repeat(this.filteredRecipients,e=>e,e=>r.html`
1255
+ ${$.repeat(this.filteredRecipients,e=>e,e=>c.html`
793
1256
  <schmancy-button
794
1257
  variant=${this.localSelectedRecipients.has(e)?"filled":"outlined"}
795
1258
  @click=${t=>{t.stopPropagation(),t.preventDefault(),this.toggleRecipientSelection(e)}}
@@ -804,7 +1267,7 @@ Tab key inserts 2 spaces for better formatting."
804
1267
  </schmancy-button>
805
1268
  `)}
806
1269
  </div>
807
- `,()=>r.html`
1270
+ `,()=>c.html`
808
1271
  <div class="text-center py-8">
809
1272
  <schmancy-icon size="32px" class="opacity-50 mb-2">search_off</schmancy-icon>
810
1273
  <schmancy-typography type="body" token="sm" class="mb-2">
@@ -816,7 +1279,7 @@ Tab key inserts 2 spaces for better formatting."
816
1279
  </div>
817
1280
  `)}
818
1281
  </div>
819
- `,()=>r.html`
1282
+ `,()=>c.html`
820
1283
  <!-- Empty State -->
821
1284
  <div class="flex-1 flex items-center justify-center p-8">
822
1285
  <div class="text-center space-y-4">
@@ -832,7 +1295,7 @@ Tab key inserts 2 spaces for better formatting."
832
1295
  `)}
833
1296
 
834
1297
  <!-- Drag Overlay -->
835
- ${p.when(this.dragOver&&this.enableDragDrop,()=>r.html`
1298
+ ${d.when(this.dragOver&&this.enableDragDrop,()=>c.html`
836
1299
  <div
837
1300
  class="absolute inset-4 flex items-center justify-center border-2 border-dashed border-primary rounded-lg z-10"
838
1301
  @dragover=${e=>{e.preventDefault(),this.dragOver=!0}}
@@ -847,5 +1310,5 @@ Tab key inserts 2 spaces for better formatting."
847
1310
  </schmancy-surface>
848
1311
  </div>
849
1312
  `)}
850
- `}},y([c.property({type:Boolean})],exports.SchmancyEmailRecipients.prototype,"disabled",2),y([c.property({type:Array})],exports.SchmancyEmailRecipients.prototype,"recipients",2),y([c.property({type:Array})],exports.SchmancyEmailRecipients.prototype,"selectedRecipients",2),y([c.property({type:Boolean})],exports.SchmancyEmailRecipients.prototype,"enableCsvImport",2),y([c.property({type:Boolean})],exports.SchmancyEmailRecipients.prototype,"enableDragDrop",2),y([c.property({type:String})],exports.SchmancyEmailRecipients.prototype,"title",2),y([c.property({type:String})],exports.SchmancyEmailRecipients.prototype,"emptyStateTitle",2),y([c.property({type:String})],exports.SchmancyEmailRecipients.prototype,"emptyStateMessage",2),y([c.property({type:Object})],exports.SchmancyEmailRecipients.prototype,"csvParser",2),y([c.state()],exports.SchmancyEmailRecipients.prototype,"dragOver",2),y([c.state()],exports.SchmancyEmailRecipients.prototype,"localSelectedRecipients",2),y([c.state()],exports.SchmancyEmailRecipients.prototype,"searchQuery",2),y([c.state()],exports.SchmancyEmailRecipients.prototype,"filteredRecipients",2),y([c.state()],exports.SchmancyEmailRecipients.prototype,"boatState",2),exports.SchmancyEmailRecipients=y([c.customElement("schmancy-email-recipients")],exports.SchmancyEmailRecipients);
851
- //# sourceMappingURL=email-recipients-H9HVkFvE.cjs.map
1313
+ `}},y([r.property({type:Boolean})],exports.SchmancyEmailRecipients.prototype,"disabled",2),y([r.property({type:Array})],exports.SchmancyEmailRecipients.prototype,"recipients",2),y([r.property({type:Array})],exports.SchmancyEmailRecipients.prototype,"selectedRecipients",2),y([r.property({type:Boolean})],exports.SchmancyEmailRecipients.prototype,"enableCsvImport",2),y([r.property({type:Boolean})],exports.SchmancyEmailRecipients.prototype,"enableDragDrop",2),y([r.property({type:String})],exports.SchmancyEmailRecipients.prototype,"title",2),y([r.property({type:String})],exports.SchmancyEmailRecipients.prototype,"emptyStateTitle",2),y([r.property({type:String})],exports.SchmancyEmailRecipients.prototype,"emptyStateMessage",2),y([r.property({type:Object})],exports.SchmancyEmailRecipients.prototype,"csvParser",2),y([r.state()],exports.SchmancyEmailRecipients.prototype,"dragOver",2),y([r.state()],exports.SchmancyEmailRecipients.prototype,"localSelectedRecipients",2),y([r.state()],exports.SchmancyEmailRecipients.prototype,"searchQuery",2),y([r.state()],exports.SchmancyEmailRecipients.prototype,"filteredRecipients",2),y([r.state()],exports.SchmancyEmailRecipients.prototype,"boatState",2),exports.SchmancyEmailRecipients=y([r.customElement("schmancy-email-recipients")],exports.SchmancyEmailRecipients);
1314
+ //# sourceMappingURL=email-recipients-B9F9tbTi.cjs.map