@mhmo91/schmancy 0.10.42 → 0.10.43

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 (759) hide show
  1. package/custom-elements.json +264 -79
  2. package/dist/SchmancyElement-CeKrBW2j.cjs +2 -0
  3. package/dist/SchmancyElement-CeKrBW2j.cjs.map +1 -0
  4. package/dist/SchmancyElement-Ob9yGkiG.js +286 -0
  5. package/dist/SchmancyElement-Ob9yGkiG.js.map +1 -0
  6. package/dist/agent/schmancy.agent.js +4031 -3891
  7. package/dist/agent/schmancy.agent.js.map +1 -1
  8. package/dist/agent/schmancy.manifest.json +215 -58
  9. package/dist/animation-CCOIW4wJ.cjs.map +1 -1
  10. package/dist/animation-DCznELuT.js.map +1 -1
  11. package/dist/area-CbajcnmJ.cjs +21 -0
  12. package/dist/area-CbajcnmJ.cjs.map +1 -0
  13. package/dist/{area-DtCNCb8w.js → area-MxLAyWgV.js} +22 -22
  14. package/dist/area-MxLAyWgV.js.map +1 -0
  15. package/dist/area.cjs +1 -1
  16. package/dist/area.js +1 -1
  17. package/dist/{audio-DdN76ikW.js → audio-B_0PGwYC.js} +1 -1
  18. package/dist/audio-B_0PGwYC.js.map +1 -0
  19. package/dist/{audio-B924fI5N.cjs → audio-CpwrIaw-.cjs} +1 -1
  20. package/dist/audio-CpwrIaw-.cjs.map +1 -0
  21. package/dist/audio.cjs +1 -1
  22. package/dist/audio.js +2 -2
  23. package/dist/autocomplete-CILzaDB7.cjs +115 -0
  24. package/dist/autocomplete-CILzaDB7.cjs.map +1 -0
  25. package/dist/{autocomplete-UNOknYUz.js → autocomplete-DV9RxCun.js} +113 -113
  26. package/dist/autocomplete-DV9RxCun.js.map +1 -0
  27. package/dist/autocomplete.cjs +1 -1
  28. package/dist/autocomplete.js +1 -1
  29. package/dist/avatar.cjs +1 -1
  30. package/dist/avatar.cjs.map +1 -1
  31. package/dist/avatar.js +4 -4
  32. package/dist/avatar.js.map +1 -1
  33. package/dist/badge.cjs +1 -1
  34. package/dist/badge.js +1 -1
  35. package/dist/{boat-BZah1Sf9.js → boat-DoZGgQ0P.js} +5 -5
  36. package/dist/{boat-BZah1Sf9.js.map → boat-DoZGgQ0P.js.map} +1 -1
  37. package/dist/{boat-D3bEjxf8.cjs → boat-sg0cWO8a.cjs} +2 -2
  38. package/dist/{boat-D3bEjxf8.cjs.map → boat-sg0cWO8a.cjs.map} +1 -1
  39. package/dist/boat.cjs +1 -1
  40. package/dist/boat.js +1 -1
  41. package/dist/breadcrumb.cjs +32 -31
  42. package/dist/breadcrumb.cjs.map +1 -1
  43. package/dist/breadcrumb.js +33 -32
  44. package/dist/breadcrumb.js.map +1 -1
  45. package/dist/busy-Brs-TDh9.cjs +133 -0
  46. package/dist/busy-Brs-TDh9.cjs.map +1 -0
  47. package/dist/busy-g4LoQmhB.js +172 -0
  48. package/dist/busy-g4LoQmhB.js.map +1 -0
  49. package/dist/busy.cjs +1 -1
  50. package/dist/busy.js +1 -1
  51. package/dist/{button-CTvS5YX4.cjs → button-Cml67Y_d.cjs} +41 -32
  52. package/dist/button-Cml67Y_d.cjs.map +1 -0
  53. package/dist/{button-DgoDfcJx.js → button-DWANpZfD.js} +43 -34
  54. package/dist/button-DWANpZfD.js.map +1 -0
  55. package/dist/button.cjs +40 -33
  56. package/dist/button.cjs.map +1 -1
  57. package/dist/button.js +42 -35
  58. package/dist/button.js.map +1 -1
  59. package/dist/calendar-2dJrw9pR.cjs +58 -0
  60. package/dist/calendar-2dJrw9pR.cjs.map +1 -0
  61. package/dist/calendar-kCe5LaBa.js +434 -0
  62. package/dist/calendar-kCe5LaBa.js.map +1 -0
  63. package/dist/calendar.cjs +1 -0
  64. package/dist/calendar.js +2 -0
  65. package/dist/{card-C6ijJZpF.js → card-CS_hYJbz.js} +136 -136
  66. package/dist/card-CS_hYJbz.js.map +1 -0
  67. package/dist/card-d0KhTnx5.cjs +177 -0
  68. package/dist/card-d0KhTnx5.cjs.map +1 -0
  69. package/dist/card.cjs +1 -1
  70. package/dist/card.js +1 -1
  71. package/dist/{checkbox-7vEPZuGC.js → checkbox-Bjp7kWuE.js} +2 -2
  72. package/dist/{checkbox-7vEPZuGC.js.map → checkbox-Bjp7kWuE.js.map} +1 -1
  73. package/dist/{checkbox-DXKdxkXE.cjs → checkbox-DZ2Wrz7Y.cjs} +1 -1
  74. package/dist/{checkbox-DXKdxkXE.cjs.map → checkbox-DZ2Wrz7Y.cjs.map} +1 -1
  75. package/dist/checkbox.cjs +1 -1
  76. package/dist/checkbox.js +1 -1
  77. package/dist/{chips-9eG-96_D.cjs → chips-BHBVkxsa.cjs} +142 -153
  78. package/dist/chips-BHBVkxsa.cjs.map +1 -0
  79. package/dist/{chips-DF7akwz7.js → chips-DACeW7YL.js} +127 -138
  80. package/dist/chips-DACeW7YL.js.map +1 -0
  81. package/dist/chips.cjs +1 -1
  82. package/dist/chips.js +2 -2
  83. package/dist/connectivity.cjs +53 -35
  84. package/dist/connectivity.cjs.map +1 -1
  85. package/dist/connectivity.js +55 -37
  86. package/dist/connectivity.js.map +1 -1
  87. package/dist/content-drawer.cjs +1 -1
  88. package/dist/content-drawer.js +1 -1
  89. package/dist/cursor-glow-Ah7VXSj7.js.map +1 -1
  90. package/dist/cursor-glow-Bulq-38P.cjs.map +1 -1
  91. package/dist/date-range-CVAWMdar.cjs +138 -0
  92. package/dist/date-range-CVAWMdar.cjs.map +1 -0
  93. package/dist/date-range-D2NZU5Yg.js +433 -0
  94. package/dist/date-range-D2NZU5Yg.js.map +1 -0
  95. package/dist/{date-range-inline-DV2c_gWM.cjs → date-range-inline-CGM0SPK9.cjs} +2 -4
  96. package/dist/date-range-inline-CGM0SPK9.cjs.map +1 -0
  97. package/dist/{date-range-inline-BnOD-ddB.js → date-range-inline-D6Ozerzw.js} +3 -5
  98. package/dist/date-range-inline-D6Ozerzw.js.map +1 -0
  99. package/dist/date-range-inline.cjs +1 -1
  100. package/dist/date-range-inline.js +1 -1
  101. package/dist/date-range.cjs +1 -1
  102. package/dist/date-range.js +2 -2
  103. package/dist/dayjs.min-CvRZTfam.cjs +1 -0
  104. package/dist/dayjs.min-CvRZTfam.cjs.map +1 -0
  105. package/dist/dayjs.min-DnELezPs.js +296 -0
  106. package/dist/dayjs.min-DnELezPs.js.map +1 -0
  107. package/dist/delay.cjs +1 -1
  108. package/dist/delay.js +3 -3
  109. package/dist/{details-ByF66CyY.js → details-Ct1_GwKr.js} +104 -93
  110. package/dist/details-Ct1_GwKr.js.map +1 -0
  111. package/dist/{details-B2-jECBh.cjs → details-D4fVOaj4.cjs} +109 -98
  112. package/dist/details-D4fVOaj4.cjs.map +1 -0
  113. package/dist/details.cjs +1 -1
  114. package/dist/details.js +1 -1
  115. package/dist/{directives-DCb_LA9R.cjs → directives-B2VxfwRL.cjs} +1 -1
  116. package/dist/directives-B2VxfwRL.cjs.map +1 -0
  117. package/dist/{directives-BL7mzVsA.js → directives-Dj8jlv-Q.js} +3 -3
  118. package/dist/directives-Dj8jlv-Q.js.map +1 -0
  119. package/dist/directives.cjs +1 -1
  120. package/dist/directives.js +2 -2
  121. package/dist/discovery.service-CIa3Eeuk.cjs.map +1 -1
  122. package/dist/discovery.service-DZFxtRwW.js.map +1 -1
  123. package/dist/divider-B3v33OnX.cjs +57 -0
  124. package/dist/divider-B3v33OnX.cjs.map +1 -0
  125. package/dist/divider-BJHW3q11.js +89 -0
  126. package/dist/divider-BJHW3q11.js.map +1 -0
  127. package/dist/divider.cjs +1 -1
  128. package/dist/divider.js +1 -1
  129. package/dist/dropdown.cjs +40 -40
  130. package/dist/dropdown.cjs.map +1 -1
  131. package/dist/dropdown.js +41 -41
  132. package/dist/dropdown.js.map +1 -1
  133. package/dist/{expand-cZ8rfCWP.js → expand-BT8mOu8Q.js} +103 -97
  134. package/dist/expand-BT8mOu8Q.js.map +1 -0
  135. package/dist/expand-D0YdR9nR.cjs +147 -0
  136. package/dist/expand-D0YdR9nR.cjs.map +1 -0
  137. package/dist/expand.cjs +1 -1
  138. package/dist/expand.js +1 -1
  139. package/dist/fab.cjs +1 -1
  140. package/dist/fab.cjs.map +1 -1
  141. package/dist/fab.js +2 -2
  142. package/dist/fab.js.map +1 -1
  143. package/dist/{float-DkGyWSWy.cjs → float-BPQlDyai.cjs} +1 -1
  144. package/dist/{float-DkGyWSWy.cjs.map → float-BPQlDyai.cjs.map} +1 -1
  145. package/dist/{float-zn3DgXBT.js → float-BQcxj3i_.js} +2 -2
  146. package/dist/{float-zn3DgXBT.js.map → float-BQcxj3i_.js.map} +1 -1
  147. package/dist/float.cjs +1 -1
  148. package/dist/float.js +1 -1
  149. package/dist/{form-DowzVsgI.cjs → form-CoWFnClb.cjs} +8 -13
  150. package/dist/form-CoWFnClb.cjs.map +1 -0
  151. package/dist/{form-tG7LwDm4.js → form-hC2LvCHX.js} +10 -15
  152. package/dist/form-hC2LvCHX.js.map +1 -0
  153. package/dist/form.cjs +12 -13
  154. package/dist/form.cjs.map +1 -1
  155. package/dist/form.js +23 -24
  156. package/dist/form.js.map +1 -1
  157. package/dist/gravity-6pL6CfIr.cjs.map +1 -1
  158. package/dist/gravity-sVK3zGBF.js.map +1 -1
  159. package/dist/handover/agent-runtime-followups.md +1 -1
  160. package/dist/handover/agent-runtime-v1.md +3 -3
  161. package/dist/{hashContent-iRZJJWtE.cjs.map → hashContent--s09Ed_g.cjs.map} +1 -1
  162. package/dist/{hashContent-BqU6v1Xr.js.map → hashContent-CAvrQ56N.js.map} +1 -1
  163. package/dist/icons-BeGKDZ-k.cjs +22 -0
  164. package/dist/icons-BeGKDZ-k.cjs.map +1 -0
  165. package/dist/{icons-Dup5skuk.js → icons-DEJnIxml.js} +20 -22
  166. package/dist/icons-DEJnIxml.js.map +1 -0
  167. package/dist/icons.cjs +1 -1
  168. package/dist/icons.js +1 -1
  169. package/dist/{iframe-CDJjnNmo.cjs → iframe-BkSukM9C.cjs} +9 -9
  170. package/dist/iframe-BkSukM9C.cjs.map +1 -0
  171. package/dist/{iframe-Xc3EPMZT.js → iframe-V3S-bwEY.js} +10 -10
  172. package/dist/iframe-V3S-bwEY.js.map +1 -0
  173. package/dist/iframe.cjs +1 -1
  174. package/dist/iframe.js +1 -1
  175. package/dist/index.cjs +1 -1
  176. package/dist/index.js +61 -60
  177. package/dist/{input-cTyDxW9L.js → input-CPFCSQld.js} +3 -10
  178. package/dist/input-CPFCSQld.js.map +1 -0
  179. package/dist/{input-DnmC6J1T.cjs → input-DSfwfhhj.cjs} +2 -9
  180. package/dist/input-DSfwfhhj.cjs.map +1 -0
  181. package/dist/input-chip-BUuFJUky.cjs +129 -0
  182. package/dist/input-chip-BUuFJUky.cjs.map +1 -0
  183. package/dist/{input-chip-CYI17YOq.js → input-chip-C3a1fwKB.js} +87 -104
  184. package/dist/input-chip-C3a1fwKB.js.map +1 -0
  185. package/dist/input.cjs +1 -1
  186. package/dist/input.js +1 -1
  187. package/dist/json.cjs +5 -1
  188. package/dist/json.cjs.map +1 -1
  189. package/dist/json.js +8 -4
  190. package/dist/json.js.map +1 -1
  191. package/dist/kbd.cjs +28 -28
  192. package/dist/kbd.cjs.map +1 -1
  193. package/dist/kbd.js +29 -29
  194. package/dist/kbd.js.map +1 -1
  195. package/dist/{layout-CNlZSJFU.cjs → layout-CdyHy_oX.cjs} +1 -1
  196. package/dist/layout-CdyHy_oX.cjs.map +1 -0
  197. package/dist/{layout-DDxw0EwL.js → layout-k6fOkpif.js} +1 -1
  198. package/dist/layout-k6fOkpif.js.map +1 -0
  199. package/dist/layout.cjs +26 -26
  200. package/dist/layout.cjs.map +1 -1
  201. package/dist/layout.js +27 -27
  202. package/dist/layout.js.map +1 -1
  203. package/dist/lazy-BaAiIUru.js.map +1 -1
  204. package/dist/lazy-C-7a4FAe.cjs.map +1 -1
  205. package/dist/{lightbox-CH-y3rYB.js → lightbox-DIG0VLOK.js} +8 -14
  206. package/dist/lightbox-DIG0VLOK.js.map +1 -0
  207. package/dist/{lightbox-CvtqoInF.cjs → lightbox-E5rgd-hu.cjs} +7 -13
  208. package/dist/lightbox-E5rgd-hu.cjs.map +1 -0
  209. package/dist/lightbox.cjs +1 -1
  210. package/dist/lightbox.js +1 -1
  211. package/dist/list-BRz0rDSH.cjs +47 -0
  212. package/dist/list-BRz0rDSH.cjs.map +1 -0
  213. package/dist/{list-DrsawQ5R.js → list-NrOYDPBo.js} +42 -35
  214. package/dist/list-NrOYDPBo.js.map +1 -0
  215. package/dist/list.cjs +1 -1
  216. package/dist/list.js +1 -1
  217. package/dist/magnetic-DKtc4umC.cjs.map +1 -1
  218. package/dist/magnetic-DaOOv5Dz.js.map +1 -1
  219. package/dist/{menu-CsY5lMqY.js → menu-B1Ei9SVj.js} +12 -12
  220. package/dist/menu-B1Ei9SVj.js.map +1 -0
  221. package/dist/{menu-BFRcTe3o.cjs → menu-Duvl66Nl.cjs} +10 -10
  222. package/dist/menu-Duvl66Nl.cjs.map +1 -0
  223. package/dist/menu.cjs +1 -1
  224. package/dist/menu.js +1 -1
  225. package/dist/{mixins-BoMURWag.cjs → mixins-Cjn20BQH.cjs} +42 -100
  226. package/dist/mixins-Cjn20BQH.cjs.map +1 -0
  227. package/dist/{mixins-bCEXbwJV.js → mixins-q4KAL8Xr.js} +42 -100
  228. package/dist/mixins-q4KAL8Xr.js.map +1 -0
  229. package/dist/mixins.cjs +1 -1
  230. package/dist/mixins.js +2 -2
  231. package/dist/nav-drawer.cjs +1 -1
  232. package/dist/nav-drawer.js +1 -1
  233. package/dist/navigation-bar.cjs +1 -1
  234. package/dist/navigation-bar.js +1 -1
  235. package/dist/navigation-rail.cjs +2 -4
  236. package/dist/navigation-rail.cjs.map +1 -1
  237. package/dist/navigation-rail.js +3 -5
  238. package/dist/navigation-rail.js.map +1 -1
  239. package/dist/{notification-DFKRMmSq.js → notification-COhUhUCr.js} +5 -7
  240. package/dist/notification-COhUhUCr.js.map +1 -0
  241. package/dist/{notification-FBf3Mb2e.cjs → notification-DsdA_MJe.cjs} +2 -4
  242. package/dist/notification-DsdA_MJe.cjs.map +1 -0
  243. package/dist/notification.cjs +1 -1
  244. package/dist/notification.js +1 -1
  245. package/dist/{option-Ct0lGdH3.js → option-BIzgTbXz.js} +20 -20
  246. package/dist/option-BIzgTbXz.js.map +1 -0
  247. package/dist/option-C5hhqR2z.cjs +43 -0
  248. package/dist/option-C5hhqR2z.cjs.map +1 -0
  249. package/dist/option.cjs +1 -1
  250. package/dist/option.js +1 -1
  251. package/dist/{overlay-sRXiMkjn.cjs → overlay-BzgF8P7i.cjs} +48 -41
  252. package/dist/overlay-BzgF8P7i.cjs.map +1 -0
  253. package/dist/{overlay-Bh8Q_R01.js → overlay-LoRRemny.js} +52 -45
  254. package/dist/overlay-LoRRemny.js.map +1 -0
  255. package/dist/overlay-stack-Bdr9lOqi.cjs.map +1 -1
  256. package/dist/overlay-stack-D2rgxQLh.js.map +1 -1
  257. package/dist/overlay.cjs +1 -1
  258. package/dist/{overlay.confirm-body-CQihsR20.js → overlay.confirm-body-D0b1MoCw.js} +30 -45
  259. package/dist/overlay.confirm-body-D0b1MoCw.js.map +1 -0
  260. package/dist/{overlay.confirm-body-Jc1EuMGs.cjs → overlay.confirm-body-DCneq73Z.cjs} +22 -37
  261. package/dist/overlay.confirm-body-DCneq73Z.cjs.map +1 -0
  262. package/dist/overlay.js +3 -3
  263. package/dist/{overlay.service-BXPgS7ay.js → overlay.service-BuUeti6X.js} +2 -2
  264. package/dist/overlay.service-BuUeti6X.js.map +1 -0
  265. package/dist/{overlay.service-9Dp3g7ot.cjs → overlay.service-MMTiW2T3.cjs} +1 -1
  266. package/dist/overlay.service-MMTiW2T3.cjs.map +1 -0
  267. package/dist/{progress-CYLshdo2.js → progress-D7n3SKAO.js} +50 -50
  268. package/dist/progress-D7n3SKAO.js.map +1 -0
  269. package/dist/progress-DsCnFsH5.cjs +51 -0
  270. package/dist/progress-DsCnFsH5.cjs.map +1 -0
  271. package/dist/progress.cjs +1 -1
  272. package/dist/progress.js +1 -1
  273. package/dist/{radio-group-6kCgOgBL.cjs → radio-group-CaAjg9UV.cjs} +1 -1
  274. package/dist/radio-group-CaAjg9UV.cjs.map +1 -0
  275. package/dist/{radio-group-bZtZHOj_.js → radio-group-Drpl6Pl8.js} +2 -2
  276. package/dist/radio-group-Drpl6Pl8.js.map +1 -0
  277. package/dist/radio-group.cjs +1 -1
  278. package/dist/radio-group.js +1 -1
  279. package/dist/range.cjs +4 -2
  280. package/dist/range.cjs.map +1 -1
  281. package/dist/range.js +5 -3
  282. package/dist/range.js.map +1 -1
  283. package/dist/reduced-motion-D-L12p7G.js.map +1 -1
  284. package/dist/reduced-motion-Ds-HjMzn.cjs.map +1 -1
  285. package/dist/{rxjs-utils-Csnks202.cjs.map → rxjs-utils-4P2v57ke.cjs.map} +1 -1
  286. package/dist/{rxjs-utils-d-ivVN84.js.map → rxjs-utils-JMFdgQSl.js.map} +1 -1
  287. package/dist/rxjs-utils.cjs +1 -1
  288. package/dist/rxjs-utils.js +1 -1
  289. package/dist/search-DPKoC-dT.cjs.map +1 -1
  290. package/dist/search-MvIBA93K.js.map +1 -1
  291. package/dist/{select-CU3X-PIa.js → select-CTXkrrVZ.js} +13 -13
  292. package/dist/select-CTXkrrVZ.js.map +1 -0
  293. package/dist/select-DcLcpPCh.cjs +56 -0
  294. package/dist/select-DcLcpPCh.cjs.map +1 -0
  295. package/dist/select.cjs +1 -1
  296. package/dist/select.js +1 -1
  297. package/dist/skeleton.cjs +37 -33
  298. package/dist/skeleton.cjs.map +1 -1
  299. package/dist/skeleton.js +38 -34
  300. package/dist/skeleton.js.map +1 -1
  301. package/dist/skills/schmancy/surface.md +38 -22
  302. package/dist/skills/surface.md +38 -22
  303. package/dist/slider.cjs +31 -31
  304. package/dist/slider.cjs.map +1 -1
  305. package/dist/slider.js +32 -32
  306. package/dist/slider.js.map +1 -1
  307. package/dist/{sound.service-B4ZmXpH9.js → sound.service-AJwuk3yr.js} +1 -1
  308. package/dist/sound.service-AJwuk3yr.js.map +1 -0
  309. package/dist/{sound.service-DjlMvicQ.cjs → sound.service-CVsxhQkX.cjs} +1 -1
  310. package/dist/sound.service-CVsxhQkX.cjs.map +1 -0
  311. package/dist/{splash-screen-emCLYoVl.js → splash-screen-DANfqvlo.js} +23 -26
  312. package/dist/splash-screen-DANfqvlo.js.map +1 -0
  313. package/dist/splash-screen-K74cgU6S.cjs +38 -0
  314. package/dist/splash-screen-K74cgU6S.cjs.map +1 -0
  315. package/dist/splash-screen.cjs +1 -1
  316. package/dist/splash-screen.js +1 -1
  317. package/dist/{src-DGDTkOvC.js → src-DAtcPmCb.js} +173 -175
  318. package/dist/src-DAtcPmCb.js.map +1 -0
  319. package/dist/src-DuRvYagm.cjs +237 -0
  320. package/dist/src-DuRvYagm.cjs.map +1 -0
  321. package/dist/{state-CumAEPQH.cjs → state-BWQiqN6I.cjs} +1 -1
  322. package/dist/state-BWQiqN6I.cjs.map +1 -0
  323. package/dist/{state-DMd_FUeA.js → state-DBA_gzJO.js} +1 -1
  324. package/dist/state-DBA_gzJO.js.map +1 -0
  325. package/dist/state.cjs +1 -1
  326. package/dist/state.js +2 -2
  327. package/dist/steps.cjs +20 -12
  328. package/dist/steps.cjs.map +1 -1
  329. package/dist/steps.js +21 -13
  330. package/dist/steps.js.map +1 -1
  331. package/dist/surface-COBvWWFb.cjs +7 -0
  332. package/dist/surface-COBvWWFb.cjs.map +1 -0
  333. package/dist/{surface-DNiYigsX.js → surface-DXk1X1tL.js} +9 -9
  334. package/dist/{surface-DNiYigsX.js.map → surface-DXk1X1tL.js.map} +1 -1
  335. package/dist/surface.cjs +1 -1
  336. package/dist/surface.js +1 -1
  337. package/dist/switch.cjs +13 -4
  338. package/dist/switch.cjs.map +1 -1
  339. package/dist/switch.js +14 -5
  340. package/dist/switch.js.map +1 -1
  341. package/dist/table.cjs +4 -10
  342. package/dist/table.cjs.map +1 -1
  343. package/dist/table.js +5 -11
  344. package/dist/table.js.map +1 -1
  345. package/dist/{tabs-4T_4kCf-.js → tabs-BYhFWnsx.js} +7 -7
  346. package/dist/tabs-BYhFWnsx.js.map +1 -0
  347. package/dist/{tabs-Byxxt-AH.cjs → tabs-CJwB0fr0.cjs} +6 -6
  348. package/dist/tabs-CJwB0fr0.cjs.map +1 -0
  349. package/dist/tabs.cjs +1 -1
  350. package/dist/tabs.js +1 -1
  351. package/dist/teleport.cjs +1 -1
  352. package/dist/teleport.js +1 -1
  353. package/dist/{textarea-kkYNk1ET.js → textarea-BjDx1w2g.js} +37 -41
  354. package/dist/textarea-BjDx1w2g.js.map +1 -0
  355. package/dist/{textarea-BwYwH9fu.cjs → textarea-CGgznhd6.cjs} +36 -40
  356. package/dist/textarea-CGgznhd6.cjs.map +1 -0
  357. package/dist/textarea.cjs +1 -1
  358. package/dist/textarea.js +1 -1
  359. package/dist/{theme-BG0EnzYP.cjs → theme-BVul7lHS.cjs} +6 -6
  360. package/dist/{theme-BG0EnzYP.cjs.map → theme-BVul7lHS.cjs.map} +1 -1
  361. package/dist/{theme-DwQBl6sr.js → theme-Dvm5J8nh.js} +11 -11
  362. package/dist/{theme-DwQBl6sr.js.map → theme-Dvm5J8nh.js.map} +1 -1
  363. package/dist/{theme-button-BD8anzsZ.js → theme-button-Bko5ohFP.js} +2 -2
  364. package/dist/{theme-button-BD8anzsZ.js.map → theme-button-Bko5ohFP.js.map} +1 -1
  365. package/dist/{theme-button-DlrNoCMA.cjs → theme-button-YLY7zR1c.cjs} +1 -1
  366. package/dist/{theme-button-DlrNoCMA.cjs.map → theme-button-YLY7zR1c.cjs.map} +1 -1
  367. package/dist/theme-button.cjs +1 -1
  368. package/dist/theme-button.js +1 -1
  369. package/dist/theme.cjs +1 -1
  370. package/dist/{theme.interface-CSt7JUBD.cjs.map → theme.interface-B-qxDsZQ.cjs.map} +1 -1
  371. package/dist/{theme.interface-odQEpZZH.js.map → theme.interface-B7caS5cg.js.map} +1 -1
  372. package/dist/theme.js +4 -4
  373. package/dist/{theme.service-Dv_55nfE.js → theme.service-D94nm7Bf.js} +1 -1
  374. package/dist/theme.service-D94nm7Bf.js.map +1 -0
  375. package/dist/{theme.service-pjkTM209.cjs → theme.service-h2fXQq7x.cjs} +1 -1
  376. package/dist/theme.service-h2fXQq7x.cjs.map +1 -0
  377. package/dist/tooltip.cjs.map +1 -1
  378. package/dist/tooltip.js.map +1 -1
  379. package/dist/tree.cjs +14 -14
  380. package/dist/tree.cjs.map +1 -1
  381. package/dist/tree.js +15 -15
  382. package/dist/tree.js.map +1 -1
  383. package/dist/types.cjs +1 -1
  384. package/dist/types.cjs.map +1 -1
  385. package/dist/types.js +19 -2
  386. package/dist/types.js.map +1 -1
  387. package/dist/typewriter.cjs.map +1 -1
  388. package/dist/typewriter.js.map +1 -1
  389. package/dist/typography-ByF2k5yW.js +358 -0
  390. package/dist/typography-ByF2k5yW.js.map +1 -0
  391. package/dist/typography-Cfav17it.cjs +282 -0
  392. package/dist/typography-Cfav17it.cjs.map +1 -0
  393. package/dist/typography.cjs +1 -1
  394. package/dist/typography.js +1 -1
  395. package/dist/utils-DIXndz6Q.cjs.map +1 -0
  396. package/dist/utils-dSPH7Oh9.js.map +1 -0
  397. package/dist/utils.cjs +1 -1
  398. package/dist/utils.js +1 -1
  399. package/dist/visually-hidden.cjs +13 -13
  400. package/dist/visually-hidden.cjs.map +1 -1
  401. package/dist/visually-hidden.js +14 -14
  402. package/dist/visually-hidden.js.map +1 -1
  403. package/dist/window-Br1OmpL-.cjs +67 -0
  404. package/dist/window-Br1OmpL-.cjs.map +1 -0
  405. package/dist/{window-C76zstbV.js → window-CCmN4but.js} +24 -15
  406. package/dist/window-CCmN4but.js.map +1 -0
  407. package/dist/window.cjs +1 -1
  408. package/dist/window.js +1 -1
  409. package/package.json +1 -1
  410. package/skills/schmancy/surface.md +38 -22
  411. package/src/area/area.component.ts +249 -163
  412. package/src/area/area.service.test.ts +994 -1006
  413. package/src/area/area.service.ts +76 -72
  414. package/src/area/index.ts +7 -7
  415. package/src/area/lazy.ts +39 -42
  416. package/src/area/route.component.ts +54 -52
  417. package/src/area/router.types.ts +7 -7
  418. package/src/audio/emotional-sounds.ts +880 -801
  419. package/src/audio/sound.service.ts +26 -5
  420. package/src/avatar/avatar.ts +4 -4
  421. package/src/badge/badge.ts +15 -12
  422. package/src/badge/index.ts +1 -1
  423. package/src/boat/boat.ts +1 -1
  424. package/src/breadcrumb/breadcrumb.ts +37 -32
  425. package/src/busy/busy.ts +15 -12
  426. package/src/busy/index.ts +2 -2
  427. package/src/busy/spinner.ts +132 -119
  428. package/src/button/button.test.ts +5 -1
  429. package/src/button/button.ts +113 -72
  430. package/src/button/icon-button.ts +64 -46
  431. package/src/button/index.ts +2 -2
  432. package/src/calendar/calendar.test.ts +504 -0
  433. package/src/calendar/calendar.ts +587 -0
  434. package/src/calendar/index.ts +2 -0
  435. package/src/card/actions.ts +11 -9
  436. package/src/card/card.ts +79 -77
  437. package/src/card/content.ts +8 -6
  438. package/src/card/index.ts +4 -4
  439. package/src/card/media.ts +50 -50
  440. package/src/chips/assist-chip.ts +1 -1
  441. package/src/chips/chips.ts +1 -1
  442. package/src/chips/filter-chip.ts +1 -1
  443. package/src/chips/index.ts +1 -1
  444. package/src/chips/input-chip.ts +1 -1
  445. package/src/chips/suggestion-chip.ts +1 -1
  446. package/src/connectivity/connectivity-status.ts +90 -62
  447. package/src/content-drawer/drawer.service.ts +47 -36
  448. package/src/content-drawer/drawer.ts +31 -18
  449. package/src/content-drawer/index.ts +5 -5
  450. package/src/content-drawer/main.ts +9 -7
  451. package/src/content-drawer/sheet.ts +8 -6
  452. package/src/date-range-inline/date-range-inline.ts +523 -522
  453. package/src/date-range-inline/index.ts +2 -2
  454. package/src/delay/index.ts +1 -1
  455. package/src/details/details.ts +119 -105
  456. package/src/details/index.ts +1 -1
  457. package/src/directives/ai-badge.ts +1 -5
  458. package/src/directives/animate-text.ts +43 -31
  459. package/src/directives/art/effects/howl.ts +1 -4
  460. package/src/directives/art/effects/samwa.ts +11 -5
  461. package/src/directives/art/effects/snow.ts +1 -2
  462. package/src/directives/battery.ts +21 -12
  463. package/src/directives/confirm-click.ts +9 -17
  464. package/src/directives/cursor-glow.ts +1 -1
  465. package/src/directives/cycle-text.ts +7 -21
  466. package/src/directives/drag.ts +50 -45
  467. package/src/directives/fyi.ts +1 -6
  468. package/src/directives/gravity.ts +10 -8
  469. package/src/directives/hummingbird.ts +256 -107
  470. package/src/directives/index.ts +29 -29
  471. package/src/directives/intersect.ts +11 -11
  472. package/src/directives/layout.ts +25 -36
  473. package/src/directives/liquid.ts +4 -10
  474. package/src/directives/living-border.ts +7 -5
  475. package/src/directives/long-press.ts +2 -1
  476. package/src/directives/magnetic.ts +7 -6
  477. package/src/directives/nebula.ts +34 -28
  478. package/src/directives/overflow-within.ts +18 -20
  479. package/src/directives/reduced-motion.ts +9 -9
  480. package/src/directives/reveal.ts +193 -195
  481. package/src/directives/ripple.ts +9 -7
  482. package/src/directives/urgent.ts +3 -1
  483. package/src/directives/working-snake.ts +1 -1
  484. package/src/discovery/discovery.service.ts +198 -210
  485. package/src/discovery/index.ts +1 -1
  486. package/src/divider/divider.ts +49 -47
  487. package/src/divider/index.ts +1 -1
  488. package/src/dropdown/dropdown-content.ts +42 -40
  489. package/src/dropdown/index.ts +2 -2
  490. package/src/expand/expand-root.component.ts +70 -61
  491. package/src/expand/expand.component.ts +48 -43
  492. package/src/fab/fab.test.ts +1 -2
  493. package/src/fab/fab.ts +2 -4
  494. package/src/form/fields/autocomplete/autocomplete.scss +6 -2
  495. package/src/form/fields/autocomplete/autocomplete.ts +712 -724
  496. package/src/form/fields/autocomplete/index.ts +1 -1
  497. package/src/form/fields/checkbox/checkbox.ts +1 -4
  498. package/src/form/fields/chips/assist-chip.ts +69 -72
  499. package/src/form/fields/chips/chips.ts +14 -15
  500. package/src/form/fields/chips/filter-chip.ts +36 -32
  501. package/src/form/fields/chips/index.ts +5 -5
  502. package/src/form/fields/chips/input-chip.ts +130 -142
  503. package/src/form/fields/chips/suggestion-chip.ts +69 -72
  504. package/src/form/fields/date-range/date-range-dialog.ts +141 -194
  505. package/src/form/fields/date-range/date-range-helpers.ts +63 -64
  506. package/src/form/fields/date-range/date-range.test.ts +359 -122
  507. package/src/form/fields/date-range/date-range.ts +319 -395
  508. package/src/form/fields/date-range/index.ts +2 -2
  509. package/src/form/fields/input/index.ts +8 -8
  510. package/src/form/fields/input/input.scss +30 -26
  511. package/src/form/fields/input/input.test.ts +4 -1
  512. package/src/form/fields/input/input.ts +4 -20
  513. package/src/form/fields/radio-group/index.ts +2 -2
  514. package/src/form/fields/radio-group/radio-button.ts +8 -8
  515. package/src/form/fields/radio-group/radio-group.ts +4 -1
  516. package/src/form/fields/range/range.ts +3 -1
  517. package/src/form/fields/select/index.ts +2 -2
  518. package/src/form/fields/select/select.ts +51 -45
  519. package/src/form/fields/switch/switch.ts +13 -7
  520. package/src/form/fields/textarea/index.ts +1 -1
  521. package/src/form/fields/textarea/textarea.ts +44 -49
  522. package/src/form/form-summary.ts +15 -14
  523. package/src/form/form.test.ts +0 -1
  524. package/src/form/form.ts +11 -23
  525. package/src/icons/icon.ts +25 -25
  526. package/src/icons/index.ts +1 -1
  527. package/src/iframe/iframe.ts +11 -9
  528. package/src/index.ts +1 -0
  529. package/src/json/json.ts +9 -2
  530. package/src/kbd/kbd.ts +30 -28
  531. package/src/layout/scroll/index.ts +1 -1
  532. package/src/layout/scroll/scroll.ts +54 -54
  533. package/src/lightbox/lightbox-service.ts +27 -18
  534. package/src/lightbox/lightbox.directive.ts +2 -1
  535. package/src/lightbox/lightbox.ts +21 -38
  536. package/src/list/index.ts +3 -3
  537. package/src/list/list-item.ts +32 -26
  538. package/src/list/list.ts +13 -8
  539. package/src/menu/index.ts +2 -2
  540. package/src/menu/menu-item.ts +7 -5
  541. package/src/menu/menu.ts +8 -6
  542. package/src/nav-drawer/appbar.ts +9 -7
  543. package/src/nav-drawer/content.ts +10 -8
  544. package/src/nav-drawer/drawer.ts +29 -25
  545. package/src/nav-drawer/index.ts +6 -6
  546. package/src/navigation-bar/index.ts +2 -2
  547. package/src/navigation-bar/navigation-bar-item.ts +127 -118
  548. package/src/navigation-bar/navigation-bar.ts +103 -91
  549. package/src/navigation-rail/index.ts +2 -2
  550. package/src/navigation-rail/navigation-rail.ts +21 -22
  551. package/src/notification/index.ts +6 -6
  552. package/src/notification/notification-service.ts +1 -2
  553. package/src/notification/notification.scss +5 -1
  554. package/src/notification/notification.ts +1 -3
  555. package/src/notification/notify.ts +204 -207
  556. package/src/option/index.ts +1 -1
  557. package/src/option/option.ts +26 -25
  558. package/src/overlay/overlay.animations.ts +4 -14
  559. package/src/overlay/overlay.component.ts +110 -131
  560. package/src/overlay/overlay.confirm-body.ts +26 -48
  561. package/src/overlay/overlay.gestures.ts +8 -10
  562. package/src/overlay/overlay.layout.ts +1 -4
  563. package/src/overlay/overlay.positioning.ts +4 -15
  564. package/src/overlay/overlay.service.ts +9 -24
  565. package/src/overlay/overlay.stack.test.ts +4 -1
  566. package/src/overlay/overlay.stack.ts +4 -4
  567. package/src/overlay/overlay.types.ts +11 -20
  568. package/src/progress/index.ts +1 -1
  569. package/src/progress/progress.ts +135 -133
  570. package/src/rxjs-utils/index.ts +6 -6
  571. package/src/rxjs-utils/waitForElement.ts +20 -20
  572. package/src/rxjs-utils/waitForElementAll.ts +21 -21
  573. package/src/rxjs-utils/waitForElements.ts +27 -27
  574. package/src/rxjs-utils/waitForElementsAll.ts +27 -29
  575. package/src/rxjs-utils/waitUntil.ts +7 -12
  576. package/src/skeleton/skeleton.ts +39 -33
  577. package/src/slider/index.ts +2 -2
  578. package/src/slider/slide.ts +14 -12
  579. package/src/slider/slider.ts +24 -22
  580. package/src/splash-screen/index.ts +1 -1
  581. package/src/splash-screen/splash-screen.ts +26 -27
  582. package/src/state/active-host.ts +4 -5
  583. package/src/state/index.ts +34 -53
  584. package/src/state/persist.ts +14 -11
  585. package/src/state/schmancy-context.ts +88 -88
  586. package/src/state/state.test-d.ts +3 -13
  587. package/src/state/state.test.ts +1 -4
  588. package/src/steps/index.ts +3 -3
  589. package/src/steps/schmancy-step.ts +41 -31
  590. package/src/steps/schmancy-steps.ts +7 -5
  591. package/src/surface/index.ts +1 -1
  592. package/src/surface/surface.styles.ts +53 -104
  593. package/src/surface/surface.ts +10 -8
  594. package/src/table/index.ts +2 -2
  595. package/src/table/row.ts +1 -4
  596. package/src/table/table.ts +2 -5
  597. package/src/tabs/index.ts +2 -2
  598. package/src/tabs/tabs-group.ts +8 -6
  599. package/src/teleport/index.ts +2 -2
  600. package/src/test-utils/a11y.ts +1 -3
  601. package/src/theme/index.ts +17 -17
  602. package/src/theme/theme-audio-player.ts +18 -16
  603. package/src/theme/theme-controller-boat.ts +1 -1
  604. package/src/theme/theme-controller.ts +36 -32
  605. package/src/theme/theme.component.ts +5 -9
  606. package/src/theme/theme.events.ts +1 -1
  607. package/src/theme/theme.format.ts +7 -7
  608. package/src/theme/theme.service.ts +453 -468
  609. package/src/theme/theme.style.css +78 -23
  610. package/src/theme-button/index.ts +1 -1
  611. package/src/tooltip/tooltip.directive.ts +1 -1
  612. package/src/tree/index.ts +1 -1
  613. package/src/tree/tree.ts +24 -16
  614. package/src/types/surface.ts +38 -44
  615. package/src/typewriter/typewriter.directive.ts +30 -39
  616. package/src/typography/typography.ts +289 -269
  617. package/src/utils/animation.ts +2 -8
  618. package/src/utils/index.ts +6 -6
  619. package/src/utils/number.ts +480 -517
  620. package/src/utils/overlay-stack.ts +1 -3
  621. package/src/utils/search.ts +5 -9
  622. package/src/visually-hidden/visually-hidden.ts +15 -13
  623. package/src/window/window-manager.ts +6 -1
  624. package/src/window/window-position.ts +7 -5
  625. package/src/window/window.ts +143 -108
  626. package/types/src/calendar/calendar.d.ts +108 -0
  627. package/types/src/calendar/calendar.test.d.ts +1 -0
  628. package/types/src/calendar/index.d.ts +2 -0
  629. package/types/src/directives/cursor-glow.d.ts +1 -1
  630. package/types/src/directives/hummingbird.d.ts +3 -3
  631. package/types/src/form/fields/date-range/date-range-dialog.d.ts +24 -28
  632. package/types/src/form/fields/date-range/date-range.d.ts +35 -66
  633. package/types/src/form/fields/date-range/date-range.test.d.ts +1 -0
  634. package/types/src/form/fields/date-range/index.d.ts +1 -1
  635. package/types/src/index.d.ts +1 -0
  636. package/types/src/surface/surface.styles.d.ts +13 -6
  637. package/types/src/types/surface.d.ts +17 -22
  638. package/types/src/utils/number.d.ts +1 -1
  639. package/dist/SchmancyElement-OG71FtNv.js +0 -286
  640. package/dist/SchmancyElement-OG71FtNv.js.map +0 -1
  641. package/dist/SchmancyElement-PS1u0j1B.cjs +0 -2
  642. package/dist/SchmancyElement-PS1u0j1B.cjs.map +0 -1
  643. package/dist/area-CaEI33G0.cjs +0 -21
  644. package/dist/area-CaEI33G0.cjs.map +0 -1
  645. package/dist/area-DtCNCb8w.js.map +0 -1
  646. package/dist/audio-B924fI5N.cjs.map +0 -1
  647. package/dist/audio-DdN76ikW.js.map +0 -1
  648. package/dist/autocomplete-Dq3BkitV.cjs +0 -115
  649. package/dist/autocomplete-Dq3BkitV.cjs.map +0 -1
  650. package/dist/autocomplete-UNOknYUz.js.map +0 -1
  651. package/dist/busy--WqiXKnl.cjs +0 -134
  652. package/dist/busy--WqiXKnl.cjs.map +0 -1
  653. package/dist/busy-DzXyO0z6.js +0 -173
  654. package/dist/busy-DzXyO0z6.js.map +0 -1
  655. package/dist/button-CTvS5YX4.cjs.map +0 -1
  656. package/dist/button-DgoDfcJx.js.map +0 -1
  657. package/dist/card-C6ijJZpF.js.map +0 -1
  658. package/dist/card-Ci3_9Dd4.cjs +0 -177
  659. package/dist/card-Ci3_9Dd4.cjs.map +0 -1
  660. package/dist/chips-9eG-96_D.cjs.map +0 -1
  661. package/dist/chips-DF7akwz7.js.map +0 -1
  662. package/dist/date-range-C13_R3OA.js +0 -966
  663. package/dist/date-range-C13_R3OA.js.map +0 -1
  664. package/dist/date-range-Q2xj5Syc.cjs +0 -142
  665. package/dist/date-range-Q2xj5Syc.cjs.map +0 -1
  666. package/dist/date-range-inline-BnOD-ddB.js.map +0 -1
  667. package/dist/date-range-inline-DV2c_gWM.cjs.map +0 -1
  668. package/dist/details-B2-jECBh.cjs.map +0 -1
  669. package/dist/details-ByF66CyY.js.map +0 -1
  670. package/dist/directives-BL7mzVsA.js.map +0 -1
  671. package/dist/directives-DCb_LA9R.cjs.map +0 -1
  672. package/dist/divider-Bv2QiOZL.cjs +0 -57
  673. package/dist/divider-Bv2QiOZL.cjs.map +0 -1
  674. package/dist/divider-gYuz0zDU.js +0 -89
  675. package/dist/divider-gYuz0zDU.js.map +0 -1
  676. package/dist/expand-B9IUGVtc.cjs +0 -141
  677. package/dist/expand-B9IUGVtc.cjs.map +0 -1
  678. package/dist/expand-cZ8rfCWP.js.map +0 -1
  679. package/dist/form-DowzVsgI.cjs.map +0 -1
  680. package/dist/form-tG7LwDm4.js.map +0 -1
  681. package/dist/icons-BZeCloP9.cjs +0 -24
  682. package/dist/icons-BZeCloP9.cjs.map +0 -1
  683. package/dist/icons-Dup5skuk.js.map +0 -1
  684. package/dist/iframe-CDJjnNmo.cjs.map +0 -1
  685. package/dist/iframe-Xc3EPMZT.js.map +0 -1
  686. package/dist/input-DnmC6J1T.cjs.map +0 -1
  687. package/dist/input-cTyDxW9L.js.map +0 -1
  688. package/dist/input-chip-CV91URyU.cjs +0 -146
  689. package/dist/input-chip-CV91URyU.cjs.map +0 -1
  690. package/dist/input-chip-CYI17YOq.js.map +0 -1
  691. package/dist/layout-CNlZSJFU.cjs.map +0 -1
  692. package/dist/layout-DDxw0EwL.js.map +0 -1
  693. package/dist/lightbox-CH-y3rYB.js.map +0 -1
  694. package/dist/lightbox-CvtqoInF.cjs.map +0 -1
  695. package/dist/list-Dl8KfxrF.cjs +0 -40
  696. package/dist/list-Dl8KfxrF.cjs.map +0 -1
  697. package/dist/list-DrsawQ5R.js.map +0 -1
  698. package/dist/menu-BFRcTe3o.cjs.map +0 -1
  699. package/dist/menu-CsY5lMqY.js.map +0 -1
  700. package/dist/mixins-BoMURWag.cjs.map +0 -1
  701. package/dist/mixins-bCEXbwJV.js.map +0 -1
  702. package/dist/notification-DFKRMmSq.js.map +0 -1
  703. package/dist/notification-FBf3Mb2e.cjs.map +0 -1
  704. package/dist/option-Ct0lGdH3.js.map +0 -1
  705. package/dist/option-Il1KpU8M.cjs +0 -43
  706. package/dist/option-Il1KpU8M.cjs.map +0 -1
  707. package/dist/overlay-Bh8Q_R01.js.map +0 -1
  708. package/dist/overlay-sRXiMkjn.cjs.map +0 -1
  709. package/dist/overlay.confirm-body-CQihsR20.js.map +0 -1
  710. package/dist/overlay.confirm-body-Jc1EuMGs.cjs.map +0 -1
  711. package/dist/overlay.service-9Dp3g7ot.cjs.map +0 -1
  712. package/dist/overlay.service-BXPgS7ay.js.map +0 -1
  713. package/dist/progress-CWC5XYZ_.cjs +0 -51
  714. package/dist/progress-CWC5XYZ_.cjs.map +0 -1
  715. package/dist/progress-CYLshdo2.js.map +0 -1
  716. package/dist/radio-group-6kCgOgBL.cjs.map +0 -1
  717. package/dist/radio-group-bZtZHOj_.js.map +0 -1
  718. package/dist/select-CU3X-PIa.js.map +0 -1
  719. package/dist/select-MXsF8KsU.cjs +0 -56
  720. package/dist/select-MXsF8KsU.cjs.map +0 -1
  721. package/dist/sound.service-B4ZmXpH9.js.map +0 -1
  722. package/dist/sound.service-DjlMvicQ.cjs.map +0 -1
  723. package/dist/splash-screen-CN9dZcqC.cjs +0 -41
  724. package/dist/splash-screen-CN9dZcqC.cjs.map +0 -1
  725. package/dist/splash-screen-emCLYoVl.js.map +0 -1
  726. package/dist/src-DGDTkOvC.js.map +0 -1
  727. package/dist/src-DK3111z_.cjs +0 -240
  728. package/dist/src-DK3111z_.cjs.map +0 -1
  729. package/dist/state-CumAEPQH.cjs.map +0 -1
  730. package/dist/state-DMd_FUeA.js.map +0 -1
  731. package/dist/surface-DGI-FBoi.cjs +0 -7
  732. package/dist/surface-DGI-FBoi.cjs.map +0 -1
  733. package/dist/tabs-4T_4kCf-.js.map +0 -1
  734. package/dist/tabs-Byxxt-AH.cjs.map +0 -1
  735. package/dist/textarea-BwYwH9fu.cjs.map +0 -1
  736. package/dist/textarea-kkYNk1ET.js.map +0 -1
  737. package/dist/theme.service-Dv_55nfE.js.map +0 -1
  738. package/dist/theme.service-pjkTM209.cjs.map +0 -1
  739. package/dist/typography-BVkU11_q.js +0 -358
  740. package/dist/typography-BVkU11_q.js.map +0 -1
  741. package/dist/typography-aaQaIcNc.cjs +0 -282
  742. package/dist/typography-aaQaIcNc.cjs.map +0 -1
  743. package/dist/utils-DTa3QHxk.cjs.map +0 -1
  744. package/dist/utils-H8wNknWC.js.map +0 -1
  745. package/dist/window-C76zstbV.js.map +0 -1
  746. package/dist/window-CmB9XZzT.cjs +0 -58
  747. package/dist/window-CmB9XZzT.cjs.map +0 -1
  748. package/src/form/fields/date-range/date-range-presets.ts +0 -220
  749. package/src/form/fields/date-range/date-utils.ts +0 -58
  750. package/types/src/form/fields/date-range/date-range-presets.d.ts +0 -18
  751. package/types/src/form/fields/date-range/date-utils.d.ts +0 -15
  752. /package/dist/{hashContent-iRZJJWtE.cjs → hashContent--s09Ed_g.cjs} +0 -0
  753. /package/dist/{hashContent-BqU6v1Xr.js → hashContent-CAvrQ56N.js} +0 -0
  754. /package/dist/{rxjs-utils-Csnks202.cjs → rxjs-utils-4P2v57ke.cjs} +0 -0
  755. /package/dist/{rxjs-utils-d-ivVN84.js → rxjs-utils-JMFdgQSl.js} +0 -0
  756. /package/dist/{theme.interface-CSt7JUBD.cjs → theme.interface-B-qxDsZQ.cjs} +0 -0
  757. /package/dist/{theme.interface-odQEpZZH.js → theme.interface-B7caS5cg.js} +0 -0
  758. /package/dist/{utils-DTa3QHxk.cjs → utils-DIXndz6Q.cjs} +0 -0
  759. /package/dist/{utils-H8wNknWC.js → utils-dSPH7Oh9.js} +0 -0
@@ -1 +0,0 @@
1
- {"version":3,"file":"mixins-bCEXbwJV.js","names":[],"sources":["../mixins/formField.mixin.ts","../mixins/litElement.mixin.ts","../src/surface/surface.styles.ts","../mixins/surface.mixin.ts"],"sourcesContent":["import { CSSResult, LitElement, PropertyValueMap } from 'lit'\nimport { property, state } from 'lit/decorators.js'\nimport { IBaseMixin } from './baseElement'\nimport { Constructor } from './constructor'\nimport { ITailwindElementMixin } from './tailwind.mixin'\nimport { SchmancyElement } from './SchmancyElement'\n\n/**\n * Cross-realm brand used by `<schmancy-form>` to discover form fields by\n * inheritance rather than tag-name allowlists. `Symbol.for` puts the symbol in\n * the global registry so detection works across module realms/bundles.\n */\nexport const SCHMANCY_FORM_FIELD = Symbol.for('schmancy.form-field')\n\n/**\n * Composed event a field dispatches in `connectedCallback`. `<schmancy-form>`\n * subscribes via `fromEvent(this, FIELD_CONNECT_EVENT)` and adds the field to\n * its registry. No matching disconnect event — composed events from a\n * disconnected node have an empty composed path; cleanup is via `isConnected`\n * filter at iteration time.\n */\nexport const FIELD_CONNECT_EVENT = 'schmancy:field:connect'\n\n/**\n * Validation modes.\n * - `dirty` (default per Revolute) — show errors only after value diverged.\n * - `touched` — show errors after first blur, even if value unchanged.\n * - `always` — show errors immediately (live search).\n * - `submitted` — hold all errors until submit (wizard step).\n * - `length` — fire validation only when `value.length` reaches `maxlength`\n * (Stripe pattern for predictable-length fields: ZIP, phone, card number).\n */\nexport type ValidateOn = 'always' | 'touched' | 'dirty' | 'submitted' | 'length'\n\n/**\n * Per-field error-message override map. Keys are `ValidityState` flag names;\n * values are the message to display when that flag is set. Unset flags fall\n * back to the mixin's hardcoded defaults (English).\n *\n * Use for i18n or domain-specific copy:\n * ```ts\n * <schmancy-input\n * .errorMessages=${{ valueMissing: 'Adresse e-mail requise', typeMismatch: 'Format e-mail invalide' }}\n * type=\"email\" required\n * ></schmancy-input>\n * ```\n */\nexport type ErrorMessages = Partial<Record<keyof ValidityState, string>>\n\n/**\n * Interface defining the properties and methods that the FormFieldMixin adds.\n */\nexport interface IFormFieldMixin extends Element {\n\tname: string\n\tvalue: string | string[] | boolean | number | undefined\n\tlabel: string\n\trequired: boolean\n\tdisabled: boolean\n\treadonly: boolean\n\terror: boolean\n\tvalidationMessage: string\n\thint?: string\n\tid: string\n\n\t/** Set to `true` once the user has blurred the field at least once. */\n\ttouched: boolean\n\t/** `true` when the current value differs from the captured default. */\n\tdirty: boolean\n\t/** Inverse of `dirty`. */\n\tpristine: boolean\n\t/** Set to `true` by `<schmancy-form>` on submit (forces error display). */\n\tsubmitted: boolean\n\t/** Validation mode — controls when errors display. Default `'dirty'`. */\n\tvalidateOn: ValidateOn\n\n\t/**\n\t * Per-field error-message override map (i18n hook). See `ErrorMessages`.\n\t * Unset keys fall back to the mixin's hardcoded English defaults.\n\t */\n\terrorMessages?: ErrorMessages\n\n\t/**\n\t * `ElementInternals` instance attached by the mixin. Exposed so subclasses\n\t * with non-standard validity semantics (date-range, multi-select) can\n\t * surface platform `ValidityStateFlags` directly via\n\t * `internals.setValidity({ valueMissing: true })` rather than rolling their\n\t * own `attachInternals` call.\n\t */\n\tinternals: ElementInternals | undefined\n\n\tform: HTMLFormElement | null\n\n\tcheckValidity(): boolean\n\treportValidity(): boolean\n\tsetCustomValidity(message: string): void\n\n\t/** Mark the field as touched (component should call on blur). */\n\tmarkTouched(): void\n\t/** Mark the field as submitted (called by `<schmancy-form>` on submit). */\n\tmarkSubmitted(): void\n\t/**\n\t * Clear the `submitted` flag without resetting value/touched/error.\n\t * Used by wizards: stepping back from step N to step N-1 should not\n\t * leave step N-1's fields in aggressive \"show all errors\" mode.\n\t */\n\tclearSubmitted(): void\n\n\t/**\n\t * `true` while an async validator is in flight. Broadcast as\n\t * `:state(validating)`. `<schmancy-form>` blocks submit until every\n\t * registered field's `isValidating` is back to `false`.\n\t */\n\tisValidating: boolean\n\n\t/**\n\t * Run an async validator. While the promise is pending, `isValidating` is\n\t * `true` and `:state(validating)` is broadcast. On resolve, the returned\n\t * string is passed to `setCustomValidity` — empty string clears any\n\t * existing custom error; non-empty marks the field invalid with that\n\t * message.\n\t *\n\t * Submitting the form while a validator is pending is queued — the form\n\t * waits for `Promise.all(pending validators)` to settle before proceeding.\n\t */\n\trunAsyncValidator(fn: () => Promise<string>): Promise<void>\n\n\t/**\n\t * Whether the gate for showing validation errors is open right now. Exposed\n\t * so subclasses with custom error-display channels (e.g. select renders\n\t * errors on a child input) can keep their gate consistent with the mixin's.\n\t * Subclasses should not override this — extend the truth table by changing\n\t * `validateOn` instead.\n\t */\n\tshouldShowError(): boolean\n\n\ttoFormEntries(): Array<[string, FormDataEntryValue]>\n\tresetForm(): void\n\n\temitChange(detail: any): void\n}\n\n/** Predicate used by `<schmancy-form>` to detect mixin descendants. */\nexport function isSchmancyFormField(el: unknown): el is IFormFieldMixin {\n\treturn !!el && typeof el === 'object' && (el as any).constructor?.[SCHMANCY_FORM_FIELD] === true\n}\n\n/**\n * A mixin that adds form field capabilities to a LitElement class.\n * Components that extend this mixin are automatically discovered and\n * collected by `<schmancy-form>` — no tag-name registration needed.\n *\n * Subclasses may override `toFormEntries()` to contribute multiple\n * name/value pairs to FormData (e.g. date-range, tag-input).\n *\n * @example\n * ```ts\n * class MyInput extends FormFieldMixin(TailwindElement(css`...`)) {\n * // Your component code here\n * }\n * ```\n */\nexport function FormFieldMixin<T extends Constructor<LitElement>>(superClass: T) {\n\tclass FormFieldMixinClass extends superClass {\n\t\tstatic formAssociated = true\n\n\t\t/** Brand for cross-realm detection by `<schmancy-form>`. */\n\t\tstatic readonly [SCHMANCY_FORM_FIELD] = true\n\n\t\t// Element internals for form association\n\t\tinternals: ElementInternals | undefined\n\n\t\t/** Value snapshot captured at first render, used by `resetForm()`. */\n\t\tprotected defaultValue: string | string[] | boolean | number | undefined = undefined\n\n\t\t@property({ type: String })\n\t\tname: string = ''\n\n\t\t@property({ reflect: true })\n\t\tvalue: string | string[] | boolean | number | undefined = ''\n\n\t\t@property({ type: String })\n\t\tlabel: string = ''\n\n\t\t@property({ type: Boolean, reflect: true })\n\t\trequired: boolean = false\n\n\t\t@property({ type: Boolean, reflect: true })\n\t\tdisabled: boolean = false\n\n\t\t@property({ type: Boolean, reflect: true })\n\t\treadonly: boolean = false\n\n\t\t@property({ type: Boolean, reflect: true })\n\t\terror: boolean = false\n\n\t\t@property({ type: String })\n\t\tvalidationMessage: string = ''\n\n\t\t@property({ type: String })\n\t\thint?: string\n\n\t\t@property({ reflect: true })\n\t\toverride id: string = `schmancy-field-${Date.now()}-${Math.floor(Math.random() * 1000)}`\n\n\t\t// ----- Validation UX state (Revolute contract) -----\n\n\t\t/** True after the user has blurred the field at least once. */\n\t\t@state() touched: boolean = false\n\n\t\t/** Set by `<schmancy-form>` on submit; persists until `resetForm()`. */\n\t\t@state() submitted: boolean = false\n\n\t\t/**\n\t\t * When errors display. Default `'dirty'` — the autofocus+cancel anti-pattern\n\t\t * is avoided because pristine fields never show errors until submit.\n\t\t */\n\t\t@property({ type: String, reflect: true })\n\t\tvalidateOn: ValidateOn = 'dirty'\n\n\t\t/**\n\t\t * Optional override for the validity-flag → message map. See\n\t\t * `ErrorMessages`. Unset keys fall back to the mixin's defaults.\n\t\t */\n\t\t@property({ attribute: false })\n\t\terrorMessages?: ErrorMessages\n\n\t\t/** True when value has been changed from the captured default. */\n\t\tget dirty(): boolean {\n\t\t\treturn this.defaultValue !== undefined && this.value !== this.defaultValue\n\t\t}\n\n\t\tget pristine(): boolean {\n\t\t\treturn !this.dirty\n\t\t}\n\n\t\tmarkTouched(): void {\n\t\t\tif (!this.touched) this.touched = true\n\t\t}\n\n\t\tmarkSubmitted(): void {\n\t\t\tif (!this.submitted) this.submitted = true\n\t\t}\n\n\t\tclearSubmitted(): void {\n\t\t\tif (this.submitted) this.submitted = false\n\t\t}\n\n\t\t/**\n\t\t * Reactive flag set while an async validator is in flight. Read by\n\t\t * `<schmancy-form>` to gate submit; broadcast as `:state(validating)`\n\t\t * for CSS spinner targeting.\n\t\t */\n\t\t@state() isValidating: boolean = false\n\n\t\tasync runAsyncValidator(fn: () => Promise<string>): Promise<void> {\n\t\t\tif (this.isValidating) {\n\t\t\t\t// Cancel-by-supersede semantics — a new call wins; the previous\n\t\t\t\t// is best-effort and its result is dropped if it resolves later.\n\t\t\t\tthis.asyncValidatorEpoch++\n\t\t\t}\n\t\t\tconst epoch = ++this.asyncValidatorEpoch\n\t\t\tthis.isValidating = true\n\t\t\ttry {\n\t\t\t\tconst message = await fn()\n\t\t\t\tif (epoch !== this.asyncValidatorEpoch) return // superseded\n\t\t\t\tthis.setCustomValidity(message)\n\t\t\t} finally {\n\t\t\t\tif (epoch === this.asyncValidatorEpoch) {\n\t\t\t\t\tthis.isValidating = false\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t\tprivate asyncValidatorEpoch: number = 0\n\n\t\t/**\n\t\t * Whether `checkValidity()` should display errors right now.\n\t\t * `submitted` overrides every mode — once a submit attempt happens, the\n\t\t * field stays in live-correction mode (Phase 3) for the rest of the\n\t\t * session, and `resetForm()` is the only way back. The leading\n\t\t * underscore marks this as an internal API: subclasses may call it but\n\t\t * should not override it (extend the truth table by changing\n\t\t * `validateOn` instead).\n\t\t */\n\t\tshouldShowError(): boolean {\n\t\t\tif (this.submitted) return true\n\t\t\tswitch (this.validateOn) {\n\t\t\t\tcase 'always':\n\t\t\t\t\treturn true\n\t\t\t\tcase 'touched':\n\t\t\t\t\treturn this.touched\n\t\t\t\tcase 'dirty':\n\t\t\t\t\treturn this.dirty\n\t\t\t\tcase 'submitted':\n\t\t\t\t\treturn false\n\t\t\t\tcase 'length':\n\t\t\t\t\t// Predictable-length fields: validate once value reaches the\n\t\t\t\t\t// maxlength constraint. Stripe pattern. Falls back to dirty\n\t\t\t\t\t// if no maxlength is set.\n\t\t\t\t\tif (typeof this.value === 'string') {\n\t\t\t\t\t\tconst max = (this as unknown as { maxlength?: number }).maxlength\n\t\t\t\t\t\tif (typeof max === 'number' && max > 0) {\n\t\t\t\t\t\t\treturn this.value.length >= max\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t\treturn this.dirty\n\t\t\t}\n\t\t}\n\n\t\tconstructor(...args: any[]) {\n\t\t\tsuper(...args)\n\t\t\ttry {\n\t\t\t\tthis.internals = this.attachInternals()\n\t\t\t} catch {\n\t\t\t\tthis.internals = undefined\n\t\t\t}\n\t\t}\n\n\t\toverride connectedCallback(): void {\n\t\t\tsuper.connectedCallback()\n\t\t\t// Register with any ancestor <schmancy-form> via composed event.\n\t\t\tthis.dispatchEvent(\n\t\t\t\tnew CustomEvent(FIELD_CONNECT_EVENT, {\n\t\t\t\t\tdetail: this,\n\t\t\t\t\tbubbles: true,\n\t\t\t\t\tcomposed: true,\n\t\t\t\t}),\n\t\t\t)\n\t\t}\n\n\t\t/** The form this element is associated with (native FACE behavior). */\n\t\tget form(): HTMLFormElement | null {\n\t\t\treturn this.internals?.form ?? null\n\t\t}\n\n\t\tprotected firstUpdated(changedProps: PropertyValueMap<any>): void {\n\t\t\tsuper.firstUpdated?.(changedProps)\n\t\t\tif (this.defaultValue === undefined) this.defaultValue = this.value\n\t\t\t// Sync platform validity (`internals.setValidity`) once after first\n\t\t\t// render so `<form>.checkValidity()` and `:invalid` reflect truth\n\t\t\t// even when no property change has fired through `willUpdate` yet\n\t\t\t// (e.g. for required-empty fields with class-field-initialized\n\t\t\t// defaults that Lit doesn't see as \"changed\" on the first cycle).\n\t\t\tthis.checkValidity()\n\t\t}\n\n\t\tprotected willUpdate(changedProps: PropertyValueMap<any>): void {\n\t\t\tsuper.willUpdate(changedProps)\n\n\t\t\tif (changedProps.has('value')) {\n\t\t\t\tthis.internals?.setFormValue(this.value as string | File | FormData | null)\n\t\t\t\t// :state(dirty) tracks value-vs-default; recompute on every value change.\n\t\t\t\tif (this.dirty) this.internals?.states.add('dirty')\n\t\t\t\telse this.internals?.states.delete('dirty')\n\t\t\t\t// Always sync platform validity (internals.setValidity) so\n\t\t\t\t// `<form>.checkValidity()` and `:invalid` reflect truth, even\n\t\t\t\t// while the visual `error` gate stays closed for pristine\n\t\t\t\t// fields under `validateOn: 'dirty'`. The visibility gate is\n\t\t\t\t// inside checkValidity() itself.\n\t\t\t\tthis.checkValidity()\n\t\t\t}\n\n\t\t\tif (changedProps.has('required') || changedProps.has('disabled')) {\n\t\t\t\tthis.checkValidity()\n\t\t\t}\n\n\t\t\tif (changedProps.has('isValidating')) {\n\t\t\t\tif (this.isValidating) this.internals?.states.add('validating')\n\t\t\t\telse this.internals?.states.delete('validating')\n\t\t\t}\n\n\t\t\tif (changedProps.has('touched')) {\n\t\t\t\tif (this.touched) this.internals?.states.add('touched')\n\t\t\t\telse this.internals?.states.delete('touched')\n\t\t\t\t// Phase 2 — blur on a dirty field. Validate to surface the error.\n\t\t\t\tif (this.touched && this.dirty) this.checkValidity()\n\t\t\t}\n\n\t\t\tif (changedProps.has('submitted')) {\n\t\t\t\tif (this.submitted) {\n\t\t\t\t\tthis.internals?.states.add('submitted')\n\t\t\t\t\t// Phase 4 — submit forces error display regardless of dirty/touched.\n\t\t\t\t\tthis.checkValidity()\n\t\t\t\t} else {\n\t\t\t\t\tthis.internals?.states.delete('submitted')\n\t\t\t\t}\n\t\t\t}\n\n\t\t\t// Note: we do not write to `internals.setValidity` from willUpdate\n\t\t\t// based on `error` / `validationMessage` changes. `checkValidity`\n\t\t\t// and `setCustomValidity` are the sole writers — overwriting the\n\t\t\t// validity flags from willUpdate would clobber structured flags\n\t\t\t// set by subclass overrides (e.g. input.ts surfaces typeMismatch /\n\t\t\t// patternMismatch / tooShort / etc.).\n\n\t\t\tif (changedProps.has('error')) {\n\t\t\t\tif (this.error) this.internals?.states.add('invalid')\n\t\t\t\telse this.internals?.states.delete('invalid')\n\t\t\t\t// ARIA reflection through ElementInternals reaches AT through shadow DOM.\n\t\t\t\tif (this.internals) this.internals.ariaInvalid = this.error ? 'true' : 'false'\n\t\t\t}\n\n\t\t\tif (changedProps.has('required') || changedProps.has('disabled')) {\n\t\t\t\tif (this.required) this.internals?.states.add('required')\n\t\t\t\telse this.internals?.states.delete('required')\n\t\t\t\t// Suppress aria-required when disabled — disabled fields shouldn't\n\t\t\t\t// announce as required to assistive tech.\n\t\t\t\tif (this.internals) {\n\t\t\t\t\tthis.internals.ariaRequired = this.required && !this.disabled ? 'true' : 'false'\n\t\t\t\t}\n\t\t\t}\n\t\t\tif (changedProps.has('disabled')) {\n\t\t\t\tif (this.disabled) this.internals?.states.add('disabled')\n\t\t\t\telse this.internals?.states.delete('disabled')\n\t\t\t}\n\t\t\tif (changedProps.has('readonly')) {\n\t\t\t\tif (this.readonly) this.internals?.states.add('readonly')\n\t\t\t\telse this.internals?.states.delete('readonly')\n\t\t\t}\n\t\t}\n\n\t\t/**\n\t\t * Native FACE lifecycle — called by the browser when the owning form\n\t\t * is reset. Delegates to `resetForm()` so subclasses have one\n\t\t * override point for both programmatic and user-initiated resets.\n\t\t */\n\t\tformResetCallback(): void {\n\t\t\tthis.resetForm()\n\t\t}\n\n\t\t/** Native FACE lifecycle — called when the form's disabled state changes. */\n\t\tformDisabledCallback(disabled: boolean): void {\n\t\t\tthis.disabled = disabled\n\t\t}\n\n\t\t/**\n\t\t * Native FACE lifecycle — restore value after bfcache / form autofill.\n\t\t */\n\t\tformStateRestoreCallback(state: string | File | FormData | null): void {\n\t\t\tif (state == null) return\n\t\t\tthis.value = state as any\n\t\t}\n\n\t\t/** Override to customize reset behavior; default restores `defaultValue`. */\n\t\tresetForm(): void {\n\t\t\tthis.value = this.defaultValue ?? ''\n\t\t\tthis.error = false\n\t\t\tthis.validationMessage = ''\n\t\t\tthis.touched = false\n\t\t\tthis.submitted = false\n\t\t\tthis.internals?.setValidity({})\n\t\t}\n\n\t\t/**\n\t\t * Contribute entries to a parent FormData. Default: a single\n\t\t * `[name, value]` pair when `name` is set and value is meaningful.\n\t\t * Override for multi-entry controls (e.g. date range).\n\t\t */\n\t\ttoFormEntries(): Array<[string, FormDataEntryValue]> {\n\t\t\tif (!this.name || this.disabled) return []\n\t\t\tconst v = this.value\n\t\t\tif (v === undefined || v === null || v === '') return []\n\t\t\tif (Array.isArray(v)) return v.map(item => [this.name, String(item)] as [string, FormDataEntryValue])\n\t\t\tif (typeof v === 'boolean') return v ? [[this.name, 'on']] : []\n\t\t\treturn [[this.name, String(v)]]\n\t\t}\n\n\t\tcheckValidity(): boolean {\n\t\t\tif (this.disabled) {\n\t\t\t\tthis.internals?.setValidity({})\n\t\t\t\treturn true\n\t\t\t}\n\n\t\t\tconst requiredFailed =\n\t\t\t\tthis.required && (this.value === '' || this.value === undefined || this.value === null)\n\t\t\t// Custom errors set via setCustomValidity() are platform-truth too —\n\t\t\t// preserve them through re-validation cycles.\n\t\t\tconst customErrorSet = !!this.internals?.validity?.customError\n\t\t\tconst isValid = !requiredFailed && !customErrorSet\n\t\t\tconst requiredMessage =\n\t\t\t\tthis.errorMessages?.valueMissing ?? 'This field is required'\n\t\t\tconst defaultMessage = requiredFailed ? requiredMessage : 'Invalid value'\n\n\t\t\t// Platform validity (read by `form.checkValidity()` and `:invalid`)\n\t\t\t// is always set to the truth — independent of the visual gate.\n\t\t\tif (requiredFailed) {\n\t\t\t\tthis.internals?.setValidity(\n\t\t\t\t\t{ valueMissing: true },\n\t\t\t\t\tthis.validationMessage || defaultMessage,\n\t\t\t\t)\n\t\t\t} else if (!customErrorSet) {\n\t\t\t\t// No required failure, no custom error — clear flags.\n\t\t\t\tthis.internals?.setValidity({})\n\t\t\t}\n\t\t\t// (customErrorSet branch falls through — leave the custom validity intact.)\n\n\t\t\t// Visual `error` flag is gated. The returned boolean tells the caller\n\t\t\t// the truth; only the in-component error display is suppressed for\n\t\t\t// pristine fields under `validateOn: 'dirty'`.\n\t\t\tif (this.shouldShowError()) {\n\t\t\t\tthis.error = !isValid\n\t\t\t\tif (!isValid && !this.validationMessage) {\n\t\t\t\t\tthis.validationMessage = defaultMessage\n\t\t\t\t} else if (isValid) {\n\t\t\t\t\tthis.validationMessage = ''\n\t\t\t\t}\n\t\t\t}\n\n\t\t\treturn isValid\n\t\t}\n\n\t\treportValidity(): boolean {\n\t\t\tconst isValid = this.checkValidity()\n\t\t\tif (!isValid) this.internals?.reportValidity()\n\t\t\treturn isValid\n\t\t}\n\n\t\tsetCustomValidity(message: string): void {\n\t\t\tthis.validationMessage = message\n\t\t\tthis.error = message !== ''\n\t\t\tif (message) {\n\t\t\t\tthis.internals?.setValidity({ customError: true }, message)\n\t\t\t} else {\n\t\t\t\tthis.internals?.setValidity({})\n\t\t\t}\n\t\t}\n\n\t\temitChange(detail: any): void {\n\t\t\tif ('dispatchScopedEvent' in this && typeof this.dispatchScopedEvent === 'function') {\n\t\t\t\tthis.dispatchScopedEvent('change', detail, { bubbles: true })\n\t\t\t} else {\n\t\t\t\tthis.dispatchEvent(\n\t\t\t\t\tnew CustomEvent('change', {\n\t\t\t\t\t\tdetail,\n\t\t\t\t\t\tbubbles: true,\n\t\t\t\t\t\tcomposed: true,\n\t\t\t\t\t}),\n\t\t\t\t)\n\t\t\t}\n\t\t}\n\t}\n\n\treturn FormFieldMixinClass as Constructor<IFormFieldMixin> & T\n}\n\n/**\n * A convenience function that composes FormFieldMixin with SchmancyElement\n * to create a base class for Schmancy form components. Subclasses gain the\n * full SchmancyElement stack (SignalWatcher, _activeHost wrap, AbortSignal,\n * automatic Tailwind injection) plus the form-field semantics.\n */\nexport function SchmancyFormField<T extends CSSResult>(componentStyle?: T) {\n\tclass StyledSchmancyElement extends SchmancyElement {\n\t\tstatic styles = componentStyle ? [componentStyle] : []\n\t}\n\treturn FormFieldMixin(StyledSchmancyElement) as unknown as Constructor<IFormFieldMixin> &\n\t\tConstructor<ITailwindElementMixin> &\n\t\tConstructor<LitElement> &\n\t\tConstructor<IBaseMixin>\n}\n","import { CSSResult, LitElement } from 'lit'\nimport { IBaseMixin } from './baseElement'\nimport { Constructor } from './constructor'\nimport { SchmancyElement } from './SchmancyElement'\n\n/**\n * @deprecated Extend `SchmancyElement` directly and declare `static styles`.\n *\n * Before: extends $LitElement(css`...`)\n * After: extends SchmancyElement { static styles = [css`...`] }\n *\n * Kept as a thin alias for the migration window; will be removed in the next\n * major Schmancy release. The returned class extends `SchmancyElement` so\n * runtime semantics (Tailwind injection, `disconnecting` Subject,\n * `disconnectedSignal` AbortSignal, SignalWatcher) match exactly.\n */\nexport const $LitElement = <T extends CSSResult>(componentStyle?: T) => {\n\tclass LegacyAlias extends SchmancyElement {\n\t\tstatic styles = componentStyle ? [componentStyle] : []\n\t}\n\treturn LegacyAlias as CustomElementConstructor &\n\t\tConstructor<LitElement> &\n\t\tConstructor<IBaseMixin>\n}\n","import { css } from 'lit'\n\n/**\n * Luminous Glass surface type styles.\n *\n * Depth model: blur intensity + opacity replaces M3 tonal hierarchy.\n * - solid: opaque ground (0 blur, 100% opacity)\n * - subtle: frosted panel (4px blur, ~72% opacity)\n * - glass: full frosted glass (20px blur, ~55% opacity)\n * - luminous: glass + glow halo (24px blur, ~22% opacity)\n */\nexport const surfaceTypeStyles = css`\n\t/* ================================================================\n\t STRUCTURAL TYPES — All-glass depth model.\n\t Nothing is opaque. Every layer is translucent.\n\t Blur creates readability. Light borders isolate layers.\n\t Rule: text must ALWAYS be readable on every surface.\n\t ================================================================ */\n\n\t/* Solid — dense glass, high readability ground layer (no blur — 92% opacity is enough) */\n\t:host([type='solid']) {\n\t\t--glass-base: var(--schmancy-sys-color-surface-lowest);\n\t\t--glass-tint: var(--schmancy-sys-color-surface-on);\n\t\tbackground: color-mix(in srgb, var(--glass-base) 92%, transparent);\n\t\tcolor: var(--schmancy-sys-color-surface-on);\n\t}\n\n\t/* Subtle — bright vibrant glass: near-white tint, saturated blur, top-edge highlight */\n\t:host([type='subtle']) {\n\t\t--glass-base: var(--schmancy-sys-color-surface-lowest);\n\t\t--glass-tint: var(--schmancy-sys-color-surface-on);\n\t\tbackground: color-mix(in srgb, var(--glass-base) 30%, transparent);\n\t\tbackdrop-filter: blur(12px) saturate(160%);\n\t\t-webkit-backdrop-filter: blur(12px) saturate(160%);\n\t\tborder: 1px solid color-mix(in srgb, var(--schmancy-sys-color-outlineVariant) 60%, transparent);\n\t\tbox-shadow: inset 0 1px 0 color-mix(in srgb, var(--schmancy-sys-color-surface-on) 8%, transparent);\n\t\tcolor: var(--schmancy-sys-color-surface-on);\n\t}\n\n\t/* Glass — frosted glass, blur ensures readability */\n\t:host([type='glass']) {\n\t\t--glass-base: var(--schmancy-sys-color-surface-lowest);\n\t\t--glass-tint: var(--schmancy-sys-color-surface-on);\n\n\t\tbackground: color-mix(in srgb, var(--glass-base) 55%, transparent);\n\t\tbackdrop-filter: blur(16px) saturate(180%) brightness(1.05);\n\t\t-webkit-backdrop-filter: blur(16px) saturate(180%) brightness(1.05);\n\t\tcolor: var(--schmancy-sys-color-surface-on);\n\t\tcontain: content;\n\t\tposition: relative;\n\t\toverflow: hidden;\n\t\tisolation: isolate;\n\t}\n\n\t/* Luminous — glass + glow halo, heavy blur keeps readability */\n\t:host([type='luminous']) {\n\t\t--glass-base: var(--schmancy-sys-color-surface-lowest);\n\t\t--glass-tint: var(--schmancy-sys-color-surface-on);\n\t\t--glow-color: var(--schmancy-sys-color-primary-default);\n\n\t\tbackground: color-mix(in srgb, var(--glass-base) 42%, transparent);\n\t\tbackdrop-filter: blur(20px) saturate(200%) brightness(1.08);\n\t\t-webkit-backdrop-filter: blur(20px) saturate(200%) brightness(1.08);\n\t\tcolor: var(--schmancy-sys-color-surface-on);\n\t\tcontain: content;\n\t\tposition: relative;\n\t\toverflow: hidden;\n\t\tisolation: isolate;\n\t}\n\n\t/* ================================================================\n\t UTILITY TYPES\n\t ================================================================ */\n\n\t/* Transparent — no background */\n\t:host([type='transparent']) {\n\t\tbackground-color: transparent;\n\t\tcolor: var(--schmancy-sys-color-surface-on);\n\t}\n\n\t/* Outlined — border with luminous hover potential */\n\t:host([type='outlined']) {\n\t\tbackground-color: transparent;\n\t\tcolor: var(--schmancy-sys-color-surface-on);\n\t\tborder: 1px solid var(--schmancy-sys-color-outlineVariant);\n\t\ttransition: border-color 300ms ease, box-shadow 300ms ease;\n\t}\n\n\t/* ================================================================\n\t SEMANTIC TYPES — tinted glass for status/role\n\t ================================================================ */\n\n\t:host([type='primary']) {\n\t\tbackground: color-mix(in srgb, var(--schmancy-sys-color-primary-default) 12%, transparent);\n\t\tbackdrop-filter: blur(4px) saturate(140%);\n\t\t-webkit-backdrop-filter: blur(4px) saturate(140%);\n\t\tcolor: var(--schmancy-sys-color-primary-default);\n\t}\n\t:host([type='secondary']) {\n\t\tbackground: color-mix(in srgb, var(--schmancy-sys-color-secondary-default) 12%, transparent);\n\t\tbackdrop-filter: blur(4px) saturate(140%);\n\t\t-webkit-backdrop-filter: blur(4px) saturate(140%);\n\t\tcolor: var(--schmancy-sys-color-secondary-default);\n\t}\n\t:host([type='tertiary']) {\n\t\tbackground: color-mix(in srgb, var(--schmancy-sys-color-tertiary-default) 12%, transparent);\n\t\tbackdrop-filter: blur(4px) saturate(140%);\n\t\t-webkit-backdrop-filter: blur(4px) saturate(140%);\n\t\tcolor: var(--schmancy-sys-color-tertiary-default);\n\t}\n\t:host([type='error']) {\n\t\tbackground: color-mix(in srgb, var(--schmancy-sys-color-error-default) 12%, transparent);\n\t\tbackdrop-filter: blur(4px) saturate(140%);\n\t\t-webkit-backdrop-filter: blur(4px) saturate(140%);\n\t\tcolor: var(--schmancy-sys-color-error-onContainer);\n\t}\n\t:host([type='success']) {\n\t\tbackground: color-mix(in srgb, var(--schmancy-sys-color-success-default) 12%, transparent);\n\t\tbackdrop-filter: blur(4px) saturate(140%);\n\t\t-webkit-backdrop-filter: blur(4px) saturate(140%);\n\t\tcolor: var(--schmancy-sys-color-success-onContainer);\n\t}\n\t:host([type='warning']) {\n\t\tbackground: color-mix(in srgb, var(--schmancy-sys-color-warning-default) 12%, transparent);\n\t\tbackdrop-filter: blur(4px) saturate(140%);\n\t\t-webkit-backdrop-filter: blur(4px) saturate(140%);\n\t\tcolor: var(--schmancy-sys-color-warning-onContainer);\n\t}\n\t:host([type='info']) {\n\t\tbackground: color-mix(in srgb, var(--schmancy-sys-color-info-default) 12%, transparent);\n\t\tbackdrop-filter: blur(4px) saturate(140%);\n\t\t-webkit-backdrop-filter: blur(4px) saturate(140%);\n\t\tcolor: var(--schmancy-sys-color-info-onContainer);\n\t}\n\n\t/* ================================================================\n\t LEGACY M3 ALIASES — backward compatibility\n\t Old type names render as their new Luminous Glass equivalents.\n\t ================================================================ */\n\n\t/* solid aliases — dense glass */\n\t:host([type='surface']),\n\t:host([type='surfaceDim']),\n\t:host([type='surfaceBright']),\n\t:host([type='containerLowest']) {\n\t\t--glass-base: var(--schmancy-sys-color-surface-lowest);\n\t\t--glass-tint: var(--schmancy-sys-color-surface-on);\n\t\tbackground: color-mix(in srgb, var(--glass-base) 92%, transparent);\n\t\tcolor: var(--schmancy-sys-color-surface-on);\n\t}\n\n\t/* subtle aliases — bright vibrant glass */\n\t:host([type='containerLow']),\n\t:host([type='container']) {\n\t\t--glass-base: var(--schmancy-sys-color-surface-lowest);\n\t\t--glass-tint: var(--schmancy-sys-color-surface-on);\n\t\tbackground: color-mix(in srgb, var(--glass-base) 30%, transparent);\n\t\tbackdrop-filter: blur(12px) saturate(160%);\n\t\t-webkit-backdrop-filter: blur(12px) saturate(160%);\n\t\tborder: 1px solid color-mix(in srgb, var(--schmancy-sys-color-outlineVariant) 60%, transparent);\n\t\tbox-shadow: inset 0 1px 0 color-mix(in srgb, var(--schmancy-sys-color-surface-on) 8%, transparent);\n\t\tcolor: var(--schmancy-sys-color-surface-on);\n\t}\n\n\t/* glass aliases */\n\t:host([type='containerHigh']),\n\t:host([type='containerHighest']),\n\t:host([type='glassOforim']) {\n\t\t--glass-base: var(--schmancy-sys-color-surface-lowest);\n\t\t--glass-tint: var(--schmancy-sys-color-surface-on);\n\n\t\tbackground: color-mix(in srgb, var(--glass-base) 55%, transparent);\n\t\tbackdrop-filter: blur(16px) saturate(180%) brightness(1.05);\n\t\t-webkit-backdrop-filter: blur(16px) saturate(180%) brightness(1.05);\n\t\tcolor: var(--schmancy-sys-color-surface-on);\n\t\tposition: relative;\n\t\toverflow: hidden;\n\t\tisolation: isolate;\n\t}\n\n\t/* ================================================================\n\t REDUCED MOTION — disable glass animations\n\t ================================================================ */\n`\n\n/**\n * Combined surface styles — type variants only.\n * Corner radius, shadow, and cursor are stock Tailwind classes applied by the consumer.\n */\nexport const surfaceStyles = css`\n\t${surfaceTypeStyles}\n`\n","import type { Constructor } from './constructor'\nimport { CSSResultGroup, CSSResultOrNative, LitElement } from 'lit'\nimport { property } from 'lit/decorators.js'\nimport type { TSurfaceColor } from '../src/types/surface'\nimport { surfaceStyles } from '../src/surface/surface.styles'\n\nexport declare class ISurfaceMixin {\n\ttype: TSurfaceColor\n}\n\n/**\n * SurfaceMixin — injects surface color-variant styles into any LitElement.\n *\n * Uses Lit's `finalizeStyles` hook to inject `surfaceTypeStyles` CSS for all\n * color-variant selectors. Corner radius, shadow depth, and cursor behavior are\n * the consumer's responsibility — apply stock Tailwind classes directly on the\n * element (`rounded-2xl`, `shadow-lg`, `cursor-pointer`).\n *\n * Provides one reflected property:\n * - `type`: TSurfaceColor — the color variant (26+ options)\n *\n * Usage:\n * ```typescript\n * import { SurfaceMixin } from '@mixins/surface.mixin'\n *\n * @customElement('my-component')\n * class MyComponent extends SurfaceMixin(TailwindElement(css`\n * :host { display: block; }\n * `)) {\n * // Component now has the type property and surfaceTypeStyles\n * }\n * ```\n */\nexport const SurfaceMixin = <T extends Constructor<LitElement>>(superClass: T) => {\n\tclass SurfaceMixinClass extends superClass {\n\t\t/**\n\t\t * Override finalizeStyles to inject surfaceStyles.\n\t\t * This is the Lit-recommended way for mixins to add styles.\n\t\t */\n\t\tprotected static finalizeStyles(styles?: CSSResultGroup): CSSResultOrNative[] {\n\t\t\t// Get parent's finalized styles using LitElement's method\n\t\t\tconst parentStyles = (superClass as unknown as typeof LitElement).finalizeStyles(styles)\n\t\t\t// Append surfaceStyles at the end (higher specificity)\n\t\t\treturn [...parentStyles, surfaceStyles as CSSResultOrNative]\n\t\t}\n\n\t\t/**\n\t\t * Specifies the surface type for styling.\n\t\t * @default 'subtle'\n\t\t */\n\t\t@property({ reflect: true })\n\t\ttype: TSurfaceColor = 'subtle'\n\t}\n\treturn SurfaceMixinClass as Constructor<ISur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SAAA,GAAA,KAAA,GAAA,KAAA,GAAA,KAAA,GAAA,KAAA,GAAA,GAAA,KAAA"}
@@ -1 +0,0 @@
1
- {"version":3,"file":"notification-DFKRMmSq.js","names":["#playSound"],"sources":["../src/notification/notification.scss?inline","../src/notification/notification.ts","../src/notification/notification-service.ts","../src/notification/notify.ts"],"sourcesContent":[":host {\n\tdisplay: block;\n}\n\n.notification {\n\tposition: relative;\n\tdisplay: flex;\n\talign-items: stretch;\n\tmax-width: 360px;\n\toverflow: hidden;\n\n\t/* Asymmetric radius: 4px left, 14px right */\n\tborder-radius: 4px 14px 14px 4px;\n\toutline: 1px solid color-mix(in srgb, var(--schmancy-sys-color-outline-variant) 50%, transparent);\n\n\tbackground: linear-gradient(\n\t\t180deg,\n\t\tcolor-mix(in srgb, var(--schmancy-sys-color-surface-container) 100%, transparent),\n\t\tcolor-mix(in srgb, var(--schmancy-sys-color-surface-containerHigh) 100%, transparent)\n\t);\n\n\tcolor: var(--schmancy-sys-color-surface-on);\n\n\t/* Type-colored luminous glow — tightened */\n\t--notification-glow-color: var(--schmancy-sys-color-primary-default);\n\tbox-shadow:\n\t\t0 6px 28px -10px color-mix(in srgb, var(--notification-glow-color) 22%, transparent),\n\t\t0 1px 0 0 color-mix(in srgb, var(--schmancy-sys-color-outline-variant) 30%, transparent);\n\n\ttransition:\n\t\tbox-shadow 300ms ease,\n\t\ttransform 300ms cubic-bezier(0.34, 1.56, 0.64, 1);\n\n\t&.info {\n\t\t--notification-glow-color: var(--schmancy-sys-color-primary-default);\n\t\t--notification-accent: var(--schmancy-sys-color-primary-default);\n\t}\n\t&.success {\n\t\t--notification-glow-color: var(--schmancy-sys-color-success-default);\n\t\t--notification-accent: var(--schmancy-sys-color-success-default);\n\t}\n\t&.warning {\n\t\t--notification-glow-color: var(--schmancy-sys-color-tertiary-default);\n\t\t--notification-accent: var(--schmancy-sys-color-tertiary-default);\n\t}\n\t&.error {\n\t\t--notification-glow-color: var(--schmancy-sys-color-error-default);\n\t\t--notification-accent: var(--schmancy-sys-color-error-default);\n\t}\n\n\t&.hovered {\n\t\tbox-shadow:\n\t\t\t0 10px 36px -8px color-mix(in srgb, var(--notification-glow-color) 34%, transparent),\n\t\t\t0 1px 0 0 color-mix(in srgb, var(--schmancy-sys-color-outline-variant) 30%, transparent);\n\t\ttransform: translateY(-2px);\n\n\t\t.accent-rail {\n\t\t\twidth: 4px;\n\t\t}\n\t}\n\n\t@media (prefers-reduced-motion: reduce) {\n\t\ttransition: box-shadow 200ms ease;\n\n\t\t&.hovered {\n\t\t\ttransform: none;\n\t\t}\n\t}\n}\n\n/* Vertical accent rail — left edge */\n.accent-rail {\n\tflex-shrink: 0;\n\twidth: 3px;\n\tbackground: var(--notification-accent, var(--schmancy-sys-color-primary-default));\n\tborder-radius: 4px 0 0 4px;\n\ttransition: width 200ms ease;\n\talign-self: stretch;\n}\n\n/* Card body */\n.content {\n\tflex: 1;\n\tmin-width: 0;\n\tpadding: 14px 36px 14px 18px;\n}\n\n/* Monospace uppercase type tag */\n.type-tag {\n\tdisplay: block;\n\tfont-family: ui-monospace, 'Cascadia Code', 'Source Code Pro', Menlo, Consolas, monospace;\n\tfont-size: 10px;\n\tletter-spacing: 0.14em;\n\ttext-transform: uppercase;\n\topacity: 0.7;\n\tcolor: var(--notification-accent, var(--schmancy-sys-color-primary-default));\n\tmargin-bottom: 4px;\n\tline-height: 1;\n}\n\n/* Serif display title */\n.title {\n\tfont-family: ui-serif, Georgia, Cambria, 'Times New Roman', serif;\n\tfont-weight: 500;\n\tfont-size: 15px;\n\tline-height: 1.3;\n\tmargin-bottom: 3px;\n\tcolor: var(--schmancy-sys-color-surface-on);\n}\n\n/* Body message */\n.message {\n\tfont-family: ui-sans-serif, system-ui, -apple-system, sans-serif;\n\tfont-size: 13px;\n\tline-height: 1.45;\n\topacity: 0.72;\n}\n\n/* Close button — 28×28 hit target, × glyph */\n.close {\n\tposition: absolute;\n\ttop: 6px;\n\tright: 6px;\n\twidth: 28px;\n\theight: 28px;\n\tdisplay: flex;\n\talign-items: center;\n\tjustify-content: center;\n\tbackground: none;\n\tborder: none;\n\tfont-size: 18px;\n\tfont-weight: 400;\n\tcolor: var(--schmancy-sys-color-surface-onVariant);\n\tcursor: pointer;\n\tpadding: 0;\n\tline-height: 1;\n\topacity: 0.4;\n\tborder-radius: 50%;\n\ttransition: opacity 200ms ease;\n\n\t&:hover {\n\t\topacity: 0.85;\n\t}\n\n\t&:focus-visible {\n\t\toutline: none;\n\t\topacity: 1;\n\t\tbox-shadow: 0 0 0 2px var(--notification-accent, var(--schmancy-sys-color-primary-default));\n\t}\n}\n\n/* Progress hairline — top edge */\n.progress {\n\tposition: absolute;\n\ttop: 0;\n\tbottom: auto;\n\tleft: 0;\n\tright: 0;\n}\n","import { SchmancyElement } from '@mixins/index'\nimport { html, unsafeCSS } from 'lit'\nimport { customElement, property, state } from 'lit/decorators.js'\nimport { BehaviorSubject, timer, interval, NEVER } from 'rxjs'\nimport { switchMap, takeUntil, map, tap, distinctUntilChanged } from 'rxjs/operators'\nimport '../progress/progress'\nimport style from './notification.scss?inline'\n\nexport type NotificationType = 'info' | 'success' | 'warning' | 'error'\n\n/**\n * @fires close - When notification is closed\n */\n@customElement('sch-notification')\nexport default class SchmancyNotification extends SchmancyElement {\n\tstatic styles = [unsafeCSS(style)]\n\n\t@property({ type: String }) title = ''\n\t@property({ type: String }) message = ''\n\t@property({ type: String }) type: NotificationType = 'info'\n\t@property({ type: Boolean }) closable = true\n\t@property({ type: Number }) duration = 5000\n\t@property({ type: String }) id = `notification-${Date.now()}-${Math.floor(Math.random() * 10000)}`\n\t@property({ type: Boolean }) playSound = true\n\t@property({ type: Boolean }) showProgress = false\n\t// startPosition retained for API compatibility — not used in entrance animation\n\t@property({ type: Object }) startPosition: { x: number; y: number } = { x: 0, y: 0 }\n\n\t@state() private visible = true\n\t@state() private progress = 100\n\t@state() private hovered = false\n\t@state() private closing = false\n\n\tprivate paused$ = new BehaviorSubject<boolean>(false)\n\tprivate startTime = 0\n\tprivate pausedAt = 0\n\tprivate elapsedBeforePause = 0\n\n\tconnectedCallback() {\n\t\tsuper.connectedCallback()\n\n\t\tthis.style.position = 'fixed'\n\t\tthis.style.top = '16px'\n\t\tthis.style.right = '16px'\n\t\tthis.style.zIndex = '10001'\n\t\tthis.style.opacity = '0'\n\n\t\tthis.updateComplete.then(() => {\n\t\t\tthis.animateIn()\n\t\t\treturn\n\t\t})\n\n\t\tif (this.duration > 0) {\n\t\t\tthis.setupAutoClose()\n\t\t\tthis.setupProgressUpdates()\n\t\t}\n\n\t\tif (this.playSound) {\n\t\t\tthis.#playSound()\n\t\t}\n\t}\n\n\tprivate async animateIn() {\n\t\tconst reduced = window.matchMedia('(prefers-reduced-motion: reduce)').matches\n\t\tawait this.animate(\n\t\t\treduced\n\t\t\t\t? [{ opacity: 0 }, { opacity: 1 }]\n\t\t\t\t: [\n\t\t\t\t\t\t{ transform: 'translateX(40px) scale(0.96)', opacity: 0 },\n\t\t\t\t\t\t{ transform: 'translateX(0) scale(1)', opacity: 1 },\n\t\t\t\t\t],\n\t\t\t{\n\t\t\t\tduration: reduced ? 200 : 360,\n\t\t\t\teasing: 'cubic-bezier(0.22, 1, 0.36, 1)',\n\t\t\t\tfill: 'forwards',\n\t\t\t},\n\t\t).finished\n\t}\n\n\tprivate setupAutoClose() {\n\t\tif (this.duration <= 0) return\n\n\t\tthis.startTime = Date.now()\n\t\tthis.elapsedBeforePause = 0\n\n\t\tthis.paused$\n\t\t\t.pipe(\n\t\t\t\tswitchMap(paused => {\n\t\t\t\t\tif (paused) {\n\t\t\t\t\t\tthis.pausedAt = Date.now()\n\t\t\t\t\t\tthis.elapsedBeforePause += this.pausedAt - this.startTime\n\t\t\t\t\t\treturn NEVER\n\t\t\t\t\t} else {\n\t\t\t\t\t\tthis.startTime = Date.now()\n\t\t\t\t\t\tconst remaining = this.duration - this.elapsedBeforePause\n\t\t\t\t\t\tif (remaining <= 0) {\n\t\t\t\t\t\t\tthis.close()\n\t\t\t\t\t\t\treturn NEVER\n\t\t\t\t\t\t}\n\t\t\t\t\t\treturn timer(remaining)\n\t\t\t\t\t}\n\t\t\t\t}),\n\t\t\t\ttakeUntil(this.disconnecting),\n\t\t\t)\n\t\t\t.subscribe(() => this.close())\n\t}\n\n\tprivate setupProgressUpdates() {\n\t\tif (this.duration <= 0) return\n\n\t\tinterval(16)\n\t\t\t.pipe(\n\t\t\t\tswitchMap(() =>\n\t\t\t\t\tthis.paused$.pipe(\n\t\t\t\t\t\tmap(paused => {\n\t\t\t\t\t\t\tif (paused) return this.progress\n\t\t\t\t\t\t\tconst elapsed = this.elapsedBeforePause + (Date.now() - this.startTime)\n\t\t\t\t\t\t\tconst remaining = Math.max(0, this.duration - elapsed)\n\t\t\t\t\t\t\treturn (remaining / this.duration) * 100\n\t\t\t\t\t\t}),\n\t\t\t\t\t),\n\t\t\t\t),\n\t\t\t\tdistinctUntilChanged(),\n\t\t\t\ttap(progress => {\n\t\t\t\t\tthis.progress = progress\n\t\t\t\t}),\n\t\t\t\ttakeUntil(this.disconnecting),\n\t\t\t)\n\t\t\t.subscribe()\n\t}\n\n\t#playSound() {\n\t\tthis.dispatchEvent(\n\t\t\tnew CustomEvent('playsound', {\n\t\t\t\tdetail: { type: this.type },\n\t\t\t\tbubbles: true,\n\t\t\t\tcomposed: true,\n\t\t\t}),\n\t\t)\n\t}\n\n\tprivate handleMouseEnter() {\n\t\tthis.hovered = true\n\t\tthis.paused$.next(true)\n\t}\n\n\tprivate handleMouseLeave() {\n\t\tthis.hovered = false\n\t\tthis.paused$.next(false)\n\t}\n\n\tpublic async close() {\n\t\tif (this.closing) return\n\t\tthis.closing = true\n\t\tthis.visible = false\n\n\t\tawait this.animate(\n\t\t\t[\n\t\t\t\t{ transform: 'translateX(0) scale(1)', opacity: 1 },\n\t\t\t\t{ transform: 'translateX(20px) scale(0.98)', opacity: 0 },\n\t\t\t],\n\t\t\t{\n\t\t\t\tduration: 180,\n\t\t\t\teasing: 'cubic-bezier(0.4, 0, 1, 1)',\n\t\t\t\tfill: 'forwards',\n\t\t\t},\n\t\t).finished\n\n\t\tthis.dispatchEvent(\n\t\t\tnew CustomEvent('close', {\n\t\t\t\tdetail: { id: this.id },\n\t\t\t\tbubbles: true,\n\t\t\t\tcomposed: true,\n\t\t\t}),\n\t\t)\n\t}\n\n\tprivate getTypeLabel(): string {\n\t\tswitch (this.type) {\n\t\t\tcase 'success':\n\t\t\t\treturn 'SUCCESS'\n\t\t\tcase 'warning':\n\t\t\t\treturn 'WARNING'\n\t\t\tcase 'error':\n\t\t\t\treturn 'ERROR'\n\t\t\tdefault:\n\t\t\t\treturn 'INFO'\n\t\t}\n\t}\n\n\trender() {\n\t\tif (!this.visible && this.closing) return html``\n\n\t\treturn html`\n\t\t\t<div\n\t\t\t\tclass=\"notification ${this.type} ${this.closing ? 'closing' : ''} ${this.hovered ? 'hovered' : ''}\"\n\t\t\t\trole=\"alert\"\n\t\t\t\t@mouseenter=${this.handleMouseEnter}\n\t\t\t\t@mouseleave=${this.handleMouseLeave}\n\t\t\t>\n\t\t\t\t${this.showProgress || this.duration > 0\n\t\t\t\t\t? html`<schmancy-progress\n\t\t\t\t\t\t\tclass=\"progress\"\n\t\t\t\t\t\t\tsize=\"xs\"\n\t\t\t\t\t\t\t.value=${this.progress}\n\t\t\t\t\t\t\t?indeterminate=${this.showProgress && this.duration === 0}\n\t\t\t\t\t\t></schmancy-progress>`\n\t\t\t\t\t: ''}\n\t\t\t\t<div class=\"accent-rail\"></div>\n\t\t\t\t<div class=\"content\">\n\t\t\t\t\t<span class=\"type-tag\">${this.getTypeLabel()}</span>\n\t\t\t\t\t${this.title ? html`<div class=\"title\">${this.title}</div>` : ''}\n\t\t\t\t\t<div class=\"message\">${this.message}</div>\n\t\t\t\t</div>\n\t\t\t\t${this.closable\n\t\t\t\t\t? html`\n\t\t\t\t\t\t\t<button class=\"close\" aria-label=\"Close notification\" @click=${this.close}>&#215;</button>\n\t\t\t\t\t\t`\n\t\t\t\t\t: ''}\n\t\t\t</div>\n\t\t`\n\t}\n}\n\ndeclare global {\n\tinterface HTMLElementTagNameMap {\n\t\t'sch-notification': SchmancyNotification\n\t}\n}\n","import { fromEvent } from 'rxjs'\nimport { $sounds, type Feeling } from '../audio'\nimport SchmancyNotification, { NotificationType } from './notification'\n\nexport interface NotificationOptions {\n\tid?: string\n\ttitle?: string\n\tmessage: string\n\ttype?: NotificationType\n\tduration?: number\n\tclosable?: boolean\n\tplaySound?: boolean\n\tshowProgress?: boolean\n}\n\nconst typeToFeeling: Record<NotificationType, Feeling> = {\n\tinfo: 'curious',\n\tsuccess: 'content',\n\twarning: 'anxious',\n\terror: 'disappointed',\n}\n\nconst typeDurations: Record<NotificationType, number> = {\n\tsuccess: 1500,\n\tinfo: 2000,\n\twarning: 2500,\n\terror: 2500,\n}\n\n$sounds.setVolume(0.1)\n\n// Track last mouse position via RxJS\nlet lastClickPosition = { x: window.innerWidth - 100, y: 50 }\nif (typeof window !== 'undefined') {\n\tfromEvent<MouseEvent>(window, 'mousedown', { capture: true, passive: true } as AddEventListenerOptions).subscribe(\n\t\te => {\n\t\t\tlastClickPosition = { x: e.clientX, y: e.clientY }\n\t\t},\n\t)\n}\n\nlet currentNotification: SchmancyNotification | null = null\nconst notificationStack: string[] = []\n\nfunction show(options: NotificationOptions): string {\n\tconst id = options.id ?? `notification-${Date.now()}-${Math.floor(Math.random() * 10000)}`\n\tnotificationStack.push(id)\n\n\tif (currentNotification) {\n\t\tcurrentNotification.remove()\n\t\tcurrentNotification = null\n\t}\n\n\tconst notification = document.createElement('sch-notification') as SchmancyNotification\n\tnotification.id = id\n\tnotification.title = options.title ?? ''\n\tnotification.message = options.message\n\tnotification.type = options.type ?? 'info'\n\tnotification.duration = options.duration ?? 1000\n\tnotification.closable = options.closable !== false\n\tnotification.playSound = false\n\tnotification.showProgress = options.showProgress ?? false\n\tnotification.startPosition = { ...lastClickPosition }\n\n\tif (options.playSound !== false) {\n\t\t$sounds.play(typeToFeeling[notification.type])\n\t}\n\n\tfromEvent(notification, 'close').subscribe(() => {\n\t\tconst index = notificationStack.indexOf(id)\n\t\tif (index > -1) notificationStack.splice(index, 1)\n\t\tnotification.remove()\n\t\tif (currentNotification === notification) currentNotification = null\n\t})\n\n\tdocument.body.appendChild(notification)\n\tcurrentNotification = notification\n\treturn id\n}\n\n/**\n * Global notification (toast) utility. Fire-and-forget API for success,\n * error, info, and warning toasts, plus a low-level `show` for custom\n * notifications.\n *\n * @service\n * @summary Toast notifications — success, error, info, warning.\n * @method show(options: NotificationOptions) - Low-level; show any NotificationOptions.\n * @method success(message, options?) - Green success toast.\n * @method error(message, options?) - Red error toast.\n * @method info(message, options?) - Blue informational toast.\n * @method warning(message, options?) - Amber warning toast.\n */\nexport const $notify = {\n\tshow,\n\n\tinfo: (message?: string, options: Partial<Omit<NotificationOptions, 'message' | 'type'>> = {}): string =>\n\t\tshow({\n\t\t\tmessage: message ?? '',\n\t\t\ttype: 'info',\n\t\t\tduration: message ? (options.duration ?? typeDurations.info) : 1,\n\t\t\t...options,\n\t\t}),\n\n\tsuccess: (message?: string, options: Partial<Omit<NotificationOptions, 'message' | 'type'>> = {}): string =>\n\t\tshow({\n\t\t\tmessage: message ?? '',\n\t\t\ttype: 'success',\n\t\t\tduration: message ? (options.duration ?? typeDurations.success) : 1,\n\t\t\t...options,\n\t\t}),\n\n\twarning: (message?: string, options: Partial<Omit<NotificationOptions, 'message' | 'type'>> = {}): string =>\n\t\tshow({\n\t\t\tmessage: message ?? '',\n\t\t\ttype: 'warning',\n\t\t\tduration: message ? (options.duration ?? typeDurations.warning) : 1,\n\t\t\t...options,\n\t\t}),\n\n\terror: (message?: string, options: Partial<Omit<NotificationOptions, 'message' | 'type'>> = {}): string =>\n\t\tshow({\n\t\t\tmessage: message ?? '',\n\t\t\ttype: 'error',\n\t\t\tduration: message ? (options.duration ?? typeDurations.error) : 1,\n\t\t\t...options,\n\t\t}),\n\n\tcustomDuration: (\n\t\tmessage: string,\n\t\tduration: number,\n\t\toptions: Partial<Omit<NotificationOptions, 'message' | 'duration'>> = {},\n\t): string => show({ message, duration, ...options }),\n\n\tpersistent: (message: string, options: Partial<Omit<NotificationOptions, 'message' | 'duration'>> = {}): string =>\n\t\tshow({ message, duration: 0, ...options }),\n\n\tdismiss: (id?: string): void => {\n\t\tconst targetId = id ? (notificationStack.splice(notificationStack.indexOf(id), 1)[0]) : notificationStack.pop()\n\t\tif (targetId && currentNotification?.id === targetId) currentNotification.close()\n\t},\n\n\tupdate: (id: string, options: Partial<NotificationOptions>): void => {\n\t\tif (currentNotification?.id !== id) return\n\t\tif (options.title !== undefined) currentNotification.title = options.title\n\t\tif (options.message !== undefined) currentNotification.message = options.message\n\t\tif (options.type !== undefined) currentNotification.type = options.type\n\t},\n}\n\n","import { Observable, tap, finalize, catchError } from 'rxjs'\r\nimport { $notify, NotificationOptions } from './notification-service'\r\n\r\nexport interface NotifyOptions {\r\n\t/**\r\n\t * Message to show while the operation is in progress\r\n\t */\r\n\tloadingMessage?: string\r\n\t/**\r\n\t * Message to show when the operation completes successfully\r\n\t */\r\n\tsuccessMessage?: string\r\n\t/**\r\n\t * Message to show when the operation fails (can be a function to format error)\r\n\t */\r\n\terrorMessage?: string | ((error: any) => string)\r\n\t/**\r\n\t * Type of notification for loading state\r\n\t */\r\n\tloadingType?: NotificationOptions['type']\r\n\t/**\r\n\t * Type of notification for success state\r\n\t */\r\n\tsuccessType?: NotificationOptions['type']\r\n\t/**\r\n\t * Type of notification for error state\r\n\t */\r\n\terrorType?: NotificationOptions['type']\r\n\t/**\r\n\t * Whether to auto-dismiss the loading notification on complete/error\r\n\t */\r\n\tautoDismissLoading?: boolean\r\n\t/**\r\n\t * Duration for success notification (ms). Use 0 for persistent\r\n\t */\r\n\tsuccessDuration?: number\r\n\t/**\r\n\t * Duration for error notification (ms). Use 0 for persistent\r\n\t */\r\n\terrorDuration?: number\r\n}\r\n\r\n/**\r\n * Wraps an Observable with notification lifecycle management.\r\n * Shows a loading notification with progress indicator, then auto-dismisses and shows success/error notification.\r\n * \r\n * @example\r\n * ```typescript\r\n * // Basic usage with progress indicator\r\n * someApiCall().pipe(\r\n * notify({\r\n * loadingMessage: 'Loading data...',\r\n * successMessage: 'Data loaded successfully!',\r\n * errorMessage: 'Failed to load data'\r\n * })\r\n * ).subscribe()\r\n * \r\n * // With custom durations\r\n * saveData().pipe(\r\n * notify({\r\n * loadingMessage: 'Saving...',\r\n * successMessage: 'Saved!',\r\n * successDuration: 5000, // Success stays for 5 seconds\r\n * errorMessage: (err) => `Save failed: ${err.message}`,\r\n * errorDuration: 0 // Error is persistent until dismissed\r\n * })\r\n * ).subscribe()\r\n * \r\n * // Full configuration example\r\n * uploadFile().pipe(\r\n * notify({\r\n * loadingMessage: 'Uploading file...',\r\n * loadingType: 'info',\r\n * successMessage: 'Upload complete!',\r\n * successType: 'success',\r\n * successDuration: 3000,\r\n * errorMessage: (err) => `Upload failed: ${err.message}`,\r\n * errorType: 'error',\r\n * errorDuration: 10000,\r\n * autoDismissLoading: true\r\n * })\r\n * ).subscribe()\r\n * ```\r\n */\r\nexport function notify<T>(options: NotifyOptions) {\r\n\treturn (source: Observable<T>): Observable<T> => {\r\n\t\tlet loadingNotificationId: string | undefined\r\n\r\n\t\t// Show loading notification if message provided\r\n\t\tif (options.loadingMessage) {\r\n\t\t\tloadingNotificationId = $notify.show({\r\n\t\t\t\tmessage: options.loadingMessage,\r\n\t\t\t\ttype: options.loadingType || 'info',\r\n\t\t\t\tduration: 0, // Persistent until dismissed\r\n\t\t\t\tshowProgress: true, // Show indeterminate progress by default\r\n\t\t\t})\r\n\t\t}\r\n\r\n\t\treturn source.pipe(\r\n\t\t\ttap((value) => {\r\n\t\t\t\t// Check if the emitted value contains progress information\r\n\t\t\t\t// Common patterns: { progress: number }, { loaded: number, total: number }, etc.\r\n\t\t\t\tif (loadingNotificationId && typeof value === 'object' && value !== null) {\r\n\t\t\t\t\tlet progress: number | undefined\r\n\t\t\t\t\t\r\n\t\t\t\t\t// Check for different progress patterns\r\n\t\t\t\t\tif ('progress' in value && typeof (value as any).progress === 'number') {\r\n\t\t\t\t\t\tprogress = (value as any).progress\r\n\t\t\t\t\t} else if ('loaded' in value && 'total' in value) {\r\n\t\t\t\t\t\tconst loaded = (value as any).loaded\r\n\t\t\t\t\t\tconst total = (value as any).total\r\n\t\t\t\t\t\tif (typeof loaded === 'number' && typeof total === 'number' && total > 0) {\r\n\t\t\t\t\t\t\tprogress = (loaded / total) * 100\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t}\r\n\t\t\t\t\t\r\n\t\t\t\t\t// Update notification with progress if available\r\n\t\t\t\t\tif (progress !== undefined) {\r\n\t\t\t\t\t\t// We need to update the progress of the notification\r\n\t\t\t\t\t\t// For now, we'll update the message to show progress percentage\r\n\t\t\t\t\t\t$notify.update?.(loadingNotificationId, {\r\n\t\t\t\t\t\t\tmessage: `${options.loadingMessage} (${Math.round(progress)}%)`,\r\n\t\t\t\t\t\t})\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\t\t\t\t\r\n\t\t\t\t// Check if this is the final success emission (not a progress update)\r\n\t\t\t\t// Typically file uploads emit progress events then a final result\r\n\t\t\t\tconst isProgressUpdate = typeof value === 'object' && value !== null && \r\n\t\t\t\t\t('progress' in value || ('loaded' in value && 'total' in value))\r\n\t\t\t\t\r\n\t\t\t\tif (!isProgressUpdate) {\r\n\t\t\t\t\t// On successful final emission, dismiss loading and show success\r\n\t\t\t\t\tif (loadingNotificationId && options.autoDismissLoading !== false) {\r\n\t\t\t\t\t\t$notify.dismiss(loadingNotificationId)\r\n\t\t\t\t\t\tloadingNotificationId = undefined\r\n\t\t\t\t\t}\r\n\r\n\t\t\t\t\tif (options.successMessage) {\r\n\t\t\t\t\t\t$notify.show({\r\n\t\t\t\t\t\t\tmessage: options.successMessage,\r\n\t\t\t\t\t\t\ttype: options.successType || 'success',\r\n\t\t\t\t\t\t\tduration: options.successDuration ?? 2000,\r\n\t\t\t\t\t\t})\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\t\t\t}),\r\n\t\t\tcatchError((error) => {\r\n\t\t\t\t// On error, dismiss loading and show error\r\n\t\t\t\tif (loadingNotificationId && options.autoDismissLoading !== false) {\r\n\t\t\t\t\t$notify.dismiss(loadingNotificationId)\r\n\t\t\t\t\tloadingNotificationId = undefined\r\n\t\t\t\t}\r\n\r\n\t\t\t\tif (options.errorMessage) {\r\n\t\t\t\t\tconst message = typeof options.errorMessage === 'function' \r\n\t\t\t\t\t\t? options.errorMessage(error)\r\n\t\t\t\t\t\t: options.errorMessage\r\n\t\t\t\t\t\r\n\t\t\t\t\t$notify.show({\r\n\t\t\t\t\t\tmessage,\r\n\t\t\t\t\t\ttype: options.errorType || 'error',\r\n\t\t\t\t\t\tduration: options.errorDuration ?? 3000,\r\n\t\t\t\t\t})\r\n\t\t\t\t}\r\n\r\n\t\t\t\t// Re-throw the error to maintain the error flow\r\n\t\t\t\tthrow error\r\n\t\t\t}),\r\n\t\t\tfinalize(() => {\r\n\t\t\t\t// Clean up any remaining loading notification\r\n\t\t\t\tif (loadingNotificationId && options.autoDismissLoading !== false) {\r\n\t\t\t\t\t$notify.dismiss(loadingNotificationId)\r\n\t\t\t\t}\r\n\t\t\t})\r\n\t\t)\r\n\t}\r\n}\r\n\r\n/**\r\n * Simplified version for API calls that just need loading and auto-dismiss.\r\n * Perfect for fire-and-forget operations where you want to show progress.\r\n * \r\n * @example\r\n * ```typescript\r\n * downloadData().pipe(\r\n * notifyProgress('Downloading...')\r\n * ).subscribe()\r\n * \r\n * // With custom messages\r\n * saveDocument().pipe(\r\n * notifyProgress('Saving document...', 'Document saved!', 'Save failed')\r\n * ).subscribe()\r\n * ```\r\n */\r\nexport function notifyProgress<T>(\r\n\tloadingMessage: string,\r\n\tsuccessMessage?: string,\r\n\terrorMessage?: string\r\n) {\r\n\treturn notify<T>({\r\n\t\tloadingMessage,\r\n\t\tsuccessMessage: successMessage || undefined,\r\n\t\terrorMessage: errorMessage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AAY,IAAS,IAAS;IAEhC;IAAA,AAGI,MAHJ,KAGiB,KAGhB,EAAQ,SAAS,GAAuB,EACvC,SAAS,GAAG,EAAQ,eAAA,IAAmB,KAAK,MAAM,CAAA,EAAA,IAAA,CAAA;GAGrD;GAI0C,AAAA,OAAV,KAAU,YAAY,MACpD,cAAc,KAAU,YAAY,KAAS,WAAW,OAIrD,KAAA,CAAwD,MAA/B,EAAQ,uBACpC,EAAQ,QAAQ,CAAA,GAChB,IAAA,KAAwB,IAGrB,EAAQ,kBACX,EAAQ,KAAK;IACZ,SAAS,EAAQ;IACjB,MAAM,EAAQ,eAAe;IAC7B,UAAU,EAAQ,mBAAmB;GAAA,CAAA;EAAA,CAAA,GAKzC,GAAY,MAAA;GAOX,IALI,KAAA,CAAwD,MAA/B,EAAQ,uBACpC,EAAQ,QAAQ,CAAA,GAChB,IAAA,KAAwB,IAGrB,EAAQ,cAAc;IACzB,IAAM,IAA0C,OAAzB,EAAQ,gBAAiB,aAC7C,EAAQ,aAAa,CAAA,IACrB,EAAQ;IAEX,EAAQ,KAAK;KACZ,SAAA;KACA,MAAM,EAAQ,aAAa;KAC3B,UAAU,EAAQ,iBAAiB;IAAA,CAAA;GAErC;GAGA,MAAM;EAAA,CAAA,GAEP,QAAA;GAEK,KAAA,CAAwD,MAA/B,EAAQ,sBACpC,EAAQ,QAAQ,CAAA;EAAA,CAAA,CAAA;CAAA;AAKrB;AAkBA,SAAgB,EACf,GACA,GACA,GAAA;CAEA,OAAO,EAAU;EAChB,gBAAA;EACA,gBAAgB,KAAA,KAAkB;EAClC,cAAc,KAAA,KAAgB;EAC9B,oBAAA,CAAoB;CAAA,CAAA;AAEtB;AAAA,SAAA,KAAA,GAAA,KAAA,GAAA,KAAA,GAAA,KAAA"}
@@ -1 +0,0 @@
1
- {"version":3,"file":"notification-FBf3Mb2e.cjs","names":["#playSound"],"sources":["../src/notification/notification.scss?inline","../src/notification/notification.ts","../src/notification/notification-service.ts","../src/notification/notify.ts"],"sourcesContent":[":host {\n\tdisplay: block;\n}\n\n.notification {\n\tposition: relative;\n\tdisplay: flex;\n\talign-items: stretch;\n\tmax-width: 360px;\n\toverflow: hidden;\n\n\t/* Asymmetric radius: 4px left, 14px right */\n\tborder-radius: 4px 14px 14px 4px;\n\toutline: 1px solid color-mix(in srgb, var(--schmancy-sys-color-outline-variant) 50%, transparent);\n\n\tbackground: linear-gradient(\n\t\t180deg,\n\t\tcolor-mix(in srgb, var(--schmancy-sys-color-surface-container) 100%, transparent),\n\t\tcolor-mix(in srgb, var(--schmancy-sys-color-surface-containerHigh) 100%, transparent)\n\t);\n\n\tcolor: var(--schmancy-sys-color-surface-on);\n\n\t/* Type-colored luminous glow — tightened */\n\t--notification-glow-color: var(--schmancy-sys-color-primary-default);\n\tbox-shadow:\n\t\t0 6px 28px -10px color-mix(in srgb, var(--notification-glow-color) 22%, transparent),\n\t\t0 1px 0 0 color-mix(in srgb, var(--schmancy-sys-color-outline-variant) 30%, transparent);\n\n\ttransition:\n\t\tbox-shadow 300ms ease,\n\t\ttransform 300ms cubic-bezier(0.34, 1.56, 0.64, 1);\n\n\t&.info {\n\t\t--notification-glow-color: var(--schmancy-sys-color-primary-default);\n\t\t--notification-accent: var(--schmancy-sys-color-primary-default);\n\t}\n\t&.success {\n\t\t--notification-glow-color: var(--schmancy-sys-color-success-default);\n\t\t--notification-accent: var(--schmancy-sys-color-success-default);\n\t}\n\t&.warning {\n\t\t--notification-glow-color: var(--schmancy-sys-color-tertiary-default);\n\t\t--notification-accent: var(--schmancy-sys-color-tertiary-default);\n\t}\n\t&.error {\n\t\t--notification-glow-color: var(--schmancy-sys-color-error-default);\n\t\t--notification-accent: var(--schmancy-sys-color-error-default);\n\t}\n\n\t&.hovered {\n\t\tbox-shadow:\n\t\t\t0 10px 36px -8px color-mix(in srgb, var(--notification-glow-color) 34%, transparent),\n\t\t\t0 1px 0 0 color-mix(in srgb, var(--schmancy-sys-color-outline-variant) 30%, transparent);\n\t\ttransform: translateY(-2px);\n\n\t\t.accent-rail {\n\t\t\twidth: 4px;\n\t\t}\n\t}\n\n\t@media (prefers-reduced-motion: reduce) {\n\t\ttransition: box-shadow 200ms ease;\n\n\t\t&.hovered {\n\t\t\ttransform: none;\n\t\t}\n\t}\n}\n\n/* Vertical accent rail — left edge */\n.accent-rail {\n\tflex-shrink: 0;\n\twidth: 3px;\n\tbackground: var(--notification-accent, var(--schmancy-sys-color-primary-default));\n\tborder-radius: 4px 0 0 4px;\n\ttransition: width 200ms ease;\n\talign-self: stretch;\n}\n\n/* Card body */\n.content {\n\tflex: 1;\n\tmin-width: 0;\n\tpadding: 14px 36px 14px 18px;\n}\n\n/* Monospace uppercase type tag */\n.type-tag {\n\tdisplay: block;\n\tfont-family: ui-monospace, 'Cascadia Code', 'Source Code Pro', Menlo, Consolas, monospace;\n\tfont-size: 10px;\n\tletter-spacing: 0.14em;\n\ttext-transform: uppercase;\n\topacity: 0.7;\n\tcolor: var(--notification-accent, var(--schmancy-sys-color-primary-default));\n\tmargin-bottom: 4px;\n\tline-height: 1;\n}\n\n/* Serif display title */\n.title {\n\tfont-family: ui-serif, Georgia, Cambria, 'Times New Roman', serif;\n\tfont-weight: 500;\n\tfont-size: 15px;\n\tline-height: 1.3;\n\tmargin-bottom: 3px;\n\tcolor: var(--schmancy-sys-color-surface-on);\n}\n\n/* Body message */\n.message {\n\tfont-family: ui-sans-serif, system-ui, -apple-system, sans-serif;\n\tfont-size: 13px;\n\tline-height: 1.45;\n\topacity: 0.72;\n}\n\n/* Close button — 28×28 hit target, × glyph */\n.close {\n\tposition: absolute;\n\ttop: 6px;\n\tright: 6px;\n\twidth: 28px;\n\theight: 28px;\n\tdisplay: flex;\n\talign-items: center;\n\tjustify-content: center;\n\tbackground: none;\n\tborder: none;\n\tfont-size: 18px;\n\tfont-weight: 400;\n\tcolor: var(--schmancy-sys-color-surface-onVariant);\n\tcursor: pointer;\n\tpadding: 0;\n\tline-height: 1;\n\topacity: 0.4;\n\tborder-radius: 50%;\n\ttransition: opacity 200ms ease;\n\n\t&:hover {\n\t\topacity: 0.85;\n\t}\n\n\t&:focus-visible {\n\t\toutline: none;\n\t\topacity: 1;\n\t\tbox-shadow: 0 0 0 2px var(--notification-accent, var(--schmancy-sys-color-primary-default));\n\t}\n}\n\n/* Progress hairline — top edge */\n.progress {\n\tposition: absolute;\n\ttop: 0;\n\tbottom: auto;\n\tleft: 0;\n\tright: 0;\n}\n","import { SchmancyElement } from '@mixins/index'\nimport { html, unsafeCSS } from 'lit'\nimport { customElement, property, state } from 'lit/decorators.js'\nimport { BehaviorSubject, timer, interval, NEVER } from 'rxjs'\nimport { switchMap, takeUntil, map, tap, distinctUntilChanged } from 'rxjs/operators'\nimport '../progress/progress'\nimport style from './notification.scss?inline'\n\nexport type NotificationType = 'info' | 'success' | 'warning' | 'error'\n\n/**\n * @fires close - When notification is closed\n */\n@customElement('sch-notification')\nexport default class SchmancyNotification extends SchmancyElement {\n\tstatic styles = [unsafeCSS(style)]\n\n\t@property({ type: String }) title = ''\n\t@property({ type: String }) message = ''\n\t@property({ type: String }) type: NotificationType = 'info'\n\t@property({ type: Boolean }) closable = true\n\t@property({ type: Number }) duration = 5000\n\t@property({ type: String }) id = `notification-${Date.now()}-${Math.floor(Math.random() * 10000)}`\n\t@property({ type: Boolean }) playSound = true\n\t@property({ type: Boolean }) showProgress = false\n\t// startPosition retained for API compatibility — not used in entrance animation\n\t@property({ type: Object }) startPosition: { x: number; y: number } = { x: 0, y: 0 }\n\n\t@state() private visible = true\n\t@state() private progress = 100\n\t@state() private hovered = false\n\t@state() private closing = false\n\n\tprivate paused$ = new BehaviorSubject<boolean>(false)\n\tprivate startTime = 0\n\tprivate pausedAt = 0\n\tprivate elapsedBeforePause = 0\n\n\tconnectedCallback() {\n\t\tsuper.connectedCallback()\n\n\t\tthis.style.position = 'fixed'\n\t\tthis.style.top = '16px'\n\t\tthis.style.right = '16px'\n\t\tthis.style.zIndex = '10001'\n\t\tthis.style.opacity = '0'\n\n\t\tthis.updateComplete.then(() => {\n\t\t\tthis.animateIn()\n\t\t\treturn\n\t\t})\n\n\t\tif (this.duration > 0) {\n\t\t\tthis.setupAutoClose()\n\t\t\tthis.setupProgressUpdates()\n\t\t}\n\n\t\tif (this.playSound) {\n\t\t\tthis.#playSound()\n\t\t}\n\t}\n\n\tprivate async animateIn() {\n\t\tconst reduced = window.matchMedia('(prefers-reduced-motion: reduce)').matches\n\t\tawait this.animate(\n\t\t\treduced\n\t\t\t\t? [{ opacity: 0 }, { opacity: 1 }]\n\t\t\t\t: [\n\t\t\t\t\t\t{ transform: 'translateX(40px) scale(0.96)', opacity: 0 },\n\t\t\t\t\t\t{ transform: 'translateX(0) scale(1)', opacity: 1 },\n\t\t\t\t\t],\n\t\t\t{\n\t\t\t\tduration: reduced ? 200 : 360,\n\t\t\t\teasing: 'cubic-bezier(0.22, 1, 0.36, 1)',\n\t\t\t\tfill: 'forwards',\n\t\t\t},\n\t\t).finished\n\t}\n\n\tprivate setupAutoClose() {\n\t\tif (this.duration <= 0) return\n\n\t\tthis.startTime = Date.now()\n\t\tthis.elapsedBeforePause = 0\n\n\t\tthis.paused$\n\t\t\t.pipe(\n\t\t\t\tswitchMap(paused => {\n\t\t\t\t\tif (paused) {\n\t\t\t\t\t\tthis.pausedAt = Date.now()\n\t\t\t\t\t\tthis.elapsedBeforePause += this.pausedAt - this.startTime\n\t\t\t\t\t\treturn NEVER\n\t\t\t\t\t} else {\n\t\t\t\t\t\tthis.startTime = Date.now()\n\t\t\t\t\t\tconst remaining = this.duration - this.elapsedBeforePause\n\t\t\t\t\t\tif (remaining <= 0) {\n\t\t\t\t\t\t\tthis.close()\n\t\t\t\t\t\t\treturn NEVER\n\t\t\t\t\t\t}\n\t\t\t\t\t\treturn timer(remaining)\n\t\t\t\t\t}\n\t\t\t\t}),\n\t\t\t\ttakeUntil(this.disconnecting),\n\t\t\t)\n\t\t\t.subscribe(() => this.close())\n\t}\n\n\tprivate setupProgressUpdates() {\n\t\tif (this.duration <= 0) return\n\n\t\tinterval(16)\n\t\t\t.pipe(\n\t\t\t\tswitchMap(() =>\n\t\t\t\t\tthis.paused$.pipe(\n\t\t\t\t\t\tmap(paused => {\n\t\t\t\t\t\t\tif (paused) return this.progress\n\t\t\t\t\t\t\tconst elapsed = this.elapsedBeforePause + (Date.now() - this.startTime)\n\t\t\t\t\t\t\tconst remaining = Math.max(0, this.duration - elapsed)\n\t\t\t\t\t\t\treturn (remaining / this.duration) * 100\n\t\t\t\t\t\t}),\n\t\t\t\t\t),\n\t\t\t\t),\n\t\t\t\tdistinctUntilChanged(),\n\t\t\t\ttap(progress => {\n\t\t\t\t\tthis.progress = progress\n\t\t\t\t}),\n\t\t\t\ttakeUntil(this.disconnecting),\n\t\t\t)\n\t\t\t.subscribe()\n\t}\n\n\t#playSound() {\n\t\tthis.dispatchEvent(\n\t\t\tnew CustomEvent('playsound', {\n\t\t\t\tdetail: { type: this.type },\n\t\t\t\tbubbles: true,\n\t\t\t\tcomposed: true,\n\t\t\t}),\n\t\t)\n\t}\n\n\tprivate handleMouseEnter() {\n\t\tthis.hovered = true\n\t\tthis.paused$.next(true)\n\t}\n\n\tprivate handleMouseLeave() {\n\t\tthis.hovered = false\n\t\tthis.paused$.next(false)\n\t}\n\n\tpublic async close() {\n\t\tif (this.closing) return\n\t\tthis.closing = true\n\t\tthis.visible = false\n\n\t\tawait this.animate(\n\t\t\t[\n\t\t\t\t{ transform: 'translateX(0) scale(1)', opacity: 1 },\n\t\t\t\t{ transform: 'translateX(20px) scale(0.98)', opacity: 0 },\n\t\t\t],\n\t\t\t{\n\t\t\t\tduration: 180,\n\t\t\t\teasing: 'cubic-bezier(0.4, 0, 1, 1)',\n\t\t\t\tfill: 'forwards',\n\t\t\t},\n\t\t).finished\n\n\t\tthis.dispatchEvent(\n\t\t\tnew CustomEvent('close', {\n\t\t\t\tdetail: { id: this.id },\n\t\t\t\tbubbles: true,\n\t\t\t\tcomposed: true,\n\t\t\t}),\n\t\t)\n\t}\n\n\tprivate getTypeLabel(): string {\n\t\tswitch (this.type) {\n\t\t\tcase 'success':\n\t\t\t\treturn 'SUCCESS'\n\t\t\tcase 'warning':\n\t\t\t\treturn 'WARNING'\n\t\t\tcase 'error':\n\t\t\t\treturn 'ERROR'\n\t\t\tdefault:\n\t\t\t\treturn 'INFO'\n\t\t}\n\t}\n\n\trender() {\n\t\tif (!this.visible && this.closing) return html``\n\n\t\treturn html`\n\t\t\t<div\n\t\t\t\tclass=\"notification ${this.type} ${this.closing ? 'closing' : ''} ${this.hovered ? 'hovered' : ''}\"\n\t\t\t\trole=\"alert\"\n\t\t\t\t@mouseenter=${this.handleMouseEnter}\n\t\t\t\t@mouseleave=${this.handleMouseLeave}\n\t\t\t>\n\t\t\t\t${this.showProgress || this.duration > 0\n\t\t\t\t\t? html`<schmancy-progress\n\t\t\t\t\t\t\tclass=\"progress\"\n\t\t\t\t\t\t\tsize=\"xs\"\n\t\t\t\t\t\t\t.value=${this.progress}\n\t\t\t\t\t\t\t?indeterminate=${this.showProgress && this.duration === 0}\n\t\t\t\t\t\t></schmancy-progress>`\n\t\t\t\t\t: ''}\n\t\t\t\t<div class=\"accent-rail\"></div>\n\t\t\t\t<div class=\"content\">\n\t\t\t\t\t<span class=\"type-tag\">${this.getTypeLabel()}</span>\n\t\t\t\t\t${this.title ? html`<div class=\"title\">${this.title}</div>` : ''}\n\t\t\t\t\t<div class=\"message\">${this.message}</div>\n\t\t\t\t</div>\n\t\t\t\t${this.closable\n\t\t\t\t\t? html`\n\t\t\t\t\t\t\t<button class=\"close\" aria-label=\"Close notification\" @click=${this.close}>&#215;</button>\n\t\t\t\t\t\t`\n\t\t\t\t\t: ''}\n\t\t\t</div>\n\t\t`\n\t}\n}\n\ndeclare global {\n\tinterface HTMLElementTagNameMap {\n\t\t'sch-notification': SchmancyNotification\n\t}\n}\n","import { fromEvent } from 'rxjs'\nimport { $sounds, type Feeling } from '../audio'\nimport SchmancyNotification, { NotificationType } from './notification'\n\nexport interface NotificationOptions {\n\tid?: string\n\ttitle?: string\n\tmessage: string\n\ttype?: NotificationType\n\tduration?: number\n\tclosable?: boolean\n\tplaySound?: boolean\n\tshowProgress?: boolean\n}\n\nconst typeToFeeling: Record<NotificationType, Feeling> = {\n\tinfo: 'curious',\n\tsuccess: 'content',\n\twarning: 'anxious',\n\terror: 'disappointed',\n}\n\nconst typeDurations: Record<NotificationType, number> = {\n\tsuccess: 1500,\n\tinfo: 2000,\n\twarning: 2500,\n\terror: 2500,\n}\n\n$sounds.setVolume(0.1)\n\n// Track last mouse position via RxJS\nlet lastClickPosition = { x: window.innerWidth - 100, y: 50 }\nif (typeof window !== 'undefined') {\n\tfromEvent<MouseEvent>(window, 'mousedown', { capture: true, passive: true } as AddEventListenerOptions).subscribe(\n\t\te => {\n\t\t\tlastClickPosition = { x: e.clientX, y: e.clientY }\n\t\t},\n\t)\n}\n\nlet currentNotification: SchmancyNotification | null = null\nconst notificationStack: string[] = []\n\nfunction show(options: NotificationOptions): string {\n\tconst id = options.id ?? `notification-${Date.now()}-${Math.floor(Math.random() * 10000)}`\n\tnotificationStack.push(id)\n\n\tif (currentNotification) {\n\t\tcurrentNotification.remove()\n\t\tcurrentNotification = null\n\t}\n\n\tconst notification = document.createElement('sch-notification') as SchmancyNotification\n\tnotification.id = id\n\tnotification.title = options.title ?? ''\n\tnotification.message = options.message\n\tnotification.type = options.type ?? 'info'\n\tnotification.duration = options.duration ?? 1000\n\tnotification.closable = options.closable !== false\n\tnotification.playSound = false\n\tnotification.showProgress = options.showProgress ?? false\n\tnotification.startPosition = { ...lastClickPosition }\n\n\tif (options.playSound !== false) {\n\t\t$sounds.play(typeToFeeling[notification.type])\n\t}\n\n\tfromEvent(notification, 'close').subscribe(() => {\n\t\tconst index = notificationStack.indexOf(id)\n\t\tif (index > -1) notificationStack.splice(index, 1)\n\t\tnotification.remove()\n\t\tif (currentNotification === notification) currentNotification = null\n\t})\n\n\tdocument.body.appendChild(notification)\n\tcurrentNotification = notification\n\treturn id\n}\n\n/**\n * Global notification (toast) utility. Fire-and-forget API for success,\n * error, info, and warning toasts, plus a low-level `show` for custom\n * notifications.\n *\n * @service\n * @summary Toast notifications — success, error, info, warning.\n * @method show(options: NotificationOptions) - Low-level; show any NotificationOptions.\n * @method success(message, options?) - Green success toast.\n * @method error(message, options?) - Red error toast.\n * @method info(message, options?) - Blue informational toast.\n * @method warning(message, options?) - Amber warning toast.\n */\nexport const $notify = {\n\tshow,\n\n\tinfo: (message?: string, options: Partial<Omit<NotificationOptions, 'message' | 'type'>> = {}): string =>\n\t\tshow({\n\t\t\tmessage: message ?? '',\n\t\t\ttype: 'info',\n\t\t\tduration: message ? (options.duration ?? typeDurations.info) : 1,\n\t\t\t...options,\n\t\t}),\n\n\tsuccess: (message?: string, options: Partial<Omit<NotificationOptions, 'message' | 'type'>> = {}): string =>\n\t\tshow({\n\t\t\tmessage: message ?? '',\n\t\t\ttype: 'success',\n\t\t\tduration: message ? (options.duration ?? typeDurations.success) : 1,\n\t\t\t...options,\n\t\t}),\n\n\twarning: (message?: string, options: Partial<Omit<NotificationOptions, 'message' | 'type'>> = {}): string =>\n\t\tshow({\n\t\t\tmessage: message ?? '',\n\t\t\ttype: 'warning',\n\t\t\tduration: message ? (options.duration ?? typeDurations.warning) : 1,\n\t\t\t...options,\n\t\t}),\n\n\terror: (message?: string, options: Partial<Omit<NotificationOptions, 'message' | 'type'>> = {}): string =>\n\t\tshow({\n\t\t\tmessage: message ?? '',\n\t\t\ttype: 'error',\n\t\t\tduration: message ? (options.duration ?? typeDurations.error) : 1,\n\t\t\t...options,\n\t\t}),\n\n\tcustomDuration: (\n\t\tmessage: string,\n\t\tduration: number,\n\t\toptions: Partial<Omit<NotificationOptions, 'message' | 'duration'>> = {},\n\t): string => show({ message, duration, ...options }),\n\n\tpersistent: (message: string, options: Partial<Omit<NotificationOptions, 'message' | 'duration'>> = {}): string =>\n\t\tshow({ message, duration: 0, ...options }),\n\n\tdismiss: (id?: string): void => {\n\t\tconst targetId = id ? (notificationStack.splice(notificationStack.indexOf(id), 1)[0]) : notificationStack.pop()\n\t\tif (targetId && currentNotification?.id === targetId) currentNotification.close()\n\t},\n\n\tupdate: (id: string, options: Partial<NotificationOptions>): void => {\n\t\tif (currentNotification?.id !== id) return\n\t\tif (options.title !== undefined) currentNotification.title = options.title\n\t\tif (options.message !== undefined) currentNotification.message = options.message\n\t\tif (options.type !== undefined) currentNotification.type = options.type\n\t},\n}\n\n","import { Observable, tap, finalize, catchError } from 'rxjs'\r\nimport { $notify, NotificationOptions } from './notification-service'\r\n\r\nexport interface NotifyOptions {\r\n\t/**\r\n\t * Message to show while the operation is in progress\r\n\t */\r\n\tloadingMessage?: string\r\n\t/**\r\n\t * Message to show when the operation completes successfully\r\n\t */\r\n\tsuccessMessage?: string\r\n\t/**\r\n\t * Message to show when the operation fails (can be a function to format error)\r\n\t */\r\n\terrorMessage?: string | ((error: any) => string)\r\n\t/**\r\n\t * Type of notification for loading state\r\n\t */\r\n\tloadingType?: NotificationOptions['type']\r\n\t/**\r\n\t * Type of notification for success state\r\n\t */\r\n\tsuccessType?: NotificationOptions['type']\r\n\t/**\r\n\t * Type of notification for error state\r\n\t */\r\n\terrorType?: NotificationOptions['type']\r\n\t/**\r\n\t * Whether to auto-dismiss the loading notification on complete/error\r\n\t */\r\n\tautoDismissLoading?: boolean\r\n\t/**\r\n\t * Duration for success notification (ms). Use 0 for persistent\r\n\t */\r\n\tsuccessDuration?: number\r\n\t/**\r\n\t * Duration for error notification (ms). Use 0 for persistent\r\n\t */\r\n\terrorDuration?: number\r\n}\r\n\r\n/**\r\n * Wraps an Observable with notification lifecycle management.\r\n * Shows a loading notification with progress indicator, then auto-dismisses and shows success/error notification.\r\n * \r\n * @example\r\n * ```typescript\r\n * // Basic usage with progress indicator\r\n * someApiCall().pipe(\r\n * notify({\r\n * loadingMessage: 'Loading data...',\r\n * successMessage: 'Data loaded successfully!',\r\n * errorMessage: 'Failed to load data'\r\n * })\r\n * ).subscribe()\r\n * \r\n * // With custom durations\r\n * saveData().pipe(\r\n * notify({\r\n * loadingMessage: 'Saving...',\r\n * successMessage: 'Saved!',\r\n * successDuration: 5000, // Success stays for 5 seconds\r\n * errorMessage: (err) => `Save failed: ${err.message}`,\r\n * errorDuration: 0 // Error is persistent until dismissed\r\n * })\r\n * ).subscribe()\r\n * \r\n * // Full configuration example\r\n * uploadFile().pipe(\r\n * notify({\r\n * loadingMessage: 'Uploading file...',\r\n * loadingType: 'info',\r\n * successMessage: 'Upload complete!',\r\n * successType: 'success',\r\n * successDuration: 3000,\r\n * errorMessage: (err) => `Upload failed: ${err.message}`,\r\n * errorType: 'error',\r\n * errorDuration: 10000,\r\n * autoDismissLoading: true\r\n * })\r\n * ).subscribe()\r\n * ```\r\n */\r\nexport function notify<T>(options: NotifyOptions) {\r\n\treturn (source: Observable<T>): Observable<T> => {\r\n\t\tlet loadingNotificationId: string | undefined\r\n\r\n\t\t// Show loading notification if message provided\r\n\t\tif (options.loadingMessage) {\r\n\t\t\tloadingNotificationId = $notify.show({\r\n\t\t\t\tmessage: options.loadingMessage,\r\n\t\t\t\ttype: options.loadingType || 'info',\r\n\t\t\t\tduration: 0, // Persistent until dismissed\r\n\t\t\t\tshowProgress: true, // Show indeterminate progress by default\r\n\t\t\t})\r\n\t\t}\r\n\r\n\t\treturn source.pipe(\r\n\t\t\ttap((value) => {\r\n\t\t\t\t// Check if the emitted value contains progress information\r\n\t\t\t\t// Common patterns: { progress: number }, { loaded: number, total: number }, etc.\r\n\t\t\t\tif (loadingNotificationId && typeof value === 'object' && value !== null) {\r\n\t\t\t\t\tlet progress: number | undefined\r\n\t\t\t\t\t\r\n\t\t\t\t\t// Check for different progress patterns\r\n\t\t\t\t\tif ('progress' in value && typeof (value as any).progress === 'number') {\r\n\t\t\t\t\t\tprogress = (value as any).progress\r\n\t\t\t\t\t} else if ('loaded' in value && 'total' in value) {\r\n\t\t\t\t\t\tconst loaded = (value as any).loaded\r\n\t\t\t\t\t\tconst total = (value as any).total\r\n\t\t\t\t\t\tif (typeof loaded === 'number' && typeof total === 'number' && total > 0) {\r\n\t\t\t\t\t\t\tprogress = (loaded / total) * 100\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t}\r\n\t\t\t\t\t\r\n\t\t\t\t\t// Update notification with progress if available\r\n\t\t\t\t\tif (progress !== undefined) {\r\n\t\t\t\t\t\t// We need to update the progress of the notification\r\n\t\t\t\t\t\t// For now, we'll update the message to show progress percentage\r\n\t\t\t\t\t\t$notify.update?.(loadingNotificationId, {\r\n\t\t\t\t\t\t\tmessage: `${options.loadingMessage} (${Math.round(progress)}%)`,\r\n\t\t\t\t\t\t})\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\t\t\t\t\r\n\t\t\t\t// Check if this is the final success emission (not a progress update)\r\n\t\t\t\t// Typically file uploads emit progress events then a final result\r\n\t\t\t\tconst isProgressUpdate = typeof value === 'object' && value !== null && \r\n\t\t\t\t\t('progress' in value || ('loaded' in value && 'total' in value))\r\n\t\t\t\t\r\n\t\t\t\tif (!isProgressUpdate) {\r\n\t\t\t\t\t// On successful final emission, dismiss loading and show success\r\n\t\t\t\t\tif (loadingNotificationId && options.autoDismissLoading !== false) {\r\n\t\t\t\t\t\t$notify.dismiss(loadingNotificationId)\r\n\t\t\t\t\t\tloadingNotificationId = undefined\r\n\t\t\t\t\t}\r\n\r\n\t\t\t\t\tif (options.successMessage) {\r\n\t\t\t\t\t\t$notify.show({\r\n\t\t\t\t\t\t\tmessage: options.successMessage,\r\n\t\t\t\t\t\t\ttype: options.successType || 'success',\r\n\t\t\t\t\t\t\tduration: options.successDuration ?? 2000,\r\n\t\t\t\t\t\t})\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\t\t\t}),\r\n\t\t\tcatchError((error) => {\r\n\t\t\t\t// On error, dismiss loading and show error\r\n\t\t\t\tif (loadingNotificationId && options.autoDismissLoading !== false) {\r\n\t\t\t\t\t$notify.dismiss(loadingNotificationId)\r\n\t\t\t\t\tloadingNotificationId = undefined\r\n\t\t\t\t}\r\n\r\n\t\t\t\tif (options.errorMessage) {\r\n\t\t\t\t\tconst message = typeof options.errorMessage === 'function' \r\n\t\t\t\t\t\t? options.errorMessage(error)\r\n\t\t\t\t\t\t: options.errorMessage\r\n\t\t\t\t\t\r\n\t\t\t\t\t$notify.show({\r\n\t\t\t\t\t\tmessage,\r\n\t\t\t\t\t\ttype: options.errorType || 'error',\r\n\t\t\t\t\t\tduration: options.errorDuration ?? 3000,\r\n\t\t\t\t\t})\r\n\t\t\t\t}\r\n\r\n\t\t\t\t// Re-throw the error to maintain the error flow\r\n\t\t\t\tthrow error\r\n\t\t\t}),\r\n\t\t\tfinalize(() => {\r\n\t\t\t\t// Clean up any remaining loading notification\r\n\t\t\t\tif (loadingNotificationId && options.autoDismissLoading !== false) {\r\n\t\t\t\t\t$notify.dismiss(loadingNotificationId)\r\n\t\t\t\t}\r\n\t\t\t})\r\n\t\t)\r\n\t}\r\n}\r\n\r\n/**\r\n * Simplified version for API calls that just need loading and auto-dismiss.\r\n * Perfect for fire-and-forget operations where you want to show progress.\r\n * \r\n * @example\r\n * ```typescript\r\n * downloadData().pipe(\r\n * notifyProgress('Downloading...')\r\n * ).subscribe()\r\n * \r\n * // With custom messages\r\n * saveDocument().pipe(\r\n * notifyProgress('Saving document...', 'Document saved!', 'Save failed')\r\n * ).subscribe()\r\n * ```\r\n */\r\nexport function notifyProgress<T>(\r\n\tloadingMessage: string,\r\n\tsuccessMessage?: string,\r\n\terrorMessage?: string\r\n) {\r\n\treturn notify<T>({\r\n\t\tloadingMessage,\r\n\t\tsuccessMessage: successMessage || undefined,\r\n\t\terrorMessage: errorMessage || undefined,\r\n\t\tautoDismissLoading: true,\r\n\t})\r\n}"],"mappings":"oSCce,EAAA,cAAmC,EAAA,CAAA,CAAA,YAAA,GAAA,EAAA,CAAA,MAAA,GAAA,CAAA,EAAA,KAAA,MAGb,GAAA,KAAA,QACE,GAAA,KAAA,KACe,OAAA,KAAA,SAAA,CACb,EA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AAc,GAAA,IAAgB,GAC9B,mBAAA,CAAoB,CAAA,CAAA,CAEtB,CAAA,OAAA,eAAA,QAAA,IAAA,CAAA,WAAA,CAAA,EAAA,IAAA,UAAA,CAAA,OAAA,CAAA,CAAA,CAAA,EAAA,OAAA,eAAA,QAAA,IAAA,CAAA,WAAA,CAAA,EAAA,IAAA,UAAA,CAAA,OAAA,CAAA,CAAA,CAAA,EAAA,OAAA,eAAA,QAAA,IAAA,CAAA,WAAA,CAAA,EAAA,IAAA,UAAA,CAAA,OAAA,CAAA,CAAA,CAAA,EAAA,OAAA,eAAA,QAAA,IAAA,CAAA,WAAA,CAAA,EAAA,IAAA,UAAA,CAAA,OAAA,CAAA,CAAA,CAAA"}
@@ -1 +0,0 @@
1
- {"version":3,"file":"option-Ct0lGdH3.js","names":[],"sources":["../src/option/option.ts"],"sourcesContent":["import { SchmancyElement } from '@mixins/index'\nimport { css, html } from 'lit'\nimport { customElement, property } from 'lit/decorators.js'\nimport { fromEvent, takeUntil } from 'rxjs'\n\n/**\n * `schmancy-option` is an option element for schmancy-select and schmancy-autocomplete components.\n *\n * @fires click - When the option is clicked\n */\n@customElement('schmancy-option')\nexport default class SchmancyOption extends SchmancyElement {\n\tstatic styles = [css`\n\t:host {\n\t\tdisplay: block;\n\t\tcursor: pointer;\n\t\tuser-select: none;\n\t\toutline: none;\n\t}\n\n\t:host(:focus-visible) {\n\t\toutline: 2px solid var(--schmancy-sys-color-primary-default);\n\t\toutline-offset: -2px;\n\t}\n\n\t:host([hidden]) {\n\t\tdisplay: none;\n\t}\n\n\t:host([disabled]) {\n\t\topacity: 0.5;\n\t\tpointer-events: none;\n\t}\n`];\n\t/**\n\t * The value of the option, will be used when selected.\n\t */\n\t@property({ type: String })\n\tvalue: string = ''\n\n\t/**\n\t * The human-readable label for the option.\n\t */\n\t@property({ type: String })\n\tlabel: string = ''\n\n\t/**\n\t * Whether the option is currently selected.\n\t */\n\t@property({ type: Boolean, reflect: true })\n\tselected: boolean = false\n\n\t/**\n\t * Whether the option is disabled.\n\t */\n\t@property({ type: Boolean, reflect: true })\n\tdisabled: boolean = false\n\n\t/**\n\t * Optional group this option belongs to (for option grouping).\n\t */\n\t@property({ type: String })\n\tgroup: string = ''\n\n\t/**\n\t * Optional icon or image to display before the label.\n\t */\n\t@property({ type: String })\n\ticon: string = ''\n\n\tconnectedCallback() {\n\t\tsuper.connectedCallback()\n\n\t\t// Ensure the option has an ID for accessibility\n\t\tif (!this.id) {\n\t\t\tthis.id = `schmancy-option-${Math.random().toString(36).substring(2, 9)}`\n\t\t}\n\n\t\t// If no label was provided, use the text content or value\n\t\tif (!this.label) {\n\t\t\tthis.label = this.textContent?.trim() || this.value\n\t\t}\n\n\t\t// If value wasn't set but there's text content, use that as the value\n\t\tif (!this.value && this.textContent) {\n\t\t\tthis.value = this.textContent.trim()\n\t\t}\n\n\t\t// Make the option clickable\n\t\tfromEvent<MouseEvent>(this, 'click')\n\t\t\t.pipe(takeUntil(this.disconnecting))\n\t\t\t.subscribe((e) => {\n\t\t\t\te.stopPropagation()\n\t\t\t\tif (this.disabled) return\n\t\t\t\t// Dispatch a custom event with this option's value\n\t\t\t\tthis.dispatchEvent(\n\t\t\t\t\tnew CustomEvent('option-select', {\n\t\t\t\t\t\tbubbles: true,\n\t\t\t\t\t\tcomposed: true,\n\t\t\t\t\t\tdetail: { value: this.value },\n\t\t\t\t\t}),\n\t\t\t\t)\n\t\t\t})\n\n\t\tfromEvent<KeyboardEvent>(this, 'keydown')\n\t\t\t.pipe(takeUntil(this.disconnecting))\n\t\t\t.subscribe((e) => {\n\t\t\t\t// Handle space and enter as clicks\n\t\t\t\tif (e.key === ' ' || e.key === 'Enter') {\n\t\t\t\t\te.preventDefault()\n\t\t\t\t\te.stopPropagation()\n\t\t\t\t\tif (this.disabled) return\n\t\t\t\t\t// Dispatch a custom event with this option's value\n\t\t\t\t\tthis.dispatchEvent(\n\t\t\t\t\t\tnew CustomEvent('option-select', {\n\t\t\t\t\t\t\tbubbles: true,\n\t\t\t\t\t\t\tcomposed: true,\n\t\t\t\t\t\t\tdetail: { value: this.value },\n\t\t\t\t\t\t}),\n\t\t\t\t\t)\n\t\t\t\t}\n\t\t\t})\n\t}\n\n\tdisconnectedCallback() {\n\t\t// Event listeners are automatically cleaned up via takeUntil(this.disconnecting)\n\t\tsuper.disconnectedCallback()\n\t}\n\n\n\trender() {\n\t\tconst classes = {\n\t\t\t'py-2': true,\n\t\t\t'px-3': true,\n\t\t\trounded: true,\n\t\t\t'text-sm': true,\n\t\t\t'w-full': true,\n\t\t\tflex: true,\n\t\t\t'items-center': true,\n\t\t\t'gap-2': true,\n\t\t\t// Selected state\n\t\t\t'bg-primary-container': this.selected,\n\t\t\t'text-primary-onContainer': this.selected,\n\t\t\t// Hover state (when not selected)\n\t\t\t'hover:bg-surface-high': !this.selected,\n\t\t\t// Focus state\n\t\t\t'focus:outline-none': true,\n\t\t}\n\n\t\treturn html`\n\t\t\t<div class=${this.classMap(classes)} role=\"option\" aria-selected=${this.selected} aria-disabled=${this.disabled}>\n\t\t\t\t${this.icon ? html`<span class=\"icon\">${this.icon}</span>` : ''}\n\t\t\t\t<span class=\"flex-1\">${this.label || this.value}</span>\n\t\t\t\t${this.selected\n\t\t\t\t\t? html`\n\t\t\t\t\t\t\t<span class=\"check\">\n\t\t\t\t\t\t\t\t<svg\n\t\t\t\t\t\t\t\t\twidth=\"16\"\n\t\t\t\t\t\t\t\t\theight=\"16\"\n\t\t\t\t\t\t\t\t\tviewBox=\"0 0 24 24\"\n\t\t\t\t\t\t\t\t\tfill=\"none\"\n\t\t\t\t\t\t\t\t\tstroke=\"currentColor\"\n\t\t\t\t\t\t\t\t\tstroke-width=\"2\"\n\t\t\t\t\t\t\t\t\tstroke-linecap=\"round\"\n\t\t\t\t\t\t\t\t\tstroke-linejoin=\"round\"\n\t\t\t\t\t\t\t\t>\n\t\t\t\t\t\t\t\t\t<polyline points=\"20 6 9 17 4 12\"></polyline>\n\t\t\t\t\t\t\t\t</svg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EAAc,iBAAA,CAAA,GAAiB,CAAA"}
@@ -1,43 +0,0 @@
1
- require(`./chunk-CncqDLb2.cjs`);const e=require(`./SchmancyElement-PS1u0j1B.cjs`);require(`./mixins-BoMURWag.cjs`);let t=require(`rxjs`),n=require(`lit/decorators.js`),r=require(`lit`);var i=class extends e.t{constructor(...e){super(...e),this.value=``,this.label=``,this.selected=!1,this.disabled=!1,this.group=``,this.icon=``}static{this.styles=[r.css`
2
- :host {
3
- display: block;
4
- cursor: pointer;
5
- user-select: none;
6
- outline: none;
7
- }
8
-
9
- :host(:focus-visible) {
10
- outline: 2px solid var(--schmancy-sys-color-primary-default);
11
- outline-offset: -2px;
12
- }
13
-
14
- :host([hidden]) {
15
- display: none;
16
- }
17
-
18
- :host([disabled]) {
19
- opacity: 0.5;
20
- pointer-events: none;
21
- }
22
- `]}connectedCallback(){super.connectedCallback(),this.id||=`schmancy-option-${Math.random().toString(36).substring(2,9)}`,this.label||=this.textContent?.trim()||this.value,!this.value&&this.textContent&&(this.value=this.textContent.trim()),(0,t.fromEvent)(this,`click`).pipe((0,t.takeUntil)(this.disconnecting)).subscribe(e=>{e.stopPropagation(),this.disabled||this.dispatchEvent(new CustomEvent(`option-select`,{bubbles:!0,composed:!0,detail:{value:this.value}}))}),(0,t.fromEvent)(this,`keydown`).pipe((0,t.takeUntil)(this.disconnecting)).subscribe(e=>{if(e.key===` `||e.key===`Enter`){if(e.preventDefault(),e.stopPropagation(),this.disabled)return;this.dispatchEvent(new CustomEvent(`option-select`,{bubbles:!0,composed:!0,detail:{value:this.value}}))}})}disconnectedCallback(){super.disconnectedCallback()}render(){let e={"py-2":!0,"px-3":!0,rounded:!0,"text-sm":!0,"w-full":!0,flex:!0,"items-center":!0,"gap-2":!0,"bg-primary-container":this.selected,"text-primary-onContainer":this.selected,"hover:bg-surface-high":!this.selected,"focus:outline-none":!0};return r.html`
23
- <div class=${this.classMap(e)} role="option" aria-selected=${this.selected} aria-disabled=${this.disabled}>
24
- ${this.icon?r.html`<span class="icon">${this.icon}</span>`:``}
25
- <span class="flex-1">${this.label||this.value}</span>
26
- ${this.selected?r.html`
27
- <span class="check">
28
- <svg
29
- width="16"
30
- height="16"
31
- viewBox="0 0 24 24"
32
- fill="none"
33
- stroke="currentColor"
34
- stroke-width="2"
35
- stroke-linecap="round"
36
- stroke-linejoin="round"
37
- >
38
- <polyline points="20 6 9 17 4 12"></polyline>
39
- </svg>
40
- </span>
41
- `:``}
42
- </div>
43
- `}};e.u([(0,n.property)({type:String})],i.prototype,`value`,void 0),e.u([(0,n.property)({type:String})],i.prototype,`label`,void 0),e.u([(0,n.property)({type:Boolean,reflect:!0})],i.prototype,`selected`,void 0),e.u([(0,n.property)({type:Boolean,reflect:!0})],i.prototype,`disabled`,void 0),e.u([(0,n.property)({type:String})],i.prototype,`group`,void 0),e.u([(0,n.property)({type:String})],i.prototype,`icon`,void 0),i=e.u([(0,n.customElement)(`schmancy-option`)],i);
@@ -1 +0,0 @@
1
- {"version":3,"file":"option-Il1KpU8M.cjs","names":[],"sources":["../src/option/option.ts"],"sourcesContent":["import { SchmancyElement } from '@mixins/index'\nimport { css, html } from 'lit'\nimport { customElement, property } from 'lit/decorators.js'\nimport { fromEvent, takeUntil } from 'rxjs'\n\n/**\n * `schmancy-option` is an option element for schmancy-select and schmancy-autocomplete components.\n *\n * @fires click - When the option is clicked\n */\n@customElement('schmancy-option')\nexport default class SchmancyOption extends SchmancyElement {\n\tstatic styles = [css`\n\t:host {\n\t\tdisplay: block;\n\t\tcursor: pointer;\n\t\tuser-select: none;\n\t\toutline: none;\n\t}\n\n\t:host(:focus-visible) {\n\t\toutline: 2px solid var(--schmancy-sys-color-primary-default);\n\t\toutline-offset: -2px;\n\t}\n\n\t:host([hidden]) {\n\t\tdisplay: none;\n\t}\n\n\t:host([disabled]) {\n\t\topacity: 0.5;\n\t\tpointer-events: none;\n\t}\n`];\n\t/**\n\t * The value of the option, will be used when selected.\n\t */\n\t@property({ type: String })\n\tvalue: string = ''\n\n\t/**\n\t * The human-readable label for the option.\n\t */\n\t@property({ type: String })\n\tlabel: string = ''\n\n\t/**\n\t * Whether the option is currently selected.\n\t */\n\t@property({ type: Boolean, reflect: true })\n\tselected: boolean = false\n\n\t/**\n\t * Whether the option is disabled.\n\t */\n\t@property({ type: Boolean, reflect: true })\n\tdisabled: boolean = false\n\n\t/**\n\t * Optional group this option belongs to (for option grouping).\n\t */\n\t@property({ type: String })\n\tgroup: string = ''\n\n\t/**\n\t * Optional icon or image to display before the label.\n\t */\n\t@property({ type: String })\n\ticon: string = ''\n\n\tconnectedCallback() {\n\t\tsuper.connectedCallback()\n\n\t\t// Ensure the option has an ID for accessibility\n\t\tif (!this.id) {\n\t\t\tthis.id = `schmancy-option-${Math.random().toString(36).substring(2, 9)}`\n\t\t}\n\n\t\t// If no label was provided, use the text content or value\n\t\tif (!this.label) {\n\t\t\tthis.label = this.textContent?.trim() || this.value\n\t\t}\n\n\t\t// If value wasn't set but there's text content, use that as the value\n\t\tif (!this.value && this.textContent) {\n\t\t\tthis.value = this.textContent.trim()\n\t\t}\n\n\t\t// Make the option clickable\n\t\tfromEvent<MouseEvent>(this, 'click')\n\t\t\t.pipe(takeUntil(this.disconnecting))\n\t\t\t.subscribe((e) => {\n\t\t\t\te.stopPropagation()\n\t\t\t\tif (this.disabled) return\n\t\t\t\t// Dispatch a custom event with this option's value\n\t\t\t\tthis.dispatchEvent(\n\t\t\t\t\tnew CustomEvent('option-select', {\n\t\t\t\t\t\tbubbles: true,\n\t\t\t\t\t\tcomposed: true,\n\t\t\t\t\t\tdetail: { value: this.value },\n\t\t\t\t\t}),\n\t\t\t\t)\n\t\t\t})\n\n\t\tfromEvent<KeyboardEvent>(this, 'keydown')\n\t\t\t.pipe(takeUntil(this.disconnecting))\n\t\t\t.subscribe((e) => {\n\t\t\t\t// Handle space and enter as clicks\n\t\t\t\tif (e.key === ' ' || e.key === 'Enter') {\n\t\t\t\t\te.preventDefault()\n\t\t\t\t\te.stopPropagation()\n\t\t\t\t\tif (this.disabled) return\n\t\t\t\t\t// Dispatch a custom event with this option's value\n\t\t\t\t\tthis.dispatchEvent(\n\t\t\t\t\t\tnew CustomEvent('option-select', {\n\t\t\t\t\t\t\tbubbles: true,\n\t\t\t\t\t\t\tcomposed: true,\n\t\t\t\t\t\t\tdetail: { value: this.value },\n\t\t\t\t\t\t}),\n\t\t\t\t\t)\n\t\t\t\t}\n\t\t\t})\n\t}\n\n\tdisconnectedCallback() {\n\t\t// Event listeners are automatically cleaned up via takeUntil(this.disconnecting)\n\t\tsuper.disconnectedCallback()\n\t}\n\n\n\trender() {\n\t\tconst classes = {\n\t\t\t'py-2': true,\n\t\t\t'px-3': true,\n\t\t\trounded: true,\n\t\t\t'text-sm': true,\n\t\t\t'w-full': true,\n\t\t\tflex: true,\n\t\t\t'items-center': true,\n\t\t\t'gap-2': true,\n\t\t\t// Selected state\n\t\t\t'bg-primary-container': this.selected,\n\t\t\t'text-primary-onContainer': this.selected,\n\t\t\t// Hover state (when not selected)\n\t\t\t'hover:bg-surface-high': !this.selected,\n\t\t\t// Focus state\n\t\t\t'focus:outline-none': true,\n\t\t}\n\n\t\treturn html`\n\t\t\t<div class=${this.classMap(classes)} role=\"option\" aria-selected=${this.selected} aria-disabled=${this.disabled}>\n\t\t\t\t${this.icon ? html`<span class=\"icon\">${this.icon}</span>` : ''}\n\t\t\t\t<span class=\"flex-1\">${this.label || this.value}</span>\n\t\t\t\t${this.selected\n\t\t\t\t\t? html`\n\t\t\t\t\t\t\t<span class=\"check\">\n\t\t\t\t\t\t\t\t<svg\n\t\t\t\t\t\t\t\t\twidth=\"16\"\n\t\t\t\t\t\t\t\t\theight=\"16\"\n\t\t\t\t\t\t\t\t\tviewBox=\"0 0 24 24\"\n\t\t\t\t\t\t\t\t\tfill=\"none\"\n\t\t\t\t\t\t\t\t\tstroke=\"currentColor\"\n\t\t\t\t\t\t\t\t\tstroke-width=\"2\"\n\t\t\t\t\t\t\t\t\tstroke-linecap=\"round\"\n\t\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,QAAA,CAAS,CAAA,CAAA,CAAA,EAAM,EAAA,UAAA,WAAA,IAAA,EAAA,EAAA,EAAA,EAAA,EAAA,EAAA,EAAA,UAMhC,CAAE,KAAM,MAAA,CAAA,CAAA,EAAQ,EAAA,UAAA,QAAA,IAAA,EAAA,EAAA,EAAA,EAAA,EAAA,EAAA,EAAA,UAMhB,CAAE,KAAM,MAAA,CAAA,CAAA,EAAQ,EAAA,UAAA,OAAA,IAAA,EAAA,EAAA,EAAA,EAAA,EAAA,EAAA,EAAA,EAAA,eAzDZ,iBAAA,CAAA,EAAiB,CAAA"}
@@ -1 +0,0 @@
1
- {"version":3,"file":"overlay-Bh8Q_R01.js","names":["#closed$"],"sources":["../src/overlay/overlay.animations.ts","../src/overlay/overlay.gestures.ts","../src/overlay/overlay.layout.ts","../src/overlay/overlay.positioning.ts","../src/overlay/overlay.component.ts"],"sourcesContent":["import {\n\tDURATION_EXIT,\n\tgetEasing,\n\tSPRING_SMOOTH,\n\tSPRING_SNAPPY,\n} from '../utils/animation'\nimport { reducedMotion$ } from '../directives/reduced-motion'\nimport type { Anchor, OverlayLayout } from './overlay.types'\n\n/**\n * WAAPI keyframes + options per layout + direction.\n *\n * One animation vocabulary — no per-element bespoke keyframes. Aligns\n * with the `animation` skill (spring physics presets). Every easing runs\n * through `getEasing()` so modern browsers (that support\n * `animation-timing-function: linear(0, 1)`) get the true `linear()`\n * spring expression while older browsers fall through to the cubic-bezier\n * fallback. Honors `prefers-reduced-motion` by collapsing transforms to\n * opacity-only.\n *\n * Anchor-origin bloom: the caller computes\n * `anchorOriginVars(anchor, surfaceRect)` and writes the resulting CSS\n * custom properties onto the surface element BEFORE triggering the\n * entrance animation. Keyframes reference those vars via\n * `transform-origin: var(--schmancy-overlay-origin-x, 50%) var(...)`, so\n * the surface scales OUT of the click point — not from its own centre.\n */\n\n/**\n * Shape matches both DOM `AnimationEffectTiming` and\n * `KeyframeAnimationOptions` so it passes structural checks in both\n * older and newer `lib.dom.d.ts` vintages.\n */\nexport interface AnimationSpec {\n\tkeyframes: Keyframe[]\n\toptions: {\n\t\tduration: number\n\t\teasing: string\n\t\tfill?: FillMode\n\t}\n}\n\n/**\n * Module-scope reduced-motion state, kept in sync with the house\n * `reducedMotion$` BehaviorSubject. The subscribe has no teardown —\n * module lifetime IS the subscription lifetime (house rxjs rule 4:\n * module singletons don't need explicit teardown).\n */\nlet reducedMotion = reducedMotion$.value\nreducedMotion$.subscribe((v) => {\n\treducedMotion = v\n})\n\nconst ORIGIN_X_VAR = '--schmancy-overlay-origin-x'\nconst ORIGIN_Y_VAR = '--schmancy-overlay-origin-y'\nconst ORIGIN_CSS = `var(${ORIGIN_X_VAR}, 50%) var(${ORIGIN_Y_VAR}, 50%)`\n\nfunction clampPercent(value: number): number {\n\tif (Number.isNaN(value) || !Number.isFinite(value)) return 50\n\treturn Math.max(0, Math.min(100, value))\n}\n\nfunction getAnchorCenter(anchor: Anchor): { x: number; y: number } {\n\t// Element | VirtualAnchor — anything exposing getBoundingClientRect()\n\tif (\n\t\ttypeof (anchor as { getBoundingClientRect?: unknown }).getBoundingClientRect === 'function'\n\t) {\n\t\tconst r = (anchor as { getBoundingClientRect(): DOMRect }).getBoundingClientRect()\n\t\treturn { x: r.left + r.width / 2, y: r.top + r.height / 2 }\n\t}\n\t// DOMRect — has left/top/width/height but no getBoundingClientRect()\n\tif (\n\t\ttypeof (anchor as DOMRect).width === 'number' &&\n\t\ttypeof (anchor as DOMRect).height === 'number' &&\n\t\ttypeof (anchor as DOMRect).left === 'number' &&\n\t\ttypeof (anchor as DOMRect).top === 'number'\n\t) {\n\t\tconst r = anchor as DOMRect\n\t\treturn { x: r.left + r.width / 2, y: r.top + r.height / 2 }\n\t}\n\t// MouseEvent / PointerEvent\n\tif (typeof (anchor as MouseEvent).clientX === 'number' && typeof (anchor as MouseEvent).clientY === 'number') {\n\t\tconst e = anchor as MouseEvent\n\t\treturn { x: e.clientX, y: e.clientY }\n\t}\n\t// TouchEvent\n\tif (\n\t\ttypeof (anchor as TouchEvent).touches !== 'undefined' &&\n\t\t(anchor as TouchEvent).touches.length > 0\n\t) {\n\t\tconst t = (anchor as TouchEvent).touches[0]\n\t\treturn { x: t.clientX, y: t.clientY }\n\t}\n\t// Plain { x, y } point\n\tconst pt = anchor as { x: number; y: number }\n\treturn { x: pt.x, y: pt.y }\n}\n\n/**\n * Compute CSS-var values for the anchor-relative transform origin.\n * Caller writes the returned record onto the surface element's style\n * before triggering the entrance animation. When no anchor is present,\n * returns sensible per-layout defaults (caller picks which to use):\n * - centered → 50% 50% (self-centre)\n * - sheet → 50% 100% (rises from bottom edge)\n * - anchored → computed from the anchor's position relative to the\n * surface rect\n */\nexport function anchorOriginVars(\n\tanchor: Anchor | undefined,\n\tsurfaceRect: DOMRect | { left: number; top: number; width: number; height: number },\n): Record<string, string> {\n\tif (!anchor) {\n\t\treturn {\n\t\t\t[ORIGIN_X_VAR]: '50%',\n\t\t\t[ORIGIN_Y_VAR]: '50%',\n\t\t}\n\t}\n\tconst { x, y } = getAnchorCenter(anchor)\n\tif (!surfaceRect.width || !surfaceRect.height) {\n\t\treturn {\n\t\t\t[ORIGIN_X_VAR]: '50%',\n\t\t\t[ORIGIN_Y_VAR]: '50%',\n\t\t}\n\t}\n\tconst originX = clampPercent(((x - surfaceRect.left) / surfaceRect.width) * 100)\n\tconst originY = clampPercent(((y - surfaceRect.top) / surfaceRect.height) * 100)\n\treturn {\n\t\t[ORIGIN_X_VAR]: `${originX}%`,\n\t\t[ORIGIN_Y_VAR]: `${originY}%`,\n\t}\n}\n\nexport function surfaceAnimation(layout: OverlayLayout, direction: 'in' | 'out'): AnimationSpec {\n\tif (reducedMotion) {\n\t\t// Opacity-only; explicit reset to { opacity: 1, transform: none } on `in`\n\t\t// so any leftover transform from a prior `out` doesn't persist.\n\t\treturn direction === 'in'\n\t\t\t? {\n\t\t\t\t\tkeyframes: [\n\t\t\t\t\t\t{ opacity: 0, transform: 'none' },\n\t\t\t\t\t\t{ opacity: 1, transform: 'none' },\n\t\t\t\t\t],\n\t\t\t\t\toptions: { duration: 1, easing: 'linear', fill: 'forwards' },\n\t\t\t\t}\n\t\t\t: {\n\t\t\t\t\tkeyframes: [\n\t\t\t\t\t\t{ opacity: 1, transform: 'none' },\n\t\t\t\t\t\t{ opacity: 0, transform: 'none' },\n\t\t\t\t\t],\n\t\t\t\t\toptions: { duration: 1, easing: 'linear', fill: 'forwards' },\n\t\t\t\t}\n\t}\n\n\tswitch (layout) {\n\t\tcase 'sheet':\n\t\t\treturn direction === 'in'\n\t\t\t\t? {\n\t\t\t\t\t\tkeyframes: [\n\t\t\t\t\t\t\t{ opacity: 0, transform: 'translateY(100%)' },\n\t\t\t\t\t\t\t{ opacity: 1, transform: 'translateY(0)' },\n\t\t\t\t\t\t],\n\t\t\t\t\t\toptions: {\n\t\t\t\t\t\t\tduration: SPRING_SNAPPY.duration,\n\t\t\t\t\t\t\teasing: getEasing(SPRING_SNAPPY),\n\t\t\t\t\t\t\tfill: 'forwards',\n\t\t\t\t\t\t},\n\t\t\t\t\t}\n\t\t\t\t: {\n\t\t\t\t\t\tkeyframes: [\n\t\t\t\t\t\t\t{ opacity: 1, transform: 'translateY(0)' },\n\t\t\t\t\t\t\t{ opacity: 0, transform: 'translateY(100%)' },\n\t\t\t\t\t\t],\n\t\t\t\t\t\toptions: {\n\t\t\t\t\t\t\tduration: DURATION_EXIT,\n\t\t\t\t\t\t\teasing: getEasing(SPRING_SMOOTH),\n\t\t\t\t\t\t\tfill: 'forwards',\n\t\t\t\t\t\t},\n\t\t\t\t\t}\n\n\t\tcase 'anchored':\n\t\t\t// Anchored surfaces get a scale-from-origin treatment too — the\n\t\t\t// positioning strategy (Popover API / CSS Anchor / Floating UI) owns\n\t\t\t// the final placement; the surface merely blooms from the anchor.\n\t\t\treturn direction === 'in'\n\t\t\t\t? {\n\t\t\t\t\t\tkeyframes: [\n\t\t\t\t\t\t\t{ opacity: 0, transform: 'scale(0.85)', transformOrigin: ORIGIN_CSS },\n\t\t\t\t\t\t\t{ opacity: 1, transform: 'scale(1)', transformOrigin: ORIGIN_CSS },\n\t\t\t\t\t\t],\n\t\t\t\t\t\toptions: {\n\t\t\t\t\t\t\tduration: SPRING_SNAPPY.duration,\n\t\t\t\t\t\t\teasing: getEasing(SPRING_SNAPPY),\n\t\t\t\t\t\t\tfill: 'forwards',\n\t\t\t\t\t\t},\n\t\t\t\t\t}\n\t\t\t\t: {\n\t\t\t\t\t\tkeyframes: [\n\t\t\t\t\t\t\t{ opacity: 1, transform: 'scale(1)', transformOrigin: ORIGIN_CSS },\n\t\t\t\t\t\t\t{ opacity: 0, transform: 'scale(0.92)', transformOrigin: ORIGIN_CSS },\n\t\t\t\t\t\t],\n\t\t\t\t\t\toptions: {\n\t\t\t\t\t\t\tduration: DURATION_EXIT,\n\t\t\t\t\t\t\teasing: getEasing(SPRING_SMOOTH),\n\t\t\t\t\t\t\tfill: 'forwards',\n\t\t\t\t\t\t},\n\t\t\t\t\t}\n\t}\n}\n\n/**\n * FLIP (First / Last / Invert / Play) animation from `before` rect to\n * `after` rect. Caller has already moved the element between the two\n * states; this produces the WAAPI spec that animates the delta back.\n *\n * Used by the ResizeObserver-driven layout re-resolve in the overlay\n * element — when content grows past threshold mid-session and the\n * layout switches from centered → sheet, this animates the transition\n * instead of a hard cut.\n *\n * Reduced-motion collapses to an instant 1ms no-op; caller should check\n * `reducedMotion` (not exported) — or just run this and tolerate the\n * 1ms animation.\n */\nexport function flipAnimation(\n\tbefore: DOMRect | { left: number; top: number; width: number; height: number },\n\tafter: DOMRect | { left: number; top: number; width: number; height: number },\n): AnimationSpec {\n\tif (reducedMotion) {\n\t\treturn {\n\t\t\tkeyframes: [{ transform: 'none' }, { transform: 'none' }],\n\t\t\toptions: { duration: 1, easing: 'linear', fill: 'forwards' },\n\t\t}\n\t}\n\tconst dx = before.left - after.left\n\tconst dy = before.top - after.top\n\tconst sx = after.width > 0 ? before.width / after.width : 1\n\tconst sy = after.height > 0 ? before.height / after.height : 1\n\treturn {\n\t\tkeyframes: [\n\t\t\t{\n\t\t\t\ttransform: `translate(${dx}px, ${dy}px) scale(${sx}, ${sy})`,\n\t\t\t\ttransformOrigin: 'top left',\n\t\t\t},\n\t\t\t{ transform: 'none', transformOrigin: 'top left' },\n\t\t],\n\t\toptions: {\n\t\t\tduration: SPRING_SMOOTH.duration,\n\t\t\teasing: getEasing(SPRING_SMOOTH),\n\t\t\tfill: 'forwards',\n\t\t},\n\t}\n}\n","import { filter, fromEvent, merge, Observable, Subject, take, takeUntil, tap } from 'rxjs'\n\n/**\n * Swipe-to-dismiss gesture for sheet-layout overlays.\n *\n * Pointer-event based — a single pipeline covers touch, mouse, pen, and\n * any future pointer source. Without a visible drag handle, the gesture\n * only starts within the top DRAG_START_TOP_PX band of the surface (a\n * standard pull-to-dismiss convention). Escape + backdrop click cover\n * the non-pointer dismiss paths via the component's modal-tier listeners.\n *\n * RxJS-native (rxjs skill principle 3: every async source is an Observable).\n * Thresholds are policy constants, not magic numbers.\n */\n\n/** Distance (px) past which the gesture dismisses. */\nexport const DISMISS_DISTANCE_PX = 80\n/** Distance as fraction of sheet height past which the gesture dismisses. */\nexport const DISMISS_DISTANCE_FRACTION = 0.25 // Vaul's value — feels right.\n/** Velocity (px/ms) past which the gesture dismisses even short of distance. */\nexport const DISMISS_VELOCITY_PX_PER_MS = 0.4 // Vaul's value.\n/** Drag only starts if pointerdown is within this top band (unless a drag handle is used). */\nexport const DRAG_START_TOP_PX = 40\n/** Snap-back animation duration when gesture doesn't pass threshold. */\nexport const SNAP_BACK_MS = 300\n\n/**\n * Logarithmic rubber-band damping for upward (negative) drag past the\n * top detent. Pulled from Vaul — `8 * (log(v + 1) - 2)` — diminishing\n * returns that feel physical, unlike the linear × 0.2 this replaces.\n *\n * Applied only to upward motion; downward drag tracks 1:1.\n */\nexport function logDamp(delta: number): number {\n\tif (delta >= 0) return delta\n\tconst abs = -delta\n\treturn -Math.max(0, 8 * (Math.log(abs + 1) - 2))\n}\n\nexport interface SwipeInputs {\n\t/** The surface element to track gestures on. */\n\tsurface: HTMLElement\n\t/** Optional drag handle. When provided, drag can start from anywhere on\n\t * the handle; without it, drag must start in the top DRAG_START_TOP_PX band. */\n\tdragHandle?: HTMLElement | null\n\t/** Completes the gesture stream (component disconnect / layout change). */\n\tuntil$: Observable<unknown>\n}\n\n/**\n * Emits exactly once when the user commits to dismissing the sheet\n * (distance OR velocity threshold passed). Works for touch, mouse, and\n * pen via the Pointer Events API. During an in-progress drag the\n * surface's `transform` is updated directly for 1:1 tracking. On\n * release-but-not-dismissed, the surface snaps back via a CSS transition.\n */\nexport function swipeToDismiss$(inputs: SwipeInputs): Observable<'dismiss'> {\n\tconst { surface, dragHandle, until$ } = inputs\n\n\treturn new Observable<'dismiss'>((subscriber) => {\n\t\tconst dragTarget = dragHandle ?? surface\n\t\tconst stopCurrent$ = new Subject<void>()\n\n\t\tlet dragging = false\n\t\tlet activePointerId: number | null = null\n\t\tlet startY = 0\n\t\tlet startTime = 0\n\t\tlet currentDelta = 0\n\n\t\tconst pointerDown$ = fromEvent<PointerEvent>(dragTarget, 'pointerdown').pipe(\n\t\t\t// Primary button / primary finger only. For touch, isPrimary also\n\t\t\t// covers the pinch-zoom guard (only one finger has isPrimary=true).\n\t\t\tfilter((e) => e.isPrimary && (e.pointerType !== 'mouse' || e.button === 0)),\n\t\t\t// Without a dedicated drag handle, require start in the top band.\n\t\t\tfilter((e) => {\n\t\t\t\tif (dragHandle) return true\n\t\t\t\tconst rect = surface.getBoundingClientRect()\n\t\t\t\treturn e.clientY - rect.top <= DRAG_START_TOP_PX\n\t\t\t}),\n\t\t\ttap((e) => {\n\t\t\t\tdragging = true\n\t\t\t\tactivePointerId = e.pointerId\n\t\t\t\tstartY = e.clientY\n\t\t\t\tstartTime = performance.now()\n\t\t\t\tcurrentDelta = 0\n\t\t\t\tsurface.style.transition = 'none'\n\t\t\t\tsurface.style.willChange = 'transform'\n\t\t\t\t// Capture so pointermove fires even if the pointer leaves the element\n\t\t\t\t// (covers the \"drag from handle, move past surface edge\" case).\n\t\t\t\ttry {\n\t\t\t\t\t;(dragTarget as Element).setPointerCapture?.(e.pointerId)\n\t\t\t\t} catch {\n\t\t\t\t\t// setPointerCapture can throw on detached elements; safe to ignore.\n\t\t\t\t}\n\t\t\t}),\n\t\t)\n\n\t\tconst pointerMove$ = fromEvent<PointerEvent>(dragTarget, 'pointermove').pipe(\n\t\t\tfilter(() => dragging),\n\t\t\tfilter((e) => e.pointerId === activePointerId),\n\t\t\ttap((e) => {\n\t\t\t\tconst deltaY = e.clientY - startY\n\t\t\t\tcurrentDelta = logDamp(deltaY)\n\t\t\t\tsurface.style.transform = `translateY(${currentDelta}px)`\n\t\t\t\t// preventDefault is a no-op on default Pointer Events but avoids\n\t\t\t\t// accidental text selection / page scroll during the drag.\n\t\t\t\tif (e.cancelable) e.preventDefault()\n\t\t\t}),\n\t\t)\n\n\t\tconst pointerEnd$ = merge(\n\t\t\tfromEvent<PointerEvent>(dragTarget, 'pointerup'),\n\t\t\tfromEvent<PointerEvent>(dragTarget, 'pointercancel'),\n\t\t\tfromEvent<PointerEvent>(dragTarget, 'lostpointercapture'),\n\t\t).pipe(\n\t\t\tfilter(() => dragging),\n\t\t\tfilter((e) => e.pointerId === activePointerId),\n\t\t\ttap(() => {\n\t\t\t\tdragging = false\n\t\t\t\tconst pointerId = activePointerId\n\t\t\t\tactivePointerId = null\n\t\t\t\ttry {\n\t\t\t\t\tif (pointerId !== null) (dragTarget as Element).releasePointerCapture?.(pointerId)\n\t\t\t\t} catch {\n\t\t\t\t\t// same reason as setPointerCapture — ignore.\n\t\t\t\t}\n\n\t\t\t\tconst elapsed = Math.max(1, performance.now() - startTime)\n\t\t\t\tconst velocity = currentDelta / elapsed\n\t\t\t\tconst surfaceHeight = surface.getBoundingClientRect().height\n\t\t\t\tconst distanceThreshold = Math.min(DISMISS_DISTANCE_PX, surfaceHeight * DISMISS_DISTANCE_FRACTION)\n\n\t\t\t\tconst shouldDismiss =\n\t\t\t\t\tcurrentDelta > distanceThreshold ||\n\t\t\t\t\t(currentDelta > 20 && velocity > DISMISS_VELOCITY_PX_PER_MS)\n\n\t\t\t\tsurface.style.willChange = ''\n\n\t\t\t\tif (shouldDismiss) {\n\t\t\t\t\t// Finish translate off-screen for visual continuity with the dismiss\n\t\t\t\t\t// animation; the caller's teardown will unmount.\n\t\t\t\t\tsurface.style.transition = `transform ${SNAP_BACK_MS}ms cubic-bezier(0.16, 1, 0.3, 1)`\n\t\t\t\t\tsurface.style.transform = 'translateY(100%)'\n\t\t\t\t\tsubscriber.next('dismiss')\n\t\t\t\t\tsubscriber.complete()\n\t\t\t\t} else {\n\t\t\t\t\t// Snap back to 0.\n\t\t\t\t\tsurface.style.transition = `transform ${SNAP_BACK_MS}ms cubic-bezier(0.16, 1, 0.3, 1)`\n\t\t\t\t\tsurface.style.transform = 'translateY(0)'\n\t\t\t\t}\n\t\t\t}),\n\t\t)\n\n\t\tmerge(pointerDown$, pointerMove$, pointerEnd$)\n\t\t\t.pipe(takeUntil(merge(stopCurrent$, until$)))\n\t\t\t.subscribe()\n\n\t\treturn () => {\n\t\t\tstopCurrent$.next()\n\t\t\tstopCurrent$.complete()\n\t\t\tsurface.style.transition = ''\n\t\t\tsurface.style.transform = ''\n\t\t\tsurface.style.willChange = ''\n\t\t}\n\t}).pipe(take(1))\n}\n\n","import type { Anchor, OverlayLayout, VirtualAnchor } from './overlay.types'\n\n/**\n * Layout dispatch engine — pure function of (anchor, content, viewport).\n * No DOM access, no side effects — testable with synthetic inputs.\n *\n * Thresholds are policy constants, not magic numbers. Changes are visible\n * as named-constant diffs, not hidden in inline literals (state skill:\n * \"thresholds ARE the policy\").\n */\n\n/** Floating UI / CSS anchor-positioning safety padding. */\nexport const ANCHOR_FIT_PADDING_PX = 16\n\nexport interface LayoutInputs {\n\tanchor?: Anchor\n}\n\n/**\n * Two outcomes, one signal: anchor presence.\n *\n * - anchor provided → anchored (popover/menu/dropdown next to a trigger)\n * - no anchor → sheet (everything else: dialogs, takeovers, content panels)\n *\n * Callers who want to force a specific layout regardless of anchor pass\n * `ShowOptions.as` — the resolver is bypassed entirely in that case.\n *\n * Floating UI's `flip` + `shift` + `size` middleware handles \"anchor doesn't\n * fit initially\" — it returns a fitting position rather than rejecting. So\n * anchored layouts don't need a fallback; Floating UI's output IS the answer.\n */\nexport function resolveLayout(inputs: LayoutInputs): OverlayLayout {\n\treturn inputs.anchor !== undefined ? 'anchored' : 'sheet'\n}\n\n/**\n * Resolved reference the positioning strategies consume.\n *\n * `el` is populated when the anchor is an HTMLElement — the Popover API\n * tier uses it directly via the `anchor=<id>` attribute, and Tier 1 / CSS\n * Anchor Positioning sets `element.style.anchorName` on it.\n *\n * `virtual` is populated for point/rect/TouchEvent anchors — Floating UI\n * accepts any object exposing `getBoundingClientRect()` as a virtual\n * reference. The Popover API path cannot use virtual references, so a\n * caller passing a point / DOMRect / event forces Tier 3 (or Tier 2 with\n * Floating UI, not CSS Anchor Positioning).\n */\nexport interface ResolvedAnchor {\n\tel?: HTMLElement\n\tvirtual?: VirtualAnchor\n}\n\n/**\n * Normalise an `Anchor` input into the shape the positioning strategies\n * accept. One function, one decision: element wins if present; otherwise\n * synthesize a zero-size virtual reference at the anchor's point.\n *\n * Called by the overlay element during `open()` before dispatching to\n * `pickPositioner(resolved)`.\n */\nexport function resolveAnchorRef(anchor: Anchor | undefined): ResolvedAnchor | undefined {\n\tif (!anchor) return undefined\n\n\t// HTMLElement — native element reference.\n\tif (typeof HTMLElement !== 'undefined' && anchor instanceof HTMLElement) {\n\t\treturn { el: anchor }\n\t}\n\n\t// Any other object with getBoundingClientRect — treat as virtual.\n\tif (typeof (anchor as { getBoundingClientRect?: unknown }).getBoundingClientRect === 'function') {\n\t\treturn {\n\t\t\tvirtual: {\n\t\t\t\tgetBoundingClientRect: () => (anchor as { getBoundingClientRect(): DOMRect }).getBoundingClientRect(),\n\t\t\t},\n\t\t}\n\t}\n\n\t// DOMRect — fixed rect; synthesize a virtual that returns it verbatim.\n\tif (\n\t\ttypeof (anchor as DOMRect).width === 'number' &&\n\t\ttypeof (anchor as DOMRect).height === 'number' &&\n\t\ttypeof (anchor as DOMRect).left === 'number' &&\n\t\ttypeof (anchor as DOMRect).top === 'number'\n\t) {\n\t\tconst rect = anchor as DOMRect\n\t\treturn {\n\t\t\tvirtual: {\n\t\t\t\tgetBoundingClientRect: () => rect,\n\t\t\t},\n\t\t}\n\t}\n\n\t// MouseEvent / PointerEvent — zero-size rect at click point.\n\tif (typeof (anchor as MouseEvent).clientX === 'number' && typeof (anchor as MouseEvent).clientY === 'number') {\n\t\tconst e = anchor as MouseEvent\n\t\tconst rect = makePointRect(e.clientX, e.clientY)\n\t\treturn { virtual: { getBoundingClientRect: () => rect } }\n\t}\n\n\t// TouchEvent — zero-size rect at first touch point.\n\tif (\n\t\ttypeof (anchor as TouchEvent).touches !== 'undefined' &&\n\t\t(anchor as TouchEvent).touches.length > 0\n\t) {\n\t\tconst t = (anchor as TouchEvent).touches[0]\n\t\tconst rect = makePointRect(t.clientX, t.clientY)\n\t\treturn { virtual: { getBoundingClientRect: () => rect } }\n\t}\n\n\t// { x, y } point — zero-size rect at coords.\n\tconst pt = anchor as { x: number; y: number }\n\tconst rect = makePointRect(pt.x, pt.y)\n\treturn { virtual: { getBoundingClientRect: () => rect } }\n}\n\n/**\n * Construct a DOMRect-compatible object for a zero-width / zero-height\n * point. Avoids `new DOMRect(...)` which isn't constructable across all\n * lib.dom.d.ts vintages.\n */\nfunction makePointRect(x: number, y: number): DOMRect {\n\treturn {\n\t\tx,\n\t\ty,\n\t\twidth: 0,\n\t\theight: 0,\n\t\tleft: x,\n\t\tright: x,\n\t\ttop: y,\n\t\tbottom: y,\n\t\ttoJSON() {\n\t\t\treturn { x, y, width: 0, height: 0, left: x, right: x, top: y, bottom: y }\n\t\t},\n\t}\n}\n","import {\n\tautoUpdate,\n\tcomputePosition,\n\tflip,\n\toffset,\n\tshift,\n\tsize,\n\ttype Placement,\n} from '@floating-ui/dom'\nimport { Observable } from 'rxjs'\nimport { ANCHOR_FIT_PADDING_PX, type ResolvedAnchor } from './overlay.layout'\nimport type { OverlayPlacement, OverlayTier } from './overlay.types'\n\n/**\n * Three-tier positioning ladder for anchored overlays. Public API of the\n * overlay doesn't change based on the tier — the strategy is picked\n * internally by feature-detection.\n *\n * Tier 1 — CSS Anchor Positioning (Popover + `anchor-name` / `position-anchor`)\n * Zero-JS position tracking. Chromium-only today.\n *\n * Tier 2 — Popover API + Floating UI\n * Native top-layer + light-dismiss + Esc from `popover=\"auto\"`, Floating\n * UI middleware for the position math. Safari 17+, Chrome 114+, Firefox 125+.\n *\n * Tier 3 — Floating UI only\n * Fallback for browsers without the Popover API. Caller provides manual\n * backdrop + click-outside + Esc wiring.\n */\n\n/**\n * Feature-detection snapshot captured at module load. Frozen so consumers\n * can safely destructure and compare.\n */\nexport const CAPS = Object.freeze({\n\tpopover:\n\t\ttypeof HTMLElement !== 'undefined' &&\n\t\t'popover' in HTMLElement.prototype &&\n\t\ttypeof (HTMLElement.prototype as unknown as { showPopover?: () => void }).showPopover === 'function',\n\tcssAnchor:\n\t\ttypeof CSS !== 'undefined' &&\n\t\ttypeof CSS.supports === 'function' &&\n\t\tCSS.supports('anchor-name: --x'),\n})\n\n/**\n * Pick the positioning tier for an anchor.\n *\n * CSS Anchor Positioning (Tier 1) requires a real element anchor — you\n * can't point `anchor-name` at a DOMRect or a coord. A point/rect anchor\n * forces Tier 2 (or Tier 3 if popover isn't supported).\n */\nexport function pickPositioner(anchor: ResolvedAnchor): OverlayTier {\n\tif (CAPS.popover && CAPS.cssAnchor && anchor.el) return 'css-anchor'\n\tif (CAPS.popover) return 'popover-fui'\n\treturn 'fui-only'\n}\n\n/* ======================================================================= *\n * Tier 1 — Popover API + CSS Anchor *\n * ======================================================================= */\n\n/**\n * Set up CSS Anchor Positioning. Assigns a unique `anchor-name` to the\n * anchor element and injects a stylesheet into the shadow root that\n * positions the surface relative to it. No JS running per frame.\n *\n * Returns a cleanup function that removes the injected styles and the\n * anchor-name from the anchor element.\n */\nexport function positionCSSAnchor(\n\tsurface: HTMLElement,\n\tanchor: ResolvedAnchor,\n\tshadowRoot: ShadowRoot,\n\topts: { id: string; placement?: OverlayPlacement } = { id: '' },\n): () => void {\n\tif (!anchor.el) {\n\t\tthrow new Error('positionCSSAnchor requires an element anchor')\n\t}\n\tconst anchorEl = anchor.el\n\tconst anchorName = `--ov-${opts.id || Math.random().toString(36).slice(2, 10)}`\n\tconst placement = opts.placement ?? 'bottom-start'\n\n\t// Save any prior anchor-name so we can restore it on cleanup.\n\tconst priorAnchorName = anchorEl.style.getPropertyValue('anchor-name')\n\tanchorEl.style.setProperty('anchor-name', anchorName)\n\n\tconst sheet = new CSSStyleSheet()\n\tsheet.replaceSync(`\n\t\t${surface.localName}[data-overlay-ref=\"${opts.id}\"] {\n\t\t\tposition-anchor: ${anchorName};\n\t\t\t${cssForPlacement(placement)}\n\t\t\tmargin: 8px;\n\t\t\tposition-try-fallbacks:\n\t\t\t\tflip-block,\n\t\t\t\tflip-inline,\n\t\t\t\tflip-block flip-inline;\n\t\t}\n\t`)\n\tsurface.dataset.overlayRef = opts.id\n\tconst existing = shadowRoot.adoptedStyleSheets\n\tshadowRoot.adoptedStyleSheets = [...existing, sheet]\n\n\treturn () => {\n\t\tif (priorAnchorName) {\n\t\t\tanchorEl.style.setProperty('anchor-name', priorAnchorName)\n\t\t} else {\n\t\t\tanchorEl.style.removeProperty('anchor-name')\n\t\t}\n\t\tshadowRoot.adoptedStyleSheets = shadowRoot.adoptedStyleSheets.filter((s) => s !== sheet)\n\t\tdelete surface.dataset.overlayRef\n\t}\n}\n\nfunction cssForPlacement(p: OverlayPlacement): string {\n\t// Minimal mapping for the Tier 1 stylesheet. The browser's\n\t// `position-try-fallbacks` flips when the preferred side doesn't fit,\n\t// so only the starting side needs to be encoded here.\n\tswitch (p) {\n\t\tcase 'top':\n\t\tcase 'top-start':\n\t\t\treturn 'bottom: anchor(top); left: anchor(start);'\n\t\tcase 'top-end':\n\t\t\treturn 'bottom: anchor(top); right: anchor(end);'\n\t\tcase 'bottom':\n\t\tcase 'bottom-start':\n\t\t\treturn 'top: anchor(bottom); left: anchor(start);'\n\t\tcase 'bottom-end':\n\t\t\treturn 'top: anchor(bottom); right: anchor(end);'\n\t\tcase 'left':\n\t\tcase 'left-start':\n\t\t\treturn 'right: anchor(left); top: anchor(start);'\n\t\tcase 'left-end':\n\t\t\treturn 'right: anchor(left); bottom: anchor(end);'\n\t\tcase 'right':\n\t\tcase 'right-start':\n\t\t\treturn 'left: anchor(right); top: anchor(start);'\n\t\tcase 'right-end':\n\t\t\treturn 'left: anchor(right); bottom: anchor(end);'\n\t}\n}\n\n/* ======================================================================= *\n * Tier 2 — Popover API (top-layer only) *\n * ======================================================================= */\n\n/**\n * Wire the Popover API lifecycle — the surface gets `popover=\"manual\"` and\n * `showPopover()` is called to promote it into the native top layer. No\n * position math here; the caller pairs this with `positionFloatingUI` for\n * the geometry, since Tier 2 is Popover-for-stacking + Floating UI-for-math.\n *\n * `manual` (not `auto`) so stacked overlays don't fight the browser's\n * popover-auto light-dismiss algorithm: opening a second `popover=\"auto\"`\n * that isn't a DOM/invoker descendant of the first closes the first via\n * the toggle event. Each schmancy overlay is appended as a sibling to\n * `<body>`, so the browser can't see the nesting and would dismiss the\n * parent. With `manual`, schmancy owns Esc + outside-click via\n * `wireCloseTriggers`, and the top-layer rendering is preserved.\n *\n * Returns a cleanup function that hides the popover and strips the attr.\n */\nexport function positionPopoverAPI(surface: HTMLElement): () => void {\n\tif (!CAPS.popover) {\n\t\tthrow new Error('positionPopoverAPI requires Popover API support')\n\t}\n\tsurface.setAttribute('popover', 'manual')\n\ttry {\n\t\t;(surface as unknown as { showPopover(): void }).showPopover()\n\t} catch {\n\t\t// showPopover can throw if already shown or detached; the component\n\t\t// is responsible for calling this on an already-mounted, not-yet-shown\n\t\t// surface. Silently swallowing a double-open is fine.\n\t}\n\treturn () => {\n\t\ttry {\n\t\t\t;(surface as unknown as { hidePopover?: () => void }).hidePopover?.()\n\t\t} catch {\n\t\t\t// already hidden / disconnected — fine.\n\t\t}\n\t\tsurface.removeAttribute('popover')\n\t}\n}\n\n/* ======================================================================= *\n * Tier 2 / 3 — Floating UI position math *\n * ======================================================================= */\n\nexport interface FloatingUIOptions {\n\t/** Preferred placement; Floating UI's `flip` middleware handles falls. */\n\tplacement?: OverlayPlacement\n\t/** Padding used by `shift` + `size` middleware. Defaults to\n\t * `ANCHOR_FIT_PADDING_PX` from overlay.layout. */\n\tpadding?: number\n\t/** Gap between anchor and surface. Default 8px. */\n\toffsetPx?: number\n\t/** Whether `autoUpdate` should track element resizes. Default true. */\n\ttrack?: boolean\n}\n\n/**\n * Floating UI-driven positioning. Returns a cold Observable — subscribe to\n * start positioning, unsubscribe to stop tracking (teardown cancels the\n * `autoUpdate` loop). The caller composes with `takeUntil(this.disconnecting)`:\n *\n * positionFloatingUI(surface, anchor, opts)\n * .pipe(takeUntil(this.disconnecting))\n * .subscribe()\n *\n * Middleware (stack, in order):\n * offset(opts.offsetPx)\n * → flip({ fallbackPlacements: [...] })\n * → shift({ padding: opts.padding })\n * → size({ apply: clamp maxWidth AND maxHeight from availableWidth/Height })\n *\n * `flip` is chosen over `autoPlacement` because element-anchored overlays\n * should respect the trigger's spatial context (menus shouldn't jump\n * sides). Dialog uses `autoPlacement` because it's point-anchored.\n */\nexport function positionFloatingUI(\n\tsurface: HTMLElement,\n\tanchor: ResolvedAnchor,\n\topts: FloatingUIOptions = {},\n): Observable<void> {\n\treturn new Observable<void>((subscriber) => {\n\t\tconst reference = anchor.el ?? anchor.virtual\n\t\tif (!reference) {\n\t\t\tsubscriber.error(new Error('positionFloatingUI requires an element or virtual anchor'))\n\t\t\treturn\n\t\t}\n\n\t\tconst placement: Placement = (opts.placement ?? 'bottom-start') as Placement\n\t\tconst padding = opts.padding ?? ANCHOR_FIT_PADDING_PX\n\t\tconst offsetPx = opts.offsetPx ?? 8\n\n\t\tconst update = async (): Promise<void> => {\n\t\t\ttry {\n\t\t\t\tconst { x, y } = await computePosition(reference, surface, {\n\t\t\t\t\tstrategy: 'fixed',\n\t\t\t\t\tplacement,\n\t\t\t\t\tmiddleware: [\n\t\t\t\t\t\toffset(offsetPx),\n\t\t\t\t\t\tflip({ padding, fallbackPlacements: defaultFallbacks(placement) }),\n\t\t\t\t\t\tshift({ padding }),\n\t\t\t\t\t\tsize({\n\t\t\t\t\t\t\tpadding,\n\t\t\t\t\t\t\tapply({ availableWidth, availableHeight, elements }) {\n\t\t\t\t\t\t\t\telements.floating.style.maxWidth = `${Math.max(0, availableWidth)}px`\n\t\t\t\t\t\t\t\telements.floating.style.maxHeight = `${Math.max(0, availableHeight)}px`\n\t\t\t\t\t\t\t},\n\t\t\t\t\t\t}),\n\t\t\t\t\t],\n\t\t\t\t})\n\t\t\t\tObject.assign(surface.style, {\n\t\t\t\t\tposition: 'fixed',\n\t\t\t\t\tleft: `${Math.round(x)}px`,\n\t\t\t\t\ttop: `${Math.round(y)}px`,\n\t\t\t\t\ttransform: 'none',\n\t\t\t\t})\n\t\t\t\tsubscriber.next()\n\t\t\t} catch (err) {\n\t\t\t\tsubscriber.error(err)\n\t\t\t}\n\t\t}\n\n\t\tconst cleanup = autoUpdate(reference, surface, update, {\n\t\t\tancestorScroll: true,\n\t\t\tancestorResize: true,\n\t\t\telementResize: opts.track !== false,\n\t\t})\n\n\t\treturn () => {\n\t\t\tcleanup()\n\t\t}\n\t})\n}\n\nfunction defaultFallbacks(preferred: Placement): Placement[] {\n\t// Flip to the opposite side first, then try the perpendicular ends.\n\t// Small, deterministic list — not exhaustive.\n\tswitch (preferred) {\n\t\tcase 'bottom-start':\n\t\t\treturn ['top-start', 'bottom-end', 'top-end']\n\t\tcase 'bottom-end':\n\t\t\treturn ['top-end', 'bottom-start', 'top-start']\n\t\tcase 'top-start':\n\t\t\treturn ['bottom-start', 'top-end', 'bottom-end']\n\t\tcase 'top-end':\n\t\t\treturn ['bottom-end', 'top-start', 'bottom-start']\n\t\tcase 'left-start':\n\t\t\treturn ['right-start', 'left-end', 'right-end']\n\t\tcase 'left-end':\n\t\t\treturn ['right-end', 'left-start', 'right-start']\n\t\tcase 'right-start':\n\t\t\treturn ['left-start', 'right-end', 'left-end']\n\t\tcase 'right-end':\n\t\t\treturn ['left-end', 'right-start', 'left-start']\n\t\tcase 'top':\n\t\t\treturn ['bottom', 'left', 'right']\n\t\tcase 'bottom':\n\t\t\treturn ['top', 'left', 'right']\n\t\tcase 'left':\n\t\t\treturn ['right', 'top', 'bottom']\n\t\tcase 'right':\n\t\t\treturn ['left', 'top', 'bottom']\n\t\tdefault:\n\t\t\treturn ['top-start', 'bottom-end']\n\t}\n}\n","import { SchmancyElement } from '@mixins/index'\nimport { css, html, render as litRender, type TemplateResult } from 'lit'\nimport { customElement, property, query, state } from 'lit/decorators.js'\nimport { when } from 'lit/directives/when.js'\nimport {\n\tdebounceTime,\n\tdistinctUntilChanged,\n\tEMPTY,\n\tfilter,\n\tfromEvent,\n\tmap,\n\tmerge,\n\tSubject,\n\ttake,\n\ttakeUntil,\n\ttap,\n} from 'rxjs'\nimport type { LazyComponent } from '../area/lazy'\nimport { fromResizeObserver } from '../directives/layout'\nimport {\n\tanchorOriginVars,\n\tflipAnimation,\n\tsurfaceAnimation,\n} from './overlay.animations'\nimport { swipeToDismiss$ } from './overlay.gestures'\nimport {\n\tresolveAnchorRef,\n\tresolveLayout,\n\ttype ResolvedAnchor,\n} from './overlay.layout'\nimport {\n\tpickPositioner,\n\tpositionCSSAnchor,\n\tpositionFloatingUI,\n\tpositionPopoverAPI,\n} from './overlay.positioning'\nimport { currentStack } from './overlay.stack'\nimport type {\n\tAnchor,\n\tCloseReason,\n\tContent,\n\tOverlayLayout,\n\tOverlayTier,\n\tShowOptions,\n} from './overlay.types'\n\nconst MOUNT_POINT_ID = 'overlay-mount'\nconst RE_RESOLVE_COOLDOWN_MS = 600\n\n/**\n * The single overlay element. Custom `<div>` shell (not a native\n * `<dialog>`) — one backdrop mechanism for all layouts, one focus-trap\n * path, one animation orchestrator. The shell is always rendered; the\n * backdrop only renders when modal. The surface is positioned per tier:\n *\n * - Modal layouts (centered / sheet) → backdrop + surface, focus-trapped,\n * library-managed z-index.\n * - Anchored 'css-anchor' tier → surface as `popover=\"auto\"` with\n * CSS Anchor Positioning; native top-layer + light-dismiss.\n * - Anchored 'popover-fui' tier → surface as `popover=\"auto\"` + Floating\n * UI position math; native top-layer + light-dismiss.\n * - Anchored 'fui-only' tier → surface positioned by Floating UI;\n * manual click-outside + manual Esc.\n *\n * Public lifecycle: the service calls `open()` to mount content and\n * animate in, `close(reason)` to animate out and dismiss. The element\n * exposes `closed$` (Observable emitting reason + result once) and\n * `tier` / `layout` / `modal` as properties for the stack entry.\n */\n@customElement('schmancy-overlay')\nexport class SchmancyOverlay extends SchmancyElement {\n\tstatic styles = [css`\n\t:host {\n\t\tposition: fixed;\n\t\tinset: 0;\n\t\tz-index: 10000;\n\t\tdisplay: none;\n\t\tpointer-events: none;\n\t}\n\t:host([active]) {\n\t\tdisplay: block;\n\t}\n\t/* Vertical-gradient scrim — Tailwind's bg-gradient utilities cannot reach\n\t * these color-mix percentages with sufficient control. */\n\t.backdrop {\n\t\tbackground: linear-gradient(\n\t\t\tto bottom,\n\t\t\tcolor-mix(in srgb, var(--schmancy-sys-color-scrim) 18%, transparent) 0%,\n\t\t\tcolor-mix(in srgb, var(--schmancy-sys-color-scrim) 56%, transparent) 100%\n\t\t);\n\t\t-webkit-backdrop-filter: blur(16px) saturate(160%);\n\t\tbackdrop-filter: blur(16px) saturate(160%);\n\t}\n\t/* Popover top-layer surfaces — UA defaults push surface off-screen. */\n\t.surface:popover-open {\n\t\tmargin: 0;\n\t\tborder: 0;\n\t}\n\t/* Modal tier promotes the whole shell (scrim + surface) into the top\n\t * layer so every overlay — anchored or modal — shares ONE stacking\n\t * domain ordered strictly by show() time. Neutralize the UA popover\n\t * box so the shell stays full-viewport. */\n\t.shell:popover-open {\n\t\tinset: 0;\n\t\tmargin: 0;\n\t\tborder: 0;\n\t\twidth: 100%;\n\t\theight: 100%;\n\t\tmax-width: none;\n\t\tmax-height: none;\n\t\tbackground: transparent;\n\t\toverflow: visible;\n\t}\n`]\n\n\t@property({ type: String, reflect: true }) layout: OverlayLayout = 'sheet'\n\t@property({ type: Boolean, reflect: true }) dismissable = true\n\t@property({ type: Boolean, reflect: true }) modal = true\n\t@property({ type: String, reflect: true }) tier: OverlayTier = 'modal'\n\n\t@state() private active = false\n\t@state() private full = false\n\n\t@query('.backdrop') private backdrop?: HTMLDivElement\n\t@query('.surface') private surface!: HTMLElement\n\t@query('.shell') private shell?: HTMLElement\n\n\t/** Close trigger for the service; emits the reason + detail payload. */\n\treadonly #closed$ = new Subject<{ reason: CloseReason; result?: unknown }>()\n\n\tprivate mounted = false\n\tprivate closing = false\n\tprivate resolvedAnchor?: ResolvedAnchor\n\tprivate rawAnchor?: Anchor\n\tprivate anchorOriginAnchor?: Anchor\n\tprivate positionerTeardown?: () => void\n\tprivate factoryEffectDispose?: () => void\n\tprivate lastFocusedElement: HTMLElement | null = null\n\tprivate inertedSiblings: HTMLElement[] = []\n\tprivate lastReResolveAt = 0\n\n\t/** Service subscribes to this to know when the overlay dismissed. */\n\tget closed$(): import('rxjs').Observable<{ reason: CloseReason; result?: unknown }> {\n\t\treturn this.#closed$.asObservable()\n\t}\n\n\t/**\n\t * Mount content and animate in. Called by the service after the\n\t * element is attached to the DOM. Resolves when the entrance\n\t * animation completes.\n\t */\n\tasync open(content: Content, options: ShowOptions): Promise<void> {\n\t\tif (this.mounted) throw new Error('schmancy-overlay: open() called twice on the same element')\n\t\tthis.mounted = true\n\n\t\tthis.dismissable = options.dismissable !== false\n\t\tthis.full = options.full ?? false\n\t\tthis.rawAnchor = options.anchor\n\t\tthis.anchorOriginAnchor = options.anchor\n\t\tthis.resolvedAnchor = resolveAnchorRef(options.anchor)\n\n\t\t// Ensure the shell is rendered so the mount point exists.\n\t\tthis.active = true\n\t\tthis.setAttribute('active', '')\n\t\tawait this.updateComplete\n\n\t\tconst mount = this.renderRoot.querySelector(`#${MOUNT_POINT_ID}`) as HTMLElement | null\n\t\tif (!mount) throw new Error('schmancy-overlay: mount point missing')\n\t\tif (isTemplateFactory(content)) {\n\t\t\t// Factory content is reactive: re-run litRender whenever a signal the\n\t\t\t// factory reads changes. The overlay IS a SignalWatcher (SchmancyElement),\n\t\t\t// so its own effect loop owns tracking + scheduling + teardown. Content\n\t\t\t// stays in the light-DOM mount point — no shadow boundary, every event /\n\t\t\t// focus / ResizeObserver contract preserved.\n\t\t\tthis.factoryEffectDispose = this.updateEffect(() => litRender(content(), mount), {\n\t\t\t\tmanualDispose: true,\n\t\t\t})\n\t\t} else {\n\t\t\tawait mountContent(content, mount, options.props)\n\t\t}\n\n\t\t// Caller-forced layout (`as`) wins; otherwise resolver decides from anchor.\n\t\tthis.layout = options.as ?? resolveLayout({ anchor: options.anchor })\n\n\t\t// Modal is derived from layout: sheet is always modal, anchored never is.\n\t\tthis.modal = this.layout === 'sheet'\n\n\t\t// Pick the positioning tier. Modal layouts always use the 'modal'\n\t\t// tier (custom shell + manual backdrop); anchored uses the CAPS-driven\n\t\t// ladder. `modal: true` on an anchored layout stays modal.\n\t\tthis.tier = this.modal\n\t\t\t? 'modal'\n\t\t\t: this.resolvedAnchor\n\t\t\t\t? pickPositioner(this.resolvedAnchor)\n\t\t\t\t: 'modal'\n\n\t\tawait this.updateComplete\n\n\t\t// Apply tier-specific positioning. For 'modal' the CSS data-layout\n\t\t// attribute + :host styles already place the surface; nothing to do.\n\t\t// For anchored tiers we delegate to the positioning module.\n\t\tif (this.tier === 'css-anchor' && this.resolvedAnchor?.el && this.shadowRoot) {\n\t\t\tthis.positionerTeardown = positionCSSAnchor(this.surface, this.resolvedAnchor, this.shadowRoot, {\n\t\t\t\tid: `ov-${Math.random().toString(36).slice(2, 10)}`,\n\t\t\t\tplacement: options.preferredPlacement ?? 'bottom-start',\n\t\t\t})\n\t\t\t// Pair with Popover API to get native top-layer + light-dismiss.\n\t\t\tconst popoverCleanup = positionPopoverAPI(this.surface)\n\t\t\tconst cssAnchorTeardown = this.positionerTeardown\n\t\t\tthis.positionerTeardown = () => {\n\t\t\t\tpopoverCleanup()\n\t\t\t\tcssAnchorTeardown?.()\n\t\t\t}\n\t\t} else if (this.tier === 'popover-fui' && this.resolvedAnchor) {\n\t\t\tconst popoverCleanup = positionPopoverAPI(this.surface)\n\t\t\tconst floatSub = positionFloatingUI(this.surface, this.resolvedAnchor, {\n\t\t\t\tplacement: options.preferredPlacement ?? 'bottom-start',\n\t\t\t\toffsetPx: 8,\n\t\t\t\ttrack: options.track !== false,\n\t\t\t})\n\t\t\t\t.pipe(takeUntil(this.disconnecting))\n\t\t\t\t.subscribe()\n\t\t\tthis.positionerTeardown = () => {\n\t\t\t\tpopoverCleanup()\n\t\t\t\tfloatSub.unsubscribe()\n\t\t\t}\n\t\t} else if (this.tier === 'fui-only' && this.resolvedAnchor) {\n\t\t\tconst floatSub = positionFloatingUI(this.surface, this.resolvedAnchor, {\n\t\t\t\tplacement: options.preferredPlacement ?? 'bottom-start',\n\t\t\t\toffsetPx: 8,\n\t\t\t\ttrack: options.track !== false,\n\t\t\t})\n\t\t\t\t.pipe(takeUntil(this.disconnecting))\n\t\t\t\t.subscribe()\n\t\t\tthis.positionerTeardown = () => floatSub.unsubscribe()\n\t\t} else if (this.tier === 'modal' && this.shell) {\n\t\t\t// Promote the whole modal shell (scrim + surface) into the native\n\t\t\t// top layer — the same domain anchored tiers already use. The top\n\t\t\t// layer paints strictly in show() order, so a sheet opened from\n\t\t\t// inside an earlier anchored overlay correctly stacks above it\n\t\t\t// (and recedes behind anything opened after it). Degrade silently\n\t\t\t// to the legacy z-index host on browsers without the Popover API.\n\t\t\ttry {\n\t\t\t\tthis.positionerTeardown = positionPopoverAPI(this.shell)\n\t\t\t} catch {\n\t\t\t\t// no Popover API support — keep the host z-index:10000 path.\n\t\t\t}\n\t\t}\n\n\t\t// Set the anchor-origin CSS vars so the entrance animation blooms\n\t\t// from the click point. Must happen AFTER positioning so the\n\t\t// surface rect is final.\n\t\tthis.setAnchorOriginVars()\n\n\t\t// Wire close triggers (focus trap, Esc, backdrop click, etc).\n\t\tthis.wireFocusTrap()\n\t\tthis.wireCloseTriggers(options.signal)\n\n\t\t// Watch content for mid-session re-resolves (upward-only + cooldown).\n\t\tthis.wireResizeObserver(mount)\n\n\t\t// Play entrance animations.\n\t\tawait this.playAnimations('in')\n\t}\n\n\t/** Play exit animations then dismiss. */\n\tasync close(reason: CloseReason, result?: unknown): Promise<void> {\n\t\tif (this.closing || !this.mounted) return\n\t\tthis.closing = true\n\t\ttry {\n\t\t\tawait this.playAnimations('out')\n\t\t} catch {\n\t\t\t// animation cancelled mid-flight — not an error.\n\t\t}\n\t\tthis.releaseFocusTrap()\n\t\tif (this.factoryEffectDispose) {\n\t\t\ttry {\n\t\t\t\tthis.factoryEffectDispose()\n\t\t\t} catch {\n\t\t\t\t// cleanup shouldn't throw; ignore anything that does.\n\t\t\t}\n\t\t\tthis.factoryEffectDispose = undefined\n\t\t}\n\t\tif (this.positionerTeardown) {\n\t\t\ttry {\n\t\t\t\tthis.positionerTeardown()\n\t\t\t} catch {\n\t\t\t\t// cleanup shouldn't throw; ignore anything that does.\n\t\t\t}\n\t\t\tthis.positionerTeardown = undefined\n\t\t}\n\t\tthis.active = false\n\t\tthis.removeAttribute('active')\n\t\tthis.#closed$.next({ reason, result })\n\t\tthis.#closed$.complete()\n\t}\n\n\t/* ---------------- render ------------------------------------------- */\n\n\tprotected render(): TemplateResult {\n\t\tif (!this.active) return html``\n\t\tconst baseClasses =\n\t\t\t'surface fixed pointer-events-auto ' +\n\t\t\t'bg-surface-container/85 text-surface-on backdrop-blur-md ' +\n\t\t\t'border border-surface-on/8'\n\t\tconst layoutClasses =\n\t\t\tthis.layout === 'sheet'\n\t\t\t\t? this.full\n\t\t\t\t\t? 'left-0 right-0 bottom-0 w-full h-[90dvh] rounded-t-[28px] shadow-overlay flex flex-col overflow-hidden'\n\t\t\t\t\t: 'left-0 right-0 bottom-0 w-full max-h-[90dvh] rounded-t-[28px] shadow-overlay overflow-auto'\n\t\t\t\t: 'max-w-[min(480px,calc(100vw-2rem))] max-h-[90dvh] rounded-3xl shadow-overlay-anchored overflow-auto'\n\t\treturn html`\n\t\t\t<div class=\"shell fixed inset-0 pointer-events-none\" part=\"shell\">\n\t\t\t\t${when(\n\t\t\t\t\tthis.modal,\n\t\t\t\t\t() => html`<div class=\"backdrop fixed inset-0 pointer-events-auto\" part=\"backdrop\" @click=${this.onBackdropClick}></div>`,\n\t\t\t\t)}\n\t\t\t\t<section\n\t\t\t\t\tclass=\"${baseClasses} ${layoutClasses}\"\n\t\t\t\t\tpart=\"surface\"\n\t\t\t\t\tdata-layout=${this.layout}\n\t\t\t\t\tdata-tier=${this.tier}\n\t\t\t\t\trole=${this.modal ? 'dialog' : 'region'}\n\t\t\t\t\taria-modal=${this.modal ? 'true' : 'false'}\n\t\t\t\t\ttabindex=\"-1\"\n\t\t\t\t>\n\t\t\t\t\t<div id=${MOUNT_POINT_ID} class=${this.layout === 'sheet' && this.full ? 'flex-1 min-h-0 overflow-hidden' : ''}></div>\n\t\t\t\t</section>\n\t\t\t</div>\n\t\t`\n\t}\n\n\tprivate onBackdropClick = (): void => {\n\t\tif (this.dismissable) void this.close('backdrop')\n\t}\n\n\t/* ---------------- anchor-origin bloom ------------------------------ */\n\n\tprivate setAnchorOriginVars(): void {\n\t\tconst surface = this.surface\n\t\tif (!surface) return\n\t\tconst rect = surface.getBoundingClientRect()\n\t\tconst vars =\n\t\t\tthis.layout === 'sheet' && !this.anchorOriginAnchor\n\t\t\t\t? { '--schmancy-overlay-origin-x': '50%', '--schmancy-overlay-origin-y': '100%' }\n\t\t\t\t: anchorOriginVars(this.anchorOriginAnchor, rect)\n\t\tfor (const [k, v] of Object.entries(vars)) {\n\t\t\tsurface.style.setProperty(k, v)\n\t\t}\n\t}\n\n\t/* ---------------- focus trap --------------------------------------- */\n\n\tprivate wireFocusTrap(): void {\n\t\tif (!this.modal) return\n\t\tthis.lastFocusedElement = (document.activeElement as HTMLElement) ?? null\n\t\tconst parent = this.parentElement\n\t\tif (parent) {\n\t\t\tthis.inertedSiblings = []\n\t\t\tfor (const child of Array.from(parent.children)) {\n\t\t\t\tif (child !== this && child instanceof HTMLElement && !child.inert) {\n\t\t\t\t\tchild.inert = true\n\t\t\t\t\tthis.inertedSiblings.push(child)\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\t// Focus the surface or the first [autofocus] child.\n\t\tqueueMicrotask(() => {\n\t\t\tconst auto = this.surface?.querySelector<HTMLElement>('[autofocus]')\n\t\t\t;(auto ?? this.surface)?.focus()\n\t\t})\n\t}\n\n\tprivate releaseFocusTrap(): void {\n\t\tfor (const el of this.inertedSiblings) {\n\t\t\tel.inert = false\n\t\t}\n\t\tthis.inertedSiblings = []\n\t\ttry {\n\t\t\tthis.lastFocusedElement?.focus?.()\n\t\t} catch {\n\t\t\t// trigger may be detached now; no-op.\n\t\t}\n\t\tthis.lastFocusedElement = null\n\t}\n\n\t/* ---------------- close triggers ----------------------------------- */\n\n\tprivate wireCloseTriggers(signal?: AbortSignal): void {\n\t\tconst until = this.disconnecting\n\n\t\t// Handle already-aborted signal synchronously — no stream needed.\n\t\tif (signal?.aborted) {\n\t\t\tqueueMicrotask(() => void this.close('abort'))\n\t\t\treturn\n\t\t}\n\n\t\t// Structured close — content dispatches CustomEvent('close', { detail }).\n\t\tconst structured$ = fromEvent<CustomEvent>(this, 'close').pipe(\n\t\t\tfilter((e) => e instanceof CustomEvent),\n\t\t\ttap((e) => e.stopPropagation()),\n\t\t\tmap((e) => ({ reason: 'structured' as CloseReason, result: e.detail })),\n\t\t)\n\n\t\t// Native <form method=\"dialog\"> submission bubbles up as a regular\n\t\t// submit event with `submitter.value` (returnValue proxy for our\n\t\t// custom shell). Capture it and resolve with the string value.\n\t\tconst nativeSubmit$ = fromEvent<SubmitEvent>(this, 'submit').pipe(\n\t\t\tfilter((e) => {\n\t\t\t\tconst form = e.target as HTMLFormElement | null\n\t\t\t\treturn !!form && form.method === 'dialog'\n\t\t\t}),\n\t\t\ttap((e) => e.preventDefault()),\n\t\t\tmap((e) => {\n\t\t\t\tconst submitter = (e as SubmitEvent & { submitter?: HTMLButtonElement | HTMLInputElement })\n\t\t\t\t\t.submitter\n\t\t\t\treturn { reason: 'native-submit' as CloseReason, result: submitter?.value ?? '' }\n\t\t\t}),\n\t\t)\n\n\t\t// Manual Esc — all tiers. Modal has no native dismiss; anchored\n\t\t// tiers use `popover=\"manual\"` so the browser doesn't auto-Esc them\n\t\t// either (the auto popover-stack would close ancestor overlays when\n\t\t// a nested overlay opens — see positionPopoverAPI's comment).\n\t\tconst escape$ = fromEvent<KeyboardEvent>(document, 'keydown').pipe(\n\t\t\tfilter((e) => e.key === 'Escape'),\n\t\t\ttap((e) => e.preventDefault()),\n\t\t\tfilter(() => this.dismissable),\n\t\t\tmap(() => ({ reason: 'escape' as CloseReason })),\n\t\t\ttake(1),\n\t\t)\n\n\t\t// Manual outside-click — all anchored tiers. Modal layouts have a\n\t\t// backdrop that catches outside clicks via `onBackdropClick`; the\n\t\t// anchored tiers (no backdrop) need a document-level pointerdown\n\t\t// listener that ignores clicks whose composedPath includes the\n\t\t// surface or anchor. Use composedPath membership (not\n\t\t// `Node.contains`) so clicks on elements inside slotted /\n\t\t// shadow-DOM descendants of the surface are correctly classified\n\t\t// as \"inside\".\n\t\tconst outsideClick$ = this.tier !== 'modal'\n\t\t\t? fromEvent<PointerEvent>(document, 'pointerdown', { capture: true }).pipe(\n\t\t\t\tfilter((e) => {\n\t\t\t\t\tif (!this.dismissable) return false\n\t\t\t\t\tconst path = e.composedPath()\n\t\t\t\t\tif (this.surface && path.includes(this.surface)) return false\n\t\t\t\t\tif (this.resolvedAnchor?.el && path.includes(this.resolvedAnchor.el)) return false\n\t\t\t\t\t// Suppress dismiss when the click lands inside any overlay that sits\n\t\t\t\t\t// ABOVE this one in the stack (nested overlays sibling-appended to\n\t\t\t\t\t// body). Read the stack fresh per pointerdown — it mutates as overlays\n\t\t\t\t\t// open and close.\n\t\t\t\t\tconst stack = currentStack()\n\t\t\t\t\tconst myIndex = stack.findIndex((entry) => entry.element === this)\n\t\t\t\t\tif (myIndex !== -1) {\n\t\t\t\t\t\tfor (let i = myIndex + 1; i < stack.length; i++) {\n\t\t\t\t\t\t\tif (path.includes(stack[i].element)) return false\n\t\t\t\t\t\t\tconst aboveSurface = stack[i].element.shadowRoot?.querySelector('.surface')\n\t\t\t\t\t\t\tif (aboveSurface && path.includes(aboveSurface)) return false\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t\treturn true\n\t\t\t\t}),\n\t\t\t\tmap(() => ({ reason: 'backdrop' as CloseReason })),\n\t\t\t\ttake(1),\n\t\t\t)\n\t\t\t: null\n\n\t\t// Swipe-to-dismiss for sheet layout only. No visual drag handle —\n\t\t// the gesture starts from the top 40px of the surface (see\n\t\t// DRAG_START_TOP_PX in overlay.gestures). Escape + backdrop click\n\t\t// cover the other dismiss paths via the modal-tier listeners above.\n\t\tconst swipe$ = this.layout === 'sheet' && this.dismissable\n\t\t\t? swipeToDismiss$({ surface: this.surface, until$: merge(until, this.#closed$) }).pipe(\n\t\t\t\ttake(1),\n\t\t\t\tmap(() => ({ reason: 'swipe' as CloseReason })),\n\t\t\t)\n\t\t\t: null\n\n\t\t// AbortSignal — standard cancellation input.\n\t\tconst abort$ = signal\n\t\t\t? fromEvent(signal, 'abort').pipe(\n\t\t\t\ttake(1),\n\t\t\t\tmap(() => ({ reason: 'abort' as CloseReason })),\n\t\t\t)\n\t\t\t: null\n\n\t\tmerge(\n\t\t\tstructured$,\n\t\t\tnativeSubmit$,\n\t\t\tescape$,\n\t\t\toutsideClick$ ?? EMPTY,\n\t\t\tswipe$ ?? EMPTY,\n\t\t\tabort$ ?? EMPTY,\n\t\t)\n\t\t\t.pipe(takeUntil(until))\n\t\t\t.subscribe(({ reason, result }: { reason: CloseReason; result?: unknown }) => void this.close(reason, result))\n\t}\n\n\t/* ---------------- ResizeObserver FLIP re-resolve ------------------- */\n\n\tprivate wireResizeObserver(mount: HTMLElement): void {\n\t\tfromResizeObserver(mount)\n\t\t\t.pipe(\n\t\t\t\tmap((entries) => {\n\t\t\t\t\tconst entry = entries[0]\n\t\t\t\t\tif (!entry) return null\n\t\t\t\t\tconst box = entry.contentRect\n\t\t\t\t\treturn { w: box.width, h: box.height }\n\t\t\t\t}),\n\t\t\t\tfilter((v): v is { w: number; h: number } => v !== null),\n\t\t\t\tdistinctUntilChanged((a, b) => a.w === b.w && a.h === b.h),\n\t\t\t\tdebounceTime(80),\n\t\t\t\ttakeUntil(merge(this.disconnecting, this.#closed$)),\n\t\t\t)\n\t\t\t.subscribe(() => this.maybeReResolve())\n\t}\n\n\tprivate async maybeReResolve(): Promise<void> {\n\t\tif (this.closing) return\n\t\tconst next = resolveLayout({ anchor: this.rawAnchor })\n\t\tif (next === this.layout) return\n\t\t// Cooldown: prevent churn-driven bouncing.\n\t\tconst now = performance.now()\n\t\tif (now - this.lastReResolveAt < RE_RESOLVE_COOLDOWN_MS) return\n\t\t// Upward-only ratchet: centered → sheet on content-grow is OK,\n\t\t// sheet → centered on content-shrink is ignored.\n\t\tif (!isUpwardTransition(this.layout, next)) return\n\n\t\t// FLIP: capture `before` rect, apply new layout, capture `after`,\n\t\t// animate the inverse transform.\n\t\tconst surface = this.surface\n\t\tconst before = surface.getBoundingClientRect()\n\t\tthis.layout = next\n\t\tawait this.updateComplete\n\t\tconst after = surface.getBoundingClientRect()\n\t\tconst spec = flipAnimation(before, after)\n\t\ttry {\n\t\t\tawait surface.animate(spec.keyframes, spec.options).finished\n\t\t} catch {\n\t\t\t// cancelled — not an error.\n\t\t}\n\t\tthis.lastReResolveAt = performance.now()\n\t}\n\n\t/* ---------------- animations --------------------------------------- */\n\n\tprivate async playAnimations(direction: 'in' | 'out'): Promise<void> {\n\t\tconst surface = this.surface\n\t\tif (!surface) return\n\t\tconst spec = surfaceAnimation(this.layout, direction)\n\t\tconst tasks: Promise<unknown>[] = [\n\t\t\tsurface.animate(spec.keyframes, spec.options).finished.catch(() => undefined),\n\t\t]\n\t\tconst backdrop = this.backdrop\n\t\tif (this.modal && backdrop) {\n\t\t\ttasks.push(\n\t\t\t\tbackdrop\n\t\t\t\t\t.animate(\n\t\t\t\t\t\tdirection === 'in' ? [{ opacity: 0 }, { opacity: 1 }] : [{ opacity: 1 }, { opacity: 0 }],\n\t\t\t\t\t\t{ duration: spec.options.duration, easing: direction === 'in' ? 'ease-out' : 'ease-in', fill: 'forwards' },\n\t\t\t\t\t)\n\t\t\t\t\t.finished.catch(() => undefined),\n\t\t\t)\n\t\t}\n\t\tawait Promise.all(tasks)\n\t}\n}\n\ndeclare global {\n\tinterface HTMLElementTagNameMap {\n\t\t'schmancy-overlay': SchmancyOverlay\n\t}\n}\n\n/* ======================================================================= *\n * content mounting helpers *\n * ======================================================================= */\n\nasync function mountContent(\n\tcontent: Content,\n\thost: HTMLElement,\n\tprops?: Record<string, unknown>,\n): Promise<HTMLElement> {\n\t// TemplateResult — render via lit's `render`.\n\tif (isTemplateResult(content)) {\n\t\tlitRender(content, host)\n\t\treturn host\n\t}\n\n\t// Already-instantiated element — append directly.\n\tif (content instanceof HTMLElement) {\n\t\tif (props) Object.assign(content, props)\n\t\thost.appendChild(content)\n\t\treturn content\n\t}\n\n\t// LazyComponent — await the module, recurse with the default export.\n\t// Must precede the TemplateFactory check: a lazy loader is an arrow\n\t// function with no `prototype`, so isTemplateFactory would match it\n\t// first and call it as a factory.\n\tif (isLazy(content)) {\n\t\tconst mod = await content()\n\t\treturn mountContent(mod.default, host, props)\n\t}\n\n\t// TemplateFactory — call at mount time so closed-over variables are read lazily.\n\tif (isTemplateFactory(content)) {\n\t\treturn mountContent(content(), host, props)\n\t}\n\n\t// Class constructor.\n\tif (typeof content === 'function') {\n\t\tconst Ctor = content as unknown as { new (): HTMLElement }\n\t\tconst el = new Ctor()\n\t\tif (props) Object.assign(el, props)\n\t\thost.appendChild(el)\n\t\treturn el\n\t}\n\n\t// Tag name.\n\tif (typeof content === 'string') {\n\t\tconst el = document.createElement(content)\n\t\tif (props) Object.assign(el, props)\n\t\thost.appendChild(el)\n\t\treturn el\n\t}\n\n\tthrow new Error('schmancy-overlay: unsupported content type')\n}\n\nfunction isTemplateFactory(x: unknown): x is import('./overlay.types').TemplateFactory {\n\treturn typeof x === 'function' && !(x as { prototype?: unknown }).prototype\n}\n\nfunction isTemplateResult(x: unknown): x is TemplateResult {\n\treturn typeof x === 'object' && x !== null && '_$litType$' in x\n}\n\nfunction isLazy(x: unknown): x is LazyComponent {\n\treturn typeof x === 'function' && 'preload' in (x as object)\n}\n\nfunction isUpwardTransition(from: OverlayLayout, to: OverlayLayout): boolean {\n\t// Anchored → sheet is the only valid runtime transition (content\n\t// overflowed and the surface re-resolves to a sheet). Sheet stays sheet.\n\treturn from === 'anchored' && to === 'sheet'\n}\n"],"mappings":";;;;;;;;;;;;AAgDA,IAAI,IAAgB,EAAe;AACnC,EAAe,WAAW,MAAA;CACzB,IAAgB;AAAA,CAAA;AAGjB,IAAM,IAAe,+BACf,IAAe,+BACf,IAAa,OAAO,EAAA,aAA0B,EAAA;AAEpD,SAAS,EAAa,GAAA;CACrB,OAAI,OAAO,MAAM,CAAA,KAAA,CAAW,OAAO,SAAS,CAAA,IAAe,KACpD,KAAK,IAAI,GAAG,KAAK,IAAI,KAAK,CAAA,CAAA;AAClC;ACJA,SAAgB,EAAgB,GAAA;CAC/B,IAAA,EAAM,SAAE,GAAA,YAAS,GAAA,QAAY,MAAW;CAExC,OAAO,IAAI,GAAuB,MAAA;EACjC,IAAM,IAAa,KAAc,GAC3B,IAAe,IAAI,KAErB,IAAA,CAAW,GACX,IAAiC,MACjC,IAAS,GACT,IAAY,GACZ,IAAe;EA0FnB,OAJA,EApFqB,EAAwB,GAAY,aAAA,EAAe,KAGvE,GAAQ,MAA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