@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,1314 @@
1
+ "use strict";require("rxjs"),require("lit/directives/class-map.js"),require("lit/directives/style-map.js");const S=require("./litElement.mixin-D8xYT3dQ.cjs"),R=require("./tailwind.mixin-BFHdirqy.cjs"),r=require("lit/decorators.js"),c=require("lit"),d=require("lit/directives/when.js"),g=require("lit/directives/ref.js"),$=require("lit/directives/repeat.js"),u=require("./notification-service-BL_SA5r6.cjs");require("./dialog-content-DBlOSail.cjs");const E=require("./dialog-service-C4ko20zk.cjs"),k=require("./sheet.service-DGYkGKzX.cjs");var C=Object.defineProperty,T=Object.getOwnPropertyDescriptor,m=(e,t,i,s)=>{for(var a,n=s>1?void 0:s?T(t,i):t,o=e.length-1;o>=0;o--)(a=e[o])&&(n=(s?a(t,i,n):a(n))||n);return s&&n&&C(t,i,n),n};exports.SchmancyMailbox=class extends S.$LitElement(c.css`
2
+ :host {
3
+ display: block;
4
+ height: 100%;
5
+ }
6
+ `){constructor(){super(...arguments),this.config={},this.templates=[],this.importSources=[],this.disabled=!1,this.recipientsTitle="Recipients",this.recipientsEmptyTitle="No recipients yet",this.recipientsEmptyMessage="Import from sources or upload a CSV",this.enableCsvImport=!0,this.enableDragDrop=!0,this.recipients=[],this.selectedRecipients=[],this.subject="",this.body="",this.templateId=null,this.attachments=[],this.isSending=!1,this.handleEmailsImported=e=>{const{emails:t}=e.detail,i=[...new Set([...this.recipients,...t])],s=t.filter(a=>!this.recipients.includes(a));this.recipients=i,this.selectedRecipients=[...new Set([...this.selectedRecipients,...s])],this.dispatchEvent(new CustomEvent("emails-imported",{detail:{emails:s,source:e.detail.source},bubbles:!0,composed:!0}))},this.handleRecipientRemoved=e=>{const{email:t}=e.detail;this.recipients=this.recipients.filter(i=>i!==t),this.selectedRecipients=this.selectedRecipients.filter(i=>i!==t),this.dispatchEvent(new CustomEvent("recipient-removed",{detail:{email:t},bubbles:!0,composed:!0}))},this.handleRecipientsCleared=()=>{this.recipients=[],this.selectedRecipients=[],this.dispatchEvent(new CustomEvent("recipients-cleared",{bubbles:!0,composed:!0}))},this.handleSelectionChanged=e=>{const{selectedEmails:t}=e.detail;this.selectedRecipients=t,this.dispatchEvent(new CustomEvent("selection-changed",{detail:{selectedEmails:t},bubbles:!0,composed:!0}))},this.handleEditorChange=e=>{const{subject:t,body:i,templateId:s,attachments:a}=e.detail;this.subject=t,this.body=i,this.templateId=s,this.attachments=a,this.dispatchEvent(new CustomEvent("compose-changed",{detail:{subject:t,body:i,templateId:s,attachments:a},bubbles:!0,composed:!0}))},this.handleSend=async()=>{if(this.selectedRecipients.length!==0)if(this.subject.trim())if(this.body.trim()){this.isSending=!0;try{const e={recipients:this.selectedRecipients,subject:this.subject,body:this.body,attachments:this.attachments,templateId:this.templateId};this.dispatchEvent(new CustomEvent("send-email",{detail:{request:e},bubbles:!0,composed:!0}))}catch(e){this.dispatchEvent(new CustomEvent("send-error",{detail:{error:e instanceof Error?e.message:"Failed to send email"},bubbles:!0,composed:!0}))}finally{this.isSending=!1}}else this.dispatchEvent(new CustomEvent("send-error",{detail:{error:"Please enter a message body"},bubbles:!0,composed:!0}));else this.dispatchEvent(new CustomEvent("send-error",{detail:{error:"Please enter a subject"},bubbles:!0,composed:!0}));else this.dispatchEvent(new CustomEvent("send-error",{detail:{error:"Please select at least one recipient"},bubbles:!0,composed:!0}))}}connectedCallback(){super.connectedCallback(),this.setSending(this.disabled)}updated(e){super.updated(e),e.has("disabled")&&this.setSending(this.disabled)}addRecipients(e){const t=[...new Set([...this.recipients,...e])],i=e.filter(s=>!this.recipients.includes(s));this.recipients=t,this.selectedRecipients=[...new Set([...this.selectedRecipients,...i])]}setSubject(e){this.subject=e}setBody(e){this.body=e}setTemplate(e){this.templateId=e}clearCompose(){this.recipients=[],this.selectedRecipients=[],this.subject="",this.body="",this.templateId=null,this.attachments=[]}setSending(e){this.isSending=e}render(){const e=this.selectedRecipients.length>0&&this.subject.trim()&&this.body.trim()&&!this.isSending&&!this.disabled;return c.html`
7
+ <!-- Main Layout Container -->
8
+ <div class="flex flex-col h-full gap-6 p-6">
9
+
10
+ <!-- Main Content Section: Composer and Preview -->
11
+ <div class="flex flex-col xl:flex-row gap-6 flex-1 min-h-0">
12
+
13
+ <!-- Composer Section - Full width on mobile/tablet, half on large screens -->
14
+ <div class="w-full xl:w-1/2 min-h-0 flex flex-col">
15
+ <schmancy-email-editor
16
+ .subject=${this.subject}
17
+ .body=${this.body}
18
+ .templates=${this.templates}
19
+ .attachments=${this.attachments}
20
+ .disabled=${this.disabled}
21
+ .config=${this.config}
22
+ @editor-change=${this.handleEditorChange}
23
+ class="h-full"
24
+ ></schmancy-email-editor>
25
+ </div>
26
+
27
+ <!-- Preview Section - Full width on mobile/tablet, half on large screens -->
28
+ <div class="w-full xl:w-1/2 min-h-0 flex flex-col">
29
+ <schmancy-email-viewer
30
+ .subject=${this.subject}
31
+ .body=${this.body}
32
+ .recipients=${this.selectedRecipients}
33
+ .attachments=${this.attachments}
34
+ class="h-full"
35
+ ></schmancy-email-viewer>
36
+ </div>
37
+
38
+ </div>
39
+
40
+ <!-- Send Section - Sticky bottom bar -->
41
+ <div class="flex-shrink-0">
42
+ <schmancy-surface
43
+ type="container"
44
+ rounded="all"
45
+ class="p-4"
46
+ >
47
+ <div class="flex flex-col sm:flex-row sm:items-center sm:justify-between gap-4">
48
+ <!-- Send Info -->
49
+ <div class="flex flex-col gap-1">
50
+ <schmancy-typography type="body" token="sm" class="font-medium">
51
+ ${this.selectedRecipients.length} recipient${this.selectedRecipients.length===1?"":"s"} selected
52
+ </schmancy-typography>
53
+ ${d.when(this.attachments.length>0,()=>c.html`
54
+ <schmancy-typography type="body" token="xs">
55
+ ${this.attachments.length} attachment${this.attachments.length===1?"":"s"}
56
+ </schmancy-typography>
57
+ `)}
58
+ </div>
59
+
60
+ <!-- Send Button -->
61
+ <schmancy-button
62
+ variant="filled"
63
+ ?disabled=${!e}
64
+ ?loading=${this.isSending}
65
+ @click=${this.handleSend}
66
+ class="w-full sm:w-auto"
67
+ >
68
+ <schmancy-icon slot="prefix" size="18px">send</schmancy-icon>
69
+ ${this.isSending?"Sending...":"Send Email"}
70
+ </schmancy-button>
71
+ </div>
72
+ </schmancy-surface>
73
+ </div>
74
+
75
+ </div>
76
+
77
+ <!-- Recipients Panel as Floating Boat -->
78
+ <schmancy-email-recipients
79
+ .recipients=${this.recipients}
80
+ .selectedRecipients=${this.selectedRecipients}
81
+ .importSources=${this.importSources}
82
+ .disabled=${this.disabled}
83
+ .enableCsvImport=${this.enableCsvImport}
84
+ .enableDragDrop=${this.enableDragDrop}
85
+ .title=${this.recipientsTitle}
86
+ .emptyStateTitle=${this.recipientsEmptyTitle}
87
+ .emptyStateMessage=${this.recipientsEmptyMessage}
88
+ @emails-imported=${this.handleEmailsImported}
89
+ @recipient-removed=${this.handleRecipientRemoved}
90
+ @recipients-cleared=${this.handleRecipientsCleared}
91
+ @selection-changed=${this.handleSelectionChanged}
92
+ ></schmancy-email-recipients>
93
+ `}},m([r.property({type:Object})],exports.SchmancyMailbox.prototype,"config",2),m([r.property({type:Array})],exports.SchmancyMailbox.prototype,"templates",2),m([r.property({type:Array})],exports.SchmancyMailbox.prototype,"importSources",2),m([r.property({type:Boolean})],exports.SchmancyMailbox.prototype,"disabled",2),m([r.property({type:String})],exports.SchmancyMailbox.prototype,"recipientsTitle",2),m([r.property({type:String})],exports.SchmancyMailbox.prototype,"recipientsEmptyTitle",2),m([r.property({type:String})],exports.SchmancyMailbox.prototype,"recipientsEmptyMessage",2),m([r.property({type:Boolean})],exports.SchmancyMailbox.prototype,"enableCsvImport",2),m([r.property({type:Boolean})],exports.SchmancyMailbox.prototype,"enableDragDrop",2),m([r.state()],exports.SchmancyMailbox.prototype,"recipients",2),m([r.state()],exports.SchmancyMailbox.prototype,"selectedRecipients",2),m([r.state()],exports.SchmancyMailbox.prototype,"subject",2),m([r.state()],exports.SchmancyMailbox.prototype,"body",2),m([r.state()],exports.SchmancyMailbox.prototype,"templateId",2),m([r.state()],exports.SchmancyMailbox.prototype,"attachments",2),m([r.state()],exports.SchmancyMailbox.prototype,"isSending",2),exports.SchmancyMailbox=m([r.customElement("schmancy-mailbox")],exports.SchmancyMailbox);var I=Object.getOwnPropertyDescriptor;exports.SchmancyEmailLayoutSelector=class extends R.TailwindElement(){constructor(){super(...arguments),this.layouts=[{id:"columns-2",icon:"view_week",label:"2 Col"},{id:"columns-3",icon:"view_column",label:"3 Col"},{id:"sidebar-left",icon:"view_sidebar",label:"Left"},{id:"sidebar-right",icon:"view_sidebar",label:"Right",flipped:!0},{id:"image-row",icon:"collections",label:"Images"}]}selectLayout(e){this.dispatchEvent(new CustomEvent("layout-select",{detail:{layout:e},bubbles:!0,composed:!0}))}render(){return c.html`
94
+ <div class="grid p-3 gap-2">
95
+ ${this.layouts.map(e=>c.html`
96
+ <schmancy-button
97
+ variant="outlined"
98
+ @click=${()=>this.selectLayout(e.id)}
99
+ >
100
+ <schmancy-icon
101
+ slot="prefix"
102
+ size="20px"
103
+ class=${e.flipped?"scale-x-[-1]":""}
104
+ >
105
+ ${e.icon}
106
+ </schmancy-icon>
107
+ ${e.label}
108
+ </schmancy-button>
109
+ `)}
110
+ </div>
111
+ `}},exports.SchmancyEmailLayoutSelector=((e,t,i,s)=>{for(var a,n=s>1?void 0:s?I(t,i):t,o=e.length-1;o>=0;o--)(a=e[o])&&(n=a(n)||n);return n})([r.customElement("schmancy-email-layout-selector")],exports.SchmancyEmailLayoutSelector);var D=Object.defineProperty,A=Object.getOwnPropertyDescriptor,w=(e,t,i,s)=>{for(var a,n=s>1?void 0:s?A(t,i):t,o=e.length-1;o>=0;o--)(a=e[o])&&(n=(s?a(t,i,n):a(n))||n);return s&&n&&D(t,i,n),n};let v=class extends S.$LitElement(c.css`
112
+ :host {
113
+ display: block;
114
+ }
115
+ `){constructor(){super(...arguments),this.templates=[],this.searchQuery="",this.selectedTemplate=null,this.filteredTemplates=[],this.showPreview=!1,this.selectedCategory="all",this.handleSearch=e=>{const t=e.target;this.searchQuery=t.value},this.handleCategorySelect=e=>{this.selectedCategory=e,this.updateFilteredTemplates()},this.selectTemplate=e=>{this.selectedTemplate=e,this.showPreview=!0},this.confirmSelection=()=>{this.selectedTemplate&&(this.dispatchEvent(new CustomEvent("template-selected",{detail:this.selectedTemplate,bubbles:!0,composed:!0})),k.sheet.dismiss())},this.close=()=>{k.sheet.dismiss()},this.backToList=()=>{this.showPreview=!1,this.selectedTemplate=null}}connectedCallback(){super.connectedCallback(),this.updateFilteredTemplates()}updated(e){(e.has("templates")||e.has("searchQuery")||e.has("selectedCategory"))&&this.updateFilteredTemplates()}get categories(){const e=new Set;return this.templates.forEach(t=>{t.category&&e.add(t.category)}),["all",...Array.from(e)]}updateFilteredTemplates(){let e=[...this.templates];if(this.selectedCategory!=="all"&&(e=e.filter(t=>t.category===this.selectedCategory)),this.searchQuery.trim()){const t=this.searchQuery.toLowerCase();e=e.filter(i=>i.name.toLowerCase().includes(t)||i.category?.toLowerCase().includes(t)||i.description?.toLowerCase().includes(t))}this.filteredTemplates=e}render(){return c.html`
116
+ <div class="flex flex-col h-full overflow-hidden">
117
+ <!-- Header -->
118
+ <div class="flex items-center justify-between px-6 py-4 border-b border-outline-variant">
119
+ <div class="flex items-center gap-3">
120
+ <schmancy-icon size="24px" class="text-primary">
121
+ ${this.showPreview?"preview":"mail"}
122
+ </schmancy-icon>
123
+ <schmancy-typography type="headline" token="md">
124
+ ${this.showPreview?"Template Preview":"Choose Email Template"}
125
+ </schmancy-typography>
126
+ </div>
127
+ <schmancy-button
128
+ variant="text"
129
+ @click=${this.close}
130
+ class="hover:bg-surface-container rounded-full w-10 h-10 p-0"
131
+ >
132
+ <schmancy-icon>close</schmancy-icon>
133
+ </schmancy-button>
134
+ </div>
135
+
136
+ <!-- Body -->
137
+ <div class="flex-1 flex flex-col overflow-hidden">
138
+ ${d.when(this.showPreview&&this.selectedTemplate,()=>this.renderPreview(),()=>this.renderTemplateList())}
139
+ </div>
140
+
141
+ <!-- Footer -->
142
+ <div class="flex justify-between px-6 py-4 border-t border-outline-variant bg-surface-containerLow">
143
+ ${d.when(this.showPreview,()=>c.html`
144
+ <schmancy-button
145
+ variant="outlined"
146
+ @click=${this.backToList}
147
+ class="px-6 py-3"
148
+ >
149
+ <schmancy-icon slot="prefix">arrow_back</schmancy-icon>
150
+ Back to Templates
151
+ </schmancy-button>
152
+ <schmancy-button
153
+ variant="filled"
154
+ @click=${this.confirmSelection}
155
+ class="px-8 py-3 bg-primary text-primary-on shadow-md hover:shadow-lg transition-shadow"
156
+ >
157
+ <schmancy-icon slot="prefix">check_circle</schmancy-icon>
158
+ Use This Template
159
+ </schmancy-button>
160
+ `,()=>c.html`
161
+ <div class="flex gap-3">
162
+ <schmancy-button
163
+ variant="text"
164
+ @click=${this.close}
165
+ class="px-6 py-3"
166
+ >
167
+ Cancel
168
+ </schmancy-button>
169
+ </div>
170
+ `)}
171
+ </div>
172
+ </div>
173
+ `}renderTemplateList(){return c.html`
174
+ <!-- Search and Filter Bar -->
175
+ <div class="px-6 py-4 border-b border-outline-variant bg-surface-containerLow">
176
+ <div class="flex flex-col gap-4">
177
+ <!-- Search Input -->
178
+ <schmancy-input
179
+ type="search"
180
+ placeholder="Search templates by name, category, or description..."
181
+ .value=${this.searchQuery}
182
+ @input=${this.handleSearch}
183
+ class="w-full"
184
+ >
185
+ <schmancy-icon slot="prefix" size="20px" class="text-surface-onVariant">search</schmancy-icon>
186
+ ${d.when(this.searchQuery,()=>c.html`
187
+ <schmancy-button
188
+ slot="suffix"
189
+ variant="text"
190
+ @click=${()=>{this.searchQuery=""}}
191
+ class="rounded-full w-8 h-8 p-0"
192
+ >
193
+ <schmancy-icon size="16px">close</schmancy-icon>
194
+ </schmancy-button>
195
+ `)}
196
+ </schmancy-input>
197
+
198
+ <!-- Category Filter -->
199
+ ${d.when(this.categories.length>1,()=>c.html`
200
+ <div class="flex gap-2 flex-wrap">
201
+ ${$.repeat(this.categories,e=>e,e=>c.html`
202
+ <schmancy-chip
203
+ class="cursor-pointer transition-all hover:shadow-sm ${this.selectedCategory===e?"bg-primary text-primary-on":"border border-outline"}"
204
+ @click=${()=>this.handleCategorySelect(e)}
205
+ >
206
+ ${e==="all"?"All Templates":e}
207
+ </schmancy-chip>
208
+ `)}
209
+ </div>
210
+ `)}
211
+ </div>
212
+ </div>
213
+
214
+ <!-- Template List -->
215
+ <div class="flex-1 overflow-y-auto px-6 py-6">
216
+ ${d.when(this.filteredTemplates.length>0,()=>c.html`
217
+ <div class="space-y-4">
218
+ ${$.repeat(this.filteredTemplates,e=>e.id,e=>c.html`
219
+ <schmancy-surface
220
+ type="containerLow"
221
+ elevation="1"
222
+ rounded="all"
223
+ class="group cursor-pointer hover:elevation-3 transition-all duration-200 p-4"
224
+ @click=${()=>this.selectTemplate(e)}
225
+ >
226
+ <div class="flex items-start justify-between gap-4">
227
+ <div class="flex-1">
228
+ <!-- Template Header -->
229
+ <div class="flex items-start justify-between mb-2">
230
+ <schmancy-typography type="title" token="md" class="font-semibold leading-tight">
231
+ ${e.name}
232
+ </schmancy-typography>
233
+ ${d.when(e.isDefault,()=>c.html`
234
+ <schmancy-chip class="bg-primary text-primary-on text-xs">
235
+ <schmancy-icon slot="prefix" size="12px">star</schmancy-icon>
236
+ Default
237
+ </schmancy-chip>
238
+ `)}
239
+ </div>
240
+
241
+ <!-- Category Badge -->
242
+ ${d.when(e.category,()=>c.html`
243
+ <div class="mb-2">
244
+ <schmancy-chip class="text-xs border border-outline">
245
+ ${e.category}
246
+ </schmancy-chip>
247
+ </div>
248
+ `)}
249
+
250
+ <!-- Description -->
251
+ ${d.when(e.description,()=>c.html`
252
+ <schmancy-typography type="body" token="sm" class="text-surface-onVariant leading-relaxed">
253
+ ${e.description}
254
+ </schmancy-typography>
255
+ `,()=>c.html`
256
+ <schmancy-typography type="body" token="sm" class="text-surface-onVariant opacity-60 italic">
257
+ No description available
258
+ </schmancy-typography>
259
+ `)}
260
+ </div>
261
+
262
+ <!-- Preview Button -->
263
+ <div class="flex-shrink-0">
264
+ <schmancy-button variant="outlined" size="sm">
265
+ <schmancy-icon slot="prefix">preview</schmancy-icon>
266
+ Preview
267
+ </schmancy-button>
268
+ </div>
269
+ </div>
270
+ </schmancy-surface>
271
+ `)}
272
+ </div>
273
+ `,()=>c.html`
274
+ <div class="flex flex-col items-center justify-center h-96 text-center">
275
+ <div class="mb-6">
276
+ <schmancy-icon size="64px" class="text-surface-onVariant opacity-20">mail_outline</schmancy-icon>
277
+ </div>
278
+ <schmancy-typography type="headline" token="sm" class="mb-2">
279
+ ${this.searchQuery||this.selectedCategory!=="all"?"No templates found":"No templates available"}
280
+ </schmancy-typography>
281
+ <schmancy-typography type="body" token="md" class="text-surface-onVariant mb-6 max-w-md">
282
+ ${this.searchQuery?`No templates match your search for "${this.searchQuery}"`:this.selectedCategory!=="all"?`No templates found in the "${this.selectedCategory}" category`:"Start by creating your first email template"}
283
+ </schmancy-typography>
284
+ ${d.when(this.searchQuery||this.selectedCategory!=="all",()=>c.html`
285
+ <div class="flex gap-3">
286
+ ${d.when(this.searchQuery,()=>c.html`
287
+ <schmancy-button
288
+ variant="outlined"
289
+ @click=${()=>{this.searchQuery=""}}
290
+ >
291
+ <schmancy-icon slot="prefix">clear</schmancy-icon>
292
+ Clear Search
293
+ </schmancy-button>
294
+ `)}
295
+ ${d.when(this.selectedCategory!=="all",()=>c.html`
296
+ <schmancy-button
297
+ variant="filled"
298
+ @click=${()=>this.handleCategorySelect("all")}
299
+ >
300
+ <schmancy-icon slot="prefix">view_list</schmancy-icon>
301
+ Show All Templates
302
+ </schmancy-button>
303
+ `)}
304
+ </div>
305
+ `)}
306
+ </div>
307
+ `)}
308
+ </div>
309
+ `}renderPreview(){return this.selectedTemplate?c.html`
310
+ <div class="flex-1 overflow-y-auto">
311
+ <!-- Template Header Section -->
312
+ <div class="px-6 py-6 border-b border-outline-variant bg-surface-containerLow">
313
+ <div class="flex items-start gap-6">
314
+ <!-- Template Thumbnail -->
315
+ ${d.when(this.selectedTemplate.thumbnail,()=>c.html`
316
+ <div class="flex-shrink-0">
317
+ <schmancy-surface elevation="2" rounded="all" class="overflow-hidden w-32 h-24">
318
+ <img
319
+ src=${this.selectedTemplate.thumbnail}
320
+ alt=${this.selectedTemplate.name}
321
+ class="w-full h-full object-cover"
322
+ />
323
+ </schmancy-surface>
324
+ </div>
325
+ `,()=>c.html`
326
+ <div class="flex-shrink-0">
327
+ <schmancy-surface elevation="1" rounded="all" class="w-32 h-24 bg-gradient-to-br from-surface-container to-surface-containerLow flex items-center justify-center">
328
+ <schmancy-icon size="32px" class="text-surface-onVariant opacity-40">mail</schmancy-icon>
329
+ </schmancy-surface>
330
+ </div>
331
+ `)}
332
+
333
+ <!-- Template Info -->
334
+ <div class="flex-1">
335
+ <div class="flex items-start justify-between mb-3">
336
+ <schmancy-typography type="headline" token="lg" class="font-semibold">
337
+ ${this.selectedTemplate.name}
338
+ </schmancy-typography>
339
+ ${d.when(this.selectedTemplate.isDefault,()=>c.html`
340
+ <schmancy-chip class="bg-primary text-primary-on">
341
+ <schmancy-icon slot="prefix" size="12px">star</schmancy-icon>
342
+ Default
343
+ </schmancy-chip>
344
+ `)}
345
+ </div>
346
+
347
+ <div class="flex flex-wrap gap-2 mb-3">
348
+ ${d.when(this.selectedTemplate.category,()=>c.html`
349
+ <schmancy-chip class="border border-outline">
350
+ <schmancy-icon slot="prefix" size="12px">category</schmancy-icon>
351
+ ${this.selectedTemplate.category}
352
+ </schmancy-chip>
353
+ `)}
354
+ ${d.when(this.selectedTemplate.createdAt,()=>c.html`
355
+ <schmancy-chip class="border border-outline">
356
+ <schmancy-icon slot="prefix" size="12px">schedule</schmancy-icon>
357
+ Created ${new Date(this.selectedTemplate.createdAt).toLocaleDateString()}
358
+ </schmancy-chip>
359
+ `)}
360
+ </div>
361
+
362
+ ${d.when(this.selectedTemplate.description,()=>c.html`
363
+ <schmancy-typography type="body" token="md" class="text-surface-onVariant leading-relaxed">
364
+ ${this.selectedTemplate.description}
365
+ </schmancy-typography>
366
+ `)}
367
+ </div>
368
+ </div>
369
+ </div>
370
+
371
+ <!-- Template Content -->
372
+ <div class="px-6 py-6 space-y-8">
373
+ <!-- Subject Preview -->
374
+ <div>
375
+ <div class="flex items-center gap-2 mb-4">
376
+ <schmancy-icon size="20px" class="text-primary">subject</schmancy-icon>
377
+ <schmancy-typography type="title" token="md" class="text-primary">
378
+ Subject Line
379
+ </schmancy-typography>
380
+ </div>
381
+ <schmancy-surface elevation="1" type="surface" class="p-4 border-l-4 border-primary">
382
+ <schmancy-typography type="body" token="md" class="font-medium">
383
+ ${this.selectedTemplate.subject}
384
+ </schmancy-typography>
385
+ </schmancy-surface>
386
+ </div>
387
+
388
+ <!-- Body Preview -->
389
+ <div>
390
+ <div class="flex items-center gap-2 mb-4">
391
+ <schmancy-icon size="20px" class="text-primary">article</schmancy-icon>
392
+ <schmancy-typography type="title" token="md" class="text-primary">
393
+ Email Preview
394
+ </schmancy-typography>
395
+ </div>
396
+ <schmancy-email-viewer
397
+ subject=${this.selectedTemplate.subject}
398
+ body=${this.selectedTemplate.body}
399
+ mode="desktop"
400
+ ></schmancy-email-viewer>
401
+ </div>
402
+ </div>
403
+ </div>
404
+ `:null}};w([r.property({type:Array})],v.prototype,"templates",2),w([r.state()],v.prototype,"searchQuery",2),w([r.state()],v.prototype,"selectedTemplate",2),w([r.state()],v.prototype,"filteredTemplates",2),w([r.state()],v.prototype,"showPreview",2),w([r.state()],v.prototype,"selectedCategory",2),v=w([r.customElement("schmancy-email-template-picker")],v);var L=Object.defineProperty,j=Object.getOwnPropertyDescriptor,f=(e,t,i,s)=>{for(var a,n=s>1?void 0:s?j(t,i):t,o=e.length-1;o>=0;o--)(a=e[o])&&(n=(s?a(t,i,n):a(n))||n);return s&&n&&L(t,i,n),n};exports.SchmancyEmailEditor=class extends S.$LitElement(c.css`
405
+ :host {
406
+ display: block;
407
+ height: 100%;
408
+ }
409
+ `){constructor(){super(...arguments),this.subject="",this.body="",this.disabled=!1,this.attachments=[],this.config={},this.templates=this.getDefaultTemplates(),this.dragOver=!1,this.isUploading=!1,this.subjectInputRef=g.createRef(),this.bodyTextAreaRef=g.createRef(),this.fileInputRef=g.createRef(),this.imageInputRef=g.createRef(),this.handleKeyDown=e=>{if(this.disabled)return;const t=this.bodyTextAreaRef.value?.shadowRoot?.querySelector("textarea");e.key==="Tab"&&e.target===t&&(e.preventDefault(),this.insertAtCursor(" "))},this.handlePaste=e=>{const t=this.bodyTextAreaRef.value?.shadowRoot?.querySelector("textarea");if(this.disabled||document.activeElement!==t)return;const i=e.clipboardData?.items;if(i)for(let s=0;s<i.length;s++){const a=i[s];if(a.type.indexOf("image")!==-1){e.preventDefault();const n=a.getAsFile();n&&this.uploadImage(n);break}}},this.handleSubjectChange=e=>{const t=e.target;this.subject=t.value,this.dispatchChange()},this.handleBodyChange=e=>{this.body=e.detail.value,this.dispatchChange()},this.dispatchChange=()=>{this.dispatchEvent(new CustomEvent("editor-change",{detail:{subject:this.subject,body:this.body,attachments:this.attachments},bubbles:!0,composed:!0}))},this.openLayoutDialog=()=>{E.$dialog.component(c.html`
410
+ <schmancy-email-layout-selector
411
+ @layout-select=${e=>{this.applyLayout(e.detail.layout),E.$dialog.close()}}
412
+ ></schmancy-email-layout-selector>
413
+ `)},this.openTemplatePicker=()=>{const e=new v;e.templates=this.templates,e.addEventListener("template-selected",this.handleTemplateSelected),k.sheet.open({component:e,title:"Choose Email Template"})},this.handleTemplateSelected=e=>{const t=e.detail;this.subject=t.subject,this.body=t.body,this.dispatchChange(),u.$notify.success(`Template "${t.name}" applied successfully`)},this.applyLayout=e=>{const t={"columns-2":`
414
+ :::layout columns-2
415
+ <div class="column">
416
+ ![Left Photo](https://via.placeholder.com/400x300?text=Replace+with+your+photo){height=300px}
417
+
418
+ **Photo Title**
419
+
420
+ Replace the placeholder image above with your own photo. The height=300px ensures both images have equal height while width adjusts automatically.
421
+ </div>
422
+
423
+ <div class="column">
424
+ ![Right Photo](https://via.placeholder.com/400x300?text=Replace+with+your+photo){height=300px}
425
+
426
+ **Photo Title**
427
+
428
+ Use the same height value (300px) for both images to keep them aligned perfectly side by side.
429
+ </div>
430
+ :::
431
+ `,"columns-3":`
432
+ :::layout columns-3
433
+ <div class="column">
434
+ ![Photo 1](https://via.placeholder.com/300x200?text=Photo+1){height=200px}
435
+
436
+ **Item Title**
437
+
438
+ Brief description or caption for this item.
439
+ </div>
440
+
441
+ <div class="column">
442
+ ![Photo 2](https://via.placeholder.com/300x200?text=Photo+2){height=200px}
443
+
444
+ **Item Title**
445
+
446
+ Brief description or caption for this item.
447
+ </div>
448
+
449
+ <div class="column">
450
+ ![Photo 3](https://via.placeholder.com/300x200?text=Photo+3){height=200px}
451
+
452
+ **Item Title**
453
+
454
+ Brief description or caption for this item.
455
+ </div>
456
+ :::
457
+ `,"sidebar-left":`
458
+ :::layout sidebar-left
459
+ <div class="sidebar">
460
+ **Sidebar Content**
461
+
462
+ * Navigation item 1
463
+ * Navigation item 2
464
+ * Navigation item 3
465
+ </div>
466
+
467
+ <div class="main">
468
+ **Main Content Area**
469
+
470
+ Your primary content goes here. This area takes up most of the width while the sidebar provides supplementary information or navigation.
471
+ </div>
472
+ :::
473
+ `,"sidebar-right":`
474
+ :::layout sidebar-right
475
+ <div class="main">
476
+ **Main Content Area**
477
+
478
+ Your primary content goes here. This area takes up most of the width while the sidebar provides supplementary information or navigation.
479
+ </div>
480
+
481
+ <div class="sidebar">
482
+ **Sidebar Content**
483
+
484
+ * Quick links
485
+ * Related info
486
+ * Contact details
487
+ </div>
488
+ :::
489
+ `,"image-row":`
490
+ :::layout image-row
491
+ <div class="image">
492
+ ![Gallery Image 1](https://via.placeholder.com/400x250?text=Gallery+Image+1){height=250px}
493
+ </div>
494
+
495
+ <div class="image">
496
+ ![Gallery Image 2](https://via.placeholder.com/400x250?text=Gallery+Image+2){height=250px}
497
+ </div>
498
+
499
+ <div class="image">
500
+ ![Gallery Image 3](https://via.placeholder.com/400x250?text=Gallery+Image+3){height=250px}
501
+ </div>
502
+ :::
503
+ `}[e];t&&this.insertAtCursor(t)},this.uploadImage=async e=>{if(!e.type.startsWith("image/"))return void u.$notify.error(`File "${e.name}" is not an image`);if(e.size>10485760)u.$notify.error(`Image "${e.name}" is too large. Maximum size is 10MB.`);else{this.isUploading=!0;try{let t;this.config.imageUploadHandler?t=await this.config.imageUploadHandler(e):this.config.uploadHandler?t=await this.config.uploadHandler(e):(t=await this.createDataUrl(e),u.$notify.warning("No upload handler configured. Using local preview."));const i=await this.getImageDimensions(e);this.insertImageMarkdown(t,e.name,i.width,i.height),u.$notify.success("Image uploaded successfully")}catch{u.$notify.error("Failed to upload image")}finally{this.isUploading=!1}}},this.createDataUrl=e=>new Promise((t,i)=>{const s=new FileReader;s.onload=()=>t(s.result),s.onerror=i,s.readAsDataURL(e)}),this.getImageDimensions=e=>new Promise(t=>{const i=new Image;i.onload=()=>{t({width:i.width,height:i.height}),URL.revokeObjectURL(i.src)},i.onerror=()=>{t({width:400,height:300}),URL.revokeObjectURL(i.src)},i.src=URL.createObjectURL(e)}),this.insertImageMarkdown=(e,t,i,s)=>{const a=this.bodyTextAreaRef.value?.shadowRoot?.querySelector("textarea");if(!a)return;const n=`![${t}](${e}){width=${Math.min(i,600)}px height=auto}`,o=a.selectionStart,l=a.selectionEnd,h=this.body.substring(0,o)+n+this.body.substring(l);this.body=h,this.dispatchChange(),this.updateComplete.then(()=>{const p=this.bodyTextAreaRef.value?.shadowRoot?.querySelector("textarea");if(p){const x=o+n.length;p.setSelectionRange(x,x),p.focus()}})},this.handleFileChange=e=>{const t=e.target,i=t.files;if(i)for(let s=0;s<i.length;s++){const a=i[s];a.type.startsWith("image/")?this.uploadImage(a):this.addFile(a)}t.value=""},this.handleImageSelect=e=>{const t=e.target,i=t.files?.[0];i&&i.type.startsWith("image/")&&this.uploadImage(i),t.value=""},this.handleDrop=e=>{e.preventDefault(),this.dragOver=!1;const t=e.dataTransfer?.files;if(t)for(let i=0;i<t.length;i++){const s=t[i];s.type.startsWith("image/")?this.uploadImage(s):this.addFile(s)}},this.handleDragEnter=e=>{e.preventDefault(),this.dragOver=!0},this.handleDocumentDragLeave=e=>{e.preventDefault(),this.dragOver=!1},this.handleDocumentDrop=e=>{e.preventDefault(),this.dragOver=!1},this.handleDragOver=e=>{e.preventDefault()},this.handleDragLeave=e=>{e.preventDefault()},this.addFile=e=>{if(e.size>10485760)return void u.$notify.error(`File "${e.name}" is too large. Maximum size is 10MB.`);if(this.attachments.some(i=>i.name===e.name&&i.size===e.size))return void u.$notify.warning(`File "${e.name}" is already attached.`);const t={id:crypto.randomUUID(),file:e,name:e.name,size:e.size,type:e.type||"application/octet-stream"};this.attachments=[...this.attachments,t],this.dispatchChange()},this.removeAttachment=e=>{this.attachments=this.attachments.filter(t=>t.id!==e),this.dispatchChange()}}connectedCallback(){super.connectedCallback(),this.addKeyboardListeners(),this.addDragListeners()}disconnectedCallback(){super.disconnectedCallback(),document.removeEventListener("paste",this.handlePaste),document.removeEventListener("dragenter",this.handleDragEnter),document.removeEventListener("dragleave",this.handleDocumentDragLeave),document.removeEventListener("drop",this.handleDocumentDrop)}getDefaultTemplates(){return[{id:"welcome",name:"Welcome Email",subject:"Welcome to Our Community! 🌟",description:"A warm welcome message for new users",category:"onboarding",body:`# Welcome to Our Community!
504
+
505
+ We're thrilled to have you on board. Thank you for joining us on this journey.
506
+
507
+ ## What's Next?
508
+
509
+ * **Explore** your dashboard and discover all the features
510
+ * **Connect** with other community members
511
+ * **Get support** whenever you need it - we're here to help
512
+
513
+ ---
514
+
515
+ *Need assistance? Simply reply to this email and we'll get back to you within 24 hours.*
516
+
517
+ Best regards,
518
+ The Team`},{id:"newsletter",name:"Newsletter",subject:"Weekly Insights & Updates",description:"Regular newsletter template with updates and insights",category:"communication",body:`# This Week's Highlights
519
+
520
+ ## Featured Story
521
+
522
+ **[Article Title]**
523
+ Brief description of the main story or update that you want to highlight this week.
524
+
525
+ [Read More](https://example.com)
526
+
527
+ ## Quick Updates
528
+
529
+ * **Update 1**: Brief description of an important update
530
+ * **Update 2**: Another noteworthy development
531
+ * **Update 3**: Additional news worth sharing
532
+
533
+ ## Upcoming Events
534
+
535
+ **[Event Name]** - *Date*
536
+ Short description of the upcoming event.
537
+
538
+ ---
539
+
540
+ *Thanks for reading! Forward this to a friend who might enjoy it.*
541
+
542
+ Until next week,
543
+ The Team`},{id:"product-launch",name:"Product Launch",subject:"Introducing Our Latest Innovation 🚀",description:"Announce new products or features",category:"marketing",body:`# Something Amazing is Here
544
+
545
+ We've been working hard behind the scenes, and today we're excited to introduce our latest creation.
546
+
547
+ ## Key Features
548
+
549
+ * **Feature 1**: Benefit that matters to your users
550
+ * **Feature 2**: Another compelling capability
551
+ * **Feature 3**: The feature that sets you apart
552
+
553
+ ## Early Access
554
+
555
+ As a valued member, you get **exclusive early access** starting today.
556
+
557
+ [Get Started Now](https://example.com)
558
+
559
+ ---
560
+
561
+ *Questions? We'd love to hear from you. Just hit reply!*
562
+
563
+ Best,
564
+ The Product Team`},{id:"event-invitation",name:"Event Invitation",subject:"You're Invited: [Event Name]",description:"Professional event invitation template",category:"events",body:`# You're Invited!
565
+
566
+ ## [Event Name]
567
+
568
+ **When**: [Date & Time]
569
+ **Where**: [Location or Virtual Link]
570
+ **Duration**: [Duration]
571
+
572
+ Join us for an exclusive gathering where we'll explore [brief event description].
573
+
574
+ ## What to Expect
575
+
576
+ * **Networking** with industry professionals
577
+ * **Insights** from leading experts
578
+ * **Interactive** sessions and discussions
579
+
580
+ ## RSVP Required
581
+
582
+ Space is limited, so please confirm your attendance by [RSVP Date].
583
+
584
+ [Confirm Attendance](https://example.com)
585
+
586
+ ---
587
+
588
+ *Can't make it? Let us know and we'll share the key highlights with you.*
589
+
590
+ Looking forward to seeing you there,
591
+ The Events Team`},{id:"thank-you",name:"Thank You",subject:"Thank You - It Means Everything",description:"Express gratitude to customers or supporters",category:"appreciation",body:`# Thank You
592
+
593
+ Your support means the world to us.
594
+
595
+ Whether you've been with us from the beginning or just joined our community, we want you to know how much we appreciate you.
596
+
597
+ ## Because of You
598
+
599
+ * We've been able to improve our service
600
+ * Our community has grown stronger
601
+ * We've achieved milestones we never thought possible
602
+
603
+ ## What's Next
604
+
605
+ We're committed to continuing to earn your trust and providing even more value in the coming months.
606
+
607
+ ---
608
+
609
+ *Your feedback shapes everything we do. Reply anytime with thoughts or suggestions.*
610
+
611
+ With genuine gratitude,
612
+ The Team`},{id:"feedback-request",name:"Feedback Request",subject:"Your Opinion Matters - 2 Minutes?",description:"Request feedback or reviews from users",category:"feedback",body:`# We'd Love Your Feedback
613
+
614
+ Your experience matters to us, and we're always looking for ways to improve.
615
+
616
+ ## Quick Favor?
617
+
618
+ Could you spare **2 minutes** to share your thoughts? Your honest feedback helps us serve you better.
619
+
620
+ [Share Your Feedback](https://example.com)
621
+
622
+ ## What We're Asking
623
+
624
+ * How has your experience been so far?
625
+ * What's working well for you?
626
+ * What could we improve?
627
+
628
+ ## Thank You Gift
629
+
630
+ As a small token of appreciation, everyone who completes our feedback form receives [incentive].
631
+
632
+ ---
633
+
634
+ *Every response is read personally by our team. We take your input seriously.*
635
+
636
+ Thanks in advance,
637
+ The Team`},{id:"password-reset",name:"Password Reset",subject:"Reset Your Password - Action Required",description:"Secure password reset instructions",category:"security",body:`# Password Reset Request
638
+
639
+ We received a request to reset the password for your account.
640
+
641
+ ## Reset Your Password
642
+
643
+ Click the button below to create a new password. This link will expire in **24 hours** for your security.
644
+
645
+ [Reset Password](https://example.com/reset)
646
+
647
+ ## Didn't Request This?
648
+
649
+ If you didn't request a password reset, please ignore this email. Your account remains secure.
650
+
651
+ ## Need Help?
652
+
653
+ If you're having trouble with the reset process, contact our support team and we'll assist you right away.
654
+
655
+ ---
656
+
657
+ *For security reasons, this link can only be used once and expires in 24 hours.*
658
+
659
+ Best regards,
660
+ Security Team`},{id:"order-confirmation",name:"Order Confirmation",subject:"Order Confirmed - #[ORDER-NUMBER]",description:"Professional order confirmation template",category:"commerce",body:`# Order Confirmation
661
+
662
+ Thanks for your order! We've received your payment and are preparing your items for shipment.
663
+
664
+ ## Order Details
665
+
666
+ **Order Number**: #[ORDER-NUMBER]
667
+ **Order Date**: [DATE]
668
+ **Total**: $[AMOUNT]
669
+
670
+ ## Items Ordered
671
+
672
+ * **[Item 1]** - Quantity: [QTY] - $[PRICE]
673
+ * **[Item 2]** - Quantity: [QTY] - $[PRICE]
674
+
675
+ ## Shipping Information
676
+
677
+ **Address**: [SHIPPING ADDRESS]
678
+ **Method**: [SHIPPING METHOD]
679
+ **Estimated Delivery**: [DELIVERY DATE]
680
+
681
+ ## Next Steps
682
+
683
+ You'll receive a tracking number via email once your order ships (usually within 1-2 business days).
684
+
685
+ [Track Your Order](https://example.com/track)
686
+
687
+ ---
688
+
689
+ *Questions about your order? Reply to this email or contact our support team.*
690
+
691
+ Thank you for your business,
692
+ The Fulfillment Team`}]}addKeyboardListeners(){this.addEventListener("keydown",this.handleKeyDown),document.addEventListener("paste",this.handlePaste)}addDragListeners(){document.addEventListener("dragenter",this.handleDragEnter),document.addEventListener("dragleave",this.handleDocumentDragLeave),document.addEventListener("drop",this.handleDocumentDrop)}insertAtCursor(e,t){if(!this.bodyTextAreaRef.value)return;const i=this.bodyTextAreaRef.value.shadowRoot?.querySelector("textarea");if(!i)return;const s=i.selectionStart,a=i.selectionEnd,n=i.value.substring(0,s)+e+i.value.substring(a);this.body=n,this.dispatchChange(),this.updateComplete.then(()=>{const o=this.bodyTextAreaRef.value?.shadowRoot?.querySelector("textarea");if(o)if(o.focus(),t){const l=s+e.indexOf(t),h=l+t.length;o.setSelectionRange(l,h)}else o.setSelectionRange(s+e.length,s+e.length)})}wrapSelection(e,t,i){if(!this.bodyTextAreaRef.value)return;const s=this.bodyTextAreaRef.value.shadowRoot?.querySelector("textarea");if(!s)return;const a=s.selectionStart,n=s.selectionEnd,o=s.value.substring(a,n),l=e+(o||i)+t,h=s.value.substring(0,a)+l+s.value.substring(n);this.body=h,this.dispatchChange(),this.updateComplete.then(()=>{const p=this.bodyTextAreaRef.value?.shadowRoot?.querySelector("textarea");p&&(p.focus(),o?p.setSelectionRange(a+l.length,a+l.length):p.setSelectionRange(a+e.length,a+e.length+i.length))})}render(){return c.html`
693
+ <schmancy-surface
694
+ type="surface"
695
+ rounded="all"
696
+ class=${this.classMap({"border-2 border-dashed border-primary":this.dragOver,"h-full flex flex-col":!0})}
697
+ @drop=${this.handleDrop}
698
+ @dragover=${this.handleDragOver}
699
+ @dragleave=${this.handleDragLeave}
700
+ >
701
+ <div class="flex flex-col h-full gap-4">
702
+
703
+ <!-- Header Section with Subject -->
704
+ <div class="flex-shrink-0 p-4 pb-0 space-y-4">
705
+ <!-- Subject Field -->
706
+ <div class="space-y-2">
707
+ <schmancy-typography type="label" token="md">
708
+ Subject *
709
+ </schmancy-typography>
710
+ <schmancy-input
711
+ ${g.ref(this.subjectInputRef)}
712
+ .value=${this.subject}
713
+ @input=${this.handleSubjectChange}
714
+ placeholder="Enter email subject..."
715
+ .disabled=${this.disabled}
716
+ class="w-full"
717
+ ></schmancy-input>
718
+ </div>
719
+ </div>
720
+
721
+ <!-- Formatting Toolbar -->
722
+ <div class="flex-shrink-0 px-4">
723
+ <schmancy-surface type="container" rounded="all" class="p-3">
724
+ <div class="flex flex-wrap gap-2 items-center">
725
+ <!-- Text Formatting Group -->
726
+ <div class="flex gap-1">
727
+ <schmancy-icon-button
728
+ size="sm"
729
+ variant="text"
730
+ title="Bold"
731
+ ?disabled=${this.disabled}
732
+ @click=${()=>this.wrapSelection("**","**","bold text")}
733
+ >
734
+ <schmancy-icon>format_bold</schmancy-icon>
735
+ </schmancy-icon-button>
736
+ <schmancy-icon-button
737
+ size="sm"
738
+ variant="text"
739
+ title="Italic"
740
+ ?disabled=${this.disabled}
741
+ @click=${()=>this.wrapSelection("*","*","italic text")}
742
+ >
743
+ <schmancy-icon>format_italic</schmancy-icon>
744
+ </schmancy-icon-button>
745
+ <schmancy-icon-button
746
+ size="sm"
747
+ variant="text"
748
+ title="Link"
749
+ ?disabled=${this.disabled}
750
+ @click=${()=>this.insertAtCursor("[link text](https://example.com)","link text")}
751
+ >
752
+ <schmancy-icon>link</schmancy-icon>
753
+ </schmancy-icon-button>
754
+ </div>
755
+
756
+ <!-- Divider -->
757
+ <div class="h-6 w-px bg-outline-variant"></div>
758
+
759
+ <!-- Structure Formatting Group -->
760
+ <div class="flex gap-1">
761
+ <schmancy-icon-button
762
+ size="sm"
763
+ variant="text"
764
+ title="Heading"
765
+ ?disabled=${this.disabled}
766
+ @click=${()=>this.insertAtCursor(`
767
+ # Heading
768
+ `,"Heading")}
769
+ >
770
+ <schmancy-icon>title</schmancy-icon>
771
+ </schmancy-icon-button>
772
+ <schmancy-icon-button
773
+ size="sm"
774
+ variant="text"
775
+ title="Bullet List"
776
+ ?disabled=${this.disabled}
777
+ @click=${()=>this.insertAtCursor(`
778
+ * List item
779
+ `,"List item")}
780
+ >
781
+ <schmancy-icon>format_list_bulleted</schmancy-icon>
782
+ </schmancy-icon-button>
783
+ </div>
784
+
785
+ <!-- Divider -->
786
+ <div class="h-6 w-px bg-outline-variant"></div>
787
+
788
+ <!-- Media and Layout Group -->
789
+ <div class="flex gap-1">
790
+ <schmancy-icon-button
791
+ size="sm"
792
+ variant="text"
793
+ title="Insert Image"
794
+ ?disabled=${this.disabled||this.isUploading}
795
+ @click=${()=>this.imageInputRef.value?.click()}
796
+ >
797
+ ${d.when(this.isUploading,()=>c.html`<schmancy-progress size="sm" class="w-4 h-4"></schmancy-progress>`,()=>c.html`<schmancy-icon>image</schmancy-icon>`)}
798
+ </schmancy-icon-button>
799
+ <schmancy-icon-button
800
+ size="sm"
801
+ variant="text"
802
+ title="Insert Layout"
803
+ ?disabled=${this.disabled}
804
+ @click=${this.openLayoutDialog}
805
+ >
806
+ <schmancy-icon>mobile_layout</schmancy-icon>
807
+ </schmancy-icon-button>
808
+ <schmancy-icon-button
809
+ size="sm"
810
+ variant="text"
811
+ title="Use Template"
812
+ ?disabled=${this.disabled||this.templates.length===0}
813
+ @click=${this.openTemplatePicker}
814
+ >
815
+ <schmancy-icon>description</schmancy-icon>
816
+ </schmancy-icon-button>
817
+ </div>
818
+ </div>
819
+ </schmancy-surface>
820
+ </div>
821
+
822
+ <!-- Textarea Container - Takes remaining space -->
823
+ <div class="flex-1 px-4 relative min-h-0">
824
+ <schmancy-textarea
825
+ ${g.ref(this.bodyTextAreaRef)}
826
+ .value=${this.body}
827
+ @change=${this.handleBodyChange}
828
+ placeholder="Enter your email message here...
829
+
830
+ Use the toolbar buttons above for formatting, or type markdown directly:
831
+ **bold**, *italic*, [link](url), ![image](url)
832
+
833
+ Drag & drop images or press Ctrl+V to paste from clipboard.
834
+ Tab key inserts 2 spaces for better formatting."
835
+ .disabled=${this.disabled}
836
+ .required=${!0}
837
+ .rows=${4}
838
+ class="w-full font-mono text-sm"
839
+ ></schmancy-textarea>
840
+
841
+ <!-- Upload Progress Overlay -->
842
+ ${d.when(this.isUploading,()=>c.html`
843
+ <div class="absolute top-3 right-3 z-10">
844
+ <schmancy-surface type="container" rounded="all" class="p-2">
845
+ <div class="flex items-center gap-2">
846
+ <schmancy-progress size="sm" class="w-4 h-4"></schmancy-progress>
847
+ <schmancy-typography type="body" token="xs">Uploading...</schmancy-typography>
848
+ </div>
849
+ </schmancy-surface>
850
+ </div>
851
+ `)}
852
+ </div>
853
+
854
+ <!-- Footer Section -->
855
+ <div class="flex-shrink-0 p-4 pt-0 space-y-2">
856
+ <!-- Character/Word Counter -->
857
+ <div class="text-center">
858
+ <schmancy-typography type="body" token="xs">
859
+ ${this.body.length} characters • ${this.body.trim()?this.body.trim().split(/\s+/).length:0} words
860
+ </schmancy-typography>
861
+ </div>
862
+
863
+ <!-- Attachments Display (if any) -->
864
+ ${d.when(this.attachments.length>0,()=>c.html`
865
+ <div class="space-y-2">
866
+ <schmancy-typography type="label" token="sm" class="flex items-center gap-2">
867
+ <schmancy-icon size="16px">attach_file</schmancy-icon>
868
+ Attachments (${this.attachments.length})
869
+ </schmancy-typography>
870
+ <div class="flex flex-wrap gap-2">
871
+ ${$.repeat(this.attachments,e=>e.id,e=>c.html`
872
+ <schmancy-chip class="text-xs">
873
+ <span class="truncate max-w-32">${e.name}</span>
874
+ <button
875
+ @click=${()=>this.removeAttachment(e.id)}
876
+ class="ml-2 text-error hover:text-error-container"
877
+ title="Remove attachment"
878
+ >
879
+ <schmancy-icon size="14px">close</schmancy-icon>
880
+ </button>
881
+ </schmancy-chip>
882
+ `)}
883
+ </div>
884
+ </div>
885
+ `)}
886
+ </div>
887
+
888
+ <!-- Hidden File Inputs -->
889
+ <div class="hidden">
890
+ <input
891
+ ${g.ref(this.fileInputRef)}
892
+ type="file"
893
+ multiple
894
+ @change=${this.handleFileChange}
895
+ >
896
+ <input
897
+ ${g.ref(this.imageInputRef)}
898
+ type="file"
899
+ accept="image/*"
900
+ @change=${this.handleImageSelect}
901
+ >
902
+ </div>
903
+
904
+ </div>
905
+ </schmancy-surface>
906
+
907
+ `}},f([r.property({type:String})],exports.SchmancyEmailEditor.prototype,"subject",2),f([r.property({type:String})],exports.SchmancyEmailEditor.prototype,"body",2),f([r.property({type:Boolean})],exports.SchmancyEmailEditor.prototype,"disabled",2),f([r.property({type:Array})],exports.SchmancyEmailEditor.prototype,"attachments",2),f([r.property({type:Object})],exports.SchmancyEmailEditor.prototype,"config",2),f([r.property({type:Array})],exports.SchmancyEmailEditor.prototype,"templates",2),f([r.state()],exports.SchmancyEmailEditor.prototype,"dragOver",2),f([r.state()],exports.SchmancyEmailEditor.prototype,"isUploading",2),exports.SchmancyEmailEditor=f([r.customElement("schmancy-email-editor")],exports.SchmancyEmailEditor);var z=Object.defineProperty,P=Object.getOwnPropertyDescriptor,b=(e,t,i,s)=>{for(var a,n=s>1?void 0:s?P(t,i):t,o=e.length-1;o>=0;o--)(a=e[o])&&(n=(s?a(t,i,n):a(n))||n);return s&&n&&z(t,i,n),n};exports.SchmancyEmailViewer=class extends S.$LitElement(c.css`
908
+ :host {
909
+ display: block;
910
+ }
911
+ `){constructor(){super(...arguments),this.subject="",this.body="",this.attachments=[],this.recipients=[],this.fromAddress="sender@example.com",this.toAddress="recipient@example.com",this.viewMode="html"}parseLayoutBlocks(e){return e.replace(/:::layout\s+([a-zA-Z0-9-]+)\n([\s\S]*?)\n:::/g,(t,i,s)=>{switch(i){case"columns-2":return this.parseColumnsLayout(s,2);case"columns-3":return this.parseColumnsLayout(s,3);case"sidebar-left":return this.parseSidebarLayout(s,"left");case"sidebar-right":return this.parseSidebarLayout(s,"right");case"image-row":return this.parseImageRowLayout(s);default:return s}})}parseColumnsLayout(e,t){const i=/<div class="column">([\s\S]*?)<\/div>/g,s=[];let a;for(;(a=i.exec(e))!==null;)s.push(a[1].trim());if(s.length===0)return e;const n=Math.floor(100/t),o="0 10px 0 0";let l="<tr>";for(let h=0;h<t&&h<s.length;h++)l+=`
912
+ <td width="${n}%" style="padding: ${h===t-1?"0":o}; vertical-align: top; font-family: Arial, Helvetica, sans-serif; font-size: 14px; line-height: 1.6; color: #333333;">
913
+ ${this.parseBasicMarkdown(s[h])}
914
+ </td>`;for(let h=s.length;h<t;h++)l+=`
915
+ <td width="${n}%" style="padding: ${h===t-1?"0":o}; vertical-align: top;">
916
+ &nbsp;
917
+ </td>`;return l+="</tr>",`
918
+ <table cellpadding="0" cellspacing="0" border="0" width="100%" style="margin: 16px 0;">
919
+ ${l}
920
+ </table>`}parseSidebarLayout(e,t){const i=e.match(/<div class="sidebar">([\s\S]*?)<\/div>/),s=e.match(/<div class="main">([\s\S]*?)<\/div>/);if(!i||!s)return e;const a=`
921
+ <td width="30%" style="padding: 0 16px 0 0; vertical-align: top; font-family: Arial, Helvetica, sans-serif; font-size: 14px; line-height: 1.6; color: #333333;">
922
+ ${this.parseBasicMarkdown(i[1].trim())}
923
+ </td>`,n=`
924
+ <td width="70%" style="padding: 0; vertical-align: top; font-family: Arial, Helvetica, sans-serif; font-size: 14px; line-height: 1.6; color: #333333;">
925
+ ${this.parseBasicMarkdown(s[1].trim())}
926
+ </td>`;return`
927
+ <table cellpadding="0" cellspacing="0" border="0" width="100%" style="margin: 16px 0;">
928
+ ${t==="left"?`<tr>${a}${n}</tr>`:`<tr>${n}${a.replace("0 16px 0 0","0 0 0 16px")}</tr>`}
929
+ </table>`}parseImageRowLayout(e){const t=/<div class="image">([\s\S]*?)<\/div>/g,i=[];let s;for(;(s=t.exec(e))!==null;){const o=s[1].trim().match(/!\[([^\]]*)\]\(([^)]+)\)/);if(o){const[,l,h]=o;i.push(`<img src="${h}" alt="${l||"Image"}" style="display: block; max-width: 100%; height: auto;" border="0">`)}}if(i.length===0)return e;const a=Math.floor(100/i.length);let n="<tr>";return i.forEach((o,l)=>{const h=l===i.length-1;n+=`
930
+ <td width="${a}%" style="padding: ${h?"0":"0 8px 0 0"}; vertical-align: top; text-align: center;">
931
+ ${o}
932
+ </td>`}),n+="</tr>",`
933
+ <table cellpadding="0" cellspacing="0" border="0" width="100%" style="margin: 16px 0;">
934
+ ${n}
935
+ </table>`}parseImageAttributes(e){const t={};if(!e)return t;const i=e.match(/width=([^\s}]+)/);i&&(t.width=i[1]);const s=e.match(/height=([^\s}]+)/);return s&&(t.height=s[1]),e.includes("cover")&&(t.cover=!0),e.includes("contain")&&(t.contain=!0),t}generateImageStyles(e,t=!1){let i,s,a="display: block; margin: 8px 0; border: 0;";return e.width?e.width==="auto"?a+=t?" max-width: 100%; height: auto;":" height: auto;":e.width.endsWith("%")?(a+=` width: ${e.width}; max-width: 100%;`,e.height||(a+=" height: auto;")):e.width.endsWith("px")&&(i=e.width.replace("px",""),a+=" max-width: 100%;",e.height||(a+=" height: auto;")):a+=t?" width: 100%; max-width: 100%; height: auto;":" max-width: 100%; height: auto;",e.height&&(e.height==="auto"?a+=" height: auto;":e.height.endsWith("px")&&(s=e.height.replace("px",""),e.width||(a+=" max-width: 100%;"))),(e.cover||e.contain)&&(e.width||e.height||(a+=" width: 100%;")),{imgStyle:a,imgWidth:i,imgHeight:s}}parseBasicMarkdown(e){return e.replace(/!\[([^\]]*)\]\(([^)]+)\)(?:\{([^}]+)\})?/g,(t,i,s,a)=>{const n=this.parseImageAttributes(a),{imgStyle:o,imgWidth:l,imgHeight:h}=this.generateImageStyles(n,!0);let p=`<img src="${s}" alt="${i||"Image"}" style="${o}" border="0"`;return l&&(p+=` width="${l}"`),h&&(p+=` height="${h}"`),p+=">",p}).replace(/\n\n/g,'</p><p style="margin: 0 0 16px 0; padding: 0; font-family: Arial, Helvetica, sans-serif; font-size: 14px; line-height: 1.6; color: #333333;">').replace(/\n/g,"<br>").replace(/\*\*(.*?)\*\*/g,'<strong style="font-weight: bold;">$1</strong>').replace(/\*(.*?)\*/g,'<em style="font-style: italic;">$1</em>').replace(/\[([^\]]+)\]\(([^)]+)\)/g,'<a href="$2" style="color: #0066cc; text-decoration: underline;">$1</a>').replace(/^# (.*$)/gim,'<h2 style="margin: 16px 0 8px 0; padding: 0; font-family: Arial, Helvetica, sans-serif; font-size: 18px; font-weight: bold; color: #1a1a1a;">$1</h2>').replace(/^\* (.*$)/gim,'<li style="margin: 4px 0; font-family: Arial, Helvetica, sans-serif; font-size: 14px; color: #333333;">$1</li>').replace(/^\d+\. (.*$)/gim,'<li style="margin: 4px 0; font-family: Arial, Helvetica, sans-serif; font-size: 14px; color: #333333;">$1</li>').replace(/(<li[^>]*>.*?<\/li>(?:\s*<li[^>]*>.*?<\/li>)*)/gs,t=>{const i=/^\d+\./.test(t.replace(/<[^>]*>/g,""))?"ol":"ul";return`<${i} style="margin: 8px 0; padding: 0 0 0 20px; font-family: Arial, Helvetica, sans-serif;">${t}</${i}>`}).replace(/^(?!<[h\d]|<p|<ul|<ol|<li|<img)(.+)$/gim,'<p style="margin: 0 0 16px 0; padding: 0; font-family: Arial, Helvetica, sans-serif; font-size: 14px; line-height: 1.6; color: #333333;">$1</p>')}parseExtendedMarkdown(e){let t=e;return t=this.parseLayoutBlocks(t),t=t.replace(/:::images\s+(row|grid(?:=\d+)?)\n((?:!\[.*?\]\(.*?\)(?:\{.*?\})?\s*\n?)*?):::/g,"[Multiple Images - View in web browser]"),t=t.replace(/!\[([^\]]*)\]\(([^)]+)\)(?:\{([^}]+)\})?/g,(i,s,a,n)=>{const o=this.parseImageAttributes(n),{imgStyle:l,imgWidth:h,imgHeight:p}=this.generateImageStyles(o,!1);let x=`<img src="${a}" alt="${s||"Image"}" style="${l}" border="0"`;return h&&(x+=` width="${h}"`),p&&(x+=` height="${p}"`),x+=">",`<table cellpadding="0" cellspacing="0" border="0" style="margin: 16px 0;"><tr><td>${x}</td></tr></table>`}),t=t.replace(/\n\n/g,'</p><p style="margin: 0 0 16px 0; padding: 0; font-family: Arial, Helvetica, sans-serif; font-size: 14px; line-height: 1.6; color: #333333;">').replace(/\n/g,"<br>").replace(/\*\*(.*?)\*\*/g,'<strong style="font-weight: bold;">$1</strong>').replace(/\*(.*?)\*/g,'<em style="font-style: italic;">$1</em>').replace(/\[([^\]]+)\]\(([^)]+)\)/g,'<a href="$2" style="color: #0066cc; text-decoration: underline;">$1</a>').replace(/^# (.*$)/gim,'<table cellpadding="0" cellspacing="0" border="0" width="100%" style="margin: 24px 0 16px 0;"><tr><td><h1 style="margin: 0; padding: 0; font-family: Arial, Helvetica, sans-serif; font-size: 24px; font-weight: bold; color: #1a1a1a;">$1</h1></td></tr></table>').replace(/^\* (.*$)/gim,'<li style="margin: 4px 0; font-family: Arial, Helvetica, sans-serif; font-size: 14px; color: #333333;">$1</li>').replace(/^\d+\. (.*$)/gim,'<li style="margin: 4px 0; font-family: Arial, Helvetica, sans-serif; font-size: 14px; color: #333333;">$1</li>').replace(/^---$/gim,'<table cellpadding="0" cellspacing="0" border="0" width="100%" style="margin: 24px 0;"><tr><td style="border-top: 1px solid #e0e0e0; height: 1px; line-height: 1px;">&nbsp;</td></tr></table>'),t=t.replace(/(<li[^>]*>.*?<\/li>(?:\s*<li[^>]*>.*?<\/li>)*)/gs,i=>{const s=/^\d+\./.test(i.replace(/<[^>]*>/g,"")),a=s?"ol":"ul";return`<table cellpadding="0" cellspacing="0" border="0" width="100%"><tr><td><${a} style="margin: 16px 0; padding: 0 0 0 20px; font-family: Arial, Helvetica, sans-serif;">${i}</${a}></td></tr></table>`}),t.includes("<table>")||t.includes("<h1>")||(t=`<p style="margin: 0 0 16px 0; padding: 0; font-family: Arial, Helvetica, sans-serif; font-size: 14px; line-height: 1.6; color: #333333;">${t}</p>`),t=`<table cellpadding="0" cellspacing="0" border="0" width="100%" style="max-width: 600px; margin: 0 auto;">
936
+ <tr>
937
+ <td style="padding: 0; font-family: Arial, Helvetica, sans-serif; font-size: 14px; line-height: 1.6; color: #333333;">
938
+ ${t}
939
+ </td>
940
+ </tr>
941
+ </table>`,t}convertToPlainText(e){return e.trim().replace(/:::layout\s+([a-zA-Z0-9-]+)\n([\s\S]*?)\n:::/g,(t,i,s)=>s.replace(/<div class="(?:column|sidebar|main|image)">/g,`
942
+ `).replace(/<\/div>/g,`
943
+ `).replace(/\n{3,}/g,`
944
+
945
+ `).trim()).replace(/:::images\s+(row|grid(?:=\d+)?)\n((?:!\[.*?\]\(.*?\)(?:\{.*?\})?\s*\n?)*?):::/g,"[Images]").replace(/!\[([^\]]*)\]\(([^)]+)\)(?:\{([^}]+)\})?/g,"[Image: $1]").replace(/\*\*(.*?)\*\*/g,"$1").replace(/\*(.*?)\*/g,"$1").replace(/__(.*?)__/g,"$1").replace(/~~(.*?)~~/g,"$1").replace(/`(.*?)`/g,"$1").replace(/^#{1,3} (.*$)/gim,"$1").replace(/^> (.*$)/gim,"$1").replace(/^\* (.*$)/gim,"• $1").replace(/^\d+\. (.*$)/gim,"$1").replace(/\[([^\]]+)\]\(([^)]+)\)/g,"$1 ($2)").replace(/^---$/gim,"---").replace(/\n\n+/g,`
946
+
947
+ `)}formatFileSize(e){if(e===0)return"0 Bytes";const t=Math.floor(Math.log(e)/Math.log(1024));return parseFloat((e/Math.pow(1024,t)).toFixed(2))+" "+["Bytes","KB","MB","GB"][t]}render(){const e=this.parseExtendedMarkdown(this.body),t=this.convertToPlainText(this.body),i=this.recipients[0]||this.toAddress;return c.html`
948
+ <schmancy-surface type="surface" rounded="all" class="h-full flex flex-col">
949
+
950
+ <!-- Header Section -->
951
+ <div class="flex-shrink-0 p-4 border-b border-outline-variant">
952
+ <div class="flex flex-col sm:flex-row sm:items-center sm:justify-between gap-4">
953
+ <schmancy-typography type="title" token="md" class="flex items-center gap-2">
954
+ <schmancy-icon size="20px">preview</schmancy-icon>
955
+ Email Preview
956
+ </schmancy-typography>
957
+
958
+ <!-- View Mode Toggle -->
959
+ <div class="flex gap-1 bg-surface-container rounded-full p-1">
960
+ <schmancy-chip
961
+ ?selected=${this.viewMode==="html"}
962
+ @click=${()=>{this.viewMode="html"}}
963
+ class="text-xs h-8"
964
+ data-variant=${this.viewMode==="html"?"filled":"outlined"}
965
+ >
966
+ <schmancy-icon slot="prefix" size="14px">code</schmancy-icon>
967
+ HTML
968
+ </schmancy-chip>
969
+ <schmancy-chip
970
+ ?selected=${this.viewMode==="plaintext"}
971
+ @click=${()=>{this.viewMode="plaintext"}}
972
+ class="text-xs h-8"
973
+ data-variant=${this.viewMode==="plaintext"?"filled":"outlined"}
974
+ >
975
+ <schmancy-icon slot="prefix" size="14px">text_fields</schmancy-icon>
976
+ Text
977
+ </schmancy-chip>
978
+ </div>
979
+ </div>
980
+ </div>
981
+
982
+ <!-- Preview Content Container -->
983
+ <div class="flex-1 flex flex-col min-h-0 p-4 gap-4">
984
+
985
+ <!-- Email Mock Container -->
986
+ <div class="flex-1 flex flex-col min-h-0">
987
+ <schmancy-surface
988
+ type="container"
989
+ rounded="all"
990
+ class="flex-1 flex flex-col overflow-hidden shadow-sm"
991
+ >
992
+ <!-- Email Header -->
993
+ <div class="flex-shrink-0 p-4 bg-surface-containerLow border-b border-outline-variant">
994
+ <div class="space-y-3">
995
+ <!-- From Field -->
996
+ <div class="flex items-start gap-3">
997
+ <div class="flex items-center gap-2 min-w-0 flex-shrink-0 w-16">
998
+ <schmancy-icon size="16px">account_circle</schmancy-icon>
999
+ <schmancy-typography type="body" token="sm" class="font-medium">
1000
+ From
1001
+ </schmancy-typography>
1002
+ </div>
1003
+ <schmancy-typography type="body" token="sm" class="break-all flex-1">
1004
+ ${this.fromAddress}
1005
+ </schmancy-typography>
1006
+ </div>
1007
+
1008
+ <!-- To Field -->
1009
+ <div class="flex items-start gap-3">
1010
+ <div class="flex items-center gap-2 min-w-0 flex-shrink-0 w-16">
1011
+ <schmancy-icon size="16px">person</schmancy-icon>
1012
+ <schmancy-typography type="body" token="sm" class="font-medium">
1013
+ To
1014
+ </schmancy-typography>
1015
+ </div>
1016
+ <schmancy-typography type="body" token="sm" class="break-all flex-1">
1017
+ ${i}
1018
+ </schmancy-typography>
1019
+ </div>
1020
+
1021
+ <!-- Subject Field -->
1022
+ <div class="flex items-start gap-3">
1023
+ <div class="flex items-center gap-2 min-w-0 flex-shrink-0 w-16">
1024
+ <schmancy-icon size="16px">subject</schmancy-icon>
1025
+ <schmancy-typography type="body" token="sm" class="font-medium">
1026
+ Subject
1027
+ </schmancy-typography>
1028
+ </div>
1029
+ <schmancy-typography type="body" token="sm" class="font-medium flex-1">
1030
+ ${this.subject||c.html`<span class="italic text-surface-onVariant">(No subject)</span>`}
1031
+ </schmancy-typography>
1032
+ </div>
1033
+ </div>
1034
+ </div>
1035
+
1036
+ <!-- Email Body Content -->
1037
+ <div class="flex-1 overflow-y-auto min-h-0">
1038
+ ${d.when(this.body,()=>c.html`
1039
+ ${d.when(this.viewMode==="html",()=>c.html`
1040
+ <div class="p-6 bg-white" style="color: #333; line-height: 1.6; font-family: system-ui, -apple-system, sans-serif; font-size: 14px;">
1041
+ <div .innerHTML=${e}></div>
1042
+ </div>
1043
+ `,()=>c.html`
1044
+ <div class="p-6 bg-white" style="color: #333; line-height: 1.6; font-family: 'Courier New', monospace; font-size: 13px; white-space: pre-wrap;">
1045
+ ${t}
1046
+ </div>
1047
+ `)}
1048
+ `,()=>c.html`
1049
+ <!-- Empty State -->
1050
+ <div class="flex-1 flex items-center justify-center p-8">
1051
+ <div class="text-center space-y-3">
1052
+ <schmancy-icon size="48px" class="text-surface-onVariant opacity-50">mail_outline</schmancy-icon>
1053
+ <schmancy-typography type="body" token="md">
1054
+ No message content to preview
1055
+ </schmancy-typography>
1056
+ <schmancy-typography type="body" token="sm" class="text-surface-onVariant">
1057
+ Start typing in the composer to see a preview
1058
+ </schmancy-typography>
1059
+ </div>
1060
+ </div>
1061
+ `)}
1062
+ </div>
1063
+
1064
+ <!-- Attachments Section -->
1065
+ ${d.when(this.attachments.length>0,()=>c.html`
1066
+ <div class="flex-shrink-0 p-4 border-t border-outline-variant bg-surface-containerLowest">
1067
+ <div class="space-y-3">
1068
+ <!-- Attachments Header -->
1069
+ <div class="flex items-center gap-2">
1070
+ <schmancy-icon size="18px">attach_file</schmancy-icon>
1071
+ <schmancy-typography type="label" token="md" class="font-medium">
1072
+ Attachments (${this.attachments.length})
1073
+ </schmancy-typography>
1074
+ </div>
1075
+
1076
+ <!-- Attachments List -->
1077
+ <div class="grid gap-2 sm:grid-cols-2 lg:grid-cols-1 xl:grid-cols-2">
1078
+ ${$.repeat(this.attachments,s=>s.id,s=>c.html`
1079
+ <schmancy-surface type="container" rounded="all" class="p-3">
1080
+ <div class="flex items-center gap-3">
1081
+ <!-- File Icon -->
1082
+ <schmancy-icon size="20px" class="text-surface-onVariant flex-shrink-0">
1083
+ ${s.type.startsWith("image/")?"image":s.type.includes("pdf")?"picture_as_pdf":s.type.includes("text")?"description":"attach_file"}
1084
+ </schmancy-icon>
1085
+
1086
+ <!-- File Info -->
1087
+ <div class="flex-1 min-w-0">
1088
+ <schmancy-typography type="body" token="sm" class="font-medium truncate">
1089
+ ${s.name}
1090
+ </schmancy-typography>
1091
+ <schmancy-typography type="body" token="xs" class="text-surface-onVariant">
1092
+ ${this.formatFileSize(s.size)} • ${s.type}
1093
+ </schmancy-typography>
1094
+ </div>
1095
+ </div>
1096
+ </schmancy-surface>
1097
+ `)}
1098
+ </div>
1099
+ </div>
1100
+ </div>
1101
+ `)}
1102
+ </schmancy-surface>
1103
+ </div>
1104
+
1105
+ <!-- Preview Stats -->
1106
+ ${d.when(this.body,()=>c.html`
1107
+ <div class="flex-shrink-0">
1108
+ <schmancy-surface type="container" rounded="all" class="p-3">
1109
+ <div class="flex items-center justify-center gap-6 text-center">
1110
+ <div>
1111
+ <schmancy-typography type="body" token="xs" class="text-surface-onVariant">
1112
+ Characters
1113
+ </schmancy-typography>
1114
+ <schmancy-typography type="body" token="sm" class="font-medium">
1115
+ ${this.body.length}
1116
+ </schmancy-typography>
1117
+ </div>
1118
+ <div class="w-px h-8 bg-outline-variant"></div>
1119
+ <div>
1120
+ <schmancy-typography type="body" token="xs" class="text-surface-onVariant">
1121
+ Words
1122
+ </schmancy-typography>
1123
+ <schmancy-typography type="body" token="sm" class="font-medium">
1124
+ ${this.body.trim()?this.body.trim().split(/\s+/).length:0}
1125
+ </schmancy-typography>
1126
+ </div>
1127
+ ${d.when(this.attachments.length>0,()=>c.html`
1128
+ <div class="w-px h-8 bg-outline-variant"></div>
1129
+ <div>
1130
+ <schmancy-typography type="body" token="xs" class="text-surface-onVariant">
1131
+ Attachments
1132
+ </schmancy-typography>
1133
+ <schmancy-typography type="body" token="sm" class="font-medium">
1134
+ ${this.attachments.length}
1135
+ </schmancy-typography>
1136
+ </div>
1137
+ `)}
1138
+ </div>
1139
+ </schmancy-surface>
1140
+ </div>
1141
+ `)}
1142
+
1143
+ </div>
1144
+ </schmancy-surface>
1145
+ `}},b([r.property({type:String})],exports.SchmancyEmailViewer.prototype,"subject",2),b([r.property({type:String})],exports.SchmancyEmailViewer.prototype,"body",2),b([r.property({type:Array})],exports.SchmancyEmailViewer.prototype,"attachments",2),b([r.property({type:Array})],exports.SchmancyEmailViewer.prototype,"recipients",2),b([r.property({type:String})],exports.SchmancyEmailViewer.prototype,"fromAddress",2),b([r.property({type:String})],exports.SchmancyEmailViewer.prototype,"toAddress",2),b([r.state()],exports.SchmancyEmailViewer.prototype,"viewMode",2),exports.SchmancyEmailViewer=b([r.customElement("schmancy-email-viewer")],exports.SchmancyEmailViewer);var M=Object.defineProperty,F=Object.getOwnPropertyDescriptor,y=(e,t,i,s)=>{for(var a,n=s>1?void 0:s?F(t,i):t,o=e.length-1;o>=0;o--)(a=e[o])&&(n=(s?a(t,i,n):a(n))||n);return s&&n&&M(t,i,n),n};exports.SchmancyEmailRecipients=class extends S.$LitElement(c.css`
1146
+ :host {
1147
+ display: block;
1148
+ height: 100%;
1149
+ }
1150
+ `){constructor(){super(...arguments),this.disabled=!1,this.recipients=[],this.selectedRecipients=[],this.enableCsvImport=!0,this.enableDragDrop=!0,this.title="Recipients",this.emptyStateTitle="No recipients yet",this.emptyStateMessage="Import from sources or upload a CSV",this.dragOver=!1,this.localSelectedRecipients=new Set,this.searchQuery="",this.filteredRecipients=[],this.boatState="minimized",this.fileInputRef=g.createRef(),this.handleEmailsImported=()=>{this.updateFilteredRecipients(),this.requestUpdate()},this.handleImportFromCSV=()=>{this.enableCsvImport&&this.fileInputRef.value?.click()},this.handleFileSelect=e=>{const t=e.target,i=t.files?.[0];i&&this.processCSVFile(i)},this.handleDrop=e=>{if(!this.enableDragDrop)return;e.preventDefault(),this.dragOver=!1;const t=e.dataTransfer?.files[0];t&&this.processCSVFile(t)},this.processCSVFile=e=>{if(!e.name.endsWith(".csv"))return void u.$notify.error("Please select a CSV file");const t=new FileReader;t.onload=i=>{const s=i.target?.result;try{const a=this.parseCSV(s);if(a.length===0)return void u.$notify.error("No valid email addresses found in CSV");this.dispatchEvent(new CustomEvent("emails-imported",{detail:{emails:a,source:"csv"},bubbles:!0,composed:!0})),u.$notify.success(`Imported ${a.length} emails from CSV file`)}catch{u.$notify.error("Failed to parse CSV file")}},t.readAsText(e)},this.toggleRecipientSelection=e=>{this.localSelectedRecipients.has(e)?this.localSelectedRecipients.delete(e):this.localSelectedRecipients.add(e),this.localSelectedRecipients=new Set(this.localSelectedRecipients),this.dispatchSelectionChange()},this.selectAll=()=>{this.localSelectedRecipients=new Set(this.filteredRecipients),this.dispatchSelectionChange()},this.selectNone=()=>{this.localSelectedRecipients.clear(),this.localSelectedRecipients=new Set,this.dispatchSelectionChange()},this.removeRecipient=e=>{this.dispatchEvent(new CustomEvent("recipient-removed",{detail:{email:e},bubbles:!0,composed:!0}))},this.clearAll=()=>{this.dispatchEvent(new CustomEvent("recipients-cleared",{bubbles:!0,composed:!0}))},this.updateFilteredRecipients=()=>{const e=Array.isArray(this.recipients)?this.recipients:[];if(this.searchQuery.trim()){const t=this.searchQuery.toLowerCase();this.filteredRecipients=e.filter(i=>i.toLowerCase().includes(t))}else this.filteredRecipients=[...e]},this.handleSearchInput=e=>{const t=e.target;this.searchQuery=t.value},this.clearSearch=()=>{this.searchQuery=""},this.dispatchSelectionChange=()=>{this.dispatchEvent(new CustomEvent("selection-changed",{detail:{selectedEmails:Array.from(this.localSelectedRecipients)},bubbles:!0,composed:!0}))},this.handleBoatStateChange=e=>{this.boatState=e.detail}}connectedCallback(){super.connectedCallback(),this.localSelectedRecipients=new Set(this.selectedRecipients),this.updateFilteredRecipients(),this.addEventListener("emails-imported",this.handleEmailsImported)}updated(e){super.updated(e),e.has("selectedRecipients")&&(this.localSelectedRecipients=new Set(this.selectedRecipients)),(e.has("recipients")||e.has("searchQuery"))&&this.updateFilteredRecipients(),e.has("recipients")&&this.requestUpdate()}parseCSV(e){const t=[];let i;i=this.csvParser?this.csvParser.parse(e,{header:!0,skipEmptyLines:!0,dynamicTyping:!0,delimiter:"",transformHeader:l=>l.trim()}):this.simpleCSVParse(e);const s=i.data,a=i.meta.fields||[];let n=a.find(l=>l.toLowerCase().includes("email"));if(!n)for(const l of a){const h=s[0]?.[l]?.toString();if(h&&this.isValidEmail(h)){n=l;break}}if(!n)throw new Error("No email column found in CSV");const o=new Set;for(const l of s){const h=l[n]?.toString();if(!h)continue;const p=h.toLowerCase().trim();this.isValidEmail(p)&&!o.has(p)&&(o.add(p),t.push(p))}return t}simpleCSVParse(e){const t=e.split(`
1151
+ `).filter(a=>a.trim());if(t.length===0)return{data:[],meta:{}};const i=t[0].split(",").map(a=>a.trim().replace(/"/g,"")),s=[];for(let a=1;a<t.length;a++){const n=t[a].split(",").map(l=>l.trim().replace(/"/g,"")),o={};i.forEach((l,h)=>{o[l]=n[h]||""}),s.push(o)}return{data:s,meta:{fields:i}}}isValidEmail(e){return/^[^\s@]+@[^\s@]+\.[^\s@]+$/.test(e.trim())}addRecipients(e){if(!e.length)return;const t=[...new Set([...this.recipients,...e])],i=e.filter(s=>!this.recipients.includes(s));this.recipients=t,this.selectedRecipients=[...new Set([...this.selectedRecipients,...i])],this.localSelectedRecipients=new Set(this.selectedRecipients),this.updateFilteredRecipients(),this.requestUpdate()}showBoat(){this.boatState="minimized"}hideBoat(){this.boatState="hidden"}expandBoat(){this.boatState="expanded"}toggleBoat(){this.boatState=this.boatState==="hidden"?"minimized":this.boatState==="minimized"?"expanded":"hidden"}render(){return this.renderBoatLayout()}renderBoatLayout(){return c.html`
1152
+ <!-- Hidden file input for CSV import -->
1153
+ ${d.when(this.enableCsvImport,()=>c.html`
1154
+ <input
1155
+ type="file"
1156
+ accept=".csv"
1157
+ ${g.ref(this.fileInputRef)}
1158
+ @change=${this.handleFileSelect}
1159
+ class="hidden"
1160
+ />
1161
+ `)}
1162
+
1163
+ <schmancy-boat
1164
+ .state=${this.boatState}
1165
+ @change=${this.handleBoatStateChange}
1166
+ >
1167
+ <!-- Boat Header -->
1168
+ <div slot="header" class="flex items-center justify-between w-full px-4 py-2">
1169
+ <div class="flex items-center gap-3">
1170
+ <schmancy-icon size="20px">group</schmancy-icon>
1171
+ <schmancy-typography type="title" token="md" class="font-semibold">
1172
+ ${this.title}
1173
+ </schmancy-typography>
1174
+ ${d.when(this.recipients.length>0,()=>c.html`
1175
+ <schmancy-badge>
1176
+ ${this.localSelectedRecipients.size}/${this.recipients.length}
1177
+ </schmancy-badge>
1178
+ `)}
1179
+ </div>
1180
+ </div>
1181
+
1182
+ <!-- Boat Content -->
1183
+ <div class="h-full flex flex-col max-h-[70vh]">
1184
+ ${this.renderBoatContent()}
1185
+ </div>
1186
+ </schmancy-boat>
1187
+ `}renderBoatContent(){return c.html`
1188
+ <!-- Search Bar and CSV Import on one line -->
1189
+ <div class="p-4 flex gap-3">
1190
+ <schmancy-input
1191
+ type="text"
1192
+ placeholder="Search recipients"
1193
+ .value=${this.searchQuery}
1194
+ @input=${this.handleSearchInput}
1195
+ class="flex-1"
1196
+ >
1197
+ ${d.when(this.searchQuery,()=>c.html`
1198
+ <schmancy-button
1199
+ slot="suffix"
1200
+ variant="text"
1201
+ @click=${this.clearSearch}
1202
+ >
1203
+ <schmancy-icon size="16px">close</schmancy-icon>
1204
+ </schmancy-button>
1205
+ `)}
1206
+ </schmancy-input>
1207
+
1208
+ ${d.when(this.enableCsvImport,()=>c.html`
1209
+ <schmancy-button
1210
+ variant="outlined"
1211
+ @click=${this.handleImportFromCSV}
1212
+ ?disabled=${this.disabled}
1213
+ >
1214
+ <schmancy-icon slot="prefix" size="16px">upload_file</schmancy-icon>
1215
+ Import
1216
+ </schmancy-button>
1217
+ `)}
1218
+ </div>
1219
+
1220
+ ${d.when(this.recipients.length>0,()=>c.html`
1221
+ <!-- Bulk Actions -->
1222
+ <div class="px-4 pb-4">
1223
+ <div class="flex items-center gap-3">
1224
+ <schmancy-button
1225
+ variant="outlined"
1226
+ @click=${this.selectAll}
1227
+ ?disabled=${this.localSelectedRecipients.size===this.filteredRecipients.length}
1228
+ >
1229
+ <schmancy-icon slot="prefix" size="14px">select_all</schmancy-icon>
1230
+ Select All
1231
+ </schmancy-button>
1232
+
1233
+ <schmancy-button
1234
+ variant="outlined"
1235
+ @click=${this.selectNone}
1236
+ ?disabled=${this.localSelectedRecipients.size===0}
1237
+ >
1238
+ <schmancy-icon slot="prefix" size="14px">deselect</schmancy-icon>
1239
+ Clear Selection
1240
+ </schmancy-button>
1241
+
1242
+ <div class="flex-1"></div>
1243
+
1244
+ <schmancy-button variant="text" @click=${this.clearAll}>
1245
+ <schmancy-icon slot="prefix" size="14px">delete_forever</schmancy-icon>
1246
+ Clear All
1247
+ </schmancy-button>
1248
+ </div>
1249
+ </div>
1250
+
1251
+ <!-- Recipients List -->
1252
+ <div class="flex-1 overflow-y-auto px-4 pb-4">
1253
+ ${d.when(this.filteredRecipients.length>0,()=>c.html`
1254
+ <div class="flex flex-wrap gap-3">
1255
+ ${$.repeat(this.filteredRecipients,e=>e,e=>c.html`
1256
+ <schmancy-button
1257
+ variant=${this.localSelectedRecipients.has(e)?"filled":"outlined"}
1258
+ @click=${t=>{t.stopPropagation(),t.preventDefault(),this.toggleRecipientSelection(e)}}
1259
+ class="cursor-pointer flex items-center gap-2"
1260
+ >
1261
+ <span class="truncate flex-1 text-left">${e}</span>
1262
+ <schmancy-icon
1263
+ @click=${t=>{t.stopPropagation(),this.removeRecipient(e)}}
1264
+ size="16px"
1265
+ class="ml-2"
1266
+ >close</schmancy-icon>
1267
+ </schmancy-button>
1268
+ `)}
1269
+ </div>
1270
+ `,()=>c.html`
1271
+ <div class="text-center py-8">
1272
+ <schmancy-icon size="32px" class="opacity-50 mb-2">search_off</schmancy-icon>
1273
+ <schmancy-typography type="body" token="sm" class="mb-2">
1274
+ No recipients match "${this.searchQuery}"
1275
+ </schmancy-typography>
1276
+ <schmancy-button variant="outlined" @click=${this.clearSearch}>
1277
+ Clear Search
1278
+ </schmancy-button>
1279
+ </div>
1280
+ `)}
1281
+ </div>
1282
+ `,()=>c.html`
1283
+ <!-- Empty State -->
1284
+ <div class="flex-1 flex items-center justify-center p-8">
1285
+ <div class="text-center space-y-4">
1286
+ <schmancy-icon size="48px" class="opacity-30">mail_outline</schmancy-icon>
1287
+ <schmancy-typography type="title" token="md" class="mb-2">
1288
+ ${this.emptyStateTitle}
1289
+ </schmancy-typography>
1290
+ <schmancy-typography type="body" token="sm">
1291
+ ${this.emptyStateMessage}
1292
+ </schmancy-typography>
1293
+ </div>
1294
+ </div>
1295
+ `)}
1296
+
1297
+ <!-- Drag Overlay -->
1298
+ ${d.when(this.dragOver&&this.enableDragDrop,()=>c.html`
1299
+ <div
1300
+ class="absolute inset-4 flex items-center justify-center border-2 border-dashed border-primary rounded-lg z-10"
1301
+ @dragover=${e=>{e.preventDefault(),this.dragOver=!0}}
1302
+ @dragleave=${()=>this.dragOver=!1}
1303
+ @drop=${this.handleDrop}
1304
+ >
1305
+ <schmancy-surface type="surfaceDim" rounded="all" class="p-6 text-center">
1306
+ <schmancy-icon size="48px" class="mb-2">upload</schmancy-icon>
1307
+ <schmancy-typography type="body" token="md">
1308
+ Drop CSV file here
1309
+ </schmancy-typography>
1310
+ </schmancy-surface>
1311
+ </div>
1312
+ `)}
1313
+ `}},y([r.property({type:Boolean})],exports.SchmancyEmailRecipients.prototype,"disabled",2),y([r.property({type:Array})],exports.SchmancyEmailRecipients.prototype,"recipients",2),y([r.property({type:Array})],exports.SchmancyEmailRecipients.prototype,"selectedRecipients",2),y([r.property({type:Boolean})],exports.SchmancyEmailRecipients.prototype,"enableCsvImport",2),y([r.property({type:Boolean})],exports.SchmancyEmailRecipients.prototype,"enableDragDrop",2),y([r.property({type:String})],exports.SchmancyEmailRecipients.prototype,"title",2),y([r.property({type:String})],exports.SchmancyEmailRecipients.prototype,"emptyStateTitle",2),y([r.property({type:String})],exports.SchmancyEmailRecipients.prototype,"emptyStateMessage",2),y([r.property({type:Object})],exports.SchmancyEmailRecipients.prototype,"csvParser",2),y([r.state()],exports.SchmancyEmailRecipients.prototype,"dragOver",2),y([r.state()],exports.SchmancyEmailRecipients.prototype,"localSelectedRecipients",2),y([r.state()],exports.SchmancyEmailRecipients.prototype,"searchQuery",2),y([r.state()],exports.SchmancyEmailRecipients.prototype,"filteredRecipients",2),y([r.state()],exports.SchmancyEmailRecipients.prototype,"boatState",2),exports.SchmancyEmailRecipients=y([r.customElement("schmancy-email-recipients")],exports.SchmancyEmailRecipients);
1314
+ //# sourceMappingURL=email-recipients-B9F9tbTi.cjs.map