@mhmo91/schmancy 0.4.68 → 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 (336) hide show
  1. package/dist/{animated-text-DWROCNAc.js → animated-text-CMITbL1U.js} +3 -3
  2. package/dist/{animated-text-DWROCNAc.js.map → animated-text-CMITbL1U.js.map} +1 -1
  3. package/dist/{animated-text-DC6DoZFp.cjs → animated-text-DefVTtAq.cjs} +2 -2
  4. package/dist/{animated-text-DC6DoZFp.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-vZfDiNZy.js → area.component-CVnJvyK0.js} +10 -10
  9. package/dist/{area.component-vZfDiNZy.js.map → area.component-CVnJvyK0.js.map} +1 -1
  10. package/dist/{area.component-tnIDc9kT.cjs → area.component-CxVp3gZp.cjs} +2 -2
  11. package/dist/{area.component-tnIDc9kT.cjs.map → area.component-CxVp3gZp.cjs.map} +1 -1
  12. package/dist/area.js +1 -1
  13. package/dist/{autocomplete-D-68OyCe.js → autocomplete-DTm45vy3.js} +3 -3
  14. package/dist/{autocomplete-D-68OyCe.js.map → autocomplete-DTm45vy3.js.map} +1 -1
  15. package/dist/{autocomplete-C5fz6X5-.cjs → autocomplete-DZgp2iwf.cjs} +2 -2
  16. package/dist/{autocomplete-C5fz6X5-.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-DbWoxALg.js → avatar-Cp3pBHJ0.js} +63 -61
  20. package/dist/{avatar-DbWoxALg.js.map → avatar-Cp3pBHJ0.js.map} +1 -1
  21. package/dist/{avatar-f1s6Rri7.cjs → avatar-Dexe_o7K.cjs} +2 -2
  22. package/dist/{avatar-f1s6Rri7.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-DeMH4PII.cjs → boat-DTLpjckT.cjs} +2 -2
  26. package/dist/{boat-DeMH4PII.cjs.map → boat-DTLpjckT.cjs.map} +1 -1
  27. package/dist/{boat-DA_B_UOn.js → boat-DiWtHOng.js} +2 -2
  28. package/dist/{boat-DA_B_UOn.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-iwkV_VZd.js → checkbox-CatOf2np.js} +2 -2
  38. package/dist/{checkbox-iwkV_VZd.js.map → checkbox-CatOf2np.js.map} +1 -1
  39. package/dist/{checkbox-d6KUhyv1.cjs → checkbox-DIbnOfL2.cjs} +2 -2
  40. package/dist/{checkbox-d6KUhyv1.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-BXYlvuv1.cjs → chips-DtPe3B90.cjs} +2 -2
  44. package/dist/{chips-BXYlvuv1.cjs.map → chips-DtPe3B90.cjs.map} +1 -1
  45. package/dist/{chips--CHI-PBC.js → chips-zrYIeivA.js} +3 -3
  46. package/dist/{chips--CHI-PBC.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-CLWEbiLF.js → code-preview-CnfzlCWq.js} +2 -2
  52. package/dist/{code-preview-CLWEbiLF.js.map → code-preview-CnfzlCWq.js.map} +1 -1
  53. package/dist/{code-preview-DaI_YMOB.cjs → code-preview-DMIT_oTX.cjs} +2 -2
  54. package/dist/{code-preview-DaI_YMOB.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-CHWNwZmy.cjs → date-range-CAAjykaN.cjs} +2 -2
  60. package/dist/{date-range-CHWNwZmy.cjs.map → date-range-CAAjykaN.cjs.map} +1 -1
  61. package/dist/{date-range-lT3ch0CJ.js → date-range-alXAlxtp.js} +4 -4
  62. package/dist/{date-range-lT3ch0CJ.js.map → date-range-alXAlxtp.js.map} +1 -1
  63. package/dist/{date-range-inline-eCsAJVSI.cjs → date-range-inline-DCYLf0py.cjs} +2 -2
  64. package/dist/{date-range-inline-eCsAJVSI.cjs.map → date-range-inline-DCYLf0py.cjs.map} +1 -1
  65. package/dist/{date-range-inline-BrblUJWk.js → date-range-inline-GGJ-b5Ji.js} +3 -3
  66. package/dist/{date-range-inline-BrblUJWk.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-DF3m820G.js → delay-BX1HD8i5.js} +2 -2
  72. package/dist/{delay-DF3m820G.js.map → delay-BX1HD8i5.js.map} +1 -1
  73. package/dist/{delay-CN1qSEKQ.cjs → delay-DnJcmVMd.cjs} +2 -2
  74. package/dist/{delay-CN1qSEKQ.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-WlWNEznx.cjs → details-B-SW_Fin.cjs} +2 -2
  78. package/dist/{details-WlWNEznx.cjs.map → details-B-SW_Fin.cjs.map} +1 -1
  79. package/dist/{details-B0TayDAR.js → details-DJdIO2Op.js} +2 -2
  80. package/dist/{details-B0TayDAR.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-Bu-1wPol.js → dialog-content-CDfCvaaL.js} +4 -4
  84. package/dist/{dialog-content-Bu-1wPol.js.map → dialog-content-CDfCvaaL.js.map} +1 -1
  85. package/dist/{dialog-content-DxSr-3n2.cjs → dialog-content-DBlOSail.cjs} +2 -2
  86. package/dist/{dialog-content-DxSr-3n2.cjs.map → dialog-content-DBlOSail.cjs.map} +1 -1
  87. package/dist/dialog-service-C4ko20zk.cjs +2 -0
  88. package/dist/dialog-service-C4ko20zk.cjs.map +1 -0
  89. package/dist/dialog-service-DoKaWw88.js +141 -0
  90. package/dist/dialog-service-DoKaWw88.js.map +1 -0
  91. package/dist/dialog.cjs +1 -1
  92. package/dist/dialog.js +2 -2
  93. package/dist/{divider-DMelIbAX.js → divider-TH_rknPx.js} +3 -3
  94. package/dist/{divider-DMelIbAX.js.map → divider-TH_rknPx.js.map} +1 -1
  95. package/dist/{divider-6-gngn50.cjs → divider-xwxPJtAX.cjs} +2 -2
  96. package/dist/{divider-6-gngn50.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-DQgspBt5.cjs → dropdown-content-BdHciywm.cjs} +2 -2
  100. package/dist/{dropdown-content-DQgspBt5.cjs.map → dropdown-content-BdHciywm.cjs.map} +1 -1
  101. package/dist/{dropdown-content-CWyaIopS.js → dropdown-content-CSwcyUQ9.js} +3 -3
  102. package/dist/{dropdown-content-CWyaIopS.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-B9F9tbTi.cjs +1314 -0
  106. package/dist/email-recipients-B9F9tbTi.cjs.map +1 -0
  107. package/dist/email-recipients-BH3-shuO.js +1882 -0
  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-CPva0jtS.js → flex-D8gAI_hG.js} +2 -2
  112. package/dist/{flex-CPva0jtS.js.map → flex-D8gAI_hG.js.map} +1 -1
  113. package/dist/{flex-uUxnTzlw.cjs → flex-DpTCuZUb.cjs} +2 -2
  114. package/dist/{flex-uUxnTzlw.cjs.map → flex-DpTCuZUb.cjs.map} +1 -1
  115. package/dist/{form-zJGrEXrf.js → form-BZjCPbr9.js} +2 -2
  116. package/dist/{form-zJGrEXrf.js.map → form-BZjCPbr9.js.map} +1 -1
  117. package/dist/{form-DPXb7Fad.cjs → form-CVRfikGe.cjs} +2 -2
  118. package/dist/{form-DPXb7Fad.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-CfRnxkkt.js → formField.mixin-Ljb1niLU.js} +2 -2
  122. package/dist/{formField.mixin-CfRnxkkt.js.map → formField.mixin-Ljb1niLU.js.map} +1 -1
  123. package/dist/{formField.mixin-DWGkWIQa.cjs → formField.mixin-OMhAnwUx.cjs} +2 -2
  124. package/dist/{formField.mixin-DWGkWIQa.cjs.map → formField.mixin-OMhAnwUx.cjs.map} +1 -1
  125. package/dist/{icon-YYb239jY.cjs → icon-DX0oxbGd.cjs} +2 -2
  126. package/dist/{icon-YYb239jY.cjs.map → icon-DX0oxbGd.cjs.map} +1 -1
  127. package/dist/{icon-DZYFOov6.js → icon-P0BSH_XX.js} +2 -2
  128. package/dist/{icon-DZYFOov6.js.map → icon-P0BSH_XX.js.map} +1 -1
  129. package/dist/{icon-button-DeFeauMH.js → icon-button-CHc7Bgkr.js} +3 -3
  130. package/dist/{icon-button-DeFeauMH.js.map → icon-button-CHc7Bgkr.js.map} +1 -1
  131. package/dist/{icon-button-Yrq8D9rB.cjs → icon-button-GkluRkNE.cjs} +2 -2
  132. package/dist/{icon-button-Yrq8D9rB.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 +203 -196
  137. package/dist/index.js.map +1 -1
  138. package/dist/{input-BsMQq8Or.js → input-BxzFCM0j.js} +3 -3
  139. package/dist/{input-BsMQq8Or.js.map → input-BxzFCM0j.js.map} +1 -1
  140. package/dist/{input-BX4VAA8U.cjs → input-qI9CER23.cjs} +2 -2
  141. package/dist/{input-BX4VAA8U.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-Bww4Iiey.cjs → list-BBCV7EZh.cjs} +2 -2
  147. package/dist/{list-Bww4Iiey.cjs.map → list-BBCV7EZh.cjs.map} +1 -1
  148. package/dist/{list-D9HxZJmG.js → list-CD6Ue96E.js} +2 -2
  149. package/dist/{list-D9HxZJmG.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-CLjCvtPx.js → litElement.mixin-BSsJVIyj.js} +2 -2
  153. package/dist/{litElement.mixin-CLjCvtPx.js.map → litElement.mixin-BSsJVIyj.js.map} +1 -1
  154. package/dist/{litElement.mixin-C98sb2sB.cjs → litElement.mixin-D8xYT3dQ.cjs} +2 -2
  155. package/dist/{litElement.mixin-C98sb2sB.cjs.map → litElement.mixin-D8xYT3dQ.cjs.map} +1 -1
  156. package/dist/mailbox.cjs +2 -0
  157. package/dist/mailbox.cjs.map +1 -0
  158. package/dist/mailbox.js +9 -0
  159. package/dist/mailbox.js.map +1 -0
  160. package/dist/{map-CZEpXVR1.cjs → map-CVeIZTSC.cjs} +2 -2
  161. package/dist/{map-CZEpXVR1.cjs.map → map-CVeIZTSC.cjs.map} +1 -1
  162. package/dist/{map-1mMvYo0I.js → map-D637QcQS.js} +2 -2
  163. package/dist/{map-1mMvYo0I.js.map → map-D637QcQS.js.map} +1 -1
  164. package/dist/map.cjs +1 -1
  165. package/dist/map.js +1 -1
  166. package/dist/{media-CGPGcf2N.js → media-CXv34EUE.js} +2 -2
  167. package/dist/{media-CGPGcf2N.js.map → media-CXv34EUE.js.map} +1 -1
  168. package/dist/{media-Dq-o2otE.cjs → media-ng9D3LV4.cjs} +2 -2
  169. package/dist/{media-Dq-o2otE.cjs.map → media-ng9D3LV4.cjs.map} +1 -1
  170. package/dist/{menu-DrrQkRZL.js → menu-B5aEANFb.js} +3 -3
  171. package/dist/{menu-DrrQkRZL.js.map → menu-B5aEANFb.js.map} +1 -1
  172. package/dist/{menu-Bl0w5kB_.cjs → menu-BKqFx_Sg.cjs} +2 -2
  173. package/dist/{menu-Bl0w5kB_.cjs.map → menu-BKqFx_Sg.cjs.map} +1 -1
  174. package/dist/menu.cjs +1 -1
  175. package/dist/menu.js +1 -1
  176. package/dist/nav-drawer.cjs +1 -1
  177. package/dist/nav-drawer.js +1 -1
  178. package/dist/netlify.toml +366 -0
  179. package/dist/{notification-service-BE2zvE-H.cjs → notification-service-BL_SA5r6.cjs} +2 -2
  180. package/dist/{notification-service-BE2zvE-H.cjs.map → notification-service-BL_SA5r6.cjs.map} +1 -1
  181. package/dist/{notification-service-DNKVvHBY.js → notification-service-BO0LiH62.js} +4 -4
  182. package/dist/{notification-service-DNKVvHBY.js.map → notification-service-BO0LiH62.js.map} +1 -1
  183. package/dist/notification.cjs +1 -1
  184. package/dist/notification.js +2 -2
  185. package/dist/{notify-DMUxXGK4.cjs → notify-DiIsT6_U.cjs} +2 -2
  186. package/dist/{notify-DMUxXGK4.cjs.map → notify-DiIsT6_U.cjs.map} +1 -1
  187. package/dist/{notify-BrKEcp4z.js → notify-sR_wpqSL.js} +2 -2
  188. package/dist/{notify-BrKEcp4z.js.map → notify-sR_wpqSL.js.map} +1 -1
  189. package/dist/{option-CugRKlmM.cjs → option-Bna3I9yk.cjs} +2 -2
  190. package/dist/{option-CugRKlmM.cjs.map → option-Bna3I9yk.cjs.map} +1 -1
  191. package/dist/{option-Ds5MbbtW.js → option-Wdzvm3xE.js} +2 -2
  192. package/dist/{option-Ds5MbbtW.js.map → option-Wdzvm3xE.js.map} +1 -1
  193. package/dist/option.cjs +1 -1
  194. package/dist/option.js +1 -1
  195. package/dist/{payment-card-form-BUQze-h_.js → payment-card-form-BanESqh4.js} +3 -3
  196. package/dist/{payment-card-form-BUQze-h_.js.map → payment-card-form-BanESqh4.js.map} +1 -1
  197. package/dist/{payment-card-form-DagrNF-H.cjs → payment-card-form-D_F0Qk8m.cjs} +2 -2
  198. package/dist/{payment-card-form-DagrNF-H.cjs.map → payment-card-form-D_F0Qk8m.cjs.map} +1 -1
  199. package/dist/{progress-C9_S0erz.cjs → progress-DWUvgJRQ.cjs} +2 -2
  200. package/dist/{progress-C9_S0erz.cjs.map → progress-DWUvgJRQ.cjs.map} +1 -1
  201. package/dist/{progress-CMR28yUw.js → progress-lCHm-5Qd.js} +2 -2
  202. package/dist/{progress-CMR28yUw.js.map → progress-lCHm-5Qd.js.map} +1 -1
  203. package/dist/progress.cjs +1 -1
  204. package/dist/progress.js +1 -1
  205. package/dist/{radio-button-CdvyPFKn.cjs → radio-button-BgvPoY5w.cjs} +2 -2
  206. package/dist/{radio-button-CdvyPFKn.cjs.map → radio-button-BgvPoY5w.cjs.map} +1 -1
  207. package/dist/{radio-button-DKSwDv7G.js → radio-button-CXX8rL5Z.js} +3 -3
  208. package/dist/{radio-button-DKSwDv7G.js.map → radio-button-CXX8rL5Z.js.map} +1 -1
  209. package/dist/radio-group.cjs +1 -1
  210. package/dist/radio-group.js +1 -1
  211. package/dist/{schmancy-steps-container-CsU-IwKt.cjs → schmancy-steps-container-WmpbfnAv.cjs} +2 -2
  212. package/dist/{schmancy-steps-container-CsU-IwKt.cjs.map → schmancy-steps-container-WmpbfnAv.cjs.map} +1 -1
  213. package/dist/{schmancy-steps-container-o660nlUA.js → schmancy-steps-container-dAv2AQ1o.js} +2 -2
  214. package/dist/{schmancy-steps-container-o660nlUA.js.map → schmancy-steps-container-dAv2AQ1o.js.map} +1 -1
  215. package/dist/{select-ukml9TYC.js → select-BFHRO7D1.js} +3 -3
  216. package/dist/{select-ukml9TYC.js.map → select-BFHRO7D1.js.map} +1 -1
  217. package/dist/{select-Cpxpfm_m.cjs → select-C4ysSiyb.cjs} +2 -2
  218. package/dist/{select-Cpxpfm_m.cjs.map → select-C4ysSiyb.cjs.map} +1 -1
  219. package/dist/select.cjs +1 -1
  220. package/dist/select.js +1 -1
  221. package/dist/sheet-Bm7AdMAf.js +144 -0
  222. package/dist/sheet-Bm7AdMAf.js.map +1 -0
  223. package/dist/sheet-BrWQNETX.cjs +52 -0
  224. package/dist/sheet-BrWQNETX.cjs.map +1 -0
  225. package/dist/sheet.cjs +1 -1
  226. package/dist/sheet.js +6 -5
  227. package/dist/sheet.js.map +1 -1
  228. package/dist/sheet.service-CgKnOzZN.js +87 -0
  229. package/dist/sheet.service-CgKnOzZN.js.map +1 -0
  230. package/dist/sheet.service-DGYkGKzX.cjs +2 -0
  231. package/dist/sheet.service-DGYkGKzX.cjs.map +1 -0
  232. package/dist/{slider-BhxlOVWT.js → slider-DtMki7JS.js} +3 -3
  233. package/dist/{slider-BhxlOVWT.js.map → slider-DtMki7JS.js.map} +1 -1
  234. package/dist/{slider-DVSSKagG.cjs → slider-zzIaOtVV.cjs} +2 -2
  235. package/dist/{slider-DVSSKagG.cjs.map → slider-zzIaOtVV.cjs.map} +1 -1
  236. package/dist/slider.cjs +1 -1
  237. package/dist/slider.js +1 -1
  238. package/dist/{spinner-3kZLS7Cb.cjs → spinner-DpiguU2b.cjs} +2 -2
  239. package/dist/{spinner-3kZLS7Cb.cjs.map → spinner-DpiguU2b.cjs.map} +1 -1
  240. package/dist/{spinner-B4O46fTH.js → spinner-yQpcUe1F.js} +2 -2
  241. package/dist/{spinner-B4O46fTH.js.map → spinner-yQpcUe1F.js.map} +1 -1
  242. package/dist/steps.cjs +1 -1
  243. package/dist/steps.js +1 -1
  244. package/dist/{surface-BvaQlBsM.cjs → surface-BQkqeqQL.cjs} +2 -2
  245. package/dist/{surface-BvaQlBsM.cjs.map → surface-BQkqeqQL.cjs.map} +1 -1
  246. package/dist/{surface-C8u1VYhL.js → surface-uQy_g3S3.js} +2 -2
  247. package/dist/{surface-C8u1VYhL.js.map → surface-uQy_g3S3.js.map} +1 -1
  248. package/dist/surface.cjs +1 -1
  249. package/dist/surface.js +1 -1
  250. package/dist/{table-CFz1b1sP.js → table-D_NfwO-r.js} +2 -2
  251. package/dist/{table-CFz1b1sP.js.map → table-D_NfwO-r.js.map} +1 -1
  252. package/dist/{table-CyDat8c8.cjs → table-P5rTnqC_.cjs} +2 -2
  253. package/dist/{table-CyDat8c8.cjs.map → table-P5rTnqC_.cjs.map} +1 -1
  254. package/dist/table.cjs +1 -1
  255. package/dist/table.js +1 -1
  256. package/dist/{tabs-compatibility-lvrpa0sC.js → tabs-compatibility-8_k_UM2J.js} +2 -2
  257. package/dist/{tabs-compatibility-lvrpa0sC.js.map → tabs-compatibility-8_k_UM2J.js.map} +1 -1
  258. package/dist/{tabs-compatibility-BuochlXo.cjs → tabs-compatibility-BdJ2pRM4.cjs} +2 -2
  259. package/dist/{tabs-compatibility-BuochlXo.cjs.map → tabs-compatibility-BdJ2pRM4.cjs.map} +1 -1
  260. package/dist/tabs.cjs +1 -1
  261. package/dist/tabs.js +1 -1
  262. package/dist/tailwind.mixin-BFHdirqy.cjs +2 -0
  263. package/dist/{tailwind.mixin-BxmzUuoy.cjs.map → tailwind.mixin-BFHdirqy.cjs.map} +1 -1
  264. package/dist/tailwind.mixin-C3MkWn0v.js +43 -0
  265. package/dist/{tailwind.mixin-2JxfkZ8s.js.map → tailwind.mixin-C3MkWn0v.js.map} +1 -1
  266. package/dist/teleport.cjs +1 -1
  267. package/dist/teleport.js +1 -1
  268. package/dist/{textarea-D3TB4zVT.js → textarea-BIa-VJgn.js} +15 -12
  269. package/dist/textarea-BIa-VJgn.js.map +1 -0
  270. package/dist/{textarea-BwGtA0J3.cjs → textarea-d0QK9I_W.cjs} +4 -4
  271. package/dist/textarea-d0QK9I_W.cjs.map +1 -0
  272. package/dist/textarea.cjs +1 -1
  273. package/dist/textarea.js +1 -1
  274. package/dist/{theme-button-UYtArDID.cjs → theme-button-2R4gqt1Z.cjs} +2 -2
  275. package/dist/{theme-button-UYtArDID.cjs.map → theme-button-2R4gqt1Z.cjs.map} +1 -1
  276. package/dist/{theme-button-Dy8-BFPF.js → theme-button-BXkmh4nn.js} +2 -2
  277. package/dist/{theme-button-Dy8-BFPF.js.map → theme-button-BXkmh4nn.js.map} +1 -1
  278. package/dist/theme-button.cjs +1 -1
  279. package/dist/theme-button.js +1 -1
  280. package/dist/theme.cjs +1 -1
  281. package/dist/{theme.component-MAXMwTCm.js → theme.component-Cta_ZGr5.js} +4 -4
  282. package/dist/{theme.component-MAXMwTCm.js.map → theme.component-Cta_ZGr5.js.map} +1 -1
  283. package/dist/{theme.component-CSyghlYl.cjs → theme.component-DHuNvHEP.cjs} +2 -2
  284. package/dist/{theme.component-CSyghlYl.cjs.map → theme.component-DHuNvHEP.cjs.map} +1 -1
  285. package/dist/theme.js +1 -1
  286. package/dist/{timezone-Dw9OZuMM.js → timezone-DLuRf9_q.js} +3 -3
  287. package/dist/{timezone-Dw9OZuMM.js.map → timezone-DLuRf9_q.js.map} +1 -1
  288. package/dist/{timezone-TZYuQZP6.cjs → timezone-DZMzss0f.cjs} +2 -2
  289. package/dist/{timezone-TZYuQZP6.cjs.map → timezone-DZMzss0f.cjs.map} +1 -1
  290. package/dist/{tooltip-FihkwDY8.js → tooltip-BbSE2kUb.js} +2 -2
  291. package/dist/{tooltip-FihkwDY8.js.map → tooltip-BbSE2kUb.js.map} +1 -1
  292. package/dist/{tooltip-BBE_guBn.cjs → tooltip-CK-XmbzO.cjs} +2 -2
  293. package/dist/{tooltip-BBE_guBn.cjs.map → tooltip-CK-XmbzO.cjs.map} +1 -1
  294. package/dist/tooltip.cjs +1 -1
  295. package/dist/tooltip.js +1 -1
  296. package/dist/{tree-CMkehhmo.cjs → tree-COFL10bn.cjs} +2 -2
  297. package/dist/{tree-CMkehhmo.cjs.map → tree-COFL10bn.cjs.map} +1 -1
  298. package/dist/{tree-BT_APHcb.js → tree-DQJIF5Zw.js} +2 -2
  299. package/dist/{tree-BT_APHcb.js.map → tree-DQJIF5Zw.js.map} +1 -1
  300. package/dist/tree.cjs +1 -1
  301. package/dist/tree.js +1 -1
  302. package/dist/{typewriter-DGb13Ag4.cjs → typewriter-DTuH_jfH.cjs} +2 -2
  303. package/dist/{typewriter-DGb13Ag4.cjs.map → typewriter-DTuH_jfH.cjs.map} +1 -1
  304. package/dist/{typewriter-Dl1yTspy.js → typewriter-DWfh9dQx.js} +8 -8
  305. package/dist/{typewriter-Dl1yTspy.js.map → typewriter-DWfh9dQx.js.map} +1 -1
  306. package/dist/typewriter.cjs +1 -1
  307. package/dist/typewriter.js +1 -1
  308. package/dist/{typography-BSpj-MU6.cjs → typography-CVIqatrO.cjs} +2 -2
  309. package/dist/{typography-BSpj-MU6.cjs.map → typography-CVIqatrO.cjs.map} +1 -1
  310. package/dist/{typography-CardnZ_o.js → typography-CbfOMwD6.js} +2 -2
  311. package/dist/{typography-CardnZ_o.js.map → typography-CbfOMwD6.js.map} +1 -1
  312. package/dist/typography.cjs +1 -1
  313. package/dist/typography.js +1 -1
  314. package/package.json +1 -1
  315. package/types/src/index.d.ts +1 -0
  316. package/types/src/mailbox/email-editor.d.ts +102 -0
  317. package/types/src/mailbox/email-layout-selector.d.ts +19 -0
  318. package/types/src/mailbox/email-recipients.d.ts +118 -0
  319. package/types/src/mailbox/email-template-picker.d.ts +64 -0
  320. package/types/src/mailbox/email-viewer.d.ts +86 -0
  321. package/types/src/mailbox/index.d.ts +12 -0
  322. package/types/src/mailbox/mailbox.d.ts +82 -0
  323. package/types/src/mailbox/types.d.ts +177 -0
  324. package/types/src/textarea/textarea.d.ts +2 -2
  325. package/dist/dialog-service-DGfyRhia.js +0 -135
  326. package/dist/dialog-service-DGfyRhia.js.map +0 -1
  327. package/dist/dialog-service-mkcNUT8P.cjs +0 -2
  328. package/dist/dialog-service-mkcNUT8P.cjs.map +0 -1
  329. package/dist/sheet-3VDjNIQO.cjs +0 -52
  330. package/dist/sheet-3VDjNIQO.cjs.map +0 -1
  331. package/dist/sheet-C944d0EG.js +0 -228
  332. package/dist/sheet-C944d0EG.js.map +0 -1
  333. package/dist/tailwind.mixin-2JxfkZ8s.js +0 -43
  334. package/dist/tailwind.mixin-BxmzUuoy.cjs +0 -2
  335. package/dist/textarea-BwGtA0J3.cjs.map +0 -1
  336. package/dist/textarea-D3TB4zVT.js.map +0 -1
@@ -0,0 +1,1882 @@
1
+ import "rxjs";
2
+ import "lit/directives/class-map.js";
3
+ import "lit/directives/style-map.js";
4
+ import { $ as A } from "./litElement.mixin-BSsJVIyj.js";
5
+ import { T as P } from "./tailwind.mixin-C3MkWn0v.js";
6
+ import { property as d, state as m, customElement as R } from "lit/decorators.js";
7
+ import { css as D, html as c } from "lit";
8
+ import { when as h } from "lit/directives/when.js";
9
+ import { createRef as T, ref as E } from "lit/directives/ref.js";
10
+ import { repeat as I } from "lit/directives/repeat.js";
11
+ import { $ as v } from "./notification-service-BO0LiH62.js";
12
+ import "./dialog-content-CDfCvaaL.js";
13
+ import { $ as L } from "./dialog-service-DoKaWw88.js";
14
+ import { s as j } from "./sheet.service-CgKnOzZN.js";
15
+ var F = Object.defineProperty, B = Object.getOwnPropertyDescriptor, u = (e, t, s, i) => {
16
+ for (var a, n = i > 1 ? void 0 : i ? B(t, s) : t, r = e.length - 1; r >= 0; r--) (a = e[r]) && (n = (i ? a(t, s, n) : a(n)) || n);
17
+ return i && n && F(t, s, n), n;
18
+ };
19
+ let y = class extends A(D`
20
+ :host {
21
+ display: block;
22
+ height: 100%;
23
+ }
24
+ `) {
25
+ constructor() {
26
+ 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) => {
27
+ const { emails: t } = e.detail, s = [.../* @__PURE__ */ new Set([...this.recipients, ...t])], i = t.filter((a) => !this.recipients.includes(a));
28
+ this.recipients = s, this.selectedRecipients = [.../* @__PURE__ */ new Set([...this.selectedRecipients, ...i])], this.dispatchEvent(new CustomEvent("emails-imported", { detail: { emails: i, source: e.detail.source }, bubbles: !0, composed: !0 }));
29
+ }, this.handleRecipientRemoved = (e) => {
30
+ const { email: t } = e.detail;
31
+ this.recipients = this.recipients.filter((s) => s !== t), this.selectedRecipients = this.selectedRecipients.filter((s) => s !== t), this.dispatchEvent(new CustomEvent("recipient-removed", { detail: { email: t }, bubbles: !0, composed: !0 }));
32
+ }, this.handleRecipientsCleared = () => {
33
+ this.recipients = [], this.selectedRecipients = [], this.dispatchEvent(new CustomEvent("recipients-cleared", { bubbles: !0, composed: !0 }));
34
+ }, this.handleSelectionChanged = (e) => {
35
+ const { selectedEmails: t } = e.detail;
36
+ this.selectedRecipients = t, this.dispatchEvent(new CustomEvent("selection-changed", { detail: { selectedEmails: t }, bubbles: !0, composed: !0 }));
37
+ }, this.handleEditorChange = (e) => {
38
+ const { subject: t, body: s, templateId: i, attachments: a } = e.detail;
39
+ this.subject = t, this.body = s, this.templateId = i, this.attachments = a, this.dispatchEvent(new CustomEvent("compose-changed", { detail: { subject: t, body: s, templateId: i, attachments: a }, bubbles: !0, composed: !0 }));
40
+ }, this.handleSend = async () => {
41
+ if (this.selectedRecipients.length !== 0) if (this.subject.trim()) if (this.body.trim()) {
42
+ this.isSending = !0;
43
+ try {
44
+ const e = { recipients: this.selectedRecipients, subject: this.subject, body: this.body, attachments: this.attachments, templateId: this.templateId };
45
+ this.dispatchEvent(new CustomEvent("send-email", { detail: { request: e }, bubbles: !0, composed: !0 }));
46
+ } catch (e) {
47
+ this.dispatchEvent(new CustomEvent("send-error", { detail: { error: e instanceof Error ? e.message : "Failed to send email" }, bubbles: !0, composed: !0 }));
48
+ } finally {
49
+ this.isSending = !1;
50
+ }
51
+ } else this.dispatchEvent(new CustomEvent("send-error", { detail: { error: "Please enter a message body" }, bubbles: !0, composed: !0 }));
52
+ else this.dispatchEvent(new CustomEvent("send-error", { detail: { error: "Please enter a subject" }, bubbles: !0, composed: !0 }));
53
+ else this.dispatchEvent(new CustomEvent("send-error", { detail: { error: "Please select at least one recipient" }, bubbles: !0, composed: !0 }));
54
+ };
55
+ }
56
+ connectedCallback() {
57
+ super.connectedCallback(), this.setSending(this.disabled);
58
+ }
59
+ updated(e) {
60
+ super.updated(e), e.has("disabled") && this.setSending(this.disabled);
61
+ }
62
+ addRecipients(e) {
63
+ const t = [.../* @__PURE__ */ new Set([...this.recipients, ...e])], s = e.filter((i) => !this.recipients.includes(i));
64
+ this.recipients = t, this.selectedRecipients = [.../* @__PURE__ */ new Set([...this.selectedRecipients, ...s])];
65
+ }
66
+ setSubject(e) {
67
+ this.subject = e;
68
+ }
69
+ setBody(e) {
70
+ this.body = e;
71
+ }
72
+ setTemplate(e) {
73
+ this.templateId = e;
74
+ }
75
+ clearCompose() {
76
+ this.recipients = [], this.selectedRecipients = [], this.subject = "", this.body = "", this.templateId = null, this.attachments = [];
77
+ }
78
+ setSending(e) {
79
+ this.isSending = e;
80
+ }
81
+ render() {
82
+ const e = this.selectedRecipients.length > 0 && this.subject.trim() && this.body.trim() && !this.isSending && !this.disabled;
83
+ return c`
84
+ <!-- Main Layout Container -->
85
+ <div class="flex flex-col h-full gap-6 p-6">
86
+
87
+ <!-- Main Content Section: Composer and Preview -->
88
+ <div class="flex flex-col xl:flex-row gap-6 flex-1 min-h-0">
89
+
90
+ <!-- Composer Section - Full width on mobile/tablet, half on large screens -->
91
+ <div class="w-full xl:w-1/2 min-h-0 flex flex-col">
92
+ <schmancy-email-editor
93
+ .subject=${this.subject}
94
+ .body=${this.body}
95
+ .templates=${this.templates}
96
+ .attachments=${this.attachments}
97
+ .disabled=${this.disabled}
98
+ .config=${this.config}
99
+ @editor-change=${this.handleEditorChange}
100
+ class="h-full"
101
+ ></schmancy-email-editor>
102
+ </div>
103
+
104
+ <!-- Preview Section - Full width on mobile/tablet, half on large screens -->
105
+ <div class="w-full xl:w-1/2 min-h-0 flex flex-col">
106
+ <schmancy-email-viewer
107
+ .subject=${this.subject}
108
+ .body=${this.body}
109
+ .recipients=${this.selectedRecipients}
110
+ .attachments=${this.attachments}
111
+ class="h-full"
112
+ ></schmancy-email-viewer>
113
+ </div>
114
+
115
+ </div>
116
+
117
+ <!-- Send Section - Sticky bottom bar -->
118
+ <div class="flex-shrink-0">
119
+ <schmancy-surface
120
+ type="container"
121
+ rounded="all"
122
+ class="p-4"
123
+ >
124
+ <div class="flex flex-col sm:flex-row sm:items-center sm:justify-between gap-4">
125
+ <!-- Send Info -->
126
+ <div class="flex flex-col gap-1">
127
+ <schmancy-typography type="body" token="sm" class="font-medium">
128
+ ${this.selectedRecipients.length} recipient${this.selectedRecipients.length === 1 ? "" : "s"} selected
129
+ </schmancy-typography>
130
+ ${h(this.attachments.length > 0, () => c`
131
+ <schmancy-typography type="body" token="xs">
132
+ ${this.attachments.length} attachment${this.attachments.length === 1 ? "" : "s"}
133
+ </schmancy-typography>
134
+ `)}
135
+ </div>
136
+
137
+ <!-- Send Button -->
138
+ <schmancy-button
139
+ variant="filled"
140
+ ?disabled=${!e}
141
+ ?loading=${this.isSending}
142
+ @click=${this.handleSend}
143
+ class="w-full sm:w-auto"
144
+ >
145
+ <schmancy-icon slot="prefix" size="18px">send</schmancy-icon>
146
+ ${this.isSending ? "Sending..." : "Send Email"}
147
+ </schmancy-button>
148
+ </div>
149
+ </schmancy-surface>
150
+ </div>
151
+
152
+ </div>
153
+
154
+ <!-- Recipients Panel as Floating Boat -->
155
+ <schmancy-email-recipients
156
+ .recipients=${this.recipients}
157
+ .selectedRecipients=${this.selectedRecipients}
158
+ .importSources=${this.importSources}
159
+ .disabled=${this.disabled}
160
+ .enableCsvImport=${this.enableCsvImport}
161
+ .enableDragDrop=${this.enableDragDrop}
162
+ .title=${this.recipientsTitle}
163
+ .emptyStateTitle=${this.recipientsEmptyTitle}
164
+ .emptyStateMessage=${this.recipientsEmptyMessage}
165
+ @emails-imported=${this.handleEmailsImported}
166
+ @recipient-removed=${this.handleRecipientRemoved}
167
+ @recipients-cleared=${this.handleRecipientsCleared}
168
+ @selection-changed=${this.handleSelectionChanged}
169
+ ></schmancy-email-recipients>
170
+ `;
171
+ }
172
+ };
173
+ u([d({ type: Object })], y.prototype, "config", 2), u([d({ type: Array })], y.prototype, "templates", 2), u([d({ type: Array })], y.prototype, "importSources", 2), u([d({ type: Boolean })], y.prototype, "disabled", 2), u([d({ type: String })], y.prototype, "recipientsTitle", 2), u([d({ type: String })], y.prototype, "recipientsEmptyTitle", 2), u([d({ type: String })], y.prototype, "recipientsEmptyMessage", 2), u([d({ type: Boolean })], y.prototype, "enableCsvImport", 2), u([d({ type: Boolean })], y.prototype, "enableDragDrop", 2), u([m()], y.prototype, "recipients", 2), u([m()], y.prototype, "selectedRecipients", 2), u([m()], y.prototype, "subject", 2), u([m()], y.prototype, "body", 2), u([m()], y.prototype, "templateId", 2), u([m()], y.prototype, "attachments", 2), u([m()], y.prototype, "isSending", 2), y = u([R("schmancy-mailbox")], y);
174
+ var O = Object.getOwnPropertyDescriptor;
175
+ let z = class extends P() {
176
+ constructor() {
177
+ 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" }];
178
+ }
179
+ selectLayout(e) {
180
+ this.dispatchEvent(new CustomEvent("layout-select", { detail: { layout: e }, bubbles: !0, composed: !0 }));
181
+ }
182
+ render() {
183
+ return c`
184
+ <div class="grid p-3 gap-2">
185
+ ${this.layouts.map((e) => c`
186
+ <schmancy-button
187
+ variant="outlined"
188
+ @click=${() => this.selectLayout(e.id)}
189
+ >
190
+ <schmancy-icon
191
+ slot="prefix"
192
+ size="20px"
193
+ class=${e.flipped ? "scale-x-[-1]" : ""}
194
+ >
195
+ ${e.icon}
196
+ </schmancy-icon>
197
+ ${e.label}
198
+ </schmancy-button>
199
+ `)}
200
+ </div>
201
+ `;
202
+ }
203
+ };
204
+ z = ((e, t, s, i) => {
205
+ for (var a, n = i > 1 ? void 0 : i ? O(t, s) : t, r = e.length - 1; r >= 0; r--) (a = e[r]) && (n = a(n) || n);
206
+ return n;
207
+ })([R("schmancy-email-layout-selector")], z);
208
+ var M = Object.defineProperty, H = Object.getOwnPropertyDescriptor, C = (e, t, s, i) => {
209
+ for (var a, n = i > 1 ? void 0 : i ? H(t, s) : t, r = e.length - 1; r >= 0; r--) (a = e[r]) && (n = (i ? a(t, s, n) : a(n)) || n);
210
+ return i && n && M(t, s, n), n;
211
+ };
212
+ let $ = class extends A(D`
213
+ :host {
214
+ display: block;
215
+ }
216
+ `) {
217
+ constructor() {
218
+ super(...arguments), this.templates = [], this.searchQuery = "", this.selectedTemplate = null, this.filteredTemplates = [], this.showPreview = !1, this.selectedCategory = "all", this.handleSearch = (e) => {
219
+ const t = e.target;
220
+ this.searchQuery = t.value;
221
+ }, this.handleCategorySelect = (e) => {
222
+ this.selectedCategory = e, this.updateFilteredTemplates();
223
+ }, this.selectTemplate = (e) => {
224
+ this.selectedTemplate = e, this.showPreview = !0;
225
+ }, this.confirmSelection = () => {
226
+ this.selectedTemplate && (this.dispatchEvent(new CustomEvent("template-selected", { detail: this.selectedTemplate, bubbles: !0, composed: !0 })), j.dismiss());
227
+ }, this.close = () => {
228
+ j.dismiss();
229
+ }, this.backToList = () => {
230
+ this.showPreview = !1, this.selectedTemplate = null;
231
+ };
232
+ }
233
+ connectedCallback() {
234
+ super.connectedCallback(), this.updateFilteredTemplates();
235
+ }
236
+ updated(e) {
237
+ (e.has("templates") || e.has("searchQuery") || e.has("selectedCategory")) && this.updateFilteredTemplates();
238
+ }
239
+ get categories() {
240
+ const e = /* @__PURE__ */ new Set();
241
+ return this.templates.forEach((t) => {
242
+ t.category && e.add(t.category);
243
+ }), ["all", ...Array.from(e)];
244
+ }
245
+ updateFilteredTemplates() {
246
+ let e = [...this.templates];
247
+ if (this.selectedCategory !== "all" && (e = e.filter((t) => t.category === this.selectedCategory)), this.searchQuery.trim()) {
248
+ const t = this.searchQuery.toLowerCase();
249
+ e = e.filter((s) => s.name.toLowerCase().includes(t) || s.category?.toLowerCase().includes(t) || s.description?.toLowerCase().includes(t));
250
+ }
251
+ this.filteredTemplates = e;
252
+ }
253
+ render() {
254
+ return c`
255
+ <div class="flex flex-col h-full overflow-hidden">
256
+ <!-- Header -->
257
+ <div class="flex items-center justify-between px-6 py-4 border-b border-outline-variant">
258
+ <div class="flex items-center gap-3">
259
+ <schmancy-icon size="24px" class="text-primary">
260
+ ${this.showPreview ? "preview" : "mail"}
261
+ </schmancy-icon>
262
+ <schmancy-typography type="headline" token="md">
263
+ ${this.showPreview ? "Template Preview" : "Choose Email Template"}
264
+ </schmancy-typography>
265
+ </div>
266
+ <schmancy-button
267
+ variant="text"
268
+ @click=${this.close}
269
+ class="hover:bg-surface-container rounded-full w-10 h-10 p-0"
270
+ >
271
+ <schmancy-icon>close</schmancy-icon>
272
+ </schmancy-button>
273
+ </div>
274
+
275
+ <!-- Body -->
276
+ <div class="flex-1 flex flex-col overflow-hidden">
277
+ ${h(this.showPreview && this.selectedTemplate, () => this.renderPreview(), () => this.renderTemplateList())}
278
+ </div>
279
+
280
+ <!-- Footer -->
281
+ <div class="flex justify-between px-6 py-4 border-t border-outline-variant bg-surface-containerLow">
282
+ ${h(this.showPreview, () => c`
283
+ <schmancy-button
284
+ variant="outlined"
285
+ @click=${this.backToList}
286
+ class="px-6 py-3"
287
+ >
288
+ <schmancy-icon slot="prefix">arrow_back</schmancy-icon>
289
+ Back to Templates
290
+ </schmancy-button>
291
+ <schmancy-button
292
+ variant="filled"
293
+ @click=${this.confirmSelection}
294
+ class="px-8 py-3 bg-primary text-primary-on shadow-md hover:shadow-lg transition-shadow"
295
+ >
296
+ <schmancy-icon slot="prefix">check_circle</schmancy-icon>
297
+ Use This Template
298
+ </schmancy-button>
299
+ `, () => c`
300
+ <div class="flex gap-3">
301
+ <schmancy-button
302
+ variant="text"
303
+ @click=${this.close}
304
+ class="px-6 py-3"
305
+ >
306
+ Cancel
307
+ </schmancy-button>
308
+ </div>
309
+ `)}
310
+ </div>
311
+ </div>
312
+ `;
313
+ }
314
+ renderTemplateList() {
315
+ return c`
316
+ <!-- Search and Filter Bar -->
317
+ <div class="px-6 py-4 border-b border-outline-variant bg-surface-containerLow">
318
+ <div class="flex flex-col gap-4">
319
+ <!-- Search Input -->
320
+ <schmancy-input
321
+ type="search"
322
+ placeholder="Search templates by name, category, or description..."
323
+ .value=${this.searchQuery}
324
+ @input=${this.handleSearch}
325
+ class="w-full"
326
+ >
327
+ <schmancy-icon slot="prefix" size="20px" class="text-surface-onVariant">search</schmancy-icon>
328
+ ${h(this.searchQuery, () => c`
329
+ <schmancy-button
330
+ slot="suffix"
331
+ variant="text"
332
+ @click=${() => {
333
+ this.searchQuery = "";
334
+ }}
335
+ class="rounded-full w-8 h-8 p-0"
336
+ >
337
+ <schmancy-icon size="16px">close</schmancy-icon>
338
+ </schmancy-button>
339
+ `)}
340
+ </schmancy-input>
341
+
342
+ <!-- Category Filter -->
343
+ ${h(this.categories.length > 1, () => c`
344
+ <div class="flex gap-2 flex-wrap">
345
+ ${I(this.categories, (e) => e, (e) => c`
346
+ <schmancy-chip
347
+ class="cursor-pointer transition-all hover:shadow-sm ${this.selectedCategory === e ? "bg-primary text-primary-on" : "border border-outline"}"
348
+ @click=${() => this.handleCategorySelect(e)}
349
+ >
350
+ ${e === "all" ? "All Templates" : e}
351
+ </schmancy-chip>
352
+ `)}
353
+ </div>
354
+ `)}
355
+ </div>
356
+ </div>
357
+
358
+ <!-- Template List -->
359
+ <div class="flex-1 overflow-y-auto px-6 py-6">
360
+ ${h(this.filteredTemplates.length > 0, () => c`
361
+ <div class="space-y-4">
362
+ ${I(this.filteredTemplates, (e) => e.id, (e) => c`
363
+ <schmancy-surface
364
+ type="containerLow"
365
+ elevation="1"
366
+ rounded="all"
367
+ class="group cursor-pointer hover:elevation-3 transition-all duration-200 p-4"
368
+ @click=${() => this.selectTemplate(e)}
369
+ >
370
+ <div class="flex items-start justify-between gap-4">
371
+ <div class="flex-1">
372
+ <!-- Template Header -->
373
+ <div class="flex items-start justify-between mb-2">
374
+ <schmancy-typography type="title" token="md" class="font-semibold leading-tight">
375
+ ${e.name}
376
+ </schmancy-typography>
377
+ ${h(e.isDefault, () => c`
378
+ <schmancy-chip class="bg-primary text-primary-on text-xs">
379
+ <schmancy-icon slot="prefix" size="12px">star</schmancy-icon>
380
+ Default
381
+ </schmancy-chip>
382
+ `)}
383
+ </div>
384
+
385
+ <!-- Category Badge -->
386
+ ${h(e.category, () => c`
387
+ <div class="mb-2">
388
+ <schmancy-chip class="text-xs border border-outline">
389
+ ${e.category}
390
+ </schmancy-chip>
391
+ </div>
392
+ `)}
393
+
394
+ <!-- Description -->
395
+ ${h(e.description, () => c`
396
+ <schmancy-typography type="body" token="sm" class="text-surface-onVariant leading-relaxed">
397
+ ${e.description}
398
+ </schmancy-typography>
399
+ `, () => c`
400
+ <schmancy-typography type="body" token="sm" class="text-surface-onVariant opacity-60 italic">
401
+ No description available
402
+ </schmancy-typography>
403
+ `)}
404
+ </div>
405
+
406
+ <!-- Preview Button -->
407
+ <div class="flex-shrink-0">
408
+ <schmancy-button variant="outlined" size="sm">
409
+ <schmancy-icon slot="prefix">preview</schmancy-icon>
410
+ Preview
411
+ </schmancy-button>
412
+ </div>
413
+ </div>
414
+ </schmancy-surface>
415
+ `)}
416
+ </div>
417
+ `, () => c`
418
+ <div class="flex flex-col items-center justify-center h-96 text-center">
419
+ <div class="mb-6">
420
+ <schmancy-icon size="64px" class="text-surface-onVariant opacity-20">mail_outline</schmancy-icon>
421
+ </div>
422
+ <schmancy-typography type="headline" token="sm" class="mb-2">
423
+ ${this.searchQuery || this.selectedCategory !== "all" ? "No templates found" : "No templates available"}
424
+ </schmancy-typography>
425
+ <schmancy-typography type="body" token="md" class="text-surface-onVariant mb-6 max-w-md">
426
+ ${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"}
427
+ </schmancy-typography>
428
+ ${h(this.searchQuery || this.selectedCategory !== "all", () => c`
429
+ <div class="flex gap-3">
430
+ ${h(this.searchQuery, () => c`
431
+ <schmancy-button
432
+ variant="outlined"
433
+ @click=${() => {
434
+ this.searchQuery = "";
435
+ }}
436
+ >
437
+ <schmancy-icon slot="prefix">clear</schmancy-icon>
438
+ Clear Search
439
+ </schmancy-button>
440
+ `)}
441
+ ${h(this.selectedCategory !== "all", () => c`
442
+ <schmancy-button
443
+ variant="filled"
444
+ @click=${() => this.handleCategorySelect("all")}
445
+ >
446
+ <schmancy-icon slot="prefix">view_list</schmancy-icon>
447
+ Show All Templates
448
+ </schmancy-button>
449
+ `)}
450
+ </div>
451
+ `)}
452
+ </div>
453
+ `)}
454
+ </div>
455
+ `;
456
+ }
457
+ renderPreview() {
458
+ return this.selectedTemplate ? c`
459
+ <div class="flex-1 overflow-y-auto">
460
+ <!-- Template Header Section -->
461
+ <div class="px-6 py-6 border-b border-outline-variant bg-surface-containerLow">
462
+ <div class="flex items-start gap-6">
463
+ <!-- Template Thumbnail -->
464
+ ${h(this.selectedTemplate.thumbnail, () => c`
465
+ <div class="flex-shrink-0">
466
+ <schmancy-surface elevation="2" rounded="all" class="overflow-hidden w-32 h-24">
467
+ <img
468
+ src=${this.selectedTemplate.thumbnail}
469
+ alt=${this.selectedTemplate.name}
470
+ class="w-full h-full object-cover"
471
+ />
472
+ </schmancy-surface>
473
+ </div>
474
+ `, () => c`
475
+ <div class="flex-shrink-0">
476
+ <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">
477
+ <schmancy-icon size="32px" class="text-surface-onVariant opacity-40">mail</schmancy-icon>
478
+ </schmancy-surface>
479
+ </div>
480
+ `)}
481
+
482
+ <!-- Template Info -->
483
+ <div class="flex-1">
484
+ <div class="flex items-start justify-between mb-3">
485
+ <schmancy-typography type="headline" token="lg" class="font-semibold">
486
+ ${this.selectedTemplate.name}
487
+ </schmancy-typography>
488
+ ${h(this.selectedTemplate.isDefault, () => c`
489
+ <schmancy-chip class="bg-primary text-primary-on">
490
+ <schmancy-icon slot="prefix" size="12px">star</schmancy-icon>
491
+ Default
492
+ </schmancy-chip>
493
+ `)}
494
+ </div>
495
+
496
+ <div class="flex flex-wrap gap-2 mb-3">
497
+ ${h(this.selectedTemplate.category, () => c`
498
+ <schmancy-chip class="border border-outline">
499
+ <schmancy-icon slot="prefix" size="12px">category</schmancy-icon>
500
+ ${this.selectedTemplate.category}
501
+ </schmancy-chip>
502
+ `)}
503
+ ${h(this.selectedTemplate.createdAt, () => c`
504
+ <schmancy-chip class="border border-outline">
505
+ <schmancy-icon slot="prefix" size="12px">schedule</schmancy-icon>
506
+ Created ${new Date(this.selectedTemplate.createdAt).toLocaleDateString()}
507
+ </schmancy-chip>
508
+ `)}
509
+ </div>
510
+
511
+ ${h(this.selectedTemplate.description, () => c`
512
+ <schmancy-typography type="body" token="md" class="text-surface-onVariant leading-relaxed">
513
+ ${this.selectedTemplate.description}
514
+ </schmancy-typography>
515
+ `)}
516
+ </div>
517
+ </div>
518
+ </div>
519
+
520
+ <!-- Template Content -->
521
+ <div class="px-6 py-6 space-y-8">
522
+ <!-- Subject Preview -->
523
+ <div>
524
+ <div class="flex items-center gap-2 mb-4">
525
+ <schmancy-icon size="20px" class="text-primary">subject</schmancy-icon>
526
+ <schmancy-typography type="title" token="md" class="text-primary">
527
+ Subject Line
528
+ </schmancy-typography>
529
+ </div>
530
+ <schmancy-surface elevation="1" type="surface" class="p-4 border-l-4 border-primary">
531
+ <schmancy-typography type="body" token="md" class="font-medium">
532
+ ${this.selectedTemplate.subject}
533
+ </schmancy-typography>
534
+ </schmancy-surface>
535
+ </div>
536
+
537
+ <!-- Body Preview -->
538
+ <div>
539
+ <div class="flex items-center gap-2 mb-4">
540
+ <schmancy-icon size="20px" class="text-primary">article</schmancy-icon>
541
+ <schmancy-typography type="title" token="md" class="text-primary">
542
+ Email Preview
543
+ </schmancy-typography>
544
+ </div>
545
+ <schmancy-email-viewer
546
+ subject=${this.selectedTemplate.subject}
547
+ body=${this.selectedTemplate.body}
548
+ mode="desktop"
549
+ ></schmancy-email-viewer>
550
+ </div>
551
+ </div>
552
+ </div>
553
+ ` : null;
554
+ }
555
+ };
556
+ C([d({ type: Array })], $.prototype, "templates", 2), C([m()], $.prototype, "searchQuery", 2), C([m()], $.prototype, "selectedTemplate", 2), C([m()], $.prototype, "filteredTemplates", 2), C([m()], $.prototype, "showPreview", 2), C([m()], $.prototype, "selectedCategory", 2), $ = C([R("schmancy-email-template-picker")], $);
557
+ var V = Object.defineProperty, U = Object.getOwnPropertyDescriptor, x = (e, t, s, i) => {
558
+ for (var a, n = i > 1 ? void 0 : i ? U(t, s) : t, r = e.length - 1; r >= 0; r--) (a = e[r]) && (n = (i ? a(t, s, n) : a(n)) || n);
559
+ return i && n && V(t, s, n), n;
560
+ };
561
+ let b = class extends A(D`
562
+ :host {
563
+ display: block;
564
+ height: 100%;
565
+ }
566
+ `) {
567
+ constructor() {
568
+ 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 = T(), this.bodyTextAreaRef = T(), this.fileInputRef = T(), this.imageInputRef = T(), this.handleKeyDown = (e) => {
569
+ if (this.disabled) return;
570
+ const t = this.bodyTextAreaRef.value?.shadowRoot?.querySelector("textarea");
571
+ e.key === "Tab" && e.target === t && (e.preventDefault(), this.insertAtCursor(" "));
572
+ }, this.handlePaste = (e) => {
573
+ const t = this.bodyTextAreaRef.value?.shadowRoot?.querySelector("textarea");
574
+ if (this.disabled || document.activeElement !== t) return;
575
+ const s = e.clipboardData?.items;
576
+ if (s) for (let i = 0; i < s.length; i++) {
577
+ const a = s[i];
578
+ if (a.type.indexOf("image") !== -1) {
579
+ e.preventDefault();
580
+ const n = a.getAsFile();
581
+ n && this.uploadImage(n);
582
+ break;
583
+ }
584
+ }
585
+ }, this.handleSubjectChange = (e) => {
586
+ const t = e.target;
587
+ this.subject = t.value, this.dispatchChange();
588
+ }, this.handleBodyChange = (e) => {
589
+ this.body = e.detail.value, this.dispatchChange();
590
+ }, this.dispatchChange = () => {
591
+ this.dispatchEvent(new CustomEvent("editor-change", { detail: { subject: this.subject, body: this.body, attachments: this.attachments }, bubbles: !0, composed: !0 }));
592
+ }, this.openLayoutDialog = () => {
593
+ L.component(c`
594
+ <schmancy-email-layout-selector
595
+ @layout-select=${(e) => {
596
+ this.applyLayout(e.detail.layout), L.close();
597
+ }}
598
+ ></schmancy-email-layout-selector>
599
+ `);
600
+ }, this.openTemplatePicker = () => {
601
+ const e = new $();
602
+ e.templates = this.templates, e.addEventListener("template-selected", this.handleTemplateSelected), j.open({ component: e, title: "Choose Email Template" });
603
+ }, this.handleTemplateSelected = (e) => {
604
+ const t = e.detail;
605
+ this.subject = t.subject, this.body = t.body, this.dispatchChange(), v.success(`Template "${t.name}" applied successfully`);
606
+ }, this.applyLayout = (e) => {
607
+ const t = { "columns-2": `
608
+ :::layout columns-2
609
+ <div class="column">
610
+ ![Left Photo](https://via.placeholder.com/400x300?text=Replace+with+your+photo){height=300px}
611
+
612
+ **Photo Title**
613
+
614
+ Replace the placeholder image above with your own photo. The height=300px ensures both images have equal height while width adjusts automatically.
615
+ </div>
616
+
617
+ <div class="column">
618
+ ![Right Photo](https://via.placeholder.com/400x300?text=Replace+with+your+photo){height=300px}
619
+
620
+ **Photo Title**
621
+
622
+ Use the same height value (300px) for both images to keep them aligned perfectly side by side.
623
+ </div>
624
+ :::
625
+ `, "columns-3": `
626
+ :::layout columns-3
627
+ <div class="column">
628
+ ![Photo 1](https://via.placeholder.com/300x200?text=Photo+1){height=200px}
629
+
630
+ **Item Title**
631
+
632
+ Brief description or caption for this item.
633
+ </div>
634
+
635
+ <div class="column">
636
+ ![Photo 2](https://via.placeholder.com/300x200?text=Photo+2){height=200px}
637
+
638
+ **Item Title**
639
+
640
+ Brief description or caption for this item.
641
+ </div>
642
+
643
+ <div class="column">
644
+ ![Photo 3](https://via.placeholder.com/300x200?text=Photo+3){height=200px}
645
+
646
+ **Item Title**
647
+
648
+ Brief description or caption for this item.
649
+ </div>
650
+ :::
651
+ `, "sidebar-left": `
652
+ :::layout sidebar-left
653
+ <div class="sidebar">
654
+ **Sidebar Content**
655
+
656
+ * Navigation item 1
657
+ * Navigation item 2
658
+ * Navigation item 3
659
+ </div>
660
+
661
+ <div class="main">
662
+ **Main Content Area**
663
+
664
+ Your primary content goes here. This area takes up most of the width while the sidebar provides supplementary information or navigation.
665
+ </div>
666
+ :::
667
+ `, "sidebar-right": `
668
+ :::layout sidebar-right
669
+ <div class="main">
670
+ **Main Content Area**
671
+
672
+ Your primary content goes here. This area takes up most of the width while the sidebar provides supplementary information or navigation.
673
+ </div>
674
+
675
+ <div class="sidebar">
676
+ **Sidebar Content**
677
+
678
+ * Quick links
679
+ * Related info
680
+ * Contact details
681
+ </div>
682
+ :::
683
+ `, "image-row": `
684
+ :::layout image-row
685
+ <div class="image">
686
+ ![Gallery Image 1](https://via.placeholder.com/400x250?text=Gallery+Image+1){height=250px}
687
+ </div>
688
+
689
+ <div class="image">
690
+ ![Gallery Image 2](https://via.placeholder.com/400x250?text=Gallery+Image+2){height=250px}
691
+ </div>
692
+
693
+ <div class="image">
694
+ ![Gallery Image 3](https://via.placeholder.com/400x250?text=Gallery+Image+3){height=250px}
695
+ </div>
696
+ :::
697
+ ` }[e];
698
+ t && this.insertAtCursor(t);
699
+ }, this.uploadImage = async (e) => {
700
+ if (!e.type.startsWith("image/")) return void v.error(`File "${e.name}" is not an image`);
701
+ if (e.size > 10485760) v.error(`Image "${e.name}" is too large. Maximum size is 10MB.`);
702
+ else {
703
+ this.isUploading = !0;
704
+ try {
705
+ let t;
706
+ this.config.imageUploadHandler ? t = await this.config.imageUploadHandler(e) : this.config.uploadHandler ? t = await this.config.uploadHandler(e) : (t = await this.createDataUrl(e), v.warning("No upload handler configured. Using local preview."));
707
+ const s = await this.getImageDimensions(e);
708
+ this.insertImageMarkdown(t, e.name, s.width, s.height), v.success("Image uploaded successfully");
709
+ } catch {
710
+ v.error("Failed to upload image");
711
+ } finally {
712
+ this.isUploading = !1;
713
+ }
714
+ }
715
+ }, this.createDataUrl = (e) => new Promise((t, s) => {
716
+ const i = new FileReader();
717
+ i.onload = () => t(i.result), i.onerror = s, i.readAsDataURL(e);
718
+ }), this.getImageDimensions = (e) => new Promise((t) => {
719
+ const s = new Image();
720
+ s.onload = () => {
721
+ t({ width: s.width, height: s.height }), URL.revokeObjectURL(s.src);
722
+ }, s.onerror = () => {
723
+ t({ width: 400, height: 300 }), URL.revokeObjectURL(s.src);
724
+ }, s.src = URL.createObjectURL(e);
725
+ }), this.insertImageMarkdown = (e, t, s, i) => {
726
+ const a = this.bodyTextAreaRef.value?.shadowRoot?.querySelector("textarea");
727
+ if (!a) return;
728
+ const n = `![${t}](${e}){width=${Math.min(s, 600)}px height=auto}`, r = a.selectionStart, o = a.selectionEnd, l = this.body.substring(0, r) + n + this.body.substring(o);
729
+ this.body = l, this.dispatchChange(), this.updateComplete.then(() => {
730
+ const p = this.bodyTextAreaRef.value?.shadowRoot?.querySelector("textarea");
731
+ if (p) {
732
+ const k = r + n.length;
733
+ p.setSelectionRange(k, k), p.focus();
734
+ }
735
+ });
736
+ }, this.handleFileChange = (e) => {
737
+ const t = e.target, s = t.files;
738
+ if (s) for (let i = 0; i < s.length; i++) {
739
+ const a = s[i];
740
+ a.type.startsWith("image/") ? this.uploadImage(a) : this.addFile(a);
741
+ }
742
+ t.value = "";
743
+ }, this.handleImageSelect = (e) => {
744
+ const t = e.target, s = t.files?.[0];
745
+ s && s.type.startsWith("image/") && this.uploadImage(s), t.value = "";
746
+ }, this.handleDrop = (e) => {
747
+ e.preventDefault(), this.dragOver = !1;
748
+ const t = e.dataTransfer?.files;
749
+ if (t) for (let s = 0; s < t.length; s++) {
750
+ const i = t[s];
751
+ i.type.startsWith("image/") ? this.uploadImage(i) : this.addFile(i);
752
+ }
753
+ }, this.handleDragEnter = (e) => {
754
+ e.preventDefault(), this.dragOver = !0;
755
+ }, this.handleDocumentDragLeave = (e) => {
756
+ e.preventDefault(), this.dragOver = !1;
757
+ }, this.handleDocumentDrop = (e) => {
758
+ e.preventDefault(), this.dragOver = !1;
759
+ }, this.handleDragOver = (e) => {
760
+ e.preventDefault();
761
+ }, this.handleDragLeave = (e) => {
762
+ e.preventDefault();
763
+ }, this.addFile = (e) => {
764
+ if (e.size > 10485760) return void v.error(`File "${e.name}" is too large. Maximum size is 10MB.`);
765
+ if (this.attachments.some((s) => s.name === e.name && s.size === e.size)) return void v.warning(`File "${e.name}" is already attached.`);
766
+ const t = { id: crypto.randomUUID(), file: e, name: e.name, size: e.size, type: e.type || "application/octet-stream" };
767
+ this.attachments = [...this.attachments, t], this.dispatchChange();
768
+ }, this.removeAttachment = (e) => {
769
+ this.attachments = this.attachments.filter((t) => t.id !== e), this.dispatchChange();
770
+ };
771
+ }
772
+ connectedCallback() {
773
+ super.connectedCallback(), this.addKeyboardListeners(), this.addDragListeners();
774
+ }
775
+ disconnectedCallback() {
776
+ super.disconnectedCallback(), document.removeEventListener("paste", this.handlePaste), document.removeEventListener("dragenter", this.handleDragEnter), document.removeEventListener("dragleave", this.handleDocumentDragLeave), document.removeEventListener("drop", this.handleDocumentDrop);
777
+ }
778
+ getDefaultTemplates() {
779
+ 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!
780
+
781
+ We're thrilled to have you on board. Thank you for joining us on this journey.
782
+
783
+ ## What's Next?
784
+
785
+ * **Explore** your dashboard and discover all the features
786
+ * **Connect** with other community members
787
+ * **Get support** whenever you need it - we're here to help
788
+
789
+ ---
790
+
791
+ *Need assistance? Simply reply to this email and we'll get back to you within 24 hours.*
792
+
793
+ Best regards,
794
+ 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
795
+
796
+ ## Featured Story
797
+
798
+ **[Article Title]**
799
+ Brief description of the main story or update that you want to highlight this week.
800
+
801
+ [Read More](https://example.com)
802
+
803
+ ## Quick Updates
804
+
805
+ * **Update 1**: Brief description of an important update
806
+ * **Update 2**: Another noteworthy development
807
+ * **Update 3**: Additional news worth sharing
808
+
809
+ ## Upcoming Events
810
+
811
+ **[Event Name]** - *Date*
812
+ Short description of the upcoming event.
813
+
814
+ ---
815
+
816
+ *Thanks for reading! Forward this to a friend who might enjoy it.*
817
+
818
+ Until next week,
819
+ 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
820
+
821
+ We've been working hard behind the scenes, and today we're excited to introduce our latest creation.
822
+
823
+ ## Key Features
824
+
825
+ * **Feature 1**: Benefit that matters to your users
826
+ * **Feature 2**: Another compelling capability
827
+ * **Feature 3**: The feature that sets you apart
828
+
829
+ ## Early Access
830
+
831
+ As a valued member, you get **exclusive early access** starting today.
832
+
833
+ [Get Started Now](https://example.com)
834
+
835
+ ---
836
+
837
+ *Questions? We'd love to hear from you. Just hit reply!*
838
+
839
+ Best,
840
+ 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!
841
+
842
+ ## [Event Name]
843
+
844
+ **When**: [Date & Time]
845
+ **Where**: [Location or Virtual Link]
846
+ **Duration**: [Duration]
847
+
848
+ Join us for an exclusive gathering where we'll explore [brief event description].
849
+
850
+ ## What to Expect
851
+
852
+ * **Networking** with industry professionals
853
+ * **Insights** from leading experts
854
+ * **Interactive** sessions and discussions
855
+
856
+ ## RSVP Required
857
+
858
+ Space is limited, so please confirm your attendance by [RSVP Date].
859
+
860
+ [Confirm Attendance](https://example.com)
861
+
862
+ ---
863
+
864
+ *Can't make it? Let us know and we'll share the key highlights with you.*
865
+
866
+ Looking forward to seeing you there,
867
+ 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
868
+
869
+ Your support means the world to us.
870
+
871
+ Whether you've been with us from the beginning or just joined our community, we want you to know how much we appreciate you.
872
+
873
+ ## Because of You
874
+
875
+ * We've been able to improve our service
876
+ * Our community has grown stronger
877
+ * We've achieved milestones we never thought possible
878
+
879
+ ## What's Next
880
+
881
+ We're committed to continuing to earn your trust and providing even more value in the coming months.
882
+
883
+ ---
884
+
885
+ *Your feedback shapes everything we do. Reply anytime with thoughts or suggestions.*
886
+
887
+ With genuine gratitude,
888
+ 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
889
+
890
+ Your experience matters to us, and we're always looking for ways to improve.
891
+
892
+ ## Quick Favor?
893
+
894
+ Could you spare **2 minutes** to share your thoughts? Your honest feedback helps us serve you better.
895
+
896
+ [Share Your Feedback](https://example.com)
897
+
898
+ ## What We're Asking
899
+
900
+ * How has your experience been so far?
901
+ * What's working well for you?
902
+ * What could we improve?
903
+
904
+ ## Thank You Gift
905
+
906
+ As a small token of appreciation, everyone who completes our feedback form receives [incentive].
907
+
908
+ ---
909
+
910
+ *Every response is read personally by our team. We take your input seriously.*
911
+
912
+ Thanks in advance,
913
+ 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
914
+
915
+ We received a request to reset the password for your account.
916
+
917
+ ## Reset Your Password
918
+
919
+ Click the button below to create a new password. This link will expire in **24 hours** for your security.
920
+
921
+ [Reset Password](https://example.com/reset)
922
+
923
+ ## Didn't Request This?
924
+
925
+ If you didn't request a password reset, please ignore this email. Your account remains secure.
926
+
927
+ ## Need Help?
928
+
929
+ If you're having trouble with the reset process, contact our support team and we'll assist you right away.
930
+
931
+ ---
932
+
933
+ *For security reasons, this link can only be used once and expires in 24 hours.*
934
+
935
+ Best regards,
936
+ Security Team` }, { id: "order-confirmation", name: "Order Confirmation", subject: "Order Confirmed - #[ORDER-NUMBER]", description: "Professional order confirmation template", category: "commerce", body: `# Order Confirmation
937
+
938
+ Thanks for your order! We've received your payment and are preparing your items for shipment.
939
+
940
+ ## Order Details
941
+
942
+ **Order Number**: #[ORDER-NUMBER]
943
+ **Order Date**: [DATE]
944
+ **Total**: $[AMOUNT]
945
+
946
+ ## Items Ordered
947
+
948
+ * **[Item 1]** - Quantity: [QTY] - $[PRICE]
949
+ * **[Item 2]** - Quantity: [QTY] - $[PRICE]
950
+
951
+ ## Shipping Information
952
+
953
+ **Address**: [SHIPPING ADDRESS]
954
+ **Method**: [SHIPPING METHOD]
955
+ **Estimated Delivery**: [DELIVERY DATE]
956
+
957
+ ## Next Steps
958
+
959
+ You'll receive a tracking number via email once your order ships (usually within 1-2 business days).
960
+
961
+ [Track Your Order](https://example.com/track)
962
+
963
+ ---
964
+
965
+ *Questions about your order? Reply to this email or contact our support team.*
966
+
967
+ Thank you for your business,
968
+ The Fulfillment Team` }];
969
+ }
970
+ addKeyboardListeners() {
971
+ this.addEventListener("keydown", this.handleKeyDown), document.addEventListener("paste", this.handlePaste);
972
+ }
973
+ addDragListeners() {
974
+ document.addEventListener("dragenter", this.handleDragEnter), document.addEventListener("dragleave", this.handleDocumentDragLeave), document.addEventListener("drop", this.handleDocumentDrop);
975
+ }
976
+ insertAtCursor(e, t) {
977
+ if (!this.bodyTextAreaRef.value) return;
978
+ const s = this.bodyTextAreaRef.value.shadowRoot?.querySelector("textarea");
979
+ if (!s) return;
980
+ const i = s.selectionStart, a = s.selectionEnd, n = s.value.substring(0, i) + e + s.value.substring(a);
981
+ this.body = n, this.dispatchChange(), this.updateComplete.then(() => {
982
+ const r = this.bodyTextAreaRef.value?.shadowRoot?.querySelector("textarea");
983
+ if (r) if (r.focus(), t) {
984
+ const o = i + e.indexOf(t), l = o + t.length;
985
+ r.setSelectionRange(o, l);
986
+ } else r.setSelectionRange(i + e.length, i + e.length);
987
+ });
988
+ }
989
+ wrapSelection(e, t, s) {
990
+ if (!this.bodyTextAreaRef.value) return;
991
+ const i = this.bodyTextAreaRef.value.shadowRoot?.querySelector("textarea");
992
+ if (!i) return;
993
+ const a = i.selectionStart, n = i.selectionEnd, r = i.value.substring(a, n), o = e + (r || s) + t, l = i.value.substring(0, a) + o + i.value.substring(n);
994
+ this.body = l, this.dispatchChange(), this.updateComplete.then(() => {
995
+ const p = this.bodyTextAreaRef.value?.shadowRoot?.querySelector("textarea");
996
+ p && (p.focus(), r ? p.setSelectionRange(a + o.length, a + o.length) : p.setSelectionRange(a + e.length, a + e.length + s.length));
997
+ });
998
+ }
999
+ render() {
1000
+ return c`
1001
+ <schmancy-surface
1002
+ type="surface"
1003
+ rounded="all"
1004
+ class=${this.classMap({ "border-2 border-dashed border-primary": this.dragOver, "h-full flex flex-col": !0 })}
1005
+ @drop=${this.handleDrop}
1006
+ @dragover=${this.handleDragOver}
1007
+ @dragleave=${this.handleDragLeave}
1008
+ >
1009
+ <div class="flex flex-col h-full gap-4">
1010
+
1011
+ <!-- Header Section with Subject -->
1012
+ <div class="flex-shrink-0 p-4 pb-0 space-y-4">
1013
+ <!-- Subject Field -->
1014
+ <div class="space-y-2">
1015
+ <schmancy-typography type="label" token="md">
1016
+ Subject *
1017
+ </schmancy-typography>
1018
+ <schmancy-input
1019
+ ${E(this.subjectInputRef)}
1020
+ .value=${this.subject}
1021
+ @input=${this.handleSubjectChange}
1022
+ placeholder="Enter email subject..."
1023
+ .disabled=${this.disabled}
1024
+ class="w-full"
1025
+ ></schmancy-input>
1026
+ </div>
1027
+ </div>
1028
+
1029
+ <!-- Formatting Toolbar -->
1030
+ <div class="flex-shrink-0 px-4">
1031
+ <schmancy-surface type="container" rounded="all" class="p-3">
1032
+ <div class="flex flex-wrap gap-2 items-center">
1033
+ <!-- Text Formatting Group -->
1034
+ <div class="flex gap-1">
1035
+ <schmancy-icon-button
1036
+ size="sm"
1037
+ variant="text"
1038
+ title="Bold"
1039
+ ?disabled=${this.disabled}
1040
+ @click=${() => this.wrapSelection("**", "**", "bold text")}
1041
+ >
1042
+ <schmancy-icon>format_bold</schmancy-icon>
1043
+ </schmancy-icon-button>
1044
+ <schmancy-icon-button
1045
+ size="sm"
1046
+ variant="text"
1047
+ title="Italic"
1048
+ ?disabled=${this.disabled}
1049
+ @click=${() => this.wrapSelection("*", "*", "italic text")}
1050
+ >
1051
+ <schmancy-icon>format_italic</schmancy-icon>
1052
+ </schmancy-icon-button>
1053
+ <schmancy-icon-button
1054
+ size="sm"
1055
+ variant="text"
1056
+ title="Link"
1057
+ ?disabled=${this.disabled}
1058
+ @click=${() => this.insertAtCursor("[link text](https://example.com)", "link text")}
1059
+ >
1060
+ <schmancy-icon>link</schmancy-icon>
1061
+ </schmancy-icon-button>
1062
+ </div>
1063
+
1064
+ <!-- Divider -->
1065
+ <div class="h-6 w-px bg-outline-variant"></div>
1066
+
1067
+ <!-- Structure Formatting Group -->
1068
+ <div class="flex gap-1">
1069
+ <schmancy-icon-button
1070
+ size="sm"
1071
+ variant="text"
1072
+ title="Heading"
1073
+ ?disabled=${this.disabled}
1074
+ @click=${() => this.insertAtCursor(`
1075
+ # Heading
1076
+ `, "Heading")}
1077
+ >
1078
+ <schmancy-icon>title</schmancy-icon>
1079
+ </schmancy-icon-button>
1080
+ <schmancy-icon-button
1081
+ size="sm"
1082
+ variant="text"
1083
+ title="Bullet List"
1084
+ ?disabled=${this.disabled}
1085
+ @click=${() => this.insertAtCursor(`
1086
+ * List item
1087
+ `, "List item")}
1088
+ >
1089
+ <schmancy-icon>format_list_bulleted</schmancy-icon>
1090
+ </schmancy-icon-button>
1091
+ </div>
1092
+
1093
+ <!-- Divider -->
1094
+ <div class="h-6 w-px bg-outline-variant"></div>
1095
+
1096
+ <!-- Media and Layout Group -->
1097
+ <div class="flex gap-1">
1098
+ <schmancy-icon-button
1099
+ size="sm"
1100
+ variant="text"
1101
+ title="Insert Image"
1102
+ ?disabled=${this.disabled || this.isUploading}
1103
+ @click=${() => this.imageInputRef.value?.click()}
1104
+ >
1105
+ ${h(this.isUploading, () => c`<schmancy-progress size="sm" class="w-4 h-4"></schmancy-progress>`, () => c`<schmancy-icon>image</schmancy-icon>`)}
1106
+ </schmancy-icon-button>
1107
+ <schmancy-icon-button
1108
+ size="sm"
1109
+ variant="text"
1110
+ title="Insert Layout"
1111
+ ?disabled=${this.disabled}
1112
+ @click=${this.openLayoutDialog}
1113
+ >
1114
+ <schmancy-icon>mobile_layout</schmancy-icon>
1115
+ </schmancy-icon-button>
1116
+ <schmancy-icon-button
1117
+ size="sm"
1118
+ variant="text"
1119
+ title="Use Template"
1120
+ ?disabled=${this.disabled || this.templates.length === 0}
1121
+ @click=${this.openTemplatePicker}
1122
+ >
1123
+ <schmancy-icon>description</schmancy-icon>
1124
+ </schmancy-icon-button>
1125
+ </div>
1126
+ </div>
1127
+ </schmancy-surface>
1128
+ </div>
1129
+
1130
+ <!-- Textarea Container - Takes remaining space -->
1131
+ <div class="flex-1 px-4 relative min-h-0">
1132
+ <schmancy-textarea
1133
+ ${E(this.bodyTextAreaRef)}
1134
+ .value=${this.body}
1135
+ @change=${this.handleBodyChange}
1136
+ placeholder="Enter your email message here...
1137
+
1138
+ Use the toolbar buttons above for formatting, or type markdown directly:
1139
+ **bold**, *italic*, [link](url), ![image](url)
1140
+
1141
+ Drag & drop images or press Ctrl+V to paste from clipboard.
1142
+ Tab key inserts 2 spaces for better formatting."
1143
+ .disabled=${this.disabled}
1144
+ .required=${!0}
1145
+ .rows=${4}
1146
+ class="w-full font-mono text-sm"
1147
+ ></schmancy-textarea>
1148
+
1149
+ <!-- Upload Progress Overlay -->
1150
+ ${h(this.isUploading, () => c`
1151
+ <div class="absolute top-3 right-3 z-10">
1152
+ <schmancy-surface type="container" rounded="all" class="p-2">
1153
+ <div class="flex items-center gap-2">
1154
+ <schmancy-progress size="sm" class="w-4 h-4"></schmancy-progress>
1155
+ <schmancy-typography type="body" token="xs">Uploading...</schmancy-typography>
1156
+ </div>
1157
+ </schmancy-surface>
1158
+ </div>
1159
+ `)}
1160
+ </div>
1161
+
1162
+ <!-- Footer Section -->
1163
+ <div class="flex-shrink-0 p-4 pt-0 space-y-2">
1164
+ <!-- Character/Word Counter -->
1165
+ <div class="text-center">
1166
+ <schmancy-typography type="body" token="xs">
1167
+ ${this.body.length} characters • ${this.body.trim() ? this.body.trim().split(/\s+/).length : 0} words
1168
+ </schmancy-typography>
1169
+ </div>
1170
+
1171
+ <!-- Attachments Display (if any) -->
1172
+ ${h(this.attachments.length > 0, () => c`
1173
+ <div class="space-y-2">
1174
+ <schmancy-typography type="label" token="sm" class="flex items-center gap-2">
1175
+ <schmancy-icon size="16px">attach_file</schmancy-icon>
1176
+ Attachments (${this.attachments.length})
1177
+ </schmancy-typography>
1178
+ <div class="flex flex-wrap gap-2">
1179
+ ${I(this.attachments, (e) => e.id, (e) => c`
1180
+ <schmancy-chip class="text-xs">
1181
+ <span class="truncate max-w-32">${e.name}</span>
1182
+ <button
1183
+ @click=${() => this.removeAttachment(e.id)}
1184
+ class="ml-2 text-error hover:text-error-container"
1185
+ title="Remove attachment"
1186
+ >
1187
+ <schmancy-icon size="14px">close</schmancy-icon>
1188
+ </button>
1189
+ </schmancy-chip>
1190
+ `)}
1191
+ </div>
1192
+ </div>
1193
+ `)}
1194
+ </div>
1195
+
1196
+ <!-- Hidden File Inputs -->
1197
+ <div class="hidden">
1198
+ <input
1199
+ ${E(this.fileInputRef)}
1200
+ type="file"
1201
+ multiple
1202
+ @change=${this.handleFileChange}
1203
+ >
1204
+ <input
1205
+ ${E(this.imageInputRef)}
1206
+ type="file"
1207
+ accept="image/*"
1208
+ @change=${this.handleImageSelect}
1209
+ >
1210
+ </div>
1211
+
1212
+ </div>
1213
+ </schmancy-surface>
1214
+
1215
+ `;
1216
+ }
1217
+ };
1218
+ x([d({ type: String })], b.prototype, "subject", 2), x([d({ type: String })], b.prototype, "body", 2), x([d({ type: Boolean })], b.prototype, "disabled", 2), x([d({ type: Array })], b.prototype, "attachments", 2), x([d({ type: Object })], b.prototype, "config", 2), x([d({ type: Array })], b.prototype, "templates", 2), x([m()], b.prototype, "dragOver", 2), x([m()], b.prototype, "isUploading", 2), b = x([R("schmancy-email-editor")], b);
1219
+ var W = Object.defineProperty, N = Object.getOwnPropertyDescriptor, S = (e, t, s, i) => {
1220
+ for (var a, n = i > 1 ? void 0 : i ? N(t, s) : t, r = e.length - 1; r >= 0; r--) (a = e[r]) && (n = (i ? a(t, s, n) : a(n)) || n);
1221
+ return i && n && W(t, s, n), n;
1222
+ };
1223
+ let w = class extends A(D`
1224
+ :host {
1225
+ display: block;
1226
+ }
1227
+ `) {
1228
+ constructor() {
1229
+ super(...arguments), this.subject = "", this.body = "", this.attachments = [], this.recipients = [], this.fromAddress = "sender@example.com", this.toAddress = "recipient@example.com", this.viewMode = "html";
1230
+ }
1231
+ parseLayoutBlocks(e) {
1232
+ return e.replace(/:::layout\s+([a-zA-Z0-9-]+)\n([\s\S]*?)\n:::/g, (t, s, i) => {
1233
+ switch (s) {
1234
+ case "columns-2":
1235
+ return this.parseColumnsLayout(i, 2);
1236
+ case "columns-3":
1237
+ return this.parseColumnsLayout(i, 3);
1238
+ case "sidebar-left":
1239
+ return this.parseSidebarLayout(i, "left");
1240
+ case "sidebar-right":
1241
+ return this.parseSidebarLayout(i, "right");
1242
+ case "image-row":
1243
+ return this.parseImageRowLayout(i);
1244
+ default:
1245
+ return i;
1246
+ }
1247
+ });
1248
+ }
1249
+ parseColumnsLayout(e, t) {
1250
+ const s = /<div class="column">([\s\S]*?)<\/div>/g, i = [];
1251
+ let a;
1252
+ for (; (a = s.exec(e)) !== null; ) i.push(a[1].trim());
1253
+ if (i.length === 0) return e;
1254
+ const n = Math.floor(100 / t), r = "0 10px 0 0";
1255
+ let o = "<tr>";
1256
+ for (let l = 0; l < t && l < i.length; l++)
1257
+ o += `
1258
+ <td width="${n}%" style="padding: ${l === t - 1 ? "0" : r}; vertical-align: top; font-family: Arial, Helvetica, sans-serif; font-size: 14px; line-height: 1.6; color: #333333;">
1259
+ ${this.parseBasicMarkdown(i[l])}
1260
+ </td>`;
1261
+ for (let l = i.length; l < t; l++)
1262
+ o += `
1263
+ <td width="${n}%" style="padding: ${l === t - 1 ? "0" : r}; vertical-align: top;">
1264
+ &nbsp;
1265
+ </td>`;
1266
+ return o += "</tr>", `
1267
+ <table cellpadding="0" cellspacing="0" border="0" width="100%" style="margin: 16px 0;">
1268
+ ${o}
1269
+ </table>`;
1270
+ }
1271
+ parseSidebarLayout(e, t) {
1272
+ const s = e.match(/<div class="sidebar">([\s\S]*?)<\/div>/), i = e.match(/<div class="main">([\s\S]*?)<\/div>/);
1273
+ if (!s || !i) return e;
1274
+ const a = `
1275
+ <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;">
1276
+ ${this.parseBasicMarkdown(s[1].trim())}
1277
+ </td>`, n = `
1278
+ <td width="70%" style="padding: 0; vertical-align: top; font-family: Arial, Helvetica, sans-serif; font-size: 14px; line-height: 1.6; color: #333333;">
1279
+ ${this.parseBasicMarkdown(i[1].trim())}
1280
+ </td>`;
1281
+ return `
1282
+ <table cellpadding="0" cellspacing="0" border="0" width="100%" style="margin: 16px 0;">
1283
+ ${t === "left" ? `<tr>${a}${n}</tr>` : `<tr>${n}${a.replace("0 16px 0 0", "0 0 0 16px")}</tr>`}
1284
+ </table>`;
1285
+ }
1286
+ parseImageRowLayout(e) {
1287
+ const t = /<div class="image">([\s\S]*?)<\/div>/g, s = [];
1288
+ let i;
1289
+ for (; (i = t.exec(e)) !== null; ) {
1290
+ const r = i[1].trim().match(/!\[([^\]]*)\]\(([^)]+)\)/);
1291
+ if (r) {
1292
+ const [, o, l] = r;
1293
+ s.push(`<img src="${l}" alt="${o || "Image"}" style="display: block; max-width: 100%; height: auto;" border="0">`);
1294
+ }
1295
+ }
1296
+ if (s.length === 0) return e;
1297
+ const a = Math.floor(100 / s.length);
1298
+ let n = "<tr>";
1299
+ return s.forEach((r, o) => {
1300
+ const l = o === s.length - 1;
1301
+ n += `
1302
+ <td width="${a}%" style="padding: ${l ? "0" : "0 8px 0 0"}; vertical-align: top; text-align: center;">
1303
+ ${r}
1304
+ </td>`;
1305
+ }), n += "</tr>", `
1306
+ <table cellpadding="0" cellspacing="0" border="0" width="100%" style="margin: 16px 0;">
1307
+ ${n}
1308
+ </table>`;
1309
+ }
1310
+ parseImageAttributes(e) {
1311
+ const t = {};
1312
+ if (!e) return t;
1313
+ const s = e.match(/width=([^\s}]+)/);
1314
+ s && (t.width = s[1]);
1315
+ const i = e.match(/height=([^\s}]+)/);
1316
+ return i && (t.height = i[1]), e.includes("cover") && (t.cover = !0), e.includes("contain") && (t.contain = !0), t;
1317
+ }
1318
+ generateImageStyles(e, t = !1) {
1319
+ let s, i, a = "display: block; margin: 8px 0; border: 0;";
1320
+ 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") && (s = 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") && (i = e.height.replace("px", ""), e.width || (a += " max-width: 100%;"))), (e.cover || e.contain) && (e.width || e.height || (a += " width: 100%;")), { imgStyle: a, imgWidth: s, imgHeight: i };
1321
+ }
1322
+ parseBasicMarkdown(e) {
1323
+ return e.replace(/!\[([^\]]*)\]\(([^)]+)\)(?:\{([^}]+)\})?/g, (t, s, i, a) => {
1324
+ const n = this.parseImageAttributes(a), { imgStyle: r, imgWidth: o, imgHeight: l } = this.generateImageStyles(n, !0);
1325
+ let p = `<img src="${i}" alt="${s || "Image"}" style="${r}" border="0"`;
1326
+ return o && (p += ` width="${o}"`), l && (p += ` height="${l}"`), p += ">", p;
1327
+ }).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) => {
1328
+ const s = /^\d+\./.test(t.replace(/<[^>]*>/g, "")) ? "ol" : "ul";
1329
+ return `<${s} style="margin: 8px 0; padding: 0 0 0 20px; font-family: Arial, Helvetica, sans-serif;">${t}</${s}>`;
1330
+ }).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>');
1331
+ }
1332
+ parseExtendedMarkdown(e) {
1333
+ let t = e;
1334
+ 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, (s, i, a, n) => {
1335
+ const r = this.parseImageAttributes(n), { imgStyle: o, imgWidth: l, imgHeight: p } = this.generateImageStyles(r, !1);
1336
+ let k = `<img src="${a}" alt="${i || "Image"}" style="${o}" border="0"`;
1337
+ return l && (k += ` width="${l}"`), p && (k += ` height="${p}"`), k += ">", `<table cellpadding="0" cellspacing="0" border="0" style="margin: 16px 0;"><tr><td>${k}</td></tr></table>`;
1338
+ }), 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, (s) => {
1339
+ const i = /^\d+\./.test(s.replace(/<[^>]*>/g, "")), a = i ? "ol" : "ul";
1340
+ 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;">${s}</${a}></td></tr></table>`;
1341
+ }), 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;">
1342
+ <tr>
1343
+ <td style="padding: 0; font-family: Arial, Helvetica, sans-serif; font-size: 14px; line-height: 1.6; color: #333333;">
1344
+ ${t}
1345
+ </td>
1346
+ </tr>
1347
+ </table>`, t;
1348
+ }
1349
+ convertToPlainText(e) {
1350
+ return e.trim().replace(/:::layout\s+([a-zA-Z0-9-]+)\n([\s\S]*?)\n:::/g, (t, s, i) => i.replace(/<div class="(?:column|sidebar|main|image)">/g, `
1351
+ `).replace(/<\/div>/g, `
1352
+ `).replace(/\n{3,}/g, `
1353
+
1354
+ `).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, `
1355
+
1356
+ `);
1357
+ }
1358
+ formatFileSize(e) {
1359
+ if (e === 0) return "0 Bytes";
1360
+ const t = Math.floor(Math.log(e) / Math.log(1024));
1361
+ return parseFloat((e / Math.pow(1024, t)).toFixed(2)) + " " + ["Bytes", "KB", "MB", "GB"][t];
1362
+ }
1363
+ render() {
1364
+ const e = this.parseExtendedMarkdown(this.body), t = this.convertToPlainText(this.body), s = this.recipients[0] || this.toAddress;
1365
+ return c`
1366
+ <schmancy-surface type="surface" rounded="all" class="h-full flex flex-col">
1367
+
1368
+ <!-- Header Section -->
1369
+ <div class="flex-shrink-0 p-4 border-b border-outline-variant">
1370
+ <div class="flex flex-col sm:flex-row sm:items-center sm:justify-between gap-4">
1371
+ <schmancy-typography type="title" token="md" class="flex items-center gap-2">
1372
+ <schmancy-icon size="20px">preview</schmancy-icon>
1373
+ Email Preview
1374
+ </schmancy-typography>
1375
+
1376
+ <!-- View Mode Toggle -->
1377
+ <div class="flex gap-1 bg-surface-container rounded-full p-1">
1378
+ <schmancy-chip
1379
+ ?selected=${this.viewMode === "html"}
1380
+ @click=${() => {
1381
+ this.viewMode = "html";
1382
+ }}
1383
+ class="text-xs h-8"
1384
+ data-variant=${this.viewMode === "html" ? "filled" : "outlined"}
1385
+ >
1386
+ <schmancy-icon slot="prefix" size="14px">code</schmancy-icon>
1387
+ HTML
1388
+ </schmancy-chip>
1389
+ <schmancy-chip
1390
+ ?selected=${this.viewMode === "plaintext"}
1391
+ @click=${() => {
1392
+ this.viewMode = "plaintext";
1393
+ }}
1394
+ class="text-xs h-8"
1395
+ data-variant=${this.viewMode === "plaintext" ? "filled" : "outlined"}
1396
+ >
1397
+ <schmancy-icon slot="prefix" size="14px">text_fields</schmancy-icon>
1398
+ Text
1399
+ </schmancy-chip>
1400
+ </div>
1401
+ </div>
1402
+ </div>
1403
+
1404
+ <!-- Preview Content Container -->
1405
+ <div class="flex-1 flex flex-col min-h-0 p-4 gap-4">
1406
+
1407
+ <!-- Email Mock Container -->
1408
+ <div class="flex-1 flex flex-col min-h-0">
1409
+ <schmancy-surface
1410
+ type="container"
1411
+ rounded="all"
1412
+ class="flex-1 flex flex-col overflow-hidden shadow-sm"
1413
+ >
1414
+ <!-- Email Header -->
1415
+ <div class="flex-shrink-0 p-4 bg-surface-containerLow border-b border-outline-variant">
1416
+ <div class="space-y-3">
1417
+ <!-- From Field -->
1418
+ <div class="flex items-start gap-3">
1419
+ <div class="flex items-center gap-2 min-w-0 flex-shrink-0 w-16">
1420
+ <schmancy-icon size="16px">account_circle</schmancy-icon>
1421
+ <schmancy-typography type="body" token="sm" class="font-medium">
1422
+ From
1423
+ </schmancy-typography>
1424
+ </div>
1425
+ <schmancy-typography type="body" token="sm" class="break-all flex-1">
1426
+ ${this.fromAddress}
1427
+ </schmancy-typography>
1428
+ </div>
1429
+
1430
+ <!-- To Field -->
1431
+ <div class="flex items-start gap-3">
1432
+ <div class="flex items-center gap-2 min-w-0 flex-shrink-0 w-16">
1433
+ <schmancy-icon size="16px">person</schmancy-icon>
1434
+ <schmancy-typography type="body" token="sm" class="font-medium">
1435
+ To
1436
+ </schmancy-typography>
1437
+ </div>
1438
+ <schmancy-typography type="body" token="sm" class="break-all flex-1">
1439
+ ${s}
1440
+ </schmancy-typography>
1441
+ </div>
1442
+
1443
+ <!-- Subject Field -->
1444
+ <div class="flex items-start gap-3">
1445
+ <div class="flex items-center gap-2 min-w-0 flex-shrink-0 w-16">
1446
+ <schmancy-icon size="16px">subject</schmancy-icon>
1447
+ <schmancy-typography type="body" token="sm" class="font-medium">
1448
+ Subject
1449
+ </schmancy-typography>
1450
+ </div>
1451
+ <schmancy-typography type="body" token="sm" class="font-medium flex-1">
1452
+ ${this.subject || c`<span class="italic text-surface-onVariant">(No subject)</span>`}
1453
+ </schmancy-typography>
1454
+ </div>
1455
+ </div>
1456
+ </div>
1457
+
1458
+ <!-- Email Body Content -->
1459
+ <div class="flex-1 overflow-y-auto min-h-0">
1460
+ ${h(this.body, () => c`
1461
+ ${h(this.viewMode === "html", () => c`
1462
+ <div class="p-6 bg-white" style="color: #333; line-height: 1.6; font-family: system-ui, -apple-system, sans-serif; font-size: 14px;">
1463
+ <div .innerHTML=${e}></div>
1464
+ </div>
1465
+ `, () => c`
1466
+ <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;">
1467
+ ${t}
1468
+ </div>
1469
+ `)}
1470
+ `, () => c`
1471
+ <!-- Empty State -->
1472
+ <div class="flex-1 flex items-center justify-center p-8">
1473
+ <div class="text-center space-y-3">
1474
+ <schmancy-icon size="48px" class="text-surface-onVariant opacity-50">mail_outline</schmancy-icon>
1475
+ <schmancy-typography type="body" token="md">
1476
+ No message content to preview
1477
+ </schmancy-typography>
1478
+ <schmancy-typography type="body" token="sm" class="text-surface-onVariant">
1479
+ Start typing in the composer to see a preview
1480
+ </schmancy-typography>
1481
+ </div>
1482
+ </div>
1483
+ `)}
1484
+ </div>
1485
+
1486
+ <!-- Attachments Section -->
1487
+ ${h(this.attachments.length > 0, () => c`
1488
+ <div class="flex-shrink-0 p-4 border-t border-outline-variant bg-surface-containerLowest">
1489
+ <div class="space-y-3">
1490
+ <!-- Attachments Header -->
1491
+ <div class="flex items-center gap-2">
1492
+ <schmancy-icon size="18px">attach_file</schmancy-icon>
1493
+ <schmancy-typography type="label" token="md" class="font-medium">
1494
+ Attachments (${this.attachments.length})
1495
+ </schmancy-typography>
1496
+ </div>
1497
+
1498
+ <!-- Attachments List -->
1499
+ <div class="grid gap-2 sm:grid-cols-2 lg:grid-cols-1 xl:grid-cols-2">
1500
+ ${I(this.attachments, (i) => i.id, (i) => c`
1501
+ <schmancy-surface type="container" rounded="all" class="p-3">
1502
+ <div class="flex items-center gap-3">
1503
+ <!-- File Icon -->
1504
+ <schmancy-icon size="20px" class="text-surface-onVariant flex-shrink-0">
1505
+ ${i.type.startsWith("image/") ? "image" : i.type.includes("pdf") ? "picture_as_pdf" : i.type.includes("text") ? "description" : "attach_file"}
1506
+ </schmancy-icon>
1507
+
1508
+ <!-- File Info -->
1509
+ <div class="flex-1 min-w-0">
1510
+ <schmancy-typography type="body" token="sm" class="font-medium truncate">
1511
+ ${i.name}
1512
+ </schmancy-typography>
1513
+ <schmancy-typography type="body" token="xs" class="text-surface-onVariant">
1514
+ ${this.formatFileSize(i.size)} • ${i.type}
1515
+ </schmancy-typography>
1516
+ </div>
1517
+ </div>
1518
+ </schmancy-surface>
1519
+ `)}
1520
+ </div>
1521
+ </div>
1522
+ </div>
1523
+ `)}
1524
+ </schmancy-surface>
1525
+ </div>
1526
+
1527
+ <!-- Preview Stats -->
1528
+ ${h(this.body, () => c`
1529
+ <div class="flex-shrink-0">
1530
+ <schmancy-surface type="container" rounded="all" class="p-3">
1531
+ <div class="flex items-center justify-center gap-6 text-center">
1532
+ <div>
1533
+ <schmancy-typography type="body" token="xs" class="text-surface-onVariant">
1534
+ Characters
1535
+ </schmancy-typography>
1536
+ <schmancy-typography type="body" token="sm" class="font-medium">
1537
+ ${this.body.length}
1538
+ </schmancy-typography>
1539
+ </div>
1540
+ <div class="w-px h-8 bg-outline-variant"></div>
1541
+ <div>
1542
+ <schmancy-typography type="body" token="xs" class="text-surface-onVariant">
1543
+ Words
1544
+ </schmancy-typography>
1545
+ <schmancy-typography type="body" token="sm" class="font-medium">
1546
+ ${this.body.trim() ? this.body.trim().split(/\s+/).length : 0}
1547
+ </schmancy-typography>
1548
+ </div>
1549
+ ${h(this.attachments.length > 0, () => c`
1550
+ <div class="w-px h-8 bg-outline-variant"></div>
1551
+ <div>
1552
+ <schmancy-typography type="body" token="xs" class="text-surface-onVariant">
1553
+ Attachments
1554
+ </schmancy-typography>
1555
+ <schmancy-typography type="body" token="sm" class="font-medium">
1556
+ ${this.attachments.length}
1557
+ </schmancy-typography>
1558
+ </div>
1559
+ `)}
1560
+ </div>
1561
+ </schmancy-surface>
1562
+ </div>
1563
+ `)}
1564
+
1565
+ </div>
1566
+ </schmancy-surface>
1567
+ `;
1568
+ }
1569
+ };
1570
+ S([d({ type: String })], w.prototype, "subject", 2), S([d({ type: String })], w.prototype, "body", 2), S([d({ type: Array })], w.prototype, "attachments", 2), S([d({ type: Array })], w.prototype, "recipients", 2), S([d({ type: String })], w.prototype, "fromAddress", 2), S([d({ type: String })], w.prototype, "toAddress", 2), S([m()], w.prototype, "viewMode", 2), w = S([R("schmancy-email-viewer")], w);
1571
+ var Q = Object.defineProperty, _ = Object.getOwnPropertyDescriptor, f = (e, t, s, i) => {
1572
+ for (var a, n = i > 1 ? void 0 : i ? _(t, s) : t, r = e.length - 1; r >= 0; r--) (a = e[r]) && (n = (i ? a(t, s, n) : a(n)) || n);
1573
+ return i && n && Q(t, s, n), n;
1574
+ };
1575
+ let g = class extends A(D`
1576
+ :host {
1577
+ display: block;
1578
+ height: 100%;
1579
+ }
1580
+ `) {
1581
+ constructor() {
1582
+ 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 = /* @__PURE__ */ new Set(), this.searchQuery = "", this.filteredRecipients = [], this.boatState = "minimized", this.fileInputRef = T(), this.handleEmailsImported = () => {
1583
+ this.updateFilteredRecipients(), this.requestUpdate();
1584
+ }, this.handleImportFromCSV = () => {
1585
+ this.enableCsvImport && this.fileInputRef.value?.click();
1586
+ }, this.handleFileSelect = (e) => {
1587
+ const t = e.target, s = t.files?.[0];
1588
+ s && this.processCSVFile(s);
1589
+ }, this.handleDrop = (e) => {
1590
+ if (!this.enableDragDrop) return;
1591
+ e.preventDefault(), this.dragOver = !1;
1592
+ const t = e.dataTransfer?.files[0];
1593
+ t && this.processCSVFile(t);
1594
+ }, this.processCSVFile = (e) => {
1595
+ if (!e.name.endsWith(".csv")) return void v.error("Please select a CSV file");
1596
+ const t = new FileReader();
1597
+ t.onload = (s) => {
1598
+ const i = s.target?.result;
1599
+ try {
1600
+ const a = this.parseCSV(i);
1601
+ if (a.length === 0) return void v.error("No valid email addresses found in CSV");
1602
+ this.dispatchEvent(new CustomEvent("emails-imported", { detail: { emails: a, source: "csv" }, bubbles: !0, composed: !0 })), v.success(`Imported ${a.length} emails from CSV file`);
1603
+ } catch {
1604
+ v.error("Failed to parse CSV file");
1605
+ }
1606
+ }, t.readAsText(e);
1607
+ }, this.toggleRecipientSelection = (e) => {
1608
+ this.localSelectedRecipients.has(e) ? this.localSelectedRecipients.delete(e) : this.localSelectedRecipients.add(e), this.localSelectedRecipients = new Set(this.localSelectedRecipients), this.dispatchSelectionChange();
1609
+ }, this.selectAll = () => {
1610
+ this.localSelectedRecipients = new Set(this.filteredRecipients), this.dispatchSelectionChange();
1611
+ }, this.selectNone = () => {
1612
+ this.localSelectedRecipients.clear(), this.localSelectedRecipients = /* @__PURE__ */ new Set(), this.dispatchSelectionChange();
1613
+ }, this.removeRecipient = (e) => {
1614
+ this.dispatchEvent(new CustomEvent("recipient-removed", { detail: { email: e }, bubbles: !0, composed: !0 }));
1615
+ }, this.clearAll = () => {
1616
+ this.dispatchEvent(new CustomEvent("recipients-cleared", { bubbles: !0, composed: !0 }));
1617
+ }, this.updateFilteredRecipients = () => {
1618
+ const e = Array.isArray(this.recipients) ? this.recipients : [];
1619
+ if (this.searchQuery.trim()) {
1620
+ const t = this.searchQuery.toLowerCase();
1621
+ this.filteredRecipients = e.filter((s) => s.toLowerCase().includes(t));
1622
+ } else this.filteredRecipients = [...e];
1623
+ }, this.handleSearchInput = (e) => {
1624
+ const t = e.target;
1625
+ this.searchQuery = t.value;
1626
+ }, this.clearSearch = () => {
1627
+ this.searchQuery = "";
1628
+ }, this.dispatchSelectionChange = () => {
1629
+ this.dispatchEvent(new CustomEvent("selection-changed", { detail: { selectedEmails: Array.from(this.localSelectedRecipients) }, bubbles: !0, composed: !0 }));
1630
+ }, this.handleBoatStateChange = (e) => {
1631
+ this.boatState = e.detail;
1632
+ };
1633
+ }
1634
+ connectedCallback() {
1635
+ super.connectedCallback(), this.localSelectedRecipients = new Set(this.selectedRecipients), this.updateFilteredRecipients(), this.addEventListener("emails-imported", this.handleEmailsImported);
1636
+ }
1637
+ updated(e) {
1638
+ 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();
1639
+ }
1640
+ parseCSV(e) {
1641
+ const t = [];
1642
+ let s;
1643
+ s = this.csvParser ? this.csvParser.parse(e, { header: !0, skipEmptyLines: !0, dynamicTyping: !0, delimiter: "", transformHeader: (o) => o.trim() }) : this.simpleCSVParse(e);
1644
+ const i = s.data, a = s.meta.fields || [];
1645
+ let n = a.find((o) => o.toLowerCase().includes("email"));
1646
+ if (!n) for (const o of a) {
1647
+ const l = i[0]?.[o]?.toString();
1648
+ if (l && this.isValidEmail(l)) {
1649
+ n = o;
1650
+ break;
1651
+ }
1652
+ }
1653
+ if (!n) throw new Error("No email column found in CSV");
1654
+ const r = /* @__PURE__ */ new Set();
1655
+ for (const o of i) {
1656
+ const l = o[n]?.toString();
1657
+ if (!l) continue;
1658
+ const p = l.toLowerCase().trim();
1659
+ this.isValidEmail(p) && !r.has(p) && (r.add(p), t.push(p));
1660
+ }
1661
+ return t;
1662
+ }
1663
+ simpleCSVParse(e) {
1664
+ const t = e.split(`
1665
+ `).filter((a) => a.trim());
1666
+ if (t.length === 0) return { data: [], meta: {} };
1667
+ const s = t[0].split(",").map((a) => a.trim().replace(/"/g, "")), i = [];
1668
+ for (let a = 1; a < t.length; a++) {
1669
+ const n = t[a].split(",").map((o) => o.trim().replace(/"/g, "")), r = {};
1670
+ s.forEach((o, l) => {
1671
+ r[o] = n[l] || "";
1672
+ }), i.push(r);
1673
+ }
1674
+ return { data: i, meta: { fields: s } };
1675
+ }
1676
+ isValidEmail(e) {
1677
+ return /^[^\s@]+@[^\s@]+\.[^\s@]+$/.test(e.trim());
1678
+ }
1679
+ addRecipients(e) {
1680
+ if (!e.length) return;
1681
+ const t = [.../* @__PURE__ */ new Set([...this.recipients, ...e])], s = e.filter((i) => !this.recipients.includes(i));
1682
+ this.recipients = t, this.selectedRecipients = [.../* @__PURE__ */ new Set([...this.selectedRecipients, ...s])], this.localSelectedRecipients = new Set(this.selectedRecipients), this.updateFilteredRecipients(), this.requestUpdate();
1683
+ }
1684
+ showBoat() {
1685
+ this.boatState = "minimized";
1686
+ }
1687
+ hideBoat() {
1688
+ this.boatState = "hidden";
1689
+ }
1690
+ expandBoat() {
1691
+ this.boatState = "expanded";
1692
+ }
1693
+ toggleBoat() {
1694
+ this.boatState = this.boatState === "hidden" ? "minimized" : this.boatState === "minimized" ? "expanded" : "hidden";
1695
+ }
1696
+ render() {
1697
+ return this.renderBoatLayout();
1698
+ }
1699
+ renderBoatLayout() {
1700
+ return c`
1701
+ <!-- Hidden file input for CSV import -->
1702
+ ${h(this.enableCsvImport, () => c`
1703
+ <input
1704
+ type="file"
1705
+ accept=".csv"
1706
+ ${E(this.fileInputRef)}
1707
+ @change=${this.handleFileSelect}
1708
+ class="hidden"
1709
+ />
1710
+ `)}
1711
+
1712
+ <schmancy-boat
1713
+ .state=${this.boatState}
1714
+ @change=${this.handleBoatStateChange}
1715
+ >
1716
+ <!-- Boat Header -->
1717
+ <div slot="header" class="flex items-center justify-between w-full px-4 py-2">
1718
+ <div class="flex items-center gap-3">
1719
+ <schmancy-icon size="20px">group</schmancy-icon>
1720
+ <schmancy-typography type="title" token="md" class="font-semibold">
1721
+ ${this.title}
1722
+ </schmancy-typography>
1723
+ ${h(this.recipients.length > 0, () => c`
1724
+ <schmancy-badge>
1725
+ ${this.localSelectedRecipients.size}/${this.recipients.length}
1726
+ </schmancy-badge>
1727
+ `)}
1728
+ </div>
1729
+ </div>
1730
+
1731
+ <!-- Boat Content -->
1732
+ <div class="h-full flex flex-col max-h-[70vh]">
1733
+ ${this.renderBoatContent()}
1734
+ </div>
1735
+ </schmancy-boat>
1736
+ `;
1737
+ }
1738
+ renderBoatContent() {
1739
+ return c`
1740
+ <!-- Search Bar and CSV Import on one line -->
1741
+ <div class="p-4 flex gap-3">
1742
+ <schmancy-input
1743
+ type="text"
1744
+ placeholder="Search recipients"
1745
+ .value=${this.searchQuery}
1746
+ @input=${this.handleSearchInput}
1747
+ class="flex-1"
1748
+ >
1749
+ ${h(this.searchQuery, () => c`
1750
+ <schmancy-button
1751
+ slot="suffix"
1752
+ variant="text"
1753
+ @click=${this.clearSearch}
1754
+ >
1755
+ <schmancy-icon size="16px">close</schmancy-icon>
1756
+ </schmancy-button>
1757
+ `)}
1758
+ </schmancy-input>
1759
+
1760
+ ${h(this.enableCsvImport, () => c`
1761
+ <schmancy-button
1762
+ variant="outlined"
1763
+ @click=${this.handleImportFromCSV}
1764
+ ?disabled=${this.disabled}
1765
+ >
1766
+ <schmancy-icon slot="prefix" size="16px">upload_file</schmancy-icon>
1767
+ Import
1768
+ </schmancy-button>
1769
+ `)}
1770
+ </div>
1771
+
1772
+ ${h(this.recipients.length > 0, () => c`
1773
+ <!-- Bulk Actions -->
1774
+ <div class="px-4 pb-4">
1775
+ <div class="flex items-center gap-3">
1776
+ <schmancy-button
1777
+ variant="outlined"
1778
+ @click=${this.selectAll}
1779
+ ?disabled=${this.localSelectedRecipients.size === this.filteredRecipients.length}
1780
+ >
1781
+ <schmancy-icon slot="prefix" size="14px">select_all</schmancy-icon>
1782
+ Select All
1783
+ </schmancy-button>
1784
+
1785
+ <schmancy-button
1786
+ variant="outlined"
1787
+ @click=${this.selectNone}
1788
+ ?disabled=${this.localSelectedRecipients.size === 0}
1789
+ >
1790
+ <schmancy-icon slot="prefix" size="14px">deselect</schmancy-icon>
1791
+ Clear Selection
1792
+ </schmancy-button>
1793
+
1794
+ <div class="flex-1"></div>
1795
+
1796
+ <schmancy-button variant="text" @click=${this.clearAll}>
1797
+ <schmancy-icon slot="prefix" size="14px">delete_forever</schmancy-icon>
1798
+ Clear All
1799
+ </schmancy-button>
1800
+ </div>
1801
+ </div>
1802
+
1803
+ <!-- Recipients List -->
1804
+ <div class="flex-1 overflow-y-auto px-4 pb-4">
1805
+ ${h(this.filteredRecipients.length > 0, () => c`
1806
+ <div class="flex flex-wrap gap-3">
1807
+ ${I(this.filteredRecipients, (e) => e, (e) => c`
1808
+ <schmancy-button
1809
+ variant=${this.localSelectedRecipients.has(e) ? "filled" : "outlined"}
1810
+ @click=${(t) => {
1811
+ t.stopPropagation(), t.preventDefault(), this.toggleRecipientSelection(e);
1812
+ }}
1813
+ class="cursor-pointer flex items-center gap-2"
1814
+ >
1815
+ <span class="truncate flex-1 text-left">${e}</span>
1816
+ <schmancy-icon
1817
+ @click=${(t) => {
1818
+ t.stopPropagation(), this.removeRecipient(e);
1819
+ }}
1820
+ size="16px"
1821
+ class="ml-2"
1822
+ >close</schmancy-icon>
1823
+ </schmancy-button>
1824
+ `)}
1825
+ </div>
1826
+ `, () => c`
1827
+ <div class="text-center py-8">
1828
+ <schmancy-icon size="32px" class="opacity-50 mb-2">search_off</schmancy-icon>
1829
+ <schmancy-typography type="body" token="sm" class="mb-2">
1830
+ No recipients match "${this.searchQuery}"
1831
+ </schmancy-typography>
1832
+ <schmancy-button variant="outlined" @click=${this.clearSearch}>
1833
+ Clear Search
1834
+ </schmancy-button>
1835
+ </div>
1836
+ `)}
1837
+ </div>
1838
+ `, () => c`
1839
+ <!-- Empty State -->
1840
+ <div class="flex-1 flex items-center justify-center p-8">
1841
+ <div class="text-center space-y-4">
1842
+ <schmancy-icon size="48px" class="opacity-30">mail_outline</schmancy-icon>
1843
+ <schmancy-typography type="title" token="md" class="mb-2">
1844
+ ${this.emptyStateTitle}
1845
+ </schmancy-typography>
1846
+ <schmancy-typography type="body" token="sm">
1847
+ ${this.emptyStateMessage}
1848
+ </schmancy-typography>
1849
+ </div>
1850
+ </div>
1851
+ `)}
1852
+
1853
+ <!-- Drag Overlay -->
1854
+ ${h(this.dragOver && this.enableDragDrop, () => c`
1855
+ <div
1856
+ class="absolute inset-4 flex items-center justify-center border-2 border-dashed border-primary rounded-lg z-10"
1857
+ @dragover=${(e) => {
1858
+ e.preventDefault(), this.dragOver = !0;
1859
+ }}
1860
+ @dragleave=${() => this.dragOver = !1}
1861
+ @drop=${this.handleDrop}
1862
+ >
1863
+ <schmancy-surface type="surfaceDim" rounded="all" class="p-6 text-center">
1864
+ <schmancy-icon size="48px" class="mb-2">upload</schmancy-icon>
1865
+ <schmancy-typography type="body" token="md">
1866
+ Drop CSV file here
1867
+ </schmancy-typography>
1868
+ </schmancy-surface>
1869
+ </div>
1870
+ `)}
1871
+ `;
1872
+ }
1873
+ };
1874
+ f([d({ type: Boolean })], g.prototype, "disabled", 2), f([d({ type: Array })], g.prototype, "recipients", 2), f([d({ type: Array })], g.prototype, "selectedRecipients", 2), f([d({ type: Boolean })], g.prototype, "enableCsvImport", 2), f([d({ type: Boolean })], g.prototype, "enableDragDrop", 2), f([d({ type: String })], g.prototype, "title", 2), f([d({ type: String })], g.prototype, "emptyStateTitle", 2), f([d({ type: String })], g.prototype, "emptyStateMessage", 2), f([d({ type: Object })], g.prototype, "csvParser", 2), f([m()], g.prototype, "dragOver", 2), f([m()], g.prototype, "localSelectedRecipients", 2), f([m()], g.prototype, "searchQuery", 2), f([m()], g.prototype, "filteredRecipients", 2), f([m()], g.prototype, "boatState", 2), g = f([R("schmancy-email-recipients")], g);
1875
+ export {
1876
+ y as S,
1877
+ b as a,
1878
+ w as b,
1879
+ g as c,
1880
+ z as d
1881
+ };
1882
+ //# sourceMappingURL=email-recipients-BH3-shuO.js.map