@mhmo91/schmancy 0.10.5 → 0.10.7

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 (445) hide show
  1. package/README.md +11 -0
  2. package/custom-elements.json +235 -1807
  3. package/dist/agent/{flow-CaPi2G8y.js.map → flow-CvG1fLW5.js.map} +1 -1
  4. package/dist/agent/schmancy.agent.js +5347 -12408
  5. package/dist/agent/schmancy.agent.js.map +1 -1
  6. package/dist/agent/schmancy.manifest.json +70 -1068
  7. package/dist/agent/{vendor-material-color-Be96dpGE.js.map → vendor-material-color-DcL7ZPxx.js.map} +1 -1
  8. package/dist/{area-CSQdhCBF.cjs → area-8IBAXzbC.cjs} +1 -1
  9. package/dist/{area-CSQdhCBF.cjs.map → area-8IBAXzbC.cjs.map} +1 -1
  10. package/dist/{area-D5haQE-J.js → area-DSW_LYXQ.js} +1 -1
  11. package/dist/{area-D5haQE-J.js.map → area-DSW_LYXQ.js.map} +1 -1
  12. package/dist/area.cjs +1 -1
  13. package/dist/area.js +1 -1
  14. package/dist/{autocomplete-B_bJXUjm.cjs → autocomplete-9PLjlFYt.cjs} +1 -1
  15. package/dist/{autocomplete-B_bJXUjm.cjs.map → autocomplete-9PLjlFYt.cjs.map} +1 -1
  16. package/dist/{autocomplete-DtyjZJ1E.js → autocomplete-CXwwmUbC.js} +2 -2
  17. package/dist/{autocomplete-DtyjZJ1E.js.map → autocomplete-CXwwmUbC.js.map} +1 -1
  18. package/dist/autocomplete.cjs +1 -1
  19. package/dist/autocomplete.js +1 -1
  20. package/dist/avatar.cjs +1 -1
  21. package/dist/avatar.js +2 -2
  22. package/dist/badge.cjs +1 -1
  23. package/dist/badge.js +1 -1
  24. package/dist/{boat-BJLCp-Hv.cjs → boat-CpGNeWav.cjs} +1 -1
  25. package/dist/{boat-BJLCp-Hv.cjs.map → boat-CpGNeWav.cjs.map} +1 -1
  26. package/dist/{boat-MT8bRT8u.js → boat-Dwn5oXd8.js} +1 -1
  27. package/dist/{boat-MT8bRT8u.js.map → boat-Dwn5oXd8.js.map} +1 -1
  28. package/dist/boat.cjs +1 -1
  29. package/dist/boat.js +1 -1
  30. package/dist/breadcrumb.cjs +1 -1
  31. package/dist/breadcrumb.js +1 -1
  32. package/dist/{busy-DSF2E-zy.cjs → busy-CUUgvimY.cjs} +1 -1
  33. package/dist/{busy-DSF2E-zy.cjs.map → busy-CUUgvimY.cjs.map} +1 -1
  34. package/dist/{busy-6BqWGryX.js → busy-Cjm1BYVC.js} +1 -1
  35. package/dist/{busy-6BqWGryX.js.map → busy-Cjm1BYVC.js.map} +1 -1
  36. package/dist/busy.cjs +1 -1
  37. package/dist/busy.js +1 -1
  38. package/dist/button.cjs +1 -1
  39. package/dist/button.js +1 -1
  40. package/dist/{card-CvuVha-W.js → card-BR22oYCL.js} +1 -1
  41. package/dist/{card-CvuVha-W.js.map → card-BR22oYCL.js.map} +1 -1
  42. package/dist/{card-DnKnaHzf.cjs → card-BjZ_WRr3.cjs} +1 -1
  43. package/dist/{card-DnKnaHzf.cjs.map → card-BjZ_WRr3.cjs.map} +1 -1
  44. package/dist/card.cjs +1 -1
  45. package/dist/card.js +1 -1
  46. package/dist/{checkbox-D3u8Wm9r.cjs → checkbox-2e8v7CNg.cjs} +1 -1
  47. package/dist/{checkbox-D3u8Wm9r.cjs.map → checkbox-2e8v7CNg.cjs.map} +1 -1
  48. package/dist/{checkbox-QDRsE8cp.js → checkbox-CsADwyfu.js} +1 -1
  49. package/dist/{checkbox-QDRsE8cp.js.map → checkbox-CsADwyfu.js.map} +1 -1
  50. package/dist/checkbox.cjs +1 -1
  51. package/dist/checkbox.js +1 -1
  52. package/dist/{chips-Dy9vx8JS.js → chips-C9HwVbGT.js} +2 -2
  53. package/dist/{chips-Dy9vx8JS.js.map → chips-C9HwVbGT.js.map} +1 -1
  54. package/dist/{chips-CMoQzop1.cjs → chips-DPCcO55o.cjs} +1 -1
  55. package/dist/{chips-CMoQzop1.cjs.map → chips-DPCcO55o.cjs.map} +1 -1
  56. package/dist/chips.cjs +1 -1
  57. package/dist/chips.js +2 -2
  58. package/dist/connectivity.cjs +1 -1
  59. package/dist/connectivity.js +1 -1
  60. package/dist/content-drawer.cjs +1 -1
  61. package/dist/content-drawer.js +1 -1
  62. package/dist/{date-range-B2NuihKA.cjs → date-range-63-FC7gD.cjs} +1 -1
  63. package/dist/{date-range-B2NuihKA.cjs.map → date-range-63-FC7gD.cjs.map} +1 -1
  64. package/dist/{date-range-Boesjlic.js → date-range-CFaP-8Os.js} +2 -2
  65. package/dist/{date-range-Boesjlic.js.map → date-range-CFaP-8Os.js.map} +1 -1
  66. package/dist/{date-range-inline-DBuND2pc.js → date-range-inline-BCuK_XCv.js} +1 -1
  67. package/dist/{date-range-inline-DBuND2pc.js.map → date-range-inline-BCuK_XCv.js.map} +1 -1
  68. package/dist/{date-range-inline-BI6_4Ahl.cjs → date-range-inline-Cpdqd-8B.cjs} +1 -1
  69. package/dist/{date-range-inline-BI6_4Ahl.cjs.map → date-range-inline-Cpdqd-8B.cjs.map} +1 -1
  70. package/dist/date-range-inline.cjs +1 -1
  71. package/dist/date-range-inline.js +1 -1
  72. package/dist/date-range.cjs +1 -1
  73. package/dist/date-range.js +1 -1
  74. package/dist/delay.cjs +1 -1
  75. package/dist/delay.js +2 -2
  76. package/dist/{details-BrGrUTGC.js → details-0dOlqHHL.js} +1 -1
  77. package/dist/{details-BrGrUTGC.js.map → details-0dOlqHHL.js.map} +1 -1
  78. package/dist/{details-BRs_z5-k.cjs → details-qKikJIyH.cjs} +1 -1
  79. package/dist/{details-BRs_z5-k.cjs.map → details-qKikJIyH.cjs.map} +1 -1
  80. package/dist/details.cjs +1 -1
  81. package/dist/details.js +1 -1
  82. package/dist/{divider-W3TiDasp.js → divider-BxkIl0H1.js} +1 -1
  83. package/dist/{divider-W3TiDasp.js.map → divider-BxkIl0H1.js.map} +1 -1
  84. package/dist/{divider-BOxQ2T9h.cjs → divider-CX9mmWZ8.cjs} +1 -1
  85. package/dist/{divider-BOxQ2T9h.cjs.map → divider-CX9mmWZ8.cjs.map} +1 -1
  86. package/dist/divider.cjs +1 -1
  87. package/dist/divider.js +1 -1
  88. package/dist/dropdown.cjs +1 -1
  89. package/dist/dropdown.js +1 -1
  90. package/dist/{expand-CnccBF91.cjs → expand-891JuQuN.cjs} +1 -1
  91. package/dist/{expand-CnccBF91.cjs.map → expand-891JuQuN.cjs.map} +1 -1
  92. package/dist/{expand-Pu8fZ0jZ.js → expand-BeAx94MP.js} +2 -2
  93. package/dist/{expand-Pu8fZ0jZ.js.map → expand-BeAx94MP.js.map} +1 -1
  94. package/dist/expand.cjs +1 -1
  95. package/dist/expand.js +1 -1
  96. package/dist/{float-WCVdp3um.js → float-BPF2WO4L.js} +1 -1
  97. package/dist/{float-WCVdp3um.js.map → float-BPF2WO4L.js.map} +1 -1
  98. package/dist/{float-BRKa-P6Z.cjs → float-D7vvODxx.cjs} +1 -1
  99. package/dist/{float-BRKa-P6Z.cjs.map → float-D7vvODxx.cjs.map} +1 -1
  100. package/dist/float.cjs +1 -1
  101. package/dist/float.js +1 -1
  102. package/dist/{form-CI59gad4.js.map → form-CFvwnfuJ.js.map} +1 -1
  103. package/dist/{form-B2qudx_q.cjs.map → form-Ceijw1aA.cjs.map} +1 -1
  104. package/dist/form.cjs +1 -1
  105. package/dist/form.js +1 -1
  106. package/dist/handover/agent-runtime-followups.md +1 -1
  107. package/dist/handover/agent-runtime-v1.md +3 -3
  108. package/dist/{hashContent-a8uVr3xs.js.map → hashContent-BU6jl5ih.js.map} +1 -1
  109. package/dist/{hashContent-ejkBgDnN.cjs.map → hashContent-Bobsobip.cjs.map} +1 -1
  110. package/dist/{icons-C0ufCcdp.js → icons-BKxW_7QR.js} +1 -1
  111. package/dist/{icons-C0ufCcdp.js.map → icons-BKxW_7QR.js.map} +1 -1
  112. package/dist/{icons-DXEbmg-O.cjs → icons-QSdo-8h9.cjs} +1 -1
  113. package/dist/{icons-DXEbmg-O.cjs.map → icons-QSdo-8h9.cjs.map} +1 -1
  114. package/dist/icons.cjs +1 -1
  115. package/dist/icons.js +1 -1
  116. package/dist/{iframe-c9lGxw7x.js → iframe-BxvbhyTS.js} +1 -1
  117. package/dist/{iframe-c9lGxw7x.js.map → iframe-BxvbhyTS.js.map} +1 -1
  118. package/dist/{iframe-C6RVODkW.cjs → iframe-CMKV-bm8.cjs} +1 -1
  119. package/dist/{iframe-C6RVODkW.cjs.map → iframe-CMKV-bm8.cjs.map} +1 -1
  120. package/dist/iframe.cjs +1 -1
  121. package/dist/iframe.js +1 -1
  122. package/dist/index.cjs +1 -1
  123. package/dist/index.js +64 -72
  124. package/dist/{input-B4HM-9-H.cjs → input-BFhJU74_.cjs} +1 -1
  125. package/dist/{input-B4HM-9-H.cjs.map → input-BFhJU74_.cjs.map} +1 -1
  126. package/dist/{input-Pmj_bH37.js → input-DIqaR8Mr.js} +1 -1
  127. package/dist/{input-Pmj_bH37.js.map → input-DIqaR8Mr.js.map} +1 -1
  128. package/dist/{input-chip-BIGgd_7w.js → input-chip-D9tlSk_2.js} +1 -1
  129. package/dist/{input-chip-BIGgd_7w.js.map → input-chip-D9tlSk_2.js.map} +1 -1
  130. package/dist/{input-chip-BoDisY6c.cjs → input-chip-w09qTt7J.cjs} +1 -1
  131. package/dist/{input-chip-BoDisY6c.cjs.map → input-chip-w09qTt7J.cjs.map} +1 -1
  132. package/dist/input.cjs +1 -1
  133. package/dist/input.js +1 -1
  134. package/dist/json.cjs +1 -1
  135. package/dist/json.js +2 -2
  136. package/dist/kbd.cjs +1 -1
  137. package/dist/kbd.js +1 -1
  138. package/dist/layout.cjs +1 -1
  139. package/dist/layout.js +1 -1
  140. package/dist/{lightbox-DK1vDKm3.cjs → lightbox-CK035jsx.cjs} +1 -1
  141. package/dist/{lightbox-DK1vDKm3.cjs.map → lightbox-CK035jsx.cjs.map} +1 -1
  142. package/dist/{lightbox-K1eJTYXP.js → lightbox-GChmL3Ff.js} +2 -2
  143. package/dist/{lightbox-K1eJTYXP.js.map → lightbox-GChmL3Ff.js.map} +1 -1
  144. package/dist/lightbox.cjs +1 -1
  145. package/dist/lightbox.js +1 -1
  146. package/dist/{list-CEuVqAxN.cjs → list-B3P37zlH.cjs} +1 -1
  147. package/dist/{list-CEuVqAxN.cjs.map → list-B3P37zlH.cjs.map} +1 -1
  148. package/dist/{list-Ds0Nv1y5.js → list-J-Fz24Z1.js} +1 -1
  149. package/dist/{list-Ds0Nv1y5.js.map → list-J-Fz24Z1.js.map} +1 -1
  150. package/dist/list.cjs +1 -1
  151. package/dist/list.js +1 -1
  152. package/dist/{menu-Bly30Nje.cjs → menu-BnFd8CwU.cjs} +1 -1
  153. package/dist/{menu-Bly30Nje.cjs.map → menu-BnFd8CwU.cjs.map} +1 -1
  154. package/dist/{menu-L8MK1ma5.js → menu-DHTlUwXS.js} +2 -2
  155. package/dist/{menu-L8MK1ma5.js.map → menu-DHTlUwXS.js.map} +1 -1
  156. package/dist/menu.cjs +1 -1
  157. package/dist/menu.js +1 -1
  158. package/dist/mixins-47_CZk7q.cjs +298 -0
  159. package/dist/{mixins-CAb0b03r.cjs.map → mixins-47_CZk7q.cjs.map} +1 -1
  160. package/dist/mixins-PBJJGiiP.js +627 -0
  161. package/dist/{mixins-B34UxxCe.js.map → mixins-PBJJGiiP.js.map} +1 -1
  162. package/dist/mixins.cjs +1 -1
  163. package/dist/mixins.js +1 -1
  164. package/dist/nav-drawer.cjs +1 -1
  165. package/dist/nav-drawer.js +1 -1
  166. package/dist/navigation-bar.cjs +1 -1
  167. package/dist/navigation-bar.js +1 -1
  168. package/dist/navigation-rail.cjs +1 -1
  169. package/dist/navigation-rail.js +1 -1
  170. package/dist/{notification-7fSbk8hm.cjs → notification-B6YBL0hx.cjs} +1 -1
  171. package/dist/{notification-7fSbk8hm.cjs.map → notification-B6YBL0hx.cjs.map} +1 -1
  172. package/dist/{notification-DB25M-qo.js → notification-C-5Bv3vj.js} +2 -2
  173. package/dist/{notification-DB25M-qo.js.map → notification-C-5Bv3vj.js.map} +1 -1
  174. package/dist/notification.cjs +1 -1
  175. package/dist/notification.js +1 -1
  176. package/dist/{option-DDHa25k5.js → option-B7q6VXCu.js} +1 -1
  177. package/dist/{option-DDHa25k5.js.map → option-B7q6VXCu.js.map} +1 -1
  178. package/dist/{option-HF9Xqbuq.cjs → option-DVQRa3nr.cjs} +1 -1
  179. package/dist/{option-HF9Xqbuq.cjs.map → option-DVQRa3nr.cjs.map} +1 -1
  180. package/dist/option.cjs +1 -1
  181. package/dist/option.js +1 -1
  182. package/dist/{overlay-stack-CCiTaf_C.js.map → overlay-stack-DCDS17uj.js.map} +1 -1
  183. package/dist/{overlay-stack-CFGiYf34.cjs.map → overlay-stack-DPIe_aYv.cjs.map} +1 -1
  184. package/dist/overlay.cjs +1 -1
  185. package/dist/{overlay.confirm-body-BDG94R0x.js → overlay.confirm-body-CAY5xK1n.js} +1 -1
  186. package/dist/{overlay.confirm-body-BDG94R0x.js.map → overlay.confirm-body-CAY5xK1n.js.map} +1 -1
  187. package/dist/{overlay.confirm-body-b4Nx_OVf.cjs → overlay.confirm-body-XZtErofy.cjs} +1 -1
  188. package/dist/{overlay.confirm-body-b4Nx_OVf.cjs.map → overlay.confirm-body-XZtErofy.cjs.map} +1 -1
  189. package/dist/overlay.js +3 -3
  190. package/dist/{overlay.service-BUCuZa6V.js → overlay.service-BZE_lwKO.js} +2 -2
  191. package/dist/{overlay.service-BUCuZa6V.js.map → overlay.service-BZE_lwKO.js.map} +1 -1
  192. package/dist/{overlay.service-CRHZZY9F.cjs → overlay.service-Oyjrw831.cjs} +1 -1
  193. package/dist/{overlay.service-CRHZZY9F.cjs.map → overlay.service-Oyjrw831.cjs.map} +1 -1
  194. package/dist/page.cjs +1 -1
  195. package/dist/page.js +2 -2
  196. package/dist/{progress-CqOyMM4i.js → progress-BHXLYs9i.js} +1 -1
  197. package/dist/{progress-CqOyMM4i.js.map → progress-BHXLYs9i.js.map} +1 -1
  198. package/dist/{progress-54R4QRgW.cjs → progress-D99bumkC.cjs} +1 -1
  199. package/dist/{progress-54R4QRgW.cjs.map → progress-D99bumkC.cjs.map} +1 -1
  200. package/dist/progress.cjs +1 -1
  201. package/dist/progress.js +1 -1
  202. package/dist/{radio-group-B4zbBIZF.js → radio-group-BYra5_q1.js} +1 -1
  203. package/dist/{radio-group-B4zbBIZF.js.map → radio-group-BYra5_q1.js.map} +1 -1
  204. package/dist/{radio-group-BJqZpYVy.cjs → radio-group-DYsycLmD.cjs} +1 -1
  205. package/dist/{radio-group-BJqZpYVy.cjs.map → radio-group-DYsycLmD.cjs.map} +1 -1
  206. package/dist/radio-group.cjs +1 -1
  207. package/dist/radio-group.js +1 -1
  208. package/dist/range.cjs +1 -1
  209. package/dist/range.js +1 -1
  210. package/dist/{rxjs-utils-BXpvHN4-.js.map → rxjs-utils-CVeJQ9KG.js.map} +1 -1
  211. package/dist/{rxjs-utils-CaC-tdot.cjs.map → rxjs-utils-DCUHg_Ml.cjs.map} +1 -1
  212. package/dist/rxjs-utils.cjs +1 -1
  213. package/dist/rxjs-utils.js +1 -1
  214. package/dist/{scroll-CYm6Krus.js → scroll-TqNWZ0lo.js} +1 -1
  215. package/dist/{scroll-CYm6Krus.js.map → scroll-TqNWZ0lo.js.map} +1 -1
  216. package/dist/{scroll-iSRovYYt.cjs → scroll-cayCBOrq.cjs} +1 -1
  217. package/dist/{scroll-iSRovYYt.cjs.map → scroll-cayCBOrq.cjs.map} +1 -1
  218. package/dist/{select-DiQHtQJN.cjs → select-CRdSmlLq.cjs} +1 -1
  219. package/dist/{select-DiQHtQJN.cjs.map → select-CRdSmlLq.cjs.map} +1 -1
  220. package/dist/{select-1WHseXP6.js → select-nzq0qFlF.js} +2 -2
  221. package/dist/{select-1WHseXP6.js.map → select-nzq0qFlF.js.map} +1 -1
  222. package/dist/select.cjs +1 -1
  223. package/dist/select.js +1 -1
  224. package/dist/skeleton.cjs +1 -1
  225. package/dist/skeleton.js +1 -1
  226. package/dist/skills/INDEX.md +9 -6
  227. package/dist/skills/schmancy/INDEX.md +9 -6
  228. package/dist/slider.cjs +1 -1
  229. package/dist/slider.js +1 -1
  230. package/dist/{splash-screen-BwvtKMdN.js → splash-screen-BJeIiJ_e.js} +1 -1
  231. package/dist/{splash-screen-BwvtKMdN.js.map → splash-screen-BJeIiJ_e.js.map} +1 -1
  232. package/dist/{splash-screen-CJL8DGDe.cjs → splash-screen-BMLQXzDq.cjs} +1 -1
  233. package/dist/{splash-screen-CJL8DGDe.cjs.map → splash-screen-BMLQXzDq.cjs.map} +1 -1
  234. package/dist/splash-screen.cjs +1 -1
  235. package/dist/splash-screen.js +1 -1
  236. package/dist/{src-Bwr2NR0A.cjs → src-DE11tq2Q.cjs} +1 -1
  237. package/dist/{src-Bwr2NR0A.cjs.map → src-DE11tq2Q.cjs.map} +1 -1
  238. package/dist/{src-UaZeROcW.js → src-qvWlNoMO.js} +34 -42
  239. package/dist/{src-UaZeROcW.js.map → src-qvWlNoMO.js.map} +1 -1
  240. package/dist/steps.cjs +1 -1
  241. package/dist/steps.js +1 -1
  242. package/dist/{surface-DE5iuI8e.cjs → surface-D426MFLR.cjs} +1 -1
  243. package/dist/{surface-DE5iuI8e.cjs.map → surface-D426MFLR.cjs.map} +1 -1
  244. package/dist/{surface-DPUkQ3OL.js → surface-DG7Cmm9V.js} +1 -1
  245. package/dist/{surface-DPUkQ3OL.js.map → surface-DG7Cmm9V.js.map} +1 -1
  246. package/dist/surface.cjs +1 -1
  247. package/dist/surface.js +1 -1
  248. package/dist/switch.cjs +1 -1
  249. package/dist/switch.js +1 -1
  250. package/dist/table.cjs +1 -1
  251. package/dist/table.js +1 -1
  252. package/dist/{tabs-B2XEQPQl.js → tabs-B7siJkM5.js} +1 -1
  253. package/dist/{tabs-B2XEQPQl.js.map → tabs-B7siJkM5.js.map} +1 -1
  254. package/dist/{tabs-CsDQ72Qk.cjs → tabs-t3nMfg1F.cjs} +1 -1
  255. package/dist/{tabs-CsDQ72Qk.cjs.map → tabs-t3nMfg1F.cjs.map} +1 -1
  256. package/dist/tabs.cjs +1 -1
  257. package/dist/tabs.js +1 -1
  258. package/dist/teleport.cjs +1 -1
  259. package/dist/teleport.js +1 -1
  260. package/dist/{textarea-C_ps0lL-.js → textarea-DSxHCCle.js} +1 -1
  261. package/dist/{textarea-C_ps0lL-.js.map → textarea-DSxHCCle.js.map} +1 -1
  262. package/dist/{textarea-aeAP9cDG.cjs → textarea-o9vysorM.cjs} +1 -1
  263. package/dist/{textarea-aeAP9cDG.cjs.map → textarea-o9vysorM.cjs.map} +1 -1
  264. package/dist/textarea.cjs +1 -1
  265. package/dist/textarea.js +1 -1
  266. package/dist/{theme-DAYTVw13.cjs → theme-Ce9eIP05.cjs} +1 -1
  267. package/dist/{theme-DAYTVw13.cjs.map → theme-Ce9eIP05.cjs.map} +1 -1
  268. package/dist/{theme-DAx1iRNr.js → theme-XO3nHDbW.js} +2 -2
  269. package/dist/{theme-DAx1iRNr.js.map → theme-XO3nHDbW.js.map} +1 -1
  270. package/dist/{theme-button-BrHkzCtj.js → theme-button-DNutDO1j.js} +1 -1
  271. package/dist/{theme-button-BrHkzCtj.js.map → theme-button-DNutDO1j.js.map} +1 -1
  272. package/dist/{theme-button-LsMKY_N_.cjs → theme-button-H7PRz_bg.cjs} +1 -1
  273. package/dist/{theme-button-LsMKY_N_.cjs.map → theme-button-H7PRz_bg.cjs.map} +1 -1
  274. package/dist/theme-button.cjs +1 -1
  275. package/dist/theme-button.js +1 -1
  276. package/dist/theme.cjs +1 -1
  277. package/dist/{theme.interface-C_034TxG.js.map → theme.interface-B9TjbSBF.js.map} +1 -1
  278. package/dist/{theme.interface-DESopuZS.cjs.map → theme.interface-BujperTo.cjs.map} +1 -1
  279. package/dist/theme.js +3 -3
  280. package/dist/tree.cjs +1 -1
  281. package/dist/tree.js +1 -1
  282. package/dist/typography.cjs +1 -1
  283. package/dist/typography.js +1 -1
  284. package/dist/{utils-oLBkMvor.cjs → utils-Dt5PpmaQ.cjs} +1 -1
  285. package/dist/{utils-oLBkMvor.cjs.map → utils-Dt5PpmaQ.cjs.map} +1 -1
  286. package/dist/{utils-BzFQfaIr.js → utils-kND2Z9Xg.js} +1 -1
  287. package/dist/{utils-BzFQfaIr.js.map → utils-kND2Z9Xg.js.map} +1 -1
  288. package/dist/utils.cjs +1 -1
  289. package/dist/utils.js +2 -2
  290. package/dist/visually-hidden.cjs +1 -1
  291. package/dist/visually-hidden.js +1 -1
  292. package/dist/{window-BJrKS6Zr.cjs → window-BaoSwgGE.cjs} +1 -1
  293. package/dist/{window-BJrKS6Zr.cjs.map → window-BaoSwgGE.cjs.map} +1 -1
  294. package/dist/{window-CyDuTN80.js → window-KnLWhQ3S.js} +2 -2
  295. package/dist/{window-CyDuTN80.js.map → window-KnLWhQ3S.js.map} +1 -1
  296. package/dist/window.cjs +1 -1
  297. package/dist/window.js +1 -1
  298. package/package.json +4 -5
  299. package/skills/schmancy/INDEX.md +9 -6
  300. package/src/index.ts +0 -8
  301. package/types/src/index.d.ts +0 -8
  302. package/dist/agent/vendor-highlight-CHJZQQB7.js +0 -2178
  303. package/dist/agent/vendor-highlight-CHJZQQB7.js.map +0 -1
  304. package/dist/agent/vendor-jsqr-r7GNh4P3.js +0 -10212
  305. package/dist/agent/vendor-jsqr-r7GNh4P3.js.map +0 -1
  306. package/dist/charts.cjs +0 -112
  307. package/dist/charts.cjs.map +0 -1
  308. package/dist/charts.js +0 -374
  309. package/dist/charts.js.map +0 -1
  310. package/dist/code-highlight-Ddp0oZnm.cjs +0 -190
  311. package/dist/code-highlight-Ddp0oZnm.cjs.map +0 -1
  312. package/dist/code-highlight-DtE2-ObF.js +0 -296
  313. package/dist/code-highlight-DtE2-ObF.js.map +0 -1
  314. package/dist/code-highlight.cjs +0 -1
  315. package/dist/code-highlight.js +0 -2
  316. package/dist/extra-B8IPs6gG.cjs +0 -31
  317. package/dist/extra-B8IPs6gG.cjs.map +0 -1
  318. package/dist/extra-DxEWs41z.js +0 -3440
  319. package/dist/extra-DxEWs41z.js.map +0 -1
  320. package/dist/extra.cjs +0 -1
  321. package/dist/extra.js +0 -2
  322. package/dist/mailbox-CDWqbVvZ.cjs +0 -1140
  323. package/dist/mailbox-CDWqbVvZ.cjs.map +0 -1
  324. package/dist/mailbox-DD2How0H.js +0 -1607
  325. package/dist/mailbox-DD2How0H.js.map +0 -1
  326. package/dist/mailbox.cjs +0 -1
  327. package/dist/mailbox.js +0 -2
  328. package/dist/map-1uwxxvBa.js +0 -208
  329. package/dist/map-1uwxxvBa.js.map +0 -1
  330. package/dist/map-BrBSrIqg.cjs +0 -80
  331. package/dist/map-BrBSrIqg.cjs.map +0 -1
  332. package/dist/map.cjs +0 -1
  333. package/dist/map.js +0 -2
  334. package/dist/mixins-B34UxxCe.js +0 -627
  335. package/dist/mixins-CAb0b03r.cjs +0 -298
  336. package/dist/payment-card-form-C4jb-OdM.js +0 -729
  337. package/dist/payment-card-form-C4jb-OdM.js.map +0 -1
  338. package/dist/payment-card-form-WEx4CscR.cjs +0 -73
  339. package/dist/payment-card-form-WEx4CscR.cjs.map +0 -1
  340. package/dist/payment-card-form.cjs +0 -1
  341. package/dist/payment-card-form.js +0 -2
  342. package/dist/qr-scanner.cjs +0 -35
  343. package/dist/qr-scanner.cjs.map +0 -1
  344. package/dist/qr-scanner.js +0 -123
  345. package/dist/qr-scanner.js.map +0 -1
  346. package/dist/skills/charts.md +0 -93
  347. package/dist/skills/code-highlight.md +0 -47
  348. package/dist/skills/extra.md +0 -59
  349. package/dist/skills/mailbox.md +0 -102
  350. package/dist/skills/map.md +0 -55
  351. package/dist/skills/qr-scanner.md +0 -51
  352. package/dist/skills/schmancy/charts.md +0 -93
  353. package/dist/skills/schmancy/code-highlight.md +0 -47
  354. package/dist/skills/schmancy/extra.md +0 -59
  355. package/dist/skills/schmancy/mailbox.md +0 -102
  356. package/dist/skills/schmancy/map.md +0 -55
  357. package/dist/skills/schmancy/qr-scanner.md +0 -51
  358. package/dist/skills/schmancy/timeline-tile.md +0 -95
  359. package/dist/skills/timeline-tile.md +0 -95
  360. package/dist/timeline.cjs +0 -277
  361. package/dist/timeline.cjs.map +0 -1
  362. package/dist/timeline.js +0 -326
  363. package/dist/timeline.js.map +0 -1
  364. package/skills/schmancy/charts.md +0 -93
  365. package/skills/schmancy/code-highlight.md +0 -47
  366. package/skills/schmancy/extra.md +0 -59
  367. package/skills/schmancy/mailbox.md +0 -102
  368. package/skills/schmancy/map.md +0 -55
  369. package/skills/schmancy/qr-scanner.md +0 -51
  370. package/skills/schmancy/timeline-tile.md +0 -95
  371. package/src/charts/area-chart.ts +0 -498
  372. package/src/charts/index.ts +0 -4
  373. package/src/charts/pills.ts +0 -352
  374. package/src/charts/types.ts +0 -66
  375. package/src/charts/utils.ts +0 -65
  376. package/src/code-highlight/code-highlight.ts +0 -345
  377. package/src/code-highlight/code-preview.ts +0 -125
  378. package/src/code-highlight/index.ts +0 -3
  379. package/src/extra/countries/countries.data.ts +0 -196
  380. package/src/extra/countries/countries.ts +0 -109
  381. package/src/extra/countries/index.ts +0 -2
  382. package/src/extra/index.ts +0 -2
  383. package/src/extra/timezone/index.ts +0 -2
  384. package/src/extra/timezone/timezone.ts +0 -118
  385. package/src/extra/timezone/timezones.data.ts +0 -2546
  386. package/src/mailbox/README.md +0 -128
  387. package/src/mailbox/email-editor.ts +0 -1076
  388. package/src/mailbox/email-layout-selector.ts +0 -58
  389. package/src/mailbox/email-recipients.ts +0 -599
  390. package/src/mailbox/email-template-picker.ts +0 -303
  391. package/src/mailbox/email-viewer.ts +0 -717
  392. package/src/mailbox/index.ts +0 -31
  393. package/src/mailbox/mailbox.ts +0 -364
  394. package/src/mailbox/types.ts +0 -180
  395. package/src/map/index.ts +0 -1
  396. package/src/map/map.ts +0 -485
  397. package/src/payment-card-form/index.ts +0 -1
  398. package/src/payment-card-form/payment-card-form.ts +0 -331
  399. package/src/qr-scanner/index.ts +0 -1
  400. package/src/qr-scanner/qr-scanner.ts +0 -242
  401. package/src/timeline/index.ts +0 -1
  402. package/src/timeline/timeline-tile.ts +0 -431
  403. package/types/src/charts/area-chart.d.ts +0 -58
  404. package/types/src/charts/index.d.ts +0 -4
  405. package/types/src/charts/pills.d.ts +0 -51
  406. package/types/src/charts/types.d.ts +0 -62
  407. package/types/src/charts/utils.d.ts +0 -28
  408. package/types/src/code-highlight/code-highlight.d.ts +0 -49
  409. package/types/src/code-highlight/code-preview.d.ts +0 -30
  410. package/types/src/code-highlight/index.d.ts +0 -3
  411. package/types/src/extra/countries/countries.d.ts +0 -26
  412. package/types/src/extra/countries/countries.data.d.ts +0 -5
  413. package/types/src/extra/countries/index.d.ts +0 -2
  414. package/types/src/extra/index.d.ts +0 -2
  415. package/types/src/extra/timezone/index.d.ts +0 -2
  416. package/types/src/extra/timezone/timezone.d.ts +0 -34
  417. package/types/src/extra/timezone/timezones.data.d.ts +0 -7
  418. package/types/src/mailbox/email-editor.d.ts +0 -101
  419. package/types/src/mailbox/email-layout-selector.d.ts +0 -18
  420. package/types/src/mailbox/email-recipients.d.ts +0 -122
  421. package/types/src/mailbox/email-template-picker.d.ts +0 -54
  422. package/types/src/mailbox/email-viewer.d.ts +0 -86
  423. package/types/src/mailbox/index.d.ts +0 -12
  424. package/types/src/mailbox/mailbox.d.ts +0 -82
  425. package/types/src/mailbox/types.d.ts +0 -176
  426. package/types/src/map/index.d.ts +0 -1
  427. package/types/src/map/map.d.ts +0 -130
  428. package/types/src/payment-card-form/index.d.ts +0 -1
  429. package/types/src/payment-card-form/payment-card-form.d.ts +0 -85
  430. package/types/src/qr-scanner/index.d.ts +0 -1
  431. package/types/src/qr-scanner/qr-scanner.d.ts +0 -26
  432. package/types/src/timeline/index.d.ts +0 -1
  433. package/types/src/timeline/timeline-tile.d.ts +0 -44
  434. /package/dist/agent/{flow-CaPi2G8y.js → flow-CvG1fLW5.js} +0 -0
  435. /package/dist/agent/{vendor-material-color-Be96dpGE.js → vendor-material-color-DcL7ZPxx.js} +0 -0
  436. /package/dist/{form-CI59gad4.js → form-CFvwnfuJ.js} +0 -0
  437. /package/dist/{form-B2qudx_q.cjs → form-Ceijw1aA.cjs} +0 -0
  438. /package/dist/{hashContent-a8uVr3xs.js → hashContent-BU6jl5ih.js} +0 -0
  439. /package/dist/{hashContent-ejkBgDnN.cjs → hashContent-Bobsobip.cjs} +0 -0
  440. /package/dist/{overlay-stack-CCiTaf_C.js → overlay-stack-DCDS17uj.js} +0 -0
  441. /package/dist/{overlay-stack-CFGiYf34.cjs → overlay-stack-DPIe_aYv.cjs} +0 -0
  442. /package/dist/{rxjs-utils-BXpvHN4-.js → rxjs-utils-CVeJQ9KG.js} +0 -0
  443. /package/dist/{rxjs-utils-CaC-tdot.cjs → rxjs-utils-DCUHg_Ml.cjs} +0 -0
  444. /package/dist/{theme.interface-C_034TxG.js → theme.interface-B9TjbSBF.js} +0 -0
  445. /package/dist/{theme.interface-DESopuZS.cjs → theme.interface-BujperTo.cjs} +0 -0
@@ -1,717 +0,0 @@
1
- import { SchmancyElement } from '@mixins/index'
2
- import { css, html } from 'lit'
3
- import { customElement, property, state } from 'lit/decorators.js'
4
- import { repeat } from 'lit/directives/repeat.js'
5
- import { when } from 'lit/directives/when.js'
6
- import type { EmailAttachment, EmailPreviewMode } from './types'
7
-
8
- /**
9
- * Email viewer component showing formatted HTML and plain text versions
10
- *
11
- * Features:
12
- * - HTML and plain text preview modes
13
- * - Email client-compatible styling
14
- * - Layout parsing (columns, sidebars, image rows)
15
- * - Markdown to HTML conversion
16
- * - Attachment display
17
- * - Email header simulation
18
- * - Character/word statistics
19
- *
20
- * @example
21
- * ```html
22
- * <schmancy-email-viewer
23
- * subject="Welcome!"
24
- * body="**Hello** world"
25
- * .attachments=${attachments}
26
- * .recipients=${['user@example.com']}
27
- * ></schmancy-email-viewer>
28
- * ```
29
- */
30
- @customElement('schmancy-email-viewer')
31
- export class SchmancyEmailViewer extends SchmancyElement {
32
- static styles = [css`
33
- :host {
34
- display: block;
35
- }
36
- `]
37
-
38
- /** Email subject */
39
- @property({ type: String }) subject = ''
40
-
41
- /** Email body content (markdown) */
42
- @property({ type: String }) body = ''
43
-
44
- /** Email attachments */
45
- @property({ type: Array }) attachments: EmailAttachment[] = []
46
-
47
- /** Selected recipients for preview */
48
- @property({ type: Array }) recipients: string[] = []
49
-
50
- /** From address for preview */
51
- @property({ type: String }) fromAddress = 'sender@example.com'
52
-
53
- /** To address for preview (uses first recipient if not provided) */
54
- @property({ type: String }) toAddress = 'recipient@example.com'
55
-
56
- /** Current view mode */
57
- @state() private viewMode: EmailPreviewMode = 'html'
58
-
59
- /**
60
- * Parse layout blocks (:::layout type) and convert to email-safe table layouts
61
- */
62
- private parseLayoutBlocks(text: string): string {
63
- // Match layout blocks: :::layout type\n...content...\n:::
64
- return text.replace(/:::layout\s+([a-zA-Z0-9-]+)\n([\s\S]*?)\n:::/g, (_, layoutType, content) => {
65
- switch (layoutType) {
66
- case 'columns-2':
67
- return this.parseColumnsLayout(content, 2)
68
- case 'columns-3':
69
- return this.parseColumnsLayout(content, 3)
70
- case 'sidebar-left':
71
- return this.parseSidebarLayout(content, 'left')
72
- case 'sidebar-right':
73
- return this.parseSidebarLayout(content, 'right')
74
- case 'image-row':
75
- return this.parseImageRowLayout(content)
76
- default:
77
- // Unknown layout type, return content as-is
78
- return content
79
- }
80
- })
81
- }
82
-
83
- /**
84
- * Parse columns layout (2 or 3 columns)
85
- */
86
- private parseColumnsLayout(content: string, columnCount: number): string {
87
- // Extract column content using regex to find <div class="column">...</div>
88
- const columnRegex = /<div class="column">([\s\S]*?)<\/div>/g
89
- const columns: string[] = []
90
- let match: RegExpExecArray | null
91
-
92
- while ((match = columnRegex.exec(content)) !== null) {
93
- columns.push(match[1].trim())
94
- }
95
-
96
- if (columns.length === 0) {
97
- return content // No columns found, return as-is
98
- }
99
-
100
- // Calculate column width percentage
101
- const columnWidth = Math.floor(100 / columnCount)
102
- const cellPadding = '0 10px 0 0' // Right padding except last column
103
-
104
- // Build table with columns
105
- let tableRows = '<tr>'
106
-
107
- for (let i = 0; i < columnCount && i < columns.length; i++) {
108
- const isLastColumn = i === columnCount - 1
109
- const padding = isLastColumn ? '0' : cellPadding
110
-
111
- // Parse markdown within column content
112
- const parsedContent = this.parseBasicMarkdown(columns[i])
113
-
114
- tableRows += `
115
- <td width="${columnWidth}%" style="padding: ${padding}; vertical-align: top; font-family: Arial, Helvetica, sans-serif; font-size: 14px; line-height: 1.6; color: #333333;">
116
- ${parsedContent}
117
- </td>`
118
- }
119
-
120
- // Fill empty columns if needed
121
- for (let i = columns.length; i < columnCount; i++) {
122
- const isLastColumn = i === columnCount - 1
123
- const padding = isLastColumn ? '0' : cellPadding
124
-
125
- tableRows += `
126
- <td width="${columnWidth}%" style="padding: ${padding}; vertical-align: top;">
127
- &nbsp;
128
- </td>`
129
- }
130
-
131
- tableRows += '</tr>'
132
-
133
- return `
134
- <table cellpadding="0" cellspacing="0" border="0" width="100%" style="margin: 16px 0;">
135
- ${tableRows}
136
- </table>`
137
- }
138
-
139
- /**
140
- * Parse sidebar layout (left or right sidebar)
141
- */
142
- private parseSidebarLayout(content: string, side: 'left' | 'right'): string {
143
- // Extract sidebar and main content
144
- const sidebarMatch = content.match(/<div class="sidebar">([\s\S]*?)<\/div>/)
145
- const mainMatch = content.match(/<div class="main">([\s\S]*?)<\/div>/)
146
-
147
- if (!sidebarMatch || !mainMatch) {
148
- return content // Invalid structure, return as-is
149
- }
150
-
151
- const sidebarContent = this.parseBasicMarkdown(sidebarMatch[1].trim())
152
- const mainContent = this.parseBasicMarkdown(mainMatch[1].trim())
153
-
154
- const sidebarCell = `
155
- <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;">
156
- ${sidebarContent}
157
- </td>`
158
-
159
- const mainCell = `
160
- <td width="70%" style="padding: 0; vertical-align: top; font-family: Arial, Helvetica, sans-serif; font-size: 14px; line-height: 1.6; color: #333333;">
161
- ${mainContent}
162
- </td>`
163
-
164
- const tableRow = side === 'left' ?
165
- `<tr>${sidebarCell}${mainCell}</tr>` :
166
- `<tr>${mainCell}${sidebarCell.replace('0 16px 0 0', '0 0 0 16px')}</tr>`
167
-
168
- return `
169
- <table cellpadding="0" cellspacing="0" border="0" width="100%" style="margin: 16px 0;">
170
- ${tableRow}
171
- </table>`
172
- }
173
-
174
- /**
175
- * Parse image row layout
176
- */
177
- private parseImageRowLayout(content: string): string {
178
- // Extract images using regex to find <div class="image">...</div>
179
- const imageRegex = /<div class="image">([\s\S]*?)<\/div>/g
180
- const images: string[] = []
181
- let match: RegExpExecArray | null
182
-
183
- while ((match = imageRegex.exec(content)) !== null) {
184
- const imageContent = match[1].trim()
185
- // Extract image markdown ![alt](src)
186
- const imgMatch = imageContent.match(/!\[([^\]]*)\]\(([^)]+)\)/)
187
- if (imgMatch) {
188
- const [, alt, src] = imgMatch
189
- images.push(`<img src="${src}" alt="${alt || 'Image'}" style="display: block; max-width: 100%; height: auto;" border="0">`)
190
- }
191
- }
192
-
193
- if (images.length === 0) {
194
- return content // No images found, return as-is
195
- }
196
-
197
- // Calculate image width percentage
198
- const imageWidth = Math.floor(100 / images.length)
199
- const cellPadding = '0 8px 0 0' // Right padding except last image
200
-
201
- // Build table with images
202
- let tableRow = '<tr>'
203
-
204
- images.forEach((image, index) => {
205
- const isLastImage = index === images.length - 1
206
- const padding = isLastImage ? '0' : cellPadding
207
-
208
- tableRow += `
209
- <td width="${imageWidth}%" style="padding: ${padding}; vertical-align: top; text-align: center;">
210
- ${image}
211
- </td>`
212
- })
213
-
214
- tableRow += '</tr>'
215
-
216
- return `
217
- <table cellpadding="0" cellspacing="0" border="0" width="100%" style="margin: 16px 0;">
218
- ${tableRow}
219
- </table>`
220
- }
221
-
222
- /**
223
- * Parse image attributes from markdown syntax
224
- */
225
- private parseImageAttributes(attributeString: string): {
226
- width?: string;
227
- height?: string;
228
- cover?: boolean;
229
- contain?: boolean;
230
- } {
231
- const attributes: { width?: string; height?: string; cover?: boolean; contain?: boolean } = {}
232
-
233
- if (!attributeString) return attributes
234
-
235
- // Parse width=value
236
- const widthMatch = attributeString.match(/width=([^\s}]+)/)
237
- if (widthMatch) {
238
- attributes.width = widthMatch[1]
239
- }
240
-
241
- // Parse height=value
242
- const heightMatch = attributeString.match(/height=([^\s}]+)/)
243
- if (heightMatch) {
244
- attributes.height = heightMatch[1]
245
- }
246
-
247
- // Parse cover/contain flags
248
- if (attributeString.includes('cover')) {
249
- attributes.cover = true
250
- }
251
- if (attributeString.includes('contain')) {
252
- attributes.contain = true
253
- }
254
-
255
- return attributes
256
- }
257
-
258
- /**
259
- * Generate email-safe image styles based on attributes
260
- */
261
- private generateImageStyles(attributes: {
262
- width?: string;
263
- height?: string;
264
- cover?: boolean;
265
- contain?: boolean;
266
- }, inColumn: boolean = false): { imgStyle: string; imgWidth?: string; imgHeight?: string } {
267
- let imgStyle = 'display: block; margin: 8px 0; border: 0;'
268
- let imgWidth: string | undefined
269
- let imgHeight: string | undefined
270
-
271
- // Handle width
272
- if (attributes.width) {
273
- if (attributes.width === 'auto') {
274
- // Natural width - but constrain in columns
275
- if (inColumn) {
276
- imgStyle += ' max-width: 100%; height: auto;'
277
- } else {
278
- imgStyle += ' height: auto;'
279
- }
280
- } else if (attributes.width.endsWith('%')) {
281
- // Percentage width
282
- imgStyle += ` width: ${attributes.width}; max-width: 100%;`
283
- if (!attributes.height) {
284
- imgStyle += ' height: auto;'
285
- }
286
- } else if (attributes.width.endsWith('px')) {
287
- // Fixed pixel width - use width attribute for email compatibility
288
- imgWidth = attributes.width.replace('px', '')
289
- imgStyle += ' max-width: 100%;'
290
- if (!attributes.height) {
291
- imgStyle += ' height: auto;'
292
- }
293
- }
294
- } else {
295
- // Default width behavior
296
- if (inColumn) {
297
- imgStyle += ' width: 100%; max-width: 100%; height: auto;'
298
- } else {
299
- imgStyle += ' max-width: 100%; height: auto;'
300
- }
301
- }
302
-
303
- // Handle height
304
- if (attributes.height) {
305
- if (attributes.height === 'auto') {
306
- imgStyle += ' height: auto;'
307
- } else if (attributes.height.endsWith('px')) {
308
- // Fixed pixel height - use height attribute for email compatibility
309
- imgHeight = attributes.height.replace('px', '')
310
- if (!attributes.width) {
311
- // If only height specified, maintain aspect ratio with max-width
312
- imgStyle += ' max-width: 100%;'
313
- }
314
- }
315
- }
316
-
317
- // Handle object-fit simulation for email (limited support)
318
- if (attributes.cover || attributes.contain) {
319
- // Note: Most email clients don't support object-fit
320
- // We can only approximate with width/height and overflow hidden
321
- if (!attributes.width && !attributes.height) {
322
- // Default to container width for cover/contain
323
- imgStyle += ' width: 100%;'
324
- }
325
- }
326
-
327
- return { imgStyle, imgWidth, imgHeight }
328
- }
329
-
330
- /**
331
- * Parse basic markdown within layout content (simplified version)
332
- */
333
- private parseBasicMarkdown(text: string): string {
334
- return text
335
- // Handle images with custom attributes - enhanced for better control
336
- .replace(/!\[([^\]]*)\]\(([^)]+)\)(?:\{([^}]+)\})?/g, (_, alt, src, attributeString) => {
337
- const attributes = this.parseImageAttributes(attributeString)
338
- const { imgStyle, imgWidth, imgHeight } = this.generateImageStyles(attributes, true)
339
-
340
- // Build img tag with attributes
341
- let imgTag = `<img src="${src}" alt="${alt || 'Image'}" style="${imgStyle}" border="0"`
342
- if (imgWidth) imgTag += ` width="${imgWidth}"`
343
- if (imgHeight) imgTag += ` height="${imgHeight}"`
344
- imgTag += '>'
345
-
346
- return imgTag
347
- })
348
- // Convert double line breaks to paragraph breaks
349
- .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;">')
350
- // Convert single line breaks to <br>
351
- .replace(/\n/g, '<br>')
352
- // Bold text
353
- .replace(/\*\*(.*?)\*\*/g, '<strong style="font-weight: bold;">$1</strong>')
354
- // Italic text
355
- .replace(/\*(.*?)\*/g, '<em style="font-style: italic;">$1</em>')
356
- // Links with email-safe colors
357
- .replace(/\[([^\]]+)\]\(([^)]+)\)/g, '<a href="$2" style="color: #0066cc; text-decoration: underline;">$1</a>')
358
- // Headers - only H1 supported for email compatibility
359
- .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>')
360
- // Unordered lists
361
- .replace(/^\* (.*$)/gim, '<li style="margin: 4px 0; font-family: Arial, Helvetica, sans-serif; font-size: 14px; color: #333333;">$1</li>')
362
- // Ordered lists
363
- .replace(/^\d+\. (.*$)/gim, '<li style="margin: 4px 0; font-family: Arial, Helvetica, sans-serif; font-size: 14px; color: #333333;">$1</li>')
364
- // Wrap consecutive list items in proper list containers
365
- .replace(/(<li[^>]*>.*?<\/li>(?:\s*<li[^>]*>.*?<\/li>)*)/gs, (listMatch) => {
366
- // Check if it's a numbered list by looking for digits at start of first item
367
- const isNumbered = /^\d+\./.test(listMatch.replace(/<[^>]*>/g, ''))
368
- const listTag = isNumbered ? 'ol' : 'ul'
369
- const listStyle = 'margin: 8px 0; padding: 0 0 0 20px; font-family: Arial, Helvetica, sans-serif;'
370
-
371
- return `<${listTag} style="${listStyle}">${listMatch}</${listTag}>`
372
- })
373
- // Wrap in paragraph if not already wrapped
374
- .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>')
375
- }
376
-
377
- /**
378
- * Email-compliant HTML generator for email clients (Gmail, Outlook, Apple Mail)
379
- * Uses table-based layouts with inline styles only - no CSS classes or modern features
380
- */
381
- private parseExtendedMarkdown(text: string): string {
382
- let html = text
383
-
384
- // Process layout blocks FIRST to avoid conflicts with other markdown
385
- html = this.parseLayoutBlocks(html)
386
-
387
- // Remove complex image blocks - email clients don't handle them well
388
- html = html.replace(/:::images\s+(row|grid(?:=\d+)?)\n((?:!\[.*?\]\(.*?\)(?:\{.*?\})?\s*\n?)*?):::/g, '[Multiple Images - View in web browser]')
389
-
390
- // Handle single images with enhanced attribute support
391
- html = html.replace(/!\[([^\]]*)\]\(([^)]+)\)(?:\{([^}]+)\})?/g, (_, alt, src, attributeString) => {
392
- const attributes = this.parseImageAttributes(attributeString)
393
- const { imgStyle, imgWidth, imgHeight } = this.generateImageStyles(attributes, false)
394
-
395
- // Build img tag with attributes
396
- let imgTag = `<img src="${src}" alt="${alt || 'Image'}" style="${imgStyle}" border="0"`
397
- if (imgWidth) imgTag += ` width="${imgWidth}"`
398
- if (imgHeight) imgTag += ` height="${imgHeight}"`
399
- imgTag += '>'
400
-
401
- // Wrap in email-safe table
402
- return `<table cellpadding="0" cellspacing="0" border="0" style="margin: 16px 0;"><tr><td>${imgTag}</td></tr></table>`
403
- })
404
-
405
- // Process markdown with email-safe inline styles
406
- html = html
407
- // Convert double line breaks to paragraph breaks
408
- .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;">')
409
- // Convert single line breaks to <br>
410
- .replace(/\n/g, '<br>')
411
- // Bold text
412
- .replace(/\*\*(.*?)\*\*/g, '<strong style="font-weight: bold;">$1</strong>')
413
- // Italic text
414
- .replace(/\*(.*?)\*/g, '<em style="font-style: italic;">$1</em>')
415
- // Links with email-safe colors
416
- .replace(/\[([^\]]+)\]\(([^)]+)\)/g, '<a href="$2" style="color: #0066cc; text-decoration: underline;">$1</a>')
417
- // Headers - only H1 supported for email compatibility
418
- .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>')
419
- // Unordered lists
420
- .replace(/^\* (.*$)/gim, '<li style="margin: 4px 0; font-family: Arial, Helvetica, sans-serif; font-size: 14px; color: #333333;">$1</li>')
421
- // Ordered lists
422
- .replace(/^\d+\. (.*$)/gim, '<li style="margin: 4px 0; font-family: Arial, Helvetica, sans-serif; font-size: 14px; color: #333333;">$1</li>')
423
- // Horizontal rule
424
- .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>')
425
-
426
- // Wrap consecutive list items in proper list containers
427
- html = html.replace(/(<li[^>]*>.*?<\/li>(?:\s*<li[^>]*>.*?<\/li>)*)/gs, (match) => {
428
- // Check if it's a numbered list by looking for digits at start of first item
429
- const isNumbered = /^\d+\./.test(match.replace(/<[^>]*>/g, ''))
430
- const listTag = isNumbered ? 'ol' : 'ul'
431
- const listStyle = isNumbered
432
- ? 'margin: 16px 0; padding: 0 0 0 20px; font-family: Arial, Helvetica, sans-serif;'
433
- : 'margin: 16px 0; padding: 0 0 0 20px; font-family: Arial, Helvetica, sans-serif;'
434
-
435
- return `<table cellpadding="0" cellspacing="0" border="0" width="100%"><tr><td><${listTag} style="${listStyle}">${match}</${listTag}></td></tr></table>`
436
- })
437
-
438
- // Wrap content in email-safe container table
439
- if (!html.includes('<table>') && !html.includes('<h1>')) {
440
- html = `<p style="margin: 0 0 16px 0; padding: 0; font-family: Arial, Helvetica, sans-serif; font-size: 14px; line-height: 1.6; color: #333333;">${html}</p>`
441
- }
442
-
443
- // Wrap everything in a main table container with 600px max width for email compatibility
444
- html = `<table cellpadding="0" cellspacing="0" border="0" width="100%" style="max-width: 600px; margin: 0 auto;">
445
- <tr>
446
- <td style="padding: 0; font-family: Arial, Helvetica, sans-serif; font-size: 14px; line-height: 1.6; color: #333333;">
447
- ${html}
448
- </td>
449
- </tr>
450
- </table>`
451
-
452
- return html
453
- }
454
-
455
- /**
456
- * Convert markdown to plain text for plain text preview
457
- */
458
- private convertToPlainText(text: string): string {
459
- return text.trim()
460
- // Remove layout blocks but preserve content
461
- .replace(/:::layout\s+([a-zA-Z0-9-]+)\n([\s\S]*?)\n:::/g, (_, __, content) => {
462
- // Extract content from div containers and flatten
463
- return content
464
- .replace(/<div class="(?:column|sidebar|main|image)">/g, '\n')
465
- .replace(/<\/div>/g, '\n')
466
- .replace(/\n{3,}/g, '\n\n')
467
- .trim()
468
- })
469
- // Remove image blocks
470
- .replace(/:::images\s+(row|grid(?:=\d+)?)\n((?:!\[.*?\]\(.*?\)(?:\{.*?\})?\s*\n?)*?):::/g, '[Images]')
471
- // Remove individual images
472
- .replace(/!\[([^\]]*)\]\(([^)]+)\)(?:\{([^}]+)\})?/g, '[Image: $1]')
473
- // Remove other markdown
474
- .replace(/\*\*(.*?)\*\*/g, '$1') // Remove bold markers
475
- .replace(/\*(.*?)\*/g, '$1') // Remove italic markers
476
- .replace(/__(.*?)__/g, '$1') // Remove underline markers
477
- .replace(/~~(.*?)~~/g, '$1') // Remove strikethrough markers
478
- .replace(/`(.*?)`/g, '$1') // Remove code markers
479
- .replace(/^#{1,3} (.*$)/gim, '$1') // Remove header markers
480
- .replace(/^> (.*$)/gim, '$1') // Remove quote markers
481
- .replace(/^\* (.*$)/gim, '• $1') // Convert bullets
482
- .replace(/^\d+\. (.*$)/gim, '$1') // Remove numbered list markers
483
- .replace(/\[([^\]]+)\]\(([^)]+)\)/g, '$1 ($2)') // Convert links to text
484
- .replace(/^---$/gim, '---') // Keep dividers
485
- .replace(/\n\n+/g, '\n\n') // Normalize spacing
486
- }
487
-
488
- /** Format file size for display */
489
- private formatFileSize(bytes: number): string {
490
- if (bytes === 0) return '0 Bytes'
491
- const k = 1024
492
- const sizes = ['Bytes', 'KB', 'MB', 'GB']
493
- const i = Math.floor(Math.log(bytes) / Math.log(k))
494
- return parseFloat((bytes / Math.pow(k, i)).toFixed(2)) + ' ' + sizes[i]
495
- }
496
-
497
- render() {
498
- const htmlBody = this.parseExtendedMarkdown(this.body)
499
- const plainTextBody = this.convertToPlainText(this.body)
500
- const displayToAddress = this.recipients[0] || this.toAddress
501
-
502
- return html`
503
- <schmancy-surface type="solid" rounded="all" class="h-full flex flex-col">
504
-
505
- <!-- Header Section -->
506
- <div class="shrink-0 p-4 border-b border-outline-variant">
507
- <div class="flex flex-col sm:flex-row sm:items-center sm:justify-between gap-4">
508
- <schmancy-typography type="title" token="md" class="flex items-center gap-2">
509
- <schmancy-icon size="20px">preview</schmancy-icon>
510
- Email Preview
511
- </schmancy-typography>
512
-
513
- <!-- View Mode Toggle -->
514
- <div class="flex gap-1 bg-surface-container rounded-full p-1">
515
- <schmancy-chip
516
- ?selected=${this.viewMode === 'html'}
517
- @click=${() => { this.viewMode = 'html' }}
518
- class="text-xs h-8"
519
- data-variant=${this.viewMode === 'html' ? 'filled' : 'outlined'}
520
- >
521
- <schmancy-icon slot="prefix" size="14px">code</schmancy-icon>
522
- HTML
523
- </schmancy-chip>
524
- <schmancy-chip
525
- ?selected=${this.viewMode === 'plaintext'}
526
- @click=${() => { this.viewMode = 'plaintext' }}
527
- class="text-xs h-8"
528
- data-variant=${this.viewMode === 'plaintext' ? 'filled' : 'outlined'}
529
- >
530
- <schmancy-icon slot="prefix" size="14px">text_fields</schmancy-icon>
531
- Text
532
- </schmancy-chip>
533
- </div>
534
- </div>
535
- </div>
536
-
537
- <!-- Preview Content Container -->
538
- <div class="flex-1 flex flex-col min-h-0 p-4 gap-4">
539
-
540
- <!-- Email Mock Container -->
541
- <div class="flex-1 flex flex-col min-h-0">
542
- <schmancy-surface
543
- type="subtle"
544
- rounded="all"
545
- class="flex-1 flex flex-col overflow-hidden shadow-sm"
546
- >
547
- <!-- Email Header -->
548
- <div class="shrink-0 p-4 bg-surface-containerLow border-b border-outline-variant">
549
- <div class="space-y-3">
550
- <!-- From Field -->
551
- <div class="flex items-start gap-3">
552
- <div class="flex items-center gap-2 min-w-0 shrink-0 w-16">
553
- <schmancy-icon size="16px">account_circle</schmancy-icon>
554
- <schmancy-typography type="body" token="sm" class="font-medium">
555
- From
556
- </schmancy-typography>
557
- </div>
558
- <schmancy-typography type="body" token="sm" class="break-all flex-1">
559
- ${this.fromAddress}
560
- </schmancy-typography>
561
- </div>
562
-
563
- <!-- To Field -->
564
- <div class="flex items-start gap-3">
565
- <div class="flex items-center gap-2 min-w-0 shrink-0 w-16">
566
- <schmancy-icon size="16px">person</schmancy-icon>
567
- <schmancy-typography type="body" token="sm" class="font-medium">
568
- To
569
- </schmancy-typography>
570
- </div>
571
- <schmancy-typography type="body" token="sm" class="break-all flex-1">
572
- ${displayToAddress}
573
- </schmancy-typography>
574
- </div>
575
-
576
- <!-- Subject Field -->
577
- <div class="flex items-start gap-3">
578
- <div class="flex items-center gap-2 min-w-0 shrink-0 w-16">
579
- <schmancy-icon size="16px">subject</schmancy-icon>
580
- <schmancy-typography type="body" token="sm" class="font-medium">
581
- Subject
582
- </schmancy-typography>
583
- </div>
584
- <schmancy-typography type="body" token="sm" class="font-medium flex-1">
585
- ${this.subject || html`<span class="italic text-surface-onVariant">(No subject)</span>`}
586
- </schmancy-typography>
587
- </div>
588
- </div>
589
- </div>
590
-
591
- <!-- Email Body Content -->
592
- <div class="flex-1 overflow-y-auto min-h-0">
593
- ${when(this.body,
594
- () => html`
595
- ${when(this.viewMode === 'html',
596
- () => html`
597
- <div class="p-6 bg-white" style="color: #333; line-height: 1.6; font-family: system-ui, -apple-system, sans-serif; font-size: 14px;">
598
- <div .innerHTML=${htmlBody}></div>
599
- </div>
600
- `,
601
- () => html`
602
- <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;">
603
- ${plainTextBody}
604
- </div>
605
- `
606
- )}
607
- `,
608
- () => html`
609
- <!-- Empty State -->
610
- <div class="flex-1 flex items-center justify-center p-8">
611
- <div class="text-center space-y-3">
612
- <schmancy-icon size="48px" class="text-surface-onVariant opacity-50">mail_outline</schmancy-icon>
613
- <schmancy-typography type="body" token="md">
614
- No message content to preview
615
- </schmancy-typography>
616
- <schmancy-typography type="body" token="sm" class="text-surface-onVariant">
617
- Start typing in the composer to see a preview
618
- </schmancy-typography>
619
- </div>
620
- </div>
621
- `
622
- )}
623
- </div>
624
-
625
- <!-- Attachments Section -->
626
- ${when(this.attachments.length > 0, () => html`
627
- <div class="shrink-0 p-4 border-t border-outline-variant bg-surface-containerLowest">
628
- <div class="space-y-3">
629
- <!-- Attachments Header -->
630
- <div class="flex items-center gap-2">
631
- <schmancy-icon size="18px">attach_file</schmancy-icon>
632
- <schmancy-typography type="label" token="md" class="font-medium">
633
- Attachments (${this.attachments.length})
634
- </schmancy-typography>
635
- </div>
636
-
637
- <!-- Attachments List -->
638
- <div class="grid gap-2 sm:grid-cols-2 lg:grid-cols-1 xl:grid-cols-2">
639
- ${repeat(this.attachments, attachment => attachment.id, (attachment) => html`
640
- <schmancy-surface type="subtle" rounded="all" class="p-3">
641
- <div class="flex items-center gap-3">
642
- <!-- File Icon -->
643
- <schmancy-icon size="20px" class="text-surface-onVariant shrink-0">
644
- ${attachment.type.startsWith('image/') ? 'image' :
645
- attachment.type.includes('pdf') ? 'picture_as_pdf' :
646
- attachment.type.includes('text') ? 'description' :
647
- 'attach_file'}
648
- </schmancy-icon>
649
-
650
- <!-- File Info -->
651
- <div class="flex-1 min-w-0">
652
- <schmancy-typography type="body" token="sm" class="font-medium truncate">
653
- ${attachment.name}
654
- </schmancy-typography>
655
- <schmancy-typography type="body" token="xs" class="text-surface-onVariant">
656
- ${this.formatFileSize(attachment.size)} • ${attachment.type}
657
- </schmancy-typography>
658
- </div>
659
- </div>
660
- </schmancy-surface>
661
- `)}
662
- </div>
663
- </div>
664
- </div>
665
- `)}
666
- </schmancy-surface>
667
- </div>
668
-
669
- <!-- Preview Stats -->
670
- ${when(this.body, () => html`
671
- <div class="shrink-0">
672
- <schmancy-surface type="subtle" rounded="all" class="p-3">
673
- <div class="flex items-center justify-center gap-6 text-center">
674
- <div>
675
- <schmancy-typography type="body" token="xs" class="text-surface-onVariant">
676
- Characters
677
- </schmancy-typography>
678
- <schmancy-typography type="body" token="sm" class="font-medium">
679
- ${this.body.length}
680
- </schmancy-typography>
681
- </div>
682
- <div class="w-px h-8 bg-outline-variant"></div>
683
- <div>
684
- <schmancy-typography type="body" token="xs" class="text-surface-onVariant">
685
- Words
686
- </schmancy-typography>
687
- <schmancy-typography type="body" token="sm" class="font-medium">
688
- ${this.body.trim() ? this.body.trim().split(/\s+/).length : 0}
689
- </schmancy-typography>
690
- </div>
691
- ${when(this.attachments.length > 0, () => html`
692
- <div class="w-px h-8 bg-outline-variant"></div>
693
- <div>
694
- <schmancy-typography type="body" token="xs" class="text-surface-onVariant">
695
- Attachments
696
- </schmancy-typography>
697
- <schmancy-typography type="body" token="sm" class="font-medium">
698
- ${this.attachments.length}
699
- </schmancy-typography>
700
- </div>
701
- `)}
702
- </div>
703
- </schmancy-surface>
704
- </div>
705
- `)}
706
-
707
- </div>
708
- </schmancy-surface>
709
- `
710
- }
711
- }
712
-
713
- declare global {
714
- interface HTMLElementTagNameMap {
715
- 'schmancy-email-viewer': SchmancyEmailViewer
716
- }
717
- }