weasel-icons 0.1.0 → 0.3.0

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 (396) hide show
  1. package/README.md +93 -5
  2. package/THIRD_PARTY_NOTICES.md +17 -5
  3. package/dist/icons/alert/alert-icon.d.ts +6 -0
  4. package/dist/icons/alert/alert-icon.js +22 -0
  5. package/dist/icons/alert/alert-rig.d.ts +12 -0
  6. package/dist/icons/alert/alert-rig.js +25 -0
  7. package/dist/icons/arrow-down/arrow-down-icon.d.ts +5 -0
  8. package/dist/icons/arrow-down/arrow-down-icon.js +9 -0
  9. package/dist/icons/arrow-down/arrow-down-rig.d.ts +43 -0
  10. package/dist/icons/arrow-down/arrow-down-rig.js +64 -0
  11. package/dist/icons/arrow-left/arrow-left-icon.d.ts +5 -0
  12. package/dist/icons/arrow-left/arrow-left-icon.js +9 -0
  13. package/dist/icons/arrow-left/arrow-left-rig.d.ts +43 -0
  14. package/dist/icons/arrow-left/arrow-left-rig.js +64 -0
  15. package/dist/icons/arrow-right/arrow-right-icon.d.ts +5 -0
  16. package/dist/icons/arrow-right/arrow-right-icon.js +9 -0
  17. package/dist/icons/arrow-right/arrow-right-rig.d.ts +43 -0
  18. package/dist/icons/arrow-right/arrow-right-rig.js +64 -0
  19. package/dist/icons/arrow-up/arrow-up-icon.d.ts +5 -0
  20. package/dist/icons/arrow-up/arrow-up-icon.js +9 -0
  21. package/dist/icons/arrow-up/arrow-up-rig.d.ts +43 -0
  22. package/dist/icons/arrow-up/arrow-up-rig.js +64 -0
  23. package/dist/icons/badge-check/badge-check-icon.d.ts +5 -0
  24. package/dist/icons/badge-check/badge-check-icon.js +33 -0
  25. package/dist/icons/badge-check/badge-check-rig.d.ts +14 -0
  26. package/dist/icons/badge-check/badge-check-rig.js +36 -0
  27. package/dist/icons/bell/bell-icon.js +1 -1
  28. package/dist/icons/book-open/book-open-icon.d.ts +5 -0
  29. package/dist/icons/book-open/book-open-icon.js +9 -0
  30. package/dist/icons/book-open/book-open-rig.d.ts +65 -0
  31. package/dist/icons/book-open/book-open-rig.js +95 -0
  32. package/dist/icons/bookmark/bookmark-icon.d.ts +5 -0
  33. package/dist/icons/bookmark/bookmark-icon.js +9 -0
  34. package/dist/icons/bookmark/bookmark-rig.d.ts +43 -0
  35. package/dist/icons/bookmark/bookmark-rig.js +65 -0
  36. package/dist/icons/bulb/bulb-icon.d.ts +5 -0
  37. package/dist/icons/bulb/bulb-icon.js +25 -0
  38. package/dist/icons/bulb/bulb-rig.d.ts +13 -0
  39. package/dist/icons/bulb/bulb-rig.js +37 -0
  40. package/dist/icons/calendar/calendar-icon.d.ts +5 -0
  41. package/dist/icons/calendar/calendar-icon.js +9 -0
  42. package/dist/icons/calendar/calendar-rig.d.ts +67 -0
  43. package/dist/icons/calendar/calendar-rig.js +95 -0
  44. package/dist/icons/camera/camera-icon.d.ts +5 -0
  45. package/dist/icons/camera/camera-icon.js +9 -0
  46. package/dist/icons/camera/camera-rig.d.ts +58 -0
  47. package/dist/icons/camera/camera-rig.js +82 -0
  48. package/dist/icons/check/check-icon.d.ts +5 -0
  49. package/dist/icons/check/check-icon.js +26 -0
  50. package/dist/icons/check/check-rig.d.ts +6 -0
  51. package/dist/icons/check/check-rig.js +38 -0
  52. package/dist/icons/chevron-down/chevron-down-icon.d.ts +5 -0
  53. package/dist/icons/chevron-down/chevron-down-icon.js +9 -0
  54. package/dist/icons/chevron-down/chevron-down-rig.d.ts +48 -0
  55. package/dist/icons/chevron-down/chevron-down-rig.js +30 -0
  56. package/dist/icons/chevron-left/chevron-left-icon.d.ts +5 -0
  57. package/dist/icons/chevron-left/chevron-left-icon.js +9 -0
  58. package/dist/icons/chevron-left/chevron-left-rig.d.ts +34 -0
  59. package/dist/icons/chevron-left/chevron-left-rig.js +49 -0
  60. package/dist/icons/chevron-right/chevron-right-icon.d.ts +5 -0
  61. package/dist/icons/chevron-right/chevron-right-icon.js +9 -0
  62. package/dist/icons/chevron-right/chevron-right-rig.d.ts +34 -0
  63. package/dist/icons/chevron-right/chevron-right-rig.js +49 -0
  64. package/dist/icons/chevron-up/chevron-up-icon.d.ts +5 -0
  65. package/dist/icons/chevron-up/chevron-up-icon.js +9 -0
  66. package/dist/icons/chevron-up/chevron-up-rig.d.ts +48 -0
  67. package/dist/icons/chevron-up/chevron-up-rig.js +30 -0
  68. package/dist/icons/circle-help/circle-help-icon.d.ts +5 -0
  69. package/dist/icons/circle-help/circle-help-icon.js +9 -0
  70. package/dist/icons/circle-help/circle-help-rig.d.ts +45 -0
  71. package/dist/icons/circle-help/circle-help-rig.js +70 -0
  72. package/dist/icons/clapperboard/clapperboard-icon.d.ts +5 -0
  73. package/dist/icons/clapperboard/clapperboard-icon.js +18 -0
  74. package/dist/icons/clapperboard/clapperboard-rig.d.ts +12 -0
  75. package/dist/icons/clapperboard/clapperboard-rig.js +25 -0
  76. package/dist/icons/clipboard/clipboard-icon.d.ts +5 -0
  77. package/dist/icons/clipboard/clipboard-icon.js +9 -0
  78. package/dist/icons/clipboard/clipboard-rig.d.ts +69 -0
  79. package/dist/icons/clipboard/clipboard-rig.js +99 -0
  80. package/dist/icons/clock/clock-icon.d.ts +5 -0
  81. package/dist/icons/clock/clock-icon.js +9 -0
  82. package/dist/icons/clock/clock-rig.d.ts +40 -0
  83. package/dist/icons/clock/clock-rig.js +53 -0
  84. package/dist/icons/close/close-icon.d.ts +5 -0
  85. package/dist/icons/close/close-icon.js +27 -0
  86. package/dist/icons/close/close-rig.d.ts +10 -0
  87. package/dist/icons/close/close-rig.js +31 -0
  88. package/dist/icons/cloud/cloud-icon.d.ts +5 -0
  89. package/dist/icons/cloud/cloud-icon.js +9 -0
  90. package/dist/icons/cloud/cloud-rig.d.ts +74 -0
  91. package/dist/icons/cloud/cloud-rig.js +103 -0
  92. package/dist/icons/code/code-icon.d.ts +5 -0
  93. package/dist/icons/code/code-icon.js +9 -0
  94. package/dist/icons/code/code-rig.d.ts +104 -0
  95. package/dist/icons/code/code-rig.js +148 -0
  96. package/dist/icons/copy/copy-icon.d.ts +5 -0
  97. package/dist/icons/copy/copy-icon.js +31 -0
  98. package/dist/icons/copy/copy-rig.d.ts +13 -0
  99. package/dist/icons/copy/copy-rig.js +44 -0
  100. package/dist/icons/credit-card/credit-card-icon.d.ts +5 -0
  101. package/dist/icons/credit-card/credit-card-icon.js +9 -0
  102. package/dist/icons/credit-card/credit-card-rig.d.ts +88 -0
  103. package/dist/icons/credit-card/credit-card-rig.js +122 -0
  104. package/dist/icons/cursor/cursor-icon.d.ts +5 -0
  105. package/dist/icons/cursor/cursor-icon.js +32 -0
  106. package/dist/icons/cursor/cursor-rig.d.ts +21 -0
  107. package/dist/icons/cursor/cursor-rig.js +63 -0
  108. package/dist/icons/database/database-icon.d.ts +5 -0
  109. package/dist/icons/database/database-icon.js +9 -0
  110. package/dist/icons/database/database-rig.d.ts +61 -0
  111. package/dist/icons/database/database-rig.js +86 -0
  112. package/dist/icons/delete/delete-icon.d.ts +5 -0
  113. package/dist/icons/delete/delete-icon.js +25 -0
  114. package/dist/icons/delete/delete-rig.d.ts +15 -0
  115. package/dist/icons/delete/delete-rig.js +33 -0
  116. package/dist/icons/dog/dog-icon.js +1 -1
  117. package/dist/icons/download/download-icon.js +1 -1
  118. package/dist/icons/external-link/external-link-icon.d.ts +5 -0
  119. package/dist/icons/external-link/external-link-icon.js +9 -0
  120. package/dist/icons/external-link/external-link-rig.d.ts +45 -0
  121. package/dist/icons/external-link/external-link-rig.js +42 -0
  122. package/dist/icons/eye/eye-icon.d.ts +5 -0
  123. package/dist/icons/eye/eye-icon.js +27 -0
  124. package/dist/icons/eye/eye-rig.d.ts +9 -0
  125. package/dist/icons/eye/eye-rig.js +37 -0
  126. package/dist/icons/file/file-icon.d.ts +5 -0
  127. package/dist/icons/file/file-icon.js +9 -0
  128. package/dist/icons/file/file-rig.d.ts +53 -0
  129. package/dist/icons/file/file-rig.js +80 -0
  130. package/dist/icons/file-text/file-text-icon.d.ts +5 -0
  131. package/dist/icons/file-text/file-text-icon.js +9 -0
  132. package/dist/icons/file-text/file-text-rig.d.ts +93 -0
  133. package/dist/icons/file-text/file-text-rig.js +138 -0
  134. package/dist/icons/filter/filter-icon.d.ts +5 -0
  135. package/dist/icons/filter/filter-icon.js +9 -0
  136. package/dist/icons/filter/filter-rig.d.ts +72 -0
  137. package/dist/icons/filter/filter-rig.js +99 -0
  138. package/dist/icons/folder/folder-icon.d.ts +5 -0
  139. package/dist/icons/folder/folder-icon.js +9 -0
  140. package/dist/icons/folder/folder-rig.d.ts +20 -0
  141. package/dist/icons/folder/folder-rig.js +28 -0
  142. package/dist/icons/globe/globe-icon.d.ts +5 -0
  143. package/dist/icons/globe/globe-icon.js +9 -0
  144. package/dist/icons/globe/globe-rig.d.ts +40 -0
  145. package/dist/icons/globe/globe-rig.js +57 -0
  146. package/dist/icons/heart/heart-icon.js +1 -1
  147. package/dist/icons/heart/heart-rig.js +1 -1
  148. package/dist/icons/home/home-icon.d.ts +5 -0
  149. package/dist/icons/home/home-icon.js +9 -0
  150. package/dist/icons/home/home-rig.d.ts +49 -0
  151. package/dist/icons/home/home-rig.js +76 -0
  152. package/dist/icons/image/image-icon.d.ts +5 -0
  153. package/dist/icons/image/image-icon.js +9 -0
  154. package/dist/icons/image/image-rig.d.ts +70 -0
  155. package/dist/icons/image/image-rig.js +99 -0
  156. package/dist/icons/info/info-icon.d.ts +5 -0
  157. package/dist/icons/info/info-icon.js +9 -0
  158. package/dist/icons/info/info-rig.d.ts +48 -0
  159. package/dist/icons/info/info-rig.js +69 -0
  160. package/dist/icons/key/key-icon.d.ts +5 -0
  161. package/dist/icons/key/key-icon.js +9 -0
  162. package/dist/icons/key/key-rig.d.ts +50 -0
  163. package/dist/icons/key/key-rig.js +76 -0
  164. package/dist/icons/layers/layers-icon.d.ts +5 -0
  165. package/dist/icons/layers/layers-icon.js +9 -0
  166. package/dist/icons/layers/layers-rig.d.ts +147 -0
  167. package/dist/icons/layers/layers-rig.js +211 -0
  168. package/dist/icons/layout-dashboard/layout-dashboard-icon.d.ts +5 -0
  169. package/dist/icons/layout-dashboard/layout-dashboard-icon.js +9 -0
  170. package/dist/icons/layout-dashboard/layout-dashboard-rig.d.ts +194 -0
  171. package/dist/icons/layout-dashboard/layout-dashboard-rig.js +284 -0
  172. package/dist/icons/layout-grid/layout-grid-icon.d.ts +5 -0
  173. package/dist/icons/layout-grid/layout-grid-icon.js +9 -0
  174. package/dist/icons/layout-grid/layout-grid-rig.d.ts +103 -0
  175. package/dist/icons/layout-grid/layout-grid-rig.js +167 -0
  176. package/dist/icons/link/link-icon.d.ts +5 -0
  177. package/dist/icons/link/link-icon.js +30 -0
  178. package/dist/icons/link/link-rig.d.ts +13 -0
  179. package/dist/icons/link/link-rig.js +37 -0
  180. package/dist/icons/list/list-icon.d.ts +5 -0
  181. package/dist/icons/list/list-icon.js +9 -0
  182. package/dist/icons/list/list-rig.d.ts +165 -0
  183. package/dist/icons/list/list-rig.js +231 -0
  184. package/dist/icons/lock/lock-icon.d.ts +5 -0
  185. package/dist/icons/lock/lock-icon.js +9 -0
  186. package/dist/icons/lock/lock-rig.d.ts +42 -0
  187. package/dist/icons/lock/lock-rig.js +58 -0
  188. package/dist/icons/log-in/log-in-icon.d.ts +5 -0
  189. package/dist/icons/log-in/log-in-icon.js +9 -0
  190. package/dist/icons/log-in/log-in-rig.d.ts +39 -0
  191. package/dist/icons/log-in/log-in-rig.js +55 -0
  192. package/dist/icons/log-out/log-out-icon.d.ts +5 -0
  193. package/dist/icons/log-out/log-out-icon.js +9 -0
  194. package/dist/icons/log-out/log-out-rig.d.ts +39 -0
  195. package/dist/icons/log-out/log-out-rig.js +55 -0
  196. package/dist/icons/mail/mail-icon.d.ts +5 -0
  197. package/dist/icons/mail/mail-icon.js +9 -0
  198. package/dist/icons/mail/mail-rig.d.ts +20 -0
  199. package/dist/icons/mail/mail-rig.js +28 -0
  200. package/dist/icons/map-pin/map-pin-icon.d.ts +5 -0
  201. package/dist/icons/map-pin/map-pin-icon.js +9 -0
  202. package/dist/icons/map-pin/map-pin-rig.d.ts +118 -0
  203. package/dist/icons/map-pin/map-pin-rig.js +164 -0
  204. package/dist/icons/maximize/maximize-icon.d.ts +5 -0
  205. package/dist/icons/maximize/maximize-icon.js +9 -0
  206. package/dist/icons/maximize/maximize-rig.d.ts +190 -0
  207. package/dist/icons/maximize/maximize-rig.js +268 -0
  208. package/dist/icons/menu/menu-icon.d.ts +5 -0
  209. package/dist/icons/menu/menu-icon.js +9 -0
  210. package/dist/icons/menu/menu-rig.d.ts +41 -0
  211. package/dist/icons/menu/menu-rig.js +58 -0
  212. package/dist/icons/message-circle/message-circle-icon.d.ts +5 -0
  213. package/dist/icons/message-circle/message-circle-icon.js +9 -0
  214. package/dist/icons/message-circle/message-circle-rig.d.ts +99 -0
  215. package/dist/icons/message-circle/message-circle-rig.js +143 -0
  216. package/dist/icons/mic/mic-icon.d.ts +5 -0
  217. package/dist/icons/mic/mic-icon.js +9 -0
  218. package/dist/icons/mic/mic-rig.d.ts +67 -0
  219. package/dist/icons/mic/mic-rig.js +96 -0
  220. package/dist/icons/minimize/minimize-icon.d.ts +5 -0
  221. package/dist/icons/minimize/minimize-icon.js +9 -0
  222. package/dist/icons/minimize/minimize-rig.d.ts +190 -0
  223. package/dist/icons/minimize/minimize-rig.js +268 -0
  224. package/dist/icons/minus/minus-icon.d.ts +5 -0
  225. package/dist/icons/minus/minus-icon.js +9 -0
  226. package/dist/icons/minus/minus-rig.d.ts +31 -0
  227. package/dist/icons/minus/minus-rig.js +47 -0
  228. package/dist/icons/monkey/monkey-icon.js +1 -1
  229. package/dist/icons/moon/moon-icon.d.ts +5 -0
  230. package/dist/icons/moon/moon-icon.js +9 -0
  231. package/dist/icons/moon/moon-rig.d.ts +62 -0
  232. package/dist/icons/moon/moon-rig.js +87 -0
  233. package/dist/icons/more-horizontal/more-horizontal-icon.d.ts +5 -0
  234. package/dist/icons/more-horizontal/more-horizontal-icon.js +9 -0
  235. package/dist/icons/more-horizontal/more-horizontal-rig.d.ts +91 -0
  236. package/dist/icons/more-horizontal/more-horizontal-rig.js +141 -0
  237. package/dist/icons/more-vertical/more-vertical-icon.d.ts +5 -0
  238. package/dist/icons/more-vertical/more-vertical-icon.js +9 -0
  239. package/dist/icons/more-vertical/more-vertical-rig.d.ts +91 -0
  240. package/dist/icons/more-vertical/more-vertical-rig.js +141 -0
  241. package/dist/icons/music/music-icon.d.ts +5 -0
  242. package/dist/icons/music/music-icon.js +9 -0
  243. package/dist/icons/music/music-rig.d.ts +66 -0
  244. package/dist/icons/music/music-rig.js +95 -0
  245. package/dist/icons/package/package-icon.d.ts +5 -0
  246. package/dist/icons/package/package-icon.js +9 -0
  247. package/dist/icons/package/package-rig.d.ts +40 -0
  248. package/dist/icons/package/package-rig.js +60 -0
  249. package/dist/icons/pause/pause-icon.d.ts +5 -0
  250. package/dist/icons/pause/pause-icon.js +9 -0
  251. package/dist/icons/pause/pause-rig.d.ts +104 -0
  252. package/dist/icons/pause/pause-rig.js +147 -0
  253. package/dist/icons/pencil/pencil-icon.d.ts +5 -0
  254. package/dist/icons/pencil/pencil-icon.js +9 -0
  255. package/dist/icons/pencil/pencil-rig.d.ts +48 -0
  256. package/dist/icons/pencil/pencil-rig.js +68 -0
  257. package/dist/icons/phone/phone-icon.d.ts +5 -0
  258. package/dist/icons/phone/phone-icon.js +9 -0
  259. package/dist/icons/phone/phone-rig.d.ts +41 -0
  260. package/dist/icons/phone/phone-rig.js +60 -0
  261. package/dist/icons/play/play-icon.d.ts +5 -0
  262. package/dist/icons/play/play-icon.js +9 -0
  263. package/dist/icons/play/play-rig.d.ts +58 -0
  264. package/dist/icons/play/play-rig.js +80 -0
  265. package/dist/icons/plug/plug-icon.d.ts +5 -0
  266. package/dist/icons/plug/plug-icon.js +21 -0
  267. package/dist/icons/plug/plug-rig.d.ts +16 -0
  268. package/dist/icons/plug/plug-rig.js +29 -0
  269. package/dist/icons/plus/plus-icon.d.ts +5 -0
  270. package/dist/icons/plus/plus-icon.js +9 -0
  271. package/dist/icons/plus/plus-rig.d.ts +94 -0
  272. package/dist/icons/plus/plus-rig.js +137 -0
  273. package/dist/icons/refresh/refresh-icon.d.ts +5 -0
  274. package/dist/icons/refresh/refresh-icon.js +40 -0
  275. package/dist/icons/refresh/refresh-rig.d.ts +11 -0
  276. package/dist/icons/refresh/refresh-rig.js +30 -0
  277. package/dist/icons/replace/replace-icon.d.ts +5 -0
  278. package/dist/icons/replace/replace-icon.js +26 -0
  279. package/dist/icons/replace/replace-rig.d.ts +20 -0
  280. package/dist/icons/replace/replace-rig.js +42 -0
  281. package/dist/icons/rocket/rocket-icon.js +1 -1
  282. package/dist/icons/save/save-icon.d.ts +5 -0
  283. package/dist/icons/save/save-icon.js +9 -0
  284. package/dist/icons/save/save-rig.d.ts +43 -0
  285. package/dist/icons/save/save-rig.js +63 -0
  286. package/dist/icons/search/search-icon.js +1 -1
  287. package/dist/icons/send/send-icon.d.ts +5 -0
  288. package/dist/icons/send/send-icon.js +9 -0
  289. package/dist/icons/send/send-rig.d.ts +43 -0
  290. package/dist/icons/send/send-rig.js +61 -0
  291. package/dist/icons/settings/settings-icon.d.ts +5 -0
  292. package/dist/icons/settings/settings-icon.js +9 -0
  293. package/dist/icons/settings/settings-rig.d.ts +41 -0
  294. package/dist/icons/settings/settings-rig.js +64 -0
  295. package/dist/icons/share/share-icon.d.ts +5 -0
  296. package/dist/icons/share/share-icon.js +9 -0
  297. package/dist/icons/share/share-rig.d.ts +80 -0
  298. package/dist/icons/share/share-rig.js +114 -0
  299. package/dist/icons/shield/shield-icon.d.ts +5 -0
  300. package/dist/icons/shield/shield-icon.js +25 -0
  301. package/dist/icons/shield/shield-rig.d.ts +23 -0
  302. package/dist/icons/shield/shield-rig.js +42 -0
  303. package/dist/icons/ship/ship-icon.js +1 -1
  304. package/dist/icons/shopping-bag/shopping-bag-icon.d.ts +5 -0
  305. package/dist/icons/shopping-bag/shopping-bag-icon.js +9 -0
  306. package/dist/icons/shopping-bag/shopping-bag-rig.d.ts +92 -0
  307. package/dist/icons/shopping-bag/shopping-bag-rig.js +139 -0
  308. package/dist/icons/shopping-cart/shopping-cart-icon.d.ts +5 -0
  309. package/dist/icons/shopping-cart/shopping-cart-icon.js +9 -0
  310. package/dist/icons/shopping-cart/shopping-cart-rig.d.ts +72 -0
  311. package/dist/icons/shopping-cart/shopping-cart-rig.js +111 -0
  312. package/dist/icons/sliders/sliders-icon.d.ts +5 -0
  313. package/dist/icons/sliders/sliders-icon.js +9 -0
  314. package/dist/icons/sliders/sliders-rig.d.ts +156 -0
  315. package/dist/icons/sliders/sliders-rig.js +231 -0
  316. package/dist/icons/sparkle/sparkle-icon.d.ts +5 -0
  317. package/dist/icons/sparkle/sparkle-icon.js +27 -0
  318. package/dist/icons/sparkle/sparkle-rig.d.ts +8 -0
  319. package/dist/icons/sparkle/sparkle-rig.js +6 -0
  320. package/dist/icons/sparkles/sparkles-icon.d.ts +5 -0
  321. package/dist/icons/sparkles/sparkles-icon.js +27 -0
  322. package/dist/icons/sparkles/sparkles-rig.d.ts +14 -0
  323. package/dist/icons/sparkles/sparkles-rig.js +24 -0
  324. package/dist/icons/star/star-icon.d.ts +5 -0
  325. package/dist/icons/star/star-icon.js +38 -0
  326. package/dist/icons/star/star-rig.d.ts +20 -0
  327. package/dist/icons/star/star-rig.js +61 -0
  328. package/dist/icons/sun/sun-icon.d.ts +5 -0
  329. package/dist/icons/sun/sun-icon.js +9 -0
  330. package/dist/icons/sun/sun-rig.d.ts +290 -0
  331. package/dist/icons/sun/sun-rig.js +401 -0
  332. package/dist/icons/swap/swap-icon.d.ts +5 -0
  333. package/dist/icons/swap/swap-icon.js +26 -0
  334. package/dist/icons/swap/swap-rig.d.ts +10 -0
  335. package/dist/icons/swap/swap-rig.js +24 -0
  336. package/dist/icons/terminal/terminal-icon.d.ts +5 -0
  337. package/dist/icons/terminal/terminal-icon.js +9 -0
  338. package/dist/icons/terminal/terminal-rig.d.ts +71 -0
  339. package/dist/icons/terminal/terminal-rig.js +102 -0
  340. package/dist/icons/timer/timer-icon.d.ts +5 -0
  341. package/dist/icons/timer/timer-icon.js +9 -0
  342. package/dist/icons/timer/timer-rig.d.ts +50 -0
  343. package/dist/icons/timer/timer-rig.js +72 -0
  344. package/dist/icons/truck/truck-icon.d.ts +5 -0
  345. package/dist/icons/truck/truck-icon.js +9 -0
  346. package/dist/icons/truck/truck-rig.d.ts +184 -0
  347. package/dist/icons/truck/truck-rig.js +272 -0
  348. package/dist/icons/upload/upload-icon.d.ts +5 -0
  349. package/dist/icons/upload/upload-icon.js +9 -0
  350. package/dist/icons/upload/upload-rig.d.ts +99 -0
  351. package/dist/icons/upload/upload-rig.js +124 -0
  352. package/dist/icons/user/user-icon.d.ts +5 -0
  353. package/dist/icons/user/user-icon.js +9 -0
  354. package/dist/icons/user/user-rig.d.ts +45 -0
  355. package/dist/icons/user/user-rig.js +66 -0
  356. package/dist/icons/users/users-icon.d.ts +5 -0
  357. package/dist/icons/users/users-icon.js +9 -0
  358. package/dist/icons/users/users-rig.d.ts +76 -0
  359. package/dist/icons/users/users-rig.js +113 -0
  360. package/dist/icons/video/video-icon.d.ts +5 -0
  361. package/dist/icons/video/video-icon.js +9 -0
  362. package/dist/icons/video/video-rig.d.ts +62 -0
  363. package/dist/icons/video/video-rig.js +84 -0
  364. package/dist/icons/volume/volume-icon.d.ts +5 -0
  365. package/dist/icons/volume/volume-icon.js +9 -0
  366. package/dist/icons/volume/volume-rig.d.ts +82 -0
  367. package/dist/icons/volume/volume-rig.js +120 -0
  368. package/dist/icons/wallet/wallet-icon.d.ts +5 -0
  369. package/dist/icons/wallet/wallet-icon.js +9 -0
  370. package/dist/icons/wallet/wallet-rig.d.ts +63 -0
  371. package/dist/icons/wallet/wallet-rig.js +90 -0
  372. package/dist/icons/wave/wave-icon.d.ts +5 -0
  373. package/dist/icons/wave/wave-icon.js +18 -0
  374. package/dist/icons/wave/wave-rig.d.ts +8 -0
  375. package/dist/icons/wave/wave-rig.js +39 -0
  376. package/dist/icons/wifi/wifi-icon.d.ts +5 -0
  377. package/dist/icons/wifi/wifi-icon.js +9 -0
  378. package/dist/icons/wifi/wifi-rig.d.ts +189 -0
  379. package/dist/icons/wifi/wifi-rig.js +260 -0
  380. package/dist/index.d.ts +93 -2
  381. package/dist/index.js +92 -1
  382. package/dist/shared/articulated-icon.d.ts +7 -0
  383. package/dist/shared/articulated-icon.js +49 -0
  384. package/dist/shared/articulation.d.ts +62 -0
  385. package/dist/shared/articulation.js +85 -0
  386. package/dist/shared/icon-colors.d.ts +95 -4
  387. package/dist/shared/icon-types.d.ts +1 -0
  388. package/dist/shared/sparkle-motion.d.ts +12 -0
  389. package/dist/shared/sparkle-motion.js +38 -0
  390. package/dist/shared/use-icon-motion.d.ts +5 -1
  391. package/dist/shared/use-icon-motion.js +30 -3
  392. package/package.json +464 -9
  393. package/dist/icons/leaf/leaf-icon.d.ts +0 -6
  394. package/dist/icons/leaf/leaf-icon.js +0 -29
  395. package/dist/icons/leaf/leaf-rig.d.ts +0 -25
  396. package/dist/icons/leaf/leaf-rig.js +0 -201
@@ -0,0 +1,49 @@
1
+ 'use client';
2
+ import { jsx as _jsx } from "react/jsx-runtime";
3
+ import { useCallback, useRef } from 'react';
4
+ import { motion, useTransform } from 'motion/react';
5
+ import { usePoseWeight, useActionProgress, useBehaviorClock } from "./use-icon-motion.js";
6
+ import { useMotionPreference } from "./use-motion-preference.js";
7
+ import { sampleArticulation } from "./articulation.js";
8
+ const ORIGIN = { originX: '0px', originY: '0px', transformBox: 'view-box' };
9
+ function PartPath({ part, index, pathIndex, rig, }) {
10
+ const d = useTransform(rig, (sample) => sample[index].paths[pathIndex]);
11
+ const offset = useTransform(rig, (sample) => (part.traceLength ?? 0) * (1 - sample[index].draw));
12
+ return (_jsx(motion.path, { d: d, fill: part.surface ? 'var(--weasel-surface, #fff)' : undefined, strokeDasharray: part.traceLength, strokeDashoffset: part.traceLength ? offset : undefined }));
13
+ }
14
+ function Part({ part, index, rig, name, accentColor, strokeWidth, }) {
15
+ const transform = useTransform(rig, (sample) => sample[index].transform);
16
+ const opacity = useTransform(rig, (sample) => sample[index].opacity);
17
+ return (_jsx(motion.g, { "data-layer": `${name}-${part.name}`, "data-part": part.name, transform: transform, opacity: opacity, style: ORIGIN, stroke: part.accent ? accentColor : undefined, strokeWidth: part.detail ? Math.min(strokeWidth * 0.8, 1.5) : undefined, children: part.paths.map((_, i) => (_jsx(PartPath, { part: part, index: index, pathIndex: i, rig: rig }, i))) }));
18
+ }
19
+ /** Shared binding, never a shared drawing or a generic whole-icon animation. */
20
+ export function ArticulatedIcon({ art, states, state = states[0], size = 24, color = 'currentColor', accentColor = 'currentColor', strokeWidth = 1.65, speed = 1, alive = false, className, }) {
21
+ const element = useRef(null);
22
+ const reduced = useMotionPreference();
23
+ const pace = Number.isFinite(speed) ? Math.min(4, Math.max(0.1, speed)) : 1;
24
+ const w0 = usePoseWeight(state === states[0], pace, reduced);
25
+ const w1 = usePoseWeight(state === states[1], pace, reduced);
26
+ const w2 = usePoseWeight(state === states[2], pace, reduced);
27
+ const can0 = useCallback(() => w0.get() < 0.001, [w0]);
28
+ const can1 = useCallback(() => w1.get() < 0.001, [w1]);
29
+ const can2 = useCallback(() => w2.get() < 0.001, [w2]);
30
+ const duration = (index) => Math.max(0.8, ...art.parts.map((part) => part.gestures?.[index]?.duration ?? 0));
31
+ const e0 = useActionProgress(state === states[0] && art.parts.some((part) => Boolean(part.gestures?.[0])), pace, reduced, duration(0), can0);
32
+ const e1 = useActionProgress(state === states[1] && art.parts.some((part) => Boolean(part.gestures?.[1])), pace, reduced, duration(1), can1);
33
+ const e2 = useActionProgress(state === states[2] && art.parts.some((part) => Boolean(part.gestures?.[2])), pace, reduced, duration(2), can2);
34
+ const activeIndex = states.indexOf(state);
35
+ const performs = alive &&
36
+ !reduced &&
37
+ art.parts.some((part) => {
38
+ const gesture = part.gestures?.[activeIndex];
39
+ return (gesture && gesture.loop !== false) || part.spin?.state === activeIndex;
40
+ });
41
+ const life = usePoseWeight(performs, pace, reduced);
42
+ const time = useBehaviorClock(element, performs, pace, life, art.parts.some((part) => Boolean(part.spin)));
43
+ const rig = useTransform(() => sampleArticulation(art, [w0.get(), w1.get(), w2.get()], time.get(), life.get(), [
44
+ e0.get(),
45
+ e1.get(),
46
+ e2.get(),
47
+ ]));
48
+ return (_jsx("svg", { ref: element, className: className, width: size, height: size, viewBox: "0 0 24 24", xmlns: "http://www.w3.org/2000/svg", fill: "none", stroke: color, strokeWidth: strokeWidth, strokeLinecap: "round", strokeLinejoin: "round", "aria-hidden": "true", focusable: "false", pointerEvents: "none", style: { display: 'block' }, children: _jsx("g", { "data-layer": `${art.name}-body`, transform: "translate(12 12) scale(.84) translate(-12 -12)", children: art.parts.map((part, index) => (_jsx(Part, { part: part, index: index, rig: rig, name: art.name, accentColor: accentColor, strokeWidth: strokeWidth }, part.name))) }) }));
49
+ }
@@ -0,0 +1,62 @@
1
+ /** Numeric articulation only. Subjects, state meanings and artwork stay in their rigs. */
2
+ export interface PartPose {
3
+ x?: number;
4
+ y?: number;
5
+ angle?: number;
6
+ scaleX?: number;
7
+ scaleY?: number;
8
+ opacity?: number;
9
+ draw?: number;
10
+ /** Local, authored path displacement; zero retains the accepted drawing. */
11
+ flex?: number;
12
+ }
13
+ export interface PartGesture {
14
+ /** Finite entry action; living repeats use the same action followed by a quiet interval. */
15
+ duration: number;
16
+ repeatAfter: number;
17
+ /** A shutter, landing or acknowledgement should play once even when alive stays true. */
18
+ loop?: boolean;
19
+ frames: readonly (PartPose & {
20
+ at: number;
21
+ })[];
22
+ }
23
+ export interface ArticulatedPart {
24
+ name: string;
25
+ paths: readonly string[];
26
+ /** Compatible command streams with corresponding landmarks; node count never changes. */
27
+ pathStates?: readonly (readonly string[])[];
28
+ /** Numeric-coordinate offsets for flex. Fixed landmarks use zero offsets. */
29
+ pathOffsets?: readonly (readonly number[])[];
30
+ pivot?: readonly [number, number];
31
+ /** One pose per public state, in the rig's declared order. */
32
+ poses: readonly PartPose[];
33
+ gestures?: readonly (PartGesture | null | undefined)[];
34
+ accent?: boolean;
35
+ /** Status details retain room inside a heavier structural outline. */
36
+ detail?: boolean;
37
+ surface?: boolean;
38
+ traceLength?: number;
39
+ /** Clock phase is retained on pause; it is never multiplied by the living fade. */
40
+ spin?: {
41
+ state: number;
42
+ degreesPerSecond: number;
43
+ };
44
+ }
45
+ export interface Articulation {
46
+ name: string;
47
+ parts: readonly ArticulatedPart[];
48
+ }
49
+ /** Keyframe offsets have zero velocity at authored landmarks and hold outside the action. */
50
+ export declare function gesturePose(gesture: PartGesture, progress: number): PartPose;
51
+ export declare function sampleArticulation(art: Articulation, input: readonly number[], time?: number, living?: number, entries?: readonly number[]): {
52
+ paths: readonly string[];
53
+ transform: string;
54
+ x: number;
55
+ y: number;
56
+ angle: number;
57
+ scaleX: number;
58
+ scaleY: number;
59
+ opacity: number;
60
+ draw: number;
61
+ flex: number;
62
+ }[];
@@ -0,0 +1,85 @@
1
+ const channels = ['x', 'y', 'angle', 'scaleX', 'scaleY', 'opacity', 'draw', 'flex'];
2
+ const defaults = { x: 0, y: 0, angle: 0, scaleX: 1, scaleY: 1, opacity: 1, draw: 1, flex: 0 };
3
+ const finite = (n) => (Number.isFinite(n) ? n : 0);
4
+ const unit = (n) => Math.max(0, Math.min(1, finite(n)));
5
+ const smooth = (n) => {
6
+ const t = unit(n);
7
+ return t * t * t * (10 + t * (-15 + 6 * t));
8
+ };
9
+ const morphs = new WeakMap();
10
+ function partPaths(part, weights, flex) {
11
+ if (!part.pathStates && !part.pathOffsets)
12
+ return part.paths;
13
+ let compiled = morphs.get(part);
14
+ if (!compiled) {
15
+ const number = /[-+]?(?:\d*\.\d+|\d+\.?\d*)(?:e[-+]?\d+)?/gi;
16
+ compiled = part.paths.map((_, index) => {
17
+ const paths = part.pathStates?.map((state) => state[index]) ?? part.poses.map(() => part.paths[index]);
18
+ const literals = paths[0].split(number);
19
+ const values = paths.map((path) => (path.match(number) ?? []).map(Number));
20
+ if (part.pathOffsets && part.pathOffsets[index]?.length !== values[0].length)
21
+ throw new Error(`Incompatible path offsets: ${part.name}`);
22
+ for (const path of paths) {
23
+ if (JSON.stringify(path.split(number)) !== JSON.stringify(literals))
24
+ throw new Error(`Incompatible path topology: ${part.name}`);
25
+ }
26
+ return { literals, values };
27
+ });
28
+ morphs.set(part, compiled);
29
+ }
30
+ return compiled.map(({ literals, values }, pathIndex) => literals
31
+ .map((literal, index) => index === literals.length - 1
32
+ ? literal
33
+ : literal +
34
+ (values.reduce((sum, row, state) => sum + row[index] * (weights[state] ?? 0), 0) +
35
+ (part.pathOffsets?.[pathIndex]?.[index] ?? 0) * flex))
36
+ .join(''));
37
+ }
38
+ /** Keyframe offsets have zero velocity at authored landmarks and hold outside the action. */
39
+ export function gesturePose(gesture, progress) {
40
+ const t = unit(progress);
41
+ const frames = gesture.frames;
42
+ const right = frames.findIndex((frame) => frame.at >= t);
43
+ if (right <= 0)
44
+ return frames[right < 0 ? frames.length - 1 : 0] ?? {};
45
+ const a = frames[right - 1], b = frames[right];
46
+ const blend = smooth((t - a.at) / (b.at - a.at));
47
+ return Object.fromEntries(channels.map((key) => [key, (a[key] ?? 0) + ((b[key] ?? 0) - (a[key] ?? 0)) * blend]));
48
+ }
49
+ export function sampleArticulation(art, input, time = 0, living = 0, entries = []) {
50
+ const positive = input.map(unit);
51
+ const sum = positive.reduce((a, b) => a + b, 0);
52
+ const weights = sum > 0 ? positive.map((n) => n / sum) : positive.map((_, i) => Number(i === 0));
53
+ const life = unit(living);
54
+ return art.parts.map((part) => {
55
+ const pose = { ...defaults, x: 0, y: 0, angle: 0, scaleX: 0, scaleY: 0, opacity: 0, draw: 0 };
56
+ part.poses.forEach((target, i) => {
57
+ const weight = weights[i] ?? 0;
58
+ if (weight === 0)
59
+ return;
60
+ const gesture = part.gestures?.[i];
61
+ const entry = gesture ? gesturePose(gesture, entries[i] ?? 1) : {};
62
+ // Phase is independent of the living fade. Turning alive off cannot rewind an action.
63
+ const loop = gesture
64
+ ? gesturePose(gesture, Math.min((Math.max(0, finite(time)) % gesture.repeatAfter) / gesture.duration, 1))
65
+ : {};
66
+ for (const key of channels) {
67
+ pose[key] +=
68
+ weight *
69
+ ((target[key] ?? defaults[key]) +
70
+ (entry[key] ?? 0) * (gesture?.loop === false ? 1 : 1 - life) +
71
+ (loop[key] ?? 0) * (gesture?.loop === false ? 0 : life));
72
+ }
73
+ });
74
+ pose.opacity = unit(pose.opacity);
75
+ pose.draw = unit(pose.draw);
76
+ if (part.spin)
77
+ pose.angle += Math.max(0, finite(time)) * part.spin.degreesPerSecond;
78
+ const [px, py] = part.pivot ?? [12, 12];
79
+ return {
80
+ ...pose,
81
+ paths: partPaths(part, weights, pose.flex),
82
+ transform: `translate(${pose.x}px, ${pose.y}px) translate(${px}px, ${py}px) rotate(${pose.angle}deg) scale(${pose.scaleX}, ${pose.scaleY}) translate(${-px}px, ${-py}px)`,
83
+ };
84
+ });
85
+ }
@@ -17,18 +17,109 @@ export interface ShipColors {
17
17
  windows?: string;
18
18
  water?: string;
19
19
  }
20
- export interface LeafColors {
21
- blade?: string;
22
- stem?: string;
20
+ export interface AlertColors {
21
+ /** Critical punctuation; defaults to red, independent of the triangle outline. */
22
+ critical?: string;
23
23
  }
24
24
  export interface IconColors {
25
+ bookmark: never;
26
+ 'book-open': never;
27
+ image: never;
28
+ camera: never;
29
+ share: never;
30
+ calendar: never;
31
+ clock: never;
32
+ timer: never;
33
+ 'map-pin': never;
34
+ globe: never;
35
+ 'circle-help': never;
36
+ play: never;
37
+ pause: never;
38
+ volume: never;
39
+ music: never;
40
+ sun: never;
41
+ 'shopping-cart': never;
42
+ 'shopping-bag': never;
43
+ 'credit-card': never;
44
+ wallet: never;
45
+ package: never;
46
+ truck: never;
47
+ filter: never;
48
+ sliders: never;
49
+ 'layout-grid': never;
50
+ 'layout-dashboard': never;
51
+ list: never;
52
+ layers: never;
53
+ maximize: never;
54
+ minimize: never;
55
+ code: never;
56
+ terminal: never;
57
+ database: never;
58
+ wifi: never;
59
+ cloud: never;
60
+ moon: never;
61
+ 'log-in': never;
62
+ 'log-out': never;
63
+ lock: never;
64
+ key: never;
65
+ info: never;
66
+ mail: never;
67
+ send: never;
68
+ 'message-circle': never;
69
+ phone: never;
70
+ video: never;
71
+ mic: never;
72
+ pencil: never;
73
+ 'file-text': never;
74
+ file: never;
75
+ folder: never;
76
+ save: never;
77
+ upload: never;
78
+ clipboard: never;
79
+ home: never;
80
+ menu: never;
81
+ plus: never;
82
+ minus: never;
83
+ 'chevron-down': never;
84
+ 'chevron-right': never;
85
+ 'chevron-left': never;
86
+ 'chevron-up': never;
87
+ 'arrow-right': never;
88
+ 'arrow-left': never;
89
+ 'arrow-up': never;
90
+ 'arrow-down': never;
91
+ 'external-link': never;
92
+ 'more-horizontal': never;
93
+ 'more-vertical': never;
94
+ user: never;
95
+ users: never;
96
+ settings: never;
97
+ refresh: never;
98
+ copy: never;
99
+ eye: never;
100
+ link: never;
101
+ check: never;
102
+ close: never;
103
+ sparkles: never;
104
+ sparkle: never;
105
+ star: never;
106
+ wave: never;
25
107
  dog: DogColors;
26
108
  monkey: MonkeyColors;
27
109
  heart: HeartColors;
28
110
  ship: ShipColors;
29
- leaf: LeafColors;
30
111
  rocket: never;
31
112
  search: never;
32
113
  bell: never;
33
114
  download: never;
115
+ shield: never;
116
+ cursor: never;
117
+ clapperboard: never;
118
+ plug: never;
119
+ bulb: never;
120
+ alert: AlertColors;
121
+ 'badge-check': never;
122
+ replace: never;
123
+ delete: never;
124
+ swap: never;
34
125
  }
@@ -5,6 +5,7 @@ export interface StatefulIconProps<State extends string, Colors = never> {
5
5
  accentColor?: string;
6
6
  /** Optional, icon-specific detail colours. Unset parts inherit their defaults. */
7
7
  colors?: Colors;
8
+ /** Outline width in SVG units. Defaults to 1.65. */
8
9
  strokeWidth?: number;
9
10
  speed?: number;
10
11
  /** Keeps the icon performing after its state transition has settled. */
@@ -0,0 +1,12 @@
1
+ export declare const SPARKLE_BLINK_DURATION = 2.4;
2
+ export declare function sampleTwinkle(time: number, alive: number, entry: number, start: number, repeats: readonly number[]): {
3
+ dark: number;
4
+ tilt: number;
5
+ };
6
+ export declare function sampleSparkleCore(weights: readonly number[], time: number, alive: number, entry: number, baseScale: number): {
7
+ core: string;
8
+ coreOpacity: number;
9
+ tint: number;
10
+ };
11
+ /** Lucide's ISC-licensed rounded four-point contour, shared by the two compositions. */
12
+ export declare const SPARKLE_CORE = "M11.017 2.814a1 1 0 0 1 1.966 0l1.051 5.558a2 2 0 0 0 1.594 1.594l5.558 1.051a1 1 0 0 1 0 1.966l-5.558 1.051a2 2 0 0 0-1.594 1.594l-1.051 5.558a1 1 0 0 1-1.966 0l-1.051-5.558a2 2 0 0 0-1.594-1.594l-5.558-1.051a1 1 0 0 1 0-1.966l5.558-1.051a2 2 0 0 0 1.594-1.594z";
@@ -0,0 +1,38 @@
1
+ import { behaviorBeat } from "./behavior-curves.js";
2
+ const clamp = (n) => Math.max(0, Math.min(1, n));
3
+ export const SPARKLE_BLINK_DURATION = 2.4;
4
+ /** Soft disappearance and recovery; no dark hold, flash or scale-pop. */
5
+ function twinkle(time, start) {
6
+ const dark = clamp(behaviorBeat(time, start, 0.48, 0, 0.68));
7
+ return {
8
+ dark,
9
+ tilt: dark * Math.sin(((time - start) / 1.16) * Math.PI * 2) * 4,
10
+ };
11
+ }
12
+ export function sampleTwinkle(time, alive, entry, start, repeats) {
13
+ const first = twinkle(clamp(entry) * SPARKLE_BLINK_DURATION, start);
14
+ let recurring = { dark: 0, tilt: 0 };
15
+ if (alive > 0)
16
+ for (const at of repeats) {
17
+ const beat = twinkle(((time % 6.4) + 6.4) % 6.4, at);
18
+ if (beat.dark > 0)
19
+ recurring = { dark: beat.dark * clamp(alive), tilt: beat.tilt * clamp(alive) };
20
+ }
21
+ // Smooth union keeps overlapping entry/live fades bounded, without max() handoff kinks.
22
+ return {
23
+ dark: 1 - (1 - first.dark) * (1 - recurring.dark),
24
+ tilt: first.tilt * (1 - recurring.dark * 0.5) + recurring.tilt * (1 - first.dark * 0.5),
25
+ };
26
+ }
27
+ export function sampleSparkleCore(weights, time, alive, entry, baseScale) {
28
+ const [, shimmering, blink, dimmed] = weights.map(clamp), life = clamp(alive);
29
+ const beat = sampleTwinkle(time, life, entry, 0.05, [0.2, 3.2]);
30
+ const scale = baseScale - dimmed * 0.09 + shimmering * 0.025;
31
+ return {
32
+ core: `translate(12px, 12px) rotate(${shimmering * (-5 + life * Math.sin(time * 1.5) * 4) + blink * beat.tilt}deg) scale(${scale}) translate(-12px, -12px)`,
33
+ coreOpacity: clamp(1 - blink * beat.dark * 0.9),
34
+ tint: 0,
35
+ };
36
+ }
37
+ /** Lucide's ISC-licensed rounded four-point contour, shared by the two compositions. */
38
+ export const SPARKLE_CORE = 'M11.017 2.814a1 1 0 0 1 1.966 0l1.051 5.558a2 2 0 0 0 1.594 1.594l5.558 1.051a1 1 0 0 1 0 1.966l-5.558 1.051a2 2 0 0 0-1.594 1.594l-1.051 5.558a1 1 0 0 1-1.966 0l-1.051-5.558a2 2 0 0 0-1.594-1.594l-5.558-1.051a1 1 0 0 1 0-1.966l5.558-1.051a2 2 0 0 0 1.594-1.594z';
@@ -1,10 +1,14 @@
1
1
  import { type RefObject } from 'react';
2
2
  import { type MotionValue } from 'motion/react';
3
3
  export declare function usePoseWeight(active: boolean, pace: number, reduced: boolean): MotionValue<number>;
4
+ /** Finite action playhead: preserve interrupted progress; restart only once invisible.
5
+ * Motion owns scheduling, not React state or another recurring frame loop.
6
+ */
7
+ export declare function useActionProgress(active: boolean, pace: number, reduced: boolean, duration: number, canRestart?: () => boolean): MotionValue<number>;
4
8
  /** Own the source subscription so changing speed disposes the previous spring.
5
9
  * Motion's source-following spring cleanup currently removes the subscription
6
10
  * without stopping the old animation when options change. A numeric spring has
7
11
  * the correct animation cleanup; we forward source values through one listener.
8
12
  */
9
13
  export declare function useFollowPose(source: MotionValue<number>, pace: number, reduced: boolean): MotionValue<number>;
10
- export declare function useBehaviorClock(element: RefObject<SVGSVGElement | null>, enabled: boolean, pace: number, amount: MotionValue<number>): MotionValue<number>;
14
+ export declare function useBehaviorClock(element: RefObject<SVGSVGElement | null>, enabled: boolean, pace: number, amount: MotionValue<number>, coastWithAmount?: boolean): MotionValue<number>;
@@ -24,6 +24,32 @@ export function usePoseWeight(active, pace, reduced) {
24
24
  }, [active, pace, reduced, value, spring]);
25
25
  return value;
26
26
  }
27
+ /** Finite action playhead: preserve interrupted progress; restart only once invisible.
28
+ * Motion owns scheduling, not React state or another recurring frame loop.
29
+ */
30
+ export function useActionProgress(active, pace, reduced, duration, canRestart) {
31
+ const progress = useMotionValue(1);
32
+ const wasActive = useRef(false);
33
+ useEffect(() => {
34
+ const entered = active && !wasActive.current;
35
+ wasActive.current = active;
36
+ if (reduced) {
37
+ progress.jump(1);
38
+ return;
39
+ }
40
+ if (entered && progress.get() === 1 && (canRestart?.() ?? true))
41
+ progress.jump(0);
42
+ const remaining = 1 - progress.get();
43
+ if (remaining <= 0)
44
+ return;
45
+ const animation = animate(progress, 1, {
46
+ duration: (duration * remaining) / pace,
47
+ ease: 'linear',
48
+ });
49
+ return () => animation.stop();
50
+ }, [active, pace, reduced, duration, progress, canRestart]);
51
+ return progress;
52
+ }
27
53
  /** Own the source subscription so changing speed disposes the previous spring.
28
54
  * Motion's source-following spring cleanup currently removes the subscription
29
55
  * without stopping the old animation when options change. A numeric spring has
@@ -49,7 +75,7 @@ export function useFollowPose(source, pace, reduced) {
49
75
  }, [source, value, options, reduced]);
50
76
  return value;
51
77
  }
52
- export function useBehaviorClock(element, enabled, pace, amount) {
78
+ export function useBehaviorClock(element, enabled, pace, amount, coastWithAmount = false) {
53
79
  const time = useMotionValue(0);
54
80
  useEffect(() => {
55
81
  if (!element.current || (!enabled && amount.get() < 0.001))
@@ -57,7 +83,8 @@ export function useBehaviorClock(element, enabled, pace, amount) {
57
83
  const stop = subscribeBehavior(element.current, (delta) => {
58
84
  if (!enabled && amount.get() < 0.001)
59
85
  return false;
60
- time.set(time.get() + delta * pace);
86
+ const coast = coastWithAmount ? Math.max(0, Math.min(1, amount.get())) : 1;
87
+ time.set(time.get() + delta * pace * coast);
61
88
  });
62
89
  const unAmount = amount.on('change', (value) => {
63
90
  if (!enabled && value < 0.001)
@@ -67,6 +94,6 @@ export function useBehaviorClock(element, enabled, pace, amount) {
67
94
  stop();
68
95
  unAmount();
69
96
  };
70
- }, [element, enabled, pace, amount, time]);
97
+ }, [element, enabled, pace, amount, time, coastWithAmount]);
71
98
  return time;
72
99
  }