@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 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"theme.service-CmbOGMA8.js","names":[],"sources":["../src/theme/theme.service.ts"],"sourcesContent":["import {\n BehaviorSubject,\n Observable,\n fromEvent,\n timer,\n map,\n takeUntil,\n defaultIfEmpty,\n distinctUntilChanged,\n shareReplay,\n tap,\n switchMap,\n of\n} from 'rxjs'\nimport { ThemeHereIAm, ThemeHereIAmEvent, ThemeWhereAreYou } from './theme.events'\nimport type { SchmancyThemeComponent } from './theme.component'\nimport type { TSchmancyTheme } from './theme.interface'\nimport { state } from '../state'\n\ninterface ThemeSettings {\n scheme: 'dark' | 'light' | 'auto'\n color: string\n}\n\n// Theme settings — persists to localStorage under namespace `schmancy/theme`.\nconst ThemeContext = state<ThemeSettings>('schmancy/theme').local({\n scheme: 'auto',\n color: '#6200ee',\n})\n\n/**\n * Theme Service - Provides centralized theme management for Schmancy components.\n *\n * This service acts as a singleton interface to interact with the theme system,\n * providing reactive observables for theme state and methods to control theming.\n *\n * @example\n * ```typescript\n * import { theme } from '@schmancy/theme'\n *\n * // Subscribe to theme changes\n * theme.scheme$.subscribe(scheme => {\n * console.log('Current scheme:', scheme) // 'light' | 'dark' | 'auto'\n * })\n *\n * // Get current values synchronously\n * const currentScheme = theme.scheme\n * const currentColor = theme.color\n *\n * // Toggle between light and dark mode\n * theme.toggleScheme()\n *\n * // Set specific scheme\n * theme.setScheme('dark')\n *\n * // Check if dark mode is active\n * theme.isDarkMode().subscribe(isDark => {\n * console.log('Is dark mode:', isDark)\n * })\n * ```\n */\nclass ThemeService {\n private static instance: ThemeService\n\n // Observable properties for theme values\n private _theme$ = new BehaviorSubject<Partial<TSchmancyTheme>>({})\n private _themeComponent$ = new BehaviorSubject<SchmancyThemeComponent | null>(null)\n private _fullscreen$ = new BehaviorSubject<boolean>(false)\n private _bottomOffset$ = new BehaviorSubject<number>(0)\n\n // Public observables derived from context\n public readonly scheme$ = ThemeContext.$.pipe(\n map(settings => settings.scheme),\n distinctUntilChanged(),\n shareReplay(1)\n )\n\n public readonly color$ = ThemeContext.$.pipe(\n map(settings => settings.color),\n distinctUntilChanged(),\n shareReplay(1)\n )\n\n public readonly theme$ = this._theme$.asObservable().pipe(\n distinctUntilChanged((a, b) => JSON.stringify(a) === JSON.stringify(b)),\n shareReplay(1)\n )\n\n public readonly themeComponent$ = this._themeComponent$.asObservable().pipe(\n distinctUntilChanged(),\n shareReplay(1)\n )\n\n public readonly fullscreen$ = this._fullscreen$.asObservable().pipe(\n distinctUntilChanged(),\n shareReplay(1)\n )\n\n public readonly bottomOffset$ = this._bottomOffset$.asObservable().pipe(\n distinctUntilChanged(),\n shareReplay(1)\n )\n\n // Getters for synchronous access to current values\n get scheme(): 'dark' | 'light' | 'auto' {\n return ThemeContext.value.scheme\n }\n\n get color(): string {\n return ThemeContext.value.color\n }\n\n get theme(): Partial<TSchmancyTheme> {\n return this._theme$.getValue()\n }\n\n get themeComponent(): SchmancyThemeComponent | null {\n return this._themeComponent$.getValue()\n }\n\n get fullscreen(): boolean {\n return this._fullscreen$.getValue()\n }\n\n get bottomOffset(): number {\n return this._bottomOffset$.getValue()\n }\n\n // Computed observable for actual scheme (resolving 'auto')\n public readonly resolvedScheme$ = this.scheme$.pipe(\n switchMap(scheme => {\n if (scheme === 'auto') {\n // Listen to system preference changes\n const mediaQuery = window.matchMedia('(prefers-color-scheme: dark)')\n return new Observable<'dark' | 'light'>(subscriber => {\n const handler = (e: MediaQueryListEvent) => {\n subscriber.next(e.matches ? 'dark' : 'light')\n }\n mediaQuery.addEventListener('change', handler)\n\n // Emit initial value\n subscriber.next(mediaQuery.matches ? 'dark' : 'light')\n\n // Cleanup\n return () => mediaQuery.removeEventListener('change', handler)\n })\n }\n return of(scheme as 'dark' | 'light')\n }),\n distinctUntilChanged(),\n shareReplay(1)\n )\n\n constructor() {\n this.discoverTheme()\n }\n\n /**\n * Discover the nearest theme component in the DOM.\n * This method can be called to refresh the theme discovery process.\n *\n * @returns {Observable<SchmancyThemeComponent | null>} Observable that emits the discovered theme component or null\n *\n * @example\n * ```typescript\n * theme.discoverTheme().subscribe(component => {\n * if (component) {\n * console.log('Theme component found:', component)\n * } else {\n * console.log('No theme component found')\n * }\n * })\n * ```\n */\n public discoverTheme(): Observable<SchmancyThemeComponent | null> {\n // Dispatch discovery event and wait for response\n return fromEvent<ThemeHereIAmEvent>(window, ThemeHereIAm).pipe(\n takeUntil(timer(100)), // Wait up to 100ms for response\n map(e => e.detail.theme as SchmancyThemeComponent),\n defaultIfEmpty(null),\n tap(themeComponent => {\n if (themeComponent) {\n this.registerThemeComponent(themeComponent)\n }\n })\n ).pipe(\n tap(() => {\n // Trigger theme discovery\n window.dispatchEvent(\n new CustomEvent(ThemeWhereAreYou, {\n bubbles: true,\n composed: true,\n })\n )\n }),\n switchMap(() =>\n fromEvent<ThemeHereIAmEvent>(window, ThemeHereIAm).pipe(\n takeUntil(timer(100)),\n map(e => e.detail.theme as SchmancyThemeComponent),\n defaultIfEmpty(null),\n tap(themeComponent => {\n if (themeComponent) {\n this.registerThemeComponent(themeComponent)\n }\n })\n )\n )\n )\n }\n\n /**\n * Register a theme component and subscribe to its changes.\n * This is typically called internally by theme components when they mount or update.\n *\n * @param {SchmancyThemeComponent} component - The theme component to register\n *\n * @internal\n */\n public registerThemeComponent(component: SchmancyThemeComponent): void {\n this._themeComponent$.next(component)\n\n // Update values from the component\n ThemeContext.set({ scheme: component.scheme, color: component.color })\n this._theme$.next(component.theme)\n }\n\n /**\n * Update theme values. Usually called internally by theme components.\n *\n * @param {Object} values - Theme values to update\n * @param {'dark' | 'light' | 'auto'} [values.scheme] - Color scheme to set\n * @param {string} [values.color] - Primary color in hex format\n * @param {Partial<TSchmancyTheme>} [values.theme] - Theme configuration object\n *\n * @internal\n */\n public updateTheme(values: {\n scheme?: 'dark' | 'light' | 'auto'\n color?: string\n theme?: Partial<TSchmancyTheme>\n }): void {\n const updates: Partial<ThemeSettings> = {}\n if (values.scheme !== undefined) {\n updates.scheme = values.scheme\n }\n if (values.color !== undefined) {\n updates.color = values.color\n }\n if (Object.keys(updates).length > 0) {\n ThemeContext.set(updates)\n }\n if (values.theme !== undefined) {\n this._theme$.next(values.theme)\n }\n }\n\n /**\n * Set the color scheme for the application.\n *\n * @param {'dark' | 'light' | 'auto'} scheme - The color scheme to set\n *\n * @example\n * ```typescript\n * // Set to dark mode\n * theme.setScheme('dark')\n *\n * // Set to auto (follows system preference)\n * theme.setScheme('auto')\n * ```\n */\n public setScheme(scheme: 'dark' | 'light' | 'auto'): void {\n const component = this.themeComponent\n if (component) {\n component.scheme = scheme\n ThemeContext.set({ scheme })\n } else {\n console.warn('No theme component found. Scheme change may not persist.')\n ThemeContext.set({ scheme })\n }\n }\n\n /**\n * Set the primary color for the theme.\n *\n * @param {string} color - Primary color in hex format (e.g., '#6200ee')\n *\n * @example\n * ```typescript\n * // Set primary color to purple\n * theme.setColor('#6200ee')\n *\n * // Set primary color to blue\n * theme.setColor('#2196f3')\n * ```\n */\n public setColor(color: string): void {\n const component = this.themeComponent\n if (component) {\n component.color = color\n ThemeContext.set({ color })\n } else {\n console.warn('No theme component found. Color change may not persist.')\n ThemeContext.set({ color })\n }\n }\n\n /**\n * Check if dark mode is currently active.\n * This resolves 'auto' scheme to the actual value based on system preference.\n *\n * @returns {Observable<boolean>} Observable that emits true if dark mode is active, false otherwise\n *\n * @example\n * ```typescript\n * theme.isDarkMode().subscribe(isDark => {\n * if (isDark) {\n * console.log('Dark mode is active')\n * } else {\n * console.log('Light mode is active')\n * }\n * })\n * ```\n */\n public isDarkMode(): Observable<boolean> {\n return this.resolvedScheme$.pipe(\n map(scheme => scheme === 'dark')\n )\n }\n\n /**\n * Toggle between light and dark mode.\n * If currently in 'auto' mode, defaults to 'light'.\n *\n * @example\n * ```typescript\n * // Toggle theme on button click\n * button.addEventListener('click', () => {\n * theme.toggleScheme()\n * })\n * ```\n */\n public toggleScheme(): void {\n const currentScheme = this.scheme\n const newScheme = currentScheme === 'dark' ? 'light' :\n currentScheme === 'light' ? 'dark' :\n 'light' // If 'auto', default to 'light'\n this.setScheme(newScheme)\n }\n\n /**\n * Get the current value of a CSS variable from the theme.\n *\n * @param {string} variableName - Name of the CSS variable (without '--schmancy-' prefix)\n * @returns {string} The CSS variable value or empty string if not found\n *\n * @example\n * ```typescript\n * // Get primary color variable\n * const primaryColor = theme.getCSSVariable('color-primary')\n *\n * // Get surface color\n * const surfaceColor = theme.getCSSVariable('color-surface')\n * ```\n */\n public getCSSVariable(variableName: string): string {\n const component = this.themeComponent\n if (component) {\n const host = component.root ? document.body : (component.shadowRoot?.host as HTMLElement)\n if (host) {\n return getComputedStyle(host).getPropertyValue(`--schmancy-${variableName}`).trim()\n }\n }\n return ''\n }\n\n /**\n * Subscribe to changes of a specific CSS variable.\n *\n * @param {string} variableName - Name of the CSS variable to watch (without '--schmancy-' prefix)\n * @returns {Observable<string>} Observable that emits the CSS variable value when it changes\n *\n * @example\n * ```typescript\n * // Watch for primary color changes\n * theme.watchCSSVariable('color-primary').subscribe(color => {\n * console.log('Primary color changed to:', color)\n * })\n *\n * // Watch for surface color changes\n * theme.watchCSSVariable('color-surface').subscribe(color => {\n * console.log('Surface color changed to:', color)\n * })\n * ```\n */\n public watchCSSVariable(variableName: string): Observable<string> {\n return this.theme$.pipe(\n map(() => this.getCSSVariable(variableName)),\n distinctUntilChanged()\n )\n }\n\n /**\n * Set the fullscreen state for the application.\n * This emits a custom event that navigation components can listen to.\n *\n * @param {boolean} value - Whether fullscreen mode is active\n *\n * @example\n * ```typescript\n * // Enter fullscreen mode\n * theme.setFullscreen(true)\n *\n * // Exit fullscreen mode\n * theme.setFullscreen(false)\n * ```\n */\n public setFullscreen(value: boolean): void {\n this._fullscreen$.next(value)\n\n // Emit custom event for components to listen to\n window.dispatchEvent(\n new CustomEvent('fullscreen', {\n detail: value,\n bubbles: true,\n composed: true\n })\n )\n }\n\n /**\n * Toggle fullscreen mode.\n *\n * @example\n * ```typescript\n * // Toggle fullscreen mode on button click\n * button.addEventListener('click', () => {\n * theme.toggleFullscreen()\n * })\n * ```\n */\n public toggleFullscreen(): void {\n this.setFullscreen(!this.fullscreen)\n }\n\n /**\n * Set the bottom offset for viewport calculations.\n * Used by navigation bars to inform fullHeight directive of reserved space.\n *\n * @param {number} value - Bottom offset in pixels\n *\n * @example\n * ```typescript\n * // Set bottom offset when nav bar is visible\n * theme.setBottomOffset(80)\n *\n * // Clear bottom offset when nav bar is hidden\n * theme.setBottomOffset(0)\n * ```\n */\n public setBottomOffset(value: number): void {\n this._bottomOffset$.next(value)\n }\n\n /**\n * Convenience method to update theme state including fullscreen.\n * Can be called with next() like syntax for familiarity.\n *\n * @param {Object} values - Theme values to update\n * @param {boolean} [values.fullscreen] - Fullscreen state\n * @param {'dark' | 'light' | 'auto'} [values.scheme] - Color scheme\n * @param {string} [values.color] - Primary color\n *\n * @example\n * ```typescript\n * // Set fullscreen mode\n * theme.next({ fullscreen: true })\n *\n * // Update multiple values\n * theme.next({\n * fullscreen: true,\n * scheme: 'dark'\n * })\n * ```\n */\n public next(values: {\n fullscreen?: boolean\n scheme?: 'dark' | 'light' | 'auto'\n color?: string\n }): void {\n if (values.fullscreen !== undefined) {\n this.setFullscreen(values.fullscreen)\n }\n if (values.scheme !== undefined) {\n this.setScheme(values.scheme)\n }\n if (values.color !== undefined) {\n this.setColor(values.color)\n }\n }\n\n /**\n * Get the singleton instance of ThemeService.\n *\n * @returns {ThemeService} The singleton ThemeService instance\n *\n * @internal\n */\n static getInstance(): ThemeService {\n if (!ThemeService.instance) {\n ThemeService.instance = new ThemeService()\n }\n return ThemeService.instance\n }\n}\n\n/**\n * Theme singleton. Reads and mutates the active theme (scheme, source color,\n * locale); persists the user's scheme choice. Components subscribe via\n * `theme.theme$` for changes.\n *\n * @service\n * @summary Theme service — active scheme, source color, locale.\n * @method next({ scheme?, source?, locale? }) - Update theme state.\n * @method theme$ - Observable<TSchmancyTheme>; emits on every theme change.\n * @method toggle() - Toggle between light and dark schemes.\n */\nexport const theme = ThemeService.getInstance()\nexport const schmancyTheme = theme // Alias for convenience\nexport default theme"],"mappings":"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"}
|
|
@@ -1,47 +0,0 @@
|
|
|
1
|
-
# schmancy-code
|
|
2
|
-
|
|
3
|
-
> Syntax-highlighted code block with line numbers, copy button, and collapsible display.
|
|
4
|
-
|
|
5
|
-
## Usage
|
|
6
|
-
```html
|
|
7
|
-
<schmancy-code language="typescript" .code=${'const x = 42'}></schmancy-code>
|
|
8
|
-
```
|
|
9
|
-
|
|
10
|
-
## Properties
|
|
11
|
-
| Property | Type | Default | Description |
|
|
12
|
-
|----------|------|---------|-------------|
|
|
13
|
-
| code | string | `''` | Code content to highlight |
|
|
14
|
-
| language | string | `'javascript'` | Language for syntax highlighting |
|
|
15
|
-
| filename | string | `undefined` | Filename shown in header |
|
|
16
|
-
| lineNumbers | boolean | `false` | Show line numbers |
|
|
17
|
-
| copyButton | boolean | `true` | Show copy-to-clipboard button |
|
|
18
|
-
| highlightLines | string | `undefined` | Lines to highlight (e.g., `'1-3,5,7-9'`) |
|
|
19
|
-
| maxHeight | string | `undefined` | Max height before scrolling |
|
|
20
|
-
|
|
21
|
-
## Supported Languages
|
|
22
|
-
javascript, typescript, html, xml, markdown, bash
|
|
23
|
-
|
|
24
|
-
## Examples
|
|
25
|
-
```html
|
|
26
|
-
<!-- TypeScript with line numbers and highlighted lines -->
|
|
27
|
-
<schmancy-code
|
|
28
|
-
language="typescript"
|
|
29
|
-
lineNumbers
|
|
30
|
-
highlightLines="2-3"
|
|
31
|
-
.code=${`import { html } from 'lit'
|
|
32
|
-
const greeting = 'Hello'
|
|
33
|
-
console.log(greeting)`}>
|
|
34
|
-
</schmancy-code>
|
|
35
|
-
|
|
36
|
-
<!-- Bash with filename -->
|
|
37
|
-
<schmancy-code language="bash" filename="install.sh"
|
|
38
|
-
.code=${'npm install @mhmo91/schmancy'}>
|
|
39
|
-
</schmancy-code>
|
|
40
|
-
|
|
41
|
-
<!-- With max height -->
|
|
42
|
-
<schmancy-code language="javascript" maxHeight="300px"
|
|
43
|
-
.code=${longCodeString}>
|
|
44
|
-
</schmancy-code>
|
|
45
|
-
```
|
|
46
|
-
|
|
47
|
-
Renders inside a collapsible `schmancy-details` with a macOS-style header (colored dots + language label). Uses highlight.js with schmancy color tokens.
|
|
@@ -1,69 +0,0 @@
|
|
|
1
|
-
# schmancy-dialog / $dialog
|
|
2
|
-
|
|
3
|
-
> Dialog with glass surface, cursorGlow, and mobile bottom-sheet adaptation. Use `$dialog` service for imperative usage.
|
|
4
|
-
|
|
5
|
-
## Usage
|
|
6
|
-
```typescript
|
|
7
|
-
import { $dialog } from '@mhmo91/schmancy'
|
|
8
|
-
|
|
9
|
-
// Confirm dialog
|
|
10
|
-
const confirmed = await $dialog.confirm({
|
|
11
|
-
title: 'Delete item?',
|
|
12
|
-
message: 'This cannot be undone.',
|
|
13
|
-
confirmText: 'Delete',
|
|
14
|
-
cancelText: 'Cancel',
|
|
15
|
-
variant: 'danger',
|
|
16
|
-
})
|
|
17
|
-
|
|
18
|
-
// Component dialog (renders any template/element)
|
|
19
|
-
await $dialog.component(html`<my-editor .data=${item}></my-editor>`)
|
|
20
|
-
```
|
|
21
|
-
|
|
22
|
-
## $dialog API
|
|
23
|
-
| Method | Returns | Description |
|
|
24
|
-
|--------|---------|-------------|
|
|
25
|
-
| `confirm(options)` | `Promise<boolean>` | Show confirm dialog with title/message/buttons |
|
|
26
|
-
| `ask(message, event?)` | `Promise<boolean>` | Quick confirm with just a message |
|
|
27
|
-
| `danger(options)` | `Promise<boolean>` | Confirm with danger variant |
|
|
28
|
-
| `component(content, options?)` | `Promise<boolean>` | Show any template/element as dialog |
|
|
29
|
-
| `prompt(options)` | `Promise<string \| null>` | Input dialog, returns value or null |
|
|
30
|
-
| `dismiss()` | `boolean` | Dismiss topmost dialog |
|
|
31
|
-
|
|
32
|
-
## Confirm Options
|
|
33
|
-
| Option | Type | Default | Description |
|
|
34
|
-
|--------|------|---------|-------------|
|
|
35
|
-
| `title` | `string` | `undefined` | Dialog title |
|
|
36
|
-
| `subtitle` | `string` | `undefined` | Subtitle below title |
|
|
37
|
-
| `message` | `string` | `undefined` | Body message |
|
|
38
|
-
| `confirmText` | `string` | `'Confirm'` | Confirm button label |
|
|
39
|
-
| `cancelText` | `string` | `'Cancel'` | Cancel button label |
|
|
40
|
-
| `variant` | `'default' \| 'danger'` | `'default'` | Button color scheme |
|
|
41
|
-
| `position` | `{x,y} \| MouseEvent` | Last click | Animation origin |
|
|
42
|
-
| `content` | `TemplateResult \| HTMLElement` | `undefined` | Custom content in body |
|
|
43
|
-
|
|
44
|
-
## Physics
|
|
45
|
-
- **cursorGlow** on dialog surface (radius: 250, intensity: 0.1)
|
|
46
|
-
- Glass surface with `backdrop-blur-lg` and `backdrop-saturate-150`
|
|
47
|
-
- Luminous glow shadow around dialog container
|
|
48
|
-
- Mobile: renders as bottom sheet with drag handle and swipe dismiss
|
|
49
|
-
|
|
50
|
-
## Examples
|
|
51
|
-
```typescript
|
|
52
|
-
// Quick ask
|
|
53
|
-
if (await $dialog.ask('Remove this entry?', event)) {
|
|
54
|
-
removeEntry()
|
|
55
|
-
}
|
|
56
|
-
|
|
57
|
-
// Prompt for input
|
|
58
|
-
const name = await $dialog.prompt({
|
|
59
|
-
title: 'Rename',
|
|
60
|
-
label: 'New name',
|
|
61
|
-
defaultValue: currentName,
|
|
62
|
-
})
|
|
63
|
-
|
|
64
|
-
// Custom component dialog
|
|
65
|
-
await $dialog.component(
|
|
66
|
-
html`<user-profile-editor .user=${user}></user-profile-editor>`,
|
|
67
|
-
{ position: event }
|
|
68
|
-
)
|
|
69
|
-
```
|
|
@@ -1,102 +0,0 @@
|
|
|
1
|
-
# Schmancy Mailbox
|
|
2
|
-
|
|
3
|
-
> Full email composition + campaign management system. Orchestrates recipients, templates, editor, attachments, and preview.
|
|
4
|
-
|
|
5
|
-
## Components
|
|
6
|
-
|
|
7
|
-
| Tag | Purpose |
|
|
8
|
-
|-----|---------|
|
|
9
|
-
| `schmancy-mailbox` | Top-level orchestrator |
|
|
10
|
-
| `schmancy-email-editor` | Subject + body composition |
|
|
11
|
-
| `schmancy-email-viewer` | HTML/plaintext preview |
|
|
12
|
-
| `schmancy-email-recipients` | Recipient list with import/CSV |
|
|
13
|
-
| `schmancy-email-layout-selector` | Layout template picker |
|
|
14
|
-
| `schmancy-email-template-picker` | Email template browser |
|
|
15
|
-
|
|
16
|
-
## Usage
|
|
17
|
-
```html
|
|
18
|
-
<schmancy-mailbox
|
|
19
|
-
.config=${{
|
|
20
|
-
sendEndpoint: '/api/emails/send',
|
|
21
|
-
uploadEndpoint: '/api/uploads',
|
|
22
|
-
authenticateRequest: (req) => ({ ...req, headers: { Authorization: `Bearer ${token}` } })
|
|
23
|
-
}}
|
|
24
|
-
.templates=${myTemplates}
|
|
25
|
-
.importSources=${[
|
|
26
|
-
{ id: 'ticketholders', label: 'Ticket holders', icon: 'confirmation_number', handler: loadTicketHolders },
|
|
27
|
-
{ id: 'waitlist', label: 'Waitlist', icon: 'hourglass_empty', handler: loadWaitlist },
|
|
28
|
-
]}
|
|
29
|
-
></schmancy-mailbox>
|
|
30
|
-
```
|
|
31
|
-
|
|
32
|
-
## schmancy-mailbox Properties
|
|
33
|
-
| Property | Type | Default | Description |
|
|
34
|
-
|----------|------|---------|-------------|
|
|
35
|
-
| `config` | `EmailComposeConfig` | `{}` | Endpoints, auth, upload handlers |
|
|
36
|
-
| `templates` | `EmailTemplate[]` | `[]` | Available email templates |
|
|
37
|
-
| `importSources` | `ImportSource[]` | `[]` | Import buttons shown in recipients panel |
|
|
38
|
-
| `disabled` | boolean | `false` | Disable all interactions |
|
|
39
|
-
| `recipientsTitle` | string | `'Recipients'` | Recipients panel heading |
|
|
40
|
-
| `recipientsEmptyTitle` | string | `'No recipients yet'` | Empty state title |
|
|
41
|
-
| `recipientsEmptyMessage` | string | `'Import from sources or upload a CSV'` | Empty state body |
|
|
42
|
-
| `enableCsvImport` | boolean | `true` | Allow CSV file import |
|
|
43
|
-
| `enableDragDrop` | boolean | `true` | Accept dropped CSV files |
|
|
44
|
-
|
|
45
|
-
## Key Types
|
|
46
|
-
```typescript
|
|
47
|
-
interface EmailTemplate { id, name, subject, body, category?, thumbnail? }
|
|
48
|
-
|
|
49
|
-
interface EmailComposeConfig {
|
|
50
|
-
sendEndpoint?: string
|
|
51
|
-
templatesEndpoint?: string
|
|
52
|
-
uploadEndpoint?: string
|
|
53
|
-
authenticateRequest?: (req: RequestInit) => RequestInit
|
|
54
|
-
uploadHandler?: (file: File) => Promise<string>
|
|
55
|
-
imageUploadHandler?: (file: File) => Promise<string>
|
|
56
|
-
}
|
|
57
|
-
|
|
58
|
-
interface SendEmailRequest {
|
|
59
|
-
recipients: string[]
|
|
60
|
-
subject: string
|
|
61
|
-
body: string
|
|
62
|
-
attachments: EmailAttachment[]
|
|
63
|
-
templateId?: string | null
|
|
64
|
-
}
|
|
65
|
-
|
|
66
|
-
interface ImportSource {
|
|
67
|
-
id: string
|
|
68
|
-
label: string
|
|
69
|
-
icon: string // Material icon name
|
|
70
|
-
handler: () => void // Populates recipients via events
|
|
71
|
-
}
|
|
72
|
-
```
|
|
73
|
-
|
|
74
|
-
## Events
|
|
75
|
-
| Event | Detail | Where |
|
|
76
|
-
|-------|--------|-------|
|
|
77
|
-
| `emails-imported` | `{ emails, source }` | Recipients |
|
|
78
|
-
| `recipient-removed` | `{ email }` | Recipients |
|
|
79
|
-
| `recipients-cleared` | `{}` | Recipients |
|
|
80
|
-
| `selection-changed` | `{ selectedEmails }` | Recipients |
|
|
81
|
-
| `compose-changed` | `{ subject, body, templateId, attachments }` | Editor |
|
|
82
|
-
| `send-email` | `{ request: SendEmailRequest }` | Mailbox — consumer POSTs to backend |
|
|
83
|
-
| `send-error` | `{ error }` | Mailbox |
|
|
84
|
-
|
|
85
|
-
## Recipients Flow
|
|
86
|
-
1. User clicks an `ImportSource` button (or drops a CSV).
|
|
87
|
-
2. CSV is parsed → `validEmails`, `invalidEmails`, `duplicates` reported.
|
|
88
|
-
3. `emails-imported` event fires; mailbox merges into selected recipients.
|
|
89
|
-
4. User edits subject/body via email-editor; changes bubble as `compose-changed`.
|
|
90
|
-
5. On send, `send-email` fires with the full `SendEmailRequest` — parent handles network.
|
|
91
|
-
|
|
92
|
-
## Minimal Integration
|
|
93
|
-
```typescript
|
|
94
|
-
<schmancy-mailbox
|
|
95
|
-
.config=${config}
|
|
96
|
-
.templates=${templates}
|
|
97
|
-
@send-email=${async (e: CustomEvent<{ request: SendEmailRequest }>) => {
|
|
98
|
-
const result = await api.sendCampaign(e.detail.request)
|
|
99
|
-
if (!result.success) this.dispatchError(result.message)
|
|
100
|
-
}}
|
|
101
|
-
></schmancy-mailbox>
|
|
102
|
-
```
|
package/skills/schmancy/sheet.md
DELETED
|
@@ -1,76 +0,0 @@
|
|
|
1
|
-
# schmancy-sheet / sheet
|
|
2
|
-
|
|
3
|
-
> Side/bottom panel with glass backdrop, luminous edge glow, and spring entry animation. Use `sheet` service for imperative usage.
|
|
4
|
-
|
|
5
|
-
## Usage
|
|
6
|
-
```typescript
|
|
7
|
-
import { sheet } from '@mhmo91/schmancy'
|
|
8
|
-
|
|
9
|
-
sheet.push({
|
|
10
|
-
component: MyComponent, // Component class or tag name
|
|
11
|
-
position: SchmancySheetPosition.Side,
|
|
12
|
-
props: { itemId: '123' }, // Passed to component
|
|
13
|
-
})
|
|
14
|
-
```
|
|
15
|
-
|
|
16
|
-
## sheet API
|
|
17
|
-
| Method | Description |
|
|
18
|
-
|--------|-------------|
|
|
19
|
-
| `push(config)` | Open a sheet with component content |
|
|
20
|
-
| `dismiss(uid?)` | Close sheet by uid, or most recent |
|
|
21
|
-
| `closeAll()` | Close all open sheets |
|
|
22
|
-
| `isOpen(uid)` | Check if sheet with uid is open |
|
|
23
|
-
|
|
24
|
-
## SheetConfig
|
|
25
|
-
| Option | Type | Default | Description |
|
|
26
|
-
|--------|------|---------|-------------|
|
|
27
|
-
| `component` | `ComponentType` | required | Component class or lazy loader |
|
|
28
|
-
| `uid` | `string` | Auto-generated | Unique identifier for the sheet |
|
|
29
|
-
| `position` | `SchmancySheetPosition` | Auto (side on desktop, bottom on mobile) | `Side` or `Bottom` |
|
|
30
|
-
| `persist` | `boolean` | `false` | Keep DOM after close |
|
|
31
|
-
| `lock` | `boolean` | `false` | Prevent ESC and overlay click dismiss |
|
|
32
|
-
| `props` | `Record<string, unknown>` | `undefined` | Properties passed to component |
|
|
33
|
-
| `close` | `() => void` | `undefined` | Close callback |
|
|
34
|
-
|
|
35
|
-
## Component Properties (schmancy-sheet)
|
|
36
|
-
| Property | Type | Default | Description |
|
|
37
|
-
|----------|------|---------|-------------|
|
|
38
|
-
| `open` | `boolean` | `false` | Open state |
|
|
39
|
-
| `position` | `'side' \| 'bottom'` | `'side'` | Panel position |
|
|
40
|
-
| `persist` | `boolean` | `false` | Keep in DOM after close |
|
|
41
|
-
| `lock` | `boolean` | `false` | Disable dismiss via ESC/overlay |
|
|
42
|
-
| `handleHistory` | `boolean` | `true` | Handle browser back button |
|
|
43
|
-
|
|
44
|
-
## Events
|
|
45
|
-
| Event | Description |
|
|
46
|
-
|-------|-------------|
|
|
47
|
-
| `close` | Fired when sheet closes |
|
|
48
|
-
|
|
49
|
-
## Physics
|
|
50
|
-
- Glass backdrop: `backdrop-blur-lg` + `backdrop-saturate-150`
|
|
51
|
-
- Luminous edge glow on panel (primary color, 15% intensity)
|
|
52
|
-
- Spring entry: `scale(0.95)` to `scale(1)` with Blackbird easing
|
|
53
|
-
- Side: slides from right; Bottom: slides from bottom
|
|
54
|
-
- Background siblings set to `inert` while open
|
|
55
|
-
- Stacks with dialogs via shared `overlayStack` z-index manager
|
|
56
|
-
|
|
57
|
-
## Examples
|
|
58
|
-
```typescript
|
|
59
|
-
import { sheet, SchmancySheetPosition } from '@mhmo91/schmancy'
|
|
60
|
-
|
|
61
|
-
// Open side sheet
|
|
62
|
-
sheet.push({
|
|
63
|
-
component: UserEditor,
|
|
64
|
-
props: { userId: '456' },
|
|
65
|
-
})
|
|
66
|
-
|
|
67
|
-
// Locked bottom sheet
|
|
68
|
-
sheet.push({
|
|
69
|
-
component: PaymentForm,
|
|
70
|
-
position: SchmancySheetPosition.Bottom,
|
|
71
|
-
lock: true,
|
|
72
|
-
})
|
|
73
|
-
|
|
74
|
-
// Dismiss programmatically
|
|
75
|
-
sheet.dismiss()
|
|
76
|
-
```
|
|
@@ -1,345 +0,0 @@
|
|
|
1
|
-
import { SchmancyElement } from '@mixins/index'
|
|
2
|
-
import hljs from 'highlight.js/lib/core'
|
|
3
|
-
import bash from 'highlight.js/lib/languages/bash'
|
|
4
|
-
import javascript from 'highlight.js/lib/languages/javascript'
|
|
5
|
-
import markdown from 'highlight.js/lib/languages/markdown'
|
|
6
|
-
import typescript from 'highlight.js/lib/languages/typescript'
|
|
7
|
-
import xml from 'highlight.js/lib/languages/xml'
|
|
8
|
-
import { css, html } from 'lit'
|
|
9
|
-
import { customElement, property, state } from 'lit/decorators.js'
|
|
10
|
-
import { unsafeHTML } from 'lit/directives/unsafe-html.js'
|
|
11
|
-
|
|
12
|
-
// Register only the languages we need
|
|
13
|
-
hljs.registerLanguage('javascript', javascript)
|
|
14
|
-
hljs.registerLanguage('typescript', typescript)
|
|
15
|
-
hljs.registerLanguage('html', xml)
|
|
16
|
-
hljs.registerLanguage('xml', xml)
|
|
17
|
-
hljs.registerLanguage('markdown', markdown)
|
|
18
|
-
hljs.registerLanguage('bash', bash)
|
|
19
|
-
|
|
20
|
-
/**
|
|
21
|
-
* @element schmancy-code
|
|
22
|
-
* Code highlighting component using highlight.js with schmancy theming support
|
|
23
|
-
*/
|
|
24
|
-
@customElement('schmancy-code')
|
|
25
|
-
export class SchmancyCode extends SchmancyElement {
|
|
26
|
-
static styles = [css`
|
|
27
|
-
:host {
|
|
28
|
-
display: block;
|
|
29
|
-
width: 100%;
|
|
30
|
-
overflow: hidden;
|
|
31
|
-
}
|
|
32
|
-
|
|
33
|
-
/* Code block styling using schmancy color system */
|
|
34
|
-
.hljs {
|
|
35
|
-
display: block;
|
|
36
|
-
overflow-x: auto;
|
|
37
|
-
padding: 0.5em;
|
|
38
|
-
color: var(--md-sys-color-on-surface-variant);
|
|
39
|
-
background: var(--md-sys-color-surface-container-lowest);
|
|
40
|
-
font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, 'Liberation Mono', 'Courier New', monospace;
|
|
41
|
-
}
|
|
42
|
-
|
|
43
|
-
/* Comments and documentation */
|
|
44
|
-
.hljs-comment,
|
|
45
|
-
.hljs-quote {
|
|
46
|
-
color: var(--md-sys-color-outline);
|
|
47
|
-
font-style: italic;
|
|
48
|
-
}
|
|
49
|
-
|
|
50
|
-
/* Keywords, doctags, formulas */
|
|
51
|
-
.hljs-doctag,
|
|
52
|
-
.hljs-keyword,
|
|
53
|
-
.hljs-formula {
|
|
54
|
-
color: var(--md-sys-color-primary);
|
|
55
|
-
}
|
|
56
|
-
|
|
57
|
-
/* Tags, sections, names, deletions */
|
|
58
|
-
.hljs-section,
|
|
59
|
-
.hljs-name,
|
|
60
|
-
.hljs-selector-tag,
|
|
61
|
-
.hljs-deletion,
|
|
62
|
-
.hljs-subst {
|
|
63
|
-
color: var(--md-sys-color-error);
|
|
64
|
-
}
|
|
65
|
-
|
|
66
|
-
/* Literals */
|
|
67
|
-
.hljs-literal {
|
|
68
|
-
color: var(--md-sys-color-tertiary);
|
|
69
|
-
}
|
|
70
|
-
|
|
71
|
-
/* Strings, regex, additions */
|
|
72
|
-
.hljs-string,
|
|
73
|
-
.hljs-regexp,
|
|
74
|
-
.hljs-addition,
|
|
75
|
-
.hljs-attribute,
|
|
76
|
-
.hljs-meta-string {
|
|
77
|
-
color: var(--md-sys-color-secondary);
|
|
78
|
-
}
|
|
79
|
-
|
|
80
|
-
/* Built-ins and class titles */
|
|
81
|
-
.hljs-built_in,
|
|
82
|
-
.hljs-class .hljs-title {
|
|
83
|
-
color: var(--md-sys-color-tertiary);
|
|
84
|
-
}
|
|
85
|
-
|
|
86
|
-
/* Variables, attributes, types */
|
|
87
|
-
.hljs-attr,
|
|
88
|
-
.hljs-variable,
|
|
89
|
-
.hljs-template-variable,
|
|
90
|
-
.hljs-type,
|
|
91
|
-
.hljs-selector-class,
|
|
92
|
-
.hljs-selector-attr,
|
|
93
|
-
.hljs-selector-pseudo,
|
|
94
|
-
.hljs-number {
|
|
95
|
-
color: var(--md-sys-color-on-surface);
|
|
96
|
-
}
|
|
97
|
-
|
|
98
|
-
/* Symbols, bullets, links, meta */
|
|
99
|
-
.hljs-symbol,
|
|
100
|
-
.hljs-bullet,
|
|
101
|
-
.hljs-link,
|
|
102
|
-
.hljs-meta,
|
|
103
|
-
.hljs-selector-id,
|
|
104
|
-
.hljs-title {
|
|
105
|
-
color: var(--md-sys-color-secondary);
|
|
106
|
-
}
|
|
107
|
-
|
|
108
|
-
.hljs-emphasis {
|
|
109
|
-
font-style: italic;
|
|
110
|
-
}
|
|
111
|
-
|
|
112
|
-
.hljs-strong {
|
|
113
|
-
font-weight: bold;
|
|
114
|
-
}
|
|
115
|
-
|
|
116
|
-
.hljs-link {
|
|
117
|
-
text-decoration: underline;
|
|
118
|
-
}
|
|
119
|
-
|
|
120
|
-
/* Line features styling */
|
|
121
|
-
.code-with-lines {
|
|
122
|
-
background: transparent;
|
|
123
|
-
padding: 0;
|
|
124
|
-
}
|
|
125
|
-
|
|
126
|
-
.code-line {
|
|
127
|
-
display: block;
|
|
128
|
-
padding-left: 0;
|
|
129
|
-
transition: background-color 0.2s ease;
|
|
130
|
-
}
|
|
131
|
-
|
|
132
|
-
.code-line.highlighted {
|
|
133
|
-
background-color: var(--md-sys-color-primary-container);
|
|
134
|
-
opacity: 0.2;
|
|
135
|
-
}
|
|
136
|
-
|
|
137
|
-
.line-number {
|
|
138
|
-
display: inline-block;
|
|
139
|
-
width: 3rem;
|
|
140
|
-
padding-right: 1rem;
|
|
141
|
-
text-align: right;
|
|
142
|
-
color: var(--md-sys-color-outline);
|
|
143
|
-
user-select: none;
|
|
144
|
-
font-size: inherit;
|
|
145
|
-
}
|
|
146
|
-
`];
|
|
147
|
-
/**
|
|
148
|
-
* Programming language for syntax highlighting
|
|
149
|
-
*/
|
|
150
|
-
@property({ type: String })
|
|
151
|
-
language: string = 'javascript'
|
|
152
|
-
|
|
153
|
-
/**
|
|
154
|
-
* Code content to highlight
|
|
155
|
-
*/
|
|
156
|
-
@property({ type: String })
|
|
157
|
-
code: string = ''
|
|
158
|
-
|
|
159
|
-
/**
|
|
160
|
-
* Optional filename or title to display in header
|
|
161
|
-
*/
|
|
162
|
-
@property({ type: String })
|
|
163
|
-
filename?: string
|
|
164
|
-
|
|
165
|
-
/**
|
|
166
|
-
* Show line numbers
|
|
167
|
-
*/
|
|
168
|
-
@property({ type: Boolean })
|
|
169
|
-
lineNumbers: boolean = false
|
|
170
|
-
|
|
171
|
-
/**
|
|
172
|
-
* Show copy button
|
|
173
|
-
*/
|
|
174
|
-
@property({ type: Boolean })
|
|
175
|
-
copyButton: boolean = true
|
|
176
|
-
|
|
177
|
-
/**
|
|
178
|
-
* Highlighted line numbers (comma-separated or ranges like "1-3,5,7-9")
|
|
179
|
-
*/
|
|
180
|
-
@property({ type: String })
|
|
181
|
-
highlightLines?: string
|
|
182
|
-
|
|
183
|
-
/**
|
|
184
|
-
* Maximum height before scrolling
|
|
185
|
-
*/
|
|
186
|
-
@property({ type: String })
|
|
187
|
-
maxHeight?: string
|
|
188
|
-
|
|
189
|
-
@state()
|
|
190
|
-
private copied: boolean = false
|
|
191
|
-
|
|
192
|
-
private get highlightedCode(): string {
|
|
193
|
-
if (!this.code) return ''
|
|
194
|
-
|
|
195
|
-
let highlightedHtml = ''
|
|
196
|
-
|
|
197
|
-
try {
|
|
198
|
-
// Use highlight.js to get highlighted code
|
|
199
|
-
const result = hljs.highlight(this.code.trim(), { language: this.language })
|
|
200
|
-
highlightedHtml = result.value
|
|
201
|
-
} catch {
|
|
202
|
-
// Fallback to auto-detection if language is not supported
|
|
203
|
-
try {
|
|
204
|
-
const result = hljs.highlightAuto(this.code.trim())
|
|
205
|
-
highlightedHtml = result.value
|
|
206
|
-
} catch {
|
|
207
|
-
// Final fallback to escaped plain text
|
|
208
|
-
highlightedHtml = this.escapeHtml(this.code.trim())
|
|
209
|
-
}
|
|
210
|
-
}
|
|
211
|
-
|
|
212
|
-
// Process for line numbers and highlighting if needed
|
|
213
|
-
if (this.lineNumbers || this.highlightLines) {
|
|
214
|
-
return this.addLineFeatures(highlightedHtml)
|
|
215
|
-
}
|
|
216
|
-
|
|
217
|
-
return highlightedHtml
|
|
218
|
-
}
|
|
219
|
-
|
|
220
|
-
private escapeHtml(text: string): string {
|
|
221
|
-
const div = document.createElement('div')
|
|
222
|
-
div.textContent = text
|
|
223
|
-
return div.innerHTML
|
|
224
|
-
}
|
|
225
|
-
|
|
226
|
-
private getHighlightedLines(): Set<number> {
|
|
227
|
-
const lines = new Set<number>()
|
|
228
|
-
if (!this.highlightLines) return lines
|
|
229
|
-
|
|
230
|
-
const parts = this.highlightLines.split(',')
|
|
231
|
-
for (const part of parts) {
|
|
232
|
-
const trimmed = part.trim()
|
|
233
|
-
if (trimmed.includes('-')) {
|
|
234
|
-
const [start, end] = trimmed.split('-').map(n => parseInt(n.trim()))
|
|
235
|
-
if (!isNaN(start) && !isNaN(end)) {
|
|
236
|
-
for (let i = start; i <= end; i++) {
|
|
237
|
-
lines.add(i)
|
|
238
|
-
}
|
|
239
|
-
}
|
|
240
|
-
} else {
|
|
241
|
-
const lineNum = parseInt(trimmed)
|
|
242
|
-
if (!isNaN(lineNum)) {
|
|
243
|
-
lines.add(lineNum)
|
|
244
|
-
}
|
|
245
|
-
}
|
|
246
|
-
}
|
|
247
|
-
return lines
|
|
248
|
-
}
|
|
249
|
-
|
|
250
|
-
private addLineFeatures(highlightedHtml: string): string {
|
|
251
|
-
const lines = highlightedHtml.split('\n')
|
|
252
|
-
const highlightedLines = this.getHighlightedLines()
|
|
253
|
-
|
|
254
|
-
return lines
|
|
255
|
-
.map((line, index) => {
|
|
256
|
-
const lineNumber = index + 1
|
|
257
|
-
const isHighlighted = highlightedLines.has(lineNumber)
|
|
258
|
-
const lineClass = isHighlighted ? 'code-line highlighted' : 'code-line'
|
|
259
|
-
|
|
260
|
-
let content = ''
|
|
261
|
-
if (this.lineNumbers) {
|
|
262
|
-
content += `<span class="line-number">${lineNumber}</span>`
|
|
263
|
-
}
|
|
264
|
-
content += line
|
|
265
|
-
|
|
266
|
-
return `<div class="${lineClass}">${content}</div>`
|
|
267
|
-
})
|
|
268
|
-
.join('')
|
|
269
|
-
}
|
|
270
|
-
|
|
271
|
-
private async copyCode() {
|
|
272
|
-
try {
|
|
273
|
-
await navigator.clipboard.writeText(this.code)
|
|
274
|
-
this.copied = true
|
|
275
|
-
setTimeout(() => {
|
|
276
|
-
this.copied = false
|
|
277
|
-
}, 2000)
|
|
278
|
-
} catch (err) {
|
|
279
|
-
console.error('Failed to copy code:', err)
|
|
280
|
-
}
|
|
281
|
-
}
|
|
282
|
-
|
|
283
|
-
private getLanguageLabel(): string {
|
|
284
|
-
const languageMap: Record<string, string> = {
|
|
285
|
-
javascript: 'JavaScript',
|
|
286
|
-
typescript: 'TypeScript',
|
|
287
|
-
html: 'HTML',
|
|
288
|
-
markdown: 'Markdown',
|
|
289
|
-
bash: 'Bash',
|
|
290
|
-
}
|
|
291
|
-
|
|
292
|
-
if (this.filename) {
|
|
293
|
-
return this.filename
|
|
294
|
-
}
|
|
295
|
-
|
|
296
|
-
return languageMap[this.language.toLowerCase()] || this.language.toUpperCase()
|
|
297
|
-
}
|
|
298
|
-
|
|
299
|
-
render() {
|
|
300
|
-
const codeClass = this.lineNumbers || this.highlightLines ? 'code-with-lines' : 'hljs'
|
|
301
|
-
|
|
302
|
-
return html`
|
|
303
|
-
<schmancy-details class="bg-surface-default">
|
|
304
|
-
<section slot="summary">
|
|
305
|
-
<!-- Header -->
|
|
306
|
-
<div class="flex items-center justify-between"
|
|
307
|
-
>
|
|
308
|
-
<div class="flex items-center gap-2">
|
|
309
|
-
<div class="flex gap-1.5">
|
|
310
|
-
<div class="w-3 h-3 rounded-full opacity-60" style="background-color: var(--md-sys-color-error);"></div>
|
|
311
|
-
<div class="w-3 h-3 rounded-full opacity-60" style="background-color: var(--md-sys-color-tertiary);"></div>
|
|
312
|
-
<div class="w-3 h-3 rounded-full opacity-60" style="background-color: var(--md-sys-color-secondary);"></div>
|
|
313
|
-
</div>
|
|
314
|
-
<span class="text-xs font-medium opacity-70 ml-2" style="color: var(--md-sys-color-on-surface-variant);">
|
|
315
|
-
${this.getLanguageLabel()}
|
|
316
|
-
</span>
|
|
317
|
-
</div>
|
|
318
|
-
${this.copyButton
|
|
319
|
-
? html`
|
|
320
|
-
<schmancy-button
|
|
321
|
-
.variant="${this.copied ? 'filled tonal' : 'text'}"
|
|
322
|
-
@click=${this.copyCode}
|
|
323
|
-
class="transition-all"
|
|
324
|
-
>
|
|
325
|
-
<schmancy-icon > ${this.copied ? 'check' : 'content_copy'} </schmancy-icon>
|
|
326
|
-
<span class="ml-1">${this.copied ? 'Copied!' : 'Copy'}</span>
|
|
327
|
-
</schmancy-button>
|
|
328
|
-
`
|
|
329
|
-
: ''}
|
|
330
|
-
</div>
|
|
331
|
-
</section>
|
|
332
|
-
<!-- Code -->
|
|
333
|
-
<div class="overflow-auto" style="${this.maxHeight ? `max-height: ${this.maxHeight}` : ''}">
|
|
334
|
-
<pre class="m-0"><code class="${codeClass}">${unsafeHTML(this.highlightedCode)}</code></pre>
|
|
335
|
-
</div>
|
|
336
|
-
</schmancy-details>
|
|
337
|
-
`
|
|
338
|
-
}
|
|
339
|
-
}
|
|
340
|
-
|
|
341
|
-
declare global {
|
|
342
|
-
interface HTMLElementTagNameMap {
|
|
343
|
-
'schmancy-code': SchmancyCode
|
|
344
|
-
}
|
|
345
|
-
}
|