@mhmo91/schmancy 0.10.15 → 0.10.17

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 (572) hide show
  1. package/custom-elements.json +2554 -3086
  2. package/dist/active-host-BP0zy_Y9.js +63 -0
  3. package/dist/{active-host-CvNYoprt.js.map → active-host-BP0zy_Y9.js.map} +1 -1
  4. package/dist/active-host-jH3iloCR.cjs +1 -0
  5. package/dist/{active-host-CcIa2tmW.cjs.map → active-host-jH3iloCR.cjs.map} +1 -1
  6. package/dist/agent/flow-CvG1fLW5.js.map +1 -1
  7. package/dist/agent/schmancy.agent.js +5694 -5500
  8. package/dist/agent/schmancy.agent.js.map +1 -1
  9. package/dist/agent/schmancy.manifest.json +971 -1189
  10. package/dist/agent/vendor-material-color-DcL7ZPxx.js.map +1 -1
  11. package/dist/{animation-CO_Csq84.cjs.map → animation-CCOIW4wJ.cjs.map} +1 -1
  12. package/dist/{animation-BK-8BwY8.js.map → animation-DCznELuT.js.map} +1 -1
  13. package/dist/{area-C_kgZZhN.js → area-ChxsDTu_.js} +2 -2
  14. package/dist/{area-C_kgZZhN.js.map → area-ChxsDTu_.js.map} +1 -1
  15. package/dist/{area-DFPtKzWy.cjs → area-Qt6yUnuA.cjs} +3 -3
  16. package/dist/{area-DFPtKzWy.cjs.map → area-Qt6yUnuA.cjs.map} +1 -1
  17. package/dist/area.cjs +1 -1
  18. package/dist/area.js +2 -2
  19. package/dist/{audio-CluX8Qpq.cjs → audio-D-TZzpXF.cjs} +1 -1
  20. package/dist/{audio-CluX8Qpq.cjs.map → audio-D-TZzpXF.cjs.map} +1 -1
  21. package/dist/{audio-DcXphulJ.js → audio-DS43uoRA.js} +1 -1
  22. package/dist/{audio-DcXphulJ.js.map → audio-DS43uoRA.js.map} +1 -1
  23. package/dist/audio.cjs +1 -1
  24. package/dist/audio.js +2 -2
  25. package/dist/{autocomplete-DWSuwSRS.js → autocomplete-CXvUjMD-.js} +46 -71
  26. package/dist/autocomplete-CXvUjMD-.js.map +1 -0
  27. package/dist/autocomplete-Ck2zbdF9.cjs +115 -0
  28. package/dist/autocomplete-Ck2zbdF9.cjs.map +1 -0
  29. package/dist/autocomplete.cjs +1 -1
  30. package/dist/autocomplete.js +1 -1
  31. package/dist/avatar.cjs +2 -2
  32. package/dist/avatar.cjs.map +1 -1
  33. package/dist/avatar.js +3 -3
  34. package/dist/avatar.js.map +1 -1
  35. package/dist/badge.cjs +1 -1
  36. package/dist/badge.js +1 -1
  37. package/dist/{boat-CZma2ojF.js → boat-Bj0wVcZi.js} +5 -5
  38. package/dist/{boat-CZma2ojF.js.map → boat-Bj0wVcZi.js.map} +1 -1
  39. package/dist/{boat-Dy6cc3hB.cjs → boat-DpFkILFF.cjs} +2 -2
  40. package/dist/{boat-Dy6cc3hB.cjs.map → boat-DpFkILFF.cjs.map} +1 -1
  41. package/dist/boat.cjs +1 -1
  42. package/dist/boat.js +1 -1
  43. package/dist/breadcrumb.cjs +3 -3
  44. package/dist/breadcrumb.cjs.map +1 -1
  45. package/dist/breadcrumb.js +2 -2
  46. package/dist/breadcrumb.js.map +1 -1
  47. package/dist/{busy-DCsqryvq.cjs → busy-CtcnclA3.cjs} +3 -3
  48. package/dist/{busy-DCsqryvq.cjs.map → busy-CtcnclA3.cjs.map} +1 -1
  49. package/dist/{busy-DeV2ByMw.js → busy-CyZSBnZP.js} +2 -2
  50. package/dist/{busy-DeV2ByMw.js.map → busy-CyZSBnZP.js.map} +1 -1
  51. package/dist/busy.cjs +1 -1
  52. package/dist/busy.js +1 -1
  53. package/dist/button.cjs +4 -4
  54. package/dist/button.cjs.map +1 -1
  55. package/dist/button.js +19 -4
  56. package/dist/button.js.map +1 -1
  57. package/dist/{card--GgSX4X5.cjs → card-Cl6jp1yX.cjs} +5 -5
  58. package/dist/{card--GgSX4X5.cjs.map → card-Cl6jp1yX.cjs.map} +1 -1
  59. package/dist/{card-BTTsHzJJ.js → card-nYZCKmOO.js} +3 -3
  60. package/dist/{card-BTTsHzJJ.js.map → card-nYZCKmOO.js.map} +1 -1
  61. package/dist/card.cjs +1 -1
  62. package/dist/card.js +1 -1
  63. package/dist/{checkbox-NNReP9s_.cjs → checkbox-BeNo0ZGt.cjs} +4 -4
  64. package/dist/{checkbox-Cj5j-ppk.js.map → checkbox-BeNo0ZGt.cjs.map} +1 -1
  65. package/dist/{checkbox-Cj5j-ppk.js → checkbox-DiUrZiyc.js} +17 -30
  66. package/dist/checkbox-DiUrZiyc.js.map +1 -0
  67. package/dist/checkbox.cjs +1 -1
  68. package/dist/checkbox.js +1 -1
  69. package/dist/{chips-CP-CbfoZ.js → chips-CfPFXv7Z.js} +5 -5
  70. package/dist/{chips-CP-CbfoZ.js.map → chips-CfPFXv7Z.js.map} +1 -1
  71. package/dist/{chips-iporOXxK.cjs → chips-DK6m-VCM.cjs} +5 -5
  72. package/dist/{chips-iporOXxK.cjs.map → chips-DK6m-VCM.cjs.map} +1 -1
  73. package/dist/chips.cjs +1 -1
  74. package/dist/chips.js +2 -2
  75. package/dist/connectivity.cjs +2 -2
  76. package/dist/connectivity.cjs.map +1 -1
  77. package/dist/connectivity.js +3 -3
  78. package/dist/connectivity.js.map +1 -1
  79. package/dist/content-drawer.cjs +1 -1
  80. package/dist/content-drawer.js +1 -1
  81. package/dist/{context-DJTJnSK4.js.map → context-6oXCZmZN.js.map} +1 -1
  82. package/dist/{context-BpCETidA.cjs.map → context-CRZeiCqq.cjs.map} +1 -1
  83. package/dist/{cursor-glow-Bulq-38P.cjs → cursor-glow-C8LgCxpI.cjs} +1 -1
  84. package/dist/{cursor-glow-Bulq-38P.cjs.map → cursor-glow-C8LgCxpI.cjs.map} +1 -1
  85. package/dist/{cursor-glow-Ah7VXSj7.js → cursor-glow-Cs2XLDB9.js} +1 -1
  86. package/dist/{cursor-glow-Ah7VXSj7.js.map → cursor-glow-Cs2XLDB9.js.map} +1 -1
  87. package/dist/date-range-DA6anfcF.cjs +131 -0
  88. package/dist/date-range-DA6anfcF.cjs.map +1 -0
  89. package/dist/{date-range-CgNujP8r.js → date-range-DjlF2u7o.js} +124 -89
  90. package/dist/date-range-DjlF2u7o.js.map +1 -0
  91. package/dist/date-range-inline-BfYK795W.cjs +43 -0
  92. package/dist/{date-range-inline-D4IjOOO0.cjs.map → date-range-inline-BfYK795W.cjs.map} +1 -1
  93. package/dist/{date-range-inline-C2PXX_GY.js → date-range-inline-n7y_H6PJ.js} +2 -2
  94. package/dist/{date-range-inline-C2PXX_GY.js.map → date-range-inline-n7y_H6PJ.js.map} +1 -1
  95. package/dist/date-range-inline.cjs +1 -1
  96. package/dist/date-range-inline.js +1 -1
  97. package/dist/date-range.cjs +1 -1
  98. package/dist/date-range.js +1 -1
  99. package/dist/delay.cjs +2 -2
  100. package/dist/delay.cjs.map +1 -1
  101. package/dist/delay.js +3 -3
  102. package/dist/delay.js.map +1 -1
  103. package/dist/{details-DT2b3xOn.cjs → details-BdAVsLl-.cjs} +2 -2
  104. package/dist/{details-DT2b3xOn.cjs.map → details-BdAVsLl-.cjs.map} +1 -1
  105. package/dist/{details-VjaNwtfd.js → details-CS_ToAOj.js} +6 -6
  106. package/dist/{details-VjaNwtfd.js.map → details-CS_ToAOj.js.map} +1 -1
  107. package/dist/details.cjs +1 -1
  108. package/dist/details.js +1 -1
  109. package/dist/directives.cjs +1 -1
  110. package/dist/directives.cjs.map +1 -1
  111. package/dist/directives.js +5 -5
  112. package/dist/directives.js.map +1 -1
  113. package/dist/discovery.js.map +1 -1
  114. package/dist/{divider-BMO8pzEO.js → divider-COLK0RbT.js} +2 -2
  115. package/dist/{divider-BMO8pzEO.js.map → divider-COLK0RbT.js.map} +1 -1
  116. package/dist/{divider-BW33TZ-X.cjs → divider-CvWAnvdO.cjs} +2 -2
  117. package/dist/{divider-BW33TZ-X.cjs.map → divider-CvWAnvdO.cjs.map} +1 -1
  118. package/dist/divider.cjs +1 -1
  119. package/dist/divider.js +1 -1
  120. package/dist/dropdown.cjs +3 -3
  121. package/dist/dropdown.cjs.map +1 -1
  122. package/dist/dropdown.js +2 -2
  123. package/dist/dropdown.js.map +1 -1
  124. package/dist/{expand-DbELKKOt.js → expand-D9LzmpoV.js} +5 -5
  125. package/dist/{expand-DbELKKOt.js.map → expand-D9LzmpoV.js.map} +1 -1
  126. package/dist/{expand-_f5EUKWB.cjs → expand-r2sATPUJ.cjs} +3 -3
  127. package/dist/{expand-_f5EUKWB.cjs.map → expand-r2sATPUJ.cjs.map} +1 -1
  128. package/dist/expand.cjs +1 -1
  129. package/dist/expand.js +1 -1
  130. package/dist/float-2nHYuBx-.cjs +1 -0
  131. package/dist/{float-CKmd-0-t.cjs.map → float-2nHYuBx-.cjs.map} +1 -1
  132. package/dist/{float-B6RBb2dN.js → float-BWy39CXr.js} +2 -2
  133. package/dist/{float-B6RBb2dN.js.map → float-BWy39CXr.js.map} +1 -1
  134. package/dist/float.cjs +1 -1
  135. package/dist/float.js +1 -1
  136. package/dist/form-D1iJOLVb.js +267 -0
  137. package/dist/form-D1iJOLVb.js.map +1 -0
  138. package/dist/form-D9K1GhlP.cjs +42 -0
  139. package/dist/form-D9K1GhlP.cjs.map +1 -0
  140. package/dist/form.cjs +1 -1
  141. package/dist/form.js +9 -2
  142. package/dist/handover/agent-runtime-followups.md +1 -1
  143. package/dist/handover/agent-runtime-v1.md +3 -3
  144. package/dist/{hashContent-Bobsobip.cjs.map → hashContent-Ck6laKlk.cjs.map} +1 -1
  145. package/dist/{hashContent-BU6jl5ih.js.map → hashContent-dJrI-9sc.js.map} +1 -1
  146. package/dist/{icons-r-S17M8U.cjs → icons-BXp4vbnW.cjs} +2 -2
  147. package/dist/{icons-r-S17M8U.cjs.map → icons-BXp4vbnW.cjs.map} +1 -1
  148. package/dist/{icons-CoDo95Cu.js → icons-COrlmBPB.js} +3 -3
  149. package/dist/{icons-CoDo95Cu.js.map → icons-COrlmBPB.js.map} +1 -1
  150. package/dist/icons.cjs +1 -1
  151. package/dist/icons.js +1 -1
  152. package/dist/{iframe-P9c_qg1-.cjs → iframe-BwXj6mLp.cjs} +2 -2
  153. package/dist/{iframe-P9c_qg1-.cjs.map → iframe-BwXj6mLp.cjs.map} +1 -1
  154. package/dist/{iframe-k4oI-TIj.js → iframe-CPNsIy7k.js} +2 -2
  155. package/dist/{iframe-k4oI-TIj.js.map → iframe-CPNsIy7k.js.map} +1 -1
  156. package/dist/iframe.cjs +1 -1
  157. package/dist/iframe.js +1 -1
  158. package/dist/index.cjs +1 -1
  159. package/dist/index.js +60 -60
  160. package/dist/input-BGrF2qVq.cjs +52 -0
  161. package/dist/input-BGrF2qVq.cjs.map +1 -0
  162. package/dist/{input-D95GjINh.js → input-C1SnMNuQ.js} +103 -104
  163. package/dist/input-C1SnMNuQ.js.map +1 -0
  164. package/dist/{input-chip-DpC_XEKN.js → input-chip-CtQ0pH5b.js} +2 -2
  165. package/dist/{input-chip-DpC_XEKN.js.map → input-chip-CtQ0pH5b.js.map} +1 -1
  166. package/dist/{input-chip-D0ZXqTt5.cjs → input-chip-DZktYohr.cjs} +2 -2
  167. package/dist/{input-chip-D0ZXqTt5.cjs.map → input-chip-DZktYohr.cjs.map} +1 -1
  168. package/dist/input.cjs +1 -1
  169. package/dist/input.js +1 -1
  170. package/dist/json.cjs +2 -2
  171. package/dist/json.cjs.map +1 -1
  172. package/dist/json.js +3 -3
  173. package/dist/json.js.map +1 -1
  174. package/dist/kbd.cjs +2 -2
  175. package/dist/kbd.cjs.map +1 -1
  176. package/dist/kbd.js +2 -2
  177. package/dist/kbd.js.map +1 -1
  178. package/dist/{layout-CXPNsUIo.js → layout-BH28sKGc.js} +1 -1
  179. package/dist/{layout-CXPNsUIo.js.map → layout-BH28sKGc.js.map} +1 -1
  180. package/dist/{layout-Zhe7wSZ_.cjs → layout-Delq-QvR.cjs} +1 -1
  181. package/dist/{layout-Zhe7wSZ_.cjs.map → layout-Delq-QvR.cjs.map} +1 -1
  182. package/dist/layout.cjs +1 -1
  183. package/dist/layout.js +1 -1
  184. package/dist/{lazy-Dq9mRRjT.cjs.map → lazy-CayEFyC3.cjs.map} +1 -1
  185. package/dist/{lazy-B0ia54tT.js.map → lazy-D-bO2r4m.js.map} +1 -1
  186. package/dist/{lightbox-CovQtmyn.js → lightbox-CLwpaiai.js} +9 -9
  187. package/dist/{lightbox-CovQtmyn.js.map → lightbox-CLwpaiai.js.map} +1 -1
  188. package/dist/{lightbox-C-yHeoK0.cjs → lightbox-Ck6BpN5u.cjs} +3 -3
  189. package/dist/{lightbox-C-yHeoK0.cjs.map → lightbox-Ck6BpN5u.cjs.map} +1 -1
  190. package/dist/lightbox.cjs +1 -1
  191. package/dist/lightbox.js +1 -1
  192. package/dist/{list-C1pR9vhu.js → list-Bmce1Rb8.js} +2 -2
  193. package/dist/{list-C1pR9vhu.js.map → list-Bmce1Rb8.js.map} +1 -1
  194. package/dist/{list-CAijuky4.cjs → list-EmRwSpTU.cjs} +3 -3
  195. package/dist/{list-CAijuky4.cjs.map → list-EmRwSpTU.cjs.map} +1 -1
  196. package/dist/list.cjs +1 -1
  197. package/dist/list.js +1 -1
  198. package/dist/{magnetic-BJgB1dVi.cjs → magnetic-Bgh7aHHI.cjs} +1 -1
  199. package/dist/{magnetic-BJgB1dVi.cjs.map → magnetic-Bgh7aHHI.cjs.map} +1 -1
  200. package/dist/{magnetic-YwCNvtbB.js → magnetic-DxvoEz8_.js} +2 -2
  201. package/dist/{magnetic-YwCNvtbB.js.map → magnetic-DxvoEz8_.js.map} +1 -1
  202. package/dist/{menu-B59vZv9n.js → menu-BA_B7QOG.js} +3 -3
  203. package/dist/{menu-B59vZv9n.js.map → menu-BA_B7QOG.js.map} +1 -1
  204. package/dist/{menu-BaHO3Cip.cjs → menu-BTU3wGP6.cjs} +3 -3
  205. package/dist/{menu-BaHO3Cip.cjs.map → menu-BTU3wGP6.cjs.map} +1 -1
  206. package/dist/menu.cjs +1 -1
  207. package/dist/menu.js +1 -1
  208. package/dist/mixins-BOOu6q2n.cjs +298 -0
  209. package/dist/mixins-BOOu6q2n.cjs.map +1 -0
  210. package/dist/mixins-BWb9_e1s.js +680 -0
  211. package/dist/mixins-BWb9_e1s.js.map +1 -0
  212. package/dist/mixins.cjs +1 -1
  213. package/dist/mixins.js +2 -2
  214. package/dist/nav-drawer.cjs +1 -1
  215. package/dist/nav-drawer.js +1 -1
  216. package/dist/navigation-bar.cjs +1 -1
  217. package/dist/navigation-bar.js +1 -1
  218. package/dist/navigation-rail.cjs +3 -3
  219. package/dist/navigation-rail.cjs.map +1 -1
  220. package/dist/navigation-rail.js +2 -2
  221. package/dist/navigation-rail.js.map +1 -1
  222. package/dist/notification-CliGbcfU.cjs +23 -0
  223. package/dist/{notification-BC9nG8Sr.cjs.map → notification-CliGbcfU.cjs.map} +1 -1
  224. package/dist/{notification-BeLoVa47.js → notification-R2_Mf1HR.js} +4 -4
  225. package/dist/{notification-BeLoVa47.js.map → notification-R2_Mf1HR.js.map} +1 -1
  226. package/dist/notification.cjs +1 -1
  227. package/dist/notification.js +1 -1
  228. package/dist/{option-UvlSAcC4.js → option-DU1X4SDu.js} +2 -2
  229. package/dist/{option-UvlSAcC4.js.map → option-DU1X4SDu.js.map} +1 -1
  230. package/dist/{option-BWF4GBp-.cjs → option-Db98Ndzv.cjs} +2 -2
  231. package/dist/{option-BWF4GBp-.cjs.map → option-Db98Ndzv.cjs.map} +1 -1
  232. package/dist/option.cjs +1 -1
  233. package/dist/option.js +1 -1
  234. package/dist/{overlay-stack-DCDS17uj.js.map → overlay-stack-BR4iYivO.js.map} +1 -1
  235. package/dist/{overlay-stack-DPIe_aYv.cjs.map → overlay-stack-Dk0xETTy.cjs.map} +1 -1
  236. package/dist/overlay.cjs +2 -2
  237. package/dist/overlay.cjs.map +1 -1
  238. package/dist/{overlay.confirm-body-URtE1gI3.cjs → overlay.confirm-body-BkhNvr0c.cjs} +2 -2
  239. package/dist/{overlay.confirm-body-URtE1gI3.cjs.map → overlay.confirm-body-BkhNvr0c.cjs.map} +1 -1
  240. package/dist/{overlay.confirm-body-9W0B5QGv.js → overlay.confirm-body-uFp-0Zfh.js} +2 -2
  241. package/dist/{overlay.confirm-body-9W0B5QGv.js.map → overlay.confirm-body-uFp-0Zfh.js.map} +1 -1
  242. package/dist/overlay.js +8 -8
  243. package/dist/overlay.js.map +1 -1
  244. package/dist/{overlay.service-DnZTcKyJ.cjs → overlay.service-1YWfUD2S.cjs} +1 -1
  245. package/dist/{overlay.service-DnZTcKyJ.cjs.map → overlay.service-1YWfUD2S.cjs.map} +1 -1
  246. package/dist/{overlay.service-CVqs2Gu1.js → overlay.service-BcF12kGb.js} +2 -2
  247. package/dist/{overlay.service-CVqs2Gu1.js.map → overlay.service-BcF12kGb.js.map} +1 -1
  248. package/dist/page.cjs +2 -2
  249. package/dist/page.cjs.map +1 -1
  250. package/dist/page.js +5 -5
  251. package/dist/page.js.map +1 -1
  252. package/dist/{progress-C29Uw-WJ.js → progress-C9Y2D5cm.js} +2 -2
  253. package/dist/{progress-C29Uw-WJ.js.map → progress-C9Y2D5cm.js.map} +1 -1
  254. package/dist/{progress-CwzwY8Oe.cjs → progress-DiVTGAXa.cjs} +2 -2
  255. package/dist/{progress-CwzwY8Oe.cjs.map → progress-DiVTGAXa.cjs.map} +1 -1
  256. package/dist/progress.cjs +1 -1
  257. package/dist/progress.js +1 -1
  258. package/dist/{radio-group-CW8airhZ.js → radio-group-CAzjBI2n.js} +4 -4
  259. package/dist/radio-group-CAzjBI2n.js.map +1 -0
  260. package/dist/radio-group-DIRJyYv6.cjs +40 -0
  261. package/dist/radio-group-DIRJyYv6.cjs.map +1 -0
  262. package/dist/radio-group.cjs +1 -1
  263. package/dist/radio-group.js +1 -1
  264. package/dist/range.cjs +6 -4
  265. package/dist/range.cjs.map +1 -1
  266. package/dist/range.js +19 -15
  267. package/dist/range.js.map +1 -1
  268. package/dist/{reduced-motion-D-L12p7G.js.map → reduced-motion-D7LqTUMn.js.map} +1 -1
  269. package/dist/{reduced-motion-Ds-HjMzn.cjs.map → reduced-motion-Dzfp_w5x.cjs.map} +1 -1
  270. package/dist/{rxjs-utils-DCUHg_Ml.cjs.map → rxjs-utils-BKB2UM_j.cjs.map} +1 -1
  271. package/dist/{rxjs-utils-CVeJQ9KG.js.map → rxjs-utils-Dv9T9IpA.js.map} +1 -1
  272. package/dist/rxjs-utils.cjs +1 -1
  273. package/dist/rxjs-utils.js +1 -1
  274. package/dist/{scroll-BotoGcMU.js → scroll-BFHUtZOa.js} +2 -2
  275. package/dist/{scroll-BotoGcMU.js.map → scroll-BFHUtZOa.js.map} +1 -1
  276. package/dist/{scroll-CmhmUebp.cjs → scroll-nIZyoEMt.cjs} +2 -2
  277. package/dist/{scroll-CmhmUebp.cjs.map → scroll-nIZyoEMt.cjs.map} +1 -1
  278. package/dist/{search-BLCRsxIC.cjs.map → search-DPKoC-dT.cjs.map} +1 -1
  279. package/dist/{search-BTz7-Rev.js.map → search-MvIBA93K.js.map} +1 -1
  280. package/dist/{select-Dbn-CImU.js → select-7WqaUWBU.js} +52 -73
  281. package/dist/select-7WqaUWBU.js.map +1 -0
  282. package/dist/select-DTuf6p6T.cjs +56 -0
  283. package/dist/select-DTuf6p6T.cjs.map +1 -0
  284. package/dist/select.cjs +1 -1
  285. package/dist/select.js +1 -1
  286. package/dist/skeleton.cjs +2 -2
  287. package/dist/skeleton.cjs.map +1 -1
  288. package/dist/skeleton.js +2 -2
  289. package/dist/skeleton.js.map +1 -1
  290. package/dist/skills/SKILL.md +3 -0
  291. package/dist/skills/autocomplete.md +16 -3
  292. package/dist/skills/button.md +19 -0
  293. package/dist/skills/checkbox.md +19 -0
  294. package/dist/skills/date-range.md +19 -0
  295. package/dist/skills/form-ux-rules.md +55 -0
  296. package/dist/skills/form.md +121 -25
  297. package/dist/skills/input.md +19 -4
  298. package/dist/skills/range.md +15 -1
  299. package/dist/skills/schmancy/SKILL.md +3 -0
  300. package/dist/skills/schmancy/autocomplete.md +16 -3
  301. package/dist/skills/schmancy/button.md +19 -0
  302. package/dist/skills/schmancy/checkbox.md +19 -0
  303. package/dist/skills/schmancy/date-range.md +19 -0
  304. package/dist/skills/schmancy/form-ux-rules.md +55 -0
  305. package/dist/skills/schmancy/form.md +121 -25
  306. package/dist/skills/schmancy/input.md +19 -4
  307. package/dist/skills/schmancy/range.md +15 -1
  308. package/dist/skills/schmancy/select.md +13 -1
  309. package/dist/skills/schmancy/switch.md +21 -2
  310. package/dist/skills/schmancy/textarea.md +13 -0
  311. package/dist/skills/select.md +13 -1
  312. package/dist/skills/switch.md +21 -2
  313. package/dist/skills/textarea.md +13 -0
  314. package/dist/slider.cjs +3 -3
  315. package/dist/slider.cjs.map +1 -1
  316. package/dist/slider.js +2 -2
  317. package/dist/slider.js.map +1 -1
  318. package/dist/{sound.service-kKfsN0m-.js → sound.service-BIN2W7Rv.js} +1 -1
  319. package/dist/{sound.service-kKfsN0m-.js.map → sound.service-BIN2W7Rv.js.map} +1 -1
  320. package/dist/{sound.service-BGs6m0Cm.cjs → sound.service-DyY78ukR.cjs} +1 -1
  321. package/dist/{sound.service-BGs6m0Cm.cjs.map → sound.service-DyY78ukR.cjs.map} +1 -1
  322. package/dist/{splash-screen-DtkjCJYo.js → splash-screen-BcjjJSlK.js} +2 -2
  323. package/dist/{splash-screen-DtkjCJYo.js.map → splash-screen-BcjjJSlK.js.map} +1 -1
  324. package/dist/{splash-screen-DlQUv-kV.cjs → splash-screen-Kr1sPtME.cjs} +2 -2
  325. package/dist/{splash-screen-DlQUv-kV.cjs.map → splash-screen-Kr1sPtME.cjs.map} +1 -1
  326. package/dist/splash-screen.cjs +1 -1
  327. package/dist/splash-screen.js +1 -1
  328. package/dist/{src-DEUjlTsX.cjs → src-BbMJeLk9.cjs} +11 -11
  329. package/dist/{src-DEUjlTsX.cjs.map → src-BbMJeLk9.cjs.map} +1 -1
  330. package/dist/{src-D6e0adHi.js → src-DCu_mEk4.js} +40 -40
  331. package/dist/{src-D6e0adHi.js.map → src-DCu_mEk4.js.map} +1 -1
  332. package/dist/state-avic94Ft.cjs +1 -0
  333. package/dist/{state-DNdCPITt.cjs.map → state-avic94Ft.cjs.map} +1 -1
  334. package/dist/{state-BusMG6sM.js → state-nm8yzMPp.js} +1 -2
  335. package/dist/{state-BusMG6sM.js.map → state-nm8yzMPp.js.map} +1 -1
  336. package/dist/state.cjs +1 -1
  337. package/dist/state.js +2 -2
  338. package/dist/steps.cjs +3 -3
  339. package/dist/steps.cjs.map +1 -1
  340. package/dist/steps.js +2 -2
  341. package/dist/steps.js.map +1 -1
  342. package/dist/{surface-A82O1kgu.js → surface-BtMMHKol.js} +2 -2
  343. package/dist/{surface-A82O1kgu.js.map → surface-BtMMHKol.js.map} +1 -1
  344. package/dist/surface-CgXeKdGL.cjs +7 -0
  345. package/dist/{surface-BpppoNXN.cjs.map → surface-CgXeKdGL.cjs.map} +1 -1
  346. package/dist/surface.cjs +1 -1
  347. package/dist/surface.js +1 -1
  348. package/dist/switch.cjs +3 -3
  349. package/dist/switch.cjs.map +1 -1
  350. package/dist/switch.js +27 -43
  351. package/dist/switch.js.map +1 -1
  352. package/dist/table.cjs +3 -3
  353. package/dist/table.cjs.map +1 -1
  354. package/dist/table.js +2 -2
  355. package/dist/table.js.map +1 -1
  356. package/dist/{tabs-cVHHd1dY.js → tabs-81ADWQqa.js} +2 -2
  357. package/dist/{tabs-cVHHd1dY.js.map → tabs-81ADWQqa.js.map} +1 -1
  358. package/dist/{tabs-TO3UiBsm.cjs → tabs-DnG3K0bu.cjs} +2 -2
  359. package/dist/{tabs-TO3UiBsm.cjs.map → tabs-DnG3K0bu.cjs.map} +1 -1
  360. package/dist/tabs.cjs +1 -1
  361. package/dist/tabs.js +1 -1
  362. package/dist/teleport.cjs +1 -1
  363. package/dist/teleport.js +1 -1
  364. package/dist/textarea-3mWewuAf.js +186 -0
  365. package/dist/textarea-3mWewuAf.js.map +1 -0
  366. package/dist/textarea-BenjiTXB.cjs +43 -0
  367. package/dist/textarea-BenjiTXB.cjs.map +1 -0
  368. package/dist/textarea.cjs +1 -1
  369. package/dist/textarea.js +1 -1
  370. package/dist/{theme-CT408FqH.js → theme-CFPJW933.js} +9 -9
  371. package/dist/{theme-CT408FqH.js.map → theme-CFPJW933.js.map} +1 -1
  372. package/dist/theme-DNymrucy.cjs +181 -0
  373. package/dist/{theme-CpuF3D3q.cjs.map → theme-DNymrucy.cjs.map} +1 -1
  374. package/dist/{theme-button-pTb5-Wxx.js → theme-button-DC_shZ_7.js} +2 -2
  375. package/dist/{theme-button-pTb5-Wxx.js.map → theme-button-DC_shZ_7.js.map} +1 -1
  376. package/dist/theme-button-ENKa3TPT.cjs +8 -0
  377. package/dist/{theme-button-B6Xf-EiH.cjs.map → theme-button-ENKa3TPT.cjs.map} +1 -1
  378. package/dist/theme-button.cjs +1 -1
  379. package/dist/theme-button.js +1 -1
  380. package/dist/theme.cjs +1 -1
  381. package/dist/{theme.interface-B9TjbSBF.js.map → theme.interface-C2XNgsLB.js.map} +1 -1
  382. package/dist/{theme.interface-BujperTo.cjs.map → theme.interface-D4NeufQA.cjs.map} +1 -1
  383. package/dist/theme.js +4 -4
  384. package/dist/{theme.service-DIUo1mBP.js → theme.service-BOWIT_5k.js} +1 -1
  385. package/dist/{theme.service-DIUo1mBP.js.map → theme.service-BOWIT_5k.js.map} +1 -1
  386. package/dist/{theme.service-Cfk88qHK.cjs → theme.service-DkdH1t60.cjs} +1 -1
  387. package/dist/{theme.service-Cfk88qHK.cjs.map → theme.service-DkdH1t60.cjs.map} +1 -1
  388. package/dist/tooltip.js.map +1 -1
  389. package/dist/tree.cjs +2 -2
  390. package/dist/tree.cjs.map +1 -1
  391. package/dist/tree.js +2 -2
  392. package/dist/tree.js.map +1 -1
  393. package/dist/types.js.map +1 -1
  394. package/dist/typewriter.cjs.map +1 -1
  395. package/dist/typewriter.js.map +1 -1
  396. package/dist/typography.cjs +2 -2
  397. package/dist/typography.cjs.map +1 -1
  398. package/dist/typography.js +2 -2
  399. package/dist/typography.js.map +1 -1
  400. package/dist/{utils-kND2Z9Xg.js → utils-Cj_nRRyx.js} +2 -2
  401. package/dist/{utils-kND2Z9Xg.js.map → utils-Cj_nRRyx.js.map} +1 -1
  402. package/dist/{utils-Dt5PpmaQ.cjs → utils-D2QUu4-g.cjs} +1 -1
  403. package/dist/{utils-Dt5PpmaQ.cjs.map → utils-D2QUu4-g.cjs.map} +1 -1
  404. package/dist/utils.cjs +1 -1
  405. package/dist/utils.js +4 -4
  406. package/dist/visually-hidden.cjs +2 -2
  407. package/dist/visually-hidden.cjs.map +1 -1
  408. package/dist/visually-hidden.js +2 -2
  409. package/dist/visually-hidden.js.map +1 -1
  410. package/dist/{window-CuBcOxbc.js → window-BTecgE_U.js} +7 -7
  411. package/dist/{window-CuBcOxbc.js.map → window-BTecgE_U.js.map} +1 -1
  412. package/dist/{window-CSKvv4Ts.cjs → window-DGydMS0g.cjs} +2 -2
  413. package/dist/{window-CSKvv4Ts.cjs.map → window-DGydMS0g.cjs.map} +1 -1
  414. package/dist/window.cjs +1 -1
  415. package/dist/window.js +1 -1
  416. package/package.json +1 -1
  417. package/skills/schmancy/SKILL.md +3 -0
  418. package/skills/schmancy/autocomplete.md +16 -3
  419. package/skills/schmancy/button.md +19 -0
  420. package/skills/schmancy/checkbox.md +19 -0
  421. package/skills/schmancy/date-range.md +19 -0
  422. package/skills/schmancy/form-ux-rules.md +55 -0
  423. package/skills/schmancy/form.md +121 -25
  424. package/skills/schmancy/input.md +19 -4
  425. package/skills/schmancy/range.md +15 -1
  426. package/skills/schmancy/select.md +13 -1
  427. package/skills/schmancy/switch.md +21 -2
  428. package/skills/schmancy/textarea.md +13 -0
  429. package/src/button/button.test.ts +122 -0
  430. package/src/button/button.ts +36 -0
  431. package/src/{autocomplete → form/fields/autocomplete}/autocomplete.ts +48 -75
  432. package/src/{checkbox → form/fields/checkbox}/checkbox.test.ts +1 -1
  433. package/src/form/fields/checkbox/checkbox.ts +126 -0
  434. package/src/form/fields/date-range/date-range.test.ts +102 -0
  435. package/src/{date-range → form/fields/date-range}/date-range.ts +90 -7
  436. package/src/form/fields/index.ts +9 -0
  437. package/src/form/fields/input/input.test.ts +201 -0
  438. package/src/{input → form/fields/input}/input.ts +153 -238
  439. package/src/{radio-group → form/fields/radio-group}/radio-button.ts +1 -1
  440. package/src/{radio-group → form/fields/radio-group}/radio-group.ts +1 -1
  441. package/src/form/fields/range/range.test.ts +90 -0
  442. package/src/{range → form/fields/range}/range.ts +34 -13
  443. package/src/{select → form/fields/select}/select.ts +77 -108
  444. package/src/{switch → form/fields/switch}/switch.test.ts +1 -1
  445. package/src/{switch → form/fields/switch}/switch.ts +71 -51
  446. package/src/form/fields/textarea/textarea.test.ts +54 -0
  447. package/src/{textarea → form/fields/textarea}/textarea.ts +33 -72
  448. package/src/form/form-state.ts +31 -0
  449. package/src/form/form-summary.test.ts +105 -0
  450. package/src/form/form-summary.ts +171 -0
  451. package/src/form/form.test.ts +218 -35
  452. package/src/form/form.ts +330 -99
  453. package/src/form/index.ts +3 -0
  454. package/src/index.ts +9 -9
  455. package/types/mixins/formField.mixin.d.ts +90 -0
  456. package/types/src/button/button.d.ts +9 -0
  457. package/types/src/button/button.test.d.ts +3 -0
  458. package/types/src/{autocomplete → form/fields/autocomplete}/autocomplete.d.ts +6 -15
  459. package/types/src/form/fields/checkbox/checkbox.d.ts +47 -0
  460. package/types/src/{date-range → form/fields/date-range}/date-range.d.ts +22 -4
  461. package/types/src/form/fields/date-range/date-range.test.d.ts +1 -0
  462. package/types/src/form/fields/index.d.ts +9 -0
  463. package/types/src/{input → form/fields/input}/input.d.ts +20 -45
  464. package/types/src/form/fields/input/input.test.d.ts +1 -0
  465. package/types/src/{radio-group → form/fields/radio-group}/radio-button.d.ts +1 -1
  466. package/types/src/{radio-group → form/fields/radio-group}/radio-group.d.ts +1 -1
  467. package/types/src/form/fields/range/range.d.ts +28 -0
  468. package/types/src/form/fields/range/range.test.d.ts +1 -0
  469. package/types/src/{select → form/fields/select}/select.d.ts +23 -24
  470. package/types/src/form/fields/switch/switch.d.ts +57 -0
  471. package/types/src/{textarea → form/fields/textarea}/textarea.d.ts +6 -39
  472. package/types/src/form/fields/textarea/textarea.test.d.ts +1 -0
  473. package/types/src/form/form-state.d.ts +22 -0
  474. package/types/src/form/form-summary.d.ts +42 -0
  475. package/types/src/form/form-summary.test.d.ts +4 -0
  476. package/types/src/form/form.d.ts +79 -34
  477. package/types/src/form/form.test.d.ts +2 -2
  478. package/types/src/form/index.d.ts +3 -0
  479. package/types/src/index.d.ts +9 -9
  480. package/dist/active-host-CcIa2tmW.cjs +0 -1
  481. package/dist/active-host-CvNYoprt.js +0 -57
  482. package/dist/autocomplete-DWSuwSRS.js.map +0 -1
  483. package/dist/autocomplete-iCJOia-q.cjs +0 -115
  484. package/dist/autocomplete-iCJOia-q.cjs.map +0 -1
  485. package/dist/checkbox-NNReP9s_.cjs.map +0 -1
  486. package/dist/date-range-CaOxwZDq.cjs +0 -131
  487. package/dist/date-range-CaOxwZDq.cjs.map +0 -1
  488. package/dist/date-range-CgNujP8r.js.map +0 -1
  489. package/dist/date-range-inline-D4IjOOO0.cjs +0 -43
  490. package/dist/decorate-23nYs4Le.js +0 -7
  491. package/dist/decorate-DpFmy0nm.cjs +0 -1
  492. package/dist/float-CKmd-0-t.cjs +0 -1
  493. package/dist/form-CFvwnfuJ.js +0 -68
  494. package/dist/form-CFvwnfuJ.js.map +0 -1
  495. package/dist/form-Ceijw1aA.cjs +0 -1
  496. package/dist/form-Ceijw1aA.cjs.map +0 -1
  497. package/dist/input-D95GjINh.js.map +0 -1
  498. package/dist/input-D9s4jDAb.cjs +0 -51
  499. package/dist/input-D9s4jDAb.cjs.map +0 -1
  500. package/dist/mixins-BV0w2yIE.js +0 -627
  501. package/dist/mixins-BV0w2yIE.js.map +0 -1
  502. package/dist/mixins-DvAYa-F7.cjs +0 -298
  503. package/dist/mixins-DvAYa-F7.cjs.map +0 -1
  504. package/dist/notification-BC9nG8Sr.cjs +0 -23
  505. package/dist/radio-group-ByMD6Lsj.cjs +0 -40
  506. package/dist/radio-group-ByMD6Lsj.cjs.map +0 -1
  507. package/dist/radio-group-CW8airhZ.js.map +0 -1
  508. package/dist/select-BdBThja4.cjs +0 -56
  509. package/dist/select-BdBThja4.cjs.map +0 -1
  510. package/dist/select-Dbn-CImU.js.map +0 -1
  511. package/dist/state-DNdCPITt.cjs +0 -1
  512. package/dist/surface-BpppoNXN.cjs +0 -7
  513. package/dist/textarea-B9dy-yec.js +0 -211
  514. package/dist/textarea-B9dy-yec.js.map +0 -1
  515. package/dist/textarea-DFY0Flgv.cjs +0 -39
  516. package/dist/textarea-DFY0Flgv.cjs.map +0 -1
  517. package/dist/theme-CpuF3D3q.cjs +0 -181
  518. package/dist/theme-button-B6Xf-EiH.cjs +0 -8
  519. package/src/checkbox/checkbox.ts +0 -162
  520. package/types/src/checkbox/checkbox.d.ts +0 -71
  521. package/types/src/range/range.d.ts +0 -25
  522. package/types/src/switch/switch.d.ts +0 -53
  523. /package/dist/{animation-CO_Csq84.cjs → animation-CCOIW4wJ.cjs} +0 -0
  524. /package/dist/{animation-BK-8BwY8.js → animation-DCznELuT.js} +0 -0
  525. /package/dist/{context-DJTJnSK4.js → context-6oXCZmZN.js} +0 -0
  526. /package/dist/{context-BpCETidA.cjs → context-CRZeiCqq.cjs} +0 -0
  527. /package/dist/{hashContent-Bobsobip.cjs → hashContent-Ck6laKlk.cjs} +0 -0
  528. /package/dist/{hashContent-BU6jl5ih.js → hashContent-dJrI-9sc.js} +0 -0
  529. /package/dist/{lazy-Dq9mRRjT.cjs → lazy-CayEFyC3.cjs} +0 -0
  530. /package/dist/{lazy-B0ia54tT.js → lazy-D-bO2r4m.js} +0 -0
  531. /package/dist/{overlay-stack-DCDS17uj.js → overlay-stack-BR4iYivO.js} +0 -0
  532. /package/dist/{overlay-stack-DPIe_aYv.cjs → overlay-stack-Dk0xETTy.cjs} +0 -0
  533. /package/dist/{reduced-motion-D-L12p7G.js → reduced-motion-D7LqTUMn.js} +0 -0
  534. /package/dist/{reduced-motion-Ds-HjMzn.cjs → reduced-motion-Dzfp_w5x.cjs} +0 -0
  535. /package/dist/{rxjs-utils-DCUHg_Ml.cjs → rxjs-utils-BKB2UM_j.cjs} +0 -0
  536. /package/dist/{rxjs-utils-CVeJQ9KG.js → rxjs-utils-Dv9T9IpA.js} +0 -0
  537. /package/dist/{search-BLCRsxIC.cjs → search-DPKoC-dT.cjs} +0 -0
  538. /package/dist/{search-BTz7-Rev.js → search-MvIBA93K.js} +0 -0
  539. /package/dist/{theme.interface-B9TjbSBF.js → theme.interface-C2XNgsLB.js} +0 -0
  540. /package/dist/{theme.interface-BujperTo.cjs → theme.interface-D4NeufQA.cjs} +0 -0
  541. /package/src/{autocomplete → form/fields/autocomplete}/autocomplete.scss +0 -0
  542. /package/src/{autocomplete → form/fields/autocomplete}/index.ts +0 -0
  543. /package/src/{checkbox → form/fields/checkbox}/index.ts +0 -0
  544. /package/src/{date-range → form/fields/date-range}/date-range-dialog.ts +0 -0
  545. /package/src/{date-range → form/fields/date-range}/date-range-helpers.ts +0 -0
  546. /package/src/{date-range → form/fields/date-range}/date-range-presets.ts +0 -0
  547. /package/src/{date-range → form/fields/date-range}/date-utils.ts +0 -0
  548. /package/src/{date-range → form/fields/date-range}/index.ts +0 -0
  549. /package/src/{input → form/fields/input}/index.ts +0 -0
  550. /package/src/{input → form/fields/input}/input.scss +0 -0
  551. /package/src/{radio-group → form/fields/radio-group}/index.ts +0 -0
  552. /package/src/{radio-group → form/fields/radio-group}/radio-group.scss +0 -0
  553. /package/src/{range → form/fields/range}/index.ts +0 -0
  554. /package/src/{select → form/fields/select}/index.ts +0 -0
  555. /package/src/{switch → form/fields/switch}/index.ts +0 -0
  556. /package/src/{textarea → form/fields/textarea}/index.ts +0 -0
  557. /package/src/{textarea → form/fields/textarea}/textarea.scss +0 -0
  558. /package/types/src/{autocomplete → form/fields/autocomplete}/index.d.ts +0 -0
  559. /package/types/src/{checkbox → form/fields/checkbox}/checkbox.test.d.ts +0 -0
  560. /package/types/src/{checkbox → form/fields/checkbox}/index.d.ts +0 -0
  561. /package/types/src/{date-range → form/fields/date-range}/date-range-dialog.d.ts +0 -0
  562. /package/types/src/{date-range → form/fields/date-range}/date-range-helpers.d.ts +0 -0
  563. /package/types/src/{date-range → form/fields/date-range}/date-range-presets.d.ts +0 -0
  564. /package/types/src/{date-range → form/fields/date-range}/date-utils.d.ts +0 -0
  565. /package/types/src/{date-range → form/fields/date-range}/index.d.ts +0 -0
  566. /package/types/src/{input → form/fields/input}/index.d.ts +0 -0
  567. /package/types/src/{radio-group → form/fields/radio-group}/index.d.ts +0 -0
  568. /package/types/src/{range → form/fields/range}/index.d.ts +0 -0
  569. /package/types/src/{select → form/fields/select}/index.d.ts +0 -0
  570. /package/types/src/{switch → form/fields/switch}/index.d.ts +0 -0
  571. /package/types/src/{switch → form/fields/switch}/switch.test.d.ts +0 -0
  572. /package/types/src/{textarea → form/fields/textarea}/index.d.ts +0 -0
@@ -1 +1 @@
1
- import "./autocomplete-DWSuwSRS.js";
1
+ import "./autocomplete-CXvUjMD-.js";
package/dist/avatar.cjs CHANGED
@@ -1,7 +1,7 @@
1
- Object.defineProperty(exports,Symbol.toStringTag,{value:`Module`}),require(`./chunk-CncqDLb2.cjs`);const e=require(`./mixins-DvAYa-F7.cjs`),t=require(`./decorate-DpFmy0nm.cjs`),n=require(`./directives.cjs`),r=require(`./theme.interface-BujperTo.cjs`);let i=require(`lit/decorators.js`),a=require(`lit`);var o=class extends e.s{constructor(...e){super(...e),this.initials=``,this.src=``,this.icon=``,this.size=`md`,this.color=`primary`,this.shape=`circle`,this.bordered=!1,this.status=`none`}render(){let e;e=this.src?a.html`<img class="w-full h-full object-cover" src="${this.src}" alt="Avatar" />`:this.initials?a.html`<span class="text-center font-medium">${this.initials.substring(0,2).toUpperCase()}</span>`:this.icon?a.html`<schmancy-icon>${this.icon}</schmancy-icon>`:a.html`<schmancy-icon>person</schmancy-icon>`;let t={"relative flex items-center justify-center overflow-hidden":!0,[{xxs:`w-5 h-5 text-[8px]`,xs:`w-6 h-6 text-xs`,sm:`w-8 h-8 text-sm`,md:`w-10 h-10 text-base`,lg:`w-12 h-12 text-lg`,xl:`w-16 h-16 text-xl`}[this.size]]:!0,[{circle:`rounded-full`,square:`rounded-md`}[this.shape]]:!0,"border-2 border-surface-container":this.bordered},n=this.getColorAttributes();return a.html`
1
+ Object.defineProperty(exports,Symbol.toStringTag,{value:`Module`}),require(`./chunk-CncqDLb2.cjs`);const e=require(`./mixins-BOOu6q2n.cjs`),t=require(`./active-host-jH3iloCR.cjs`),n=require(`./directives.cjs`),r=require(`./theme.interface-D4NeufQA.cjs`);let i=require(`lit/decorators.js`),a=require(`lit`);var o=class extends e.c{constructor(...e){super(...e),this.initials=``,this.src=``,this.icon=``,this.size=`md`,this.color=`primary`,this.shape=`circle`,this.bordered=!1,this.status=`none`}render(){let e;e=this.src?a.html`<img class="w-full h-full object-cover" src="${this.src}" alt="Avatar" />`:this.initials?a.html`<span class="text-center font-medium">${this.initials.substring(0,2).toUpperCase()}</span>`:this.icon?a.html`<schmancy-icon>${this.icon}</schmancy-icon>`:a.html`<schmancy-icon>person</schmancy-icon>`;let t={"relative flex items-center justify-center overflow-hidden":!0,[{xxs:`w-5 h-5 text-[8px]`,xs:`w-6 h-6 text-xs`,sm:`w-8 h-8 text-sm`,md:`w-10 h-10 text-base`,lg:`w-12 h-12 text-lg`,xl:`w-16 h-16 text-xl`}[this.size]]:!0,[{circle:`rounded-full`,square:`rounded-md`}[this.shape]]:!0,"border-2 border-surface-container":this.bordered},n=this.getColorAttributes();return a.html`
2
2
  <div class="${this.classMap(t)}" ${n}>
3
3
  ${e} ${this.status===`none`?``:this.renderStatusIndicator()}
4
4
  </div>
5
5
  `}getColorAttributes(){return n.color({primary:{bgColor:r.t.sys.color.primary.container,color:r.t.sys.color.primary.onContainer},secondary:{bgColor:r.t.sys.color.secondary.container,color:r.t.sys.color.secondary.onContainer},tertiary:{bgColor:r.t.sys.color.tertiary.container,color:r.t.sys.color.tertiary.onContainer},success:{bgColor:r.t.sys.color.success.container,color:r.t.sys.color.success.onContainer},error:{bgColor:r.t.sys.color.error.container,color:r.t.sys.color.error.onContainer},neutral:{bgColor:r.t.sys.color.surface.container,color:r.t.sys.color.surface.on}}[this.color])}renderStatusIndicator(){let e={online:r.t.sys.color.success.default,offline:r.t.sys.color.surface.onVariant,busy:r.t.sys.color.error.default,away:r.t.sys.color.tertiary.default},t={"absolute bottom-0 right-0 rounded-full border-2 border-surface-default":!0,[{xxs:`w-1 h-1`,xs:`w-1.5 h-1.5`,sm:`w-2 h-2`,md:`w-2.5 h-2.5`,lg:`w-3 h-3`,xl:`w-4 h-4`}[this.size]]:!0};return a.html`
6
6
  <div class="${this.classMap(t)}" style="background-color: ${e[this.status]};"></div>
7
- `}};t.t([(0,i.property)({type:String})],o.prototype,`initials`,void 0),t.t([(0,i.property)({type:String})],o.prototype,`src`,void 0),t.t([(0,i.property)({type:String})],o.prototype,`icon`,void 0),t.t([(0,i.property)({type:String})],o.prototype,`size`,void 0),t.t([(0,i.property)({type:String})],o.prototype,`color`,void 0),t.t([(0,i.property)({type:String})],o.prototype,`shape`,void 0),t.t([(0,i.property)({type:Boolean})],o.prototype,`bordered`,void 0),t.t([(0,i.property)({type:String})],o.prototype,`status`,void 0),o=t.t([(0,i.customElement)(`schmancy-avatar`)],o),Object.defineProperty(exports,`SchmancyAvatar`,{enumerable:!0,get:function(){return o}});
7
+ `}};t.a([(0,i.property)({type:String})],o.prototype,`initials`,void 0),t.a([(0,i.property)({type:String})],o.prototype,`src`,void 0),t.a([(0,i.property)({type:String})],o.prototype,`icon`,void 0),t.a([(0,i.property)({type:String})],o.prototype,`size`,void 0),t.a([(0,i.property)({type:String})],o.prototype,`color`,void 0),t.a([(0,i.property)({type:String})],o.prototype,`shape`,void 0),t.a([(0,i.property)({type:Boolean})],o.prototype,`bordered`,void 0),t.a([(0,i.property)({type:String})],o.prototype,`status`,void 0),o=t.a([(0,i.customElement)(`schmancy-avatar`)],o),Object.defineProperty(exports,`SchmancyAvatar`,{enumerable:!0,get:function(){return o}});
@@ -1 +1 @@
1
- {"version":3,"file":"avatar.cjs","names":[],"sources":["../src/avatar/avatar.ts"],"sourcesContent":["import { SchmancyElement } from '@mixins/index'\nimport { html } from 'lit'\nimport { customElement, property } from 'lit/decorators.js'\nimport { color } from '@schmancy/directives'\nimport { SchmancyTheme } from '@schmancy/theme/theme.interface'\n\n/**\n * M3 avatar sizes: 20dp → 24dp → 32dp → 40dp → 48dp → 64dp\n * - xxs: Ultra-compact (20px) - for menu cards\n * - xs: 24px - M3 compact\n * - sm: 32px - M3 small\n * - md: 40px - M3 medium (default)\n * - lg: 48px - M3 large\n * - xl: 64px - M3 extra large\n */\nexport type AvatarSize = 'xxs' | 'xs' | 'sm' | 'md' | 'lg' | 'xl'\nexport type AvatarColor = 'primary' | 'secondary' | 'tertiary' | 'success' | 'error' | 'neutral'\nexport type AvatarShape = 'circle' | 'square'\nexport type AvatarStatus = 'online' | 'offline' | 'busy' | 'away' | 'none'\n\n/**\n * A customizable avatar component that displays initials or an icon\n * Designed to match the Schmancy design system\n *\n * @element schmancy-avatar\n *\n * @property {string} initials - Text initials to display (limited to 2 characters)\n * @property {string} src - URL of an image to display\n * @property {string} icon - Name of an icon to display\n * @property {AvatarSize} size - Size of the avatar (xs, sm, md, lg, xl)\n * @property {AvatarColor} color - Color theme of the avatar\n * @property {AvatarShape} shape - Shape of the avatar (circle or square)\n * @property {boolean} bordered - Whether to add a border around the avatar\n * @property {AvatarStatus} status - Optional status indicator to display\n *\n * @example\n * <schmancy-avatar\n * initials=\"JD\"\n * size=\"md\"\n * color=\"primary\"\n * ></schmancy-avatar>\n */\n@customElement('schmancy-avatar')\nexport class SchmancyAvatar extends SchmancyElement {\n\t@property({ type: String }) initials: string = ''\n\t@property({ type: String }) src: string = ''\n\t@property({ type: String }) icon: string = ''\n\t@property({ type: String }) size: AvatarSize = 'md'\n\t@property({ type: String }) color: AvatarColor = 'primary'\n\t@property({ type: String }) shape: AvatarShape = 'circle'\n\t@property({ type: Boolean }) bordered: boolean = false\n\t@property({ type: String }) status: AvatarStatus = 'none'\n\n\trender() {\n\t\t// Determine content to display (image, initials, or icon)\n\t\tlet content\n\t\tif (this.src) {\n\t\t\tcontent = html`<img class=\"w-full h-full object-cover\" src=\"${this.src}\" alt=\"Avatar\" />`\n\t\t} else if (this.initials) {\n\t\t\tcontent = html`<span class=\"text-center font-medium\">${this.initials.substring(0, 2).toUpperCase()}</span>`\n\t\t} else if (this.icon) {\n\t\t\tcontent = html`<schmancy-icon>${this.icon}</schmancy-icon>`\n\t\t} else {\n\t\t\tcontent = html`<schmancy-icon>person</schmancy-icon>`\n\t\t}\n\n\t\t// Size classes - M3 aligned: 20dp → 24dp → 32dp → 40dp → 48dp → 64dp\n\t\tconst sizeClasses = {\n\t\t\txxs: 'w-5 h-5 text-[8px]', // 20px - Ultra-compact\n\t\t\txs: 'w-6 h-6 text-xs', // 24px - M3 compact\n\t\t\tsm: 'w-8 h-8 text-sm', // 32px - M3 small\n\t\t\tmd: 'w-10 h-10 text-base', // 40px - M3 medium (default)\n\t\t\tlg: 'w-12 h-12 text-lg', // 48px - M3 large\n\t\t\txl: 'w-16 h-16 text-xl', // 64px - M3 extra large\n\t\t}\n\n\t\t// Shape classes\n\t\tconst shapeClasses = {\n\t\t\tcircle: 'rounded-full',\n\t\t\tsquare: 'rounded-md',\n\t\t}\n\n\t\t// Combine classes\n\t\tconst avatarClasses = {\n\t\t\t'relative flex items-center justify-center overflow-hidden': true,\n\t\t\t[sizeClasses[this.size]]: true,\n\t\t\t[shapeClasses[this.shape]]: true,\n\t\t\t'border-2 border-surface-container': this.bordered,\n\t\t}\n\n\t\t// Get theme colors\n\t\tconst colorAttrs = this.getColorAttributes()\n\n\t\treturn html`\n\t\t\t<div class=\"${this.classMap(avatarClasses)}\" ${colorAttrs}>\n\t\t\t\t${content} ${this.status !== 'none' ? this.renderStatusIndicator() : ''}\n\t\t\t</div>\n\t\t`\n\t}\n\n\tprivate getColorAttributes() {\n\t\tconst colorMap = {\n\t\t\tprimary: {\n\t\t\t\tbgColor: SchmancyTheme.sys.color.primary.container,\n\t\t\t\tcolor: SchmancyTheme.sys.color.primary.onContainer,\n\t\t\t},\n\t\t\tsecondary: {\n\t\t\t\tbgColor: SchmancyTheme.sys.color.secondary.container,\n\t\t\t\tcolor: SchmancyTheme.sys.color.secondary.onContainer,\n\t\t\t},\n\t\t\ttertiary: {\n\t\t\t\tbgColor: SchmancyTheme.sys.color.tertiary.container,\n\t\t\t\tcolor: SchmancyTheme.sys.color.tertiary.onContainer,\n\t\t\t},\n\t\t\tsuccess: {\n\t\t\t\tbgColor: SchmancyTheme.sys.color.success.container,\n\t\t\t\tcolor: SchmancyTheme.sys.color.success.onContainer,\n\t\t\t},\n\t\t\terror: {\n\t\t\t\tbgColor: SchmancyTheme.sys.color.error.container,\n\t\t\t\tcolor: SchmancyTheme.sys.color.error.onContainer,\n\t\t\t},\n\t\t\tneutral: {\n\t\t\t\tbgColor: SchmancyTheme.sys.color.surface.container,\n\t\t\t\tcolor: SchmancyTheme.sys.color.surface.on,\n\t\t\t},\n\t\t}\n\n\t\treturn color(colorMap[this.color])\n\t}\n\n\tprivate renderStatusIndicator() {\n\t\tconst statusColors = {\n\t\t\tonline: SchmancyTheme.sys.color.success.default,\n\t\t\toffline: SchmancyTheme.sys.color.surface.onVariant,\n\t\t\tbusy: SchmancyTheme.sys.color.error.default,\n\t\t\taway: SchmancyTheme.sys.color.tertiary.default,\n\t\t}\n\n\t\tconst sizeMap = {\n\t\t\txxs: 'w-1 h-1',\n\t\t\txs: 'w-1.5 h-1.5',\n\t\t\tsm: 'w-2 h-2',\n\t\t\tmd: 'w-2.5 h-2.5',\n\t\t\tlg: 'w-3 h-3',\n\t\t\txl: 'w-4 h-4',\n\t\t}\n\n\t\tconst statusClasses = {\n\t\t\t'absolute bottom-0 right-0 rounded-full border-2 border-surface-default': true,\n\t\t\t[sizeMap[this.size]]: true,\n\t\t}\n\n\t\treturn html`\n\t\t\t<div class=\"${this.classMap(statusClasses)}\" style=\"background-color: ${statusColors[this.status]};\"></div>\n\t\t`\n\t}\n}\n\ndeclare global {\n\tinterface HTMLElementTagNameMap {\n\t\t'schmancy-avatar': SchmancyAvatar\n\t}\n}\n"],"mappings":"+SA2CO,IAAA,EAAA,cAA6B,EAAA,CAAA,CAAA,YAAA,GAAA,EAAA,CAAA,MAAA,GAAA,EAAA,CAAA,KAAA,SACY,GAAA,KAAA,IACL,GAAA,KAAA,KACC,GAAA,KAAA,KACI,KAAA,KAAA,MACE,UAAA,KAAA,MACA,SAAA,KAAA,SAAA,CACA,EAAA,KAAA,OACE,OAEnD,QAAA,CAEC,IAAI,EAEH,EADG,KAAK,IACE,EAAA,IAAI,gDAAgD,KAAK,IAAA,mBACzD,KAAK,SACL,EAAA,IAAI,yCAAyC,KAAK,SAAS,UAAU,EAAG,EAAA,CAAG,aAAA,CAAA,SAC3E,KAAK,KACL,EAAA,IAAI,kBAAkB,KAAK,KAAA,kBAE3B,EAAA,IAAI,wCAIf,IAgBM,EAAgB,CACrB,4DAAA,CAA6D,GAjB1C,CACnB,IAAK,qBACL,GAAI,kBACJ,GAAI,kBACJ,GAAI,sBACJ,GAAI,oBACJ,GAAI,oBAAA,CAYS,KAAK,OAAA,CAAQ,GARN,CACpB,OAAQ,eACR,OAAQ,aAAA,CAOM,KAAK,QAAA,CAAS,EAC5B,oCAAqC,KAAK,SAAA,CAIrC,EAAa,KAAK,oBAAA,CAExB,MAAO,GAAA,IAAI;iBACI,KAAK,SAAS,EAAA,CAAA,IAAmB,EAAA;MAC5C,EAAA,GAAW,KAAK,SAAW,OAAwC,GAA/B,KAAK,uBAAA,CAA0B;;IAKxE,oBAAA,CA4BC,OAAO,EAAA,MAAM,CA1BZ,QAAS,CACR,QAAS,EAAA,EAAc,IAAI,MAAM,QAAQ,UACzC,MAAO,EAAA,EAAc,IAAI,MAAM,QAAQ,YAAA,CAExC,UAAW,CACV,QAAS,EAAA,EAAc,IAAI,MA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AA,EAAA,EAAA,EAAA,EAAA,EAAA,UACjB,CAAE,KAAM,OAAA,CAAA,CAAA,CAAS,EAAA,UAAA,OAAA,IAAA,GAAA,CAAA,EAAA,EAAA,EAAA,EAAA,EAAA,UACjB,CAAE,KAAM,OAAA,CAAA,CAAA,CAAS,EAAA,UAAA,QAAA,IAAA,GAAA,CAAA,EAAA,EAAA,EAAA,EAAA,EAAA,UACjB,CAAE,KAAM,OAAA,CAAA,CAAA,CAAS,EAAA,UAAA,QAAA,IAAA,GAAA,CAAA,EAAA,EAAA,EAAA,EAAA,EAAA,UACjB,CAAE,KAAM,QAAA,CAAA,CAAA,CAAU,EAAA,UAAA,WAAA,IAAA,GAAA,CAAA,EAAA,EAAA,EAAA,EAAA,EAAA,UAClB,CAAE,KAAM,OAAA,CAAA,CAAA,CAAS,EAAA,UAAA,SAAA,IAAA,GAAA,CAAA,EAAA,EAAA,EAAA,EAAA,EAAA,EAAA,eATb,kBAAA,CAAA,CAAkB,EAAA,CAAA,OAAA,eAAA,QAAA,iBAAA,CAAA,WAAA,CAAA,EAAA,IAAA,UAAA,CAAA,OAAA,GAAA,CAAA"}
1
+ {"version":3,"file":"avatar.cjs","names":[],"sources":["../src/avatar/avatar.ts"],"sourcesContent":["import { SchmancyElement } from '@mixins/index'\nimport { html } from 'lit'\nimport { customElement, property } from 'lit/decorators.js'\nimport { color } from '@schmancy/directives'\nimport { SchmancyTheme } from '@schmancy/theme/theme.interface'\n\n/**\n * M3 avatar sizes: 20dp → 24dp → 32dp → 40dp → 48dp → 64dp\n * - xxs: Ultra-compact (20px) - for menu cards\n * - xs: 24px - M3 compact\n * - sm: 32px - M3 small\n * - md: 40px - M3 medium (default)\n * - lg: 48px - M3 large\n * - xl: 64px - M3 extra large\n */\nexport type AvatarSize = 'xxs' | 'xs' | 'sm' | 'md' | 'lg' | 'xl'\nexport type AvatarColor = 'primary' | 'secondary' | 'tertiary' | 'success' | 'error' | 'neutral'\nexport type AvatarShape = 'circle' | 'square'\nexport type AvatarStatus = 'online' | 'offline' | 'busy' | 'away' | 'none'\n\n/**\n * A customizable avatar component that displays initials or an icon\n * Designed to match the Schmancy design system\n *\n * @element schmancy-avatar\n *\n * @property {string} initials - Text initials to display (limited to 2 characters)\n * @property {string} src - URL of an image to display\n * @property {string} icon - Name of an icon to display\n * @property {AvatarSize} size - Size of the avatar (xs, sm, md, lg, xl)\n * @property {AvatarColor} color - Color theme of the avatar\n * @property {AvatarShape} shape - Shape of the avatar (circle or square)\n * @property {boolean} bordered - Whether to add a border around the avatar\n * @property {AvatarStatus} status - Optional status indicator to display\n *\n * @example\n * <schmancy-avatar\n * initials=\"JD\"\n * size=\"md\"\n * color=\"primary\"\n * ></schmancy-avatar>\n */\n@customElement('schmancy-avatar')\nexport class SchmancyAvatar extends SchmancyElement {\n\t@property({ type: String }) initials: string = ''\n\t@property({ type: String }) src: string = ''\n\t@property({ type: String }) icon: string = ''\n\t@property({ type: String }) size: AvatarSize = 'md'\n\t@property({ type: String }) color: AvatarColor = 'primary'\n\t@property({ type: String }) shape: AvatarShape = 'circle'\n\t@property({ type: Boolean }) bordered: boolean = false\n\t@property({ type: String }) status: AvatarStatus = 'none'\n\n\trender() {\n\t\t// Determine content to display (image, initials, or icon)\n\t\tlet content\n\t\tif (this.src) {\n\t\t\tcontent = html`<img class=\"w-full h-full object-cover\" src=\"${this.src}\" alt=\"Avatar\" />`\n\t\t} else if (this.initials) {\n\t\t\tcontent = html`<span class=\"text-center font-medium\">${this.initials.substring(0, 2).toUpperCase()}</span>`\n\t\t} else if (this.icon) {\n\t\t\tcontent = html`<schmancy-icon>${this.icon}</schmancy-icon>`\n\t\t} else {\n\t\t\tcontent = html`<schmancy-icon>person</schmancy-icon>`\n\t\t}\n\n\t\t// Size classes - M3 aligned: 20dp → 24dp → 32dp → 40dp → 48dp → 64dp\n\t\tconst sizeClasses = {\n\t\t\txxs: 'w-5 h-5 text-[8px]', // 20px - Ultra-compact\n\t\t\txs: 'w-6 h-6 text-xs', // 24px - M3 compact\n\t\t\tsm: 'w-8 h-8 text-sm', // 32px - M3 small\n\t\t\tmd: 'w-10 h-10 text-base', // 40px - M3 medium (default)\n\t\t\tlg: 'w-12 h-12 text-lg', // 48px - M3 large\n\t\t\txl: 'w-16 h-16 text-xl', // 64px - M3 extra large\n\t\t}\n\n\t\t// Shape classes\n\t\tconst shapeClasses = {\n\t\t\tcircle: 'rounded-full',\n\t\t\tsquare: 'rounded-md',\n\t\t}\n\n\t\t// Combine classes\n\t\tconst avatarClasses = {\n\t\t\t'relative flex items-center justify-center overflow-hidden': true,\n\t\t\t[sizeClasses[this.size]]: true,\n\t\t\t[shapeClasses[this.shape]]: true,\n\t\t\t'border-2 border-surface-container': this.bordered,\n\t\t}\n\n\t\t// Get theme colors\n\t\tconst colorAttrs = this.getColorAttributes()\n\n\t\treturn html`\n\t\t\t<div class=\"${this.classMap(avatarClasses)}\" ${colorAttrs}>\n\t\t\t\t${content} ${this.status !== 'none' ? this.renderStatusIndicator() : ''}\n\t\t\t</div>\n\t\t`\n\t}\n\n\tprivate getColorAttributes() {\n\t\tconst colorMap = {\n\t\t\tprimary: {\n\t\t\t\tbgColor: SchmancyTheme.sys.color.primary.container,\n\t\t\t\tcolor: SchmancyTheme.sys.color.primary.onContainer,\n\t\t\t},\n\t\t\tsecondary: {\n\t\t\t\tbgColor: SchmancyTheme.sys.color.secondary.container,\n\t\t\t\tcolor: SchmancyTheme.sys.color.secondary.onContainer,\n\t\t\t},\n\t\t\ttertiary: {\n\t\t\t\tbgColor: SchmancyTheme.sys.color.tertiary.container,\n\t\t\t\tcolor: SchmancyTheme.sys.color.tertiary.onContainer,\n\t\t\t},\n\t\t\tsuccess: {\n\t\t\t\tbgColor: SchmancyTheme.sys.color.success.container,\n\t\t\t\tcolor: SchmancyTheme.sys.color.success.onContainer,\n\t\t\t},\n\t\t\terror: {\n\t\t\t\tbgColor: SchmancyTheme.sys.color.error.container,\n\t\t\t\tcolor: SchmancyTheme.sys.color.error.onContainer,\n\t\t\t},\n\t\t\tneutral: {\n\t\t\t\tbgColor: SchmancyTheme.sys.color.surface.container,\n\t\t\t\tcolor: SchmancyTheme.sys.color.surface.on,\n\t\t\t},\n\t\t}\n\n\t\treturn color(colorMap[this.color])\n\t}\n\n\tprivate renderStatusIndicator() {\n\t\tconst statusColors = {\n\t\t\tonline: SchmancyTheme.sys.color.success.default,\n\t\t\toffline: SchmancyTheme.sys.color.surface.onVariant,\n\t\t\tbusy: SchmancyTheme.sys.color.error.default,\n\t\t\taway: SchmancyTheme.sys.color.tertiary.default,\n\t\t}\n\n\t\tconst sizeMap = {\n\t\t\txxs: 'w-1 h-1',\n\t\t\txs: 'w-1.5 h-1.5',\n\t\t\tsm: 'w-2 h-2',\n\t\t\tmd: 'w-2.5 h-2.5',\n\t\t\tlg: 'w-3 h-3',\n\t\t\txl: 'w-4 h-4',\n\t\t}\n\n\t\tconst statusClasses = {\n\t\t\t'absolute bottom-0 right-0 rounded-full border-2 border-surface-default': true,\n\t\t\t[sizeMap[this.size]]: true,\n\t\t}\n\n\t\treturn html`\n\t\t\t<div class=\"${this.classMap(statusClasses)}\" style=\"background-color: ${statusColors[this.status]};\"></div>\n\t\t`\n\t}\n}\n\ndeclare global {\n\tinterface HTMLElementTagNameMap {\n\t\t'schmancy-avatar': SchmancyAvatar\n\t}\n}\n"],"mappings":"kTA2CO,IAAA,EAAA,cAA6B,EAAA,CAAA,CAAA,YAAA,GAAA,EAAA,CAAA,MAAA,GAAA,EAAA,CAAA,KAAA,SACY,GAAA,KAAA,IACL,GAAA,KAAA,KACC,GAAA,KAAA,KACI,KAAA,KAAA,MACE,UAAA,KAAA,MACA,SAAA,KAAA,SAAA,CACA,EAAA,KAAA,OACE,OAEnD,QAAA,CAEC,IAAI,EAEH,EADG,KAAK,IACE,EAAA,IAAI,gDAAgD,KAAK,IAAA,mBACzD,KAAK,SACL,EAAA,IAAI,yCAAyC,KAAK,SAAS,UAAU,EAAG,EAAA,CAAG,aAAA,CAAA,SAC3E,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AAA,EAAA,eATb,kBAAA,CAAA,CAAkB,EAAA,CAAA,OAAA,eAAA,QAAA,iBAAA,CAAA,WAAA,CAAA,EAAA,IAAA,UAAA,CAAA,OAAA,GAAA,CAAA"}
package/dist/avatar.js CHANGED
@@ -1,7 +1,7 @@
1
- import { s as e } from "./mixins-BV0w2yIE.js";
2
- import { t } from "./decorate-23nYs4Le.js";
1
+ import { c as e } from "./mixins-BWb9_e1s.js";
2
+ import { a as t } from "./active-host-BP0zy_Y9.js";
3
3
  import { color as n } from "./directives.js";
4
- import { t as r } from "./theme.interface-B9TjbSBF.js";
4
+ import { t as r } from "./theme.interface-C2XNgsLB.js";
5
5
  import { customElement as i, property as a } from "lit/decorators.js";
6
6
  import { html as o } from "lit";
7
7
  var s = class extends e {
@@ -1 +1 @@
1
- {"version":3,"file":"avatar.js","names":[],"sources":["../src/avatar/avatar.ts"],"sourcesContent":["import { SchmancyElement } from '@mixins/index'\nimport { html } from 'lit'\nimport { customElement, property } from 'lit/decorators.js'\nimport { color } from '@schmancy/directives'\nimport { SchmancyTheme } from '@schmancy/theme/theme.interface'\n\n/**\n * M3 avatar sizes: 20dp → 24dp → 32dp → 40dp → 48dp → 64dp\n * - xxs: Ultra-compact (20px) - for menu cards\n * - xs: 24px - M3 compact\n * - sm: 32px - M3 small\n * - md: 40px - M3 medium (default)\n * - lg: 48px - M3 large\n * - xl: 64px - M3 extra large\n */\nexport type AvatarSize = 'xxs' | 'xs' | 'sm' | 'md' | 'lg' | 'xl'\nexport type AvatarColor = 'primary' | 'secondary' | 'tertiary' | 'success' | 'error' | 'neutral'\nexport type AvatarShape = 'circle' | 'square'\nexport type AvatarStatus = 'online' | 'offline' | 'busy' | 'away' | 'none'\n\n/**\n * A customizable avatar component that displays initials or an icon\n * Designed to match the Schmancy design system\n *\n * @element schmancy-avatar\n *\n * @property {string} initials - Text initials to display (limited to 2 characters)\n * @property {string} src - URL of an image to display\n * @property {string} icon - Name of an icon to display\n * @property {AvatarSize} size - Size of the avatar (xs, sm, md, lg, xl)\n * @property {AvatarColor} color - Color theme of the avatar\n * @property {AvatarShape} shape - Shape of the avatar (circle or square)\n * @property {boolean} bordered - Whether to add a border around the avatar\n * @property {AvatarStatus} status - Optional status indicator to display\n *\n * @example\n * <schmancy-avatar\n * initials=\"JD\"\n * size=\"md\"\n * color=\"primary\"\n * ></schmancy-avatar>\n */\n@customElement('schmancy-avatar')\nexport class SchmancyAvatar extends SchmancyElement {\n\t@property({ type: String }) initials: string = ''\n\t@property({ type: String }) src: string = ''\n\t@property({ type: String }) icon: string = ''\n\t@property({ type: String }) size: AvatarSize = 'md'\n\t@property({ type: String }) color: AvatarColor = 'primary'\n\t@property({ type: String }) shape: AvatarShape = 'circle'\n\t@property({ type: Boolean }) bordered: boolean = false\n\t@property({ type: String }) status: AvatarStatus = 'none'\n\n\trender() {\n\t\t// Determine content to display (image, initials, or icon)\n\t\tlet content\n\t\tif (this.src) {\n\t\t\tcontent = html`<img class=\"w-full h-full object-cover\" src=\"${this.src}\" alt=\"Avatar\" />`\n\t\t} else if (this.initials) {\n\t\t\tcontent = html`<span class=\"text-center font-medium\">${this.initials.substring(0, 2).toUpperCase()}</span>`\n\t\t} else if (this.icon) {\n\t\t\tcontent = html`<schmancy-icon>${this.icon}</schmancy-icon>`\n\t\t} else {\n\t\t\tcontent = html`<schmancy-icon>person</schmancy-icon>`\n\t\t}\n\n\t\t// Size classes - M3 aligned: 20dp → 24dp → 32dp → 40dp → 48dp → 64dp\n\t\tconst sizeClasses = {\n\t\t\txxs: 'w-5 h-5 text-[8px]', // 20px - Ultra-compact\n\t\t\txs: 'w-6 h-6 text-xs', // 24px - M3 compact\n\t\t\tsm: 'w-8 h-8 text-sm', // 32px - M3 small\n\t\t\tmd: 'w-10 h-10 text-base', // 40px - M3 medium (default)\n\t\t\tlg: 'w-12 h-12 text-lg', // 48px - M3 large\n\t\t\txl: 'w-16 h-16 text-xl', // 64px - M3 extra large\n\t\t}\n\n\t\t// Shape classes\n\t\tconst shapeClasses = {\n\t\t\tcircle: 'rounded-full',\n\t\t\tsquare: 'rounded-md',\n\t\t}\n\n\t\t// Combine classes\n\t\tconst avatarClasses = {\n\t\t\t'relative flex items-center justify-center overflow-hidden': true,\n\t\t\t[sizeClasses[this.size]]: true,\n\t\t\t[shapeClasses[this.shape]]: true,\n\t\t\t'border-2 border-surface-container': this.bordered,\n\t\t}\n\n\t\t// Get theme colors\n\t\tconst colorAttrs = this.getColorAttributes()\n\n\t\treturn html`\n\t\t\t<div class=\"${this.classMap(avatarClasses)}\" ${colorAttrs}>\n\t\t\t\t${content} ${this.status !== 'none' ? this.renderStatusIndicator() : ''}\n\t\t\t</div>\n\t\t`\n\t}\n\n\tprivate getColorAttributes() {\n\t\tconst colorMap = {\n\t\t\tprimary: {\n\t\t\t\tbgColor: SchmancyTheme.sys.color.primary.container,\n\t\t\t\tcolor: SchmancyTheme.sys.color.primary.onContainer,\n\t\t\t},\n\t\t\tsecondary: {\n\t\t\t\tbgColor: SchmancyTheme.sys.color.secondary.container,\n\t\t\t\tcolor: SchmancyTheme.sys.color.secondary.onContainer,\n\t\t\t},\n\t\t\ttertiary: {\n\t\t\t\tbgColor: SchmancyTheme.sys.color.tertiary.container,\n\t\t\t\tcolor: SchmancyTheme.sys.color.tertiary.onContainer,\n\t\t\t},\n\t\t\tsuccess: {\n\t\t\t\tbgColor: SchmancyTheme.sys.color.success.container,\n\t\t\t\tcolor: SchmancyTheme.sys.color.success.onContainer,\n\t\t\t},\n\t\t\terror: {\n\t\t\t\tbgColor: SchmancyTheme.sys.color.error.container,\n\t\t\t\tcolor: SchmancyTheme.sys.color.error.onContainer,\n\t\t\t},\n\t\t\tneutral: {\n\t\t\t\tbgColor: SchmancyTheme.sys.color.surface.container,\n\t\t\t\tcolor: SchmancyTheme.sys.color.surface.on,\n\t\t\t},\n\t\t}\n\n\t\treturn color(colorMap[this.color])\n\t}\n\n\tprivate renderStatusIndicator() {\n\t\tconst statusColors = {\n\t\t\tonline: SchmancyTheme.sys.color.success.default,\n\t\t\toffline: SchmancyTheme.sys.color.surface.onVariant,\n\t\t\tbusy: SchmancyTheme.sys.color.error.default,\n\t\t\taway: SchmancyTheme.sys.color.tertiary.default,\n\t\t}\n\n\t\tconst sizeMap = {\n\t\t\txxs: 'w-1 h-1',\n\t\t\txs: 'w-1.5 h-1.5',\n\t\t\tsm: 'w-2 h-2',\n\t\t\tmd: 'w-2.5 h-2.5',\n\t\t\tlg: 'w-3 h-3',\n\t\t\txl: 'w-4 h-4',\n\t\t}\n\n\t\tconst statusClasses = {\n\t\t\t'absolute bottom-0 right-0 rounded-full border-2 border-surface-default': true,\n\t\t\t[sizeMap[this.size]]: true,\n\t\t}\n\n\t\treturn html`\n\t\t\t<div class=\"${this.classMap(statusClasses)}\" style=\"background-color: ${statusColors[this.status]};\"></div>\n\t\t`\n\t}\n}\n\ndeclare global {\n\tinterface HTMLElementTagNameMap {\n\t\t'schmancy-avatar': SchmancyAvatar\n\t}\n}\n"],"mappings":";;;;;;AA2CO,IAAA,IAAA,cAA6B,EAAA;CAAA,YAAA,GAAA,GAAA;AAAA,QAAA,GAAA,EAAA,EAAA,KAAA,WACY,IAAA,KAAA,MACL,IAAA,KAAA,OACC,IAAA,KAAA,OACI,MAAA,KAAA,QACE,WAAA,KAAA,QACA,UAAA,KAAA,WAAA,CACA,GAAA,KAAA,SACE;;CAEnD,SAAA;EAEC,IAAI;AAEH,MADG,KAAK,MACE,CAAI,gDAAgD,KAAK,IAAA,qBACzD,KAAK,WACL,CAAI,yCAAyC,KAAK,SAAS,UAAU,GAAG,EAAA,CAAG,aAAA,CAAA,WAC3E,KAAK,OACL,CAAI,kBAAkB,KAAK,KAAA,oBAE3B,CAAI;EAIf,IAgBM,IAAgB;GACrB,6DAAA,CAA6D;IAjB1C;IACnB,KAAK;IACL,IAAI;IACJ,IAAI;IACJ,IAAI;IACJ,IAAI;IACJ,IAAI;IAAA,CAYS,KAAK,QAAA,CAAQ;IARN;IACpB,QAAQ;IACR,QA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,QAAA;;;;GA9G3F,EAAS,EAAE,MAAM,QAAA,CAAA,CAAA,EAAS,EAAA,WAAA,YAAA,KAAA,EAAA,EAAA,EAAA,CAC1B,EAAS,EAAE,MAAM,QAAA,CAAA,CAAA,EAAS,EAAA,WAAA,OAAA,KAAA,EAAA,EAAA,EAAA,CAC1B,EAAS,EAAE,MAAM,QAAA,CAAA,CAAA,EAAS,EAAA,WAAA,QAAA,KAAA,EAAA,EAAA,EAAA,CAC1B,EAAS,EAAE,MAAM,QAAA,CAAA,CAAA,EAAS,EAAA,WAAA,QAAA,KAAA,EAAA,EAAA,EAAA,CAC1B,EAAS,EAAE,MAAM,QAAA,CAAA,CAAA,EAAS,EAAA,WAAA,SAAA,KAAA,EAAA,EAAA,EAAA,CAC1B,EAAS,EAAE,MAAM,QAAA,CAAA,CAAA,EAAS,EAAA,WAAA,SAAA,KAAA,EAAA,EAAA,EAAA,CAC1B,EAAS,EAAE,MAAM,SAAA,CAAA,CAAA,EAAU,EAAA,WAAA,YAAA,KAAA,EAAA,EAAA,EAAA,CAC3B,EAAS,EAAE,MAAM,QAAA,CAAA,CAAA,EAAS,EAAA,WAAA,UAAA,KAAA,EAAA,EAAA,IAAA,EAAA,CAT3B,EAAc,kBAAA,CAAA,EAAkB,EAAA;AAAA,SAAA,KAAA"}
1
+ {"version":3,"file":"avatar.js","names":[],"sources":["../src/avatar/avatar.ts"],"sourcesContent":["import { SchmancyElement } from '@mixins/index'\nimport { html } from 'lit'\nimport { customElement, property } from 'lit/decorators.js'\nimport { color } from '@schmancy/directives'\nimport { SchmancyTheme } from '@schmancy/theme/theme.interface'\n\n/**\n * M3 avatar sizes: 20dp → 24dp → 32dp → 40dp → 48dp → 64dp\n * - xxs: Ultra-compact (20px) - for menu cards\n * - xs: 24px - M3 compact\n * - sm: 32px - M3 small\n * - md: 40px - M3 medium (default)\n * - lg: 48px - M3 large\n * - xl: 64px - M3 extra large\n */\nexport type AvatarSize = 'xxs' | 'xs' | 'sm' | 'md' | 'lg' | 'xl'\nexport type AvatarColor = 'primary' | 'secondary' | 'tertiary' | 'success' | 'error' | 'neutral'\nexport type AvatarShape = 'circle' | 'square'\nexport type AvatarStatus = 'online' | 'offline' | 'busy' | 'away' | 'none'\n\n/**\n * A customizable avatar component that displays initials or an icon\n * Designed to match the Schmancy design system\n *\n * @element schmancy-avatar\n *\n * @property {string} initials - Text initials to display (limited to 2 characters)\n * @property {string} src - URL of an image to display\n * @property {string} icon - Name of an icon to display\n * @property {AvatarSize} size - Size of the avatar (xs, sm, md, lg, xl)\n * @property {AvatarColor} color - Color theme of the avatar\n * @property {AvatarShape} shape - Shape of the avatar (circle or square)\n * @property {boolean} bordered - Whether to add a border around the avatar\n * @property {AvatarStatus} status - Optional status indicator to display\n *\n * @example\n * <schmancy-avatar\n * initials=\"JD\"\n * size=\"md\"\n * color=\"primary\"\n * ></schmancy-avatar>\n */\n@customElement('schmancy-avatar')\nexport class SchmancyAvatar extends SchmancyElement {\n\t@property({ type: String }) initials: string = ''\n\t@property({ type: String }) src: string = ''\n\t@property({ type: String }) icon: string = ''\n\t@property({ type: String }) size: AvatarSize = 'md'\n\t@property({ type: String }) color: AvatarColor = 'primary'\n\t@property({ type: String }) shape: AvatarShape = 'circle'\n\t@property({ type: Boolean }) bordered: boolean = false\n\t@property({ type: String }) status: AvatarStatus = 'none'\n\n\trender() {\n\t\t// Determine content to display (image, initials, or icon)\n\t\tlet content\n\t\tif (this.src) {\n\t\t\tcontent = html`<img class=\"w-full h-full object-cover\" src=\"${this.src}\" alt=\"Avatar\" />`\n\t\t} else if (this.initials) {\n\t\t\tcontent = html`<span class=\"text-center font-medium\">${this.initials.substring(0, 2).toUpperCase()}</span>`\n\t\t} else if (this.icon) {\n\t\t\tcontent = html`<schmancy-icon>${this.icon}</schmancy-icon>`\n\t\t} else {\n\t\t\tcontent = html`<schmancy-icon>person</schmancy-icon>`\n\t\t}\n\n\t\t// Size classes - M3 aligned: 20dp → 24dp → 32dp → 40dp → 48dp → 64dp\n\t\tconst sizeClasses = {\n\t\t\txxs: 'w-5 h-5 text-[8px]', // 20px - Ultra-compact\n\t\t\txs: 'w-6 h-6 text-xs', // 24px - M3 compact\n\t\t\tsm: 'w-8 h-8 text-sm', // 32px - M3 small\n\t\t\tmd: 'w-10 h-10 text-base', // 40px - M3 medium (default)\n\t\t\tlg: 'w-12 h-12 text-lg', // 48px - M3 large\n\t\t\txl: 'w-16 h-16 text-xl', // 64px - M3 extra large\n\t\t}\n\n\t\t// Shape classes\n\t\tconst shapeClasses = {\n\t\t\tcircle: 'rounded-full',\n\t\t\tsquare: 'rounded-md',\n\t\t}\n\n\t\t// Combine classes\n\t\tconst avatarClasses = {\n\t\t\t'relative flex items-center justify-center overflow-hidden': true,\n\t\t\t[sizeClasses[this.size]]: true,\n\t\t\t[shapeClasses[this.shape]]: true,\n\t\t\t'border-2 border-surface-container': this.bordered,\n\t\t}\n\n\t\t// Get theme colors\n\t\tconst colorAttrs = this.getColorAttributes()\n\n\t\treturn html`\n\t\t\t<div class=\"${this.classMap(avatarClasses)}\" ${colorAttrs}>\n\t\t\t\t${content} ${this.status !== 'none' ? this.renderStatusIndicator() : ''}\n\t\t\t</div>\n\t\t`\n\t}\n\n\tprivate getColorAttributes() {\n\t\tconst colorMap = {\n\t\t\tprimary: {\n\t\t\t\tbgColor: SchmancyTheme.sys.color.primary.container,\n\t\t\t\tcolor: SchmancyTheme.sys.color.primary.onContainer,\n\t\t\t},\n\t\t\tsecondary: {\n\t\t\t\tbgColor: SchmancyTheme.sys.color.secondary.container,\n\t\t\t\tcolor: SchmancyTheme.sys.color.secondary.onContainer,\n\t\t\t},\n\t\t\ttertiary: {\n\t\t\t\tbgColor: SchmancyTheme.sys.color.tertiary.container,\n\t\t\t\tcolor: SchmancyTheme.sys.color.tertiary.onContainer,\n\t\t\t},\n\t\t\tsuccess: {\n\t\t\t\tbgColor: SchmancyTheme.sys.color.success.container,\n\t\t\t\tcolor: SchmancyTheme.sys.color.success.onContainer,\n\t\t\t},\n\t\t\terror: {\n\t\t\t\tbgColor: SchmancyTheme.sys.color.error.container,\n\t\t\t\tcolor: SchmancyTheme.sys.color.error.onContainer,\n\t\t\t},\n\t\t\tneutral: {\n\t\t\t\tbgColor: SchmancyTheme.sys.color.surface.container,\n\t\t\t\tcolor: SchmancyTheme.sys.color.surface.on,\n\t\t\t},\n\t\t}\n\n\t\treturn color(colorMap[this.color])\n\t}\n\n\tprivate renderStatusIndicator() {\n\t\tconst statusColors = {\n\t\t\tonline: SchmancyTheme.sys.color.success.default,\n\t\t\toffline: SchmancyTheme.sys.color.surface.onVariant,\n\t\t\tbusy: SchmancyTheme.sys.color.error.default,\n\t\t\taway: SchmancyTheme.sys.color.tertiary.default,\n\t\t}\n\n\t\tconst sizeMap = {\n\t\t\txxs: 'w-1 h-1',\n\t\t\txs: 'w-1.5 h-1.5',\n\t\t\tsm: 'w-2 h-2',\n\t\t\tmd: 'w-2.5 h-2.5',\n\t\t\tlg: 'w-3 h-3',\n\t\t\txl: 'w-4 h-4',\n\t\t}\n\n\t\tconst statusClasses = {\n\t\t\t'absolute bottom-0 right-0 rounded-full border-2 border-surface-default': true,\n\t\t\t[sizeMap[this.size]]: true,\n\t\t}\n\n\t\treturn html`\n\t\t\t<div class=\"${this.classMap(statusClasses)}\" style=\"background-color: ${statusColors[this.status]};\"></div>\n\t\t`\n\t}\n}\n\ndeclare global {\n\tinterface HTMLElementTagNameMap {\n\t\t'schmancy-avatar': SchmancyAvatar\n\t}\n}\n"],"mappings":";;;;;;AA2CO,IAAA,IAAA,cAA6B,EAAA;CAAA,YAAA,GAAA,GAAA;EAAA,MAAA,GAAA,EAAA,EAAA,KAAA,WACY,IAAA,KAAA,MACL,IAAA,KAAA,OACC,IAAA,KAAA,OACI,MAAA,KAAA,QACE,WAAA,KAAA,QACA,UAAA,KAAA,WAAA,CACA,GAAA,KAAA,SACE;;CAEnD,SAAA;EAEC,IAAI;EAEH,IADG,KAAK,MACE,CAAI,gDAAgD,KAAK,IAAA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object.defineProperty(exports,`ScBadgeV2`,{enumerable:!0,get:function(){return e.w}}),Object.defineProperty(exports,`SchmancyBadgeV2`,{enumerable:!0,get:function(){return e.T}});
1
+ Object.defineProperty(exports,Symbol.toStringTag,{value:`Module`});const e=require(`./src-BbMJeLk9.cjs`);Object.defineProperty(exports,`ScBadgeV2`,{enumerable:!0,get:function(){return e.w}}),Object.defineProperty(exports,`SchmancyBadgeV2`,{enumerable:!0,get:function(){return e.T}});
package/dist/badge.js CHANGED
@@ -1,2 +1,2 @@
1
- import { T as e, w as t } from "./src-D6e0adHi.js";
1
+ import { T as e, w as t } from "./src-DCu_mEk4.js";
2
2
  export { t as ScBadgeV2, e as SchmancyBadgeV2 };
@@ -1,8 +1,8 @@
1
- import { s as e } from "./mixins-BV0w2yIE.js";
2
- import { t } from "./decorate-23nYs4Le.js";
3
- import { d as n, f as r } from "./animation-BK-8BwY8.js";
4
- import { t as i } from "./reduced-motion-D-L12p7G.js";
5
- import { n as a } from "./theme.service-DIUo1mBP.js";
1
+ import { c as e } from "./mixins-BWb9_e1s.js";
2
+ import { a as t } from "./active-host-BP0zy_Y9.js";
3
+ import { d as n, f as r } from "./animation-DCznELuT.js";
4
+ import { t as i } from "./reduced-motion-D7LqTUMn.js";
5
+ import { n as a } from "./theme.service-BOWIT_5k.js";
6
6
  import { filter as o, finalize as s, fromEvent as c, map as l, merge as u, switchMap as d, takeUntil as f, tap as p } from "rxjs";
7
7
  import { classMap as m } from "lit/directives/class-map.js";
8
8
  import { styleMap as h } from "lit/directives/style-map.js";
@@ -1 +1 @@
1
- {"version":3,"file":"boat-CZma2ojF.js","names":[],"sources":["../src/boat/boat.ts"],"sourcesContent":["import { SchmancyElement } from '@mixins/index'\nimport { css, html } 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 { when } from 'lit/directives/when.js'\nimport { filter, finalize, fromEvent, map, merge, switchMap, takeUntil, tap } from 'rxjs'\nimport { SPRING_SMOOTH, SPRING_SNAPPY } from '../utils/animation.js'\nimport { reducedMotion$ } from '../directives/reduced-motion'\nimport { theme } from '../theme/theme.service.js'\n\nconst FAB_HEIGHT = 44\nconst DRAG_THRESHOLD = 5\nconst POSITION_STORAGE_KEY_PREFIX = 'schmancy-boat-'\n\ntype Corner = 'bottom-right' | 'bottom-left' | 'top-right' | 'top-left'\ntype BoatState = 'collapsed' | 'expanded'\ninterface Position {\n\tx: number\n\ty: number\n}\n\n@customElement('schmancy-boat')\nexport default class SchmancyBoat extends SchmancyElement {\n\tstatic styles = [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\n\t@property({ type: String }) id: string = 'default'\n\t@property({ type: String }) icon?: string\n\t@property({ type: String }) label?: string\n\t/** Override the expanded panel width (e.g. '320px', '24rem'). Defaults to responsive sizing. */\n\t@property({ type: String }) expandedWidth?: string\n\t/** When true, uses a lower elevation shadow in the minimized (FAB) state. */\n\t@property({ type: Boolean, reflect: true }) lowered: boolean = false\n\t/** Corner the boat is anchored to. */\n\t@property({ type: String }) corner: Corner = 'bottom-right'\n\t/** Whether the panel is open. */\n\t@property({ type: Boolean, reflect: true }) open: boolean = false\n\n\t/**\n\t * State property.\n\t * Maps 'expanded' → open=true, 'collapsed' → open=false (FAB visible).\n\t */\n\tget state(): BoatState {\n\t\treturn this.open ? 'expanded' : 'collapsed'\n\t}\n\tset state(val: BoatState) {\n\t\tif (val === 'expanded') {\n\t\t\tthis.expand()\n\t\t} else {\n\t\t\t// collapsed\n\t\t\tthis.close()\n\t\t}\n\t}\n\n\t// Internal drag state (triggers re-render for cursor class)\n\t@state() private isDragging = false\n\n\t// Internal position — plain fields, updated directly during drag (no re-render needed)\n\tprivate _position: Position = { x: 16, y: 16 }\n\t@state() private _currentCorner: Corner = 'bottom-right'\n\n\t// Refs\n\tprivate _containerRef = createRef<HTMLElement>()\n\tprivate _contentRef = createRef<HTMLElement>()\n\tprivate _headerRef = createRef<HTMLElement>()\n\tprivate _currentAnimation?: Animation\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% - ${FAB_HEIGHT}px) 0px 0px 0px round 22px)`\n\t\t\t: `inset(0px 0px calc(100% - ${FAB_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(): 0 | 1 | 2 | 3 | 4 | 5 {\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\tcontainer.style.removeProperty('left')\n\t\tcontainer.style.removeProperty('right')\n\t\tcontainer.style.removeProperty('top')\n\t\tcontainer.style.removeProperty('bottom')\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 _loadPosition() {\n\t\ttry {\n\t\t\tconst saved = localStorage.getItem(POSITION_STORAGE_KEY_PREFIX + this.id)\n\t\t\tif (saved) {\n\t\t\t\tconst parsed = JSON.parse(saved) as { x: number; y: number; anchor: Corner }\n\t\t\t\tthis._position = { x: parsed.x, y: parsed.y }\n\t\t\t\tthis._currentCorner = parsed.anchor\n\t\t\t}\n\t\t} catch {\n\t\t\t// ignore localStorage errors\n\t\t}\n\t}\n\n\tprivate _savePosition() {\n\t\ttry {\n\t\t\tlocalStorage.setItem(\n\t\t\t\tPOSITION_STORAGE_KEY_PREFIX + this.id,\n\t\t\t\tJSON.stringify({ ...this._position, anchor: this._currentCorner }),\n\t\t\t)\n\t\t} catch {\n\t\t\t// ignore localStorage errors\n\t\t}\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\n\t// ============================================\n\t// CORNER SNAPPING\n\t// ============================================\n\n\tprivate _reorientToNearestCorner(skipAnimation = false): void {\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 FAB visual center (container is always collapsed during drag)\n\t\tconst currentIsBottom = this._currentCorner.includes('bottom')\n\t\tconst fabCenterX = rect.left + rect.width / 2\n\t\tconst fabCenterY = currentIsBottom\n\t\t\t? rect.bottom - FAB_HEIGHT / 2\n\t\t\t: rect.top + FAB_HEIGHT / 2\n\t\tconst side = fabCenterX > window.innerWidth / 2 ? 'right' : 'left'\n\t\tconst vert = fabCenterY > window.innerHeight / 2 ? 'bottom' : 'top'\n\t\tconst newCorner: Corner = `${vert}-${side}` as Corner\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 — managed imperatively, not via styleMap\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\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.transform = `translate(${dx}px, ${dy}px)`\n\n\t\t// P — play: animate from the inverse offset to natural resting position\n\t\tthis._currentAnimation?.cancel()\n\t\tconst anim = container.animate(\n\t\t\t[{ transform: container.style.transform }, { transform: 'translate(0,0)' }],\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\tthis._currentAnimation = anim\n\t\tanim.finished.then(() => {\n\t\t\tif (container.isConnected) {\n\t\t\t\tcontainer.style.transform = ''\n\t\t\t}\n\t\t\treturn\n\t\t})\n\n\t\tthis._savePosition()\n\t}\n\n\t// ============================================\n\t// DRAG PIPELINE\n\t// ============================================\n\n\tprivate _setupDrag() {\n\t\tconst header = this._headerRef.value\n\t\tconst container = this._containerRef.value\n\t\tif (!header || !container) return\n\n\t\tlet didDrag = false\n\n\t\tfromEvent<PointerEvent>(header, 'pointerdown')\n\t\t\t.pipe(\n\t\t\t\tfilter(e => e.button === 0),\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\theader.setPointerCapture(e.pointerId)\n\t\t\t\t}),\n\t\t\t\tmap(e => {\n\t\t\t\t\tconst rect = container.getBoundingClientRect()\n\t\t\t\t\tconst isBottom = this._currentCorner.includes('bottom')\n\t\t\t\t\tconst wasOpen = this.open\n\t\t\t\t\tdidDrag = false\n\t\t\t\t\treturn {\n\t\t\t\t\t\tpointerId: e.pointerId,\n\t\t\t\t\t\tstartX: e.clientX,\n\t\t\t\t\t\tstartY: e.clientY,\n\t\t\t\t\t\toffsetX: e.clientX - rect.left,\n\t\t\t\t\t\toffsetY: e.clientY - rect.top,\n\t\t\t\t\t\trect,\n\t\t\t\t\t\tisBottom,\n\t\t\t\t\t\twasOpen,\n\t\t\t\t\t}\n\t\t\t\t}),\n\t\t\t\tswitchMap(({ pointerId, startX, startY, offsetX, offsetY, rect, isBottom, wasOpen }) => {\n\t\t\t\t\tconst sameId = (e: PointerEvent) => e.pointerId === pointerId\n\t\t\t\t\tconst move$ = fromEvent<PointerEvent>(window, 'pointermove').pipe(filter(sameId))\n\t\t\t\t\tconst end$ = merge(\n\t\t\t\t\t\tfromEvent<PointerEvent>(window, 'pointerup'),\n\t\t\t\t\t\tfromEvent<PointerEvent>(window, 'pointercancel'),\n\t\t\t\t\t).pipe(filter(sameId))\n\n\t\t\t\t\treturn move$.pipe(\n\t\t\t\t\t\ttap(({ clientX, clientY }) => {\n\t\t\t\t\t\t\tconst dx = clientX - startX\n\t\t\t\t\t\t\tconst dy = clientY - startY\n\t\t\t\t\t\t\tif (Math.sqrt(dx * dx + dy * dy) > DRAG_THRESHOLD && !didDrag) {\n\t\t\t\t\t\t\t\tdidDrag = true\n\t\t\t\t\t\t\t\tthis.isDragging = true\n\t\t\t\t\t\t\t\t// Collapse on first confirmed drag move (not on click)\n\t\t\t\t\t\t\t\tif (wasOpen) {\n\t\t\t\t\t\t\t\t\tthis._currentAnimation?.cancel()\n\t\t\t\t\t\t\t\t\tthis.open = false\n\t\t\t\t\t\t\t\t\tcontainer.style.clipPath = this.closedClipPath\n\t\t\t\t\t\t\t\t\tcontainer.style.overflow = 'hidden'\n\t\t\t\t\t\t\t\t\tconst content = this._contentRef.value\n\t\t\t\t\t\t\t\t\tif (content) {\n\t\t\t\t\t\t\t\t\t\tcontent.inert = true\n\t\t\t\t\t\t\t\t\t\tcontent.style.visibility = 'hidden'\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}\n\t\t\t\t\t\t\tif (!didDrag) return\n\n\t\t\t\t\t\t\tconst vw = window.innerWidth\n\t\t\t\t\t\t\tconst vh = window.innerHeight\n\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// Allow container to go partially off-screen so FAB stays reachable at all edges\n\t\t\t\t\t\t\tconst minTop = isBottom ? FAB_HEIGHT - rect.height : 0\n\t\t\t\t\t\t\tconst maxTop = isBottom ? vh - rect.height : vh - FAB_HEIGHT\n\t\t\t\t\t\t\tconst top = Math.max(minTop, Math.min(clientY - offsetY, maxTop))\n\n\t\t\t\t\t\t\tthis._position = {\n\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\ty: isBottom ? vh - top - rect.height : top,\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\tthis._applyContainerPosition()\n\t\t\t\t\t\t}),\n\t\t\t\t\t\ttakeUntil(end$),\n\t\t\t\t\t\tfinalize(() => {\n\t\t\t\t\t\t\tif (didDrag) {\n\t\t\t\t\t\t\t\tthis._reorientToNearestCorner()\n\t\t\t\t\t\t\t\tthis.isDragging = false\n\t\t\t\t\t\t\t\tdidDrag = false\n\t\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\t\tthis.isDragging = false\n\t\t\t\t\t\t\t\tdidDrag = false\n\t\t\t\t\t\t\t\tthis.toggle()\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\ttakeUntil(this.disconnecting),\n\t\t\t)\n\t\t\t.subscribe()\n\t}\n\n\t// ============================================\n\t// LIFECYCLE\n\t// ============================================\n\n\tconnectedCallback() {\n\t\tsuper.connectedCallback()\n\n\t\tfromEvent(window, 'resize')\n\t\t\t.pipe(takeUntil(this.disconnecting))\n\t\t\t.subscribe(() => this._validateBounds())\n\n\t\ttheme.bottomOffset$.pipe(\n\t\t\ttap(() => this._applyContainerPosition()),\n\t\t\ttakeUntil(this.disconnecting),\n\t\t).subscribe()\n\t}\n\n\tfirstUpdated() {\n\t\t// Initialize corner from property\n\t\tthis._currentCorner = this.corner\n\n\t\t// Load saved drag position from localStorage\n\t\tthis._loadPosition()\n\n\t\tconst container = this._containerRef.value\n\t\tconst content = this._contentRef.value\n\t\tif (!container) return\n\n\t\t// Apply initial position\n\t\tthis._applyContainerPosition()\n\n\t\t// Set initial open/closed visual state\n\t\tif (this.open) {\n\t\t\tcontainer.style.overflow = ''\n\t\t\tif (content) {\n\t\t\t\tcontent.inert = false\n\t\t\t\tcontent.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 (content) {\n\t\t\t\tcontent.inert = true\n\t\t\t\tcontent.style.visibility = 'hidden'\n\t\t\t}\n\t\t}\n\n\t\t// Set up drag\n\t\tthis._setupDrag()\n\t}\n\n\tdisconnectedCallback() {\n\t\tsuper.disconnectedCallback()\n\t\tthis._currentAnimation?.cancel()\n\t}\n\n\t// ============================================\n\t// ANIMATION\n\t// ============================================\n\n\tprivate async _animateOpen(): Promise<void> {\n\t\tconst container = this._containerRef.value\n\t\tconst content = this._contentRef.value\n\t\tif (!container) return\n\n\t\tif (content) {\n\t\t\tcontent.style.visibility = 'visible'\n\t\t\tcontent.inert = false\n\t\t}\n\n\t\tthis.open = true\n\t\tawait this.updateComplete\n\n\t\tif (reducedMotion$.value) {\n\t\t\tcontainer.style.clipPath = ''\n\t\t\tcontainer.style.overflow = ''\n\t\t\tthis.dispatchScopedEvent('toggle', 'expanded')\n\t\t\treturn\n\t\t}\n\n\t\tthis._currentAnimation?.cancel()\n\t\tcontainer.style.overflow = 'hidden'\n\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_SMOOTH.duration,\n\t\t\teasing: SPRING_SMOOTH.easingFallback,\n\t\t\tfill: 'forwards',\n\t\t})\n\t\tthis._currentAnimation = anim\n\n\t\t// Clear clip-path so overflow/scroll work normally after animation\n\t\tanim.finished.then(() => {\n\t\t\tif (container.isConnected) {\n\t\t\t\tcontainer.style.clipPath = ''\n\t\t\t\tcontainer.style.overflow = ''\n\t\t\t}\n\t\t\treturn\n\t\t})\n\n\t\tthis.dispatchScopedEvent('toggle', 'expanded')\n\t}\n\n\tprivate async _animateClose(): Promise<void> {\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 content = this._contentRef.value\n\t\t\tif (content) {\n\t\t\t\tcontent.inert = true\n\t\t\t\tcontent.style.visibility = 'hidden'\n\t\t\t}\n\t\t\tthis.dispatchScopedEvent('toggle', 'collapsed')\n\t\t\treturn\n\t\t}\n\n\t\tthis._currentAnimation?.cancel()\n\t\tcontainer.style.overflow = 'hidden'\n\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.9),\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\tawait anim.finished\n\n\t\tthis.open = false\n\n\t\tconst content = this._contentRef.value\n\t\tif (content) {\n\t\t\tcontent.inert = true\n\t\t\tcontent.style.visibility = 'hidden'\n\t\t}\n\n\t\tthis.dispatchScopedEvent('toggle', 'collapsed')\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.removeAttribute('hidden')\n\t\tif (!this._containerRef.value) {\n\t\t\tthis.open = true\n\t\t\treturn\n\t\t}\n\t\tthis._animateOpen()\n\t}\n\n\t/** Alias for expand() — kept for backwards compatibility. */\n\tshow() {\n\t\tthis.expand()\n\t}\n\n\tclose() {\n\t\tif (!this.open) return\n\t\tif (!this._containerRef.value) {\n\t\t\tthis.open = false\n\t\t\treturn\n\t\t}\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\tflex: true,\n\t\t\t'flex-col': isBottom,\n\t\t\t'flex-col-reverse': !isBottom,\n\t\t\t'will-change-[clip-path]': true,\n\t\t\t'z-1000': true,\n\t\t\t'ring-1': true,\n\t\t\t'ring-primary-default/15': this.open,\n\t\t\t'rounded-2xl': this.open,\n\t\t\t'ring-outline-variant/40': !this.open,\n\t\t\t'rounded-[22px]': !this.open,\n\t\t\t'overflow-hidden': true,\n\t\t\t'opacity-95': this.isDragging,\n\t\t})\n\n\t\tconst containerStyles = styleMap({\n\t\t\tposition: 'fixed',\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 contentStyles = styleMap({\n\t\t\t'pointer-events': this.open ? 'auto' : 'none',\n\t\t})\n\n\t\tconst headerClasses = 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'touch-none': true,\n\t\t\t'cursor-grabbing': this.isDragging,\n\t\t\t'cursor-move': !this.isDragging,\n\t\t\t'transition-opacity': true,\n\t\t\t'duration-200': true,\n\t\t})\n\n\t\treturn html`\n\t\t\t<!-- schmancy-surface owns background color and elevation-based shadow.\n\t\t\t Position is managed imperatively via _applyContainerPosition(). -->\n\t\t\t<schmancy-surface\n\t\t\t\t${ref(this._containerRef)}\n\t\t\t\ttype=\"glass\"\n\t\t\t\t.elevation=${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>\n\t\t\t\t<!-- Content section (visually above header for bottom corners) -->\n\t\t\t\t<section\n\t\t\t\t\t${ref(this._contentRef)}\n\t\t\t\t\tclass=\"flex-1 min-h-0 overflow-hidden flex flex-col\"\n\t\t\t\t\tstyle=${contentStyles}\n\t\t\t\t\trole=\"dialog\"\n\t\t\t\t\taria-label=\"${this.label ?? 'Floating panel'}\"\n\t\t\t\t>\n\t\t\t\t\t<schmancy-surface type=\"solid\" class=\"flex flex-col flex-1 min-h-0 overflow-hidden\">\n\t\t\t\t\t\t<schmancy-scroll hide class=\"flex-1\">\n\t\t\t\t\t\t\t<slot></slot>\n\t\t\t\t\t\t</schmancy-scroll>\n\t\t\t\t\t</schmancy-surface>\n\t\t\t\t</section>\n\n\t\t\t\t<!-- Gradient separator between header and content — only when open -->\n\t\t\t\t${when(\n\t\t\t\t\tthis.open,\n\t\t\t\t\t() =>\n\t\t\t\t\t\thtml`<div\n\t\t\t\t\t\t\tclass=\"h-px shrink-0 bg-linear-to-r from-transparent via-primary-default/30 to-transparent\"\n\t\t\t\t\t\t></div>`,\n\t\t\t\t)}\n\n\t\t\t\t<!-- Header / FAB section — always interactive, always visible -->\n\t\t\t\t<section\n\t\t\t\t\tclass=\"shrink-0 bg-surface-containerLowest\"\n\t\t\t\t\tstyle=${styleMap({ 'pointer-events': 'auto', height: `${FAB_HEIGHT}px` })}\n\t\t\t\t>\n\t\t\t\t\t<div\n\t\t\t\t\t\t${ref(this._headerRef)}\n\t\t\t\t\t\tclass=${headerClasses}\n\t\t\t\t\t\ttitle=\"Drag to move\"\n\t\t\t\t\t\taria-label=\"Drag to reposition panel\"\n\t\t\t\t\t>\n\t\t\t\t\t\t<!-- Summary slot rendered once — avoids DOM teardown on toggle -->\n\t\t\t\t\t\t<div class=\"flex-1 min-w-0\">\n\t\t\t\t\t\t\t<slot name=\"summary\"></slot>\n\t\t\t\t\t\t</div>\n\n\t\t\t\t\t\t<!-- Toggle button: collapse when open, expand when closed -->\n\t\t\t\t\t\t${when(\n\t\t\t\t\t\t\tthis.open,\n\t\t\t\t\t\t\t() => html`\n\t\t\t\t\t\t\t\t<schmancy-icon-button\n\t\t\t\t\t\t\t\t\tsize=\"sm\"\n\t\t\t\t\t\t\t\t\tvariant=\"text\"\n\t\t\t\t\t\t\t\t\t@click=${(e: Event) => {\n\t\t\t\t\t\t\t\t\t\te.stopPropagation()\n\t\t\t\t\t\t\t\t\t\tthis.close()\n\t\t\t\t\t\t\t\t\t}}\n\t\t\t\t\t\t\t\t\ttitle=\"Collapse\"\n\t\t\t\t\t\t\t\t>\n\t\t\t\t\t\t\t\t\tclose_fullscreen\n\t\t\t\t\t\t\t\t</schmancy-icon-button>\n\t\t\t\t\t\t\t`,\n\t\t\t\t\t\t\t() => html`\n\t\t\t\t\t\t\t\t<schmancy-icon-button\n\t\t\t\t\t\t\t\t\tsize=\"sm\"\n\t\t\t\t\t\t\t\t\tvariant=\"text\"\n\t\t\t\t\t\t\t\t\t@click=${(e: Event) => {\n\t\t\t\t\t\t\t\t\t\te.stopPropagation()\n\t\t\t\t\t\t\t\t\t\tthis.expand()\n\t\t\t\t\t\t\t\t\t}}\n\t\t\t\t\t\t\t\t\ttitle=\"Expand\"\n\t\t\t\t\t\t\t\t>\n\t\t\t\t\t\t\t\t\tfullscreen\n\t\t\t\t\t\t\t\t</schmancy-icon-button>\n\t\t\t\t\t\t\t`,\n\t\t\t\t\t\t)}\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-boat': SchmancyBoat\n\t}\n}\n"],"mappings":";;;;;;;;;;;;AAYA,IAAM,IAAa,IAEb,IAA8B,kBAUrB,IAAA,cAA2B,EAAA;CAAA,YAAA,GAAA,GAAA;AAAA,QAAA,GAAA,EAAA,EAAA,KAAA,KAYA,WAAA,KAAA,UAAA,CAMsB,GAAA,KAAA,SAElB,gBAAA,KAAA,OAAA,CAEe,GAAA,KAAA,aAAA,CAmB9B,GAAA,KAAA,YAGA;GAAE,GAAG;GAAI,GAAG;GAAA,EAAA,KAAA,iBACA,gBAAA,KAAA,gBAGlB,GAAA,EAAA,KAAA,cACF,GAAA,EAAA,KAAA,aACD,GAAA;;CAAA;AAAA,OAAA,SAjDL,CAAC,CAAG;;;;;;;;;;;CA2BpB,IAAA,QAAI;AACH,SAAO,KAAK,OAAO,aAAa;;CAEjC,IAAA,MAAU,GAAA;AACG,EAAR,MAAQ,aACX,KAAK,QAAA,GAGL,KAAK,OAAA;;CAqBP,IAAA,aAAY;AACX,SAAO,KAAK,iBAAiB;;CAG9B,IAAA,iBAAY;AACX,SAAO,KAAK,eAAe,WAAW,SAAA;;CAGvC,IAAA,iBAAY;AACX,SAAO,KAAK,iBACT,oDACA;;CAGJ,IAAA,eAAY;AACX,SAAO;;CAGR,IAAA,YAAY;AACX,SAAI,KAAK,OAAa,IACf,KAAK,UAAU,IAAI;;CAO3B,0BAAA;EACC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AAA,KAAA,EAAA,EAAA,EAAA,CAE1B,EAAS;CAAE,MAAM;CAAS,SAAA,CAAS;CAAA,CAAA,CAAA,EAAO,EAAA,WAAA,QAAA,KAAA,EAAA,EAAA,EAAA,CAmB1C,GAAA,CAAA,EAAO,EAAA,WAAA,cAAA,KAAA,EAAA,EAAA,EAAA,CAIP,GAAA,CAAA,EAAO,EAAA,WAAA,kBAAA,KAAA,EAAA;AAAA,IAAA,IAAA,IAAA,EAAA,CA9CR,EAAc,gBAAA,CAAA,EAAgB,EAAA;AAAA,SAAA,KAAA"}
1
+ {"version":3,"file":"boat-Bj0wVcZi.js","names":[],"sources":["../src/boat/boat.ts"],"sourcesContent":["import { SchmancyElement } from '@mixins/index'\nimport { css, html } 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 { when } from 'lit/directives/when.js'\nimport { filter, finalize, fromEvent, map, merge, switchMap, takeUntil, tap } from 'rxjs'\nimport { SPRING_SMOOTH, SPRING_SNAPPY } from '../utils/animation.js'\nimport { reducedMotion$ } from '../directives/reduced-motion'\nimport { theme } from '../theme/theme.service.js'\n\nconst FAB_HEIGHT = 44\nconst DRAG_THRESHOLD = 5\nconst POSITION_STORAGE_KEY_PREFIX = 'schmancy-boat-'\n\ntype Corner = 'bottom-right' | 'bottom-left' | 'top-right' | 'top-left'\ntype BoatState = 'collapsed' | 'expanded'\ninterface Position {\n\tx: number\n\ty: number\n}\n\n@customElement('schmancy-boat')\nexport default class SchmancyBoat extends SchmancyElement {\n\tstatic styles = [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\n\t@property({ type: String }) id: string = 'default'\n\t@property({ type: String }) icon?: string\n\t@property({ type: String }) label?: string\n\t/** Override the expanded panel width (e.g. '320px', '24rem'). Defaults to responsive sizing. */\n\t@property({ type: String }) expandedWidth?: string\n\t/** When true, uses a lower elevation shadow in the minimized (FAB) state. */\n\t@property({ type: Boolean, reflect: true }) lowered: boolean = false\n\t/** Corner the boat is anchored to. */\n\t@property({ type: String }) corner: Corner = 'bottom-right'\n\t/** Whether the panel is open. */\n\t@property({ type: Boolean, reflect: true }) open: boolean = false\n\n\t/**\n\t * State property.\n\t * Maps 'expanded' → open=true, 'collapsed' → open=false (FAB visible).\n\t */\n\tget state(): BoatState {\n\t\treturn this.open ? 'expanded' : 'collapsed'\n\t}\n\tset state(val: BoatState) {\n\t\tif (val === 'expanded') {\n\t\t\tthis.expand()\n\t\t} else {\n\t\t\t// collapsed\n\t\t\tthis.close()\n\t\t}\n\t}\n\n\t// Internal drag state (triggers re-render for cursor class)\n\t@state() private isDragging = false\n\n\t// Internal position — plain fields, updated directly during drag (no re-render needed)\n\tprivate _position: Position = { x: 16, y: 16 }\n\t@state() private _currentCorner: Corner = 'bottom-right'\n\n\t// Refs\n\tprivate _containerRef = createRef<HTMLElement>()\n\tprivate _contentRef = createRef<HTMLElement>()\n\tprivate _headerRef = createRef<HTMLElement>()\n\tprivate _currentAnimation?: Animation\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% - ${FAB_HEIGHT}px) 0px 0px 0px round 22px)`\n\t\t\t: `inset(0px 0px calc(100% - ${FAB_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(): 0 | 1 | 2 | 3 | 4 | 5 {\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\tcontainer.style.removeProperty('left')\n\t\tcontainer.style.removeProperty('right')\n\t\tcontainer.style.removeProperty('top')\n\t\tcontainer.style.removeProperty('bottom')\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 _loadPosition() {\n\t\ttry {\n\t\t\tconst saved = localStorage.getItem(POSITION_STORAGE_KEY_PREFIX + this.id)\n\t\t\tif (saved) {\n\t\t\t\tconst parsed = JSON.parse(saved) as { x: number; y: number; anchor: Corner }\n\t\t\t\tthis._position = { x: parsed.x, y: parsed.y }\n\t\t\t\tthis._currentCorner = parsed.anchor\n\t\t\t}\n\t\t} catch {\n\t\t\t// ignore localStorage errors\n\t\t}\n\t}\n\n\tprivate _savePosition() {\n\t\ttry {\n\t\t\tlocalStorage.setItem(\n\t\t\t\tPOSITION_STORAGE_KEY_PREFIX + this.id,\n\t\t\t\tJSON.stringify({ ...this._position, anchor: this._currentCorner }),\n\t\t\t)\n\t\t} catch {\n\t\t\t// ignore localStorage errors\n\t\t}\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\n\t// ============================================\n\t// CORNER SNAPPING\n\t// ============================================\n\n\tprivate _reorientToNearestCorner(skipAnimation = false): void {\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 FAB visual center (container is always collapsed during drag)\n\t\tconst currentIsBottom = this._currentCorner.includes('bottom')\n\t\tconst fabCenterX = rect.left + rect.width / 2\n\t\tconst fabCenterY = currentIsBottom\n\t\t\t? rect.bottom - FAB_HEIGHT / 2\n\t\t\t: rect.top + FAB_HEIGHT / 2\n\t\tconst side = fabCenterX > window.innerWidth / 2 ? 'right' : 'left'\n\t\tconst vert = fabCenterY > window.innerHeight / 2 ? 'bottom' : 'top'\n\t\tconst newCorner: Corner = `${vert}-${side}` as Corner\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 — managed imperatively, not via styleMap\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\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.transform = `translate(${dx}px, ${dy}px)`\n\n\t\t// P — play: animate from the inverse offset to natural resting position\n\t\tthis._currentAnimation?.cancel()\n\t\tconst anim = container.animate(\n\t\t\t[{ transform: container.style.transform }, { transform: 'translate(0,0)' }],\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\tthis._currentAnimation = anim\n\t\tanim.finished.then(() => {\n\t\t\tif (container.isConnected) {\n\t\t\t\tcontainer.style.transform = ''\n\t\t\t}\n\t\t\treturn\n\t\t})\n\n\t\tthis._savePosition()\n\t}\n\n\t// ============================================\n\t// DRAG PIPELINE\n\t// ============================================\n\n\tprivate _setupDrag() {\n\t\tconst header = this._headerRef.value\n\t\tconst container = this._containerRef.value\n\t\tif (!header || !container) return\n\n\t\tlet didDrag = false\n\n\t\tfromEvent<PointerEvent>(header, 'pointerdown')\n\t\t\t.pipe(\n\t\t\t\tfilter(e => e.button === 0),\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\theader.setPointerCapture(e.pointerId)\n\t\t\t\t}),\n\t\t\t\tmap(e => {\n\t\t\t\t\tconst rect = container.getBoundingClientRect()\n\t\t\t\t\tconst isBottom = this._currentCorner.includes('bottom')\n\t\t\t\t\tconst wasOpen = this.open\n\t\t\t\t\tdidDrag = false\n\t\t\t\t\treturn {\n\t\t\t\t\t\tpointerId: e.pointerId,\n\t\t\t\t\t\tstartX: e.clientX,\n\t\t\t\t\t\tstartY: e.clientY,\n\t\t\t\t\t\toffsetX: e.clientX - rect.left,\n\t\t\t\t\t\toffsetY: e.clientY - rect.top,\n\t\t\t\t\t\trect,\n\t\t\t\t\t\tisBottom,\n\t\t\t\t\t\twasOpen,\n\t\t\t\t\t}\n\t\t\t\t}),\n\t\t\t\tswitchMap(({ pointerId, startX, startY, offsetX, offsetY, rect, isBottom, wasOpen }) => {\n\t\t\t\t\tconst sameId = (e: PointerEvent) => e.pointerId === pointerId\n\t\t\t\t\tconst move$ = fromEvent<PointerEvent>(window, 'pointermove').pipe(filter(sameId))\n\t\t\t\t\tconst end$ = merge(\n\t\t\t\t\t\tfromEvent<PointerEvent>(window, 'pointerup'),\n\t\t\t\t\t\tfromEvent<PointerEvent>(window, 'pointercancel'),\n\t\t\t\t\t).pipe(filter(sameId))\n\n\t\t\t\t\treturn move$.pipe(\n\t\t\t\t\t\ttap(({ clientX, clientY }) => {\n\t\t\t\t\t\t\tconst dx = clientX - startX\n\t\t\t\t\t\t\tconst dy = clientY - startY\n\t\t\t\t\t\t\tif (Math.sqrt(dx * dx + dy * dy) > DRAG_THRESHOLD && !didDrag) {\n\t\t\t\t\t\t\t\tdidDrag = true\n\t\t\t\t\t\t\t\tthis.isDragging = true\n\t\t\t\t\t\t\t\t// Collapse on first confirmed drag move (not on click)\n\t\t\t\t\t\t\t\tif (wasOpen) {\n\t\t\t\t\t\t\t\t\tthis._currentAnimation?.cancel()\n\t\t\t\t\t\t\t\t\tthis.open = false\n\t\t\t\t\t\t\t\t\tcontainer.style.clipPath = this.closedClipPath\n\t\t\t\t\t\t\t\t\tcontainer.style.overflow = 'hidden'\n\t\t\t\t\t\t\t\t\tconst content = this._contentRef.value\n\t\t\t\t\t\t\t\t\tif (content) {\n\t\t\t\t\t\t\t\t\t\tcontent.inert = true\n\t\t\t\t\t\t\t\t\t\tcontent.style.visibility = 'hidden'\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}\n\t\t\t\t\t\t\tif (!didDrag) return\n\n\t\t\t\t\t\t\tconst vw = window.innerWidth\n\t\t\t\t\t\t\tconst vh = window.innerHeight\n\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// Allow container to go partially off-screen so FAB stays reachable at all edges\n\t\t\t\t\t\t\tconst minTop = isBottom ? FAB_HEIGHT - rect.height : 0\n\t\t\t\t\t\t\tconst maxTop = isBottom ? vh - rect.height : vh - FAB_HEIGHT\n\t\t\t\t\t\t\tconst top = Math.max(minTop, Math.min(clientY - offsetY, maxTop))\n\n\t\t\t\t\t\t\tthis._position = {\n\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\ty: isBottom ? vh - top - rect.height : top,\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\tthis._applyContainerPosition()\n\t\t\t\t\t\t}),\n\t\t\t\t\t\ttakeUntil(end$),\n\t\t\t\t\t\tfinalize(() => {\n\t\t\t\t\t\t\tif (didDrag) {\n\t\t\t\t\t\t\t\tthis._reorientToNearestCorner()\n\t\t\t\t\t\t\t\tthis.isDragging = false\n\t\t\t\t\t\t\t\tdidDrag = false\n\t\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\t\tthis.isDragging = false\n\t\t\t\t\t\t\t\tdidDrag = false\n\t\t\t\t\t\t\t\tthis.toggle()\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\ttakeUntil(this.disconnecting),\n\t\t\t)\n\t\t\t.subscribe()\n\t}\n\n\t// ============================================\n\t// LIFECYCLE\n\t// ============================================\n\n\tconnectedCallback() {\n\t\tsuper.connectedCallback()\n\n\t\tfromEvent(window, 'resize')\n\t\t\t.pipe(takeUntil(this.disconnecting))\n\t\t\t.subscribe(() => this._validateBounds())\n\n\t\ttheme.bottomOffset$.pipe(\n\t\t\ttap(() => this._applyContainerPosition()),\n\t\t\ttakeUntil(this.disconnecting),\n\t\t).subscribe()\n\t}\n\n\tfirstUpdated() {\n\t\t// Initialize corner from property\n\t\tthis._currentCorner = this.corner\n\n\t\t// Load saved drag position from localStorage\n\t\tthis._loadPosition()\n\n\t\tconst container = this._containerRef.value\n\t\tconst content = this._contentRef.value\n\t\tif (!container) return\n\n\t\t// Apply initial position\n\t\tthis._applyContainerPosition()\n\n\t\t// Set initial open/closed visual state\n\t\tif (this.open) {\n\t\t\tcontainer.style.overflow = ''\n\t\t\tif (content) {\n\t\t\t\tcontent.inert = false\n\t\t\t\tcontent.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 (content) {\n\t\t\t\tcontent.inert = true\n\t\t\t\tcontent.style.visibility = 'hidden'\n\t\t\t}\n\t\t}\n\n\t\t// Set up drag\n\t\tthis._setupDrag()\n\t}\n\n\tdisconnectedCallback() {\n\t\tsuper.disconnectedCallback()\n\t\tthis._currentAnimation?.cancel()\n\t}\n\n\t// ============================================\n\t// ANIMATION\n\t// ============================================\n\n\tprivate async _animateOpen(): Promise<void> {\n\t\tconst container = this._containerRef.value\n\t\tconst content = this._contentRef.value\n\t\tif (!container) return\n\n\t\tif (content) {\n\t\t\tcontent.style.visibility = 'visible'\n\t\t\tcontent.inert = false\n\t\t}\n\n\t\tthis.open = true\n\t\tawait this.updateComplete\n\n\t\tif (reducedMotion$.value) {\n\t\t\tcontainer.style.clipPath = ''\n\t\t\tcontainer.style.overflow = ''\n\t\t\tthis.dispatchScopedEvent('toggle', 'expanded')\n\t\t\treturn\n\t\t}\n\n\t\tthis._currentAnimation?.cancel()\n\t\tcontainer.style.overflow = 'hidden'\n\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_SMOOTH.duration,\n\t\t\teasing: SPRING_SMOOTH.easingFallback,\n\t\t\tfill: 'forwards',\n\t\t})\n\t\tthis._currentAnimation = anim\n\n\t\t// Clear clip-path so overflow/scroll work normally after animation\n\t\tanim.finished.then(() => {\n\t\t\tif (container.isConnected) {\n\t\t\t\tcontainer.style.clipPath = ''\n\t\t\t\tcontainer.style.overflow = ''\n\t\t\t}\n\t\t\treturn\n\t\t})\n\n\t\tthis.dispatchScopedEvent('toggle', 'expanded')\n\t}\n\n\tprivate async _animateClose(): Promise<void> {\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 content = this._contentRef.value\n\t\t\tif (content) {\n\t\t\t\tcontent.inert = true\n\t\t\t\tcontent.style.visibility = 'hidden'\n\t\t\t}\n\t\t\tthis.dispatchScopedEvent('toggle', 'collapsed')\n\t\t\treturn\n\t\t}\n\n\t\tthis._currentAnimation?.cancel()\n\t\tcontainer.style.overflow = 'hidden'\n\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.9),\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\tawait anim.finished\n\n\t\tthis.open = false\n\n\t\tconst content = this._contentRef.value\n\t\tif (content) {\n\t\t\tcontent.inert = true\n\t\t\tcontent.style.visibility = 'hidden'\n\t\t}\n\n\t\tthis.dispatchScopedEvent('toggle', 'collapsed')\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.removeAttribute('hidden')\n\t\tif (!this._containerRef.value) {\n\t\t\tthis.open = true\n\t\t\treturn\n\t\t}\n\t\tthis._animateOpen()\n\t}\n\n\t/** Alias for expand() — kept for backwards compatibility. */\n\tshow() {\n\t\tthis.expand()\n\t}\n\n\tclose() {\n\t\tif (!this.open) return\n\t\tif (!this._containerRef.value) {\n\t\t\tthis.open = false\n\t\t\treturn\n\t\t}\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\tflex: true,\n\t\t\t'flex-col': isBottom,\n\t\t\t'flex-col-reverse': !isBottom,\n\t\t\t'will-change-[clip-path]': true,\n\t\t\t'z-1000': true,\n\t\t\t'ring-1': true,\n\t\t\t'ring-primary-default/15': this.open,\n\t\t\t'rounded-2xl': this.open,\n\t\t\t'ring-outline-variant/40': !this.open,\n\t\t\t'rounded-[22px]': !this.open,\n\t\t\t'overflow-hidden': true,\n\t\t\t'opacity-95': this.isDragging,\n\t\t})\n\n\t\tconst containerStyles = styleMap({\n\t\t\tposition: 'fixed',\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 contentStyles = styleMap({\n\t\t\t'pointer-events': this.open ? 'auto' : 'none',\n\t\t})\n\n\t\tconst headerClasses = 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'touch-none': true,\n\t\t\t'cursor-grabbing': this.isDragging,\n\t\t\t'cursor-move': !this.isDragging,\n\t\t\t'transition-opacity': true,\n\t\t\t'duration-200': true,\n\t\t})\n\n\t\treturn html`\n\t\t\t<!-- schmancy-surface owns background color and elevation-based shadow.\n\t\t\t Position is managed imperatively via _applyContainerPosition(). -->\n\t\t\t<schmancy-surface\n\t\t\t\t${ref(this._containerRef)}\n\t\t\t\ttype=\"glass\"\n\t\t\t\t.elevation=${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>\n\t\t\t\t<!-- Content section (visually above header for bottom corners) -->\n\t\t\t\t<section\n\t\t\t\t\t${ref(this._contentRef)}\n\t\t\t\t\tclass=\"flex-1 min-h-0 overflow-hidden flex flex-col\"\n\t\t\t\t\tstyle=${contentStyles}\n\t\t\t\t\trole=\"dialog\"\n\t\t\t\t\taria-label=\"${this.label ?? 'Floating panel'}\"\n\t\t\t\t>\n\t\t\t\t\t<schmancy-surface type=\"solid\" class=\"flex flex-col flex-1 min-h-0 overflow-hidden\">\n\t\t\t\t\t\t<schmancy-scroll hide class=\"flex-1\">\n\t\t\t\t\t\t\t<slot></slot>\n\t\t\t\t\t\t</schmancy-scroll>\n\t\t\t\t\t</schmancy-surface>\n\t\t\t\t</section>\n\n\t\t\t\t<!-- Gradient separator between header and content — only when open -->\n\t\t\t\t${when(\n\t\t\t\t\tthis.open,\n\t\t\t\t\t() =>\n\t\t\t\t\t\thtml`<div\n\t\t\t\t\t\t\tclass=\"h-px shrink-0 bg-linear-to-r from-transparent via-primary-default/30 to-transparent\"\n\t\t\t\t\t\t></div>`,\n\t\t\t\t)}\n\n\t\t\t\t<!-- Header / FAB section — always interactive, always visible -->\n\t\t\t\t<section\n\t\t\t\t\tclass=\"shrink-0 bg-surface-containerLowest\"\n\t\t\t\t\tstyle=${styleMap({ 'pointer-events': 'auto', height: `${FAB_HEIGHT}px` })}\n\t\t\t\t>\n\t\t\t\t\t<div\n\t\t\t\t\t\t${ref(this._headerRef)}\n\t\t\t\t\t\tclass=${headerClasses}\n\t\t\t\t\t\ttitle=\"Drag to move\"\n\t\t\t\t\t\taria-label=\"Drag to reposition panel\"\n\t\t\t\t\t>\n\t\t\t\t\t\t<!-- Summary slot rendered once — avoids DOM teardown on toggle -->\n\t\t\t\t\t\t<div class=\"flex-1 min-w-0\">\n\t\t\t\t\t\t\t<slot name=\"summary\"></slot>\n\t\t\t\t\t\t</div>\n\n\t\t\t\t\t\t<!-- Toggle button: collapse when open, expand when closed -->\n\t\t\t\t\t\t${when(\n\t\t\t\t\t\t\tthis.open,\n\t\t\t\t\t\t\t() => html`\n\t\t\t\t\t\t\t\t<schmancy-icon-button\n\t\t\t\t\t\t\t\t\tsize=\"sm\"\n\t\t\t\t\t\t\t\t\tvariant=\"text\"\n\t\t\t\t\t\t\t\t\t@click=${(e: Event) => {\n\t\t\t\t\t\t\t\t\t\te.stopPropagation()\n\t\t\t\t\t\t\t\t\t\tthis.close()\n\t\t\t\t\t\t\t\t\t}}\n\t\t\t\t\t\t\t\t\ttitle=\"Collapse\"\n\t\t\t\t\t\t\t\t>\n\t\t\t\t\t\t\t\t\tclose_fullscreen\n\t\t\t\t\t\t\t\t</schmancy-icon-button>\n\t\t\t\t\t\t\t`,\n\t\t\t\t\t\t\t() => html`\n\t\t\t\t\t\t\t\t<schmancy-icon-button\n\t\t\t\t\t\t\t\t\tsize=\"sm\"\n\t\t\t\t\t\t\t\t\tvariant=\"text\"\n\t\t\t\t\t\t\t\t\t@click=${(e: Event) => {\n\t\t\t\t\t\t\t\t\t\te.stopPropagation()\n\t\t\t\t\t\t\t\t\t\tthis.expand()\n\t\t\t\t\t\t\t\t\t}}\n\t\t\t\t\t\t\t\t\ttitle=\"Expand\"\n\t\t\t\t\t\t\t\t>\n\t\t\t\t\t\t\t\t\tfullscreen\n\t\t\t\t\t\t\t\t</schmancy-icon-button>\n\t\t\t\t\t\t\t`,\n\t\t\t\t\t\t)}\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-boat': SchmancyBoat\n\t}\n}\n"],"mappings":";;;;;;;;;;;;AAYA,IAAM,IAAa,IAEb,IAA8B,kBAUrB,IAAA,cAA2B,EAAA;CAAA,YAAA,GAAA,GAAA;EAAA,MAAA,GAAA,EAAA,EAAA,KAAA,KAYA,WAAA,KAAA,UAAA,CAMsB,GAAA,KAAA,SAElB,gBAAA,KAAA,OAAA,C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CAAI;;;;mBAIE,MAAA;GACT,EAAE,iBAAA,EACF,KAAK,QAAA;IAAA;;;;;;;;;;;;GAxlBb,EAAS,EAAE,MAAM,QAAA,CAAA,CAAA,EAAS,EAAA,WAAA,MAAA,KAAA,EAAA,EAAA,EAAA,CAC1B,EAAS,EAAE,MAAM,QAAA,CAAA,CAAA,EAAS,EAAA,WAAA,QAAA,KAAA,EAAA,EAAA,EAAA,CAC1B,EAAS,EAAE,MAAM,QAAA,CAAA,CAAA,EAAS,EAAA,WAAA,SAAA,KAAA,EAAA,EAAA,EAAA,CAE1B,EAAS,EAAE,MAAM,QAAA,CAAA,CAAA,EAAS,EAAA,WAAA,iBAAA,KAAA,EAAA,EAAA,EAAA,CAE1B,EAAS;CAAE,MAAM;CAAS,SAAA,CAAS;CAAA,CAAA,CAAA,EAAO,EAAA,WAAA,WAAA,KAAA,EAAA,EAAA,EAAA,CAE1C,EAAS,EAAE,MAAM,QAAA,CAAA,CAAA,EAAS,EAAA,WAAA,UAAA,KAAA,EAAA,EAAA,EAAA,CAE1B,EAAS;CAAE,MAAM;CAAS,SAAA,CAAS;CAAA,CAAA,CAAA,EAAO,EAAA,WAAA,QAAA,KAAA,EAAA,EAAA,EAAA,CAmB1C,GAAA,CAAA,EAAO,EAAA,WAAA,cAAA,KAAA,EAAA,EAAA,EAAA,CAIP,GAAA,CAAA,EAAO,EAAA,WAAA,kBAAA,KAAA,EAAA;AAAA,IAAA,IAAA,IAAA,EAAA,CA9CR,EAAc,gBAAA,CAAA,EAAgB,EAAA;AAAA,SAAA,KAAA"}
@@ -1,4 +1,4 @@
1
- require(`./chunk-CncqDLb2.cjs`);const e=require(`./mixins-DvAYa-F7.cjs`),t=require(`./decorate-DpFmy0nm.cjs`),n=require(`./animation-CO_Csq84.cjs`),r=require(`./reduced-motion-Ds-HjMzn.cjs`),i=require(`./theme.service-Cfk88qHK.cjs`);let a=require(`rxjs`),o=require(`lit/directives/class-map.js`),s=require(`lit/directives/style-map.js`),c=require(`lit/decorators.js`),l=require(`lit`),u=require(`lit/directives/ref.js`),d=require(`lit/directives/when.js`);var f=44,p=`schmancy-boat-`,m=class extends e.s{constructor(...e){super(...e),this.id=`default`,this.lowered=!1,this.corner=`bottom-right`,this.open=!1,this.isDragging=!1,this._position={x:16,y:16},this._currentCorner=`bottom-right`,this._containerRef=(0,u.createRef)(),this._contentRef=(0,u.createRef)(),this._headerRef=(0,u.createRef)()}static{this.styles=[l.css`
1
+ require(`./chunk-CncqDLb2.cjs`);const e=require(`./mixins-BOOu6q2n.cjs`),t=require(`./active-host-jH3iloCR.cjs`),n=require(`./animation-CCOIW4wJ.cjs`),r=require(`./reduced-motion-Dzfp_w5x.cjs`),i=require(`./theme.service-DkdH1t60.cjs`);let a=require(`rxjs`),o=require(`lit/directives/class-map.js`),s=require(`lit/directives/style-map.js`),c=require(`lit/decorators.js`),l=require(`lit`),u=require(`lit/directives/ref.js`),d=require(`lit/directives/when.js`);var f=44,p=`schmancy-boat-`,m=class extends e.c{constructor(...e){super(...e),this.id=`default`,this.lowered=!1,this.corner=`bottom-right`,this.open=!1,this.isDragging=!1,this._position={x:16,y:16},this._currentCorner=`bottom-right`,this._containerRef=(0,u.createRef)(),this._contentRef=(0,u.createRef)(),this._headerRef=(0,u.createRef)()}static{this.styles=[l.css`
2
2
  :host {
3
3
  display: contents;
4
4
  position: relative;
@@ -77,4 +77,4 @@ require(`./chunk-CncqDLb2.cjs`);const e=require(`./mixins-DvAYa-F7.cjs`),t=requi
77
77
  </div>
78
78
  </section>
79
79
  </schmancy-surface>
80
- `}};t.t([(0,c.property)({type:String})],m.prototype,`id`,void 0),t.t([(0,c.property)({type:String})],m.prototype,`icon`,void 0),t.t([(0,c.property)({type:String})],m.prototype,`label`,void 0),t.t([(0,c.property)({type:String})],m.prototype,`expandedWidth`,void 0),t.t([(0,c.property)({type:Boolean,reflect:!0})],m.prototype,`lowered`,void 0),t.t([(0,c.property)({type:String})],m.prototype,`corner`,void 0),t.t([(0,c.property)({type:Boolean,reflect:!0})],m.prototype,`open`,void 0),t.t([(0,c.state)()],m.prototype,`isDragging`,void 0),t.t([(0,c.state)()],m.prototype,`_currentCorner`,void 0);var h=m=t.t([(0,c.customElement)(`schmancy-boat`)],m);Object.defineProperty(exports,`t`,{enumerable:!0,get:function(){return h}});
80
+ `}};t.a([(0,c.property)({type:String})],m.prototype,`id`,void 0),t.a([(0,c.property)({type:String})],m.prototype,`icon`,void 0),t.a([(0,c.property)({type:String})],m.prototype,`label`,void 0),t.a([(0,c.property)({type:String})],m.prototype,`expandedWidth`,void 0),t.a([(0,c.property)({type:Boolean,reflect:!0})],m.prototype,`lowered`,void 0),t.a([(0,c.property)({type:String})],m.prototype,`corner`,void 0),t.a([(0,c.property)({type:Boolean,reflect:!0})],m.prototype,`open`,void 0),t.a([(0,c.state)()],m.prototype,`isDragging`,void 0),t.a([(0,c.state)()],m.prototype,`_currentCorner`,void 0);var h=m=t.a([(0,c.customElement)(`schmancy-boat`)],m);Object.defineProperty(exports,`t`,{enumerable:!0,get:function(){return h}});
@@ -1 +1 @@
1
- {"version":3,"file":"boat-Dy6cc3hB.cjs","names":[],"sources":["../src/boat/boat.ts"],"sourcesContent":["import { SchmancyElement } from '@mixins/index'\nimport { css, html } 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 { when } from 'lit/directives/when.js'\nimport { filter, finalize, fromEvent, map, merge, switchMap, takeUntil, tap } from 'rxjs'\nimport { SPRING_SMOOTH, SPRING_SNAPPY } from '../utils/animation.js'\nimport { reducedMotion$ } from '../directives/reduced-motion'\nimport { theme } from '../theme/theme.service.js'\n\nconst FAB_HEIGHT = 44\nconst DRAG_THRESHOLD = 5\nconst POSITION_STORAGE_KEY_PREFIX = 'schmancy-boat-'\n\ntype Corner = 'bottom-right' | 'bottom-left' | 'top-right' | 'top-left'\ntype BoatState = 'collapsed' | 'expanded'\ninterface Position {\n\tx: number\n\ty: number\n}\n\n@customElement('schmancy-boat')\nexport default class SchmancyBoat extends SchmancyElement {\n\tstatic styles = [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\n\t@property({ type: String }) id: string = 'default'\n\t@property({ type: String }) icon?: string\n\t@property({ type: String }) label?: string\n\t/** Override the expanded panel width (e.g. '320px', '24rem'). Defaults to responsive sizing. */\n\t@property({ type: String }) expandedWidth?: string\n\t/** When true, uses a lower elevation shadow in the minimized (FAB) state. */\n\t@property({ type: Boolean, reflect: true }) lowered: boolean = false\n\t/** Corner the boat is anchored to. */\n\t@property({ type: String }) corner: Corner = 'bottom-right'\n\t/** Whether the panel is open. */\n\t@property({ type: Boolean, reflect: true }) open: boolean = false\n\n\t/**\n\t * State property.\n\t * Maps 'expanded' → open=true, 'collapsed' → open=false (FAB visible).\n\t */\n\tget state(): BoatState {\n\t\treturn this.open ? 'expanded' : 'collapsed'\n\t}\n\tset state(val: BoatState) {\n\t\tif (val === 'expanded') {\n\t\t\tthis.expand()\n\t\t} else {\n\t\t\t// collapsed\n\t\t\tthis.close()\n\t\t}\n\t}\n\n\t// Internal drag state (triggers re-render for cursor class)\n\t@state() private isDragging = false\n\n\t// Internal position — plain fields, updated directly during drag (no re-render needed)\n\tprivate _position: Position = { x: 16, y: 16 }\n\t@state() private _currentCorner: Corner = 'bottom-right'\n\n\t// Refs\n\tprivate _containerRef = createRef<HTMLElement>()\n\tprivate _contentRef = createRef<HTMLElement>()\n\tprivate _headerRef = createRef<HTMLElement>()\n\tprivate _currentAnimation?: Animation\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% - ${FAB_HEIGHT}px) 0px 0px 0px round 22px)`\n\t\t\t: `inset(0px 0px calc(100% - ${FAB_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(): 0 | 1 | 2 | 3 | 4 | 5 {\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\tcontainer.style.removeProperty('left')\n\t\tcontainer.style.removeProperty('right')\n\t\tcontainer.style.removeProperty('top')\n\t\tcontainer.style.removeProperty('bottom')\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 _loadPosition() {\n\t\ttry {\n\t\t\tconst saved = localStorage.getItem(POSITION_STORAGE_KEY_PREFIX + this.id)\n\t\t\tif (saved) {\n\t\t\t\tconst parsed = JSON.parse(saved) as { x: number; y: number; anchor: Corner }\n\t\t\t\tthis._position = { x: parsed.x, y: parsed.y }\n\t\t\t\tthis._currentCorner = parsed.anchor\n\t\t\t}\n\t\t} catch {\n\t\t\t// ignore localStorage errors\n\t\t}\n\t}\n\n\tprivate _savePosition() {\n\t\ttry {\n\t\t\tlocalStorage.setItem(\n\t\t\t\tPOSITION_STORAGE_KEY_PREFIX + this.id,\n\t\t\t\tJSON.stringify({ ...this._position, anchor: this._currentCorner }),\n\t\t\t)\n\t\t} catch {\n\t\t\t// ignore localStorage errors\n\t\t}\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\n\t// ============================================\n\t// CORNER SNAPPING\n\t// ============================================\n\n\tprivate _reorientToNearestCorner(skipAnimation = false): void {\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 FAB visual center (container is always collapsed during drag)\n\t\tconst currentIsBottom = this._currentCorner.includes('bottom')\n\t\tconst fabCenterX = rect.left + rect.width / 2\n\t\tconst fabCenterY = currentIsBottom\n\t\t\t? rect.bottom - FAB_HEIGHT / 2\n\t\t\t: rect.top + FAB_HEIGHT / 2\n\t\tconst side = fabCenterX > window.innerWidth / 2 ? 'right' : 'left'\n\t\tconst vert = fabCenterY > window.innerHeight / 2 ? 'bottom' : 'top'\n\t\tconst newCorner: Corner = `${vert}-${side}` as Corner\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 — managed imperatively, not via styleMap\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\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.transform = `translate(${dx}px, ${dy}px)`\n\n\t\t// P — play: animate from the inverse offset to natural resting position\n\t\tthis._currentAnimation?.cancel()\n\t\tconst anim = container.animate(\n\t\t\t[{ transform: container.style.transform }, { transform: 'translate(0,0)' }],\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\tthis._currentAnimation = anim\n\t\tanim.finished.then(() => {\n\t\t\tif (container.isConnected) {\n\t\t\t\tcontainer.style.transform = ''\n\t\t\t}\n\t\t\treturn\n\t\t})\n\n\t\tthis._savePosition()\n\t}\n\n\t// ============================================\n\t// DRAG PIPELINE\n\t// ============================================\n\n\tprivate _setupDrag() {\n\t\tconst header = this._headerRef.value\n\t\tconst container = this._containerRef.value\n\t\tif (!header || !container) return\n\n\t\tlet didDrag = false\n\n\t\tfromEvent<PointerEvent>(header, 'pointerdown')\n\t\t\t.pipe(\n\t\t\t\tfilter(e => e.button === 0),\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\theader.setPointerCapture(e.pointerId)\n\t\t\t\t}),\n\t\t\t\tmap(e => {\n\t\t\t\t\tconst rect = container.getBoundingClientRect()\n\t\t\t\t\tconst isBottom = this._currentCorner.includes('bottom')\n\t\t\t\t\tconst wasOpen = this.open\n\t\t\t\t\tdidDrag = false\n\t\t\t\t\treturn {\n\t\t\t\t\t\tpointerId: e.pointerId,\n\t\t\t\t\t\tstartX: e.clientX,\n\t\t\t\t\t\tstartY: e.clientY,\n\t\t\t\t\t\toffsetX: e.clientX - rect.left,\n\t\t\t\t\t\toffsetY: e.clientY - rect.top,\n\t\t\t\t\t\trect,\n\t\t\t\t\t\tisBottom,\n\t\t\t\t\t\twasOpen,\n\t\t\t\t\t}\n\t\t\t\t}),\n\t\t\t\tswitchMap(({ pointerId, startX, startY, offsetX, offsetY, rect, isBottom, wasOpen }) => {\n\t\t\t\t\tconst sameId = (e: PointerEvent) => e.pointerId === pointerId\n\t\t\t\t\tconst move$ = fromEvent<PointerEvent>(window, 'pointermove').pipe(filter(sameId))\n\t\t\t\t\tconst end$ = merge(\n\t\t\t\t\t\tfromEvent<PointerEvent>(window, 'pointerup'),\n\t\t\t\t\t\tfromEvent<PointerEvent>(window, 'pointercancel'),\n\t\t\t\t\t).pipe(filter(sameId))\n\n\t\t\t\t\treturn move$.pipe(\n\t\t\t\t\t\ttap(({ clientX, clientY }) => {\n\t\t\t\t\t\t\tconst dx = clientX - startX\n\t\t\t\t\t\t\tconst dy = clientY - startY\n\t\t\t\t\t\t\tif (Math.sqrt(dx * dx + dy * dy) > DRAG_THRESHOLD && !didDrag) {\n\t\t\t\t\t\t\t\tdidDrag = true\n\t\t\t\t\t\t\t\tthis.isDragging = true\n\t\t\t\t\t\t\t\t// Collapse on first confirmed drag move (not on click)\n\t\t\t\t\t\t\t\tif (wasOpen) {\n\t\t\t\t\t\t\t\t\tthis._currentAnimation?.cancel()\n\t\t\t\t\t\t\t\t\tthis.open = false\n\t\t\t\t\t\t\t\t\tcontainer.style.clipPath = this.closedClipPath\n\t\t\t\t\t\t\t\t\tcontainer.style.overflow = 'hidden'\n\t\t\t\t\t\t\t\t\tconst content = this._contentRef.value\n\t\t\t\t\t\t\t\t\tif (content) {\n\t\t\t\t\t\t\t\t\t\tcontent.inert = true\n\t\t\t\t\t\t\t\t\t\tcontent.style.visibility = 'hidden'\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}\n\t\t\t\t\t\t\tif (!didDrag) return\n\n\t\t\t\t\t\t\tconst vw = window.innerWidth\n\t\t\t\t\t\t\tconst vh = window.innerHeight\n\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// Allow container to go partially off-screen so FAB stays reachable at all edges\n\t\t\t\t\t\t\tconst minTop = isBottom ? FAB_HEIGHT - rect.height : 0\n\t\t\t\t\t\t\tconst maxTop = isBottom ? vh - rect.height : vh - FAB_HEIGHT\n\t\t\t\t\t\t\tconst top = Math.max(minTop, Math.min(clientY - offsetY, maxTop))\n\n\t\t\t\t\t\t\tthis._position = {\n\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\ty: isBottom ? vh - top - rect.height : top,\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\tthis._applyContainerPosition()\n\t\t\t\t\t\t}),\n\t\t\t\t\t\ttakeUntil(end$),\n\t\t\t\t\t\tfinalize(() => {\n\t\t\t\t\t\t\tif (didDrag) {\n\t\t\t\t\t\t\t\tthis._reorientToNearestCorner()\n\t\t\t\t\t\t\t\tthis.isDragging = false\n\t\t\t\t\t\t\t\tdidDrag = false\n\t\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\t\tthis.isDragging = false\n\t\t\t\t\t\t\t\tdidDrag = false\n\t\t\t\t\t\t\t\tthis.toggle()\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\ttakeUntil(this.disconnecting),\n\t\t\t)\n\t\t\t.subscribe()\n\t}\n\n\t// ============================================\n\t// LIFECYCLE\n\t// ============================================\n\n\tconnectedCallback() {\n\t\tsuper.connectedCallback()\n\n\t\tfromEvent(window, 'resize')\n\t\t\t.pipe(takeUntil(this.disconnecting))\n\t\t\t.subscribe(() => this._validateBounds())\n\n\t\ttheme.bottomOffset$.pipe(\n\t\t\ttap(() => this._applyContainerPosition()),\n\t\t\ttakeUntil(this.disconnecting),\n\t\t).subscribe()\n\t}\n\n\tfirstUpdated() {\n\t\t// Initialize corner from property\n\t\tthis._currentCorner = this.corner\n\n\t\t// Load saved drag position from localStorage\n\t\tthis._loadPosition()\n\n\t\tconst container = this._containerRef.value\n\t\tconst content = this._contentRef.value\n\t\tif (!container) return\n\n\t\t// Apply initial position\n\t\tthis._applyContainerPosition()\n\n\t\t// Set initial open/closed visual state\n\t\tif (this.open) {\n\t\t\tcontainer.style.overflow = ''\n\t\t\tif (content) {\n\t\t\t\tcontent.inert = false\n\t\t\t\tcontent.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 (content) {\n\t\t\t\tcontent.inert = true\n\t\t\t\tcontent.style.visibility = 'hidden'\n\t\t\t}\n\t\t}\n\n\t\t// Set up drag\n\t\tthis._setupDrag()\n\t}\n\n\tdisconnectedCallback() {\n\t\tsuper.disconnectedCallback()\n\t\tthis._currentAnimation?.cancel()\n\t}\n\n\t// ============================================\n\t// ANIMATION\n\t// ============================================\n\n\tprivate async _animateOpen(): Promise<void> {\n\t\tconst container = this._containerRef.value\n\t\tconst content = this._contentRef.value\n\t\tif (!container) return\n\n\t\tif (content) {\n\t\t\tcontent.style.visibility = 'visible'\n\t\t\tcontent.inert = false\n\t\t}\n\n\t\tthis.open = true\n\t\tawait this.updateComplete\n\n\t\tif (reducedMotion$.value) {\n\t\t\tcontainer.style.clipPath = ''\n\t\t\tcontainer.style.overflow = ''\n\t\t\tthis.dispatchScopedEvent('toggle', 'expanded')\n\t\t\treturn\n\t\t}\n\n\t\tthis._currentAnimation?.cancel()\n\t\tcontainer.style.overflow = 'hidden'\n\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_SMOOTH.duration,\n\t\t\teasing: SPRING_SMOOTH.easingFallback,\n\t\t\tfill: 'forwards',\n\t\t})\n\t\tthis._currentAnimation = anim\n\n\t\t// Clear clip-path so overflow/scroll work normally after animation\n\t\tanim.finished.then(() => {\n\t\t\tif (container.isConnected) {\n\t\t\t\tcontainer.style.clipPath = ''\n\t\t\t\tcontainer.style.overflow = ''\n\t\t\t}\n\t\t\treturn\n\t\t})\n\n\t\tthis.dispatchScopedEvent('toggle', 'expanded')\n\t}\n\n\tprivate async _animateClose(): Promise<void> {\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 content = this._contentRef.value\n\t\t\tif (content) {\n\t\t\t\tcontent.inert = true\n\t\t\t\tcontent.style.visibility = 'hidden'\n\t\t\t}\n\t\t\tthis.dispatchScopedEvent('toggle', 'collapsed')\n\t\t\treturn\n\t\t}\n\n\t\tthis._currentAnimation?.cancel()\n\t\tcontainer.style.overflow = 'hidden'\n\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.9),\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\tawait anim.finished\n\n\t\tthis.open = false\n\n\t\tconst content = this._contentRef.value\n\t\tif (content) {\n\t\t\tcontent.inert = true\n\t\t\tcontent.style.visibility = 'hidden'\n\t\t}\n\n\t\tthis.dispatchScopedEvent('toggle', 'collapsed')\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.removeAttribute('hidden')\n\t\tif (!this._containerRef.value) {\n\t\t\tthis.open = true\n\t\t\treturn\n\t\t}\n\t\tthis._animateOpen()\n\t}\n\n\t/** Alias for expand() — kept for backwards compatibility. */\n\tshow() {\n\t\tthis.expand()\n\t}\n\n\tclose() {\n\t\tif (!this.open) return\n\t\tif (!this._containerRef.value) {\n\t\t\tthis.open = false\n\t\t\treturn\n\t\t}\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\tflex: true,\n\t\t\t'flex-col': isBottom,\n\t\t\t'flex-col-reverse': !isBottom,\n\t\t\t'will-change-[clip-path]': true,\n\t\t\t'z-1000': true,\n\t\t\t'ring-1': true,\n\t\t\t'ring-primary-default/15': this.open,\n\t\t\t'rounded-2xl': this.open,\n\t\t\t'ring-outline-variant/40': !this.open,\n\t\t\t'rounded-[22px]': !this.open,\n\t\t\t'overflow-hidden': true,\n\t\t\t'opacity-95': this.isDragging,\n\t\t})\n\n\t\tconst containerStyles = styleMap({\n\t\t\tposition: 'fixed',\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 contentStyles = styleMap({\n\t\t\t'pointer-events': this.open ? 'auto' : 'none',\n\t\t})\n\n\t\tconst headerClasses = 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'touch-none': true,\n\t\t\t'cursor-grabbing': this.isDragging,\n\t\t\t'cursor-move': !this.isDragging,\n\t\t\t'transition-opacity': true,\n\t\t\t'duration-200': true,\n\t\t})\n\n\t\treturn html`\n\t\t\t<!-- schmancy-surface owns background color and elevation-based shadow.\n\t\t\t Position is managed imperatively via _applyContainerPosition(). -->\n\t\t\t<schmancy-surface\n\t\t\t\t${ref(this._containerRef)}\n\t\t\t\ttype=\"glass\"\n\t\t\t\t.elevation=${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>\n\t\t\t\t<!-- Content section (visually above header for bottom corners) -->\n\t\t\t\t<section\n\t\t\t\t\t${ref(this._contentRef)}\n\t\t\t\t\tclass=\"flex-1 min-h-0 overflow-hidden flex flex-col\"\n\t\t\t\t\tstyle=${contentStyles}\n\t\t\t\t\trole=\"dialog\"\n\t\t\t\t\taria-label=\"${this.label ?? 'Floating panel'}\"\n\t\t\t\t>\n\t\t\t\t\t<schmancy-surface type=\"solid\" class=\"flex flex-col flex-1 min-h-0 overflow-hidden\">\n\t\t\t\t\t\t<schmancy-scroll hide class=\"flex-1\">\n\t\t\t\t\t\t\t<slot></slot>\n\t\t\t\t\t\t</schmancy-scroll>\n\t\t\t\t\t</schmancy-surface>\n\t\t\t\t</section>\n\n\t\t\t\t<!-- Gradient separator between header and content — only when open -->\n\t\t\t\t${when(\n\t\t\t\t\tthis.open,\n\t\t\t\t\t() =>\n\t\t\t\t\t\thtml`<div\n\t\t\t\t\t\t\tclass=\"h-px shrink-0 bg-linear-to-r from-transparent via-primary-default/30 to-transparent\"\n\t\t\t\t\t\t></div>`,\n\t\t\t\t)}\n\n\t\t\t\t<!-- Header / FAB section — always interactive, always visible -->\n\t\t\t\t<section\n\t\t\t\t\tclass=\"shrink-0 bg-surface-containerLowest\"\n\t\t\t\t\tstyle=${styleMap({ 'pointer-events': 'auto', height: `${FAB_HEIGHT}px` })}\n\t\t\t\t>\n\t\t\t\t\t<div\n\t\t\t\t\t\t${ref(this._headerRef)}\n\t\t\t\t\t\tclass=${headerClasses}\n\t\t\t\t\t\ttitle=\"Drag to move\"\n\t\t\t\t\t\taria-label=\"Drag to reposition panel\"\n\t\t\t\t\t>\n\t\t\t\t\t\t<!-- Summary slot rendered once — avoids DOM teardown on toggle -->\n\t\t\t\t\t\t<div class=\"flex-1 min-w-0\">\n\t\t\t\t\t\t\t<slot name=\"summary\"></slot>\n\t\t\t\t\t\t</div>\n\n\t\t\t\t\t\t<!-- Toggle button: collapse when open, expand when closed -->\n\t\t\t\t\t\t${when(\n\t\t\t\t\t\t\tthis.open,\n\t\t\t\t\t\t\t() => html`\n\t\t\t\t\t\t\t\t<schmancy-icon-button\n\t\t\t\t\t\t\t\t\tsize=\"sm\"\n\t\t\t\t\t\t\t\t\tvariant=\"text\"\n\t\t\t\t\t\t\t\t\t@click=${(e: Event) => {\n\t\t\t\t\t\t\t\t\t\te.stopPropagation()\n\t\t\t\t\t\t\t\t\t\tthis.close()\n\t\t\t\t\t\t\t\t\t}}\n\t\t\t\t\t\t\t\t\ttitle=\"Collapse\"\n\t\t\t\t\t\t\t\t>\n\t\t\t\t\t\t\t\t\tclose_fullscreen\n\t\t\t\t\t\t\t\t</schmancy-icon-button>\n\t\t\t\t\t\t\t`,\n\t\t\t\t\t\t\t() => html`\n\t\t\t\t\t\t\t\t<schmancy-icon-button\n\t\t\t\t\t\t\t\t\tsize=\"sm\"\n\t\t\t\t\t\t\t\t\tvariant=\"text\"\n\t\t\t\t\t\t\t\t\t@click=${(e: Event) => {\n\t\t\t\t\t\t\t\t\t\te.stopPropagation()\n\t\t\t\t\t\t\t\t\t\tthis.expand()\n\t\t\t\t\t\t\t\t\t}}\n\t\t\t\t\t\t\t\t\ttitle=\"Expand\"\n\t\t\t\t\t\t\t\t>\n\t\t\t\t\t\t\t\t\tfullscreen\n\t\t\t\t\t\t\t\t</schmancy-icon-button>\n\t\t\t\t\t\t\t`,\n\t\t\t\t\t\t)}\n\t\t\t\t\t</div>\n\t\t\t\t</section>\n\t\t\t</schmancy-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AA,EAAA,EAAA,EAAA,EAAA,UAEjC,CAAE,KAAM,OAAA,CAAA,CAAA,CAAS,EAAA,UAAA,SAAA,IAAA,GAAA,CAAA,EAAA,EAAA,EAAA,EAAA,EAAA,UAEjB,CAAE,KAAM,QAAS,QAAA,CAAS,EAAA,CAAA,CAAA,CAAO,EAAA,UAAA,OAAA,IAAA,GAAA,CAAA,EAAA,EAAA,EAAA,EAAA,EAAA,QAAA,CAAA,CAmBnC,EAAA,UAAA,aAAA,IAAA,GAAA,CAAA,EAAA,EAAA,EAAA,EAAA,EAAA,QAAA,CAAA,CAIA,EAAA,UAAA,iBAAA,IAAA,GAAA,CAAA,IAAA,EAAA,EAAA,EAAA,EAAA,EAAA,EAAA,EAAA,eA9CM,gBAAA,CAAA,CAAgB,EAAA,CAAA,OAAA,eAAA,QAAA,IAAA,CAAA,WAAA,CAAA,EAAA,IAAA,UAAA,CAAA,OAAA,GAAA,CAAA"}
1
+ {"version":3,"file":"boat-DpFkILFF.cjs","names":[],"sources":["../src/boat/boat.ts"],"sourcesContent":["import { SchmancyElement } from '@mixins/index'\nimport { css, html } 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 { when } from 'lit/directives/when.js'\nimport { filter, finalize, fromEvent, map, merge, switchMap, takeUntil, tap } from 'rxjs'\nimport { SPRING_SMOOTH, SPRING_SNAPPY } from '../utils/animation.js'\nimport { reducedMotion$ } from '../directives/reduced-motion'\nimport { theme } from '../theme/theme.service.js'\n\nconst FAB_HEIGHT = 44\nconst DRAG_THRESHOLD = 5\nconst POSITION_STORAGE_KEY_PREFIX = 'schmancy-boat-'\n\ntype Corner = 'bottom-right' | 'bottom-left' | 'top-right' | 'top-left'\ntype BoatState = 'collapsed' | 'expanded'\ninterface Position {\n\tx: number\n\ty: number\n}\n\n@customElement('schmancy-boat')\nexport default class SchmancyBoat extends SchmancyElement {\n\tstatic styles = [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\n\t@property({ type: String }) id: string = 'default'\n\t@property({ type: String }) icon?: string\n\t@property({ type: String }) label?: string\n\t/** Override the expanded panel width (e.g. '320px', '24rem'). Defaults to responsive sizing. */\n\t@property({ type: String }) expandedWidth?: string\n\t/** When true, uses a lower elevation shadow in the minimized (FAB) state. */\n\t@property({ type: Boolean, reflect: true }) lowered: boolean = false\n\t/** Corner the boat is anchored to. */\n\t@property({ type: String }) corner: Corner = 'bottom-right'\n\t/** Whether the panel is open. */\n\t@property({ type: Boolean, reflect: true }) open: boolean = false\n\n\t/**\n\t * State property.\n\t * Maps 'expanded' → open=true, 'collapsed' → open=false (FAB visible).\n\t */\n\tget state(): BoatState {\n\t\treturn this.open ? 'expanded' : 'collapsed'\n\t}\n\tset state(val: BoatState) {\n\t\tif (val === 'expanded') {\n\t\t\tthis.expand()\n\t\t} else {\n\t\t\t// collapsed\n\t\t\tthis.close()\n\t\t}\n\t}\n\n\t// Internal drag state (triggers re-render for cursor class)\n\t@state() private isDragging = false\n\n\t// Internal position — plain fields, updated directly during drag (no re-render needed)\n\tprivate _position: Position = { x: 16, y: 16 }\n\t@state() private _currentCorner: Corner = 'bottom-right'\n\n\t// Refs\n\tprivate _containerRef = createRef<HTMLElement>()\n\tprivate _contentRef = createRef<HTMLElement>()\n\tprivate _headerRef = createRef<HTMLElement>()\n\tprivate _currentAnimation?: Animation\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% - ${FAB_HEIGHT}px) 0px 0px 0px round 22px)`\n\t\t\t: `inset(0px 0px calc(100% - ${FAB_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(): 0 | 1 | 2 | 3 | 4 | 5 {\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\tcontainer.style.removeProperty('left')\n\t\tcontainer.style.removeProperty('right')\n\t\tcontainer.style.removeProperty('top')\n\t\tcontainer.style.removeProperty('bottom')\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 _loadPosition() {\n\t\ttry {\n\t\t\tconst saved = localStorage.getItem(POSITION_STORAGE_KEY_PREFIX + this.id)\n\t\t\tif (saved) {\n\t\t\t\tconst parsed = JSON.parse(saved) as { x: number; y: number; anchor: Corner }\n\t\t\t\tthis._position = { x: parsed.x, y: parsed.y }\n\t\t\t\tthis._currentCorner = parsed.anchor\n\t\t\t}\n\t\t} catch {\n\t\t\t// ignore localStorage errors\n\t\t}\n\t}\n\n\tprivate _savePosition() {\n\t\ttry {\n\t\t\tlocalStorage.setItem(\n\t\t\t\tPOSITION_STORAGE_KEY_PREFIX + this.id,\n\t\t\t\tJSON.stringify({ ...this._position, anchor: this._currentCorner }),\n\t\t\t)\n\t\t} catch {\n\t\t\t// ignore localStorage errors\n\t\t}\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\n\t// ============================================\n\t// CORNER SNAPPING\n\t// ============================================\n\n\tprivate _reorientToNearestCorner(skipAnimation = false): void {\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 FAB visual center (container is always collapsed during drag)\n\t\tconst currentIsBottom = this._currentCorner.includes('bottom')\n\t\tconst fabCenterX = rect.left + rect.width / 2\n\t\tconst fabCenterY = currentIsBottom\n\t\t\t? rect.bottom - FAB_HEIGHT / 2\n\t\t\t: rect.top + FAB_HEIGHT / 2\n\t\tconst side = fabCenterX > window.innerWidth / 2 ? 'right' : 'left'\n\t\tconst vert = fabCenterY > window.innerHeight / 2 ? 'bottom' : 'top'\n\t\tconst newCorner: Corner = `${vert}-${side}` as Corner\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 — managed imperatively, not via styleMap\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\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.transform = `translate(${dx}px, ${dy}px)`\n\n\t\t// P — play: animate from the inverse offset to natural resting position\n\t\tthis._currentAnimation?.cancel()\n\t\tconst anim = container.animate(\n\t\t\t[{ transform: container.style.transform }, { transform: 'translate(0,0)' }],\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\tthis._currentAnimation = anim\n\t\tanim.finished.then(() => {\n\t\t\tif (container.isConnected) {\n\t\t\t\tcontainer.style.transform = ''\n\t\t\t}\n\t\t\treturn\n\t\t})\n\n\t\tthis._savePosition()\n\t}\n\n\t// ============================================\n\t// DRAG PIPELINE\n\t// ============================================\n\n\tprivate _setupDrag() {\n\t\tconst header = this._headerRef.value\n\t\tconst container = this._containerRef.value\n\t\tif (!header || !container) return\n\n\t\tlet didDrag = false\n\n\t\tfromEvent<PointerEvent>(header, 'pointerdown')\n\t\t\t.pipe(\n\t\t\t\tfilter(e => e.button === 0),\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\theader.setPointerCapture(e.pointerId)\n\t\t\t\t}),\n\t\t\t\tmap(e => {\n\t\t\t\t\tconst rect = container.getBoundingClientRect()\n\t\t\t\t\tconst isBottom = this._currentCorner.includes('bottom')\n\t\t\t\t\tconst wasOpen = this.open\n\t\t\t\t\tdidDrag = false\n\t\t\t\t\treturn {\n\t\t\t\t\t\tpointerId: e.pointerId,\n\t\t\t\t\t\tstartX: e.clientX,\n\t\t\t\t\t\tstartY: e.clientY,\n\t\t\t\t\t\toffsetX: e.clientX - rect.left,\n\t\t\t\t\t\toffsetY: e.clientY - rect.top,\n\t\t\t\t\t\trect,\n\t\t\t\t\t\tisBottom,\n\t\t\t\t\t\twasOpen,\n\t\t\t\t\t}\n\t\t\t\t}),\n\t\t\t\tswitchMap(({ pointerId, startX, startY, offsetX, offsetY, rect, isBottom, wasOpen }) => {\n\t\t\t\t\tconst sameId = (e: PointerEvent) => e.pointerId === pointerId\n\t\t\t\t\tconst move$ = fromEvent<PointerEvent>(window, 'pointermove').pipe(filter(sameId))\n\t\t\t\t\tconst end$ = merge(\n\t\t\t\t\t\tfromEvent<PointerEvent>(window, 'pointerup'),\n\t\t\t\t\t\tfromEvent<PointerEvent>(window, 'pointercancel'),\n\t\t\t\t\t).pipe(filter(sameId))\n\n\t\t\t\t\treturn move$.pipe(\n\t\t\t\t\t\ttap(({ clientX, clientY }) => {\n\t\t\t\t\t\t\tconst dx = clientX - startX\n\t\t\t\t\t\t\tconst dy = clientY - startY\n\t\t\t\t\t\t\tif (Math.sqrt(dx * dx + dy * dy) > DRAG_THRESHOLD && !didDrag) {\n\t\t\t\t\t\t\t\tdidDrag = true\n\t\t\t\t\t\t\t\tthis.isDragging = true\n\t\t\t\t\t\t\t\t// Collapse on first confirmed drag move (not on click)\n\t\t\t\t\t\t\t\tif (wasOpen) {\n\t\t\t\t\t\t\t\t\tthis._currentAnimation?.cancel()\n\t\t\t\t\t\t\t\t\tthis.open = false\n\t\t\t\t\t\t\t\t\tcontainer.style.clipPath = this.closedClipPath\n\t\t\t\t\t\t\t\t\tcontainer.style.overflow = 'hidden'\n\t\t\t\t\t\t\t\t\tconst content = this._contentRef.value\n\t\t\t\t\t\t\t\t\tif (content) {\n\t\t\t\t\t\t\t\t\t\tcontent.inert = true\n\t\t\t\t\t\t\t\t\t\tcontent.style.visibility = 'hidden'\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}\n\t\t\t\t\t\t\tif (!didDrag) return\n\n\t\t\t\t\t\t\tconst vw = window.innerWidth\n\t\t\t\t\t\t\tconst vh = window.innerHeight\n\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// Allow container to go partially off-screen so FAB stays reachable at all edges\n\t\t\t\t\t\t\tconst minTop = isBottom ? FAB_HEIGHT - rect.height : 0\n\t\t\t\t\t\t\tconst maxTop = isBottom ? vh - rect.height : vh - FAB_HEIGHT\n\t\t\t\t\t\t\tconst top = Math.max(minTop, Math.min(clientY - offsetY, maxTop))\n\n\t\t\t\t\t\t\tthis._position = {\n\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\ty: isBottom ? vh - top - rect.height : top,\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\tthis._applyContainerPosition()\n\t\t\t\t\t\t}),\n\t\t\t\t\t\ttakeUntil(end$),\n\t\t\t\t\t\tfinalize(() => {\n\t\t\t\t\t\t\tif (didDrag) {\n\t\t\t\t\t\t\t\tthis._reorientToNearestCorner()\n\t\t\t\t\t\t\t\tthis.isDragging = false\n\t\t\t\t\t\t\t\tdidDrag = false\n\t\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\t\tthis.isDragging = false\n\t\t\t\t\t\t\t\tdidDrag = false\n\t\t\t\t\t\t\t\tthis.toggle()\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\ttakeUntil(this.disconnecting),\n\t\t\t)\n\t\t\t.subscribe()\n\t}\n\n\t// ============================================\n\t// LIFECYCLE\n\t// ============================================\n\n\tconnectedCallback() {\n\t\tsuper.connectedCallback()\n\n\t\tfromEvent(window, 'resize')\n\t\t\t.pipe(takeUntil(this.disconnecting))\n\t\t\t.subscribe(() => this._validateBounds())\n\n\t\ttheme.bottomOffset$.pipe(\n\t\t\ttap(() => this._applyContainerPosition()),\n\t\t\ttakeUntil(this.disconnecting),\n\t\t).subscribe()\n\t}\n\n\tfirstUpdated() {\n\t\t// Initialize corner from property\n\t\tthis._currentCorner = this.corner\n\n\t\t// Load saved drag position from localStorage\n\t\tthis._loadPosition()\n\n\t\tconst container = this._containerRef.value\n\t\tconst content = this._contentRef.value\n\t\tif (!container) return\n\n\t\t// Apply initial position\n\t\tthis._applyContainerPosition()\n\n\t\t// Set initial open/closed visual state\n\t\tif (this.open) {\n\t\t\tcontainer.style.overflow = ''\n\t\t\tif (content) {\n\t\t\t\tcontent.inert = false\n\t\t\t\tcontent.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 (content) {\n\t\t\t\tcontent.inert = true\n\t\t\t\tcontent.style.visibility = 'hidden'\n\t\t\t}\n\t\t}\n\n\t\t// Set up drag\n\t\tthis._setupDrag()\n\t}\n\n\tdisconnectedCallback() {\n\t\tsuper.disconnectedCallback()\n\t\tthis._currentAnimation?.cancel()\n\t}\n\n\t// ============================================\n\t// ANIMATION\n\t// ============================================\n\n\tprivate async _animateOpen(): Promise<void> {\n\t\tconst container = this._containerRef.value\n\t\tconst content = this._contentRef.value\n\t\tif (!container) return\n\n\t\tif (content) {\n\t\t\tcontent.style.visibility = 'visible'\n\t\t\tcontent.inert = false\n\t\t}\n\n\t\tthis.open = true\n\t\tawait this.updateComplete\n\n\t\tif (reducedMotion$.value) {\n\t\t\tcontainer.style.clipPath = ''\n\t\t\tcontainer.style.overflow = ''\n\t\t\tthis.dispatchScopedEvent('toggle', 'expanded')\n\t\t\treturn\n\t\t}\n\n\t\tthis._currentAnimation?.cancel()\n\t\tcontainer.style.overflow = 'hidden'\n\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_SMOOTH.duration,\n\t\t\teasing: SPRING_SMOOTH.easingFallback,\n\t\t\tfill: 'forwards',\n\t\t})\n\t\tthis._currentAnimation = anim\n\n\t\t// Clear clip-path so overflow/scroll work normally after animation\n\t\tanim.finished.then(() => {\n\t\t\tif (container.isConnected) {\n\t\t\t\tcontainer.style.clipPath = ''\n\t\t\t\tcontainer.style.overflow = ''\n\t\t\t}\n\t\t\treturn\n\t\t})\n\n\t\tthis.dispatchScopedEvent('toggle', 'expanded')\n\t}\n\n\tprivate async _animateClose(): Promise<void> {\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 content = this._contentRef.value\n\t\t\tif (content) {\n\t\t\t\tcontent.inert = true\n\t\t\t\tcontent.style.visibility = 'hidden'\n\t\t\t}\n\t\t\tthis.dispatchScopedEvent('toggle', 'collapsed')\n\t\t\treturn\n\t\t}\n\n\t\tthis._currentAnimation?.cancel()\n\t\tcontainer.style.overflow = 'hidden'\n\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.9),\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\tawait anim.finished\n\n\t\tthis.open = false\n\n\t\tconst content = this._contentRef.value\n\t\tif (content) {\n\t\t\tcontent.inert = true\n\t\t\tcontent.style.visibility = 'hidden'\n\t\t}\n\n\t\tthis.dispatchScopedEvent('toggle', 'collapsed')\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.removeAttribute('hidden')\n\t\tif (!this._containerRef.value) {\n\t\t\tthis.open = true\n\t\t\treturn\n\t\t}\n\t\tthis._animateOpen()\n\t}\n\n\t/** Alias for expand() — kept for backwards compatibility. */\n\tshow() {\n\t\tthis.expand()\n\t}\n\n\tclose() {\n\t\tif (!this.open) return\n\t\tif (!this._containerRef.value) {\n\t\t\tthis.open = false\n\t\t\treturn\n\t\t}\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\tflex: true,\n\t\t\t'flex-col': isBottom,\n\t\t\t'flex-col-reverse': !isBottom,\n\t\t\t'will-change-[clip-path]': true,\n\t\t\t'z-1000': true,\n\t\t\t'ring-1': true,\n\t\t\t'ring-primary-default/15': this.open,\n\t\t\t'rounded-2xl': this.open,\n\t\t\t'ring-outline-variant/40': !this.open,\n\t\t\t'rounded-[22px]': !this.open,\n\t\t\t'overflow-hidden': true,\n\t\t\t'opacity-95': this.isDragging,\n\t\t})\n\n\t\tconst containerStyles = styleMap({\n\t\t\tposition: 'fixed',\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 contentStyles = styleMap({\n\t\t\t'pointer-events': this.open ? 'auto' : 'none',\n\t\t})\n\n\t\tconst headerClasses = 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'touch-none': true,\n\t\t\t'cursor-grabbing': this.isDragging,\n\t\t\t'cursor-move': !this.isDragging,\n\t\t\t'transition-opacity': true,\n\t\t\t'duration-200': true,\n\t\t})\n\n\t\treturn html`\n\t\t\t<!-- schmancy-surface owns background color and elevation-based shadow.\n\t\t\t Position is managed imperatively via _applyContainerPosition(). -->\n\t\t\t<schmancy-surface\n\t\t\t\t${ref(this._containerRef)}\n\t\t\t\ttype=\"glass\"\n\t\t\t\t.elevation=${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>\n\t\t\t\t<!-- Content section (visually above header for bottom corners) -->\n\t\t\t\t<section\n\t\t\t\t\t${ref(this._contentRef)}\n\t\t\t\t\tclass=\"flex-1 min-h-0 overflow-hidden flex flex-col\"\n\t\t\t\t\tstyle=${contentStyles}\n\t\t\t\t\trole=\"dialog\"\n\t\t\t\t\taria-label=\"${this.label ?? 'Floating panel'}\"\n\t\t\t\t>\n\t\t\t\t\t<schmancy-surface type=\"solid\" class=\"flex flex-col flex-1 min-h-0 overflow-hidden\">\n\t\t\t\t\t\t<schmancy-scroll hide class=\"flex-1\">\n\t\t\t\t\t\t\t<slot></slot>\n\t\t\t\t\t\t</schmancy-scroll>\n\t\t\t\t\t</schmancy-surface>\n\t\t\t\t</section>\n\n\t\t\t\t<!-- Gradient separator between header and content — only when open -->\n\t\t\t\t${when(\n\t\t\t\t\tthis.open,\n\t\t\t\t\t() =>\n\t\t\t\t\t\thtml`<div\n\t\t\t\t\t\t\tclass=\"h-px shrink-0 bg-linear-to-r from-transparent via-primary-default/30 to-transparent\"\n\t\t\t\t\t\t></div>`,\n\t\t\t\t)}\n\n\t\t\t\t<!-- Header / FAB section — always interactive, always visible -->\n\t\t\t\t<section\n\t\t\t\t\tclass=\"shrink-0 bg-surface-containerLowest\"\n\t\t\t\t\tstyle=${styleMap({ 'pointer-events': 'auto', height: `${FAB_HEIGHT}px` })}\n\t\t\t\t>\n\t\t\t\t\t<div\n\t\t\t\t\t\t${ref(this._headerRef)}\n\t\t\t\t\t\tclass=${headerClasses}\n\t\t\t\t\t\ttitle=\"Drag to move\"\n\t\t\t\t\t\taria-label=\"Drag to reposition panel\"\n\t\t\t\t\t>\n\t\t\t\t\t\t<!-- Summary slot rendered once — avoids DOM teardown on toggle -->\n\t\t\t\t\t\t<div class=\"flex-1 min-w-0\">\n\t\t\t\t\t\t\t<slot name=\"summary\"></slot>\n\t\t\t\t\t\t</div>\n\n\t\t\t\t\t\t<!-- Toggle button: collapse when open, expand when closed -->\n\t\t\t\t\t\t${when(\n\t\t\t\t\t\t\tthis.open,\n\t\t\t\t\t\t\t() => html`\n\t\t\t\t\t\t\t\t<schmancy-icon-button\n\t\t\t\t\t\t\t\t\tsize=\"sm\"\n\t\t\t\t\t\t\t\t\tvariant=\"text\"\n\t\t\t\t\t\t\t\t\t@click=${(e: Event) => {\n\t\t\t\t\t\t\t\t\t\te.stopPropagation()\n\t\t\t\t\t\t\t\t\t\tthis.close()\n\t\t\t\t\t\t\t\t\t}}\n\t\t\t\t\t\t\t\t\ttitle=\"Collapse\"\n\t\t\t\t\t\t\t\t>\n\t\t\t\t\t\t\t\t\tclose_fullscreen\n\t\t\t\t\t\t\t\t</schmancy-icon-button>\n\t\t\t\t\t\t\t`,\n\t\t\t\t\t\t\t() => html`\n\t\t\t\t\t\t\t\t<schmancy-icon-button\n\t\t\t\t\t\t\t\t\tsize=\"sm\"\n\t\t\t\t\t\t\t\t\tvariant=\"text\"\n\t\t\t\t\t\t\t\t\t@click=${(e: Event) => {\n\t\t\t\t\t\t\t\t\t\te.stopPropagation()\n\t\t\t\t\t\t\t\t\t\tthis.expand()\n\t\t\t\t\t\t\t\t\t}}\n\t\t\t\t\t\t\t\t\ttitle=\"Expand\"\n\t\t\t\t\t\t\t\t>\n\t\t\t\t\t\t\t\t\tfullscreen\n\t\t\t\t\t\t\t\t</schmancy-icon-button>\n\t\t\t\t\t\t\t`,\n\t\t\t\t\t\t)}\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-boat': Schmanc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A,SAAA,IAAA,GAAA,CAAA,EAAA,EAAA,EAAA,EAAA,EAAA,UAEjB,CAAE,KAAM,QAAS,QAAA,CAAS,EAAA,CAAA,CAAA,CAAO,EAAA,UAAA,OAAA,IAAA,GAAA,CAAA,EAAA,EAAA,EAAA,EAAA,EAAA,QAAA,CAAA,CAmBnC,EAAA,UAAA,aAAA,IAAA,GAAA,CAAA,EAAA,EAAA,EAAA,EAAA,EAAA,QAAA,CAAA,CAIA,EAAA,UAAA,iBAAA,IAAA,GAAA,CAAA,IAAA,EAAA,EAAA,EAAA,EAAA,EAAA,EAAA,EAAA,eA9CM,gBAAA,CAAA,CAAgB,EAAA,CAAA,OAAA,eAAA,QAAA,IAAA,CAAA,WAAA,CAAA,EAAA,IAAA,UAAA,CAAA,OAAA,GAAA,CAAA"}
package/dist/boat.cjs CHANGED
@@ -1 +1 @@
1
- Object.defineProperty(exports,Symbol.toStringTag,{value:`Module`});const e=require(`./boat-Dy6cc3hB.cjs`);exports.SchmancyBoat=e.t;
1
+ Object.defineProperty(exports,Symbol.toStringTag,{value:`Module`});const e=require(`./boat-DpFkILFF.cjs`);exports.SchmancyBoat=e.t;
package/dist/boat.js CHANGED
@@ -1,2 +1,2 @@
1
- import { t as e } from "./boat-CZma2ojF.js";
1
+ import { t as e } from "./boat-Bj0wVcZi.js";
2
2
  export { e as SchmancyBoat };
@@ -1,4 +1,4 @@
1
- Object.defineProperty(exports,Symbol.toStringTag,{value:`Module`}),require(`./chunk-CncqDLb2.cjs`);const e=require(`./mixins-DvAYa-F7.cjs`),t=require(`./decorate-DpFmy0nm.cjs`);let n=require(`lit/decorators.js`),r=require(`lit`);var i=class extends e.s{constructor(...e){super(...e),this.separator=`/`}static{this.styles=[r.css`
1
+ Object.defineProperty(exports,Symbol.toStringTag,{value:`Module`}),require(`./chunk-CncqDLb2.cjs`);const e=require(`./mixins-BOOu6q2n.cjs`),t=require(`./active-host-jH3iloCR.cjs`);let n=require(`lit/decorators.js`),r=require(`lit`);var i=class extends e.c{constructor(...e){super(...e),this.separator=`/`}static{this.styles=[r.css`
2
2
  :host {
3
3
  display: block;
4
4
  }
@@ -20,7 +20,7 @@ Object.defineProperty(exports,Symbol.toStringTag,{value:`Module`}),require(`./ch
20
20
  <nav role="navigation">
21
21
  <slot @slotchange=${()=>this._insertSeparators()}></slot>
22
22
  </nav>
23
- `}_insertSeparators(){let e=this.shadowRoot?.querySelector(`slot`);if(!e)return;let t=e.assignedElements({flatten:!0});this.querySelectorAll(`[data-schmancy-sep]`).forEach(e=>e.remove()),t.forEach((e,n)=>{if(n===t.length-1)return;let r=document.createElement(`span`);r.setAttribute(`data-schmancy-sep`,``),r.setAttribute(`aria-hidden`,`true`),r.setAttribute(`part`,`separator`),r.className=`sep`,r.textContent=this.separator,e.insertAdjacentElement(`afterend`,r)})}};t.t([(0,n.property)({type:String})],i.prototype,`separator`,void 0),i=t.t([(0,n.customElement)(`schmancy-breadcrumb`)],i);var a=class extends e.s{constructor(...e){super(...e),this.href=``,this.current=!1}static{this.styles=[r.css`
23
+ `}_insertSeparators(){let e=this.shadowRoot?.querySelector(`slot`);if(!e)return;let t=e.assignedElements({flatten:!0});this.querySelectorAll(`[data-schmancy-sep]`).forEach(e=>e.remove()),t.forEach((e,n)=>{if(n===t.length-1)return;let r=document.createElement(`span`);r.setAttribute(`data-schmancy-sep`,``),r.setAttribute(`aria-hidden`,`true`),r.setAttribute(`part`,`separator`),r.className=`sep`,r.textContent=this.separator,e.insertAdjacentElement(`afterend`,r)})}};t.a([(0,n.property)({type:String})],i.prototype,`separator`,void 0),i=t.a([(0,n.customElement)(`schmancy-breadcrumb`)],i);var a=class extends e.c{constructor(...e){super(...e),this.href=``,this.current=!1}static{this.styles=[r.css`
24
24
  :host {
25
25
  display: inline-block;
26
26
  }
@@ -31,4 +31,4 @@ Object.defineProperty(exports,Symbol.toStringTag,{value:`Module`}),require(`./ch
31
31
  a:hover {
32
32
  text-decoration: underline;
33
33
  }
34
- `]}render(){return this.href&&!this.current?r.html`<a href=${this.href}><slot></slot></a>`:r.html`<span aria-current=${this.current?`page`:`false`}><slot></slot></span>`}};t.t([(0,n.property)({type:String})],a.prototype,`href`,void 0),t.t([(0,n.property)({type:Boolean,reflect:!0})],a.prototype,`current`,void 0),a=t.t([(0,n.customElement)(`schmancy-breadcrumb-item`)],a),Object.defineProperty(exports,`SchmancyBreadcrumb`,{enumerable:!0,get:function(){return i}}),Object.defineProperty(exports,`SchmancyBreadcrumbItem`,{enumerable:!0,get:function(){return a}});
34
+ `]}render(){return this.href&&!this.current?r.html`<a href=${this.href}><slot></slot></a>`:r.html`<span aria-current=${this.current?`page`:`false`}><slot></slot></span>`}};t.a([(0,n.property)({type:String})],a.prototype,`href`,void 0),t.a([(0,n.property)({type:Boolean,reflect:!0})],a.prototype,`current`,void 0),a=t.a([(0,n.customElement)(`schmancy-breadcrumb-item`)],a),Object.defineProperty(exports,`SchmancyBreadcrumb`,{enumerable:!0,get:function(){return i}}),Object.defineProperty(exports,`SchmancyBreadcrumbItem`,{enumerable:!0,get:function(){return a}});
@@ -1 +1 @@
1
- {"version":3,"file":"breadcrumb.cjs","names":[],"sources":["../src/breadcrumb/breadcrumb.ts"],"sourcesContent":["import { SchmancyElement } from '@mixins/index'\nimport { css, html } from 'lit'\nimport { customElement, property } from 'lit/decorators.js'\n\n/**\n * Breadcrumb navigation container. Wraps a list of `schmancy-breadcrumb-item`\n * elements with the correct ARIA landmark and semantics.\n *\n * @element schmancy-breadcrumb\n * @slot - Default slot for `<schmancy-breadcrumb-item>` children.\n * @attr separator - Character or string rendered between items. Default `/`.\n * @csspart separator - The separator element.\n */\n@customElement('schmancy-breadcrumb')\nexport class SchmancyBreadcrumb extends SchmancyElement {\n\tstatic styles = [css`\n\t:host {\n\t\tdisplay: block;\n\t}\n\tnav {\n\t\tdisplay: flex;\n\t\tflex-wrap: wrap;\n\t\talign-items: center;\n\t\tgap: 0.25rem;\n\t}\n\t.sep {\n\t\tcolor: var(--schmancy-sys-color-surface-onVariant, #79747e);\n\t\tuser-select: none;\n\t\tpadding: 0 0.25rem;\n\t}\n\t::slotted(schmancy-breadcrumb-item:last-of-type) {\n\t\tfont-weight: 500;\n\t}\n`];\n\t@property({ type: String }) separator = '/'\n\n\tconnectedCallback(): void {\n\t\tsuper.connectedCallback()\n\t\tif (!this.hasAttribute('aria-label')) this.setAttribute('aria-label', 'Breadcrumb')\n\t}\n\n\trender() {\n\t\t// Render separators between slotted items by manipulating after render.\n\t\t// The simpler approach uses the CSS adjacent-sibling pattern so the\n\t\t// separator is visually present without affecting the accessible name.\n\t\treturn html`\n\t\t\t<nav role=\"navigation\">\n\t\t\t\t<slot @slotchange=${() => this._insertSeparators()}></slot>\n\t\t\t</nav>\n\t\t`\n\t}\n\n\tprivate _insertSeparators() {\n\t\tconst slot = this.shadowRoot?.querySelector('slot') as HTMLSlotElement | null\n\t\tif (!slot) return\n\t\tconst items = slot.assignedElements({ flatten: true })\n\t\t// Remove any previously-inserted separators.\n\t\tthis.querySelectorAll('[data-schmancy-sep]').forEach(el => el.remove())\n\t\titems.forEach((el, idx) => {\n\t\t\tif (idx === items.length - 1) return\n\t\t\tconst sep = document.createElement('span')\n\t\t\tsep.setAttribute('data-schmancy-sep', '')\n\t\t\tsep.setAttribute('aria-hidden', 'true')\n\t\t\tsep.setAttribute('part', 'separator')\n\t\t\tsep.className = 'sep'\n\t\t\tsep.textContent = this.separator\n\t\t\tel.insertAdjacentElement('afterend', sep)\n\t\t})\n\t}\n}\n\n/**\n * Individual breadcrumb item. Renders as a link when `href` is provided,\n * otherwise as a plain span (represents the current page).\n *\n * @element schmancy-breadcrumb-item\n * @slot - Label content.\n * @attr href - If set, renders as an anchor.\n * @attr current - Marks as `aria-current=\"page\"`.\n */\n@customElement('schmancy-breadcrumb-item')\nexport class SchmancyBreadcrumbItem extends SchmancyElement {\n\tstatic styles = [css`\n\t:host {\n\t\tdisplay: inline-block;\n\t}\n\ta, span {\n\t\tcolor: inherit;\n\t\ttext-decoration: none;\n\t}\n\ta:hover {\n\t\ttext-decoration: underline;\n\t}\n`];\n\t@property({ type: String }) href = ''\n\t@property({ type: Boolean, reflect: true }) current = false\n\n\trender() {\n\t\tif (this.href && !this.current) {\n\t\t\treturn html`<a href=${this.href}><slot></slot></a>`\n\t\t}\n\t\treturn html`<span aria-current=${this.current ? 'page' : 'false'}><slot></slot></span>`\n\t}\n}\n\ndeclare global {\n\tinterface HTMLElementTagNameMap {\n\t\t'schmancy-breadcrumb': SchmancyBreadcrumb\n\t\t'schmancy-breadcrumb-item': SchmancyBreadcrumbItem\n\t}\n}\n"],"mappings":"qOAcO,IAAA,EAAA,cAAiC,EAAA,CAAA,CAAA,YAAA,GAAA,EAAA,CAAA,MAAA,GAAA,EAAA,CAAA,KAAA,UAoBC,IAAA,OAAA,KAAA,OAnBxB,CAAC,EAAA,GAAG;;;;;;;;;;;;;;;;;;GAqBpB,mBAAA,CACC,MAAM,mBAAA,CACD,KAAK,aAAa,aAAA,EAAe,KAAK,aAAa,aAAc,aAAA,CAGvE,QAAA,CAIC,MAAO,GAAA,IAAI;;4BAEiB,KAAK,mBAAA,CAAA;;IAKlC,mBAAA,CACC,IAAM,EAAO,KAAK,YAAY,cAAc,OAAA,CAC5C,GAAA,CAAK,EAAM,OACX,IAAM,EAAQ,EAAK,iBAAiB,CAAE,QAAA,CAAS,EAAA,CAAA,CAE/C,KAAK,iBAAiB,sBAAA,CAAuB,QAAQ,GAAM,EAAG,QAAA,CAAA,CAC9D,EAAM,SAAS,EAAI,IAAA,CAClB,GAAI,IAAQ,EAAM,OAAS,EAAG,OAC9B,IAAM,EAAM,SAAS,cAAc,OAAA,CACnC,EAAI,aAAa,oBAAqB,GAAA,CACtC,EAAI,aAAa,cAAe,OAAA,CAChC,EAAI,aAAa,OAAQ,YAAA,CACzB,EAAI,UAAY,MAChB,EAAI,YAAc,KAAK,UACvB,EAAG,sBAAsB,WAAY,EAAA,EAAA,GAAA,EAAA,EAAA,EAAA,EAAA,EAAA,UAhC7B,CAAE,KAAM,OAAA,CAAA,CAAA,CAAS,EAAA,UAAA,YAAA,IAAA,GAAA,CAAA,EAAA,EAAA,EAAA,EAAA,EAAA,EAAA,eArBb,sBAAA,CAAA,CAAsB,EAAA,CAoE9B,IAAA,EAAA,cAAqC,EAAA,CAAA,CAAA,YAAA,GAAA,EAAA,CAAA,MAAA,GAAA,EAAA,CAAA,KAAA,KAaR,GAAA,KAAA,QAAA,CACmB,EAAA,OAAA,KAAA,OAbtC,CAAC,EAAA,GAAG;;;;;;;;;;;GAepB,QAAA,CACC,OAAI,KAAK,MAAA,CAAS,KAAK,QACf,EAAA,IAAI,WAAW,KAAK,KAAA,oBAErB,EAAA,IAAI,sBAAsB,KAAK,QAAU,OAAS,QAAA,yBAAA,EAAA,EAAA,EAAA,EAAA,EAAA,UAPhD,CAAE,KAAM,OAAA,CAAA,CAAA,CAAS,EAAA,UAAA,OAAA,IAAA,GAAA,CAAA,EAAA,EAAA,EAAA,EAAA,EAAA,UACjB,CAAE,KAAM,QAAS,QAAA,CAAS,EAAA,CAAA,CAAA,CAAO,EAAA,UAAA,UAAA,IAAA,GAAA,CAAA,EAAA,EAAA,EAAA,EAAA,EAAA,EAAA,eAf7B,2BAAA,CAAA,CAA2B,EAAA,CAAA,OAAA,eAAA,QAAA,qBAAA,CAAA,WAAA,CAAA,EAAA,IAAA,UAAA,CAAA,OAAA,GAAA,CAAA,CAAA,OAAA,eAAA,QAAA,yBAAA,CAAA,WAAA,CAAA,EAAA,IAAA,UAAA,CAAA,OAAA,GAAA,CAAA"}
1
+ {"version":3,"file":"breadcrumb.cjs","names":[],"sources":["../src/breadcrumb/breadcrumb.ts"],"sourcesContent":["import { SchmancyElement } from '@mixins/index'\nimport { css, html } from 'lit'\nimport { customElement, property } from 'lit/decorators.js'\n\n/**\n * Breadcrumb navigation container. Wraps a list of `schmancy-breadcrumb-item`\n * elements with the correct ARIA landmark and semantics.\n *\n * @element schmancy-breadcrumb\n * @slot - Default slot for `<schmancy-breadcrumb-item>` children.\n * @attr separator - Character or string rendered between items. Default `/`.\n * @csspart separator - The separator element.\n */\n@customElement('schmancy-breadcrumb')\nexport class SchmancyBreadcrumb extends SchmancyElement {\n\tstatic styles = [css`\n\t:host {\n\t\tdisplay: block;\n\t}\n\tnav {\n\t\tdisplay: flex;\n\t\tflex-wrap: wrap;\n\t\talign-items: center;\n\t\tgap: 0.25rem;\n\t}\n\t.sep {\n\t\tcolor: var(--schmancy-sys-color-surface-onVariant, #79747e);\n\t\tuser-select: none;\n\t\tpadding: 0 0.25rem;\n\t}\n\t::slotted(schmancy-breadcrumb-item:last-of-type) {\n\t\tfont-weight: 500;\n\t}\n`];\n\t@property({ type: String }) separator = '/'\n\n\tconnectedCallback(): void {\n\t\tsuper.connectedCallback()\n\t\tif (!this.hasAttribute('aria-label')) this.setAttribute('aria-label', 'Breadcrumb')\n\t}\n\n\trender() {\n\t\t// Render separators between slotted items by manipulating after render.\n\t\t// The simpler approach uses the CSS adjacent-sibling pattern so the\n\t\t// separator is visually present without affecting the accessible name.\n\t\treturn html`\n\t\t\t<nav role=\"navigation\">\n\t\t\t\t<slot @slotchange=${() => this._insertSeparators()}></slot>\n\t\t\t</nav>\n\t\t`\n\t}\n\n\tprivate _insertSeparators() {\n\t\tconst slot = this.shadowRoot?.querySelector('slot') as HTMLSlotElement | null\n\t\tif (!slot) return\n\t\tconst items = slot.assignedElements({ flatten: true })\n\t\t// Remove any previously-inserted separators.\n\t\tthis.querySelectorAll('[data-schmancy-sep]').forEach(el => el.remove())\n\t\titems.forEach((el, idx) => {\n\t\t\tif (idx === items.length - 1) return\n\t\t\tconst sep = document.createElement('span')\n\t\t\tsep.setAttribute('data-schmancy-sep', '')\n\t\t\tsep.setAttribute('aria-hidden', 'true')\n\t\t\tsep.setAttribute('part', 'separator')\n\t\t\tsep.className = 'sep'\n\t\t\tsep.textContent = this.separator\n\t\t\tel.insertAdjacentElement('afterend', sep)\n\t\t})\n\t}\n}\n\n/**\n * Individual breadcrumb item. Renders as a link when `href` is provided,\n * otherwise as a plain span (represents the current page).\n *\n * @element schmancy-breadcrumb-item\n * @slot - Label content.\n * @attr href - If set, renders as an anchor.\n * @attr current - Marks as `aria-current=\"page\"`.\n */\n@customElement('schmancy-breadcrumb-item')\nexport class SchmancyBreadcrumbItem extends SchmancyElement {\n\tstatic styles = [css`\n\t:host {\n\t\tdisplay: inline-block;\n\t}\n\ta, span {\n\t\tcolor: inherit;\n\t\ttext-decoration: none;\n\t}\n\ta:hover {\n\t\ttext-decoration: underline;\n\t}\n`];\n\t@property({ type: String }) href = ''\n\t@property({ type: Boolean, reflect: true }) current = false\n\n\trender() {\n\t\tif (this.href && !this.current) {\n\t\t\treturn html`<a href=${this.href}><slot></slot></a>`\n\t\t}\n\t\treturn html`<span aria-current=${this.current ? 'page' : 'false'}><slot></slot></span>`\n\t}\n}\n\ndeclare global {\n\tinterface HTMLElementTagNameMap {\n\t\t'schmancy-breadcrumb': SchmancyBreadcrumb\n\t\t'schmancy-breadcrumb-item': SchmancyBreadcrumbItem\n\t}\n}\n"],"mappings":"wOAcO,IAAA,EAAA,cAAiC,EAAA,CAAA,CAAA,YAAA,GAAA,EAAA,CAAA,MAAA,GAAA,EAAA,CAAA,KAAA,UAoBC,IAAA,OAAA,KAAA,OAnBxB,CAAC,EAAA,GAAG;;;;;;;;;;;;;;;;;;GAqBpB,mBAAA,CACC,MAAM,mBAAA,CACD,KAAK,aAAa,aAAA,EAAe,KAAK,aAAa,aAAc,aAAA,CAGvE,QAAA,CAIC,MAAO,GAAA,IAAI;;4BAEiB,KAAK,mBAAA,CAAA;;IAKlC,mBAAA,CACC,IAAM,EAAO,KAAK,YAAY,cAAc,OAAA,CAC5C,GAAA,CAAK,EAAM,OACX,IAAM,EAAQ,EAAK,iBAAiB,CAAE,QAAA,CAAS,EAAA,CAAA,CAE/C,KAAK,iBAAiB,sBAAA,CAAuB,QAAQ,GAAM,EAAG,QAAA,CAAA,CAC9D,EAAM,SAAS,EAAI,IAAA,CAClB,G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AA,CAAA"}
@@ -1,5 +1,5 @@
1
- import { s as e } from "./mixins-BV0w2yIE.js";
2
- import { t } from "./decorate-23nYs4Le.js";
1
+ import { c as e } from "./mixins-BWb9_e1s.js";
2
+ import { a as t } from "./active-host-BP0zy_Y9.js";
3
3
  import { customElement as n, property as r } from "lit/decorators.js";
4
4
  import { css as i, html as a } from "lit";
5
5
  var o = class extends e {
@@ -1 +1 @@
1
- {"version":3,"file":"breadcrumb.js","names":[],"sources":["../src/breadcrumb/breadcrumb.ts"],"sourcesContent":["import { SchmancyElement } from '@mixins/index'\nimport { css, html } from 'lit'\nimport { customElement, property } from 'lit/decorators.js'\n\n/**\n * Breadcrumb navigation container. Wraps a list of `schmancy-breadcrumb-item`\n * elements with the correct ARIA landmark and semantics.\n *\n * @element schmancy-breadcrumb\n * @slot - Default slot for `<schmancy-breadcrumb-item>` children.\n * @attr separator - Character or string rendered between items. Default `/`.\n * @csspart separator - The separator element.\n */\n@customElement('schmancy-breadcrumb')\nexport class SchmancyBreadcrumb extends SchmancyElement {\n\tstatic styles = [css`\n\t:host {\n\t\tdisplay: block;\n\t}\n\tnav {\n\t\tdisplay: flex;\n\t\tflex-wrap: wrap;\n\t\talign-items: center;\n\t\tgap: 0.25rem;\n\t}\n\t.sep {\n\t\tcolor: var(--schmancy-sys-color-surface-onVariant, #79747e);\n\t\tuser-select: none;\n\t\tpadding: 0 0.25rem;\n\t}\n\t::slotted(schmancy-breadcrumb-item:last-of-type) {\n\t\tfont-weight: 500;\n\t}\n`];\n\t@property({ type: String }) separator = '/'\n\n\tconnectedCallback(): void {\n\t\tsuper.connectedCallback()\n\t\tif (!this.hasAttribute('aria-label')) this.setAttribute('aria-label', 'Breadcrumb')\n\t}\n\n\trender() {\n\t\t// Render separators between slotted items by manipulating after render.\n\t\t// The simpler approach uses the CSS adjacent-sibling pattern so the\n\t\t// separator is visually present without affecting the accessible name.\n\t\treturn html`\n\t\t\t<nav role=\"navigation\">\n\t\t\t\t<slot @slotchange=${() => this._insertSeparators()}></slot>\n\t\t\t</nav>\n\t\t`\n\t}\n\n\tprivate _insertSeparators() {\n\t\tconst slot = this.shadowRoot?.querySelector('slot') as HTMLSlotElement | null\n\t\tif (!slot) return\n\t\tconst items = slot.assignedElements({ flatten: true })\n\t\t// Remove any previously-inserted separators.\n\t\tthis.querySelectorAll('[data-schmancy-sep]').forEach(el => el.remove())\n\t\titems.forEach((el, idx) => {\n\t\t\tif (idx === items.length - 1) return\n\t\t\tconst sep = document.createElement('span')\n\t\t\tsep.setAttribute('data-schmancy-sep', '')\n\t\t\tsep.setAttribute('aria-hidden', 'true')\n\t\t\tsep.setAttribute('part', 'separator')\n\t\t\tsep.className = 'sep'\n\t\t\tsep.textContent = this.separator\n\t\t\tel.insertAdjacentElement('afterend', sep)\n\t\t})\n\t}\n}\n\n/**\n * Individual breadcrumb item. Renders as a link when `href` is provided,\n * otherwise as a plain span (represents the current page).\n *\n * @element schmancy-breadcrumb-item\n * @slot - Label content.\n * @attr href - If set, renders as an anchor.\n * @attr current - Marks as `aria-current=\"page\"`.\n */\n@customElement('schmancy-breadcrumb-item')\nexport class SchmancyBreadcrumbItem extends SchmancyElement {\n\tstatic styles = [css`\n\t:host {\n\t\tdisplay: inline-block;\n\t}\n\ta, span {\n\t\tcolor: inherit;\n\t\ttext-decoration: none;\n\t}\n\ta:hover {\n\t\ttext-decoration: underline;\n\t}\n`];\n\t@property({ type: String }) href = ''\n\t@property({ type: Boolean, reflect: true }) current = false\n\n\trender() {\n\t\tif (this.href && !this.current) {\n\t\t\treturn html`<a href=${this.href}><slot></slot></a>`\n\t\t}\n\t\treturn html`<span aria-current=${this.current ? 'page' : 'false'}><slot></slot></span>`\n\t}\n}\n\ndeclare global {\n\tinterface HTMLElementTagNameMap {\n\t\t'schmancy-breadcrumb': SchmancyBreadcrumb\n\t\t'schmancy-breadcrumb-item': SchmancyBreadcrumbItem\n\t}\n}\n"],"mappings":";;;;AAcO,IAAA,IAAA,cAAiC,EAAA;CAAA,YA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PzD,EAAS,EAAE,MAAM,QAAA,CAAA,CAAA,EAAS,EAAA,WAAA,QAAA,KAAA,EAAA,EAAA,EAAA,CAC1B,EAAS;CAAE,MAAM;CAAS,SAAA,CAAS;CAAA,CAAA,CAAA,EAAO,EAAA,WAAA,WAAA,KAAA,EAAA,EAAA,IAAA,EAAA,CAf3C,EAAc,2BAAA,CAAA,EAA2B,EAAA;AAAA,SAAA,KAAA,oBAAA,KAAA"}
1
+ {"version":3,"file":"breadcrumb.js","names":[],"sources":["../src/breadcrumb/breadcrumb.ts"],"sourcesContent":["import { SchmancyElement } from '@mixins/index'\nimport { css, html } from 'lit'\nimport { customElement, property } from 'lit/decorators.js'\n\n/**\n * Breadcrumb navigation container. Wraps a list of `schmancy-breadcrumb-item`\n * elements with the correct ARIA landmark and semantics.\n *\n * @element schmancy-breadcrumb\n * @slot - Default slot for `<schmancy-breadcrumb-item>` children.\n * @attr separator - Character or string rendered between items. Default `/`.\n * @csspart separator - The separator element.\n */\n@customElement('schmancy-breadcrumb')\nexport class SchmancyBreadcrumb extends SchmancyElement {\n\tstatic styles = [css`\n\t:host {\n\t\tdisplay: block;\n\t}\n\tnav {\n\t\tdisplay: flex;\n\t\tflex-wrap: wrap;\n\t\talign-items: center;\n\t\tgap: 0.25rem;\n\t}\n\t.sep {\n\t\tcolor: var(--schmancy-sys-color-surface-onVariant, #79747e);\n\t\tuser-select: none;\n\t\tpadding: 0 0.25rem;\n\t}\n\t::slotted(schmancy-breadcrumb-item:last-of-type) {\n\t\tfont-weight: 500;\n\t}\n`];\n\t@property({ type: String }) separator = '/'\n\n\tconnectedCallback(): void {\n\t\tsuper.connectedCallback()\n\t\tif (!this.hasAttribute('aria-label')) this.setAttribute('aria-label', 'Breadcrumb')\n\t}\n\n\trender() {\n\t\t// Render separators between slotted items by manipulating after render.\n\t\t// The simpler approach uses the CSS adjacent-sibling pattern so the\n\t\t// separator is visually present without affecting the accessible name.\n\t\treturn html`\n\t\t\t<nav role=\"navigation\">\n\t\t\t\t<slot @slotchange=${() => this._insertSeparators()}></slot>\n\t\t\t</nav>\n\t\t`\n\t}\n\n\tprivate _insertSeparators() {\n\t\tconst slot = this.shadowRoot?.querySelector('slot') as HTMLSlotElement | null\n\t\tif (!slot) return\n\t\tconst items = slot.assignedElements({ flatten: true })\n\t\t// Remove any previously-inserted separators.\n\t\tthis.querySelectorAll('[data-schmancy-sep]').forEach(el => el.remove())\n\t\titems.forEach((el, idx) => {\n\t\t\tif (idx === items.length - 1) return\n\t\t\tconst sep = document.createElement('span')\n\t\t\tsep.setAttribute('data-schmancy-sep', '')\n\t\t\tsep.setAttribute('aria-hidden', 'true')\n\t\t\tsep.setAttribute('part', 'separator')\n\t\t\tsep.className = 'sep'\n\t\t\tsep.textContent = this.separator\n\t\t\tel.insertAdjacentElement('afterend', sep)\n\t\t})\n\t}\n}\n\n/**\n * Individual breadcrumb item. Renders as a link when `href` is provided,\n * otherwise as a plain span (represents the current page).\n *\n * @element schmancy-breadcrumb-item\n * @slot - Label content.\n * @attr href - If set, renders as an anchor.\n * @attr current - Marks as `aria-current=\"page\"`.\n */\n@customElement('schmancy-breadcrumb-item')\nexport class SchmancyBreadcrumbItem extends SchmancyElement {\n\tstatic styles = [css`\n\t:host {\n\t\tdisplay: inline-block;\n\t}\n\ta, span {\n\t\tcolor: inherit;\n\t\ttext-decoration: none;\n\t}\n\ta:hover {\n\t\ttext-decoration: underline;\n\t}\n`];\n\t@property({ type: String }) href = ''\n\t@property({ type: Boolean, reflect: true }) current = false\n\n\trender() {\n\t\tif (this.href && !this.current) {\n\t\t\treturn html`<a href=${this.href}><slot></slot></a>`\n\t\t}\n\t\treturn html`<span aria-current=${this.current ? 'page' : 'false'}><slot></slot></span>`\n\t}\n}\n\ndeclare global {\n\tinterface HTMLElementTagNameMap {\n\t\t'schmancy-breadcrumb': SchmancyBreadcrumb\n\t\t'schmancy-breadcrumb-item': SchmancyBreadcrumbItem\n\t}\n}\n"],"mappings":";;;;AAcO,IAAA,IAAA,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