@mhmo91/schmancy 0.9.25 → 0.9.26

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 (331) hide show
  1. package/dist/agent/schmancy.agent.js +130 -2
  2. package/dist/agent/schmancy.agent.js.map +1 -1
  3. package/dist/agent/schmancy.manifest.json +136 -1
  4. package/dist/{area-CfozaCAZ.js → area-BGBCMC79.js} +1 -1
  5. package/dist/{area-CfozaCAZ.js.map → area-BGBCMC79.js.map} +1 -1
  6. package/dist/{area-CFLFXu0Z.cjs → area-D7l9KR2N.cjs} +1 -1
  7. package/dist/{area-CFLFXu0Z.cjs.map → area-D7l9KR2N.cjs.map} +1 -1
  8. package/dist/area.cjs +1 -1
  9. package/dist/area.js +1 -1
  10. package/dist/{autocomplete-NDvRW_Xs.cjs → autocomplete-BPD5uraA.cjs} +1 -1
  11. package/dist/{autocomplete-NDvRW_Xs.cjs.map → autocomplete-BPD5uraA.cjs.map} +1 -1
  12. package/dist/{autocomplete-BNjcQ743.js → autocomplete-C2P0Soht.js} +2 -2
  13. package/dist/{autocomplete-BNjcQ743.js.map → autocomplete-C2P0Soht.js.map} +1 -1
  14. package/dist/autocomplete.cjs +1 -1
  15. package/dist/autocomplete.js +1 -1
  16. package/dist/badge.cjs +1 -1
  17. package/dist/badge.js +1 -1
  18. package/dist/{boat-ZA47HbKj.cjs → boat-BkIO-0No.cjs} +1 -1
  19. package/dist/{boat-ZA47HbKj.cjs.map → boat-BkIO-0No.cjs.map} +1 -1
  20. package/dist/{boat-DxplbTDW.js → boat-DXZ0k7oa.js} +1 -1
  21. package/dist/{boat-DxplbTDW.js.map → boat-DXZ0k7oa.js.map} +1 -1
  22. package/dist/boat.cjs +1 -1
  23. package/dist/boat.js +1 -1
  24. package/dist/breadcrumb.cjs +1 -1
  25. package/dist/breadcrumb.js +1 -1
  26. package/dist/{busy-BuHEz1uo.cjs → busy-DGYhpTnO.cjs} +1 -1
  27. package/dist/{busy-BuHEz1uo.cjs.map → busy-DGYhpTnO.cjs.map} +1 -1
  28. package/dist/{busy-QZxs4u8B.js → busy-iRjq6Nvd.js} +1 -1
  29. package/dist/{busy-QZxs4u8B.js.map → busy-iRjq6Nvd.js.map} +1 -1
  30. package/dist/busy.cjs +1 -1
  31. package/dist/busy.js +1 -1
  32. package/dist/button.cjs +1 -1
  33. package/dist/button.js +3 -3
  34. package/dist/{card-DtN6p1Jq.cjs → card-DjYnCckw.cjs} +1 -1
  35. package/dist/{card-DtN6p1Jq.cjs.map → card-DjYnCckw.cjs.map} +1 -1
  36. package/dist/{card-CTUaARLm.js → card-wUTjx0EC.js} +1 -1
  37. package/dist/{card-CTUaARLm.js.map → card-wUTjx0EC.js.map} +1 -1
  38. package/dist/card.cjs +1 -1
  39. package/dist/card.js +1 -1
  40. package/dist/charts.cjs +1 -1
  41. package/dist/charts.js +1 -1
  42. package/dist/{checkbox-DEKQLJYR.cjs → checkbox-CiYEtw9F.cjs} +1 -1
  43. package/dist/{checkbox-DEKQLJYR.cjs.map → checkbox-CiYEtw9F.cjs.map} +1 -1
  44. package/dist/{checkbox-D4cUb1T3.js → checkbox-VBSenxgb.js} +1 -1
  45. package/dist/{checkbox-D4cUb1T3.js.map → checkbox-VBSenxgb.js.map} +1 -1
  46. package/dist/checkbox.cjs +1 -1
  47. package/dist/checkbox.js +1 -1
  48. package/dist/{chips-DhAWrSgi.js → chips-BDS9lkPa.js} +3 -3
  49. package/dist/{chips-DhAWrSgi.js.map → chips-BDS9lkPa.js.map} +1 -1
  50. package/dist/{chips-B-27tj7O.cjs → chips-D6ptH5re.cjs} +1 -1
  51. package/dist/{chips-B-27tj7O.cjs.map → chips-D6ptH5re.cjs.map} +1 -1
  52. package/dist/chips.cjs +1 -1
  53. package/dist/chips.js +2 -2
  54. package/dist/{code-highlight-DgZKqo4P.js → code-highlight-Bi91XHJN.js} +1 -1
  55. package/dist/{code-highlight-DgZKqo4P.js.map → code-highlight-Bi91XHJN.js.map} +1 -1
  56. package/dist/{code-highlight-_ZK6FEjF.cjs → code-highlight-BzRmBZzz.cjs} +1 -1
  57. package/dist/{code-highlight-_ZK6FEjF.cjs.map → code-highlight-BzRmBZzz.cjs.map} +1 -1
  58. package/dist/code-highlight.cjs +1 -1
  59. package/dist/code-highlight.js +1 -1
  60. package/dist/{components-JHIoVqFd.js → components-DZgJWHdZ.js} +1 -1
  61. package/dist/{components-JHIoVqFd.js.map → components-DZgJWHdZ.js.map} +1 -1
  62. package/dist/{components-DUiF-_Ul.cjs → components-DkmEgyAc.cjs} +1 -1
  63. package/dist/{components-DUiF-_Ul.cjs.map → components-DkmEgyAc.cjs.map} +1 -1
  64. package/dist/components.cjs +1 -1
  65. package/dist/components.js +1 -1
  66. package/dist/connectivity.cjs +1 -1
  67. package/dist/connectivity.js +1 -1
  68. package/dist/content-drawer.cjs +1 -1
  69. package/dist/content-drawer.js +1 -1
  70. package/dist/context-BerzpUhI.js +3 -0
  71. package/dist/{context-BCFNNkes.js.map → context-BerzpUhI.js.map} +1 -1
  72. package/dist/context-C6dHUHhi.cjs +1 -0
  73. package/dist/{context-6t-yayy3.cjs.map → context-C6dHUHhi.cjs.map} +1 -1
  74. package/dist/{date-range-CrAIk8dg.cjs → date-range-BmFxTXiU.cjs} +1 -1
  75. package/dist/{date-range-CrAIk8dg.cjs.map → date-range-BmFxTXiU.cjs.map} +1 -1
  76. package/dist/{date-range-B1FDRGRB.js → date-range-ClTMg1AB.js} +2 -2
  77. package/dist/{date-range-B1FDRGRB.js.map → date-range-ClTMg1AB.js.map} +1 -1
  78. package/dist/date-range.cjs +1 -1
  79. package/dist/date-range.js +1 -1
  80. package/dist/{delay-DCp_QEct.cjs → delay-BHODnTg-.cjs} +1 -1
  81. package/dist/{delay-DCp_QEct.cjs.map → delay-BHODnTg-.cjs.map} +1 -1
  82. package/dist/{delay-Cs0i_CpQ.js → delay-Dlk0A3he.js} +3 -3
  83. package/dist/{delay-Cs0i_CpQ.js.map → delay-Dlk0A3he.js.map} +1 -1
  84. package/dist/delay.cjs +1 -1
  85. package/dist/delay.js +1 -1
  86. package/dist/{details-CBoXUDlQ.js → details-CPjlqQD4.js} +1 -1
  87. package/dist/{details-CBoXUDlQ.js.map → details-CPjlqQD4.js.map} +1 -1
  88. package/dist/{details-BJTR16AV.cjs → details-Cz9ok9si.cjs} +1 -1
  89. package/dist/{details-BJTR16AV.cjs.map → details-Cz9ok9si.cjs.map} +1 -1
  90. package/dist/details.cjs +1 -1
  91. package/dist/details.js +1 -1
  92. package/dist/dialog.cjs +1 -1
  93. package/dist/dialog.js +1 -1
  94. package/dist/{divider-D6MRonTS.cjs → divider-CILo3_vi.cjs} +1 -1
  95. package/dist/{divider-D6MRonTS.cjs.map → divider-CILo3_vi.cjs.map} +1 -1
  96. package/dist/{divider-DivkYKa_.js → divider-ghgyw5CU.js} +1 -1
  97. package/dist/{divider-DivkYKa_.js.map → divider-ghgyw5CU.js.map} +1 -1
  98. package/dist/divider.cjs +1 -1
  99. package/dist/divider.js +1 -1
  100. package/dist/dropdown.cjs +1 -1
  101. package/dist/dropdown.js +2 -2
  102. package/dist/{expand-BvAVo29n.js → expand-CbjBr_Ds.js} +2 -2
  103. package/dist/{expand-BvAVo29n.js.map → expand-CbjBr_Ds.js.map} +1 -1
  104. package/dist/{expand-Dd0H6y8Z.cjs → expand-r3OrSoDk.cjs} +1 -1
  105. package/dist/{expand-Dd0H6y8Z.cjs.map → expand-r3OrSoDk.cjs.map} +1 -1
  106. package/dist/expand.cjs +1 -1
  107. package/dist/expand.js +1 -1
  108. package/dist/{extra-CdOUiB0K.cjs → extra-BZeZOMBI.cjs} +1 -1
  109. package/dist/{extra-CdOUiB0K.cjs.map → extra-BZeZOMBI.cjs.map} +1 -1
  110. package/dist/{extra-0MZSXbOH.js → extra-DK9MQtPJ.js} +1 -1
  111. package/dist/{extra-0MZSXbOH.js.map → extra-DK9MQtPJ.js.map} +1 -1
  112. package/dist/extra.cjs +1 -1
  113. package/dist/extra.js +1 -1
  114. package/dist/{float-D_u8mDNa.js → float-BfCvGeY9.js} +1 -1
  115. package/dist/{float-D_u8mDNa.js.map → float-BfCvGeY9.js.map} +1 -1
  116. package/dist/{float-ByW-Gth3.cjs → float-CuZ8LOgB.cjs} +1 -1
  117. package/dist/{float-ByW-Gth3.cjs.map → float-CuZ8LOgB.cjs.map} +1 -1
  118. package/dist/float.cjs +1 -1
  119. package/dist/float.js +1 -1
  120. package/dist/handover/agent-runtime-followups.md +1 -1
  121. package/dist/handover/agent-runtime-v1.md +3 -3
  122. package/dist/handover/agent-runtime-v2-loopback.md +5 -5
  123. package/dist/handover/schmancy-token-reference.md +198 -0
  124. package/dist/{icons-24zlLf1q.js → icons-Drq4kKy2.js} +2 -2
  125. package/dist/{icons-24zlLf1q.js.map → icons-Drq4kKy2.js.map} +1 -1
  126. package/dist/{icons-BpHN4Z8q.cjs → icons-DtdhaZdc.cjs} +1 -1
  127. package/dist/{icons-BpHN4Z8q.cjs.map → icons-DtdhaZdc.cjs.map} +1 -1
  128. package/dist/icons.cjs +1 -1
  129. package/dist/icons.js +1 -1
  130. package/dist/{iframe-BXzYZu9_.cjs → iframe-BkwwWIbQ.cjs} +1 -1
  131. package/dist/{iframe-BXzYZu9_.cjs.map → iframe-BkwwWIbQ.cjs.map} +1 -1
  132. package/dist/{iframe-B_QrvTmj.js → iframe-BmyHW8km.js} +1 -1
  133. package/dist/{iframe-B_QrvTmj.js.map → iframe-BmyHW8km.js.map} +1 -1
  134. package/dist/iframe.cjs +1 -1
  135. package/dist/iframe.js +1 -1
  136. package/dist/index.cjs +1 -1
  137. package/dist/index.js +30 -30
  138. package/dist/{input-chip-C09B0L1y.js → input-chip-BQrjpjaQ.js} +1 -1
  139. package/dist/{input-chip-C09B0L1y.js.map → input-chip-BQrjpjaQ.js.map} +1 -1
  140. package/dist/{input-chip-FZEpuSaX.cjs → input-chip-DN-cwf11.cjs} +1 -1
  141. package/dist/{input-chip-FZEpuSaX.cjs.map → input-chip-DN-cwf11.cjs.map} +1 -1
  142. package/dist/json.cjs +1 -1
  143. package/dist/json.js +2 -2
  144. package/dist/kbd.cjs +1 -1
  145. package/dist/kbd.js +1 -1
  146. package/dist/{layout-Bst19YG8.cjs → layout-7eyMBmZk.cjs} +1 -1
  147. package/dist/{layout-Bst19YG8.cjs.map → layout-7eyMBmZk.cjs.map} +1 -1
  148. package/dist/{layout-aTtUdGAi.js → layout-Ox6nJkzC.js} +2 -2
  149. package/dist/{layout-aTtUdGAi.js.map → layout-Ox6nJkzC.js.map} +1 -1
  150. package/dist/layout.cjs +1 -1
  151. package/dist/layout.js +2 -2
  152. package/dist/{lightbox-Cb5-XPWV.js → lightbox-CY52Z_ig.js} +2 -2
  153. package/dist/{lightbox-Cb5-XPWV.js.map → lightbox-CY52Z_ig.js.map} +1 -1
  154. package/dist/{lightbox-Dk2ICCBB.cjs → lightbox-H8Uq3AXy.cjs} +1 -1
  155. package/dist/{lightbox-Dk2ICCBB.cjs.map → lightbox-H8Uq3AXy.cjs.map} +1 -1
  156. package/dist/lightbox.cjs +1 -1
  157. package/dist/lightbox.js +1 -1
  158. package/dist/{list-DBiecR1i.cjs → list-BGjVo6zb.cjs} +1 -1
  159. package/dist/{list-DBiecR1i.cjs.map → list-BGjVo6zb.cjs.map} +1 -1
  160. package/dist/{list-DZWoCb3V.js → list-D7wUxu1C.js} +2 -2
  161. package/dist/{list-DZWoCb3V.js.map → list-D7wUxu1C.js.map} +1 -1
  162. package/dist/list.cjs +1 -1
  163. package/dist/list.js +1 -1
  164. package/dist/{litElement.mixin-BuZ28ZzP.js → litElement.mixin-CszkJuNl.js} +1 -1
  165. package/dist/{litElement.mixin-BuZ28ZzP.js.map → litElement.mixin-CszkJuNl.js.map} +1 -1
  166. package/dist/{litElement.mixin-lYlKxxjR.cjs → litElement.mixin-qh5-IIUq.cjs} +1 -1
  167. package/dist/{litElement.mixin-lYlKxxjR.cjs.map → litElement.mixin-qh5-IIUq.cjs.map} +1 -1
  168. package/dist/{mailbox-laG7nvXl.js → mailbox--EN-JhjV.js} +4 -4
  169. package/dist/{mailbox-laG7nvXl.js.map → mailbox--EN-JhjV.js.map} +1 -1
  170. package/dist/{mailbox-BYNmcNIM.cjs → mailbox-DLiBGJhY.cjs} +1 -1
  171. package/dist/{mailbox-BYNmcNIM.cjs.map → mailbox-DLiBGJhY.cjs.map} +1 -1
  172. package/dist/mailbox.cjs +1 -1
  173. package/dist/mailbox.js +1 -1
  174. package/dist/{map-YSAPFrH9.js → map-B0S_q3ma.js} +1 -1
  175. package/dist/{map-YSAPFrH9.js.map → map-B0S_q3ma.js.map} +1 -1
  176. package/dist/{map-7_cexh1e.cjs → map-EDQN0I6e.cjs} +1 -1
  177. package/dist/{map-7_cexh1e.cjs.map → map-EDQN0I6e.cjs.map} +1 -1
  178. package/dist/map.cjs +1 -1
  179. package/dist/map.js +1 -1
  180. package/dist/{menu-RaeiF4Ja.cjs → menu-3edZGQ1x.cjs} +1 -1
  181. package/dist/{menu-RaeiF4Ja.cjs.map → menu-3edZGQ1x.cjs.map} +1 -1
  182. package/dist/{menu-DeNdlsSV.js → menu-COeFpb6n.js} +1 -1
  183. package/dist/{menu-DeNdlsSV.js.map → menu-COeFpb6n.js.map} +1 -1
  184. package/dist/menu.cjs +1 -1
  185. package/dist/menu.js +1 -1
  186. package/dist/metric.cjs +1 -1
  187. package/dist/metric.js +1 -1
  188. package/dist/mixins.cjs +1 -1
  189. package/dist/mixins.js +2 -2
  190. package/dist/nav-drawer.cjs +1 -1
  191. package/dist/nav-drawer.js +1 -1
  192. package/dist/navigation-bar.cjs +1 -1
  193. package/dist/navigation-bar.js +1 -1
  194. package/dist/navigation-rail.cjs +1 -1
  195. package/dist/navigation-rail.js +1 -1
  196. package/dist/{notification-DRPjMDli.js → notification-CC-TFN5v.js} +2 -2
  197. package/dist/{notification-DRPjMDli.js.map → notification-CC-TFN5v.js.map} +1 -1
  198. package/dist/{notification-DqWW2oh9.cjs → notification-P4c-kFdH.cjs} +1 -1
  199. package/dist/{notification-DqWW2oh9.cjs.map → notification-P4c-kFdH.cjs.map} +1 -1
  200. package/dist/notification.cjs +1 -1
  201. package/dist/notification.js +1 -1
  202. package/dist/{option-N3wlHTc9.js → option-BwAF4nAw.js} +1 -1
  203. package/dist/{option-N3wlHTc9.js.map → option-BwAF4nAw.js.map} +1 -1
  204. package/dist/{option-1lYctKVI.cjs → option-Cu0ertuF.cjs} +1 -1
  205. package/dist/{option-1lYctKVI.cjs.map → option-Cu0ertuF.cjs.map} +1 -1
  206. package/dist/option.cjs +1 -1
  207. package/dist/option.js +1 -1
  208. package/dist/overlay.cjs +1 -1
  209. package/dist/overlay.js +1 -1
  210. package/dist/page.cjs +1 -1
  211. package/dist/page.js +2 -2
  212. package/dist/{progress-DhcXo8r-.js → progress-Bk_Q1Shy.js} +1 -1
  213. package/dist/{progress-DhcXo8r-.js.map → progress-Bk_Q1Shy.js.map} +1 -1
  214. package/dist/{progress-YOuASkdz.cjs → progress-Yz6EMNSu.cjs} +1 -1
  215. package/dist/{progress-YOuASkdz.cjs.map → progress-Yz6EMNSu.cjs.map} +1 -1
  216. package/dist/progress.cjs +1 -1
  217. package/dist/progress.js +1 -1
  218. package/dist/{provide-B7b5TOCD.cjs → provide-CYgj58u_.cjs} +1 -1
  219. package/dist/{provide-B7b5TOCD.cjs.map → provide-CYgj58u_.cjs.map} +1 -1
  220. package/dist/{provide-uCFRzgWs.js → provide-ydIskwf2.js} +1 -1
  221. package/dist/{provide-uCFRzgWs.js.map → provide-ydIskwf2.js.map} +1 -1
  222. package/dist/qr-scanner.cjs +1 -1
  223. package/dist/qr-scanner.js +1 -1
  224. package/dist/{radio-group-DchZApJl.js → radio-group-BcdcjLNC.js} +1 -1
  225. package/dist/{radio-group-DchZApJl.js.map → radio-group-BcdcjLNC.js.map} +1 -1
  226. package/dist/{radio-group-DYvIgv3P.cjs → radio-group-BpBz5tRA.cjs} +1 -1
  227. package/dist/{radio-group-DYvIgv3P.cjs.map → radio-group-BpBz5tRA.cjs.map} +1 -1
  228. package/dist/radio-group.cjs +1 -1
  229. package/dist/radio-group.js +1 -1
  230. package/dist/range.cjs +1 -1
  231. package/dist/range.js +1 -1
  232. package/dist/{scroll-G2YnteF9.js → scroll-DXQv0ejL.js} +1 -1
  233. package/dist/{scroll-G2YnteF9.js.map → scroll-DXQv0ejL.js.map} +1 -1
  234. package/dist/{scroll-BKn4essm.cjs → scroll-DbZMTv0K.cjs} +1 -1
  235. package/dist/{scroll-BKn4essm.cjs.map → scroll-DbZMTv0K.cjs.map} +1 -1
  236. package/dist/{select-CQGKkEZc.cjs → select-BV4lK2zy.cjs} +1 -1
  237. package/dist/{select-CQGKkEZc.cjs.map → select-BV4lK2zy.cjs.map} +1 -1
  238. package/dist/{select-Bydjuia9.js → select-DKyGWDsG.js} +1 -1
  239. package/dist/{select-Bydjuia9.js.map → select-DKyGWDsG.js.map} +1 -1
  240. package/dist/select.cjs +1 -1
  241. package/dist/select.js +1 -1
  242. package/dist/{sheet-BCxpHT62.cjs → sheet-BAI_jH1t.cjs} +1 -1
  243. package/dist/{sheet-BCxpHT62.cjs.map → sheet-BAI_jH1t.cjs.map} +1 -1
  244. package/dist/{sheet-DGfh9VSs.js → sheet-C3TLKItO.js} +3 -3
  245. package/dist/{sheet-DGfh9VSs.js.map → sheet-C3TLKItO.js.map} +1 -1
  246. package/dist/sheet.cjs +1 -1
  247. package/dist/sheet.js +2 -2
  248. package/dist/{sheet.service-Dy_fwQqQ.js → sheet.service-Dlv20Zfc.js} +1 -1
  249. package/dist/{sheet.service-Dy_fwQqQ.js.map → sheet.service-Dlv20Zfc.js.map} +1 -1
  250. package/dist/{sheet.service-B-RxqhpO.cjs → sheet.service-RcDBwHmv.cjs} +1 -1
  251. package/dist/{sheet.service-B-RxqhpO.cjs.map → sheet.service-RcDBwHmv.cjs.map} +1 -1
  252. package/dist/skeleton.cjs +1 -1
  253. package/dist/skeleton.js +1 -1
  254. package/dist/slider.cjs +1 -1
  255. package/dist/slider.js +1 -1
  256. package/dist/{splash-screen-Clv-5vsb.js → splash-screen-DbI5RgBf.js} +1 -1
  257. package/dist/{splash-screen-Clv-5vsb.js.map → splash-screen-DbI5RgBf.js.map} +1 -1
  258. package/dist/{splash-screen-C2xsOEdx.cjs → splash-screen-DoHRTHi8.cjs} +1 -1
  259. package/dist/{splash-screen-C2xsOEdx.cjs.map → splash-screen-DoHRTHi8.cjs.map} +1 -1
  260. package/dist/splash-screen.cjs +1 -1
  261. package/dist/splash-screen.js +1 -1
  262. package/dist/{src-DNuhxDig.js → src-00DfxCJq.js} +39 -39
  263. package/dist/{src-DNuhxDig.js.map → src-00DfxCJq.js.map} +1 -1
  264. package/dist/{src-Ci10_Iwf.cjs → src-C_JjQovE.cjs} +1 -1
  265. package/dist/{src-Ci10_Iwf.cjs.map → src-C_JjQovE.cjs.map} +1 -1
  266. package/dist/steps.cjs +1 -1
  267. package/dist/steps.js +3 -3
  268. package/dist/{surface-fEmoN08Y.cjs → surface-D-GWBcsh.cjs} +1 -1
  269. package/dist/{surface-fEmoN08Y.cjs.map → surface-D-GWBcsh.cjs.map} +1 -1
  270. package/dist/{surface-BWcq30OL.js → surface-D23JtxYP.js} +2 -2
  271. package/dist/{surface-BWcq30OL.js.map → surface-D23JtxYP.js.map} +1 -1
  272. package/dist/surface.cjs +1 -1
  273. package/dist/surface.js +1 -1
  274. package/dist/switch.cjs +1 -1
  275. package/dist/switch.js +1 -1
  276. package/dist/{table-ChHS4xby.cjs → table-C7b73kdg.cjs} +1 -1
  277. package/dist/{table-ChHS4xby.cjs.map → table-C7b73kdg.cjs.map} +1 -1
  278. package/dist/{table-B8H-zioX.js → table-CTrhV9-k.js} +1 -1
  279. package/dist/{table-B8H-zioX.js.map → table-CTrhV9-k.js.map} +1 -1
  280. package/dist/table.cjs +1 -1
  281. package/dist/table.js +1 -1
  282. package/dist/{tabs-DB5kSuGL.js → tabs-Ce55RbwF.js} +2 -2
  283. package/dist/{tabs-DB5kSuGL.js.map → tabs-Ce55RbwF.js.map} +1 -1
  284. package/dist/{tabs-DGmbqqBD.cjs → tabs-DAzB8O7w.cjs} +1 -1
  285. package/dist/{tabs-DGmbqqBD.cjs.map → tabs-DAzB8O7w.cjs.map} +1 -1
  286. package/dist/tabs.cjs +1 -1
  287. package/dist/tabs.js +1 -1
  288. package/dist/tailwind.mixin-DRI1oTYQ.cjs +2 -0
  289. package/dist/{tailwind.mixin-BHX99hgX.cjs.map → tailwind.mixin-DRI1oTYQ.cjs.map} +1 -1
  290. package/dist/tailwind.mixin-mdQR3BEO.js +219 -0
  291. package/dist/{tailwind.mixin-DIEGVcl3.js.map → tailwind.mixin-mdQR3BEO.js.map} +1 -1
  292. package/dist/teleport.cjs +1 -1
  293. package/dist/teleport.js +1 -1
  294. package/dist/{textarea-O9A58OZA.js → textarea-DjN1D9u0.js} +1 -1
  295. package/dist/{textarea-O9A58OZA.js.map → textarea-DjN1D9u0.js.map} +1 -1
  296. package/dist/{textarea-CfQnghhD.cjs → textarea-PuHxBvJA.cjs} +1 -1
  297. package/dist/{textarea-CfQnghhD.cjs.map → textarea-PuHxBvJA.cjs.map} +1 -1
  298. package/dist/textarea.cjs +1 -1
  299. package/dist/textarea.js +1 -1
  300. package/dist/{theme-BjnQjhR0.cjs → theme-B-IJ2r7Q.cjs} +1 -1
  301. package/dist/{theme-BjnQjhR0.cjs.map → theme-B-IJ2r7Q.cjs.map} +1 -1
  302. package/dist/{theme-button-CaxDEneM.cjs → theme-button-BSbYmS4p.cjs} +1 -1
  303. package/dist/{theme-button-CaxDEneM.cjs.map → theme-button-BSbYmS4p.cjs.map} +1 -1
  304. package/dist/{theme-button-ByImreDw.js → theme-button-CEMeAUOL.js} +1 -1
  305. package/dist/{theme-button-ByImreDw.js.map → theme-button-CEMeAUOL.js.map} +1 -1
  306. package/dist/theme-button.cjs +1 -1
  307. package/dist/theme-button.js +1 -1
  308. package/dist/{theme-DvCKLRkt.js → theme-pbxlt72h.js} +3 -3
  309. package/dist/{theme-DvCKLRkt.js.map → theme-pbxlt72h.js.map} +1 -1
  310. package/dist/theme.cjs +1 -1
  311. package/dist/theme.js +2 -2
  312. package/dist/tree.cjs +1 -1
  313. package/dist/tree.js +1 -1
  314. package/dist/typewriter.cjs +1 -1
  315. package/dist/typewriter.js +3 -3
  316. package/dist/typography.cjs +1 -1
  317. package/dist/typography.js +1 -1
  318. package/dist/visually-hidden.cjs +1 -1
  319. package/dist/visually-hidden.js +1 -1
  320. package/dist/{window-C8kImMiI.js → window-CrjZdf7Y.js} +1 -1
  321. package/dist/{window-C8kImMiI.js.map → window-CrjZdf7Y.js.map} +1 -1
  322. package/dist/{window-BhrSdbk2.cjs → window-DTUARSrU.cjs} +1 -1
  323. package/dist/{window-BhrSdbk2.cjs.map → window-DTUARSrU.cjs.map} +1 -1
  324. package/dist/window.cjs +1 -1
  325. package/dist/window.js +1 -1
  326. package/package.json +1 -1
  327. package/src/agent/virtual-manifest.d.ts +12 -1
  328. package/dist/context-6t-yayy3.cjs +0 -1
  329. package/dist/context-BCFNNkes.js +0 -3
  330. package/dist/tailwind.mixin-BHX99hgX.cjs +0 -2
  331. package/dist/tailwind.mixin-DIEGVcl3.js +0 -219
package/dist/theme.cjs CHANGED
@@ -1 +1 @@
1
- Object.defineProperty(exports,Symbol.toStringTag,{value:`Module`});const e=require(`./tailwind.mixin-BHX99hgX.cjs`),t=require(`./theme.events-DakXxZeP.cjs`),n=require(`./theme.service-DxJPUGlu.cjs`),r=require(`./theme.interface-DTwkuAKJ.cjs`),i=require(`./theme-BjnQjhR0.cjs`);exports.SchmancyGenerateMoodAudioEvent=i.n,exports.SchmancyTheme=r.t,Object.defineProperty(exports,`SchmancyThemeAudioPlayer`,{enumerable:!0,get:function(){return i.r}}),Object.defineProperty(exports,`SchmancyThemeComponent`,{enumerable:!0,get:function(){return i.a}}),Object.defineProperty(exports,`SchmancyThemeController`,{enumerable:!0,get:function(){return i.i}}),Object.defineProperty(exports,`SchmancyThemeControllerBoat`,{enumerable:!0,get:function(){return i.t}}),exports.ThemeHereIAm=t.t,exports.ThemeWhereAreYou=t.n,exports.createDarkTonalPaletteFromBaseColor=i.s,exports.createLightTonalPaletteFromBaseColor=i.c,exports.formatTheme=i.l,exports.schmancyTheme=n.t,exports.tailwindStyles=i.o,exports.theme=n.n,exports.themeContext=e.i;
1
+ Object.defineProperty(exports,Symbol.toStringTag,{value:`Module`});const e=require(`./tailwind.mixin-DRI1oTYQ.cjs`),t=require(`./theme.events-DakXxZeP.cjs`),n=require(`./theme.service-DxJPUGlu.cjs`),r=require(`./theme.interface-DTwkuAKJ.cjs`),i=require(`./theme-B-IJ2r7Q.cjs`);exports.SchmancyGenerateMoodAudioEvent=i.n,exports.SchmancyTheme=r.t,Object.defineProperty(exports,`SchmancyThemeAudioPlayer`,{enumerable:!0,get:function(){return i.r}}),Object.defineProperty(exports,`SchmancyThemeComponent`,{enumerable:!0,get:function(){return i.a}}),Object.defineProperty(exports,`SchmancyThemeController`,{enumerable:!0,get:function(){return i.i}}),Object.defineProperty(exports,`SchmancyThemeControllerBoat`,{enumerable:!0,get:function(){return i.t}}),exports.ThemeHereIAm=t.t,exports.ThemeWhereAreYou=t.n,exports.createDarkTonalPaletteFromBaseColor=i.s,exports.createLightTonalPaletteFromBaseColor=i.c,exports.formatTheme=i.l,exports.schmancyTheme=n.t,exports.tailwindStyles=i.o,exports.theme=n.n,exports.themeContext=e.i;
package/dist/theme.js CHANGED
@@ -1,6 +1,6 @@
1
- import { i as e } from "./tailwind.mixin-DIEGVcl3.js";
1
+ import { i as e } from "./tailwind.mixin-mdQR3BEO.js";
2
2
  import { n as t, t as n } from "./theme.events-NuihzD_p.js";
3
3
  import { n as r, t as i } from "./theme.service-cOfPrtfe.js";
4
4
  import { t as a } from "./theme.interface-Buged9Cg.js";
5
- import { a as o, c as s, i as c, l, n as u, o as d, r as f, s as p, t as m } from "./theme-DvCKLRkt.js";
5
+ import { a as o, c as s, i as c, l, n as u, o as d, r as f, s as p, t as m } from "./theme-pbxlt72h.js";
6
6
  export { u as SchmancyGenerateMoodAudioEvent, a as SchmancyTheme, f as SchmancyThemeAudioPlayer, o as SchmancyThemeComponent, c as SchmancyThemeController, m as SchmancyThemeControllerBoat, n as ThemeHereIAm, t as ThemeWhereAreYou, p as createDarkTonalPaletteFromBaseColor, s as createLightTonalPaletteFromBaseColor, l as formatTheme, i as schmancyTheme, d as tailwindStyles, r as theme, e as themeContext };
package/dist/tree.cjs CHANGED
@@ -1,4 +1,4 @@
1
- Object.defineProperty(exports,Symbol.toStringTag,{value:`Module`}),require(`./chunk-CncqDLb2.cjs`);const e=require(`./tailwind.mixin-BHX99hgX.cjs`),t=require(`./decorate-F9CuyeHg.cjs`);require(`./mixins.cjs`);let n=require(`rxjs`),r=require(`lit/decorators.js`),i=require(`lit`);var a=class extends e.t(i.css`
1
+ Object.defineProperty(exports,Symbol.toStringTag,{value:`Module`}),require(`./chunk-CncqDLb2.cjs`);const e=require(`./tailwind.mixin-DRI1oTYQ.cjs`),t=require(`./decorate-F9CuyeHg.cjs`);require(`./mixins.cjs`);let n=require(`rxjs`),r=require(`lit/decorators.js`),i=require(`lit`);var a=class extends e.t(i.css`
2
2
  :host {
3
3
  display: block;
4
4
  position: relative;
package/dist/tree.js CHANGED
@@ -1,4 +1,4 @@
1
- import { t as e } from "./tailwind.mixin-DIEGVcl3.js";
1
+ import { t as e } from "./tailwind.mixin-mdQR3BEO.js";
2
2
  import { t } from "./decorate-D_utPUsC.js";
3
3
  import "./mixins.js";
4
4
  import { fromEvent as n, merge as r, switchMap as i, takeUntil as a, tap as o, zip as s } from "rxjs";
@@ -1,4 +1,4 @@
1
- Object.defineProperty(exports,Symbol.toStringTag,{value:`Module`}),require(`./chunk-CncqDLb2.cjs`);const e=require(`./tailwind.mixin-BHX99hgX.cjs`),t=require(`./decorate-F9CuyeHg.cjs`),n=require(`./litElement.mixin-lYlKxxjR.cjs`);require(`./mixins.cjs`);const r=require(`./delay-DCp_QEct.cjs`),i=require(`./hashContent-CahnEuut.cjs`),a=require(`./intersection-DqBqnpgh.cjs`);let o=require(`lit/decorators.js`),s=require(`lit`);var c=null,l=class extends n.t(s.css`
1
+ Object.defineProperty(exports,Symbol.toStringTag,{value:`Module`}),require(`./chunk-CncqDLb2.cjs`);const e=require(`./tailwind.mixin-DRI1oTYQ.cjs`),t=require(`./decorate-F9CuyeHg.cjs`),n=require(`./litElement.mixin-qh5-IIUq.cjs`);require(`./mixins.cjs`);const r=require(`./delay-BHODnTg-.cjs`),i=require(`./hashContent-CahnEuut.cjs`),a=require(`./intersection-DqBqnpgh.cjs`);let o=require(`lit/decorators.js`),s=require(`lit`);var c=null,l=class extends n.t(s.css`
2
2
  :host {
3
3
  display: inline-block;
4
4
  }
@@ -1,8 +1,8 @@
1
- import { a as e } from "./tailwind.mixin-DIEGVcl3.js";
1
+ import { a as e } from "./tailwind.mixin-mdQR3BEO.js";
2
2
  import { t } from "./decorate-D_utPUsC.js";
3
- import { t as n } from "./litElement.mixin-BuZ28ZzP.js";
3
+ import { t as n } from "./litElement.mixin-CszkJuNl.js";
4
4
  import "./mixins.js";
5
- import { n as r } from "./delay-Cs0i_CpQ.js";
5
+ import { n as r } from "./delay-Dlk0A3he.js";
6
6
  import { t as i } from "./hashContent-B2IntJQf.js";
7
7
  import { t as a } from "./intersection-BrXp4YTO.js";
8
8
  import { customElement as o, property as s, query as c, queryAssignedElements as l, queryAssignedNodes as u } from "lit/decorators.js";
@@ -1,4 +1,4 @@
1
- Object.defineProperty(exports,Symbol.toStringTag,{value:`Module`}),require(`./chunk-CncqDLb2.cjs`);const e=require(`./tailwind.mixin-BHX99hgX.cjs`),t=require(`./decorate-F9CuyeHg.cjs`);let n=require(`rxjs`),r=require(`rxjs/operators`),i=require(`lit/decorators.js`),a=require(`lit`),o=require(`lit/directives/ref.js`),s=require(`lit/static-html.js`);var c={display:{type:`display`,token:`lg`},"display-lg":{type:`display`,token:`lg`},"display-md":{type:`display`,token:`md`},"display-sm":{type:`display`,token:`sm`},"heading-lg":{type:`headline`,token:`lg`},"heading-md":{type:`headline`,token:`md`},"heading-sm":{type:`headline`,token:`sm`},"title-lg":{type:`title`,token:`lg`},"title-md":{type:`title`,token:`md`},"title-sm":{type:`title`,token:`sm`},"body-lg":{type:`body`,token:`lg`},"body-md":{type:`body`,token:`md`},"body-sm":{type:`body`,token:`sm`},"label-lg":{type:`label`,token:`lg`},"label-md":{type:`label`,token:`md`},"label-sm":{type:`label`,token:`sm`},caption:{type:`label`,token:`sm`}},l={h1:s.literal`h1`,h2:s.literal`h2`,h3:s.literal`h3`,h4:s.literal`h4`,h5:s.literal`h5`,h6:s.literal`h6`,p:s.literal`p`,span:s.literal`span`,div:s.literal`div`},u=class extends e.t(a.css`
1
+ Object.defineProperty(exports,Symbol.toStringTag,{value:`Module`}),require(`./chunk-CncqDLb2.cjs`);const e=require(`./tailwind.mixin-DRI1oTYQ.cjs`),t=require(`./decorate-F9CuyeHg.cjs`);let n=require(`rxjs`),r=require(`rxjs/operators`),i=require(`lit/decorators.js`),a=require(`lit`),o=require(`lit/directives/ref.js`),s=require(`lit/static-html.js`);var c={display:{type:`display`,token:`lg`},"display-lg":{type:`display`,token:`lg`},"display-md":{type:`display`,token:`md`},"display-sm":{type:`display`,token:`sm`},"heading-lg":{type:`headline`,token:`lg`},"heading-md":{type:`headline`,token:`md`},"heading-sm":{type:`headline`,token:`sm`},"title-lg":{type:`title`,token:`lg`},"title-md":{type:`title`,token:`md`},"title-sm":{type:`title`,token:`sm`},"body-lg":{type:`body`,token:`lg`},"body-md":{type:`body`,token:`md`},"body-sm":{type:`body`,token:`sm`},"label-lg":{type:`label`,token:`lg`},"label-md":{type:`label`,token:`md`},"label-sm":{type:`label`,token:`sm`},caption:{type:`label`,token:`sm`}},l={h1:s.literal`h1`,h2:s.literal`h2`,h3:s.literal`h3`,h4:s.literal`h4`,h5:s.literal`h5`,h6:s.literal`h6`,p:s.literal`p`,span:s.literal`span`,div:s.literal`div`},u=class extends e.t(a.css`
2
2
  :host {
3
3
  display: block;
4
4
  font-family: inherit;
@@ -1,4 +1,4 @@
1
- import { t as e } from "./tailwind.mixin-DIEGVcl3.js";
1
+ import { t as e } from "./tailwind.mixin-mdQR3BEO.js";
2
2
  import { t } from "./decorate-D_utPUsC.js";
3
3
  import { fromEvent as n } from "rxjs";
4
4
  import { filter as r, takeUntil as i, tap as a } from "rxjs/operators";
@@ -1,4 +1,4 @@
1
- Object.defineProperty(exports,Symbol.toStringTag,{value:`Module`}),require(`./chunk-CncqDLb2.cjs`);const e=require(`./tailwind.mixin-BHX99hgX.cjs`),t=require(`./decorate-F9CuyeHg.cjs`);require(`./mixins.cjs`);let n=require(`lit/decorators.js`),r=require(`lit`);var i=class extends e.t(r.css`
1
+ Object.defineProperty(exports,Symbol.toStringTag,{value:`Module`}),require(`./chunk-CncqDLb2.cjs`);const e=require(`./tailwind.mixin-DRI1oTYQ.cjs`),t=require(`./decorate-F9CuyeHg.cjs`);require(`./mixins.cjs`);let n=require(`lit/decorators.js`),r=require(`lit`);var i=class extends e.t(r.css`
2
2
  :host {
3
3
  position: absolute;
4
4
  width: 1px;
@@ -1,4 +1,4 @@
1
- import { t as e } from "./tailwind.mixin-DIEGVcl3.js";
1
+ import { t as e } from "./tailwind.mixin-mdQR3BEO.js";
2
2
  import { t } from "./decorate-D_utPUsC.js";
3
3
  import "./mixins.js";
4
4
  import { customElement as n } from "lit/decorators.js";
@@ -1,5 +1,5 @@
1
1
  import { t as e } from "./decorate-D_utPUsC.js";
2
- import { t } from "./litElement.mixin-BuZ28ZzP.js";
2
+ import { t } from "./litElement.mixin-CszkJuNl.js";
3
3
  import "./mixins.js";
4
4
  import { d as n, f as r } from "./animation-hXFClrIn.js";
5
5
  import { t as i } from "./reduced-motion-BZTLqAyl.js";
@@ -1 +1 @@
1
- {"version":3,"file":"window-C8kImMiI.js","names":[],"sources":["../src/window/window-manager.ts","../src/window/window-position.ts","../src/window/window.ts"],"sourcesContent":["/**\n * Window Manager — singleton service for multi-window coordination.\n *\n * Tracks all schmancy-window instances: positions, z-indices, focus, visual states.\n * Components register on connectedCallback, unregister on disconnectedCallback.\n * Focus changes, position updates, and overlap queries all flow through here.\n *\n * Follows the ThemeService singleton pattern (theme/theme.service.ts).\n *\n * Example:\n * windowManager.register('chat-1', bounds, 'bottom-right')\n * windowManager.focus('chat-1') // bumps z-index, updates focusedId\n * const overlaps = windowManager.findOverlaps(projectedBounds, 'chat-1')\n */\n\nimport { BehaviorSubject, Observable, distinctUntilChanged, map } from 'rxjs'\nimport { overlayStack } from '../utils/overlay-stack.js'\nimport type { WindowBounds, WindowRecord, WindowRegistryState, SnapTarget } from './window-registry.js'\n\nconst STORAGE_PREFIX = 'schmancy-window-'\nconst LEGACY_STORAGE_PREFIX = 'schmancy-float-'\n\nclass WindowManagerService {\n\tprivate static instance: WindowManagerService\n\n\tprivate readonly _state$ = new BehaviorSubject<WindowRegistryState>({\n\t\twindows: new Map(),\n\t\tfocusedId: null,\n\t\tstackOrder: [],\n\t})\n\n\treadonly state$ = this._state$.asObservable()\n\n\tprivate constructor() {}\n\n\tstatic getInstance(): WindowManagerService {\n\t\tif (!WindowManagerService.instance) {\n\t\t\tWindowManagerService.instance = new WindowManagerService()\n\t\t}\n\t\treturn WindowManagerService.instance\n\t}\n\n\t// ── Synchronous accessors ──────────────────────────────────────────\n\n\tget windows(): Map<string, WindowRecord> {\n\t\treturn this._state$.value.windows\n\t}\n\n\tget focusedId(): string | null {\n\t\treturn this._state$.value.focusedId\n\t}\n\n\t// ── Registration ───────────────────────────────────────────────────\n\n\tregister(id: string, initialBounds: WindowBounds, snapTarget: SnapTarget): void {\n\t\tconst state = this._state$.value\n\t\tif (state.windows.has(id)) return\n\n\t\tconst zIndex = overlayStack.assignZIndex(id)\n\t\tconst record: WindowRecord = {\n\t\t\tid,\n\t\t\tbounds: initialBounds,\n\t\t\tvisualState: 'normal',\n\t\t\tzIndex,\n\t\t\topen: false,\n\t\t\tsnapTarget,\n\t\t}\n\n\t\tconst windows = new Map(state.windows)\n\t\twindows.set(id, record)\n\t\tconst stackOrder = overlayStack.getStackOrder()\n\n\t\tthis._state$.next({ ...state, windows, stackOrder })\n\t}\n\n\tunregister(id: string): void {\n\t\tconst state = this._state$.value\n\t\tif (!state.windows.has(id)) return\n\n\t\toverlayStack.releaseId(id)\n\t\tconst windows = new Map(state.windows)\n\t\twindows.delete(id)\n\t\tconst stackOrder = overlayStack.getStackOrder()\n\t\tconst focusedId = state.focusedId === id ? null : state.focusedId\n\n\t\tthis._state$.next({ ...state, windows, stackOrder, focusedId })\n\t}\n\n\t// ── State mutations ────────────────────────────────────────────────\n\n\tupdateBounds(id: string, bounds: WindowBounds): void {\n\t\tthis._updateRecord(id, { bounds })\n\t}\n\n\tupdateVisualState(id: string, visualState: WindowRecord['visualState']): void {\n\t\tthis._updateRecord(id, { visualState })\n\t}\n\n\tupdateOpen(id: string, open: boolean): void {\n\t\tthis._updateRecord(id, { open })\n\t}\n\n\tfocus(id: string): void {\n\t\tconst state = this._state$.value\n\t\tif (!state.windows.has(id)) return\n\t\tif (state.focusedId === id) return\n\n\t\tconst zIndex = overlayStack.bringToFront(id)\n\t\tconst windows = new Map(state.windows)\n\t\tconst record = windows.get(id)\n\t\tif (record) {\n\t\t\twindows.set(id, { ...record, zIndex })\n\t\t}\n\t\tconst stackOrder = overlayStack.getStackOrder()\n\n\t\tthis._state$.next({ ...state, windows, stackOrder, focusedId: id })\n\t}\n\n\t// ── Queries ────────────────────────────────────────────────────────\n\n\tfindOverlaps(bounds: WindowBounds, excludeId: string): WindowRecord[] {\n\t\tconst result: WindowRecord[] = []\n\t\tfor (const [id, record] of this._state$.value.windows) {\n\t\t\tif (id === excludeId) continue\n\t\t\tif (rectsOverlap(bounds, record.bounds)) {\n\t\t\t\tresult.push(record)\n\t\t\t}\n\t\t}\n\t\treturn result\n\t}\n\n\tgetNeighbors(id: string): WindowRecord[] {\n\t\tconst result: WindowRecord[] = []\n\t\tfor (const [otherId, record] of this._state$.value.windows) {\n\t\t\tif (otherId !== id) result.push(record)\n\t\t}\n\t\treturn result\n\t}\n\n\t// ── Selectors ──────────────────────────────────────────────────────\n\n\tselectWindow(id: string): Observable<WindowRecord | undefined> {\n\t\treturn this._state$.pipe(\n\t\t\tmap(state => state.windows.get(id)),\n\t\t\tdistinctUntilChanged(),\n\t\t)\n\t}\n\n\tselectFocused(): Observable<string | null> {\n\t\treturn this._state$.pipe(\n\t\t\tmap(state => state.focusedId),\n\t\t\tdistinctUntilChanged(),\n\t\t)\n\t}\n\n\t// ── Persistence ────────────────────────────────────────────────────\n\n\tloadPosition(id: string): { x: number; y: number; anchor: string } | null {\n\t\ttry {\n\t\t\t// Try new key first, fall back to legacy\n\t\t\tconst raw = localStorage.getItem(STORAGE_PREFIX + id) ?? localStorage.getItem(LEGACY_STORAGE_PREFIX + id)\n\t\t\tif (!raw) return null\n\t\t\treturn JSON.parse(raw) as { x: number; y: number; anchor: string }\n\t\t} catch {\n\t\t\treturn null\n\t\t}\n\t}\n\n\tsavePosition(id: string, data: { x: number; y: number; anchor: string }): void {\n\t\ttry {\n\t\t\tlocalStorage.setItem(STORAGE_PREFIX + id, JSON.stringify(data))\n\t\t} catch {\n\t\t\t// ignore\n\t\t}\n\t}\n\n\tclearPosition(id: string): void {\n\t\ttry {\n\t\t\tlocalStorage.removeItem(STORAGE_PREFIX + id)\n\t\t\tlocalStorage.removeItem(LEGACY_STORAGE_PREFIX + id)\n\t\t} catch {\n\t\t\t// ignore\n\t\t}\n\t}\n\n\t// ── Internal ───────────────────────────────────────────────────────\n\n\tprivate _updateRecord(id: string, updates: Partial<WindowRecord>): void {\n\t\tconst state = this._state$.value\n\t\tconst record = state.windows.get(id)\n\t\tif (!record) return\n\n\t\tconst windows = new Map(state.windows)\n\t\twindows.set(id, { ...record, ...updates })\n\t\tthis._state$.next({ ...state, windows })\n\t}\n}\n\n/** Simple rect overlap check (inline — no circular import with window-position) */\nfunction rectsOverlap(a: WindowBounds, b: WindowBounds): boolean {\n\treturn !(a.left >= b.left + b.width || a.left + a.width <= b.left || a.top >= b.top + b.height || a.top + a.height <= b.top)\n}\n\nexport const windowManager = WindowManagerService.getInstance()\n","/**\n * Window Position — pure functions for overlap resolution, cascade, and snapping.\n *\n * All functions are stateless: they take window bounds and viewport dimensions,\n * return new bounds. No side effects, no DOM access, no subscriptions.\n *\n * Example:\n * const projected = { left: 100, top: 400, width: 360, height: 500 }\n * const neighbors = windowManager.findOverlaps(projected, 'my-id')\n * const resolved = resolveOverlap(projected, neighbors, { width: 1440, height: 900 })\n * // → { left: 144, top: 444, width: 360, height: 500 } (cascaded away from conflict)\n */\n\nimport type { WindowBounds, WindowRecord } from './window-registry.js'\n\nconst HEAD_HEIGHT = 44\nconst CASCADE_OFFSET = HEAD_HEIGHT\nconst MAX_CASCADE_ATTEMPTS = 10\n\n/** Check if two rectangles overlap (edges touching does NOT count as overlap) */\nexport function rectsOverlap(a: WindowBounds, b: WindowBounds): boolean {\n\treturn !(a.left >= b.left + b.width || a.left + a.width <= b.left || a.top >= b.top + b.height || a.top + a.height <= b.top)\n}\n\n/**\n * Resolve overlap by cascading diagonally until no conflict.\n * Shifts by (HEAD_HEIGHT, HEAD_HEIGHT) per attempt, clamped to viewport.\n */\nexport function resolveOverlap(\n\tcandidate: WindowBounds,\n\texisting: WindowRecord[],\n\tviewport: { width: number; height: number },\n): WindowBounds {\n\tlet bounds = { ...candidate }\n\n\tfor (let attempt = 0; attempt < MAX_CASCADE_ATTEMPTS; attempt++) {\n\t\tconst hasOverlap = existing.some(w => rectsOverlap(bounds, w.bounds))\n\t\tif (!hasOverlap) break\n\n\t\tbounds = {\n\t\t\t...bounds,\n\t\t\tleft: bounds.left + CASCADE_OFFSET,\n\t\t\ttop: bounds.top + CASCADE_OFFSET,\n\t\t}\n\t}\n\n\treturn clampToViewport(bounds, viewport)\n}\n\n/**\n * Clamp bounds so the window stays fully within the viewport.\n */\nexport function clampToViewport(\n\tbounds: WindowBounds,\n\tviewport: { width: number; height: number },\n): WindowBounds {\n\treturn {\n\t\twidth: bounds.width,\n\t\theight: bounds.height,\n\t\tleft: Math.max(0, Math.min(bounds.left, viewport.width - bounds.width)),\n\t\ttop: Math.max(0, Math.min(bounds.top, viewport.height - bounds.height)),\n\t}\n}\n","import { $LitElement } from '@mixins/index'\nimport { css, html, nothing } from 'lit'\nimport { customElement, property, state } from 'lit/decorators.js'\nimport { classMap } from 'lit/directives/class-map.js'\nimport { createRef, ref } from 'lit/directives/ref.js'\nimport { styleMap } from 'lit/directives/style-map.js'\nimport {\n\tanimationFrameScheduler,\n\tauditTime,\n\tcatchError,\n\tEMPTY,\n\tfilter,\n\tfinalize,\n\tfrom,\n\tfromEvent,\n\tmap,\n\tmerge,\n\tObservable,\n\tswitchMap,\n\ttake,\n\ttakeUntil,\n\ttap,\n} from 'rxjs'\nimport { SPRING_SMOOTH, SPRING_SNAPPY } from '../utils/animation.js'\nimport { cursorGlow } from '../directives/cursor-glow'\nimport { reducedMotion$ } from '../directives/reduced-motion'\nimport { theme } from '../theme/theme.service.js'\nimport type { SnapCorner, WindowBounds, WindowVisualState } from './window-registry.js'\nimport { windowManager } from './window-manager.js'\nimport { resolveOverlap } from './window-position.js'\n\nconst HEAD_HEIGHT = 48\nconst DRAG_THRESHOLD = 5\n\ninterface Position {\n\tx: number\n\ty: number\n}\n\n@customElement('schmancy-window')\nexport default class SchmancyWindow extends $LitElement(css`\n\t:host {\n\t\tdisplay: contents;\n\t\tposition: relative;\n\t\tz-index: 1000;\n\t}\n\t:host([hidden]) {\n\t\tdisplay: none !important;\n\t}\n`) {\n\t@property({ type: String }) id: string = 'default'\n\t/** Override the expanded panel width (e.g. '320px', '24rem'). Defaults to responsive sizing. */\n\t@property({ type: String }) expandedWidth?: string\n\t/** Override the expanded panel height (e.g. '400px', '50vh'). */\n\t@property({ type: String }) expandedHeight?: string\n\t/** When true, uses a lower elevation shadow in the collapsed state. */\n\t@property({ type: Boolean, reflect: true }) lowered: boolean = false\n\t/** Corner the window is anchored to. */\n\t@property({ type: String }) corner: SnapCorner = 'bottom-right'\n\t/** When true, window can be resized by the user. */\n\t@property({ type: Boolean }) resizable = false\n\t/** When true, window stays at its dragged position instead of snapping to a corner. */\n\t@property({ type: Boolean }) freePosition = false\n\t/** Visual state of the window (minimized, normal, maximized). */\n\t@property({ type: String, reflect: true }) visualState: WindowVisualState = 'normal'\n\t/** Minimum width in pixels. */\n\t@property({ type: Number }) minWidth = 280\n\t/** Minimum height in pixels. */\n\t@property({ type: Number }) minHeight = 200\n\n\t/** Whether the body is expanded. */\n\t@property({ type: Boolean, reflect: true }) open = false\n\n\tprivate _currentAnimation?: Animation\n\n\t/** Lazy rendering: body content not in DOM until first expand. */\n\t@state() private _hasOpened = false\n\t/** Whether this window is the focused window in the manager — drives visual ring */\n\t@state() private _focused = false\n\n\t// Internal position -- plain fields, updated directly during drag\n\tprivate _position: Position = { x: 16, y: 16 }\n\t@state() private _currentCorner: SnapCorner = 'bottom-right'\n\n\t// Track applied corner to avoid unnecessary style.removeProperty calls during drag\n\tprivate _appliedCorner: string = ''\n\n\t// Refs\n\tprivate _containerRef = createRef<HTMLElement>()\n\tprivate _bodyRef = createRef<HTMLElement>()\n\tprivate _headRef = createRef<HTMLElement>()\n\n\t// ============================================\n\t// COMPUTED\n\t// ============================================\n\n\tprivate get panelWidth(): string {\n\t\treturn this.expandedWidth ?? 'min(360px, calc(100vw - 32px))'\n\t}\n\n\tprivate get isBottomCorner(): boolean {\n\t\treturn this._currentCorner.startsWith('bottom')\n\t}\n\n\tprivate get closedClipPath(): string {\n\t\treturn this.isBottomCorner\n\t\t\t? `inset(calc(100% - ${HEAD_HEIGHT}px) 0px 0px 0px round 22px)`\n\t\t\t: `inset(0px 0px calc(100% - ${HEAD_HEIGHT}px) 0px round 22px)`\n\t}\n\n\tprivate get openClipPath(): string {\n\t\treturn 'inset(0px 0px 0px 0px round 12px)'\n\t}\n\n\tprivate get elevation(): string {\n\t\tif (this.open) return '4'\n\t\treturn this.lowered ? '1' : '3'\n\t}\n\n\t// ============================================\n\t// POSITION MANAGEMENT\n\t// ============================================\n\n\tprivate _applyContainerPosition() {\n\t\tconst container = this._containerRef.value\n\t\tif (!container) return\n\t\t// Only clear position properties when corner changes (avoids 4 style invalidations per drag frame)\n\t\tif (this._appliedCorner !== this._currentCorner) {\n\t\t\tcontainer.style.removeProperty('left')\n\t\t\tcontainer.style.removeProperty('right')\n\t\t\tcontainer.style.removeProperty('top')\n\t\t\tcontainer.style.removeProperty('bottom')\n\t\t\tthis._appliedCorner = this._currentCorner\n\t\t}\n\t\tconst { x, y } = this._position\n\t\tif (this._currentCorner.includes('right')) {\n\t\t\tcontainer.style.right = `${x}px`\n\t\t} else {\n\t\t\tcontainer.style.left = `${x}px`\n\t\t}\n\t\tif (this._currentCorner.includes('bottom')) {\n\t\t\tcontainer.style.bottom = `${y + theme.bottomOffset}px`\n\t\t} else {\n\t\t\tcontainer.style.top = `${y}px`\n\t\t}\n\t}\n\n\tprivate static readonly VALID_CORNERS = new Set<string>(['top-left', 'top-right', 'bottom-left', 'bottom-right'])\n\n\tprivate _loadPosition() {\n\t\tconst saved = windowManager.loadPosition(this.id)\n\t\tif (saved) {\n\t\t\tthis._position = { x: saved.x, y: saved.y }\n\t\t\tif (SchmancyWindow.VALID_CORNERS.has(saved.anchor)) {\n\t\t\t\tthis._currentCorner = saved.anchor as SnapCorner\n\t\t\t}\n\t\t}\n\t}\n\n\tprivate _savePosition() {\n\t\twindowManager.savePosition(this.id, { ...this._position, anchor: this._currentCorner })\n\t}\n\n\tprivate _validateBounds() {\n\t\tconst container = this._containerRef.value\n\t\tif (!container) return\n\t\tconst rect = container.getBoundingClientRect()\n\t\tif (rect.width === 0) return\n\t\tconst vw = window.innerWidth\n\t\tconst vh = window.innerHeight\n\t\tconst isRight = this._currentCorner.includes('right')\n\t\tconst isBottom = this._currentCorner.includes('bottom')\n\t\tconst actualLeft = isRight ? vw - this._position.x - rect.width : this._position.x\n\t\tconst actualTop = isBottom ? vh - this._position.y - rect.height : this._position.y\n\t\tconst newLeft = Math.max(0, Math.min(actualLeft, vw - rect.width))\n\t\tconst newTop = Math.max(0, Math.min(actualTop, vh - rect.height))\n\t\tthis._position = {\n\t\t\tx: isRight ? vw - newLeft - rect.width : newLeft,\n\t\t\ty: isBottom ? vh - newTop - rect.height : newTop,\n\t\t}\n\t\tthis._applyContainerPosition()\n\t}\n\n\t// ============================================\n\t// CORNER SNAPPING\n\t// ============================================\n\n\tprivate _reorientToNearestCorner(skipAnimation = false): void {\n\t\t// Free position mode: skip corner snapping\n\t\tif (this.freePosition) {\n\t\t\tthis._savePosition()\n\t\t\tconst rect = this._containerRef.value?.getBoundingClientRect()\n\t\t\tif (rect) {\n\t\t\t\twindowManager.updateBounds(this.id, { left: rect.left, top: rect.top, width: rect.width, height: rect.height })\n\t\t\t}\n\t\t\treturn\n\t\t}\n\n\t\tconst container = this._containerRef.value\n\t\tif (!container) return\n\n\t\t// F -- record current screen position before DOM mutation\n\t\tconst rect = container.getBoundingClientRect()\n\n\t\t// L -- calculate nearest corner using head visual center\n\t\tconst currentIsBottom = this._currentCorner.includes('bottom')\n\t\tconst headCenterX = rect.left + rect.width / 2\n\t\tconst headCenterY = currentIsBottom\n\t\t\t? rect.bottom - HEAD_HEIGHT / 2\n\t\t\t: rect.top + HEAD_HEIGHT / 2\n\t\tconst side = headCenterX > window.innerWidth / 2 ? 'right' : 'left'\n\t\tconst vert = headCenterY > window.innerHeight / 2 ? 'bottom' : 'top'\n\t\tconst newCorner: SnapCorner = `${vert}-${side}` as SnapCorner\n\n\t\t// Snap corner and reset offset to standard edge gap\n\t\tthis._currentCorner = newCorner\n\t\tthis._position = { x: 16, y: 16 }\n\t\tthis._applyContainerPosition()\n\t\t// Sync clip-path to new corner\n\t\tif (!this.open) {\n\t\t\tcontainer.style.clipPath = this.closedClipPath\n\t\t}\n\n\t\tif (skipAnimation || reducedMotion$.value) {\n\t\t\tthis._savePosition()\n\t\t\tconst snapRect = container.getBoundingClientRect()\n\t\t\twindowManager.updateBounds(this.id, { left: snapRect.left, top: snapRect.top, width: snapRect.width, height: snapRect.height })\n\t\t\treturn\n\t\t}\n\n\t\t// I -- invert: shift element back to its original visual position\n\t\tconst newRect = container.getBoundingClientRect()\n\t\tconst dx = rect.left - newRect.left\n\t\tconst dy = rect.top - newRect.top\n\t\tcontainer.style.translate = `${dx}px ${dy}px`\n\n\t\t// P -- play: animate from the inverse offset to natural resting position\n\t\tconst flipKeyframes: Keyframe[] = [{ translate: `${dx}px ${dy}px` }, { translate: '0px 0px' }]\n\t\tconst anim = container.animate(\n\t\t\tflipKeyframes,\n\t\t\t{\n\t\t\t\tduration: SPRING_SMOOTH.duration,\n\t\t\t\teasing: SPRING_SMOOTH.easingFallback,\n\t\t\t\tfill: 'forwards',\n\t\t\t},\n\t\t)\n\t\tfrom(anim.finished).pipe(\n\t\t\ttake(1),\n\t\t\ttap(() => {\n\t\t\t\tif (container.isConnected) container.style.translate = ''\n\t\t\t\t// Report final resting bounds after animation completes\n\t\t\t\tconst finalRect = container.getBoundingClientRect()\n\t\t\t\twindowManager.updateBounds(this.id, { left: finalRect.left, top: finalRect.top, width: finalRect.width, height: finalRect.height })\n\t\t\t}),\n\t\t\tcatchError(() => EMPTY),\n\t\t\ttakeUntil(this.disconnecting),\n\t\t).subscribe()\n\n\t\tthis._savePosition()\n\t}\n\n\t// ============================================\n\t// DRAG PIPELINE\n\t// ============================================\n\n\tprivate _drag$(): Observable<never> {\n\t\treturn new Observable(() => {\n\t\t\tconst head = this._headRef.value\n\t\t\tconst container = this._containerRef.value\n\t\t\tif (!head || !container) return\n\n\t\t\tlet didDrag = false\n\n\t\t\tconst sub = fromEvent<PointerEvent>(head, 'pointerdown').pipe(\n\t\t\t\tfilter(e => e.button === 0),\n\t\t\t\tfilter(e => {\n\t\t\t\t\tconst tag = (e.target as HTMLElement).tagName?.toLowerCase()\n\t\t\t\t\treturn !['input', 'textarea', 'select', 'button'].includes(tag)\n\t\t\t\t\t\t&& !(e.target as HTMLElement).closest('schmancy-input, schmancy-icon-button, button, a')\n\t\t\t\t}),\n\t\t\t\ttap(e => {\n\t\t\t\t\te.preventDefault()\n\t\t\t\t\te.stopPropagation()\n\t\t\t\t}),\n\t\t\t)\n\t\t\t\t.pipe(\n\t\t\t\t\tmap(e => {\n\t\t\t\t\t\tconst rect = container.getBoundingClientRect()\n\t\t\t\t\t\tconst isBottom = this._currentCorner.includes('bottom')\n\t\t\t\t\t\tconst wasOpen = this.open\n\t\t\t\t\t\tdidDrag = false\n\t\t\t\t\t\treturn {\n\t\t\t\t\t\t\tstartX: e.clientX,\n\t\t\t\t\t\t\tstartY: e.clientY,\n\t\t\t\t\t\t\toffsetX: e.clientX - rect.left,\n\t\t\t\t\t\t\toffsetY: e.clientY - rect.top,\n\t\t\t\t\t\t\trect,\n\t\t\t\t\t\t\tvw: window.innerWidth,\n\t\t\t\t\t\t\tvh: window.innerHeight,\n\t\t\t\t\t\t\tisBottom,\n\t\t\t\t\t\t\twasOpen,\n\t\t\t\t\t\t\tpointerId: e.pointerId,\n\t\t\t\t\t\t}\n\t\t\t\t\t}),\n\t\t\t\t\tswitchMap(({ startX, startY, offsetX, offsetY, rect, vw, vh, isBottom, wasOpen, pointerId }) => {\n\t\t\t\t\t\tconst move$ = fromEvent<PointerEvent>(window, 'pointermove').pipe(\n\t\t\t\t\t\t\tfilter(e => e.pointerId === pointerId),\n\t\t\t\t\t\t\tauditTime(0, animationFrameScheduler),\n\t\t\t\t\t\t\tmap(e => ({ clientX: e.clientX, clientY: e.clientY })),\n\t\t\t\t\t\t)\n\t\t\t\t\t\tconst end$ = fromEvent<PointerEvent>(window, 'pointerup').pipe(\n\t\t\t\t\t\t\tfilter(e => e.pointerId === pointerId),\n\t\t\t\t\t\t)\n\n\t\t\t\t\t\treturn move$.pipe(\n\t\t\t\t\t\t\ttap(({ clientX, clientY }) => {\n\t\t\t\t\t\t\t\tconst dx = clientX - startX\n\t\t\t\t\t\t\t\tconst dy = clientY - startY\n\t\t\t\t\t\t\t\tif (Math.sqrt(dx * dx + dy * dy) > DRAG_THRESHOLD && !didDrag) {\n\t\t\t\t\t\t\t\t\tdidDrag = true\n\t\t\t\t\t\t\t\t\tthis._applyDragVisuals(true)\n\t\t\t\t\t\t\t\t\t// Collapse on first confirmed drag move\n\t\t\t\t\t\t\t\t\tif (wasOpen) {\n\t\t\t\t\t\t\t\t\t\tthis.open = false\n\t\t\t\t\t\t\t\t\t\tcontainer.style.clipPath = this.closedClipPath\n\t\t\t\t\t\t\t\t\t\tcontainer.style.overflow = 'hidden'\n\t\t\t\t\t\t\t\t\t\tconst body = this._bodyRef.value\n\t\t\t\t\t\t\t\t\t\tif (body) {\n\t\t\t\t\t\t\t\t\t\t\tbody.inert = true\n\t\t\t\t\t\t\t\t\t\t\tbody.style.visibility = 'hidden'\n\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\tif (!didDrag) return\n\n\t\t\t\t\t\t\t\tconst left = Math.max(0, Math.min(clientX - offsetX, vw - rect.width))\n\t\t\t\t\t\t\t\tconst minTop = isBottom ? HEAD_HEIGHT - rect.height : 0\n\t\t\t\t\t\t\t\tconst maxTop = isBottom ? vh - rect.height : vh - HEAD_HEIGHT\n\t\t\t\t\t\t\t\tconst top = Math.max(minTop, Math.min(clientY - offsetY, maxTop))\n\n\t\t\t\t\t\t\t\tthis._position = {\n\t\t\t\t\t\t\t\t\tx: this._currentCorner.includes('right') ? vw - left - rect.width : left,\n\t\t\t\t\t\t\t\t\ty: isBottom ? vh - top - rect.height : top,\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\tthis._applyContainerPosition()\n\t\t\t\t\t\t\t}),\n\t\t\t\t\t\t\ttakeUntil(end$),\n\t\t\t\t\t\t\tfinalize(() => {\n\t\t\t\t\t\t\t\tif (didDrag) {\n\t\t\t\t\t\t\t\t\tthis._reorientToNearestCorner()\n\t\t\t\t\t\t\t\t\tthis._applyDragVisuals(false)\n\t\t\t\t\t\t\t\t\tdidDrag = false\n\t\t\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\t\t\tdidDrag = false\n\t\t\t\t\t\t\t\t\tthis.toggle()\n\t\t\t\t\t\t\t\t}\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\t.subscribe()\n\n\t\t\treturn () => sub.unsubscribe()\n\t\t})\n\t}\n\n\t// ============================================\n\t// LIFECYCLE\n\t// ============================================\n\n\tconnectedCallback() {\n\t\tsuper.connectedCallback()\n\n\t\t// Pipeline 1: DOM setup + manager registration + drag + z-index sync\n\t\tfrom(this.updateComplete).pipe(\n\t\t\ttake(1),\n\t\t\ttap(() => {\n\t\t\t\tthis._currentCorner = this.corner\n\t\t\t\tthis._loadPosition()\n\t\t\t\tthis._applyContainerPosition()\n\t\t\t\tthis._initDOMState()\n\t\t\t\t// Register with window manager\n\t\t\t\tconst container = this._containerRef.value\n\t\t\t\tif (container) {\n\t\t\t\t\tconst rect = container.getBoundingClientRect()\n\t\t\t\t\tconst bounds: WindowBounds = { left: rect.left, top: rect.top, width: rect.width, height: rect.height }\n\t\t\t\t\twindowManager.register(this.id, bounds, this.freePosition ? 'free' : this._currentCorner)\n\t\t\t\t}\n\t\t\t}),\n\t\t\tswitchMap(() => merge(\n\t\t\t\tthis._drag$(),\n\t\t\t\twindowManager.selectWindow(this.id).pipe(\n\t\t\t\t\ttap(record => {\n\t\t\t\t\t\tif (!record) return\n\t\t\t\t\t\tconst container = this._containerRef.value\n\t\t\t\t\t\tif (container) container.style.zIndex = String(record.zIndex)\n\t\t\t\t\t}),\n\t\t\t\t),\n\t\t\t\twindowManager.selectFocused().pipe(\n\t\t\t\t\ttap(focusedId => {\n\t\t\t\t\t\tthis._focused = focusedId === this.id\n\t\t\t\t\t}),\n\t\t\t\t),\n\t\t\t)),\n\t\t\ttakeUntil(this.disconnecting),\n\t\t).subscribe()\n\n\n\t\t// Pipeline 3: Environment -- one subscription\n\t\tmerge(\n\t\t\tfromEvent(window, 'resize').pipe(\n\t\t\t\tauditTime(0, animationFrameScheduler),\n\t\t\t\ttap(() => this._validateBounds()),\n\t\t\t),\n\t\t\ttheme.bottomOffset$.pipe(\n\t\t\t\ttap(() => this._applyContainerPosition()),\n\t\t\t),\n\t\t).pipe(takeUntil(this.disconnecting)).subscribe()\n\t}\n\n\tdisconnectedCallback() {\n\t\tsuper.disconnectedCallback()\n\t\twindowManager.unregister(this.id)\n\t}\n\n\tprivate _initDOMState() {\n\t\tconst container = this._containerRef.value\n\t\tconst body = this._bodyRef.value\n\t\tif (!container) return\n\n\t\tthis._applyContainerPosition()\n\n\t\tif (this.open) {\n\t\t\tthis._hasOpened = true\n\t\t\tcontainer.style.overflow = ''\n\t\t\tif (body) {\n\t\t\t\tbody.inert = false\n\t\t\t\tbody.style.visibility = 'visible'\n\t\t\t}\n\t\t} else {\n\t\t\tcontainer.style.clipPath = this.closedClipPath\n\t\t\tcontainer.style.overflow = 'hidden'\n\t\t\tif (body) {\n\t\t\t\tbody.inert = true\n\t\t\t\tbody.style.visibility = 'hidden'\n\t\t\t}\n\t\t}\n\t}\n\n\t// ============================================\n\t// ANIMATION\n\t// ============================================\n\n\tprivate _animateOpen() {\n\t\tconst container = this._containerRef.value\n\t\tconst body = this._bodyRef.value\n\t\tif (!container) return\n\n\t\tthis._hasOpened = true\n\t\tthis.open = true\n\n\t\t// Overlap avoidance\n\t\tconst rect = container.getBoundingClientRect()\n\t\tconst projectedBounds: WindowBounds = {\n\t\t\tleft: rect.left,\n\t\t\ttop: this.isBottomCorner ? rect.top - 400 : rect.top,\n\t\t\twidth: rect.width,\n\t\t\theight: 400 + HEAD_HEIGHT,\n\t\t}\n\t\tconst overlaps = windowManager.findOverlaps(projectedBounds, this.id)\n\t\tif (overlaps.length > 0) {\n\t\t\tconst resolved = resolveOverlap(projectedBounds, overlaps, { width: window.innerWidth, height: window.innerHeight })\n\t\t\tif (Math.abs(resolved.left - projectedBounds.left) > 10 || Math.abs(resolved.top - projectedBounds.top) > 10) {\n\t\t\t\tconst isRight = this._currentCorner.includes('right')\n\t\t\t\tconst isBottom = this._currentCorner.includes('bottom')\n\t\t\t\tthis._position = {\n\t\t\t\t\tx: isRight ? window.innerWidth - resolved.left - resolved.width : resolved.left,\n\t\t\t\t\ty: isBottom ? window.innerHeight - resolved.top - resolved.height : resolved.top,\n\t\t\t\t}\n\t\t\t\tthis._applyContainerPosition()\n\t\t\t}\n\t\t}\n\n\t\tif (body) {\n\t\t\tbody.style.visibility = 'visible'\n\t\t\tbody.inert = false\n\t\t}\n\n\t\tif (reducedMotion$.value) {\n\t\t\tcontainer.style.clipPath = ''\n\t\t\tcontainer.style.overflow = ''\n\t\t\tthis.dispatchScopedEvent('window-toggle', { state: 'expanded' })\n\t\t\treturn\n\t\t}\n\n\t\tthis._currentAnimation?.cancel()\n\t\tcontainer.style.overflow = 'hidden'\n\t\tcontainer.style.willChange = 'opacity'\n\t\tconst openKeyframes: Keyframe[] = [\n\t\t\t{ clipPath: this.closedClipPath, opacity: 0.95 },\n\t\t\t{ clipPath: this.openClipPath, opacity: 1 },\n\t\t]\n\t\tconst anim = container.animate(openKeyframes, {\n\t\t\tduration: SPRING_SNAPPY.duration,\n\t\t\teasing: SPRING_SNAPPY.easingFallback,\n\t\t\tfill: 'forwards',\n\t\t})\n\t\tthis._currentAnimation = anim\n\n\t\tfrom(anim.finished).pipe(\n\t\t\ttake(1),\n\t\t\ttap(() => {\n\t\t\t\tif (container.isConnected) {\n\t\t\t\t\tcontainer.style.clipPath = ''\n\t\t\t\t\tcontainer.style.overflow = ''\n\t\t\t\t\tcontainer.style.willChange = ''\n\t\t\t\t}\n\t\t\t}),\n\t\t\tcatchError(() => EMPTY),\n\t\t\ttakeUntil(this.disconnecting),\n\t\t).subscribe()\n\n\t\tthis.dispatchScopedEvent('window-toggle', { state: 'expanded' })\n\t}\n\n\tprivate _animateClose() {\n\t\tconst container = this._containerRef.value\n\t\tif (!container) return\n\n\t\tif (reducedMotion$.value) {\n\t\t\tcontainer.style.clipPath = this.closedClipPath\n\t\t\tcontainer.style.overflow = 'hidden'\n\t\t\tthis.open = false\n\t\t\tconst body = this._bodyRef.value\n\t\t\tif (body) { body.inert = true; body.style.visibility = 'hidden' }\n\t\t\tthis.dispatchScopedEvent('window-toggle', { state: 'collapsed' })\n\t\t\treturn\n\t\t}\n\n\t\tthis._currentAnimation?.cancel()\n\t\tcontainer.style.overflow = 'hidden'\n\t\tcontainer.style.willChange = 'opacity'\n\t\tconst closeKeyframes: Keyframe[] = [\n\t\t\t{ clipPath: this.openClipPath, opacity: 1 },\n\t\t\t{ clipPath: this.closedClipPath, opacity: 0.95 },\n\t\t]\n\t\tconst anim = container.animate(closeKeyframes, {\n\t\t\tduration: Math.round(SPRING_SNAPPY.duration * 0.7),\n\t\t\teasing: 'cubic-bezier(0.4, 0, 0.8, 0.15)',\n\t\t\tfill: 'forwards',\n\t\t})\n\t\tthis._currentAnimation = anim\n\n\t\tfrom(anim.finished).pipe(\n\t\t\ttake(1),\n\t\t\ttap(() => {\n\t\t\t\tthis.open = false\n\t\t\t\tcontainer.style.willChange = ''\n\t\t\t\tconst body = this._bodyRef.value\n\t\t\t\tif (body) { body.inert = true; body.style.visibility = 'hidden' }\n\t\t\t}),\n\t\t\tcatchError(() => EMPTY),\n\t\t\ttakeUntil(this.disconnecting),\n\t\t).subscribe()\n\n\t\tthis.dispatchScopedEvent('window-toggle', { state: 'collapsed' })\n\t}\n\n\t// ============================================\n\t// VISUAL STATE HELPERS\n\t// ============================================\n\n\t/** Apply drag visuals directly on DOM refs — avoids full Lit re-render for cursor + opacity */\n\tprivate _applyDragVisuals(dragging: boolean) {\n\t\tconst head = this._headRef.value\n\t\tconst container = this._containerRef.value\n\t\tif (head) {\n\t\t\thead.classList.toggle('cursor-grabbing', dragging)\n\t\t\thead.classList.toggle('cursor-move', !dragging)\n\t\t}\n\t\tif (container) {\n\t\t\tcontainer.style.opacity = dragging ? '0.95' : ''\n\t\t}\n\t}\n\n\tprivate _handleFocus = () => windowManager.focus(this.id)\n\n\tprivate _handleHeadKeydown = (e: KeyboardEvent) => {\n\t\tif (e.key === 'Enter' || e.key === ' ') {\n\t\t\te.preventDefault()\n\t\t\tthis.toggle()\n\t\t\treturn\n\t\t}\n\t\tif (e.key === 'ArrowUp' || e.key === 'ArrowDown' || e.key === 'ArrowLeft' || e.key === 'ArrowRight') {\n\t\t\te.preventDefault()\n\t\t\tconst step = e.shiftKey ? 20 : 5\n\t\t\tconst dx = e.key === 'ArrowRight' ? step : e.key === 'ArrowLeft' ? -step : 0\n\t\t\tconst dy = e.key === 'ArrowDown' ? step : e.key === 'ArrowUp' ? -step : 0\n\t\t\tthis._position = { x: this._position.x + dx, y: this._position.y + dy }\n\t\t\tthis._applyContainerPosition()\n\t\t\tthis._savePosition()\n\t\t}\n\t}\n\n\t// ============================================\n\t// PUBLIC API\n\t// ============================================\n\n\ttoggle() {\n\t\tif (this.open) this._animateClose()\n\t\telse this._animateOpen()\n\t}\n\n\texpand() {\n\t\tif (this.open) return\n\t\tthis._animateOpen()\n\t}\n\n\tclose() {\n\t\tif (!this.open) return\n\t\tthis._animateClose()\n\t}\n\n\t// ============================================\n\t// RENDER\n\t// ============================================\n\n\tprotected render(): unknown {\n\t\tconst isBottom = this._currentCorner.startsWith('bottom')\n\n\t\tconst containerClasses = classMap({\n\t\t\tfixed: true,\n\t\t\tflex: true,\n\t\t\t'flex-col': isBottom,\n\t\t\t'flex-col-reverse': !isBottom,\n\t\t\t'z-1000': true,\n\t\t\t'ring-1': !this._focused,\n\t\t\t'ring-2': this._focused,\n\t\t\t'ring-primary-default/30': this._focused,\n\t\t\t'ring-primary-default/15': this.open && !this._focused,\n\t\t\t'rounded-2xl': this.open,\n\t\t\t'ring-outline-variant/40': !this.open && !this._focused,\n\t\t\t'rounded-[22px]': !this.open,\n\t\t\t'overflow-hidden': true,\n\t\t})\n\n\t\tconst containerStyles = styleMap({\n\t\t\twidth: this.panelWidth,\n\t\t\t'max-height': 'calc(100vh - 32px)',\n\t\t\t'pointer-events': 'none',\n\t\t})\n\n\t\tconst bodyStyles = styleMap({\n\t\t\t'pointer-events': this.open ? 'auto' : 'none',\n\t\t})\n\n\t\tconst headClasses = classMap({\n\t\t\t'h-full': true,\n\t\t\t'px-3': true,\n\t\t\tflex: true,\n\t\t\t'items-center': true,\n\t\t\t'gap-2': true,\n\t\t\t'select-none': true,\n\t\t\t'cursor-move': true,\n\t\t})\n\n\t\treturn html`\n\t\t\t<schmancy-surface\n\t\t\t\t${ref(this._containerRef)}\n\t\t\t\ttype=\"glass\"\n\t\t\t\televation=\"${this.elevation}\"\n\t\t\t\tclass=${containerClasses}\n\t\t\t\tstyle=${containerStyles}\n\t\t\t\taria-expanded=${this.open}\n\t\t\t\t@pointerdown=${this._handleFocus}\n\t\t\t>\n\t\t\t\t<!-- Details section (visually above summary for bottom corners) -->\n\t\t\t\t<section\n\t\t\t\t\t${ref(this._bodyRef)}\n\t\t\t\t\tclass=\"flex-1 min-h-0 overflow-hidden flex flex-col\"\n\t\t\t\t\tstyle=${bodyStyles}\n\t\t\t\t\trole=\"region\"\n\t\t\t\t\taria-label=\"Expandable content\"\n\t\t\t\t>\n\t\t\t\t\t${this._hasOpened ? html`<slot name=\"details\"></slot>` : nothing}\n\t\t\t\t</section>\n\n\t\t\t\t<!-- Summary section -- always interactive, always visible -->\n\t\t\t\t<section\n\t\t\t\t\tclass=\"shrink-0 bg-surface-lowest\"\n\t\t\t\t\tstyle=${styleMap({ 'pointer-events': 'auto', height: `${HEAD_HEIGHT}px` })}\n\t\t\t\t>\n\t\t\t\t\t<div\n\t\t\t\t\t\t${ref(this._headRef)}\n\t\t\t\t\t\t${cursorGlow({ radius: 200, intensity: 0.10 })}\n\t\t\t\t\t\tclass=${headClasses}\n\t\t\t\t\t\trole=\"button\"\n\t\t\t\t\t\ttabindex=\"0\"\n\t\t\t\t\t\ttitle=\"Drag to move, click to expand\"\n\t\t\t\t\t\taria-label=\"${this.open ? 'Collapse window' : 'Expand window'}\"\n\t\t\t\t\t\t@keydown=${this._handleHeadKeydown}\n\t\t\t\t\t>\n\t\t\t\t\t\t<div class=\"flex-1 min-w-0\">\n\t\t\t\t\t\t\t<slot></slot>\n\t\t\t\t\t\t</div>\n\t\t\t\t\t\t<svg\n\t\t\t\t\t\t\twidth=\"16\" height=\"16\" viewBox=\"0 0 24 24\" fill=\"none\"\n\t\t\t\t\t\t\tclass=\"shrink-0 text-surface-on/40 transition-transform duration-200 ${this.open ? 'rotate-180' : ''}\"\n\t\t\t\t\t\t\taria-hidden=\"true\"\n\t\t\t\t\t\t>\n\t\t\t\t\t\t\t<path d=\"M6 9L12 15L18 9\" stroke=\"currentColor\" stroke-width=\"2\" stroke-linecap=\"round\" stroke-linejoin=\"round\" />\n\t\t\t\t\t\t</svg>\n\t\t\t\t\t</div>\n\t\t\t\t</section>\n\t\t\t</schmancy-surface>\n\t\t`\n\t}\n}\n\ndeclare global {\n\tinterface HTMLElementTagNameMap {\n\t\t'schmancy-window': SchmancyWindow\n\t}\n}\n"],"mappings":";;;;;;;;;;;;;;AAmBA,IAAM,IAAiB,oBACjB,IAAwB;AAmL9B,SAAS,EAAa,GAAiB,GAAA;AACtC,QAAA,EAAS,EAAE,QAAQ,EAAE,OAAO,EAAE,SAAS,EAAE,OAAO,EAAE,SAAS,EAAE,QAAQ,EAAE,OAAO,EAAE,MAAM,EAAE,UAAU,EAAE,MAAM,EAAE,UAAU,EAAE;;AAGzH,IAAA,GAAa,IArLb,MAAM,EAAA;CAWL,cAAA;AAAA,OAAA,UAR2B,IAAI,EAAqC;GACnE,yBAAS,IAAI,KAAA;GACb,WAAW;GACX,YAAY,EAAA;GAAA,CAAA,EAAA,KAAA,SAGK,KAAK,QAAQ,cAAA;;CAI/B,OAAA,cAAO;AAIN,SAHK,AACJ,EAAqB,aAAW,IAAI,GAAA,EAE9B,EAAqB;;CAK7B,IAAA,UAAI;AACH,SAAO,KAAK,QAAQ,MAAM;;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CAAE,MAAM;CAAQ,SAAA,CAAS;CAAA,CAAA,CAAA,EAAO,EAAA,WAAA,eAAA,KAAA,EAAA,EAAA,EAAA,CAEzC,EAAS,EAAE,MAAM,QAAA,CAAA,CAAA,EAAS,EAAA,WAAA,YAAA,KAAA,EAAA,EAAA,EAAA,CAE1B,EAAS,EAAE,MAAM,QAAA,CAAA,CAAA,EAAS,EAAA,WAAA,aAAA,KAAA,EAAA,EAAA,EAAA,CAG1B,EAAS;CAAE,MAAM;CAAS,SAAA,CAAS;CAAA,CAAA,CAAA,EAAO,EAAA,WAAA,QAAA,KAAA,EAAA,EAAA,EAAA,CAK1C,GAAA,CAAA,EAAO,EAAA,WAAA,cAAA,KAAA,EAAA,EAAA,EAAA,CAEP,GAAA,CAAA,EAAO,EAAA,WAAA,YAAA,KAAA,EAAA,EAAA,EAAA,CAIP,GAAA,CAAA,EAAO,EAAA,WAAA,kBAAA,KAAA,EAAA;AAAA,IAAA,IAAA,IAAA,IAAA,EAAA,CA3CR,EAAc,kBAAA,CAAA,EAAkB,EAAA;AAAA,SAAA,KAAA,GAAA,KAAA"}
1
+ {"version":3,"file":"window-CrjZdf7Y.js","names":[],"sources":["../src/window/window-manager.ts","../src/window/window-position.ts","../src/window/window.ts"],"sourcesContent":["/**\n * Window Manager — singleton service for multi-window coordination.\n *\n * Tracks all schmancy-window instances: positions, z-indices, focus, visual states.\n * Components register on connectedCallback, unregister on disconnectedCallback.\n * Focus changes, position updates, and overlap queries all flow through here.\n *\n * Follows the ThemeService singleton pattern (theme/theme.service.ts).\n *\n * Example:\n * windowManager.register('chat-1', bounds, 'bottom-right')\n * windowManager.focus('chat-1') // bumps z-index, updates focusedId\n * const overlaps = windowManager.findOverlaps(projectedBounds, 'chat-1')\n */\n\nimport { BehaviorSubject, Observable, distinctUntilChanged, map } from 'rxjs'\nimport { overlayStack } from '../utils/overlay-stack.js'\nimport type { WindowBounds, WindowRecord, WindowRegistryState, SnapTarget } from './window-registry.js'\n\nconst STORAGE_PREFIX = 'schmancy-window-'\nconst LEGACY_STORAGE_PREFIX = 'schmancy-float-'\n\nclass WindowManagerService {\n\tprivate static instance: WindowManagerService\n\n\tprivate readonly _state$ = new BehaviorSubject<WindowRegistryState>({\n\t\twindows: new Map(),\n\t\tfocusedId: null,\n\t\tstackOrder: [],\n\t})\n\n\treadonly state$ = this._state$.asObservable()\n\n\tprivate constructor() {}\n\n\tstatic getInstance(): WindowManagerService {\n\t\tif (!WindowManagerService.instance) {\n\t\t\tWindowManagerService.instance = new WindowManagerService()\n\t\t}\n\t\treturn WindowManagerService.instance\n\t}\n\n\t// ── Synchronous accessors ──────────────────────────────────────────\n\n\tget windows(): Map<string, WindowRecord> {\n\t\treturn this._state$.value.windows\n\t}\n\n\tget focusedId(): string | null {\n\t\treturn this._state$.value.focusedId\n\t}\n\n\t// ── Registration ───────────────────────────────────────────────────\n\n\tregister(id: string, initialBounds: WindowBounds, snapTarget: SnapTarget): void {\n\t\tconst state = this._state$.value\n\t\tif (state.windows.has(id)) return\n\n\t\tconst zIndex = overlayStack.assignZIndex(id)\n\t\tconst record: WindowRecord = {\n\t\t\tid,\n\t\t\tbounds: initialBounds,\n\t\t\tvisualState: 'normal',\n\t\t\tzIndex,\n\t\t\topen: false,\n\t\t\tsnapTarget,\n\t\t}\n\n\t\tconst windows = new Map(state.windows)\n\t\twindows.set(id, record)\n\t\tconst stackOrder = overlayStack.getStackOrder()\n\n\t\tthis._state$.next({ ...state, windows, stackOrder })\n\t}\n\n\tunregister(id: string): void {\n\t\tconst state = this._state$.value\n\t\tif (!state.windows.has(id)) return\n\n\t\toverlayStack.releaseId(id)\n\t\tconst windows = new Map(state.windows)\n\t\twindows.delete(id)\n\t\tconst stackOrder = overlayStack.getStackOrder()\n\t\tconst focusedId = state.focusedId === id ? null : state.focusedId\n\n\t\tthis._state$.next({ ...state, windows, stackOrder, focusedId })\n\t}\n\n\t// ── State mutations ────────────────────────────────────────────────\n\n\tupdateBounds(id: string, bounds: WindowBounds): void {\n\t\tthis._updateRecord(id, { bounds })\n\t}\n\n\tupdateVisualState(id: string, visualState: WindowRecord['visualState']): void {\n\t\tthis._updateRecord(id, { visualState })\n\t}\n\n\tupdateOpen(id: string, open: boolean): void {\n\t\tthis._updateRecord(id, { open })\n\t}\n\n\tfocus(id: string): void {\n\t\tconst state = this._state$.value\n\t\tif (!state.windows.has(id)) return\n\t\tif (state.focusedId === id) return\n\n\t\tconst zIndex = overlayStack.bringToFront(id)\n\t\tconst windows = new Map(state.windows)\n\t\tconst record = windows.get(id)\n\t\tif (record) {\n\t\t\twindows.set(id, { ...record, zIndex })\n\t\t}\n\t\tconst stackOrder = overlayStack.getStackOrder()\n\n\t\tthis._state$.next({ ...state, windows, stackOrder, focusedId: id })\n\t}\n\n\t// ── Queries ────────────────────────────────────────────────────────\n\n\tfindOverlaps(bounds: WindowBounds, excludeId: string): WindowRecord[] {\n\t\tconst result: WindowRecord[] = []\n\t\tfor (const [id, record] of this._state$.value.windows) {\n\t\t\tif (id === excludeId) continue\n\t\t\tif (rectsOverlap(bounds, record.bounds)) {\n\t\t\t\tresult.push(record)\n\t\t\t}\n\t\t}\n\t\treturn result\n\t}\n\n\tgetNeighbors(id: string): WindowRecord[] {\n\t\tconst result: WindowRecord[] = []\n\t\tfor (const [otherId, record] of this._state$.value.windows) {\n\t\t\tif (otherId !== id) result.push(record)\n\t\t}\n\t\treturn result\n\t}\n\n\t// ── Selectors ──────────────────────────────────────────────────────\n\n\tselectWindow(id: string): Observable<WindowRecord | undefined> {\n\t\treturn this._state$.pipe(\n\t\t\tmap(state => state.windows.get(id)),\n\t\t\tdistinctUntilChanged(),\n\t\t)\n\t}\n\n\tselectFocused(): Observable<string | null> {\n\t\treturn this._state$.pipe(\n\t\t\tmap(state => state.focusedId),\n\t\t\tdistinctUntilChanged(),\n\t\t)\n\t}\n\n\t// ── Persistence ────────────────────────────────────────────────────\n\n\tloadPosition(id: string): { x: number; y: number; anchor: string } | null {\n\t\ttry {\n\t\t\t// Try new key first, fall back to legacy\n\t\t\tconst raw = localStorage.getItem(STORAGE_PREFIX + id) ?? localStorage.getItem(LEGACY_STORAGE_PREFIX + id)\n\t\t\tif (!raw) return null\n\t\t\treturn JSON.parse(raw) as { x: number; y: number; anchor: string }\n\t\t} catch {\n\t\t\treturn null\n\t\t}\n\t}\n\n\tsavePosition(id: string, data: { x: number; y: number; anchor: string }): void {\n\t\ttry {\n\t\t\tlocalStorage.setItem(STORAGE_PREFIX + id, JSON.stringify(data))\n\t\t} catch {\n\t\t\t// ignore\n\t\t}\n\t}\n\n\tclearPosition(id: string): void {\n\t\ttry {\n\t\t\tlocalStorage.removeItem(STORAGE_PREFIX + id)\n\t\t\tlocalStorage.removeItem(LEGACY_STORAGE_PREFIX + id)\n\t\t} catch {\n\t\t\t// ignore\n\t\t}\n\t}\n\n\t// ── Internal ───────────────────────────────────────────────────────\n\n\tprivate _updateRecord(id: string, updates: Partial<WindowRecord>): void {\n\t\tconst state = this._state$.value\n\t\tconst record = state.windows.get(id)\n\t\tif (!record) return\n\n\t\tconst windows = new Map(state.windows)\n\t\twindows.set(id, { ...record, ...updates })\n\t\tthis._state$.next({ ...state, windows })\n\t}\n}\n\n/** Simple rect overlap check (inline — no circular import with window-position) */\nfunction rectsOverlap(a: WindowBounds, b: WindowBounds): boolean {\n\treturn !(a.left >= b.left + b.width || a.left + a.width <= b.left || a.top >= b.top + b.height || a.top + a.height <= b.top)\n}\n\nexport const windowManager = WindowManagerService.getInstance()\n","/**\n * Window Position — pure functions for overlap resolution, cascade, and snapping.\n *\n * All functions are stateless: they take window bounds and viewport dimensions,\n * return new bounds. No side effects, no DOM access, no subscriptions.\n *\n * Example:\n * const projected = { left: 100, top: 400, width: 360, height: 500 }\n * const neighbors = windowManager.findOverlaps(projected, 'my-id')\n * const resolved = resolveOverlap(projected, neighbors, { width: 1440, height: 900 })\n * // → { left: 144, top: 444, width: 360, height: 500 } (cascaded away from conflict)\n */\n\nimport type { WindowBounds, WindowRecord } from './window-registry.js'\n\nconst HEAD_HEIGHT = 44\nconst CASCADE_OFFSET = HEAD_HEIGHT\nconst MAX_CASCADE_ATTEMPTS = 10\n\n/** Check if two rectangles overlap (edges touching does NOT count as overlap) */\nexport function rectsOverlap(a: WindowBounds, b: WindowBounds): boolean {\n\treturn !(a.left >= b.left + b.width || a.left + a.width <= b.left || a.top >= b.top + b.height || a.top + a.height <= b.top)\n}\n\n/**\n * Resolve overlap by cascading diagonally until no conflict.\n * Shifts by (HEAD_HEIGHT, HEAD_HEIGHT) per attempt, clamped to viewport.\n */\nexport function resolveOverlap(\n\tcandidate: WindowBounds,\n\texisting: WindowRecord[],\n\tviewport: { width: number; height: number },\n): WindowBounds {\n\tlet bounds = { ...candidate }\n\n\tfor (let attempt = 0; attempt < MAX_CASCADE_ATTEMPTS; attempt++) {\n\t\tconst hasOverlap = existing.some(w => rectsOverlap(bounds, w.bounds))\n\t\tif (!hasOverlap) break\n\n\t\tbounds = {\n\t\t\t...bounds,\n\t\t\tleft: bounds.left + CASCADE_OFFSET,\n\t\t\ttop: bounds.top + CASCADE_OFFSET,\n\t\t}\n\t}\n\n\treturn clampToViewport(bounds, viewport)\n}\n\n/**\n * Clamp bounds so the window stays fully within the viewport.\n */\nexport function clampToViewport(\n\tbounds: WindowBounds,\n\tviewport: { width: number; height: number },\n): WindowBounds {\n\treturn {\n\t\twidth: bounds.width,\n\t\theight: bounds.height,\n\t\tleft: Math.max(0, Math.min(bounds.left, viewport.width - bounds.width)),\n\t\ttop: Math.max(0, Math.min(bounds.top, viewport.height - bounds.height)),\n\t}\n}\n","import { $LitElement } from '@mixins/index'\nimport { css, html, nothing } from 'lit'\nimport { customElement, property, state } from 'lit/decorators.js'\nimport { classMap } from 'lit/directives/class-map.js'\nimport { createRef, ref } from 'lit/directives/ref.js'\nimport { styleMap } from 'lit/directives/style-map.js'\nimport {\n\tanimationFrameScheduler,\n\tauditTime,\n\tcatchError,\n\tEMPTY,\n\tfilter,\n\tfinalize,\n\tfrom,\n\tfromEvent,\n\tmap,\n\tmerge,\n\tObservable,\n\tswitchMap,\n\ttake,\n\ttakeUntil,\n\ttap,\n} from 'rxjs'\nimport { SPRING_SMOOTH, SPRING_SNAPPY } from '../utils/animation.js'\nimport { cursorGlow } from '../directives/cursor-glow'\nimport { reducedMotion$ } from '../directives/reduced-motion'\nimport { theme } from '../theme/theme.service.js'\nimport type { SnapCorner, WindowBounds, WindowVisualState } from './window-registry.js'\nimport { windowManager } from './window-manager.js'\nimport { resolveOverlap } from './window-position.js'\n\nconst HEAD_HEIGHT = 48\nconst DRAG_THRESHOLD = 5\n\ninterface Position {\n\tx: number\n\ty: number\n}\n\n@customElement('schmancy-window')\nexport default class SchmancyWindow extends $LitElement(css`\n\t:host {\n\t\tdisplay: contents;\n\t\tposition: relative;\n\t\tz-index: 1000;\n\t}\n\t:host([hidden]) {\n\t\tdisplay: none !important;\n\t}\n`) {\n\t@property({ type: String }) id: string = 'default'\n\t/** Override the expanded panel width (e.g. '320px', '24rem'). Defaults to responsive sizing. */\n\t@property({ type: String }) expandedWidth?: string\n\t/** Override the expanded panel height (e.g. '400px', '50vh'). */\n\t@property({ type: String }) expandedHeight?: string\n\t/** When true, uses a lower elevation shadow in the collapsed state. */\n\t@property({ type: Boolean, reflect: true }) lowered: boolean = false\n\t/** Corner the window is anchored to. */\n\t@property({ type: String }) corner: SnapCorner = 'bottom-right'\n\t/** When true, window can be resized by the user. */\n\t@property({ type: Boolean }) resizable = false\n\t/** When true, window stays at its dragged position instead of snapping to a corner. */\n\t@property({ type: Boolean }) freePosition = false\n\t/** Visual state of the window (minimized, normal, maximized). */\n\t@property({ type: String, reflect: true }) visualState: WindowVisualState = 'normal'\n\t/** Minimum width in pixels. */\n\t@property({ type: Number }) minWidth = 280\n\t/** Minimum height in pixels. */\n\t@property({ type: Number }) minHeight = 200\n\n\t/** Whether the body is expanded. */\n\t@property({ type: Boolean, reflect: true }) open = false\n\n\tprivate _currentAnimation?: Animation\n\n\t/** Lazy rendering: body content not in DOM until first expand. */\n\t@state() private _hasOpened = false\n\t/** Whether this window is the focused window in the manager — drives visual ring */\n\t@state() private _focused = false\n\n\t// Internal position -- plain fields, updated directly during drag\n\tprivate _position: Position = { x: 16, y: 16 }\n\t@state() private _currentCorner: SnapCorner = 'bottom-right'\n\n\t// Track applied corner to avoid unnecessary style.removeProperty calls during drag\n\tprivate _appliedCorner: string = ''\n\n\t// Refs\n\tprivate _containerRef = createRef<HTMLElement>()\n\tprivate _bodyRef = createRef<HTMLElement>()\n\tprivate _headRef = createRef<HTMLElement>()\n\n\t// ============================================\n\t// COMPUTED\n\t// ============================================\n\n\tprivate get panelWidth(): string {\n\t\treturn this.expandedWidth ?? 'min(360px, calc(100vw - 32px))'\n\t}\n\n\tprivate get isBottomCorner(): boolean {\n\t\treturn this._currentCorner.startsWith('bottom')\n\t}\n\n\tprivate get closedClipPath(): string {\n\t\treturn this.isBottomCorner\n\t\t\t? `inset(calc(100% - ${HEAD_HEIGHT}px) 0px 0px 0px round 22px)`\n\t\t\t: `inset(0px 0px calc(100% - ${HEAD_HEIGHT}px) 0px round 22px)`\n\t}\n\n\tprivate get openClipPath(): string {\n\t\treturn 'inset(0px 0px 0px 0px round 12px)'\n\t}\n\n\tprivate get elevation(): string {\n\t\tif (this.open) return '4'\n\t\treturn this.lowered ? '1' : '3'\n\t}\n\n\t// ============================================\n\t// POSITION MANAGEMENT\n\t// ============================================\n\n\tprivate _applyContainerPosition() {\n\t\tconst container = this._containerRef.value\n\t\tif (!container) return\n\t\t// Only clear position properties when corner changes (avoids 4 style invalidations per drag frame)\n\t\tif (this._appliedCorner !== this._currentCorner) {\n\t\t\tcontainer.style.removeProperty('left')\n\t\t\tcontainer.style.removeProperty('right')\n\t\t\tcontainer.style.removeProperty('top')\n\t\t\tcontainer.style.removeProperty('bottom')\n\t\t\tthis._appliedCorner = this._currentCorner\n\t\t}\n\t\tconst { x, y } = this._position\n\t\tif (this._currentCorner.includes('right')) {\n\t\t\tcontainer.style.right = `${x}px`\n\t\t} else {\n\t\t\tcontainer.style.left = `${x}px`\n\t\t}\n\t\tif (this._currentCorner.includes('bottom')) {\n\t\t\tcontainer.style.bottom = `${y + theme.bottomOffset}px`\n\t\t} else {\n\t\t\tcontainer.style.top = `${y}px`\n\t\t}\n\t}\n\n\tprivate static readonly VALID_CORNERS = new Set<string>(['top-left', 'top-right', 'bottom-left', 'bottom-right'])\n\n\tprivate _loadPosition() {\n\t\tconst saved = windowManager.loadPosition(this.id)\n\t\tif (saved) {\n\t\t\tthis._position = { x: saved.x, y: saved.y }\n\t\t\tif (SchmancyWindow.VALID_CORNERS.has(saved.anchor)) {\n\t\t\t\tthis._currentCorner = saved.anchor as SnapCorner\n\t\t\t}\n\t\t}\n\t}\n\n\tprivate _savePosition() {\n\t\twindowManager.savePosition(this.id, { ...this._position, anchor: this._currentCorner })\n\t}\n\n\tprivate _validateBounds() {\n\t\tconst container = this._containerRef.value\n\t\tif (!container) return\n\t\tconst rect = container.getBoundingClientRect()\n\t\tif (rect.width === 0) return\n\t\tconst vw = window.innerWidth\n\t\tconst vh = window.innerHeight\n\t\tconst isRight = this._currentCorner.includes('right')\n\t\tconst isBottom = this._currentCorner.includes('bottom')\n\t\tconst actualLeft = isRight ? vw - this._position.x - rect.width : this._position.x\n\t\tconst actualTop = isBottom ? vh - this._position.y - rect.height : this._position.y\n\t\tconst newLeft = Math.max(0, Math.min(actualLeft, vw - rect.width))\n\t\tconst newTop = Math.max(0, Math.min(actualTop, vh - rect.height))\n\t\tthis._position = {\n\t\t\tx: isRight ? vw - newLeft - rect.width : newLeft,\n\t\t\ty: isBottom ? vh - newTop - rect.height : newTop,\n\t\t}\n\t\tthis._applyContainerPosition()\n\t}\n\n\t// ============================================\n\t// CORNER SNAPPING\n\t// ============================================\n\n\tprivate _reorientToNearestCorner(skipAnimation = false): void {\n\t\t// Free position mode: skip corner snapping\n\t\tif (this.freePosition) {\n\t\t\tthis._savePosition()\n\t\t\tconst rect = this._containerRef.value?.getBoundingClientRect()\n\t\t\tif (rect) {\n\t\t\t\twindowManager.updateBounds(this.id, { left: rect.left, top: rect.top, width: rect.width, height: rect.height })\n\t\t\t}\n\t\t\treturn\n\t\t}\n\n\t\tconst container = this._containerRef.value\n\t\tif (!container) return\n\n\t\t// F -- record current screen position before DOM mutation\n\t\tconst rect = container.getBoundingClientRect()\n\n\t\t// L -- calculate nearest corner using head visual center\n\t\tconst currentIsBottom = this._currentCorner.includes('bottom')\n\t\tconst headCenterX = rect.left + rect.width / 2\n\t\tconst headCenterY = currentIsBottom\n\t\t\t? rect.bottom - HEAD_HEIGHT / 2\n\t\t\t: rect.top + HEAD_HEIGHT / 2\n\t\tconst side = headCenterX > window.innerWidth / 2 ? 'right' : 'left'\n\t\tconst vert = headCenterY > window.innerHeight / 2 ? 'bottom' : 'top'\n\t\tconst newCorner: SnapCorner = `${vert}-${side}` as SnapCorner\n\n\t\t// Snap corner and reset offset to standard edge gap\n\t\tthis._currentCorner = newCorner\n\t\tthis._position = { x: 16, y: 16 }\n\t\tthis._applyContainerPosition()\n\t\t// Sync clip-path to new corner\n\t\tif (!this.open) {\n\t\t\tcontainer.style.clipPath = this.closedClipPath\n\t\t}\n\n\t\tif (skipAnimation || reducedMotion$.value) {\n\t\t\tthis._savePosition()\n\t\t\tconst snapRect = container.getBoundingClientRect()\n\t\t\twindowManager.updateBounds(this.id, { left: snapRect.left, top: snapRect.top, width: snapRect.width, height: snapRect.height })\n\t\t\treturn\n\t\t}\n\n\t\t// I -- invert: shift element back to its original visual position\n\t\tconst newRect = container.getBoundingClientRect()\n\t\tconst dx = rect.left - newRect.left\n\t\tconst dy = rect.top - newRect.top\n\t\tcontainer.style.translate = `${dx}px ${dy}px`\n\n\t\t// P -- play: animate from the inverse offset to natural resting position\n\t\tconst flipKeyframes: Keyframe[] = [{ translate: `${dx}px ${dy}px` }, { translate: '0px 0px' }]\n\t\tconst anim = container.animate(\n\t\t\tflipKeyframes,\n\t\t\t{\n\t\t\t\tduration: SPRING_SMOOTH.duration,\n\t\t\t\teasing: SPRING_SMOOTH.easingFallback,\n\t\t\t\tfill: 'forwards',\n\t\t\t},\n\t\t)\n\t\tfrom(anim.finished).pipe(\n\t\t\ttake(1),\n\t\t\ttap(() => {\n\t\t\t\tif (container.isConnected) container.style.translate = ''\n\t\t\t\t// Report final resting bounds after animation completes\n\t\t\t\tconst finalRect = container.getBoundingClientRect()\n\t\t\t\twindowManager.updateBounds(this.id, { left: finalRect.left, top: finalRect.top, width: finalRect.width, height: finalRect.height })\n\t\t\t}),\n\t\t\tcatchError(() => EMPTY),\n\t\t\ttakeUntil(this.disconnecting),\n\t\t).subscribe()\n\n\t\tthis._savePosition()\n\t}\n\n\t// ============================================\n\t// DRAG PIPELINE\n\t// ============================================\n\n\tprivate _drag$(): Observable<never> {\n\t\treturn new Observable(() => {\n\t\t\tconst head = this._headRef.value\n\t\t\tconst container = this._containerRef.value\n\t\t\tif (!head || !container) return\n\n\t\t\tlet didDrag = false\n\n\t\t\tconst sub = fromEvent<PointerEvent>(head, 'pointerdown').pipe(\n\t\t\t\tfilter(e => e.button === 0),\n\t\t\t\tfilter(e => {\n\t\t\t\t\tconst tag = (e.target as HTMLElement).tagName?.toLowerCase()\n\t\t\t\t\treturn !['input', 'textarea', 'select', 'button'].includes(tag)\n\t\t\t\t\t\t&& !(e.target as HTMLElement).closest('schmancy-input, schmancy-icon-button, button, a')\n\t\t\t\t}),\n\t\t\t\ttap(e => {\n\t\t\t\t\te.preventDefault()\n\t\t\t\t\te.stopPropagation()\n\t\t\t\t}),\n\t\t\t)\n\t\t\t\t.pipe(\n\t\t\t\t\tmap(e => {\n\t\t\t\t\t\tconst rect = container.getBoundingClientRect()\n\t\t\t\t\t\tconst isBottom = this._currentCorner.includes('bottom')\n\t\t\t\t\t\tconst wasOpen = this.open\n\t\t\t\t\t\tdidDrag = false\n\t\t\t\t\t\treturn {\n\t\t\t\t\t\t\tstartX: e.clientX,\n\t\t\t\t\t\t\tstartY: e.clientY,\n\t\t\t\t\t\t\toffsetX: e.clientX - rect.left,\n\t\t\t\t\t\t\toffsetY: e.clientY - rect.top,\n\t\t\t\t\t\t\trect,\n\t\t\t\t\t\t\tvw: window.innerWidth,\n\t\t\t\t\t\t\tvh: window.innerHeight,\n\t\t\t\t\t\t\tisBottom,\n\t\t\t\t\t\t\twasOpen,\n\t\t\t\t\t\t\tpointerId: e.pointerId,\n\t\t\t\t\t\t}\n\t\t\t\t\t}),\n\t\t\t\t\tswitchMap(({ startX, startY, offsetX, offsetY, rect, vw, vh, isBottom, wasOpen, pointerId }) => {\n\t\t\t\t\t\tconst move$ = fromEvent<PointerEvent>(window, 'pointermove').pipe(\n\t\t\t\t\t\t\tfilter(e => e.pointerId === pointerId),\n\t\t\t\t\t\t\tauditTime(0, animationFrameScheduler),\n\t\t\t\t\t\t\tmap(e => ({ clientX: e.clientX, clientY: e.clientY })),\n\t\t\t\t\t\t)\n\t\t\t\t\t\tconst end$ = fromEvent<PointerEvent>(window, 'pointerup').pipe(\n\t\t\t\t\t\t\tfilter(e => e.pointerId === pointerId),\n\t\t\t\t\t\t)\n\n\t\t\t\t\t\treturn move$.pipe(\n\t\t\t\t\t\t\ttap(({ clientX, clientY }) => {\n\t\t\t\t\t\t\t\tconst dx = clientX - startX\n\t\t\t\t\t\t\t\tconst dy = clientY - startY\n\t\t\t\t\t\t\t\tif (Math.sqrt(dx * dx + dy * dy) > DRAG_THRESHOLD && !didDrag) {\n\t\t\t\t\t\t\t\t\tdidDrag = true\n\t\t\t\t\t\t\t\t\tthis._applyDragVisuals(true)\n\t\t\t\t\t\t\t\t\t// Collapse on first confirmed drag move\n\t\t\t\t\t\t\t\t\tif (wasOpen) {\n\t\t\t\t\t\t\t\t\t\tthis.open = false\n\t\t\t\t\t\t\t\t\t\tcontainer.style.clipPath = this.closedClipPath\n\t\t\t\t\t\t\t\t\t\tcontainer.style.overflow = 'hidden'\n\t\t\t\t\t\t\t\t\t\tconst body = this._bodyRef.value\n\t\t\t\t\t\t\t\t\t\tif (body) {\n\t\t\t\t\t\t\t\t\t\t\tbody.inert = true\n\t\t\t\t\t\t\t\t\t\t\tbody.style.visibility = 'hidden'\n\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\tif (!didDrag) return\n\n\t\t\t\t\t\t\t\tconst left = Math.max(0, Math.min(clientX - offsetX, vw - rect.width))\n\t\t\t\t\t\t\t\tconst minTop = isBottom ? HEAD_HEIGHT - rect.height : 0\n\t\t\t\t\t\t\t\tconst maxTop = isBottom ? vh - rect.height : vh - HEAD_HEIGHT\n\t\t\t\t\t\t\t\tconst top = Math.max(minTop, Math.min(clientY - offsetY, maxTop))\n\n\t\t\t\t\t\t\t\tthis._position = {\n\t\t\t\t\t\t\t\t\tx: this._currentCorner.includes('right') ? vw - left - rect.width : left,\n\t\t\t\t\t\t\t\t\ty: isBottom ? vh - top - rect.height : top,\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\tthis._applyContainerPosition()\n\t\t\t\t\t\t\t}),\n\t\t\t\t\t\t\ttakeUntil(end$),\n\t\t\t\t\t\t\tfinalize(() => {\n\t\t\t\t\t\t\t\tif (didDrag) {\n\t\t\t\t\t\t\t\t\tthis._reorientToNearestCorner()\n\t\t\t\t\t\t\t\t\tthis._applyDragVisuals(false)\n\t\t\t\t\t\t\t\t\tdidDrag = false\n\t\t\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\t\t\tdidDrag = false\n\t\t\t\t\t\t\t\t\tthis.toggle()\n\t\t\t\t\t\t\t\t}\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\t.subscribe()\n\n\t\t\treturn () => sub.unsubscribe()\n\t\t})\n\t}\n\n\t// ============================================\n\t// LIFECYCLE\n\t// ============================================\n\n\tconnectedCallback() {\n\t\tsuper.connectedCallback()\n\n\t\t// Pipeline 1: DOM setup + manager registration + drag + z-index sync\n\t\tfrom(this.updateComplete).pipe(\n\t\t\ttake(1),\n\t\t\ttap(() => {\n\t\t\t\tthis._currentCorner = this.corner\n\t\t\t\tthis._loadPosition()\n\t\t\t\tthis._applyContainerPosition()\n\t\t\t\tthis._initDOMState()\n\t\t\t\t// Register with window manager\n\t\t\t\tconst container = this._containerRef.value\n\t\t\t\tif (container) {\n\t\t\t\t\tconst rect = container.getBoundingClientRect()\n\t\t\t\t\tconst bounds: WindowBounds = { left: rect.left, top: rect.top, width: rect.width, height: rect.height }\n\t\t\t\t\twindowManager.register(this.id, bounds, this.freePosition ? 'free' : this._currentCorner)\n\t\t\t\t}\n\t\t\t}),\n\t\t\tswitchMap(() => merge(\n\t\t\t\tthis._drag$(),\n\t\t\t\twindowManager.selectWindow(this.id).pipe(\n\t\t\t\t\ttap(record => {\n\t\t\t\t\t\tif (!record) return\n\t\t\t\t\t\tconst container = this._containerRef.value\n\t\t\t\t\t\tif (container) container.style.zIndex = String(record.zIndex)\n\t\t\t\t\t}),\n\t\t\t\t),\n\t\t\t\twindowManager.selectFocused().pipe(\n\t\t\t\t\ttap(focusedId => {\n\t\t\t\t\t\tthis._focused = focusedId === this.id\n\t\t\t\t\t}),\n\t\t\t\t),\n\t\t\t)),\n\t\t\ttakeUntil(this.disconnecting),\n\t\t).subscribe()\n\n\n\t\t// Pipeline 3: Environment -- one subscription\n\t\tmerge(\n\t\t\tfromEvent(window, 'resize').pipe(\n\t\t\t\tauditTime(0, animationFrameScheduler),\n\t\t\t\ttap(() => this._validateBounds()),\n\t\t\t),\n\t\t\ttheme.bottomOffset$.pipe(\n\t\t\t\ttap(() => this._applyContainerPosition()),\n\t\t\t),\n\t\t).pipe(takeUntil(this.disconnecting)).subscribe()\n\t}\n\n\tdisconnectedCallback() {\n\t\tsuper.disconnectedCallback()\n\t\twindowManager.unregister(this.id)\n\t}\n\n\tprivate _initDOMState() {\n\t\tconst container = this._containerRef.value\n\t\tconst body = this._bodyRef.value\n\t\tif (!container) return\n\n\t\tthis._applyContainerPosition()\n\n\t\tif (this.open) {\n\t\t\tthis._hasOpened = true\n\t\t\tcontainer.style.overflow = ''\n\t\t\tif (body) {\n\t\t\t\tbody.inert = false\n\t\t\t\tbody.style.visibility = 'visible'\n\t\t\t}\n\t\t} else {\n\t\t\tcontainer.style.clipPath = this.closedClipPath\n\t\t\tcontainer.style.overflow = 'hidden'\n\t\t\tif (body) {\n\t\t\t\tbody.inert = true\n\t\t\t\tbody.style.visibility = 'hidden'\n\t\t\t}\n\t\t}\n\t}\n\n\t// ============================================\n\t// ANIMATION\n\t// ============================================\n\n\tprivate _animateOpen() {\n\t\tconst container = this._containerRef.value\n\t\tconst body = this._bodyRef.value\n\t\tif (!container) return\n\n\t\tthis._hasOpened = true\n\t\tthis.open = true\n\n\t\t// Overlap avoidance\n\t\tconst rect = container.getBoundingClientRect()\n\t\tconst projectedBounds: WindowBounds = {\n\t\t\tleft: rect.left,\n\t\t\ttop: this.isBottomCorner ? rect.top - 400 : rect.top,\n\t\t\twidth: rect.width,\n\t\t\theight: 400 + HEAD_HEIGHT,\n\t\t}\n\t\tconst overlaps = windowManager.findOverlaps(projectedBounds, this.id)\n\t\tif (overlaps.length > 0) {\n\t\t\tconst resolved = resolveOverlap(projectedBounds, overlaps, { width: window.innerWidth, height: window.innerHeight })\n\t\t\tif (Math.abs(resolved.left - projectedBounds.left) > 10 || Math.abs(resolved.top - projectedBounds.top) > 10) {\n\t\t\t\tconst isRight = this._currentCorner.includes('right')\n\t\t\t\tconst isBottom = this._currentCorner.includes('bottom')\n\t\t\t\tthis._position = {\n\t\t\t\t\tx: isRight ? window.innerWidth - resolved.left - resolved.width : resolved.left,\n\t\t\t\t\ty: isBottom ? window.innerHeight - resolved.top - resolved.height : resolved.top,\n\t\t\t\t}\n\t\t\t\tthis._applyContainerPosition()\n\t\t\t}\n\t\t}\n\n\t\tif (body) {\n\t\t\tbody.style.visibility = 'visible'\n\t\t\tbody.inert = false\n\t\t}\n\n\t\tif (reducedMotion$.value) {\n\t\t\tcontainer.style.clipPath = ''\n\t\t\tcontainer.style.overflow = ''\n\t\t\tthis.dispatchScopedEvent('window-toggle', { state: 'expanded' })\n\t\t\treturn\n\t\t}\n\n\t\tthis._currentAnimation?.cancel()\n\t\tcontainer.style.overflow = 'hidden'\n\t\tcontainer.style.willChange = 'opacity'\n\t\tconst openKeyframes: Keyframe[] = [\n\t\t\t{ clipPath: this.closedClipPath, opacity: 0.95 },\n\t\t\t{ clipPath: this.openClipPath, opacity: 1 },\n\t\t]\n\t\tconst anim = container.animate(openKeyframes, {\n\t\t\tduration: SPRING_SNAPPY.duration,\n\t\t\teasing: SPRING_SNAPPY.easingFallback,\n\t\t\tfill: 'forwards',\n\t\t})\n\t\tthis._currentAnimation = anim\n\n\t\tfrom(anim.finished).pipe(\n\t\t\ttake(1),\n\t\t\ttap(() => {\n\t\t\t\tif (container.isConnected) {\n\t\t\t\t\tcontainer.style.clipPath = ''\n\t\t\t\t\tcontainer.style.overflow = ''\n\t\t\t\t\tcontainer.style.willChange = ''\n\t\t\t\t}\n\t\t\t}),\n\t\t\tcatchError(() => EMPTY),\n\t\t\ttakeUntil(this.disconnecting),\n\t\t).subscribe()\n\n\t\tthis.dispatchScopedEvent('window-toggle', { state: 'expanded' })\n\t}\n\n\tprivate _animateClose() {\n\t\tconst container = this._containerRef.value\n\t\tif (!container) return\n\n\t\tif (reducedMotion$.value) {\n\t\t\tcontainer.style.clipPath = this.closedClipPath\n\t\t\tcontainer.style.overflow = 'hidden'\n\t\t\tthis.open = false\n\t\t\tconst body = this._bodyRef.value\n\t\t\tif (body) { body.inert = true; body.style.visibility = 'hidden' }\n\t\t\tthis.dispatchScopedEvent('window-toggle', { state: 'collapsed' })\n\t\t\treturn\n\t\t}\n\n\t\tthis._currentAnimation?.cancel()\n\t\tcontainer.style.overflow = 'hidden'\n\t\tcontainer.style.willChange = 'opacity'\n\t\tconst closeKeyframes: Keyframe[] = [\n\t\t\t{ clipPath: this.openClipPath, opacity: 1 },\n\t\t\t{ clipPath: this.closedClipPath, opacity: 0.95 },\n\t\t]\n\t\tconst anim = container.animate(closeKeyframes, {\n\t\t\tduration: Math.round(SPRING_SNAPPY.duration * 0.7),\n\t\t\teasing: 'cubic-bezier(0.4, 0, 0.8, 0.15)',\n\t\t\tfill: 'forwards',\n\t\t})\n\t\tthis._currentAnimation = anim\n\n\t\tfrom(anim.finished).pipe(\n\t\t\ttake(1),\n\t\t\ttap(() => {\n\t\t\t\tthis.open = false\n\t\t\t\tcontainer.style.willChange = ''\n\t\t\t\tconst body = this._bodyRef.value\n\t\t\t\tif (body) { body.inert = true; body.style.visibility = 'hidden' }\n\t\t\t}),\n\t\t\tcatchError(() => EMPTY),\n\t\t\ttakeUntil(this.disconnecting),\n\t\t).subscribe()\n\n\t\tthis.dispatchScopedEvent('window-toggle', { state: 'collapsed' })\n\t}\n\n\t// ============================================\n\t// VISUAL STATE HELPERS\n\t// ============================================\n\n\t/** Apply drag visuals directly on DOM refs — avoids full Lit re-render for cursor + opacity */\n\tprivate _applyDragVisuals(dragging: boolean) {\n\t\tconst head = this._headRef.value\n\t\tconst container = this._containerRef.value\n\t\tif (head) {\n\t\t\thead.classList.toggle('cursor-grabbing', dragging)\n\t\t\thead.classList.toggle('cursor-move', !dragging)\n\t\t}\n\t\tif (container) {\n\t\t\tcontainer.style.opacity = dragging ? '0.95' : ''\n\t\t}\n\t}\n\n\tprivate _handleFocus = () => windowManager.focus(this.id)\n\n\tprivate _handleHeadKeydown = (e: KeyboardEvent) => {\n\t\tif (e.key === 'Enter' || e.key === ' ') {\n\t\t\te.preventDefault()\n\t\t\tthis.toggle()\n\t\t\treturn\n\t\t}\n\t\tif (e.key === 'ArrowUp' || e.key === 'ArrowDown' || e.key === 'ArrowLeft' || e.key === 'ArrowRight') {\n\t\t\te.preventDefault()\n\t\t\tconst step = e.shiftKey ? 20 : 5\n\t\t\tconst dx = e.key === 'ArrowRight' ? step : e.key === 'ArrowLeft' ? -step : 0\n\t\t\tconst dy = e.key === 'ArrowDown' ? step : e.key === 'ArrowUp' ? -step : 0\n\t\t\tthis._position = { x: this._position.x + dx, y: this._position.y + dy }\n\t\t\tthis._applyContainerPosition()\n\t\t\tthis._savePosition()\n\t\t}\n\t}\n\n\t// ============================================\n\t// PUBLIC API\n\t// ============================================\n\n\ttoggle() {\n\t\tif (this.open) this._animateClose()\n\t\telse this._animateOpen()\n\t}\n\n\texpand() {\n\t\tif (this.open) return\n\t\tthis._animateOpen()\n\t}\n\n\tclose() {\n\t\tif (!this.open) return\n\t\tthis._animateClose()\n\t}\n\n\t// ============================================\n\t// RENDER\n\t// ============================================\n\n\tprotected render(): unknown {\n\t\tconst isBottom = this._currentCorner.startsWith('bottom')\n\n\t\tconst containerClasses = classMap({\n\t\t\tfixed: true,\n\t\t\tflex: true,\n\t\t\t'flex-col': isBottom,\n\t\t\t'flex-col-reverse': !isBottom,\n\t\t\t'z-1000': true,\n\t\t\t'ring-1': !this._focused,\n\t\t\t'ring-2': this._focused,\n\t\t\t'ring-primary-default/30': this._focused,\n\t\t\t'ring-primary-default/15': this.open && !this._focused,\n\t\t\t'rounded-2xl': this.open,\n\t\t\t'ring-outline-variant/40': !this.open && !this._focused,\n\t\t\t'rounded-[22px]': !this.open,\n\t\t\t'overflow-hidden': true,\n\t\t})\n\n\t\tconst containerStyles = styleMap({\n\t\t\twidth: this.panelWidth,\n\t\t\t'max-height': 'calc(100vh - 32px)',\n\t\t\t'pointer-events': 'none',\n\t\t})\n\n\t\tconst bodyStyles = styleMap({\n\t\t\t'pointer-events': this.open ? 'auto' : 'none',\n\t\t})\n\n\t\tconst headClasses = classMap({\n\t\t\t'h-full': true,\n\t\t\t'px-3': true,\n\t\t\tflex: true,\n\t\t\t'items-center': true,\n\t\t\t'gap-2': true,\n\t\t\t'select-none': true,\n\t\t\t'cursor-move': true,\n\t\t})\n\n\t\treturn html`\n\t\t\t<schmancy-surface\n\t\t\t\t${ref(this._containerRef)}\n\t\t\t\ttype=\"glass\"\n\t\t\t\televation=\"${this.elevation}\"\n\t\t\t\tclass=${containerClasses}\n\t\t\t\tstyle=${containerStyles}\n\t\t\t\taria-expanded=${this.open}\n\t\t\t\t@pointerdown=${this._handleFocus}\n\t\t\t>\n\t\t\t\t<!-- Details section (visually above summary for bottom corners) -->\n\t\t\t\t<section\n\t\t\t\t\t${ref(this._bodyRef)}\n\t\t\t\t\tclass=\"flex-1 min-h-0 overflow-hidden flex flex-col\"\n\t\t\t\t\tstyle=${bodyStyles}\n\t\t\t\t\trole=\"region\"\n\t\t\t\t\taria-label=\"Expandable content\"\n\t\t\t\t>\n\t\t\t\t\t${this._hasOpened ? html`<slot name=\"details\"></slot>` : nothing}\n\t\t\t\t</section>\n\n\t\t\t\t<!-- Summary section -- always interactive, always visible -->\n\t\t\t\t<section\n\t\t\t\t\tclass=\"shrink-0 bg-surface-lowest\"\n\t\t\t\t\tstyle=${styleMap({ 'pointer-events': 'auto', height: `${HEAD_HEIGHT}px` })}\n\t\t\t\t>\n\t\t\t\t\t<div\n\t\t\t\t\t\t${ref(this._headRef)}\n\t\t\t\t\t\t${cursorGlow({ radius: 200, intensity: 0.10 })}\n\t\t\t\t\t\tclass=${headClasses}\n\t\t\t\t\t\trole=\"button\"\n\t\t\t\t\t\ttabindex=\"0\"\n\t\t\t\t\t\ttitle=\"Drag to move, click to expand\"\n\t\t\t\t\t\taria-label=\"${this.open ? 'Collapse window' : 'Expand window'}\"\n\t\t\t\t\t\t@keydown=${this._handleHeadKeydown}\n\t\t\t\t\t>\n\t\t\t\t\t\t<div class=\"flex-1 min-w-0\">\n\t\t\t\t\t\t\t<slot></slot>\n\t\t\t\t\t\t</div>\n\t\t\t\t\t\t<svg\n\t\t\t\t\t\t\twidth=\"16\" height=\"16\" viewBox=\"0 0 24 24\" fill=\"none\"\n\t\t\t\t\t\t\tclass=\"shrink-0 text-surface-on/40 transition-transform duration-200 ${this.open ? 'rotate-180' : ''}\"\n\t\t\t\t\t\t\taria-hidden=\"true\"\n\t\t\t\t\t\t>\n\t\t\t\t\t\t\t<path d=\"M6 9L12 15L18 9\" stroke=\"currentColor\" stroke-width=\"2\" stroke-linecap=\"round\" stroke-linejoin=\"round\" />\n\t\t\t\t\t\t</svg>\n\t\t\t\t\t</div>\n\t\t\t\t</section>\n\t\t\t</schmancy-surface>\n\t\t`\n\t}\n}\n\ndeclare global {\n\tinterface HTMLElementTagNameMap {\n\t\t'schmancy-window': SchmancyWindow\n\t}\n}\n"],"mappings":";;;;;;;;;;;;;;AAmBA,IAAM,IAAiB,oBACjB,IAAwB;AAmL9B,SAAS,EAAa,GAAiB,GAAA;AACtC,QAAA,EAAS,EAAE,QAAQ,EAAE,OAAO,EAAE,SAAS,EAAE,OAAO,EAAE,SAAS,EAAE,QAAQ,EAAE,OAAO,EAAE,MAAM,EAAE,UAAU,EAAE,MAAM,EAAE,UAAU,EAAE;;AAGzH,IAAA,GAAa,IArLb,MAAM,EAAA;CAWL,cAAA;AAAA,OAAA,UAR2B,IAAI,EAAqC;GACnE,yBAAS,IAAI,KAAA;GACb,WAAW;GACX,YAAY,EAAA;GAAA,CAAA,EAAA,KAAA,SAGK,KAAK,QAAQ,cAAA;;CAI/B,OAAA,cAAO;AAIN,SAHK,AACJ,EAAqB,aAAW,IAAI,GAAA,EAE9B,EAAqB;;CAK7B,IAAA,UAAI;AACH,SAAO,KAAK,QAAQ,MAAM;;CAG3B,IAAA,YAAI;AACH,SAAO,KAAK,QAAQ,MAAM;;CAK3B,SAAS,GAAY,GAA6B,GAAA;EACjD,IAAM,IAAQ,KAAK,QAAQ;AAC3B,MAAI,EAAM,QAAQ,IAAI,EAAA,CAAK;EAG3B,IAAM,IAAuB;GAC5B,IAAA;GACA,QAAQ;GACR,aAAa;GACb,QALc,EAAa,aAAa,EAAA;GAMxC,MAAA,CAAM;GACN,YAAA;GAAA,EAGK,IAAU,IAAI,IAAI,EAAM,QAAA;AAC9B,IAAQ,IAAI,GAAI,EAAA;EAChB,IAAM,IAAa,EAAa,eAAA;AAEhC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AAA,CAK1C,GAAA,CAAA,EAAO,EAAA,WAAA,cAAA,KAAA,EAAA,EAAA,EAAA,CAEP,GAAA,CAAA,EAAO,EAAA,WAAA,YAAA,KAAA,EAAA,EAAA,EAAA,CAIP,GAAA,CAAA,EAAO,EAAA,WAAA,kBAAA,KAAA,EAAA;AAAA,IAAA,IAAA,IAAA,IAAA,EAAA,CA3CR,EAAc,kBAAA,CAAA,EAAkB,EAAA;AAAA,SAAA,KAAA,GAAA,KAAA"}
@@ -1,4 +1,4 @@
1
- require(`./chunk-CncqDLb2.cjs`);const e=require(`./decorate-F9CuyeHg.cjs`),t=require(`./litElement.mixin-lYlKxxjR.cjs`);require(`./mixins.cjs`);const n=require(`./animation-CQRdLgzX.cjs`),r=require(`./reduced-motion-9RjNnhIg.cjs`),i=require(`./cursor-glow-Duw9jHmh.cjs`),a=require(`./theme.service-DxJPUGlu.cjs`),o=require(`./overlay-stack-7bs4ZNnh.cjs`);let s=require(`rxjs`),c=require(`lit/directives/class-map.js`),l=require(`lit/directives/style-map.js`),u=require(`lit/decorators.js`),d=require(`lit`),f=require(`lit/directives/ref.js`);var p=`schmancy-window-`,m=`schmancy-float-`;function h(e,t){return!(e.left>=t.left+t.width||e.left+e.width<=t.left||e.top>=t.top+t.height||e.top+e.height<=t.top)}var g,_=class e{constructor(){this._state$=new s.BehaviorSubject({windows:new Map,focusedId:null,stackOrder:[]}),this.state$=this._state$.asObservable()}static getInstance(){return e.instance||=new e,e.instance}get windows(){return this._state$.value.windows}get focusedId(){return this._state$.value.focusedId}register(e,t,n){let r=this._state$.value;if(r.windows.has(e))return;let i={id:e,bounds:t,visualState:`normal`,zIndex:o.t.assignZIndex(e),open:!1,snapTarget:n},a=new Map(r.windows);a.set(e,i);let s=o.t.getStackOrder();this._state$.next({...r,windows:a,stackOrder:s})}unregister(e){let t=this._state$.value;if(!t.windows.has(e))return;o.t.releaseId(e);let n=new Map(t.windows);n.delete(e);let r=o.t.getStackOrder(),i=t.focusedId===e?null:t.focusedId;this._state$.next({...t,windows:n,stackOrder:r,focusedId:i})}updateBounds(e,t){this._updateRecord(e,{bounds:t})}updateVisualState(e,t){this._updateRecord(e,{visualState:t})}updateOpen(e,t){this._updateRecord(e,{open:t})}focus(e){let t=this._state$.value;if(!t.windows.has(e)||t.focusedId===e)return;let n=o.t.bringToFront(e),r=new Map(t.windows),i=r.get(e);i&&r.set(e,{...i,zIndex:n});let a=o.t.getStackOrder();this._state$.next({...t,windows:r,stackOrder:a,focusedId:e})}findOverlaps(e,t){let n=[];for(let[r,i]of this._state$.value.windows)r!==t&&h(e,i.bounds)&&n.push(i);return n}getNeighbors(e){let t=[];for(let[n,r]of this._state$.value.windows)n!==e&&t.push(r);return t}selectWindow(e){return this._state$.pipe((0,s.map)(t=>t.windows.get(e)),(0,s.distinctUntilChanged)())}selectFocused(){return this._state$.pipe((0,s.map)(e=>e.focusedId),(0,s.distinctUntilChanged)())}loadPosition(e){try{let t=localStorage.getItem(p+e)??localStorage.getItem(m+e);return t?JSON.parse(t):null}catch{return null}}savePosition(e,t){try{localStorage.setItem(p+e,JSON.stringify(t))}catch{}}clearPosition(e){try{localStorage.removeItem(p+e),localStorage.removeItem(m+e)}catch{}}_updateRecord(e,t){let n=this._state$.value,r=n.windows.get(e);if(!r)return;let i=new Map(n.windows);i.set(e,{...r,...t}),this._state$.next({...n,windows:i})}}.getInstance();function v(e,t,n){let r={...e};for(let e=0;e<10&&t.some(e=>{return t=r,n=e.bounds,!(t.left>=n.left+n.width||t.left+t.width<=n.left||t.top>=n.top+n.height||t.top+t.height<=n.top);var t,n});e++)r={...r,left:r.left+44,top:r.top+44};return function(e,t){return{width:e.width,height:e.height,left:Math.max(0,Math.min(e.left,t.width-e.width)),top:Math.max(0,Math.min(e.top,t.height-e.height))}}(r,n)}var y=48,b=class extends t.t(d.css`
1
+ require(`./chunk-CncqDLb2.cjs`);const e=require(`./decorate-F9CuyeHg.cjs`),t=require(`./litElement.mixin-qh5-IIUq.cjs`);require(`./mixins.cjs`);const n=require(`./animation-CQRdLgzX.cjs`),r=require(`./reduced-motion-9RjNnhIg.cjs`),i=require(`./cursor-glow-Duw9jHmh.cjs`),a=require(`./theme.service-DxJPUGlu.cjs`),o=require(`./overlay-stack-7bs4ZNnh.cjs`);let s=require(`rxjs`),c=require(`lit/directives/class-map.js`),l=require(`lit/directives/style-map.js`),u=require(`lit/decorators.js`),d=require(`lit`),f=require(`lit/directives/ref.js`);var p=`schmancy-window-`,m=`schmancy-float-`;function h(e,t){return!(e.left>=t.left+t.width||e.left+e.width<=t.left||e.top>=t.top+t.height||e.top+e.height<=t.top)}var g,_=class e{constructor(){this._state$=new s.BehaviorSubject({windows:new Map,focusedId:null,stackOrder:[]}),this.state$=this._state$.asObservable()}static getInstance(){return e.instance||=new e,e.instance}get windows(){return this._state$.value.windows}get focusedId(){return this._state$.value.focusedId}register(e,t,n){let r=this._state$.value;if(r.windows.has(e))return;let i={id:e,bounds:t,visualState:`normal`,zIndex:o.t.assignZIndex(e),open:!1,snapTarget:n},a=new Map(r.windows);a.set(e,i);let s=o.t.getStackOrder();this._state$.next({...r,windows:a,stackOrder:s})}unregister(e){let t=this._state$.value;if(!t.windows.has(e))return;o.t.releaseId(e);let n=new Map(t.windows);n.delete(e);let r=o.t.getStackOrder(),i=t.focusedId===e?null:t.focusedId;this._state$.next({...t,windows:n,stackOrder:r,focusedId:i})}updateBounds(e,t){this._updateRecord(e,{bounds:t})}updateVisualState(e,t){this._updateRecord(e,{visualState:t})}updateOpen(e,t){this._updateRecord(e,{open:t})}focus(e){let t=this._state$.value;if(!t.windows.has(e)||t.focusedId===e)return;let n=o.t.bringToFront(e),r=new Map(t.windows),i=r.get(e);i&&r.set(e,{...i,zIndex:n});let a=o.t.getStackOrder();this._state$.next({...t,windows:r,stackOrder:a,focusedId:e})}findOverlaps(e,t){let n=[];for(let[r,i]of this._state$.value.windows)r!==t&&h(e,i.bounds)&&n.push(i);return n}getNeighbors(e){let t=[];for(let[n,r]of this._state$.value.windows)n!==e&&t.push(r);return t}selectWindow(e){return this._state$.pipe((0,s.map)(t=>t.windows.get(e)),(0,s.distinctUntilChanged)())}selectFocused(){return this._state$.pipe((0,s.map)(e=>e.focusedId),(0,s.distinctUntilChanged)())}loadPosition(e){try{let t=localStorage.getItem(p+e)??localStorage.getItem(m+e);return t?JSON.parse(t):null}catch{return null}}savePosition(e,t){try{localStorage.setItem(p+e,JSON.stringify(t))}catch{}}clearPosition(e){try{localStorage.removeItem(p+e),localStorage.removeItem(m+e)}catch{}}_updateRecord(e,t){let n=this._state$.value,r=n.windows.get(e);if(!r)return;let i=new Map(n.windows);i.set(e,{...r,...t}),this._state$.next({...n,windows:i})}}.getInstance();function v(e,t,n){let r={...e};for(let e=0;e<10&&t.some(e=>{return t=r,n=e.bounds,!(t.left>=n.left+n.width||t.left+t.width<=n.left||t.top>=n.top+n.height||t.top+t.height<=n.top);var t,n});e++)r={...r,left:r.left+44,top:r.top+44};return function(e,t){return{width:e.width,height:e.height,left:Math.max(0,Math.min(e.left,t.width-e.width)),top:Math.max(0,Math.min(e.top,t.height-e.height))}}(r,n)}var y=48,b=class extends t.t(d.css`
2
2
  :host {
3
3
  display: contents;
4
4
  position: relative;