@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.
Files changed (479) hide show
  1. package/custom-elements.json +194 -0
  2. package/dist/agent/schmancy.agent.js +107 -1
  3. package/dist/agent/schmancy.agent.js.map +1 -1
  4. package/dist/agent/schmancy.manifest.json +148 -0
  5. package/dist/{animation-Bcwh107v.cjs.map → animation-CQRdLgzX.cjs.map} +1 -1
  6. package/dist/{animation-CXKSuUoE.js.map → animation-hXFClrIn.js.map} +1 -1
  7. package/dist/{area-CApZWjqs.cjs → area-DBjAhgjP.cjs} +2 -2
  8. package/dist/area-DBjAhgjP.cjs.map +1 -0
  9. package/dist/{area-D_p1YBgP.js → area-Dr4I9R2p.js} +23 -35
  10. package/dist/area-Dr4I9R2p.js.map +1 -0
  11. package/dist/area.cjs +1 -1
  12. package/dist/area.js +3 -2
  13. package/dist/{audio-DUVz7Ars.cjs → audio-Dvr-RBzE.cjs} +1 -1
  14. package/dist/{audio-DUVz7Ars.cjs.map → audio-Dvr-RBzE.cjs.map} +1 -1
  15. package/dist/{audio-C7TzWI8M.js → audio-ql6nvY0y.js} +1 -1
  16. package/dist/{audio-C7TzWI8M.js.map → audio-ql6nvY0y.js.map} +1 -1
  17. package/dist/audio.cjs +1 -1
  18. package/dist/audio.js +2 -2
  19. package/dist/{autocomplete-DAK35swc.js → autocomplete-CgWUCUU-.js} +3 -3
  20. package/dist/{autocomplete-DAK35swc.js.map → autocomplete-CgWUCUU-.js.map} +1 -1
  21. package/dist/{autocomplete-DlCqS1gW.cjs → autocomplete-EM0jE7X2.cjs} +1 -1
  22. package/dist/{autocomplete-DlCqS1gW.cjs.map → autocomplete-EM0jE7X2.cjs.map} +1 -1
  23. package/dist/autocomplete.cjs +1 -1
  24. package/dist/autocomplete.js +1 -1
  25. package/dist/badge.cjs +1 -1
  26. package/dist/badge.js +1 -1
  27. package/dist/{boat-C57YTPbb.cjs → boat-BjYJI1HS.cjs} +1 -1
  28. package/dist/{boat-C57YTPbb.cjs.map → boat-BjYJI1HS.cjs.map} +1 -1
  29. package/dist/{boat-Dms45k4o.js → boat-Dw8TmOzN.js} +4 -4
  30. package/dist/{boat-Dms45k4o.js.map → boat-Dw8TmOzN.js.map} +1 -1
  31. package/dist/boat.cjs +1 -1
  32. package/dist/boat.js +1 -1
  33. package/dist/breadcrumb.cjs +1 -1
  34. package/dist/breadcrumb.js +1 -1
  35. package/dist/{busy-BfN1p1n8.cjs → busy-BmiumJpB.cjs} +1 -1
  36. package/dist/{busy-BfN1p1n8.cjs.map → busy-BmiumJpB.cjs.map} +1 -1
  37. package/dist/{busy-IKS9obYj.js → busy-D2hP3fOy.js} +1 -1
  38. package/dist/{busy-IKS9obYj.js.map → busy-D2hP3fOy.js.map} +1 -1
  39. package/dist/busy.cjs +1 -1
  40. package/dist/busy.js +1 -1
  41. package/dist/button.cjs +1 -1
  42. package/dist/button.js +4 -4
  43. package/dist/{card-ZObyqkFF.cjs → card-BslSqOsf.cjs} +1 -1
  44. package/dist/{card-ZObyqkFF.cjs.map → card-BslSqOsf.cjs.map} +1 -1
  45. package/dist/{card-DQNBal9V.js → card-CEdgK9nb.js} +2 -2
  46. package/dist/{card-DQNBal9V.js.map → card-CEdgK9nb.js.map} +1 -1
  47. package/dist/card.cjs +1 -1
  48. package/dist/card.js +1 -1
  49. package/dist/charts.cjs +1 -1
  50. package/dist/charts.js +1 -1
  51. package/dist/{checkbox-COhTJ1x5.js → checkbox-Br84TiCs.js} +2 -2
  52. package/dist/{checkbox-COhTJ1x5.js.map → checkbox-Br84TiCs.js.map} +1 -1
  53. package/dist/{checkbox-CiAtIrqB.cjs → checkbox-DtcFMgZL.cjs} +1 -1
  54. package/dist/{checkbox-CiAtIrqB.cjs.map → checkbox-DtcFMgZL.cjs.map} +1 -1
  55. package/dist/checkbox.cjs +1 -1
  56. package/dist/checkbox.js +1 -1
  57. package/dist/{chips-B5o3vNQF.js → chips-BNYOweGm.js} +5 -5
  58. package/dist/{chips-B5o3vNQF.js.map → chips-BNYOweGm.js.map} +1 -1
  59. package/dist/{chips-D2xmsC36.cjs → chips-DoCu5YQb.cjs} +1 -1
  60. package/dist/{chips-D2xmsC36.cjs.map → chips-DoCu5YQb.cjs.map} +1 -1
  61. package/dist/chips.cjs +1 -1
  62. package/dist/chips.js +2 -2
  63. package/dist/{chunk-C_1VqBVD.js → chunk-BM5alsTp.js} +9 -2
  64. package/dist/chunk-CncqDLb2.cjs +1 -0
  65. package/dist/{code-highlight-SkMMTkIJ.js → code-highlight-BgExKEto.js} +1 -1
  66. package/dist/{code-highlight-SkMMTkIJ.js.map → code-highlight-BgExKEto.js.map} +1 -1
  67. package/dist/{code-highlight-BToHh8T6.cjs → code-highlight-zSYcSfCz.cjs} +1 -1
  68. package/dist/{code-highlight-BToHh8T6.cjs.map → code-highlight-zSYcSfCz.cjs.map} +1 -1
  69. package/dist/code-highlight.cjs +1 -1
  70. package/dist/code-highlight.js +1 -1
  71. package/dist/{components-Ca7OTgbQ.js → components-DjKNS9R_.js} +1 -1
  72. package/dist/{components-Ca7OTgbQ.js.map → components-DjKNS9R_.js.map} +1 -1
  73. package/dist/{components-B-XYvUWn.cjs → components-TJT8-tva.cjs} +1 -1
  74. package/dist/{components-B-XYvUWn.cjs.map → components-TJT8-tva.cjs.map} +1 -1
  75. package/dist/components.cjs +1 -1
  76. package/dist/components.js +1 -1
  77. package/dist/connectivity.cjs +1 -1
  78. package/dist/connectivity.js +2 -2
  79. package/dist/content-drawer.cjs +1 -1
  80. package/dist/content-drawer.js +1 -1
  81. package/dist/context-CAYQh-mx.cjs +1 -0
  82. package/dist/{context-C6GwmNJJ.cjs.map → context-CAYQh-mx.cjs.map} +1 -1
  83. package/dist/context-D8Q66KPe.js +3 -0
  84. package/dist/{context-oBTPHrbc.js.map → context-D8Q66KPe.js.map} +1 -1
  85. package/dist/{cursor-glow-C2YRrB8Z.js → cursor-glow-BydlDInj.js} +1 -1
  86. package/dist/{cursor-glow-C2YRrB8Z.js.map → cursor-glow-BydlDInj.js.map} +1 -1
  87. package/dist/{cursor-glow-82y5h3E4.cjs → cursor-glow-Duw9jHmh.cjs} +1 -1
  88. package/dist/{cursor-glow-82y5h3E4.cjs.map → cursor-glow-Duw9jHmh.cjs.map} +1 -1
  89. package/dist/{date-range-BTA9nKbw.cjs → date-range-CIWYm3eS.cjs} +1 -1
  90. package/dist/{date-range-BTA9nKbw.cjs.map → date-range-CIWYm3eS.cjs.map} +1 -1
  91. package/dist/{date-range-inline-LLC3Y0mi.cjs → date-range-inline-B9Dp2z6C.cjs} +1 -1
  92. package/dist/{date-range-inline-LLC3Y0mi.cjs.map → date-range-inline-B9Dp2z6C.cjs.map} +1 -1
  93. package/dist/{date-range-inline-B_g1YXu3.js.map → date-range-inline-CpKG6qt2.js.map} +1 -1
  94. package/dist/date-range-inline.cjs +1 -1
  95. package/dist/date-range-inline.js +1 -1
  96. package/dist/{date-range-DUWpF0Qw.js → date-range-sGkC0KF3.js} +4 -4
  97. package/dist/{date-range-DUWpF0Qw.js.map → date-range-sGkC0KF3.js.map} +1 -1
  98. package/dist/date-range.cjs +1 -1
  99. package/dist/date-range.js +1 -1
  100. package/dist/{delay-Co89XWry.cjs → delay-Bu4WMQlV.cjs} +1 -1
  101. package/dist/{delay-Co89XWry.cjs.map → delay-Bu4WMQlV.cjs.map} +1 -1
  102. package/dist/{delay-CtDrlf1Q.js → delay-DwX65fSc.js} +4 -4
  103. package/dist/{delay-CtDrlf1Q.js.map → delay-DwX65fSc.js.map} +1 -1
  104. package/dist/delay.cjs +1 -1
  105. package/dist/delay.js +1 -1
  106. package/dist/{details-CyXyVdb2.cjs → details-B8p62xmR.cjs} +1 -1
  107. package/dist/{details-CyXyVdb2.cjs.map → details-B8p62xmR.cjs.map} +1 -1
  108. package/dist/{details-B1Ax7WiP.js → details-CCW52lzz.js} +5 -5
  109. package/dist/{details-B1Ax7WiP.js.map → details-CCW52lzz.js.map} +1 -1
  110. package/dist/details.cjs +1 -1
  111. package/dist/details.js +1 -1
  112. package/dist/{dialog-service-DXLGSshF.cjs → dialog-service-CzDO08Gy.cjs} +1 -1
  113. package/dist/{dialog-service-DXLGSshF.cjs.map → dialog-service-CzDO08Gy.cjs.map} +1 -1
  114. package/dist/{dialog-service-CCFGpU7a.js → dialog-service-DH-tjPuE.js} +2 -2
  115. package/dist/{dialog-service-CCFGpU7a.js.map → dialog-service-DH-tjPuE.js.map} +1 -1
  116. package/dist/dialog.cjs +1 -1
  117. package/dist/dialog.js +5 -5
  118. package/dist/directives.cjs +1 -1
  119. package/dist/directives.js +5 -5
  120. package/dist/discovery.cjs +1 -1
  121. package/dist/{divider-DuwCrKQu.js → divider-CbEWg3G_.js} +1 -1
  122. package/dist/{divider-DuwCrKQu.js.map → divider-CbEWg3G_.js.map} +1 -1
  123. package/dist/{divider-xcvHqVBc.cjs → divider-JyyFw_3J.cjs} +1 -1
  124. package/dist/{divider-xcvHqVBc.cjs.map → divider-JyyFw_3J.cjs.map} +1 -1
  125. package/dist/divider.cjs +1 -1
  126. package/dist/divider.js +1 -1
  127. package/dist/dropdown.cjs +1 -1
  128. package/dist/dropdown.js +2 -2
  129. package/dist/{expand-DUgOh1af.cjs → expand-BmwIPNjq.cjs} +1 -1
  130. package/dist/{expand-DUgOh1af.cjs.map → expand-BmwIPNjq.cjs.map} +1 -1
  131. package/dist/{expand-X0C1W279.js → expand-bFa_qVDT.js} +4 -4
  132. package/dist/{expand-X0C1W279.js.map → expand-bFa_qVDT.js.map} +1 -1
  133. package/dist/expand.cjs +1 -1
  134. package/dist/expand.js +1 -1
  135. package/dist/{extra-BqfYIC_q.cjs → extra-BUgyMgjl.cjs} +1 -1
  136. package/dist/{extra-BqfYIC_q.cjs.map → extra-BUgyMgjl.cjs.map} +1 -1
  137. package/dist/{extra-BTyq-5Z6.js → extra-HwbaUnCD.js} +1 -1
  138. package/dist/{extra-BTyq-5Z6.js.map → extra-HwbaUnCD.js.map} +1 -1
  139. package/dist/extra.cjs +1 -1
  140. package/dist/extra.js +1 -1
  141. package/dist/float-BQwhfibw.cjs +1 -0
  142. package/dist/{float-yZoLnUg0.cjs.map → float-BQwhfibw.cjs.map} +1 -1
  143. package/dist/{float-BgGeLER6.js → float-D5ezUurt.js} +1 -1
  144. package/dist/{float-BgGeLER6.js.map → float-D5ezUurt.js.map} +1 -1
  145. package/dist/float.cjs +1 -1
  146. package/dist/float.js +1 -1
  147. package/dist/{flow-BPDtbhLe.js.map → flow-BGkHnOnd.js.map} +1 -1
  148. package/dist/{flow-Dn9AZktE.cjs.map → flow-ClAJ6Qby.cjs.map} +1 -1
  149. package/dist/{form-C1qS9uvS.js.map → form-rCZqoAoK.js.map} +1 -1
  150. package/dist/{form-CzD0JLxM.cjs → form-wI58M85H.cjs} +1 -1
  151. package/dist/{form-CzD0JLxM.cjs.map → form-wI58M85H.cjs.map} +1 -1
  152. package/dist/form.cjs +1 -1
  153. package/dist/form.js +1 -1
  154. package/dist/handover/agent-runtime-followups.md +247 -0
  155. package/dist/handover/agent-runtime-v1.md +109 -0
  156. package/dist/{hashContent-BUqULUiZ.js.map → hashContent-B2IntJQf.js.map} +1 -1
  157. package/dist/{hashContent-CI39BY-_.cjs.map → hashContent-CahnEuut.cjs.map} +1 -1
  158. package/dist/{icons-BLFEJFDG.cjs → icons-B6V3nZ4-.cjs} +1 -1
  159. package/dist/{icons-BLFEJFDG.cjs.map → icons-B6V3nZ4-.cjs.map} +1 -1
  160. package/dist/{icons-BDcb8dNb.js → icons-C5-DIjet.js} +2 -2
  161. package/dist/{icons-BDcb8dNb.js.map → icons-C5-DIjet.js.map} +1 -1
  162. package/dist/icons.cjs +1 -1
  163. package/dist/icons.js +1 -1
  164. package/dist/{iframe-qCW0HzwB.js → iframe-BXBsuLwt.js} +1 -1
  165. package/dist/{iframe-qCW0HzwB.js.map → iframe-BXBsuLwt.js.map} +1 -1
  166. package/dist/{iframe-CrDpQkhj.cjs → iframe-C7sHg7RC.cjs} +1 -1
  167. package/dist/{iframe-CrDpQkhj.cjs.map → iframe-C7sHg7RC.cjs.map} +1 -1
  168. package/dist/iframe.cjs +1 -1
  169. package/dist/iframe.js +1 -1
  170. package/dist/index.cjs +1 -1
  171. package/dist/index.js +53 -52
  172. package/dist/{input-C1MIZaKq.cjs → input-BGNZlfL8.cjs} +1 -1
  173. package/dist/{input-C1MIZaKq.cjs.map → input-BGNZlfL8.cjs.map} +1 -1
  174. package/dist/{input-Dv-HtkM9.js.map → input-Bc3bVISm.js.map} +1 -1
  175. package/dist/{input-chip-CyvjhQSw.js → input-chip-CiG61y-N.js} +1 -1
  176. package/dist/{input-chip-CyvjhQSw.js.map → input-chip-CiG61y-N.js.map} +1 -1
  177. package/dist/{input-chip-DnfthOSY.cjs → input-chip-p24lkYtY.cjs} +1 -1
  178. package/dist/{input-chip-DnfthOSY.cjs.map → input-chip-p24lkYtY.cjs.map} +1 -1
  179. package/dist/input.cjs +1 -1
  180. package/dist/input.js +1 -1
  181. package/dist/{intersection-C0JuW_7U.js.map → intersection-BrXp4YTO.js.map} +1 -1
  182. package/dist/{intersection-MvbRovUz.cjs → intersection-DqBqnpgh.cjs} +1 -1
  183. package/dist/{intersection-MvbRovUz.cjs.map → intersection-DqBqnpgh.cjs.map} +1 -1
  184. package/dist/json.cjs +1 -1
  185. package/dist/json.js +2 -2
  186. package/dist/kbd.cjs +1 -1
  187. package/dist/kbd.js +1 -1
  188. package/dist/{layout-D0cR3hT1.cjs → layout-B0_IXfov.cjs} +1 -1
  189. package/dist/{layout-D0cR3hT1.cjs.map → layout-B0_IXfov.cjs.map} +1 -1
  190. package/dist/{layout-PZCF3kwl.cjs → layout-CTfRXQoz.cjs} +1 -1
  191. package/dist/{layout-PZCF3kwl.cjs.map → layout-CTfRXQoz.cjs.map} +1 -1
  192. package/dist/{layout-Y5qo3er8.js → layout-Cqghi_rx.js} +2 -2
  193. package/dist/{layout-Y5qo3er8.js.map → layout-Cqghi_rx.js.map} +1 -1
  194. package/dist/{layout-BE2ld1IY.js → layout-fjM1DWlF.js} +1 -1
  195. package/dist/{layout-BE2ld1IY.js.map → layout-fjM1DWlF.js.map} +1 -1
  196. package/dist/layout.cjs +1 -1
  197. package/dist/layout.js +2 -2
  198. package/dist/lazy-BDNnH_r7.cjs +1 -0
  199. package/dist/lazy-BDNnH_r7.cjs.map +1 -0
  200. package/dist/lazy-D6R5N5v4.js +13 -0
  201. package/dist/lazy-D6R5N5v4.js.map +1 -0
  202. package/dist/{lightbox-Ce8nMldr.cjs → lightbox-BWKTzA03.cjs} +1 -1
  203. package/dist/{lightbox-Ce8nMldr.cjs.map → lightbox-BWKTzA03.cjs.map} +1 -1
  204. package/dist/{lightbox-C_pqYF6q.js → lightbox-CnCTvqSu.js} +3 -3
  205. package/dist/{lightbox-C_pqYF6q.js.map → lightbox-CnCTvqSu.js.map} +1 -1
  206. package/dist/lightbox.cjs +1 -1
  207. package/dist/lightbox.js +1 -1
  208. package/dist/{list-DcnTGee0.js → list-BpjKUOzM.js} +2 -2
  209. package/dist/{list-DcnTGee0.js.map → list-BpjKUOzM.js.map} +1 -1
  210. package/dist/{list-CLc_OQ5k.cjs → list-CMWHu6cV.cjs} +1 -1
  211. package/dist/{list-CLc_OQ5k.cjs.map → list-CMWHu6cV.cjs.map} +1 -1
  212. package/dist/list.cjs +1 -1
  213. package/dist/list.js +1 -1
  214. package/dist/{litElement.mixin-Mi8bar6B.js → litElement.mixin-BnNYZ24e.js} +1 -1
  215. package/dist/{litElement.mixin-Mi8bar6B.js.map → litElement.mixin-BnNYZ24e.js.map} +1 -1
  216. package/dist/{litElement.mixin-DeT3kAOS.cjs → litElement.mixin-CtQOmwq6.cjs} +1 -1
  217. package/dist/{litElement.mixin-DeT3kAOS.cjs.map → litElement.mixin-CtQOmwq6.cjs.map} +1 -1
  218. package/dist/{magnetic-Dj52WplI.js → magnetic-BhXebqF3.js} +2 -2
  219. package/dist/{magnetic-Dj52WplI.js.map → magnetic-BhXebqF3.js.map} +1 -1
  220. package/dist/{magnetic-aBBnj_vk.cjs → magnetic-CVXEkYTA.cjs} +1 -1
  221. package/dist/{magnetic-aBBnj_vk.cjs.map → magnetic-CVXEkYTA.cjs.map} +1 -1
  222. package/dist/{mailbox-BrLZPj2o.js → mailbox-CHIpxS3W.js} +5 -5
  223. package/dist/{mailbox-BrLZPj2o.js.map → mailbox-CHIpxS3W.js.map} +1 -1
  224. package/dist/{mailbox-CE5sTDsQ.cjs → mailbox-Tg1CROVz.cjs} +1 -1
  225. package/dist/{mailbox-CE5sTDsQ.cjs.map → mailbox-Tg1CROVz.cjs.map} +1 -1
  226. package/dist/mailbox.cjs +1 -1
  227. package/dist/mailbox.js +1 -1
  228. package/dist/{map-SNb-3q5h.js → map-YY1Q4FWO.js} +1 -1
  229. package/dist/{map-SNb-3q5h.js.map → map-YY1Q4FWO.js.map} +1 -1
  230. package/dist/{map-CKzhM6uY.cjs → map-Z_dsu-dv.cjs} +1 -1
  231. package/dist/{map-CKzhM6uY.cjs.map → map-Z_dsu-dv.cjs.map} +1 -1
  232. package/dist/map.cjs +1 -1
  233. package/dist/map.js +1 -1
  234. package/dist/{menu-VErqs9NG.js → menu-BIBUgS1T.js} +2 -2
  235. package/dist/{menu-VErqs9NG.js.map → menu-BIBUgS1T.js.map} +1 -1
  236. package/dist/{menu-BnGjBrdD.cjs → menu-DS8Iz4fJ.cjs} +1 -1
  237. package/dist/{menu-BnGjBrdD.cjs.map → menu-DS8Iz4fJ.cjs.map} +1 -1
  238. package/dist/menu.cjs +1 -1
  239. package/dist/menu.js +1 -1
  240. package/dist/mixins.cjs +1 -1
  241. package/dist/mixins.js +2 -2
  242. package/dist/nav-drawer.cjs +1 -1
  243. package/dist/nav-drawer.js +1 -1
  244. package/dist/navigation-bar.cjs +1 -1
  245. package/dist/navigation-bar.js +1 -1
  246. package/dist/navigation-rail.cjs +1 -1
  247. package/dist/navigation-rail.js +1 -1
  248. package/dist/{notification-B_Fkxv7d.js → notification-ChAvNXf3.js} +3 -3
  249. package/dist/{notification-B_Fkxv7d.js.map → notification-ChAvNXf3.js.map} +1 -1
  250. package/dist/{notification-DE5dFf8G.cjs → notification-DPUkuifB.cjs} +1 -1
  251. package/dist/{notification-DE5dFf8G.cjs.map → notification-DPUkuifB.cjs.map} +1 -1
  252. package/dist/notification.cjs +1 -1
  253. package/dist/notification.js +1 -1
  254. package/dist/{option-DuAlGv27.js → option-Ci7C8xxh.js} +1 -1
  255. package/dist/{option-DuAlGv27.js.map → option-Ci7C8xxh.js.map} +1 -1
  256. package/dist/{option-BmbP5ulK.cjs → option-OIp0joyN.cjs} +1 -1
  257. package/dist/{option-BmbP5ulK.cjs.map → option-OIp0joyN.cjs.map} +1 -1
  258. package/dist/option.cjs +1 -1
  259. package/dist/option.js +1 -1
  260. package/dist/{overlay-stack-J_eJCUTX.cjs.map → overlay-stack-7bs4ZNnh.cjs.map} +1 -1
  261. package/dist/{overlay-stack-BJt_r6aZ.js.map → overlay-stack-DXPYHPhk.js.map} +1 -1
  262. package/dist/overlay.cjs +130 -0
  263. package/dist/overlay.cjs.map +1 -0
  264. package/dist/overlay.js +570 -0
  265. package/dist/overlay.js.map +1 -0
  266. package/dist/page.cjs +1 -1
  267. package/dist/page.js +4 -4
  268. package/dist/{progress-Bt9gUiGP.cjs → progress-32Cad1NX.cjs} +1 -1
  269. package/dist/{progress-Bt9gUiGP.cjs.map → progress-32Cad1NX.cjs.map} +1 -1
  270. package/dist/{progress-BnXr7aAs.js → progress-DGkwPgDX.js} +1 -1
  271. package/dist/{progress-BnXr7aAs.js.map → progress-DGkwPgDX.js.map} +1 -1
  272. package/dist/progress.cjs +1 -1
  273. package/dist/progress.js +1 -1
  274. package/dist/{provide-Disc6_zz.js → provide-BuzyBLGj.js} +1 -1
  275. package/dist/{provide-Disc6_zz.js.map → provide-BuzyBLGj.js.map} +1 -1
  276. package/dist/{provide-CnXCF-UP.cjs → provide-MvHcXKzT.cjs} +1 -1
  277. package/dist/{provide-CnXCF-UP.cjs.map → provide-MvHcXKzT.cjs.map} +1 -1
  278. package/dist/qr-scanner.cjs +1 -1
  279. package/dist/qr-scanner.js +1 -1
  280. package/dist/{radio-group-BgZgHMoA.js → radio-group-B72sYGnS.js} +1 -1
  281. package/dist/{radio-group-BgZgHMoA.js.map → radio-group-B72sYGnS.js.map} +1 -1
  282. package/dist/{radio-group-DkBFgq_3.cjs → radio-group-B7DuNxUq.cjs} +1 -1
  283. package/dist/{radio-group-DkBFgq_3.cjs.map → radio-group-B7DuNxUq.cjs.map} +1 -1
  284. package/dist/radio-group.cjs +1 -1
  285. package/dist/radio-group.js +1 -1
  286. package/dist/range.cjs +1 -1
  287. package/dist/range.js +1 -1
  288. package/dist/{reduced-motion-DR32yKEO.cjs → reduced-motion-9RjNnhIg.cjs} +1 -1
  289. package/dist/{reduced-motion-DR32yKEO.cjs.map → reduced-motion-9RjNnhIg.cjs.map} +1 -1
  290. package/dist/{reduced-motion-B83yZbcO.js.map → reduced-motion-BZTLqAyl.js.map} +1 -1
  291. package/dist/{rxjs-utils-CN9fv8Xq.js → rxjs-utils-CKTnEKUH.js} +1 -1
  292. package/dist/{rxjs-utils-CN9fv8Xq.js.map → rxjs-utils-CKTnEKUH.js.map} +1 -1
  293. package/dist/{rxjs-utils-Vn6DCKgL.cjs → rxjs-utils-DJbZRjp3.cjs} +1 -1
  294. package/dist/{rxjs-utils-Vn6DCKgL.cjs.map → rxjs-utils-DJbZRjp3.cjs.map} +1 -1
  295. package/dist/rxjs-utils.cjs +1 -1
  296. package/dist/rxjs-utils.js +1 -1
  297. package/dist/{scroll-57rkTHm8.js → scroll-CdmXRXh2.js} +1 -1
  298. package/dist/{scroll-57rkTHm8.js.map → scroll-CdmXRXh2.js.map} +1 -1
  299. package/dist/{scroll-hWt0b1gK.cjs → scroll-V1rAZ9fK.cjs} +1 -1
  300. package/dist/{scroll-hWt0b1gK.cjs.map → scroll-V1rAZ9fK.cjs.map} +1 -1
  301. package/dist/{search-BlGJ6uJv.js.map → search-CvUZRLF1.js.map} +1 -1
  302. package/dist/{search-C8eAOzBm.cjs.map → search-CwMav5QB.cjs.map} +1 -1
  303. package/dist/{select-BDonPD5a.cjs → select-DFxoBgEf.cjs} +1 -1
  304. package/dist/{select-BDonPD5a.cjs.map → select-DFxoBgEf.cjs.map} +1 -1
  305. package/dist/{select-CkOAwmxC.js → select-wFDKDLQI.js} +2 -2
  306. package/dist/{select-CkOAwmxC.js.map → select-wFDKDLQI.js.map} +1 -1
  307. package/dist/select.cjs +1 -1
  308. package/dist/select.js +1 -1
  309. package/dist/{sheet-Bv2mPHWk.cjs → sheet-DdlZhnDG.cjs} +2 -2
  310. package/dist/{sheet-Bv2mPHWk.cjs.map → sheet-DdlZhnDG.cjs.map} +1 -1
  311. package/dist/{sheet-NUgEmozP.js → sheet-LFVo5iN4.js} +4 -4
  312. package/dist/{sheet-NUgEmozP.js.map → sheet-LFVo5iN4.js.map} +1 -1
  313. package/dist/sheet.cjs +1 -1
  314. package/dist/sheet.js +2 -2
  315. package/dist/{sheet.service-BKmnlkpZ.cjs → sheet.service-BfNDB0K0.cjs} +1 -1
  316. package/dist/{sheet.service-BKmnlkpZ.cjs.map → sheet.service-BfNDB0K0.cjs.map} +1 -1
  317. package/dist/{sheet.service-CanLo8ko.js → sheet.service-DQE7-_wq.js} +3 -3
  318. package/dist/{sheet.service-CanLo8ko.js.map → sheet.service-DQE7-_wq.js.map} +1 -1
  319. package/dist/skeleton.cjs +1 -1
  320. package/dist/skeleton.js +1 -1
  321. package/dist/skills/INDEX.md +1 -1
  322. package/dist/skills/overlay.md +200 -0
  323. package/dist/skills/schmancy/INDEX.md +1 -1
  324. package/dist/skills/schmancy/overlay.md +200 -0
  325. package/dist/slider.cjs +1 -1
  326. package/dist/slider.js +1 -1
  327. package/dist/{sound.service-BjSoGjmT.cjs → sound.service-BEN6Xjy_.cjs} +1 -1
  328. package/dist/{sound.service-BjSoGjmT.cjs.map → sound.service-BEN6Xjy_.cjs.map} +1 -1
  329. package/dist/{sound.service-cdkw3Wkv.js → sound.service-DWZe6swU.js} +1 -1
  330. package/dist/{sound.service-cdkw3Wkv.js.map → sound.service-DWZe6swU.js.map} +1 -1
  331. package/dist/{splash-screen-BemqNFNj.cjs → splash-screen-C9HqX2nR.cjs} +1 -1
  332. package/dist/{splash-screen-BemqNFNj.cjs.map → splash-screen-C9HqX2nR.cjs.map} +1 -1
  333. package/dist/{splash-screen-B0ppA3f1.js → splash-screen-COg3Z6n8.js} +1 -1
  334. package/dist/{splash-screen-B0ppA3f1.js.map → splash-screen-COg3Z6n8.js.map} +1 -1
  335. package/dist/splash-screen.cjs +1 -1
  336. package/dist/splash-screen.js +1 -1
  337. package/dist/{src-Cjy9zCiU.js → src-C7niWYur.js} +51 -51
  338. package/dist/{src-Cjy9zCiU.js.map → src-C7niWYur.js.map} +1 -1
  339. package/dist/{src-ByGCYD-E.cjs → src-I4M33WK2.cjs} +3 -3
  340. package/dist/{src-ByGCYD-E.cjs.map → src-I4M33WK2.cjs.map} +1 -1
  341. package/dist/steps.cjs +1 -1
  342. package/dist/steps.js +3 -3
  343. package/dist/{store-CO4nJyGj.cjs → store-CjFHCSDb.cjs} +1 -1
  344. package/dist/{store-CO4nJyGj.cjs.map → store-CjFHCSDb.cjs.map} +1 -1
  345. package/dist/{store-Bmj6rvZY.js.map → store-CjzZDQt8.js.map} +1 -1
  346. package/dist/store.cjs +1 -1
  347. package/dist/store.js +1 -1
  348. package/dist/{surface-CtpWeSGn.js → surface-0XM4DBaT.js} +2 -2
  349. package/dist/{surface-CtpWeSGn.js.map → surface-0XM4DBaT.js.map} +1 -1
  350. package/dist/{surface-CoLYICO1.cjs → surface-B6DA01kL.cjs} +1 -1
  351. package/dist/{surface-CoLYICO1.cjs.map → surface-B6DA01kL.cjs.map} +1 -1
  352. package/dist/surface.cjs +1 -1
  353. package/dist/surface.js +1 -1
  354. package/dist/{surface.mixin-CSKqQH-0.cjs → surface.mixin-DxOi-xo0.cjs} +1 -1
  355. package/dist/{surface.mixin-CSKqQH-0.cjs.map → surface.mixin-DxOi-xo0.cjs.map} +1 -1
  356. package/dist/switch.cjs +1 -1
  357. package/dist/switch.js +1 -1
  358. package/dist/{table-COQKtlJB.cjs → table-B-DsOqzT.cjs} +2 -2
  359. package/dist/{table-COQKtlJB.cjs.map → table-B-DsOqzT.cjs.map} +1 -1
  360. package/dist/{table-bgFb1KYU.js → table-hBEZRxM_.js} +3 -3
  361. package/dist/{table-bgFb1KYU.js.map → table-hBEZRxM_.js.map} +1 -1
  362. package/dist/table.cjs +1 -1
  363. package/dist/table.js +1 -1
  364. package/dist/{tabs-BicCpU1B.js → tabs-C7r4TqcX.js} +2 -2
  365. package/dist/{tabs-BicCpU1B.js.map → tabs-C7r4TqcX.js.map} +1 -1
  366. package/dist/{tabs-CoMJAXDy.cjs → tabs-DZaLZUBy.cjs} +1 -1
  367. package/dist/{tabs-CoMJAXDy.cjs.map → tabs-DZaLZUBy.cjs.map} +1 -1
  368. package/dist/tabs.cjs +1 -1
  369. package/dist/tabs.js +1 -1
  370. package/dist/tailwind.mixin-Bh58QnlW.cjs +2 -0
  371. package/dist/{tailwind.mixin-BfdVIGgD.cjs.map → tailwind.mixin-Bh58QnlW.cjs.map} +1 -1
  372. package/dist/tailwind.mixin-H5Pn7vSJ.js +219 -0
  373. package/dist/{tailwind.mixin-CNdR3zFD.js.map → tailwind.mixin-H5Pn7vSJ.js.map} +1 -1
  374. package/dist/teleport.cjs +1 -1
  375. package/dist/teleport.js +1 -1
  376. package/dist/{textarea-CxTSwn3x.cjs → textarea-B2544vx9.cjs} +1 -1
  377. package/dist/{textarea-CxTSwn3x.cjs.map → textarea-B2544vx9.cjs.map} +1 -1
  378. package/dist/{textarea-D7O9Uo15.js → textarea-CS-KdSLz.js} +1 -1
  379. package/dist/{textarea-D7O9Uo15.js.map → textarea-CS-KdSLz.js.map} +1 -1
  380. package/dist/textarea.cjs +1 -1
  381. package/dist/textarea.js +1 -1
  382. package/dist/{theme-DGiyJMTT.js → theme-Cq_c9IO3.js} +7 -7
  383. package/dist/{theme-DGiyJMTT.js.map → theme-Cq_c9IO3.js.map} +1 -1
  384. package/dist/{theme-CCez6SRm.cjs → theme-DU5yXaV-.cjs} +1 -1
  385. package/dist/{theme-CCez6SRm.cjs.map → theme-DU5yXaV-.cjs.map} +1 -1
  386. package/dist/{theme-button-BV0CxpGn.cjs → theme-button-CPujUbgV.cjs} +1 -1
  387. package/dist/{theme-button-BV0CxpGn.cjs.map → theme-button-CPujUbgV.cjs.map} +1 -1
  388. package/dist/{theme-button-s9GfSQL5.js → theme-button-OJl2ma0u.js} +1 -1
  389. package/dist/{theme-button-s9GfSQL5.js.map → theme-button-OJl2ma0u.js.map} +1 -1
  390. package/dist/theme-button.cjs +1 -1
  391. package/dist/theme-button.js +1 -1
  392. package/dist/theme.cjs +1 -1
  393. package/dist/{theme.events-EznKK2Y0.cjs.map → theme.events-DakXxZeP.cjs.map} +1 -1
  394. package/dist/{theme.events-Bw3mYjUA.js.map → theme.events-NuihzD_p.js.map} +1 -1
  395. package/dist/{theme.interface-Cyqv5XWY.js.map → theme.interface-Buged9Cg.js.map} +1 -1
  396. package/dist/{theme.interface-CCE3L1ql.cjs.map → theme.interface-DTwkuAKJ.cjs.map} +1 -1
  397. package/dist/theme.js +5 -5
  398. package/dist/{theme.service-ETiKUwVy.cjs → theme.service-DxJPUGlu.cjs} +1 -1
  399. package/dist/{theme.service-ETiKUwVy.cjs.map → theme.service-DxJPUGlu.cjs.map} +1 -1
  400. package/dist/{theme.service-_qP5WvB9.js → theme.service-cOfPrtfe.js} +2 -2
  401. package/dist/{theme.service-_qP5WvB9.js.map → theme.service-cOfPrtfe.js.map} +1 -1
  402. package/dist/tooltip.cjs +1 -1
  403. package/dist/tree.cjs +1 -1
  404. package/dist/tree.js +1 -1
  405. package/dist/{tslib.es6-PMITL0Z3.cjs.map → tslib.es6-Cnt75pb6.cjs.map} +1 -1
  406. package/dist/{tslib.es6-vJQZBGJO.js.map → tslib.es6-DMzzJKHV.js.map} +1 -1
  407. package/dist/{typewriter-BTqEQXsX.js → typewriter-DyN7xa0n.js} +5 -5
  408. package/dist/{typewriter-BTqEQXsX.js.map → typewriter-DyN7xa0n.js.map} +1 -1
  409. package/dist/{typewriter-DeaL3NfZ.cjs → typewriter-LK0S4NEr.cjs} +1 -1
  410. package/dist/{typewriter-DeaL3NfZ.cjs.map → typewriter-LK0S4NEr.cjs.map} +1 -1
  411. package/dist/typewriter.cjs +1 -1
  412. package/dist/typewriter.js +1 -1
  413. package/dist/typography.cjs +1 -1
  414. package/dist/typography.js +1 -1
  415. package/dist/{utils-C8PD8So2.cjs → utils-2qrmPb78.cjs} +1 -1
  416. package/dist/{utils-C8PD8So2.cjs.map → utils-2qrmPb78.cjs.map} +1 -1
  417. package/dist/{utils-DVuCPDfw.js → utils-xBXLvebz.js} +3 -3
  418. package/dist/{utils-DVuCPDfw.js.map → utils-xBXLvebz.js.map} +1 -1
  419. package/dist/utils.cjs +1 -1
  420. package/dist/utils.js +5 -5
  421. package/dist/visually-hidden.cjs +1 -1
  422. package/dist/visually-hidden.js +1 -1
  423. package/dist/{window-CDHDVOwO.js → window-BWecg8Ih.js} +6 -6
  424. package/dist/{window-CDHDVOwO.js.map → window-BWecg8Ih.js.map} +1 -1
  425. package/dist/{window-IGZgxuUC.cjs → window-Cjv2GqSN.cjs} +1 -1
  426. package/dist/{window-IGZgxuUC.cjs.map → window-Cjv2GqSN.cjs.map} +1 -1
  427. package/dist/window.cjs +1 -1
  428. package/dist/window.js +1 -1
  429. package/package.json +3 -2
  430. package/skills/schmancy/INDEX.md +1 -1
  431. package/skills/schmancy/overlay.md +200 -0
  432. package/src/overlay/index.ts +15 -0
  433. package/src/overlay/overlay.animations.ts +137 -0
  434. package/src/overlay/overlay.component.ts +452 -0
  435. package/src/overlay/overlay.confirm-body.ts +149 -0
  436. package/src/overlay/overlay.gestures.ts +131 -0
  437. package/src/overlay/overlay.layout.ts +76 -0
  438. package/src/overlay/overlay.service.ts +299 -0
  439. package/src/overlay/overlay.stack.ts +171 -0
  440. package/src/overlay/overlay.types.ts +146 -0
  441. package/types/src/overlay/index.d.ts +5 -0
  442. package/types/src/overlay/overlay.animations.d.ts +26 -0
  443. package/types/src/overlay/overlay.component.d.ts +48 -0
  444. package/types/src/overlay/overlay.confirm-body.d.ts +42 -0
  445. package/types/src/overlay/overlay.gestures.d.ts +39 -0
  446. package/types/src/overlay/overlay.layout.d.ts +48 -0
  447. package/types/src/overlay/overlay.service.d.ts +62 -0
  448. package/types/src/overlay/overlay.stack.d.ts +25 -0
  449. package/types/src/overlay/overlay.types.d.ts +122 -0
  450. package/dist/area-CApZWjqs.cjs.map +0 -1
  451. package/dist/area-D_p1YBgP.js.map +0 -1
  452. package/dist/chunk-BCfY8kxB.cjs +0 -1
  453. package/dist/context-C6GwmNJJ.cjs +0 -1
  454. package/dist/context-oBTPHrbc.js +0 -3
  455. package/dist/float-yZoLnUg0.cjs +0 -1
  456. package/dist/tailwind.mixin-BfdVIGgD.cjs +0 -2
  457. package/dist/tailwind.mixin-CNdR3zFD.js +0 -219
  458. /package/dist/{animation-Bcwh107v.cjs → animation-CQRdLgzX.cjs} +0 -0
  459. /package/dist/{animation-CXKSuUoE.js → animation-hXFClrIn.js} +0 -0
  460. /package/dist/{date-range-inline-B_g1YXu3.js → date-range-inline-CpKG6qt2.js} +0 -0
  461. /package/dist/{flow-BPDtbhLe.js → flow-BGkHnOnd.js} +0 -0
  462. /package/dist/{flow-Dn9AZktE.cjs → flow-ClAJ6Qby.cjs} +0 -0
  463. /package/dist/{form-C1qS9uvS.js → form-rCZqoAoK.js} +0 -0
  464. /package/dist/{hashContent-BUqULUiZ.js → hashContent-B2IntJQf.js} +0 -0
  465. /package/dist/{hashContent-CI39BY-_.cjs → hashContent-CahnEuut.cjs} +0 -0
  466. /package/dist/{input-Dv-HtkM9.js → input-Bc3bVISm.js} +0 -0
  467. /package/dist/{intersection-C0JuW_7U.js → intersection-BrXp4YTO.js} +0 -0
  468. /package/dist/{overlay-stack-J_eJCUTX.cjs → overlay-stack-7bs4ZNnh.cjs} +0 -0
  469. /package/dist/{overlay-stack-BJt_r6aZ.js → overlay-stack-DXPYHPhk.js} +0 -0
  470. /package/dist/{reduced-motion-B83yZbcO.js → reduced-motion-BZTLqAyl.js} +0 -0
  471. /package/dist/{search-BlGJ6uJv.js → search-CvUZRLF1.js} +0 -0
  472. /package/dist/{search-C8eAOzBm.cjs → search-CwMav5QB.cjs} +0 -0
  473. /package/dist/{store-Bmj6rvZY.js → store-CjzZDQt8.js} +0 -0
  474. /package/dist/{theme.events-EznKK2Y0.cjs → theme.events-DakXxZeP.cjs} +0 -0
  475. /package/dist/{theme.events-Bw3mYjUA.js → theme.events-NuihzD_p.js} +0 -0
  476. /package/dist/{theme.interface-Cyqv5XWY.js → theme.interface-Buged9Cg.js} +0 -0
  477. /package/dist/{theme.interface-CCE3L1ql.cjs → theme.interface-DTwkuAKJ.cjs} +0 -0
  478. /package/dist/{tslib.es6-PMITL0Z3.cjs → tslib.es6-Cnt75pb6.cjs} +0 -0
  479. /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
+ }