@mhmo91/schmancy 0.9.13 → 0.9.15
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 +194 -0
- package/dist/agent/schmancy.agent.js +107 -1
- package/dist/agent/schmancy.agent.js.map +1 -1
- package/dist/agent/schmancy.manifest.json +148 -0
- package/dist/{animation-Bcwh107v.cjs.map → animation-CQRdLgzX.cjs.map} +1 -1
- package/dist/{animation-CXKSuUoE.js.map → animation-hXFClrIn.js.map} +1 -1
- package/dist/{area-CApZWjqs.cjs → area-DBjAhgjP.cjs} +2 -2
- package/dist/area-DBjAhgjP.cjs.map +1 -0
- package/dist/{area-D_p1YBgP.js → area-Dr4I9R2p.js} +23 -35
- package/dist/area-Dr4I9R2p.js.map +1 -0
- package/dist/area.cjs +1 -1
- package/dist/area.js +3 -2
- package/dist/{audio-DUVz7Ars.cjs → audio-Dvr-RBzE.cjs} +1 -1
- package/dist/{audio-DUVz7Ars.cjs.map → audio-Dvr-RBzE.cjs.map} +1 -1
- package/dist/{audio-C7TzWI8M.js → audio-ql6nvY0y.js} +1 -1
- package/dist/{audio-C7TzWI8M.js.map → audio-ql6nvY0y.js.map} +1 -1
- package/dist/audio.cjs +1 -1
- package/dist/audio.js +2 -2
- package/dist/{autocomplete-DAK35swc.js → autocomplete-CgWUCUU-.js} +3 -3
- package/dist/{autocomplete-DAK35swc.js.map → autocomplete-CgWUCUU-.js.map} +1 -1
- package/dist/{autocomplete-DlCqS1gW.cjs → autocomplete-EM0jE7X2.cjs} +1 -1
- package/dist/{autocomplete-DlCqS1gW.cjs.map → autocomplete-EM0jE7X2.cjs.map} +1 -1
- package/dist/autocomplete.cjs +1 -1
- package/dist/autocomplete.js +1 -1
- package/dist/badge.cjs +1 -1
- package/dist/badge.js +1 -1
- package/dist/{boat-C57YTPbb.cjs → boat-BjYJI1HS.cjs} +1 -1
- package/dist/{boat-C57YTPbb.cjs.map → boat-BjYJI1HS.cjs.map} +1 -1
- package/dist/{boat-Dms45k4o.js → boat-Dw8TmOzN.js} +4 -4
- package/dist/{boat-Dms45k4o.js.map → boat-Dw8TmOzN.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-BfN1p1n8.cjs → busy-BmiumJpB.cjs} +1 -1
- package/dist/{busy-BfN1p1n8.cjs.map → busy-BmiumJpB.cjs.map} +1 -1
- package/dist/{busy-IKS9obYj.js → busy-D2hP3fOy.js} +1 -1
- package/dist/{busy-IKS9obYj.js.map → busy-D2hP3fOy.js.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 +4 -4
- package/dist/{card-ZObyqkFF.cjs → card-BslSqOsf.cjs} +1 -1
- package/dist/{card-ZObyqkFF.cjs.map → card-BslSqOsf.cjs.map} +1 -1
- package/dist/{card-DQNBal9V.js → card-CEdgK9nb.js} +2 -2
- package/dist/{card-DQNBal9V.js.map → card-CEdgK9nb.js.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-COhTJ1x5.js → checkbox-Br84TiCs.js} +2 -2
- package/dist/{checkbox-COhTJ1x5.js.map → checkbox-Br84TiCs.js.map} +1 -1
- package/dist/{checkbox-CiAtIrqB.cjs → checkbox-DtcFMgZL.cjs} +1 -1
- package/dist/{checkbox-CiAtIrqB.cjs.map → checkbox-DtcFMgZL.cjs.map} +1 -1
- package/dist/checkbox.cjs +1 -1
- package/dist/checkbox.js +1 -1
- package/dist/{chips-B5o3vNQF.js → chips-BNYOweGm.js} +5 -5
- package/dist/{chips-B5o3vNQF.js.map → chips-BNYOweGm.js.map} +1 -1
- package/dist/{chips-D2xmsC36.cjs → chips-DoCu5YQb.cjs} +1 -1
- package/dist/{chips-D2xmsC36.cjs.map → chips-DoCu5YQb.cjs.map} +1 -1
- package/dist/chips.cjs +1 -1
- package/dist/chips.js +2 -2
- package/dist/{chunk-C_1VqBVD.js → chunk-BM5alsTp.js} +9 -2
- package/dist/chunk-CncqDLb2.cjs +1 -0
- package/dist/{code-highlight-SkMMTkIJ.js → code-highlight-BgExKEto.js} +1 -1
- package/dist/{code-highlight-SkMMTkIJ.js.map → code-highlight-BgExKEto.js.map} +1 -1
- package/dist/{code-highlight-BToHh8T6.cjs → code-highlight-zSYcSfCz.cjs} +1 -1
- package/dist/{code-highlight-BToHh8T6.cjs.map → code-highlight-zSYcSfCz.cjs.map} +1 -1
- package/dist/code-highlight.cjs +1 -1
- package/dist/code-highlight.js +1 -1
- package/dist/{components-Ca7OTgbQ.js → components-DjKNS9R_.js} +1 -1
- package/dist/{components-Ca7OTgbQ.js.map → components-DjKNS9R_.js.map} +1 -1
- package/dist/{components-B-XYvUWn.cjs → components-TJT8-tva.cjs} +1 -1
- package/dist/{components-B-XYvUWn.cjs.map → components-TJT8-tva.cjs.map} +1 -1
- package/dist/components.cjs +1 -1
- package/dist/components.js +1 -1
- package/dist/connectivity.cjs +1 -1
- package/dist/connectivity.js +2 -2
- package/dist/content-drawer.cjs +1 -1
- package/dist/content-drawer.js +1 -1
- package/dist/context-CAYQh-mx.cjs +1 -0
- package/dist/{context-C6GwmNJJ.cjs.map → context-CAYQh-mx.cjs.map} +1 -1
- package/dist/context-D8Q66KPe.js +3 -0
- package/dist/{context-oBTPHrbc.js.map → context-D8Q66KPe.js.map} +1 -1
- package/dist/{cursor-glow-C2YRrB8Z.js → cursor-glow-BydlDInj.js} +1 -1
- package/dist/{cursor-glow-C2YRrB8Z.js.map → cursor-glow-BydlDInj.js.map} +1 -1
- package/dist/{cursor-glow-82y5h3E4.cjs → cursor-glow-Duw9jHmh.cjs} +1 -1
- package/dist/{cursor-glow-82y5h3E4.cjs.map → cursor-glow-Duw9jHmh.cjs.map} +1 -1
- package/dist/{date-range-BTA9nKbw.cjs → date-range-CIWYm3eS.cjs} +1 -1
- package/dist/{date-range-BTA9nKbw.cjs.map → date-range-CIWYm3eS.cjs.map} +1 -1
- package/dist/{date-range-inline-LLC3Y0mi.cjs → date-range-inline-B9Dp2z6C.cjs} +1 -1
- package/dist/{date-range-inline-LLC3Y0mi.cjs.map → date-range-inline-B9Dp2z6C.cjs.map} +1 -1
- package/dist/{date-range-inline-B_g1YXu3.js.map → date-range-inline-CpKG6qt2.js.map} +1 -1
- package/dist/date-range-inline.cjs +1 -1
- package/dist/date-range-inline.js +1 -1
- package/dist/{date-range-DUWpF0Qw.js → date-range-sGkC0KF3.js} +4 -4
- package/dist/{date-range-DUWpF0Qw.js.map → date-range-sGkC0KF3.js.map} +1 -1
- package/dist/date-range.cjs +1 -1
- package/dist/date-range.js +1 -1
- package/dist/{delay-Co89XWry.cjs → delay-Bu4WMQlV.cjs} +1 -1
- package/dist/{delay-Co89XWry.cjs.map → delay-Bu4WMQlV.cjs.map} +1 -1
- package/dist/{delay-CtDrlf1Q.js → delay-DwX65fSc.js} +4 -4
- package/dist/{delay-CtDrlf1Q.js.map → delay-DwX65fSc.js.map} +1 -1
- package/dist/delay.cjs +1 -1
- package/dist/delay.js +1 -1
- package/dist/{details-CyXyVdb2.cjs → details-B8p62xmR.cjs} +1 -1
- package/dist/{details-CyXyVdb2.cjs.map → details-B8p62xmR.cjs.map} +1 -1
- package/dist/{details-B1Ax7WiP.js → details-CCW52lzz.js} +5 -5
- package/dist/{details-B1Ax7WiP.js.map → details-CCW52lzz.js.map} +1 -1
- package/dist/details.cjs +1 -1
- package/dist/details.js +1 -1
- package/dist/{dialog-service-DXLGSshF.cjs → dialog-service-CzDO08Gy.cjs} +1 -1
- package/dist/{dialog-service-DXLGSshF.cjs.map → dialog-service-CzDO08Gy.cjs.map} +1 -1
- package/dist/{dialog-service-CCFGpU7a.js → dialog-service-DH-tjPuE.js} +2 -2
- package/dist/{dialog-service-CCFGpU7a.js.map → dialog-service-DH-tjPuE.js.map} +1 -1
- package/dist/dialog.cjs +1 -1
- package/dist/dialog.js +5 -5
- package/dist/directives.cjs +1 -1
- package/dist/directives.js +5 -5
- package/dist/discovery.cjs +1 -1
- package/dist/{divider-DuwCrKQu.js → divider-CbEWg3G_.js} +1 -1
- package/dist/{divider-DuwCrKQu.js.map → divider-CbEWg3G_.js.map} +1 -1
- package/dist/{divider-xcvHqVBc.cjs → divider-JyyFw_3J.cjs} +1 -1
- package/dist/{divider-xcvHqVBc.cjs.map → divider-JyyFw_3J.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 +2 -2
- package/dist/{expand-DUgOh1af.cjs → expand-BmwIPNjq.cjs} +1 -1
- package/dist/{expand-DUgOh1af.cjs.map → expand-BmwIPNjq.cjs.map} +1 -1
- package/dist/{expand-X0C1W279.js → expand-bFa_qVDT.js} +4 -4
- package/dist/{expand-X0C1W279.js.map → expand-bFa_qVDT.js.map} +1 -1
- package/dist/expand.cjs +1 -1
- package/dist/expand.js +1 -1
- package/dist/{extra-BqfYIC_q.cjs → extra-BUgyMgjl.cjs} +1 -1
- package/dist/{extra-BqfYIC_q.cjs.map → extra-BUgyMgjl.cjs.map} +1 -1
- package/dist/{extra-BTyq-5Z6.js → extra-HwbaUnCD.js} +1 -1
- package/dist/{extra-BTyq-5Z6.js.map → extra-HwbaUnCD.js.map} +1 -1
- package/dist/extra.cjs +1 -1
- package/dist/extra.js +1 -1
- package/dist/float-BQwhfibw.cjs +1 -0
- package/dist/{float-yZoLnUg0.cjs.map → float-BQwhfibw.cjs.map} +1 -1
- package/dist/{float-BgGeLER6.js → float-D5ezUurt.js} +1 -1
- package/dist/{float-BgGeLER6.js.map → float-D5ezUurt.js.map} +1 -1
- package/dist/float.cjs +1 -1
- package/dist/float.js +1 -1
- package/dist/{flow-BPDtbhLe.js.map → flow-BGkHnOnd.js.map} +1 -1
- package/dist/{flow-Dn9AZktE.cjs.map → flow-ClAJ6Qby.cjs.map} +1 -1
- package/dist/{form-C1qS9uvS.js.map → form-rCZqoAoK.js.map} +1 -1
- package/dist/{form-CzD0JLxM.cjs → form-wI58M85H.cjs} +1 -1
- package/dist/{form-CzD0JLxM.cjs.map → form-wI58M85H.cjs.map} +1 -1
- package/dist/form.cjs +1 -1
- package/dist/form.js +1 -1
- package/dist/handover/agent-runtime-followups.md +247 -0
- package/dist/handover/agent-runtime-v1.md +109 -0
- package/dist/{hashContent-BUqULUiZ.js.map → hashContent-B2IntJQf.js.map} +1 -1
- package/dist/{hashContent-CI39BY-_.cjs.map → hashContent-CahnEuut.cjs.map} +1 -1
- package/dist/{icons-BLFEJFDG.cjs → icons-B6V3nZ4-.cjs} +1 -1
- package/dist/{icons-BLFEJFDG.cjs.map → icons-B6V3nZ4-.cjs.map} +1 -1
- package/dist/{icons-BDcb8dNb.js → icons-C5-DIjet.js} +2 -2
- package/dist/{icons-BDcb8dNb.js.map → icons-C5-DIjet.js.map} +1 -1
- package/dist/icons.cjs +1 -1
- package/dist/icons.js +1 -1
- package/dist/{iframe-qCW0HzwB.js → iframe-BXBsuLwt.js} +1 -1
- package/dist/{iframe-qCW0HzwB.js.map → iframe-BXBsuLwt.js.map} +1 -1
- package/dist/{iframe-CrDpQkhj.cjs → iframe-C7sHg7RC.cjs} +1 -1
- package/dist/{iframe-CrDpQkhj.cjs.map → iframe-C7sHg7RC.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 +53 -52
- package/dist/{input-C1MIZaKq.cjs → input-BGNZlfL8.cjs} +1 -1
- package/dist/{input-C1MIZaKq.cjs.map → input-BGNZlfL8.cjs.map} +1 -1
- package/dist/{input-Dv-HtkM9.js.map → input-Bc3bVISm.js.map} +1 -1
- package/dist/{input-chip-CyvjhQSw.js → input-chip-CiG61y-N.js} +1 -1
- package/dist/{input-chip-CyvjhQSw.js.map → input-chip-CiG61y-N.js.map} +1 -1
- package/dist/{input-chip-DnfthOSY.cjs → input-chip-p24lkYtY.cjs} +1 -1
- package/dist/{input-chip-DnfthOSY.cjs.map → input-chip-p24lkYtY.cjs.map} +1 -1
- package/dist/input.cjs +1 -1
- package/dist/input.js +1 -1
- package/dist/{intersection-C0JuW_7U.js.map → intersection-BrXp4YTO.js.map} +1 -1
- package/dist/{intersection-MvbRovUz.cjs → intersection-DqBqnpgh.cjs} +1 -1
- package/dist/{intersection-MvbRovUz.cjs.map → intersection-DqBqnpgh.cjs.map} +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-D0cR3hT1.cjs → layout-B0_IXfov.cjs} +1 -1
- package/dist/{layout-D0cR3hT1.cjs.map → layout-B0_IXfov.cjs.map} +1 -1
- package/dist/{layout-PZCF3kwl.cjs → layout-CTfRXQoz.cjs} +1 -1
- package/dist/{layout-PZCF3kwl.cjs.map → layout-CTfRXQoz.cjs.map} +1 -1
- package/dist/{layout-Y5qo3er8.js → layout-Cqghi_rx.js} +2 -2
- package/dist/{layout-Y5qo3er8.js.map → layout-Cqghi_rx.js.map} +1 -1
- package/dist/{layout-BE2ld1IY.js → layout-fjM1DWlF.js} +1 -1
- package/dist/{layout-BE2ld1IY.js.map → layout-fjM1DWlF.js.map} +1 -1
- package/dist/layout.cjs +1 -1
- package/dist/layout.js +2 -2
- package/dist/lazy-BDNnH_r7.cjs +1 -0
- package/dist/lazy-BDNnH_r7.cjs.map +1 -0
- package/dist/lazy-D6R5N5v4.js +13 -0
- package/dist/lazy-D6R5N5v4.js.map +1 -0
- package/dist/{lightbox-Ce8nMldr.cjs → lightbox-BWKTzA03.cjs} +1 -1
- package/dist/{lightbox-Ce8nMldr.cjs.map → lightbox-BWKTzA03.cjs.map} +1 -1
- package/dist/{lightbox-C_pqYF6q.js → lightbox-CnCTvqSu.js} +3 -3
- package/dist/{lightbox-C_pqYF6q.js.map → lightbox-CnCTvqSu.js.map} +1 -1
- package/dist/lightbox.cjs +1 -1
- package/dist/lightbox.js +1 -1
- package/dist/{list-DcnTGee0.js → list-BpjKUOzM.js} +2 -2
- package/dist/{list-DcnTGee0.js.map → list-BpjKUOzM.js.map} +1 -1
- package/dist/{list-CLc_OQ5k.cjs → list-CMWHu6cV.cjs} +1 -1
- package/dist/{list-CLc_OQ5k.cjs.map → list-CMWHu6cV.cjs.map} +1 -1
- package/dist/list.cjs +1 -1
- package/dist/list.js +1 -1
- package/dist/{litElement.mixin-Mi8bar6B.js → litElement.mixin-BnNYZ24e.js} +1 -1
- package/dist/{litElement.mixin-Mi8bar6B.js.map → litElement.mixin-BnNYZ24e.js.map} +1 -1
- package/dist/{litElement.mixin-DeT3kAOS.cjs → litElement.mixin-CtQOmwq6.cjs} +1 -1
- package/dist/{litElement.mixin-DeT3kAOS.cjs.map → litElement.mixin-CtQOmwq6.cjs.map} +1 -1
- package/dist/{magnetic-Dj52WplI.js → magnetic-BhXebqF3.js} +2 -2
- package/dist/{magnetic-Dj52WplI.js.map → magnetic-BhXebqF3.js.map} +1 -1
- package/dist/{magnetic-aBBnj_vk.cjs → magnetic-CVXEkYTA.cjs} +1 -1
- package/dist/{magnetic-aBBnj_vk.cjs.map → magnetic-CVXEkYTA.cjs.map} +1 -1
- package/dist/{mailbox-BrLZPj2o.js → mailbox-CHIpxS3W.js} +5 -5
- package/dist/{mailbox-BrLZPj2o.js.map → mailbox-CHIpxS3W.js.map} +1 -1
- package/dist/{mailbox-CE5sTDsQ.cjs → mailbox-Tg1CROVz.cjs} +1 -1
- package/dist/{mailbox-CE5sTDsQ.cjs.map → mailbox-Tg1CROVz.cjs.map} +1 -1
- package/dist/mailbox.cjs +1 -1
- package/dist/mailbox.js +1 -1
- package/dist/{map-SNb-3q5h.js → map-YY1Q4FWO.js} +1 -1
- package/dist/{map-SNb-3q5h.js.map → map-YY1Q4FWO.js.map} +1 -1
- package/dist/{map-CKzhM6uY.cjs → map-Z_dsu-dv.cjs} +1 -1
- package/dist/{map-CKzhM6uY.cjs.map → map-Z_dsu-dv.cjs.map} +1 -1
- package/dist/map.cjs +1 -1
- package/dist/map.js +1 -1
- package/dist/{menu-VErqs9NG.js → menu-BIBUgS1T.js} +2 -2
- package/dist/{menu-VErqs9NG.js.map → menu-BIBUgS1T.js.map} +1 -1
- package/dist/{menu-BnGjBrdD.cjs → menu-DS8Iz4fJ.cjs} +1 -1
- package/dist/{menu-BnGjBrdD.cjs.map → menu-DS8Iz4fJ.cjs.map} +1 -1
- package/dist/menu.cjs +1 -1
- package/dist/menu.js +1 -1
- package/dist/mixins.cjs +1 -1
- package/dist/mixins.js +2 -2
- 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-B_Fkxv7d.js → notification-ChAvNXf3.js} +3 -3
- package/dist/{notification-B_Fkxv7d.js.map → notification-ChAvNXf3.js.map} +1 -1
- package/dist/{notification-DE5dFf8G.cjs → notification-DPUkuifB.cjs} +1 -1
- package/dist/{notification-DE5dFf8G.cjs.map → notification-DPUkuifB.cjs.map} +1 -1
- package/dist/notification.cjs +1 -1
- package/dist/notification.js +1 -1
- package/dist/{option-DuAlGv27.js → option-Ci7C8xxh.js} +1 -1
- package/dist/{option-DuAlGv27.js.map → option-Ci7C8xxh.js.map} +1 -1
- package/dist/{option-BmbP5ulK.cjs → option-OIp0joyN.cjs} +1 -1
- package/dist/{option-BmbP5ulK.cjs.map → option-OIp0joyN.cjs.map} +1 -1
- package/dist/option.cjs +1 -1
- package/dist/option.js +1 -1
- package/dist/{overlay-stack-J_eJCUTX.cjs.map → overlay-stack-7bs4ZNnh.cjs.map} +1 -1
- package/dist/{overlay-stack-BJt_r6aZ.js.map → overlay-stack-DXPYHPhk.js.map} +1 -1
- package/dist/overlay.cjs +130 -0
- package/dist/overlay.cjs.map +1 -0
- package/dist/overlay.js +570 -0
- package/dist/overlay.js.map +1 -0
- package/dist/page.cjs +1 -1
- package/dist/page.js +4 -4
- package/dist/{progress-Bt9gUiGP.cjs → progress-32Cad1NX.cjs} +1 -1
- package/dist/{progress-Bt9gUiGP.cjs.map → progress-32Cad1NX.cjs.map} +1 -1
- package/dist/{progress-BnXr7aAs.js → progress-DGkwPgDX.js} +1 -1
- package/dist/{progress-BnXr7aAs.js.map → progress-DGkwPgDX.js.map} +1 -1
- package/dist/progress.cjs +1 -1
- package/dist/progress.js +1 -1
- package/dist/{provide-Disc6_zz.js → provide-BuzyBLGj.js} +1 -1
- package/dist/{provide-Disc6_zz.js.map → provide-BuzyBLGj.js.map} +1 -1
- package/dist/{provide-CnXCF-UP.cjs → provide-MvHcXKzT.cjs} +1 -1
- package/dist/{provide-CnXCF-UP.cjs.map → provide-MvHcXKzT.cjs.map} +1 -1
- package/dist/qr-scanner.cjs +1 -1
- package/dist/qr-scanner.js +1 -1
- package/dist/{radio-group-BgZgHMoA.js → radio-group-B72sYGnS.js} +1 -1
- package/dist/{radio-group-BgZgHMoA.js.map → radio-group-B72sYGnS.js.map} +1 -1
- package/dist/{radio-group-DkBFgq_3.cjs → radio-group-B7DuNxUq.cjs} +1 -1
- package/dist/{radio-group-DkBFgq_3.cjs.map → radio-group-B7DuNxUq.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/{reduced-motion-DR32yKEO.cjs → reduced-motion-9RjNnhIg.cjs} +1 -1
- package/dist/{reduced-motion-DR32yKEO.cjs.map → reduced-motion-9RjNnhIg.cjs.map} +1 -1
- package/dist/{reduced-motion-B83yZbcO.js.map → reduced-motion-BZTLqAyl.js.map} +1 -1
- package/dist/{rxjs-utils-CN9fv8Xq.js → rxjs-utils-CKTnEKUH.js} +1 -1
- package/dist/{rxjs-utils-CN9fv8Xq.js.map → rxjs-utils-CKTnEKUH.js.map} +1 -1
- package/dist/{rxjs-utils-Vn6DCKgL.cjs → rxjs-utils-DJbZRjp3.cjs} +1 -1
- package/dist/{rxjs-utils-Vn6DCKgL.cjs.map → rxjs-utils-DJbZRjp3.cjs.map} +1 -1
- package/dist/rxjs-utils.cjs +1 -1
- package/dist/rxjs-utils.js +1 -1
- package/dist/{scroll-57rkTHm8.js → scroll-CdmXRXh2.js} +1 -1
- package/dist/{scroll-57rkTHm8.js.map → scroll-CdmXRXh2.js.map} +1 -1
- package/dist/{scroll-hWt0b1gK.cjs → scroll-V1rAZ9fK.cjs} +1 -1
- package/dist/{scroll-hWt0b1gK.cjs.map → scroll-V1rAZ9fK.cjs.map} +1 -1
- package/dist/{search-BlGJ6uJv.js.map → search-CvUZRLF1.js.map} +1 -1
- package/dist/{search-C8eAOzBm.cjs.map → search-CwMav5QB.cjs.map} +1 -1
- package/dist/{select-BDonPD5a.cjs → select-DFxoBgEf.cjs} +1 -1
- package/dist/{select-BDonPD5a.cjs.map → select-DFxoBgEf.cjs.map} +1 -1
- package/dist/{select-CkOAwmxC.js → select-wFDKDLQI.js} +2 -2
- package/dist/{select-CkOAwmxC.js.map → select-wFDKDLQI.js.map} +1 -1
- package/dist/select.cjs +1 -1
- package/dist/select.js +1 -1
- package/dist/{sheet-Bv2mPHWk.cjs → sheet-DdlZhnDG.cjs} +2 -2
- package/dist/{sheet-Bv2mPHWk.cjs.map → sheet-DdlZhnDG.cjs.map} +1 -1
- package/dist/{sheet-NUgEmozP.js → sheet-LFVo5iN4.js} +4 -4
- package/dist/{sheet-NUgEmozP.js.map → sheet-LFVo5iN4.js.map} +1 -1
- package/dist/sheet.cjs +1 -1
- package/dist/sheet.js +2 -2
- package/dist/{sheet.service-BKmnlkpZ.cjs → sheet.service-BfNDB0K0.cjs} +1 -1
- package/dist/{sheet.service-BKmnlkpZ.cjs.map → sheet.service-BfNDB0K0.cjs.map} +1 -1
- package/dist/{sheet.service-CanLo8ko.js → sheet.service-DQE7-_wq.js} +3 -3
- package/dist/{sheet.service-CanLo8ko.js.map → sheet.service-DQE7-_wq.js.map} +1 -1
- package/dist/skeleton.cjs +1 -1
- package/dist/skeleton.js +1 -1
- package/dist/skills/INDEX.md +1 -1
- package/dist/skills/overlay.md +200 -0
- package/dist/skills/schmancy/INDEX.md +1 -1
- package/dist/skills/schmancy/overlay.md +200 -0
- package/dist/slider.cjs +1 -1
- package/dist/slider.js +1 -1
- package/dist/{sound.service-BjSoGjmT.cjs → sound.service-BEN6Xjy_.cjs} +1 -1
- package/dist/{sound.service-BjSoGjmT.cjs.map → sound.service-BEN6Xjy_.cjs.map} +1 -1
- package/dist/{sound.service-cdkw3Wkv.js → sound.service-DWZe6swU.js} +1 -1
- package/dist/{sound.service-cdkw3Wkv.js.map → sound.service-DWZe6swU.js.map} +1 -1
- package/dist/{splash-screen-BemqNFNj.cjs → splash-screen-C9HqX2nR.cjs} +1 -1
- package/dist/{splash-screen-BemqNFNj.cjs.map → splash-screen-C9HqX2nR.cjs.map} +1 -1
- package/dist/{splash-screen-B0ppA3f1.js → splash-screen-COg3Z6n8.js} +1 -1
- package/dist/{splash-screen-B0ppA3f1.js.map → splash-screen-COg3Z6n8.js.map} +1 -1
- package/dist/splash-screen.cjs +1 -1
- package/dist/splash-screen.js +1 -1
- package/dist/{src-Cjy9zCiU.js → src-C7niWYur.js} +51 -51
- package/dist/{src-Cjy9zCiU.js.map → src-C7niWYur.js.map} +1 -1
- package/dist/{src-ByGCYD-E.cjs → src-I4M33WK2.cjs} +3 -3
- package/dist/{src-ByGCYD-E.cjs.map → src-I4M33WK2.cjs.map} +1 -1
- package/dist/steps.cjs +1 -1
- package/dist/steps.js +3 -3
- package/dist/{store-CO4nJyGj.cjs → store-CjFHCSDb.cjs} +1 -1
- package/dist/{store-CO4nJyGj.cjs.map → store-CjFHCSDb.cjs.map} +1 -1
- package/dist/{store-Bmj6rvZY.js.map → store-CjzZDQt8.js.map} +1 -1
- package/dist/store.cjs +1 -1
- package/dist/store.js +1 -1
- package/dist/{surface-CtpWeSGn.js → surface-0XM4DBaT.js} +2 -2
- package/dist/{surface-CtpWeSGn.js.map → surface-0XM4DBaT.js.map} +1 -1
- package/dist/{surface-CoLYICO1.cjs → surface-B6DA01kL.cjs} +1 -1
- package/dist/{surface-CoLYICO1.cjs.map → surface-B6DA01kL.cjs.map} +1 -1
- package/dist/surface.cjs +1 -1
- package/dist/surface.js +1 -1
- package/dist/{surface.mixin-CSKqQH-0.cjs → surface.mixin-DxOi-xo0.cjs} +1 -1
- package/dist/{surface.mixin-CSKqQH-0.cjs.map → surface.mixin-DxOi-xo0.cjs.map} +1 -1
- package/dist/switch.cjs +1 -1
- package/dist/switch.js +1 -1
- package/dist/{table-COQKtlJB.cjs → table-B-DsOqzT.cjs} +2 -2
- package/dist/{table-COQKtlJB.cjs.map → table-B-DsOqzT.cjs.map} +1 -1
- package/dist/{table-bgFb1KYU.js → table-hBEZRxM_.js} +3 -3
- package/dist/{table-bgFb1KYU.js.map → table-hBEZRxM_.js.map} +1 -1
- package/dist/table.cjs +1 -1
- package/dist/table.js +1 -1
- package/dist/{tabs-BicCpU1B.js → tabs-C7r4TqcX.js} +2 -2
- package/dist/{tabs-BicCpU1B.js.map → tabs-C7r4TqcX.js.map} +1 -1
- package/dist/{tabs-CoMJAXDy.cjs → tabs-DZaLZUBy.cjs} +1 -1
- package/dist/{tabs-CoMJAXDy.cjs.map → tabs-DZaLZUBy.cjs.map} +1 -1
- package/dist/tabs.cjs +1 -1
- package/dist/tabs.js +1 -1
- package/dist/tailwind.mixin-Bh58QnlW.cjs +2 -0
- package/dist/{tailwind.mixin-BfdVIGgD.cjs.map → tailwind.mixin-Bh58QnlW.cjs.map} +1 -1
- package/dist/tailwind.mixin-H5Pn7vSJ.js +219 -0
- package/dist/{tailwind.mixin-CNdR3zFD.js.map → tailwind.mixin-H5Pn7vSJ.js.map} +1 -1
- package/dist/teleport.cjs +1 -1
- package/dist/teleport.js +1 -1
- package/dist/{textarea-CxTSwn3x.cjs → textarea-B2544vx9.cjs} +1 -1
- package/dist/{textarea-CxTSwn3x.cjs.map → textarea-B2544vx9.cjs.map} +1 -1
- package/dist/{textarea-D7O9Uo15.js → textarea-CS-KdSLz.js} +1 -1
- package/dist/{textarea-D7O9Uo15.js.map → textarea-CS-KdSLz.js.map} +1 -1
- package/dist/textarea.cjs +1 -1
- package/dist/textarea.js +1 -1
- package/dist/{theme-DGiyJMTT.js → theme-Cq_c9IO3.js} +7 -7
- package/dist/{theme-DGiyJMTT.js.map → theme-Cq_c9IO3.js.map} +1 -1
- package/dist/{theme-CCez6SRm.cjs → theme-DU5yXaV-.cjs} +1 -1
- package/dist/{theme-CCez6SRm.cjs.map → theme-DU5yXaV-.cjs.map} +1 -1
- package/dist/{theme-button-BV0CxpGn.cjs → theme-button-CPujUbgV.cjs} +1 -1
- package/dist/{theme-button-BV0CxpGn.cjs.map → theme-button-CPujUbgV.cjs.map} +1 -1
- package/dist/{theme-button-s9GfSQL5.js → theme-button-OJl2ma0u.js} +1 -1
- package/dist/{theme-button-s9GfSQL5.js.map → theme-button-OJl2ma0u.js.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.events-EznKK2Y0.cjs.map → theme.events-DakXxZeP.cjs.map} +1 -1
- package/dist/{theme.events-Bw3mYjUA.js.map → theme.events-NuihzD_p.js.map} +1 -1
- package/dist/{theme.interface-Cyqv5XWY.js.map → theme.interface-Buged9Cg.js.map} +1 -1
- package/dist/{theme.interface-CCE3L1ql.cjs.map → theme.interface-DTwkuAKJ.cjs.map} +1 -1
- package/dist/theme.js +5 -5
- package/dist/{theme.service-ETiKUwVy.cjs → theme.service-DxJPUGlu.cjs} +1 -1
- package/dist/{theme.service-ETiKUwVy.cjs.map → theme.service-DxJPUGlu.cjs.map} +1 -1
- package/dist/{theme.service-_qP5WvB9.js → theme.service-cOfPrtfe.js} +2 -2
- package/dist/{theme.service-_qP5WvB9.js.map → theme.service-cOfPrtfe.js.map} +1 -1
- package/dist/tooltip.cjs +1 -1
- package/dist/tree.cjs +1 -1
- package/dist/tree.js +1 -1
- package/dist/{tslib.es6-PMITL0Z3.cjs.map → tslib.es6-Cnt75pb6.cjs.map} +1 -1
- package/dist/{tslib.es6-vJQZBGJO.js.map → tslib.es6-DMzzJKHV.js.map} +1 -1
- package/dist/{typewriter-BTqEQXsX.js → typewriter-DyN7xa0n.js} +5 -5
- package/dist/{typewriter-BTqEQXsX.js.map → typewriter-DyN7xa0n.js.map} +1 -1
- package/dist/{typewriter-DeaL3NfZ.cjs → typewriter-LK0S4NEr.cjs} +1 -1
- package/dist/{typewriter-DeaL3NfZ.cjs.map → typewriter-LK0S4NEr.cjs.map} +1 -1
- package/dist/typewriter.cjs +1 -1
- package/dist/typewriter.js +1 -1
- package/dist/typography.cjs +1 -1
- package/dist/typography.js +1 -1
- package/dist/{utils-C8PD8So2.cjs → utils-2qrmPb78.cjs} +1 -1
- package/dist/{utils-C8PD8So2.cjs.map → utils-2qrmPb78.cjs.map} +1 -1
- package/dist/{utils-DVuCPDfw.js → utils-xBXLvebz.js} +3 -3
- package/dist/{utils-DVuCPDfw.js.map → utils-xBXLvebz.js.map} +1 -1
- package/dist/utils.cjs +1 -1
- package/dist/utils.js +5 -5
- package/dist/visually-hidden.cjs +1 -1
- package/dist/visually-hidden.js +1 -1
- package/dist/{window-CDHDVOwO.js → window-BWecg8Ih.js} +6 -6
- package/dist/{window-CDHDVOwO.js.map → window-BWecg8Ih.js.map} +1 -1
- package/dist/{window-IGZgxuUC.cjs → window-Cjv2GqSN.cjs} +1 -1
- package/dist/{window-IGZgxuUC.cjs.map → window-Cjv2GqSN.cjs.map} +1 -1
- package/dist/window.cjs +1 -1
- package/dist/window.js +1 -1
- package/package.json +3 -2
- package/skills/schmancy/INDEX.md +1 -1
- package/skills/schmancy/overlay.md +200 -0
- package/src/overlay/index.ts +15 -0
- package/src/overlay/overlay.animations.ts +137 -0
- package/src/overlay/overlay.component.ts +452 -0
- package/src/overlay/overlay.confirm-body.ts +149 -0
- package/src/overlay/overlay.gestures.ts +131 -0
- package/src/overlay/overlay.layout.ts +76 -0
- package/src/overlay/overlay.service.ts +299 -0
- package/src/overlay/overlay.stack.ts +171 -0
- package/src/overlay/overlay.types.ts +146 -0
- package/types/src/overlay/index.d.ts +5 -0
- package/types/src/overlay/overlay.animations.d.ts +26 -0
- package/types/src/overlay/overlay.component.d.ts +48 -0
- package/types/src/overlay/overlay.confirm-body.d.ts +42 -0
- package/types/src/overlay/overlay.gestures.d.ts +39 -0
- package/types/src/overlay/overlay.layout.d.ts +48 -0
- package/types/src/overlay/overlay.service.d.ts +62 -0
- package/types/src/overlay/overlay.stack.d.ts +25 -0
- package/types/src/overlay/overlay.types.d.ts +122 -0
- package/dist/area-CApZWjqs.cjs.map +0 -1
- package/dist/area-D_p1YBgP.js.map +0 -1
- package/dist/chunk-BCfY8kxB.cjs +0 -1
- package/dist/context-C6GwmNJJ.cjs +0 -1
- package/dist/context-oBTPHrbc.js +0 -3
- package/dist/float-yZoLnUg0.cjs +0 -1
- package/dist/tailwind.mixin-BfdVIGgD.cjs +0 -2
- package/dist/tailwind.mixin-CNdR3zFD.js +0 -219
- /package/dist/{animation-Bcwh107v.cjs → animation-CQRdLgzX.cjs} +0 -0
- /package/dist/{animation-CXKSuUoE.js → animation-hXFClrIn.js} +0 -0
- /package/dist/{date-range-inline-B_g1YXu3.js → date-range-inline-CpKG6qt2.js} +0 -0
- /package/dist/{flow-BPDtbhLe.js → flow-BGkHnOnd.js} +0 -0
- /package/dist/{flow-Dn9AZktE.cjs → flow-ClAJ6Qby.cjs} +0 -0
- /package/dist/{form-C1qS9uvS.js → form-rCZqoAoK.js} +0 -0
- /package/dist/{hashContent-BUqULUiZ.js → hashContent-B2IntJQf.js} +0 -0
- /package/dist/{hashContent-CI39BY-_.cjs → hashContent-CahnEuut.cjs} +0 -0
- /package/dist/{input-Dv-HtkM9.js → input-Bc3bVISm.js} +0 -0
- /package/dist/{intersection-C0JuW_7U.js → intersection-BrXp4YTO.js} +0 -0
- /package/dist/{overlay-stack-J_eJCUTX.cjs → overlay-stack-7bs4ZNnh.cjs} +0 -0
- /package/dist/{overlay-stack-BJt_r6aZ.js → overlay-stack-DXPYHPhk.js} +0 -0
- /package/dist/{reduced-motion-B83yZbcO.js → reduced-motion-BZTLqAyl.js} +0 -0
- /package/dist/{search-BlGJ6uJv.js → search-CvUZRLF1.js} +0 -0
- /package/dist/{search-C8eAOzBm.cjs → search-CwMav5QB.cjs} +0 -0
- /package/dist/{store-Bmj6rvZY.js → store-CjzZDQt8.js} +0 -0
- /package/dist/{theme.events-EznKK2Y0.cjs → theme.events-DakXxZeP.cjs} +0 -0
- /package/dist/{theme.events-Bw3mYjUA.js → theme.events-NuihzD_p.js} +0 -0
- /package/dist/{theme.interface-Cyqv5XWY.js → theme.interface-Buged9Cg.js} +0 -0
- /package/dist/{theme.interface-CCE3L1ql.cjs → theme.interface-DTwkuAKJ.cjs} +0 -0
- /package/dist/{tslib.es6-PMITL0Z3.cjs → tslib.es6-Cnt75pb6.cjs} +0 -0
- /package/dist/{tslib.es6-vJQZBGJO.js → tslib.es6-DMzzJKHV.js} +0 -0
|
@@ -0,0 +1,452 @@
|
|
|
1
|
+
import { $LitElement } from '@mixins/index'
|
|
2
|
+
import { css, html, render as litRender, type TemplateResult } from 'lit'
|
|
3
|
+
import { customElement, property, query } from 'lit/decorators.js'
|
|
4
|
+
import { when } from 'lit/directives/when.js'
|
|
5
|
+
import {
|
|
6
|
+
filter,
|
|
7
|
+
fromEvent,
|
|
8
|
+
merge,
|
|
9
|
+
Subject,
|
|
10
|
+
take,
|
|
11
|
+
takeUntil,
|
|
12
|
+
tap,
|
|
13
|
+
} from 'rxjs'
|
|
14
|
+
import type { LazyComponent } from '../area/lazy'
|
|
15
|
+
import { surfaceAnimation } from './overlay.animations'
|
|
16
|
+
import { swipeToDismiss$ } from './overlay.gestures'
|
|
17
|
+
import {
|
|
18
|
+
ANCHOR_FIT_PADDING_PX,
|
|
19
|
+
readViewport,
|
|
20
|
+
resolveLayout,
|
|
21
|
+
} from './overlay.layout'
|
|
22
|
+
import type {
|
|
23
|
+
Anchor,
|
|
24
|
+
CloseReason,
|
|
25
|
+
Content,
|
|
26
|
+
OverlayLayout,
|
|
27
|
+
ShowOptions,
|
|
28
|
+
} from './overlay.types'
|
|
29
|
+
|
|
30
|
+
const MOUNT_POINT_ID = 'overlay-mount'
|
|
31
|
+
|
|
32
|
+
/**
|
|
33
|
+
* The single overlay element. Hosts a native `<dialog>` in its shadow
|
|
34
|
+
* root for centered/sheet layouts; for anchored, we stay modeless by
|
|
35
|
+
* using `<dialog>` with .show() (non-modal) + explicit positioning.
|
|
36
|
+
*
|
|
37
|
+
* Public lifecycle: the service calls `open()` to mount content and
|
|
38
|
+
* animate in, `close(reason)` to animate out and dismiss. The element
|
|
39
|
+
* dispatches `overlay-close` when closed; the service listens and
|
|
40
|
+
* resolves the caller's Observable.
|
|
41
|
+
*/
|
|
42
|
+
@customElement('schmancy-overlay')
|
|
43
|
+
export class SchmancyOverlay extends $LitElement(css`
|
|
44
|
+
:host {
|
|
45
|
+
position: fixed;
|
|
46
|
+
inset: 0;
|
|
47
|
+
z-index: var(--schmancy-overlay-z, 10000);
|
|
48
|
+
display: contents;
|
|
49
|
+
pointer-events: none;
|
|
50
|
+
}
|
|
51
|
+
dialog {
|
|
52
|
+
margin: 0;
|
|
53
|
+
padding: 0;
|
|
54
|
+
border: 0;
|
|
55
|
+
background: transparent;
|
|
56
|
+
overflow: visible;
|
|
57
|
+
max-width: none;
|
|
58
|
+
max-height: none;
|
|
59
|
+
pointer-events: auto;
|
|
60
|
+
}
|
|
61
|
+
dialog::backdrop {
|
|
62
|
+
background: rgba(12, 12, 16, 0.28);
|
|
63
|
+
backdrop-filter: blur(18px) saturate(150%);
|
|
64
|
+
-webkit-backdrop-filter: blur(18px) saturate(150%);
|
|
65
|
+
}
|
|
66
|
+
.surface {
|
|
67
|
+
position: fixed;
|
|
68
|
+
pointer-events: auto;
|
|
69
|
+
max-width: calc(100vw - 2rem);
|
|
70
|
+
max-height: 90dvh;
|
|
71
|
+
overflow: auto;
|
|
72
|
+
border-radius: var(--schmancy-sys-shape-corner-large, 16px);
|
|
73
|
+
background: var(--schmancy-sys-color-surface, #ffffff);
|
|
74
|
+
box-shadow: 0 24px 64px -16px rgba(0, 0, 0, 0.35);
|
|
75
|
+
}
|
|
76
|
+
.surface[data-layout='centered'] {
|
|
77
|
+
top: 50%;
|
|
78
|
+
left: 50%;
|
|
79
|
+
transform: translate(-50%, -50%);
|
|
80
|
+
}
|
|
81
|
+
.surface[data-layout='sheet'] {
|
|
82
|
+
left: 0;
|
|
83
|
+
right: 0;
|
|
84
|
+
bottom: 0;
|
|
85
|
+
max-width: none;
|
|
86
|
+
max-height: 90dvh;
|
|
87
|
+
width: 100%;
|
|
88
|
+
border-radius: var(--schmancy-sys-shape-corner-large, 16px) var(--schmancy-sys-shape-corner-large, 16px) 0 0;
|
|
89
|
+
padding-bottom: env(safe-area-inset-bottom);
|
|
90
|
+
}
|
|
91
|
+
.surface[data-layout='anchored'] {
|
|
92
|
+
max-width: min(480px, calc(100vw - 2rem));
|
|
93
|
+
box-shadow: 0 12px 32px -8px rgba(0, 0, 0, 0.28);
|
|
94
|
+
}
|
|
95
|
+
.drag-handle {
|
|
96
|
+
display: flex;
|
|
97
|
+
justify-content: center;
|
|
98
|
+
padding: 8px 0 4px;
|
|
99
|
+
touch-action: none;
|
|
100
|
+
cursor: grab;
|
|
101
|
+
}
|
|
102
|
+
.drag-handle::before {
|
|
103
|
+
content: '';
|
|
104
|
+
width: 40px;
|
|
105
|
+
height: 4px;
|
|
106
|
+
border-radius: 999px;
|
|
107
|
+
background: var(--schmancy-sys-color-outline-variant, #cac4cf);
|
|
108
|
+
}
|
|
109
|
+
@media (prefers-reduced-motion: reduce) {
|
|
110
|
+
.surface { box-shadow: var(--schmancy-sys-elevation-2, 0 2px 6px rgba(0,0,0,0.2)); }
|
|
111
|
+
}
|
|
112
|
+
`) {
|
|
113
|
+
@property({ type: String, reflect: true }) layout: OverlayLayout = 'centered'
|
|
114
|
+
@property({ type: Boolean, reflect: true }) dismissable = true
|
|
115
|
+
@property({ type: Boolean, reflect: true }) modal = true
|
|
116
|
+
|
|
117
|
+
@query('dialog') private _dialog!: HTMLDialogElement
|
|
118
|
+
@query('.surface') private _surface!: HTMLDivElement
|
|
119
|
+
|
|
120
|
+
/** Close trigger for the service; emits the reason + detail payload. */
|
|
121
|
+
private readonly _closed$ = new Subject<{ reason: CloseReason; result?: unknown }>()
|
|
122
|
+
|
|
123
|
+
private _mounted = false
|
|
124
|
+
private _closing = false
|
|
125
|
+
|
|
126
|
+
/** Service subscribes to this to know when the overlay dismissed. */
|
|
127
|
+
get closed$(): import('rxjs').Observable<{ reason: CloseReason; result?: unknown }> {
|
|
128
|
+
return this._closed$.asObservable()
|
|
129
|
+
}
|
|
130
|
+
|
|
131
|
+
/**
|
|
132
|
+
* Mount content and animate in. Called by the service after the
|
|
133
|
+
* element is attached to the DOM. Returns a promise that resolves
|
|
134
|
+
* when the entrance animation completes.
|
|
135
|
+
*/
|
|
136
|
+
async open(content: Content, options: ShowOptions): Promise<void> {
|
|
137
|
+
if (this._mounted) throw new Error('schmancy-overlay: open() called twice on the same element')
|
|
138
|
+
this._mounted = true
|
|
139
|
+
|
|
140
|
+
this.dismissable = options.dismissable !== false
|
|
141
|
+
|
|
142
|
+
// Resolve Content → HTMLElement and mount into the slot host.
|
|
143
|
+
await this.updateComplete
|
|
144
|
+
const mount = this.renderRoot.querySelector(`#${MOUNT_POINT_ID}`) as HTMLElement | null
|
|
145
|
+
if (!mount) throw new Error('schmancy-overlay: mount point missing')
|
|
146
|
+
await mountContent(content, mount, options.props)
|
|
147
|
+
|
|
148
|
+
// Measure content after mount for layout dispatch.
|
|
149
|
+
const viewport = readViewport()
|
|
150
|
+
const contentSize = {
|
|
151
|
+
width: mount.scrollWidth,
|
|
152
|
+
height: mount.scrollHeight,
|
|
153
|
+
}
|
|
154
|
+
const resolved = resolveLayout({
|
|
155
|
+
anchor: options.anchor,
|
|
156
|
+
content: contentSize,
|
|
157
|
+
viewport,
|
|
158
|
+
})
|
|
159
|
+
this.layout = resolved
|
|
160
|
+
|
|
161
|
+
// Modal defaults per layout, with the caller's `modal` as escape hatch.
|
|
162
|
+
const isModal =
|
|
163
|
+
options.modal ?? (resolved === 'centered' || resolved === 'sheet')
|
|
164
|
+
this.modal = isModal
|
|
165
|
+
|
|
166
|
+
await this.updateComplete
|
|
167
|
+
|
|
168
|
+
// Open the native <dialog>.
|
|
169
|
+
if (isModal) {
|
|
170
|
+
this._dialog.showModal()
|
|
171
|
+
} else {
|
|
172
|
+
this._dialog.show()
|
|
173
|
+
}
|
|
174
|
+
|
|
175
|
+
// For anchored mode, compute position from the anchor's rect.
|
|
176
|
+
if (resolved === 'anchored' && options.anchor) {
|
|
177
|
+
this.positionAnchored(options.anchor)
|
|
178
|
+
}
|
|
179
|
+
|
|
180
|
+
// Wire close triggers: native 'close' event, structured 'close' from
|
|
181
|
+
// content, backdrop click, swipe gesture. Signal aborts close too.
|
|
182
|
+
this.wireCloseTriggers(options.signal)
|
|
183
|
+
|
|
184
|
+
// Play entrance animations.
|
|
185
|
+
await this.playEnterAnimations()
|
|
186
|
+
}
|
|
187
|
+
|
|
188
|
+
/** Play exit animations then close the native dialog. */
|
|
189
|
+
async close(reason: CloseReason, result?: unknown): Promise<void> {
|
|
190
|
+
if (this._closing || !this._mounted) return
|
|
191
|
+
this._closing = true
|
|
192
|
+
try {
|
|
193
|
+
await this.playExitAnimations()
|
|
194
|
+
} catch {
|
|
195
|
+
// animation can be cancelled — not an error.
|
|
196
|
+
}
|
|
197
|
+
try {
|
|
198
|
+
this._dialog?.close()
|
|
199
|
+
} catch {
|
|
200
|
+
// Already closed natively — fine.
|
|
201
|
+
}
|
|
202
|
+
this._closed$.next({ reason, result })
|
|
203
|
+
this._closed$.complete()
|
|
204
|
+
}
|
|
205
|
+
|
|
206
|
+
/* ---------------- close trigger wiring ------------------------------ */
|
|
207
|
+
|
|
208
|
+
private wireCloseTriggers(signal?: AbortSignal): void {
|
|
209
|
+
const disconnecting = this.disconnecting
|
|
210
|
+
|
|
211
|
+
// Native 'close' from <dialog>. Runs on Esc, on form[method=dialog]
|
|
212
|
+
// submit, and on our own close() call. returnValue carries the native
|
|
213
|
+
// string result.
|
|
214
|
+
fromEvent(this._dialog, 'close')
|
|
215
|
+
.pipe(
|
|
216
|
+
filter(() => !this._closing),
|
|
217
|
+
tap(() => {
|
|
218
|
+
const rv = this._dialog.returnValue
|
|
219
|
+
if (rv !== '' && rv !== undefined) {
|
|
220
|
+
void this.close('native-submit', rv)
|
|
221
|
+
} else {
|
|
222
|
+
void this.close('escape')
|
|
223
|
+
}
|
|
224
|
+
}),
|
|
225
|
+
takeUntil(disconnecting),
|
|
226
|
+
)
|
|
227
|
+
.subscribe()
|
|
228
|
+
|
|
229
|
+
// Structured close — content dispatches CustomEvent('close', { detail }).
|
|
230
|
+
fromEvent<CustomEvent>(this, 'close')
|
|
231
|
+
.pipe(
|
|
232
|
+
// Filter out the native <dialog>.close event (which is a plain Event,
|
|
233
|
+
// no .detail — but it still bubbles into this listener target as 'close').
|
|
234
|
+
filter((e) => e instanceof CustomEvent),
|
|
235
|
+
// Don't re-enter if we're the source.
|
|
236
|
+
filter((e) => e.target !== this._dialog),
|
|
237
|
+
tap((e) => {
|
|
238
|
+
e.stopPropagation()
|
|
239
|
+
void this.close('structured', e.detail)
|
|
240
|
+
}),
|
|
241
|
+
takeUntil(disconnecting),
|
|
242
|
+
)
|
|
243
|
+
.subscribe()
|
|
244
|
+
|
|
245
|
+
// Esc keydown — native dialog handles; we only intercept to honor `dismissable: false`.
|
|
246
|
+
fromEvent<KeyboardEvent>(this._dialog, 'cancel')
|
|
247
|
+
.pipe(
|
|
248
|
+
tap((e) => {
|
|
249
|
+
if (!this.dismissable) e.preventDefault()
|
|
250
|
+
}),
|
|
251
|
+
takeUntil(disconnecting),
|
|
252
|
+
)
|
|
253
|
+
.subscribe()
|
|
254
|
+
|
|
255
|
+
// Backdrop click — native backdrop clicks bubble to the dialog.
|
|
256
|
+
fromEvent<MouseEvent>(this._dialog, 'click')
|
|
257
|
+
.pipe(
|
|
258
|
+
filter((e) => this.dismissable && e.target === this._dialog),
|
|
259
|
+
tap(() => void this.close('backdrop')),
|
|
260
|
+
takeUntil(disconnecting),
|
|
261
|
+
)
|
|
262
|
+
.subscribe()
|
|
263
|
+
|
|
264
|
+
// Swipe-to-dismiss for sheet layout only.
|
|
265
|
+
if (this.layout === 'sheet' && this.dismissable) {
|
|
266
|
+
const dragHandle = this.renderRoot.querySelector<HTMLElement>('.drag-handle')
|
|
267
|
+
swipeToDismiss$({
|
|
268
|
+
surface: this._surface,
|
|
269
|
+
dragHandle,
|
|
270
|
+
until$: merge(disconnecting, this._closed$),
|
|
271
|
+
})
|
|
272
|
+
.pipe(take(1))
|
|
273
|
+
.subscribe(() => void this.close('swipe'))
|
|
274
|
+
}
|
|
275
|
+
|
|
276
|
+
// AbortSignal — standard cancellation input.
|
|
277
|
+
if (signal) {
|
|
278
|
+
if (signal.aborted) {
|
|
279
|
+
queueMicrotask(() => void this.close('abort'))
|
|
280
|
+
} else {
|
|
281
|
+
fromEvent(signal, 'abort')
|
|
282
|
+
.pipe(
|
|
283
|
+
take(1),
|
|
284
|
+
tap(() => void this.close('abort')),
|
|
285
|
+
takeUntil(disconnecting),
|
|
286
|
+
)
|
|
287
|
+
.subscribe()
|
|
288
|
+
}
|
|
289
|
+
}
|
|
290
|
+
}
|
|
291
|
+
|
|
292
|
+
/* ---------------- anchored positioning ----------------------------- */
|
|
293
|
+
|
|
294
|
+
private positionAnchored(anchor: Anchor): void {
|
|
295
|
+
const rect = getAnchorRect(anchor)
|
|
296
|
+
const surfaceRect = this._surface.getBoundingClientRect()
|
|
297
|
+
const viewport = { w: window.innerWidth, h: window.innerHeight }
|
|
298
|
+
const pad = ANCHOR_FIT_PADDING_PX
|
|
299
|
+
|
|
300
|
+
// Prefer placing below the anchor; flip above if it doesn't fit.
|
|
301
|
+
let top = rect.bottom + 8
|
|
302
|
+
if (top + surfaceRect.height > viewport.h - pad) {
|
|
303
|
+
const above = rect.top - 8 - surfaceRect.height
|
|
304
|
+
if (above >= pad) top = above
|
|
305
|
+
else top = Math.max(pad, viewport.h - pad - surfaceRect.height)
|
|
306
|
+
}
|
|
307
|
+
|
|
308
|
+
// Prefer aligning the surface's left to the anchor's left; shift to keep in viewport.
|
|
309
|
+
let left = rect.left
|
|
310
|
+
if (left + surfaceRect.width > viewport.w - pad) {
|
|
311
|
+
left = viewport.w - pad - surfaceRect.width
|
|
312
|
+
}
|
|
313
|
+
if (left < pad) left = pad
|
|
314
|
+
|
|
315
|
+
this._surface.style.top = `${top}px`
|
|
316
|
+
this._surface.style.left = `${left}px`
|
|
317
|
+
this._surface.style.transform = 'none'
|
|
318
|
+
}
|
|
319
|
+
|
|
320
|
+
/* ---------------- animations --------------------------------------- */
|
|
321
|
+
|
|
322
|
+
private async playEnterAnimations(): Promise<void> {
|
|
323
|
+
const dialogEl = this._dialog
|
|
324
|
+
const surface = this._surface
|
|
325
|
+
if (!dialogEl || !surface) return
|
|
326
|
+
|
|
327
|
+
// Backdrop animates on the dialog itself via the ::backdrop pseudo,
|
|
328
|
+
// which WAAPI can't drive; we rely on CSS transition if desired.
|
|
329
|
+
const spec = surfaceAnimation(this.layout, 'in')
|
|
330
|
+
await surface.animate(spec.keyframes, spec.options).finished.catch(() => undefined)
|
|
331
|
+
}
|
|
332
|
+
|
|
333
|
+
private async playExitAnimations(): Promise<void> {
|
|
334
|
+
const surface = this._surface
|
|
335
|
+
if (!surface) return
|
|
336
|
+
const spec = surfaceAnimation(this.layout, 'out')
|
|
337
|
+
await surface.animate(spec.keyframes, spec.options).finished.catch(() => undefined)
|
|
338
|
+
}
|
|
339
|
+
|
|
340
|
+
/* ---------------- render ------------------------------------------- */
|
|
341
|
+
|
|
342
|
+
protected render(): TemplateResult {
|
|
343
|
+
return html`
|
|
344
|
+
<dialog>
|
|
345
|
+
<section
|
|
346
|
+
class="surface"
|
|
347
|
+
data-layout=${this.layout}
|
|
348
|
+
role="dialog"
|
|
349
|
+
aria-modal=${this.modal ? 'true' : 'false'}
|
|
350
|
+
>
|
|
351
|
+
${when(
|
|
352
|
+
this.layout === 'sheet',
|
|
353
|
+
() => html`<div class="drag-handle" role="button" aria-label="Dismiss" tabindex="0"></div>`,
|
|
354
|
+
)}
|
|
355
|
+
<div id=${MOUNT_POINT_ID}></div>
|
|
356
|
+
</section>
|
|
357
|
+
</dialog>
|
|
358
|
+
`
|
|
359
|
+
}
|
|
360
|
+
}
|
|
361
|
+
|
|
362
|
+
declare global {
|
|
363
|
+
interface HTMLElementTagNameMap {
|
|
364
|
+
'schmancy-overlay': SchmancyOverlay
|
|
365
|
+
}
|
|
366
|
+
}
|
|
367
|
+
|
|
368
|
+
/* ======================================================================= *
|
|
369
|
+
* content mounting helpers *
|
|
370
|
+
* ======================================================================= */
|
|
371
|
+
|
|
372
|
+
async function mountContent(
|
|
373
|
+
content: Content,
|
|
374
|
+
host: HTMLElement,
|
|
375
|
+
props?: Record<string, unknown>,
|
|
376
|
+
): Promise<HTMLElement> {
|
|
377
|
+
// TemplateResult path — render via lit's `render`.
|
|
378
|
+
if (isTemplateResult(content)) {
|
|
379
|
+
litRender(content, host)
|
|
380
|
+
return host
|
|
381
|
+
}
|
|
382
|
+
|
|
383
|
+
// Already-instantiated element: append directly.
|
|
384
|
+
if (content instanceof HTMLElement) {
|
|
385
|
+
if (props) Object.assign(content, props)
|
|
386
|
+
host.appendChild(content)
|
|
387
|
+
return content
|
|
388
|
+
}
|
|
389
|
+
|
|
390
|
+
// LazyComponent: await the module, then recurse with the default export.
|
|
391
|
+
if (isLazy(content)) {
|
|
392
|
+
const mod = await content()
|
|
393
|
+
return mountContent(mod.default, host, props)
|
|
394
|
+
}
|
|
395
|
+
|
|
396
|
+
// Class constructor — narrowed by exclusion of TemplateResult / HTMLElement /
|
|
397
|
+
// LazyComponent above; isLazy() false means the remaining `function` branch
|
|
398
|
+
// is a CustomElementConstructor.
|
|
399
|
+
if (typeof content === 'function') {
|
|
400
|
+
const Ctor = content as unknown as { new (): HTMLElement }
|
|
401
|
+
const el = new Ctor()
|
|
402
|
+
if (props) Object.assign(el, props)
|
|
403
|
+
host.appendChild(el)
|
|
404
|
+
return el
|
|
405
|
+
}
|
|
406
|
+
|
|
407
|
+
// Tag name.
|
|
408
|
+
if (typeof content === 'string') {
|
|
409
|
+
const el = document.createElement(content)
|
|
410
|
+
if (props) Object.assign(el, props)
|
|
411
|
+
host.appendChild(el)
|
|
412
|
+
return el
|
|
413
|
+
}
|
|
414
|
+
|
|
415
|
+
throw new Error('schmancy-overlay: unsupported content type')
|
|
416
|
+
}
|
|
417
|
+
|
|
418
|
+
function isTemplateResult(x: unknown): x is TemplateResult {
|
|
419
|
+
return typeof x === 'object' && x !== null && '_$litType$' in x
|
|
420
|
+
}
|
|
421
|
+
|
|
422
|
+
function isLazy(x: unknown): x is LazyComponent {
|
|
423
|
+
return typeof x === 'function' && ('preload' in (x as object) || '_promise' in (x as object))
|
|
424
|
+
}
|
|
425
|
+
|
|
426
|
+
interface Rect {
|
|
427
|
+
top: number
|
|
428
|
+
left: number
|
|
429
|
+
right: number
|
|
430
|
+
bottom: number
|
|
431
|
+
width: number
|
|
432
|
+
height: number
|
|
433
|
+
}
|
|
434
|
+
|
|
435
|
+
function getAnchorRect(anchor: Anchor): Rect {
|
|
436
|
+
if (anchor instanceof Element) {
|
|
437
|
+
const r = anchor.getBoundingClientRect()
|
|
438
|
+
return { top: r.top, left: r.left, right: r.right, bottom: r.bottom, width: r.width, height: r.height }
|
|
439
|
+
}
|
|
440
|
+
if ('clientX' in anchor && 'clientY' in anchor) {
|
|
441
|
+
return {
|
|
442
|
+
top: anchor.clientY,
|
|
443
|
+
left: anchor.clientX,
|
|
444
|
+
right: anchor.clientX,
|
|
445
|
+
bottom: anchor.clientY,
|
|
446
|
+
width: 0,
|
|
447
|
+
height: 0,
|
|
448
|
+
}
|
|
449
|
+
}
|
|
450
|
+
const pt = anchor as { x: number; y: number }
|
|
451
|
+
return { top: pt.y, left: pt.x, right: pt.x, bottom: pt.y, width: 0, height: 0 }
|
|
452
|
+
}
|
|
@@ -0,0 +1,149 @@
|
|
|
1
|
+
import { $LitElement } from '@mixins/index'
|
|
2
|
+
import { css, html, nothing, type TemplateResult } from 'lit'
|
|
3
|
+
import { customElement, property, query } from 'lit/decorators.js'
|
|
4
|
+
import { when } from 'lit/directives/when.js'
|
|
5
|
+
import { choose } from 'lit/directives/choose.js'
|
|
6
|
+
|
|
7
|
+
/**
|
|
8
|
+
* Internal body component used by the `confirm()` / `prompt()` sugar.
|
|
9
|
+
*
|
|
10
|
+
* Minimal, dependency-free — plain HTML buttons / input so this file
|
|
11
|
+
* doesn't need to import schmancy-form / schmancy-button (avoids the
|
|
12
|
+
* risk of circular module graphs during early imports of $overlay).
|
|
13
|
+
*
|
|
14
|
+
* Emits a `close` CustomEvent with the typed result; the overlay picks
|
|
15
|
+
* that up as the primary return channel. For custom-styled confirms,
|
|
16
|
+
* callers pass their own component to `show()`.
|
|
17
|
+
*/
|
|
18
|
+
@customElement('schmancy-overlay-prompt-body')
|
|
19
|
+
export class SchmancyOverlayPromptBody extends $LitElement(css`
|
|
20
|
+
:host {
|
|
21
|
+
display: block;
|
|
22
|
+
padding: 20px 24px;
|
|
23
|
+
min-width: 280px;
|
|
24
|
+
max-width: 480px;
|
|
25
|
+
color: var(--schmancy-sys-color-on-surface, #1a1a1a);
|
|
26
|
+
background: var(--schmancy-sys-color-surface, #ffffff);
|
|
27
|
+
border-radius: var(--schmancy-sys-shape-corner-large, 16px);
|
|
28
|
+
box-shadow: 0 10px 40px rgba(0, 0, 0, 0.12);
|
|
29
|
+
}
|
|
30
|
+
:host([variant='danger']) .cta-confirm {
|
|
31
|
+
background: var(--schmancy-sys-color-error, #b3261e);
|
|
32
|
+
color: var(--schmancy-sys-color-on-error, #ffffff);
|
|
33
|
+
}
|
|
34
|
+
`) {
|
|
35
|
+
@property({ type: String }) heading?: string
|
|
36
|
+
@property({ type: String }) subtitle?: string
|
|
37
|
+
@property({ type: String }) message?: string
|
|
38
|
+
@property({ type: String, attribute: 'confirm-text' }) confirmText = 'Confirm'
|
|
39
|
+
@property({ type: String, attribute: 'cancel-text' }) cancelText = 'Cancel'
|
|
40
|
+
@property({ type: String, reflect: true }) variant: 'default' | 'danger' = 'default'
|
|
41
|
+
|
|
42
|
+
/** Presence of `mode` switches between confirm (boolean) and prompt (string). */
|
|
43
|
+
@property({ type: String }) mode: 'confirm' | 'prompt' = 'confirm'
|
|
44
|
+
@property({ type: String }) label?: string
|
|
45
|
+
@property({ type: String, attribute: 'default-value' }) defaultValue = ''
|
|
46
|
+
@property({ type: String }) placeholder?: string
|
|
47
|
+
@property({ type: String, attribute: 'input-type' }) inputType: string = 'text'
|
|
48
|
+
@property({ type: String }) pattern?: string
|
|
49
|
+
@property({ type: Boolean }) required = false
|
|
50
|
+
|
|
51
|
+
@query('input') private _input?: HTMLInputElement
|
|
52
|
+
|
|
53
|
+
override firstUpdated(): void {
|
|
54
|
+
// Focus the confirm button in confirm mode; focus the input in prompt mode.
|
|
55
|
+
if (this.mode === 'prompt') {
|
|
56
|
+
queueMicrotask(() => this._input?.focus())
|
|
57
|
+
}
|
|
58
|
+
}
|
|
59
|
+
|
|
60
|
+
private dismiss(value: boolean | string | null): void {
|
|
61
|
+
this.dispatchEvent(
|
|
62
|
+
new CustomEvent('close', {
|
|
63
|
+
detail: value,
|
|
64
|
+
bubbles: true,
|
|
65
|
+
composed: true,
|
|
66
|
+
}),
|
|
67
|
+
)
|
|
68
|
+
}
|
|
69
|
+
|
|
70
|
+
private handleCancel = (): void => {
|
|
71
|
+
this.dismiss(this.mode === 'prompt' ? null : false)
|
|
72
|
+
}
|
|
73
|
+
|
|
74
|
+
private handleConfirm = (): void => {
|
|
75
|
+
if (this.mode === 'prompt') {
|
|
76
|
+
const input = this._input
|
|
77
|
+
if (input && !input.reportValidity()) return
|
|
78
|
+
this.dismiss(input?.value ?? '')
|
|
79
|
+
} else {
|
|
80
|
+
this.dismiss(true)
|
|
81
|
+
}
|
|
82
|
+
}
|
|
83
|
+
|
|
84
|
+
private handleSubmit = (e: Event): void => {
|
|
85
|
+
e.preventDefault()
|
|
86
|
+
this.handleConfirm()
|
|
87
|
+
}
|
|
88
|
+
|
|
89
|
+
protected render(): TemplateResult {
|
|
90
|
+
return html`
|
|
91
|
+
<form @submit=${this.handleSubmit}>
|
|
92
|
+
${when(
|
|
93
|
+
this.heading,
|
|
94
|
+
() => html`<h2 class="text-lg font-semibold mb-1">${this.heading}</h2>`,
|
|
95
|
+
)}
|
|
96
|
+
${when(
|
|
97
|
+
this.subtitle,
|
|
98
|
+
() => html`<p class="text-sm opacity-70 mb-2">${this.subtitle}</p>`,
|
|
99
|
+
)}
|
|
100
|
+
${choose(
|
|
101
|
+
this.mode,
|
|
102
|
+
[
|
|
103
|
+
[
|
|
104
|
+
'prompt',
|
|
105
|
+
() => html`
|
|
106
|
+
${when(this.label, () => html`<label class="block text-sm mb-1">${this.label}</label>`)}
|
|
107
|
+
<input
|
|
108
|
+
type=${this.inputType}
|
|
109
|
+
.value=${this.defaultValue}
|
|
110
|
+
placeholder=${this.placeholder ?? nothing}
|
|
111
|
+
pattern=${this.pattern ?? nothing}
|
|
112
|
+
?required=${this.required}
|
|
113
|
+
class="w-full px-3 py-2 rounded-md border border-outline-variant text-base mb-2"
|
|
114
|
+
/>
|
|
115
|
+
${when(
|
|
116
|
+
this.message,
|
|
117
|
+
() => html`<p class="text-sm mb-3">${this.message}</p>`,
|
|
118
|
+
)}
|
|
119
|
+
`,
|
|
120
|
+
],
|
|
121
|
+
],
|
|
122
|
+
() => html`${when(this.message, () => html`<p class="text-sm mb-4">${this.message}</p>`)}`,
|
|
123
|
+
)}
|
|
124
|
+
|
|
125
|
+
<div class="flex justify-end gap-2 mt-4">
|
|
126
|
+
<button
|
|
127
|
+
type="button"
|
|
128
|
+
@click=${this.handleCancel}
|
|
129
|
+
class="px-4 py-2 rounded-md border border-outline-variant bg-transparent cursor-pointer"
|
|
130
|
+
>
|
|
131
|
+
${this.cancelText}
|
|
132
|
+
</button>
|
|
133
|
+
<button
|
|
134
|
+
type="submit"
|
|
135
|
+
class="cta-confirm px-4 py-2 rounded-md border-0 bg-primary text-on-primary cursor-pointer font-medium"
|
|
136
|
+
>
|
|
137
|
+
${this.confirmText}
|
|
138
|
+
</button>
|
|
139
|
+
</div>
|
|
140
|
+
</form>
|
|
141
|
+
`
|
|
142
|
+
}
|
|
143
|
+
}
|
|
144
|
+
|
|
145
|
+
declare global {
|
|
146
|
+
interface HTMLElementTagNameMap {
|
|
147
|
+
'schmancy-overlay-prompt-body': SchmancyOverlayPromptBody
|
|
148
|
+
}
|
|
149
|
+
}
|