@kumix/ui 0.6.0 → 0.8.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 (1488) hide show
  1. package/README.md +71 -48
  2. package/dist/animated-sidebar-CPdrqoGi.js +310 -0
  3. package/dist/animated-sidebar-CPdrqoGi.js.map +1 -0
  4. package/dist/animated-toast-stack-Cbdphi9x.d.ts +62 -0
  5. package/dist/animated-toast-stack-Cbdphi9x.d.ts.map +1 -0
  6. package/dist/animated-toast-stack-YcjQ2Uaw.js +568 -0
  7. package/dist/animated-toast-stack-YcjQ2Uaw.js.map +1 -0
  8. package/dist/components/agents/agent-activity/activity-row.d.ts +1 -1
  9. package/dist/components/agents/agent-activity/activity-row.d.ts.map +1 -1
  10. package/dist/components/agents/agent-activity/activity-row.js +31 -26
  11. package/dist/components/agents/agent-activity/activity-row.js.map +1 -1
  12. package/dist/components/agents/{agent-activity/index.d.ts → agent-activity.d.ts} +2 -2
  13. package/dist/components/agents/agent-activity.d.ts.map +1 -0
  14. package/dist/components/agents/{agent-activity/index.js → agent-activity.js} +13 -27
  15. package/dist/components/agents/agent-activity.js.map +1 -0
  16. package/dist/components/agents/agent-code.d.ts.map +1 -1
  17. package/dist/components/agents/agent-code.js +42 -16
  18. package/dist/components/agents/agent-code.js.map +1 -1
  19. package/dist/components/agents/agent-disclosure.d.ts +7 -2
  20. package/dist/components/agents/agent-disclosure.d.ts.map +1 -1
  21. package/dist/components/agents/agent-disclosure.js +15 -3
  22. package/dist/components/agents/agent-disclosure.js.map +1 -1
  23. package/dist/components/agents/ai-sidebar/marquee-label.d.ts +6 -0
  24. package/dist/components/agents/ai-sidebar/marquee-label.d.ts.map +1 -0
  25. package/dist/components/agents/ai-sidebar/marquee-label.js +55 -0
  26. package/dist/components/agents/ai-sidebar/marquee-label.js.map +1 -0
  27. package/dist/components/agents/ai-sidebar/resource-menu-action.d.ts +8 -0
  28. package/dist/components/agents/ai-sidebar/resource-menu-action.d.ts.map +1 -0
  29. package/dist/components/agents/ai-sidebar/resource-menu-action.js +20 -0
  30. package/dist/components/agents/ai-sidebar/resource-menu-action.js.map +1 -0
  31. package/dist/components/agents/ai-sidebar/resource-row.d.ts +32 -0
  32. package/dist/components/agents/ai-sidebar/resource-row.d.ts.map +1 -0
  33. package/dist/components/agents/ai-sidebar/resource-row.js +2 -0
  34. package/dist/components/agents/ai-sidebar.d.ts +2 -74
  35. package/dist/components/agents/ai-sidebar.d.ts.map +1 -1
  36. package/dist/components/agents/ai-sidebar.js +16 -332
  37. package/dist/components/agents/ai-sidebar.js.map +1 -1
  38. package/dist/components/agents/{approval-card/index.d.ts → approval-card.d.ts} +31 -1
  39. package/dist/components/agents/approval-card.d.ts.map +1 -0
  40. package/dist/components/agents/{approval-card/index.js → approval-card.js} +160 -80
  41. package/dist/components/agents/approval-card.js.map +1 -0
  42. package/dist/components/agents/chat-app.d.ts +1 -1
  43. package/dist/components/agents/chat-app.d.ts.map +1 -1
  44. package/dist/components/agents/chat-app.js +9 -6
  45. package/dist/components/agents/chat-app.js.map +1 -1
  46. package/dist/components/agents/citations.d.ts +24 -1
  47. package/dist/components/agents/citations.d.ts.map +1 -1
  48. package/dist/components/agents/citations.js +54 -9
  49. package/dist/components/agents/citations.js.map +1 -1
  50. package/dist/components/agents/clip-resize-frame.d.ts +31 -0
  51. package/dist/components/agents/clip-resize-frame.d.ts.map +1 -0
  52. package/dist/components/agents/clip-resize-frame.js +103 -0
  53. package/dist/components/agents/clip-resize-frame.js.map +1 -0
  54. package/dist/components/agents/code-block.d.ts +11 -0
  55. package/dist/components/agents/code-block.d.ts.map +1 -1
  56. package/dist/components/agents/code-block.js +34 -26
  57. package/dist/components/agents/code-block.js.map +1 -1
  58. package/dist/components/agents/context-meter.d.ts +53 -0
  59. package/dist/components/agents/context-meter.d.ts.map +1 -0
  60. package/dist/components/agents/context-meter.js +443 -0
  61. package/dist/components/agents/context-meter.js.map +1 -0
  62. package/dist/components/agents/file-diff.d.ts +17 -0
  63. package/dist/components/agents/file-diff.d.ts.map +1 -1
  64. package/dist/components/agents/file-diff.js +114 -82
  65. package/dist/components/agents/file-diff.js.map +1 -1
  66. package/dist/components/agents/icon-swap.d.ts +14 -0
  67. package/dist/components/agents/icon-swap.d.ts.map +1 -0
  68. package/dist/components/agents/icon-swap.js +41 -0
  69. package/dist/components/agents/icon-swap.js.map +1 -0
  70. package/dist/components/agents/image-generation.d.ts +10 -0
  71. package/dist/components/agents/image-generation.d.ts.map +1 -1
  72. package/dist/components/agents/image-generation.js +10 -6
  73. package/dist/components/agents/image-generation.js.map +1 -1
  74. package/dist/components/agents/loading-states/agent-progress.d.ts +1 -0
  75. package/dist/components/agents/loading-states/agent-progress.d.ts.map +1 -1
  76. package/dist/components/agents/loading-states/agent-progress.js.map +1 -1
  77. package/dist/components/agents/loading-states/reasoning-text.d.ts +1 -0
  78. package/dist/components/agents/loading-states/reasoning-text.d.ts.map +1 -1
  79. package/dist/components/agents/loading-states/reasoning-text.js +30 -7
  80. package/dist/components/agents/loading-states/reasoning-text.js.map +1 -1
  81. package/dist/components/agents/loading-states/thinking-shimmer.d.ts +1 -0
  82. package/dist/components/agents/loading-states/thinking-shimmer.d.ts.map +1 -1
  83. package/dist/components/agents/loading-states/thinking-shimmer.js.map +1 -1
  84. package/dist/components/agents/message-bubble.d.ts +10 -0
  85. package/dist/components/agents/message-bubble.d.ts.map +1 -1
  86. package/dist/components/agents/message-bubble.js +59 -39
  87. package/dist/components/agents/message-bubble.js.map +1 -1
  88. package/dist/components/agents/message-scroller.d.ts +10 -1
  89. package/dist/components/agents/message-scroller.d.ts.map +1 -1
  90. package/dist/components/agents/message-scroller.js +81 -16
  91. package/dist/components/agents/message-scroller.js.map +1 -1
  92. package/dist/components/agents/message.d.ts +3 -0
  93. package/dist/components/agents/message.d.ts.map +1 -1
  94. package/dist/components/agents/message.js +3 -3
  95. package/dist/components/agents/message.js.map +1 -1
  96. package/dist/components/agents/prompt-input.d.ts +41 -1
  97. package/dist/components/agents/prompt-input.d.ts.map +1 -1
  98. package/dist/components/agents/prompt-input.js +356 -93
  99. package/dist/components/agents/prompt-input.js.map +1 -1
  100. package/dist/components/agents/streaming-response.d.ts +12 -0
  101. package/dist/components/agents/streaming-response.d.ts.map +1 -1
  102. package/dist/components/agents/streaming-response.js +35 -28
  103. package/dist/components/agents/streaming-response.js.map +1 -1
  104. package/dist/components/agents/todo-list.d.ts +13 -0
  105. package/dist/components/agents/todo-list.d.ts.map +1 -1
  106. package/dist/components/agents/todo-list.js +114 -98
  107. package/dist/components/agents/todo-list.js.map +1 -1
  108. package/dist/components/agents/tool-approval.d.ts +18 -0
  109. package/dist/components/agents/tool-approval.d.ts.map +1 -1
  110. package/dist/components/agents/tool-approval.js +48 -22
  111. package/dist/components/agents/tool-approval.js.map +1 -1
  112. package/dist/components/agents/tool-result.d.ts +18 -0
  113. package/dist/components/agents/tool-result.d.ts.map +1 -1
  114. package/dist/components/agents/tool-result.js +48 -59
  115. package/dist/components/agents/tool-result.js.map +1 -1
  116. package/dist/components/agents/voice-note.d.ts +37 -0
  117. package/dist/components/agents/voice-note.d.ts.map +1 -0
  118. package/dist/components/agents/voice-note.js +326 -0
  119. package/dist/components/agents/voice-note.js.map +1 -0
  120. package/dist/components/charts/bar-chart/context.d.ts +15 -7
  121. package/dist/components/charts/bar-chart/context.d.ts.map +1 -1
  122. package/dist/components/charts/bar-chart/context.js +3 -1
  123. package/dist/components/charts/bar-chart/context.js.map +1 -1
  124. package/dist/components/charts/bar-chart/legend.d.ts +1 -0
  125. package/dist/components/charts/bar-chart/legend.d.ts.map +1 -1
  126. package/dist/components/charts/bar-chart/legend.js.map +1 -1
  127. package/dist/components/charts/bar-chart/plot.d.ts +2 -0
  128. package/dist/components/charts/bar-chart/plot.d.ts.map +1 -1
  129. package/dist/components/charts/bar-chart/plot.js +2 -2
  130. package/dist/components/charts/bar-chart/plot.js.map +1 -1
  131. package/dist/components/charts/bar-chart/tooltip.d.ts +2 -0
  132. package/dist/components/charts/bar-chart/tooltip.d.ts.map +1 -1
  133. package/dist/components/charts/bar-chart/tooltip.js +1 -1
  134. package/dist/components/charts/bar-chart/tooltip.js.map +1 -1
  135. package/dist/components/charts/bar-chart.d.ts +1 -1
  136. package/dist/components/charts/bump-chart/context.d.ts +1 -1
  137. package/dist/components/charts/bump-chart/context.js +1 -1
  138. package/dist/components/charts/bump-chart/legend.js +5 -5
  139. package/dist/components/charts/bump-chart/legend.js.map +1 -1
  140. package/dist/components/charts/bump-chart/plot.js +1 -1
  141. package/dist/components/charts/bump-chart/point.js +5 -5
  142. package/dist/components/charts/bump-chart/point.js.map +1 -1
  143. package/dist/components/charts/bump-chart/series.d.ts +1 -1
  144. package/dist/components/charts/bump-chart/series.js +2 -2
  145. package/dist/components/charts/bump-chart/series.js.map +1 -1
  146. package/dist/components/charts/bump-chart.d.ts +1 -1
  147. package/dist/components/charts/bump-chart.js +2 -2
  148. package/dist/components/charts/candlestick-chart/context.d.ts +14 -3
  149. package/dist/components/charts/candlestick-chart/context.d.ts.map +1 -1
  150. package/dist/components/charts/candlestick-chart/context.js.map +1 -1
  151. package/dist/components/charts/candlestick-chart/plot.js +2 -2
  152. package/dist/components/charts/candlestick-chart/plot.js.map +1 -1
  153. package/dist/components/charts/composition-chart/context.d.ts +1 -1
  154. package/dist/components/charts/composition-chart/legend.js +1 -1
  155. package/dist/components/charts/composition-chart/legend.js.map +1 -1
  156. package/dist/components/charts/composition-chart/plot.js +1 -1
  157. package/dist/components/charts/composition-chart.d.ts +1 -1
  158. package/dist/components/charts/donut-chart/center.d.ts +1 -1
  159. package/dist/components/charts/donut-chart/context.d.ts +6 -1
  160. package/dist/components/charts/donut-chart/context.d.ts.map +1 -1
  161. package/dist/components/charts/donut-chart/legend.d.ts +1 -1
  162. package/dist/components/charts/donut-chart.d.ts +1 -1
  163. package/dist/components/charts/funnel-chart.d.ts +8 -0
  164. package/dist/components/charts/funnel-chart.d.ts.map +1 -1
  165. package/dist/components/charts/funnel-chart.js +8 -8
  166. package/dist/components/charts/funnel-chart.js.map +1 -1
  167. package/dist/components/charts/heat-calendar/grid.js +2 -2
  168. package/dist/components/charts/heat-calendar/grid.js.map +1 -1
  169. package/dist/components/charts/heat-calendar/legend.js +1 -1
  170. package/dist/components/charts/heat-calendar/tooltip.d.ts +1 -1
  171. package/dist/components/charts/heat-calendar/tooltip.js +2 -2
  172. package/dist/components/charts/heat-calendar.d.ts +1 -1
  173. package/dist/components/charts/heat-calendar.js +1 -1
  174. package/dist/components/charts/line-chart/context.d.ts +12 -4
  175. package/dist/components/charts/line-chart/context.d.ts.map +1 -1
  176. package/dist/components/charts/line-chart/context.js +3 -1
  177. package/dist/components/charts/line-chart/context.js.map +1 -1
  178. package/dist/components/charts/line-chart/legend.d.ts +1 -0
  179. package/dist/components/charts/line-chart/legend.d.ts.map +1 -1
  180. package/dist/components/charts/line-chart/legend.js.map +1 -1
  181. package/dist/components/charts/line-chart/plot.d.ts +2 -0
  182. package/dist/components/charts/line-chart/plot.d.ts.map +1 -1
  183. package/dist/components/charts/line-chart/plot.js +3 -3
  184. package/dist/components/charts/line-chart/plot.js.map +1 -1
  185. package/dist/components/charts/line-chart/tooltip.d.ts +1 -0
  186. package/dist/components/charts/line-chart/tooltip.d.ts.map +1 -1
  187. package/dist/components/charts/line-chart/tooltip.js.map +1 -1
  188. package/dist/components/charts/line-chart.d.ts +1 -1
  189. package/dist/components/charts/liquidity-heatmap.d.ts +8 -0
  190. package/dist/components/charts/liquidity-heatmap.d.ts.map +1 -1
  191. package/dist/components/charts/liquidity-heatmap.js +4 -4
  192. package/dist/components/charts/liquidity-heatmap.js.map +1 -1
  193. package/dist/components/charts/order-book/depth-row.d.ts +1 -1
  194. package/dist/components/charts/order-book.d.ts +14 -2
  195. package/dist/components/charts/order-book.d.ts.map +1 -1
  196. package/dist/components/charts/order-book.js +6 -6
  197. package/dist/components/charts/order-book.js.map +1 -1
  198. package/dist/components/charts/price-target-fan/header.js +2 -2
  199. package/dist/components/charts/price-target-fan/header.js.map +1 -1
  200. package/dist/components/charts/price-target-fan/plot.js +1 -1
  201. package/dist/components/charts/price-target-fan/series.js +1 -1
  202. package/dist/components/charts/price-target-fan/tooltip.d.ts +1 -1
  203. package/dist/components/charts/price-target-fan/tooltip.js +3 -3
  204. package/dist/components/charts/price-target-fan/tooltip.js.map +1 -1
  205. package/dist/components/charts/price-target-fan.d.ts +1 -1
  206. package/dist/components/charts/price-target-fan.js +1 -1
  207. package/dist/components/charts/returns-calendar/grid.js +10 -7
  208. package/dist/components/charts/returns-calendar/grid.js.map +1 -1
  209. package/dist/components/charts/returns-calendar/tooltip.d.ts +1 -1
  210. package/dist/components/charts/returns-calendar/tooltip.js +2 -2
  211. package/dist/components/charts/returns-calendar/tooltip.js.map +1 -1
  212. package/dist/components/charts/returns-calendar.d.ts +1 -1
  213. package/dist/components/charts/returns-calendar.d.ts.map +1 -1
  214. package/dist/components/charts/returns-calendar.js +1 -1
  215. package/dist/components/charts/sankey-chart/context.d.ts +1 -1
  216. package/dist/components/charts/sankey-chart/context.js +1 -1
  217. package/dist/components/charts/sankey-chart/plot.d.ts.map +1 -1
  218. package/dist/components/charts/sankey-chart/plot.js +10 -32
  219. package/dist/components/charts/sankey-chart/plot.js.map +1 -1
  220. package/dist/components/charts/sankey-chart/tooltip.d.ts +3 -1
  221. package/dist/components/charts/sankey-chart/tooltip.d.ts.map +1 -1
  222. package/dist/components/charts/sankey-chart/tooltip.js +2 -2
  223. package/dist/components/charts/sankey-chart/tooltip.js.map +1 -1
  224. package/dist/components/charts/sankey-chart.d.ts +1 -1
  225. package/dist/components/charts/sankey-chart.js +1 -1
  226. package/dist/components/charts/sparkline.d.ts +4 -0
  227. package/dist/components/charts/sparkline.d.ts.map +1 -1
  228. package/dist/components/charts/sparkline.js +3 -3
  229. package/dist/components/charts/sparkline.js.map +1 -1
  230. package/dist/components/charts/status-bar/legend.d.ts +1 -0
  231. package/dist/components/charts/status-bar/legend.d.ts.map +1 -1
  232. package/dist/components/charts/status-bar/legend.js +1 -1
  233. package/dist/components/charts/status-bar/legend.js.map +1 -1
  234. package/dist/components/charts/status-bar/plot.d.ts +2 -0
  235. package/dist/components/charts/status-bar/plot.d.ts.map +1 -1
  236. package/dist/components/charts/status-bar/plot.js +1 -1
  237. package/dist/components/charts/status-bar/plot.js.map +1 -1
  238. package/dist/components/charts/status-bar/tooltip.d.ts +1 -1
  239. package/dist/components/charts/status-bar/tooltip.js +2 -2
  240. package/dist/components/charts/status-bar/tooltip.js.map +1 -1
  241. package/dist/components/charts/status-bar.d.ts +1 -1
  242. package/dist/components/charts/status-bar.js +1 -1
  243. package/dist/components/charts/treemap/legend.d.ts +2 -0
  244. package/dist/components/charts/treemap/legend.d.ts.map +1 -1
  245. package/dist/components/charts/treemap/legend.js +1 -1
  246. package/dist/components/charts/treemap/legend.js.map +1 -1
  247. package/dist/components/charts/treemap/plot.d.ts +2 -1
  248. package/dist/components/charts/treemap/plot.d.ts.map +1 -1
  249. package/dist/components/charts/treemap/plot.js +3 -16
  250. package/dist/components/charts/treemap/plot.js.map +1 -1
  251. package/dist/components/charts/treemap/tile.d.ts +1 -1
  252. package/dist/components/charts/treemap/tile.js +3 -3
  253. package/dist/components/charts/treemap/tile.js.map +1 -1
  254. package/dist/components/charts/treemap/tooltip.d.ts +3 -1
  255. package/dist/components/charts/treemap/tooltip.d.ts.map +1 -1
  256. package/dist/components/charts/treemap/tooltip.js +2 -2
  257. package/dist/components/charts/treemap/tooltip.js.map +1 -1
  258. package/dist/components/charts/treemap.d.ts +10 -4
  259. package/dist/components/charts/treemap.d.ts.map +1 -1
  260. package/dist/components/charts/treemap.js +1 -1
  261. package/dist/components/charts/volume-profile/plot.d.ts +2 -0
  262. package/dist/components/charts/volume-profile/plot.d.ts.map +1 -1
  263. package/dist/components/charts/volume-profile/plot.js +4 -4
  264. package/dist/components/charts/volume-profile/plot.js.map +1 -1
  265. package/dist/components/charts/volume-profile/summary.js +2 -2
  266. package/dist/components/charts/volume-profile/summary.js.map +1 -1
  267. package/dist/components/charts/volume-profile/tooltip.d.ts +1 -1
  268. package/dist/components/charts/volume-profile/tooltip.js +2 -2
  269. package/dist/components/charts/volume-profile/tooltip.js.map +1 -1
  270. package/dist/components/charts/volume-profile.d.ts +12 -3
  271. package/dist/components/charts/volume-profile.d.ts.map +1 -1
  272. package/dist/components/charts/volume-profile.js +2 -2
  273. package/dist/components/charts/volume-profile.js.map +1 -1
  274. package/dist/components/charts/xy/data-table.d.ts +1 -1
  275. package/dist/components/charts/xy/legend.d.ts +1 -1
  276. package/dist/components/custom/toast.d.ts +2 -1
  277. package/dist/components/custom/toast.d.ts.map +1 -1
  278. package/dist/components/custom/toast.js +1 -1
  279. package/dist/components/motion/action-swap.d.ts +19 -0
  280. package/dist/components/motion/action-swap.d.ts.map +1 -1
  281. package/dist/components/motion/action-swap.js.map +1 -1
  282. package/dist/components/motion/adaptive-stepper.d.ts +13 -0
  283. package/dist/components/motion/adaptive-stepper.d.ts.map +1 -1
  284. package/dist/components/motion/adaptive-stepper.js +2 -7
  285. package/dist/components/motion/adaptive-stepper.js.map +1 -1
  286. package/dist/components/motion/add-to-cart.d.ts +38 -0
  287. package/dist/components/motion/add-to-cart.d.ts.map +1 -0
  288. package/dist/components/motion/add-to-cart.js +228 -0
  289. package/dist/components/motion/add-to-cart.js.map +1 -0
  290. package/dist/components/motion/alert.d.ts +4 -0
  291. package/dist/components/motion/alert.d.ts.map +1 -1
  292. package/dist/components/motion/alert.js +2 -2
  293. package/dist/components/motion/alert.js.map +1 -1
  294. package/dist/components/motion/animated-badge.d.ts +6 -0
  295. package/dist/components/motion/animated-badge.d.ts.map +1 -1
  296. package/dist/components/motion/animated-badge.js +2 -2
  297. package/dist/components/motion/animated-badge.js.map +1 -1
  298. package/dist/components/motion/animated-number.d.ts +5 -0
  299. package/dist/components/motion/animated-number.d.ts.map +1 -1
  300. package/dist/components/motion/animated-number.js.map +1 -1
  301. package/dist/components/motion/animated-sidebar/menu-button.d.ts +2 -0
  302. package/dist/components/motion/animated-sidebar/menu-button.js +95 -0
  303. package/dist/components/motion/animated-sidebar/menu-button.js.map +1 -0
  304. package/dist/components/motion/animated-sidebar/menu-sub-button.d.ts +2 -0
  305. package/dist/components/motion/animated-sidebar/menu-sub-button.js +52 -0
  306. package/dist/components/motion/animated-sidebar/menu-sub-button.js.map +1 -0
  307. package/dist/components/motion/animated-sidebar/mobile-sidebar.d.ts +9 -0
  308. package/dist/components/motion/animated-sidebar/mobile-sidebar.d.ts.map +1 -0
  309. package/dist/components/motion/animated-sidebar/mobile-sidebar.js +73 -0
  310. package/dist/components/motion/animated-sidebar/mobile-sidebar.js.map +1 -0
  311. package/dist/components/motion/animated-sidebar.d.ts +17 -55
  312. package/dist/components/motion/animated-sidebar.d.ts.map +1 -1
  313. package/dist/components/motion/animated-sidebar.js +4 -628
  314. package/dist/components/motion/animated-toast-stack/toast-body.d.ts +19 -0
  315. package/dist/components/motion/animated-toast-stack/toast-body.d.ts.map +1 -0
  316. package/dist/components/motion/animated-toast-stack/toast-body.js +154 -0
  317. package/dist/components/motion/animated-toast-stack/toast-body.js.map +1 -0
  318. package/dist/components/motion/animated-toast-stack.d.ts +3 -69
  319. package/dist/components/motion/animated-toast-stack.js +1 -307
  320. package/dist/components/motion/arc-picker.js +1 -1
  321. package/dist/components/motion/arc-picker.js.map +1 -1
  322. package/dist/components/motion/aspect-ratio.d.ts +1 -0
  323. package/dist/components/motion/aspect-ratio.d.ts.map +1 -1
  324. package/dist/components/motion/aspect-ratio.js.map +1 -1
  325. package/dist/components/motion/attachment-upload/attachment-row.d.ts +20 -0
  326. package/dist/components/motion/attachment-upload/attachment-row.d.ts.map +1 -0
  327. package/dist/components/motion/attachment-upload/attachment-row.js +224 -0
  328. package/dist/components/motion/attachment-upload/attachment-row.js.map +1 -0
  329. package/dist/components/motion/attachment-upload/image-preview-dialog.d.ts +10 -0
  330. package/dist/components/motion/attachment-upload/image-preview-dialog.d.ts.map +1 -0
  331. package/dist/components/motion/attachment-upload/image-preview-dialog.js +84 -0
  332. package/dist/components/motion/attachment-upload/image-preview-dialog.js.map +1 -0
  333. package/dist/components/motion/attachment-upload/image-thumbnail.d.ts +10 -0
  334. package/dist/components/motion/attachment-upload/image-thumbnail.d.ts.map +1 -0
  335. package/dist/components/motion/attachment-upload/image-thumbnail.js +53 -0
  336. package/dist/components/motion/attachment-upload/image-thumbnail.js.map +1 -0
  337. package/dist/components/motion/attachment-upload/row-action.d.ts +11 -0
  338. package/dist/components/motion/attachment-upload/row-action.d.ts.map +1 -0
  339. package/dist/components/motion/attachment-upload/row-action.js +98 -0
  340. package/dist/components/motion/attachment-upload/row-action.js.map +1 -0
  341. package/dist/components/motion/attachment-upload.d.ts +22 -50
  342. package/dist/components/motion/attachment-upload.d.ts.map +1 -1
  343. package/dist/components/motion/attachment-upload.js +16 -492
  344. package/dist/components/motion/attachment-upload.js.map +1 -1
  345. package/dist/components/motion/availability-scheduler/copy-menu.js +1 -1
  346. package/dist/components/motion/availability-scheduler/day-row.js +2 -2
  347. package/dist/components/motion/availability-scheduler/day-row.js.map +1 -1
  348. package/dist/components/motion/availability-scheduler/icon-button.js +1 -1
  349. package/dist/components/motion/availability-scheduler/icon-button.js.map +1 -1
  350. package/dist/components/motion/{availability-scheduler/index.d.ts → availability-scheduler.d.ts} +7 -3
  351. package/dist/components/motion/availability-scheduler.d.ts.map +1 -0
  352. package/dist/components/motion/{availability-scheduler/index.js → availability-scheduler.js} +4 -4
  353. package/dist/components/motion/availability-scheduler.js.map +1 -0
  354. package/dist/components/motion/avatar-group.d.ts +10 -1
  355. package/dist/components/motion/avatar-group.d.ts.map +1 -1
  356. package/dist/components/motion/avatar-group.js +3 -3
  357. package/dist/components/motion/avatar-group.js.map +1 -1
  358. package/dist/components/motion/before-after-slider.d.ts +3 -0
  359. package/dist/components/motion/before-after-slider.d.ts.map +1 -1
  360. package/dist/components/motion/before-after-slider.js +2 -3
  361. package/dist/components/motion/before-after-slider.js.map +1 -1
  362. package/dist/components/motion/bloom-menu.d.ts +5 -0
  363. package/dist/components/motion/bloom-menu.d.ts.map +1 -1
  364. package/dist/components/motion/bloom-menu.js +10 -24
  365. package/dist/components/motion/bloom-menu.js.map +1 -1
  366. package/dist/components/motion/bookmark-button.d.ts +30 -0
  367. package/dist/components/motion/bookmark-button.d.ts.map +1 -0
  368. package/dist/components/motion/bookmark-button.js +107 -0
  369. package/dist/components/motion/bookmark-button.js.map +1 -0
  370. package/dist/components/motion/bookshelf.d.ts +7 -0
  371. package/dist/components/motion/bookshelf.d.ts.map +1 -1
  372. package/dist/components/motion/bookshelf.js +3 -3
  373. package/dist/components/motion/bookshelf.js.map +1 -1
  374. package/dist/components/motion/bottom-sheet.d.ts +6 -0
  375. package/dist/components/motion/bottom-sheet.d.ts.map +1 -1
  376. package/dist/components/motion/bottom-sheet.js +6 -30
  377. package/dist/components/motion/bottom-sheet.js.map +1 -1
  378. package/dist/components/motion/bounce-sidebar.d.ts +16 -0
  379. package/dist/components/motion/bounce-sidebar.d.ts.map +1 -1
  380. package/dist/components/motion/bounce-sidebar.js.map +1 -1
  381. package/dist/components/motion/bouncy-accordion.d.ts +20 -0
  382. package/dist/components/motion/bouncy-accordion.d.ts.map +1 -1
  383. package/dist/components/motion/bouncy-accordion.js +2 -2
  384. package/dist/components/motion/bouncy-accordion.js.map +1 -1
  385. package/dist/components/motion/breadcrumb.d.ts +2 -0
  386. package/dist/components/motion/breadcrumb.d.ts.map +1 -1
  387. package/dist/components/motion/breadcrumb.js +5 -6
  388. package/dist/components/motion/breadcrumb.js.map +1 -1
  389. package/dist/components/motion/button/base.d.ts +8 -0
  390. package/dist/components/motion/button/base.d.ts.map +1 -1
  391. package/dist/components/motion/button/base.js +15 -10
  392. package/dist/components/motion/button/base.js.map +1 -1
  393. package/dist/components/motion/button/metallic.d.ts.map +1 -1
  394. package/dist/components/motion/button/metallic.js +5 -4
  395. package/dist/components/motion/button/metallic.js.map +1 -1
  396. package/dist/components/motion/button/stateful.d.ts +5 -0
  397. package/dist/components/motion/button/stateful.d.ts.map +1 -1
  398. package/dist/components/motion/button/stateful.js +0 -1
  399. package/dist/components/motion/button/stateful.js.map +1 -1
  400. package/dist/components/motion/{button/index.d.ts → button.d.ts} +4 -4
  401. package/dist/components/motion/button.js +6 -0
  402. package/dist/components/motion/card-dealer.d.ts +2 -0
  403. package/dist/components/motion/card-dealer.d.ts.map +1 -1
  404. package/dist/components/motion/card-dealer.js +4 -4
  405. package/dist/components/motion/card-dealer.js.map +1 -1
  406. package/dist/components/motion/card-folder.d.ts +18 -0
  407. package/dist/components/motion/card-folder.d.ts.map +1 -1
  408. package/dist/components/motion/card-folder.js +9 -9
  409. package/dist/components/motion/card-folder.js.map +1 -1
  410. package/dist/components/motion/card.js +1 -1
  411. package/dist/components/motion/card.js.map +1 -1
  412. package/dist/components/motion/casino/game-parts.d.ts +1 -1
  413. package/dist/components/motion/casino/game-parts.js +5 -5
  414. package/dist/components/motion/casino/game-parts.js.map +1 -1
  415. package/dist/components/motion/center-morph-modal.d.ts +4 -0
  416. package/dist/components/motion/center-morph-modal.d.ts.map +1 -1
  417. package/dist/components/motion/center-morph-modal.js +64 -91
  418. package/dist/components/motion/center-morph-modal.js.map +1 -1
  419. package/dist/components/motion/checkbox.d.ts +8 -0
  420. package/dist/components/motion/checkbox.d.ts.map +1 -1
  421. package/dist/components/motion/checkbox.js.map +1 -1
  422. package/dist/components/motion/chromatic-text-reveal.js +3 -3
  423. package/dist/components/motion/chromatic-text-reveal.js.map +1 -1
  424. package/dist/components/motion/click-burst.d.ts +24 -0
  425. package/dist/components/motion/click-burst.d.ts.map +1 -0
  426. package/dist/components/motion/click-burst.js +133 -0
  427. package/dist/components/motion/click-burst.js.map +1 -0
  428. package/dist/components/motion/collapsible.d.ts +4 -0
  429. package/dist/components/motion/collapsible.d.ts.map +1 -1
  430. package/dist/components/motion/collapsible.js +1 -1
  431. package/dist/components/motion/collapsible.js.map +1 -1
  432. package/dist/components/motion/color-picker.d.ts +7 -21
  433. package/dist/components/motion/color-picker.d.ts.map +1 -1
  434. package/dist/components/motion/color-picker.js +7 -95
  435. package/dist/components/motion/color-picker.js.map +1 -1
  436. package/dist/components/motion/color-selector.d.ts +5 -0
  437. package/dist/components/motion/color-selector.d.ts.map +1 -1
  438. package/dist/components/motion/color-selector.js.map +1 -1
  439. package/dist/components/motion/combobox/content.d.ts +3 -10
  440. package/dist/components/motion/combobox/content.d.ts.map +1 -1
  441. package/dist/components/motion/combobox/content.js +14 -80
  442. package/dist/components/motion/combobox/content.js.map +1 -1
  443. package/dist/components/motion/combobox/context.d.ts +3 -2
  444. package/dist/components/motion/combobox/context.js +1 -1
  445. package/dist/components/motion/combobox/list.d.ts +12 -0
  446. package/dist/components/motion/combobox/list.d.ts.map +1 -1
  447. package/dist/components/motion/combobox/list.js +4 -4
  448. package/dist/components/motion/combobox/list.js.map +1 -1
  449. package/dist/components/motion/combobox/listbox-panel.d.ts +2 -0
  450. package/dist/components/motion/combobox/listbox-panel.js +99 -0
  451. package/dist/components/motion/combobox/listbox-panel.js.map +1 -0
  452. package/dist/components/motion/combobox/trigger.d.ts +5 -0
  453. package/dist/components/motion/combobox/trigger.d.ts.map +1 -1
  454. package/dist/components/motion/combobox/trigger.js +10 -4
  455. package/dist/components/motion/combobox/trigger.js.map +1 -1
  456. package/dist/components/motion/combobox.d.ts +1 -1
  457. package/dist/components/motion/combobox.js +1 -1
  458. package/dist/components/motion/command-palette.d.ts +29 -1
  459. package/dist/components/motion/command-palette.d.ts.map +1 -1
  460. package/dist/components/motion/command-palette.js +282 -124
  461. package/dist/components/motion/command-palette.js.map +1 -1
  462. package/dist/components/motion/confetti.d.ts +23 -0
  463. package/dist/components/motion/confetti.d.ts.map +1 -0
  464. package/dist/components/motion/confetti.js +154 -0
  465. package/dist/components/motion/confetti.js.map +1 -0
  466. package/dist/components/motion/context-menu.d.ts +25 -0
  467. package/dist/components/motion/context-menu.d.ts.map +1 -1
  468. package/dist/components/motion/context-menu.js +110 -112
  469. package/dist/components/motion/context-menu.js.map +1 -1
  470. package/dist/components/motion/copy-button.d.ts +27 -0
  471. package/dist/components/motion/copy-button.d.ts.map +1 -0
  472. package/dist/components/motion/copy-button.js +129 -0
  473. package/dist/components/motion/copy-button.js.map +1 -0
  474. package/dist/components/motion/crash/crash-balloon.d.ts +2 -2
  475. package/dist/components/motion/crash/crash-balloon.js +2 -2
  476. package/dist/components/motion/crash/crash-balloon.js.map +1 -1
  477. package/dist/components/motion/crash/crash-parts.d.ts +2 -2
  478. package/dist/components/motion/crash/crash-parts.js +1 -1
  479. package/dist/components/motion/crash/crash-tower.d.ts +2 -2
  480. package/dist/components/motion/crash/crash-tower.js +3 -3
  481. package/dist/components/motion/crash/crash-tower.js.map +1 -1
  482. package/dist/components/motion/crash.d.ts +2 -2
  483. package/dist/components/motion/crash.js +1 -1
  484. package/dist/components/motion/cylinder-carousel.d.ts +6 -3
  485. package/dist/components/motion/cylinder-carousel.d.ts.map +1 -1
  486. package/dist/components/motion/cylinder-carousel.js +1 -1
  487. package/dist/components/motion/cylinder-carousel.js.map +1 -1
  488. package/dist/components/motion/date-range-picker/calendar-choices.d.ts +18 -0
  489. package/dist/components/motion/date-range-picker/calendar-choices.d.ts.map +1 -0
  490. package/dist/components/motion/date-range-picker/calendar-choices.js +62 -0
  491. package/dist/components/motion/date-range-picker/calendar-choices.js.map +1 -0
  492. package/dist/components/motion/date-range-picker/calendar-presence.d.ts +5 -0
  493. package/dist/components/motion/date-range-picker/calendar-presence.d.ts.map +1 -0
  494. package/dist/components/motion/date-range-picker/calendar-presence.js +14 -0
  495. package/dist/components/motion/date-range-picker/calendar-presence.js.map +1 -0
  496. package/dist/components/motion/date-range-picker/calendar.d.ts +8 -0
  497. package/dist/components/motion/date-range-picker/calendar.d.ts.map +1 -0
  498. package/dist/components/motion/date-range-picker/calendar.js +46 -0
  499. package/dist/components/motion/date-range-picker/calendar.js.map +1 -0
  500. package/dist/components/motion/date-range-picker/clear.d.ts +4 -0
  501. package/dist/components/motion/date-range-picker/clear.d.ts.map +1 -0
  502. package/dist/components/motion/date-range-picker/clear.js +23 -0
  503. package/dist/components/motion/date-range-picker/clear.js.map +1 -0
  504. package/dist/components/motion/date-range-picker/content.d.ts +7 -0
  505. package/dist/components/motion/date-range-picker/content.d.ts.map +1 -0
  506. package/dist/components/motion/date-range-picker/content.js +36 -0
  507. package/dist/components/motion/date-range-picker/content.js.map +1 -0
  508. package/dist/components/motion/date-range-picker/dropdown.d.ts +12 -0
  509. package/dist/components/motion/date-range-picker/dropdown.d.ts.map +1 -0
  510. package/dist/components/motion/date-range-picker/dropdown.js +26 -0
  511. package/dist/components/motion/date-range-picker/dropdown.js.map +1 -0
  512. package/dist/components/motion/date-range-picker/footer.d.ts +4 -0
  513. package/dist/components/motion/date-range-picker/footer.d.ts.map +1 -0
  514. package/dist/components/motion/date-range-picker/footer.js +20 -0
  515. package/dist/components/motion/date-range-picker/footer.js.map +1 -0
  516. package/dist/components/motion/date-range-picker/grid.d.ts +4 -0
  517. package/dist/components/motion/date-range-picker/grid.d.ts.map +1 -0
  518. package/dist/components/motion/date-range-picker/grid.js +132 -0
  519. package/dist/components/motion/date-range-picker/grid.js.map +1 -0
  520. package/dist/components/motion/date-range-picker/header.d.ts +4 -0
  521. package/dist/components/motion/date-range-picker/header.d.ts.map +1 -0
  522. package/dist/components/motion/date-range-picker/header.js +85 -0
  523. package/dist/components/motion/date-range-picker/header.js.map +1 -0
  524. package/dist/components/motion/date-range-picker/preset.d.ts +10 -0
  525. package/dist/components/motion/date-range-picker/preset.d.ts.map +1 -0
  526. package/dist/components/motion/date-range-picker/preset.js +25 -0
  527. package/dist/components/motion/date-range-picker/preset.js.map +1 -0
  528. package/dist/components/motion/date-range-picker/presets.d.ts +4 -0
  529. package/dist/components/motion/date-range-picker/presets.d.ts.map +1 -0
  530. package/dist/components/motion/date-range-picker/presets.js +22 -0
  531. package/dist/components/motion/date-range-picker/presets.js.map +1 -0
  532. package/dist/components/motion/date-range-picker/root.d.ts +4 -0
  533. package/dist/components/motion/date-range-picker/root.d.ts.map +1 -0
  534. package/dist/components/motion/date-range-picker/root.js +3 -0
  535. package/dist/components/motion/date-range-picker/selection.d.ts +4 -0
  536. package/dist/components/motion/date-range-picker/selection.d.ts.map +1 -0
  537. package/dist/components/motion/date-range-picker/selection.js +17 -0
  538. package/dist/components/motion/date-range-picker/selection.js.map +1 -0
  539. package/dist/components/motion/date-range-picker/summary.d.ts +4 -0
  540. package/dist/components/motion/date-range-picker/summary.d.ts.map +1 -0
  541. package/dist/components/motion/date-range-picker/summary.js +40 -0
  542. package/dist/components/motion/date-range-picker/summary.js.map +1 -0
  543. package/dist/components/motion/date-range-picker/trigger.d.ts +7 -0
  544. package/dist/components/motion/date-range-picker/trigger.d.ts.map +1 -0
  545. package/dist/components/motion/date-range-picker/trigger.js +74 -0
  546. package/dist/components/motion/date-range-picker/trigger.js.map +1 -0
  547. package/dist/components/motion/date-range-picker.d.ts +16 -116
  548. package/dist/components/motion/date-range-picker.d.ts.map +1 -1
  549. package/dist/components/motion/date-range-picker.js +14 -922
  550. package/dist/components/motion/date-range-picker.js.map +1 -1
  551. package/dist/components/motion/delete-button.d.ts +31 -0
  552. package/dist/components/motion/delete-button.d.ts.map +1 -0
  553. package/dist/components/motion/delete-button.js +263 -0
  554. package/dist/components/motion/delete-button.js.map +1 -0
  555. package/dist/components/motion/digit-swap.d.ts +3 -0
  556. package/dist/components/motion/digit-swap.d.ts.map +1 -1
  557. package/dist/components/motion/digit-swap.js.map +1 -1
  558. package/dist/components/motion/dock.d.ts +4 -0
  559. package/dist/components/motion/dock.d.ts.map +1 -1
  560. package/dist/components/motion/dock.js +2 -2
  561. package/dist/components/motion/dock.js.map +1 -1
  562. package/dist/components/motion/download-button.d.ts +29 -0
  563. package/dist/components/motion/download-button.d.ts.map +1 -0
  564. package/dist/components/motion/download-button.js +305 -0
  565. package/dist/components/motion/download-button.js.map +1 -0
  566. package/dist/components/motion/drawer.d.ts +9 -1
  567. package/dist/components/motion/drawer.d.ts.map +1 -1
  568. package/dist/components/motion/drawer.js +65 -15
  569. package/dist/components/motion/drawer.js.map +1 -1
  570. package/dist/components/motion/dropdown-menu/item-base.d.ts +37 -0
  571. package/dist/components/motion/dropdown-menu/item-base.d.ts.map +1 -0
  572. package/dist/components/motion/dropdown-menu/item-base.js +78 -0
  573. package/dist/components/motion/dropdown-menu/item-base.js.map +1 -0
  574. package/dist/components/motion/dropdown-menu/menu-panel.d.ts +31 -0
  575. package/dist/components/motion/dropdown-menu/menu-panel.d.ts.map +1 -0
  576. package/dist/components/motion/dropdown-menu/menu-panel.js +201 -0
  577. package/dist/components/motion/dropdown-menu/menu-panel.js.map +1 -0
  578. package/dist/components/motion/dropdown-menu.d.ts +30 -18
  579. package/dist/components/motion/dropdown-menu.d.ts.map +1 -1
  580. package/dist/components/motion/dropdown-menu.js +113 -421
  581. package/dist/components/motion/dropdown-menu.js.map +1 -1
  582. package/dist/components/motion/dynamic-island.d.ts +2 -0
  583. package/dist/components/motion/dynamic-island.d.ts.map +1 -1
  584. package/dist/components/motion/dynamic-island.js.map +1 -1
  585. package/dist/components/motion/expandable-action-bar.d.ts +28 -0
  586. package/dist/components/motion/expandable-action-bar.d.ts.map +1 -1
  587. package/dist/components/motion/expandable-action-bar.js +5 -14
  588. package/dist/components/motion/expandable-action-bar.js.map +1 -1
  589. package/dist/components/motion/expandable-control.d.ts +14 -0
  590. package/dist/components/motion/expandable-control.d.ts.map +1 -1
  591. package/dist/components/motion/expandable-control.js +1 -1
  592. package/dist/components/motion/expandable-control.js.map +1 -1
  593. package/dist/components/motion/expandable-tabs.d.ts +16 -1
  594. package/dist/components/motion/expandable-tabs.d.ts.map +1 -1
  595. package/dist/components/motion/expandable-tabs.js +3 -15
  596. package/dist/components/motion/expandable-tabs.js.map +1 -1
  597. package/dist/components/motion/expanding-arrow-button.d.ts +2 -0
  598. package/dist/components/motion/expanding-arrow-button.d.ts.map +1 -1
  599. package/dist/components/motion/expanding-arrow-button.js +3 -3
  600. package/dist/components/motion/expanding-arrow-button.js.map +1 -1
  601. package/dist/components/motion/feedback-widget.d.ts +6 -0
  602. package/dist/components/motion/feedback-widget.d.ts.map +1 -1
  603. package/dist/components/motion/feedback-widget.js +13 -29
  604. package/dist/components/motion/feedback-widget.js.map +1 -1
  605. package/dist/components/motion/file-tree.d.ts +24 -0
  606. package/dist/components/motion/file-tree.d.ts.map +1 -1
  607. package/dist/components/motion/file-tree.js +4 -4
  608. package/dist/components/motion/file-tree.js.map +1 -1
  609. package/dist/components/motion/file-upload.d.ts +34 -0
  610. package/dist/components/motion/file-upload.d.ts.map +1 -1
  611. package/dist/components/motion/file-upload.js +26 -17
  612. package/dist/components/motion/file-upload.js.map +1 -1
  613. package/dist/components/motion/follow-button.d.ts +31 -0
  614. package/dist/components/motion/follow-button.d.ts.map +1 -0
  615. package/dist/components/motion/follow-button.js +184 -0
  616. package/dist/components/motion/follow-button.js.map +1 -0
  617. package/dist/components/motion/hold-action-button.d.ts +7 -0
  618. package/dist/components/motion/hold-action-button.d.ts.map +1 -1
  619. package/dist/components/motion/hold-action-button.js +1 -1
  620. package/dist/components/motion/hold-action-button.js.map +1 -1
  621. package/dist/components/motion/infinite-masonry.d.ts +22 -0
  622. package/dist/components/motion/infinite-masonry.d.ts.map +1 -1
  623. package/dist/components/motion/infinite-masonry.js.map +1 -1
  624. package/dist/components/motion/input.d.ts +17 -0
  625. package/dist/components/motion/input.d.ts.map +1 -1
  626. package/dist/components/motion/input.js +2 -1
  627. package/dist/components/motion/input.js.map +1 -1
  628. package/dist/components/motion/knockout-bracket.d.ts +11 -4
  629. package/dist/components/motion/knockout-bracket.d.ts.map +1 -1
  630. package/dist/components/motion/knockout-bracket.js +30 -21
  631. package/dist/components/motion/knockout-bracket.js.map +1 -1
  632. package/dist/components/motion/knockout-wheel.d.ts +9 -3
  633. package/dist/components/motion/knockout-wheel.d.ts.map +1 -1
  634. package/dist/components/motion/knockout-wheel.js +5 -5
  635. package/dist/components/motion/knockout-wheel.js.map +1 -1
  636. package/dist/components/motion/like-button.d.ts +26 -0
  637. package/dist/components/motion/like-button.d.ts.map +1 -0
  638. package/dist/components/motion/like-button.js +128 -0
  639. package/dist/components/motion/like-button.js.map +1 -0
  640. package/dist/components/motion/loader.d.ts +1 -0
  641. package/dist/components/motion/loader.d.ts.map +1 -1
  642. package/dist/components/motion/loader.js.map +1 -1
  643. package/dist/components/motion/lock-toggle.d.ts +29 -0
  644. package/dist/components/motion/lock-toggle.d.ts.map +1 -0
  645. package/dist/components/motion/lock-toggle.js +252 -0
  646. package/dist/components/motion/lock-toggle.js.map +1 -0
  647. package/dist/components/motion/marquee.d.ts +6 -0
  648. package/dist/components/motion/marquee.d.ts.map +1 -1
  649. package/dist/components/motion/marquee.js.map +1 -1
  650. package/dist/components/motion/menu/menu-item-highlight.d.ts +16 -0
  651. package/dist/components/motion/menu/menu-item-highlight.d.ts.map +1 -0
  652. package/dist/components/motion/menu/menu-item-highlight.js +20 -0
  653. package/dist/components/motion/menu/menu-item-highlight.js.map +1 -0
  654. package/dist/components/motion/message-status.d.ts +26 -0
  655. package/dist/components/motion/message-status.d.ts.map +1 -0
  656. package/dist/components/motion/message-status.js +198 -0
  657. package/dist/components/motion/message-status.js.map +1 -0
  658. package/dist/components/motion/mines.d.ts +2 -1
  659. package/dist/components/motion/mines.d.ts.map +1 -1
  660. package/dist/components/motion/mines.js +3 -3
  661. package/dist/components/motion/mines.js.map +1 -1
  662. package/dist/components/motion/morphing-lightbox.d.ts +16 -0
  663. package/dist/components/motion/morphing-lightbox.d.ts.map +1 -1
  664. package/dist/components/motion/morphing-lightbox.js +3 -3
  665. package/dist/components/motion/morphing-lightbox.js.map +1 -1
  666. package/dist/components/motion/morphing-modal.d.ts +2 -0
  667. package/dist/components/motion/morphing-modal.d.ts.map +1 -1
  668. package/dist/components/motion/morphing-modal.js +14 -13
  669. package/dist/components/motion/morphing-modal.js.map +1 -1
  670. package/dist/components/motion/morphing-search-chips.d.ts +12 -0
  671. package/dist/components/motion/morphing-search-chips.d.ts.map +1 -1
  672. package/dist/components/motion/morphing-search-chips.js +6 -16
  673. package/dist/components/motion/morphing-search-chips.js.map +1 -1
  674. package/dist/components/motion/morphing-search.d.ts +16 -0
  675. package/dist/components/motion/morphing-search.d.ts.map +1 -1
  676. package/dist/components/motion/morphing-search.js +9 -13
  677. package/dist/components/motion/morphing-search.js.map +1 -1
  678. package/dist/components/motion/morphing-tabs.d.ts +20 -0
  679. package/dist/components/motion/morphing-tabs.d.ts.map +1 -1
  680. package/dist/components/motion/morphing-tabs.js.map +1 -1
  681. package/dist/components/motion/multi-select/content.d.ts +3 -10
  682. package/dist/components/motion/multi-select/content.d.ts.map +1 -1
  683. package/dist/components/motion/multi-select/content.js +14 -80
  684. package/dist/components/motion/multi-select/content.js.map +1 -1
  685. package/dist/components/motion/multi-select/context.d.ts +2 -2
  686. package/dist/components/motion/multi-select/context.js +1 -1
  687. package/dist/components/motion/multi-select/list.d.ts +12 -0
  688. package/dist/components/motion/multi-select/list.d.ts.map +1 -1
  689. package/dist/components/motion/multi-select/list.js +5 -5
  690. package/dist/components/motion/multi-select/list.js.map +1 -1
  691. package/dist/components/motion/multi-select/trigger.d.ts +6 -0
  692. package/dist/components/motion/multi-select/trigger.d.ts.map +1 -1
  693. package/dist/components/motion/multi-select/trigger.js +5 -4
  694. package/dist/components/motion/multi-select/trigger.js.map +1 -1
  695. package/dist/components/motion/{multi-select/index.d.ts → multi-select.d.ts} +4 -4
  696. package/dist/components/motion/{multi-select/index.js → multi-select.js} +4 -4
  697. package/dist/components/motion/mute-toggle.d.ts +25 -0
  698. package/dist/components/motion/mute-toggle.d.ts.map +1 -0
  699. package/dist/components/motion/mute-toggle.js +221 -0
  700. package/dist/components/motion/mute-toggle.js.map +1 -0
  701. package/dist/components/motion/not-found/glitch.js +2 -2
  702. package/dist/components/motion/not-found/glitch.js.map +1 -1
  703. package/dist/components/motion/not-found/magnetic.js +2 -2
  704. package/dist/components/motion/not-found/magnetic.js.map +1 -1
  705. package/dist/components/motion/not-found/shared.d.ts +7 -0
  706. package/dist/components/motion/not-found/shared.d.ts.map +1 -1
  707. package/dist/components/motion/not-found/shared.js.map +1 -1
  708. package/dist/components/motion/not-found/spotlight.js +4 -4
  709. package/dist/components/motion/not-found/spotlight.js.map +1 -1
  710. package/dist/components/motion/not-found/stacked.js +2 -2
  711. package/dist/components/motion/not-found/stacked.js.map +1 -1
  712. package/dist/components/motion/not-found/terminal.d.ts.map +1 -1
  713. package/dist/components/motion/not-found/terminal.js +1 -1
  714. package/dist/components/motion/not-found/terminal.js.map +1 -1
  715. package/dist/components/motion/notification-bell.d.ts +29 -0
  716. package/dist/components/motion/notification-bell.d.ts.map +1 -0
  717. package/dist/components/motion/notification-bell.js +274 -0
  718. package/dist/components/motion/notification-bell.js.map +1 -0
  719. package/dist/components/motion/notification-stack.d.ts +23 -0
  720. package/dist/components/motion/notification-stack.d.ts.map +1 -1
  721. package/dist/components/motion/notification-stack.js.map +1 -1
  722. package/dist/components/motion/number-ticker.d.ts +6 -1
  723. package/dist/components/motion/number-ticker.d.ts.map +1 -1
  724. package/dist/components/motion/number-ticker.js.map +1 -1
  725. package/dist/components/motion/otp-input.d.ts +6 -0
  726. package/dist/components/motion/otp-input.d.ts.map +1 -1
  727. package/dist/components/motion/otp-input.js +3 -7
  728. package/dist/components/motion/otp-input.js.map +1 -1
  729. package/dist/components/motion/overflow-actions.d.ts +26 -0
  730. package/dist/components/motion/overflow-actions.d.ts.map +1 -1
  731. package/dist/components/motion/overflow-actions.js.map +1 -1
  732. package/dist/components/motion/pagination.d.ts +4 -0
  733. package/dist/components/motion/pagination.d.ts.map +1 -1
  734. package/dist/components/motion/pagination.js +2 -2
  735. package/dist/components/motion/pagination.js.map +1 -1
  736. package/dist/components/motion/parallax.d.ts +2 -0
  737. package/dist/components/motion/parallax.d.ts.map +1 -1
  738. package/dist/components/motion/parallax.js.map +1 -1
  739. package/dist/components/motion/plinko.d.ts +1 -0
  740. package/dist/components/motion/plinko.d.ts.map +1 -1
  741. package/dist/components/motion/plinko.js +2 -2
  742. package/dist/components/motion/plinko.js.map +1 -1
  743. package/dist/components/motion/poll-vote.d.ts +39 -0
  744. package/dist/components/motion/poll-vote.d.ts.map +1 -0
  745. package/dist/components/motion/poll-vote.js +209 -0
  746. package/dist/components/motion/poll-vote.js.map +1 -0
  747. package/dist/components/motion/popover-morph.d.ts +2 -50
  748. package/dist/components/motion/popover-morph.js +4 -24
  749. package/dist/components/motion/popover-morph.js.map +1 -1
  750. package/dist/components/motion/popover.d.ts +5 -2
  751. package/dist/components/motion/popover.d.ts.map +1 -1
  752. package/dist/components/motion/popover.js +151 -99
  753. package/dist/components/motion/popover.js.map +1 -1
  754. package/dist/components/motion/prediction-market-card.d.ts +15 -0
  755. package/dist/components/motion/prediction-market-card.d.ts.map +1 -1
  756. package/dist/components/motion/prediction-market-card.js +8 -8
  757. package/dist/components/motion/prediction-market-card.js.map +1 -1
  758. package/dist/components/motion/prediction-market.d.ts +34 -0
  759. package/dist/components/motion/prediction-market.d.ts.map +1 -1
  760. package/dist/components/motion/prediction-market.js +10 -10
  761. package/dist/components/motion/prediction-market.js.map +1 -1
  762. package/dist/components/motion/preview-rail.d.ts +23 -0
  763. package/dist/components/motion/preview-rail.d.ts.map +1 -1
  764. package/dist/components/motion/preview-rail.js.map +1 -1
  765. package/dist/components/motion/project-folder.d.ts +16 -0
  766. package/dist/components/motion/project-folder.d.ts.map +1 -1
  767. package/dist/components/motion/project-folder.js +10 -40
  768. package/dist/components/motion/project-folder.js.map +1 -1
  769. package/dist/components/motion/pull-to-refresh.d.ts +8 -0
  770. package/dist/components/motion/pull-to-refresh.d.ts.map +1 -1
  771. package/dist/components/motion/pull-to-refresh.js +1 -1
  772. package/dist/components/motion/pull-to-refresh.js.map +1 -1
  773. package/dist/components/motion/qr-code.d.ts +42 -0
  774. package/dist/components/motion/qr-code.d.ts.map +1 -0
  775. package/dist/components/motion/qr-code.js +443 -0
  776. package/dist/components/motion/qr-code.js.map +1 -0
  777. package/dist/components/motion/radio.d.ts +10 -0
  778. package/dist/components/motion/radio.d.ts.map +1 -1
  779. package/dist/components/motion/radio.js.map +1 -1
  780. package/dist/components/motion/range-slider-bubble.d.ts +1 -0
  781. package/dist/components/motion/range-slider-bubble.d.ts.map +1 -1
  782. package/dist/components/motion/range-slider-bubble.js +4 -4
  783. package/dist/components/motion/range-slider-bubble.js.map +1 -1
  784. package/dist/components/motion/range-slider-fluid.d.ts +1 -0
  785. package/dist/components/motion/range-slider-fluid.d.ts.map +1 -1
  786. package/dist/components/motion/range-slider-fluid.js +2 -2
  787. package/dist/components/motion/range-slider-fluid.js.map +1 -1
  788. package/dist/components/motion/range-slider-inline.d.ts +1 -0
  789. package/dist/components/motion/range-slider-inline.d.ts.map +1 -1
  790. package/dist/components/motion/range-slider-inline.js +1 -1
  791. package/dist/components/motion/range-slider-inline.js.map +1 -1
  792. package/dist/components/motion/range-slider-ruler.d.ts +1 -0
  793. package/dist/components/motion/range-slider-ruler.d.ts.map +1 -1
  794. package/dist/components/motion/range-slider-ruler.js +3 -3
  795. package/dist/components/motion/range-slider-ruler.js.map +1 -1
  796. package/dist/components/motion/range-slider-wave.d.ts +1 -0
  797. package/dist/components/motion/range-slider-wave.d.ts.map +1 -1
  798. package/dist/components/motion/range-slider-wave.js +3 -3
  799. package/dist/components/motion/range-slider-wave.js.map +1 -1
  800. package/dist/components/motion/range-slider.d.ts +1 -0
  801. package/dist/components/motion/range-slider.d.ts.map +1 -1
  802. package/dist/components/motion/range-slider.js +2 -2
  803. package/dist/components/motion/range-slider.js.map +1 -1
  804. package/dist/components/motion/reaction-picker.d.ts +50 -0
  805. package/dist/components/motion/reaction-picker.d.ts.map +1 -0
  806. package/dist/components/motion/reaction-picker.js +516 -0
  807. package/dist/components/motion/reaction-picker.js.map +1 -0
  808. package/dist/components/motion/refresh-button.d.ts +24 -0
  809. package/dist/components/motion/refresh-button.d.ts.map +1 -0
  810. package/dist/components/motion/refresh-button.js +267 -0
  811. package/dist/components/motion/refresh-button.js.map +1 -0
  812. package/dist/components/motion/scroll-progress.d.ts +2 -0
  813. package/dist/components/motion/scroll-progress.d.ts.map +1 -1
  814. package/dist/components/motion/scroll-progress.js +1 -1
  815. package/dist/components/motion/scroll-progress.js.map +1 -1
  816. package/dist/components/motion/scroll-reveal.d.ts +2 -0
  817. package/dist/components/motion/scroll-reveal.d.ts.map +1 -1
  818. package/dist/components/motion/scroll-reveal.js.map +1 -1
  819. package/dist/components/motion/scroll-to.d.ts +2 -1
  820. package/dist/components/motion/scroll-to.d.ts.map +1 -1
  821. package/dist/components/motion/scroll-to.js +1 -1
  822. package/dist/components/motion/scroll-to.js.map +1 -1
  823. package/dist/components/motion/select-morph.d.ts +16 -2
  824. package/dist/components/motion/select-morph.d.ts.map +1 -1
  825. package/dist/components/motion/select-morph.js +148 -85
  826. package/dist/components/motion/select-morph.js.map +1 -1
  827. package/dist/components/motion/select.d.ts +16 -2
  828. package/dist/components/motion/select.d.ts.map +1 -1
  829. package/dist/components/motion/select.js +150 -61
  830. package/dist/components/motion/select.js.map +1 -1
  831. package/dist/components/motion/send-button.d.ts +23 -0
  832. package/dist/components/motion/send-button.d.ts.map +1 -0
  833. package/dist/components/motion/send-button.js +273 -0
  834. package/dist/components/motion/send-button.js.map +1 -0
  835. package/dist/components/motion/share-button.d.ts +45 -0
  836. package/dist/components/motion/share-button.d.ts.map +1 -0
  837. package/dist/components/motion/share-button.js +324 -0
  838. package/dist/components/motion/share-button.js.map +1 -0
  839. package/dist/components/motion/signup-form.d.ts +24 -2
  840. package/dist/components/motion/signup-form.d.ts.map +1 -1
  841. package/dist/components/motion/signup-form.js +3 -3
  842. package/dist/components/motion/signup-form.js.map +1 -1
  843. package/dist/components/motion/slide-action-button.d.ts +6 -0
  844. package/dist/components/motion/slide-action-button.d.ts.map +1 -1
  845. package/dist/components/motion/slide-action-button.js.map +1 -1
  846. package/dist/components/motion/slide-game.d.ts +2 -1
  847. package/dist/components/motion/slide-game.d.ts.map +1 -1
  848. package/dist/components/motion/slide-game.js +9 -9
  849. package/dist/components/motion/slide-game.js.map +1 -1
  850. package/dist/components/motion/smooth-scroll.d.ts +3 -1
  851. package/dist/components/motion/smooth-scroll.d.ts.map +1 -1
  852. package/dist/components/motion/smooth-scroll.js.map +1 -1
  853. package/dist/components/motion/sortable-list.d.ts +8 -0
  854. package/dist/components/motion/sortable-list.d.ts.map +1 -1
  855. package/dist/components/motion/sortable-list.js +2 -2
  856. package/dist/components/motion/sortable-list.js.map +1 -1
  857. package/dist/components/motion/star-rating.d.ts +35 -0
  858. package/dist/components/motion/star-rating.d.ts.map +1 -0
  859. package/dist/components/motion/star-rating.js +253 -0
  860. package/dist/components/motion/star-rating.js.map +1 -0
  861. package/dist/components/motion/status-icon.d.ts +31 -0
  862. package/dist/components/motion/status-icon.d.ts.map +1 -0
  863. package/dist/components/motion/status-icon.js +259 -0
  864. package/dist/components/motion/status-icon.js.map +1 -0
  865. package/dist/components/motion/swap/controls.d.ts +1 -1
  866. package/dist/components/motion/swap/controls.d.ts.map +1 -1
  867. package/dist/components/motion/swap/controls.js +20 -20
  868. package/dist/components/motion/swap/controls.js.map +1 -1
  869. package/dist/components/motion/swap/field.d.ts +1 -1
  870. package/dist/components/motion/swap/field.js +8 -7
  871. package/dist/components/motion/swap/field.js.map +1 -1
  872. package/dist/components/motion/swap/quote-row.d.ts +1 -1
  873. package/dist/components/motion/swap/quote-row.js +1 -1
  874. package/dist/components/motion/swap/quote-row.js.map +1 -1
  875. package/dist/components/motion/swap/token-badges.d.ts +1 -1
  876. package/dist/components/motion/swap/token-badges.js +5 -6
  877. package/dist/components/motion/swap/token-badges.js.map +1 -1
  878. package/dist/components/motion/swap/token-picker.d.ts +1 -1
  879. package/dist/components/motion/swap/token-picker.d.ts.map +1 -1
  880. package/dist/components/motion/swap/token-picker.js +21 -18
  881. package/dist/components/motion/swap/token-picker.js.map +1 -1
  882. package/dist/components/motion/swap.d.ts +7 -2
  883. package/dist/components/motion/swap.d.ts.map +1 -1
  884. package/dist/components/motion/swap.js +1 -1
  885. package/dist/components/motion/swap.js.map +1 -1
  886. package/dist/components/motion/swipeable-list.d.ts +38 -0
  887. package/dist/components/motion/swipeable-list.d.ts.map +1 -1
  888. package/dist/components/motion/swipeable-list.js.map +1 -1
  889. package/dist/components/motion/switch.d.ts +9 -1
  890. package/dist/components/motion/switch.d.ts.map +1 -1
  891. package/dist/components/motion/switch.js +11 -2
  892. package/dist/components/motion/switch.js.map +1 -1
  893. package/dist/components/motion/table/skeleton-rows.d.ts +1 -1
  894. package/dist/components/motion/table/table-header.d.ts +1 -1
  895. package/dist/components/motion/table/table-menu.d.ts.map +1 -1
  896. package/dist/components/motion/table/table-menu.js +15 -15
  897. package/dist/components/motion/table/table-menu.js.map +1 -1
  898. package/dist/components/motion/{table/index.d.ts → table.d.ts} +3 -3
  899. package/dist/components/motion/table.d.ts.map +1 -0
  900. package/dist/components/motion/{table/index.js → table.js} +10 -10
  901. package/dist/components/motion/table.js.map +1 -0
  902. package/dist/components/motion/tabs.d.ts +16 -4
  903. package/dist/components/motion/tabs.d.ts.map +1 -1
  904. package/dist/components/motion/tabs.js +23 -10
  905. package/dist/components/motion/tabs.js.map +1 -1
  906. package/dist/components/motion/text-cascade.d.ts +2 -1
  907. package/dist/components/motion/text-cascade.d.ts.map +1 -1
  908. package/dist/components/motion/text-cascade.js +1 -1
  909. package/dist/components/motion/text-cascade.js.map +1 -1
  910. package/dist/components/motion/text-morph.d.ts +16 -0
  911. package/dist/components/motion/text-morph.d.ts.map +1 -0
  912. package/dist/components/motion/text-morph.js +239 -0
  913. package/dist/components/motion/text-morph.js.map +1 -0
  914. package/dist/components/motion/text-reveal.d.ts +11 -0
  915. package/dist/components/motion/text-reveal.d.ts.map +1 -1
  916. package/dist/components/motion/text-reveal.js +1 -1
  917. package/dist/components/motion/text-reveal.js.map +1 -1
  918. package/dist/components/motion/text-scramble.d.ts +2 -0
  919. package/dist/components/motion/text-scramble.d.ts.map +1 -1
  920. package/dist/components/motion/text-scramble.js.map +1 -1
  921. package/dist/components/motion/text-shimmer.d.ts +3 -0
  922. package/dist/components/motion/text-shimmer.d.ts.map +1 -1
  923. package/dist/components/motion/text-shimmer.js.map +1 -1
  924. package/dist/components/motion/theme-toggle.d.ts +3 -0
  925. package/dist/components/motion/theme-toggle.d.ts.map +1 -1
  926. package/dist/components/motion/theme-toggle.js +4 -3
  927. package/dist/components/motion/theme-toggle.js.map +1 -1
  928. package/dist/components/motion/tilt-card.d.ts +3 -0
  929. package/dist/components/motion/tilt-card.d.ts.map +1 -1
  930. package/dist/components/motion/tilt-card.js.map +1 -1
  931. package/dist/components/motion/timeline.d.ts +7 -0
  932. package/dist/components/motion/timeline.d.ts.map +1 -1
  933. package/dist/components/motion/timeline.js.map +1 -1
  934. package/dist/components/motion/tooltip/positioner.d.ts +1 -1
  935. package/dist/components/motion/tooltip/positioner.js +1 -1
  936. package/dist/components/motion/tooltip-surface.d.ts +6 -1
  937. package/dist/components/motion/tooltip-surface.d.ts.map +1 -1
  938. package/dist/components/motion/tooltip-surface.js +34 -24
  939. package/dist/components/motion/tooltip-surface.js.map +1 -1
  940. package/dist/components/motion/tooltip.d.ts +7 -1
  941. package/dist/components/motion/tooltip.d.ts.map +1 -1
  942. package/dist/components/motion/tooltip.js +1 -1
  943. package/dist/components/motion/upvote-button.d.ts +30 -0
  944. package/dist/components/motion/upvote-button.d.ts.map +1 -0
  945. package/dist/components/motion/upvote-button.js +144 -0
  946. package/dist/components/motion/upvote-button.js.map +1 -0
  947. package/dist/components/motion/wallet-card/account-avatar.d.ts +1 -1
  948. package/dist/components/motion/wallet-card/account-switcher.d.ts +2 -2
  949. package/dist/components/motion/wallet-card/account-switcher.js +7 -7
  950. package/dist/components/motion/wallet-card/account-switcher.js.map +1 -1
  951. package/dist/components/motion/wallet-card/balance-delta.js +1 -1
  952. package/dist/components/motion/wallet-card/balance-delta.js.map +1 -1
  953. package/dist/components/motion/wallet-card/copy-button.js +1 -1
  954. package/dist/components/motion/wallet-card/copy-button.js.map +1 -1
  955. package/dist/components/motion/wallet-card/search-bar.d.ts +1 -1
  956. package/dist/components/motion/wallet-card/search-bar.js +8 -8
  957. package/dist/components/motion/wallet-card/search-bar.js.map +1 -1
  958. package/dist/components/motion/{wallet-card/index.d.ts → wallet-card.d.ts} +4 -4
  959. package/dist/components/motion/wallet-card.d.ts.map +1 -0
  960. package/dist/components/motion/{wallet-card/index.js → wallet-card.js} +11 -11
  961. package/dist/components/motion/wallet-card.js.map +1 -0
  962. package/dist/components/motion/wave-reveal.d.ts +25 -0
  963. package/dist/components/motion/wave-reveal.d.ts.map +1 -0
  964. package/dist/components/motion/wave-reveal.js +630 -0
  965. package/dist/components/motion/wave-reveal.js.map +1 -0
  966. package/dist/components/motion/wheel-picker.d.ts +7 -0
  967. package/dist/components/motion/wheel-picker.d.ts.map +1 -1
  968. package/dist/components/motion/wheel-picker.js +12 -2
  969. package/dist/components/motion/wheel-picker.js.map +1 -1
  970. package/dist/components/reui/autocomplete.d.ts +1 -1
  971. package/dist/components/reui/badge.d.ts +2 -2
  972. package/dist/components/reui/color-picker.js +1 -1
  973. package/dist/components/reui/color-picker.js.map +1 -1
  974. package/dist/components/reui/file-type.d.ts +1 -1
  975. package/dist/components/reui/filters/filters-advanced.js.map +1 -1
  976. package/dist/components/reui/frame.d.ts +2 -2
  977. package/dist/components/reui/frame.js +1 -1
  978. package/dist/components/reui/frame.js.map +1 -1
  979. package/dist/components/reui/icon-tile.d.ts +2 -2
  980. package/dist/components/reui/number-field.d.ts +3 -3
  981. package/dist/components/reui/rating.d.ts +1 -1
  982. package/dist/components/ui/attachment.d.ts +3 -3
  983. package/dist/components/ui/badge.d.ts +1 -1
  984. package/dist/components/ui/bubble.d.ts +1 -1
  985. package/dist/components/ui/button-group.d.ts +1 -1
  986. package/dist/components/ui/button.d.ts +2 -2
  987. package/dist/components/ui/calendar.js +1 -1
  988. package/dist/components/ui/calendar.js.map +1 -1
  989. package/dist/components/ui/card.js +1 -1
  990. package/dist/components/ui/card.js.map +1 -1
  991. package/dist/components/ui/combobox.js +2 -2
  992. package/dist/components/ui/combobox.js.map +1 -1
  993. package/dist/components/ui/field.d.ts +1 -1
  994. package/dist/components/ui/input-group.d.ts +2 -2
  995. package/dist/components/ui/item.d.ts +2 -2
  996. package/dist/components/ui/marker.d.ts +1 -1
  997. package/dist/components/ui/questionnaire.js +2 -2
  998. package/dist/components/ui/questionnaire.js.map +1 -1
  999. package/dist/components/ui/sidebar.d.ts +1 -1
  1000. package/dist/components/ui/sidebar.js +1 -1
  1001. package/dist/components/ui/sidebar.js.map +1 -1
  1002. package/dist/components/ui/toggle-group.js +1 -1
  1003. package/dist/components/ui/toggle-group.js.map +1 -1
  1004. package/dist/components/ui/toggle.d.ts +1 -1
  1005. package/dist/components/ui/trace.js +1 -1
  1006. package/dist/components/ui/trace.js.map +1 -1
  1007. package/dist/{constants-CggcOqef.js → constants-DfbfCDSg.js} +3 -6
  1008. package/dist/constants-DfbfCDSg.js.map +1 -0
  1009. package/dist/{context-BrGWrRwa.d.ts → context-4tt2I7Qm.d.ts} +14 -4
  1010. package/dist/context-4tt2I7Qm.d.ts.map +1 -0
  1011. package/dist/{context-DWHy9EUW.js → context-B3BNuwGu.js} +8 -25
  1012. package/dist/context-B3BNuwGu.js.map +1 -0
  1013. package/dist/{context-BEYROlTB.d.ts → context-BFNkGCGz.d.ts} +18 -14
  1014. package/dist/context-BFNkGCGz.d.ts.map +1 -0
  1015. package/dist/{context-r3QNWoPh.js → context-BG1Wzdnj.js} +6 -10
  1016. package/dist/context-BG1Wzdnj.js.map +1 -0
  1017. package/dist/{context-Dae38FV_.js → context-Bx-OaIL8.js} +5 -9
  1018. package/dist/context-Bx-OaIL8.js.map +1 -0
  1019. package/dist/context-C92iQeLO.js.map +1 -1
  1020. package/dist/{context-CmexbpIK.js → context-C9LHO4MN.js} +12 -27
  1021. package/dist/context-C9LHO4MN.js.map +1 -0
  1022. package/dist/context-CHXHCbuu.js.map +1 -1
  1023. package/dist/{context-C5DO1oe1.js → context-CIzAPhXA.js} +37 -99
  1024. package/dist/context-CIzAPhXA.js.map +1 -0
  1025. package/dist/{context-B5NItr9C.d.ts → context-CP3spicY.d.ts} +20 -15
  1026. package/dist/context-CP3spicY.d.ts.map +1 -0
  1027. package/dist/{context-CwSk1WZR.js → context-Cg1VelQJ.js} +9 -25
  1028. package/dist/context-Cg1VelQJ.js.map +1 -0
  1029. package/dist/{context-C1Z_5vew.d.ts → context-Cyjsttyl.d.ts} +15 -4
  1030. package/dist/context-Cyjsttyl.d.ts.map +1 -0
  1031. package/dist/{context-CgRa89Bq.d.ts → context-D7eAawR3.d.ts} +12 -7
  1032. package/dist/context-D7eAawR3.d.ts.map +1 -0
  1033. package/dist/{context-BpHX6J1T.js → context-DDoVOc0D.js} +8 -25
  1034. package/dist/context-DDoVOc0D.js.map +1 -0
  1035. package/dist/context-DR6jkfea.js +11 -0
  1036. package/dist/context-DR6jkfea.js.map +1 -0
  1037. package/dist/{context-BLjAwZ5V.js → context-DcJtX6ht.js} +18 -95
  1038. package/dist/context-DcJtX6ht.js.map +1 -0
  1039. package/dist/{context-Cr2SLhVi.js → context-Dg48xMuG.js} +3 -7
  1040. package/dist/context-Dg48xMuG.js.map +1 -0
  1041. package/dist/context-DnM-b9yO.js +23 -0
  1042. package/dist/context-DnM-b9yO.js.map +1 -0
  1043. package/dist/context-DtFeYksF.d.ts +28 -0
  1044. package/dist/context-DtFeYksF.d.ts.map +1 -0
  1045. package/dist/{context-C8M88I1F.js → context-cRAJSFxf.js} +4 -8
  1046. package/dist/context-cRAJSFxf.js.map +1 -0
  1047. package/dist/{copy-menu-BizTEv8v.js → copy-menu-Di77fZ9p.js} +6 -6
  1048. package/dist/copy-menu-Di77fZ9p.js.map +1 -0
  1049. package/dist/{crash-parts-Dg5WC8u4.js → crash-parts-BkrZ6iBE.js} +2 -2
  1050. package/dist/crash-parts-BkrZ6iBE.js.map +1 -0
  1051. package/dist/date-utils-DVDYcEA_.js +35 -0
  1052. package/dist/date-utils-DVDYcEA_.js.map +1 -0
  1053. package/dist/{ease-DnPhwGe6.d.ts → ease-D_-bhUDt.d.ts} +13 -6
  1054. package/dist/ease-D_-bhUDt.d.ts.map +1 -0
  1055. package/dist/formats-ColrL9Eg.js +58 -0
  1056. package/dist/formats-ColrL9Eg.js.map +1 -0
  1057. package/dist/{game-parts-hATtqY3s.d.ts → game-parts-B635BoSe.d.ts} +4 -4
  1058. package/dist/{game-parts-hATtqY3s.d.ts.map → game-parts-B635BoSe.d.ts.map} +1 -1
  1059. package/dist/hooks/use-controllable.d.ts +10 -0
  1060. package/dist/hooks/use-controllable.d.ts.map +1 -0
  1061. package/dist/hooks/use-controllable.js +39 -0
  1062. package/dist/hooks/use-controllable.js.map +1 -0
  1063. package/dist/hooks/use-copy.d.ts +16 -0
  1064. package/dist/hooks/use-copy.d.ts.map +1 -0
  1065. package/dist/hooks/use-copy.js +36 -0
  1066. package/dist/hooks/use-copy.js.map +1 -0
  1067. package/dist/hooks/use-dismiss.d.ts +25 -5
  1068. package/dist/hooks/use-dismiss.d.ts.map +1 -1
  1069. package/dist/hooks/use-dismiss.js +39 -24
  1070. package/dist/hooks/use-dismiss.js.map +1 -1
  1071. package/dist/hooks/use-focus-trap.d.ts +4 -3
  1072. package/dist/hooks/use-focus-trap.d.ts.map +1 -1
  1073. package/dist/hooks/use-focus-trap.js +25 -37
  1074. package/dist/hooks/use-focus-trap.js.map +1 -1
  1075. package/dist/hooks/use-highlighted-code.d.ts +1 -1
  1076. package/dist/hooks/use-highlighted-code.d.ts.map +1 -1
  1077. package/dist/hooks/use-hover-capable.d.ts +1 -1
  1078. package/dist/hooks/use-hover-capable.js +1 -1
  1079. package/dist/hooks/use-hover-capable.js.map +1 -1
  1080. package/dist/hooks/use-hover-gesture.d.ts +5 -5
  1081. package/dist/hooks/use-hover-gesture.js +5 -5
  1082. package/dist/hooks/use-hover-gesture.js.map +1 -1
  1083. package/dist/hooks/use-listbox.d.ts +1 -0
  1084. package/dist/hooks/use-listbox.js +2 -1
  1085. package/dist/hooks/use-listbox.js.map +1 -1
  1086. package/dist/hooks/use-modal-scope.js +22 -26
  1087. package/dist/hooks/use-modal-scope.js.map +1 -1
  1088. package/dist/hooks/use-on-open.d.ts +3 -3
  1089. package/dist/hooks/use-on-open.js +3 -3
  1090. package/dist/hooks/use-on-open.js.map +1 -1
  1091. package/dist/hooks/use-row-cursor.d.ts +2 -2
  1092. package/dist/hooks/use-row-cursor.js +2 -2
  1093. package/dist/hooks/use-row-cursor.js.map +1 -1
  1094. package/dist/hooks/use-slider.d.ts +13 -3
  1095. package/dist/hooks/use-slider.d.ts.map +1 -1
  1096. package/dist/hooks/use-slider.js +23 -4
  1097. package/dist/hooks/use-slider.js.map +1 -1
  1098. package/dist/hooks/use-status-open.d.ts +26 -0
  1099. package/dist/hooks/use-status-open.d.ts.map +1 -0
  1100. package/dist/hooks/use-status-open.js +43 -0
  1101. package/dist/hooks/use-status-open.js.map +1 -0
  1102. package/dist/hooks/use-tap-gesture.d.ts +3 -3
  1103. package/dist/hooks/use-tap-gesture.js +3 -3
  1104. package/dist/hooks/use-tap-gesture.js.map +1 -1
  1105. package/dist/lib/audio-context.d.ts +27 -1
  1106. package/dist/lib/audio-context.d.ts.map +1 -1
  1107. package/dist/lib/audio-context.js +61 -2
  1108. package/dist/lib/audio-context.js.map +1 -1
  1109. package/dist/lib/book-sounds.d.ts.map +1 -1
  1110. package/dist/lib/book-sounds.js +8 -9
  1111. package/dist/lib/book-sounds.js.map +1 -1
  1112. package/dist/lib/color.d.ts +29 -0
  1113. package/dist/lib/color.d.ts.map +1 -0
  1114. package/dist/lib/color.js +93 -0
  1115. package/dist/lib/color.js.map +1 -0
  1116. package/dist/lib/command-search.d.ts +7 -1
  1117. package/dist/lib/command-search.d.ts.map +1 -1
  1118. package/dist/lib/command-search.js +42 -19
  1119. package/dist/lib/command-search.js.map +1 -1
  1120. package/dist/lib/ease.d.ts +2 -2
  1121. package/dist/lib/ease.js +12 -5
  1122. package/dist/lib/ease.js.map +1 -1
  1123. package/dist/lib/focusable.d.ts +10 -0
  1124. package/dist/lib/focusable.d.ts.map +1 -1
  1125. package/dist/lib/focusable.js +31 -1
  1126. package/dist/lib/focusable.js.map +1 -1
  1127. package/dist/lib/game-sounds.d.ts.map +1 -1
  1128. package/dist/lib/game-sounds.js +7 -14
  1129. package/dist/lib/game-sounds.js.map +1 -1
  1130. package/dist/lib/layers.d.ts +24 -0
  1131. package/dist/lib/layers.d.ts.map +1 -0
  1132. package/dist/lib/layers.js +47 -0
  1133. package/dist/lib/layers.js.map +1 -0
  1134. package/dist/lib/merge-refs.d.ts +6 -0
  1135. package/dist/lib/merge-refs.d.ts.map +1 -0
  1136. package/dist/lib/merge-refs.js +15 -0
  1137. package/dist/lib/merge-refs.js.map +1 -0
  1138. package/dist/lib/presence-gate.d.ts +2 -2
  1139. package/dist/lib/presence-gate.js.map +1 -1
  1140. package/dist/lib/scroll-lock.d.ts +13 -0
  1141. package/dist/lib/scroll-lock.d.ts.map +1 -0
  1142. package/dist/lib/scroll-lock.js +59 -0
  1143. package/dist/lib/scroll-lock.js.map +1 -0
  1144. package/dist/lib/sound.d.ts +30 -0
  1145. package/dist/lib/sound.d.ts.map +1 -0
  1146. package/dist/lib/sound.js +95 -0
  1147. package/dist/lib/sound.js.map +1 -0
  1148. package/dist/lib/sounds/bell.d.ts +4 -0
  1149. package/dist/lib/sounds/bell.d.ts.map +1 -0
  1150. package/dist/lib/sounds/bell.js +36 -0
  1151. package/dist/lib/sounds/bell.js.map +1 -0
  1152. package/dist/lib/sounds/bubble.d.ts +4 -0
  1153. package/dist/lib/sounds/bubble.d.ts.map +1 -0
  1154. package/dist/lib/sounds/bubble.js +27 -0
  1155. package/dist/lib/sounds/bubble.js.map +1 -0
  1156. package/dist/lib/sounds/burst.d.ts +4 -0
  1157. package/dist/lib/sounds/burst.d.ts.map +1 -0
  1158. package/dist/lib/sounds/burst.js +45 -0
  1159. package/dist/lib/sounds/burst.js.map +1 -0
  1160. package/dist/lib/sounds/buzz.d.ts +4 -0
  1161. package/dist/lib/sounds/buzz.d.ts.map +1 -0
  1162. package/dist/lib/sounds/buzz.js +26 -0
  1163. package/dist/lib/sounds/buzz.js.map +1 -0
  1164. package/dist/lib/sounds/camera.d.ts +4 -0
  1165. package/dist/lib/sounds/camera.d.ts.map +1 -0
  1166. package/dist/lib/sounds/camera.js +40 -0
  1167. package/dist/lib/sounds/camera.js.map +1 -0
  1168. package/dist/lib/sounds/check.d.ts +4 -0
  1169. package/dist/lib/sounds/check.d.ts.map +1 -0
  1170. package/dist/lib/sounds/check.js +40 -0
  1171. package/dist/lib/sounds/check.js.map +1 -0
  1172. package/dist/lib/sounds/chime.d.ts +4 -0
  1173. package/dist/lib/sounds/chime.d.ts.map +1 -0
  1174. package/dist/lib/sounds/chime.js +33 -0
  1175. package/dist/lib/sounds/chime.js.map +1 -0
  1176. package/dist/lib/sounds/close.d.ts +4 -0
  1177. package/dist/lib/sounds/close.d.ts.map +1 -0
  1178. package/dist/lib/sounds/close.js +36 -0
  1179. package/dist/lib/sounds/close.js.map +1 -0
  1180. package/dist/lib/sounds/coin.d.ts +4 -0
  1181. package/dist/lib/sounds/coin.d.ts.map +1 -0
  1182. package/dist/lib/sounds/coin.js +31 -0
  1183. package/dist/lib/sounds/coin.js.map +1 -0
  1184. package/dist/lib/sounds/collapse.d.ts +4 -0
  1185. package/dist/lib/sounds/collapse.d.ts.map +1 -0
  1186. package/dist/lib/sounds/collapse.js +41 -0
  1187. package/dist/lib/sounds/collapse.js.map +1 -0
  1188. package/dist/lib/sounds/connect.d.ts +4 -0
  1189. package/dist/lib/sounds/connect.d.ts.map +1 -0
  1190. package/dist/lib/sounds/connect.js +39 -0
  1191. package/dist/lib/sounds/connect.js.map +1 -0
  1192. package/dist/lib/sounds/copy.d.ts +4 -0
  1193. package/dist/lib/sounds/copy.d.ts.map +1 -0
  1194. package/dist/lib/sounds/copy.js +39 -0
  1195. package/dist/lib/sounds/copy.js.map +1 -0
  1196. package/dist/lib/sounds/delete.d.ts +4 -0
  1197. package/dist/lib/sounds/delete.d.ts.map +1 -0
  1198. package/dist/lib/sounds/delete.js +39 -0
  1199. package/dist/lib/sounds/delete.js.map +1 -0
  1200. package/dist/lib/sounds/disconnect.d.ts +4 -0
  1201. package/dist/lib/sounds/disconnect.d.ts.map +1 -0
  1202. package/dist/lib/sounds/disconnect.js +39 -0
  1203. package/dist/lib/sounds/disconnect.js.map +1 -0
  1204. package/dist/lib/sounds/dismiss.d.ts +4 -0
  1205. package/dist/lib/sounds/dismiss.d.ts.map +1 -0
  1206. package/dist/lib/sounds/dismiss.js +27 -0
  1207. package/dist/lib/sounds/dismiss.js.map +1 -0
  1208. package/dist/lib/sounds/dock.d.ts +4 -0
  1209. package/dist/lib/sounds/dock.d.ts.map +1 -0
  1210. package/dist/lib/sounds/dock.js +32 -0
  1211. package/dist/lib/sounds/dock.js.map +1 -0
  1212. package/dist/lib/sounds/drop.d.ts +4 -0
  1213. package/dist/lib/sounds/drop.d.ts.map +1 -0
  1214. package/dist/lib/sounds/drop.js +48 -0
  1215. package/dist/lib/sounds/drop.js.map +1 -0
  1216. package/dist/lib/sounds/engine.d.ts +142 -0
  1217. package/dist/lib/sounds/engine.d.ts.map +1 -0
  1218. package/dist/lib/sounds/engine.js +210 -0
  1219. package/dist/lib/sounds/engine.js.map +1 -0
  1220. package/dist/lib/sounds/error.d.ts +4 -0
  1221. package/dist/lib/sounds/error.d.ts.map +1 -0
  1222. package/dist/lib/sounds/error.js +51 -0
  1223. package/dist/lib/sounds/error.js.map +1 -0
  1224. package/dist/lib/sounds/expand.d.ts +4 -0
  1225. package/dist/lib/sounds/expand.d.ts.map +1 -0
  1226. package/dist/lib/sounds/expand.js +28 -0
  1227. package/dist/lib/sounds/expand.js.map +1 -0
  1228. package/dist/lib/sounds/heart.d.ts +4 -0
  1229. package/dist/lib/sounds/heart.d.ts.map +1 -0
  1230. package/dist/lib/sounds/heart.js +39 -0
  1231. package/dist/lib/sounds/heart.js.map +1 -0
  1232. package/dist/lib/sounds/lift.d.ts +4 -0
  1233. package/dist/lib/sounds/lift.d.ts.map +1 -0
  1234. package/dist/lib/sounds/lift.js +34 -0
  1235. package/dist/lib/sounds/lift.js.map +1 -0
  1236. package/dist/lib/sounds/lock.d.ts +4 -0
  1237. package/dist/lib/sounds/lock.d.ts.map +1 -0
  1238. package/dist/lib/sounds/lock.js +32 -0
  1239. package/dist/lib/sounds/lock.js.map +1 -0
  1240. package/dist/lib/sounds/navigate.d.ts +4 -0
  1241. package/dist/lib/sounds/navigate.d.ts.map +1 -0
  1242. package/dist/lib/sounds/navigate.js +36 -0
  1243. package/dist/lib/sounds/navigate.js.map +1 -0
  1244. package/dist/lib/sounds/notify.d.ts +4 -0
  1245. package/dist/lib/sounds/notify.d.ts.map +1 -0
  1246. package/dist/lib/sounds/notify.js +31 -0
  1247. package/dist/lib/sounds/notify.js.map +1 -0
  1248. package/dist/lib/sounds/open.d.ts +4 -0
  1249. package/dist/lib/sounds/open.d.ts.map +1 -0
  1250. package/dist/lib/sounds/open.js +36 -0
  1251. package/dist/lib/sounds/open.js.map +1 -0
  1252. package/dist/lib/sounds/ping.d.ts +4 -0
  1253. package/dist/lib/sounds/ping.d.ts.map +1 -0
  1254. package/dist/lib/sounds/ping.js +30 -0
  1255. package/dist/lib/sounds/ping.js.map +1 -0
  1256. package/dist/lib/sounds/pop.d.ts +4 -0
  1257. package/dist/lib/sounds/pop.d.ts.map +1 -0
  1258. package/dist/lib/sounds/pop.js +27 -0
  1259. package/dist/lib/sounds/pop.js.map +1 -0
  1260. package/dist/lib/sounds/press.d.ts +4 -0
  1261. package/dist/lib/sounds/press.d.ts.map +1 -0
  1262. package/dist/lib/sounds/press.js +40 -0
  1263. package/dist/lib/sounds/press.js.map +1 -0
  1264. package/dist/lib/sounds/receive.d.ts +4 -0
  1265. package/dist/lib/sounds/receive.d.ts.map +1 -0
  1266. package/dist/lib/sounds/receive.js +39 -0
  1267. package/dist/lib/sounds/receive.js.map +1 -0
  1268. package/dist/lib/sounds/refresh.d.ts +4 -0
  1269. package/dist/lib/sounds/refresh.d.ts.map +1 -0
  1270. package/dist/lib/sounds/refresh.js +34 -0
  1271. package/dist/lib/sounds/refresh.js.map +1 -0
  1272. package/dist/lib/sounds/reveal.d.ts +4 -0
  1273. package/dist/lib/sounds/reveal.d.ts.map +1 -0
  1274. package/dist/lib/sounds/reveal.js +34 -0
  1275. package/dist/lib/sounds/reveal.js.map +1 -0
  1276. package/dist/lib/sounds/select.d.ts +4 -0
  1277. package/dist/lib/sounds/select.d.ts.map +1 -0
  1278. package/dist/lib/sounds/select.js +32 -0
  1279. package/dist/lib/sounds/select.js.map +1 -0
  1280. package/dist/lib/sounds/send.d.ts +4 -0
  1281. package/dist/lib/sounds/send.d.ts.map +1 -0
  1282. package/dist/lib/sounds/send.js +35 -0
  1283. package/dist/lib/sounds/send.js.map +1 -0
  1284. package/dist/lib/sounds/shutter.d.ts +4 -0
  1285. package/dist/lib/sounds/shutter.d.ts.map +1 -0
  1286. package/dist/lib/sounds/shutter.js +40 -0
  1287. package/dist/lib/sounds/shutter.js.map +1 -0
  1288. package/dist/lib/sounds/snap.d.ts +4 -0
  1289. package/dist/lib/sounds/snap.d.ts.map +1 -0
  1290. package/dist/lib/sounds/snap.js +33 -0
  1291. package/dist/lib/sounds/snap.js.map +1 -0
  1292. package/dist/lib/sounds/star.d.ts +4 -0
  1293. package/dist/lib/sounds/star.d.ts.map +1 -0
  1294. package/dist/lib/sounds/star.js +38 -0
  1295. package/dist/lib/sounds/star.js.map +1 -0
  1296. package/dist/lib/sounds/success.d.ts +4 -0
  1297. package/dist/lib/sounds/success.d.ts.map +1 -0
  1298. package/dist/lib/sounds/success.js +39 -0
  1299. package/dist/lib/sounds/success.js.map +1 -0
  1300. package/dist/lib/sounds/swipe.d.ts +4 -0
  1301. package/dist/lib/sounds/swipe.d.ts.map +1 -0
  1302. package/dist/lib/sounds/swipe.js +29 -0
  1303. package/dist/lib/sounds/swipe.js.map +1 -0
  1304. package/dist/lib/sounds/switch.d.ts +4 -0
  1305. package/dist/lib/sounds/switch.d.ts.map +1 -0
  1306. package/dist/lib/sounds/switch.js +40 -0
  1307. package/dist/lib/sounds/switch.js.map +1 -0
  1308. package/dist/lib/sounds/tap.d.ts +4 -0
  1309. package/dist/lib/sounds/tap.d.ts.map +1 -0
  1310. package/dist/lib/sounds/tap.js +33 -0
  1311. package/dist/lib/sounds/tap.js.map +1 -0
  1312. package/dist/lib/sounds/tick.d.ts +4 -0
  1313. package/dist/lib/sounds/tick.d.ts.map +1 -0
  1314. package/dist/lib/sounds/tick.js +26 -0
  1315. package/dist/lib/sounds/tick.js.map +1 -0
  1316. package/dist/lib/sounds/timer.d.ts +4 -0
  1317. package/dist/lib/sounds/timer.d.ts.map +1 -0
  1318. package/dist/lib/sounds/timer.js +26 -0
  1319. package/dist/lib/sounds/timer.js.map +1 -0
  1320. package/dist/lib/sounds/toggle.d.ts +6 -0
  1321. package/dist/lib/sounds/toggle.d.ts.map +1 -0
  1322. package/dist/lib/sounds/toggle.js +79 -0
  1323. package/dist/lib/sounds/toggle.js.map +1 -0
  1324. package/dist/lib/sounds/trash.d.ts +4 -0
  1325. package/dist/lib/sounds/trash.d.ts.map +1 -0
  1326. package/dist/lib/sounds/trash.js +40 -0
  1327. package/dist/lib/sounds/trash.js.map +1 -0
  1328. package/dist/lib/sounds/type.d.ts +4 -0
  1329. package/dist/lib/sounds/type.d.ts.map +1 -0
  1330. package/dist/lib/sounds/type.js +35 -0
  1331. package/dist/lib/sounds/type.js.map +1 -0
  1332. package/dist/lib/sounds/unlock.d.ts +4 -0
  1333. package/dist/lib/sounds/unlock.d.ts.map +1 -0
  1334. package/dist/lib/sounds/unlock.js +41 -0
  1335. package/dist/lib/sounds/unlock.js.map +1 -0
  1336. package/dist/lib/sounds/warning.d.ts +4 -0
  1337. package/dist/lib/sounds/warning.d.ts.map +1 -0
  1338. package/dist/lib/sounds/warning.js +29 -0
  1339. package/dist/lib/sounds/warning.js.map +1 -0
  1340. package/dist/lib/sounds/whisper.d.ts +4 -0
  1341. package/dist/lib/sounds/whisper.d.ts.map +1 -0
  1342. package/dist/lib/sounds/whisper.js +27 -0
  1343. package/dist/lib/sounds/whisper.js.map +1 -0
  1344. package/dist/lib/text-shimmer.d.ts +6 -0
  1345. package/dist/lib/text-shimmer.d.ts.map +1 -1
  1346. package/dist/lib/text-shimmer.js +7 -1
  1347. package/dist/lib/text-shimmer.js.map +1 -1
  1348. package/dist/lib/tick-sound.d.ts.map +1 -1
  1349. package/dist/lib/tick-sound.js +8 -11
  1350. package/dist/lib/tick-sound.js.map +1 -1
  1351. package/dist/lib/touch.d.ts +10 -10
  1352. package/dist/lib/touch.js +10 -10
  1353. package/dist/lib/touch.js.map +1 -1
  1354. package/dist/listbox-panel-BX74YCzI.d.ts +31 -0
  1355. package/dist/listbox-panel-BX74YCzI.d.ts.map +1 -0
  1356. package/dist/menu-button-CbEYps6k.d.ts +29 -0
  1357. package/dist/menu-button-CbEYps6k.d.ts.map +1 -0
  1358. package/dist/menu-sub-button-NgS4JryG.d.ts +25 -0
  1359. package/dist/menu-sub-button-NgS4JryG.d.ts.map +1 -0
  1360. package/dist/messages-D0lxgjNm.d.ts +31 -0
  1361. package/dist/messages-D0lxgjNm.d.ts.map +1 -0
  1362. package/dist/{model-Cqi9KKo1.d.ts → model-CHHE1lHQ.d.ts} +5 -1
  1363. package/dist/{model-Cqi9KKo1.d.ts.map → model-CHHE1lHQ.d.ts.map} +1 -1
  1364. package/dist/{model-DP6FsG__.d.ts → model-D6sI_4m9.d.ts} +5 -1
  1365. package/dist/model-D6sI_4m9.d.ts.map +1 -0
  1366. package/dist/{model-B_LLKNOs.d.ts → model-DUQnYLRU.d.ts} +3 -1
  1367. package/dist/model-DUQnYLRU.d.ts.map +1 -0
  1368. package/dist/{model-Cbzktxjx.d.ts → model-Dafi-gx6.d.ts} +2 -1
  1369. package/dist/model-Dafi-gx6.d.ts.map +1 -0
  1370. package/dist/motion-1TeD2tw9.js +67 -0
  1371. package/dist/motion-1TeD2tw9.js.map +1 -0
  1372. package/dist/placement-BRE79jXm.d.ts +4 -0
  1373. package/dist/placement-BRE79jXm.d.ts.map +1 -0
  1374. package/dist/placement-Cg-Y5tLI.js +74 -0
  1375. package/dist/placement-Cg-Y5tLI.js.map +1 -0
  1376. package/dist/{plot-B2aPWHib.js → plot-CSTtMo6j.js} +3 -3
  1377. package/dist/{plot-B2aPWHib.js.map → plot-CSTtMo6j.js.map} +1 -1
  1378. package/dist/popover-morph-CWb4N9ux.d.ts +55 -0
  1379. package/dist/popover-morph-CWb4N9ux.d.ts.map +1 -0
  1380. package/dist/{positioner-DY1vB4rF.js → positioner-CFR4mJg6.js} +112 -4
  1381. package/dist/positioner-CFR4mJg6.js.map +1 -0
  1382. package/dist/resource-row-DByzjie0.js +290 -0
  1383. package/dist/resource-row-DByzjie0.js.map +1 -0
  1384. package/dist/root-C1n8-uIA.js +420 -0
  1385. package/dist/root-C1n8-uIA.js.map +1 -0
  1386. package/dist/{use-inspection-DWk6TdY9.js → scale-JwdKsMkj.js} +2 -55
  1387. package/dist/scale-JwdKsMkj.js.map +1 -0
  1388. package/dist/theme.css +98 -4
  1389. package/dist/{tooltip-UI0lMGya.d.ts → tooltip-CoAbjn9I.d.ts} +9 -1
  1390. package/dist/tooltip-CoAbjn9I.d.ts.map +1 -0
  1391. package/dist/{tooltip-CJccRGy9.d.ts → tooltip-CwsBzl7m.d.ts} +12 -3
  1392. package/dist/tooltip-CwsBzl7m.d.ts.map +1 -0
  1393. package/dist/{tooltip-CMtIWcUY.d.ts → tooltip-DI79u-1V.d.ts} +11 -2
  1394. package/dist/tooltip-DI79u-1V.d.ts.map +1 -0
  1395. package/dist/{tooltip-jQICwV_k.d.ts → tooltip-DPci40hM.d.ts} +9 -1
  1396. package/dist/tooltip-DPci40hM.d.ts.map +1 -0
  1397. package/dist/{tooltip-DuPE_3Gi.d.ts → tooltip-TdY1OH4j.d.ts} +9 -2
  1398. package/dist/tooltip-TdY1OH4j.d.ts.map +1 -0
  1399. package/dist/{tooltip-BUkacvMl.js → tooltip-eecPhLtC.js} +106 -48
  1400. package/dist/tooltip-eecPhLtC.js.map +1 -0
  1401. package/dist/types-BhZ0FwDi.d.ts +33 -0
  1402. package/dist/types-BhZ0FwDi.d.ts.map +1 -0
  1403. package/dist/types-BnHpfLje.d.ts +111 -0
  1404. package/dist/types-BnHpfLje.d.ts.map +1 -0
  1405. package/dist/types-COoUai3R.d.ts +64 -0
  1406. package/dist/types-COoUai3R.d.ts.map +1 -0
  1407. package/dist/{types-DJ8z6gW8.d.ts → types-CbBZy33k.d.ts} +3 -1
  1408. package/dist/{types-DJ8z6gW8.d.ts.map → types-CbBZy33k.d.ts.map} +1 -1
  1409. package/dist/{types-C_v1N4fH.d.ts → types-ClKnPGuP.d.ts} +18 -4
  1410. package/dist/types-ClKnPGuP.d.ts.map +1 -0
  1411. package/dist/types-DPKILbI9.d.ts +37 -0
  1412. package/dist/types-DPKILbI9.d.ts.map +1 -0
  1413. package/dist/types-Dbiy485_.d.ts +114 -0
  1414. package/dist/types-Dbiy485_.d.ts.map +1 -0
  1415. package/dist/types-DtUnNprK.d.ts +53 -0
  1416. package/dist/types-DtUnNprK.d.ts.map +1 -0
  1417. package/dist/{use-crash-game-DiGujbfH.d.ts → use-crash-game-C6JPLvAH.d.ts} +5 -2
  1418. package/dist/{use-crash-game-DiGujbfH.d.ts.map → use-crash-game-C6JPLvAH.d.ts.map} +1 -1
  1419. package/dist/use-filtered-options-3TcVsHzV.js +167 -0
  1420. package/dist/use-filtered-options-3TcVsHzV.js.map +1 -0
  1421. package/dist/use-filtered-options-BbXqmJmZ.d.ts +14 -0
  1422. package/dist/use-filtered-options-BbXqmJmZ.d.ts.map +1 -0
  1423. package/dist/use-inspection-LoyxxJk8.js +31 -0
  1424. package/dist/use-inspection-LoyxxJk8.js.map +1 -0
  1425. package/dist/use-menu-navigation-B17_iK_B.js +57 -0
  1426. package/dist/use-menu-navigation-B17_iK_B.js.map +1 -0
  1427. package/dist/{use-position-B1lYvN8D.d.ts → use-position-ac-sSZRY.d.ts} +3 -1
  1428. package/dist/use-position-ac-sSZRY.d.ts.map +1 -0
  1429. package/dist/use-width-DZex74TT.js +45 -0
  1430. package/dist/use-width-DZex74TT.js.map +1 -0
  1431. package/dist/utils-f7_cAAwc.js +55 -0
  1432. package/dist/utils-f7_cAAwc.js.map +1 -0
  1433. package/package.json +23 -18
  1434. package/dist/components/agents/agent-activity/index.d.ts.map +0 -1
  1435. package/dist/components/agents/agent-activity/index.js.map +0 -1
  1436. package/dist/components/agents/approval-card/index.d.ts.map +0 -1
  1437. package/dist/components/agents/approval-card/index.js.map +0 -1
  1438. package/dist/components/motion/animated-sidebar.js.map +0 -1
  1439. package/dist/components/motion/animated-toast-stack.d.ts.map +0 -1
  1440. package/dist/components/motion/animated-toast-stack.js.map +0 -1
  1441. package/dist/components/motion/availability-scheduler/index.d.ts.map +0 -1
  1442. package/dist/components/motion/availability-scheduler/index.js.map +0 -1
  1443. package/dist/components/motion/button/index.js +0 -6
  1444. package/dist/components/motion/popover-morph.d.ts.map +0 -1
  1445. package/dist/components/motion/table/index.d.ts.map +0 -1
  1446. package/dist/components/motion/table/index.js.map +0 -1
  1447. package/dist/components/motion/wallet-card/index.d.ts.map +0 -1
  1448. package/dist/components/motion/wallet-card/index.js.map +0 -1
  1449. package/dist/constants-CggcOqef.js.map +0 -1
  1450. package/dist/context-B5NItr9C.d.ts.map +0 -1
  1451. package/dist/context-BEYROlTB.d.ts.map +0 -1
  1452. package/dist/context-BLjAwZ5V.js.map +0 -1
  1453. package/dist/context-BpHX6J1T.js.map +0 -1
  1454. package/dist/context-BrGWrRwa.d.ts.map +0 -1
  1455. package/dist/context-C1Z_5vew.d.ts.map +0 -1
  1456. package/dist/context-C5DO1oe1.js.map +0 -1
  1457. package/dist/context-C8M88I1F.js.map +0 -1
  1458. package/dist/context-CgRa89Bq.d.ts.map +0 -1
  1459. package/dist/context-CmexbpIK.js.map +0 -1
  1460. package/dist/context-Cr2SLhVi.js.map +0 -1
  1461. package/dist/context-CwSk1WZR.js.map +0 -1
  1462. package/dist/context-DWHy9EUW.js.map +0 -1
  1463. package/dist/context-Dae38FV_.js.map +0 -1
  1464. package/dist/context-r3QNWoPh.js.map +0 -1
  1465. package/dist/copy-menu-BizTEv8v.js.map +0 -1
  1466. package/dist/crash-parts-Dg5WC8u4.js.map +0 -1
  1467. package/dist/ease-DnPhwGe6.d.ts.map +0 -1
  1468. package/dist/model-B_LLKNOs.d.ts.map +0 -1
  1469. package/dist/model-Cbzktxjx.d.ts.map +0 -1
  1470. package/dist/model-DP6FsG__.d.ts.map +0 -1
  1471. package/dist/positioner-DY1vB4rF.js.map +0 -1
  1472. package/dist/tooltip-BUkacvMl.js.map +0 -1
  1473. package/dist/tooltip-CJccRGy9.d.ts.map +0 -1
  1474. package/dist/tooltip-CMtIWcUY.d.ts.map +0 -1
  1475. package/dist/tooltip-DuPE_3Gi.d.ts.map +0 -1
  1476. package/dist/tooltip-UI0lMGya.d.ts.map +0 -1
  1477. package/dist/tooltip-jQICwV_k.d.ts.map +0 -1
  1478. package/dist/types-C1WFGMvf.d.ts +0 -34
  1479. package/dist/types-C1WFGMvf.d.ts.map +0 -1
  1480. package/dist/types-C_v1N4fH.d.ts.map +0 -1
  1481. package/dist/types-DROZkngo.d.ts +0 -20
  1482. package/dist/types-DROZkngo.d.ts.map +0 -1
  1483. package/dist/use-active-option-DbxnIM2n.js +0 -85
  1484. package/dist/use-active-option-DbxnIM2n.js.map +0 -1
  1485. package/dist/use-inspection-DWk6TdY9.js.map +0 -1
  1486. package/dist/use-position-B1lYvN8D.d.ts.map +0 -1
  1487. package/dist/use-width-Dmy1eT1-.js +0 -23
  1488. package/dist/use-width-Dmy1eT1-.js.map +0 -1
@@ -14,6 +14,7 @@ export interface PullToRefreshProps {
14
14
  children: ReactNode;
15
15
  /** Keeps the indicator active while an externally managed refresh runs. */
16
16
  refreshing?: boolean;
17
+ /** Turns off the pull gesture. Default: false */
17
18
  disabled?: boolean;
18
19
  /** Resisted pull distance in pixels required to refresh. */
19
20
  threshold?: number;
@@ -21,14 +22,21 @@ export interface PullToRefreshProps {
21
22
  maxPull?: number;
22
23
  /** Content offset in pixels while refreshing. */
23
24
  holdDistance?: number;
25
+ /** Indicator text while pulling, short of the threshold. Default: "Pull to refresh" */
24
26
  pullingLabel?: ReactNode;
27
+ /** Indicator text once past the threshold. Default: "Release to refresh" */
25
28
  releaseLabel?: ReactNode;
29
+ /** Indicator text while refreshing. Default: "Refreshing" */
26
30
  refreshingLabel?: ReactNode;
31
+ /** Accessible name for the scroll region. Default: "Refreshable content" */
27
32
  ariaLabel?: string;
28
33
  /** Override any built-in string. */
29
34
  labels?: Partial<PullToRefreshMessages>;
35
+ /** Classes merged onto the scroll container. */
30
36
  className?: string;
37
+ /** Classes merged onto the element that wraps the children and moves with the pull. */
31
38
  contentClassName?: string;
39
+ /** Classes merged onto the indicator at the top. */
32
40
  indicatorClassName?: string;
33
41
  }
34
42
  export declare function PullToRefresh({ onRefresh, children, refreshing, disabled, threshold, maxPull, holdDistance, pullingLabel, releaseLabel, refreshingLabel, ariaLabel, labels, className, contentClassName, indicatorClassName }: PullToRefreshProps): import("react").JSX.Element;
@@ -1 +1 @@
1
- {"version":3,"file":"pull-to-refresh.d.ts","names":[],"sources":["../../../src/components/motion/pull-to-refresh.tsx"],"mappings":";;qBA2Ba;;;;;;YAOD,+BAA+B;YAE/B;iBAEK;;EAEf,wBAAwB;EACxB,UAAU;;EAEV;EACA;;EAEA;;EAEA;;EAEA;EACA,eAAe;EACf,eAAe;EACf,kBAAkB;EAClB;;EAEA,SAAS,QAAQ;EACjB;EACA;EACA;;wBAsJc,gBACd,WACA,UACA,YACA,UACA,WACA,SACA,cACA,cACA,cACA,iBACA,WACA,QACA,WACA,kBACA,sBACC,qCAAkB,IAAA"}
1
+ {"version":3,"file":"pull-to-refresh.d.ts","names":[],"sources":["../../../src/components/motion/pull-to-refresh.tsx"],"mappings":";;qBA2Ba;;;;;;YAOD,+BAA+B;YAE/B;iBAEK;;EAEf,wBAAwB;EACxB,UAAU;;EAEV;;EAEA;;EAEA;;EAEA;;EAEA;;EAEA,eAAe;;EAEf,eAAe;;EAEf,kBAAkB;;EAElB;;EAEA,SAAS,QAAQ;;EAEjB;;EAEA;;EAEA;;wBAsJc,gBACd,WACA,UACA,YACA,UACA,WACA,SACA,cACA,cACA,cACA,iBACA,WACA,QACA,WACA,kBACA,sBACC,qCAAkB,IAAA"}
@@ -359,7 +359,7 @@ function PullToRefresh({ onRefresh, children, refreshing = false, disabled = fal
359
359
  opacity: indicatorOpacity,
360
360
  scale: indicatorScale
361
361
  },
362
- className: cn("from-background via-background/95 text-muted-foreground pointer-events-none absolute inset-x-0 top-0 z-20 flex h-[4.25rem] flex-col items-center justify-center gap-0.5 bg-linear-to-b to-transparent text-[11px] font-medium", indicatorClassName),
362
+ className: cn("from-background via-background/95 text-muted-foreground pointer-events-none absolute inset-x-0 top-0 z-20 flex h-[4.25rem] flex-col items-center justify-center gap-0.5 bg-gradient-to-b to-transparent text-[11px] font-medium", indicatorClassName),
363
363
  children: [/* @__PURE__ */ jsx(RefreshBuddy, {
364
364
  progress,
365
365
  status,
@@ -1 +1 @@
1
- {"version":3,"file":"pull-to-refresh.js","names":[],"sources":["../../../src/components/motion/pull-to-refresh.tsx"],"sourcesContent":["\"use client\";\n\nimport {\n type ReactNode,\n type PointerEvent as ReactPointerEvent,\n useCallback,\n useEffect,\n useLayoutEffect,\n useRef,\n useState,\n} from \"react\";\nimport {\n AnimatePresence,\n animate,\n type MotionValue,\n motion,\n useMotionValue,\n useReducedMotion,\n useTransform,\n} from \"motion/react\";\n\nimport { cn } from \"@kumix/utils\";\nimport { EASE_IN_OUT, EASE_OUT, SPRING_PANEL, SPRING_SWAP } from \"../../lib/ease\";\nimport { useMessages } from \"../../lib/i18n\";\nimport { capturePointer, TOUCH_GESTURE_CONTENT_CLASS } from \"../../lib/touch\";\n\n/** English defaults. Override per instance with `labels`, or app-wide with `LocaleProvider`. */\nexport const pullToRefreshMessages = {\n pulling: \"Pull to refresh\",\n release: \"Release to refresh\",\n refreshing: \"Refreshing\",\n label: \"Refreshable content\",\n};\n\nexport type PullToRefreshMessages = typeof pullToRefreshMessages;\n\nexport type PullToRefreshStatus = \"idle\" | \"pulling\" | \"ready\" | \"refreshing\";\n\nexport interface PullToRefreshProps {\n /** Runs after the user pulls beyond the threshold and releases. */\n onRefresh: () => void | Promise<void>;\n children: ReactNode;\n /** Keeps the indicator active while an externally managed refresh runs. */\n refreshing?: boolean;\n disabled?: boolean;\n /** Resisted pull distance in pixels required to refresh. */\n threshold?: number;\n /** Maximum resisted pull distance in pixels. */\n maxPull?: number;\n /** Content offset in pixels while refreshing. */\n holdDistance?: number;\n pullingLabel?: ReactNode;\n releaseLabel?: ReactNode;\n refreshingLabel?: ReactNode;\n ariaLabel?: string;\n /** Override any built-in string. */\n labels?: Partial<PullToRefreshMessages>;\n className?: string;\n contentClassName?: string;\n indicatorClassName?: string;\n}\n\ntype Gesture = {\n active: boolean;\n startX: number;\n startY: number;\n pointerId: number | null;\n};\n\nconst EMPTY_GESTURE: Gesture = {\n active: false,\n startX: 0,\n startY: 0,\n pointerId: null,\n};\n\n// This character needs a compact repeating rhythm rather than a settling\n// spring: a small orbit and blink that read as activity without feeling busy.\nconst CHARACTER_LOOP = {\n duration: 0.9,\n ease: EASE_IN_OUT,\n repeat: Number.POSITIVE_INFINITY,\n} as const;\nconst CALM_PULSE = {\n duration: 1.2,\n ease: EASE_IN_OUT,\n repeat: Number.POSITIVE_INFINITY,\n} as const;\nconst LABEL_SWAP = { duration: 0.16, ease: EASE_OUT } as const;\n\nfunction resistedDistance(distance: number, maxPull: number) {\n return maxPull * (1 - Math.exp(-Math.max(0, distance) / maxPull));\n}\n\nfunction RefreshBuddy({\n progress,\n status,\n reduce,\n}: {\n progress: MotionValue<number>;\n status: PullToRefreshStatus;\n reduce: boolean;\n}) {\n const lift = useTransform(progress, [0, 1], [-7, 0]);\n const tilt = useTransform(progress, [0, 1], [-10, 0]);\n const stretch = useTransform(progress, [0, 0.55, 1], [0.68, 1.1, 0.92]);\n const ready = status === \"ready\";\n const refreshing = status === \"refreshing\";\n\n return (\n <motion.span\n style={reduce ? undefined : { y: lift, rotate: tilt, scaleY: stretch }}\n className=\"block h-9 w-9 origin-bottom\"\n >\n <motion.svg\n aria-hidden=\"true\"\n viewBox=\"0 0 36 36\"\n style={{ opacity: 1 }}\n className=\"h-full w-full overflow-visible\"\n animate={\n refreshing\n ? reduce\n ? { opacity: [0.55, 1, 0.55] }\n : { y: [0, -2, 0], rotate: [-3, 3, -3] }\n : reduce\n ? { opacity: 1 }\n : { y: 0, rotate: 0, scale: ready ? 1.08 : 1 }\n }\n transition={refreshing ? (reduce ? CALM_PULSE : CHARACTER_LOOP) : SPRING_SWAP}\n >\n <motion.g\n style={{ transformOrigin: \"18px 18px\" }}\n animate={\n refreshing && !reduce\n ? { rotate: [0, 360] }\n : reduce\n ? undefined\n : { rotate: ready ? 0 : -35 }\n }\n transition={refreshing ? (reduce ? CALM_PULSE : CHARACTER_LOOP) : SPRING_SWAP}\n className={cn(\n \"transition-opacity duration-150\",\n ready || refreshing ? \"opacity-100\" : \"opacity-0\",\n )}\n >\n <path\n d=\"M18 2.5a15.5 15.5 0 0 1 12.7 6.6\"\n fill=\"none\"\n stroke=\"currentColor\"\n strokeWidth=\"1.5\"\n strokeLinecap=\"round\"\n className=\"text-muted-foreground\"\n />\n <circle cx=\"31.3\" cy=\"10.2\" r=\"2.2\" className=\"fill-foreground\" />\n </motion.g>\n\n <rect x=\"7\" y=\"7\" width=\"22\" height=\"22\" rx=\"9\" className=\"fill-foreground\" />\n\n <motion.g\n style={{ opacity: 1, transformOrigin: \"18px 16px\" }}\n animate={\n refreshing && !reduce\n ? { scaleY: [1, 1, 0.15, 1, 1] }\n : reduce\n ? { opacity: 1 }\n : { scaleY: ready ? 1.18 : 1 }\n }\n transition={refreshing && !reduce ? CHARACTER_LOOP : SPRING_SWAP}\n >\n <circle cx=\"14.2\" cy=\"16\" r=\"1.45\" className=\"fill-background\" />\n <circle cx=\"21.8\" cy=\"16\" r=\"1.45\" className=\"fill-background\" />\n </motion.g>\n\n <path\n d=\"M14.5 21h7\"\n fill=\"none\"\n stroke=\"currentColor\"\n strokeWidth=\"1.5\"\n strokeLinecap=\"round\"\n className={cn(\n \"text-background transition-opacity duration-150\",\n ready || refreshing ? \"opacity-0\" : \"opacity-100\",\n )}\n />\n <path\n d=\"M14 20.5c1 2.4 7 2.4 8 0\"\n fill=\"none\"\n stroke=\"currentColor\"\n strokeWidth=\"1.5\"\n strokeLinecap=\"round\"\n className={cn(\n \"text-background transition-opacity duration-150\",\n ready ? \"opacity-100\" : \"opacity-0\",\n )}\n />\n <circle\n cx=\"18\"\n cy=\"21\"\n r=\"1.6\"\n className={cn(\n \"fill-background transition-opacity duration-150\",\n refreshing ? \"opacity-100\" : \"opacity-0\",\n )}\n />\n </motion.svg>\n </motion.span>\n );\n}\n\nexport function PullToRefresh({\n onRefresh,\n children,\n refreshing = false,\n disabled = false,\n threshold = 76,\n maxPull = 132,\n holdDistance = 68,\n pullingLabel,\n releaseLabel,\n refreshingLabel,\n ariaLabel,\n labels,\n className,\n contentClassName,\n indicatorClassName,\n}: PullToRefreshProps) {\n const t = useMessages(\"pullToRefresh\", pullToRefreshMessages, labels);\n const rootRef = useRef<HTMLElement>(null);\n const gestureRef = useRef<Gesture>({ ...EMPTY_GESTURE });\n const animationRef = useRef<{ stop: () => void } | null>(null);\n const statusRef = useRef<PullToRefreshStatus>(\"idle\");\n const disabledRef = useRef(disabled);\n const externalRefreshingRef = useRef(refreshing);\n const refreshingRef = useRef(refreshing);\n const [status, setStatusState] = useState<PullToRefreshStatus>(\"idle\");\n const [internalRefreshing, setInternalRefreshing] = useState(false);\n const reduce = useReducedMotion();\n const pullThreshold = Math.max(24, threshold);\n const pullLimit = Math.max(maxPull, pullThreshold + 24);\n const restingDistance = Math.min(Math.max(0, holdDistance), pullThreshold);\n const y = useMotionValue(0);\n const progress = useTransform(y, [0, pullThreshold], [0, 1]);\n const indicatorOpacity = useTransform(y, [0, 10, pullThreshold], [0, 0.45, 1]);\n const indicatorScale = useTransform(y, [0, pullThreshold], [0.86, 1]);\n const isRefreshing = refreshing || internalRefreshing;\n\n useLayoutEffect(() => {\n disabledRef.current = disabled;\n externalRefreshingRef.current = refreshing;\n refreshingRef.current = isRefreshing;\n });\n\n const setStatus = useCallback((next: PullToRefreshStatus) => {\n if (statusRef.current === next) return;\n statusRef.current = next;\n setStatusState(next);\n }, []);\n\n const settle = useCallback(\n (target: number) => {\n animationRef.current?.stop();\n\n if (reduce) {\n y.set(target);\n return;\n }\n\n animationRef.current = animate(y, target, SPRING_PANEL);\n },\n [reduce, y],\n );\n\n const updatePull = useCallback(\n (distance: number) => {\n if (disabledRef.current || refreshingRef.current) return;\n animationRef.current?.stop();\n\n const next = resistedDistance(distance, pullLimit);\n y.set(next);\n setStatus(next >= pullThreshold ? \"ready\" : \"pulling\");\n },\n [pullLimit, pullThreshold, setStatus, y],\n );\n\n const runRefresh = useCallback(async () => {\n if (disabledRef.current || refreshingRef.current) return;\n\n setInternalRefreshing(true);\n setStatus(\"refreshing\");\n settle(restingDistance);\n\n try {\n await onRefresh();\n } finally {\n setInternalRefreshing(false);\n\n // A synchronous refresh can resolve before React commits the temporary\n // internal state, so release here instead of relying only on the effect.\n if (!externalRefreshingRef.current) {\n setStatus(\"idle\");\n settle(0);\n }\n }\n }, [onRefresh, restingDistance, setStatus, settle]);\n\n const finishPull = useCallback(() => {\n const shouldRefresh =\n y.get() >= pullThreshold && !disabledRef.current && !refreshingRef.current;\n\n gestureRef.current = { ...EMPTY_GESTURE };\n\n if (shouldRefresh) {\n void runRefresh();\n return;\n }\n\n setStatus(\"idle\");\n settle(0);\n }, [pullThreshold, runRefresh, setStatus, settle, y]);\n\n useEffect(() => {\n if (isRefreshing) {\n setStatus(\"refreshing\");\n settle(restingDistance);\n return;\n }\n\n if (statusRef.current === \"refreshing\") {\n setStatus(\"idle\");\n settle(0);\n }\n }, [isRefreshing, restingDistance, setStatus, settle]);\n\n useEffect(() => {\n const root = rootRef.current;\n if (!root) return;\n\n const onTouchStart = (event: TouchEvent) => {\n if (\n event.touches.length !== 1 ||\n root.scrollTop > 0 ||\n disabledRef.current ||\n refreshingRef.current\n ) {\n return;\n }\n\n const touch = event.touches[0];\n gestureRef.current = {\n active: true,\n startX: touch.clientX,\n startY: touch.clientY,\n pointerId: null,\n };\n };\n\n const onTouchMove = (event: TouchEvent) => {\n const gesture = gestureRef.current;\n const touch = event.touches[0];\n if (!gesture.active || !touch) return;\n\n const deltaX = touch.clientX - gesture.startX;\n const deltaY = touch.clientY - gesture.startY;\n\n if (root.scrollTop > 0 || deltaY < 0) {\n gestureRef.current = { ...EMPTY_GESTURE };\n return;\n }\n\n if (Math.abs(deltaX) > deltaY) return;\n\n event.preventDefault();\n updatePull(deltaY);\n };\n\n const onTouchEnd = () => {\n if (gestureRef.current.active) finishPull();\n };\n\n root.addEventListener(\"touchstart\", onTouchStart, { passive: true });\n root.addEventListener(\"touchmove\", onTouchMove, { passive: false });\n root.addEventListener(\"touchend\", onTouchEnd);\n root.addEventListener(\"touchcancel\", onTouchEnd);\n\n return () => {\n root.removeEventListener(\"touchstart\", onTouchStart);\n root.removeEventListener(\"touchmove\", onTouchMove);\n root.removeEventListener(\"touchend\", onTouchEnd);\n root.removeEventListener(\"touchcancel\", onTouchEnd);\n };\n }, [finishPull, updatePull]);\n\n useEffect(() => {\n return () => animationRef.current?.stop();\n }, []);\n\n const startPointerPull = (event: ReactPointerEvent<HTMLElement>) => {\n // Everything but touch: a finger is driven by the native listeners above,\n // which can `preventDefault` the page scroll a passive React handler\n // cannot. A pen fires no touch events at all, so this is its only route.\n if (\n event.pointerType === \"touch\" ||\n event.button !== 0 ||\n event.currentTarget.scrollTop > 0 ||\n disabled ||\n isRefreshing\n ) {\n return;\n }\n\n capturePointer(event.currentTarget, event.pointerId);\n gestureRef.current = {\n active: true,\n startX: event.clientX,\n startY: event.clientY,\n pointerId: event.pointerId,\n };\n };\n\n const movePointerPull = (event: ReactPointerEvent<HTMLElement>) => {\n const gesture = gestureRef.current;\n if (!gesture.active || gesture.pointerId !== event.pointerId) return;\n\n const deltaX = event.clientX - gesture.startX;\n const deltaY = event.clientY - gesture.startY;\n if (deltaY < 0 || Math.abs(deltaX) > deltaY) return;\n\n event.preventDefault();\n updatePull(deltaY);\n };\n\n const label =\n status === \"refreshing\"\n ? (refreshingLabel ?? t(\"refreshing\"))\n : status === \"ready\"\n ? (releaseLabel ?? t(\"release\"))\n : (pullingLabel ?? t(\"pulling\"));\n\n return (\n <section\n ref={rootRef}\n aria-label={ariaLabel ?? t(\"label\")}\n aria-busy={isRefreshing}\n data-state={status}\n data-disabled={disabled || undefined}\n onPointerDown={startPointerPull}\n onPointerMove={movePointerPull}\n onPointerUp={(event) => {\n if (gestureRef.current.pointerId === event.pointerId) finishPull();\n }}\n onPointerCancel={(event) => {\n if (gestureRef.current.pointerId === event.pointerId) finishPull();\n }}\n className={cn(\n \"bg-background relative w-full overflow-y-auto overscroll-contain\",\n // No `touch-none` here — this element is the scroller, and the pull\n // only takes over once the content is already at the top. The callout\n // has to be off from the first frame though: iOS decides on it while\n // the finger is still resting, long before the pull is recognised.\n // Whatever the consumer renders inside stays selectable with a mouse;\n // only the pull itself suppresses selection, and only while it runs,\n // so dragging the page down cannot highlight it on the way.\n TOUCH_GESTURE_CONTENT_CLASS,\n status === \"pulling\" || status === \"ready\" ? \"cursor-grabbing select-none\" : \"cursor-grab\",\n (disabled || isRefreshing) && \"cursor-default\",\n className,\n )}\n >\n <motion.div\n aria-live=\"polite\"\n aria-atomic=\"true\"\n style={\n reduce\n ? { opacity: indicatorOpacity }\n : { opacity: indicatorOpacity, scale: indicatorScale }\n }\n className={cn(\n \"from-background via-background/95 text-muted-foreground pointer-events-none absolute inset-x-0 top-0 z-20 flex h-[4.25rem] flex-col items-center justify-center gap-0.5 bg-linear-to-b to-transparent text-[11px] font-medium\",\n indicatorClassName,\n )}\n >\n <RefreshBuddy progress={progress} status={status} reduce={Boolean(reduce)} />\n <span className=\"relative h-4 min-w-24 text-center\">\n <AnimatePresence initial={false} mode=\"wait\">\n <motion.span\n key={status}\n initial={reduce ? { opacity: 0 } : { opacity: 0, y: 3 }}\n animate={reduce ? { opacity: 1 } : { opacity: 1, y: 0 }}\n exit={reduce ? { opacity: 0 } : { opacity: 0, y: -3 }}\n transition={LABEL_SWAP}\n className=\"absolute inset-x-0 whitespace-nowrap\"\n >\n {label}\n </motion.span>\n </AnimatePresence>\n </span>\n </motion.div>\n\n <motion.div\n style={reduce ? undefined : { y }}\n className={cn(\n \"relative z-10 min-h-full bg-inherit will-change-transform\",\n contentClassName,\n )}\n >\n {children}\n </motion.div>\n </section>\n );\n}\n"],"mappings":";;;;;;;;;;AA2BA,MAAa,wBAAwB;CACnC,SAAS;CACT,SAAS;CACT,YAAY;CACZ,OAAO;AACT;AAqCA,MAAM,gBAAyB;CAC7B,QAAQ;CACR,QAAQ;CACR,QAAQ;CACR,WAAW;AACb;AAIA,MAAM,iBAAiB;CACrB,UAAU;CACV,MAAM;CACN,QAAQ,OAAO;AACjB;AACA,MAAM,aAAa;CACjB,UAAU;CACV,MAAM;CACN,QAAQ,OAAO;AACjB;AACA,MAAM,aAAa;CAAE,UAAU;CAAM,MAAM;AAAS;AAEpD,SAAS,iBAAiB,UAAkB,SAAiB;CAC3D,OAAO,WAAW,IAAI,KAAK,IAAI,CAAC,KAAK,IAAI,GAAG,QAAQ,IAAI,OAAO;AACjE;AAEA,SAAS,aAAa,EACpB,UACA,QACA,UAKC;CACD,MAAM,OAAO,aAAa,UAAU,CAAC,GAAG,CAAC,GAAG,CAAC,IAAI,CAAC,CAAC;CACnD,MAAM,OAAO,aAAa,UAAU,CAAC,GAAG,CAAC,GAAG,CAAC,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E,OAAO,SAAS,KAAA,IAAY,EAAE,EAAE;GAChC,WAAW,GACT,6DACA,gBACF;GAEC;EACS,CAAA,CACL;;AAEb"}
1
+ {"version":3,"file":"pull-to-refresh.js","names":[],"sources":["../../../src/components/motion/pull-to-refresh.tsx"],"sourcesContent":["\"use client\";\n\nimport {\n type ReactNode,\n type PointerEvent as ReactPointerEvent,\n useCallback,\n useEffect,\n useLayoutEffect,\n useRef,\n useState,\n} from \"react\";\nimport {\n AnimatePresence,\n animate,\n type MotionValue,\n motion,\n useMotionValue,\n useReducedMotion,\n useTransform,\n} from \"motion/react\";\n\nimport { cn } from \"@kumix/utils\";\nimport { EASE_IN_OUT, EASE_OUT, SPRING_PANEL, SPRING_SWAP } from \"../../lib/ease\";\nimport { useMessages } from \"../../lib/i18n\";\nimport { capturePointer, TOUCH_GESTURE_CONTENT_CLASS } from \"../../lib/touch\";\n\n/** English defaults. Override per instance with `labels`, or app-wide with `LocaleProvider`. */\nexport const pullToRefreshMessages = {\n pulling: \"Pull to refresh\",\n release: \"Release to refresh\",\n refreshing: \"Refreshing\",\n label: \"Refreshable content\",\n};\n\nexport type PullToRefreshMessages = typeof pullToRefreshMessages;\n\nexport type PullToRefreshStatus = \"idle\" | \"pulling\" | \"ready\" | \"refreshing\";\n\nexport interface PullToRefreshProps {\n /** Runs after the user pulls beyond the threshold and releases. */\n onRefresh: () => void | Promise<void>;\n children: ReactNode;\n /** Keeps the indicator active while an externally managed refresh runs. */\n refreshing?: boolean;\n /** Turns off the pull gesture. Default: false */\n disabled?: boolean;\n /** Resisted pull distance in pixels required to refresh. */\n threshold?: number;\n /** Maximum resisted pull distance in pixels. */\n maxPull?: number;\n /** Content offset in pixels while refreshing. */\n holdDistance?: number;\n /** Indicator text while pulling, short of the threshold. Default: \"Pull to refresh\" */\n pullingLabel?: ReactNode;\n /** Indicator text once past the threshold. Default: \"Release to refresh\" */\n releaseLabel?: ReactNode;\n /** Indicator text while refreshing. Default: \"Refreshing\" */\n refreshingLabel?: ReactNode;\n /** Accessible name for the scroll region. Default: \"Refreshable content\" */\n ariaLabel?: string;\n /** Override any built-in string. */\n labels?: Partial<PullToRefreshMessages>;\n /** Classes merged onto the scroll container. */\n className?: string;\n /** Classes merged onto the element that wraps the children and moves with the pull. */\n contentClassName?: string;\n /** Classes merged onto the indicator at the top. */\n indicatorClassName?: string;\n}\n\ntype Gesture = {\n active: boolean;\n startX: number;\n startY: number;\n pointerId: number | null;\n};\n\nconst EMPTY_GESTURE: Gesture = {\n active: false,\n startX: 0,\n startY: 0,\n pointerId: null,\n};\n\n// This character needs a compact repeating rhythm rather than a settling\n// spring: a small orbit and blink that read as activity without feeling busy.\nconst CHARACTER_LOOP = {\n duration: 0.9,\n ease: EASE_IN_OUT,\n repeat: Number.POSITIVE_INFINITY,\n} as const;\nconst CALM_PULSE = {\n duration: 1.2,\n ease: EASE_IN_OUT,\n repeat: Number.POSITIVE_INFINITY,\n} as const;\nconst LABEL_SWAP = { duration: 0.16, ease: EASE_OUT } as const;\n\nfunction resistedDistance(distance: number, maxPull: number) {\n return maxPull * (1 - Math.exp(-Math.max(0, distance) / maxPull));\n}\n\nfunction RefreshBuddy({\n progress,\n status,\n reduce,\n}: {\n progress: MotionValue<number>;\n status: PullToRefreshStatus;\n reduce: boolean;\n}) {\n const lift = useTransform(progress, [0, 1], [-7, 0]);\n const tilt = useTransform(progress, [0, 1], [-10, 0]);\n const stretch = useTransform(progress, [0, 0.55, 1], [0.68, 1.1, 0.92]);\n const ready = status === \"ready\";\n const refreshing = status === \"refreshing\";\n\n return (\n <motion.span\n style={reduce ? undefined : { y: lift, rotate: tilt, scaleY: stretch }}\n className=\"block h-9 w-9 origin-bottom\"\n >\n <motion.svg\n aria-hidden=\"true\"\n viewBox=\"0 0 36 36\"\n style={{ opacity: 1 }}\n className=\"h-full w-full overflow-visible\"\n animate={\n refreshing\n ? reduce\n ? { opacity: [0.55, 1, 0.55] }\n : { y: [0, -2, 0], rotate: [-3, 3, -3] }\n : reduce\n ? { opacity: 1 }\n : { y: 0, rotate: 0, scale: ready ? 1.08 : 1 }\n }\n transition={refreshing ? (reduce ? CALM_PULSE : CHARACTER_LOOP) : SPRING_SWAP}\n >\n <motion.g\n style={{ transformOrigin: \"18px 18px\" }}\n animate={\n refreshing && !reduce\n ? { rotate: [0, 360] }\n : reduce\n ? undefined\n : { rotate: ready ? 0 : -35 }\n }\n transition={refreshing ? (reduce ? CALM_PULSE : CHARACTER_LOOP) : SPRING_SWAP}\n className={cn(\n \"transition-opacity duration-150\",\n ready || refreshing ? \"opacity-100\" : \"opacity-0\",\n )}\n >\n <path\n d=\"M18 2.5a15.5 15.5 0 0 1 12.7 6.6\"\n fill=\"none\"\n stroke=\"currentColor\"\n strokeWidth=\"1.5\"\n strokeLinecap=\"round\"\n className=\"text-muted-foreground\"\n />\n <circle cx=\"31.3\" cy=\"10.2\" r=\"2.2\" className=\"fill-foreground\" />\n </motion.g>\n\n <rect x=\"7\" y=\"7\" width=\"22\" height=\"22\" rx=\"9\" className=\"fill-foreground\" />\n\n <motion.g\n style={{ opacity: 1, transformOrigin: \"18px 16px\" }}\n animate={\n refreshing && !reduce\n ? { scaleY: [1, 1, 0.15, 1, 1] }\n : reduce\n ? { opacity: 1 }\n : { scaleY: ready ? 1.18 : 1 }\n }\n transition={refreshing && !reduce ? CHARACTER_LOOP : SPRING_SWAP}\n >\n <circle cx=\"14.2\" cy=\"16\" r=\"1.45\" className=\"fill-background\" />\n <circle cx=\"21.8\" cy=\"16\" r=\"1.45\" className=\"fill-background\" />\n </motion.g>\n\n <path\n d=\"M14.5 21h7\"\n fill=\"none\"\n stroke=\"currentColor\"\n strokeWidth=\"1.5\"\n strokeLinecap=\"round\"\n className={cn(\n \"text-background transition-opacity duration-150\",\n ready || refreshing ? \"opacity-0\" : \"opacity-100\",\n )}\n />\n <path\n d=\"M14 20.5c1 2.4 7 2.4 8 0\"\n fill=\"none\"\n stroke=\"currentColor\"\n strokeWidth=\"1.5\"\n strokeLinecap=\"round\"\n className={cn(\n \"text-background transition-opacity duration-150\",\n ready ? \"opacity-100\" : \"opacity-0\",\n )}\n />\n <circle\n cx=\"18\"\n cy=\"21\"\n r=\"1.6\"\n className={cn(\n \"fill-background transition-opacity duration-150\",\n refreshing ? \"opacity-100\" : \"opacity-0\",\n )}\n />\n </motion.svg>\n </motion.span>\n );\n}\n\nexport function PullToRefresh({\n onRefresh,\n children,\n refreshing = false,\n disabled = false,\n threshold = 76,\n maxPull = 132,\n holdDistance = 68,\n pullingLabel,\n releaseLabel,\n refreshingLabel,\n ariaLabel,\n labels,\n className,\n contentClassName,\n indicatorClassName,\n}: PullToRefreshProps) {\n const t = useMessages(\"pullToRefresh\", pullToRefreshMessages, labels);\n const rootRef = useRef<HTMLElement>(null);\n const gestureRef = useRef<Gesture>({ ...EMPTY_GESTURE });\n const animationRef = useRef<{ stop: () => void } | null>(null);\n const statusRef = useRef<PullToRefreshStatus>(\"idle\");\n const disabledRef = useRef(disabled);\n const externalRefreshingRef = useRef(refreshing);\n const refreshingRef = useRef(refreshing);\n const [status, setStatusState] = useState<PullToRefreshStatus>(\"idle\");\n const [internalRefreshing, setInternalRefreshing] = useState(false);\n const reduce = useReducedMotion();\n const pullThreshold = Math.max(24, threshold);\n const pullLimit = Math.max(maxPull, pullThreshold + 24);\n const restingDistance = Math.min(Math.max(0, holdDistance), pullThreshold);\n const y = useMotionValue(0);\n const progress = useTransform(y, [0, pullThreshold], [0, 1]);\n const indicatorOpacity = useTransform(y, [0, 10, pullThreshold], [0, 0.45, 1]);\n const indicatorScale = useTransform(y, [0, pullThreshold], [0.86, 1]);\n const isRefreshing = refreshing || internalRefreshing;\n\n useLayoutEffect(() => {\n disabledRef.current = disabled;\n externalRefreshingRef.current = refreshing;\n refreshingRef.current = isRefreshing;\n });\n\n const setStatus = useCallback((next: PullToRefreshStatus) => {\n if (statusRef.current === next) return;\n statusRef.current = next;\n setStatusState(next);\n }, []);\n\n const settle = useCallback(\n (target: number) => {\n animationRef.current?.stop();\n\n if (reduce) {\n y.set(target);\n return;\n }\n\n animationRef.current = animate(y, target, SPRING_PANEL);\n },\n [reduce, y],\n );\n\n const updatePull = useCallback(\n (distance: number) => {\n if (disabledRef.current || refreshingRef.current) return;\n animationRef.current?.stop();\n\n const next = resistedDistance(distance, pullLimit);\n y.set(next);\n setStatus(next >= pullThreshold ? \"ready\" : \"pulling\");\n },\n [pullLimit, pullThreshold, setStatus, y],\n );\n\n const runRefresh = useCallback(async () => {\n if (disabledRef.current || refreshingRef.current) return;\n\n setInternalRefreshing(true);\n setStatus(\"refreshing\");\n settle(restingDistance);\n\n try {\n await onRefresh();\n } finally {\n setInternalRefreshing(false);\n\n // A synchronous refresh can resolve before React commits the temporary\n // internal state, so release here instead of relying only on the effect.\n if (!externalRefreshingRef.current) {\n setStatus(\"idle\");\n settle(0);\n }\n }\n }, [onRefresh, restingDistance, setStatus, settle]);\n\n const finishPull = useCallback(() => {\n const shouldRefresh =\n y.get() >= pullThreshold && !disabledRef.current && !refreshingRef.current;\n\n gestureRef.current = { ...EMPTY_GESTURE };\n\n if (shouldRefresh) {\n void runRefresh();\n return;\n }\n\n setStatus(\"idle\");\n settle(0);\n }, [pullThreshold, runRefresh, setStatus, settle, y]);\n\n useEffect(() => {\n if (isRefreshing) {\n setStatus(\"refreshing\");\n settle(restingDistance);\n return;\n }\n\n if (statusRef.current === \"refreshing\") {\n setStatus(\"idle\");\n settle(0);\n }\n }, [isRefreshing, restingDistance, setStatus, settle]);\n\n useEffect(() => {\n const root = rootRef.current;\n if (!root) return;\n\n const onTouchStart = (event: TouchEvent) => {\n if (\n event.touches.length !== 1 ||\n root.scrollTop > 0 ||\n disabledRef.current ||\n refreshingRef.current\n ) {\n return;\n }\n\n const touch = event.touches[0];\n gestureRef.current = {\n active: true,\n startX: touch.clientX,\n startY: touch.clientY,\n pointerId: null,\n };\n };\n\n const onTouchMove = (event: TouchEvent) => {\n const gesture = gestureRef.current;\n const touch = event.touches[0];\n if (!gesture.active || !touch) return;\n\n const deltaX = touch.clientX - gesture.startX;\n const deltaY = touch.clientY - gesture.startY;\n\n if (root.scrollTop > 0 || deltaY < 0) {\n gestureRef.current = { ...EMPTY_GESTURE };\n return;\n }\n\n if (Math.abs(deltaX) > deltaY) return;\n\n event.preventDefault();\n updatePull(deltaY);\n };\n\n const onTouchEnd = () => {\n if (gestureRef.current.active) finishPull();\n };\n\n root.addEventListener(\"touchstart\", onTouchStart, { passive: true });\n root.addEventListener(\"touchmove\", onTouchMove, { passive: false });\n root.addEventListener(\"touchend\", onTouchEnd);\n root.addEventListener(\"touchcancel\", onTouchEnd);\n\n return () => {\n root.removeEventListener(\"touchstart\", onTouchStart);\n root.removeEventListener(\"touchmove\", onTouchMove);\n root.removeEventListener(\"touchend\", onTouchEnd);\n root.removeEventListener(\"touchcancel\", onTouchEnd);\n };\n }, [finishPull, updatePull]);\n\n useEffect(() => {\n return () => animationRef.current?.stop();\n }, []);\n\n const startPointerPull = (event: ReactPointerEvent<HTMLElement>) => {\n // Everything but touch: a finger is driven by the native listeners above,\n // which can `preventDefault` the page scroll a passive React handler\n // cannot. A pen fires no touch events at all, so this is its only route.\n if (\n event.pointerType === \"touch\" ||\n event.button !== 0 ||\n event.currentTarget.scrollTop > 0 ||\n disabled ||\n isRefreshing\n ) {\n return;\n }\n\n capturePointer(event.currentTarget, event.pointerId);\n gestureRef.current = {\n active: true,\n startX: event.clientX,\n startY: event.clientY,\n pointerId: event.pointerId,\n };\n };\n\n const movePointerPull = (event: ReactPointerEvent<HTMLElement>) => {\n const gesture = gestureRef.current;\n if (!gesture.active || gesture.pointerId !== event.pointerId) return;\n\n const deltaX = event.clientX - gesture.startX;\n const deltaY = event.clientY - gesture.startY;\n if (deltaY < 0 || Math.abs(deltaX) > deltaY) return;\n\n event.preventDefault();\n updatePull(deltaY);\n };\n\n const label =\n status === \"refreshing\"\n ? (refreshingLabel ?? t(\"refreshing\"))\n : status === \"ready\"\n ? (releaseLabel ?? t(\"release\"))\n : (pullingLabel ?? t(\"pulling\"));\n\n return (\n <section\n ref={rootRef}\n aria-label={ariaLabel ?? t(\"label\")}\n aria-busy={isRefreshing}\n data-state={status}\n data-disabled={disabled || undefined}\n onPointerDown={startPointerPull}\n onPointerMove={movePointerPull}\n onPointerUp={(event) => {\n if (gestureRef.current.pointerId === event.pointerId) finishPull();\n }}\n onPointerCancel={(event) => {\n if (gestureRef.current.pointerId === event.pointerId) finishPull();\n }}\n className={cn(\n \"bg-background relative w-full overflow-y-auto overscroll-contain\",\n // No `touch-none` here - this element is the scroller, and the pull\n // only takes over once the content is already at the top. The callout\n // has to be off from the first frame though: iOS decides on it while\n // the finger is still resting, long before the pull is recognised.\n // Whatever the consumer renders inside stays selectable with a mouse;\n // only the pull itself suppresses selection, and only while it runs,\n // so dragging the page down cannot highlight it on the way.\n TOUCH_GESTURE_CONTENT_CLASS,\n status === \"pulling\" || status === \"ready\" ? \"cursor-grabbing select-none\" : \"cursor-grab\",\n (disabled || isRefreshing) && \"cursor-default\",\n className,\n )}\n >\n <motion.div\n aria-live=\"polite\"\n aria-atomic=\"true\"\n style={\n reduce\n ? { opacity: indicatorOpacity }\n : { opacity: indicatorOpacity, scale: indicatorScale }\n }\n className={cn(\n \"from-background via-background/95 text-muted-foreground pointer-events-none absolute inset-x-0 top-0 z-20 flex h-[4.25rem] flex-col items-center justify-center gap-0.5 bg-gradient-to-b to-transparent text-[11px] font-medium\",\n indicatorClassName,\n )}\n >\n <RefreshBuddy progress={progress} status={status} reduce={Boolean(reduce)} />\n <span className=\"relative h-4 min-w-24 text-center\">\n <AnimatePresence initial={false} mode=\"wait\">\n <motion.span\n key={status}\n initial={reduce ? { opacity: 0 } : { opacity: 0, y: 3 }}\n animate={reduce ? { opacity: 1 } : { opacity: 1, y: 0 }}\n exit={reduce ? { opacity: 0 } : { opacity: 0, y: -3 }}\n transition={LABEL_SWAP}\n className=\"absolute inset-x-0 whitespace-nowrap\"\n >\n {label}\n </motion.span>\n </AnimatePresence>\n </span>\n </motion.div>\n\n <motion.div\n style={reduce ? undefined : { y }}\n className={cn(\n \"relative z-10 min-h-full bg-inherit will-change-transform\",\n contentClassName,\n )}\n >\n {children}\n </motion.div>\n </section>\n );\n}\n"],"mappings":";;;;;;;;;;AA2BA,MAAa,wBAAwB;CACnC,SAAS;CACT,SAAS;CACT,YAAY;CACZ,OAAO;AACT;AA6CA,MAAM,gBAAyB;CAC7B,QAAQ;CACR,QAAQ;CACR,QAAQ;CACR,WAAW;AACb;AAIA,MAAM,iBAAiB;CACrB,UAAU;CACV,MAAM;CACN,QAAQ,OAAO;AACjB;AACA,MAAM,aAAa;CACjB,UAAU;CACV,MAAM;CACN,QAAQ,OAAO;AACjB;AACA,MAAM,aAAa;CAAE,UAAU;CAAM,MAAM;AAAS;AAEpD,SAAS,iBAAiB,UAAkB,SAAiB;CAC3D,OAAO,WAAW,IAAI,KAAK,IAAI,CAAC,KAAK,IAAI,GAAG,QAAQ,IAAI,OAAO;AACjE;AAEA,SAAS,aAAa,EACpB,UACA,QACA,UAKC;CACD,MAAM,OAAO,aAAa,UAAU,CAAC,GAAG,CAAC,GAAG,CAAC,IAAI,CAAC,CAAC;CACnD,MAAM,OAAO,aAAa,UAAU,CAAC,GAAG,CAAC,GAAG,CAAC,KAAK,CAAC,CAAC;CACpD,MAAM,UAAU,aAAa,UAAU;EAAC;EAAG;EAAM;CAAC,GAAG;EAAC;EAAM;EAAK;CAAI,CAAC;CACtE,MAAM,QAAQ,WAAW;CACzB,MAAM,aAAa,WAAW;CAE9B,OACE,oBAAC,OAAO,MAAR;EACE,OAAO,SAAS,KAAA,IAAY;GAAE,GAAG;GAAM,QAAQ;GAAM,QAAQ;EAAQ;EACrE,WAAU;EAEV,UAAA,qBAAC,OAAO,KAAR;GACE,eAAY;GACZ,SAAQ;GACR,OAAO,EAAE,SAAS,EAAE;GACpB,WAAU;GACV,SACE,aACI,SACE,EAAE,SAAS;IAAC;IAAM;IAAG;GAAI,EAAE,IAC3B;IAAE,GAAG;KAAC;KAAG;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AAW,aAAa,WAAW,UAAU,gCAAgC,gBAC5E,YAAY,iBAAiB,kBAC9B,SACF;EA3BF,UAAA,CA6BE,qBAAC,OAAO,KAAR;GACE,aAAU;GACV,eAAY;GACZ,OACE,SACI,EAAE,SAAS,iBAAiB,IAC5B;IAAE,SAAS;IAAkB,OAAO;GAAe;GAEzD,WAAW,GACT,mOACA,kBACF;GAXF,UAAA,CAaE,oBAAC,cAAD;IAAwB;IAAkB;IAAQ,QAAQ,QAAQ,MAAM;GAAI,CAAA,GAC5E,oBAAC,QAAD;IAAM,WAAU;IACd,UAAA,oBAAC,iBAAD;KAAiB,SAAS;KAAO,MAAK;KACpC,UAAA,oBAAC,OAAO,MAAR;MAEE,SAAS,SAAS,EAAE,SAAS,EAAE,IAAI;OAAE,SAAS;OAAG,GAAG;MAAE;MACtD,SAAS,SAAS,EAAE,SAAS,EAAE,IAAI;OAAE,SAAS;OAAG,GAAG;MAAE;MACtD,MAAM,SAAS,EAAE,SAAS,EAAE,IAAI;OAAE,SAAS;OAAG,GAAG;MAAG;MACpD,YAAY;MACZ,WAAU;MAET,UAAA;KACU,GARN,MAQM;IACE,CAAA;GACb,CAAA,CACI;EAEZ,CAAA,GAAA,oBAAC,OAAO,KAAR;GACE,OAAO,SAAS,KAAA,IAAY,EAAE,EAAE;GAChC,WAAW,GACT,6DACA,gBACF;GAEC;EACS,CAAA,CACL;;AAEb"}
@@ -0,0 +1,42 @@
1
+ export type QrCodeVariant = "swarm" | "ripple" | "scan" | "smoke";
2
+ export declare const qrCodeMessages: {
3
+ label: string;
4
+ };
5
+ export type QrCodeMessages = typeof qrCodeMessages;
6
+ export interface QrCodeOrigin {
7
+ /** Horizontal position as a fraction of the canvas width, 0 is the left edge. */
8
+ x: number;
9
+ /** Vertical position as a fraction of the canvas height, 0 is the top edge. */
10
+ y: number;
11
+ }
12
+ export interface AnimatedQrCodeProps {
13
+ /** Text or URL the code encodes. */
14
+ value: string;
15
+ /** Whether the code is drawn. Turning it on builds the code; turning it off plays the build backwards from wherever it is. */
16
+ shown: boolean;
17
+ /** How the code builds: every piece flies in on a curved path, pops in place behind a spreading ring, drops into place behind a bar sweeping down, or rises as smoke and condenses from the bottom row up. Default: "swarm" */
18
+ variant?: QrCodeVariant;
19
+ /** Side of the square canvas, in px, quiet zone included. Default: 296 */
20
+ size?: number;
21
+ /** Where swarm pieces fly from and where the ripple ring starts. Scan and smoke ignore it. Default: bottom centre for swarm, centre for ripple */
22
+ origin?: QrCodeOrigin;
23
+ /** Dot colour, any CSS colour. Default: "#0a0a0a" */
24
+ ink?: string;
25
+ /** Background colour, any CSS colour. Keep it light so cameras can read the code. Default: "#ffffff" */
26
+ paper?: string;
27
+ /** Called when a build or teardown finishes, with the `shown` value it ended on. */
28
+ onSettled?: (shown: boolean) => void;
29
+ /** Translated strings, merged over the English defaults. */
30
+ labels?: Partial<QrCodeMessages>;
31
+ /** Classes merged onto the canvas. */
32
+ className?: string;
33
+ }
34
+ /**
35
+ * A QR code drawn on a canvas that builds itself piece by piece: the dots and
36
+ * the three finder eyes fly in on curved paths, pop in behind a spreading
37
+ * ring, or drop in behind a bar sweeping down. One reversible clock runs it,
38
+ * so hiding plays the build backwards and a press mid-run turns around from
39
+ * where it is.
40
+ */
41
+ export declare function AnimatedQrCode({ value, shown, variant, size, origin, ink, paper, onSettled, labels, className }: AnimatedQrCodeProps): import("react").JSX.Element;
42
+ //# sourceMappingURL=qr-code.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"qr-code.d.ts","names":[],"sources":["../../../src/components/motion/qr-code.tsx"],"mappings":"A,YASY;qBAEC;;;YAID,wBAAwB;iBAEnB;;EAEf;;EAEA;;iBAGe;;EAEf;;EAEA;;EAEA,UAAU;;EAEV;;EAEA,SAAS;;EAET;;EAEA;;EAEA,aAAa;;EAEb,SAAS,QAAQ;;EAEjB;;;;;;;;;wBA0ac,iBACd,OACA,OACA,SACA,MACA,QACA,KACA,OACA,WACA,QACA,aACC,sCAAmB,IAAA"}
@@ -0,0 +1,443 @@
1
+ "use client";
2
+ import { useEffect, useLayoutEffect, useMemo, useRef } from "react";
3
+ import { useReducedMotion } from "motion/react";
4
+ import { encode } from "uqr";
5
+ import { cn } from "@kumix/utils";
6
+ import { useMessages } from "../../lib/i18n.js";
7
+ import { jsx } from "react/jsx-runtime";
8
+ // src/components/motion/qr-code.tsx
9
+ const qrCodeMessages = { label: "QR code for {value}" };
10
+ /** Gap between the first and the last piece starting, in ms. */
11
+ const SPREAD = 600;
12
+ /** One piece's own arrival, in ms. */
13
+ const PIECE_IN = 500;
14
+ const TOTAL = 1100;
15
+ /** Time constant for the clock turning around after a press mid-run, in ms. */
16
+ const TURN_MS = 90;
17
+ /** Reduced motion keeps only an opacity fade of this length, in ms. */
18
+ const REDUCED_MS = 200;
19
+ /** Random offset added to each swarm piece's start, in ms, so the order is not mechanical. */
20
+ const JITTER = 70;
21
+ /** How far a swarm path bows outward, as a share of its length; each piece adds up to BEND_SPREAD more. */
22
+ const BEND = .14;
23
+ const BEND_SPREAD = .12;
24
+ /** Extra length of a piece at top speed on the longest flight, as a share of its size. Width shrinks to keep its area. */
25
+ const STRETCH = 1.3;
26
+ /** Share of that stretch an eye takes. */
27
+ const EYE_STRETCH = .2;
28
+ /** How far a scan piece drops into place, in modules. */
29
+ const DROP = 1.6;
30
+ /** Height of the soft trail behind the scan bar, in px. */
31
+ const SCAN_TRAIL = 28;
32
+ /** Soft puffs in the smoke plume. */
33
+ const PUFFS = 90;
34
+ /** Life of one puff, in ms. Puffs are released over SMOKE_EMIT so the last fades out as the build ends. */
35
+ const PUFF_LIFE = 560;
36
+ const SMOKE_EMIT = SPREAD * .9;
37
+ /** Width of the band puffs rise from, as a share of the canvas. */
38
+ const SMOKE_BAND = .75;
39
+ /** A puff's radius at birth and at the end of its life, in modules. */
40
+ const PUFF_START = 1.4;
41
+ /** Peak opacity of one puff. Overlap builds the density. Fewer, smaller puffs keep the fill cost near 3ms a frame. */
42
+ const PUFF_ALPHA = .22;
43
+ /** How far a condensing piece drifts up into place, in modules. */
44
+ const SMOKE_DRIFT = 1;
45
+ const TAU = Math.PI * 2;
46
+ /**
47
+ * One soft puff: a radial falloff tinted with the ink colour, drawn scaled
48
+ * per puff. A sprite is far cheaper than a gradient or a blur per draw, and
49
+ * blur filters would re-render every frame.
50
+ */
51
+ const puffSprites = /* @__PURE__ */ new Map();
52
+ function puffSprite(ink) {
53
+ const cached = puffSprites.get(ink);
54
+ if (cached) return cached;
55
+ const s = 96;
56
+ const sprite = document.createElement("canvas");
57
+ sprite.width = s;
58
+ sprite.height = s;
59
+ const g = sprite.getContext("2d");
60
+ if (g) {
61
+ const fall = g.createRadialGradient(s / 2, s / 2, 0, s / 2, s / 2, s / 2);
62
+ fall.addColorStop(0, "rgba(0,0,0,1)");
63
+ fall.addColorStop(.45, "rgba(0,0,0,0.55)");
64
+ fall.addColorStop(1, "rgba(0,0,0,0)");
65
+ g.fillStyle = fall;
66
+ g.fillRect(0, 0, s, s);
67
+ g.globalCompositeOperation = "source-in";
68
+ g.fillStyle = ink;
69
+ g.fillRect(0, 0, s, s);
70
+ }
71
+ puffSprites.set(ink, sprite);
72
+ return sprite;
73
+ }
74
+ /**
75
+ * Smoke is soft, so it is drawn at half the canvas resolution in CSS px (a
76
+ * quarter of the device pixels on a 2x screen) and scaled up in one draw.
77
+ * The puffs overlap heavily, and filling them at full resolution cost
78
+ * several ms a frame.
79
+ */
80
+ const SMOKE_RES = .5;
81
+ const smokeLayers = /* @__PURE__ */ new Map();
82
+ function smokeLayer(size) {
83
+ if (!smokeLayers.has(size)) {
84
+ const layer = document.createElement("canvas");
85
+ layer.width = Math.ceil(size * SMOKE_RES);
86
+ layer.height = layer.width;
87
+ const lctx = layer.getContext("2d");
88
+ lctx?.scale(SMOKE_RES, SMOKE_RES);
89
+ smokeLayers.set(size, lctx);
90
+ }
91
+ return smokeLayers.get(size) ?? null;
92
+ }
93
+ function drawSmoke(ctx, layout, clock, ink) {
94
+ const { size, cell, pieces } = layout;
95
+ const lctx = smokeLayer(size);
96
+ if (!lctx) return;
97
+ const sprite = puffSprite(ink);
98
+ lctx.clearRect(0, 0, size, size);
99
+ for (const p of pieces) {
100
+ const t = (clock - pieceStart(p, "smoke", size)) / PIECE_IN;
101
+ if (t <= 0 || t >= 1) continue;
102
+ const k = settle(t);
103
+ const half = p.side / 2;
104
+ const haze = (p.eye ? half * 1.3 : cell * 1.6) * (1.4 - k);
105
+ lctx.globalAlpha = .35 * Math.min(1, t * 4) * (1 - k);
106
+ lctx.drawImage(sprite, p.x + half - haze, p.y + half - haze + (1 - k) * cell * SMOKE_DRIFT, haze * 2, haze * 2);
107
+ }
108
+ for (let i = 0; i < PUFFS; i++) {
109
+ const u = (clock - i / PUFFS * SMOKE_EMIT) / PUFF_LIFE;
110
+ if (u <= 0 || u >= 1) continue;
111
+ const h1 = hash(i * 3 + 1);
112
+ const h2 = hash(i * 3 + 2);
113
+ const h3 = hash(i * 3 + 3);
114
+ const rise = size * (.55 + .6 * h2) * (1 - (1 - u) ** 2);
115
+ const curl = Math.sin(h3 * TAU + u * 4) * cell * 2.4 * u;
116
+ const x = size / 2 + (h1 - .5) * size * SMOKE_BAND + curl;
117
+ const y = size + cell * 2 - rise;
118
+ const r = cell * (PUFF_START + 2.2 * u);
119
+ lctx.globalAlpha = PUFF_ALPHA * Math.min(1, u * 6) * (1 - u) ** 1.5;
120
+ lctx.drawImage(sprite, x - r, y - r, r * 2, r * 2);
121
+ }
122
+ ctx.globalAlpha = 1;
123
+ ctx.drawImage(lctx.canvas, 0, 0, size, size);
124
+ }
125
+ const QUARTER = Math.PI / 2;
126
+ /**
127
+ * Each piece moves like a critically damped spring pulled to its cell: it
128
+ * leaves at rest, speeds up, and eases in with no overshoot. An ease-out
129
+ * curve would start at full speed, which reads as a jolt at launch. The
130
+ * curve is scaled to land exactly at t = 1. Local because it has to run per
131
+ * piece on a canvas, where the shared motion tokens cannot.
132
+ */
133
+ const OMEGA = 7;
134
+ const SETTLE_END = 1 - 8 * Math.exp(-7);
135
+ const settle = (t) => (1 - (1 + OMEGA * t) * Math.exp(-7 * t)) / SETTLE_END;
136
+ /** Speed of `settle` at t, 0 to 1, peaking at t = 1 / OMEGA. */
137
+ const speedAt = (t) => OMEGA * t * Math.exp(1 - OMEGA * t);
138
+ const DEFAULT_ORIGIN = {
139
+ swarm: {
140
+ x: .5,
141
+ y: 1
142
+ },
143
+ ripple: {
144
+ x: .5,
145
+ y: .5
146
+ }
147
+ };
148
+ const clamp01 = (v) => v < 0 ? 0 : Math.min(v, 1);
149
+ function hash(n) {
150
+ let t = Math.imul(n ^ 0x9e3779b9, 0x85ebca6b);
151
+ t ^= t >>> 13;
152
+ t = Math.imul(t, 0xc2b2ae35);
153
+ return ((t ^ t >>> 16) >>> 0) / 4294967296;
154
+ }
155
+ function isEye(x, y, n) {
156
+ return x < 7 && y < 7 || x >= n - 7 && y < 7 || x < 7 && y >= n - 7;
157
+ }
158
+ function buildLayout(value, size, origin) {
159
+ const { data, size: n } = encode(value || " ", {
160
+ ecc: "M",
161
+ border: 0
162
+ });
163
+ const cell = Math.max(2, Math.floor(size / (n + 4)));
164
+ const gap = Math.max(1, Math.round(cell * .12));
165
+ const dot = cell - gap;
166
+ const start = Math.round((size - n * cell) / 2);
167
+ const ox = origin.x * size;
168
+ const oy = origin.y * size;
169
+ const pieces = [];
170
+ const add = (eye, x, y, side, seed) => {
171
+ pieces.push({
172
+ eye,
173
+ x,
174
+ y,
175
+ side,
176
+ d: Math.hypot(x + side / 2 - ox, y + side / 2 - oy),
177
+ r: hash(seed)
178
+ });
179
+ };
180
+ const eyeSide = cell * 7 - gap;
181
+ const far = start + (n - 7) * cell;
182
+ add(true, start, start, eyeSide, -1);
183
+ add(true, far, start, eyeSide, -2);
184
+ add(true, start, far, eyeSide, -3);
185
+ data.forEach((row, y) => {
186
+ row.forEach((dark, x) => {
187
+ if (dark && !isEye(x, y, n)) add(false, start + x * cell, start + y * cell, dot, y * n + x);
188
+ });
189
+ });
190
+ const reach = Math.max(1, ...pieces.map((p) => p.d));
191
+ for (const p of pieces) p.d /= reach;
192
+ return {
193
+ cell,
194
+ dot,
195
+ radius: dot * .32,
196
+ pieces,
197
+ reach,
198
+ ox,
199
+ oy,
200
+ size
201
+ };
202
+ }
203
+ /** A finder eye: a rounded ring and a rounded core, radii concentric. */
204
+ function drawEye(ctx, x, y, side, cell, radius) {
205
+ const r = cell * 2;
206
+ ctx.beginPath();
207
+ ctx.roundRect(x, y, side, side, r);
208
+ ctx.roundRect(x + cell, y + cell, side - cell * 2, side - cell * 2, r - cell);
209
+ ctx.fill("evenodd");
210
+ ctx.beginPath();
211
+ ctx.roundRect(x + cell * 2, y + cell * 2, side - cell * 4, side - cell * 4, Math.max(radius, r - cell * 2));
212
+ ctx.fill();
213
+ }
214
+ function pieceStart(p, variant, size) {
215
+ if (variant === "scan") return clamp01((p.y + p.side / 2) / size) * SPREAD;
216
+ if (variant === "smoke") return (1 - clamp01((p.y + p.side / 2) / size)) * 530 + p.r * JITTER;
217
+ if (variant === "ripple") return p.d * SPREAD;
218
+ return p.d * 530 + p.r * JITTER;
219
+ }
220
+ function draw(ctx, layout, clock, variant, reduce, ink, paper) {
221
+ const { cell, dot, radius, pieces, reach, ox, oy, size } = layout;
222
+ ctx.globalAlpha = 1;
223
+ ctx.fillStyle = paper;
224
+ ctx.fillRect(0, 0, size, size);
225
+ ctx.fillStyle = ink;
226
+ if (reduce) {
227
+ ctx.globalAlpha = clock / TOTAL;
228
+ ctx.beginPath();
229
+ for (const p of pieces) if (!p.eye) ctx.roundRect(p.x, p.y, dot, dot, radius);
230
+ ctx.fill();
231
+ for (const p of pieces) if (p.eye) drawEye(ctx, p.x, p.y, p.side, cell, radius);
232
+ ctx.globalAlpha = 1;
233
+ return;
234
+ }
235
+ ctx.beginPath();
236
+ for (const p of pieces) if (!p.eye && clock - pieceStart(p, variant, size) >= PIECE_IN) ctx.roundRect(p.x, p.y, dot, dot, radius);
237
+ ctx.fill();
238
+ for (const p of pieces) if (p.eye && clock - pieceStart(p, variant, size) >= PIECE_IN) drawEye(ctx, p.x, p.y, p.side, cell, radius);
239
+ const q = clock / SPREAD;
240
+ if (q > 0 && q < 1 && (variant === "ripple" || variant === "scan")) {
241
+ ctx.save();
242
+ const fade = Math.sin(Math.PI * q);
243
+ if (variant === "ripple") {
244
+ ctx.strokeStyle = ink;
245
+ ctx.lineWidth = 1.5;
246
+ ctx.globalAlpha = .22 * fade;
247
+ ctx.beginPath();
248
+ ctx.arc(ox, oy, q * reach, 0, Math.PI * 2);
249
+ ctx.stroke();
250
+ } else {
251
+ const y = q * size;
252
+ const trail = ctx.createLinearGradient(0, y - SCAN_TRAIL, 0, y);
253
+ trail.addColorStop(0, "transparent");
254
+ trail.addColorStop(1, ink);
255
+ ctx.globalAlpha = .08 * fade;
256
+ ctx.fillStyle = trail;
257
+ ctx.fillRect(0, y - SCAN_TRAIL, size, SCAN_TRAIL);
258
+ ctx.globalAlpha = .3 * fade;
259
+ ctx.fillStyle = ink;
260
+ ctx.fillRect(0, y - 1, size, 1.5);
261
+ }
262
+ ctx.restore();
263
+ }
264
+ for (const p of pieces) {
265
+ const t = (clock - pieceStart(p, variant, size)) / PIECE_IN;
266
+ if (t <= 0 || t >= 1) continue;
267
+ const k = settle(t);
268
+ const half = p.side / 2;
269
+ const cx = p.x + half;
270
+ const cy = p.y + half;
271
+ ctx.save();
272
+ if (variant === "ripple") {
273
+ ctx.globalAlpha = Math.min(1, t * 4);
274
+ ctx.translate(cx, cy);
275
+ if (p.eye) {
276
+ ctx.scale(k, k);
277
+ drawEye(ctx, -half, -half, p.side, cell, radius);
278
+ } else {
279
+ const s = dot * k;
280
+ ctx.beginPath();
281
+ ctx.roundRect(-s / 2, -s / 2, s, s, s / 2 + (radius - s / 2) * k);
282
+ ctx.fill();
283
+ }
284
+ } else if (variant === "smoke") {
285
+ ctx.globalAlpha = k ** 1.4;
286
+ ctx.translate(0, (1 - k) * cell * SMOKE_DRIFT);
287
+ if (p.eye) drawEye(ctx, p.x, p.y, p.side, cell, radius);
288
+ else {
289
+ ctx.beginPath();
290
+ ctx.roundRect(p.x, p.y, dot, dot, radius);
291
+ ctx.fill();
292
+ }
293
+ } else if (variant === "scan") {
294
+ ctx.globalAlpha = Math.min(1, t * 3);
295
+ ctx.translate(0, -(1 - k) * cell * DROP);
296
+ if (p.eye) drawEye(ctx, p.x, p.y, p.side, cell, radius);
297
+ else {
298
+ ctx.beginPath();
299
+ ctx.roundRect(p.x, p.y, dot, dot, radius);
300
+ ctx.fill();
301
+ }
302
+ } else {
303
+ const dx = cx - ox;
304
+ const dy = cy - oy;
305
+ const side = dx < 0 ? 1 : -1;
306
+ const bend = (BEND + BEND_SPREAD * p.r) * side;
307
+ const qx = ox + dx / 2 + dy * bend;
308
+ const qy = oy + dy / 2 - dx * bend;
309
+ const u = 1 - k;
310
+ const x = u * u * ox + 2 * u * k * qx + k * k * cx;
311
+ const y = u * u * oy + 2 * u * k * qy + k * k * cy;
312
+ const angle = Math.atan2(u * (qy - oy) + k * (cy - qy), u * (qx - ox) + k * (cx - qx));
313
+ const rest = Math.round(angle / QUARTER) * QUARTER;
314
+ const v = speedAt(t) * p.d;
315
+ const along = 1 + STRETCH * v * (p.eye ? EYE_STRETCH : 1);
316
+ const across = 1 / along;
317
+ ctx.globalAlpha = Math.min(1, t * 6);
318
+ ctx.translate(x, y);
319
+ ctx.rotate(rest + (angle - rest) * (1 - k) ** 2);
320
+ if (p.eye) {
321
+ ctx.scale(along, across);
322
+ drawEye(ctx, -half, -half, p.side, cell, radius);
323
+ } else {
324
+ const l = dot * along;
325
+ const w = dot * across;
326
+ ctx.beginPath();
327
+ ctx.roundRect(-l / 2, -w / 2, l, w, Math.min(w / 2, radius + (w / 2 - radius) * Math.min(1, v * 2)));
328
+ ctx.fill();
329
+ }
330
+ }
331
+ ctx.restore();
332
+ }
333
+ if (variant === "smoke") drawSmoke(ctx, layout, clock, ink);
334
+ ctx.globalAlpha = 1;
335
+ }
336
+ /**
337
+ * A QR code drawn on a canvas that builds itself piece by piece: the dots and
338
+ * the three finder eyes fly in on curved paths, pop in behind a spreading
339
+ * ring, or drop in behind a bar sweeping down. One reversible clock runs it,
340
+ * so hiding plays the build backwards and a press mid-run turns around from
341
+ * where it is.
342
+ */
343
+ function AnimatedQrCode({ value, shown, variant = "swarm", size = 296, origin, ink = "#0a0a0a", paper = "#ffffff", onSettled, labels, className }) {
344
+ const t = useMessages("AnimatedQrCode", qrCodeMessages, labels);
345
+ const reduce = useReducedMotion() ?? false;
346
+ const canvasRef = useRef(null);
347
+ const ctxRef = useRef(null);
348
+ const clockRef = useRef(shown ? TOTAL : 0);
349
+ /** Clock ms per real ms, signed. Eased toward its goal on a turnaround. */
350
+ const rateRef = useRef(0);
351
+ const fallback = DEFAULT_ORIGIN[variant === "ripple" ? "ripple" : "swarm"];
352
+ const ox = origin?.x ?? fallback.x;
353
+ const oy = origin?.y ?? fallback.y;
354
+ const layout = useMemo(() => buildLayout(value, size, {
355
+ x: ox,
356
+ y: oy
357
+ }), [
358
+ value,
359
+ size,
360
+ ox,
361
+ oy
362
+ ]);
363
+ const live = useRef({
364
+ layout,
365
+ variant,
366
+ reduce,
367
+ ink,
368
+ paper,
369
+ onSettled
370
+ });
371
+ useLayoutEffect(() => {
372
+ live.current = {
373
+ layout,
374
+ variant,
375
+ reduce,
376
+ ink,
377
+ paper,
378
+ onSettled
379
+ };
380
+ });
381
+ useLayoutEffect(() => {
382
+ const canvas = canvasRef.current;
383
+ if (!canvas) return;
384
+ const dpr = Math.max(1, window.devicePixelRatio || 1);
385
+ canvas.width = Math.round(size * dpr);
386
+ canvas.height = Math.round(size * dpr);
387
+ const ctx = canvas.getContext("2d");
388
+ if (!ctx) return;
389
+ ctx.scale(dpr, dpr);
390
+ ctxRef.current = ctx;
391
+ }, [size]);
392
+ useLayoutEffect(() => {
393
+ const ctx = ctxRef.current;
394
+ if (ctx) draw(ctx, layout, clockRef.current, variant, reduce, ink, paper);
395
+ }, [
396
+ layout,
397
+ variant,
398
+ reduce,
399
+ ink,
400
+ paper
401
+ ]);
402
+ useEffect(() => {
403
+ const target = shown ? TOTAL : 0;
404
+ if (clockRef.current === target) return;
405
+ if (clockRef.current === 0 || clockRef.current === TOTAL) rateRef.current = shown ? 1 : -1.6;
406
+ let frame = 0;
407
+ let last = performance.now();
408
+ const tick = (now) => {
409
+ const dt = Math.min(250, now - last);
410
+ last = now;
411
+ const cur = live.current;
412
+ rateRef.current += ((shown ? 1 : -1.6) - rateRef.current) * (1 - Math.exp(-dt / TURN_MS));
413
+ const scale = cur.reduce ? TOTAL / REDUCED_MS : 1;
414
+ const next = Math.min(TOTAL, Math.max(0, clockRef.current + dt * rateRef.current * scale));
415
+ clockRef.current = next;
416
+ const ctx = ctxRef.current;
417
+ if (ctx) draw(ctx, cur.layout, next, cur.variant, cur.reduce, cur.ink, cur.paper);
418
+ if (next === target) {
419
+ cur.onSettled?.(shown);
420
+ return;
421
+ }
422
+ frame = requestAnimationFrame(tick);
423
+ };
424
+ frame = requestAnimationFrame(tick);
425
+ return () => cancelAnimationFrame(frame);
426
+ }, [shown]);
427
+ return /* @__PURE__ */ jsx("canvas", {
428
+ ref: canvasRef,
429
+ role: "img",
430
+ "aria-label": shown ? t("label", { value }) : void 0,
431
+ "aria-hidden": shown ? void 0 : true,
432
+ width: size,
433
+ height: size,
434
+ className: cn("ring-border aspect-square h-auto max-w-full rounded-2xl ring-1", className),
435
+ style: {
436
+ width: size,
437
+ backgroundColor: paper
438
+ }
439
+ });
440
+ }
441
+ export { AnimatedQrCode, qrCodeMessages };
442
+
443
+ //# sourceMappingURL=qr-code.js.map