@mhmo91/schmancy 0.10.24 → 0.10.25

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 (426) hide show
  1. package/dist/agent/{overlay.confirm-body-CvdVfCnN.js → overlay.confirm-body-DozUyDYx.js} +242 -242
  2. package/dist/agent/{overlay.confirm-body-CvdVfCnN.js.map → overlay.confirm-body-DozUyDYx.js.map} +1 -1
  3. package/dist/agent/schmancy.agent.js +5658 -2927
  4. package/dist/agent/schmancy.agent.js.map +1 -1
  5. package/dist/{area-A_oUP4P1.js → area-1EG1LrkX.js} +1 -1
  6. package/dist/{area-A_oUP4P1.js.map → area-1EG1LrkX.js.map} +1 -1
  7. package/dist/{area-BuqdaUpQ.cjs → area-DrVE5pXW.cjs} +1 -1
  8. package/dist/{area-BuqdaUpQ.cjs.map → area-DrVE5pXW.cjs.map} +1 -1
  9. package/dist/area.cjs +1 -1
  10. package/dist/area.js +1 -1
  11. package/dist/{autocomplete-Cy46gJxK.cjs → autocomplete-6pdZxEab.cjs} +1 -1
  12. package/dist/{autocomplete-Cy46gJxK.cjs.map → autocomplete-6pdZxEab.cjs.map} +1 -1
  13. package/dist/{autocomplete-BoCWO26L.js → autocomplete-nrIcCilw.js} +2 -2
  14. package/dist/{autocomplete-BoCWO26L.js.map → autocomplete-nrIcCilw.js.map} +1 -1
  15. package/dist/autocomplete.cjs +1 -1
  16. package/dist/autocomplete.js +1 -1
  17. package/dist/avatar.cjs +2 -2
  18. package/dist/avatar.cjs.map +1 -1
  19. package/dist/avatar.js +3 -3
  20. package/dist/badge.cjs +1 -1
  21. package/dist/badge.js +1 -1
  22. package/dist/{boat-B0h5fuAA.js → boat--fLgbDAE.js} +3 -3
  23. package/dist/{boat-B0h5fuAA.js.map → boat--fLgbDAE.js.map} +1 -1
  24. package/dist/{boat-RRtBhD3x.cjs → boat-BIB-gPqy.cjs} +1 -1
  25. package/dist/{boat-RRtBhD3x.cjs.map → boat-BIB-gPqy.cjs.map} +1 -1
  26. package/dist/boat.cjs +1 -1
  27. package/dist/boat.js +1 -1
  28. package/dist/breadcrumb.cjs +1 -1
  29. package/dist/breadcrumb.js +1 -1
  30. package/dist/{busy-Bn6Pioo8.cjs → busy-DVCIxBVf.cjs} +1 -1
  31. package/dist/{busy-Bn6Pioo8.cjs.map → busy-DVCIxBVf.cjs.map} +1 -1
  32. package/dist/{busy-DObY7lfu.js → busy-DshZcVZ4.js} +1 -1
  33. package/dist/{busy-DObY7lfu.js.map → busy-DshZcVZ4.js.map} +1 -1
  34. package/dist/busy.cjs +1 -1
  35. package/dist/busy.js +1 -1
  36. package/dist/{button-DEi3M2nV.js → button-D9UJ7I6Z.js} +2 -2
  37. package/dist/{button-DEi3M2nV.js.map → button-D9UJ7I6Z.js.map} +1 -1
  38. package/dist/{button-XfdPzfZQ.cjs → button-JrTMzwHY.cjs} +1 -1
  39. package/dist/{button-XfdPzfZQ.cjs.map → button-JrTMzwHY.cjs.map} +1 -1
  40. package/dist/button.cjs +1 -1
  41. package/dist/button.js +1 -1
  42. package/dist/{card-jzUQK0EQ.js → card-BvCFuX3J.js} +2 -2
  43. package/dist/{card-jzUQK0EQ.js.map → card-BvCFuX3J.js.map} +1 -1
  44. package/dist/{card-BjUgRzFh.cjs → card-CTotavhH.cjs} +1 -1
  45. package/dist/{card-BjUgRzFh.cjs.map → card-CTotavhH.cjs.map} +1 -1
  46. package/dist/card.cjs +1 -1
  47. package/dist/card.js +1 -1
  48. package/dist/{checkbox-rskgUBxQ.cjs → checkbox-By4fFmjt.cjs} +1 -1
  49. package/dist/{checkbox-rskgUBxQ.cjs.map → checkbox-By4fFmjt.cjs.map} +1 -1
  50. package/dist/{checkbox-CfCm1vGN.js → checkbox-GPsdCUbs.js} +1 -1
  51. package/dist/{checkbox-CfCm1vGN.js.map → checkbox-GPsdCUbs.js.map} +1 -1
  52. package/dist/checkbox.cjs +1 -1
  53. package/dist/checkbox.js +1 -1
  54. package/dist/{chips-Dfim_tQv.js → chips-27umqnat.js} +4 -4
  55. package/dist/{chips-Dfim_tQv.js.map → chips-27umqnat.js.map} +1 -1
  56. package/dist/{chips-BiNZKu0J.cjs → chips-BZf9sGA8.cjs} +1 -1
  57. package/dist/{chips-BiNZKu0J.cjs.map → chips-BZf9sGA8.cjs.map} +1 -1
  58. package/dist/chips.cjs +1 -1
  59. package/dist/chips.js +2 -2
  60. package/dist/connectivity.cjs +1 -1
  61. package/dist/connectivity.js +1 -1
  62. package/dist/content-drawer.cjs +1 -1
  63. package/dist/content-drawer.js +1 -1
  64. package/dist/{cursor-glow-Cs2XLDB9.js → cursor-glow-Ah7VXSj7.js} +1 -1
  65. package/dist/{cursor-glow-Cs2XLDB9.js.map → cursor-glow-Ah7VXSj7.js.map} +1 -1
  66. package/dist/{cursor-glow-C8LgCxpI.cjs → cursor-glow-Bulq-38P.cjs} +1 -1
  67. package/dist/{cursor-glow-C8LgCxpI.cjs.map → cursor-glow-Bulq-38P.cjs.map} +1 -1
  68. package/dist/{date-range-em7OwhlK.cjs → date-range-BJnLWCRF.cjs} +1 -1
  69. package/dist/{date-range-em7OwhlK.cjs.map → date-range-BJnLWCRF.cjs.map} +1 -1
  70. package/dist/{date-range-inline-DYeqoBIO.cjs → date-range-inline-B6uKUliV.cjs} +1 -1
  71. package/dist/{date-range-inline-DYeqoBIO.cjs.map → date-range-inline-B6uKUliV.cjs.map} +1 -1
  72. package/dist/{date-range-inline-BfUL8_vX.js → date-range-inline-BNbbRfIA.js} +1 -1
  73. package/dist/{date-range-inline-BfUL8_vX.js.map → date-range-inline-BNbbRfIA.js.map} +1 -1
  74. package/dist/date-range-inline.cjs +1 -1
  75. package/dist/date-range-inline.js +1 -1
  76. package/dist/{date-range-B8zoj6Cj.js → date-range-wDVHcr0u.js} +2 -2
  77. package/dist/{date-range-B8zoj6Cj.js.map → date-range-wDVHcr0u.js.map} +1 -1
  78. package/dist/date-range.cjs +1 -1
  79. package/dist/date-range.js +1 -1
  80. package/dist/delay.cjs +1 -1
  81. package/dist/delay.js +2 -2
  82. package/dist/{details-D246xN83.js → details-Ckxpwacj.js} +4 -4
  83. package/dist/{details-D246xN83.js.map → details-Ckxpwacj.js.map} +1 -1
  84. package/dist/{details-CNM1tuma.cjs → details-DNrWIes6.cjs} +1 -1
  85. package/dist/{details-CNM1tuma.cjs.map → details-DNrWIes6.cjs.map} +1 -1
  86. package/dist/details.cjs +1 -1
  87. package/dist/details.js +1 -1
  88. package/dist/directives-BBMqe8x3.js +4082 -0
  89. package/dist/directives-BBMqe8x3.js.map +1 -0
  90. package/dist/directives-F15SJZUR.cjs +348 -0
  91. package/dist/directives-F15SJZUR.cjs.map +1 -0
  92. package/dist/directives.cjs +1 -99
  93. package/dist/directives.js +6 -1363
  94. package/dist/discovery.cjs +1 -1
  95. package/dist/discovery.js +2 -61
  96. package/dist/discovery.service-COmbHaoI.js +61 -0
  97. package/dist/discovery.service-COmbHaoI.js.map +1 -0
  98. package/dist/discovery.service-CVDXO9rH.cjs +1 -0
  99. package/dist/discovery.service-CVDXO9rH.cjs.map +1 -0
  100. package/dist/{divider-CbIp1je9.js → divider-BzcZGo4S.js} +1 -1
  101. package/dist/{divider-CbIp1je9.js.map → divider-BzcZGo4S.js.map} +1 -1
  102. package/dist/{divider-DaKsGNW-.cjs → divider-Cde33ivs.cjs} +1 -1
  103. package/dist/{divider-DaKsGNW-.cjs.map → divider-Cde33ivs.cjs.map} +1 -1
  104. package/dist/divider.cjs +1 -1
  105. package/dist/divider.js +1 -1
  106. package/dist/dropdown.cjs +1 -1
  107. package/dist/dropdown.js +1 -1
  108. package/dist/{expand-DRkiO4vw.js → expand-DI144OzN.js} +3 -3
  109. package/dist/{expand-DRkiO4vw.js.map → expand-DI144OzN.js.map} +1 -1
  110. package/dist/{expand-CQDm3BF3.cjs → expand-Db4V0jj-.cjs} +1 -1
  111. package/dist/{expand-CQDm3BF3.cjs.map → expand-Db4V0jj-.cjs.map} +1 -1
  112. package/dist/expand.cjs +1 -1
  113. package/dist/expand.js +1 -1
  114. package/dist/{float-5O26zNRh.cjs → float--RScf9BZ.cjs} +1 -1
  115. package/dist/{float-5O26zNRh.cjs.map → float--RScf9BZ.cjs.map} +1 -1
  116. package/dist/{float-CZtu8FnO.js → float-DIyzy1c2.js} +1 -1
  117. package/dist/{float-CZtu8FnO.js.map → float-DIyzy1c2.js.map} +1 -1
  118. package/dist/float.cjs +1 -1
  119. package/dist/float.js +1 -1
  120. package/dist/{form-B90CMeqs.cjs → form-DWNpOsIU.cjs} +1 -1
  121. package/dist/{form-B90CMeqs.cjs.map → form-DWNpOsIU.cjs.map} +1 -1
  122. package/dist/{form-CE6Gwz4r.js → form-RtXH8UHQ.js} +8 -8
  123. package/dist/{form-CE6Gwz4r.js.map → form-RtXH8UHQ.js.map} +1 -1
  124. package/dist/form.cjs +1 -1
  125. package/dist/form.js +6 -6
  126. package/dist/handover/agent-runtime-followups.md +1 -1
  127. package/dist/handover/agent-runtime-v1.md +3 -3
  128. package/dist/{hashContent-dJrI-9sc.js.map → hashContent-Dgmzc32o.js.map} +1 -1
  129. package/dist/{hashContent-Ck6laKlk.cjs.map → hashContent-Dh1VzIAb.cjs.map} +1 -1
  130. package/dist/icons-DXanGDZ_.js +52 -0
  131. package/dist/icons-DXanGDZ_.js.map +1 -0
  132. package/dist/icons-bNxlWLlk.cjs +24 -0
  133. package/dist/icons-bNxlWLlk.cjs.map +1 -0
  134. package/dist/icons.cjs +1 -1
  135. package/dist/icons.js +1 -1
  136. package/dist/{iframe-D98csbEo.cjs → iframe-B1XWRaLC.cjs} +1 -1
  137. package/dist/{iframe-D98csbEo.cjs.map → iframe-B1XWRaLC.cjs.map} +1 -1
  138. package/dist/{iframe-C3PMj1MD.js → iframe-BlHK0cjy.js} +1 -1
  139. package/dist/{iframe-C3PMj1MD.js.map → iframe-BlHK0cjy.js.map} +1 -1
  140. package/dist/iframe.cjs +1 -1
  141. package/dist/iframe.js +1 -1
  142. package/dist/index.cjs +1 -1
  143. package/dist/index.js +60 -60
  144. package/dist/{input-_y92Pzon.cjs → input-C-_XU9AX.cjs} +1 -1
  145. package/dist/{input-_y92Pzon.cjs.map → input-C-_XU9AX.cjs.map} +1 -1
  146. package/dist/{input-CCOkeeVM.js → input-CiGa8Dkl.js} +1 -1
  147. package/dist/{input-CCOkeeVM.js.map → input-CiGa8Dkl.js.map} +1 -1
  148. package/dist/{input-chip-CR66MWml.cjs → input-chip-5aYnuRZ_.cjs} +1 -1
  149. package/dist/{input-chip-CR66MWml.cjs.map → input-chip-5aYnuRZ_.cjs.map} +1 -1
  150. package/dist/{input-chip-Bzwr5-XL.js → input-chip-l--zCMGR.js} +1 -1
  151. package/dist/{input-chip-Bzwr5-XL.js.map → input-chip-l--zCMGR.js.map} +1 -1
  152. package/dist/input.cjs +1 -1
  153. package/dist/input.js +1 -1
  154. package/dist/json.cjs +1 -1
  155. package/dist/json.js +2 -2
  156. package/dist/kbd.cjs +1 -1
  157. package/dist/kbd.js +1 -1
  158. package/dist/{layout-Dq2oeOTS.js → layout-DSAjo92m.js} +1 -1
  159. package/dist/{layout-Dq2oeOTS.js.map → layout-DSAjo92m.js.map} +1 -1
  160. package/dist/{layout-BbCIfIgo.cjs → layout-eXb9wjDh.cjs} +1 -1
  161. package/dist/{layout-BbCIfIgo.cjs.map → layout-eXb9wjDh.cjs.map} +1 -1
  162. package/dist/layout.cjs +1 -1
  163. package/dist/layout.js +1 -1
  164. package/dist/{lightbox-Bk3ovcVu.cjs → lightbox-CfRDkeeb.cjs} +2 -2
  165. package/dist/{lightbox-Bk3ovcVu.cjs.map → lightbox-CfRDkeeb.cjs.map} +1 -1
  166. package/dist/{lightbox-Dl--fEbP.js → lightbox-D9oiu1Nv.js} +2 -2
  167. package/dist/{lightbox-Dl--fEbP.js.map → lightbox-D9oiu1Nv.js.map} +1 -1
  168. package/dist/lightbox.cjs +1 -1
  169. package/dist/lightbox.js +1 -1
  170. package/dist/{list-B3WI_Nfs.js → list-BOlRka4v.js} +1 -1
  171. package/dist/{list-B3WI_Nfs.js.map → list-BOlRka4v.js.map} +1 -1
  172. package/dist/{list-DWngbP2X.cjs → list-CDJi3_Ut.cjs} +1 -1
  173. package/dist/{list-DWngbP2X.cjs.map → list-CDJi3_Ut.cjs.map} +1 -1
  174. package/dist/list.cjs +1 -1
  175. package/dist/list.js +1 -1
  176. package/dist/{magnetic-Bgh7aHHI.cjs → magnetic-D-ph029G.cjs} +1 -1
  177. package/dist/{magnetic-Bgh7aHHI.cjs.map → magnetic-D-ph029G.cjs.map} +1 -1
  178. package/dist/{magnetic-DxvoEz8_.js → magnetic-mHXl54Z8.js} +1 -1
  179. package/dist/{magnetic-DxvoEz8_.js.map → magnetic-mHXl54Z8.js.map} +1 -1
  180. package/dist/{menu-CdYjxJqm.cjs → menu-CJaDL2cd.cjs} +1 -1
  181. package/dist/{menu-CdYjxJqm.cjs.map → menu-CJaDL2cd.cjs.map} +1 -1
  182. package/dist/{menu-IDhVp6zm.js → menu-XyrLmCi_.js} +2 -2
  183. package/dist/{menu-IDhVp6zm.js.map → menu-XyrLmCi_.js.map} +1 -1
  184. package/dist/menu.cjs +1 -1
  185. package/dist/menu.js +1 -1
  186. package/dist/mixins-CsYsIJOI.cjs +254 -0
  187. package/dist/mixins-CsYsIJOI.cjs.map +1 -0
  188. package/dist/mixins-DySzfmal.js +642 -0
  189. package/dist/mixins-DySzfmal.js.map +1 -0
  190. package/dist/mixins.cjs +1 -1
  191. package/dist/mixins.js +2 -2
  192. package/dist/nav-drawer.cjs +1 -1
  193. package/dist/nav-drawer.js +1 -1
  194. package/dist/navigation-bar.cjs +1 -1
  195. package/dist/navigation-bar.js +1 -1
  196. package/dist/navigation-rail.cjs +5 -9
  197. package/dist/navigation-rail.cjs.map +1 -1
  198. package/dist/navigation-rail.js +5 -11
  199. package/dist/navigation-rail.js.map +1 -1
  200. package/dist/{notification-CllYkvlR.js → notification-CHrEY4u8.js} +2 -2
  201. package/dist/{notification-CllYkvlR.js.map → notification-CHrEY4u8.js.map} +1 -1
  202. package/dist/{notification-B3wVUC8l.cjs → notification-DKp4tjaB.cjs} +1 -1
  203. package/dist/{notification-B3wVUC8l.cjs.map → notification-DKp4tjaB.cjs.map} +1 -1
  204. package/dist/notification.cjs +1 -1
  205. package/dist/notification.js +1 -1
  206. package/dist/{option-CPOL0nHL.js → option-Vpy4UQ-D.js} +1 -1
  207. package/dist/{option-CPOL0nHL.js.map → option-Vpy4UQ-D.js.map} +1 -1
  208. package/dist/{option-cRsdshy8.cjs → option-nRk4MuXH.cjs} +1 -1
  209. package/dist/{option-cRsdshy8.cjs.map → option-nRk4MuXH.cjs.map} +1 -1
  210. package/dist/option.cjs +1 -1
  211. package/dist/option.js +1 -1
  212. package/dist/{overlay-BnTvnNDc.cjs → overlay-HNrWZ4sB.cjs} +1 -1
  213. package/dist/{overlay-BnTvnNDc.cjs.map → overlay-HNrWZ4sB.cjs.map} +1 -1
  214. package/dist/{overlay-DJ-vlwtR.js → overlay-jlkcrt8F.js} +5 -5
  215. package/dist/{overlay-DJ-vlwtR.js.map → overlay-jlkcrt8F.js.map} +1 -1
  216. package/dist/{overlay-stack-Dk0xETTy.cjs.map → overlay-stack-Bdr9lOqi.cjs.map} +1 -1
  217. package/dist/{overlay-stack-BR4iYivO.js.map → overlay-stack-D2rgxQLh.js.map} +1 -1
  218. package/dist/overlay.cjs +1 -1
  219. package/dist/{overlay.confirm-body-CQ-FwySO.cjs → overlay.confirm-body-B8dFI3cj.cjs} +1 -1
  220. package/dist/{overlay.confirm-body-CQ-FwySO.cjs.map → overlay.confirm-body-B8dFI3cj.cjs.map} +1 -1
  221. package/dist/{overlay.confirm-body-DEb9xw5N.js → overlay.confirm-body-CYShkjI6.js} +1 -1
  222. package/dist/{overlay.confirm-body-DEb9xw5N.js.map → overlay.confirm-body-CYShkjI6.js.map} +1 -1
  223. package/dist/overlay.js +3 -3
  224. package/dist/{overlay.service-CKBCIP2f.cjs → overlay.service-BTPn7Uv7.cjs} +1 -1
  225. package/dist/{overlay.service-CKBCIP2f.cjs.map → overlay.service-BTPn7Uv7.cjs.map} +1 -1
  226. package/dist/{overlay.service-XM1YHkTk.js → overlay.service-BqhhxVJp.js} +2 -2
  227. package/dist/{overlay.service-XM1YHkTk.js.map → overlay.service-BqhhxVJp.js.map} +1 -1
  228. package/dist/{progress-CnMPp-9a.js → progress-8Bn88GK_.js} +1 -1
  229. package/dist/{progress-CnMPp-9a.js.map → progress-8Bn88GK_.js.map} +1 -1
  230. package/dist/{progress-CcfLfHOE.cjs → progress-CAp_4jtq.cjs} +1 -1
  231. package/dist/{progress-CcfLfHOE.cjs.map → progress-CAp_4jtq.cjs.map} +1 -1
  232. package/dist/progress.cjs +1 -1
  233. package/dist/progress.js +1 -1
  234. package/dist/{radio-group-D97hflrE.cjs → radio-group-CN44mAoc.cjs} +1 -1
  235. package/dist/{radio-group-D97hflrE.cjs.map → radio-group-CN44mAoc.cjs.map} +1 -1
  236. package/dist/{radio-group-BUJgfQFi.js → radio-group-GNHA7qJR.js} +1 -1
  237. package/dist/{radio-group-BUJgfQFi.js.map → radio-group-GNHA7qJR.js.map} +1 -1
  238. package/dist/radio-group.cjs +1 -1
  239. package/dist/radio-group.js +1 -1
  240. package/dist/range.cjs +1 -1
  241. package/dist/range.js +1 -1
  242. package/dist/{reduced-motion-D7LqTUMn.js.map → reduced-motion-D-L12p7G.js.map} +1 -1
  243. package/dist/{reduced-motion-Dzfp_w5x.cjs.map → reduced-motion-Ds-HjMzn.cjs.map} +1 -1
  244. package/dist/{rxjs-utils-BK8VMe3K.js.map → rxjs-utils-BXpvHN4-.js.map} +1 -1
  245. package/dist/{rxjs-utils-DhOKenkS.cjs.map → rxjs-utils-CaC-tdot.cjs.map} +1 -1
  246. package/dist/rxjs-utils.cjs +1 -1
  247. package/dist/rxjs-utils.js +1 -1
  248. package/dist/{select-BWEh5nRM.js → select-BnuXRHS4.js} +3 -3
  249. package/dist/{select-BWEh5nRM.js.map → select-BnuXRHS4.js.map} +1 -1
  250. package/dist/{select-Cv5Oev6d.cjs → select-DZNns5Pa.cjs} +2 -2
  251. package/dist/{select-Cv5Oev6d.cjs.map → select-DZNns5Pa.cjs.map} +1 -1
  252. package/dist/select.cjs +1 -1
  253. package/dist/select.js +1 -1
  254. package/dist/skeleton.cjs +1 -1
  255. package/dist/skeleton.js +1 -1
  256. package/dist/skills/INDEX.md +2 -1
  257. package/dist/skills/SKILL.md +33 -23
  258. package/dist/skills/area.md +5 -4
  259. package/dist/skills/connectivity.md +1 -3
  260. package/dist/skills/directives.md +36 -0
  261. package/dist/skills/icons.md +95 -31
  262. package/dist/skills/layout.md +36 -53
  263. package/dist/skills/mixins.md +26 -5
  264. package/dist/skills/schmancy/INDEX.md +2 -1
  265. package/dist/skills/schmancy/SKILL.md +33 -23
  266. package/dist/skills/schmancy/area.md +5 -4
  267. package/dist/skills/schmancy/connectivity.md +1 -3
  268. package/dist/skills/schmancy/directives.md +36 -0
  269. package/dist/skills/schmancy/icons.md +95 -31
  270. package/dist/skills/schmancy/layout.md +36 -53
  271. package/dist/skills/schmancy/mixins.md +26 -5
  272. package/dist/slider.cjs +1 -1
  273. package/dist/slider.js +1 -1
  274. package/dist/{splash-screen-B6w7X2z9.js → splash-screen-CUP_elaT.js} +1 -1
  275. package/dist/{splash-screen-B6w7X2z9.js.map → splash-screen-CUP_elaT.js.map} +1 -1
  276. package/dist/{splash-screen-DFtxtO2D.cjs → splash-screen-DeoPRrOu.cjs} +1 -1
  277. package/dist/{splash-screen-DFtxtO2D.cjs.map → splash-screen-DeoPRrOu.cjs.map} +1 -1
  278. package/dist/splash-screen.cjs +1 -1
  279. package/dist/splash-screen.js +1 -1
  280. package/dist/{src-D_NK-vMA.js → src-B1VkLX3l.js} +153 -153
  281. package/dist/{src-D_NK-vMA.js.map → src-B1VkLX3l.js.map} +1 -1
  282. package/dist/{src-Asw6A018.cjs → src-DQ4wr0qq.cjs} +13 -13
  283. package/dist/{src-Asw6A018.cjs.map → src-DQ4wr0qq.cjs.map} +1 -1
  284. package/dist/steps.cjs +1 -1
  285. package/dist/steps.js +1 -1
  286. package/dist/{surface-B94ka2LY.cjs → surface-LkaZQXZn.cjs} +1 -1
  287. package/dist/{surface-B94ka2LY.cjs.map → surface-LkaZQXZn.cjs.map} +1 -1
  288. package/dist/{surface-ctBcRGSZ.js → surface-hOvkrjGN.js} +1 -1
  289. package/dist/{surface-ctBcRGSZ.js.map → surface-hOvkrjGN.js.map} +1 -1
  290. package/dist/surface.cjs +1 -1
  291. package/dist/surface.js +1 -1
  292. package/dist/switch.cjs +1 -1
  293. package/dist/switch.js +1 -1
  294. package/dist/table.cjs +1 -1
  295. package/dist/table.js +1 -1
  296. package/dist/{tabs-CrMx5z_y.js → tabs-CfwIHhHo.js} +1 -1
  297. package/dist/{tabs-CrMx5z_y.js.map → tabs-CfwIHhHo.js.map} +1 -1
  298. package/dist/{tabs-B7kaZIom.cjs → tabs-bplzstz6.cjs} +1 -1
  299. package/dist/{tabs-B7kaZIom.cjs.map → tabs-bplzstz6.cjs.map} +1 -1
  300. package/dist/tabs.cjs +1 -1
  301. package/dist/tabs.js +1 -1
  302. package/dist/teleport.cjs +1 -1
  303. package/dist/teleport.js +1 -1
  304. package/dist/{textarea-DeHFl80i.js → textarea-C1A5xuw9.js} +1 -1
  305. package/dist/{textarea-DeHFl80i.js.map → textarea-C1A5xuw9.js.map} +1 -1
  306. package/dist/{textarea-D1crj8JD.cjs → textarea-hrDp5gQq.cjs} +1 -1
  307. package/dist/{textarea-D1crj8JD.cjs.map → textarea-hrDp5gQq.cjs.map} +1 -1
  308. package/dist/textarea.cjs +1 -1
  309. package/dist/textarea.js +1 -1
  310. package/dist/{theme-C7Yo33nh.js → theme-BniFOMEo.js} +3 -3
  311. package/dist/{theme-C7Yo33nh.js.map → theme-BniFOMEo.js.map} +1 -1
  312. package/dist/{theme-wE2N7Yu9.cjs → theme-DmR6PKV8.cjs} +2 -2
  313. package/dist/{theme-wE2N7Yu9.cjs.map → theme-DmR6PKV8.cjs.map} +1 -1
  314. package/dist/{theme-button-Cpc_hs2O.js → theme-button--ruZIb0T.js} +1 -1
  315. package/dist/{theme-button-Cpc_hs2O.js.map → theme-button--ruZIb0T.js.map} +1 -1
  316. package/dist/{theme-button-CXSM5We4.cjs → theme-button-a0LgZ7hQ.cjs} +1 -1
  317. package/dist/{theme-button-CXSM5We4.cjs.map → theme-button-a0LgZ7hQ.cjs.map} +1 -1
  318. package/dist/theme-button.cjs +1 -1
  319. package/dist/theme-button.js +1 -1
  320. package/dist/theme.cjs +1 -1
  321. package/dist/{theme.interface-D4NeufQA.cjs.map → theme.interface-B5xjEk74.cjs.map} +1 -1
  322. package/dist/{theme.interface-C2XNgsLB.js.map → theme.interface-DVEw3s8m.js.map} +1 -1
  323. package/dist/theme.js +4 -4
  324. package/dist/{theme.service-CSzNkqBB.js.map → theme.service-Bh08uOSJ.js.map} +1 -1
  325. package/dist/{theme.service-CnFUmUpc.cjs.map → theme.service-Y-e8b331.cjs.map} +1 -1
  326. package/dist/tree.cjs +1 -1
  327. package/dist/tree.js +1 -1
  328. package/dist/typography.cjs +1 -1
  329. package/dist/typography.js +1 -1
  330. package/dist/{utils-Cxg0Kfy5.js → utils-578eFTx4.js} +1 -1
  331. package/dist/{utils-Cxg0Kfy5.js.map → utils-578eFTx4.js.map} +1 -1
  332. package/dist/{utils-aCJYAGUr.cjs → utils-CVWUrECT.cjs} +1 -1
  333. package/dist/{utils-aCJYAGUr.cjs.map → utils-CVWUrECT.cjs.map} +1 -1
  334. package/dist/utils.cjs +1 -1
  335. package/dist/utils.js +2 -2
  336. package/dist/visually-hidden.cjs +1 -1
  337. package/dist/visually-hidden.js +1 -1
  338. package/dist/{window-JtkeHoxS.js → window-BT9JecWy.js} +5 -5
  339. package/dist/{window-JtkeHoxS.js.map → window-BT9JecWy.js.map} +1 -1
  340. package/dist/{window-Ck_zS4bb.cjs → window-Bp7zWZpu.cjs} +1 -1
  341. package/dist/{window-Ck_zS4bb.cjs.map → window-Bp7zWZpu.cjs.map} +1 -1
  342. package/dist/window.cjs +1 -1
  343. package/dist/window.js +1 -1
  344. package/package.json +1 -1
  345. package/skills/schmancy/INDEX.md +2 -1
  346. package/skills/schmancy/SKILL.md +33 -23
  347. package/skills/schmancy/area.md +5 -4
  348. package/skills/schmancy/connectivity.md +1 -3
  349. package/skills/schmancy/directives.md +36 -0
  350. package/skills/schmancy/icons.md +95 -31
  351. package/skills/schmancy/layout.md +36 -53
  352. package/skills/schmancy/mixins.md +26 -5
  353. package/src/directives/ai-badge.ts +95 -0
  354. package/src/directives/art/art.directive.ts +228 -0
  355. package/src/directives/art/effects/error.ts +192 -0
  356. package/src/directives/art/effects/funkhaus.ts +121 -0
  357. package/src/directives/art/effects/howl.ts +203 -0
  358. package/src/directives/art/effects/samwa.ts +228 -0
  359. package/src/directives/art/effects/snow.ts +207 -0
  360. package/src/directives/art/effects/starfield.ts +107 -0
  361. package/src/directives/art/index.ts +2 -0
  362. package/src/directives/art/particle-pool.ts +40 -0
  363. package/src/directives/art/types.ts +129 -0
  364. package/src/directives/art/utils.ts +35 -0
  365. package/src/directives/battery.ts +1014 -0
  366. package/src/directives/beta.ts +44 -0
  367. package/src/directives/fill.ts +32 -60
  368. package/src/directives/fyi.ts +551 -0
  369. package/src/directives/hummingbird.ts +1712 -0
  370. package/src/directives/index.ts +9 -0
  371. package/src/directives/missed-punch.ts +407 -0
  372. package/src/directives/urgent.ts +660 -0
  373. package/src/directives/working-snake.ts +294 -0
  374. package/src/icons/icon.ts +53 -30
  375. package/src/navigation-rail/navigation-rail-item.ts +7 -12
  376. package/src/navigation-rail/navigation-rail.ts +0 -2
  377. package/types/mixins/SchmancyElement.d.ts +31 -0
  378. package/types/src/directives/ai-badge.d.ts +15 -0
  379. package/types/src/directives/art/art.directive.d.ts +19 -0
  380. package/types/src/directives/art/effects/error.d.ts +7 -0
  381. package/types/src/directives/art/effects/funkhaus.d.ts +7 -0
  382. package/types/src/directives/art/effects/howl.d.ts +7 -0
  383. package/types/src/directives/art/effects/samwa.d.ts +7 -0
  384. package/types/src/directives/art/effects/snow.d.ts +7 -0
  385. package/types/src/directives/art/effects/starfield.d.ts +10 -0
  386. package/types/src/directives/art/index.d.ts +2 -0
  387. package/types/src/directives/art/particle-pool.d.ts +16 -0
  388. package/types/src/directives/art/types.d.ts +126 -0
  389. package/types/src/directives/art/utils.d.ts +5 -0
  390. package/types/src/directives/battery.d.ts +96 -0
  391. package/types/src/directives/beta.d.ts +33 -0
  392. package/types/src/directives/fill.d.ts +4 -11
  393. package/types/src/directives/fyi.d.ts +76 -0
  394. package/types/src/directives/hummingbird.d.ts +180 -0
  395. package/types/src/directives/index.d.ts +9 -0
  396. package/types/src/directives/missed-punch.d.ts +28 -0
  397. package/types/src/directives/urgent.d.ts +88 -0
  398. package/types/src/directives/working-snake.d.ts +46 -0
  399. package/types/src/icons/icon.d.ts +22 -0
  400. package/dist/directives.cjs.map +0 -1
  401. package/dist/directives.js.map +0 -1
  402. package/dist/discovery.cjs.map +0 -1
  403. package/dist/discovery.js.map +0 -1
  404. package/dist/icons-B7ppo07M.cjs +0 -33
  405. package/dist/icons-B7ppo07M.cjs.map +0 -1
  406. package/dist/icons-CGhozJ5v.js +0 -48
  407. package/dist/icons-CGhozJ5v.js.map +0 -1
  408. package/dist/mixins-BPUR4Kc4.cjs +0 -254
  409. package/dist/mixins-BPUR4Kc4.cjs.map +0 -1
  410. package/dist/mixins-C42OILRS.js +0 -636
  411. package/dist/mixins-C42OILRS.js.map +0 -1
  412. package/dist/skills/page.md +0 -84
  413. package/dist/skills/schmancy/page.md +0 -84
  414. package/skills/schmancy/page.md +0 -84
  415. /package/dist/{hashContent-dJrI-9sc.js → hashContent-Dgmzc32o.js} +0 -0
  416. /package/dist/{hashContent-Ck6laKlk.cjs → hashContent-Dh1VzIAb.cjs} +0 -0
  417. /package/dist/{overlay-stack-Dk0xETTy.cjs → overlay-stack-Bdr9lOqi.cjs} +0 -0
  418. /package/dist/{overlay-stack-BR4iYivO.js → overlay-stack-D2rgxQLh.js} +0 -0
  419. /package/dist/{reduced-motion-D7LqTUMn.js → reduced-motion-D-L12p7G.js} +0 -0
  420. /package/dist/{reduced-motion-Dzfp_w5x.cjs → reduced-motion-Ds-HjMzn.cjs} +0 -0
  421. /package/dist/{rxjs-utils-BK8VMe3K.js → rxjs-utils-BXpvHN4-.js} +0 -0
  422. /package/dist/{rxjs-utils-DhOKenkS.cjs → rxjs-utils-CaC-tdot.cjs} +0 -0
  423. /package/dist/{theme.interface-D4NeufQA.cjs → theme.interface-B5xjEk74.cjs} +0 -0
  424. /package/dist/{theme.interface-C2XNgsLB.js → theme.interface-DVEw3s8m.js} +0 -0
  425. /package/dist/{theme.service-CSzNkqBB.js → theme.service-Bh08uOSJ.js} +0 -0
  426. /package/dist/{theme.service-CnFUmUpc.cjs → theme.service-Y-e8b331.cjs} +0 -0
@@ -0,0 +1,660 @@
1
+ /**
2
+ * Urgent directive — shattering glass attention effect.
3
+ *
4
+ * Creates a dramatic shattering glass effect with particles exploding from the
5
+ * center. Uses GPU-accelerated CSS transforms and requestAnimationFrame for
6
+ * smooth 60fps animation.
7
+ *
8
+ * Designed for 100+ concurrent instances on a page:
9
+ * - Shared global container: single DOM container for all instances.
10
+ * - Shared animation loop: one rAF loop coordinates all shard updates.
11
+ * - Shared visibility observer: single IntersectionObserver for all elements.
12
+ * - Shared tab visibility: single document listener shared across instances.
13
+ * - Shared shard pool: global pool reduces memory allocation.
14
+ * - Throttled sound: prevents audio system saturation.
15
+ * - Staggered bursts: prevents all instances bursting simultaneously.
16
+ *
17
+ * @example
18
+ * ```ts
19
+ * // Basic usage — shattering glass when condition is true (auto mode)
20
+ * html`<button ${urgent(isOverdue)}>Confirm Delivery</button>`
21
+ *
22
+ * // With custom color (defaults to error color)
23
+ * html`<div ${urgent(needsAttention, 'warning')}>Action needed</div>`
24
+ *
25
+ * // Without shake
26
+ * html`<button ${urgent(isCritical, 'error', false)}>Critical</button>`
27
+ *
28
+ * // Using options object (default interval is 4000ms)
29
+ * html`<div ${urgent({ active: true, color: 'warning', interval: 5000 })}>Alert</div>`
30
+ *
31
+ * // Manual mode with controller
32
+ * const controller = urgent.getController(element)
33
+ * controller.play() // Single burst
34
+ * controller.start(1500) // Start interval at 1.5s
35
+ * controller.stop() // Stop interval
36
+ * ```
37
+ */
38
+
39
+ import { noChange } from 'lit'
40
+ import { AsyncDirective, directive } from 'lit/async-directive.js'
41
+ import type { ElementPart } from 'lit'
42
+ import { $sounds } from '../audio'
43
+
44
+ export type UrgentColor = 'error' | 'warning' | 'primary'
45
+ export type UrgentMode = 'auto' | 'manual'
46
+
47
+ export interface UrgentController {
48
+ /** Trigger a single burst of shards */
49
+ play(): void
50
+ /** Start the burst interval (auto mode behavior) */
51
+ start(intervalMs?: number): void
52
+ /** Stop the burst interval */
53
+ stop(): void
54
+ /** Whether the burst interval is currently running */
55
+ readonly isRunning: boolean
56
+ }
57
+
58
+ export interface UrgentOptions {
59
+ /** Whether the urgent effect should be active */
60
+ active?: boolean
61
+ /** Color scheme: 'error' (default) | 'warning' | 'primary' */
62
+ color?: UrgentColor
63
+ /** Whether to add shake animation (default: true) */
64
+ shake?: boolean
65
+ /** Mode: 'auto' creates bursts on interval, 'manual' requires controller (default: 'auto') */
66
+ mode?: UrgentMode
67
+ /** Interval between bursts in ms (default: 4000) */
68
+ interval?: number
69
+ }
70
+
71
+ interface ShardData {
72
+ x: number
73
+ y: number
74
+ vx: number
75
+ vy: number
76
+ rotation: number
77
+ rotationSpeed: number
78
+ initialScale: number
79
+ life: number
80
+ maxLife: number
81
+ element: HTMLElement
82
+ colorIndex: number
83
+ }
84
+
85
+ // Intentional effect-variant palettes — these are the visual identity of each
86
+ // urgent scheme, not theming tokens. Kept as hex on purpose.
87
+ const COLORS: Record<UrgentColor, readonly string[]> = {
88
+ error: ['#ef4444', '#dc2626', '#b91c1c', '#fca5a5', '#fee2e2'],
89
+ warning: ['#f59e0b', '#d97706', '#b45309', '#fcd34d', '#fef3c7'],
90
+ primary: ['#3b82f6', '#2563eb', '#1d4ed8', '#93c5fd', '#dbeafe'],
91
+ }
92
+
93
+ const COLOR_INDEX: Record<UrgentColor, number> = { error: 0, warning: 1, primary: 2 }
94
+
95
+ // ============================================================================
96
+ // SHARED GLOBAL RESOURCES (singleton)
97
+ // ============================================================================
98
+
99
+ class UrgentCoordinator {
100
+ private static instance: UrgentCoordinator | null = null
101
+
102
+ private container: HTMLElement | null = null
103
+ private stylesInjected = false
104
+
105
+ private shardPools: Map<number, HTMLElement[]> = new Map([
106
+ [0, []],
107
+ [1, []],
108
+ [2, []],
109
+ ])
110
+ private activeShards: ShardData[] = []
111
+
112
+ private animationId: number | null = null
113
+ private instances = new Set<UrgentDirective>()
114
+
115
+ private tabVisible = true
116
+ private visibilityObserver: IntersectionObserver | null = null
117
+ private elementVisibility = new WeakMap<HTMLElement, boolean>()
118
+ private observedElements = new WeakSet<HTMLElement>()
119
+
120
+ private lastSoundTime = 0
121
+ private readonly SOUND_THROTTLE_MS = 150
122
+
123
+ private constructor() {
124
+ document.addEventListener('visibilitychange', () => {
125
+ this.tabVisible = document.visibilityState === 'visible'
126
+ if (this.tabVisible) {
127
+ this.resumeAllAnimations()
128
+ this.startAnimationLoop()
129
+ } else {
130
+ this.pauseAllAnimations()
131
+ this.stopAnimationLoop()
132
+ this.clearAllShards()
133
+ }
134
+ })
135
+ }
136
+
137
+ static getInstance(): UrgentCoordinator {
138
+ if (!UrgentCoordinator.instance) {
139
+ UrgentCoordinator.instance = new UrgentCoordinator()
140
+ }
141
+ return UrgentCoordinator.instance
142
+ }
143
+
144
+ ensureInitialized(): void {
145
+ this.ensureStyles()
146
+ this.ensureContainer()
147
+ this.ensureObserver()
148
+ }
149
+
150
+ private ensureStyles(): void {
151
+ if (this.stylesInjected) return
152
+ const style = document.createElement('style')
153
+ style.id = 'urgent-shard-styles'
154
+ style.textContent = `
155
+ .urgent-shard {
156
+ position: absolute;
157
+ transform-origin: center;
158
+ will-change: transform, opacity;
159
+ pointer-events: none;
160
+ contain: layout style;
161
+ }
162
+ .urgent-container {
163
+ position: fixed;
164
+ top: 0;
165
+ left: 0;
166
+ width: 100vw;
167
+ height: 100vh;
168
+ pointer-events: none;
169
+ overflow: visible;
170
+ z-index: 9999;
171
+ contain: strict;
172
+ }
173
+ `
174
+ document.head.appendChild(style)
175
+ this.stylesInjected = true
176
+ }
177
+
178
+ private ensureContainer(): void {
179
+ if (this.container && this.container.isConnected) return
180
+ this.container = document.createElement('div')
181
+ this.container.className = 'urgent-container'
182
+ document.body.appendChild(this.container)
183
+ }
184
+
185
+ private ensureObserver(): void {
186
+ if (this.visibilityObserver) return
187
+ this.visibilityObserver = new IntersectionObserver(
188
+ entries => {
189
+ for (const entry of entries) {
190
+ this.elementVisibility.set(entry.target as HTMLElement, entry.isIntersecting)
191
+ }
192
+ },
193
+ { threshold: 0 },
194
+ )
195
+ }
196
+
197
+ register(instance: UrgentDirective): void {
198
+ this.ensureInitialized()
199
+ this.instances.add(instance)
200
+ this.startAnimationLoop()
201
+ }
202
+
203
+ unregister(instance: UrgentDirective): void {
204
+ this.instances.delete(instance)
205
+ if (this.instances.size === 0) {
206
+ this.stopAnimationLoop()
207
+ }
208
+ }
209
+
210
+ observeElement(element: HTMLElement): void {
211
+ if (this.observedElements.has(element)) return
212
+ this.ensureObserver()
213
+ this.visibilityObserver!.observe(element)
214
+ this.observedElements.add(element)
215
+ this.elementVisibility.set(element, true)
216
+ }
217
+
218
+ unobserveElement(element: HTMLElement): void {
219
+ this.visibilityObserver?.unobserve(element)
220
+ this.observedElements.delete(element)
221
+ }
222
+
223
+ isElementVisible(element: HTMLElement): boolean {
224
+ return this.elementVisibility.get(element) ?? true
225
+ }
226
+
227
+ isTabVisible(): boolean {
228
+ return this.tabVisible
229
+ }
230
+
231
+ acquireShard(colorIndex: number, colors: readonly string[]): HTMLElement {
232
+ const pool = this.shardPools.get(colorIndex)!
233
+ let shard = pool.pop()
234
+
235
+ if (!shard) {
236
+ shard = document.createElement('div')
237
+ shard.className = 'urgent-shard'
238
+ this.container!.appendChild(shard)
239
+ }
240
+
241
+ const width = 4 + Math.random() * 12
242
+ const height = 4 + Math.random() * 12
243
+ const color = colors[Math.floor(Math.random() * colors.length)]
244
+
245
+ Object.assign(shard.style, {
246
+ width: `${width}px`,
247
+ height: `${height}px`,
248
+ background: `linear-gradient(${Math.random() * 360}deg,${color},transparent)`,
249
+ clipPath: `polygon(${Math.random() * 30}% ${Math.random() * 30}%,${70 + Math.random() * 30}% ${Math.random() * 40}%,${60 + Math.random() * 40}% ${60 + Math.random() * 40}%,${Math.random() * 40}% ${70 + Math.random() * 30}%)`,
250
+ boxShadow: `0 0 ${2 + Math.random() * 4}px ${colors[0]}88`,
251
+ opacity: '1',
252
+ })
253
+
254
+ return shard
255
+ }
256
+
257
+ releaseShard(shard: HTMLElement, colorIndex: number): void {
258
+ Object.assign(shard.style, { opacity: '0', transform: 'translate(-9999px,-9999px)' })
259
+ this.shardPools.get(colorIndex)!.push(shard)
260
+ }
261
+
262
+ addShards(shards: ShardData[]): void {
263
+ this.activeShards.push(...shards)
264
+ }
265
+
266
+ private clearAllShards(): void {
267
+ for (const shard of this.activeShards) {
268
+ this.releaseShard(shard.element, shard.colorIndex)
269
+ }
270
+ this.activeShards = []
271
+ }
272
+
273
+ private startAnimationLoop(): void {
274
+ if (this.animationId !== null || !this.tabVisible) return
275
+
276
+ const tick = () => {
277
+ this.updateShards()
278
+ this.updateInstanceTimers()
279
+
280
+ if (this.instances.size > 0 && this.tabVisible) {
281
+ this.animationId = requestAnimationFrame(tick)
282
+ } else {
283
+ this.animationId = null
284
+ }
285
+ }
286
+
287
+ this.animationId = requestAnimationFrame(tick)
288
+ }
289
+
290
+ private stopAnimationLoop(): void {
291
+ if (this.animationId !== null) {
292
+ cancelAnimationFrame(this.animationId)
293
+ this.animationId = null
294
+ }
295
+ }
296
+
297
+ private updateShards(): void {
298
+ const shards = this.activeShards
299
+
300
+ for (let i = shards.length - 1; i >= 0; i--) {
301
+ const data = shards[i]
302
+ data.life++
303
+
304
+ data.x += data.vx
305
+ data.y += data.vy
306
+ data.vy += 0.15 // Gravity
307
+ data.vx *= 0.98 // Air resistance
308
+ data.rotation += data.rotationSpeed
309
+
310
+ const progress = data.life / data.maxLife
311
+ const opacity = Math.max(0, 1 - progress * progress)
312
+ const scale = data.initialScale * (1 - progress * 0.5)
313
+
314
+ data.element.style.transform = `translate3d(${data.x}px,${data.y}px,0) rotate(${data.rotation}deg) scale(${scale})`
315
+ data.element.style.opacity = String(opacity)
316
+
317
+ if (data.life >= data.maxLife) {
318
+ this.releaseShard(data.element, data.colorIndex)
319
+ shards.splice(i, 1)
320
+ }
321
+ }
322
+ }
323
+
324
+ private updateInstanceTimers(): void {
325
+ const now = performance.now()
326
+ for (const instance of this.instances) {
327
+ instance.checkBurstTimer(now)
328
+ }
329
+ }
330
+
331
+ private pauseAllAnimations(): void {
332
+ for (const instance of this.instances) {
333
+ instance.pauseAnimations()
334
+ }
335
+ }
336
+
337
+ private resumeAllAnimations(): void {
338
+ for (const instance of this.instances) {
339
+ instance.resumeAnimations()
340
+ }
341
+ }
342
+
343
+ playSound(color: UrgentColor): void {
344
+ const now = performance.now()
345
+ if (now - this.lastSoundTime < this.SOUND_THROTTLE_MS) return
346
+ this.lastSoundTime = now
347
+
348
+ const feeling = color === 'error' ? 'anxious' : color === 'warning' ? 'worried' : 'curious'
349
+ $sounds.play(feeling as Parameters<typeof $sounds.play>[0])
350
+ }
351
+
352
+ destroy(): void {
353
+ this.stopAnimationLoop()
354
+ this.visibilityObserver?.disconnect()
355
+ this.container?.remove()
356
+ this.shardPools.forEach(pool => pool.forEach(el => el.remove()))
357
+ this.shardPools.clear()
358
+ this.activeShards = []
359
+ UrgentCoordinator.instance = null
360
+ }
361
+ }
362
+
363
+ // ============================================================================
364
+ // DIRECTIVE
365
+ // ============================================================================
366
+
367
+ interface DirectiveState {
368
+ active: boolean
369
+ color: UrgentColor
370
+ shake: boolean
371
+ mode: UrgentMode
372
+ interval: number
373
+ element: HTMLElement
374
+ originalPosition: string
375
+ originalOverflow: string
376
+ shakeAnimation: Animation | null
377
+ pulseAnimation: Animation | null
378
+ isRunning: boolean
379
+ lastBurstTime: number
380
+ initialized: boolean
381
+ }
382
+
383
+ const controllerMap = new WeakMap<HTMLElement, UrgentController>()
384
+
385
+ class UrgentDirective extends AsyncDirective {
386
+ private state: DirectiveState | null = null
387
+ private coordinator = UrgentCoordinator.getInstance()
388
+
389
+ render(_activeOrOptions?: boolean | UrgentOptions, _color?: UrgentColor, _shake?: boolean) {
390
+ return noChange
391
+ }
392
+
393
+ override update(part: ElementPart, args: [boolean | UrgentOptions | undefined, UrgentColor?, boolean?]) {
394
+ const element = part.element as HTMLElement
395
+
396
+ let active: boolean
397
+ let color: UrgentColor
398
+ let shake: boolean
399
+ let mode: UrgentMode
400
+ let interval: number
401
+
402
+ const first = args[0]
403
+ if (typeof first === 'object' && first !== null) {
404
+ active = first.active ?? false
405
+ color = first.color ?? 'error'
406
+ shake = first.shake ?? true
407
+ mode = first.mode ?? 'auto'
408
+ interval = first.interval ?? 4000
409
+ } else {
410
+ active = typeof first === 'boolean' ? first : false
411
+ color = args[1] ?? 'error'
412
+ shake = args[2] ?? true
413
+ mode = 'auto'
414
+ interval = 4000
415
+ }
416
+
417
+ if (!active && this.state?.active) {
418
+ this.cleanup()
419
+ return noChange
420
+ }
421
+
422
+ if (
423
+ this.state &&
424
+ this.state.active === active &&
425
+ this.state.color === color &&
426
+ this.state.shake === shake &&
427
+ this.state.mode === mode &&
428
+ this.state.interval === interval
429
+ ) {
430
+ return noChange
431
+ }
432
+
433
+ if (
434
+ this.state &&
435
+ (this.state.color !== color ||
436
+ this.state.shake !== shake ||
437
+ this.state.mode !== mode ||
438
+ this.state.interval !== interval)
439
+ ) {
440
+ this.cleanup()
441
+ }
442
+
443
+ if (active && !this.state) {
444
+ const originalPosition = element.style.position
445
+ const originalOverflow = element.style.overflow
446
+
447
+ this.state = {
448
+ active,
449
+ color,
450
+ shake,
451
+ mode,
452
+ interval,
453
+ element,
454
+ originalPosition,
455
+ originalOverflow,
456
+ shakeAnimation: null,
457
+ pulseAnimation: null,
458
+ isRunning: false,
459
+ lastBurstTime: performance.now() + Math.random() * interval,
460
+ initialized: false,
461
+ }
462
+
463
+ controllerMap.set(element, this.createController())
464
+
465
+ this.coordinator.register(this)
466
+ this.coordinator.observeElement(element)
467
+
468
+ requestAnimationFrame(() => {
469
+ if (!this.state) return
470
+ this.initializeElement()
471
+
472
+ if (mode === 'auto') {
473
+ this.startBurstInterval()
474
+ }
475
+ })
476
+ }
477
+
478
+ return noChange
479
+ }
480
+
481
+ private initializeElement(): void {
482
+ if (!this.state || this.state.initialized) return
483
+
484
+ const { element, color, shake } = this.state
485
+ const colors = COLORS[color]
486
+
487
+ const computedPosition = getComputedStyle(element).position
488
+ if (computedPosition === 'static') {
489
+ element.style.position = 'relative'
490
+ }
491
+ element.style.overflow = 'visible'
492
+
493
+ if (shake) {
494
+ this.state.shakeAnimation = element.animate(
495
+ [
496
+ { transform: 'rotate(0deg) scale(1)' },
497
+ { transform: 'rotate(-2deg) scale(1.02)' },
498
+ { transform: 'rotate(2deg) scale(1.02)' },
499
+ { transform: 'rotate(-1deg) scale(1.01)' },
500
+ { transform: 'rotate(1deg) scale(1.01)' },
501
+ { transform: 'rotate(0deg) scale(1)' },
502
+ ],
503
+ { duration: 400, easing: 'ease-in-out', iterations: Infinity },
504
+ )
505
+ }
506
+
507
+ this.state.pulseAnimation = element.animate(
508
+ [
509
+ { boxShadow: `0 0 0 0 ${colors[0]}66` },
510
+ { boxShadow: `0 0 20px 5px ${colors[0]}33` },
511
+ { boxShadow: `0 0 0 0 ${colors[0]}66` },
512
+ ] as Keyframe[],
513
+ { duration: 1500, easing: 'ease-in-out', iterations: Infinity },
514
+ )
515
+
516
+ this.coordinator.playSound(color)
517
+
518
+ this.state.initialized = true
519
+ }
520
+
521
+ checkBurstTimer(now: number): void {
522
+ if (!this.state || !this.state.isRunning) return
523
+ if (!this.coordinator.isTabVisible()) return
524
+ if (!this.coordinator.isElementVisible(this.state.element)) return
525
+
526
+ if (now - this.state.lastBurstTime >= this.state.interval) {
527
+ this.state.lastBurstTime = now
528
+ this.createBurst()
529
+ }
530
+ }
531
+
532
+ private createBurst(): void {
533
+ if (!this.state) return
534
+
535
+ const { element, color } = this.state
536
+ const colors = COLORS[color]
537
+ const colorIndex = COLOR_INDEX[color]
538
+
539
+ const rect = element.getBoundingClientRect()
540
+ const centerX = rect.left + rect.width / 2
541
+ const centerY = rect.top + rect.height / 2
542
+
543
+ const count = 8 + Math.floor(Math.random() * 5)
544
+ const shards: ShardData[] = []
545
+
546
+ for (let i = 0; i < count; i++) {
547
+ const shardElement = this.coordinator.acquireShard(colorIndex, colors)
548
+
549
+ const angle = Math.random() * Math.PI * 2
550
+ const speed = 2 + Math.random() * 4
551
+
552
+ shards.push({
553
+ element: shardElement,
554
+ colorIndex,
555
+ x: centerX,
556
+ y: centerY,
557
+ vx: Math.cos(angle) * speed,
558
+ vy: Math.sin(angle) * speed,
559
+ rotation: Math.random() * 360,
560
+ rotationSpeed: -15 + Math.random() * 30,
561
+ initialScale: 0.5 + Math.random() * 0.5,
562
+ life: 0,
563
+ maxLife: 40 + Math.random() * 30,
564
+ })
565
+ }
566
+
567
+ this.coordinator.addShards(shards)
568
+ this.coordinator.playSound(color)
569
+ }
570
+
571
+ pauseAnimations(): void {
572
+ this.state?.shakeAnimation?.pause()
573
+ this.state?.pulseAnimation?.pause()
574
+ }
575
+
576
+ resumeAnimations(): void {
577
+ this.state?.shakeAnimation?.play()
578
+ this.state?.pulseAnimation?.play()
579
+ }
580
+
581
+ private createController(): UrgentController {
582
+ // eslint-disable-next-line @typescript-eslint/no-this-alias
583
+ const self = this
584
+ return {
585
+ play: () => self.playOnce(),
586
+ start: (intervalMs?: number) => {
587
+ if (self.state && intervalMs !== undefined) {
588
+ self.state.interval = intervalMs
589
+ }
590
+ self.startBurstInterval()
591
+ },
592
+ stop: () => self.stopBurstInterval(),
593
+ get isRunning() {
594
+ return self.state?.isRunning ?? false
595
+ },
596
+ }
597
+ }
598
+
599
+ private playOnce(): void {
600
+ if (!this.state) return
601
+ if (!this.state.initialized) {
602
+ this.initializeElement()
603
+ }
604
+ this.createBurst()
605
+ }
606
+
607
+ private startBurstInterval(): void {
608
+ if (!this.state) return
609
+ this.state.isRunning = true
610
+ this.state.lastBurstTime = performance.now()
611
+ }
612
+
613
+ private stopBurstInterval(): void {
614
+ if (!this.state) return
615
+ this.state.isRunning = false
616
+ }
617
+
618
+ private cleanup(): void {
619
+ if (!this.state) return
620
+
621
+ this.coordinator.unregister(this)
622
+ this.coordinator.unobserveElement(this.state.element)
623
+
624
+ this.state.shakeAnimation?.cancel()
625
+ this.state.pulseAnimation?.cancel()
626
+
627
+ controllerMap.delete(this.state.element)
628
+
629
+ if (this.state.originalPosition !== undefined) {
630
+ this.state.element.style.position = this.state.originalPosition
631
+ }
632
+ if (this.state.originalOverflow !== undefined) {
633
+ this.state.element.style.overflow = this.state.originalOverflow
634
+ }
635
+
636
+ this.state = null
637
+ }
638
+
639
+ override disconnected(): void {
640
+ this.cleanup()
641
+ }
642
+ }
643
+
644
+ const urgentDirective = directive(UrgentDirective)
645
+
646
+ type UrgentFn = {
647
+ (active?: boolean, color?: UrgentColor, shake?: boolean): ReturnType<typeof urgentDirective>
648
+ (options: UrgentOptions): ReturnType<typeof urgentDirective>
649
+ getController(element: HTMLElement): UrgentController | undefined
650
+ }
651
+
652
+ export const urgent: UrgentFn = Object.assign(
653
+ (activeOrOptions?: boolean | UrgentOptions, color?: UrgentColor, shake?: boolean) =>
654
+ urgentDirective(activeOrOptions, color, shake),
655
+ {
656
+ getController(element: HTMLElement): UrgentController | undefined {
657
+ return controllerMap.get(element)
658
+ },
659
+ },
660
+ )