@mhmo91/schmancy 0.10.4 → 0.10.6
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/custom-elements.json +43 -949
- package/dist/agent/{flow-CaPi2G8y.js.map → flow-3RrZM-e7.js.map} +1 -1
- package/dist/agent/schmancy.agent.js +3817 -6527
- package/dist/agent/schmancy.agent.js.map +1 -1
- package/dist/agent/schmancy.manifest.json +10 -680
- package/dist/agent/{vendor-jsqr-r7GNh4P3.js.map → vendor-jsqr-BUVwyoGC.js.map} +1 -1
- package/dist/agent/{vendor-material-color-Be96dpGE.js.map → vendor-material-color-33Mj762T.js.map} +1 -1
- package/dist/{area-DHVANBbr.js → area-CIZZ5tbB.js} +1 -1
- package/dist/{area-DHVANBbr.js.map → area-CIZZ5tbB.js.map} +1 -1
- package/dist/{area-ZupIezvU.cjs → area-oZjYJlUy.cjs} +1 -1
- package/dist/{area-ZupIezvU.cjs.map → area-oZjYJlUy.cjs.map} +1 -1
- package/dist/area.cjs +1 -1
- package/dist/area.js +1 -1
- package/dist/{autocomplete-pHvsyfbH.js → autocomplete-C1oDLuol.js} +2 -2
- package/dist/{autocomplete-pHvsyfbH.js.map → autocomplete-C1oDLuol.js.map} +1 -1
- package/dist/{autocomplete-Bn525CTp.cjs → autocomplete-X20i6D62.cjs} +1 -1
- package/dist/{autocomplete-Bn525CTp.cjs.map → autocomplete-X20i6D62.cjs.map} +1 -1
- package/dist/autocomplete.cjs +1 -1
- package/dist/autocomplete.js +1 -1
- package/dist/avatar.cjs +1 -1
- package/dist/avatar.js +2 -2
- package/dist/badge.cjs +1 -1
- package/dist/badge.js +1 -1
- package/dist/{boat-IyEtsNI4.cjs → boat-CUx58Gwe.cjs} +1 -1
- package/dist/{boat-IyEtsNI4.cjs.map → boat-CUx58Gwe.cjs.map} +1 -1
- package/dist/{boat-_Yv3M6YM.js → boat-CpE0yAlK.js} +2 -2
- package/dist/{boat-_Yv3M6YM.js.map → boat-CpE0yAlK.js.map} +1 -1
- package/dist/boat.cjs +1 -1
- package/dist/boat.js +1 -1
- package/dist/breadcrumb.cjs +1 -1
- package/dist/breadcrumb.js +1 -1
- package/dist/{busy-Ck2IXJ4r.js → busy-C9n-DUY4.js} +1 -1
- package/dist/{busy-Ck2IXJ4r.js.map → busy-C9n-DUY4.js.map} +1 -1
- package/dist/{busy-CjM39APN.cjs → busy-D1DKZhgV.cjs} +1 -1
- package/dist/{busy-CjM39APN.cjs.map → busy-D1DKZhgV.cjs.map} +1 -1
- package/dist/busy.cjs +1 -1
- package/dist/busy.js +1 -1
- package/dist/button.cjs +1 -1
- package/dist/button.js +3 -3
- package/dist/{card-DUWZmMHc.js → card-B3hN-qzk.js} +1 -1
- package/dist/{card-DUWZmMHc.js.map → card-B3hN-qzk.js.map} +1 -1
- package/dist/{card-DIxDuuth.cjs → card-DZJ7qjf2.cjs} +1 -1
- package/dist/{card-DIxDuuth.cjs.map → card-DZJ7qjf2.cjs.map} +1 -1
- package/dist/card.cjs +1 -1
- package/dist/card.js +1 -1
- package/dist/charts.cjs +1 -1
- package/dist/charts.js +1 -1
- package/dist/{checkbox-DPS1mWG-.js → checkbox-CvmB1ev9.js} +1 -1
- package/dist/{checkbox-DPS1mWG-.js.map → checkbox-CvmB1ev9.js.map} +1 -1
- package/dist/{checkbox-CGdFXuWQ.cjs → checkbox-DapdzDow.cjs} +1 -1
- package/dist/{checkbox-CGdFXuWQ.cjs.map → checkbox-DapdzDow.cjs.map} +1 -1
- package/dist/checkbox.cjs +1 -1
- package/dist/checkbox.js +1 -1
- package/dist/{chips-UoFbwmlG.cjs → chips-7g6mWRuh.cjs} +1 -1
- package/dist/{chips-UoFbwmlG.cjs.map → chips-7g6mWRuh.cjs.map} +1 -1
- package/dist/{chips-BnnXQSA-.js → chips-C8Y3_3ke.js} +4 -4
- package/dist/{chips-BnnXQSA-.js.map → chips-C8Y3_3ke.js.map} +1 -1
- package/dist/chips.cjs +1 -1
- package/dist/chips.js +2 -2
- package/dist/connectivity.cjs +1 -1
- package/dist/connectivity.js +1 -1
- package/dist/content-drawer.cjs +1 -1
- package/dist/content-drawer.js +1 -1
- package/dist/{context-daN5G6HS.cjs.map → context-BpCETidA.cjs.map} +1 -1
- package/dist/{context-Bdu1xt0W.js.map → context-DJTJnSK4.js.map} +1 -1
- package/dist/{date-range-DOstCIg8.js → date-range-DdcaPX7C.js} +99 -113
- package/dist/date-range-DdcaPX7C.js.map +1 -0
- package/dist/date-range-ZfUl4duV.cjs +131 -0
- package/dist/date-range-ZfUl4duV.cjs.map +1 -0
- package/dist/{date-range-inline-4P7zqeVe.cjs → date-range-inline-D-d7N6bh.cjs} +1 -1
- package/dist/{date-range-inline-4P7zqeVe.cjs.map → date-range-inline-D-d7N6bh.cjs.map} +1 -1
- package/dist/{date-range-inline-BVycTWLb.js → date-range-inline-QQmIWhZ4.js} +1 -1
- package/dist/{date-range-inline-BVycTWLb.js.map → date-range-inline-QQmIWhZ4.js.map} +1 -1
- package/dist/date-range-inline.cjs +1 -1
- package/dist/date-range-inline.js +1 -1
- package/dist/date-range.cjs +1 -1
- package/dist/date-range.js +1 -1
- package/dist/delay.cjs +1 -1
- package/dist/delay.js +2 -2
- package/dist/{details-BJBbZOO6.cjs → details-3rL6UQU8.cjs} +1 -1
- package/dist/{details-BJBbZOO6.cjs.map → details-3rL6UQU8.cjs.map} +1 -1
- package/dist/{details-DPc5GxPa.js → details-Dpjh-XnJ.js} +2 -2
- package/dist/{details-DPc5GxPa.js.map → details-Dpjh-XnJ.js.map} +1 -1
- package/dist/details.cjs +1 -1
- package/dist/details.js +1 -1
- package/dist/directives.cjs +1 -1
- package/dist/directives.js +2 -2
- package/dist/{divider-BvJsmSPH.js → divider-BdfEKQsH.js} +1 -1
- package/dist/{divider-BvJsmSPH.js.map → divider-BdfEKQsH.js.map} +1 -1
- package/dist/{divider-DPT3XnG5.cjs → divider-CutXDz3F.cjs} +1 -1
- package/dist/{divider-DPT3XnG5.cjs.map → divider-CutXDz3F.cjs.map} +1 -1
- package/dist/divider.cjs +1 -1
- package/dist/divider.js +1 -1
- package/dist/dropdown.cjs +1 -1
- package/dist/dropdown.js +1 -1
- package/dist/{expand-CTqBWVXo.cjs → expand-DM6zfZf7.cjs} +1 -1
- package/dist/{expand-CTqBWVXo.cjs.map → expand-DM6zfZf7.cjs.map} +1 -1
- package/dist/{expand-BMzocdtj.js → expand-DrgMPJbu.js} +2 -2
- package/dist/{expand-BMzocdtj.js.map → expand-DrgMPJbu.js.map} +1 -1
- package/dist/expand.cjs +1 -1
- package/dist/expand.js +1 -1
- package/dist/{extra-BeHlUhzv.js → extra-B6gFu4_1.js} +1 -1
- package/dist/{extra-BeHlUhzv.js.map → extra-B6gFu4_1.js.map} +1 -1
- package/dist/{extra-h_cuxRII.cjs → extra-DJRYaOXe.cjs} +1 -1
- package/dist/{extra-h_cuxRII.cjs.map → extra-DJRYaOXe.cjs.map} +1 -1
- package/dist/extra.cjs +1 -1
- package/dist/extra.js +1 -1
- package/dist/{float-CTc1xxqH.js → float-1iihPek5.js} +1 -1
- package/dist/{float-CTc1xxqH.js.map → float-1iihPek5.js.map} +1 -1
- package/dist/{float-CwVBs11k.cjs → float-Ckyk85XG.cjs} +1 -1
- package/dist/{float-CwVBs11k.cjs.map → float-Ckyk85XG.cjs.map} +1 -1
- package/dist/float.cjs +1 -1
- package/dist/float.js +1 -1
- package/dist/{form-BtwOBMZ9.js.map → form-BF1c3Dk1.js.map} +1 -1
- package/dist/{form-CSJp687X.cjs.map → form-DeO5XX3b.cjs.map} +1 -1
- package/dist/form.cjs +1 -1
- package/dist/form.js +1 -1
- package/dist/handover/agent-runtime-followups.md +1 -1
- package/dist/handover/agent-runtime-v1.md +3 -3
- package/dist/{hashContent-1ARKIsx9.js.map → hashContent-BU6jl5ih.js.map} +1 -1
- package/dist/{hashContent-Bp5S6T4U.cjs.map → hashContent-Bobsobip.cjs.map} +1 -1
- package/dist/{icons-qEQW4pjM.cjs → icons-CV-fiGcW.cjs} +1 -1
- package/dist/{icons-qEQW4pjM.cjs.map → icons-CV-fiGcW.cjs.map} +1 -1
- package/dist/{icons-BbCVrcas.js → icons-DUkcTZAY.js} +2 -2
- package/dist/{icons-BbCVrcas.js.map → icons-DUkcTZAY.js.map} +1 -1
- package/dist/icons.cjs +1 -1
- package/dist/icons.js +1 -1
- package/dist/{iframe-BJfDIEJf.js → iframe-C9tj7F6Y.js} +1 -1
- package/dist/{iframe-BJfDIEJf.js.map → iframe-C9tj7F6Y.js.map} +1 -1
- package/dist/{iframe-D6HTruav.cjs → iframe-DF97oGtZ.cjs} +1 -1
- package/dist/{iframe-D6HTruav.cjs.map → iframe-DF97oGtZ.cjs.map} +1 -1
- package/dist/iframe.cjs +1 -1
- package/dist/iframe.js +1 -1
- package/dist/index.cjs +1 -1
- package/dist/index.js +70 -76
- package/dist/{input-LTK3cctF.js → input-DE7x223Y.js} +1 -1
- package/dist/{input-LTK3cctF.js.map → input-DE7x223Y.js.map} +1 -1
- package/dist/{input-U26axtcs.cjs → input-TW9G3n7X.cjs} +1 -1
- package/dist/{input-U26axtcs.cjs.map → input-TW9G3n7X.cjs.map} +1 -1
- package/dist/{input-chip-Ch-aCs3c.js → input-chip-BdoaVw_D.js} +1 -1
- package/dist/{input-chip-Ch-aCs3c.js.map → input-chip-BdoaVw_D.js.map} +1 -1
- package/dist/{input-chip-CADXt0X5.cjs → input-chip-Do48eI5r.cjs} +1 -1
- package/dist/{input-chip-CADXt0X5.cjs.map → input-chip-Do48eI5r.cjs.map} +1 -1
- package/dist/input.cjs +1 -1
- package/dist/input.js +1 -1
- package/dist/json.cjs +1 -1
- package/dist/json.js +2 -2
- package/dist/kbd.cjs +1 -1
- package/dist/kbd.js +1 -1
- package/dist/{layout-C4xmnU4n.js → layout-CXPNsUIo.js} +1 -1
- package/dist/{layout-C4xmnU4n.js.map → layout-CXPNsUIo.js.map} +1 -1
- package/dist/{layout-Dmh6fxh0.cjs → layout-Zhe7wSZ_.cjs} +1 -1
- package/dist/{layout-Dmh6fxh0.cjs.map → layout-Zhe7wSZ_.cjs.map} +1 -1
- package/dist/layout.cjs +1 -1
- package/dist/layout.js +1 -1
- package/dist/{lightbox-DqG2z3Cn.js → lightbox-DcutIyjx.js} +2 -2
- package/dist/{lightbox-DqG2z3Cn.js.map → lightbox-DcutIyjx.js.map} +1 -1
- package/dist/{lightbox-DbYUSfVl.cjs → lightbox-sPfnYzjJ.cjs} +1 -1
- package/dist/{lightbox-DbYUSfVl.cjs.map → lightbox-sPfnYzjJ.cjs.map} +1 -1
- package/dist/lightbox.cjs +1 -1
- package/dist/lightbox.js +1 -1
- package/dist/{list-D6-_E5ZD.js → list-BWrtrdgs.js} +1 -1
- package/dist/{list-D6-_E5ZD.js.map → list-BWrtrdgs.js.map} +1 -1
- package/dist/{list-CLX4sSAw.cjs → list-C4vasUly.cjs} +1 -1
- package/dist/{list-CLX4sSAw.cjs.map → list-C4vasUly.cjs.map} +1 -1
- package/dist/list.cjs +1 -1
- package/dist/list.js +1 -1
- package/dist/{magnetic-BH0TsofV.cjs.map → magnetic-BJgB1dVi.cjs.map} +1 -1
- package/dist/{magnetic-BZGFxAWG.js.map → magnetic-YwCNvtbB.js.map} +1 -1
- package/dist/{map-WXeVkx2K.cjs → map-BAQ9FEB6.cjs} +1 -1
- package/dist/{map-WXeVkx2K.cjs.map → map-BAQ9FEB6.cjs.map} +1 -1
- package/dist/{map-Dhy3ta9v.js → map-CEreveeI.js} +1 -1
- package/dist/{map-Dhy3ta9v.js.map → map-CEreveeI.js.map} +1 -1
- package/dist/map.cjs +1 -1
- package/dist/map.js +1 -1
- package/dist/menu-3yXDZusj.cjs +23 -0
- package/dist/menu-3yXDZusj.cjs.map +1 -0
- package/dist/menu-CxChOxWT.js +62 -0
- package/dist/menu-CxChOxWT.js.map +1 -0
- package/dist/menu.cjs +1 -1
- package/dist/menu.js +1 -1
- package/dist/mixins-Db7gjDah.cjs +298 -0
- package/dist/{mixins-De3xfjrm.cjs.map → mixins-Db7gjDah.cjs.map} +1 -1
- package/dist/mixins-Dw6hVfy-.js +627 -0
- package/dist/{mixins-CcIWET41.js.map → mixins-Dw6hVfy-.js.map} +1 -1
- package/dist/mixins.cjs +1 -1
- package/dist/mixins.js +1 -1
- package/dist/nav-drawer.cjs +1 -1
- package/dist/nav-drawer.js +1 -1
- package/dist/navigation-bar.cjs +1 -1
- package/dist/navigation-bar.js +1 -1
- package/dist/navigation-rail.cjs +1 -1
- package/dist/navigation-rail.js +1 -1
- package/dist/{notification-D_PQjBSf.cjs → notification-DKYy9qVe.cjs} +1 -1
- package/dist/{notification-D_PQjBSf.cjs.map → notification-DKYy9qVe.cjs.map} +1 -1
- package/dist/{notification-CVLqQ8c_.js → notification-ycbUBbOu.js} +2 -2
- package/dist/{notification-CVLqQ8c_.js.map → notification-ycbUBbOu.js.map} +1 -1
- package/dist/notification.cjs +1 -1
- package/dist/notification.js +1 -1
- package/dist/{option-rm4HebVs.js → option-DtOhMd3k.js} +1 -1
- package/dist/{option-rm4HebVs.js.map → option-DtOhMd3k.js.map} +1 -1
- package/dist/{option-DDU_goh1.cjs → option-zgVge3BH.cjs} +1 -1
- package/dist/{option-DDU_goh1.cjs.map → option-zgVge3BH.cjs.map} +1 -1
- package/dist/option.cjs +1 -1
- package/dist/option.js +1 -1
- package/dist/{overlay-stack-CAQno0CK.js.map → overlay-stack-DCDS17uj.js.map} +1 -1
- package/dist/{overlay-stack-BprhAE9a.cjs.map → overlay-stack-DPIe_aYv.cjs.map} +1 -1
- package/dist/overlay.cjs +5 -53
- package/dist/overlay.cjs.map +1 -1
- package/dist/overlay.confirm-body-AFqYBqrI.js +104 -0
- package/dist/overlay.confirm-body-AFqYBqrI.js.map +1 -0
- package/dist/overlay.confirm-body-DctQLDao.cjs +49 -0
- package/dist/overlay.confirm-body-DctQLDao.cjs.map +1 -0
- package/dist/overlay.js +120 -360
- package/dist/overlay.js.map +1 -1
- package/dist/overlay.service-B9On2-Aa.js +146 -0
- package/dist/overlay.service-B9On2-Aa.js.map +1 -0
- package/dist/overlay.service-k2nCE4pi.cjs +1 -0
- package/dist/overlay.service-k2nCE4pi.cjs.map +1 -0
- package/dist/page.cjs +1 -1
- package/dist/page.js +4 -4
- package/dist/{payment-card-form-C0dHYZIv.js → payment-card-form-Be1-OVlL.js} +1 -1
- package/dist/{payment-card-form-C0dHYZIv.js.map → payment-card-form-Be1-OVlL.js.map} +1 -1
- package/dist/{payment-card-form-DNvmZxs4.cjs → payment-card-form-CNnGePG4.cjs} +1 -1
- package/dist/{payment-card-form-DNvmZxs4.cjs.map → payment-card-form-CNnGePG4.cjs.map} +1 -1
- package/dist/payment-card-form.cjs +1 -1
- package/dist/payment-card-form.js +1 -1
- package/dist/{progress-BRerM5Bn.js → progress-BFWzmTlz.js} +1 -1
- package/dist/{progress-BRerM5Bn.js.map → progress-BFWzmTlz.js.map} +1 -1
- package/dist/{progress-U3LQkpM2.cjs → progress-C4TGG2eN.cjs} +1 -1
- package/dist/{progress-U3LQkpM2.cjs.map → progress-C4TGG2eN.cjs.map} +1 -1
- package/dist/progress.cjs +1 -1
- package/dist/progress.js +1 -1
- package/dist/qr-scanner.cjs +1 -1
- package/dist/qr-scanner.js +1 -1
- package/dist/{radio-group-BZ2WoOXJ.js → radio-group-DTNAW5dd.js} +1 -1
- package/dist/{radio-group-BZ2WoOXJ.js.map → radio-group-DTNAW5dd.js.map} +1 -1
- package/dist/{radio-group-D7mm-yvJ.cjs → radio-group-xLRp1g57.cjs} +1 -1
- package/dist/{radio-group-D7mm-yvJ.cjs.map → radio-group-xLRp1g57.cjs.map} +1 -1
- package/dist/radio-group.cjs +1 -1
- package/dist/radio-group.js +1 -1
- package/dist/range.cjs +1 -1
- package/dist/range.js +1 -1
- package/dist/{rxjs-utils-d-ivVN84.js.map → rxjs-utils-BK8VMe3K.js.map} +1 -1
- package/dist/{rxjs-utils-Csnks202.cjs.map → rxjs-utils-DhOKenkS.cjs.map} +1 -1
- package/dist/rxjs-utils.cjs +1 -1
- package/dist/rxjs-utils.js +1 -1
- package/dist/{scroll-qL-HkMdP.js → scroll-BCmdqSQU.js} +1 -1
- package/dist/{scroll-qL-HkMdP.js.map → scroll-BCmdqSQU.js.map} +1 -1
- package/dist/{scroll-DJTjNIT_.cjs → scroll-Bdgb-vRy.cjs} +1 -1
- package/dist/{scroll-DJTjNIT_.cjs.map → scroll-Bdgb-vRy.cjs.map} +1 -1
- package/dist/{select-CnPXUeSf.js → select-COGARE0b.js} +2 -2
- package/dist/{select-CnPXUeSf.js.map → select-COGARE0b.js.map} +1 -1
- package/dist/{select-BvA7v-gL.cjs → select-Cv5t_PT3.cjs} +1 -1
- package/dist/{select-BvA7v-gL.cjs.map → select-Cv5t_PT3.cjs.map} +1 -1
- package/dist/select.cjs +1 -1
- package/dist/select.js +1 -1
- package/dist/skeleton.cjs +1 -1
- package/dist/skeleton.js +1 -1
- package/dist/skills/INDEX.md +3 -6
- package/dist/skills/SKILL.md +13 -9
- package/dist/skills/schmancy/INDEX.md +3 -6
- package/dist/skills/schmancy/SKILL.md +13 -9
- package/dist/slider.cjs +1 -1
- package/dist/slider.js +1 -1
- package/dist/{splash-screen-BDt4PInk.cjs → splash-screen-B8rFbjqT.cjs} +1 -1
- package/dist/{splash-screen-BDt4PInk.cjs.map → splash-screen-B8rFbjqT.cjs.map} +1 -1
- package/dist/{splash-screen-C8JCqX5L.js → splash-screen-DbGbGttg.js} +1 -1
- package/dist/{splash-screen-C8JCqX5L.js.map → splash-screen-DbGbGttg.js.map} +1 -1
- package/dist/splash-screen.cjs +1 -1
- package/dist/splash-screen.js +1 -1
- package/dist/{src-CqdnWGgr.js → src-YRir9pOP.js} +162 -162
- package/dist/src-YRir9pOP.js.map +1 -0
- package/dist/{src-CpRNClhg.cjs → src-b8D-Ec-Q.cjs} +13 -13
- package/dist/src-b8D-Ec-Q.cjs.map +1 -0
- package/dist/steps.cjs +1 -1
- package/dist/steps.js +1 -1
- package/dist/{surface-C8jQy8Ym.js → surface-BE7sGTBt.js} +1 -1
- package/dist/{surface-C8jQy8Ym.js.map → surface-BE7sGTBt.js.map} +1 -1
- package/dist/{surface-Du2Y4vXd.cjs → surface-BvudRtf5.cjs} +1 -1
- package/dist/{surface-Du2Y4vXd.cjs.map → surface-BvudRtf5.cjs.map} +1 -1
- package/dist/surface.cjs +1 -1
- package/dist/surface.js +1 -1
- package/dist/switch.cjs +1 -1
- package/dist/switch.js +1 -1
- package/dist/table.cjs +1 -1
- package/dist/table.js +1 -1
- package/dist/{tabs-0RfeCa00.cjs → tabs-C0XKld1Z.cjs} +1 -1
- package/dist/{tabs-0RfeCa00.cjs.map → tabs-C0XKld1Z.cjs.map} +1 -1
- package/dist/{tabs-Cyahh9Q6.js → tabs-DIzCRsA3.js} +1 -1
- package/dist/{tabs-Cyahh9Q6.js.map → tabs-DIzCRsA3.js.map} +1 -1
- package/dist/tabs.cjs +1 -1
- package/dist/tabs.js +1 -1
- package/dist/teleport.cjs +1 -1
- package/dist/teleport.js +1 -1
- package/dist/{textarea-jqRrLxmo.cjs → textarea-BCDCGCJd.cjs} +1 -1
- package/dist/{textarea-jqRrLxmo.cjs.map → textarea-BCDCGCJd.cjs.map} +1 -1
- package/dist/{textarea-CXCcTVnf.js → textarea-UbZzBwqm.js} +1 -1
- package/dist/{textarea-CXCcTVnf.js.map → textarea-UbZzBwqm.js.map} +1 -1
- package/dist/textarea.cjs +1 -1
- package/dist/textarea.js +1 -1
- package/dist/theme-CIsI-sFj.cjs +181 -0
- package/dist/{theme-Hjz9sCN-.cjs.map → theme-CIsI-sFj.cjs.map} +1 -1
- package/dist/{theme-2KZW2Rfs.js → theme-Qh-yPEPL.js} +3 -4
- package/dist/{theme-2KZW2Rfs.js.map → theme-Qh-yPEPL.js.map} +1 -1
- package/dist/{theme-button-9uF1eoHz.js → theme-button-CjTnfs9x.js} +1 -1
- package/dist/{theme-button-9uF1eoHz.js.map → theme-button-CjTnfs9x.js.map} +1 -1
- package/dist/{theme-button-C7QIbke1.cjs → theme-button-Dv1D_Vil.cjs} +1 -1
- package/dist/{theme-button-C7QIbke1.cjs.map → theme-button-Dv1D_Vil.cjs.map} +1 -1
- package/dist/theme-button.cjs +1 -1
- package/dist/theme-button.js +1 -1
- package/dist/theme.cjs +1 -1
- package/dist/{theme.interface-D9l33b-M.cjs.map → theme.interface-BeW-sz_g.cjs.map} +1 -1
- package/dist/{theme.interface-DnVNre4O.js.map → theme.interface-v7SkAnDH.js.map} +1 -1
- package/dist/theme.js +5 -6
- package/dist/theme.service-Cfk88qHK.cjs +1 -0
- package/dist/theme.service-Cfk88qHK.cjs.map +1 -0
- package/dist/{theme.service-CmbOGMA8.js → theme.service-DIUo1mBP.js} +13 -14
- package/dist/theme.service-DIUo1mBP.js.map +1 -0
- package/dist/timeline.cjs +1 -1
- package/dist/timeline.js +1 -1
- package/dist/tree.cjs +1 -1
- package/dist/tree.js +1 -1
- package/dist/typography.cjs +1 -1
- package/dist/typography.js +1 -1
- package/dist/{utils-hp-DnFf5.js → utils-BfOze6Tk.js} +1 -1
- package/dist/{utils-hp-DnFf5.js.map → utils-BfOze6Tk.js.map} +1 -1
- package/dist/{utils-Cr-YO4Np.cjs → utils-CJ9y2Jz9.cjs} +1 -1
- package/dist/{utils-Cr-YO4Np.cjs.map → utils-CJ9y2Jz9.cjs.map} +1 -1
- package/dist/utils.cjs +1 -1
- package/dist/utils.js +2 -2
- package/dist/visually-hidden.cjs +1 -1
- package/dist/visually-hidden.js +1 -1
- package/dist/{window-DtUOWiAj.cjs → window-9HOUXrTU.cjs} +1 -1
- package/dist/{window-DtUOWiAj.cjs.map → window-9HOUXrTU.cjs.map} +1 -1
- package/dist/{window-C7yY9yp5.js → window-B_55dzk0.js} +3 -3
- package/dist/{window-C7yY9yp5.js.map → window-B_55dzk0.js.map} +1 -1
- package/dist/window.cjs +1 -1
- package/dist/window.js +1 -1
- package/package.json +1 -2
- package/skills/schmancy/INDEX.md +3 -6
- package/skills/schmancy/SKILL.md +13 -9
- package/src/content-drawer/drawer.ts +24 -7
- package/src/content-drawer/events.ts +6 -0
- package/src/content-drawer/sheet.ts +13 -12
- package/src/date-range/date-range-dialog.ts +4 -4
- package/src/date-range/date-range.ts +35 -53
- package/src/index.ts +0 -4
- package/src/menu/menu-item.ts +7 -2
- package/src/menu/menu.ts +24 -20
- package/types/src/content-drawer/drawer.d.ts +2 -0
- package/types/src/content-drawer/events.d.ts +6 -0
- package/types/src/content-drawer/sheet.d.ts +6 -5
- package/types/src/date-range/date-range.d.ts +1 -5
- package/types/src/index.d.ts +0 -4
- package/types/src/menu/menu-item.d.ts +1 -0
- package/types/src/menu/menu.d.ts +9 -7
- package/dist/agent/vendor-highlight-CHJZQQB7.js +0 -2178
- package/dist/agent/vendor-highlight-CHJZQQB7.js.map +0 -1
- package/dist/code-highlight-CMilN0B8.cjs +0 -190
- package/dist/code-highlight-CMilN0B8.cjs.map +0 -1
- package/dist/code-highlight-kFUJ1Eet.js +0 -296
- package/dist/code-highlight-kFUJ1Eet.js.map +0 -1
- package/dist/code-highlight.cjs +0 -1
- package/dist/code-highlight.js +0 -2
- package/dist/date-range-BIyrzTRZ.cjs +0 -131
- package/dist/date-range-BIyrzTRZ.cjs.map +0 -1
- package/dist/date-range-DOstCIg8.js.map +0 -1
- package/dist/dialog-service-DI9PPy4H.js +0 -193
- package/dist/dialog-service-DI9PPy4H.js.map +0 -1
- package/dist/dialog-service-DJd5L0f5.cjs +0 -1
- package/dist/dialog-service-DJd5L0f5.cjs.map +0 -1
- package/dist/dialog.cjs +0 -89
- package/dist/dialog.cjs.map +0 -1
- package/dist/dialog.js +0 -419
- package/dist/dialog.js.map +0 -1
- package/dist/mailbox-Ct6iYe-4.cjs +0 -1140
- package/dist/mailbox-Ct6iYe-4.cjs.map +0 -1
- package/dist/mailbox-DsPII8HR.js +0 -1596
- package/dist/mailbox-DsPII8HR.js.map +0 -1
- package/dist/mailbox.cjs +0 -1
- package/dist/mailbox.js +0 -2
- package/dist/menu-Bhd3EapX.js +0 -56
- package/dist/menu-Bhd3EapX.js.map +0 -1
- package/dist/menu-Cg2aaDjs.cjs +0 -23
- package/dist/menu-Cg2aaDjs.cjs.map +0 -1
- package/dist/mixins-CcIWET41.js +0 -627
- package/dist/mixins-De3xfjrm.cjs +0 -298
- package/dist/sheet-BRL07BB4.js +0 -170
- package/dist/sheet-BRL07BB4.js.map +0 -1
- package/dist/sheet-BYQJAHQn.cjs +0 -35
- package/dist/sheet-BYQJAHQn.cjs.map +0 -1
- package/dist/sheet.cjs +0 -1
- package/dist/sheet.js +0 -3
- package/dist/sheet.service-B25bsrYG.cjs +0 -1
- package/dist/sheet.service-B25bsrYG.cjs.map +0 -1
- package/dist/sheet.service-SPQ8oLCi.js +0 -86
- package/dist/sheet.service-SPQ8oLCi.js.map +0 -1
- package/dist/skills/code-highlight.md +0 -47
- package/dist/skills/dialog.md +0 -69
- package/dist/skills/mailbox.md +0 -102
- package/dist/skills/schmancy/code-highlight.md +0 -47
- package/dist/skills/schmancy/dialog.md +0 -69
- package/dist/skills/schmancy/mailbox.md +0 -102
- package/dist/skills/schmancy/sheet.md +0 -76
- package/dist/skills/sheet.md +0 -76
- package/dist/src-CpRNClhg.cjs.map +0 -1
- package/dist/src-CqdnWGgr.js.map +0 -1
- package/dist/theme-Hjz9sCN-.cjs +0 -181
- package/dist/theme.events-Cv7N4Toe.js +0 -2
- package/dist/theme.events-Cv7N4Toe.js.map +0 -1
- package/dist/theme.events-DM4H5F2d.cjs +0 -1
- package/dist/theme.events-DM4H5F2d.cjs.map +0 -1
- package/dist/theme.service-BrUbGoeQ.cjs +0 -1
- package/dist/theme.service-BrUbGoeQ.cjs.map +0 -1
- package/dist/theme.service-CmbOGMA8.js.map +0 -1
- package/skills/schmancy/code-highlight.md +0 -47
- package/skills/schmancy/dialog.md +0 -69
- package/skills/schmancy/mailbox.md +0 -102
- package/skills/schmancy/sheet.md +0 -76
- package/src/code-highlight/code-highlight.ts +0 -345
- package/src/code-highlight/code-preview.ts +0 -125
- package/src/code-highlight/index.ts +0 -3
- package/src/dialog/dialog-base.mixin.ts +0 -576
- package/src/dialog/dialog-events.ts +0 -17
- package/src/dialog/dialog-service.ts +0 -494
- package/src/dialog/dialog.component.ts +0 -414
- package/src/dialog/index.ts +0 -3
- package/src/mailbox/README.md +0 -128
- package/src/mailbox/email-editor.ts +0 -1077
- package/src/mailbox/email-layout-selector.ts +0 -58
- package/src/mailbox/email-recipients.ts +0 -599
- package/src/mailbox/email-template-picker.ts +0 -297
- package/src/mailbox/email-viewer.ts +0 -717
- package/src/mailbox/index.ts +0 -31
- package/src/mailbox/mailbox.ts +0 -364
- package/src/mailbox/types.ts +0 -180
- package/src/sheet/hook.ts +0 -40
- package/src/sheet/index.ts +0 -2
- package/src/sheet/sheet.service.ts +0 -245
- package/src/sheet/sheet.ts +0 -238
- package/types/src/code-highlight/code-highlight.d.ts +0 -49
- package/types/src/code-highlight/code-preview.d.ts +0 -30
- package/types/src/code-highlight/index.d.ts +0 -3
- package/types/src/dialog/dialog-base.mixin.d.ts +0 -30
- package/types/src/dialog/dialog-events.d.ts +0 -13
- package/types/src/dialog/dialog-service.d.ts +0 -91
- package/types/src/dialog/dialog.component.d.ts +0 -150
- package/types/src/dialog/index.d.ts +0 -3
- package/types/src/mailbox/email-editor.d.ts +0 -101
- package/types/src/mailbox/email-layout-selector.d.ts +0 -18
- package/types/src/mailbox/email-recipients.d.ts +0 -122
- package/types/src/mailbox/email-template-picker.d.ts +0 -54
- package/types/src/mailbox/email-viewer.d.ts +0 -86
- package/types/src/mailbox/index.d.ts +0 -12
- package/types/src/mailbox/mailbox.d.ts +0 -82
- package/types/src/mailbox/types.d.ts +0 -176
- package/types/src/sheet/hook.d.ts +0 -5
- package/types/src/sheet/index.d.ts +0 -2
- package/types/src/sheet/sheet.d.ts +0 -29
- package/types/src/sheet/sheet.service.d.ts +0 -65
- /package/dist/agent/{flow-CaPi2G8y.js → flow-3RrZM-e7.js} +0 -0
- /package/dist/agent/{vendor-jsqr-r7GNh4P3.js → vendor-jsqr-BUVwyoGC.js} +0 -0
- /package/dist/agent/{vendor-material-color-Be96dpGE.js → vendor-material-color-33Mj762T.js} +0 -0
- /package/dist/{context-daN5G6HS.cjs → context-BpCETidA.cjs} +0 -0
- /package/dist/{context-Bdu1xt0W.js → context-DJTJnSK4.js} +0 -0
- /package/dist/{form-BtwOBMZ9.js → form-BF1c3Dk1.js} +0 -0
- /package/dist/{form-CSJp687X.cjs → form-DeO5XX3b.cjs} +0 -0
- /package/dist/{hashContent-1ARKIsx9.js → hashContent-BU6jl5ih.js} +0 -0
- /package/dist/{hashContent-Bp5S6T4U.cjs → hashContent-Bobsobip.cjs} +0 -0
- /package/dist/{magnetic-BH0TsofV.cjs → magnetic-BJgB1dVi.cjs} +0 -0
- /package/dist/{magnetic-BZGFxAWG.js → magnetic-YwCNvtbB.js} +0 -0
- /package/dist/{overlay-stack-CAQno0CK.js → overlay-stack-DCDS17uj.js} +0 -0
- /package/dist/{overlay-stack-BprhAE9a.cjs → overlay-stack-DPIe_aYv.cjs} +0 -0
- /package/dist/{rxjs-utils-d-ivVN84.js → rxjs-utils-BK8VMe3K.js} +0 -0
- /package/dist/{rxjs-utils-Csnks202.cjs → rxjs-utils-DhOKenkS.cjs} +0 -0
- /package/dist/{theme.interface-D9l33b-M.cjs → theme.interface-BeW-sz_g.cjs} +0 -0
- /package/dist/{theme.interface-DnVNre4O.js → theme.interface-v7SkAnDH.js} +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
|
-
|
|
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 
|
|
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;"> </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
|
-
}
|