@kumix/ui 0.4.4 → 0.6.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 (1268) hide show
  1. package/README.md +18 -12
  2. package/dist/{account-avatar--0_0u0WW.js → account-avatar-BHh_21aQ.js} +1 -1
  3. package/dist/account-avatar-BHh_21aQ.js.map +1 -0
  4. package/dist/{cascader-types-Bh_kJ3Qw.d.ts → cascader-types-D2DFznHz.d.ts} +5 -5
  5. package/dist/cascader-types-D2DFznHz.d.ts.map +1 -0
  6. package/dist/components/agents/agent-activity/activity-row.d.ts +3 -2
  7. package/dist/components/agents/agent-activity/activity-row.d.ts.map +1 -1
  8. package/dist/components/agents/agent-activity/activity-row.js +24 -15
  9. package/dist/components/agents/agent-activity/activity-row.js.map +1 -1
  10. package/dist/components/agents/agent-activity/index.d.ts +3 -3
  11. package/dist/components/agents/agent-activity/index.d.ts.map +1 -1
  12. package/dist/components/agents/agent-activity/index.js +74 -28
  13. package/dist/components/agents/agent-activity/index.js.map +1 -1
  14. package/dist/components/agents/agent-code.js +1 -1
  15. package/dist/components/agents/agent-disclosure.js +2 -2
  16. package/dist/components/agents/ai-sidebar.d.ts +23 -1
  17. package/dist/components/agents/ai-sidebar.d.ts.map +1 -1
  18. package/dist/components/agents/ai-sidebar.js +53 -21
  19. package/dist/components/agents/ai-sidebar.js.map +1 -1
  20. package/dist/components/agents/approval-card/index.d.ts +24 -2
  21. package/dist/components/agents/approval-card/index.d.ts.map +1 -1
  22. package/dist/components/agents/approval-card/index.js +64 -43
  23. package/dist/components/agents/approval-card/index.js.map +1 -1
  24. package/dist/components/agents/chat-app.js +1 -1
  25. package/dist/components/agents/citations.d.ts +8 -1
  26. package/dist/components/agents/citations.d.ts.map +1 -1
  27. package/dist/components/agents/citations.js +15 -8
  28. package/dist/components/agents/citations.js.map +1 -1
  29. package/dist/components/agents/code-block.d.ts +11 -2
  30. package/dist/components/agents/code-block.d.ts.map +1 -1
  31. package/dist/components/agents/code-block.js +19 -9
  32. package/dist/components/agents/code-block.js.map +1 -1
  33. package/dist/components/agents/file-diff.d.ts +13 -2
  34. package/dist/components/agents/file-diff.d.ts.map +1 -1
  35. package/dist/components/agents/file-diff.js +23 -12
  36. package/dist/components/agents/file-diff.js.map +1 -1
  37. package/dist/components/agents/image-generation.d.ts +15 -1
  38. package/dist/components/agents/image-generation.d.ts.map +1 -1
  39. package/dist/components/agents/image-generation.js +23 -17
  40. package/dist/components/agents/image-generation.js.map +1 -1
  41. package/dist/components/agents/loading-states/agent-progress.d.ts +4 -1
  42. package/dist/components/agents/loading-states/agent-progress.d.ts.map +1 -1
  43. package/dist/components/agents/loading-states/agent-progress.js +30 -9
  44. package/dist/components/agents/loading-states/agent-progress.js.map +1 -1
  45. package/dist/components/agents/loading-states/reasoning-text.d.ts +4 -1
  46. package/dist/components/agents/loading-states/reasoning-text.d.ts.map +1 -1
  47. package/dist/components/agents/loading-states/reasoning-text.js +14 -12
  48. package/dist/components/agents/loading-states/reasoning-text.js.map +1 -1
  49. package/dist/components/agents/loading-states/thinking-shimmer.d.ts +4 -1
  50. package/dist/components/agents/loading-states/thinking-shimmer.d.ts.map +1 -1
  51. package/dist/components/agents/loading-states/thinking-shimmer.js +6 -3
  52. package/dist/components/agents/loading-states/thinking-shimmer.js.map +1 -1
  53. package/dist/components/agents/message-bubble.d.ts +9 -1
  54. package/dist/components/agents/message-bubble.d.ts.map +1 -1
  55. package/dist/components/agents/message-bubble.js +18 -10
  56. package/dist/components/agents/message-bubble.js.map +1 -1
  57. package/dist/components/agents/message-scroller.d.ts +12 -1
  58. package/dist/components/agents/message-scroller.d.ts.map +1 -1
  59. package/dist/components/agents/message-scroller.js +29 -10
  60. package/dist/components/agents/message-scroller.js.map +1 -1
  61. package/dist/components/agents/message.d.ts +11 -3
  62. package/dist/components/agents/message.d.ts.map +1 -1
  63. package/dist/components/agents/message.js +17 -9
  64. package/dist/components/agents/message.js.map +1 -1
  65. package/dist/components/agents/prompt-input.d.ts +13 -1
  66. package/dist/components/agents/prompt-input.d.ts.map +1 -1
  67. package/dist/components/agents/prompt-input.js +22 -12
  68. package/dist/components/agents/prompt-input.js.map +1 -1
  69. package/dist/components/agents/streaming-response.d.ts +15 -2
  70. package/dist/components/agents/streaming-response.d.ts.map +1 -1
  71. package/dist/components/agents/streaming-response.js +26 -18
  72. package/dist/components/agents/streaming-response.js.map +1 -1
  73. package/dist/components/agents/todo-list.d.ts +15 -1
  74. package/dist/components/agents/todo-list.d.ts.map +1 -1
  75. package/dist/components/agents/todo-list.js +39 -27
  76. package/dist/components/agents/todo-list.js.map +1 -1
  77. package/dist/components/agents/tool-approval.d.ts +20 -2
  78. package/dist/components/agents/tool-approval.d.ts.map +1 -1
  79. package/dist/components/agents/tool-approval.js +29 -21
  80. package/dist/components/agents/tool-approval.js.map +1 -1
  81. package/dist/components/agents/tool-result.d.ts +15 -2
  82. package/dist/components/agents/tool-result.d.ts.map +1 -1
  83. package/dist/components/agents/tool-result.js +21 -15
  84. package/dist/components/agents/tool-result.js.map +1 -1
  85. package/dist/components/agents/voice-orb.d.ts +7 -1
  86. package/dist/components/agents/voice-orb.d.ts.map +1 -1
  87. package/dist/components/agents/voice-orb.js +8 -5
  88. package/dist/components/agents/voice-orb.js.map +1 -1
  89. package/dist/components/charts/bar-chart/context.d.ts +24 -9
  90. package/dist/components/charts/bar-chart/context.d.ts.map +1 -1
  91. package/dist/components/charts/bar-chart/context.js +16 -5
  92. package/dist/components/charts/bar-chart/context.js.map +1 -1
  93. package/dist/components/charts/bar-chart/legend.js +2 -2
  94. package/dist/components/charts/bar-chart/legend.js.map +1 -1
  95. package/dist/components/charts/bar-chart/plot.js +23 -13
  96. package/dist/components/charts/bar-chart/plot.js.map +1 -1
  97. package/dist/components/charts/bar-chart/tooltip.d.ts +1 -1
  98. package/dist/components/charts/bar-chart/tooltip.js +5 -4
  99. package/dist/components/charts/bar-chart/tooltip.js.map +1 -1
  100. package/dist/components/charts/bar-chart.d.ts +5 -4
  101. package/dist/components/charts/bar-chart.d.ts.map +1 -1
  102. package/dist/components/charts/bar-chart.js +9 -6
  103. package/dist/components/charts/bar-chart.js.map +1 -1
  104. package/dist/components/charts/bump-chart/context.d.ts +1 -1
  105. package/dist/components/charts/bump-chart/context.js +1 -1
  106. package/dist/components/charts/bump-chart/legend.js +4 -4
  107. package/dist/components/charts/bump-chart/legend.js.map +1 -1
  108. package/dist/components/charts/bump-chart/plot.js +1 -1
  109. package/dist/components/charts/bump-chart/point.d.ts +1 -1
  110. package/dist/components/charts/bump-chart/point.js +15 -13
  111. package/dist/components/charts/bump-chart/point.js.map +1 -1
  112. package/dist/components/charts/bump-chart/series.d.ts +2 -2
  113. package/dist/components/charts/bump-chart/series.js +3 -3
  114. package/dist/components/charts/bump-chart.d.ts +2 -2
  115. package/dist/components/charts/bump-chart.d.ts.map +1 -1
  116. package/dist/components/charts/bump-chart.js +4 -4
  117. package/dist/components/charts/bump-chart.js.map +1 -1
  118. package/dist/components/charts/candlestick-chart/context.d.ts +18 -1
  119. package/dist/components/charts/candlestick-chart/context.d.ts.map +1 -1
  120. package/dist/components/charts/candlestick-chart/context.js +17 -3
  121. package/dist/components/charts/candlestick-chart/context.js.map +1 -1
  122. package/dist/components/charts/candlestick-chart/legend.d.ts +1 -1
  123. package/dist/components/charts/candlestick-chart/legend.js +10 -10
  124. package/dist/components/charts/candlestick-chart/legend.js.map +1 -1
  125. package/dist/components/charts/candlestick-chart/plot.d.ts.map +1 -1
  126. package/dist/components/charts/candlestick-chart/plot.js +16 -17
  127. package/dist/components/charts/candlestick-chart/plot.js.map +1 -1
  128. package/dist/components/charts/candlestick-chart.d.ts +2 -2
  129. package/dist/components/charts/candlestick-chart.js +3 -3
  130. package/dist/components/charts/candlestick-chart.js.map +1 -1
  131. package/dist/components/charts/composition-chart/context.d.ts +1 -1
  132. package/dist/components/charts/composition-chart/context.js +1 -1
  133. package/dist/components/charts/composition-chart/legend.js +4 -4
  134. package/dist/components/charts/composition-chart/legend.js.map +1 -1
  135. package/dist/components/charts/composition-chart/plot.js +9 -9
  136. package/dist/components/charts/composition-chart/plot.js.map +1 -1
  137. package/dist/components/charts/composition-chart/tooltip-content.js +4 -4
  138. package/dist/components/charts/composition-chart/tooltip-content.js.map +1 -1
  139. package/dist/components/charts/composition-chart.d.ts +2 -2
  140. package/dist/components/charts/composition-chart.js +3 -3
  141. package/dist/components/charts/composition-chart.js.map +1 -1
  142. package/dist/components/charts/donut-chart/center.d.ts +1 -1
  143. package/dist/components/charts/donut-chart/center.d.ts.map +1 -1
  144. package/dist/components/charts/donut-chart/center.js +7 -7
  145. package/dist/components/charts/donut-chart/center.js.map +1 -1
  146. package/dist/components/charts/donut-chart/context.d.ts +13 -2
  147. package/dist/components/charts/donut-chart/context.d.ts.map +1 -1
  148. package/dist/components/charts/donut-chart/context.js +1 -1
  149. package/dist/components/charts/donut-chart/legend.d.ts +1 -1
  150. package/dist/components/charts/donut-chart/legend.js +3 -3
  151. package/dist/components/charts/donut-chart/plot.js +3 -3
  152. package/dist/components/charts/donut-chart.d.ts +3 -3
  153. package/dist/components/charts/donut-chart.js +3 -3
  154. package/dist/components/charts/donut-chart.js.map +1 -1
  155. package/dist/components/charts/funnel-chart.d.ts +19 -1
  156. package/dist/components/charts/funnel-chart.d.ts.map +1 -1
  157. package/dist/components/charts/funnel-chart.js +45 -30
  158. package/dist/components/charts/funnel-chart.js.map +1 -1
  159. package/dist/components/charts/heat-calendar/grid.js +12 -5
  160. package/dist/components/charts/heat-calendar/grid.js.map +1 -1
  161. package/dist/components/charts/heat-calendar/legend.js +9 -6
  162. package/dist/components/charts/heat-calendar/legend.js.map +1 -1
  163. package/dist/components/charts/heat-calendar/tooltip.d.ts +1 -1
  164. package/dist/components/charts/heat-calendar/tooltip.js +10 -7
  165. package/dist/components/charts/heat-calendar/tooltip.js.map +1 -1
  166. package/dist/components/charts/heat-calendar.d.ts +2 -2
  167. package/dist/components/charts/heat-calendar.js +3 -3
  168. package/dist/components/charts/heat-calendar.js.map +1 -1
  169. package/dist/components/charts/line-chart/context.d.ts +21 -4
  170. package/dist/components/charts/line-chart/context.d.ts.map +1 -1
  171. package/dist/components/charts/line-chart/context.js +19 -6
  172. package/dist/components/charts/line-chart/context.js.map +1 -1
  173. package/dist/components/charts/line-chart/legend.js +2 -2
  174. package/dist/components/charts/line-chart/legend.js.map +1 -1
  175. package/dist/components/charts/line-chart/plot.js +26 -16
  176. package/dist/components/charts/line-chart/plot.js.map +1 -1
  177. package/dist/components/charts/line-chart/tooltip.d.ts +1 -1
  178. package/dist/components/charts/line-chart/tooltip.js +7 -6
  179. package/dist/components/charts/line-chart/tooltip.js.map +1 -1
  180. package/dist/components/charts/line-chart.d.ts +6 -5
  181. package/dist/components/charts/line-chart.d.ts.map +1 -1
  182. package/dist/components/charts/line-chart.js +9 -6
  183. package/dist/components/charts/line-chart.js.map +1 -1
  184. package/dist/components/charts/liquidity-heatmap.d.ts +17 -1
  185. package/dist/components/charts/liquidity-heatmap.d.ts.map +1 -1
  186. package/dist/components/charts/liquidity-heatmap.js +52 -27
  187. package/dist/components/charts/liquidity-heatmap.js.map +1 -1
  188. package/dist/components/charts/order-book/depth-row.d.ts +1 -1
  189. package/dist/components/charts/order-book/depth-row.js +2 -2
  190. package/dist/components/charts/order-book.d.ts +26 -1
  191. package/dist/components/charts/order-book.d.ts.map +1 -1
  192. package/dist/components/charts/order-book.js +84 -33
  193. package/dist/components/charts/order-book.js.map +1 -1
  194. package/dist/components/charts/price-target-fan/header.js +5 -5
  195. package/dist/components/charts/price-target-fan/header.js.map +1 -1
  196. package/dist/components/charts/price-target-fan/plot.d.ts.map +1 -1
  197. package/dist/components/charts/price-target-fan/plot.js +21 -11
  198. package/dist/components/charts/price-target-fan/plot.js.map +1 -1
  199. package/dist/components/charts/price-target-fan/series.d.ts.map +1 -1
  200. package/dist/components/charts/price-target-fan/series.js +11 -7
  201. package/dist/components/charts/price-target-fan/series.js.map +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 +2 -2
  204. package/dist/components/charts/price-target-fan.d.ts +2 -2
  205. package/dist/components/charts/price-target-fan.js +4 -4
  206. package/dist/components/charts/price-target-fan.js.map +1 -1
  207. package/dist/components/charts/returns-calendar/grid.js +16 -9
  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 +3 -3
  211. package/dist/components/charts/returns-calendar.d.ts +9 -2
  212. package/dist/components/charts/returns-calendar.d.ts.map +1 -1
  213. package/dist/components/charts/returns-calendar.js +3 -3
  214. package/dist/components/charts/returns-calendar.js.map +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.js +9 -6
  218. package/dist/components/charts/sankey-chart/plot.js.map +1 -1
  219. package/dist/components/charts/sankey-chart/tooltip.d.ts +1 -1
  220. package/dist/components/charts/sankey-chart/tooltip.js +16 -19
  221. package/dist/components/charts/sankey-chart/tooltip.js.map +1 -1
  222. package/dist/components/charts/sankey-chart.d.ts +3 -3
  223. package/dist/components/charts/sankey-chart.d.ts.map +1 -1
  224. package/dist/components/charts/sankey-chart.js +16 -15
  225. package/dist/components/charts/sankey-chart.js.map +1 -1
  226. package/dist/components/charts/sparkline.d.ts +19 -2
  227. package/dist/components/charts/sparkline.d.ts.map +1 -1
  228. package/dist/components/charts/sparkline.js +34 -14
  229. package/dist/components/charts/sparkline.js.map +1 -1
  230. package/dist/components/charts/status-bar/legend.js +3 -3
  231. package/dist/components/charts/status-bar/legend.js.map +1 -1
  232. package/dist/components/charts/status-bar/plot.js +6 -6
  233. package/dist/components/charts/status-bar/plot.js.map +1 -1
  234. package/dist/components/charts/status-bar/tooltip.d.ts +1 -1
  235. package/dist/components/charts/status-bar/tooltip.js +2 -2
  236. package/dist/components/charts/status-bar.d.ts +3 -3
  237. package/dist/components/charts/status-bar.d.ts.map +1 -1
  238. package/dist/components/charts/status-bar.js +11 -9
  239. package/dist/components/charts/status-bar.js.map +1 -1
  240. package/dist/components/charts/treemap/legend.js +3 -3
  241. package/dist/components/charts/treemap/legend.js.map +1 -1
  242. package/dist/components/charts/treemap/plot.d.ts +1 -1
  243. package/dist/components/charts/treemap/plot.js +6 -6
  244. package/dist/components/charts/treemap/plot.js.map +1 -1
  245. package/dist/components/charts/treemap/tile.d.ts +1 -1
  246. package/dist/components/charts/treemap/tile.js +5 -5
  247. package/dist/components/charts/treemap/tile.js.map +1 -1
  248. package/dist/components/charts/treemap/tooltip.d.ts +1 -1
  249. package/dist/components/charts/treemap/tooltip.js +4 -4
  250. package/dist/components/charts/treemap.d.ts +21 -4
  251. package/dist/components/charts/treemap.d.ts.map +1 -1
  252. package/dist/components/charts/treemap.js +12 -10
  253. package/dist/components/charts/treemap.js.map +1 -1
  254. package/dist/components/charts/volume-profile/plot.js +7 -7
  255. package/dist/components/charts/volume-profile/plot.js.map +1 -1
  256. package/dist/components/charts/volume-profile/summary.js +15 -21
  257. package/dist/components/charts/volume-profile/summary.js.map +1 -1
  258. package/dist/components/charts/volume-profile/tooltip.d.ts +1 -1
  259. package/dist/components/charts/volume-profile/tooltip.js +6 -6
  260. package/dist/components/charts/volume-profile/tooltip.js.map +1 -1
  261. package/dist/components/charts/volume-profile.d.ts +29 -4
  262. package/dist/components/charts/volume-profile.d.ts.map +1 -1
  263. package/dist/components/charts/volume-profile.js +18 -22
  264. package/dist/components/charts/volume-profile.js.map +1 -1
  265. package/dist/components/charts/xy/axis.js +1 -1
  266. package/dist/components/charts/xy/data-table.d.ts +4 -2
  267. package/dist/components/charts/xy/data-table.d.ts.map +1 -1
  268. package/dist/components/charts/xy/data-table.js +4 -4
  269. package/dist/components/charts/xy/data-table.js.map +1 -1
  270. package/dist/components/charts/xy/legend.d.ts +1 -1
  271. package/dist/components/charts/xy/tooltip-content.d.ts +1 -1
  272. package/dist/components/charts/xy/tooltip-content.js +5 -5
  273. package/dist/components/charts/xy/tooltip-content.js.map +1 -1
  274. package/dist/components/custom/confirm-dialog.js +1 -1
  275. package/dist/components/custom/toast.js +1 -1
  276. package/dist/components/motion/action-swap.js +2 -2
  277. package/dist/components/motion/adaptive-stepper.d.ts +11 -1
  278. package/dist/components/motion/adaptive-stepper.d.ts.map +1 -1
  279. package/dist/components/motion/adaptive-stepper.js +26 -16
  280. package/dist/components/motion/adaptive-stepper.js.map +1 -1
  281. package/dist/components/motion/alert.d.ts +8 -1
  282. package/dist/components/motion/alert.d.ts.map +1 -1
  283. package/dist/components/motion/alert.js +16 -10
  284. package/dist/components/motion/alert.js.map +1 -1
  285. package/dist/components/motion/animated-badge.js +5 -5
  286. package/dist/components/motion/animated-number.js +2 -2
  287. package/dist/components/motion/animated-sidebar.d.ts +12 -1
  288. package/dist/components/motion/animated-sidebar.d.ts.map +1 -1
  289. package/dist/components/motion/animated-sidebar.js +24 -14
  290. package/dist/components/motion/animated-sidebar.js.map +1 -1
  291. package/dist/components/motion/animated-toast-stack.d.ts +8 -1
  292. package/dist/components/motion/animated-toast-stack.d.ts.map +1 -1
  293. package/dist/components/motion/animated-toast-stack.js +14 -9
  294. package/dist/components/motion/animated-toast-stack.js.map +1 -1
  295. package/dist/components/motion/arc-picker.d.ts +11 -1
  296. package/dist/components/motion/arc-picker.d.ts.map +1 -1
  297. package/dist/components/motion/arc-picker.js +20 -13
  298. package/dist/components/motion/arc-picker.js.map +1 -1
  299. package/dist/components/motion/aspect-ratio.js +2 -2
  300. package/dist/components/motion/attachment-upload.d.ts +32 -1
  301. package/dist/components/motion/attachment-upload.d.ts.map +1 -1
  302. package/dist/components/motion/attachment-upload.js +106 -52
  303. package/dist/components/motion/attachment-upload.js.map +1 -1
  304. package/dist/components/motion/availability-scheduler/copy-menu.d.ts +5 -2
  305. package/dist/components/motion/availability-scheduler/copy-menu.d.ts.map +1 -1
  306. package/dist/components/motion/availability-scheduler/copy-menu.js +1 -1
  307. package/dist/components/motion/availability-scheduler/day-row.d.ts +4 -2
  308. package/dist/components/motion/availability-scheduler/day-row.d.ts.map +1 -1
  309. package/dist/components/motion/availability-scheduler/day-row.js +23 -15
  310. package/dist/components/motion/availability-scheduler/day-row.js.map +1 -1
  311. package/dist/components/motion/availability-scheduler/icon-button.js +2 -2
  312. package/dist/components/motion/availability-scheduler/index.d.ts +6 -3
  313. package/dist/components/motion/availability-scheduler/index.d.ts.map +1 -1
  314. package/dist/components/motion/availability-scheduler/index.js +30 -8
  315. package/dist/components/motion/availability-scheduler/index.js.map +1 -1
  316. package/dist/components/motion/availability-scheduler/time-select.d.ts +1 -1
  317. package/dist/components/motion/avatar-group.d.ts +10 -1
  318. package/dist/components/motion/avatar-group.d.ts.map +1 -1
  319. package/dist/components/motion/avatar-group.js +18 -9
  320. package/dist/components/motion/avatar-group.js.map +1 -1
  321. package/dist/components/motion/before-after-slider.d.ts +35 -0
  322. package/dist/components/motion/before-after-slider.d.ts.map +1 -0
  323. package/dist/components/motion/before-after-slider.js +352 -0
  324. package/dist/components/motion/before-after-slider.js.map +1 -0
  325. package/dist/components/motion/bloom-menu.d.ts +15 -1
  326. package/dist/components/motion/bloom-menu.d.ts.map +1 -1
  327. package/dist/components/motion/bloom-menu.js +32 -11
  328. package/dist/components/motion/bloom-menu.js.map +1 -1
  329. package/dist/components/motion/bookshelf.d.ts +46 -0
  330. package/dist/components/motion/bookshelf.d.ts.map +1 -0
  331. package/dist/components/motion/bookshelf.js +518 -0
  332. package/dist/components/motion/bookshelf.js.map +1 -0
  333. package/dist/components/motion/bottom-sheet.d.ts +9 -1
  334. package/dist/components/motion/bottom-sheet.d.ts.map +1 -1
  335. package/dist/components/motion/bottom-sheet.js +16 -13
  336. package/dist/components/motion/bottom-sheet.js.map +1 -1
  337. package/dist/components/motion/bounce-sidebar.d.ts +8 -1
  338. package/dist/components/motion/bounce-sidebar.d.ts.map +1 -1
  339. package/dist/components/motion/bounce-sidebar.js +8 -4
  340. package/dist/components/motion/bounce-sidebar.js.map +1 -1
  341. package/dist/components/motion/bouncy-accordion.d.ts.map +1 -1
  342. package/dist/components/motion/bouncy-accordion.js +45 -36
  343. package/dist/components/motion/bouncy-accordion.js.map +1 -1
  344. package/dist/components/motion/breadcrumb.d.ts +11 -2
  345. package/dist/components/motion/breadcrumb.d.ts.map +1 -1
  346. package/dist/components/motion/breadcrumb.js +29 -14
  347. package/dist/components/motion/breadcrumb.js.map +1 -1
  348. package/dist/components/motion/button/base.js +3 -3
  349. package/dist/components/motion/button/index.d.ts +2 -2
  350. package/dist/components/motion/button/index.js +2 -2
  351. package/dist/components/motion/button/magnetic.js +1 -1
  352. package/dist/components/motion/button/metallic.js +7 -7
  353. package/dist/components/motion/button/metallic.js.map +1 -1
  354. package/dist/components/motion/button/stateful.d.ts +10 -1
  355. package/dist/components/motion/button/stateful.d.ts.map +1 -1
  356. package/dist/components/motion/button/stateful.js +14 -6
  357. package/dist/components/motion/button/stateful.js.map +1 -1
  358. package/dist/components/motion/card-dealer.d.ts +8 -1
  359. package/dist/components/motion/card-dealer.d.ts.map +1 -1
  360. package/dist/components/motion/card-dealer.js +13 -9
  361. package/dist/components/motion/card-dealer.js.map +1 -1
  362. package/dist/components/motion/card-folder.d.ts +14 -1
  363. package/dist/components/motion/card-folder.d.ts.map +1 -1
  364. package/dist/components/motion/card-folder.js +27 -11
  365. package/dist/components/motion/card-folder.js.map +1 -1
  366. package/dist/components/motion/card.js +2 -2
  367. package/dist/components/motion/casino/game-parts.d.ts +2 -0
  368. package/dist/components/motion/casino/game-parts.js +207 -0
  369. package/dist/components/motion/casino/game-parts.js.map +1 -0
  370. package/dist/components/motion/center-morph-modal.d.ts +9 -1
  371. package/dist/components/motion/center-morph-modal.d.ts.map +1 -1
  372. package/dist/components/motion/center-morph-modal.js +22 -11
  373. package/dist/components/motion/center-morph-modal.js.map +1 -1
  374. package/dist/components/motion/checkbox.d.ts +9 -1
  375. package/dist/components/motion/checkbox.d.ts.map +1 -1
  376. package/dist/components/motion/checkbox.js +12 -5
  377. package/dist/components/motion/checkbox.js.map +1 -1
  378. package/dist/components/motion/chromatic-text-reveal.js +2 -2
  379. package/dist/components/motion/collapsible.js +3 -3
  380. package/dist/components/motion/color-picker.d.ts +23 -1
  381. package/dist/components/motion/color-picker.d.ts.map +1 -1
  382. package/dist/components/motion/color-picker.js +72 -37
  383. package/dist/components/motion/color-picker.js.map +1 -1
  384. package/dist/components/motion/color-selector.js +2 -2
  385. package/dist/components/motion/combobox/content.js +4 -4
  386. package/dist/components/motion/combobox/context.d.ts +2 -66
  387. package/dist/components/motion/combobox/context.js +1 -216
  388. package/dist/components/motion/combobox/list.d.ts.map +1 -1
  389. package/dist/components/motion/combobox/list.js +10 -9
  390. package/dist/components/motion/combobox/list.js.map +1 -1
  391. package/dist/components/motion/combobox/trigger.d.ts.map +1 -1
  392. package/dist/components/motion/combobox/trigger.js +8 -7
  393. package/dist/components/motion/combobox/trigger.js.map +1 -1
  394. package/dist/components/motion/combobox.d.ts +2 -2
  395. package/dist/components/motion/combobox.js +2 -2
  396. package/dist/components/motion/command-palette.d.ts +13 -1
  397. package/dist/components/motion/command-palette.d.ts.map +1 -1
  398. package/dist/components/motion/command-palette.js +28 -13
  399. package/dist/components/motion/command-palette.js.map +1 -1
  400. package/dist/components/motion/context-menu.d.ts +8 -1
  401. package/dist/components/motion/context-menu.d.ts.map +1 -1
  402. package/dist/components/motion/context-menu.js +17 -11
  403. package/dist/components/motion/context-menu.js.map +1 -1
  404. package/dist/components/motion/crash/crash-balloon.d.ts +10 -0
  405. package/dist/components/motion/crash/crash-balloon.d.ts.map +1 -0
  406. package/dist/components/motion/crash/crash-balloon.js +831 -0
  407. package/dist/components/motion/crash/crash-balloon.js.map +1 -0
  408. package/dist/components/motion/crash/crash-parts.d.ts +55 -0
  409. package/dist/components/motion/crash/crash-parts.d.ts.map +1 -0
  410. package/dist/components/motion/crash/crash-parts.js +4 -0
  411. package/dist/components/motion/crash/crash-tower.d.ts +10 -0
  412. package/dist/components/motion/crash/crash-tower.d.ts.map +1 -0
  413. package/dist/components/motion/crash/crash-tower.js +371 -0
  414. package/dist/components/motion/crash/crash-tower.js.map +1 -0
  415. package/dist/components/motion/crash.d.ts +10 -0
  416. package/dist/components/motion/crash.d.ts.map +1 -0
  417. package/dist/components/motion/crash.js +592 -0
  418. package/dist/components/motion/crash.js.map +1 -0
  419. package/dist/components/motion/cylinder-carousel.d.ts +8 -1
  420. package/dist/components/motion/cylinder-carousel.d.ts.map +1 -1
  421. package/dist/components/motion/cylinder-carousel.js +13 -7
  422. package/dist/components/motion/cylinder-carousel.js.map +1 -1
  423. package/dist/components/motion/date-range-picker.d.ts +37 -3
  424. package/dist/components/motion/date-range-picker.d.ts.map +1 -1
  425. package/dist/components/motion/date-range-picker.js +80 -32
  426. package/dist/components/motion/date-range-picker.js.map +1 -1
  427. package/dist/components/motion/digit-swap.js +2 -2
  428. package/dist/components/motion/dock.js +2 -2
  429. package/dist/components/motion/drawer.d.ts +8 -1
  430. package/dist/components/motion/drawer.d.ts.map +1 -1
  431. package/dist/components/motion/drawer.js +11 -7
  432. package/dist/components/motion/drawer.js.map +1 -1
  433. package/dist/components/motion/dropdown-menu.d.ts +99 -0
  434. package/dist/components/motion/dropdown-menu.d.ts.map +1 -0
  435. package/dist/components/motion/dropdown-menu.js +708 -0
  436. package/dist/components/motion/dropdown-menu.js.map +1 -0
  437. package/dist/components/motion/dynamic-island.js +2 -2
  438. package/dist/components/motion/expandable-action-bar.js +3 -3
  439. package/dist/components/motion/expandable-control.js +5 -2
  440. package/dist/components/motion/expandable-control.js.map +1 -1
  441. package/dist/components/motion/expandable-tabs.d.ts +8 -1
  442. package/dist/components/motion/expandable-tabs.d.ts.map +1 -1
  443. package/dist/components/motion/expandable-tabs.js +9 -5
  444. package/dist/components/motion/expandable-tabs.js.map +1 -1
  445. package/dist/components/motion/expanding-arrow-button.js +3 -3
  446. package/dist/components/motion/feedback-widget.d.ts +18 -1
  447. package/dist/components/motion/feedback-widget.d.ts.map +1 -1
  448. package/dist/components/motion/feedback-widget.js +33 -16
  449. package/dist/components/motion/feedback-widget.js.map +1 -1
  450. package/dist/components/motion/file-tree.d.ts +8 -1
  451. package/dist/components/motion/file-tree.d.ts.map +1 -1
  452. package/dist/components/motion/file-tree.js +11 -11
  453. package/dist/components/motion/file-tree.js.map +1 -1
  454. package/dist/components/motion/file-upload.d.ts +20 -1
  455. package/dist/components/motion/file-upload.d.ts.map +1 -1
  456. package/dist/components/motion/file-upload.js +63 -31
  457. package/dist/components/motion/file-upload.js.map +1 -1
  458. package/dist/components/motion/hold-action-button.d.ts +8 -0
  459. package/dist/components/motion/hold-action-button.d.ts.map +1 -1
  460. package/dist/components/motion/hold-action-button.js +20 -8
  461. package/dist/components/motion/hold-action-button.js.map +1 -1
  462. package/dist/components/motion/infinite-masonry.d.ts +13 -1
  463. package/dist/components/motion/infinite-masonry.d.ts.map +1 -1
  464. package/dist/components/motion/infinite-masonry.js +30 -15
  465. package/dist/components/motion/infinite-masonry.js.map +1 -1
  466. package/dist/components/motion/input.js +1 -1
  467. package/dist/components/motion/knockout-bracket.d.ts +21 -2
  468. package/dist/components/motion/knockout-bracket.d.ts.map +1 -1
  469. package/dist/components/motion/knockout-bracket.js +78 -33
  470. package/dist/components/motion/knockout-bracket.js.map +1 -1
  471. package/dist/components/motion/knockout-wheel.d.ts +14 -1
  472. package/dist/components/motion/knockout-wheel.d.ts.map +1 -1
  473. package/dist/components/motion/knockout-wheel.js +46 -20
  474. package/dist/components/motion/knockout-wheel.js.map +1 -1
  475. package/dist/components/motion/liquid.js +2 -2
  476. package/dist/components/motion/loader.d.ts +10 -1
  477. package/dist/components/motion/loader.d.ts.map +1 -1
  478. package/dist/components/motion/loader.js +49 -34
  479. package/dist/components/motion/loader.js.map +1 -1
  480. package/dist/components/motion/magnetic.js +3 -3
  481. package/dist/components/motion/mines.d.ts +80 -0
  482. package/dist/components/motion/mines.d.ts.map +1 -0
  483. package/dist/components/motion/mines.js +797 -0
  484. package/dist/components/motion/mines.js.map +1 -0
  485. package/dist/components/motion/morphing-lightbox.d.ts +17 -1
  486. package/dist/components/motion/morphing-lightbox.d.ts.map +1 -1
  487. package/dist/components/motion/morphing-lightbox.js +39 -22
  488. package/dist/components/motion/morphing-lightbox.js.map +1 -1
  489. package/dist/components/motion/morphing-modal.d.ts +8 -1
  490. package/dist/components/motion/morphing-modal.d.ts.map +1 -1
  491. package/dist/components/motion/morphing-modal.js +12 -8
  492. package/dist/components/motion/morphing-modal.js.map +1 -1
  493. package/dist/components/motion/morphing-search-chips.d.ts +22 -1
  494. package/dist/components/motion/morphing-search-chips.d.ts.map +1 -1
  495. package/dist/components/motion/morphing-search-chips.js +41 -19
  496. package/dist/components/motion/morphing-search-chips.js.map +1 -1
  497. package/dist/components/motion/morphing-search.d.ts +12 -1
  498. package/dist/components/motion/morphing-search.d.ts.map +1 -1
  499. package/dist/components/motion/morphing-search.js +27 -13
  500. package/dist/components/motion/morphing-search.js.map +1 -1
  501. package/dist/components/motion/morphing-tabs.d.ts +9 -1
  502. package/dist/components/motion/morphing-tabs.d.ts.map +1 -1
  503. package/dist/components/motion/morphing-tabs.js +40 -16
  504. package/dist/components/motion/morphing-tabs.js.map +1 -1
  505. package/dist/components/motion/multi-select/content.js +4 -4
  506. package/dist/components/motion/multi-select/context.d.ts +2 -61
  507. package/dist/components/motion/multi-select/context.js +1 -226
  508. package/dist/components/motion/multi-select/index.d.ts +2 -2
  509. package/dist/components/motion/multi-select/index.js +2 -2
  510. package/dist/components/motion/multi-select/list.d.ts.map +1 -1
  511. package/dist/components/motion/multi-select/list.js +10 -9
  512. package/dist/components/motion/multi-select/list.js.map +1 -1
  513. package/dist/components/motion/multi-select/trigger.js +11 -10
  514. package/dist/components/motion/multi-select/trigger.js.map +1 -1
  515. package/dist/components/motion/not-found/glitch.d.ts +1 -1
  516. package/dist/components/motion/not-found/glitch.d.ts.map +1 -1
  517. package/dist/components/motion/not-found/glitch.js +8 -6
  518. package/dist/components/motion/not-found/glitch.js.map +1 -1
  519. package/dist/components/motion/not-found/magnetic.d.ts +1 -1
  520. package/dist/components/motion/not-found/magnetic.d.ts.map +1 -1
  521. package/dist/components/motion/not-found/magnetic.js +8 -6
  522. package/dist/components/motion/not-found/magnetic.js.map +1 -1
  523. package/dist/components/motion/not-found/shared.d.ts +16 -6
  524. package/dist/components/motion/not-found/shared.d.ts.map +1 -1
  525. package/dist/components/motion/not-found/shared.js +20 -9
  526. package/dist/components/motion/not-found/shared.js.map +1 -1
  527. package/dist/components/motion/not-found/spotlight.d.ts +1 -1
  528. package/dist/components/motion/not-found/spotlight.d.ts.map +1 -1
  529. package/dist/components/motion/not-found/spotlight.js +9 -7
  530. package/dist/components/motion/not-found/spotlight.js.map +1 -1
  531. package/dist/components/motion/not-found/stacked.d.ts +1 -1
  532. package/dist/components/motion/not-found/stacked.d.ts.map +1 -1
  533. package/dist/components/motion/not-found/stacked.js +9 -7
  534. package/dist/components/motion/not-found/stacked.js.map +1 -1
  535. package/dist/components/motion/not-found/terminal.d.ts +1 -1
  536. package/dist/components/motion/not-found/terminal.d.ts.map +1 -1
  537. package/dist/components/motion/not-found/terminal.js +8 -6
  538. package/dist/components/motion/not-found/terminal.js.map +1 -1
  539. package/dist/components/motion/notification-stack.d.ts +12 -1
  540. package/dist/components/motion/notification-stack.d.ts.map +1 -1
  541. package/dist/components/motion/notification-stack.js +23 -7
  542. package/dist/components/motion/notification-stack.js.map +1 -1
  543. package/dist/components/motion/number-ticker.d.ts +5 -2
  544. package/dist/components/motion/number-ticker.d.ts.map +1 -1
  545. package/dist/components/motion/number-ticker.js +7 -4
  546. package/dist/components/motion/number-ticker.js.map +1 -1
  547. package/dist/components/motion/otp-input.d.ts +16 -1
  548. package/dist/components/motion/otp-input.d.ts.map +1 -1
  549. package/dist/components/motion/otp-input.js +34 -9
  550. package/dist/components/motion/otp-input.js.map +1 -1
  551. package/dist/components/motion/overflow-actions.d.ts +9 -1
  552. package/dist/components/motion/overflow-actions.d.ts.map +1 -1
  553. package/dist/components/motion/overflow-actions.js +16 -8
  554. package/dist/components/motion/overflow-actions.js.map +1 -1
  555. package/dist/components/motion/pagination.d.ts +13 -1
  556. package/dist/components/motion/pagination.d.ts.map +1 -1
  557. package/dist/components/motion/pagination.js +22 -11
  558. package/dist/components/motion/pagination.js.map +1 -1
  559. package/dist/components/motion/parallax.js +1 -1
  560. package/dist/components/motion/plinko.d.ts +70 -0
  561. package/dist/components/motion/plinko.d.ts.map +1 -0
  562. package/dist/components/motion/plinko.js +399 -0
  563. package/dist/components/motion/plinko.js.map +1 -0
  564. package/dist/components/motion/popover-morph.js +6 -6
  565. package/dist/components/motion/popover-morph.js.map +1 -1
  566. package/dist/components/motion/popover.js +5 -5
  567. package/dist/components/motion/popover.js.map +1 -1
  568. package/dist/components/motion/prediction-market-card.d.ts +15 -1
  569. package/dist/components/motion/prediction-market-card.d.ts.map +1 -1
  570. package/dist/components/motion/prediction-market-card.js +32 -15
  571. package/dist/components/motion/prediction-market-card.js.map +1 -1
  572. package/dist/components/motion/prediction-market.d.ts +24 -1
  573. package/dist/components/motion/prediction-market.d.ts.map +1 -1
  574. package/dist/components/motion/prediction-market.js +56 -37
  575. package/dist/components/motion/prediction-market.js.map +1 -1
  576. package/dist/components/motion/preview-rail.d.ts +8 -1
  577. package/dist/components/motion/preview-rail.d.ts.map +1 -1
  578. package/dist/components/motion/preview-rail.js +10 -5
  579. package/dist/components/motion/preview-rail.js.map +1 -1
  580. package/dist/components/motion/project-folder.d.ts +17 -1
  581. package/dist/components/motion/project-folder.d.ts.map +1 -1
  582. package/dist/components/motion/project-folder.js +21 -10
  583. package/dist/components/motion/project-folder.js.map +1 -1
  584. package/dist/components/motion/pull-to-refresh.d.ts +11 -1
  585. package/dist/components/motion/pull-to-refresh.d.ts.map +1 -1
  586. package/dist/components/motion/pull-to-refresh.js +21 -10
  587. package/dist/components/motion/pull-to-refresh.js.map +1 -1
  588. package/dist/components/motion/radio.js +2 -2
  589. package/dist/components/motion/range-slider-bubble.js +3 -3
  590. package/dist/components/motion/range-slider-fluid.js +3 -3
  591. package/dist/components/motion/range-slider-inline.js +3 -3
  592. package/dist/components/motion/range-slider-ruler.js +3 -3
  593. package/dist/components/motion/range-slider-ruler.js.map +1 -1
  594. package/dist/components/motion/range-slider-wave.js +3 -3
  595. package/dist/components/motion/range-slider.js +3 -3
  596. package/dist/components/motion/scroll-progress.js +2 -2
  597. package/dist/components/motion/scroll-reveal.js +2 -2
  598. package/dist/components/motion/scroll-to.d.ts +1 -1
  599. package/dist/components/motion/scroll-to.js +1 -1
  600. package/dist/components/motion/select-morph.d.ts +1 -1
  601. package/dist/components/motion/select-morph.js +4 -4
  602. package/dist/components/motion/select-morph.js.map +1 -1
  603. package/dist/components/motion/select.js +4 -4
  604. package/dist/components/motion/shader-background.js +2 -2
  605. package/dist/components/motion/shared-layout-bg.js +4 -4
  606. package/dist/components/motion/shared-layout-bg.js.map +1 -1
  607. package/dist/components/motion/signup-form.d.ts +38 -1
  608. package/dist/components/motion/signup-form.d.ts.map +1 -1
  609. package/dist/components/motion/signup-form.js +80 -38
  610. package/dist/components/motion/signup-form.js.map +1 -1
  611. package/dist/components/motion/slide-action-button.d.ts +9 -1
  612. package/dist/components/motion/slide-action-button.d.ts.map +1 -1
  613. package/dist/components/motion/slide-action-button.js +15 -9
  614. package/dist/components/motion/slide-action-button.js.map +1 -1
  615. package/dist/components/motion/slide-game.d.ts +91 -0
  616. package/dist/components/motion/slide-game.d.ts.map +1 -0
  617. package/dist/components/motion/slide-game.js +642 -0
  618. package/dist/components/motion/slide-game.js.map +1 -0
  619. package/dist/components/motion/smooth-scroll.d.ts +1 -1
  620. package/dist/components/motion/smooth-scroll.js +5 -4
  621. package/dist/components/motion/smooth-scroll.js.map +1 -1
  622. package/dist/components/motion/sortable-list.d.ts +13 -1
  623. package/dist/components/motion/sortable-list.d.ts.map +1 -1
  624. package/dist/components/motion/sortable-list.js +39 -14
  625. package/dist/components/motion/sortable-list.js.map +1 -1
  626. package/dist/components/motion/swap/controls.d.ts +8 -4
  627. package/dist/components/motion/swap/controls.d.ts.map +1 -1
  628. package/dist/components/motion/swap/controls.js +20 -12
  629. package/dist/components/motion/swap/controls.js.map +1 -1
  630. package/dist/components/motion/swap/field.d.ts +4 -2
  631. package/dist/components/motion/swap/field.d.ts.map +1 -1
  632. package/dist/components/motion/swap/field.js +9 -7
  633. package/dist/components/motion/swap/field.js.map +1 -1
  634. package/dist/components/motion/swap/quote-row.d.ts +4 -2
  635. package/dist/components/motion/swap/quote-row.d.ts.map +1 -1
  636. package/dist/components/motion/swap/quote-row.js +9 -7
  637. package/dist/components/motion/swap/quote-row.js.map +1 -1
  638. package/dist/components/motion/swap/token-badges.d.ts +1 -1
  639. package/dist/components/motion/swap/token-badges.js +1 -1
  640. package/dist/components/motion/swap/token-badges.js.map +1 -1
  641. package/dist/components/motion/swap/token-picker.d.ts +4 -2
  642. package/dist/components/motion/swap/token-picker.d.ts.map +1 -1
  643. package/dist/components/motion/swap/token-picker.js +39 -37
  644. package/dist/components/motion/swap/token-picker.js.map +1 -1
  645. package/dist/components/motion/swap.d.ts +7 -4
  646. package/dist/components/motion/swap.d.ts.map +1 -1
  647. package/dist/components/motion/swap.js +30 -18
  648. package/dist/components/motion/swap.js.map +1 -1
  649. package/dist/components/motion/swipeable-list.d.ts +9 -1
  650. package/dist/components/motion/swipeable-list.d.ts.map +1 -1
  651. package/dist/components/motion/swipeable-list.js +17 -9
  652. package/dist/components/motion/swipeable-list.js.map +1 -1
  653. package/dist/components/motion/switch.js +3 -7
  654. package/dist/components/motion/switch.js.map +1 -1
  655. package/dist/components/motion/table/editable-cell.d.ts +2 -1
  656. package/dist/components/motion/table/editable-cell.d.ts.map +1 -1
  657. package/dist/components/motion/table/editable-cell.js +2 -2
  658. package/dist/components/motion/table/editable-cell.js.map +1 -1
  659. package/dist/components/motion/table/index.d.ts +4 -3
  660. package/dist/components/motion/table/index.d.ts.map +1 -1
  661. package/dist/components/motion/table/index.js +44 -13
  662. package/dist/components/motion/table/index.js.map +1 -1
  663. package/dist/components/motion/table/row-handle.d.ts +3 -1
  664. package/dist/components/motion/table/row-handle.d.ts.map +1 -1
  665. package/dist/components/motion/table/row-handle.js +7 -7
  666. package/dist/components/motion/table/row-handle.js.map +1 -1
  667. package/dist/components/motion/table/skeleton-rows.d.ts +1 -1
  668. package/dist/components/motion/table/skeleton-rows.js +1 -1
  669. package/dist/components/motion/table/table-header.d.ts +4 -2
  670. package/dist/components/motion/table/table-header.d.ts.map +1 -1
  671. package/dist/components/motion/table/table-header.js +22 -19
  672. package/dist/components/motion/table/table-header.js.map +1 -1
  673. package/dist/components/motion/table/table-menu.js +3 -3
  674. package/dist/components/motion/tabs.d.ts +9 -1
  675. package/dist/components/motion/tabs.d.ts.map +1 -1
  676. package/dist/components/motion/tabs.js +19 -10
  677. package/dist/components/motion/tabs.js.map +1 -1
  678. package/dist/components/motion/text-reveal.js +2 -2
  679. package/dist/components/motion/text-scramble.js +1 -1
  680. package/dist/components/motion/text-shimmer.js +1 -1
  681. package/dist/components/motion/theme-toggle.d.ts +9 -1
  682. package/dist/components/motion/theme-toggle.d.ts.map +1 -1
  683. package/dist/components/motion/theme-toggle.js +15 -8
  684. package/dist/components/motion/theme-toggle.js.map +1 -1
  685. package/dist/components/motion/tilt-card.js +3 -3
  686. package/dist/components/motion/timeline.d.ts +9 -1
  687. package/dist/components/motion/timeline.d.ts.map +1 -1
  688. package/dist/components/motion/timeline.js +26 -7
  689. package/dist/components/motion/timeline.js.map +1 -1
  690. package/dist/components/motion/tooltip/positioner.d.ts +1 -1
  691. package/dist/components/motion/tooltip/positioner.js +1 -1
  692. package/dist/components/motion/tooltip-surface.d.ts +1 -2
  693. package/dist/components/motion/tooltip-surface.d.ts.map +1 -1
  694. package/dist/components/motion/tooltip-surface.js +3 -3
  695. package/dist/components/motion/tooltip-surface.js.map +1 -1
  696. package/dist/components/motion/tooltip.d.ts +1 -1
  697. package/dist/components/motion/tooltip.js +1 -1
  698. package/dist/components/motion/wallet-card/account-avatar.d.ts +1 -1
  699. package/dist/components/motion/wallet-card/account-avatar.js +1 -1
  700. package/dist/components/motion/wallet-card/account-switcher.d.ts +4 -2
  701. package/dist/components/motion/wallet-card/account-switcher.d.ts.map +1 -1
  702. package/dist/components/motion/wallet-card/account-switcher.js +17 -10
  703. package/dist/components/motion/wallet-card/account-switcher.js.map +1 -1
  704. package/dist/components/motion/wallet-card/actions.d.ts +3 -1
  705. package/dist/components/motion/wallet-card/actions.d.ts.map +1 -1
  706. package/dist/components/motion/wallet-card/actions.js +33 -29
  707. package/dist/components/motion/wallet-card/actions.js.map +1 -1
  708. package/dist/components/motion/wallet-card/balance-delta.d.ts +2 -1
  709. package/dist/components/motion/wallet-card/balance-delta.d.ts.map +1 -1
  710. package/dist/components/motion/wallet-card/balance-delta.js +5 -5
  711. package/dist/components/motion/wallet-card/balance-delta.js.map +1 -1
  712. package/dist/components/motion/wallet-card/copy-button.d.ts +3 -1
  713. package/dist/components/motion/wallet-card/copy-button.d.ts.map +1 -1
  714. package/dist/components/motion/wallet-card/copy-button.js +12 -6
  715. package/dist/components/motion/wallet-card/copy-button.js.map +1 -1
  716. package/dist/components/motion/wallet-card/index.d.ts +8 -3
  717. package/dist/components/motion/wallet-card/index.d.ts.map +1 -1
  718. package/dist/components/motion/wallet-card/index.js +19 -13
  719. package/dist/components/motion/wallet-card/index.js.map +1 -1
  720. package/dist/components/motion/wallet-card/search-bar.d.ts +3 -1
  721. package/dist/components/motion/wallet-card/search-bar.d.ts.map +1 -1
  722. package/dist/components/motion/wallet-card/search-bar.js +14 -11
  723. package/dist/components/motion/wallet-card/search-bar.js.map +1 -1
  724. package/dist/components/motion/wheel-picker.js +3 -3
  725. package/dist/components/reui/alert.d.ts +1 -1
  726. package/dist/components/reui/alert.js +1 -1
  727. package/dist/components/reui/autocomplete.d.ts +2 -2
  728. package/dist/components/reui/autocomplete.js +4 -4
  729. package/dist/components/reui/badge.d.ts +3 -3
  730. package/dist/components/reui/badge.js +2 -2
  731. package/dist/components/reui/cascader/cascader-async.d.ts +1 -1
  732. package/dist/components/reui/cascader/cascader-async.js +37 -37
  733. package/dist/components/reui/cascader/cascader-async.js.map +1 -1
  734. package/dist/components/reui/cascader/cascader-columns.d.ts +6 -6
  735. package/dist/components/reui/cascader/cascader-columns.d.ts.map +1 -1
  736. package/dist/components/reui/cascader/cascader-columns.js +6 -6
  737. package/dist/components/reui/cascader/cascader-columns.js.map +1 -1
  738. package/dist/components/reui/cascader/cascader-context.d.ts +8 -8
  739. package/dist/components/reui/cascader/cascader-context.d.ts.map +1 -1
  740. package/dist/components/reui/cascader/cascader-context.js +10 -10
  741. package/dist/components/reui/cascader/cascader-context.js.map +1 -1
  742. package/dist/components/reui/cascader/cascader-footer.d.ts +14 -14
  743. package/dist/components/reui/cascader/cascader-footer.d.ts.map +1 -1
  744. package/dist/components/reui/cascader/cascader-footer.js +32 -33
  745. package/dist/components/reui/cascader/cascader-footer.js.map +1 -1
  746. package/dist/components/reui/cascader/cascader-i18n.d.ts +1 -1
  747. package/dist/components/reui/cascader/cascader-item.d.ts +12 -12
  748. package/dist/components/reui/cascader/cascader-item.d.ts.map +1 -1
  749. package/dist/components/reui/cascader/cascader-item.js +27 -27
  750. package/dist/components/reui/cascader/cascader-item.js.map +1 -1
  751. package/dist/components/reui/cascader/cascader-lib.d.ts +1 -1
  752. package/dist/components/reui/cascader/cascader-nav.d.ts +12 -12
  753. package/dist/components/reui/cascader/cascader-nav.d.ts.map +1 -1
  754. package/dist/components/reui/cascader/cascader-nav.js +12 -12
  755. package/dist/components/reui/cascader/cascader-nav.js.map +1 -1
  756. package/dist/components/reui/cascader/cascader-types.d.ts +1 -1
  757. package/dist/components/reui/cascader/cascader-virtual.d.ts +4 -4
  758. package/dist/components/reui/cascader/cascader-virtual.d.ts.map +1 -1
  759. package/dist/components/reui/cascader/cascader-virtual.js +13 -13
  760. package/dist/components/reui/cascader/cascader-virtual.js.map +1 -1
  761. package/dist/components/reui/cascader/cascader.d.ts +24 -24
  762. package/dist/components/reui/cascader/cascader.d.ts.map +1 -1
  763. package/dist/components/reui/cascader/cascader.js +110 -110
  764. package/dist/components/reui/cascader/cascader.js.map +1 -1
  765. package/dist/components/reui/code-block/code-block.d.ts +2 -1
  766. package/dist/components/reui/code-block/code-block.d.ts.map +1 -1
  767. package/dist/components/reui/code-block/code-block.js +2 -2
  768. package/dist/components/reui/code-block/code-block.js.map +1 -1
  769. package/dist/components/reui/color-picker.d.ts +1 -1
  770. package/dist/components/reui/color-picker.js +6 -6
  771. package/dist/components/reui/data-grid/data-grid-cell-selection.d.ts +1 -1
  772. package/dist/components/reui/data-grid/data-grid-cell-selection.js +4 -4
  773. package/dist/components/reui/data-grid/data-grid-cell-selection.js.map +1 -1
  774. package/dist/components/reui/data-grid/data-grid-column-filter.d.ts +1 -1
  775. package/dist/components/reui/data-grid/data-grid-column-filter.js +3 -3
  776. package/dist/components/reui/data-grid/data-grid-column-header.d.ts +1 -1
  777. package/dist/components/reui/data-grid/data-grid-column-header.js +4 -4
  778. package/dist/components/reui/data-grid/data-grid-column-visibility.d.ts +1 -1
  779. package/dist/components/reui/data-grid/data-grid-i18n.d.ts +1 -1
  780. package/dist/components/reui/data-grid/data-grid-pagination.js +2 -2
  781. package/dist/components/reui/data-grid/data-grid-scroll-area.js +3 -3
  782. package/dist/components/reui/data-grid/data-grid-table-dnd-rows.d.ts +1 -1
  783. package/dist/components/reui/data-grid/data-grid-table-dnd-rows.js +8 -8
  784. package/dist/components/reui/data-grid/data-grid-table-dnd.js +6 -6
  785. package/dist/components/reui/data-grid/data-grid-table-virtual.d.ts +2 -2
  786. package/dist/components/reui/data-grid/data-grid-table-virtual.js +3 -3
  787. package/dist/components/reui/data-grid/data-grid-table.d.ts.map +1 -1
  788. package/dist/components/reui/data-grid/data-grid-table.js +4 -4
  789. package/dist/components/reui/data-grid/data-grid-table.js.map +1 -1
  790. package/dist/components/reui/data-grid/data-grid.d.ts +1 -1
  791. package/dist/components/reui/data-grid/data-grid.js +2 -2
  792. package/dist/components/reui/date-selector.js +4 -4
  793. package/dist/components/reui/emoji-picker.d.ts +1 -1
  794. package/dist/components/reui/emoji-picker.js +5 -5
  795. package/dist/components/reui/emoji-picker.js.map +1 -1
  796. package/dist/components/reui/event-calendar/event-calendar-agenda-view.js +6 -6
  797. package/dist/components/reui/event-calendar/event-calendar-content.d.ts +1 -1
  798. package/dist/components/reui/event-calendar/event-calendar-content.js +3 -3
  799. package/dist/components/reui/event-calendar/event-calendar-dnd.js +2 -2
  800. package/dist/components/reui/event-calendar/event-calendar-event.d.ts +1 -1
  801. package/dist/components/reui/event-calendar/event-calendar-event.js +6 -6
  802. package/dist/components/reui/event-calendar/event-calendar-i18n.d.ts +1 -1
  803. package/dist/components/reui/event-calendar/event-calendar-lib.d.ts +1 -1
  804. package/dist/components/reui/event-calendar/event-calendar-lib.js +4 -4
  805. package/dist/components/reui/event-calendar/event-calendar-month-view.d.ts +1 -1
  806. package/dist/components/reui/event-calendar/event-calendar-month-view.js +6 -6
  807. package/dist/components/reui/event-calendar/event-calendar-nav.js +6 -6
  808. package/dist/components/reui/event-calendar/event-calendar-recurrence.js +1 -1
  809. package/dist/components/reui/event-calendar/event-calendar-resource-view.js +5 -5
  810. package/dist/components/reui/event-calendar/event-calendar-time-grid.d.ts +1 -1
  811. package/dist/components/reui/event-calendar/event-calendar-time-grid.js +5 -5
  812. package/dist/components/reui/event-calendar/event-calendar.d.ts +3 -3
  813. package/dist/components/reui/event-calendar/event-calendar.js +4 -4
  814. package/dist/components/reui/event-calendar/event-calendar.js.map +1 -1
  815. package/dist/components/reui/file-type.d.ts +1 -1
  816. package/dist/components/reui/file-type.js +1 -1
  817. package/dist/components/reui/filters/filters-advanced.d.ts +6 -6
  818. package/dist/components/reui/filters/filters-advanced.d.ts.map +1 -1
  819. package/dist/components/reui/filters/filters-advanced.js +35 -35
  820. package/dist/components/reui/filters/filters-advanced.js.map +1 -1
  821. package/dist/components/reui/filters/filters-builder.d.ts +5 -5
  822. package/dist/components/reui/filters/filters-builder.d.ts.map +1 -1
  823. package/dist/components/reui/filters/filters-builder.js +6 -6
  824. package/dist/components/reui/filters/filters-builder.js.map +1 -1
  825. package/dist/components/reui/filters/filters-chip.d.ts +10 -10
  826. package/dist/components/reui/filters/filters-chip.d.ts.map +1 -1
  827. package/dist/components/reui/filters/filters-chip.js +20 -20
  828. package/dist/components/reui/filters/filters-chip.js.map +1 -1
  829. package/dist/components/reui/filters/filters-context.d.ts +11 -11
  830. package/dist/components/reui/filters/filters-context.d.ts.map +1 -1
  831. package/dist/components/reui/filters/filters-context.js +27 -27
  832. package/dist/components/reui/filters/filters-context.js.map +1 -1
  833. package/dist/components/reui/filters/filters-dnd.d.ts +2 -2
  834. package/dist/components/reui/filters/filters-dnd.d.ts.map +1 -1
  835. package/dist/components/reui/filters/filters-dnd.js +5 -5
  836. package/dist/components/reui/filters/filters-dnd.js.map +1 -1
  837. package/dist/components/reui/filters/filters-draft.d.ts +1 -1
  838. package/dist/components/reui/filters/filters-editors.d.ts +9 -9
  839. package/dist/components/reui/filters/filters-editors.d.ts.map +1 -1
  840. package/dist/components/reui/filters/filters-editors.js +41 -41
  841. package/dist/components/reui/filters/filters-editors.js.map +1 -1
  842. package/dist/components/reui/filters/filters-lib.d.ts +1 -1
  843. package/dist/components/reui/filters/filters-types.d.ts +7 -7
  844. package/dist/components/reui/filters/filters-types.d.ts.map +1 -1
  845. package/dist/components/reui/filters/filters.d.ts +9 -9
  846. package/dist/components/reui/filters/filters.d.ts.map +1 -1
  847. package/dist/components/reui/filters/filters.js +56 -56
  848. package/dist/components/reui/filters/filters.js.map +1 -1
  849. package/dist/components/reui/frame.d.ts +2 -2
  850. package/dist/components/reui/frame.js +1 -1
  851. package/dist/components/reui/gantt/gantt-bar.d.ts +1 -1
  852. package/dist/components/reui/gantt/gantt-bar.js +5 -5
  853. package/dist/components/reui/gantt/gantt-dnd.js +5 -5
  854. package/dist/components/reui/gantt/gantt-dnd.js.map +1 -1
  855. package/dist/components/reui/gantt/gantt-i18n.d.ts +1 -1
  856. package/dist/components/reui/gantt/gantt-lib.d.ts +1 -1
  857. package/dist/components/reui/gantt/gantt-lib.js +4 -4
  858. package/dist/components/reui/gantt/gantt-nav.d.ts +1 -1
  859. package/dist/components/reui/gantt/gantt-nav.js +6 -6
  860. package/dist/components/reui/gantt/gantt-recurrence.js +1 -1
  861. package/dist/components/reui/gantt/gantt-view.js +11 -11
  862. package/dist/components/reui/gantt/gantt-view.js.map +1 -1
  863. package/dist/components/reui/gantt/gantt.d.ts +3 -3
  864. package/dist/components/reui/gantt/gantt.js +4 -4
  865. package/dist/components/reui/gantt/gantt.js.map +1 -1
  866. package/dist/components/reui/icon-tile.d.ts +3 -3
  867. package/dist/components/reui/icon-tile.js +2 -2
  868. package/dist/components/reui/kanban.d.ts +11 -11
  869. package/dist/components/reui/kanban.d.ts.map +1 -1
  870. package/dist/components/reui/kanban.js +3 -3
  871. package/dist/components/reui/number-field.d.ts +4 -4
  872. package/dist/components/reui/number-field.js +4 -4
  873. package/dist/components/reui/phone-input.js +5 -5
  874. package/dist/components/reui/rating.d.ts +1 -1
  875. package/dist/components/reui/rating.js +2 -2
  876. package/dist/components/reui/scrollspy.js +1 -1
  877. package/dist/components/reui/signature-pad.d.ts +1 -1
  878. package/dist/components/reui/signature-pad.js +7 -7
  879. package/dist/components/reui/signature-pad.js.map +1 -1
  880. package/dist/components/reui/sortable.d.ts +7 -7
  881. package/dist/components/reui/sortable.d.ts.map +1 -1
  882. package/dist/components/reui/sortable.js +3 -3
  883. package/dist/components/reui/stepper.js +2 -2
  884. package/dist/components/reui/time-picker.d.ts +1 -1
  885. package/dist/components/reui/time-picker.js +4 -4
  886. package/dist/components/reui/timeline.js +2 -2
  887. package/dist/components/reui/tree.d.ts +1 -0
  888. package/dist/components/reui/tree.d.ts.map +1 -1
  889. package/dist/components/reui/tree.js +3 -3
  890. package/dist/components/ui/accordion.js +2 -2
  891. package/dist/components/ui/alert-dialog.d.ts +14 -14
  892. package/dist/components/ui/alert-dialog.d.ts.map +1 -1
  893. package/dist/components/ui/alert-dialog.js +2 -2
  894. package/dist/components/ui/alert.d.ts +5 -5
  895. package/dist/components/ui/alert.d.ts.map +1 -1
  896. package/dist/components/ui/alert.js +1 -1
  897. package/dist/components/ui/attachment.d.ts +15 -15
  898. package/dist/components/ui/attachment.d.ts.map +1 -1
  899. package/dist/components/ui/attachment.js +4 -4
  900. package/dist/components/ui/avatar.d.ts +7 -7
  901. package/dist/components/ui/avatar.d.ts.map +1 -1
  902. package/dist/components/ui/avatar.js +1 -1
  903. package/dist/components/ui/badge.d.ts +2 -2
  904. package/dist/components/ui/badge.js +2 -2
  905. package/dist/components/ui/breadcrumb.d.ts +8 -8
  906. package/dist/components/ui/breadcrumb.d.ts.map +1 -1
  907. package/dist/components/ui/breadcrumb.js +3 -3
  908. package/dist/components/ui/bubble.d.ts +9 -9
  909. package/dist/components/ui/bubble.d.ts.map +1 -1
  910. package/dist/components/ui/bubble.js +3 -3
  911. package/dist/components/ui/button-group.d.ts +3 -3
  912. package/dist/components/ui/button-group.js +4 -4
  913. package/dist/components/ui/button.d.ts +2 -2
  914. package/dist/components/ui/button.js +2 -2
  915. package/dist/components/ui/calendar.d.ts +7 -7
  916. package/dist/components/ui/calendar.d.ts.map +1 -1
  917. package/dist/components/ui/calendar.js +6 -6
  918. package/dist/components/ui/calendar.js.map +1 -1
  919. package/dist/components/ui/card.d.ts +9 -9
  920. package/dist/components/ui/card.d.ts.map +1 -1
  921. package/dist/components/ui/carousel.d.ts +7 -7
  922. package/dist/components/ui/carousel.d.ts.map +1 -1
  923. package/dist/components/ui/carousel.js +14 -14
  924. package/dist/components/ui/carousel.js.map +1 -1
  925. package/dist/components/ui/chart.d.ts +12 -12
  926. package/dist/components/ui/chart.d.ts.map +1 -1
  927. package/dist/components/ui/chart.js +6 -6
  928. package/dist/components/ui/chart.js.map +1 -1
  929. package/dist/components/ui/checkbox.js +2 -2
  930. package/dist/components/ui/code-block.d.ts +13 -13
  931. package/dist/components/ui/code-block.d.ts.map +1 -1
  932. package/dist/components/ui/code-block.js +6 -6
  933. package/dist/components/ui/code-block.js.map +1 -1
  934. package/dist/components/ui/collapsible.js +1 -1
  935. package/dist/components/ui/combobox.d.ts +16 -16
  936. package/dist/components/ui/combobox.d.ts.map +1 -1
  937. package/dist/components/ui/combobox.js +5 -5
  938. package/dist/components/ui/combobox.js.map +1 -1
  939. package/dist/components/ui/command.d.ts +13 -13
  940. package/dist/components/ui/command.d.ts.map +1 -1
  941. package/dist/components/ui/command.js +3 -3
  942. package/dist/components/ui/context-menu.d.ts +16 -16
  943. package/dist/components/ui/context-menu.d.ts.map +1 -1
  944. package/dist/components/ui/context-menu.js +2 -2
  945. package/dist/components/ui/dialog.d.ts +12 -12
  946. package/dist/components/ui/dialog.d.ts.map +1 -1
  947. package/dist/components/ui/dialog.js +3 -3
  948. package/dist/components/ui/drawer.d.ts +12 -12
  949. package/dist/components/ui/drawer.d.ts.map +1 -1
  950. package/dist/components/ui/drawer.js +5 -5
  951. package/dist/components/ui/drawer.js.map +1 -1
  952. package/dist/components/ui/dropdown-menu.d.ts +16 -16
  953. package/dist/components/ui/dropdown-menu.d.ts.map +1 -1
  954. package/dist/components/ui/dropdown-menu.js +2 -2
  955. package/dist/components/ui/empty.js +1 -1
  956. package/dist/components/ui/field.d.ts +2 -2
  957. package/dist/components/ui/field.js +3 -3
  958. package/dist/components/ui/hover-card.js +1 -1
  959. package/dist/components/ui/input-group.d.ts +11 -11
  960. package/dist/components/ui/input-group.d.ts.map +1 -1
  961. package/dist/components/ui/input-group.js +2 -2
  962. package/dist/components/ui/input-otp.d.ts +7 -7
  963. package/dist/components/ui/input-otp.d.ts.map +1 -1
  964. package/dist/components/ui/input-otp.js +4 -4
  965. package/dist/components/ui/input-otp.js.map +1 -1
  966. package/dist/components/ui/input.d.ts +2 -2
  967. package/dist/components/ui/input.d.ts.map +1 -1
  968. package/dist/components/ui/input.js +1 -1
  969. package/dist/components/ui/item.d.ts +14 -14
  970. package/dist/components/ui/item.d.ts.map +1 -1
  971. package/dist/components/ui/item.js +4 -4
  972. package/dist/components/ui/label.d.ts +2 -2
  973. package/dist/components/ui/label.d.ts.map +1 -1
  974. package/dist/components/ui/marker.d.ts +6 -6
  975. package/dist/components/ui/marker.d.ts.map +1 -1
  976. package/dist/components/ui/marker.js +3 -3
  977. package/dist/components/ui/menubar.d.ts +20 -20
  978. package/dist/components/ui/menubar.d.ts.map +1 -1
  979. package/dist/components/ui/menubar.js +4 -4
  980. package/dist/components/ui/message-scroller.d.ts +8 -8
  981. package/dist/components/ui/message-scroller.d.ts.map +1 -1
  982. package/dist/components/ui/message-scroller.js +3 -3
  983. package/dist/components/ui/message.d.ts +8 -8
  984. package/dist/components/ui/message.d.ts.map +1 -1
  985. package/dist/components/ui/native-select.d.ts +5 -5
  986. package/dist/components/ui/native-select.d.ts.map +1 -1
  987. package/dist/components/ui/native-select.js +1 -1
  988. package/dist/components/ui/navigation-menu.js +3 -3
  989. package/dist/components/ui/pagination.d.ts +11 -11
  990. package/dist/components/ui/pagination.d.ts.map +1 -1
  991. package/dist/components/ui/pagination.js +2 -2
  992. package/dist/components/ui/popover.d.ts +7 -7
  993. package/dist/components/ui/popover.d.ts.map +1 -1
  994. package/dist/components/ui/popover.js +1 -1
  995. package/dist/components/ui/progress.js +1 -1
  996. package/dist/components/ui/questionnaire.d.ts +17 -17
  997. package/dist/components/ui/questionnaire.d.ts.map +1 -1
  998. package/dist/components/ui/questionnaire.js +3 -3
  999. package/dist/components/ui/radio-group.js +2 -2
  1000. package/dist/components/ui/resizable.js +1 -1
  1001. package/dist/components/ui/scroll-area.js +1 -1
  1002. package/dist/components/ui/select.d.ts +10 -10
  1003. package/dist/components/ui/select.d.ts.map +1 -1
  1004. package/dist/components/ui/select.js +2 -2
  1005. package/dist/components/ui/separator.js +1 -1
  1006. package/dist/components/ui/sheet.d.ts +9 -9
  1007. package/dist/components/ui/sheet.d.ts.map +1 -1
  1008. package/dist/components/ui/sheet.js +3 -3
  1009. package/dist/components/ui/sidebar.d.ts +34 -34
  1010. package/dist/components/ui/sidebar.d.ts.map +1 -1
  1011. package/dist/components/ui/sidebar.js +15 -15
  1012. package/dist/components/ui/sidebar.js.map +1 -1
  1013. package/dist/components/ui/slider.js +1 -1
  1014. package/dist/components/ui/spinner.js +1 -1
  1015. package/dist/components/ui/switch.js +1 -1
  1016. package/dist/components/ui/table.d.ts +9 -9
  1017. package/dist/components/ui/table.d.ts.map +1 -1
  1018. package/dist/components/ui/tabs.d.ts +1 -1
  1019. package/dist/components/ui/tabs.js +2 -2
  1020. package/dist/components/ui/textarea.d.ts +2 -2
  1021. package/dist/components/ui/textarea.d.ts.map +1 -1
  1022. package/dist/components/ui/toast.d.ts +11 -11
  1023. package/dist/components/ui/toast.d.ts.map +1 -1
  1024. package/dist/components/ui/toast.js +3 -3
  1025. package/dist/components/ui/toggle-group.d.ts +5 -5
  1026. package/dist/components/ui/toggle-group.d.ts.map +1 -1
  1027. package/dist/components/ui/toggle-group.js +6 -6
  1028. package/dist/components/ui/toggle-group.js.map +1 -1
  1029. package/dist/components/ui/toggle.d.ts +2 -2
  1030. package/dist/components/ui/toggle.js +2 -2
  1031. package/dist/components/ui/tooltip.js +1 -1
  1032. package/dist/components/ui/trace.d.ts +12 -12
  1033. package/dist/components/ui/trace.d.ts.map +1 -1
  1034. package/dist/components/ui/trace.js +2 -2
  1035. package/dist/{constants-evLzfUhL.js → constants-CggcOqef.js} +1 -1
  1036. package/dist/constants-CggcOqef.js.map +1 -0
  1037. package/dist/context-B5NItr9C.d.ts +82 -0
  1038. package/dist/context-B5NItr9C.d.ts.map +1 -0
  1039. package/dist/context-BEYROlTB.d.ts +78 -0
  1040. package/dist/context-BEYROlTB.d.ts.map +1 -0
  1041. package/dist/context-BLjAwZ5V.js +243 -0
  1042. package/dist/context-BLjAwZ5V.js.map +1 -0
  1043. package/dist/{context-CXlD0FcC.js → context-BpHX6J1T.js} +28 -4
  1044. package/dist/context-BpHX6J1T.js.map +1 -0
  1045. package/dist/{context-tv-kneJV.d.ts → context-BrGWrRwa.d.ts} +26 -3
  1046. package/dist/context-BrGWrRwa.d.ts.map +1 -0
  1047. package/dist/{context-D-juVNr2.d.ts → context-C1Z_5vew.d.ts} +18 -3
  1048. package/dist/context-C1Z_5vew.d.ts.map +1 -0
  1049. package/dist/context-C5DO1oe1.js +232 -0
  1050. package/dist/context-C5DO1oe1.js.map +1 -0
  1051. package/dist/{context-Dk6C9IvC.js → context-C8M88I1F.js} +48 -8
  1052. package/dist/context-C8M88I1F.js.map +1 -0
  1053. package/dist/{context-3i2_6ly8.js → context-C92iQeLO.js} +13 -5
  1054. package/dist/context-C92iQeLO.js.map +1 -0
  1055. package/dist/{context-DdnKlMjE.js → context-CHXHCbuu.js} +18 -4
  1056. package/dist/context-CHXHCbuu.js.map +1 -0
  1057. package/dist/{context-mjP5wifG.d.ts → context-CgRa89Bq.d.ts} +29 -3
  1058. package/dist/context-CgRa89Bq.d.ts.map +1 -0
  1059. package/dist/{context-CQbvWVnM.js → context-CmexbpIK.js} +31 -9
  1060. package/dist/context-CmexbpIK.js.map +1 -0
  1061. package/dist/{context-i6Dwvi3T.js → context-Cr2SLhVi.js} +45 -21
  1062. package/dist/context-Cr2SLhVi.js.map +1 -0
  1063. package/dist/{context-DWXNECDe.js → context-CwSk1WZR.js} +23 -5
  1064. package/dist/context-CwSk1WZR.js.map +1 -0
  1065. package/dist/{context-C5TW-k6u.js → context-DWHy9EUW.js} +41 -8
  1066. package/dist/context-DWHy9EUW.js.map +1 -0
  1067. package/dist/{context-ChsuSih6.js → context-Dae38FV_.js} +33 -14
  1068. package/dist/context-Dae38FV_.js.map +1 -0
  1069. package/dist/{context-DUx44mGi.js → context-r3QNWoPh.js} +29 -5
  1070. package/dist/context-r3QNWoPh.js.map +1 -0
  1071. package/dist/{copy-menu-LU54Aruj.js → copy-menu-BizTEv8v.js} +42 -23
  1072. package/dist/copy-menu-BizTEv8v.js.map +1 -0
  1073. package/dist/crash-parts-Dg5WC8u4.js +926 -0
  1074. package/dist/crash-parts-Dg5WC8u4.js.map +1 -0
  1075. package/dist/{data-grid-i18n-BySPLTBy.d.ts → data-grid-i18n-BcJcbW5k.d.ts} +1 -1
  1076. package/dist/{data-grid-i18n-BySPLTBy.d.ts.map → data-grid-i18n-BcJcbW5k.d.ts.map} +1 -1
  1077. package/dist/{ease-CHhXKlG3.d.ts → ease-DnPhwGe6.d.ts} +4 -2
  1078. package/dist/ease-DnPhwGe6.d.ts.map +1 -0
  1079. package/dist/{filters-draft-COwwppZX.d.ts → filters-draft-b-BwSZb1.d.ts} +1 -1
  1080. package/dist/{filters-draft-COwwppZX.d.ts.map → filters-draft-b-BwSZb1.d.ts.map} +1 -1
  1081. package/dist/game-parts-hATtqY3s.d.ts +89 -0
  1082. package/dist/game-parts-hATtqY3s.d.ts.map +1 -0
  1083. package/dist/hooks/use-copy-to-clipboard.js +5 -5
  1084. package/dist/hooks/use-copy-to-clipboard.js.map +1 -1
  1085. package/dist/hooks/use-favicon.js +1 -1
  1086. package/dist/hooks/use-highlighted-code.d.ts +2 -2
  1087. package/dist/hooks/use-highlighted-code.d.ts.map +1 -1
  1088. package/dist/hooks/use-highlighted-code.js +6 -76
  1089. package/dist/hooks/use-highlighted-code.js.map +1 -1
  1090. package/dist/hooks/use-hover-gesture.js +1 -1
  1091. package/dist/hooks/use-intersection-observer.d.ts +2 -2
  1092. package/dist/hooks/use-intersection-observer.d.ts.map +1 -1
  1093. package/dist/hooks/use-intersection-observer.js +4 -4
  1094. package/dist/hooks/use-intersection-observer.js.map +1 -1
  1095. package/dist/hooks/use-listbox.js +1 -1
  1096. package/dist/hooks/use-listbox.js.map +1 -1
  1097. package/dist/hooks/use-meta-color.js +7 -7
  1098. package/dist/hooks/use-meta-color.js.map +1 -1
  1099. package/dist/hooks/use-mobile.js +3 -3
  1100. package/dist/hooks/use-mobile.js.map +1 -1
  1101. package/dist/hooks/use-modal-scope.js +1 -1
  1102. package/dist/hooks/use-mutation-observer.d.ts +2 -2
  1103. package/dist/hooks/use-mutation-observer.d.ts.map +1 -1
  1104. package/dist/hooks/use-mutation-observer.js +2 -2
  1105. package/dist/hooks/use-mutation-observer.js.map +1 -1
  1106. package/dist/hooks/use-slider-input.d.ts +4 -4
  1107. package/dist/hooks/use-slider-input.d.ts.map +1 -1
  1108. package/dist/hooks/use-slider.js +1 -1
  1109. package/dist/i18n-BRH0Y7Sm.d.ts +34 -0
  1110. package/dist/i18n-BRH0Y7Sm.d.ts.map +1 -0
  1111. package/dist/lib/audio-context.d.ts +11 -0
  1112. package/dist/lib/audio-context.d.ts.map +1 -0
  1113. package/dist/lib/audio-context.js +37 -0
  1114. package/dist/lib/audio-context.js.map +1 -0
  1115. package/dist/lib/book-sounds.d.ts +18 -0
  1116. package/dist/lib/book-sounds.d.ts.map +1 -0
  1117. package/dist/lib/book-sounds.js +202 -0
  1118. package/dist/lib/book-sounds.js.map +1 -0
  1119. package/dist/lib/ease.d.ts +2 -2
  1120. package/dist/lib/ease.js +8 -1
  1121. package/dist/lib/ease.js.map +1 -1
  1122. package/dist/lib/game-sounds.d.ts +18 -0
  1123. package/dist/lib/game-sounds.d.ts.map +1 -0
  1124. package/dist/lib/game-sounds.js +142 -0
  1125. package/dist/lib/game-sounds.js.map +1 -0
  1126. package/dist/lib/highlighter.d.ts +10 -0
  1127. package/dist/lib/highlighter.d.ts.map +1 -0
  1128. package/dist/lib/highlighter.js +78 -0
  1129. package/dist/lib/highlighter.js.map +1 -0
  1130. package/dist/lib/i18n.d.ts +2 -0
  1131. package/dist/lib/i18n.js +51 -0
  1132. package/dist/lib/i18n.js.map +1 -0
  1133. package/dist/lib/presence-gate.d.ts +39 -0
  1134. package/dist/lib/presence-gate.d.ts.map +1 -0
  1135. package/dist/{presence-gate-DC7yL1Ls.js → lib/presence-gate.js} +3 -2
  1136. package/dist/lib/presence-gate.js.map +1 -0
  1137. package/dist/lib/text-shimmer.js.map +1 -1
  1138. package/dist/lib/tick-sound.d.ts +4 -3
  1139. package/dist/lib/tick-sound.d.ts.map +1 -1
  1140. package/dist/lib/tick-sound.js +30 -37
  1141. package/dist/lib/tick-sound.js.map +1 -1
  1142. package/dist/messages-BYMFNf5X.d.ts +13 -0
  1143. package/dist/messages-BYMFNf5X.d.ts.map +1 -0
  1144. package/dist/messages-CVaE8xc6.js +14 -0
  1145. package/dist/messages-CVaE8xc6.js.map +1 -0
  1146. package/dist/messages-CqyH8Hd7.js +21 -0
  1147. package/dist/messages-CqyH8Hd7.js.map +1 -0
  1148. package/dist/messages-CrtN5AXG.js +20 -0
  1149. package/dist/messages-CrtN5AXG.js.map +1 -0
  1150. package/dist/messages-D4axySpl.d.ts +21 -0
  1151. package/dist/messages-D4axySpl.d.ts.map +1 -0
  1152. package/dist/messages-Dyou6PVt.d.ts +23 -0
  1153. package/dist/messages-Dyou6PVt.d.ts.map +1 -0
  1154. package/dist/messages-azsh5xBO.d.ts +20 -0
  1155. package/dist/messages-azsh5xBO.d.ts.map +1 -0
  1156. package/dist/messages-ogb0tIIX.d.ts +23 -0
  1157. package/dist/messages-ogb0tIIX.d.ts.map +1 -0
  1158. package/dist/messages-tLRkxZwI.d.ts +33 -0
  1159. package/dist/messages-tLRkxZwI.d.ts.map +1 -0
  1160. package/dist/{model-mS4UXPwk.d.ts → model-B_LLKNOs.d.ts} +1 -1
  1161. package/dist/model-B_LLKNOs.d.ts.map +1 -0
  1162. package/dist/{model-CvWolJdo.d.ts → model-Cbzktxjx.d.ts} +1 -1
  1163. package/dist/model-Cbzktxjx.d.ts.map +1 -0
  1164. package/dist/{model-BFZGhrnQ.d.ts → model-Cqi9KKo1.d.ts} +1 -1
  1165. package/dist/{model-BFZGhrnQ.d.ts.map → model-Cqi9KKo1.d.ts.map} +1 -1
  1166. package/dist/{model-DuAc65oe.d.ts → model-DP6FsG__.d.ts} +1 -1
  1167. package/dist/model-DP6FsG__.d.ts.map +1 -0
  1168. package/dist/{path-VEfFUowr.d.ts → path-DMP3rnd1.d.ts} +1 -1
  1169. package/dist/path-DMP3rnd1.d.ts.map +1 -0
  1170. package/dist/{plot-CTQFrQKi.js → plot-B2aPWHib.js} +12 -12
  1171. package/dist/plot-B2aPWHib.js.map +1 -0
  1172. package/dist/{popover-position-BaDNBZ-D.js → popover-position-U1ZMRPsY.js} +1 -1
  1173. package/dist/{popover-position-BaDNBZ-D.js.map → popover-position-U1ZMRPsY.js.map} +1 -1
  1174. package/dist/{positioner-MidjIUUT.js → positioner-DY1vB4rF.js} +6 -6
  1175. package/dist/positioner-DY1vB4rF.js.map +1 -0
  1176. package/dist/{scale-DSsaupNc.d.ts → scale-BLDMdHAp.d.ts} +1 -1
  1177. package/dist/scale-BLDMdHAp.d.ts.map +1 -0
  1178. package/dist/{tooltip-CuHpilPN.js → tooltip-BUkacvMl.js} +6 -6
  1179. package/dist/tooltip-BUkacvMl.js.map +1 -0
  1180. package/dist/{tooltip-Cq46pSJ2.d.ts → tooltip-CJccRGy9.d.ts} +21 -2
  1181. package/dist/tooltip-CJccRGy9.d.ts.map +1 -0
  1182. package/dist/{tooltip-CNEYdIX3.d.ts → tooltip-CMtIWcUY.d.ts} +19 -2
  1183. package/dist/tooltip-CMtIWcUY.d.ts.map +1 -0
  1184. package/dist/{tooltip-BVRmgnbZ.d.ts → tooltip-DuPE_3Gi.d.ts} +21 -2
  1185. package/dist/tooltip-DuPE_3Gi.d.ts.map +1 -0
  1186. package/dist/{tooltip-w0KptZat.d.ts → tooltip-UI0lMGya.d.ts} +1 -1
  1187. package/dist/tooltip-UI0lMGya.d.ts.map +1 -0
  1188. package/dist/{tooltip-content-K0vPsEtI.d.ts → tooltip-content-Dr8bhW-q.d.ts} +4 -2
  1189. package/dist/tooltip-content-Dr8bhW-q.d.ts.map +1 -0
  1190. package/dist/{tooltip-CMVyNolz.d.ts → tooltip-jQICwV_k.d.ts} +13 -2
  1191. package/dist/tooltip-jQICwV_k.d.ts.map +1 -0
  1192. package/dist/{types-B0d0d7PF.d.ts → types-C1WFGMvf.d.ts} +1 -1
  1193. package/dist/types-C1WFGMvf.d.ts.map +1 -0
  1194. package/dist/{types-BB61jXS_.d.ts → types-C_v1N4fH.d.ts} +4 -1
  1195. package/dist/types-C_v1N4fH.d.ts.map +1 -0
  1196. package/dist/{types-D9hKqIzm.d.ts → types-DJ8z6gW8.d.ts} +32 -2
  1197. package/dist/types-DJ8z6gW8.d.ts.map +1 -0
  1198. package/dist/{types-qTGsGdN1.d.ts → types-DROZkngo.d.ts} +1 -1
  1199. package/dist/types-DROZkngo.d.ts.map +1 -0
  1200. package/dist/{types-BSMELKE5.d.ts → types-DlSHf6nJ.d.ts} +1 -1
  1201. package/dist/types-DlSHf6nJ.d.ts.map +1 -0
  1202. package/dist/{use-active-option-DerS-wGL.js → use-active-option-DbxnIM2n.js} +1 -1
  1203. package/dist/{use-active-option-DerS-wGL.js.map → use-active-option-DbxnIM2n.js.map} +1 -1
  1204. package/dist/use-crash-game-DiGujbfH.d.ts +160 -0
  1205. package/dist/use-crash-game-DiGujbfH.d.ts.map +1 -0
  1206. package/dist/{use-geometry-C84j2gUk.d.ts → use-geometry-BajLqxjC.d.ts} +1 -1
  1207. package/dist/use-geometry-BajLqxjC.d.ts.map +1 -0
  1208. package/dist/{use-inspection-CZhdpH8J.js → use-inspection-DWk6TdY9.js} +1 -1
  1209. package/dist/use-inspection-DWk6TdY9.js.map +1 -0
  1210. package/dist/{use-points-C2jpElHh.js → use-points-y0l-9pdN.js} +1 -1
  1211. package/dist/use-points-y0l-9pdN.js.map +1 -0
  1212. package/dist/{use-position-CWSE4wCz.d.ts → use-position-B1lYvN8D.d.ts} +1 -1
  1213. package/dist/{use-position-CWSE4wCz.d.ts.map → use-position-B1lYvN8D.d.ts.map} +1 -1
  1214. package/dist/{use-width-CkKCh1b3.js → use-width-Dmy1eT1-.js} +1 -1
  1215. package/dist/{use-width-CkKCh1b3.js.map → use-width-Dmy1eT1-.js.map} +1 -1
  1216. package/dist/utils-Dve5wIjB.js +56 -0
  1217. package/dist/utils-Dve5wIjB.js.map +1 -0
  1218. package/dist/{utils-ZRfJ78Df.js → utils-F-hKjEFd.js} +1 -1
  1219. package/dist/utils-F-hKjEFd.js.map +1 -0
  1220. package/package.json +9 -9
  1221. package/dist/account-avatar--0_0u0WW.js.map +0 -1
  1222. package/dist/cascader-types-Bh_kJ3Qw.d.ts.map +0 -1
  1223. package/dist/components/motion/combobox/context.d.ts.map +0 -1
  1224. package/dist/components/motion/combobox/context.js.map +0 -1
  1225. package/dist/components/motion/multi-select/context.d.ts.map +0 -1
  1226. package/dist/components/motion/multi-select/context.js.map +0 -1
  1227. package/dist/constants-evLzfUhL.js.map +0 -1
  1228. package/dist/context-3i2_6ly8.js.map +0 -1
  1229. package/dist/context-C5TW-k6u.js.map +0 -1
  1230. package/dist/context-CQbvWVnM.js.map +0 -1
  1231. package/dist/context-CXlD0FcC.js.map +0 -1
  1232. package/dist/context-ChsuSih6.js.map +0 -1
  1233. package/dist/context-D-juVNr2.d.ts.map +0 -1
  1234. package/dist/context-DUx44mGi.js.map +0 -1
  1235. package/dist/context-DWXNECDe.js.map +0 -1
  1236. package/dist/context-DdnKlMjE.js.map +0 -1
  1237. package/dist/context-Dk6C9IvC.js.map +0 -1
  1238. package/dist/context-i6Dwvi3T.js.map +0 -1
  1239. package/dist/context-mjP5wifG.d.ts.map +0 -1
  1240. package/dist/context-tv-kneJV.d.ts.map +0 -1
  1241. package/dist/copy-menu-LU54Aruj.js.map +0 -1
  1242. package/dist/ease-CHhXKlG3.d.ts.map +0 -1
  1243. package/dist/model-CvWolJdo.d.ts.map +0 -1
  1244. package/dist/model-DuAc65oe.d.ts.map +0 -1
  1245. package/dist/model-mS4UXPwk.d.ts.map +0 -1
  1246. package/dist/path-VEfFUowr.d.ts.map +0 -1
  1247. package/dist/plot-CTQFrQKi.js.map +0 -1
  1248. package/dist/positioner-MidjIUUT.js.map +0 -1
  1249. package/dist/presence-gate-DC7yL1Ls.js.map +0 -1
  1250. package/dist/scale-DSsaupNc.d.ts.map +0 -1
  1251. package/dist/tooltip-BVRmgnbZ.d.ts.map +0 -1
  1252. package/dist/tooltip-CMVyNolz.d.ts.map +0 -1
  1253. package/dist/tooltip-CNEYdIX3.d.ts.map +0 -1
  1254. package/dist/tooltip-Cq46pSJ2.d.ts.map +0 -1
  1255. package/dist/tooltip-CuHpilPN.js.map +0 -1
  1256. package/dist/tooltip-content-K0vPsEtI.d.ts.map +0 -1
  1257. package/dist/tooltip-w0KptZat.d.ts.map +0 -1
  1258. package/dist/types-B0d0d7PF.d.ts.map +0 -1
  1259. package/dist/types-BB61jXS_.d.ts.map +0 -1
  1260. package/dist/types-BSMELKE5.d.ts.map +0 -1
  1261. package/dist/types-D9hKqIzm.d.ts.map +0 -1
  1262. package/dist/types-qTGsGdN1.d.ts.map +0 -1
  1263. package/dist/use-geometry-C84j2gUk.d.ts.map +0 -1
  1264. package/dist/use-inspection-CZhdpH8J.js.map +0 -1
  1265. package/dist/use-points-C2jpElHh.js.map +0 -1
  1266. package/dist/utils-DMrlhG6M.js +0 -25
  1267. package/dist/utils-DMrlhG6M.js.map +0 -1
  1268. package/dist/utils-ZRfJ78Df.js.map +0 -1
@@ -1 +1 @@
1
- {"version":3,"file":"filters-context.d.ts","names":["React"],"sources":["../../../../src/components/reui/filters/filters-context.tsx"],"mappings":";;;;;;;;;;;;;;;;;;;;iBA6CiB,0BAA0B,aAAa;;EAEtD,OAAO,YAAY,GAAG;EACtB,QAAQ;EACR,iBAAiB,OAAO,iBAAiB;EACzC,SAAS;EACT;;EAEA;;EAEA;;EAGA;;;;;EAMA;EACA;;;;;;EAOA;;EAGA,cAAc;EACd;;EAGA,mBAAmB,OAAO,YAAY,GAAG,OAAO;EAChD,gBACE,OAAO,YAAY,GAAG,IACtB,UAAU,+BACP,aAAa,GAAG;;EAErB,YAAY;;;;;EAMZ,UAAU,MAAM,WAAW,IAAI;;;;;;;EAO/B,WAAW,mBAA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kB,kBAAkB;;;;;EAK1C,QAAQ,kBAAkB;;EAE1B,UAAU,kBAAkB;;wBAGd,+BAA+B"}
@@ -1,5 +1,5 @@
1
1
  "use client";
2
- import * as React$1 from "react";
2
+ import * as React from "react";
3
3
  // src/components/reui/filters/filters-context.tsx
4
4
  /** `disabled` and `readOnly` are NOT two words for one state. `disabled` is
5
5
  * the native attribute: not operable, out of the tab order. `readOnly` blocks
@@ -57,21 +57,21 @@ const FILTER_CONTROL_SIZES = {
57
57
  function filterControlSizes(state) {
58
58
  return FILTER_CONTROL_SIZES[state.size] ?? FILTER_CONTROL_SIZES.default;
59
59
  }
60
- const FilterActionsContext = React$1.createContext(null);
60
+ const FilterActionsContext = React.createContext(null);
61
61
  function useFilterActions() {
62
- const context = React$1.useContext(FilterActionsContext);
62
+ const context = React.useContext(FilterActionsContext);
63
63
  if (!context) throw new Error("useFilterActions must be used inside <Filters>");
64
64
  return context;
65
65
  }
66
- const FilterStateContext = React$1.createContext(null);
66
+ const FilterStateContext = React.createContext(null);
67
67
  function useFilterState() {
68
- const context = React$1.useContext(FilterStateContext);
68
+ const context = React.useContext(FilterStateContext);
69
69
  if (!context) throw new Error("useFilterState must be used inside <Filters>");
70
70
  return context;
71
71
  }
72
- const FilterRenderContext = React$1.createContext({});
72
+ const FilterRenderContext = React.createContext({});
73
73
  function useFilterRender() {
74
- return React$1.useContext(FilterRenderContext);
74
+ return React.useContext(FilterRenderContext);
75
75
  }
76
76
  const NO_FOCUS = {
77
77
  id: null,
@@ -102,15 +102,15 @@ function createFilterFocusStore() {
102
102
  * focused" outside a `Filters`. Nothing ever writes to it: each root creates
103
103
  * and writes its own. */
104
104
  const FALLBACK_FOCUS_STORE = createFilterFocusStore();
105
- const FilterFocusContext = React$1.createContext(FALLBACK_FOCUS_STORE);
105
+ const FilterFocusContext = React.createContext(FALLBACK_FOCUS_STORE);
106
106
  /** Whether rows may be reordered at all, published once for the subtree. Two
107
107
  * files have to agree about it: the builder gates the grip and Alt+Arrow,
108
108
  * while the row and group menus commit the same mutator by a third route, so
109
109
  * gating only the builder left it off for a pointer and on from a menu. */
110
- const FilterReorderContext = React$1.createContext(false);
110
+ const FilterReorderContext = React.createContext(false);
111
111
  const FilterReorderProvider = FilterReorderContext.Provider;
112
112
  function useFilterReorderable() {
113
- return React$1.useContext(FilterReorderContext);
113
+ return React.useContext(FilterReorderContext);
114
114
  }
115
115
  function createFilterRowStateStore() {
116
116
  const touched = /* @__PURE__ */ new Set();
@@ -156,58 +156,58 @@ function createFilterRowStateStore() {
156
156
  };
157
157
  }
158
158
  const FALLBACK_ROW_STATE_STORE = createFilterRowStateStore();
159
- const FilterRowStateContext = React$1.createContext(FALLBACK_ROW_STATE_STORE);
159
+ const FilterRowStateContext = React.createContext(FALLBACK_ROW_STATE_STORE);
160
160
  const FilterRowStateProvider = FilterRowStateContext.Provider;
161
161
  /** The store itself, for handlers that write without subscribing. */
162
162
  function useFilterRowStateStore() {
163
- return React$1.useContext(FilterRowStateContext);
163
+ return React.useContext(FilterRowStateContext);
164
164
  }
165
165
  /** Whether THIS rule is still waiting for its attribute. */
166
166
  function useFilterRowPending(id) {
167
- const store = React$1.useContext(FilterRowStateContext);
168
- return React$1.useSyncExternalStore(store.subscribe, () => store.isPending(id), () => false);
167
+ const store = React.useContext(FilterRowStateContext);
168
+ return React.useSyncExternalStore(store.subscribe, () => store.isPending(id), () => false);
169
169
  }
170
170
  /** Whether THIS rule may show an error yet. */
171
171
  function useFilterTouched(id) {
172
- const store = React$1.useContext(FilterRowStateContext);
173
- return React$1.useSyncExternalStore(store.subscribe, () => store.has(id), () => false);
172
+ const store = React.useContext(FilterRowStateContext);
173
+ return React.useSyncExternalStore(store.subscribe, () => store.has(id), () => false);
174
174
  }
175
175
  /** The whole focus snapshot, so the caller re-renders on EVERY move anywhere
176
176
  * in the row. A chip wants `useFilterChipFocused` or `useFilterSegmentFocus`
177
177
  * below instead. */
178
178
  function useFilterFocus() {
179
- const store = React$1.useContext(FilterFocusContext);
180
- return React$1.useSyncExternalStore(store.subscribe, store.getSnapshot, store.getSnapshot);
179
+ const store = React.useContext(FilterFocusContext);
180
+ return React.useSyncExternalStore(store.subscribe, store.getSnapshot, store.getSnapshot);
181
181
  }
182
182
  /** The store itself, for event handlers that write without subscribing. */
183
183
  function useFilterFocusStore() {
184
- return React$1.useContext(FilterFocusContext);
184
+ return React.useContext(FilterFocusContext);
185
185
  }
186
186
  /** The segment of THIS chip that should open itself, or null. */
187
187
  function useFilterChipAutoOpen(id) {
188
- const store = React$1.useContext(FilterFocusContext);
189
- return React$1.useSyncExternalStore(store.subscribe, () => {
188
+ const store = React.useContext(FilterFocusContext);
189
+ return React.useSyncExternalStore(store.subscribe, () => {
190
190
  const snapshot = store.getSnapshot();
191
191
  return snapshot.autoOpen && snapshot.id === id ? snapshot.segment : null;
192
192
  }, () => null);
193
193
  }
194
194
  /** Whether the row holds no focus, so the first chip keeps the tab stop. */
195
195
  function useFilterFocusEmpty() {
196
- const store = React$1.useContext(FilterFocusContext);
197
- return React$1.useSyncExternalStore(store.subscribe, () => store.getSnapshot().id === null, () => true);
196
+ const store = React.useContext(FilterFocusContext);
197
+ return React.useSyncExternalStore(store.subscribe, () => store.getSnapshot().id === null, () => true);
198
198
  }
199
199
  /** Whether THIS chip owns the row's tab stop. */
200
200
  function useFilterChipFocused(id) {
201
- const store = React$1.useContext(FilterFocusContext);
202
- return React$1.useSyncExternalStore(store.subscribe, () => store.getSnapshot().id === id, () => false);
201
+ const store = React.useContext(FilterFocusContext);
202
+ return React.useSyncExternalStore(store.subscribe, () => store.getSnapshot().id === id, () => false);
203
203
  }
204
204
  /** Which segment of THIS rule owns the tab stop, or null when another rule
205
205
  * does. A chip needs one boolean, but an advanced row is a grid ROW whose tab
206
206
  * stop is a (row, column) pair, and the column has to come from this store
207
207
  * too or the chromes disagree about where focus is after an edit. */
208
208
  function useFilterSegmentFocus(id) {
209
- const store = React$1.useContext(FilterFocusContext);
210
- return React$1.useSyncExternalStore(store.subscribe, () => {
209
+ const store = React.useContext(FilterFocusContext);
210
+ return React.useSyncExternalStore(store.subscribe, () => {
211
211
  const snapshot = store.getSnapshot();
212
212
  return snapshot.id === id ? snapshot.segment : null;
213
213
  }, () => null);
@@ -1 +1 @@
1
- {"version":3,"file":"filters-context.js","names":["React"],"sources":["../../../../src/components/reui/filters/filters-context.tsx"],"sourcesContent":["\"use client\";\n\nimport * as React from \"react\";\n\nimport type { FilterDraftAction } from \"./filters-draft\";\nimport type { FilterPathCollapse } from \"./filters-lib\";\nimport type {\n FilterCombinator,\n FilterDraft,\n FilterDraftStep,\n FilterEditor,\n FilterEditorRegistry,\n FilterEmptyStateContext,\n FilterField,\n FilterIndex,\n FilterLabels,\n FilterOperator,\n FilterOption,\n FilterQuery,\n FilterRule,\n FilterValueDisplayContext,\n FilterValueType,\n} from \"./filters-types\";\n\n/** Four publishing channels, not one, so a chip never re-renders at the rate\n * of the fastest: `actions` republishes on a schema, labels or config change,\n * `state` on every query edit and keystroke, `render` on a `renderValue` /\n * `renderChip` identity change, `focus` on every arrow key. The reorder flag\n * and the row-state store further down are contexts too, but not channels the\n * query is published through. */\n\n/* -------------------------------------------------------------------------- */\n/* Actions */\n/* -------------------------------------------------------------------------- */\n\n/** Stable for the life of the component, bar a config change. Every mutator\n * reads a latest-props ref rather than closing over the state it needs, so a\n * keystroke rebuilds no handler and no memoized chip re-renders. The two lock\n * flags are published rather than kept only in that ref: a refusal that lives\n * in a ref arrives one commit late. The two resolvers are the deliberate\n * exception: they are read DURING render, so they memoize on the values they\n * read instead of going through the ref. Every mutator is also the MUTATION\n * BOUNDARY - `disabled` and `readOnly` are enforced here, not at the call\n * sites that draw the buttons, so a route added next month is refused by\n * construction rather than by remembering. See `isFilterLocked`. */\nexport interface FilterActionsContextValue<V = unknown, O = unknown> {\n /** Normalized schema. Also on the state context, from the same memo. */\n index: FilterIndex<V, O>;\n labels: FilterLabels;\n operatorCatalog: Record<FilterValueType, FilterOperator[]>;\n editors: FilterEditorRegistry;\n size: \"sm\" | \"default\";\n /** The bar is off: nothing operable, and the controls leave the tab order. */\n disabled: boolean;\n /** Readable and navigable, but not changeable. See `isFilterLocked`. */\n readOnly: boolean;\n\n /** Which chrome is drawing, so a chip kebab can hide its convert row. */\n variant: \"basic\" | \"advanced\";\n\n /** Consumer classes for the menus and the field picker, merged AFTER the\n * primitive's own defaults so a consumer `w-*` wins through tailwind-merge\n * rather than on source order. On the context: four chromes mount the same\n * menu, and a per-chrome prop is set in four places and missed in a fifth. */\n menuClassName: string | undefined;\n fieldPickerClassName: string | undefined;\n\n /** Turns on the chip kebab's \"Convert to advanced filter\" row: present means\n * offered. A callback with no boolean beside it, since only the consumer\n * can switch chromes. Changes no query, so it skips the mutation boundary,\n * which is safe only because it is handed no setter: a consumer's handler\n * has no route to the query at all. */\n convertToAdvanced: (() => void) | undefined;\n\n /** Path shortening, published so BOTH chromes render the same path. */\n pathCollapse: FilterPathCollapse;\n maxPathSegments: number;\n\n /** Operators for a field, memoized on the catalog and the schema. */\n resolveOperators: (field: FilterField<V, O>) => FilterOperator[];\n resolveEditor: (\n field: FilterField<V, O>,\n operator: FilterOperator | undefined,\n ) => FilterEditor<V, O> | undefined;\n /** Value-to-label store shared by every `useFilterOptions` under the root. */\n resolution: FilterResolutionStore;\n\n /** Appends a rule. Defaults to the ROOT group. The parent is a parameter\n * rather than always the root because a nested group's add button is the\n * keyboard path into that group, and routing it through the root then\n * moving it would be two edits and two announcements for one action. */\n addRule: (rule: FilterRule<V>, parentId?: string) => void;\n /** Appends an empty group and returns its id, so the caller can focus it.\n * Returns an EMPTY STRING when the bar is disabled or read only, the one\n * mutator that has to report its refusal: focusing a group that was never\n * created strands the tab stop. `\"\"` rather than `string | null` keeps the\n * callers that already test the id honest without widening a published\n * signature. */\n addGroup: (parentId?: string, combinator?: FilterCombinator) => string;\n updateRule: (id: string, updates: Partial<Omit<FilterRule<V>, \"id\" | \"type\">>) => void;\n /** Removes a rule OR a group, and prunes the groups that empties. Node-level\n * rather than rule-level because a chip only ever removes a rule, while a\n * builder row's trash and a group header's trash are the same button on two\n * kinds of node. */\n removeNode: (id: string) => void;\n duplicateNode: (id: string) => void;\n negateRule: (id: string) => void;\n /** Reorders within the node's own parent. Out of range moves are no-ops. */\n moveNode: (id: string, delta: number) => void;\n /** Moves a node into another group, at an index. The drag-and-drop half. */\n moveNodeTo: (id: string, parentId: string, index: number) => void;\n /** Copies a node into another group, at an index. The Alt-drag half, apart\n * from `duplicateNode` (which copies BESIDE, with no destination): the two\n * composed would emit two queries for one gesture, and a controlled\n * consumer would persist a tree the user never asked for. */\n copyNodeTo: (id: string, parentId: string, index: number) => void;\n /** Nests one node in a new group. The keyboard half of the same idea. */\n wrapNodeInGroup: (id: string, combinator?: FilterCombinator) => void;\n /** Dissolves a group into its parent. The inverse of `wrapNodeInGroup`. */\n unwrapGroup: (groupId: string) => void;\n setCombinator: (groupId: string, combinator: FilterCombinator) => void;\n toggleCombinator: (groupId: string) => void;\n clearQuery: () => void;\n\n openCreate: () => void;\n openAmend: (id: string, step: FilterDraftStep) => void;\n closeDraft: () => void;\n dispatchDraft: (action: FilterDraftAction<V>) => void;\n\n /** Writes the bar's live region, for a change no visible surface reports: an\n * editor's popover is the one place something destructive happens to rows\n * the user is not on, with focus, name and text unchanged afterwards. Not a\n * query write, so it skips `emit` and asks the lock nothing. */\n announce: (message: string) => void;\n\n /** Getters for event handlers, so a handler never closes over stale state. */\n getQuery: () => FilterQuery<V>;\n getDraft: () => FilterDraft<V> | null;\n /** Fresh id from the SSR-safe factory. */\n nextId: () => string;\n}\n\n/* -------------------------------------------------------------------------- */\n/* The mutation lock */\n/* -------------------------------------------------------------------------- */\n\n/** `disabled` and `readOnly` are NOT two words for one state. `disabled` is\n * the native attribute: not operable, out of the tab order. `readOnly` blocks\n * MUTATION and preserves NAVIGATION, because a read-only bar exists so a\n * keyboard or screen reader user can walk the chips and find out what the\n * view is filtered by. Collapsing the two once put the native attribute on\n * all thirteen advanced-builder cell controls while the roving tab stop sat\n * on a disabled element, so not one row could be reached from the keyboard.\n *\n * So a mutating control keeps its tab stop and wears `aria-disabled` plus\n * `data-readonly` (`filterReadOnlyProps`), this repo's convention for\n * \"present, focusable, not operable\". `aria-readonly` is never used, being\n * disallowed on the button, group and toolbar roles, so the BAR says it in\n * prose through `labels.readOnly`. The refusal itself is enforced once, where\n * all fourteen query writes pass through `emit` in `filters.tsx`. */\nexport function isFilterLocked(state: { disabled: boolean; readOnly: boolean }): boolean {\n return state.disabled || state.readOnly;\n}\n\n/** What a MUTATING control wears while the bar is read only. `null` when the\n * bar is disabled, because the native attribute already says it. A\n * conditional spread, not explicit `undefined`s: `aria-disabled=\"false\"` on\n * an enabled control is noise, and `data-readonly` is a presence hook. */\nexport function filterReadOnlyProps(state: { disabled: boolean; readOnly: boolean }) {\n if (state.disabled || !state.readOnly) return null;\n return { \"aria-disabled\": true, \"data-readonly\": \"\" } as const;\n}\n\n/* -------------------------------------------------------------------------- */\n/* The size ladder */\n/* -------------------------------------------------------------------------- */\n\n/** The two shadcn button sizes one filters size resolves to. Two rungs because\n * shadcn ships a separate ladder for labelled and for icon-only buttons, and\n * pairing them keeps a row's kebab as tall as the cell beside it. */\nexport interface FilterControlSizes {\n /** Labelled buttons: the row cells, both triggers, the panel footer. */\n button: \"sm\" | \"default\";\n /** Icon-only buttons, and also the CHIP's height: a chip is an\n * `items-stretch` `ButtonGroup` and no style gives its text segment a\n * height, so the segments stretch to the kebab, the one child that has one.\n * Sizing the kebab sizes the pill. */\n icon: \"icon-sm\" | \"icon\";\n}\n\n/** ONE ladder, keyed off `size`, for every control the chrome renders, because\n * the alternative already happened: five advanced-builder cells took\n * `actions.size` while seven sites hardcoded `icon-sm` and three `sm`, giving\n * one row three heights. Nothing here is a pixel - each value is a shadcn\n * size NAME that `Button` resolves per style, since the control-height ladder\n * is per style (nova 7/8, sera 9/10, mira 6/7, and so on), and the glyph size\n * rides the same name, so pinning an icon size in here would fight the style\n * rather than match it. Two rungs only: `lg` would make the bar taller than\n * the style's own default control height (want taller, pick a taller STYLE),\n * and `icon-xs` is a 20-24px square in most styles, too small for a chip's\n * own label to clear. */\nconst FILTER_CONTROL_SIZES: Record<\"sm\" | \"default\", FilterControlSizes> = {\n sm: { button: \"sm\", icon: \"icon-sm\" },\n default: { button: \"default\", icon: \"icon\" },\n};\n\n/** The pair for a bar's size, off anything with a `size`, so a\n * consumer-composed chrome uses the same ladder as the shipped one. The\n * fallback is for JavaScript callers: a `\"lg\"` TypeScript would have rejected\n * must still draw buttons rather than throw on `.button`. */\nexport function filterControlSizes(state: { size: \"sm\" | \"default\" }): FilterControlSizes {\n return FILTER_CONTROL_SIZES[state.size] ?? FILTER_CONTROL_SIZES.default;\n}\n\nconst FilterActionsContext = React.createContext<FilterActionsContextValue | null>(null);\n\nexport function useFilterActions<V = unknown, O = unknown>(): FilterActionsContextValue<V, O> {\n const context = React.useContext(FilterActionsContext);\n if (!context) {\n throw new Error(\"useFilterActions must be used inside <Filters>\");\n }\n return context as unknown as FilterActionsContextValue<V, O>;\n}\n\n/* -------------------------------------------------------------------------- */\n/* State */\n/* -------------------------------------------------------------------------- */\n\n/** Volatile by construction: typing one character into a value editor\n * republishes it. Subscribe from the bar and the panel, never from a chip. */\nexport interface FilterStateContextValue<V = unknown> {\n query: FilterQuery<V>;\n draft: FilterDraft<V> | null;\n ruleCount: number;\n /** Live region text. Empty except immediately after an announced change. */\n announcement: string;\n /** How many announcements have been made, so a REPEATED one is still heard:\n * `aria-live` reports a DOM mutation and React writes nothing when the\n * string is unchanged, so the chrome keys the region's contents on this. A\n * counter rather than a timestamp: it is compared for identity, never read\n * as a value, and is stable across a rerender that a clock is not. */\n announcementSeq: number;\n}\n\nconst FilterStateContext = React.createContext<FilterStateContextValue | null>(null);\n\nexport function useFilterState<V = unknown>(): FilterStateContextValue<V> {\n const context = React.useContext(FilterStateContext);\n if (!context) {\n throw new Error(\"useFilterState must be used inside <Filters>\");\n }\n return context as unknown as FilterStateContextValue<V>;\n}\n\n/* -------------------------------------------------------------------------- */\n/* Render */\n/* -------------------------------------------------------------------------- */\n\n/** Consumer render overrides, on their own channel. They must be\n * always-current closures yet change identity on every parent render when\n * written inline, so isolating them re-renders only what calls them. */\nexport interface FilterRenderContextValue<V = unknown, O = unknown> {\n renderValue?: (context: FilterValueDisplayContext<V, O>) => React.ReactNode;\n renderChip?: (rule: FilterRule<V>) => React.ReactNode;\n renderEmpty?: (context: FilterEmptyStateContext) => React.ReactNode;\n}\n\nconst FilterRenderContext = React.createContext<FilterRenderContextValue>({});\n\nexport function useFilterRender<V = unknown, O = unknown>(): FilterRenderContextValue<V, O> {\n return React.useContext(FilterRenderContext) as FilterRenderContextValue<V, O>;\n}\n\n/* -------------------------------------------------------------------------- */\n/* Focus store */\n/* -------------------------------------------------------------------------- */\n\n/** Which chip currently owns the row's single tab stop. */\nexport interface FilterFocus {\n id: string | null;\n /** Which cell inside that row, for restoring focus after an edit. A chip\n * draws only `field`, `operator`, `value` and `menu`; the rest are advanced\n * builder cells, where a GROUP header is a row too (its `field` is the\n * combinator sentence). One union, because the chromes share the store. */\n segment:\n | \"combinator\"\n | \"field\"\n | \"operator\"\n | \"value\"\n | \"add\"\n | \"menu\"\n | \"ungroup\"\n | \"remove\"\n | \"drag\"\n | null;\n /** Open that segment's popover, not merely focus it. Picking a field commits\n * the rule straight away and the chip appears with no condition yet, so the\n * operator menu has to open ON THE CHIP without a second click. */\n autoOpen: boolean;\n}\n\n/** An external store, deliberately NOT React state. A roving tabindex\n * republishes on every arrow key, and `setState` would re-render the whole\n * bar to move one outline. The SELECTOR hooks below each narrow to one value,\n * so arrowing across forty chips re-renders two components. `useFilterFocus`\n * is the exception: it returns the whole snapshot. */\nexport interface FilterFocusStore {\n subscribe: (onStoreChange: () => void) => () => void;\n getSnapshot: () => FilterFocus;\n /** No-ops when nothing changed. */\n set: (next: FilterFocus) => void;\n}\n\nconst NO_FOCUS: FilterFocus = { id: null, segment: null, autoOpen: false };\n\nexport function createFilterFocusStore(): FilterFocusStore {\n let snapshot: FilterFocus = NO_FOCUS;\n const listeners = new Set<() => void>();\n\n return {\n subscribe(onStoreChange) {\n listeners.add(onStoreChange);\n return () => {\n listeners.delete(onStoreChange);\n };\n },\n // The SAME object until something actually changes, which is what\n // `useSyncExternalStore` requires to avoid an infinite render loop.\n getSnapshot() {\n return snapshot;\n },\n set(next) {\n if (\n next.id === snapshot.id &&\n next.segment === snapshot.segment &&\n next.autoOpen === snapshot.autoOpen\n ) {\n return;\n }\n snapshot = next;\n for (const listener of listeners) listener();\n },\n };\n}\n\n/** A shared, permanently empty store, so the hook degrades to \"nothing\n * focused\" outside a `Filters`. Nothing ever writes to it: each root creates\n * and writes its own. */\nconst FALLBACK_FOCUS_STORE = createFilterFocusStore();\n\nconst FilterFocusContext = React.createContext<FilterFocusStore>(FALLBACK_FOCUS_STORE);\n\n/* -------------------------------------------------------------------------- */\n/* Reordering */\n/* -------------------------------------------------------------------------- */\n\n/** Whether rows may be reordered at all, published once for the subtree. Two\n * files have to agree about it: the builder gates the grip and Alt+Arrow,\n * while the row and group menus commit the same mutator by a third route, so\n * gating only the builder left it off for a pointer and on from a menu. */\nconst FilterReorderContext = React.createContext(false);\n\nexport const FilterReorderProvider = FilterReorderContext.Provider;\n\nexport function useFilterReorderable(): boolean {\n return React.useContext(FilterReorderContext);\n}\n\n/* -------------------------------------------------------------------------- */\n/* Touched */\n/* -------------------------------------------------------------------------- */\n\n/** Which rules the user has actually edited the VALUE of, which decides WHEN\n * an error may appear: \"Add filter\" mints a row with no value, so flagging\n * every invalid row turns the builder red before the user did anything wrong.\n * An issue is still COLLECTED for every rule - the footer count,\n * `onQueryChange` and tree validity do not change - and only DRAWN once the\n * user has committed a value. An external store for the focus store's reason,\n * keyed by rule id and never pruned: a stale id costs one Set entry, and\n * reconciling against the query on every commit is hot-path work. */\nexport interface FilterRowStateStore {\n subscribe: (listener: () => void) => () => void;\n /** Bumped on every write. What a memo depends on, since the Sets are mutable. */\n version: () => number;\n /** Whether this rule has had a value committed to it by the user. */\n has: (id: string) => boolean;\n mark: (id: string) => void;\n /** Starts this rule over. Changing a rule's ATTRIBUTE resets its operator\n * and its value, so it has to reset this too, or the row stays warned about\n * a value that no longer exists on a field the user navigated away from. */\n unmark: (id: string) => void;\n /** Whether this rule is still being CREATED: minted by Add filter and not\n * yet given an attribute. The row enters the query with a guessed field to\n * keep the tree valid, so while pending the builder draws only that cell. */\n isPending: (id: string) => boolean;\n markPending: (id: string) => void;\n /** The attribute was chosen. The rest of the row appears. */\n resolvePending: (id: string) => void;\n /** Forgets everything. The bar's own Clear all, and a whole-tree replace. */\n reset: () => void;\n}\n\nexport function createFilterRowStateStore(): FilterRowStateStore {\n const touched = new Set<string>();\n const pending = new Set<string>();\n const listeners = new Set<() => void>();\n let version = 0;\n const notify = () => {\n version += 1;\n for (const listener of listeners) listener();\n };\n return {\n subscribe: (listener) => {\n listeners.add(listener);\n return () => listeners.delete(listener);\n },\n version: () => version,\n has: (id) => touched.has(id),\n mark: (id) => {\n if (touched.has(id)) return;\n touched.add(id);\n notify();\n },\n unmark: (id) => {\n if (!touched.delete(id)) return;\n notify();\n },\n isPending: (id) => pending.has(id),\n markPending: (id) => {\n if (pending.has(id)) return;\n pending.add(id);\n notify();\n },\n resolvePending: (id) => {\n if (!pending.delete(id)) return;\n notify();\n },\n reset: () => {\n if (touched.size === 0 && pending.size === 0) return;\n touched.clear();\n pending.clear();\n notify();\n },\n };\n}\n\nconst FALLBACK_ROW_STATE_STORE = createFilterRowStateStore();\n\nconst FilterRowStateContext = React.createContext<FilterRowStateStore>(FALLBACK_ROW_STATE_STORE);\n\nexport const FilterRowStateProvider = FilterRowStateContext.Provider;\n\n/** The store itself, for handlers that write without subscribing. */\nexport function useFilterRowStateStore(): FilterRowStateStore {\n return React.useContext(FilterRowStateContext);\n}\n\n/** Whether THIS rule is still waiting for its attribute. */\nexport function useFilterRowPending(id: string): boolean {\n const store = React.useContext(FilterRowStateContext);\n return React.useSyncExternalStore(\n store.subscribe,\n () => store.isPending(id),\n () => false,\n );\n}\n\n/** Whether THIS rule may show an error yet. */\nexport function useFilterTouched(id: string): boolean {\n const store = React.useContext(FilterRowStateContext);\n return React.useSyncExternalStore(\n store.subscribe,\n () => store.has(id),\n () => false,\n );\n}\n\n/** The whole focus snapshot, so the caller re-renders on EVERY move anywhere\n * in the row. A chip wants `useFilterChipFocused` or `useFilterSegmentFocus`\n * below instead. */\nexport function useFilterFocus(): FilterFocus {\n const store = React.useContext(FilterFocusContext);\n return React.useSyncExternalStore(store.subscribe, store.getSnapshot, store.getSnapshot);\n}\n\n/** The store itself, for event handlers that write without subscribing. */\nexport function useFilterFocusStore(): FilterFocusStore {\n return React.useContext(FilterFocusContext);\n}\n\n/** The segment of THIS chip that should open itself, or null. */\nexport function useFilterChipAutoOpen(id: string): FilterFocus[\"segment\"] | null {\n const store = React.useContext(FilterFocusContext);\n return React.useSyncExternalStore(\n store.subscribe,\n () => {\n const snapshot = store.getSnapshot();\n return snapshot.autoOpen && snapshot.id === id ? snapshot.segment : null;\n },\n () => null,\n );\n}\n\n/** Whether the row holds no focus, so the first chip keeps the tab stop. */\nexport function useFilterFocusEmpty(): boolean {\n const store = React.useContext(FilterFocusContext);\n return React.useSyncExternalStore(\n store.subscribe,\n () => store.getSnapshot().id === null,\n () => true,\n );\n}\n\n/** Whether THIS chip owns the row's tab stop. */\nexport function useFilterChipFocused(id: string): boolean {\n const store = React.useContext(FilterFocusContext);\n return React.useSyncExternalStore(\n store.subscribe,\n () => store.getSnapshot().id === id,\n () => false,\n );\n}\n\n/** Which segment of THIS rule owns the tab stop, or null when another rule\n * does. A chip needs one boolean, but an advanced row is a grid ROW whose tab\n * stop is a (row, column) pair, and the column has to come from this store\n * too or the chromes disagree about where focus is after an edit. */\nexport function useFilterSegmentFocus(id: string): FilterFocus[\"segment\"] {\n const store = React.useContext(FilterFocusContext);\n return React.useSyncExternalStore(\n store.subscribe,\n () => {\n const snapshot = store.getSnapshot();\n return snapshot.id === id ? snapshot.segment : null;\n },\n () => null,\n );\n}\n\n/* -------------------------------------------------------------------------- */\n/* Resolution store */\n/* -------------------------------------------------------------------------- */\n\n/** The instance-wide value-to-label store. `useFilterOptions` caches per HOOK\n * INSTANCE, and a chip's display and its editor are two instances, so a\n * `loadOptions`-only field rendered its raw id the moment the menu closed.\n * Every instance under one root writes here, and `resolveValues` results land\n * here too. External rather than React state because labels arrive from\n * effects and promises at their own pace, and the version bumps only when a\n * NEW label lands, so a subscriber re-renders once per page of results. */\nexport interface FilterResolutionStore {\n subscribe: (onStoreChange: () => void) => () => void;\n getVersion: () => number;\n /** The option behind a stored value, or undefined while unresolved. */\n get: (fieldKey: string, value: string) => FilterOption | undefined;\n /** Records options under a field key. New values bump the version. */\n set: (fieldKey: string, options: readonly FilterOption[]) => void;\n /** Marks values as resolving and returns the subset nobody has claimed yet,\n * so two chips holding the same id issue ONE request. Claims are permanent\n * for values a fulfilled resolve did not return, which stops an id the\n * server does not know from being re-asked forever. */\n claim: (fieldKey: string, values: readonly string[]) => string[];\n /** Releases claims after a FAILED resolve, so a later mount may retry. */\n release: (fieldKey: string, values: readonly string[]) => void;\n}\n\nexport function createFilterResolutionStore(): FilterResolutionStore {\n const resolved = new Map<string, Map<string, FilterOption>>();\n const claimed = new Map<string, Set<string>>();\n const listeners = new Set<() => void>();\n let version = 0;\n\n const bucket = (fieldKey: string) => {\n let map = resolved.get(fieldKey);\n if (!map) {\n map = new Map();\n resolved.set(fieldKey, map);\n }\n return map;\n };\n\n return {\n subscribe(onStoreChange) {\n listeners.add(onStoreChange);\n return () => {\n listeners.delete(onStoreChange);\n };\n },\n getVersion() {\n return version;\n },\n get(fieldKey, value) {\n return resolved.get(fieldKey)?.get(value);\n },\n set(fieldKey, options) {\n const map = bucket(fieldKey);\n let landed = false;\n for (const option of options) {\n if (!map.has(option.value)) landed = true;\n map.set(option.value, option);\n }\n if (!landed) return;\n version += 1;\n for (const listener of listeners) listener();\n },\n claim(fieldKey, values) {\n let set = claimed.get(fieldKey);\n if (!set) {\n set = new Set();\n claimed.set(fieldKey, set);\n }\n const map = resolved.get(fieldKey);\n const fresh: string[] = [];\n for (const value of values) {\n if (set.has(value) || map?.has(value)) continue;\n set.add(value);\n fresh.push(value);\n }\n return fresh;\n },\n release(fieldKey, values) {\n const set = claimed.get(fieldKey);\n if (!set) return;\n for (const value of values) set.delete(value);\n },\n };\n}\n\nexport { FilterActionsContext, FilterFocusContext, FilterRenderContext, FilterStateContext };\n"],"mappings":";;;;;;;;;;;;;;;;;AAgKA,SAAgB,eAAe,OAA0D;CACvF,OAAO,MAAM,YAAY,MAAM;AACjC;;;;;AAMA,SAAgB,oBAAoB,OAAiD;CACnF,IAAI,MAAM,YAAY,CAAC,MAAM,UAAU,OAAO;CAC9C,OAAO;EAAE,iBAAiB;EAAM,iBAAiB;CAAG;AACtD;;;;;;;;;;;;AA8BA,MAAM,uBAAqE;CACzE,IAAI;EAAE,QAAQ;EAAM,MAAM;CAAU;CACpC,SAAS;EAAE,QAAQ;EAAW,MAAM;CAAO;AAC7C;;;;;AAMA,SAAgB,mBAAmB,OAAuD;CACxF,OAAO,qBAAqB,MAAM,SAAS,qBAAqB;AAClE;AAEA,MAAM,uBAAuBA,QAAM,cAAgD,IAAI;AAEvF,SAAgB,mBAA8E;CAC5F,MAAM,UAAUA,QAAM,WAAW,oBAAoB;CACrD,IAAI,CAAC,SACH,MAAM,IAAI,MAAM,gDAAgD;CAElE,OAAO;AACT;AAsBA,MAAM,qBAAqBA,QAAM,cAA8C,IAAI;AAEnF,SAAgB,iBAA0D;CACxE,MAAM,UAAUA,QAAM,WAAW,kBAAkB;CACnD,IAAI,CAAC,SACH,MAAM,IAAI,MAAM,8CAA8C;CAEhE,OAAO;AACT;AAeA,MAAM,sBAAsBA,QAAM,cAAwC,CAAC,CAAC;AAE5E,SAAgB,kBAA4E;CAC1F,OAAOA,QAAM,WAAW,mBAAmB;AAC7C;AA0CA,MAAM,WAAwB;CAAE,IAAI;CAAM,SAAS;CAAM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AAC,KAAK;IACR,sBAAM,IAAI,IAAI;IACd,QAAQ,IAAI,UAAU,GAAG;GAC3B;GACA,MAAM,MAAM,SAAS,IAAI,QAAQ;GACjC,MAAM,QAAkB,CAAC;GACzB,KAAK,MAAM,SAAS,QAAQ;IAC1B,IAAI,IAAI,IAAI,KAAK,KAAK,KAAK,IAAI,KAAK,GAAG;IACvC,IAAI,IAAI,KAAK;IACb,MAAM,KAAK,KAAK;GAClB;GACA,OAAO;EACT;EACA,QAAQ,UAAU,QAAQ;GACxB,MAAM,MAAM,QAAQ,IAAI,QAAQ;GAChC,IAAI,CAAC,KAAK;GACV,KAAK,MAAM,SAAS,QAAQ,IAAI,OAAO,KAAK;EAC9C;CACF;AACF"}
1
+ {"version":3,"file":"filters-context.js","names":[],"sources":["../../../../src/components/reui/filters/filters-context.tsx"],"sourcesContent":["\"use client\";\n\nimport * as React from \"react\";\n\nimport type { FilterDraftAction } from \"./filters-draft\";\nimport type { FilterPathCollapse } from \"./filters-lib\";\nimport type {\n FilterCombinator,\n FilterDraft,\n FilterDraftStep,\n FilterEditor,\n FilterEditorRegistry,\n FilterEmptyStateContext,\n FilterField,\n FilterIndex,\n FilterLabels,\n FilterOperator,\n FilterOption,\n FilterQuery,\n FilterRule,\n FilterValueDisplayContext,\n FilterValueType,\n} from \"./filters-types\";\n\n/** Four publishing channels, not one, so a chip never re-renders at the rate\n * of the fastest: `actions` republishes on a schema, labels or config change,\n * `state` on every query edit and keystroke, `render` on a `renderValue` /\n * `renderChip` identity change, `focus` on every arrow key. The reorder flag\n * and the row-state store further down are contexts too, but not channels the\n * query is published through. */\n\n/* -------------------------------------------------------------------------- */\n/* Actions */\n/* -------------------------------------------------------------------------- */\n\n/** Stable for the life of the component, bar a config change. Every mutator\n * reads a latest-props ref rather than closing over the state it needs, so a\n * keystroke rebuilds no handler and no memoized chip re-renders. The two lock\n * flags are published rather than kept only in that ref: a refusal that lives\n * in a ref arrives one commit late. The two resolvers are the deliberate\n * exception: they are read DURING render, so they memoize on the values they\n * read instead of going through the ref. Every mutator is also the MUTATION\n * BOUNDARY - `disabled` and `readOnly` are enforced here, not at the call\n * sites that draw the buttons, so a route added next month is refused by\n * construction rather than by remembering. See `isFilterLocked`. */\nexport interface FilterActionsContextValue<V = unknown, O = unknown> {\n /** Normalized schema. Also on the state context, from the same memo. */\n index: FilterIndex<V, O>;\n labels: FilterLabels;\n operatorCatalog: Record<FilterValueType, FilterOperator[]>;\n editors: FilterEditorRegistry;\n size: \"sm\" | \"default\";\n /** The bar is off: nothing operable, and the controls leave the tab order. */\n disabled: boolean;\n /** Readable and navigable, but not changeable. See `isFilterLocked`. */\n readOnly: boolean;\n\n /** Which chrome is drawing, so a chip kebab can hide its convert row. */\n variant: \"basic\" | \"advanced\";\n\n /** Consumer classes for the menus and the field picker, merged AFTER the\n * primitive's own defaults so a consumer `w-*` wins through tailwind-merge\n * rather than on source order. On the context: four chromes mount the same\n * menu, and a per-chrome prop is set in four places and missed in a fifth. */\n menuClassName: string | undefined;\n fieldPickerClassName: string | undefined;\n\n /** Turns on the chip kebab's \"Convert to advanced filter\" row: present means\n * offered. A callback with no boolean beside it, since only the consumer\n * can switch chromes. Changes no query, so it skips the mutation boundary,\n * which is safe only because it is handed no setter: a consumer's handler\n * has no route to the query at all. */\n convertToAdvanced: (() => void) | undefined;\n\n /** Path shortening, published so BOTH chromes render the same path. */\n pathCollapse: FilterPathCollapse;\n maxPathSegments: number;\n\n /** Operators for a field, memoized on the catalog and the schema. */\n resolveOperators: (field: FilterField<V, O>) => FilterOperator[];\n resolveEditor: (\n field: FilterField<V, O>,\n operator: FilterOperator | undefined,\n ) => FilterEditor<V, O> | undefined;\n /** Value-to-label store shared by every `useFilterOptions` under the root. */\n resolution: FilterResolutionStore;\n\n /** Appends a rule. Defaults to the ROOT group. The parent is a parameter\n * rather than always the root because a nested group's add button is the\n * keyboard path into that group, and routing it through the root then\n * moving it would be two edits and two announcements for one action. */\n addRule: (rule: FilterRule<V>, parentId?: string) => void;\n /** Appends an empty group and returns its id, so the caller can focus it.\n * Returns an EMPTY STRING when the bar is disabled or read only, the one\n * mutator that has to report its refusal: focusing a group that was never\n * created strands the tab stop. `\"\"` rather than `string | null` keeps the\n * callers that already test the id honest without widening a published\n * signature. */\n addGroup: (parentId?: string, combinator?: FilterCombinator) => string;\n updateRule: (id: string, updates: Partial<Omit<FilterRule<V>, \"id\" | \"type\">>) => void;\n /** Removes a rule OR a group, and prunes the groups that empties. Node-level\n * rather than rule-level because a chip only ever removes a rule, while a\n * builder row's trash and a group header's trash are the same button on two\n * kinds of node. */\n removeNode: (id: string) => void;\n duplicateNode: (id: string) => void;\n negateRule: (id: string) => void;\n /** Reorders within the node's own parent. Out of range moves are no-ops. */\n moveNode: (id: string, delta: number) => void;\n /** Moves a node into another group, at an index. The drag-and-drop half. */\n moveNodeTo: (id: string, parentId: string, index: number) => void;\n /** Copies a node into another group, at an index. The Alt-drag half, apart\n * from `duplicateNode` (which copies BESIDE, with no destination): the two\n * composed would emit two queries for one gesture, and a controlled\n * consumer would persist a tree the user never asked for. */\n copyNodeTo: (id: string, parentId: string, index: number) => void;\n /** Nests one node in a new group. The keyboard half of the same idea. */\n wrapNodeInGroup: (id: string, combinator?: FilterCombinator) => void;\n /** Dissolves a group into its parent. The inverse of `wrapNodeInGroup`. */\n unwrapGroup: (groupId: string) => void;\n setCombinator: (groupId: string, combinator: FilterCombinator) => void;\n toggleCombinator: (groupId: string) => void;\n clearQuery: () => void;\n\n openCreate: () => void;\n openAmend: (id: string, step: FilterDraftStep) => void;\n closeDraft: () => void;\n dispatchDraft: (action: FilterDraftAction<V>) => void;\n\n /** Writes the bar's live region, for a change no visible surface reports: an\n * editor's popover is the one place something destructive happens to rows\n * the user is not on, with focus, name and text unchanged afterwards. Not a\n * query write, so it skips `emit` and asks the lock nothing. */\n announce: (message: string) => void;\n\n /** Getters for event handlers, so a handler never closes over stale state. */\n getQuery: () => FilterQuery<V>;\n getDraft: () => FilterDraft<V> | null;\n /** Fresh id from the SSR-safe factory. */\n nextId: () => string;\n}\n\n/* -------------------------------------------------------------------------- */\n/* The mutation lock */\n/* -------------------------------------------------------------------------- */\n\n/** `disabled` and `readOnly` are NOT two words for one state. `disabled` is\n * the native attribute: not operable, out of the tab order. `readOnly` blocks\n * MUTATION and preserves NAVIGATION, because a read-only bar exists so a\n * keyboard or screen reader user can walk the chips and find out what the\n * view is filtered by. Collapsing the two once put the native attribute on\n * all thirteen advanced-builder cell controls while the roving tab stop sat\n * on a disabled element, so not one row could be reached from the keyboard.\n *\n * So a mutating control keeps its tab stop and wears `aria-disabled` plus\n * `data-readonly` (`filterReadOnlyProps`), this repo's convention for\n * \"present, focusable, not operable\". `aria-readonly` is never used, being\n * disallowed on the button, group and toolbar roles, so the BAR says it in\n * prose through `labels.readOnly`. The refusal itself is enforced once, where\n * all fourteen query writes pass through `emit` in `filters.tsx`. */\nexport function isFilterLocked(state: { disabled: boolean; readOnly: boolean }): boolean {\n return state.disabled || state.readOnly;\n}\n\n/** What a MUTATING control wears while the bar is read only. `null` when the\n * bar is disabled, because the native attribute already says it. A\n * conditional spread, not explicit `undefined`s: `aria-disabled=\"false\"` on\n * an enabled control is noise, and `data-readonly` is a presence hook. */\nexport function filterReadOnlyProps(state: { disabled: boolean; readOnly: boolean }) {\n if (state.disabled || !state.readOnly) return null;\n return { \"aria-disabled\": true, \"data-readonly\": \"\" } as const;\n}\n\n/* -------------------------------------------------------------------------- */\n/* The size ladder */\n/* -------------------------------------------------------------------------- */\n\n/** The two shadcn button sizes one filters size resolves to. Two rungs because\n * shadcn ships a separate ladder for labelled and for icon-only buttons, and\n * pairing them keeps a row's kebab as tall as the cell beside it. */\nexport interface FilterControlSizes {\n /** Labelled buttons: the row cells, both triggers, the panel footer. */\n button: \"sm\" | \"default\";\n /** Icon-only buttons, and also the CHIP's height: a chip is an\n * `items-stretch` `ButtonGroup` and no style gives its text segment a\n * height, so the segments stretch to the kebab, the one child that has one.\n * Sizing the kebab sizes the pill. */\n icon: \"icon-sm\" | \"icon\";\n}\n\n/** ONE ladder, keyed off `size`, for every control the chrome renders, because\n * the alternative already happened: five advanced-builder cells took\n * `actions.size` while seven sites hardcoded `icon-sm` and three `sm`, giving\n * one row three heights. Nothing here is a pixel - each value is a shadcn\n * size NAME that `Button` resolves per style, since the control-height ladder\n * is per style (nova 7/8, sera 9/10, mira 6/7, and so on), and the glyph size\n * rides the same name, so pinning an icon size in here would fight the style\n * rather than match it. Two rungs only: `lg` would make the bar taller than\n * the style's own default control height (want taller, pick a taller STYLE),\n * and `icon-xs` is a 20-24px square in most styles, too small for a chip's\n * own label to clear. */\nconst FILTER_CONTROL_SIZES: Record<\"sm\" | \"default\", FilterControlSizes> = {\n sm: { button: \"sm\", icon: \"icon-sm\" },\n default: { button: \"default\", icon: \"icon\" },\n};\n\n/** The pair for a bar's size, off anything with a `size`, so a\n * consumer-composed chrome uses the same ladder as the shipped one. The\n * fallback is for JavaScript callers: a `\"lg\"` TypeScript would have rejected\n * must still draw buttons rather than throw on `.button`. */\nexport function filterControlSizes(state: { size: \"sm\" | \"default\" }): FilterControlSizes {\n return FILTER_CONTROL_SIZES[state.size] ?? FILTER_CONTROL_SIZES.default;\n}\n\nconst FilterActionsContext = React.createContext<FilterActionsContextValue | null>(null);\n\nexport function useFilterActions<V = unknown, O = unknown>(): FilterActionsContextValue<V, O> {\n const context = React.useContext(FilterActionsContext);\n if (!context) {\n throw new Error(\"useFilterActions must be used inside <Filters>\");\n }\n return context as unknown as FilterActionsContextValue<V, O>;\n}\n\n/* -------------------------------------------------------------------------- */\n/* State */\n/* -------------------------------------------------------------------------- */\n\n/** Volatile by construction: typing one character into a value editor\n * republishes it. Subscribe from the bar and the panel, never from a chip. */\nexport interface FilterStateContextValue<V = unknown> {\n query: FilterQuery<V>;\n draft: FilterDraft<V> | null;\n ruleCount: number;\n /** Live region text. Empty except immediately after an announced change. */\n announcement: string;\n /** How many announcements have been made, so a REPEATED one is still heard:\n * `aria-live` reports a DOM mutation and React writes nothing when the\n * string is unchanged, so the chrome keys the region's contents on this. A\n * counter rather than a timestamp: it is compared for identity, never read\n * as a value, and is stable across a rerender that a clock is not. */\n announcementSeq: number;\n}\n\nconst FilterStateContext = React.createContext<FilterStateContextValue | null>(null);\n\nexport function useFilterState<V = unknown>(): FilterStateContextValue<V> {\n const context = React.useContext(FilterStateContext);\n if (!context) {\n throw new Error(\"useFilterState must be used inside <Filters>\");\n }\n return context as unknown as FilterStateContextValue<V>;\n}\n\n/* -------------------------------------------------------------------------- */\n/* Render */\n/* -------------------------------------------------------------------------- */\n\n/** Consumer render overrides, on their own channel. They must be\n * always-current closures yet change identity on every parent render when\n * written inline, so isolating them re-renders only what calls them. */\nexport interface FilterRenderContextValue<V = unknown, O = unknown> {\n renderValue?: (context: FilterValueDisplayContext<V, O>) => React.ReactNode;\n renderChip?: (rule: FilterRule<V>) => React.ReactNode;\n renderEmpty?: (context: FilterEmptyStateContext) => React.ReactNode;\n}\n\nconst FilterRenderContext = React.createContext<FilterRenderContextValue>({});\n\nexport function useFilterRender<V = unknown, O = unknown>(): FilterRenderContextValue<V, O> {\n return React.useContext(FilterRenderContext) as FilterRenderContextValue<V, O>;\n}\n\n/* -------------------------------------------------------------------------- */\n/* Focus store */\n/* -------------------------------------------------------------------------- */\n\n/** Which chip currently owns the row's single tab stop. */\nexport interface FilterFocus {\n id: string | null;\n /** Which cell inside that row, for restoring focus after an edit. A chip\n * draws only `field`, `operator`, `value` and `menu`; the rest are advanced\n * builder cells, where a GROUP header is a row too (its `field` is the\n * combinator sentence). One union, because the chromes share the store. */\n segment:\n | \"combinator\"\n | \"field\"\n | \"operator\"\n | \"value\"\n | \"add\"\n | \"menu\"\n | \"ungroup\"\n | \"remove\"\n | \"drag\"\n | null;\n /** Open that segment's popover, not merely focus it. Picking a field commits\n * the rule straight away and the chip appears with no condition yet, so the\n * operator menu has to open ON THE CHIP without a second click. */\n autoOpen: boolean;\n}\n\n/** An external store, deliberately NOT React state. A roving tabindex\n * republishes on every arrow key, and `setState` would re-render the whole\n * bar to move one outline. The SELECTOR hooks below each narrow to one value,\n * so arrowing across forty chips re-renders two components. `useFilterFocus`\n * is the exception: it returns the whole snapshot. */\nexport interface FilterFocusStore {\n subscribe: (onStoreChange: () => void) => () => void;\n getSnapshot: () => FilterFocus;\n /** No-ops when nothing changed. */\n set: (next: FilterFocus) => void;\n}\n\nconst NO_FOCUS: FilterFocus = { id: null, segment: null, autoOpen: false };\n\nexport function createFilterFocusStore(): FilterFocusStore {\n let snapshot: FilterFocus = NO_FOCUS;\n const listeners = new Set<() => void>();\n\n return {\n subscribe(onStoreChange) {\n listeners.add(onStoreChange);\n return () => {\n listeners.delete(onStoreChange);\n };\n },\n // The SAME object until something actually changes, which is what\n // `useSyncExternalStore` requires to avoid an infinite render loop.\n getSnapshot() {\n return snapshot;\n },\n set(next) {\n if (\n next.id === snapshot.id &&\n next.segment === snapshot.segment &&\n next.autoOpen === snapshot.autoOpen\n ) {\n return;\n }\n snapshot = next;\n for (const listener of listeners) listener();\n },\n };\n}\n\n/** A shared, permanently empty store, so the hook degrades to \"nothing\n * focused\" outside a `Filters`. Nothing ever writes to it: each root creates\n * and writes its own. */\nconst FALLBACK_FOCUS_STORE = createFilterFocusStore();\n\nconst FilterFocusContext = React.createContext<FilterFocusStore>(FALLBACK_FOCUS_STORE);\n\n/* -------------------------------------------------------------------------- */\n/* Reordering */\n/* -------------------------------------------------------------------------- */\n\n/** Whether rows may be reordered at all, published once for the subtree. Two\n * files have to agree about it: the builder gates the grip and Alt+Arrow,\n * while the row and group menus commit the same mutator by a third route, so\n * gating only the builder left it off for a pointer and on from a menu. */\nconst FilterReorderContext = React.createContext(false);\n\nexport const FilterReorderProvider = FilterReorderContext.Provider;\n\nexport function useFilterReorderable(): boolean {\n return React.useContext(FilterReorderContext);\n}\n\n/* -------------------------------------------------------------------------- */\n/* Touched */\n/* -------------------------------------------------------------------------- */\n\n/** Which rules the user has actually edited the VALUE of, which decides WHEN\n * an error may appear: \"Add filter\" mints a row with no value, so flagging\n * every invalid row turns the builder red before the user did anything wrong.\n * An issue is still COLLECTED for every rule - the footer count,\n * `onQueryChange` and tree validity do not change - and only DRAWN once the\n * user has committed a value. An external store for the focus store's reason,\n * keyed by rule id and never pruned: a stale id costs one Set entry, and\n * reconciling against the query on every commit is hot-path work. */\nexport interface FilterRowStateStore {\n subscribe: (listener: () => void) => () => void;\n /** Bumped on every write. What a memo depends on, since the Sets are mutable. */\n version: () => number;\n /** Whether this rule has had a value committed to it by the user. */\n has: (id: string) => boolean;\n mark: (id: string) => void;\n /** Starts this rule over. Changing a rule's ATTRIBUTE resets its operator\n * and its value, so it has to reset this too, or the row stays warned about\n * a value that no longer exists on a field the user navigated away from. */\n unmark: (id: string) => void;\n /** Whether this rule is still being CREATED: minted by Add filter and not\n * yet given an attribute. The row enters the query with a guessed field to\n * keep the tree valid, so while pending the builder draws only that cell. */\n isPending: (id: string) => boolean;\n markPending: (id: string) => void;\n /** The attribute was chosen. The rest of the row appears. */\n resolvePending: (id: string) => void;\n /** Forgets everything. The bar's own Clear all, and a whole-tree replace. */\n reset: () => void;\n}\n\nexport function createFilterRowStateStore(): FilterRowStateStore {\n const touched = new Set<string>();\n const pending = new Set<string>();\n const listeners = new Set<() => void>();\n let version = 0;\n const notify = () => {\n version += 1;\n for (const listener of listeners) listener();\n };\n return {\n subscribe: (listener) => {\n listeners.add(listener);\n return () => listeners.delete(listener);\n },\n version: () => version,\n has: (id) => touched.has(id),\n mark: (id) => {\n if (touched.has(id)) return;\n touched.add(id);\n notify();\n },\n unmark: (id) => {\n if (!touched.delete(id)) return;\n notify();\n },\n isPending: (id) => pending.has(id),\n markPending: (id) => {\n if (pending.has(id)) return;\n pending.add(id);\n notify();\n },\n resolvePending: (id) => {\n if (!pending.delete(id)) return;\n notify();\n },\n reset: () => {\n if (touched.size === 0 && pending.size === 0) return;\n touched.clear();\n pending.clear();\n notify();\n },\n };\n}\n\nconst FALLBACK_ROW_STATE_STORE = createFilterRowStateStore();\n\nconst FilterRowStateContext = React.createContext<FilterRowStateStore>(FALLBACK_ROW_STATE_STORE);\n\nexport const FilterRowStateProvider = FilterRowStateContext.Provider;\n\n/** The store itself, for handlers that write without subscribing. */\nexport function useFilterRowStateStore(): FilterRowStateStore {\n return React.useContext(FilterRowStateContext);\n}\n\n/** Whether THIS rule is still waiting for its attribute. */\nexport function useFilterRowPending(id: string): boolean {\n const store = React.useContext(FilterRowStateContext);\n return React.useSyncExternalStore(\n store.subscribe,\n () => store.isPending(id),\n () => false,\n );\n}\n\n/** Whether THIS rule may show an error yet. */\nexport function useFilterTouched(id: string): boolean {\n const store = React.useContext(FilterRowStateContext);\n return React.useSyncExternalStore(\n store.subscribe,\n () => store.has(id),\n () => false,\n );\n}\n\n/** The whole focus snapshot, so the caller re-renders on EVERY move anywhere\n * in the row. A chip wants `useFilterChipFocused` or `useFilterSegmentFocus`\n * below instead. */\nexport function useFilterFocus(): FilterFocus {\n const store = React.useContext(FilterFocusContext);\n return React.useSyncExternalStore(store.subscribe, store.getSnapshot, store.getSnapshot);\n}\n\n/** The store itself, for event handlers that write without subscribing. */\nexport function useFilterFocusStore(): FilterFocusStore {\n return React.useContext(FilterFocusContext);\n}\n\n/** The segment of THIS chip that should open itself, or null. */\nexport function useFilterChipAutoOpen(id: string): FilterFocus[\"segment\"] | null {\n const store = React.useContext(FilterFocusContext);\n return React.useSyncExternalStore(\n store.subscribe,\n () => {\n const snapshot = store.getSnapshot();\n return snapshot.autoOpen && snapshot.id === id ? snapshot.segment : null;\n },\n () => null,\n );\n}\n\n/** Whether the row holds no focus, so the first chip keeps the tab stop. */\nexport function useFilterFocusEmpty(): boolean {\n const store = React.useContext(FilterFocusContext);\n return React.useSyncExternalStore(\n store.subscribe,\n () => store.getSnapshot().id === null,\n () => true,\n );\n}\n\n/** Whether THIS chip owns the row's tab stop. */\nexport function useFilterChipFocused(id: string): boolean {\n const store = React.useContext(FilterFocusContext);\n return React.useSyncExternalStore(\n store.subscribe,\n () => store.getSnapshot().id === id,\n () => false,\n );\n}\n\n/** Which segment of THIS rule owns the tab stop, or null when another rule\n * does. A chip needs one boolean, but an advanced row is a grid ROW whose tab\n * stop is a (row, column) pair, and the column has to come from this store\n * too or the chromes disagree about where focus is after an edit. */\nexport function useFilterSegmentFocus(id: string): FilterFocus[\"segment\"] {\n const store = React.useContext(FilterFocusContext);\n return React.useSyncExternalStore(\n store.subscribe,\n () => {\n const snapshot = store.getSnapshot();\n return snapshot.id === id ? snapshot.segment : null;\n },\n () => null,\n );\n}\n\n/* -------------------------------------------------------------------------- */\n/* Resolution store */\n/* -------------------------------------------------------------------------- */\n\n/** The instance-wide value-to-label store. `useFilterOptions` caches per HOOK\n * INSTANCE, and a chip's display and its editor are two instances, so a\n * `loadOptions`-only field rendered its raw id the moment the menu closed.\n * Every instance under one root writes here, and `resolveValues` results land\n * here too. External rather than React state because labels arrive from\n * effects and promises at their own pace, and the version bumps only when a\n * NEW label lands, so a subscriber re-renders once per page of results. */\nexport interface FilterResolutionStore {\n subscribe: (onStoreChange: () => void) => () => void;\n getVersion: () => number;\n /** The option behind a stored value, or undefined while unresolved. */\n get: (fieldKey: string, value: string) => FilterOption | undefined;\n /** Records options under a field key. New values bump the version. */\n set: (fieldKey: string, options: readonly FilterOption[]) => void;\n /** Marks values as resolving and returns the subset nobody has claimed yet,\n * so two chips holding the same id issue ONE request. Claims are permanent\n * for values a fulfilled resolve did not return, which stops an id the\n * server does not know from being re-asked forever. */\n claim: (fieldKey: string, values: readonly string[]) => string[];\n /** Releases claims after a FAILED resolve, so a later mount may retry. */\n release: (fieldKey: string, values: readonly string[]) => void;\n}\n\nexport function createFilterResolutionStore(): FilterResolutionStore {\n const resolved = new Map<string, Map<string, FilterOption>>();\n const claimed = new Map<string, Set<string>>();\n const listeners = new Set<() => void>();\n let version = 0;\n\n const bucket = (fieldKey: string) => {\n let map = resolved.get(fieldKey);\n if (!map) {\n map = new Map();\n resolved.set(fieldKey, map);\n }\n return map;\n };\n\n return {\n subscribe(onStoreChange) {\n listeners.add(onStoreChange);\n return () => {\n listeners.delete(onStoreChange);\n };\n },\n getVersion() {\n return version;\n },\n get(fieldKey, value) {\n return resolved.get(fieldKey)?.get(value);\n },\n set(fieldKey, options) {\n const map = bucket(fieldKey);\n let landed = false;\n for (const option of options) {\n if (!map.has(option.value)) landed = true;\n map.set(option.value, option);\n }\n if (!landed) return;\n version += 1;\n for (const listener of listeners) listener();\n },\n claim(fieldKey, values) {\n let set = claimed.get(fieldKey);\n if (!set) {\n set = new Set();\n claimed.set(fieldKey, set);\n }\n const map = resolved.get(fieldKey);\n const fresh: string[] = [];\n for (const value of values) {\n if (set.has(value) || map?.has(value)) continue;\n set.add(value);\n fresh.push(value);\n }\n return fresh;\n },\n release(fieldKey, values) {\n const set = claimed.get(fieldKey);\n if (!set) return;\n for (const value of values) set.delete(value);\n },\n };\n}\n\nexport { FilterActionsContext, FilterFocusContext, FilterRenderContext, FilterStateContext };\n"],"mappings":";;;;;;;;;;;;;;;;;AAgKA,SAAgB,eAAe,OAA0D;CACvF,OAAO,MAAM,YAAY,MAAM;AACjC;;;;;AAMA,SAAgB,oBAAoB,OAAiD;CACnF,IAAI,MAAM,YAAY,CAAC,MAAM,UAAU,OAAO;CAC9C,OAAO;EAAE,iBAAiB;EAAM,iBAAiB;CAAG;AACtD;;;;;;;;;;;;AA8BA,MAAM,uBAAqE;CACzE,IAAI;EAAE,QAAQ;EAAM,MAAM;CAAU;CACpC,SAAS;EAAE,QAAQ;EAAW,MAAM;CAAO;AAC7C;;;;;AAMA,SAAgB,mBAAmB,OAAuD;CACxF,OAAO,qBAAqB,MAAM,SAAS,qBAAqB;AAClE;AAEA,MAAM,uBAAuB,MAAM,cAAgD,IAAI;AAEvF,SAAgB,mBAA8E;CAC5F,MAAM,UAAU,MAAM,WAAW,oBAAoB;CACrD,IAAI,CAAC,SACH,MAAM,IAAI,MAAM,gDAAgD;CAElE,OAAO;AACT;AAsBA,MAAM,qBAAqB,MAAM,cAA8C,IAA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AK,MAAM,UAAU,SAAS;IAC5B,IAAI,CAAC,IAAI,IAAI,OAAO,KAAK,GAAG,SAAS;IACrC,IAAI,IAAI,OAAO,OAAO,MAAM;GAC9B;GACA,IAAI,CAAC,QAAQ;GACb,WAAW;GACX,KAAK,MAAM,YAAY,WAAW,SAAS;EAC7C;EACA,MAAM,UAAU,QAAQ;GACtB,IAAI,MAAM,QAAQ,IAAI,QAAQ;GAC9B,IAAI,CAAC,KAAK;IACR,sBAAM,IAAI,IAAI;IACd,QAAQ,IAAI,UAAU,GAAG;GAC3B;GACA,MAAM,MAAM,SAAS,IAAI,QAAQ;GACjC,MAAM,QAAkB,CAAC;GACzB,KAAK,MAAM,SAAS,QAAQ;IAC1B,IAAI,IAAI,IAAI,KAAK,KAAK,KAAK,IAAI,KAAK,GAAG;IACvC,IAAI,IAAI,KAAK;IACb,MAAM,KAAK,KAAK;GAClB;GACA,OAAO;EACT;EACA,QAAQ,UAAU,QAAQ;GACxB,MAAM,MAAM,QAAQ,IAAI,QAAQ;GAChC,IAAI,CAAC,KAAK;GACV,KAAK,MAAM,SAAS,QAAQ,IAAI,OAAO,KAAK;EAC9C;CACF;AACF"}
@@ -1,4 +1,4 @@
1
- import * as React$1 from "react";
1
+ import * as React from "react";
2
2
  /**
3
3
  * Gesture model copied from `event-calendar-dnd.tsx`, deliberately not
4
4
  * imported: filters installs on its own and must not pull a whole calendar into
@@ -93,6 +93,6 @@ export interface FilterRowDragOptions {
93
93
  * copy affordance and no way to report a drop into a nested target.
94
94
  */
95
95
  export declare function useFilterRowDrag(options: FilterRowDragOptions): (nodeId: string) => {
96
- onPointerDown: (event: React$1.PointerEvent<HTMLElement>) => void;
96
+ onPointerDown: (event: React.PointerEvent<HTMLElement>) => void;
97
97
  };
98
98
  //# sourceMappingURL=filters-dnd.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"filters-dnd.d.ts","names":["React"],"sources":["../../../../src/components/reui/filters/filters-dnd.tsx"],"mappings":";;;;;;qBASa;;;;;;;;;;;;qBAaA;;qBAGA;;qBAGA;;iBAGI;EACf;EACA;EACA;EACA;;EAEA;;EAEA;;EAEA;;iBAGe,qBAAqB,UAAU;EAC9C,QAAQ;;EAER;;;;;;;;;;;;;qBAkBW;;;;;;;wBAQG,kBAAkB,UAAU,eAC1C,OAAO,KACP,MAAM,KACN,WACA,WACA,gBACC,qBAAqB;;iBAyBP;EACf;EACA;;;;;;wBAOc,iBACd,YAAY,qBAAqB,uBACjC,QAAQ,yBACR;;wBAWc;;;;;wBAUA;iBAiIC;EACf;EACA;;EAEA;;iBAGe;;EAEf,YAAY;EACZ,SAAS,gBAAgB,SAAS;EAClC;;;;;;;wBA2Xc,iBAAiB,SAAS,wBAAoB;EAcjC,gBAAA,OAAAA,QAAM,aAAa"}
1
+ {"version":3,"file":"filters-dnd.d.ts","names":[],"sources":["../../../../src/components/reui/filters/filters-dnd.tsx"],"mappings":";;;;;;qBASa;;;;;;;;;;;;qBAaA;;qBAGA;;qBAGA;;iBAGI;EACf;EACA;EACA;EACA;;EAEA;;EAEA;;EAEA;;iBAGe,qBAAqB,UAAU;EAC9C,QAAQ;;EAER;;;;;;;;;;;;;qBAkBW;;;;;;;wBAQG,kBAAkB,UAAU,eAC1C,OAAO,KACP,MAAM,KACN,WACA,WACA,gBACC,qBAAqB;;iBAyBP;EACf;EACA;;;;;;wBAOc,iBACd,YAAY,qBAAqB,uBACjC,QAAQ,yBACR;;wBAWc;;;;;wBAUA;iBAiIC;EACf;EACA;;EAEA;;iBAGe;;EAEf,YAAY;EACZ,SAAS,gBAAgB,SAAS;EAClC;;;;;;;wBA2Xc,iBAAiB,SAAS,wBAAoB;EAcjC,gBAAA,OAAA,MAAM,aAAa"}
@@ -1,5 +1,5 @@
1
1
  "use client";
2
- import * as React$1 from "react";
2
+ import * as React from "react";
3
3
  // src/components/reui/filters/filters-dnd.tsx
4
4
  /**
5
5
  * Gesture model copied from `event-calendar-dnd.tsx`, deliberately not
@@ -437,12 +437,12 @@ function startDrag(event, nodeId, options) {
437
437
  * copy affordance and no way to report a drop into a nested target.
438
438
  */
439
439
  function useFilterRowDrag(options) {
440
- const latest = React$1.useRef(options);
441
- React$1.useEffect(() => {
440
+ const latest = React.useRef(options);
441
+ React.useEffect(() => {
442
442
  latest.current = options;
443
443
  });
444
- React$1.useEffect(() => cancelActiveFilterDrags, []);
445
- return React$1.useCallback((nodeId) => ({ onPointerDown: (event) => {
444
+ React.useEffect(() => cancelActiveFilterDrags, []);
445
+ return React.useCallback((nodeId) => ({ onPointerDown: (event) => {
446
446
  if (latest.current.disabled) return;
447
447
  if (event.button !== 0) return;
448
448
  startDrag(event, nodeId, latest.current);
@@ -1 +1 @@
1
- {"version":3,"file":"filters-dnd.js","names":["React"],"sources":["../../../../src/components/reui/filters/filters-dnd.tsx"],"sourcesContent":["\"use client\";\n\nimport * as React from \"react\";\n\n/**\n * Gesture model copied from `event-calendar-dnd.tsx`, deliberately not\n * imported: filters installs on its own and must not pull a whole calendar into\n * `shadcn add filters`. Vanilla-DOM overlay, so a drag renders no React.\n */\nexport const FILTER_DND_ACTIVATION = {\n /** Mouse travel before a press becomes a drag. Below this it stays a click. */\n moveDistancePx: 5,\n /** Touch long-press before a drag starts, so a swipe still scrolls. */\n touchDelayMs: 250,\n touchTolerancePx: 5,\n autoScrollEdgePx: 40,\n autoScrollMaxStepPx: 12,\n /** A seed only: `createCarry` measures the real grab offset before paint. */\n carryPointerOffsetPx: 12,\n} as const;\n\n/** One rule row, or one group's header row. Both are drag sources and targets. */\nexport const FILTER_ROW_SELECTOR = '[data-slot=\"filter-row\"]';\n\n/** Explicit \"drop INSIDE\": a row hit test can only ever say \"beside\". */\nexport const FILTER_DROP_ZONE_SELECTOR = \"[data-drop-parent]\";\n\n/** Marked alongside the zone, so lighting the group costs no `:has()`. */\nexport const FILTER_GROUP_SELECTOR = '[data-slot=\"filter-group\"]';\n\n/** Geometry only, so resolution is a pure function and a table test. */\nexport interface FilterDropBox {\n top: number;\n bottom: number;\n left: number;\n right: number;\n /** The group the drop writes into. */\n parentId: string;\n /** Where in that group's children the node lands, not a slot in this list. */\n index: number;\n /** How many rows enclose this box. Deeper wins. */\n depth: number;\n}\n\nexport interface FilterDropResolution<T extends FilterDropBox> {\n target: T;\n /** Null for a zone: INTO the group rather than beside anything. */\n edge: \"before\" | \"after\" | null;\n}\n\nfunction contains(box: FilterDropBox, x: number, y: number, grow = 0): boolean {\n return x >= box.left && x <= box.right && y >= box.top - grow && y <= box.bottom + grow;\n}\n\n/**\n * How far a ROW reaches past its own rect when hit tested: HALF the sibling\n * gap, which is `gap-3`, so six. `FILTER_ROW_GAP_CLASS` is the other half of\n * one measurement; this moves whenever that does.\n *\n * The seam between adjacent rows is inside NEITHER rect, so a pointer aimed\n * between two rows fell through to whatever did enclose it: at the top level\n * nothing did, so the cursor said `no-drop`; one level in it was the group.\n * Half the gap makes siblings tile, and the depth sort keeps the child ahead of\n * that group. Rows only: zones are explicit strips.\n */\nexport const FILTER_ROW_SEAM_PX = 6;\n\n/**\n * Zones before rows, then the DEEPEST box: a group's rect encloses everything\n * it holds, so a nested condition would otherwise resolve to its whole group.\n * `seam` is a parameter, not the constant inlined, so the tiling rule itself is\n * a table test.\n */\nexport function resolveFilterDrop<T extends FilterDropBox>(\n zones: T[],\n rows: T[],\n x: number,\n y: number,\n seam: number = FILTER_ROW_SEAM_PX,\n): FilterDropResolution<T> | null {\n let zone: T | null = null;\n for (const candidate of zones) {\n if (!contains(candidate, x, y)) continue;\n if (!zone || candidate.depth > zone.depth) zone = candidate;\n }\n if (zone) return { target: zone, edge: null };\n\n let row: T | null = null;\n for (const candidate of rows) {\n if (!contains(candidate, x, y, seam)) continue;\n if (!row || candidate.depth > row.depth) row = candidate;\n }\n if (!row) return null;\n\n // The midpoint, not the nearest edge: a row is the width of the panel, so a\n // proximity test would leave the indicator undecided across most of one.\n const after = y > row.top + (row.bottom - row.top) / 2;\n return {\n target: { ...row, index: row.index + (after ? 1 : 0) },\n edge: after ? \"after\" : \"before\",\n };\n}\n\n/** Where a dragged node started, which is what makes a drop a no-op or not. */\nexport interface FilterDropOrigin {\n parentId: string;\n index: number;\n}\n\n/**\n * Both indices name the slot the node already occupies, because\n * `moveFilterNodeTo` closes the gap the detach leaves. Copy is never a no-op.\n */\nexport function isFilterDropNoop(\n resolution: FilterDropResolution<FilterDropBox> | null,\n origin: FilterDropOrigin | null,\n copy: boolean,\n): boolean {\n if (!resolution || !origin || copy) return false;\n if (resolution.target.parentId !== origin.parentId) return false;\n return resolution.target.index === origin.index || resolution.target.index === origin.index + 1;\n}\n\n/** Rows unmount mid-gesture, so it is the PANEL leaving that aborts a drag. */\nconst activeCancels = new Set<() => void>();\n\n/** Cancel and fully revert every in-flight filter row drag. */\nexport function cancelActiveFilterDrags(): void {\n for (const cancel of [...activeCancels]) cancel();\n}\n\nlet lastDragEndedAt = 0;\n\n/**\n * Whether a drag ended within the last few frames. Exported: a consumer's own\n * row click handler needs the same answer the suppressor below needs.\n */\nexport function wasRecentFilterDrag(): boolean {\n return performance.now() - lastDragEndedAt < 250;\n}\n\n/**\n * NOT `{ once: true }` alone: a drag that ends over a different element fires\n * no click at all, and a stale arming would eat the user's next click. The\n * timestamp is what makes that stale arming harmless.\n */\nfunction suppressTrailingClick(event: MouseEvent) {\n window.removeEventListener(\"click\", suppressTrailingClick, true);\n if (!wasRecentFilterDrag()) return;\n event.stopPropagation();\n event.preventDefault();\n}\n\n/** The carry is a compositing layer: a subpixel translate blurs its text. */\nfunction snapToPixel(value: number): number {\n const dpr = typeof window !== \"undefined\" ? window.devicePixelRatio || 1 : 1;\n return Math.round(value * dpr) / dpr;\n}\n\n/**\n * `card` is a ZONE's group, resolved once rather than walked per frame. Null on\n * a row, which stands for itself.\n */\ntype MeasuredBox = FilterDropBox & {\n el: HTMLElement;\n card: HTMLElement | null;\n};\n\ninterface Surface {\n zones: MeasuredBox[];\n rows: MeasuredBox[];\n /**\n * Rects are captured ONCE, so one subtraction against this scrollTop corrects\n * for scrolling instead of a per-move `getBoundingClientRect`. THE ELEMENT,\n * NOT A MIRRORED NUMBER: a mirror tracks only this engine's own scrolling, so\n * a wheel mid-gesture left the rects stale while the correction read zero,\n * painting the indicator 60px off the pointer.\n */\n viewport: HTMLElement | null;\n viewportRect: DOMRect | null;\n /** The one number kept: where the rects were taken, which cannot change. */\n startScrollTop: number;\n}\n\n/**\n * The nearest scroller, THIS ONE INCLUDED: the panel is exactly what a consumer\n * caps with `overflow-y: auto`, and a walk from the parent answered null for it.\n */\nfunction findScrollParent(el: HTMLElement | null): HTMLElement | null {\n let node = el ?? null;\n while (node) {\n const style = getComputedStyle(node);\n const overflow = `${style.overflowY} ${style.overflow}`;\n if (/(auto|scroll|overlay)/.test(overflow) && node.scrollHeight > node.clientHeight) {\n return node;\n }\n node = node.parentElement;\n }\n return null;\n}\n\nfunction rowDepth(el: HTMLElement, root: HTMLElement): number {\n let depth = 0;\n let node = el.parentElement;\n while (node && node !== root) {\n if (node.matches(FILTER_ROW_SELECTOR)) depth++;\n node = node.parentElement;\n }\n return depth;\n}\n\n/**\n * Measured once. DESCENDANTS of the dragged node are excluded rather than\n * refused later: an indicator the drop ignores is a broken promise. The dragged\n * row ITSELF is kept, so its own slot reads as a no-op, not as a hole.\n */\nfunction collectSurface(root: HTMLElement, dragged: HTMLElement): Surface {\n const zones: MeasuredBox[] = [];\n const rows: MeasuredBox[] = [];\n\n for (const el of root.querySelectorAll<HTMLElement>(FILTER_DROP_ZONE_SELECTOR)) {\n if (dragged.contains(el)) continue;\n const parentId = el.dataset.dropParent;\n if (!parentId) continue;\n const rect = el.getBoundingClientRect();\n zones.push({\n el,\n card: el.closest<HTMLElement>(FILTER_GROUP_SELECTOR),\n top: rect.top,\n bottom: rect.bottom,\n left: rect.left,\n right: rect.right,\n parentId,\n index: Number(el.dataset.dropIndex ?? 0),\n depth: rowDepth(el, root),\n });\n }\n\n for (const el of root.querySelectorAll<HTMLElement>(FILTER_ROW_SELECTOR)) {\n if (el !== dragged && dragged.contains(el)) continue;\n const parentId = el.dataset.parentId;\n if (!parentId) continue;\n const rect = el.getBoundingClientRect();\n rows.push({\n el,\n card: null,\n top: rect.top,\n bottom: rect.bottom,\n left: rect.left,\n right: rect.right,\n parentId,\n index: Number(el.dataset.index ?? 0),\n depth: rowDepth(el, root),\n });\n }\n\n const viewport = findScrollParent(root);\n return {\n zones,\n rows,\n viewport,\n viewportRect: viewport?.getBoundingClientRect() ?? null,\n startScrollTop: viewport?.scrollTop ?? 0,\n };\n}\n\nexport interface FilterDropDetails {\n parentId: string;\n index: number;\n /** Alt was held at release: copy the node rather than moving it. */\n copy: boolean;\n}\n\nexport interface FilterRowDragOptions {\n /** The PANEL, not its body: the top-level append zone is in the footer. */\n root: () => HTMLElement | null;\n onDrop: (nodeId: string, details: FilterDropDetails) => void;\n disabled?: boolean;\n}\n\n/**\n * Straight to the DOM: a React state write per move is a tree render. A zone\n * marks TWO elements, itself and its card, and both clear every frame.\n */\nfunction paint(surface: Surface, hit: FilterDropResolution<MeasuredBox> | null) {\n for (const box of surface.zones) {\n delete box.el.dataset.dropInto;\n if (box.card) delete box.card.dataset.dropInto;\n }\n for (const box of surface.rows) delete box.el.dataset.dropEdge;\n if (!hit) return;\n if (hit.edge) {\n hit.target.el.dataset.dropEdge = hit.edge;\n return;\n }\n hit.target.el.dataset.dropInto = \"\";\n if (hit.target.card) hit.target.card.dataset.dropInto = \"\";\n}\n\nfunction startDrag(\n event: React.PointerEvent<HTMLElement>,\n nodeId: string,\n options: FilterRowDragOptions,\n) {\n const handle = event.currentTarget;\n const root = options.root();\n const source = handle.closest<HTMLElement>(FILTER_ROW_SELECTOR);\n if (!root || !source) return;\n\n const pointerId = event.pointerId;\n const isTouch = event.pointerType === \"touch\";\n const startX = event.clientX;\n const startY = event.clientY;\n\n // Off the row's own attributes, which it already publishes for the hit test.\n // Asking the panel would mean threading a position through the drag context.\n const origin: FilterDropOrigin | null = source.dataset.parentId\n ? {\n parentId: source.dataset.parentId,\n index: Number(source.dataset.index ?? 0),\n }\n : null;\n\n let active = false;\n let finished = false;\n let surface: Surface | null = null;\n let hit: FilterDropResolution<MeasuredBox> | null = null;\n let copy = event.altKey;\n let lastEvent: PointerEvent | null = null;\n let touchTimer: ReturnType<typeof setTimeout> | null = null;\n let rafScroll = 0;\n\n // Three states, not a boolean: `\"ok\"` lands somewhere new, `\"noop\"` puts the\n // node back where it came from, `\"none\"` is over nothing at all.\n let dropState: \"ok\" | \"noop\" | \"none\" = \"none\";\n\n let carryEl: HTMLDivElement | null = null;\n let badgeEl: HTMLSpanElement | null = null;\n // Where inside the row the pointer went down, so the copy holds that spot.\n // Measured in `createCarry`, which runs before anything reads these.\n let grabOffsetX = FILTER_DND_ACTIVATION.carryPointerOffsetPx;\n let grabOffsetY = FILTER_DND_ACTIVATION.carryPointerOffsetPx;\n\n const createCarry = () => {\n const rect = source.getBoundingClientRect();\n grabOffsetX = startX - rect.left;\n grabOffsetY = startY - rect.top;\n\n carryEl = document.createElement(\"div\");\n carryEl.setAttribute(\"data-slot\", \"filters-drag-carry\");\n carryEl.setAttribute(\"aria-hidden\", \"true\");\n // `data-drop-invalid` rather than a toggled class name, so the style stays\n // one static string Tailwind can see at build time.\n //\n // Muted and translucent, no border or shadow: the clone carries the row's\n // own controls, and a box around them read as a card leaving the page. Only\n // the invalid state marks the clone, since nothing else says the drop is\n // dead, and it RINGS rather than going dashed: dashed is this builder's\n // word for \"a row can land here\", and the clone is not one.\n carryEl.className =\n \"pointer-events-none fixed \" +\n \"top-0 left-0 z-100 \" +\n \"opacity-95 will-change-transform \" +\n \"data-drop-invalid:ring-destructive/70 data-drop-invalid:ring-2 \" +\n \"data-drop-invalid:opacity-60\";\n // A bare anchor: the clip box below owns the size, and no overflow lets the\n // badge overhang.\n carryEl.style.position = \"fixed\";\n\n const clone = source.cloneNode(true) as HTMLElement;\n // The source is faded while in flight; its copy must not inherit that.\n delete clone.dataset.dragging;\n delete clone.dataset.dropNoop;\n delete clone.dataset.dropEdge;\n if (rect.width > 0) clone.style.width = `${rect.width}px`;\n\n /*\n SANITIZED, because the clone lives on `<body>`: two elements would claim\n one node id, `aria-hidden` leaves real buttons in the tab order and must\n never wrap a focused one, and cloned ids make a `for` resolve to a copy.\n */\n const strip = (el: HTMLElement) => {\n el.removeAttribute(\"id\");\n el.removeAttribute(\"data-node-id\");\n el.removeAttribute(\"data-filter-cell\");\n if (el.dataset.slot === \"filter-row\") el.removeAttribute(\"data-slot\");\n // `-1` rather than removed: the attribute is also how the roving scheme\n // marks its cells, and a row copied mid-gesture has one cell at `0`.\n el.setAttribute(\"tabindex\", \"-1\");\n };\n strip(clone);\n for (const el of clone.querySelectorAll<HTMLElement>(\"*\")) strip(el);\n\n /*\n The CLIPPING box is the inner one: the carry is the badge's containing\n block, so `overflow-hidden` there clipped the badge that overhangs it.\n */\n const clip = document.createElement(\"div\");\n clip.className = \"bg-background overflow-hidden rounded-md\";\n // Sized only when the rect is real: a document that is not being laid out\n // measures zero, and a copy pinned to `0px` is invisible.\n if (rect.width > 0) clip.style.width = `${rect.width}px`;\n if (rect.height > 0) clip.style.height = `${rect.height}px`;\n clip.appendChild(clone);\n carryEl.appendChild(clip);\n\n badgeEl = document.createElement(\"span\");\n badgeEl.setAttribute(\"data-slot\", \"filters-drag-copy\");\n badgeEl.className =\n \"bg-primary text-primary-foreground absolute -end-1.5 -top-1.5 flex \" +\n \"size-4 items-center justify-center rounded-full text-[10px] leading-none\";\n badgeEl.textContent = \"+\";\n // Legible BEFORE the release, or Alt is discoverable only by error.\n badgeEl.hidden = !copy;\n carryEl.appendChild(badgeEl);\n\n // <body>, not the panel: a transform or a `content-visibility` on a wrapper\n // becomes the containing block for `position: fixed`, and the clone jumps.\n document.body.appendChild(carryEl);\n positionCarry(startX, startY);\n };\n\n const positionCarry = (x: number, y: number) => {\n if (!carryEl) return;\n // THE GRAB OFFSET, not a fixed nudge: the grip sits at the row's trailing\n // edge, so anchoring at the pointer hung the copy a row's width away.\n carryEl.style.transform = `translate3d(${snapToPixel(x - grabOffsetX)}px, ${snapToPixel(y - grabOffsetY)}px, 0)`;\n };\n\n // Two things decide the cursor and the RESOLUTION outranks Alt, which is why\n // `none` is tested first: `copy` over nothing is still nothing.\n const paintCursor = () => {\n if (!active) return;\n document.body.style.cursor = dropState === \"none\" ? \"no-drop\" : copy ? \"copy\" : \"grabbing\";\n };\n\n // Deliberately NOT guarded on `dropState === next`: the first resolution of a\n // gesture is routinely `\"none\"`, which is also the initial value, so a guard\n // left the first frame of a drag onto nothing wearing no mark at all.\n const setDropState = (next: typeof dropState) => {\n dropState = next;\n // On the SOURCE: \"it stays here\" is a statement about the row carried.\n if (next === \"noop\") source.dataset.dropNoop = \"\";\n else delete source.dataset.dropNoop;\n // And on the CARRY: over nothing there is no target left to mark.\n if (carryEl) {\n if (next === \"none\") carryEl.dataset.dropInvalid = \"\";\n else delete carryEl.dataset.dropInvalid;\n }\n paintCursor();\n };\n\n const setCopy = (next: boolean) => {\n if (copy === next) return;\n copy = next;\n if (badgeEl) badgeEl.hidden = !next;\n paintCursor();\n // Alt changes the ANSWER, not just the cursor: a release beside yourself is\n // a no-op while moving and a duplicate in place while copying.\n if (lastEvent) hitTest(lastEvent.clientX, lastEvent.clientY);\n };\n\n const hitTest = (x: number, y: number) => {\n if (!surface) return;\n // One subtraction instead of a re-measure. Read off the ELEMENT every time:\n // see `Surface.viewport`, a mirror misses the user's own scroll.\n const scrolled = surface.viewport?.scrollTop ?? surface.startScrollTop;\n const drift = scrolled - surface.startScrollTop;\n const resolved = resolveFilterDrop(surface.zones, surface.rows, x, y + drift);\n const noop = isFilterDropNoop(resolved, origin, copy);\n // A no-op commits as NOTHING, not as a move the tree would discard.\n hit = noop ? null : resolved;\n paint(surface, hit);\n setDropState(noop ? \"noop\" : hit ? \"ok\" : \"none\");\n };\n\n const autoScroll = (y: number) => {\n if (rafScroll) cancelAnimationFrame(rafScroll);\n rafScroll = 0;\n const viewport = surface?.viewport;\n const rect = surface?.viewportRect;\n if (!viewport || !rect) return;\n\n const edge = FILTER_DND_ACTIVATION.autoScrollEdgePx;\n const step = FILTER_DND_ACTIVATION.autoScrollMaxStepPx;\n let delta = 0;\n if (y >= rect.top && y < rect.top + edge) {\n delta = -step * ((rect.top + edge - y) / edge);\n } else if (y <= rect.bottom && y > rect.bottom - edge) {\n delta = step * Math.min(1, (y - (rect.bottom - edge)) / edge);\n }\n if (delta === 0) return;\n\n const tick = () => {\n // The read-back STOPS the loop: the browser clamps at the scroll extent,\n // so a panel at its limit would keep asking for unusable frames.\n const before = viewport.scrollTop;\n viewport.scrollTop = before + delta;\n if (viewport.scrollTop === before) return;\n if (lastEvent) hitTest(lastEvent.clientX, lastEvent.clientY);\n rafScroll = requestAnimationFrame(tick);\n };\n rafScroll = requestAnimationFrame(tick);\n };\n\n /**\n * A still pointer fires no `pointermove`, so a wheel mid-drag would leave the\n * last answer painted while the rows slid out from under it. The overlap\n * with the autoScroll tick is deliberate: this is arithmetic over boxes\n * already measured, and one redundant pass per frame is cheaper than a rule\n * about who owns the repaint.\n */\n const onViewportScroll = () => {\n if (!active || !lastEvent) return;\n hitTest(lastEvent.clientX, lastEvent.clientY);\n };\n\n const activate = () => {\n if (active) return;\n active = true;\n surface = collectSurface(root, source);\n\n // Passive: nothing here calls `preventDefault`, and a non-passive listener\n // on a scroller is a frame of jank per notch.\n surface.viewport?.addEventListener(\"scroll\", onViewportScroll, {\n passive: true,\n });\n source.dataset.dragging = \"\";\n document.body.style.cursor = copy ? \"copy\" : \"grabbing\";\n document.body.style.userSelect = \"none\";\n createCarry();\n // Armed with the GESTURE, not the press: a press that never travels far\n // enough strands no overlay, no body style and no listener.\n window.addEventListener(\"blur\", onWindowBlur);\n };\n\n // Idempotent. pointerup, pointercancel, Escape, window blur and the panel's\n // own teardown can all race; whichever lands first wins and the rest no-op.\n const cleanup = () => {\n if (finished) return;\n finished = true;\n activeCancels.delete(cancel);\n window.removeEventListener(\"pointermove\", onPointerMove);\n window.removeEventListener(\"pointerup\", onPointerUp);\n window.removeEventListener(\"pointercancel\", onPointerCancel);\n window.removeEventListener(\"keydown\", onKeyDown, true);\n window.removeEventListener(\"keyup\", onKeyUp, true);\n window.removeEventListener(\"blur\", onWindowBlur);\n surface?.viewport?.removeEventListener(\"scroll\", onViewportScroll);\n if (touchTimer) clearTimeout(touchTimer);\n if (rafScroll) cancelAnimationFrame(rafScroll);\n if (surface) paint(surface, null);\n delete source.dataset.dragging;\n delete source.dataset.dropNoop;\n carryEl?.remove();\n carryEl = null;\n badgeEl = null;\n document.body.style.cursor = \"\";\n document.body.style.userSelect = \"\";\n };\n\n /** A bare teardown: nothing is committed until release, so no snapshot. */\n const cancel = () => {\n if (active) lastDragEndedAt = performance.now();\n cleanup();\n };\n\n const onWindowBlur = () => cancel();\n\n const onKeyDown = (e: KeyboardEvent) => {\n if (e.key === \"Escape\" && active) {\n // Stopped, or the popover the builder may be living in closes underneath\n // the gesture and takes the panel the drop was aimed at with it.\n e.stopPropagation();\n e.preventDefault();\n cancel();\n return;\n }\n if (e.key === \"Alt\") setCopy(true);\n };\n\n // Alt tracked on its own keys too: reaching for the modifier without moving\n // the mouse fires no pointermove, and the badge has to appear regardless.\n const onKeyUp = (e: KeyboardEvent) => {\n if (e.key === \"Alt\") setCopy(false);\n };\n\n const onPointerMove = (e: PointerEvent) => {\n // A second finger must not drive or cancel the gesture this one started.\n if (e.pointerId !== pointerId) return;\n lastEvent = e;\n\n if (!active) {\n const distance = Math.hypot(e.clientX - startX, e.clientY - startY);\n if (isTouch) {\n // Past the tolerance the user is scrolling, so the press stays a scroll.\n if (distance > FILTER_DND_ACTIVATION.touchTolerancePx) cancel();\n return;\n }\n if (distance < FILTER_DND_ACTIVATION.moveDistancePx) return;\n activate();\n }\n\n setCopy(e.altKey);\n positionCarry(e.clientX, e.clientY);\n hitTest(e.clientX, e.clientY);\n autoScroll(e.clientY);\n };\n\n const onPointerUp = (e: PointerEvent) => {\n if (e.pointerId !== pointerId) return;\n const landed = active ? hit : null;\n const wasCopy = copy;\n cleanup();\n if (!active) return;\n\n lastDragEndedAt = performance.now();\n // The trailing click belongs to the gesture, not to whatever it ended over.\n window.addEventListener(\"click\", suppressTrailingClick, true);\n\n if (!landed) return;\n options.onDrop(nodeId, {\n parentId: landed.target.parentId,\n index: landed.target.index,\n copy: wasCopy,\n });\n };\n\n const onPointerCancel = (e: PointerEvent) => {\n if (e.pointerId !== pointerId) return;\n cancel();\n };\n\n window.addEventListener(\"pointermove\", onPointerMove);\n window.addEventListener(\"pointerup\", onPointerUp);\n window.addEventListener(\"pointercancel\", onPointerCancel);\n window.addEventListener(\"keydown\", onKeyDown, true);\n window.addEventListener(\"keyup\", onKeyUp, true);\n activeCancels.add(cancel);\n\n if (isTouch) {\n touchTimer = setTimeout(() => {\n activate();\n if (lastEvent) {\n positionCarry(lastEvent.clientX, lastEvent.clientY);\n hitTest(lastEvent.clientX, lastEvent.clientY);\n }\n }, FILTER_DND_ACTIVATION.touchDelayMs);\n }\n}\n\n/**\n * Only `onPointerDown`: the handle is a real button that Tab reaches, so it must\n * not also be `draggable` and race the browser's HTML5 drag, with its ghost, no\n * copy affordance and no way to report a drop into a nested target.\n */\nexport function useFilterRowDrag(options: FilterRowDragOptions) {\n // Read at gesture time, not captured at wiring time, so the handler identity\n // is stable and a memoized row never re-renders on a re-created callback.\n const latest = React.useRef(options);\n React.useEffect(() => {\n latest.current = options;\n });\n\n // A gesture outlives its row by design, but never the panel: its listeners\n // are on `window` and its carry on `document.body`.\n React.useEffect(() => cancelActiveFilterDrags, []);\n\n return React.useCallback(\n (nodeId: string) => ({\n onPointerDown: (event: React.PointerEvent<HTMLElement>) => {\n if (latest.current.disabled) return;\n // Primary button only: a right press strands the drag under a menu.\n if (event.button !== 0) return;\n startDrag(event, nodeId, latest.current);\n },\n }),\n [],\n );\n}\n"],"mappings":";;;;;;;;AASA,MAAa,wBAAwB;;CAEnC,gBAAgB;;CAEhB,cAAc;CACd,kBAAkB;CAClB,kBAAkB;CAClB,qBAAqB;;CAErB,sBA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xB,UAAU,OAAO,QAAQ,OAAO,OAAO;CACzC,EACF,IACA,CAAC,CACH;AACF"}
1
+ {"version":3,"file":"filters-dnd.js","names":[],"sources":["../../../../src/components/reui/filters/filters-dnd.tsx"],"sourcesContent":["\"use client\";\n\nimport * as React from \"react\";\n\n/**\n * Gesture model copied from `event-calendar-dnd.tsx`, deliberately not\n * imported: filters installs on its own and must not pull a whole calendar into\n * `shadcn add filters`. Vanilla-DOM overlay, so a drag renders no React.\n */\nexport const FILTER_DND_ACTIVATION = {\n /** Mouse travel before a press becomes a drag. Below this it stays a click. */\n moveDistancePx: 5,\n /** Touch long-press before a drag starts, so a swipe still scrolls. */\n touchDelayMs: 250,\n touchTolerancePx: 5,\n autoScrollEdgePx: 40,\n autoScrollMaxStepPx: 12,\n /** A seed only: `createCarry` measures the real grab offset before paint. */\n carryPointerOffsetPx: 12,\n} as const;\n\n/** One rule row, or one group's header row. Both are drag sources and targets. */\nexport const FILTER_ROW_SELECTOR = '[data-slot=\"filter-row\"]';\n\n/** Explicit \"drop INSIDE\": a row hit test can only ever say \"beside\". */\nexport const FILTER_DROP_ZONE_SELECTOR = \"[data-drop-parent]\";\n\n/** Marked alongside the zone, so lighting the group costs no `:has()`. */\nexport const FILTER_GROUP_SELECTOR = '[data-slot=\"filter-group\"]';\n\n/** Geometry only, so resolution is a pure function and a table test. */\nexport interface FilterDropBox {\n top: number;\n bottom: number;\n left: number;\n right: number;\n /** The group the drop writes into. */\n parentId: string;\n /** Where in that group's children the node lands, not a slot in this list. */\n index: number;\n /** How many rows enclose this box. Deeper wins. */\n depth: number;\n}\n\nexport interface FilterDropResolution<T extends FilterDropBox> {\n target: T;\n /** Null for a zone: INTO the group rather than beside anything. */\n edge: \"before\" | \"after\" | null;\n}\n\nfunction contains(box: FilterDropBox, x: number, y: number, grow = 0): boolean {\n return x >= box.left && x <= box.right && y >= box.top - grow && y <= box.bottom + grow;\n}\n\n/**\n * How far a ROW reaches past its own rect when hit tested: HALF the sibling\n * gap, which is `gap-3`, so six. `FILTER_ROW_GAP_CLASS` is the other half of\n * one measurement; this moves whenever that does.\n *\n * The seam between adjacent rows is inside NEITHER rect, so a pointer aimed\n * between two rows fell through to whatever did enclose it: at the top level\n * nothing did, so the cursor said `no-drop`; one level in it was the group.\n * Half the gap makes siblings tile, and the depth sort keeps the child ahead of\n * that group. Rows only: zones are explicit strips.\n */\nexport const FILTER_ROW_SEAM_PX = 6;\n\n/**\n * Zones before rows, then the DEEPEST box: a group's rect encloses everything\n * it holds, so a nested condition would otherwise resolve to its whole group.\n * `seam` is a parameter, not the constant inlined, so the tiling rule itself is\n * a table test.\n */\nexport function resolveFilterDrop<T extends FilterDropBox>(\n zones: T[],\n rows: T[],\n x: number,\n y: number,\n seam: number = FILTER_ROW_SEAM_PX,\n): FilterDropResolution<T> | null {\n let zone: T | null = null;\n for (const candidate of zones) {\n if (!contains(candidate, x, y)) continue;\n if (!zone || candidate.depth > zone.depth) zone = candidate;\n }\n if (zone) return { target: zone, edge: null };\n\n let row: T | null = null;\n for (const candidate of rows) {\n if (!contains(candidate, x, y, seam)) continue;\n if (!row || candidate.depth > row.depth) row = candidate;\n }\n if (!row) return null;\n\n // The midpoint, not the nearest edge: a row is the width of the panel, so a\n // proximity test would leave the indicator undecided across most of one.\n const after = y > row.top + (row.bottom - row.top) / 2;\n return {\n target: { ...row, index: row.index + (after ? 1 : 0) },\n edge: after ? \"after\" : \"before\",\n };\n}\n\n/** Where a dragged node started, which is what makes a drop a no-op or not. */\nexport interface FilterDropOrigin {\n parentId: string;\n index: number;\n}\n\n/**\n * Both indices name the slot the node already occupies, because\n * `moveFilterNodeTo` closes the gap the detach leaves. Copy is never a no-op.\n */\nexport function isFilterDropNoop(\n resolution: FilterDropResolution<FilterDropBox> | null,\n origin: FilterDropOrigin | null,\n copy: boolean,\n): boolean {\n if (!resolution || !origin || copy) return false;\n if (resolution.target.parentId !== origin.parentId) return false;\n return resolution.target.index === origin.index || resolution.target.index === origin.index + 1;\n}\n\n/** Rows unmount mid-gesture, so it is the PANEL leaving that aborts a drag. */\nconst activeCancels = new Set<() => void>();\n\n/** Cancel and fully revert every in-flight filter row drag. */\nexport function cancelActiveFilterDrags(): void {\n for (const cancel of [...activeCancels]) cancel();\n}\n\nlet lastDragEndedAt = 0;\n\n/**\n * Whether a drag ended within the last few frames. Exported: a consumer's own\n * row click handler needs the same answer the suppressor below needs.\n */\nexport function wasRecentFilterDrag(): boolean {\n return performance.now() - lastDragEndedAt < 250;\n}\n\n/**\n * NOT `{ once: true }` alone: a drag that ends over a different element fires\n * no click at all, and a stale arming would eat the user's next click. The\n * timestamp is what makes that stale arming harmless.\n */\nfunction suppressTrailingClick(event: MouseEvent) {\n window.removeEventListener(\"click\", suppressTrailingClick, true);\n if (!wasRecentFilterDrag()) return;\n event.stopPropagation();\n event.preventDefault();\n}\n\n/** The carry is a compositing layer: a subpixel translate blurs its text. */\nfunction snapToPixel(value: number): number {\n const dpr = typeof window !== \"undefined\" ? window.devicePixelRatio || 1 : 1;\n return Math.round(value * dpr) / dpr;\n}\n\n/**\n * `card` is a ZONE's group, resolved once rather than walked per frame. Null on\n * a row, which stands for itself.\n */\ntype MeasuredBox = FilterDropBox & {\n el: HTMLElement;\n card: HTMLElement | null;\n};\n\ninterface Surface {\n zones: MeasuredBox[];\n rows: MeasuredBox[];\n /**\n * Rects are captured ONCE, so one subtraction against this scrollTop corrects\n * for scrolling instead of a per-move `getBoundingClientRect`. THE ELEMENT,\n * NOT A MIRRORED NUMBER: a mirror tracks only this engine's own scrolling, so\n * a wheel mid-gesture left the rects stale while the correction read zero,\n * painting the indicator 60px off the pointer.\n */\n viewport: HTMLElement | null;\n viewportRect: DOMRect | null;\n /** The one number kept: where the rects were taken, which cannot change. */\n startScrollTop: number;\n}\n\n/**\n * The nearest scroller, THIS ONE INCLUDED: the panel is exactly what a consumer\n * caps with `overflow-y: auto`, and a walk from the parent answered null for it.\n */\nfunction findScrollParent(el: HTMLElement | null): HTMLElement | null {\n let node = el ?? null;\n while (node) {\n const style = getComputedStyle(node);\n const overflow = `${style.overflowY} ${style.overflow}`;\n if (/(auto|scroll|overlay)/.test(overflow) && node.scrollHeight > node.clientHeight) {\n return node;\n }\n node = node.parentElement;\n }\n return null;\n}\n\nfunction rowDepth(el: HTMLElement, root: HTMLElement): number {\n let depth = 0;\n let node = el.parentElement;\n while (node && node !== root) {\n if (node.matches(FILTER_ROW_SELECTOR)) depth++;\n node = node.parentElement;\n }\n return depth;\n}\n\n/**\n * Measured once. DESCENDANTS of the dragged node are excluded rather than\n * refused later: an indicator the drop ignores is a broken promise. The dragged\n * row ITSELF is kept, so its own slot reads as a no-op, not as a hole.\n */\nfunction collectSurface(root: HTMLElement, dragged: HTMLElement): Surface {\n const zones: MeasuredBox[] = [];\n const rows: MeasuredBox[] = [];\n\n for (const el of root.querySelectorAll<HTMLElement>(FILTER_DROP_ZONE_SELECTOR)) {\n if (dragged.contains(el)) continue;\n const parentId = el.dataset.dropParent;\n if (!parentId) continue;\n const rect = el.getBoundingClientRect();\n zones.push({\n el,\n card: el.closest<HTMLElement>(FILTER_GROUP_SELECTOR),\n top: rect.top,\n bottom: rect.bottom,\n left: rect.left,\n right: rect.right,\n parentId,\n index: Number(el.dataset.dropIndex ?? 0),\n depth: rowDepth(el, root),\n });\n }\n\n for (const el of root.querySelectorAll<HTMLElement>(FILTER_ROW_SELECTOR)) {\n if (el !== dragged && dragged.contains(el)) continue;\n const parentId = el.dataset.parentId;\n if (!parentId) continue;\n const rect = el.getBoundingClientRect();\n rows.push({\n el,\n card: null,\n top: rect.top,\n bottom: rect.bottom,\n left: rect.left,\n right: rect.right,\n parentId,\n index: Number(el.dataset.index ?? 0),\n depth: rowDepth(el, root),\n });\n }\n\n const viewport = findScrollParent(root);\n return {\n zones,\n rows,\n viewport,\n viewportRect: viewport?.getBoundingClientRect() ?? null,\n startScrollTop: viewport?.scrollTop ?? 0,\n };\n}\n\nexport interface FilterDropDetails {\n parentId: string;\n index: number;\n /** Alt was held at release: copy the node rather than moving it. */\n copy: boolean;\n}\n\nexport interface FilterRowDragOptions {\n /** The PANEL, not its body: the top-level append zone is in the footer. */\n root: () => HTMLElement | null;\n onDrop: (nodeId: string, details: FilterDropDetails) => void;\n disabled?: boolean;\n}\n\n/**\n * Straight to the DOM: a React state write per move is a tree render. A zone\n * marks TWO elements, itself and its card, and both clear every frame.\n */\nfunction paint(surface: Surface, hit: FilterDropResolution<MeasuredBox> | null) {\n for (const box of surface.zones) {\n delete box.el.dataset.dropInto;\n if (box.card) delete box.card.dataset.dropInto;\n }\n for (const box of surface.rows) delete box.el.dataset.dropEdge;\n if (!hit) return;\n if (hit.edge) {\n hit.target.el.dataset.dropEdge = hit.edge;\n return;\n }\n hit.target.el.dataset.dropInto = \"\";\n if (hit.target.card) hit.target.card.dataset.dropInto = \"\";\n}\n\nfunction startDrag(\n event: React.PointerEvent<HTMLElement>,\n nodeId: string,\n options: FilterRowDragOptions,\n) {\n const handle = event.currentTarget;\n const root = options.root();\n const source = handle.closest<HTMLElement>(FILTER_ROW_SELECTOR);\n if (!root || !source) return;\n\n const pointerId = event.pointerId;\n const isTouch = event.pointerType === \"touch\";\n const startX = event.clientX;\n const startY = event.clientY;\n\n // Off the row's own attributes, which it already publishes for the hit test.\n // Asking the panel would mean threading a position through the drag context.\n const origin: FilterDropOrigin | null = source.dataset.parentId\n ? {\n parentId: source.dataset.parentId,\n index: Number(source.dataset.index ?? 0),\n }\n : null;\n\n let active = false;\n let finished = false;\n let surface: Surface | null = null;\n let hit: FilterDropResolution<MeasuredBox> | null = null;\n let copy = event.altKey;\n let lastEvent: PointerEvent | null = null;\n let touchTimer: ReturnType<typeof setTimeout> | null = null;\n let rafScroll = 0;\n\n // Three states, not a boolean: `\"ok\"` lands somewhere new, `\"noop\"` puts the\n // node back where it came from, `\"none\"` is over nothing at all.\n let dropState: \"ok\" | \"noop\" | \"none\" = \"none\";\n\n let carryEl: HTMLDivElement | null = null;\n let badgeEl: HTMLSpanElement | null = null;\n // Where inside the row the pointer went down, so the copy holds that spot.\n // Measured in `createCarry`, which runs before anything reads these.\n let grabOffsetX = FILTER_DND_ACTIVATION.carryPointerOffsetPx;\n let grabOffsetY = FILTER_DND_ACTIVATION.carryPointerOffsetPx;\n\n const createCarry = () => {\n const rect = source.getBoundingClientRect();\n grabOffsetX = startX - rect.left;\n grabOffsetY = startY - rect.top;\n\n carryEl = document.createElement(\"div\");\n carryEl.setAttribute(\"data-slot\", \"filters-drag-carry\");\n carryEl.setAttribute(\"aria-hidden\", \"true\");\n // `data-drop-invalid` rather than a toggled class name, so the style stays\n // one static string Tailwind can see at build time.\n //\n // Muted and translucent, no border or shadow: the clone carries the row's\n // own controls, and a box around them read as a card leaving the page. Only\n // the invalid state marks the clone, since nothing else says the drop is\n // dead, and it RINGS rather than going dashed: dashed is this builder's\n // word for \"a row can land here\", and the clone is not one.\n carryEl.className =\n \"pointer-events-none fixed \" +\n \"top-0 left-0 z-100 \" +\n \"opacity-95 will-change-transform \" +\n \"data-drop-invalid:ring-destructive/70 data-drop-invalid:ring-2 \" +\n \"data-drop-invalid:opacity-60\";\n // A bare anchor: the clip box below owns the size, and no overflow lets the\n // badge overhang.\n carryEl.style.position = \"fixed\";\n\n const clone = source.cloneNode(true) as HTMLElement;\n // The source is faded while in flight; its copy must not inherit that.\n delete clone.dataset.dragging;\n delete clone.dataset.dropNoop;\n delete clone.dataset.dropEdge;\n if (rect.width > 0) clone.style.width = `${rect.width}px`;\n\n /*\n SANITIZED, because the clone lives on `<body>`: two elements would claim\n one node id, `aria-hidden` leaves real buttons in the tab order and must\n never wrap a focused one, and cloned ids make a `for` resolve to a copy.\n */\n const strip = (el: HTMLElement) => {\n el.removeAttribute(\"id\");\n el.removeAttribute(\"data-node-id\");\n el.removeAttribute(\"data-filter-cell\");\n if (el.dataset.slot === \"filter-row\") el.removeAttribute(\"data-slot\");\n // `-1` rather than removed: the attribute is also how the roving scheme\n // marks its cells, and a row copied mid-gesture has one cell at `0`.\n el.setAttribute(\"tabindex\", \"-1\");\n };\n strip(clone);\n for (const el of clone.querySelectorAll<HTMLElement>(\"*\")) strip(el);\n\n /*\n The CLIPPING box is the inner one: the carry is the badge's containing\n block, so `overflow-hidden` there clipped the badge that overhangs it.\n */\n const clip = document.createElement(\"div\");\n clip.className = \"bg-background overflow-hidden rounded-md\";\n // Sized only when the rect is real: a document that is not being laid out\n // measures zero, and a copy pinned to `0px` is invisible.\n if (rect.width > 0) clip.style.width = `${rect.width}px`;\n if (rect.height > 0) clip.style.height = `${rect.height}px`;\n clip.appendChild(clone);\n carryEl.appendChild(clip);\n\n badgeEl = document.createElement(\"span\");\n badgeEl.setAttribute(\"data-slot\", \"filters-drag-copy\");\n badgeEl.className =\n \"bg-primary text-primary-foreground absolute -end-1.5 -top-1.5 flex \" +\n \"size-4 items-center justify-center rounded-full text-[10px] leading-none\";\n badgeEl.textContent = \"+\";\n // Legible BEFORE the release, or Alt is discoverable only by error.\n badgeEl.hidden = !copy;\n carryEl.appendChild(badgeEl);\n\n // <body>, not the panel: a transform or a `content-visibility` on a wrapper\n // becomes the containing block for `position: fixed`, and the clone jumps.\n document.body.appendChild(carryEl);\n positionCarry(startX, startY);\n };\n\n const positionCarry = (x: number, y: number) => {\n if (!carryEl) return;\n // THE GRAB OFFSET, not a fixed nudge: the grip sits at the row's trailing\n // edge, so anchoring at the pointer hung the copy a row's width away.\n carryEl.style.transform = `translate3d(${snapToPixel(x - grabOffsetX)}px, ${snapToPixel(y - grabOffsetY)}px, 0)`;\n };\n\n // Two things decide the cursor and the RESOLUTION outranks Alt, which is why\n // `none` is tested first: `copy` over nothing is still nothing.\n const paintCursor = () => {\n if (!active) return;\n document.body.style.cursor = dropState === \"none\" ? \"no-drop\" : copy ? \"copy\" : \"grabbing\";\n };\n\n // Deliberately NOT guarded on `dropState === next`: the first resolution of a\n // gesture is routinely `\"none\"`, which is also the initial value, so a guard\n // left the first frame of a drag onto nothing wearing no mark at all.\n const setDropState = (next: typeof dropState) => {\n dropState = next;\n // On the SOURCE: \"it stays here\" is a statement about the row carried.\n if (next === \"noop\") source.dataset.dropNoop = \"\";\n else delete source.dataset.dropNoop;\n // And on the CARRY: over nothing there is no target left to mark.\n if (carryEl) {\n if (next === \"none\") carryEl.dataset.dropInvalid = \"\";\n else delete carryEl.dataset.dropInvalid;\n }\n paintCursor();\n };\n\n const setCopy = (next: boolean) => {\n if (copy === next) return;\n copy = next;\n if (badgeEl) badgeEl.hidden = !next;\n paintCursor();\n // Alt changes the ANSWER, not just the cursor: a release beside yourself is\n // a no-op while moving and a duplicate in place while copying.\n if (lastEvent) hitTest(lastEvent.clientX, lastEvent.clientY);\n };\n\n const hitTest = (x: number, y: number) => {\n if (!surface) return;\n // One subtraction instead of a re-measure. Read off the ELEMENT every time:\n // see `Surface.viewport`, a mirror misses the user's own scroll.\n const scrolled = surface.viewport?.scrollTop ?? surface.startScrollTop;\n const drift = scrolled - surface.startScrollTop;\n const resolved = resolveFilterDrop(surface.zones, surface.rows, x, y + drift);\n const noop = isFilterDropNoop(resolved, origin, copy);\n // A no-op commits as NOTHING, not as a move the tree would discard.\n hit = noop ? null : resolved;\n paint(surface, hit);\n setDropState(noop ? \"noop\" : hit ? \"ok\" : \"none\");\n };\n\n const autoScroll = (y: number) => {\n if (rafScroll) cancelAnimationFrame(rafScroll);\n rafScroll = 0;\n const viewport = surface?.viewport;\n const rect = surface?.viewportRect;\n if (!viewport || !rect) return;\n\n const edge = FILTER_DND_ACTIVATION.autoScrollEdgePx;\n const step = FILTER_DND_ACTIVATION.autoScrollMaxStepPx;\n let delta = 0;\n if (y >= rect.top && y < rect.top + edge) {\n delta = -step * ((rect.top + edge - y) / edge);\n } else if (y <= rect.bottom && y > rect.bottom - edge) {\n delta = step * Math.min(1, (y - (rect.bottom - edge)) / edge);\n }\n if (delta === 0) return;\n\n const tick = () => {\n // The read-back STOPS the loop: the browser clamps at the scroll extent,\n // so a panel at its limit would keep asking for unusable frames.\n const before = viewport.scrollTop;\n viewport.scrollTop = before + delta;\n if (viewport.scrollTop === before) return;\n if (lastEvent) hitTest(lastEvent.clientX, lastEvent.clientY);\n rafScroll = requestAnimationFrame(tick);\n };\n rafScroll = requestAnimationFrame(tick);\n };\n\n /**\n * A still pointer fires no `pointermove`, so a wheel mid-drag would leave the\n * last answer painted while the rows slid out from under it. The overlap\n * with the autoScroll tick is deliberate: this is arithmetic over boxes\n * already measured, and one redundant pass per frame is cheaper than a rule\n * about who owns the repaint.\n */\n const onViewportScroll = () => {\n if (!active || !lastEvent) return;\n hitTest(lastEvent.clientX, lastEvent.clientY);\n };\n\n const activate = () => {\n if (active) return;\n active = true;\n surface = collectSurface(root, source);\n\n // Passive: nothing here calls `preventDefault`, and a non-passive listener\n // on a scroller is a frame of jank per notch.\n surface.viewport?.addEventListener(\"scroll\", onViewportScroll, {\n passive: true,\n });\n source.dataset.dragging = \"\";\n document.body.style.cursor = copy ? \"copy\" : \"grabbing\";\n document.body.style.userSelect = \"none\";\n createCarry();\n // Armed with the GESTURE, not the press: a press that never travels far\n // enough strands no overlay, no body style and no listener.\n window.addEventListener(\"blur\", onWindowBlur);\n };\n\n // Idempotent. pointerup, pointercancel, Escape, window blur and the panel's\n // own teardown can all race; whichever lands first wins and the rest no-op.\n const cleanup = () => {\n if (finished) return;\n finished = true;\n activeCancels.delete(cancel);\n window.removeEventListener(\"pointermove\", onPointerMove);\n window.removeEventListener(\"pointerup\", onPointerUp);\n window.removeEventListener(\"pointercancel\", onPointerCancel);\n window.removeEventListener(\"keydown\", onKeyDown, true);\n window.removeEventListener(\"keyup\", onKeyUp, true);\n window.removeEventListener(\"blur\", onWindowBlur);\n surface?.viewport?.removeEventListener(\"scroll\", onViewportScroll);\n if (touchTimer) clearTimeout(touchTimer);\n if (rafScroll) cancelAnimationFrame(rafScroll);\n if (surface) paint(surface, null);\n delete source.dataset.dragging;\n delete source.dataset.dropNoop;\n carryEl?.remove();\n carryEl = null;\n badgeEl = null;\n document.body.style.cursor = \"\";\n document.body.style.userSelect = \"\";\n };\n\n /** A bare teardown: nothing is committed until release, so no snapshot. */\n const cancel = () => {\n if (active) lastDragEndedAt = performance.now();\n cleanup();\n };\n\n const onWindowBlur = () => cancel();\n\n const onKeyDown = (e: KeyboardEvent) => {\n if (e.key === \"Escape\" && active) {\n // Stopped, or the popover the builder may be living in closes underneath\n // the gesture and takes the panel the drop was aimed at with it.\n e.stopPropagation();\n e.preventDefault();\n cancel();\n return;\n }\n if (e.key === \"Alt\") setCopy(true);\n };\n\n // Alt tracked on its own keys too: reaching for the modifier without moving\n // the mouse fires no pointermove, and the badge has to appear regardless.\n const onKeyUp = (e: KeyboardEvent) => {\n if (e.key === \"Alt\") setCopy(false);\n };\n\n const onPointerMove = (e: PointerEvent) => {\n // A second finger must not drive or cancel the gesture this one started.\n if (e.pointerId !== pointerId) return;\n lastEvent = e;\n\n if (!active) {\n const distance = Math.hypot(e.clientX - startX, e.clientY - startY);\n if (isTouch) {\n // Past the tolerance the user is scrolling, so the press stays a scroll.\n if (distance > FILTER_DND_ACTIVATION.touchTolerancePx) cancel();\n return;\n }\n if (distance < FILTER_DND_ACTIVATION.moveDistancePx) return;\n activate();\n }\n\n setCopy(e.altKey);\n positionCarry(e.clientX, e.clientY);\n hitTest(e.clientX, e.clientY);\n autoScroll(e.clientY);\n };\n\n const onPointerUp = (e: PointerEvent) => {\n if (e.pointerId !== pointerId) return;\n const landed = active ? hit : null;\n const wasCopy = copy;\n cleanup();\n if (!active) return;\n\n lastDragEndedAt = performance.now();\n // The trailing click belongs to the gesture, not to whatever it ended over.\n window.addEventListener(\"click\", suppressTrailingClick, true);\n\n if (!landed) return;\n options.onDrop(nodeId, {\n parentId: landed.target.parentId,\n index: landed.target.index,\n copy: wasCopy,\n });\n };\n\n const onPointerCancel = (e: PointerEvent) => {\n if (e.pointerId !== pointerId) return;\n cancel();\n };\n\n window.addEventListener(\"pointermove\", onPointerMove);\n window.addEventListener(\"pointerup\", onPointerUp);\n window.addEventListener(\"pointercancel\", onPointerCancel);\n window.addEventListener(\"keydown\", onKeyDown, true);\n window.addEventListener(\"keyup\", onKeyUp, true);\n activeCancels.add(cancel);\n\n if (isTouch) {\n touchTimer = setTimeout(() => {\n activate();\n if (lastEvent) {\n positionCarry(lastEvent.clientX, lastEvent.clientY);\n hitTest(lastEvent.clientX, lastEvent.clientY);\n }\n }, FILTER_DND_ACTIVATION.touchDelayMs);\n }\n}\n\n/**\n * Only `onPointerDown`: the handle is a real button that Tab reaches, so it must\n * not also be `draggable` and race the browser's HTML5 drag, with its ghost, no\n * copy affordance and no way to report a drop into a nested target.\n */\nexport function useFilterRowDrag(options: FilterRowDragOptions) {\n // Read at gesture time, not captured at wiring time, so the handler identity\n // is stable and a memoized row never re-renders on a re-created callback.\n const latest = React.useRef(options);\n React.useEffect(() => {\n latest.current = options;\n });\n\n // A gesture outlives its row by design, but never the panel: its listeners\n // are on `window` and its carry on `document.body`.\n React.useEffect(() => cancelActiveFilterDrags, []);\n\n return React.useCallback(\n (nodeId: string) => ({\n onPointerDown: (event: React.PointerEvent<HTMLElement>) => {\n if (latest.current.disabled) return;\n // Primary button only: a right press strands the drag under a menu.\n if (event.button !== 0) return;\n startDrag(event, nodeId, latest.current);\n },\n }),\n [],\n );\n}\n"],"mappings":";;;;;;;;AASA,MAAa,wBAAwB;;CAEnC,gBAAgB;;CAEhB,cAAc;CACd,kBAAkB;CAClB,kBAAkB;CAClB,qBAAqB;;CAErB,sBAAsB;AACxB;;AAGA,MAAa,sBAAsB;;AAGnC,MAAa,4BAA4B;;AAGzC,MAAa,wBAAwB;AAsBrC,SAAS,SAAS,KAAoB,GAAW,GAAW,OAAO,GAAY;CAC7E,OAAO,KAAK,IAAI,QAAQ,KAAK,IAAI,SAAS,KAAK,IAAI,MAAM,QAAQ,KAAK,IAAI,SAAS;AACrF;;;;;;;;;;;;AAaA,MAAa,qBAAqB;;;;;;;AAQlC,SAAgB,kBACd,OACA,MACA,GACA,GACA,OAAA,GACgC;CAChC,IAAI,OAAiB;CACrB,KAAK,MAA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BAAuB,IAAI;EAE5D,IAAI,CAAC,QAAQ;EACb,QAAQ,OAAO,QAAQ;GACrB,UAAU,OAAO,OAAO;GACxB,OAAO,OAAO,OAAO;GACrB,MAAM;EACR,CAAC;CACH;CAEA,MAAM,mBAAmB,MAAoB;EAC3C,IAAI,EAAE,cAAc,WAAW;EAC/B,OAAO;CACT;CAEA,OAAO,iBAAiB,eAAe,aAAa;CACpD,OAAO,iBAAiB,aAAa,WAAW;CAChD,OAAO,iBAAiB,iBAAiB,eAAe;CACxD,OAAO,iBAAiB,WAAW,WAAW,IAAI;CAClD,OAAO,iBAAiB,SAAS,SAAS,IAAI;CAC9C,cAAc,IAAI,MAAM;CAExB,IAAI,SACF,aAAa,iBAAiB;EAC5B,SAAS;EACT,IAAI,WAAW;GACb,cAAc,UAAU,SAAS,UAAU,OAAO;GAClD,QAAQ,UAAU,SAAS,UAAU,OAAO;EAC9C;CACF,GAAG,sBAAsB,YAAY;AAEzC;;;;;;AAOA,SAAgB,iBAAiB,SAA+B;CAG9D,MAAM,SAAS,MAAM,OAAO,OAAO;CACnC,MAAM,gBAAgB;EACpB,OAAO,UAAU;CACnB,CAAC;CAID,MAAM,gBAAgB,yBAAyB,CAAC,CAAC;CAEjD,OAAO,MAAM,aACV,YAAoB,EACnB,gBAAgB,UAA2C;EACzD,IAAI,OAAO,QAAQ,UAAU;EAE7B,IAAI,MAAM,WAAW,GAAG;EACxB,UAAU,OAAO,QAAQ,OAAO,OAAO;CACzC,EACF,IACA,CAAC,CACH;AACF"}
@@ -1,2 +1,2 @@
1
- import { i as isFilterDraftCommittable, n as createFilterDraft, r as filterDraftReducer, t as FilterDraftAction } from "../../../filters-draft-COwwppZX.js";
1
+ import { i as isFilterDraftCommittable, n as createFilterDraft, r as filterDraftReducer, t as FilterDraftAction } from "../../../filters-draft-b-BwSZb1.js";
2
2
  export { FilterDraftAction, createFilterDraft, filterDraftReducer, isFilterDraftCommittable };
@@ -1,5 +1,5 @@
1
+ import * as React from "react";
1
2
  import { AnyFilterEditor, FilterEditorProps, FilterEditorRegistry, FilterField, FilterLabels, FilterOperator, FilterOptionsState } from "./filters-types.js";
2
- import * as React$1 from "react";
3
3
  /**
4
4
  * The shared option service every option-backed editor receives: debouncing,
5
5
  * aborting, cursor paging and value-to-label resolution. A deliberate fork of
@@ -14,14 +14,14 @@ export declare function useFilterOptions<V, O>(field: FilterField<V, O> | undefi
14
14
  * an omitted id asked, so only a REJECTED resolve lets a later mount retry.
15
15
  */
16
16
  export declare function useFilterValueResolution<V, O>(field: FilterField<V, O> | undefined, values: readonly unknown[]): void;
17
- export declare function FilterTextEditor<V, O>({ value, onValueChange, commit, cancel, autoFocusProps, labels, host, field }: FilterEditorProps<V, O>): React$1.JSX.Element;
18
- export declare function FilterNumberEditor<V, O>({ value, onValueChange, commit, cancel, autoFocusProps, labels, host, field }: FilterEditorProps<V, O>): React$1.JSX.Element;
19
- export declare function FilterRangeEditor<V, O>({ value, onValueChange, commit, cancel, autoFocusProps, labels, host, field }: FilterEditorProps<V, O>): React$1.JSX.Element;
17
+ export declare function FilterTextEditor<V, O>({ value, onValueChange, commit, cancel, autoFocusProps, labels, host, field }: FilterEditorProps<V, O>): React.JSX.Element;
18
+ export declare function FilterNumberEditor<V, O>({ value, onValueChange, commit, cancel, autoFocusProps, labels, host, field }: FilterEditorProps<V, O>): React.JSX.Element;
19
+ export declare function FilterRangeEditor<V, O>({ value, onValueChange, commit, cancel, autoFocusProps, labels, host, field }: FilterEditorProps<V, O>): React.JSX.Element;
20
20
  /** One row. The shape both the operator menu and the option editors hand over. */
21
21
  export interface FilterListItem {
22
22
  value: string;
23
23
  label: string;
24
- icon?: React$1.ReactNode;
24
+ icon?: React.ReactNode;
25
25
  description?: string;
26
26
  keywords?: string[];
27
27
  disabled?: boolean;
@@ -74,10 +74,10 @@ export interface FilterMenuProps {
74
74
  * brings the typeahead, RTL handling and live region with it. Only the pinning
75
75
  * and the paging affordance stay out here.
76
76
  */
77
- export declare function FilterMenu({ items, selected, multiple, onSelectionChange, labels, ariaLabel, searchPlaceholder, searchable, maxHeight, pinSelected, sortSelected, preFiltered, autoFocusProps, query, onQueryChange, state }: FilterMenuProps): React$1.JSX.Element;
78
- export declare function FilterSelectEditor<V, O>(props: FilterEditorProps<V, O>): React$1.JSX.Element;
79
- export declare function FilterMultiSelectEditor<V, O>(props: FilterEditorProps<V, O>): React$1.JSX.Element;
80
- export declare function FilterBooleanEditor<V, O>({ value, onValueChange, commit, labels, autoFocusProps, field }: FilterEditorProps<V, O>): React$1.JSX.Element;
77
+ export declare function FilterMenu({ items, selected, multiple, onSelectionChange, labels, ariaLabel, searchPlaceholder, searchable, maxHeight, pinSelected, sortSelected, preFiltered, autoFocusProps, query, onQueryChange, state }: FilterMenuProps): React.JSX.Element;
78
+ export declare function FilterSelectEditor<V, O>(props: FilterEditorProps<V, O>): React.JSX.Element;
79
+ export declare function FilterMultiSelectEditor<V, O>(props: FilterEditorProps<V, O>): React.JSX.Element;
80
+ export declare function FilterBooleanEditor<V, O>({ value, onValueChange, commit, labels, autoFocusProps, field }: FilterEditorProps<V, O>): React.JSX.Element;
81
81
  export declare const DEFAULT_FILTER_EDITORS: FilterEditorRegistry;
82
82
  /**
83
83
  * Picks the editor for a (field, operator) pair: the field's own `editor`, then
@@ -1 +1 @@
1
- {"version":3,"file":"filters-editors.d.ts","names":["React"],"sources":["../../../../src/components/reui/filters/filters-editors.tsx"],"mappings":";;;;;;;;;wBAgGgB,iBAAiB,GAAG,GAClC,OAAO,YAAY,GAAG,gBACtB,kBACA,sBACC,mBAAmB;;;;;;wBAoJN,yBAAyB,GAAG,GAC1C,OAAO,YAAY,GAAG,gBACtB;wBAuJc,iBAAiB,GAAG,KAClC,OACA,eACA,QACA,QACA,gBACA,QACA,MACA,SACC,kBAAkB,GAAG,KAAEA,QAAA,IAAA;wBA+BV,mBAAmB,GAAG,KACpC,OACA,eACA,QACA,QACA,gBACA,QACA,MACA,SACC,kBAAkB,GAAG,KAAEA,QAAA,IAAA;wBA2BV,kBAAkB,GAAG,KACnC,OACA,eACA,QACA,QACA,gBACA,QACA,MACA,SACC,kBAAkB,GAAG,KAAEA,QAAA,IAAA;;iBAwCT;EACf;EACA;EACA,OAAOA,QAAM;EACb;EACA;EACA;;;;;;EAMA;;iBAyJe;EACf,OAAO;;EAEP;EACA;;EAEA,oBAAoB;EACpB,QAAQ;EACR;EACA;;EAEA;;;;;;EAMA;;;;;EAKA;;;;;EAKA;;EAEA;EACA,iBAAiB;;EAEjB;EACA,iBAAiB;EACjB,QAAQ,KAAK;;;;;;;;wBASC,aACd,OACA,UACA,UACA,mBACA,QACA,WACA,mBACA,YACA,WACA,aACA,cACA,aACA,gBACA,OACA,eACA,SACC,kBAAeA,QAAA,IAAA;wBA8YF,mBAAmB,GAAG,GAAG,OAAO,kBAAkB,GAAG,KAAEA,QAAA,IAAA;wBAIvD,wBAAwB,GAAG,GAAG,OAAO,kBAAkB,GAAG,KAAEA,QAAA,IAAA;wBAiB5D,oBAAoB,GAAG,KACrC,OACA,eACA,QACA,QACA,gBACA,SACC,kBAAkB,GAAG,KAAEA,QAAA,IAAA;qBAmCb,wBAAwB;;;;;;wBAcrB,oBAAoB,GAAG,GACrC,OAAO,YAAY,GAAG,IACtB,UAAU,4BACV,SAAS,uBACR"}
1
+ {"version":3,"file":"filters-editors.d.ts","names":[],"sources":["../../../../src/components/reui/filters/filters-editors.tsx"],"mappings":";;;;;;;;;wBAgGgB,iBAAiB,GAAG,GAClC,OAAO,YAAY,GAAG,gBACtB,kBACA,sBACC,mBAAmB;;;;;;wBAoJN,yBAAyB,GAAG,GAC1C,OAAO,YAAY,GAAG,gBACtB;wBAuJc,iBAAiB,GAAG,KAClC,OACA,eACA,QACA,QACA,gBACA,QACA,MACA,SACC,kBAAkB,GAAG,KAAE,MAAA,IAAA;wBA+BV,mBAAmB,GAAG,KACpC,OACA,eACA,QACA,QACA,gBACA,QACA,MACA,SACC,kBAAkB,GAAG,KAAE,MAAA,IAAA;wBA2BV,kBAAkB,GAAG,KACnC,OACA,eACA,QACA,QACA,gBACA,QACA,MACA,SACC,kBAAkB,GAAG,KAAE,MAAA,IAAA;;iBAwCT;EACf;EACA;EACA,OAAO,MAAM;EACb;EACA;EACA;;;;;;EAMA;;iBAyJe;EACf,OAAO;;EAEP;EACA;;EAEA,oBAAoB;EACpB,QAAQ;EACR;EACA;;EAEA;;;;;;EAMA;;;;;EAKA;;;;;EAKA;;EAEA;EACA,iBAAiB;;EAEjB;EACA,iBAAiB;EACjB,QAAQ,KAAK;;;;;;;;wBASC,aACd,OACA,UACA,UACA,mBACA,QACA,WACA,mBACA,YACA,WACA,aACA,cACA,aACA,gBACA,OACA,eACA,SACC,kBAAe,MAAA,IAAA;wBA8YF,mBAAmB,GAAG,GAAG,OAAO,kBAAkB,GAAG,KAAE,MAAA,IAAA;wBAIvD,wBAAwB,GAAG,GAAG,OAAO,kBAAkB,GAAG,KAAE,MAAA,IAAA;wBAiB5D,oBAAoB,GAAG,KACrC,OACA,eACA,QACA,QACA,gBACA,SACC,kBAAkB,GAAG,KAAE,MAAA,IAAA;qBAmCb,wBAAwB;;;;;;wBAcrB,oBAAoB,GAAG,GACrC,OAAO,YAAY,GAAG,IACtB,UAAU,4BACV,SAAS,uBACR"}