@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
@@ -12,14 +12,14 @@ export interface HoverGesture {
12
12
  /**
13
13
  * Pairs a surface's enter with its leave, per pointer.
14
14
  *
15
- * `isHoveringPointer` answers the question the *enter* asks — is this pointer
16
- * resting on the surface or pressing it — and both boundary cases go wrong if
15
+ * `isHoveringPointer` answers the question the *enter* asks - is this pointer
16
+ * resting on the surface or pressing it - and both boundary cases go wrong if
17
17
  * the leave is asked the same question again:
18
18
  *
19
19
  * - A pen with no hover never rests. It arrives in contact, taps, and the spec
20
20
  * then requires its boundary events after `pointerup`, so the leave carries
21
21
  * `buttons: 0` and reads as a mouse gliding off. Hover teardown then undid
22
- * the tap — the panel the pen had just opened closed under it.
22
+ * the tap - the panel the pen had just opened closed under it.
23
23
  * - A mouse pressed on the surface and dragged off leaves with `buttons: 1`.
24
24
  * Skipping teardown there strands the surface open: the release happens
25
25
  * outside, and no second leave ever comes.
@@ -27,8 +27,8 @@ export interface HoverGesture {
27
27
  * So the state a hover holds is released by the pointer that took it, whatever
28
28
  * the buttons say at the boundary, and a pointer that arrived in contact never
29
29
  * took it in the first place. Contact is the exception tracked here, not
30
- * hover: a leave from a pointer this surface never saw enter — mounted under
31
- * the cursor, say — still counts, since the alternative is state with no way
30
+ * hover: a leave from a pointer this surface never saw enter - mounted under
31
+ * the cursor, say - still counts, since the alternative is state with no way
32
32
  * out.
33
33
  */
34
34
  export declare function useHoverGesture(): HoverGesture;
@@ -5,14 +5,14 @@ import { isHoveringPointer } from "../lib/touch.js";
5
5
  /**
6
6
  * Pairs a surface's enter with its leave, per pointer.
7
7
  *
8
- * `isHoveringPointer` answers the question the *enter* asks — is this pointer
9
- * resting on the surface or pressing it — and both boundary cases go wrong if
8
+ * `isHoveringPointer` answers the question the *enter* asks - is this pointer
9
+ * resting on the surface or pressing it - and both boundary cases go wrong if
10
10
  * the leave is asked the same question again:
11
11
  *
12
12
  * - A pen with no hover never rests. It arrives in contact, taps, and the spec
13
13
  * then requires its boundary events after `pointerup`, so the leave carries
14
14
  * `buttons: 0` and reads as a mouse gliding off. Hover teardown then undid
15
- * the tap — the panel the pen had just opened closed under it.
15
+ * the tap - the panel the pen had just opened closed under it.
16
16
  * - A mouse pressed on the surface and dragged off leaves with `buttons: 1`.
17
17
  * Skipping teardown there strands the surface open: the release happens
18
18
  * outside, and no second leave ever comes.
@@ -20,8 +20,8 @@ import { isHoveringPointer } from "../lib/touch.js";
20
20
  * So the state a hover holds is released by the pointer that took it, whatever
21
21
  * the buttons say at the boundary, and a pointer that arrived in contact never
22
22
  * took it in the first place. Contact is the exception tracked here, not
23
- * hover: a leave from a pointer this surface never saw enter — mounted under
24
- * the cursor, say — still counts, since the alternative is state with no way
23
+ * hover: a leave from a pointer this surface never saw enter - mounted under
24
+ * the cursor, say - still counts, since the alternative is state with no way
25
25
  * out.
26
26
  */
27
27
  function useHoverGesture() {
@@ -1 +1 @@
1
- {"version":3,"file":"use-hover-gesture.js","names":[],"sources":["../../src/hooks/use-hover-gesture.ts"],"sourcesContent":["\"use client\";\n\nimport { useMemo, useRef } from \"react\";\n\nimport { isHoveringPointer } from \"../lib/touch\";\n\ninterface BoundaryEvent {\n pointerId: number;\n pointerType: string;\n buttons: number;\n}\n\nexport interface HoverGesture {\n /** True when this enter starts a hover: the pointer arrived resting, not pressing. */\n enter: (event: BoundaryEvent) => boolean;\n /** True when this leave ends a hover that entered as one. */\n leave: (event: BoundaryEvent) => boolean;\n}\n\n/**\n * Pairs a surface's enter with its leave, per pointer.\n *\n * `isHoveringPointer` answers the question the *enter* asks — is this pointer\n * resting on the surface or pressing it — and both boundary cases go wrong if\n * the leave is asked the same question again:\n *\n * - A pen with no hover never rests. It arrives in contact, taps, and the spec\n * then requires its boundary events after `pointerup`, so the leave carries\n * `buttons: 0` and reads as a mouse gliding off. Hover teardown then undid\n * the tap — the panel the pen had just opened closed under it.\n * - A mouse pressed on the surface and dragged off leaves with `buttons: 1`.\n * Skipping teardown there strands the surface open: the release happens\n * outside, and no second leave ever comes.\n *\n * So the state a hover holds is released by the pointer that took it, whatever\n * the buttons say at the boundary, and a pointer that arrived in contact never\n * took it in the first place. Contact is the exception tracked here, not\n * hover: a leave from a pointer this surface never saw enter — mounted under\n * the cursor, say — still counts, since the alternative is state with no way\n * out.\n */\nexport function useHoverGesture(): HoverGesture {\n const contact = useRef(new Set<number>());\n\n return useMemo(\n () => ({\n enter: (event) => {\n if (isHoveringPointer(event)) {\n contact.current.delete(event.pointerId);\n return true;\n }\n contact.current.add(event.pointerId);\n return false;\n },\n leave: (event) => {\n const arrivedInContact = contact.current.delete(event.pointerId);\n return !arrivedInContact && event.pointerType !== \"touch\";\n },\n }),\n [],\n );\n}\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;AAyCA,SAAgB,kBAAgC;CAC9C,MAAM,UAAU,uBAAO,IAAI,IAAY,CAAC;CAExC,OAAO,eACE;EACL,QAAQ,UAAU;GAChB,IAAI,kBAAkB,KAAK,GAAG;IAC5B,QAAQ,QAAQ,OAAO,MAAM,SAAS;IACtC,OAAO;GACT;GACA,QAAQ,QAAQ,IAAI,MAAM,SAAS;GACnC,OAAO;EACT;EACA,QAAQ,UAAU;GAEhB,OAAO,CADkB,QAAQ,QAAQ,OAAO,MAAM,SAC/B,KAAK,MAAM,gBAAgB;EACpD;CACF,IACA,CAAC,CACH;AACF"}
1
+ {"version":3,"file":"use-hover-gesture.js","names":[],"sources":["../../src/hooks/use-hover-gesture.ts"],"sourcesContent":["\"use client\";\n\nimport { useMemo, useRef } from \"react\";\n\nimport { isHoveringPointer } from \"../lib/touch\";\n\ninterface BoundaryEvent {\n pointerId: number;\n pointerType: string;\n buttons: number;\n}\n\nexport interface HoverGesture {\n /** True when this enter starts a hover: the pointer arrived resting, not pressing. */\n enter: (event: BoundaryEvent) => boolean;\n /** True when this leave ends a hover that entered as one. */\n leave: (event: BoundaryEvent) => boolean;\n}\n\n/**\n * Pairs a surface's enter with its leave, per pointer.\n *\n * `isHoveringPointer` answers the question the *enter* asks - is this pointer\n * resting on the surface or pressing it - and both boundary cases go wrong if\n * the leave is asked the same question again:\n *\n * - A pen with no hover never rests. It arrives in contact, taps, and the spec\n * then requires its boundary events after `pointerup`, so the leave carries\n * `buttons: 0` and reads as a mouse gliding off. Hover teardown then undid\n * the tap - the panel the pen had just opened closed under it.\n * - A mouse pressed on the surface and dragged off leaves with `buttons: 1`.\n * Skipping teardown there strands the surface open: the release happens\n * outside, and no second leave ever comes.\n *\n * So the state a hover holds is released by the pointer that took it, whatever\n * the buttons say at the boundary, and a pointer that arrived in contact never\n * took it in the first place. Contact is the exception tracked here, not\n * hover: a leave from a pointer this surface never saw enter - mounted under\n * the cursor, say - still counts, since the alternative is state with no way\n * out.\n */\nexport function useHoverGesture(): HoverGesture {\n const contact = useRef(new Set<number>());\n\n return useMemo(\n () => ({\n enter: (event) => {\n if (isHoveringPointer(event)) {\n contact.current.delete(event.pointerId);\n return true;\n }\n contact.current.add(event.pointerId);\n return false;\n },\n leave: (event) => {\n const arrivedInContact = contact.current.delete(event.pointerId);\n return !arrivedInContact && event.pointerType !== \"touch\";\n },\n }),\n [],\n );\n}\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;AAyCA,SAAgB,kBAAgC;CAC9C,MAAM,UAAU,uBAAO,IAAI,IAAY,CAAC;CAExC,OAAO,eACE;EACL,QAAQ,UAAU;GAChB,IAAI,kBAAkB,KAAK,GAAG;IAC5B,QAAQ,QAAQ,OAAO,MAAM,SAAS;IACtC,OAAO;GACT;GACA,QAAQ,QAAQ,IAAI,MAAM,SAAS;GACnC,OAAO;EACT;EACA,QAAQ,UAAU;GAEhB,OAAO,CADkB,QAAQ,QAAQ,OAAO,MAAM,SAC/B,KAAK,MAAM,gBAAgB;EACpD;CACF,IACA,CAAC,CACH;AACF"}
@@ -23,5 +23,6 @@ export declare function useListbox({ open, rows, selected, list }: {
23
23
  }): {
24
24
  activeId: string;
25
25
  onKeyDown: (event: KeyboardEvent) => void;
26
+ moveTo: (id: string | null) => void;
26
27
  };
27
28
  //# sourceMappingURL=use-listbox.d.ts.map
@@ -66,7 +66,8 @@ function useListbox({ open, rows, selected, list }) {
66
66
  };
67
67
  return {
68
68
  activeId,
69
- onKeyDown
69
+ onKeyDown,
70
+ moveTo
70
71
  };
71
72
  }
72
73
  export { useListbox };
@@ -1 +1 @@
1
- {"version":3,"file":"use-listbox.js","names":[],"sources":["../../src/hooks/use-listbox.ts"],"sourcesContent":["\"use client\";\n\nimport { type KeyboardEvent, type RefObject, useEffect, useMemo, useRef } from \"react\";\n\nimport { useOnOpen } from \"./use-on-open\";\nimport { useRowCursor } from \"./use-row-cursor\";\n\nexport interface ListboxRow {\n id: string;\n label: string;\n disabled?: boolean;\n}\n\n// How long typed characters keep building one typeahead query.\nconst TYPEAHEAD_MS = 500;\n\n/**\n * Keyboard model for a popup listbox whose options are focusable buttons.\n *\n * The active option is resolved during render through `useRowCursor`, so the\n * roving `tabIndex` and the next key press always agree with what is on\n * screen. Opening starts on the selected option, or the first enabled one.\n * Arrow keys, Home and End move between enabled options, and printable\n * characters jump to the next option whose label starts with what was typed.\n * DOM focus follows the active option while the list is open; each option\n * carries its id in `data-listbox-id` so the list can find it.\n */\nexport function useListbox({\n open,\n rows,\n selected,\n list,\n}: {\n open: boolean;\n rows: readonly ListboxRow[];\n selected: string | undefined;\n list: RefObject<HTMLElement | null>;\n}) {\n const enabled = useMemo(() => rows.filter((row) => !row.disabled), [rows]);\n const { activeIndex, moveTo, moveActive } = useRowCursor(enabled, \"\");\n useOnOpen(open, () =>\n moveTo(enabled.some((row) => row.id === selected) ? (selected ?? null) : null),\n );\n const activeId = enabled[activeIndex]?.id;\n const typed = useRef({ text: \"\", at: 0 });\n // A list rendered open does not take focus from the page on mount; focus\n // follows only once it has been opened, or once focus is already inside.\n const openedOnMount = useRef(open);\n useEffect(() => {\n if (!open) openedOnMount.current = false;\n }, [open]);\n\n useEffect(() => {\n if (!open || activeId === undefined) return;\n if (openedOnMount.current && !list.current?.contains(document.activeElement)) return;\n const option = Array.from(\n list.current?.querySelectorAll<HTMLElement>(\"[data-listbox-id]\") ?? [],\n ).find((element) => element.dataset.listboxId === activeId);\n option?.focus({ preventScroll: false });\n }, [open, activeId, list]);\n\n const onKeyDown = (event: KeyboardEvent) => {\n const { key } = event;\n if (key === \"ArrowDown\" || key === \"ArrowUp\") {\n event.preventDefault();\n moveActive(key === \"ArrowDown\" ? 1 : -1);\n } else if (key === \"Home\" || key === \"End\") {\n event.preventDefault();\n const row = key === \"Home\" ? enabled[0] : enabled[enabled.length - 1];\n if (row) moveTo(row.id);\n } else if (\n key.length === 1 &&\n key !== \" \" &&\n !event.ctrlKey &&\n !event.metaKey &&\n !event.altKey\n ) {\n const now = Date.now();\n const char = key.toLowerCase();\n const text = now - typed.current.at < TYPEAHEAD_MS ? typed.current.text + char : char;\n typed.current = { text, at: now };\n // A repeated single letter cycles through the options that start with it.\n const from = text.length === 1 ? activeIndex + 1 : activeIndex;\n for (let step = 0; step < enabled.length; step++) {\n const row = enabled[(from + step) % enabled.length];\n if (row.label.toLowerCase().startsWith(text)) {\n moveTo(row.id);\n break;\n }\n }\n }\n };\n\n return { activeId, onKeyDown };\n}\n"],"mappings":";;;;;AAcA,MAAM,eAAe;;;;;;;;;;;;AAarB,SAAgB,WAAW,EACzB,MACA,MACA,UACA,QAMC;CACD,MAAM,UAAU,cAAc,KAAK,QAAQ,QAAQ,CAAC,IAAI,QAAQ,GAAG,CAAC,IAAI,CAAC;CACzE,MAAM,EAAE,aAAa,QAAQ,eAAe,aAAa,SAAS,EAAE;CACpE,UAAU,YACR,OAAO,QAAQ,MAAM,QAAQ,IAAI,OAAO,QAAQ,IAAK,YAAY,OAAQ,IAAI,CAC/E;CACA,MAAM,WAAW,QAAQ,YAAY,EAAE;CACvC,MAAM,QAAQ,OAAO;EAAE,MAAM;EAAI,IAAI;CAAE,CAAC;CAGxC,MAAM,gBAAgB,OAAO,IAAI;CACjC,gBAAgB;EACd,IAAI,CAAC,MAAM,cAAc,UAAU;CACrC,GAAG,CAAC,IAAI,CAAC;CAET,gBAAgB;EACd,IAAI,CAAC,QAAQ,aAAa,KAAA,GAAW;EACrC,IAAI,cAAc,WAAW,CAAC,KAAK,SAAS,SAAS,SAAS,aAAa,GAAG;EAC/D,MAAM,KACnB,KAAK,SAAS,iBAA8B,mBAAmB,KAAK,CAAC,CACvE,CAAC,CAAC,MAAM,YAAY,QAAQ,QAAQ,cAAc,QAC7C,CAAC,EAAE,MAAM,EAAE,eAAe,MAAM,CAAC;CACxC,GAAG;EAAC;EAAM;EAAU;CAAI,CAAC;CAEzB,MAAM,aAAa,UAAyB;EAC1C,MAAM,EAAE,QAAQ;EAChB,IAAI,QAAQ,eAAe,QAAQ,WAAW;GAC5C,MAAM,eAAe;GACrB,WAAW,QAAQ,cAAc,IAAI,EAAE;EACzC,OAAO,IAAI,QAAQ,UAAU,QAAQ,OAAO;GAC1C,MAAM,eAAe;GACrB,MAAM,MAAM,QAAQ,SAAS,QAAQ,KAAK,QAAQ,QAAQ,SAAS;GACnE,IAAI,KAAK,OAAO,IAAI,EAAE;EACxB,OAAO,IACL,IAAI,WAAW,KACf,QAAQ,OACR,CAAC,MAAM,WACP,CAAC,MAAM,WACP,CAAC,MAAM,QACP;GACA,MAAM,MAAM,KAAK,IAAI;GACrB,MAAM,OAAO,IAAI,YAAY;GAC7B,MAAM,OAAO,MAAM,MAAM,QAAQ,KAAK,eAAe,MAAM,QAAQ,OAAO,OAAO;GACjF,MAAM,UAAU;IAAE;IAAM,IAAI;GAAI;GAEhC,MAAM,OAAO,KAAK,WAAW,IAAI,cAAc,IAAI;GACnD,KAAK,IAAI,OAAO,GAAG,OAAO,QAAQ,QAAQ,QAAQ;IAChD,MAAM,MAAM,SAAS,OAAO,QAAQ,QAAQ;IAC5C,IAAI,IAAI,MAAM,YAAY,CAAC,CAAC,WAAW,IAAI,GAAG;KAC5C,OAAO,IAAI,EAAE;KACb;IACF;GACF;EACF;CACF;CAEA,OAAO;EAAE;EAAU;CAAU;AAC/B"}
1
+ {"version":3,"file":"use-listbox.js","names":[],"sources":["../../src/hooks/use-listbox.ts"],"sourcesContent":["\"use client\";\n\nimport { type KeyboardEvent, type RefObject, useEffect, useMemo, useRef } from \"react\";\n\nimport { useOnOpen } from \"./use-on-open\";\nimport { useRowCursor } from \"./use-row-cursor\";\n\nexport interface ListboxRow {\n id: string;\n label: string;\n disabled?: boolean;\n}\n\n// How long typed characters keep building one typeahead query.\nconst TYPEAHEAD_MS = 500;\n\n/**\n * Keyboard model for a popup listbox whose options are focusable buttons.\n *\n * The active option is resolved during render through `useRowCursor`, so the\n * roving `tabIndex` and the next key press always agree with what is on\n * screen. Opening starts on the selected option, or the first enabled one.\n * Arrow keys, Home and End move between enabled options, and printable\n * characters jump to the next option whose label starts with what was typed.\n * DOM focus follows the active option while the list is open; each option\n * carries its id in `data-listbox-id` so the list can find it.\n */\nexport function useListbox({\n open,\n rows,\n selected,\n list,\n}: {\n open: boolean;\n rows: readonly ListboxRow[];\n selected: string | undefined;\n list: RefObject<HTMLElement | null>;\n}) {\n const enabled = useMemo(() => rows.filter((row) => !row.disabled), [rows]);\n const { activeIndex, moveTo, moveActive } = useRowCursor(enabled, \"\");\n useOnOpen(open, () =>\n moveTo(enabled.some((row) => row.id === selected) ? (selected ?? null) : null),\n );\n const activeId = enabled[activeIndex]?.id;\n const typed = useRef({ text: \"\", at: 0 });\n // A list rendered open does not take focus from the page on mount; focus\n // follows only once it has been opened, or once focus is already inside.\n const openedOnMount = useRef(open);\n useEffect(() => {\n if (!open) openedOnMount.current = false;\n }, [open]);\n\n useEffect(() => {\n if (!open || activeId === undefined) return;\n if (openedOnMount.current && !list.current?.contains(document.activeElement)) return;\n const option = Array.from(\n list.current?.querySelectorAll<HTMLElement>(\"[data-listbox-id]\") ?? [],\n ).find((element) => element.dataset.listboxId === activeId);\n option?.focus({ preventScroll: false });\n }, [open, activeId, list]);\n\n const onKeyDown = (event: KeyboardEvent) => {\n const { key } = event;\n if (key === \"ArrowDown\" || key === \"ArrowUp\") {\n event.preventDefault();\n moveActive(key === \"ArrowDown\" ? 1 : -1);\n } else if (key === \"Home\" || key === \"End\") {\n event.preventDefault();\n const row = key === \"Home\" ? enabled[0] : enabled[enabled.length - 1];\n if (row) moveTo(row.id);\n } else if (\n key.length === 1 &&\n key !== \" \" &&\n !event.ctrlKey &&\n !event.metaKey &&\n !event.altKey\n ) {\n const now = Date.now();\n const char = key.toLowerCase();\n const text = now - typed.current.at < TYPEAHEAD_MS ? typed.current.text + char : char;\n typed.current = { text, at: now };\n // A repeated single letter cycles through the options that start with it.\n const from = text.length === 1 ? activeIndex + 1 : activeIndex;\n for (let step = 0; step < enabled.length; step++) {\n const row = enabled[(from + step) % enabled.length];\n if (row.label.toLowerCase().startsWith(text)) {\n moveTo(row.id);\n break;\n }\n }\n }\n };\n\n // `moveTo` lets a pointer resting on an option make it the active one, so a\n // highlight drawn from `activeId` follows the mouse as well as the keys.\n return { activeId, onKeyDown, moveTo };\n}\n"],"mappings":";;;;;AAcA,MAAM,eAAe;;;;;;;;;;;;AAarB,SAAgB,WAAW,EACzB,MACA,MACA,UACA,QAMC;CACD,MAAM,UAAU,cAAc,KAAK,QAAQ,QAAQ,CAAC,IAAI,QAAQ,GAAG,CAAC,IAAI,CAAC;CACzE,MAAM,EAAE,aAAa,QAAQ,eAAe,aAAa,SAAS,EAAE;CACpE,UAAU,YACR,OAAO,QAAQ,MAAM,QAAQ,IAAI,OAAO,QAAQ,IAAK,YAAY,OAAQ,IAAI,CAC/E;CACA,MAAM,WAAW,QAAQ,YAAY,EAAE;CACvC,MAAM,QAAQ,OAAO;EAAE,MAAM;EAAI,IAAI;CAAE,CAAC;CAGxC,MAAM,gBAAgB,OAAO,IAAI;CACjC,gBAAgB;EACd,IAAI,CAAC,MAAM,cAAc,UAAU;CACrC,GAAG,CAAC,IAAI,CAAC;CAET,gBAAgB;EACd,IAAI,CAAC,QAAQ,aAAa,KAAA,GAAW;EACrC,IAAI,cAAc,WAAW,CAAC,KAAK,SAAS,SAAS,SAAS,aAAa,GAAG;EAC/D,MAAM,KACnB,KAAK,SAAS,iBAA8B,mBAAmB,KAAK,CAAC,CACvE,CAAC,CAAC,MAAM,YAAY,QAAQ,QAAQ,cAAc,QAC7C,CAAC,EAAE,MAAM,EAAE,eAAe,MAAM,CAAC;CACxC,GAAG;EAAC;EAAM;EAAU;CAAI,CAAC;CAEzB,MAAM,aAAa,UAAyB;EAC1C,MAAM,EAAE,QAAQ;EAChB,IAAI,QAAQ,eAAe,QAAQ,WAAW;GAC5C,MAAM,eAAe;GACrB,WAAW,QAAQ,cAAc,IAAI,EAAE;EACzC,OAAO,IAAI,QAAQ,UAAU,QAAQ,OAAO;GAC1C,MAAM,eAAe;GACrB,MAAM,MAAM,QAAQ,SAAS,QAAQ,KAAK,QAAQ,QAAQ,SAAS;GACnE,IAAI,KAAK,OAAO,IAAI,EAAE;EACxB,OAAO,IACL,IAAI,WAAW,KACf,QAAQ,OACR,CAAC,MAAM,WACP,CAAC,MAAM,WACP,CAAC,MAAM,QACP;GACA,MAAM,MAAM,KAAK,IAAI;GACrB,MAAM,OAAO,IAAI,YAAY;GAC7B,MAAM,OAAO,MAAM,MAAM,QAAQ,KAAK,eAAe,MAAM,QAAQ,OAAO,OAAO;GACjF,MAAM,UAAU;IAAE;IAAM,IAAI;GAAI;GAEhC,MAAM,OAAO,KAAK,WAAW,IAAI,cAAc,IAAI;GACnD,KAAK,IAAI,OAAO,GAAG,OAAO,QAAQ,QAAQ,QAAQ;IAChD,MAAM,MAAM,SAAS,OAAO,QAAQ,QAAQ;IAC5C,IAAI,IAAI,MAAM,YAAY,CAAC,CAAC,WAAW,IAAI,GAAG;KAC5C,OAAO,IAAI,EAAE;KACb;IACF;GACF;EACF;CACF;CAIA,OAAO;EAAE;EAAU;EAAW;CAAO;AACvC"}
@@ -1,10 +1,10 @@
1
1
  "use client";
2
2
  import { useEffect, useLayoutEffect, useRef } from "react";
3
- import { FOCUSABLE_SELECTOR } from "../lib/focusable.js";
3
+ import { cycleTab, focusFirstIn } from "../lib/focusable.js";
4
+ import { inLayerAbove, openLayer, ownsEscape, trapAbove } from "../lib/layers.js";
5
+ import { lockScroll } from "../lib/scroll-lock.js";
4
6
  // src/hooks/use-modal-scope.ts
5
7
  const inertOwners = /* @__PURE__ */ new Map();
6
- let scrollOwners = 0;
7
- let previousOverflow = "";
8
8
  /** A portal root owns sibling inertness and scroll locking until its open state ends. */
9
9
  function useModalScope(open, root, panel, onClose) {
10
10
  const close = useRef(onClose);
@@ -24,43 +24,39 @@ function useModalScope(open, root, panel, onClose) {
24
24
  inertOwners.set(element, owner);
25
25
  element.inert = true;
26
26
  }
27
- if (scrollOwners++ === 0) {
28
- previousOverflow = document.body.style.overflow;
29
- document.body.style.overflow = "hidden";
30
- }
31
- const focusables = () => Array.from(panel.current?.querySelectorAll(FOCUSABLE_SELECTOR) ?? []).filter((element) => element.tabIndex >= 0 && !element.closest("[inert]"));
32
- const focusFirst = () => (focusables()[0] ?? panel.current)?.focus({ preventScroll: true });
33
- focusFirst();
27
+ const unlockScroll = lockScroll();
28
+ const layer = {
29
+ contains: (target) => Boolean(root.current?.contains(target)),
30
+ traps: true
31
+ };
32
+ const closeLayer = openLayer(layer);
33
+ focusFirstIn(panel.current);
34
34
  const onFocus = (event) => {
35
- if (event.target instanceof Node && !panel.current?.contains(event.target) && !root.current?.inert) focusFirst();
35
+ const target = event.target;
36
+ if (!(target instanceof Node) || root.current?.inert) return;
37
+ if (panel.current?.contains(target)) return;
38
+ if (inLayerAbove(layer, target) || trapAbove(layer)) return;
39
+ focusFirstIn(panel.current);
36
40
  };
37
41
  const onKey = (event) => {
38
42
  if (root.current?.inert) return;
39
43
  if (event.key === "Escape") {
44
+ if (!ownsEscape(layer, event)) return;
40
45
  event.preventDefault();
41
46
  event.stopPropagation();
42
47
  close.current();
48
+ return;
43
49
  }
44
- if (event.key !== "Tab") return;
45
- const elements = focusables();
46
- const first = elements[0];
47
- const last = elements[elements.length - 1];
48
- if (!first || !last) {
49
- event.preventDefault();
50
- panel.current?.focus();
51
- } else if (event.shiftKey && document.activeElement === first) {
52
- event.preventDefault();
53
- last.focus();
54
- } else if (!event.shiftKey && document.activeElement === last) {
55
- event.preventDefault();
56
- first.focus();
57
- }
50
+ const active = document.activeElement;
51
+ if (event.defaultPrevented || active && inLayerAbove(layer, active)) return;
52
+ cycleTab(event, panel.current);
58
53
  };
59
54
  document.addEventListener("focusin", onFocus);
60
55
  document.addEventListener("keydown", onKey);
61
56
  return () => {
62
57
  document.removeEventListener("focusin", onFocus);
63
58
  document.removeEventListener("keydown", onKey);
59
+ closeLayer();
64
60
  for (const element of siblings) {
65
61
  const owner = inertOwners.get(element);
66
62
  if (owner && --owner.count === 0) {
@@ -68,7 +64,7 @@ function useModalScope(open, root, panel, onClose) {
68
64
  inertOwners.delete(element);
69
65
  }
70
66
  }
71
- if (--scrollOwners === 0) document.body.style.overflow = previousOverflow;
67
+ unlockScroll();
72
68
  if (returnFocus?.isConnected && !returnFocus.closest("[inert]")) returnFocus.focus({ preventScroll: true });
73
69
  };
74
70
  }, [
@@ -1 +1 @@
1
- {"version":3,"file":"use-modal-scope.js","names":[],"sources":["../../src/hooks/use-modal-scope.ts"],"sourcesContent":["\"use client\";\n\nimport { type RefObject, useEffect, useLayoutEffect, useRef } from \"react\";\n\nimport { FOCUSABLE_SELECTOR } from \"../lib/focusable\";\n\nconst inertOwners = new Map<HTMLElement, { count: number; previous: boolean }>();\nlet scrollOwners = 0;\nlet previousOverflow = \"\";\n\n/** A portal root owns sibling inertness and scroll locking until its open state ends. */\nexport function useModalScope(\n open: boolean,\n root: RefObject<HTMLElement | null>,\n panel: RefObject<HTMLElement | null>,\n onClose: () => void,\n) {\n const close = useRef(onClose);\n useLayoutEffect(() => {\n close.current = onClose;\n });\n useEffect(() => {\n if (!open || !root.current || !panel.current) return;\n const returnFocus =\n document.activeElement instanceof HTMLElement ? document.activeElement : null;\n const siblings = Array.from(document.body.children).filter(\n (element): element is HTMLElement =>\n element instanceof HTMLElement && element !== root.current,\n );\n for (const element of siblings) {\n const owner = inertOwners.get(element) ?? {\n count: 0,\n previous: element.inert,\n };\n owner.count += 1;\n inertOwners.set(element, owner);\n element.inert = true;\n }\n if (scrollOwners++ === 0) {\n previousOverflow = document.body.style.overflow;\n document.body.style.overflow = \"hidden\";\n }\n const focusables = () =>\n Array.from(panel.current?.querySelectorAll<HTMLElement>(FOCUSABLE_SELECTOR) ?? []).filter(\n (element) => element.tabIndex >= 0 && !element.closest(\"[inert]\"),\n );\n const focusFirst = () => (focusables()[0] ?? panel.current)?.focus({ preventScroll: true });\n focusFirst();\n const onFocus = (event: FocusEvent) => {\n if (\n event.target instanceof Node &&\n !panel.current?.contains(event.target) &&\n !root.current?.inert\n )\n focusFirst();\n };\n const onKey = (event: KeyboardEvent) => {\n if (root.current?.inert) return;\n if (event.key === \"Escape\") {\n event.preventDefault();\n event.stopPropagation();\n close.current();\n }\n if (event.key !== \"Tab\") return;\n const elements = focusables();\n const first = elements[0];\n const last = elements[elements.length - 1];\n if (!first || !last) {\n event.preventDefault();\n panel.current?.focus();\n } else if (event.shiftKey && document.activeElement === first) {\n event.preventDefault();\n last.focus();\n } else if (!event.shiftKey && document.activeElement === last) {\n event.preventDefault();\n first.focus();\n }\n };\n document.addEventListener(\"focusin\", onFocus);\n document.addEventListener(\"keydown\", onKey);\n return () => {\n document.removeEventListener(\"focusin\", onFocus);\n document.removeEventListener(\"keydown\", onKey);\n for (const element of siblings) {\n const owner = inertOwners.get(element);\n if (owner && --owner.count === 0) {\n element.inert = owner.previous;\n inertOwners.delete(element);\n }\n }\n if (--scrollOwners === 0) document.body.style.overflow = previousOverflow;\n if (returnFocus?.isConnected && !returnFocus.closest(\"[inert]\"))\n returnFocus.focus({ preventScroll: true });\n };\n }, [open, root, panel]);\n}\n"],"mappings":";;;;AAMA,MAAM,8BAAc,IAAI,IAAuD;AAC/E,IAAI,eAAe;AACnB,IAAI,mBAAmB;;AAGvB,SAAgB,cACd,MACA,MACA,OACA,SACA;CACA,MAAM,QAAQ,OAAO,OAAO;CAC5B,sBAAsB;EACpB,MAAM,UAAU;CAClB,CAAC;CACD,gBAAgB;EACd,IAAI,CAAC,QAAQ,CAAC,KAAK,WAAW,CAAC,MAAM,SAAS;EAC9C,MAAM,cACJ,SAAS,yBAAyB,cAAc,SAAS,gBAAgB;EAC3E,MAAM,WAAW,MAAM,KAAK,SAAS,KAAK,QAAQ,CAAC,CAAC,QACjD,YACC,mBAAmB,eAAe,YAAY,KAAK,OACvD;EACA,KAAK,MAAM,WAAW,UAAU;GAC9B,MAAM,QAAQ,YAAY,IAAI,OAAO,KAAK;IACxC,OAAO;IACP,UAAU,QAAQ;GACpB;GACA,MAAM,SAAS;GACf,YAAY,IAAI,SAAS,KAAK;GAC9B,QAAQ,QAAQ;EAClB;EACA,IAAI,mBAAmB,GAAG;GACxB,mBAAmB,SAAS,KAAK,MAAM;GACvC,SAAS,KAAK,MAAM,WAAW;EACjC;EACA,MAAM,mBACJ,MAAM,KAAK,MAAM,SAAS,iBAA8B,kBAAkB,KAAK,CAAC,CAAC,CAAC,CAAC,QAChF,YAAY,QAAQ,YAAY,KAAK,CAAC,QAAQ,QAAQ,SAAS,CAClE;EACF,MAAM,oBAAoB,WAAW,CAAC,CAAC,MAAM,MAAM,QAAA,EAAU,MAAM,EAAE,eAAe,KAAK,CAAC;EAC1F,WAAW;EACX,MAAM,WAAW,UAAsB;GACrC,IACE,MAAM,kBAAkB,QACxB,CAAC,MAAM,SAAS,SAAS,MAAM,MAAM,KACrC,CAAC,KAAK,SAAS,OAEf,WAAW;EACf;EACA,MAAM,SAAS,UAAyB;GACtC,IAAI,KAAK,SAAS,OAAO;GACzB,IAAI,MAAM,QAAQ,UAAU;IAC1B,MAAM,eAAe;IACrB,MAAM,gBAAgB;IACtB,MAAM,QAAQ;GAChB;GACA,IAAI,MAAM,QAAQ,OAAO;GACzB,MAAM,WAAW,WAAW;GAC5B,MAAM,QAAQ,SAAS;GACvB,MAAM,OAAO,SAAS,SAAS,SAAS;GACxC,IAAI,CAAC,SAAS,CAAC,MAAM;IACnB,MAAM,eAAe;IACrB,MAAM,SAAS,MAAM;GACvB,OAAO,IAAI,MAAM,YAAY,SAAS,kBAAkB,OAAO;IAC7D,MAAM,eAAe;IACrB,KAAK,MAAM;GACb,OAAO,IAAI,CAAC,MAAM,YAAY,SAAS,kBAAkB,MAAM;IAC7D,MAAM,eAAe;IACrB,MAAM,MAAM;GACd;EACF;EACA,SAAS,iBAAiB,WAAW,OAAO;EAC5C,SAAS,iBAAiB,WAAW,KAAK;EAC1C,aAAa;GACX,SAAS,oBAAoB,WAAW,OAAO;GAC/C,SAAS,oBAAoB,WAAW,KAAK;GAC7C,KAAK,MAAM,WAAW,UAAU;IAC9B,MAAM,QAAQ,YAAY,IAAI,OAAO;IACrC,IAAI,SAAS,EAAE,MAAM,UAAU,GAAG;KAChC,QAAQ,QAAQ,MAAM;KACtB,YAAY,OAAO,OAAO;IAC5B;GACF;GACA,IAAI,EAAE,iBAAiB,GAAG,SAAS,KAAK,MAAM,WAAW;GACzD,IAAI,aAAa,eAAe,CAAC,YAAY,QAAQ,SAAS,GAC5D,YAAY,MAAM,EAAE,eAAe,KAAK,CAAC;EAC7C;CACF,GAAG;EAAC;EAAM;EAAM;CAAK,CAAC;AACxB"}
1
+ {"version":3,"file":"use-modal-scope.js","names":[],"sources":["../../src/hooks/use-modal-scope.ts"],"sourcesContent":["\"use client\";\n\nimport { type RefObject, useEffect, useLayoutEffect, useRef } from \"react\";\n\nimport { cycleTab, focusFirstIn } from \"../lib/focusable\";\nimport { inLayerAbove, type Layer, openLayer, ownsEscape, trapAbove } from \"../lib/layers\";\nimport { lockScroll } from \"../lib/scroll-lock\";\n\nconst inertOwners = new Map<HTMLElement, { count: number; previous: boolean }>();\n\n/** A portal root owns sibling inertness and scroll locking until its open state ends. */\nexport function useModalScope(\n open: boolean,\n root: RefObject<HTMLElement | null>,\n panel: RefObject<HTMLElement | null>,\n onClose: () => void,\n) {\n const close = useRef(onClose);\n useLayoutEffect(() => {\n close.current = onClose;\n });\n useEffect(() => {\n if (!open || !root.current || !panel.current) return;\n const returnFocus =\n document.activeElement instanceof HTMLElement ? document.activeElement : null;\n const siblings = Array.from(document.body.children).filter(\n (element): element is HTMLElement =>\n element instanceof HTMLElement && element !== root.current,\n );\n for (const element of siblings) {\n const owner = inertOwners.get(element) ?? {\n count: 0,\n previous: element.inert,\n };\n owner.count += 1;\n inertOwners.set(element, owner);\n element.inert = true;\n }\n const unlockScroll = lockScroll();\n const layer: Layer = {\n contains: (target) => Boolean(root.current?.contains(target)),\n traps: true,\n };\n const closeLayer = openLayer(layer);\n focusFirstIn(panel.current);\n const onFocus = (event: FocusEvent) => {\n const target = event.target;\n if (!(target instanceof Node) || root.current?.inert) return;\n if (panel.current?.contains(target)) return;\n if (inLayerAbove(layer, target) || trapAbove(layer)) return;\n focusFirstIn(panel.current);\n };\n const onKey = (event: KeyboardEvent) => {\n if (root.current?.inert) return;\n if (event.key === \"Escape\") {\n if (!ownsEscape(layer, event)) return;\n event.preventDefault();\n event.stopPropagation();\n close.current();\n return;\n }\n const active = document.activeElement;\n if (event.defaultPrevented || (active && inLayerAbove(layer, active))) return;\n cycleTab(event, panel.current);\n };\n document.addEventListener(\"focusin\", onFocus);\n document.addEventListener(\"keydown\", onKey);\n return () => {\n document.removeEventListener(\"focusin\", onFocus);\n document.removeEventListener(\"keydown\", onKey);\n closeLayer();\n for (const element of siblings) {\n const owner = inertOwners.get(element);\n if (owner && --owner.count === 0) {\n element.inert = owner.previous;\n inertOwners.delete(element);\n }\n }\n unlockScroll();\n if (returnFocus?.isConnected && !returnFocus.closest(\"[inert]\"))\n returnFocus.focus({ preventScroll: true });\n };\n }, [open, root, panel]);\n}\n"],"mappings":";;;;;;AAQA,MAAM,8BAAc,IAAI,IAAuD;;AAG/E,SAAgB,cACd,MACA,MACA,OACA,SACA;CACA,MAAM,QAAQ,OAAO,OAAO;CAC5B,sBAAsB;EACpB,MAAM,UAAU;CAClB,CAAC;CACD,gBAAgB;EACd,IAAI,CAAC,QAAQ,CAAC,KAAK,WAAW,CAAC,MAAM,SAAS;EAC9C,MAAM,cACJ,SAAS,yBAAyB,cAAc,SAAS,gBAAgB;EAC3E,MAAM,WAAW,MAAM,KAAK,SAAS,KAAK,QAAQ,CAAC,CAAC,QACjD,YACC,mBAAmB,eAAe,YAAY,KAAK,OACvD;EACA,KAAK,MAAM,WAAW,UAAU;GAC9B,MAAM,QAAQ,YAAY,IAAI,OAAO,KAAK;IACxC,OAAO;IACP,UAAU,QAAQ;GACpB;GACA,MAAM,SAAS;GACf,YAAY,IAAI,SAAS,KAAK;GAC9B,QAAQ,QAAQ;EAClB;EACA,MAAM,eAAe,WAAW;EAChC,MAAM,QAAe;GACnB,WAAW,WAAW,QAAQ,KAAK,SAAS,SAAS,MAAM,CAAC;GAC5D,OAAO;EACT;EACA,MAAM,aAAa,UAAU,KAAK;EAClC,aAAa,MAAM,OAAO;EAC1B,MAAM,WAAW,UAAsB;GACrC,MAAM,SAAS,MAAM;GACrB,IAAI,EAAE,kBAAkB,SAAS,KAAK,SAAS,OAAO;GACtD,IAAI,MAAM,SAAS,SAAS,MAAM,GAAG;GACrC,IAAI,aAAa,OAAO,MAAM,KAAK,UAAU,KAAK,GAAG;GACrD,aAAa,MAAM,OAAO;EAC5B;EACA,MAAM,SAAS,UAAyB;GACtC,IAAI,KAAK,SAAS,OAAO;GACzB,IAAI,MAAM,QAAQ,UAAU;IAC1B,IAAI,CAAC,WAAW,OAAO,KAAK,GAAG;IAC/B,MAAM,eAAe;IACrB,MAAM,gBAAgB;IACtB,MAAM,QAAQ;IACd;GACF;GACA,MAAM,SAAS,SAAS;GACxB,IAAI,MAAM,oBAAqB,UAAU,aAAa,OAAO,MAAM,GAAI;GACvE,SAAS,OAAO,MAAM,OAAO;EAC/B;EACA,SAAS,iBAAiB,WAAW,OAAO;EAC5C,SAAS,iBAAiB,WAAW,KAAK;EAC1C,aAAa;GACX,SAAS,oBAAoB,WAAW,OAAO;GAC/C,SAAS,oBAAoB,WAAW,KAAK;GAC7C,WAAW;GACX,KAAK,MAAM,WAAW,UAAU;IAC9B,MAAM,QAAQ,YAAY,IAAI,OAAO;IACrC,IAAI,SAAS,EAAE,MAAM,UAAU,GAAG;KAChC,QAAQ,QAAQ,MAAM;KACtB,YAAY,OAAO,OAAO;IAC5B;GACF;GACA,aAAa;GACb,IAAI,aAAa,eAAe,CAAC,YAAY,QAAQ,SAAS,GAC5D,YAAY,MAAM,EAAE,eAAe,KAAK,CAAC;EAC7C;CACF,GAAG;EAAC;EAAM;EAAM;CAAK,CAAC;AACxB"}
@@ -1,13 +1,13 @@
1
1
  /**
2
2
  * Runs `start` during the render in which `open` becomes true.
3
3
  *
4
- * Opening a list starts a fresh session — an empty query, the highlight back at
5
- * the top — and that is a resolution, not a side effect: a passive effect runs
4
+ * Opening a list starts a fresh session - an empty query, the highlight back at
5
+ * the top - and that is a resolution, not a side effect: a passive effect runs
6
6
  * after the commit, so the new session would carry the last one's state for a
7
7
  * window in which a key press can land.
8
8
  *
9
9
  * `start` may only set state belonging to the calling component. Anything that
10
- * reaches outside it — a consumer's callback, a DOM write, moving focus — is a
10
+ * reaches outside it - a consumer's callback, a DOM write, moving focus - is a
11
11
  * side effect, and React rejects a callback that sets another component's state
12
12
  * during this one's render. Put those in an effect keyed to `open`.
13
13
  */
@@ -4,13 +4,13 @@ import { useState } from "react";
4
4
  /**
5
5
  * Runs `start` during the render in which `open` becomes true.
6
6
  *
7
- * Opening a list starts a fresh session — an empty query, the highlight back at
8
- * the top — and that is a resolution, not a side effect: a passive effect runs
7
+ * Opening a list starts a fresh session - an empty query, the highlight back at
8
+ * the top - and that is a resolution, not a side effect: a passive effect runs
9
9
  * after the commit, so the new session would carry the last one's state for a
10
10
  * window in which a key press can land.
11
11
  *
12
12
  * `start` may only set state belonging to the calling component. Anything that
13
- * reaches outside it — a consumer's callback, a DOM write, moving focus — is a
13
+ * reaches outside it - a consumer's callback, a DOM write, moving focus - is a
14
14
  * side effect, and React rejects a callback that sets another component's state
15
15
  * during this one's render. Put those in an effect keyed to `open`.
16
16
  */
@@ -1 +1 @@
1
- {"version":3,"file":"use-on-open.js","names":[],"sources":["../../src/hooks/use-on-open.ts"],"sourcesContent":["\"use client\";\n\nimport { useState } from \"react\";\n\n/**\n * Runs `start` during the render in which `open` becomes true.\n *\n * Opening a list starts a fresh session — an empty query, the highlight back at\n * the top — and that is a resolution, not a side effect: a passive effect runs\n * after the commit, so the new session would carry the last one's state for a\n * window in which a key press can land.\n *\n * `start` may only set state belonging to the calling component. Anything that\n * reaches outside it — a consumer's callback, a DOM write, moving focus — is a\n * side effect, and React rejects a callback that sets another component's state\n * during this one's render. Put those in an effect keyed to `open`.\n */\nexport function useOnOpen(open: boolean, start: () => void) {\n const [wasOpen, setWasOpen] = useState(open);\n if (open !== wasOpen) {\n setWasOpen(open);\n if (open) start();\n }\n}\n"],"mappings":";;;;;;;;;;;;;;;;AAiBA,SAAgB,UAAU,MAAe,OAAmB;CAC1D,MAAM,CAAC,SAAS,cAAc,SAAS,IAAI;CAC3C,IAAI,SAAS,SAAS;EACpB,WAAW,IAAI;EACf,IAAI,MAAM,MAAM;CAClB;AACF"}
1
+ {"version":3,"file":"use-on-open.js","names":[],"sources":["../../src/hooks/use-on-open.ts"],"sourcesContent":["\"use client\";\n\nimport { useState } from \"react\";\n\n/**\n * Runs `start` during the render in which `open` becomes true.\n *\n * Opening a list starts a fresh session - an empty query, the highlight back at\n * the top - and that is a resolution, not a side effect: a passive effect runs\n * after the commit, so the new session would carry the last one's state for a\n * window in which a key press can land.\n *\n * `start` may only set state belonging to the calling component. Anything that\n * reaches outside it - a consumer's callback, a DOM write, moving focus - is a\n * side effect, and React rejects a callback that sets another component's state\n * during this one's render. Put those in an effect keyed to `open`.\n */\nexport function useOnOpen(open: boolean, start: () => void) {\n const [wasOpen, setWasOpen] = useState(open);\n if (open !== wasOpen) {\n setWasOpen(open);\n if (open) start();\n }\n}\n"],"mappings":";;;;;;;;;;;;;;;;AAiBA,SAAgB,UAAU,MAAe,OAAmB;CAC1D,MAAM,CAAC,SAAS,cAAc,SAAS,IAAI;CAC3C,IAAI,SAAS,SAAS;EACpB,WAAW,IAAI;EACf,IAAI,MAAM,MAAM;CAClB;AACF"}
@@ -16,14 +16,14 @@
16
16
  * puts the highlight.
17
17
  *
18
18
  * Pass the query the list is filtered by. The cursor is stamped with it and
19
- * dropped when it changes, so a caller cannot forget to clear it — including a
19
+ * dropped when it changes, so a caller cannot forget to clear it - including a
20
20
  * caller whose query arrives as a prop and so never runs its own handler. Rows
21
21
  * that come back under a query that has moved on cannot revive it either.
22
22
  * `moveTo(null)` is for deliberate resets, such as reopening the list.
23
23
  *
24
24
  * Both callbacks keep one identity for the life of the component, and read the
25
25
  * rows and the query through a ref to do it. A caller will put them in an
26
- * effect's dependencies — the exhaustive-deps rule makes it — and a `moveTo`
26
+ * effect's dependencies - the exhaustive-deps rule makes it - and a `moveTo`
27
27
  * rebuilt on every keystroke would re-run that effect on every keystroke.
28
28
  */
29
29
  export declare function useRowCursor(rows: readonly {
@@ -24,14 +24,14 @@ function indexOfCursor(rows, query, cursor) {
24
24
  * puts the highlight.
25
25
  *
26
26
  * Pass the query the list is filtered by. The cursor is stamped with it and
27
- * dropped when it changes, so a caller cannot forget to clear it — including a
27
+ * dropped when it changes, so a caller cannot forget to clear it - including a
28
28
  * caller whose query arrives as a prop and so never runs its own handler. Rows
29
29
  * that come back under a query that has moved on cannot revive it either.
30
30
  * `moveTo(null)` is for deliberate resets, such as reopening the list.
31
31
  *
32
32
  * Both callbacks keep one identity for the life of the component, and read the
33
33
  * rows and the query through a ref to do it. A caller will put them in an
34
- * effect's dependencies — the exhaustive-deps rule makes it — and a `moveTo`
34
+ * effect's dependencies - the exhaustive-deps rule makes it - and a `moveTo`
35
35
  * rebuilt on every keystroke would re-run that effect on every keystroke.
36
36
  */
37
37
  function useRowCursor(rows, query) {
@@ -1 +1 @@
1
- {"version":3,"file":"use-row-cursor.js","names":[],"sources":["../../src/hooks/use-row-cursor.ts"],"sourcesContent":["\"use client\";\n\nimport { useCallback, useLayoutEffect, useRef, useState } from \"react\";\n\n/**\n * Where the keyboard or the pointer last moved to: the row's id, stamped with\n * the query it was placed under.\n */\ntype RowCursor = { id: string; query: string };\n\n/** The cursor's row, or -1 once the query has moved on or the row has left. */\nfunction indexOfCursor(rows: readonly { id: string }[], query: string, cursor: RowCursor | null) {\n if (cursor === null || cursor.query !== query) return -1;\n return rows.findIndex((row) => row.id === cursor.id);\n}\n\n/**\n * The highlighted row of a list whose rows can change under it.\n *\n * Which row is highlighted is resolved during render, never in a passive\n * effect: a passive effect runs after the commit, so a list that had just\n * changed would carry an `aria-activedescendant` naming a row that has left it,\n * and a key pressed in that window would commit the wrong row or nothing at\n * all.\n *\n * The cursor holds the row's id, not its position. A position alone cannot tell\n * a list that shrank from one that swapped its rows for a different set of the\n * same length, and the second case is the one that silently hands Enter to a\n * row the user never chose. A cursor whose row has left the list returns the\n * highlight to the first row rather than to the nearest surviving one: the row\n * the user aimed at is gone, and the first row is where a new query already\n * puts the highlight.\n *\n * Pass the query the list is filtered by. The cursor is stamped with it and\n * dropped when it changes, so a caller cannot forget to clear it — including a\n * caller whose query arrives as a prop and so never runs its own handler. Rows\n * that come back under a query that has moved on cannot revive it either.\n * `moveTo(null)` is for deliberate resets, such as reopening the list.\n *\n * Both callbacks keep one identity for the life of the component, and read the\n * rows and the query through a ref to do it. A caller will put them in an\n * effect's dependencies — the exhaustive-deps rule makes it — and a `moveTo`\n * rebuilt on every keystroke would re-run that effect on every keystroke.\n */\nexport function useRowCursor(rows: readonly { id: string }[], query: string) {\n const [cursor, setCursor] = useState<RowCursor | null>(null);\n // Written after commit, not during render: a render React discards or has not\n // finished still runs the component body, and an event handler that read this\n // in that window would stamp the cursor with a query the committed tree does\n // not have.\n const latest = useRef({ rows, query });\n useLayoutEffect(() => {\n latest.current = { rows, query };\n });\n\n const cursorRow = indexOfCursor(rows, query, cursor);\n // Cleared rather than ignored: React re-runs this render with the cursor\n // already gone, so rows that come back cannot revive a highlight the user has\n // stopped aiming at.\n if (cursor !== null && cursorRow < 0) setCursor(null);\n\n const moveTo = useCallback(\n (id: string | null) => setCursor(id === null ? null : { id, query: latest.current.query }),\n [],\n );\n\n const moveActive = useCallback((direction: 1 | -1) => {\n const { rows: live, query: liveQuery } = latest.current;\n const last = live.length - 1;\n if (last < 0) return;\n // Steps from the row the cursor is really on, inside the update, so that\n // two keys landing in one batch move two rows rather than one.\n setCursor((current) => {\n const at = Math.max(indexOfCursor(live, liveQuery, current), 0);\n const next = Math.min(Math.max(at + direction, 0), last);\n return { id: live[next].id, query: liveQuery };\n });\n }, []);\n\n return { activeIndex: Math.max(cursorRow, 0), moveTo, moveActive };\n}\n"],"mappings":";;;;AAWA,SAAS,cAAc,MAAiC,OAAe,QAA0B;CAC/F,IAAI,WAAW,QAAQ,OAAO,UAAU,OAAO,OAAO;CACtD,OAAO,KAAK,WAAW,QAAQ,IAAI,OAAO,OAAO,EAAE;AACrD;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AA8BA,SAAgB,aAAa,MAAiC,OAAe;CAC3E,MAAM,CAAC,QAAQ,aAAa,SAA2B,IAAI;CAK3D,MAAM,SAAS,OAAO;EAAE;EAAM;CAAM,CAAC;CACrC,sBAAsB;EACpB,OAAO,UAAU;GAAE;GAAM;EAAM;CACjC,CAAC;CAED,MAAM,YAAY,cAAc,MAAM,OAAO,MAAM;CAInD,IAAI,WAAW,QAAQ,YAAY,GAAG,UAAU,IAAI;CAEpD,MAAM,SAAS,aACZ,OAAsB,UAAU,OAAO,OAAO,OAAO;EAAE;EAAI,OAAO,OAAO,QAAQ;CAAM,CAAC,GACzF,CAAC,CACH;CAEA,MAAM,aAAa,aAAa,cAAsB;EACpD,MAAM,EAAE,MAAM,MAAM,OAAO,cAAc,OAAO;EAChD,MAAM,OAAO,KAAK,SAAS;EAC3B,IAAI,OAAO,GAAG;EAGd,WAAW,YAAY;GACrB,MAAM,KAAK,KAAK,IAAI,cAAc,MAAM,WAAW,OAAO,GAAG,CAAC;GAC9D,MAAM,OAAO,KAAK,IAAI,KAAK,IAAI,KAAK,WAAW,CAAC,GAAG,IAAI;GACvD,OAAO;IAAE,IAAI,KAAK,KAAK,CAAC;IAAI,OAAO;GAAU;EAC/C,CAAC;CACH,GAAG,CAAC,CAAC;CAEL,OAAO;EAAE,aAAa,KAAK,IAAI,WAAW,CAAC;EAAG;EAAQ;CAAW;AACnE"}
1
+ {"version":3,"file":"use-row-cursor.js","names":[],"sources":["../../src/hooks/use-row-cursor.ts"],"sourcesContent":["\"use client\";\n\nimport { useCallback, useLayoutEffect, useRef, useState } from \"react\";\n\n/**\n * Where the keyboard or the pointer last moved to: the row's id, stamped with\n * the query it was placed under.\n */\ntype RowCursor = { id: string; query: string };\n\n/** The cursor's row, or -1 once the query has moved on or the row has left. */\nfunction indexOfCursor(rows: readonly { id: string }[], query: string, cursor: RowCursor | null) {\n if (cursor === null || cursor.query !== query) return -1;\n return rows.findIndex((row) => row.id === cursor.id);\n}\n\n/**\n * The highlighted row of a list whose rows can change under it.\n *\n * Which row is highlighted is resolved during render, never in a passive\n * effect: a passive effect runs after the commit, so a list that had just\n * changed would carry an `aria-activedescendant` naming a row that has left it,\n * and a key pressed in that window would commit the wrong row or nothing at\n * all.\n *\n * The cursor holds the row's id, not its position. A position alone cannot tell\n * a list that shrank from one that swapped its rows for a different set of the\n * same length, and the second case is the one that silently hands Enter to a\n * row the user never chose. A cursor whose row has left the list returns the\n * highlight to the first row rather than to the nearest surviving one: the row\n * the user aimed at is gone, and the first row is where a new query already\n * puts the highlight.\n *\n * Pass the query the list is filtered by. The cursor is stamped with it and\n * dropped when it changes, so a caller cannot forget to clear it - including a\n * caller whose query arrives as a prop and so never runs its own handler. Rows\n * that come back under a query that has moved on cannot revive it either.\n * `moveTo(null)` is for deliberate resets, such as reopening the list.\n *\n * Both callbacks keep one identity for the life of the component, and read the\n * rows and the query through a ref to do it. A caller will put them in an\n * effect's dependencies - the exhaustive-deps rule makes it - and a `moveTo`\n * rebuilt on every keystroke would re-run that effect on every keystroke.\n */\nexport function useRowCursor(rows: readonly { id: string }[], query: string) {\n const [cursor, setCursor] = useState<RowCursor | null>(null);\n // Written after commit, not during render: a render React discards or has not\n // finished still runs the component body, and an event handler that read this\n // in that window would stamp the cursor with a query the committed tree does\n // not have.\n const latest = useRef({ rows, query });\n useLayoutEffect(() => {\n latest.current = { rows, query };\n });\n\n const cursorRow = indexOfCursor(rows, query, cursor);\n // Cleared rather than ignored: React re-runs this render with the cursor\n // already gone, so rows that come back cannot revive a highlight the user has\n // stopped aiming at.\n if (cursor !== null && cursorRow < 0) setCursor(null);\n\n const moveTo = useCallback(\n (id: string | null) => setCursor(id === null ? null : { id, query: latest.current.query }),\n [],\n );\n\n const moveActive = useCallback((direction: 1 | -1) => {\n const { rows: live, query: liveQuery } = latest.current;\n const last = live.length - 1;\n if (last < 0) return;\n // Steps from the row the cursor is really on, inside the update, so that\n // two keys landing in one batch move two rows rather than one.\n setCursor((current) => {\n const at = Math.max(indexOfCursor(live, liveQuery, current), 0);\n const next = Math.min(Math.max(at + direction, 0), last);\n return { id: live[next].id, query: liveQuery };\n });\n }, []);\n\n return { activeIndex: Math.max(cursorRow, 0), moveTo, moveActive };\n}\n"],"mappings":";;;;AAWA,SAAS,cAAc,MAAiC,OAAe,QAA0B;CAC/F,IAAI,WAAW,QAAQ,OAAO,UAAU,OAAO,OAAO;CACtD,OAAO,KAAK,WAAW,QAAQ,IAAI,OAAO,OAAO,EAAE;AACrD;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AA8BA,SAAgB,aAAa,MAAiC,OAAe;CAC3E,MAAM,CAAC,QAAQ,aAAa,SAA2B,IAAI;CAK3D,MAAM,SAAS,OAAO;EAAE;EAAM;CAAM,CAAC;CACrC,sBAAsB;EACpB,OAAO,UAAU;GAAE;GAAM;EAAM;CACjC,CAAC;CAED,MAAM,YAAY,cAAc,MAAM,OAAO,MAAM;CAInD,IAAI,WAAW,QAAQ,YAAY,GAAG,UAAU,IAAI;CAEpD,MAAM,SAAS,aACZ,OAAsB,UAAU,OAAO,OAAO,OAAO;EAAE;EAAI,OAAO,OAAO,QAAQ;CAAM,CAAC,GACzF,CAAC,CACH;CAEA,MAAM,aAAa,aAAa,cAAsB;EACpD,MAAM,EAAE,MAAM,MAAM,OAAO,cAAc,OAAO;EAChD,MAAM,OAAO,KAAK,SAAS;EAC3B,IAAI,OAAO,GAAG;EAGd,WAAW,YAAY;GACrB,MAAM,KAAK,KAAK,IAAI,cAAc,MAAM,WAAW,OAAO,GAAG,CAAC;GAC9D,MAAM,OAAO,KAAK,IAAI,KAAK,IAAI,KAAK,WAAW,CAAC,GAAG,IAAI;GACvD,OAAO;IAAE,IAAI,KAAK,KAAK,CAAC;IAAI,OAAO;GAAU;EAC/C,CAAC;CACH,GAAG,CAAC,CAAC;CAEL,OAAO;EAAE,aAAa,KAAK,IAAI,WAAW,CAAC;EAAG;EAAQ;CAAW;AACnE"}
@@ -4,24 +4,34 @@ import { KeyboardEvent, PointerEvent } from "react";
4
4
  * does not snap back onto the last whole step. */
5
5
  export declare function snapSliderValue(next: number, min: number, max: number, step: number): number;
6
6
  export interface SliderOptions {
7
+ /** The current value, for controlled use. */
7
8
  value?: number;
9
+ /** The initial value when uncontrolled. Default: 0 */
8
10
  defaultValue?: number;
11
+ /** Called with the snapped value whenever a drag or key press changes it. */
9
12
  onValueChange?: (value: number) => void;
13
+ /** Lowest value on the track. Default: 0 */
10
14
  min?: number;
15
+ /** Highest value on the track. Default: 100 */
11
16
  max?: number;
17
+ /** Increment values snap to when dragging or using arrow keys. Default: 1 */
12
18
  step?: number;
19
+ /** Ignores pointer and keyboard input. Default: false */
13
20
  disabled?: boolean;
21
+ /** Accessible name for the slider handle. */
14
22
  "aria-label"?: string;
15
- /** Announced instead of the raw number — pass one when the value carries a
23
+ /** Announced instead of the raw number - pass one when the value carries a
16
24
  * unit or a suffix ("72.5 kg", "35%"); a bare number needs no valueText. */
17
25
  formatValueText?: (value: number) => string;
26
+ /** Play a tiny tick per step, higher toward the max. Off by default; a `SoundProvider` can mute it app-wide. */
27
+ sound?: boolean;
18
28
  }
19
29
  /**
20
30
  * Shared value + input plumbing for slider designs: controlled/uncontrolled
21
31
  * value, step snapping, pointer-capture drag along a track and arrow-key
22
32
  * control. Visuals and motion live in the component; this only owns the number.
23
33
  */
24
- export declare function useSlider({ value, defaultValue, onValueChange, min, max, step, disabled, "aria-label": ariaLabel, formatValueText }: SliderOptions): {
34
+ export declare function useSlider({ value, defaultValue, onValueChange, min, max, step, disabled, "aria-label": ariaLabel, formatValueText, sound }: SliderOptions): {
25
35
  current: number;
26
36
  percent: number;
27
37
  dragging: boolean;
@@ -29,7 +39,7 @@ export declare function useSlider({ value, defaultValue, onValueChange, min, max
29
39
  max: number;
30
40
  step: number;
31
41
  commit: (next: number) => void;
32
- /** Pointer handlers for the track element — drag anywhere on it. */
42
+ /** Pointer handlers for the track element - drag anywhere on it. */
33
43
  trackProps: {
34
44
  ref: import("react").RefObject<HTMLDivElement | null>;
35
45
  onPointerDown: (event: PointerEvent<HTMLDivElement>) => void;
@@ -1 +1 @@
1
- {"version":3,"file":"use-slider.d.ts","names":[],"sources":["../../src/hooks/use-slider.ts"],"mappings":";;;;wBAWgB,gBAAgB,cAAc,aAAa,aAAa;iBAavD;EACf;EACA;EACA,iBAAiB;EACjB;EACA;EACA;EACA;EACA;;;EAGA,mBAAmB;;;;;;;wBAQL,YACd,OACA,cACA,eACA,KACA,KACA,MACA,wBACc,WACd,mBACC;;;;;;;EAmBQ,SAAA;;;;IAmBC,gBAAA,OAAA,aAAa;IAgBb,gBAAA,OAAA,aAAa;IAOa,cAAA,OAAA,aAAa;IAAb,kBAAA,OAAA,aAAa;IAAb,uBAAA,OAAA,aAAa;;;;IA+CjC,MAAA,MAAA;;;;;;;;;IAxCN,YAAA,OAAA,cAAc"}
1
+ {"version":3,"file":"use-slider.d.ts","names":[],"sources":["../../src/hooks/use-slider.ts"],"mappings":";;;;wBAoBgB,gBAAgB,cAAc,aAAa,aAAa;iBAavD;;EAEf;;EAEA;;EAEA,iBAAiB;;EAEjB;;EAEA;;EAEA;;EAEA;;EAEA;;;EAGA,mBAAmB;;EAEnB;;;;;;;wBAYc,YACd,OACA,cACA,eACA,KACA,KACA,MACA,wBACc,WACd,iBACA,SACC;;;;;;;EA2BQ,SAAA;;;;IA0BC,gBAAA,OAAA,aAAa;IAgBb,gBAAA,OAAA,aAAa;IAOa,cAAA,OAAA,aAAa;IAAb,kBAAA,OAAA,aAAa;IAAb,uBAAA,OAAA,aAAa;;;;IA+CjC,MAAA,MAAA;;;;;;;;;IAxCN,YAAA,OAAA,cAAc"}
@@ -1,5 +1,7 @@
1
1
  "use client";
2
- import { useCallback, useRef, useState } from "react";
2
+ import { useCallback, useLayoutEffect, useRef, useState } from "react";
3
+ import { useSound } from "../lib/sound.js";
4
+ import { tickSound } from "../lib/sounds/tick.js";
3
5
  import { capturePointer, releasePointer } from "../lib/touch.js";
4
6
  // src/hooks/use-slider.ts
5
7
  const clamp = (v, lo, hi) => Math.min(hi, Math.max(lo, v));
@@ -15,12 +17,13 @@ function snapSliderValue(next, min, max, step) {
15
17
  const snapped = lastWhole < max && Math.abs(next - max) <= Math.abs(next - toGrid) ? max : toGrid;
16
18
  return Number(snapped.toFixed(6));
17
19
  }
20
+ const TICK_GAP_MS = 35;
18
21
  /**
19
22
  * Shared value + input plumbing for slider designs: controlled/uncontrolled
20
23
  * value, step snapping, pointer-capture drag along a track and arrow-key
21
24
  * control. Visuals and motion live in the component; this only owns the number.
22
25
  */
23
- function useSlider({ value, defaultValue = 0, onValueChange, min = 0, max = 100, step = 1, disabled = false, "aria-label": ariaLabel, formatValueText }) {
26
+ function useSlider({ value, defaultValue = 0, onValueChange, min = 0, max = 100, step = 1, disabled = false, "aria-label": ariaLabel, formatValueText, sound = false }) {
24
27
  const trackRef = useRef(null);
25
28
  const sliderEl = useRef(null);
26
29
  const draggingRef = useRef(false);
@@ -32,8 +35,23 @@ function useSlider({ value, defaultValue = 0, onValueChange, min = 0, max = 100,
32
35
  const stride = step > 0 ? step : 1;
33
36
  const current = clamp(controlled ? value : internal, lo, hi);
34
37
  const percent = hi > lo ? (current - lo) / (hi - lo) * 100 : 0;
38
+ const playTick = useSound(tickSound, { enabled: sound });
39
+ const tickRef = useRef({
40
+ value: current,
41
+ at: 0
42
+ });
43
+ useLayoutEffect(() => {
44
+ if (!draggingRef.current) tickRef.current.value = current;
45
+ });
35
46
  const commit = useCallback((next) => {
36
47
  const clean = snapSliderValue(next, lo, hi, stride);
48
+ const tick = tickRef.current;
49
+ const now = performance.now();
50
+ if (clean !== tick.value && now - tick.at >= TICK_GAP_MS) {
51
+ tick.value = clean;
52
+ tick.at = now;
53
+ playTick({ pitch: .85 + .35 * (hi > lo ? (clean - lo) / (hi - lo) : 0) });
54
+ }
37
55
  if (!controlled) setInternal(clean);
38
56
  onValueChange?.(clean);
39
57
  }, [
@@ -41,7 +59,8 @@ function useSlider({ value, defaultValue = 0, onValueChange, min = 0, max = 100,
41
59
  onValueChange,
42
60
  lo,
43
61
  hi,
44
- stride
62
+ stride,
63
+ playTick
45
64
  ]);
46
65
  const commitFromX = useCallback((clientX) => {
47
66
  const rect = trackRef.current?.getBoundingClientRect();
@@ -102,7 +121,7 @@ function useSlider({ value, defaultValue = 0, onValueChange, min = 0, max = 100,
102
121
  max: hi,
103
122
  step: stride,
104
123
  commit,
105
- /** Pointer handlers for the track element — drag anywhere on it. */
124
+ /** Pointer handlers for the track element - drag anywhere on it. */
106
125
  trackProps: {
107
126
  ref: trackRef,
108
127
  onPointerDown,
@@ -1 +1 @@
1
- {"version":3,"file":"use-slider.js","names":[],"sources":["../../src/hooks/use-slider.ts"],"sourcesContent":["\"use client\";\n\nimport { type KeyboardEvent, type PointerEvent, useCallback, useRef, useState } from \"react\";\n\nimport { capturePointer, releasePointer } from \"../lib/touch\";\n\nconst clamp = (v: number, lo: number, hi: number) => Math.min(hi, Math.max(lo, v));\n\n/** Nearest legal value on [min, max] for the given step. max counts as a\n * candidate when the step does not divide the range, so a pointer near the end\n * does not snap back onto the last whole step. */\nexport function snapSliderValue(next: number, min: number, max: number, step: number): number {\n // Neither case has a grid to walk. An empty range has exactly one legal\n // point, and a non-positive step only needs a clamp, which also keeps the\n // division below away from zero.\n if (!(max > min)) return min;\n if (!(step > 0)) return clamp(next, min, max);\n const whole = Math.floor(Number(((max - min) / step).toFixed(6)));\n const lastWhole = Number((min + whole * step).toFixed(6));\n const toGrid = clamp(Math.round((next - min) / step) * step + min, min, lastWhole);\n const snapped = lastWhole < max && Math.abs(next - max) <= Math.abs(next - toGrid) ? max : toGrid;\n return Number(snapped.toFixed(6));\n}\n\nexport interface SliderOptions {\n value?: number;\n defaultValue?: number;\n onValueChange?: (value: number) => void;\n min?: number;\n max?: number;\n step?: number;\n disabled?: boolean;\n \"aria-label\"?: string;\n /** Announced instead of the raw number — pass one when the value carries a\n * unit or a suffix (\"72.5 kg\", \"35%\"); a bare number needs no valueText. */\n formatValueText?: (value: number) => string;\n}\n\n/**\n * Shared value + input plumbing for slider designs: controlled/uncontrolled\n * value, step snapping, pointer-capture drag along a track and arrow-key\n * control. Visuals and motion live in the component; this only owns the number.\n */\nexport function useSlider({\n value,\n defaultValue = 0,\n onValueChange,\n min = 0,\n max = 100,\n step = 1,\n disabled = false,\n \"aria-label\": ariaLabel,\n formatValueText,\n}: SliderOptions) {\n const trackRef = useRef<HTMLDivElement>(null);\n const sliderEl = useRef<HTMLElement | null>(null);\n // The state drives visuals. Move reads this ref instead, so the first\n // pointermove after pointerdown does not have to wait on a re-render.\n const draggingRef = useRef(false);\n const [internal, setInternal] = useState(defaultValue);\n const [dragging, setDragging] = useState(false);\n const controlled = value !== undefined;\n // Collapse inverted or empty ranges and non-positive steps here, so that\n // percent, ticks and the keyboard maths never divide by zero or walk a\n // NaN grid.\n const lo = min;\n const hi = max > min ? max : min;\n const stride = step > 0 ? step : 1;\n const current = clamp(controlled ? value : internal, lo, hi);\n const percent = hi > lo ? ((current - lo) / (hi - lo)) * 100 : 0;\n\n const commit = useCallback(\n (next: number) => {\n const clean = snapSliderValue(next, lo, hi, stride);\n if (!controlled) setInternal(clean);\n onValueChange?.(clean);\n },\n [controlled, onValueChange, lo, hi, stride],\n );\n\n const commitFromX = useCallback(\n (clientX: number) => {\n const rect = trackRef.current?.getBoundingClientRect();\n if (!rect || rect.width === 0) return;\n const ratio = clamp((clientX - rect.left) / rect.width, 0, 1);\n commit(lo + ratio * (hi - lo));\n },\n [commit, lo, hi],\n );\n\n const onPointerDown = useCallback(\n (event: PointerEvent<HTMLDivElement>) => {\n if (disabled) return;\n // Start the drag first: capture is a convenience, and a browser that\n // refuses it — or a test DOM that has no pointer capture at all — must\n // not take the drag down with it.\n draggingRef.current = true;\n setDragging(true);\n capturePointer(event.currentTarget, event.pointerId);\n // A click on the track should land keyboard focus on the handle.\n sliderEl.current?.focus({ preventScroll: true });\n commitFromX(event.clientX);\n },\n [disabled, commitFromX],\n );\n\n const onPointerMove = useCallback(\n (event: PointerEvent<HTMLDivElement>) => {\n if (!draggingRef.current || disabled) return;\n commitFromX(event.clientX);\n },\n [disabled, commitFromX],\n );\n\n const endDrag = useCallback((event: PointerEvent<HTMLDivElement>) => {\n releasePointer(event.currentTarget, event.pointerId);\n draggingRef.current = false;\n setDragging(false);\n }, []);\n\n const onKeyDown = useCallback(\n (event: KeyboardEvent<HTMLElement>) => {\n if (disabled) return;\n const map: Record<string, number> = {\n ArrowRight: current + stride,\n ArrowUp: current + stride,\n ArrowLeft: current - stride,\n ArrowDown: current - stride,\n PageUp: current + stride * 10,\n PageDown: current - stride * 10,\n Home: lo,\n End: hi,\n };\n if (event.key in map) {\n event.preventDefault();\n commit(map[event.key]);\n }\n },\n [disabled, current, stride, lo, hi, commit],\n );\n\n return {\n current,\n percent,\n dragging,\n min: lo,\n max: hi,\n step: stride,\n commit,\n /** Pointer handlers for the track element — drag anywhere on it. */\n trackProps: {\n ref: trackRef,\n onPointerDown,\n onPointerMove,\n onPointerUp: endDrag,\n onPointerCancel: endDrag,\n onLostPointerCapture: endDrag,\n },\n /** ARIA + keyboard props for the focusable slider element. */\n sliderProps: {\n // Callback keeps the handle typed across button/div/motion hosts.\n ref: (node: HTMLElement | null) => {\n sliderEl.current = node;\n },\n role: \"slider\" as const,\n tabIndex: disabled ? -1 : 0,\n \"aria-label\": ariaLabel,\n \"aria-valuemin\": lo,\n \"aria-valuemax\": hi,\n \"aria-valuenow\": current,\n \"aria-valuetext\": formatValueText?.(current),\n \"aria-disabled\": disabled || undefined,\n onKeyDown,\n },\n };\n}\n"],"mappings":";;;;AAMA,MAAM,SAAS,GAAW,IAAY,OAAe,KAAK,IAAI,IAAI,KAAK,IAAI,IAAI,CAAC,CAAC;;;;AAKjF,SAAgB,gBAAgB,MAAc,KAAa,KAAa,MAAsB;CAI5F,IAAI,EAAE,MAAM,MAAM,OAAO;CACzB,IAAI,EAAE,OAAO,IAAI,OAAO,MAAM,MAAM,KAAK,GAAG;CAC5C,MAAM,QAAQ,KAAK,MAAM,SAAS,MAAM,OAAO,KAAA,CAAM,QAAQ,CAAC,CAAC,CAAC;CAChE,MAAM,YAAY,QAAQ,MAAM,QAAQ,KAAA,CAAM,QAAQ,CAAC,CAAC;CACxD,MAAM,SAAS,MAAM,KAAK,OAAO,OAAO,OAAO,IAAI,IAAI,OAAO,KAAK,KAAK,SAAS;CACjF,MAAM,UAAU,YAAY,OAAO,KAAK,IAAI,OAAO,GAAG,KAAK,KAAK,IAAI,OAAO,MAAM,IAAI,MAAM;CAC3F,OAAO,OAAO,QAAQ,QAAQ,CAAC,CAAC;AAClC;;;;;;AAqBA,SAAgB,UAAU,EACxB,OACA,eAAe,GACf,eACA,MAAM,GACN,MAAM,KACN,OAAO,GACP,WAAW,OACX,cAAc,WACd,mBACgB;CAChB,MAAM,WAAW,OAAuB,IAAI;CAC5C,MAAM,WAAW,OAA2B,IAAI;CAGhD,MAAM,cAAc,OAAO,KAAK;CAChC,MAAM,CAAC,UAAU,eAAe,SAAS,YAAY;CACrD,MAAM,CAAC,UAAU,eAAe,SAAS,KAAK;CAC9C,MAAM,aAAa,UAAU,KAAA;CAI7B,MAAM,KAAK;CACX,MAAM,KAAK,MAAM,MAAM,MAAM;CAC7B,MAAM,SAAS,OAAO,IAAI,OAAO;CACjC,MAAM,UAAU,MAAM,aAAa,QAAQ,UAAU,IAAI,EAAE;CAC3D,MAAM,UAAU,KAAK,MAAO,UAAU,OAAO,KAAK,MAAO,MAAM;CAE/D,MAAM,SAAS,aACZ,SAAiB;EAChB,MAAM,QAAQ,gBAAgB,MAAM,IAAI,IAAI,MAAM;EAClD,IAAI,CAAC,YAAY,YAAY,KAAK;EAClC,gBAAgB,KAAK;CACvB,GACA;EAAC;EAAY;EAAe;EAAI;EAAI;CAAM,CAC5C;CAEA,MAAM,cAAc,aACjB,YAAoB;EACnB,MAAM,OAAO,SAAS,SAAS,sBAAsB;EACrD,IAAI,CAAC,QAAQ,KAAK,UAAU,GAAG;EAC/B,MAAM,QAAQ,OAAO,UAAU,KAAK,QAAQ,KAAK,OAAO,GAAG,CAAC;EAC5D,OAAO,KAAK,SAAS,KAAK,GAAG;CAC/B,GACA;EAAC;EAAQ;EAAI;CAAE,CACjB;CAEA,MAAM,gBAAgB,aACnB,UAAwC;EACvC,IAAI,UAAU;EAId,YAAY,UAAU;EACtB,YAAY,IAAI;EAChB,eAAe,MAAM,eAAe,MAAM,SAAS;EAEnD,SAAS,SAAS,MAAM,EAAE,eAAe,KAAK,CAAC;EAC/C,YAAY,MAAM,OAAO;CAC3B,GACA,CAAC,UAAU,WAAW,CACxB;CAEA,MAAM,gBAAgB,aACnB,UAAwC;EACvC,IAAI,CAAC,YAAY,WAAW,UAAU;EACtC,YAAY,MAAM,OAAO;CAC3B,GACA,CAAC,UAAU,WAAW,CACxB;CAEA,MAAM,UAAU,aAAa,UAAwC;EACnE,eAAe,MAAM,eAAe,MAAM,SAAS;EACnD,YAAY,UAAU;EACtB,YAAY,KAAK;CACnB,GAAG,CAAC,CAAC;CAEL,MAAM,YAAY,aACf,UAAsC;EACrC,IAAI,UAAU;EACd,MAAM,MAA8B;GAClC,YAAY,UAAU;GACtB,SAAS,UAAU;GACnB,WAAW,UAAU;GACrB,WAAW,UAAU;GACrB,QAAQ,UAAU,SAAS;GAC3B,UAAU,UAAU,SAAS;GAC7B,MAAM;GACN,KAAK;EACP;EACA,IAAI,MAAM,OAAO,KAAK;GACpB,MAAM,eAAe;GACrB,OAAO,IAAI,MAAM,IAAI;EACvB;CACF,GACA;EAAC;EAAU;EAAS;EAAQ;EAAI;EAAI;CAAM,CAC5C;CAEA,OAAO;EACL;EACA;EACA;EACA,KAAK;EACL,KAAK;EACL,MAAM;EACN;;EAEA,YAAY;GACV,KAAK;GACL;GACA;GACA,aAAa;GACb,iBAAiB;GACjB,sBAAsB;EACxB;;EAEA,aAAa;GAEX,MAAM,SAA6B;IACjC,SAAS,UAAU;GACrB;GACA,MAAM;GACN,UAAU,WAAW,KAAK;GAC1B,cAAc;GACd,iBAAiB;GACjB,iBAAiB;GACjB,iBAAiB;GACjB,kBAAkB,kBAAkB,OAAO;GAC3C,iBAAiB,YAAY,KAAA;GAC7B;EACF;CACF;AACF"}
1
+ {"version":3,"file":"use-slider.js","names":[],"sources":["../../src/hooks/use-slider.ts"],"sourcesContent":["\"use client\";\n\nimport {\n type KeyboardEvent,\n type PointerEvent,\n useCallback,\n useLayoutEffect,\n useRef,\n useState,\n} from \"react\";\n\nimport { useSound } from \"../lib/sound\";\nimport { tickSound } from \"../lib/sounds/tick\";\nimport { capturePointer, releasePointer } from \"../lib/touch\";\n\nconst clamp = (v: number, lo: number, hi: number) => Math.min(hi, Math.max(lo, v));\n\n/** Nearest legal value on [min, max] for the given step. max counts as a\n * candidate when the step does not divide the range, so a pointer near the end\n * does not snap back onto the last whole step. */\nexport function snapSliderValue(next: number, min: number, max: number, step: number): number {\n // Neither case has a grid to walk. An empty range has exactly one legal\n // point, and a non-positive step only needs a clamp, which also keeps the\n // division below away from zero.\n if (!(max > min)) return min;\n if (!(step > 0)) return clamp(next, min, max);\n const whole = Math.floor(Number(((max - min) / step).toFixed(6)));\n const lastWhole = Number((min + whole * step).toFixed(6));\n const toGrid = clamp(Math.round((next - min) / step) * step + min, min, lastWhole);\n const snapped = lastWhole < max && Math.abs(next - max) <= Math.abs(next - toGrid) ? max : toGrid;\n return Number(snapped.toFixed(6));\n}\n\nexport interface SliderOptions {\n /** The current value, for controlled use. */\n value?: number;\n /** The initial value when uncontrolled. Default: 0 */\n defaultValue?: number;\n /** Called with the snapped value whenever a drag or key press changes it. */\n onValueChange?: (value: number) => void;\n /** Lowest value on the track. Default: 0 */\n min?: number;\n /** Highest value on the track. Default: 100 */\n max?: number;\n /** Increment values snap to when dragging or using arrow keys. Default: 1 */\n step?: number;\n /** Ignores pointer and keyboard input. Default: false */\n disabled?: boolean;\n /** Accessible name for the slider handle. */\n \"aria-label\"?: string;\n /** Announced instead of the raw number - pass one when the value carries a\n * unit or a suffix (\"72.5 kg\", \"35%\"); a bare number needs no valueText. */\n formatValueText?: (value: number) => string;\n /** Play a tiny tick per step, higher toward the max. Off by default; a `SoundProvider` can mute it app-wide. */\n sound?: boolean;\n}\n\n// A fast drag crosses many steps per frame; one tick per this many ms keeps\n// it a texture rather than a buzz.\nconst TICK_GAP_MS = 35;\n\n/**\n * Shared value + input plumbing for slider designs: controlled/uncontrolled\n * value, step snapping, pointer-capture drag along a track and arrow-key\n * control. Visuals and motion live in the component; this only owns the number.\n */\nexport function useSlider({\n value,\n defaultValue = 0,\n onValueChange,\n min = 0,\n max = 100,\n step = 1,\n disabled = false,\n \"aria-label\": ariaLabel,\n formatValueText,\n sound = false,\n}: SliderOptions) {\n const trackRef = useRef<HTMLDivElement>(null);\n const sliderEl = useRef<HTMLElement | null>(null);\n // The state drives visuals. Move reads this ref instead, so the first\n // pointermove after pointerdown does not have to wait on a re-render.\n const draggingRef = useRef(false);\n const [internal, setInternal] = useState(defaultValue);\n const [dragging, setDragging] = useState(false);\n const controlled = value !== undefined;\n // Collapse inverted or empty ranges and non-positive steps here, so that\n // percent, ticks and the keyboard maths never divide by zero or walk a\n // NaN grid.\n const lo = min;\n const hi = max > min ? max : min;\n const stride = step > 0 ? step : 1;\n const current = clamp(controlled ? value : internal, lo, hi);\n const percent = hi > lo ? ((current - lo) / (hi - lo)) * 100 : 0;\n\n const playTick = useSound(tickSound, { enabled: sound });\n // The value the last tick answered, and when, so a commit that lands on the\n // same step stays silent.\n const tickRef = useRef({ value: current, at: 0 });\n useLayoutEffect(() => {\n if (!draggingRef.current) tickRef.current.value = current;\n });\n\n const commit = useCallback(\n (next: number) => {\n const clean = snapSliderValue(next, lo, hi, stride);\n const tick = tickRef.current;\n const now = performance.now();\n if (clean !== tick.value && now - tick.at >= TICK_GAP_MS) {\n tick.value = clean;\n tick.at = now;\n playTick({ pitch: 0.85 + 0.35 * (hi > lo ? (clean - lo) / (hi - lo) : 0) });\n }\n if (!controlled) setInternal(clean);\n onValueChange?.(clean);\n },\n [controlled, onValueChange, lo, hi, stride, playTick],\n );\n\n const commitFromX = useCallback(\n (clientX: number) => {\n const rect = trackRef.current?.getBoundingClientRect();\n if (!rect || rect.width === 0) return;\n const ratio = clamp((clientX - rect.left) / rect.width, 0, 1);\n commit(lo + ratio * (hi - lo));\n },\n [commit, lo, hi],\n );\n\n const onPointerDown = useCallback(\n (event: PointerEvent<HTMLDivElement>) => {\n if (disabled) return;\n // Start the drag first: capture is a convenience, and a browser that\n // refuses it - or a test DOM that has no pointer capture at all - must\n // not take the drag down with it.\n draggingRef.current = true;\n setDragging(true);\n capturePointer(event.currentTarget, event.pointerId);\n // A click on the track should land keyboard focus on the handle.\n sliderEl.current?.focus({ preventScroll: true });\n commitFromX(event.clientX);\n },\n [disabled, commitFromX],\n );\n\n const onPointerMove = useCallback(\n (event: PointerEvent<HTMLDivElement>) => {\n if (!draggingRef.current || disabled) return;\n commitFromX(event.clientX);\n },\n [disabled, commitFromX],\n );\n\n const endDrag = useCallback((event: PointerEvent<HTMLDivElement>) => {\n releasePointer(event.currentTarget, event.pointerId);\n draggingRef.current = false;\n setDragging(false);\n }, []);\n\n const onKeyDown = useCallback(\n (event: KeyboardEvent<HTMLElement>) => {\n if (disabled) return;\n const map: Record<string, number> = {\n ArrowRight: current + stride,\n ArrowUp: current + stride,\n ArrowLeft: current - stride,\n ArrowDown: current - stride,\n PageUp: current + stride * 10,\n PageDown: current - stride * 10,\n Home: lo,\n End: hi,\n };\n if (event.key in map) {\n event.preventDefault();\n commit(map[event.key]);\n }\n },\n [disabled, current, stride, lo, hi, commit],\n );\n\n return {\n current,\n percent,\n dragging,\n min: lo,\n max: hi,\n step: stride,\n commit,\n /** Pointer handlers for the track element - drag anywhere on it. */\n trackProps: {\n ref: trackRef,\n onPointerDown,\n onPointerMove,\n onPointerUp: endDrag,\n onPointerCancel: endDrag,\n onLostPointerCapture: endDrag,\n },\n /** ARIA + keyboard props for the focusable slider element. */\n sliderProps: {\n // Callback keeps the handle typed across button/div/motion hosts.\n ref: (node: HTMLElement | null) => {\n sliderEl.current = node;\n },\n role: \"slider\" as const,\n tabIndex: disabled ? -1 : 0,\n \"aria-label\": ariaLabel,\n \"aria-valuemin\": lo,\n \"aria-valuemax\": hi,\n \"aria-valuenow\": current,\n \"aria-valuetext\": formatValueText?.(current),\n \"aria-disabled\": disabled || undefined,\n onKeyDown,\n },\n };\n}\n"],"mappings":";;;;;;AAeA,MAAM,SAAS,GAAW,IAAY,OAAe,KAAK,IAAI,IAAI,KAAK,IAAI,IAAI,CAAC,CAAC;;;;AAKjF,SAAgB,gBAAgB,MAAc,KAAa,KAAa,MAAsB;CAI5F,IAAI,EAAE,MAAM,MAAM,OAAO;CACzB,IAAI,EAAE,OAAO,IAAI,OAAO,MAAM,MAAM,KAAK,GAAG;CAC5C,MAAM,QAAQ,KAAK,MAAM,SAAS,MAAM,OAAO,KAAA,CAAM,QAAQ,CAAC,CAAC,CAAC;CAChE,MAAM,YAAY,QAAQ,MAAM,QAAQ,KAAA,CAAM,QAAQ,CAAC,CAAC;CACxD,MAAM,SAAS,MAAM,KAAK,OAAO,OAAO,OAAO,IAAI,IAAI,OAAO,KAAK,KAAK,SAAS;CACjF,MAAM,UAAU,YAAY,OAAO,KAAK,IAAI,OAAO,GAAG,KAAK,KAAK,IAAI,OAAO,MAAM,IAAI,MAAM;CAC3F,OAAO,OAAO,QAAQ,QAAQ,CAAC,CAAC;AAClC;AA4BA,MAAM,cAAc;;;;;;AAOpB,SAAgB,UAAU,EACxB,OACA,eAAe,GACf,eACA,MAAM,GACN,MAAM,KACN,OAAO,GACP,WAAW,OACX,cAAc,WACd,iBACA,QAAQ,SACQ;CAChB,MAAM,WAAW,OAAuB,IAAI;CAC5C,MAAM,WAAW,OAA2B,IAAI;CAGhD,MAAM,cAAc,OAAO,KAAK;CAChC,MAAM,CAAC,UAAU,eAAe,SAAS,YAAY;CACrD,MAAM,CAAC,UAAU,eAAe,SAAS,KAAK;CAC9C,MAAM,aAAa,UAAU,KAAA;CAI7B,MAAM,KAAK;CACX,MAAM,KAAK,MAAM,MAAM,MAAM;CAC7B,MAAM,SAAS,OAAO,IAAI,OAAO;CACjC,MAAM,UAAU,MAAM,aAAa,QAAQ,UAAU,IAAI,EAAE;CAC3D,MAAM,UAAU,KAAK,MAAO,UAAU,OAAO,KAAK,MAAO,MAAM;CAE/D,MAAM,WAAW,SAAS,WAAW,EAAE,SAAS,MAAM,CAAC;CAGvD,MAAM,UAAU,OAAO;EAAE,OAAO;EAAS,IAAI;CAAE,CAAC;CAChD,sBAAsB;EACpB,IAAI,CAAC,YAAY,SAAS,QAAQ,QAAQ,QAAQ;CACpD,CAAC;CAED,MAAM,SAAS,aACZ,SAAiB;EAChB,MAAM,QAAQ,gBAAgB,MAAM,IAAI,IAAI,MAAM;EAClD,MAAM,OAAO,QAAQ;EACrB,MAAM,MAAM,YAAY,IAAI;EAC5B,IAAI,UAAU,KAAK,SAAS,MAAM,KAAK,MAAM,aAAa;GACxD,KAAK,QAAQ;GACb,KAAK,KAAK;GACV,SAAS,EAAE,OAAO,MAAO,OAAQ,KAAK,MAAM,QAAQ,OAAO,KAAK,MAAM,GAAG,CAAC;EAC5E;EACA,IAAI,CAAC,YAAY,YAAY,KAAK;EAClC,gBAAgB,KAAK;CACvB,GACA;EAAC;EAAY;EAAe;EAAI;EAAI;EAAQ;CAAQ,CACtD;CAEA,MAAM,cAAc,aACjB,YAAoB;EACnB,MAAM,OAAO,SAAS,SAAS,sBAAsB;EACrD,IAAI,CAAC,QAAQ,KAAK,UAAU,GAAG;EAC/B,MAAM,QAAQ,OAAO,UAAU,KAAK,QAAQ,KAAK,OAAO,GAAG,CAAC;EAC5D,OAAO,KAAK,SAAS,KAAK,GAAG;CAC/B,GACA;EAAC;EAAQ;EAAI;CAAE,CACjB;CAEA,MAAM,gBAAgB,aACnB,UAAwC;EACvC,IAAI,UAAU;EAId,YAAY,UAAU;EACtB,YAAY,IAAI;EAChB,eAAe,MAAM,eAAe,MAAM,SAAS;EAEnD,SAAS,SAAS,MAAM,EAAE,eAAe,KAAK,CAAC;EAC/C,YAAY,MAAM,OAAO;CAC3B,GACA,CAAC,UAAU,WAAW,CACxB;CAEA,MAAM,gBAAgB,aACnB,UAAwC;EACvC,IAAI,CAAC,YAAY,WAAW,UAAU;EACtC,YAAY,MAAM,OAAO;CAC3B,GACA,CAAC,UAAU,WAAW,CACxB;CAEA,MAAM,UAAU,aAAa,UAAwC;EACnE,eAAe,MAAM,eAAe,MAAM,SAAS;EACnD,YAAY,UAAU;EACtB,YAAY,KAAK;CACnB,GAAG,CAAC,CAAC;CAEL,MAAM,YAAY,aACf,UAAsC;EACrC,IAAI,UAAU;EACd,MAAM,MAA8B;GAClC,YAAY,UAAU;GACtB,SAAS,UAAU;GACnB,WAAW,UAAU;GACrB,WAAW,UAAU;GACrB,QAAQ,UAAU,SAAS;GAC3B,UAAU,UAAU,SAAS;GAC7B,MAAM;GACN,KAAK;EACP;EACA,IAAI,MAAM,OAAO,KAAK;GACpB,MAAM,eAAe;GACrB,OAAO,IAAI,MAAM,IAAI;EACvB;CACF,GACA;EAAC;EAAU;EAAS;EAAQ;EAAI;EAAI;CAAM,CAC5C;CAEA,OAAO;EACL;EACA;EACA;EACA,KAAK;EACL,KAAK;EACL,MAAM;EACN;;EAEA,YAAY;GACV,KAAK;GACL;GACA;GACA,aAAa;GACb,iBAAiB;GACjB,sBAAsB;EACxB;;EAEA,aAAa;GAEX,MAAM,SAA6B;IACjC,SAAS,UAAU;GACrB;GACA,MAAM;GACN,UAAU,WAAW,KAAK;GAC1B,cAAc;GACd,iBAAiB;GACjB,iBAAiB;GACjB,iBAAiB;GACjB,kBAAkB,kBAAkB,OAAO;GAC3C,iBAAiB,YAAY,KAAA;GAC7B;EACF;CACF;AACF"}
@@ -0,0 +1,26 @@
1
+ /**
2
+ * Open state for a disclosure that opens or closes itself when a status
3
+ * changes: a tool result that opens while it runs, a todo list that folds
4
+ * when the work completes. Controlled through `open`, or uncontrolled from
5
+ * `defaultOpen`.
6
+ *
7
+ * `decide(previous, next)` runs in the render that first sees a new status
8
+ * and returns `true` to open, `false` to close, or `undefined` to leave it.
9
+ * An uncontrolled panel flips in that same render, so it never shows one
10
+ * commit in the old state. Telling the consumer through `onOpenChange` is a
11
+ * side effect, so it waits for the commit.
12
+ */
13
+ export declare function useStatusOpen<Status>({ status, initialStatus, decide, open, defaultOpen, onOpenChange }: {
14
+ status: Status;
15
+ /**
16
+ * The status to treat as already seen at mount. Defaults to `status`, so
17
+ * mounting is not a change; pass another value to let the first render
18
+ * count as one.
19
+ */
20
+ initialStatus?: Status;
21
+ decide: (previous: Status, next: Status) => boolean | undefined;
22
+ open?: boolean;
23
+ defaultOpen: boolean;
24
+ onOpenChange?: (open: boolean) => void;
25
+ }): readonly [boolean, (next: boolean) => void];
26
+ //# sourceMappingURL=use-status-open.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"use-status-open.d.ts","names":[],"sources":["../../src/hooks/use-status-open.ts"],"mappings":";;;;;;;;;;;;wBAkBgB,cAAc,UAC5B,QACA,eACA,QACA,MACA,aACA;EAEA,QAAQ;;;;;;EAMR,gBAAgB;EAChB,SAAS,UAAU,QAAQ,MAAM;EACjC;EACA;EACA,gBAAgB;wBACjB"}
@@ -0,0 +1,43 @@
1
+ "use client";
2
+ import { useEffect, useLayoutEffect, useRef, useState } from "react";
3
+ import { useControllable } from "./use-controllable.js";
4
+ // src/hooks/use-status-open.ts
5
+ /**
6
+ * Open state for a disclosure that opens or closes itself when a status
7
+ * changes: a tool result that opens while it runs, a todo list that folds
8
+ * when the work completes. Controlled through `open`, or uncontrolled from
9
+ * `defaultOpen`.
10
+ *
11
+ * `decide(previous, next)` runs in the render that first sees a new status
12
+ * and returns `true` to open, `false` to close, or `undefined` to leave it.
13
+ * An uncontrolled panel flips in that same render, so it never shows one
14
+ * commit in the old state. Telling the consumer through `onOpenChange` is a
15
+ * side effect, so it waits for the commit.
16
+ */
17
+ function useStatusOpen({ status, initialStatus = status, decide, open, defaultOpen, onOpenChange }) {
18
+ const [currentOpen, setOpen, setInternal] = useControllable(open, defaultOpen, onOpenChange);
19
+ const [seenStatus, setSeenStatus] = useState(initialStatus);
20
+ const [request, setRequest] = useState(null);
21
+ if (status !== seenStatus) {
22
+ setSeenStatus(status);
23
+ const wanted = decide(seenStatus, status);
24
+ if (wanted !== void 0) {
25
+ if (open === void 0) setInternal(wanted);
26
+ setRequest({
27
+ open: wanted,
28
+ from: currentOpen
29
+ });
30
+ }
31
+ }
32
+ const notify = useRef(onOpenChange);
33
+ useLayoutEffect(() => {
34
+ notify.current = onOpenChange;
35
+ });
36
+ useEffect(() => {
37
+ if (request && request.open !== request.from) notify.current?.(request.open);
38
+ }, [request]);
39
+ return [currentOpen, setOpen];
40
+ }
41
+ export { useStatusOpen };
42
+
43
+ //# sourceMappingURL=use-status-open.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"use-status-open.js","names":[],"sources":["../../src/hooks/use-status-open.ts"],"sourcesContent":["\"use client\";\n\nimport { useEffect, useLayoutEffect, useRef, useState } from \"react\";\n\nimport { useControllable } from \"./use-controllable\";\n\n/**\n * Open state for a disclosure that opens or closes itself when a status\n * changes: a tool result that opens while it runs, a todo list that folds\n * when the work completes. Controlled through `open`, or uncontrolled from\n * `defaultOpen`.\n *\n * `decide(previous, next)` runs in the render that first sees a new status\n * and returns `true` to open, `false` to close, or `undefined` to leave it.\n * An uncontrolled panel flips in that same render, so it never shows one\n * commit in the old state. Telling the consumer through `onOpenChange` is a\n * side effect, so it waits for the commit.\n */\nexport function useStatusOpen<Status>({\n status,\n initialStatus = status,\n decide,\n open,\n defaultOpen,\n onOpenChange,\n}: {\n status: Status;\n /**\n * The status to treat as already seen at mount. Defaults to `status`, so\n * mounting is not a change; pass another value to let the first render\n * count as one.\n */\n initialStatus?: Status;\n decide: (previous: Status, next: Status) => boolean | undefined;\n open?: boolean;\n defaultOpen: boolean;\n onOpenChange?: (open: boolean) => void;\n}) {\n const [currentOpen, setOpen, setInternal] = useControllable(open, defaultOpen, onOpenChange);\n const [seenStatus, setSeenStatus] = useState(initialStatus);\n const [request, setRequest] = useState<{ open: boolean; from: boolean } | null>(null);\n\n if (status !== seenStatus) {\n setSeenStatus(status);\n const wanted = decide(seenStatus, status);\n if (wanted !== undefined) {\n if (open === undefined) setInternal(wanted);\n setRequest({ open: wanted, from: currentOpen });\n }\n }\n\n const notify = useRef(onOpenChange);\n useLayoutEffect(() => {\n notify.current = onOpenChange;\n });\n useEffect(() => {\n if (request && request.open !== request.from) notify.current?.(request.open);\n }, [request]);\n\n return [currentOpen, setOpen] as const;\n}\n"],"mappings":";;;;;;;;;;;;;;;;AAkBA,SAAgB,cAAsB,EACpC,QACA,gBAAgB,QAChB,QACA,MACA,aACA,gBAaC;CACD,MAAM,CAAC,aAAa,SAAS,eAAe,gBAAgB,MAAM,aAAa,YAAY;CAC3F,MAAM,CAAC,YAAY,iBAAiB,SAAS,aAAa;CAC1D,MAAM,CAAC,SAAS,cAAc,SAAkD,IAAI;CAEpF,IAAI,WAAW,YAAY;EACzB,cAAc,MAAM;EACpB,MAAM,SAAS,OAAO,YAAY,MAAM;EACxC,IAAI,WAAW,KAAA,GAAW;GACxB,IAAI,SAAS,KAAA,GAAW,YAAY,MAAM;GAC1C,WAAW;IAAE,MAAM;IAAQ,MAAM;GAAY,CAAC;EAChD;CACF;CAEA,MAAM,SAAS,OAAO,YAAY;CAClC,sBAAsB;EACpB,OAAO,UAAU;CACnB,CAAC;CACD,gBAAgB;EACd,IAAI,WAAW,QAAQ,SAAS,QAAQ,MAAM,OAAO,UAAU,QAAQ,IAAI;CAC7E,GAAG,CAAC,OAAO,CAAC;CAEZ,OAAO,CAAC,aAAa,OAAO;AAC9B"}