weasel-icons 0.2.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 (303) hide show
  1. package/README.md +81 -2
  2. package/THIRD_PARTY_NOTICES.md +6 -4
  3. package/dist/icons/arrow-down/arrow-down-icon.d.ts +5 -0
  4. package/dist/icons/arrow-down/arrow-down-icon.js +9 -0
  5. package/dist/icons/arrow-down/arrow-down-rig.d.ts +43 -0
  6. package/dist/icons/arrow-down/arrow-down-rig.js +64 -0
  7. package/dist/icons/arrow-left/arrow-left-icon.d.ts +5 -0
  8. package/dist/icons/arrow-left/arrow-left-icon.js +9 -0
  9. package/dist/icons/arrow-left/arrow-left-rig.d.ts +43 -0
  10. package/dist/icons/arrow-left/arrow-left-rig.js +64 -0
  11. package/dist/icons/arrow-right/arrow-right-icon.d.ts +5 -0
  12. package/dist/icons/arrow-right/arrow-right-icon.js +9 -0
  13. package/dist/icons/arrow-right/arrow-right-rig.d.ts +43 -0
  14. package/dist/icons/arrow-right/arrow-right-rig.js +64 -0
  15. package/dist/icons/arrow-up/arrow-up-icon.d.ts +5 -0
  16. package/dist/icons/arrow-up/arrow-up-icon.js +9 -0
  17. package/dist/icons/arrow-up/arrow-up-rig.d.ts +43 -0
  18. package/dist/icons/arrow-up/arrow-up-rig.js +64 -0
  19. package/dist/icons/book-open/book-open-icon.d.ts +5 -0
  20. package/dist/icons/book-open/book-open-icon.js +9 -0
  21. package/dist/icons/book-open/book-open-rig.d.ts +65 -0
  22. package/dist/icons/book-open/book-open-rig.js +95 -0
  23. package/dist/icons/bookmark/bookmark-icon.d.ts +5 -0
  24. package/dist/icons/bookmark/bookmark-icon.js +9 -0
  25. package/dist/icons/bookmark/bookmark-rig.d.ts +43 -0
  26. package/dist/icons/bookmark/bookmark-rig.js +65 -0
  27. package/dist/icons/calendar/calendar-icon.d.ts +5 -0
  28. package/dist/icons/calendar/calendar-icon.js +9 -0
  29. package/dist/icons/calendar/calendar-rig.d.ts +67 -0
  30. package/dist/icons/calendar/calendar-rig.js +95 -0
  31. package/dist/icons/camera/camera-icon.d.ts +5 -0
  32. package/dist/icons/camera/camera-icon.js +9 -0
  33. package/dist/icons/camera/camera-rig.d.ts +58 -0
  34. package/dist/icons/camera/camera-rig.js +82 -0
  35. package/dist/icons/chevron-down/chevron-down-icon.d.ts +5 -0
  36. package/dist/icons/chevron-down/chevron-down-icon.js +9 -0
  37. package/dist/icons/chevron-down/chevron-down-rig.d.ts +48 -0
  38. package/dist/icons/chevron-down/chevron-down-rig.js +30 -0
  39. package/dist/icons/chevron-left/chevron-left-icon.d.ts +5 -0
  40. package/dist/icons/chevron-left/chevron-left-icon.js +9 -0
  41. package/dist/icons/chevron-left/chevron-left-rig.d.ts +34 -0
  42. package/dist/icons/chevron-left/chevron-left-rig.js +49 -0
  43. package/dist/icons/chevron-right/chevron-right-icon.d.ts +5 -0
  44. package/dist/icons/chevron-right/chevron-right-icon.js +9 -0
  45. package/dist/icons/chevron-right/chevron-right-rig.d.ts +34 -0
  46. package/dist/icons/chevron-right/chevron-right-rig.js +49 -0
  47. package/dist/icons/chevron-up/chevron-up-icon.d.ts +5 -0
  48. package/dist/icons/chevron-up/chevron-up-icon.js +9 -0
  49. package/dist/icons/chevron-up/chevron-up-rig.d.ts +48 -0
  50. package/dist/icons/chevron-up/chevron-up-rig.js +30 -0
  51. package/dist/icons/circle-help/circle-help-icon.d.ts +5 -0
  52. package/dist/icons/circle-help/circle-help-icon.js +9 -0
  53. package/dist/icons/circle-help/circle-help-rig.d.ts +45 -0
  54. package/dist/icons/circle-help/circle-help-rig.js +70 -0
  55. package/dist/icons/clipboard/clipboard-icon.d.ts +5 -0
  56. package/dist/icons/clipboard/clipboard-icon.js +9 -0
  57. package/dist/icons/clipboard/clipboard-rig.d.ts +69 -0
  58. package/dist/icons/clipboard/clipboard-rig.js +99 -0
  59. package/dist/icons/clock/clock-icon.d.ts +5 -0
  60. package/dist/icons/clock/clock-icon.js +9 -0
  61. package/dist/icons/clock/clock-rig.d.ts +40 -0
  62. package/dist/icons/clock/clock-rig.js +53 -0
  63. package/dist/icons/cloud/cloud-icon.d.ts +5 -0
  64. package/dist/icons/cloud/cloud-icon.js +9 -0
  65. package/dist/icons/cloud/cloud-rig.d.ts +74 -0
  66. package/dist/icons/cloud/cloud-rig.js +103 -0
  67. package/dist/icons/code/code-icon.d.ts +5 -0
  68. package/dist/icons/code/code-icon.js +9 -0
  69. package/dist/icons/code/code-rig.d.ts +104 -0
  70. package/dist/icons/code/code-rig.js +148 -0
  71. package/dist/icons/credit-card/credit-card-icon.d.ts +5 -0
  72. package/dist/icons/credit-card/credit-card-icon.js +9 -0
  73. package/dist/icons/credit-card/credit-card-rig.d.ts +88 -0
  74. package/dist/icons/credit-card/credit-card-rig.js +122 -0
  75. package/dist/icons/database/database-icon.d.ts +5 -0
  76. package/dist/icons/database/database-icon.js +9 -0
  77. package/dist/icons/database/database-rig.d.ts +61 -0
  78. package/dist/icons/database/database-rig.js +86 -0
  79. package/dist/icons/external-link/external-link-icon.d.ts +5 -0
  80. package/dist/icons/external-link/external-link-icon.js +9 -0
  81. package/dist/icons/external-link/external-link-rig.d.ts +45 -0
  82. package/dist/icons/external-link/external-link-rig.js +42 -0
  83. package/dist/icons/file/file-icon.d.ts +5 -0
  84. package/dist/icons/file/file-icon.js +9 -0
  85. package/dist/icons/file/file-rig.d.ts +53 -0
  86. package/dist/icons/file/file-rig.js +80 -0
  87. package/dist/icons/file-text/file-text-icon.d.ts +5 -0
  88. package/dist/icons/file-text/file-text-icon.js +9 -0
  89. package/dist/icons/file-text/file-text-rig.d.ts +93 -0
  90. package/dist/icons/file-text/file-text-rig.js +138 -0
  91. package/dist/icons/filter/filter-icon.d.ts +5 -0
  92. package/dist/icons/filter/filter-icon.js +9 -0
  93. package/dist/icons/filter/filter-rig.d.ts +72 -0
  94. package/dist/icons/filter/filter-rig.js +99 -0
  95. package/dist/icons/folder/folder-icon.d.ts +5 -0
  96. package/dist/icons/folder/folder-icon.js +9 -0
  97. package/dist/icons/folder/folder-rig.d.ts +20 -0
  98. package/dist/icons/folder/folder-rig.js +28 -0
  99. package/dist/icons/globe/globe-icon.d.ts +5 -0
  100. package/dist/icons/globe/globe-icon.js +9 -0
  101. package/dist/icons/globe/globe-rig.d.ts +40 -0
  102. package/dist/icons/globe/globe-rig.js +57 -0
  103. package/dist/icons/home/home-icon.d.ts +5 -0
  104. package/dist/icons/home/home-icon.js +9 -0
  105. package/dist/icons/home/home-rig.d.ts +49 -0
  106. package/dist/icons/home/home-rig.js +76 -0
  107. package/dist/icons/image/image-icon.d.ts +5 -0
  108. package/dist/icons/image/image-icon.js +9 -0
  109. package/dist/icons/image/image-rig.d.ts +70 -0
  110. package/dist/icons/image/image-rig.js +99 -0
  111. package/dist/icons/info/info-icon.d.ts +5 -0
  112. package/dist/icons/info/info-icon.js +9 -0
  113. package/dist/icons/info/info-rig.d.ts +48 -0
  114. package/dist/icons/info/info-rig.js +69 -0
  115. package/dist/icons/key/key-icon.d.ts +5 -0
  116. package/dist/icons/key/key-icon.js +9 -0
  117. package/dist/icons/key/key-rig.d.ts +50 -0
  118. package/dist/icons/key/key-rig.js +76 -0
  119. package/dist/icons/layers/layers-icon.d.ts +5 -0
  120. package/dist/icons/layers/layers-icon.js +9 -0
  121. package/dist/icons/layers/layers-rig.d.ts +147 -0
  122. package/dist/icons/layers/layers-rig.js +211 -0
  123. package/dist/icons/layout-dashboard/layout-dashboard-icon.d.ts +5 -0
  124. package/dist/icons/layout-dashboard/layout-dashboard-icon.js +9 -0
  125. package/dist/icons/layout-dashboard/layout-dashboard-rig.d.ts +194 -0
  126. package/dist/icons/layout-dashboard/layout-dashboard-rig.js +284 -0
  127. package/dist/icons/layout-grid/layout-grid-icon.d.ts +5 -0
  128. package/dist/icons/layout-grid/layout-grid-icon.js +9 -0
  129. package/dist/icons/layout-grid/layout-grid-rig.d.ts +103 -0
  130. package/dist/icons/layout-grid/layout-grid-rig.js +167 -0
  131. package/dist/icons/list/list-icon.d.ts +5 -0
  132. package/dist/icons/list/list-icon.js +9 -0
  133. package/dist/icons/list/list-rig.d.ts +165 -0
  134. package/dist/icons/list/list-rig.js +231 -0
  135. package/dist/icons/lock/lock-icon.d.ts +5 -0
  136. package/dist/icons/lock/lock-icon.js +9 -0
  137. package/dist/icons/lock/lock-rig.d.ts +42 -0
  138. package/dist/icons/lock/lock-rig.js +58 -0
  139. package/dist/icons/log-in/log-in-icon.d.ts +5 -0
  140. package/dist/icons/log-in/log-in-icon.js +9 -0
  141. package/dist/icons/log-in/log-in-rig.d.ts +39 -0
  142. package/dist/icons/log-in/log-in-rig.js +55 -0
  143. package/dist/icons/log-out/log-out-icon.d.ts +5 -0
  144. package/dist/icons/log-out/log-out-icon.js +9 -0
  145. package/dist/icons/log-out/log-out-rig.d.ts +39 -0
  146. package/dist/icons/log-out/log-out-rig.js +55 -0
  147. package/dist/icons/mail/mail-icon.d.ts +5 -0
  148. package/dist/icons/mail/mail-icon.js +9 -0
  149. package/dist/icons/mail/mail-rig.d.ts +20 -0
  150. package/dist/icons/mail/mail-rig.js +28 -0
  151. package/dist/icons/map-pin/map-pin-icon.d.ts +5 -0
  152. package/dist/icons/map-pin/map-pin-icon.js +9 -0
  153. package/dist/icons/map-pin/map-pin-rig.d.ts +118 -0
  154. package/dist/icons/map-pin/map-pin-rig.js +164 -0
  155. package/dist/icons/maximize/maximize-icon.d.ts +5 -0
  156. package/dist/icons/maximize/maximize-icon.js +9 -0
  157. package/dist/icons/maximize/maximize-rig.d.ts +190 -0
  158. package/dist/icons/maximize/maximize-rig.js +268 -0
  159. package/dist/icons/menu/menu-icon.d.ts +5 -0
  160. package/dist/icons/menu/menu-icon.js +9 -0
  161. package/dist/icons/menu/menu-rig.d.ts +41 -0
  162. package/dist/icons/menu/menu-rig.js +58 -0
  163. package/dist/icons/message-circle/message-circle-icon.d.ts +5 -0
  164. package/dist/icons/message-circle/message-circle-icon.js +9 -0
  165. package/dist/icons/message-circle/message-circle-rig.d.ts +99 -0
  166. package/dist/icons/message-circle/message-circle-rig.js +143 -0
  167. package/dist/icons/mic/mic-icon.d.ts +5 -0
  168. package/dist/icons/mic/mic-icon.js +9 -0
  169. package/dist/icons/mic/mic-rig.d.ts +67 -0
  170. package/dist/icons/mic/mic-rig.js +96 -0
  171. package/dist/icons/minimize/minimize-icon.d.ts +5 -0
  172. package/dist/icons/minimize/minimize-icon.js +9 -0
  173. package/dist/icons/minimize/minimize-rig.d.ts +190 -0
  174. package/dist/icons/minimize/minimize-rig.js +268 -0
  175. package/dist/icons/minus/minus-icon.d.ts +5 -0
  176. package/dist/icons/minus/minus-icon.js +9 -0
  177. package/dist/icons/minus/minus-rig.d.ts +31 -0
  178. package/dist/icons/minus/minus-rig.js +47 -0
  179. package/dist/icons/moon/moon-icon.d.ts +5 -0
  180. package/dist/icons/moon/moon-icon.js +9 -0
  181. package/dist/icons/moon/moon-rig.d.ts +62 -0
  182. package/dist/icons/moon/moon-rig.js +87 -0
  183. package/dist/icons/more-horizontal/more-horizontal-icon.d.ts +5 -0
  184. package/dist/icons/more-horizontal/more-horizontal-icon.js +9 -0
  185. package/dist/icons/more-horizontal/more-horizontal-rig.d.ts +91 -0
  186. package/dist/icons/more-horizontal/more-horizontal-rig.js +141 -0
  187. package/dist/icons/more-vertical/more-vertical-icon.d.ts +5 -0
  188. package/dist/icons/more-vertical/more-vertical-icon.js +9 -0
  189. package/dist/icons/more-vertical/more-vertical-rig.d.ts +91 -0
  190. package/dist/icons/more-vertical/more-vertical-rig.js +141 -0
  191. package/dist/icons/music/music-icon.d.ts +5 -0
  192. package/dist/icons/music/music-icon.js +9 -0
  193. package/dist/icons/music/music-rig.d.ts +66 -0
  194. package/dist/icons/music/music-rig.js +95 -0
  195. package/dist/icons/package/package-icon.d.ts +5 -0
  196. package/dist/icons/package/package-icon.js +9 -0
  197. package/dist/icons/package/package-rig.d.ts +40 -0
  198. package/dist/icons/package/package-rig.js +60 -0
  199. package/dist/icons/pause/pause-icon.d.ts +5 -0
  200. package/dist/icons/pause/pause-icon.js +9 -0
  201. package/dist/icons/pause/pause-rig.d.ts +104 -0
  202. package/dist/icons/pause/pause-rig.js +147 -0
  203. package/dist/icons/pencil/pencil-icon.d.ts +5 -0
  204. package/dist/icons/pencil/pencil-icon.js +9 -0
  205. package/dist/icons/pencil/pencil-rig.d.ts +48 -0
  206. package/dist/icons/pencil/pencil-rig.js +68 -0
  207. package/dist/icons/phone/phone-icon.d.ts +5 -0
  208. package/dist/icons/phone/phone-icon.js +9 -0
  209. package/dist/icons/phone/phone-rig.d.ts +41 -0
  210. package/dist/icons/phone/phone-rig.js +60 -0
  211. package/dist/icons/play/play-icon.d.ts +5 -0
  212. package/dist/icons/play/play-icon.js +9 -0
  213. package/dist/icons/play/play-rig.d.ts +58 -0
  214. package/dist/icons/play/play-rig.js +80 -0
  215. package/dist/icons/plus/plus-icon.d.ts +5 -0
  216. package/dist/icons/plus/plus-icon.js +9 -0
  217. package/dist/icons/plus/plus-rig.d.ts +94 -0
  218. package/dist/icons/plus/plus-rig.js +137 -0
  219. package/dist/icons/replace/replace-icon.js +9 -8
  220. package/dist/icons/replace/replace-rig.d.ts +7 -1
  221. package/dist/icons/replace/replace-rig.js +35 -17
  222. package/dist/icons/save/save-icon.d.ts +5 -0
  223. package/dist/icons/save/save-icon.js +9 -0
  224. package/dist/icons/save/save-rig.d.ts +43 -0
  225. package/dist/icons/save/save-rig.js +63 -0
  226. package/dist/icons/send/send-icon.d.ts +5 -0
  227. package/dist/icons/send/send-icon.js +9 -0
  228. package/dist/icons/send/send-rig.d.ts +43 -0
  229. package/dist/icons/send/send-rig.js +61 -0
  230. package/dist/icons/settings/settings-icon.d.ts +5 -0
  231. package/dist/icons/settings/settings-icon.js +9 -0
  232. package/dist/icons/settings/settings-rig.d.ts +41 -0
  233. package/dist/icons/settings/settings-rig.js +64 -0
  234. package/dist/icons/share/share-icon.d.ts +5 -0
  235. package/dist/icons/share/share-icon.js +9 -0
  236. package/dist/icons/share/share-rig.d.ts +80 -0
  237. package/dist/icons/share/share-rig.js +114 -0
  238. package/dist/icons/shopping-bag/shopping-bag-icon.d.ts +5 -0
  239. package/dist/icons/shopping-bag/shopping-bag-icon.js +9 -0
  240. package/dist/icons/shopping-bag/shopping-bag-rig.d.ts +92 -0
  241. package/dist/icons/shopping-bag/shopping-bag-rig.js +139 -0
  242. package/dist/icons/shopping-cart/shopping-cart-icon.d.ts +5 -0
  243. package/dist/icons/shopping-cart/shopping-cart-icon.js +9 -0
  244. package/dist/icons/shopping-cart/shopping-cart-rig.d.ts +72 -0
  245. package/dist/icons/shopping-cart/shopping-cart-rig.js +111 -0
  246. package/dist/icons/sliders/sliders-icon.d.ts +5 -0
  247. package/dist/icons/sliders/sliders-icon.js +9 -0
  248. package/dist/icons/sliders/sliders-rig.d.ts +156 -0
  249. package/dist/icons/sliders/sliders-rig.js +231 -0
  250. package/dist/icons/sun/sun-icon.d.ts +5 -0
  251. package/dist/icons/sun/sun-icon.js +9 -0
  252. package/dist/icons/sun/sun-rig.d.ts +290 -0
  253. package/dist/icons/sun/sun-rig.js +401 -0
  254. package/dist/icons/terminal/terminal-icon.d.ts +5 -0
  255. package/dist/icons/terminal/terminal-icon.js +9 -0
  256. package/dist/icons/terminal/terminal-rig.d.ts +71 -0
  257. package/dist/icons/terminal/terminal-rig.js +102 -0
  258. package/dist/icons/timer/timer-icon.d.ts +5 -0
  259. package/dist/icons/timer/timer-icon.js +9 -0
  260. package/dist/icons/timer/timer-rig.d.ts +50 -0
  261. package/dist/icons/timer/timer-rig.js +72 -0
  262. package/dist/icons/truck/truck-icon.d.ts +5 -0
  263. package/dist/icons/truck/truck-icon.js +9 -0
  264. package/dist/icons/truck/truck-rig.d.ts +184 -0
  265. package/dist/icons/truck/truck-rig.js +272 -0
  266. package/dist/icons/upload/upload-icon.d.ts +5 -0
  267. package/dist/icons/upload/upload-icon.js +9 -0
  268. package/dist/icons/upload/upload-rig.d.ts +99 -0
  269. package/dist/icons/upload/upload-rig.js +124 -0
  270. package/dist/icons/user/user-icon.d.ts +5 -0
  271. package/dist/icons/user/user-icon.js +9 -0
  272. package/dist/icons/user/user-rig.d.ts +45 -0
  273. package/dist/icons/user/user-rig.js +66 -0
  274. package/dist/icons/users/users-icon.d.ts +5 -0
  275. package/dist/icons/users/users-icon.js +9 -0
  276. package/dist/icons/users/users-rig.d.ts +76 -0
  277. package/dist/icons/users/users-rig.js +113 -0
  278. package/dist/icons/video/video-icon.d.ts +5 -0
  279. package/dist/icons/video/video-icon.js +9 -0
  280. package/dist/icons/video/video-rig.d.ts +62 -0
  281. package/dist/icons/video/video-rig.js +84 -0
  282. package/dist/icons/volume/volume-icon.d.ts +5 -0
  283. package/dist/icons/volume/volume-icon.js +9 -0
  284. package/dist/icons/volume/volume-rig.d.ts +82 -0
  285. package/dist/icons/volume/volume-rig.js +120 -0
  286. package/dist/icons/wallet/wallet-icon.d.ts +5 -0
  287. package/dist/icons/wallet/wallet-icon.js +9 -0
  288. package/dist/icons/wallet/wallet-rig.d.ts +63 -0
  289. package/dist/icons/wallet/wallet-rig.js +90 -0
  290. package/dist/icons/wifi/wifi-icon.d.ts +5 -0
  291. package/dist/icons/wifi/wifi-icon.js +9 -0
  292. package/dist/icons/wifi/wifi-rig.d.ts +189 -0
  293. package/dist/icons/wifi/wifi-rig.js +260 -0
  294. package/dist/index.d.ts +72 -0
  295. package/dist/index.js +72 -0
  296. package/dist/shared/articulated-icon.d.ts +7 -0
  297. package/dist/shared/articulated-icon.js +49 -0
  298. package/dist/shared/articulation.d.ts +62 -0
  299. package/dist/shared/articulation.js +85 -0
  300. package/dist/shared/icon-colors.d.ts +72 -0
  301. package/dist/shared/use-icon-motion.d.ts +1 -1
  302. package/dist/shared/use-icon-motion.js +4 -3
  303. package/package.json +361 -1
@@ -0,0 +1,260 @@
1
+ export const wifiStates = ['offline', 'connecting', 'connected'];
2
+ // Lucide-derived outline; attribution and pinned source: THIRD_PARTY_NOTICES.md.
3
+ // Join a network: inner, middle, then outer arcs acquire the signal, hold together, and retry. Connected performs one outward acknowledgement and stays solid.
4
+ export const wifiArt = {
5
+ name: 'wifi',
6
+ parts: [
7
+ {
8
+ name: 'origin',
9
+ paths: ['M12 20h.01'],
10
+ poses: [{}, {}, {}],
11
+ pivot: [12, 12],
12
+ gestures: [],
13
+ },
14
+ {
15
+ name: 'arc-0',
16
+ paths: ['M2 8.82a15 15 0 0 1 20 0'],
17
+ poses: [
18
+ {
19
+ opacity: 0.25,
20
+ },
21
+ {
22
+ opacity: 0.2,
23
+ },
24
+ {
25
+ opacity: 1,
26
+ },
27
+ ],
28
+ pivot: [12, 20],
29
+ gestures: [
30
+ null,
31
+ {
32
+ duration: 2.4,
33
+ repeatAfter: 3.7,
34
+ loop: true,
35
+ frames: [
36
+ {
37
+ at: 0,
38
+ },
39
+ {
40
+ at: 0.48000000000000004,
41
+ opacity: -0.08000000000000002,
42
+ scaleX: -0.04,
43
+ scaleY: -0.07,
44
+ },
45
+ {
46
+ at: 0.6200000000000001,
47
+ opacity: 0.8,
48
+ scaleX: 0.025,
49
+ scaleY: 0.025,
50
+ },
51
+ {
52
+ at: 0.78,
53
+ opacity: 0.8,
54
+ },
55
+ {
56
+ at: 0.9,
57
+ opacity: -0.08000000000000002,
58
+ },
59
+ {
60
+ at: 1,
61
+ },
62
+ ],
63
+ },
64
+ {
65
+ duration: 1.2,
66
+ repeatAfter: 2.2,
67
+ loop: false,
68
+ frames: [
69
+ {
70
+ at: 0,
71
+ },
72
+ {
73
+ at: 0.34,
74
+ opacity: -0.5,
75
+ scaleX: -0.05,
76
+ scaleY: -0.05,
77
+ },
78
+ {
79
+ at: 0.66,
80
+ scaleX: 0.015,
81
+ scaleY: 0.015,
82
+ },
83
+ {
84
+ at: 1,
85
+ },
86
+ ],
87
+ },
88
+ ],
89
+ },
90
+ {
91
+ name: 'arc-1',
92
+ paths: ['M5 12.859a10 10 0 0 1 14 0'],
93
+ poses: [
94
+ {
95
+ opacity: 0.25,
96
+ },
97
+ {
98
+ opacity: 0.55,
99
+ },
100
+ {
101
+ opacity: 1,
102
+ },
103
+ ],
104
+ pivot: [12, 20],
105
+ gestures: [
106
+ null,
107
+ {
108
+ duration: 2.4,
109
+ repeatAfter: 3.7,
110
+ loop: true,
111
+ frames: [
112
+ {
113
+ at: 0,
114
+ },
115
+ {
116
+ at: 0.28,
117
+ opacity: -0.43000000000000005,
118
+ scaleX: -0.04,
119
+ scaleY: -0.07,
120
+ },
121
+ {
122
+ at: 0.42000000000000004,
123
+ opacity: 0.44999999999999996,
124
+ scaleX: 0.025,
125
+ scaleY: 0.025,
126
+ },
127
+ {
128
+ at: 0.78,
129
+ opacity: 0.44999999999999996,
130
+ },
131
+ {
132
+ at: 0.9,
133
+ opacity: -0.43000000000000005,
134
+ },
135
+ {
136
+ at: 1,
137
+ },
138
+ ],
139
+ },
140
+ {
141
+ duration: 1.2,
142
+ repeatAfter: 2.2,
143
+ loop: false,
144
+ frames: [
145
+ {
146
+ at: 0,
147
+ },
148
+ {
149
+ at: 0.21000000000000002,
150
+ opacity: -0.5,
151
+ scaleX: -0.05,
152
+ scaleY: -0.05,
153
+ },
154
+ {
155
+ at: 0.53,
156
+ scaleX: 0.015,
157
+ scaleY: 0.015,
158
+ },
159
+ {
160
+ at: 1,
161
+ },
162
+ ],
163
+ },
164
+ ],
165
+ },
166
+ {
167
+ name: 'arc-2',
168
+ paths: ['M8.5 16.429a5 5 0 0 1 7 0'],
169
+ poses: [
170
+ {
171
+ opacity: 0.25,
172
+ },
173
+ {
174
+ opacity: 1,
175
+ },
176
+ {
177
+ opacity: 1,
178
+ },
179
+ ],
180
+ pivot: [12, 20],
181
+ gestures: [
182
+ null,
183
+ {
184
+ duration: 2.4,
185
+ repeatAfter: 3.7,
186
+ loop: true,
187
+ frames: [
188
+ {
189
+ at: 0,
190
+ },
191
+ {
192
+ at: 0.08,
193
+ opacity: -0.88,
194
+ scaleX: -0.04,
195
+ scaleY: -0.07,
196
+ },
197
+ {
198
+ at: 0.22000000000000003,
199
+ opacity: 0,
200
+ scaleX: 0.025,
201
+ scaleY: 0.025,
202
+ },
203
+ {
204
+ at: 0.78,
205
+ opacity: 0,
206
+ },
207
+ {
208
+ at: 0.9,
209
+ opacity: -0.88,
210
+ },
211
+ {
212
+ at: 1,
213
+ },
214
+ ],
215
+ },
216
+ {
217
+ duration: 1.2,
218
+ repeatAfter: 2.2,
219
+ loop: false,
220
+ frames: [
221
+ {
222
+ at: 0,
223
+ },
224
+ {
225
+ at: 0.08,
226
+ opacity: -0.5,
227
+ scaleX: -0.05,
228
+ scaleY: -0.05,
229
+ },
230
+ {
231
+ at: 0.4,
232
+ scaleX: 0.015,
233
+ scaleY: 0.015,
234
+ },
235
+ {
236
+ at: 1,
237
+ },
238
+ ],
239
+ },
240
+ ],
241
+ },
242
+ {
243
+ name: 'offline',
244
+ paths: ['M4 5L20 19'],
245
+ poses: [
246
+ {
247
+ opacity: 1,
248
+ },
249
+ {
250
+ opacity: 0,
251
+ },
252
+ {
253
+ opacity: 0,
254
+ },
255
+ ],
256
+ pivot: [12, 12],
257
+ gestures: [],
258
+ },
259
+ ],
260
+ };
package/dist/index.d.ts CHANGED
@@ -28,3 +28,75 @@ export { ReplaceIcon, replaceStates, type ReplaceState, type ReplaceIconProps, }
28
28
  export { DeleteIcon, deleteStates, type DeleteState, type DeleteIconProps, } from "./icons/delete/delete-icon.js";
29
29
  export { SwapIcon, swapStates, type SwapState, type SwapIconProps } from "./icons/swap/swap-icon.js";
30
30
  export type { DogColors, MonkeyColors, HeartColors, ShipColors, AlertColors, } from "./shared/icon-colors.js";
31
+ export { HomeIcon, homeStates, type HomeState, type HomeIconProps } from "./icons/home/home-icon.js";
32
+ export { MenuIcon, menuStates, type MenuState, type MenuIconProps } from "./icons/menu/menu-icon.js";
33
+ export { PlusIcon, plusStates, type PlusState, type PlusIconProps } from "./icons/plus/plus-icon.js";
34
+ export { MinusIcon, minusStates, type MinusState, type MinusIconProps, } from "./icons/minus/minus-icon.js";
35
+ export { ChevronDownIcon, chevronDownStates, type ChevronDownState, type ChevronDownIconProps, } from "./icons/chevron-down/chevron-down-icon.js";
36
+ export { ChevronRightIcon, chevronRightStates, type ChevronRightState, type ChevronRightIconProps, } from "./icons/chevron-right/chevron-right-icon.js";
37
+ export { ChevronLeftIcon, chevronLeftStates, type ChevronLeftState, type ChevronLeftIconProps, } from "./icons/chevron-left/chevron-left-icon.js";
38
+ export { ChevronUpIcon, chevronUpStates, type ChevronUpState, type ChevronUpIconProps, } from "./icons/chevron-up/chevron-up-icon.js";
39
+ export { ArrowRightIcon, arrowRightStates, type ArrowRightState, type ArrowRightIconProps, } from "./icons/arrow-right/arrow-right-icon.js";
40
+ export { ArrowLeftIcon, arrowLeftStates, type ArrowLeftState, type ArrowLeftIconProps, } from "./icons/arrow-left/arrow-left-icon.js";
41
+ export { ArrowUpIcon, arrowUpStates, type ArrowUpState, type ArrowUpIconProps, } from "./icons/arrow-up/arrow-up-icon.js";
42
+ export { ArrowDownIcon, arrowDownStates, type ArrowDownState, type ArrowDownIconProps, } from "./icons/arrow-down/arrow-down-icon.js";
43
+ export { ExternalLinkIcon, externalLinkStates, type ExternalLinkState, type ExternalLinkIconProps, } from "./icons/external-link/external-link-icon.js";
44
+ export { MoreHorizontalIcon, moreHorizontalStates, type MoreHorizontalState, type MoreHorizontalIconProps, } from "./icons/more-horizontal/more-horizontal-icon.js";
45
+ export { MoreVerticalIcon, moreVerticalStates, type MoreVerticalState, type MoreVerticalIconProps, } from "./icons/more-vertical/more-vertical-icon.js";
46
+ export { UserIcon, userStates, type UserState, type UserIconProps } from "./icons/user/user-icon.js";
47
+ export { UsersIcon, usersStates, type UsersState, type UsersIconProps, } from "./icons/users/users-icon.js";
48
+ export { SettingsIcon, settingsStates, type SettingsState, type SettingsIconProps, } from "./icons/settings/settings-icon.js";
49
+ export { LogInIcon, logInStates, type LogInState, type LogInIconProps, } from "./icons/log-in/log-in-icon.js";
50
+ export { LogOutIcon, logOutStates, type LogOutState, type LogOutIconProps, } from "./icons/log-out/log-out-icon.js";
51
+ export { LockIcon, lockStates, type LockState, type LockIconProps } from "./icons/lock/lock-icon.js";
52
+ export { KeyIcon, keyStates, type KeyState, type KeyIconProps } from "./icons/key/key-icon.js";
53
+ export { InfoIcon, infoStates, type InfoState, type InfoIconProps } from "./icons/info/info-icon.js";
54
+ export { MailIcon, mailStates, type MailState, type MailIconProps } from "./icons/mail/mail-icon.js";
55
+ export { SendIcon, sendStates, type SendState, type SendIconProps } from "./icons/send/send-icon.js";
56
+ export { MessageCircleIcon, messageCircleStates, type MessageCircleState, type MessageCircleIconProps, } from "./icons/message-circle/message-circle-icon.js";
57
+ export { PhoneIcon, phoneStates, type PhoneState, type PhoneIconProps, } from "./icons/phone/phone-icon.js";
58
+ export { VideoIcon, videoStates, type VideoState, type VideoIconProps, } from "./icons/video/video-icon.js";
59
+ export { MicIcon, micStates, type MicState, type MicIconProps } from "./icons/mic/mic-icon.js";
60
+ export { PencilIcon, pencilStates, type PencilState, type PencilIconProps, } from "./icons/pencil/pencil-icon.js";
61
+ export { FileTextIcon, fileTextStates, type FileTextState, type FileTextIconProps, } from "./icons/file-text/file-text-icon.js";
62
+ export { FileIcon, fileStates, type FileState, type FileIconProps } from "./icons/file/file-icon.js";
63
+ export { FolderIcon, folderStates, type FolderState, type FolderIconProps, } from "./icons/folder/folder-icon.js";
64
+ export { SaveIcon, saveStates, type SaveState, type SaveIconProps } from "./icons/save/save-icon.js";
65
+ export { UploadIcon, uploadStates, type UploadState, type UploadIconProps, } from "./icons/upload/upload-icon.js";
66
+ export { ClipboardIcon, clipboardStates, type ClipboardState, type ClipboardIconProps, } from "./icons/clipboard/clipboard-icon.js";
67
+ export { BookmarkIcon, bookmarkStates, type BookmarkState, type BookmarkIconProps, } from "./icons/bookmark/bookmark-icon.js";
68
+ export { BookOpenIcon, bookOpenStates, type BookOpenState, type BookOpenIconProps, } from "./icons/book-open/book-open-icon.js";
69
+ export { ImageIcon, imageStates, type ImageState, type ImageIconProps, } from "./icons/image/image-icon.js";
70
+ export { CameraIcon, cameraStates, type CameraState, type CameraIconProps, } from "./icons/camera/camera-icon.js";
71
+ export { ShareIcon, shareStates, type ShareState, type ShareIconProps, } from "./icons/share/share-icon.js";
72
+ export { CalendarIcon, calendarStates, type CalendarState, type CalendarIconProps, } from "./icons/calendar/calendar-icon.js";
73
+ export { ClockIcon, clockStates, type ClockState, type ClockIconProps, } from "./icons/clock/clock-icon.js";
74
+ export { TimerIcon, timerStates, type TimerState, type TimerIconProps, } from "./icons/timer/timer-icon.js";
75
+ export { MapPinIcon, mapPinStates, type MapPinState, type MapPinIconProps, } from "./icons/map-pin/map-pin-icon.js";
76
+ export { GlobeIcon, globeStates, type GlobeState, type GlobeIconProps, } from "./icons/globe/globe-icon.js";
77
+ export { CircleHelpIcon, circleHelpStates, type CircleHelpState, type CircleHelpIconProps, } from "./icons/circle-help/circle-help-icon.js";
78
+ export { PlayIcon, playStates, type PlayState, type PlayIconProps } from "./icons/play/play-icon.js";
79
+ export { PauseIcon, pauseStates, type PauseState, type PauseIconProps, } from "./icons/pause/pause-icon.js";
80
+ export { VolumeIcon, volumeStates, type VolumeState, type VolumeIconProps, } from "./icons/volume/volume-icon.js";
81
+ export { MusicIcon, musicStates, type MusicState, type MusicIconProps, } from "./icons/music/music-icon.js";
82
+ export { SunIcon, sunStates, type SunState, type SunIconProps } from "./icons/sun/sun-icon.js";
83
+ export { ShoppingCartIcon, shoppingCartStates, type ShoppingCartState, type ShoppingCartIconProps, } from "./icons/shopping-cart/shopping-cart-icon.js";
84
+ export { ShoppingBagIcon, shoppingBagStates, type ShoppingBagState, type ShoppingBagIconProps, } from "./icons/shopping-bag/shopping-bag-icon.js";
85
+ export { CreditCardIcon, creditCardStates, type CreditCardState, type CreditCardIconProps, } from "./icons/credit-card/credit-card-icon.js";
86
+ export { WalletIcon, walletStates, type WalletState, type WalletIconProps, } from "./icons/wallet/wallet-icon.js";
87
+ export { PackageIcon, packageStates, type PackageState, type PackageIconProps, } from "./icons/package/package-icon.js";
88
+ export { TruckIcon, truckStates, type TruckState, type TruckIconProps, } from "./icons/truck/truck-icon.js";
89
+ export { FilterIcon, filterStates, type FilterState, type FilterIconProps, } from "./icons/filter/filter-icon.js";
90
+ export { SlidersIcon, slidersStates, type SlidersState, type SlidersIconProps, } from "./icons/sliders/sliders-icon.js";
91
+ export { LayoutGridIcon, layoutGridStates, type LayoutGridState, type LayoutGridIconProps, } from "./icons/layout-grid/layout-grid-icon.js";
92
+ export { LayoutDashboardIcon, layoutDashboardStates, type LayoutDashboardState, type LayoutDashboardIconProps, } from "./icons/layout-dashboard/layout-dashboard-icon.js";
93
+ export { ListIcon, listStates, type ListState, type ListIconProps } from "./icons/list/list-icon.js";
94
+ export { LayersIcon, layersStates, type LayersState, type LayersIconProps, } from "./icons/layers/layers-icon.js";
95
+ export { MaximizeIcon, maximizeStates, type MaximizeState, type MaximizeIconProps, } from "./icons/maximize/maximize-icon.js";
96
+ export { MinimizeIcon, minimizeStates, type MinimizeState, type MinimizeIconProps, } from "./icons/minimize/minimize-icon.js";
97
+ export { CodeIcon, codeStates, type CodeState, type CodeIconProps } from "./icons/code/code-icon.js";
98
+ export { TerminalIcon, terminalStates, type TerminalState, type TerminalIconProps, } from "./icons/terminal/terminal-icon.js";
99
+ export { DatabaseIcon, databaseStates, type DatabaseState, type DatabaseIconProps, } from "./icons/database/database-icon.js";
100
+ export { WifiIcon, wifiStates, type WifiState, type WifiIconProps } from "./icons/wifi/wifi-icon.js";
101
+ export { CloudIcon, cloudStates, type CloudState, type CloudIconProps, } from "./icons/cloud/cloud-icon.js";
102
+ export { MoonIcon, moonStates, type MoonState, type MoonIconProps } from "./icons/moon/moon-icon.js";
package/dist/index.js CHANGED
@@ -27,3 +27,75 @@ export { BadgeCheckIcon, badgeCheckStates, } from "./icons/badge-check/badge-che
27
27
  export { ReplaceIcon, replaceStates, } from "./icons/replace/replace-icon.js";
28
28
  export { DeleteIcon, deleteStates, } from "./icons/delete/delete-icon.js";
29
29
  export { SwapIcon, swapStates } from "./icons/swap/swap-icon.js";
30
+ export { HomeIcon, homeStates } from "./icons/home/home-icon.js";
31
+ export { MenuIcon, menuStates } from "./icons/menu/menu-icon.js";
32
+ export { PlusIcon, plusStates } from "./icons/plus/plus-icon.js";
33
+ export { MinusIcon, minusStates, } from "./icons/minus/minus-icon.js";
34
+ export { ChevronDownIcon, chevronDownStates, } from "./icons/chevron-down/chevron-down-icon.js";
35
+ export { ChevronRightIcon, chevronRightStates, } from "./icons/chevron-right/chevron-right-icon.js";
36
+ export { ChevronLeftIcon, chevronLeftStates, } from "./icons/chevron-left/chevron-left-icon.js";
37
+ export { ChevronUpIcon, chevronUpStates, } from "./icons/chevron-up/chevron-up-icon.js";
38
+ export { ArrowRightIcon, arrowRightStates, } from "./icons/arrow-right/arrow-right-icon.js";
39
+ export { ArrowLeftIcon, arrowLeftStates, } from "./icons/arrow-left/arrow-left-icon.js";
40
+ export { ArrowUpIcon, arrowUpStates, } from "./icons/arrow-up/arrow-up-icon.js";
41
+ export { ArrowDownIcon, arrowDownStates, } from "./icons/arrow-down/arrow-down-icon.js";
42
+ export { ExternalLinkIcon, externalLinkStates, } from "./icons/external-link/external-link-icon.js";
43
+ export { MoreHorizontalIcon, moreHorizontalStates, } from "./icons/more-horizontal/more-horizontal-icon.js";
44
+ export { MoreVerticalIcon, moreVerticalStates, } from "./icons/more-vertical/more-vertical-icon.js";
45
+ export { UserIcon, userStates } from "./icons/user/user-icon.js";
46
+ export { UsersIcon, usersStates, } from "./icons/users/users-icon.js";
47
+ export { SettingsIcon, settingsStates, } from "./icons/settings/settings-icon.js";
48
+ export { LogInIcon, logInStates, } from "./icons/log-in/log-in-icon.js";
49
+ export { LogOutIcon, logOutStates, } from "./icons/log-out/log-out-icon.js";
50
+ export { LockIcon, lockStates } from "./icons/lock/lock-icon.js";
51
+ export { KeyIcon, keyStates } from "./icons/key/key-icon.js";
52
+ export { InfoIcon, infoStates } from "./icons/info/info-icon.js";
53
+ export { MailIcon, mailStates } from "./icons/mail/mail-icon.js";
54
+ export { SendIcon, sendStates } from "./icons/send/send-icon.js";
55
+ export { MessageCircleIcon, messageCircleStates, } from "./icons/message-circle/message-circle-icon.js";
56
+ export { PhoneIcon, phoneStates, } from "./icons/phone/phone-icon.js";
57
+ export { VideoIcon, videoStates, } from "./icons/video/video-icon.js";
58
+ export { MicIcon, micStates } from "./icons/mic/mic-icon.js";
59
+ export { PencilIcon, pencilStates, } from "./icons/pencil/pencil-icon.js";
60
+ export { FileTextIcon, fileTextStates, } from "./icons/file-text/file-text-icon.js";
61
+ export { FileIcon, fileStates } from "./icons/file/file-icon.js";
62
+ export { FolderIcon, folderStates, } from "./icons/folder/folder-icon.js";
63
+ export { SaveIcon, saveStates } from "./icons/save/save-icon.js";
64
+ export { UploadIcon, uploadStates, } from "./icons/upload/upload-icon.js";
65
+ export { ClipboardIcon, clipboardStates, } from "./icons/clipboard/clipboard-icon.js";
66
+ export { BookmarkIcon, bookmarkStates, } from "./icons/bookmark/bookmark-icon.js";
67
+ export { BookOpenIcon, bookOpenStates, } from "./icons/book-open/book-open-icon.js";
68
+ export { ImageIcon, imageStates, } from "./icons/image/image-icon.js";
69
+ export { CameraIcon, cameraStates, } from "./icons/camera/camera-icon.js";
70
+ export { ShareIcon, shareStates, } from "./icons/share/share-icon.js";
71
+ export { CalendarIcon, calendarStates, } from "./icons/calendar/calendar-icon.js";
72
+ export { ClockIcon, clockStates, } from "./icons/clock/clock-icon.js";
73
+ export { TimerIcon, timerStates, } from "./icons/timer/timer-icon.js";
74
+ export { MapPinIcon, mapPinStates, } from "./icons/map-pin/map-pin-icon.js";
75
+ export { GlobeIcon, globeStates, } from "./icons/globe/globe-icon.js";
76
+ export { CircleHelpIcon, circleHelpStates, } from "./icons/circle-help/circle-help-icon.js";
77
+ export { PlayIcon, playStates } from "./icons/play/play-icon.js";
78
+ export { PauseIcon, pauseStates, } from "./icons/pause/pause-icon.js";
79
+ export { VolumeIcon, volumeStates, } from "./icons/volume/volume-icon.js";
80
+ export { MusicIcon, musicStates, } from "./icons/music/music-icon.js";
81
+ export { SunIcon, sunStates } from "./icons/sun/sun-icon.js";
82
+ export { ShoppingCartIcon, shoppingCartStates, } from "./icons/shopping-cart/shopping-cart-icon.js";
83
+ export { ShoppingBagIcon, shoppingBagStates, } from "./icons/shopping-bag/shopping-bag-icon.js";
84
+ export { CreditCardIcon, creditCardStates, } from "./icons/credit-card/credit-card-icon.js";
85
+ export { WalletIcon, walletStates, } from "./icons/wallet/wallet-icon.js";
86
+ export { PackageIcon, packageStates, } from "./icons/package/package-icon.js";
87
+ export { TruckIcon, truckStates, } from "./icons/truck/truck-icon.js";
88
+ export { FilterIcon, filterStates, } from "./icons/filter/filter-icon.js";
89
+ export { SlidersIcon, slidersStates, } from "./icons/sliders/sliders-icon.js";
90
+ export { LayoutGridIcon, layoutGridStates, } from "./icons/layout-grid/layout-grid-icon.js";
91
+ export { LayoutDashboardIcon, layoutDashboardStates, } from "./icons/layout-dashboard/layout-dashboard-icon.js";
92
+ export { ListIcon, listStates } from "./icons/list/list-icon.js";
93
+ export { LayersIcon, layersStates, } from "./icons/layers/layers-icon.js";
94
+ export { MaximizeIcon, maximizeStates, } from "./icons/maximize/maximize-icon.js";
95
+ export { MinimizeIcon, minimizeStates, } from "./icons/minimize/minimize-icon.js";
96
+ export { CodeIcon, codeStates } from "./icons/code/code-icon.js";
97
+ export { TerminalIcon, terminalStates, } from "./icons/terminal/terminal-icon.js";
98
+ export { DatabaseIcon, databaseStates, } from "./icons/database/database-icon.js";
99
+ export { WifiIcon, wifiStates } from "./icons/wifi/wifi-icon.js";
100
+ export { CloudIcon, cloudStates, } from "./icons/cloud/cloud-icon.js";
101
+ export { MoonIcon, moonStates } from "./icons/moon/moon-icon.js";
@@ -0,0 +1,7 @@
1
+ import type { StatefulIconProps } from "./icon-types.js";
2
+ import { type Articulation } from "./articulation.js";
3
+ /** Shared binding, never a shared drawing or a generic whole-icon animation. */
4
+ export declare function ArticulatedIcon<State extends string>({ art, states, state, size, color, accentColor, strokeWidth, speed, alive, className, }: StatefulIconProps<State> & {
5
+ art: Articulation;
6
+ states: readonly [State, State, State];
7
+ }): import("react/jsx-runtime").JSX.Element;
@@ -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
+ }