@constructive-io/ui 0.6.0 → 0.6.1

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 (414) hide show
  1. package/dist/button-D4vqTxhp.d.cts +20 -0
  2. package/dist/button-D4vqTxhp.d.ts +20 -0
  3. package/dist/components/alert-dialog.cjs +98 -302
  4. package/dist/components/alert-dialog.cjs.map +1 -1
  5. package/dist/components/alert-dialog.d.cts +22 -21
  6. package/dist/components/alert-dialog.d.ts +22 -21
  7. package/dist/components/alert-dialog.js +96 -281
  8. package/dist/components/alert-dialog.js.map +1 -1
  9. package/dist/components/alert.cjs +51 -108
  10. package/dist/components/alert.cjs.map +1 -1
  11. package/dist/components/alert.d.cts +13 -13
  12. package/dist/components/alert.d.ts +13 -13
  13. package/dist/components/alert.js +49 -87
  14. package/dist/components/alert.js.map +1 -1
  15. package/dist/components/app-bar.cjs +73 -359
  16. package/dist/components/app-bar.cjs.map +1 -1
  17. package/dist/components/app-bar.d.cts +21 -20
  18. package/dist/components/app-bar.d.ts +21 -20
  19. package/dist/components/app-bar.js +71 -338
  20. package/dist/components/app-bar.js.map +1 -1
  21. package/dist/components/app-shell.cjs +252 -1777
  22. package/dist/components/app-shell.cjs.map +1 -1
  23. package/dist/components/app-shell.d.cts +77 -85
  24. package/dist/components/app-shell.d.ts +77 -85
  25. package/dist/components/app-shell.js +249 -1756
  26. package/dist/components/app-shell.js.map +1 -1
  27. package/dist/components/autocomplete.cjs +146 -397
  28. package/dist/components/autocomplete.cjs.map +1 -1
  29. package/dist/components/autocomplete.d.cts +24 -24
  30. package/dist/components/autocomplete.d.ts +24 -24
  31. package/dist/components/autocomplete.js +146 -376
  32. package/dist/components/autocomplete.js.map +1 -1
  33. package/dist/components/avatar.cjs +26 -38
  34. package/dist/components/avatar.cjs.map +1 -1
  35. package/dist/components/avatar.d.cts +11 -10
  36. package/dist/components/avatar.d.ts +11 -10
  37. package/dist/components/avatar.js +24 -37
  38. package/dist/components/avatar.js.map +1 -1
  39. package/dist/components/badge.cjs +42 -60
  40. package/dist/components/badge.cjs.map +1 -1
  41. package/dist/components/badge.d.cts +13 -13
  42. package/dist/components/badge.d.ts +13 -13
  43. package/dist/components/badge.js +39 -38
  44. package/dist/components/badge.js.map +1 -1
  45. package/dist/components/breadcrumb.cjs +65 -94
  46. package/dist/components/breadcrumb.cjs.map +1 -1
  47. package/dist/components/breadcrumb.d.cts +14 -13
  48. package/dist/components/breadcrumb.d.ts +14 -13
  49. package/dist/components/breadcrumb.js +63 -73
  50. package/dist/components/breadcrumb.js.map +1 -1
  51. package/dist/components/button.cjs +68 -162
  52. package/dist/components/button.cjs.map +1 -1
  53. package/dist/components/button.d.cts +2 -20
  54. package/dist/components/button.d.ts +2 -20
  55. package/dist/components/button.js +65 -140
  56. package/dist/components/button.js.map +1 -1
  57. package/dist/components/calendar-rac.cjs +49 -62
  58. package/dist/components/calendar-rac.cjs.map +1 -1
  59. package/dist/components/calendar-rac.d.cts +8 -8
  60. package/dist/components/calendar-rac.d.ts +8 -8
  61. package/dist/components/calendar-rac.js +49 -61
  62. package/dist/components/calendar-rac.js.map +1 -1
  63. package/dist/components/card.cjs +61 -74
  64. package/dist/components/card.cjs.map +1 -1
  65. package/dist/components/card.d.cts +15 -16
  66. package/dist/components/card.d.ts +15 -16
  67. package/dist/components/card.js +58 -72
  68. package/dist/components/card.js.map +1 -1
  69. package/dist/components/checkbox-group.cjs +12 -11
  70. package/dist/components/checkbox-group.cjs.map +1 -1
  71. package/dist/components/checkbox-group.d.cts +5 -5
  72. package/dist/components/checkbox-group.d.ts +5 -5
  73. package/dist/components/checkbox-group.js +12 -10
  74. package/dist/components/checkbox-group.js.map +1 -1
  75. package/dist/components/checkbox.cjs +60 -114
  76. package/dist/components/checkbox.cjs.map +1 -1
  77. package/dist/components/checkbox.d.cts +6 -6
  78. package/dist/components/checkbox.d.ts +6 -6
  79. package/dist/components/checkbox.js +58 -93
  80. package/dist/components/checkbox.js.map +1 -1
  81. package/dist/components/collapsible.cjs +76 -113
  82. package/dist/components/collapsible.cjs.map +1 -1
  83. package/dist/components/collapsible.d.cts +16 -15
  84. package/dist/components/collapsible.d.ts +16 -15
  85. package/dist/components/collapsible.js +74 -92
  86. package/dist/components/collapsible.js.map +1 -1
  87. package/dist/components/combobox.cjs +213 -507
  88. package/dist/components/combobox.cjs.map +1 -1
  89. package/dist/components/combobox.d.cts +36 -35
  90. package/dist/components/combobox.d.ts +36 -35
  91. package/dist/components/combobox.js +229 -504
  92. package/dist/components/combobox.js.map +1 -1
  93. package/dist/components/command.cjs +102 -199
  94. package/dist/components/command.cjs.map +1 -1
  95. package/dist/components/command.d.cts +22 -21
  96. package/dist/components/command.d.ts +22 -21
  97. package/dist/components/command.js +100 -198
  98. package/dist/components/command.js.map +1 -1
  99. package/dist/components/dialog.cjs +110 -402
  100. package/dist/components/dialog.cjs.map +1 -1
  101. package/dist/components/dialog.d.cts +27 -26
  102. package/dist/components/dialog.d.ts +27 -26
  103. package/dist/components/dialog.js +107 -380
  104. package/dist/components/dialog.js.map +1 -1
  105. package/dist/components/dock.cjs +80 -111
  106. package/dist/components/dock.cjs.map +1 -1
  107. package/dist/components/dock.d.cts +25 -25
  108. package/dist/components/dock.d.ts +25 -25
  109. package/dist/components/dock.js +78 -106
  110. package/dist/components/dock.js.map +1 -1
  111. package/dist/components/drawer.cjs +77 -111
  112. package/dist/components/drawer.cjs.map +1 -1
  113. package/dist/components/drawer.d.cts +15 -14
  114. package/dist/components/drawer.d.ts +15 -14
  115. package/dist/components/drawer.js +75 -90
  116. package/dist/components/drawer.js.map +1 -1
  117. package/dist/components/dropdown-menu.cjs +163 -238
  118. package/dist/components/dropdown-menu.cjs.map +1 -1
  119. package/dist/components/dropdown-menu.d.cts +44 -43
  120. package/dist/components/dropdown-menu.d.ts +44 -43
  121. package/dist/components/dropdown-menu.js +161 -217
  122. package/dist/components/dropdown-menu.js.map +1 -1
  123. package/dist/components/empty.cjs +51 -85
  124. package/dist/components/empty.cjs.map +1 -1
  125. package/dist/components/empty.d.cts +13 -13
  126. package/dist/components/empty.d.ts +13 -13
  127. package/dist/components/empty.js +48 -83
  128. package/dist/components/empty.js.map +1 -1
  129. package/dist/components/field.cjs +150 -259
  130. package/dist/components/field.cjs.map +1 -1
  131. package/dist/components/field.d.cts +39 -39
  132. package/dist/components/field.d.ts +39 -39
  133. package/dist/components/field.js +148 -238
  134. package/dist/components/field.js.map +1 -1
  135. package/dist/components/flickering-grid.cjs +143 -166
  136. package/dist/components/flickering-grid.cjs.map +1 -1
  137. package/dist/components/flickering-grid.d.cts +14 -13
  138. package/dist/components/flickering-grid.d.ts +14 -13
  139. package/dist/components/flickering-grid.js +141 -161
  140. package/dist/components/flickering-grid.js.map +1 -1
  141. package/dist/components/flow-zoom-panel.cjs +56 -188
  142. package/dist/components/flow-zoom-panel.cjs.map +1 -1
  143. package/dist/components/flow-zoom-panel.d.cts +9 -9
  144. package/dist/components/flow-zoom-panel.d.ts +9 -9
  145. package/dist/components/flow-zoom-panel.js +56 -168
  146. package/dist/components/flow-zoom-panel.js.map +1 -1
  147. package/dist/components/form-control.cjs +58 -186
  148. package/dist/components/form-control.cjs.map +1 -1
  149. package/dist/components/form-control.d.cts +11 -10
  150. package/dist/components/form-control.d.ts +11 -10
  151. package/dist/components/form-control.js +56 -165
  152. package/dist/components/form-control.js.map +1 -1
  153. package/dist/components/form.cjs +78 -184
  154. package/dist/components/form.cjs.map +1 -1
  155. package/dist/components/form.d.cts +2 -36
  156. package/dist/components/form.d.ts +2 -36
  157. package/dist/components/form.js +76 -163
  158. package/dist/components/form.js.map +1 -1
  159. package/dist/components/input-group.cjs +51 -165
  160. package/dist/components/input-group.cjs.map +1 -1
  161. package/dist/components/input-group.d.cts +14 -15
  162. package/dist/components/input-group.d.ts +14 -15
  163. package/dist/components/input-group.js +51 -164
  164. package/dist/components/input-group.js.map +1 -1
  165. package/dist/components/input.cjs +30 -55
  166. package/dist/components/input.cjs.map +1 -1
  167. package/dist/components/input.d.cts +2 -10
  168. package/dist/components/input.d.ts +2 -10
  169. package/dist/components/input.js +30 -54
  170. package/dist/components/input.js.map +1 -1
  171. package/dist/components/json-input.cjs +133 -337
  172. package/dist/components/json-input.cjs.map +1 -1
  173. package/dist/components/json-input.d.cts +20 -19
  174. package/dist/components/json-input.d.ts +20 -19
  175. package/dist/components/json-input.js +132 -317
  176. package/dist/components/json-input.js.map +1 -1
  177. package/dist/components/label.cjs +19 -21
  178. package/dist/components/label.cjs.map +1 -1
  179. package/dist/components/label.d.cts +6 -5
  180. package/dist/components/label.d.ts +6 -5
  181. package/dist/components/label.js +17 -20
  182. package/dist/components/label.js.map +1 -1
  183. package/dist/components/motion-grid.cjs +61 -101
  184. package/dist/components/motion-grid.cjs.map +1 -1
  185. package/dist/components/motion-grid.d.cts +15 -14
  186. package/dist/components/motion-grid.d.ts +15 -14
  187. package/dist/components/motion-grid.js +59 -80
  188. package/dist/components/motion-grid.js.map +1 -1
  189. package/dist/components/multi-select.cjs +563 -786
  190. package/dist/components/multi-select.cjs.map +1 -1
  191. package/dist/components/multi-select.d.cts +173 -173
  192. package/dist/components/multi-select.d.ts +173 -173
  193. package/dist/components/multi-select.js +561 -765
  194. package/dist/components/multi-select.js.map +1 -1
  195. package/dist/components/page-header.cjs +24 -13
  196. package/dist/components/page-header.cjs.map +1 -1
  197. package/dist/components/page-header.d.cts +11 -11
  198. package/dist/components/page-header.d.ts +11 -11
  199. package/dist/components/page-header.js +23 -11
  200. package/dist/components/page-header.js.map +1 -1
  201. package/dist/components/pagination.cjs +72 -272
  202. package/dist/components/pagination.cjs.map +1 -1
  203. package/dist/components/pagination.d.cts +15 -16
  204. package/dist/components/pagination.d.ts +15 -16
  205. package/dist/components/pagination.js +69 -250
  206. package/dist/components/pagination.js.map +1 -1
  207. package/dist/components/popover.cjs +68 -111
  208. package/dist/components/popover.cjs.map +1 -1
  209. package/dist/components/popover.d.cts +31 -30
  210. package/dist/components/popover.d.ts +31 -30
  211. package/dist/components/popover.js +66 -90
  212. package/dist/components/popover.js.map +1 -1
  213. package/dist/components/portal.cjs +128 -81
  214. package/dist/components/portal.cjs.map +1 -1
  215. package/dist/components/portal.d.cts +24 -23
  216. package/dist/components/portal.d.ts +24 -23
  217. package/dist/components/portal.js +126 -60
  218. package/dist/components/portal.js.map +1 -1
  219. package/dist/components/progress.cjs +23 -24
  220. package/dist/components/progress.cjs.map +1 -1
  221. package/dist/components/progress.d.cts +8 -7
  222. package/dist/components/progress.d.ts +8 -7
  223. package/dist/components/progress.js +21 -23
  224. package/dist/components/progress.js.map +1 -1
  225. package/dist/components/progressive-blur-scroll-container.cjs +70 -138
  226. package/dist/components/progressive-blur-scroll-container.cjs.map +1 -1
  227. package/dist/components/progressive-blur-scroll-container.d.cts +19 -19
  228. package/dist/components/progressive-blur-scroll-container.d.ts +19 -19
  229. package/dist/components/progressive-blur-scroll-container.js +70 -137
  230. package/dist/components/progressive-blur-scroll-container.js.map +1 -1
  231. package/dist/components/progressive-blur.cjs +40 -64
  232. package/dist/components/progressive-blur.cjs.map +1 -1
  233. package/dist/components/progressive-blur.d.cts +15 -14
  234. package/dist/components/progressive-blur.d.ts +15 -14
  235. package/dist/components/progressive-blur.js +38 -63
  236. package/dist/components/progressive-blur.js.map +1 -1
  237. package/dist/components/radio-group.cjs +28 -42
  238. package/dist/components/radio-group.cjs.map +1 -1
  239. package/dist/components/radio-group.d.cts +8 -8
  240. package/dist/components/radio-group.d.ts +8 -8
  241. package/dist/components/radio-group.js +28 -41
  242. package/dist/components/radio-group.js.map +1 -1
  243. package/dist/components/record-picker.cjs +6 -418
  244. package/dist/components/record-picker.d.cts +13 -13
  245. package/dist/components/record-picker.d.ts +13 -13
  246. package/dist/components/record-picker.js +5 -397
  247. package/dist/components/resizable.cjs +32 -58
  248. package/dist/components/resizable.cjs.map +1 -1
  249. package/dist/components/resizable.d.cts +10 -9
  250. package/dist/components/resizable.d.ts +10 -9
  251. package/dist/components/resizable.js +29 -37
  252. package/dist/components/resizable.js.map +1 -1
  253. package/dist/components/responsive-diagram.cjs +50 -61
  254. package/dist/components/responsive-diagram.cjs.map +1 -1
  255. package/dist/components/responsive-diagram.d.cts +7 -7
  256. package/dist/components/responsive-diagram.d.ts +7 -7
  257. package/dist/components/responsive-diagram.js +50 -60
  258. package/dist/components/responsive-diagram.js.map +1 -1
  259. package/dist/components/scroll-area.cjs +37 -83
  260. package/dist/components/scroll-area.cjs.map +1 -1
  261. package/dist/components/scroll-area.d.cts +9 -8
  262. package/dist/components/scroll-area.d.ts +9 -8
  263. package/dist/components/scroll-area.js +35 -62
  264. package/dist/components/scroll-area.js.map +1 -1
  265. package/dist/components/select.cjs +175 -300
  266. package/dist/components/select.cjs.map +1 -1
  267. package/dist/components/select.d.cts +36 -35
  268. package/dist/components/select.d.ts +36 -35
  269. package/dist/components/select.js +172 -278
  270. package/dist/components/select.js.map +1 -1
  271. package/dist/components/separator.cjs +16 -19
  272. package/dist/components/separator.cjs.map +1 -1
  273. package/dist/components/separator.d.cts +2 -10
  274. package/dist/components/separator.d.ts +2 -10
  275. package/dist/components/separator.js +14 -18
  276. package/dist/components/separator.js.map +1 -1
  277. package/dist/components/sheet.cjs +17 -487
  278. package/dist/components/sheet.d.cts +85 -85
  279. package/dist/components/sheet.d.ts +85 -85
  280. package/dist/components/sheet.js +3 -453
  281. package/dist/components/sidebar.cjs +27 -1298
  282. package/dist/components/sidebar.d.cts +62 -65
  283. package/dist/components/sidebar.d.ts +62 -65
  284. package/dist/components/sidebar.js +3 -1254
  285. package/dist/components/skeleton.cjs +18 -30
  286. package/dist/components/skeleton.cjs.map +1 -1
  287. package/dist/components/skeleton.d.cts +6 -5
  288. package/dist/components/skeleton.d.ts +6 -5
  289. package/dist/components/skeleton.js +15 -28
  290. package/dist/components/skeleton.js.map +1 -1
  291. package/dist/components/sonner.cjs +17 -19
  292. package/dist/components/sonner.cjs.map +1 -1
  293. package/dist/components/sonner.d.cts +7 -7
  294. package/dist/components/sonner.d.ts +7 -7
  295. package/dist/components/sonner.js +17 -18
  296. package/dist/components/sonner.js.map +1 -1
  297. package/dist/components/stack/index.cjs +43 -1515
  298. package/dist/components/stack/index.d.cts +2 -672
  299. package/dist/components/stack/index.d.ts +2 -672
  300. package/dist/components/stack/index.js +3 -1455
  301. package/dist/components/stepper.cjs +131 -285
  302. package/dist/components/stepper.cjs.map +1 -1
  303. package/dist/components/stepper.d.cts +27 -26
  304. package/dist/components/stepper.d.ts +27 -26
  305. package/dist/components/stepper.js +130 -265
  306. package/dist/components/stepper.js.map +1 -1
  307. package/dist/components/switch.cjs +21 -32
  308. package/dist/components/switch.cjs.map +1 -1
  309. package/dist/components/switch.d.cts +7 -6
  310. package/dist/components/switch.d.ts +7 -6
  311. package/dist/components/switch.js +19 -31
  312. package/dist/components/switch.js.map +1 -1
  313. package/dist/components/table.cjs +58 -106
  314. package/dist/components/table.cjs.map +1 -1
  315. package/dist/components/table.d.cts +17 -16
  316. package/dist/components/table.d.ts +17 -16
  317. package/dist/components/table.js +55 -104
  318. package/dist/components/table.js.map +1 -1
  319. package/dist/components/tabs.cjs +31 -35
  320. package/dist/components/tabs.cjs.map +1 -1
  321. package/dist/components/tabs.d.cts +9 -8
  322. package/dist/components/tabs.d.ts +9 -8
  323. package/dist/components/tabs.js +29 -34
  324. package/dist/components/tabs.js.map +1 -1
  325. package/dist/components/tags.cjs +114 -433
  326. package/dist/components/tags.cjs.map +1 -1
  327. package/dist/components/tags.d.cts +24 -28
  328. package/dist/components/tags.d.ts +24 -28
  329. package/dist/components/tags.js +114 -413
  330. package/dist/components/tags.js.map +1 -1
  331. package/dist/components/textarea.cjs +27 -49
  332. package/dist/components/textarea.cjs.map +1 -1
  333. package/dist/components/textarea.d.cts +8 -7
  334. package/dist/components/textarea.d.ts +8 -7
  335. package/dist/components/textarea.js +27 -48
  336. package/dist/components/textarea.js.map +1 -1
  337. package/dist/components/toast/index.cjs +9 -612
  338. package/dist/components/toast/index.d.cts +2 -52
  339. package/dist/components/toast/index.d.ts +2 -52
  340. package/dist/components/toast/index.js +3 -586
  341. package/dist/components/tooltip.cjs +47 -72
  342. package/dist/components/tooltip.cjs.map +1 -1
  343. package/dist/components/tooltip.d.cts +2 -28
  344. package/dist/components/tooltip.d.ts +2 -28
  345. package/dist/components/tooltip.js +45 -51
  346. package/dist/components/tooltip.js.map +1 -1
  347. package/dist/components/unlink-button.cjs +19 -192
  348. package/dist/components/unlink-button.cjs.map +1 -1
  349. package/dist/components/unlink-button.d.cts +11 -11
  350. package/dist/components/unlink-button.d.ts +11 -11
  351. package/dist/components/unlink-button.js +18 -170
  352. package/dist/components/unlink-button.js.map +1 -1
  353. package/dist/form-DgRTv7O7.d.ts +54 -0
  354. package/dist/form-DoZEWSzb.d.cts +54 -0
  355. package/dist/index-CjA4CENl.d.cts +684 -0
  356. package/dist/index-CjA4CENl.d.ts +684 -0
  357. package/dist/index-UnM04j0t.d.cts +58 -0
  358. package/dist/index-UnM04j0t.d.ts +58 -0
  359. package/dist/index.cjs +408 -8697
  360. package/dist/index.d.cts +224 -2136
  361. package/dist/index.d.ts +224 -2136
  362. package/dist/index.js +65 -8350
  363. package/dist/input-CBrCuMH8.d.cts +11 -0
  364. package/dist/input-CBrCuMH8.d.ts +11 -0
  365. package/dist/motion-config-COCFHq1L.cjs +271 -0
  366. package/dist/motion-config-COCFHq1L.cjs.map +1 -0
  367. package/dist/motion-config-COsZ6azM.js +241 -0
  368. package/dist/motion-config-COsZ6azM.js.map +1 -0
  369. package/dist/record-picker-BbxngCeV.js +162 -0
  370. package/dist/record-picker-BbxngCeV.js.map +1 -0
  371. package/dist/record-picker-Bz4FApxD.cjs +167 -0
  372. package/dist/record-picker-Bz4FApxD.cjs.map +1 -0
  373. package/dist/rolldown-runtime-D_qnwXdH.cjs +35 -0
  374. package/dist/separator-BQEsr0Rc.d.cts +11 -0
  375. package/dist/separator-BQEsr0Rc.d.ts +11 -0
  376. package/dist/sheet-BLHnhLRH.js +425 -0
  377. package/dist/sheet-BLHnhLRH.js.map +1 -0
  378. package/dist/sheet-BdA0rfIz.cjs +515 -0
  379. package/dist/sheet-BdA0rfIz.cjs.map +1 -0
  380. package/dist/sidebar-CPy_fibW.cjs +608 -0
  381. package/dist/sidebar-CPy_fibW.cjs.map +1 -0
  382. package/dist/sidebar-Cfax0g0_.js +463 -0
  383. package/dist/sidebar-Cfax0g0_.js.map +1 -0
  384. package/dist/slot-C-jEfihz.cjs +122 -0
  385. package/dist/slot-C-jEfihz.cjs.map +1 -0
  386. package/dist/slot-EL8zfLG0.js +97 -0
  387. package/dist/slot-EL8zfLG0.js.map +1 -0
  388. package/dist/stack-DKdvlOM6.cjs +1771 -0
  389. package/dist/stack-DKdvlOM6.cjs.map +1 -0
  390. package/dist/stack-jMdxDrex.js +1531 -0
  391. package/dist/stack-jMdxDrex.js.map +1 -0
  392. package/dist/toast-D6MqijT2.cjs +316 -0
  393. package/dist/toast-D6MqijT2.cjs.map +1 -0
  394. package/dist/toast-D_BOLzm3.js +287 -0
  395. package/dist/toast-D_BOLzm3.js.map +1 -0
  396. package/dist/tooltip-CTRQoN1A.d.cts +29 -0
  397. package/dist/tooltip-CTRQoN1A.d.ts +29 -0
  398. package/dist/utils-BkMLyah9.js +12 -0
  399. package/dist/utils-BkMLyah9.js.map +1 -0
  400. package/dist/utils-CzTQ3-VI.cjs +17 -0
  401. package/dist/utils-CzTQ3-VI.cjs.map +1 -0
  402. package/package.json +5 -5
  403. package/dist/components/record-picker.cjs.map +0 -1
  404. package/dist/components/record-picker.js.map +0 -1
  405. package/dist/components/sheet.cjs.map +0 -1
  406. package/dist/components/sheet.js.map +0 -1
  407. package/dist/components/sidebar.cjs.map +0 -1
  408. package/dist/components/sidebar.js.map +0 -1
  409. package/dist/components/stack/index.cjs.map +0 -1
  410. package/dist/components/stack/index.js.map +0 -1
  411. package/dist/components/toast/index.cjs.map +0 -1
  412. package/dist/components/toast/index.js.map +0 -1
  413. package/dist/index.cjs.map +0 -1
  414. package/dist/index.js.map +0 -1
@@ -1,10 +1,11 @@
1
- import * as React from 'react';
2
-
3
- type LabelProps = React.ComponentProps<'label'>;
1
+ import * as React$1 from "react";
2
+ //#region src/components/label.d.ts
3
+ type LabelProps = React$1.ComponentProps<'label'>;
4
4
  /**
5
5
  * Label component for form controls.
6
6
  * Uses a standard HTML label element for maximum compatibility.
7
7
  */
8
- declare function Label({ className, ...props }: LabelProps): React.JSX.Element;
9
-
8
+ declare function Label({ className, ...props }: LabelProps): React$1.JSX.Element;
9
+ //#endregion
10
10
  export { Label, type LabelProps };
11
+ //# sourceMappingURL=label.d.cts.map
@@ -1,10 +1,11 @@
1
- import * as React from 'react';
2
-
3
- type LabelProps = React.ComponentProps<'label'>;
1
+ import * as React$1 from "react";
2
+ //#region src/components/label.d.ts
3
+ type LabelProps = React$1.ComponentProps<'label'>;
4
4
  /**
5
5
  * Label component for form controls.
6
6
  * Uses a standard HTML label element for maximum compatibility.
7
7
  */
8
- declare function Label({ className, ...props }: LabelProps): React.JSX.Element;
9
-
8
+ declare function Label({ className, ...props }: LabelProps): React$1.JSX.Element;
9
+ //#endregion
10
10
  export { Label, type LabelProps };
11
+ //# sourceMappingURL=label.d.ts.map
@@ -1,27 +1,24 @@
1
- "use client";
2
- import { clsx } from 'clsx';
3
- import { twMerge } from 'tailwind-merge';
4
- import { jsx } from 'react/jsx-runtime';
1
+ 'use client';
5
2
 
6
- function cn(...inputs) {
7
- return twMerge(clsx(inputs));
8
- }
3
+ import { t as cn } from "../utils-BkMLyah9.js";
4
+ import "react";
5
+ import { jsx } from "react/jsx-runtime";
6
+
7
+ //#region src/components/label.tsx
8
+ /**
9
+ * Label component for form controls.
10
+ * Uses a standard HTML label element for maximum compatibility.
11
+ */
9
12
  function Label({ className, ...props }) {
10
- return /* @__PURE__ */ jsx(
11
- "label",
12
- {
13
- "data-slot": "label",
14
- className: cn(
15
- `text-foreground text-sm leading-4 font-medium select-none group-data-[disabled=true]:pointer-events-none
13
+ return /* @__PURE__ */ jsx("label", {
14
+ "data-slot": "label",
15
+ className: cn(`text-foreground text-sm leading-4 font-medium select-none group-data-[disabled=true]:pointer-events-none
16
16
  group-data-[disabled=true]:opacity-50 peer-disabled:cursor-not-allowed peer-disabled:opacity-50
17
- data-[disabled]:pointer-events-none data-[disabled]:opacity-50`,
18
- className
19
- ),
20
- ...props
21
- }
22
- );
17
+ data-[disabled]:pointer-events-none data-[disabled]:opacity-50`, className),
18
+ ...props
19
+ });
23
20
  }
24
21
 
22
+ //#endregion
25
23
  export { Label };
26
- //# sourceMappingURL=label.js.map
27
24
  //# sourceMappingURL=label.js.map
@@ -1 +1 @@
1
- {"version":3,"sources":["../../src/lib/utils.ts","../../src/components/label.tsx"],"names":[],"mappings":";;;;AAGO,SAAS,MAAM,MAAA,EAAsB;AAC1C,EAAA,OAAO,OAAA,CAAQ,IAAA,CAAK,MAAM,CAAC,CAAA;AAC7B;ACOA,SAAS,KAAA,CAAM,EAAE,SAAA,EAAW,GAAG,OAAM,EAAe;AACnD,EAAA,uBACC,GAAA;AAAA,IAAC,OAAA;AAAA,IAAA;AAAA,MACA,WAAA,EAAU,OAAA;AAAA,MACV,SAAA,EAAW,EAAA;AAAA,QACV,CAAA;AAAA;AAAA,kEAAA,CAAA;AAAA,QAGA;AAAA,OACD;AAAA,MACC,GAAG;AAAA;AAAA,GACL;AAEF","file":"label.js","sourcesContent":["import { clsx, type ClassValue } from 'clsx';\nimport { twMerge } from 'tailwind-merge';\n\nexport function cn(...inputs: ClassValue[]) {\n return twMerge(clsx(inputs));\n}\n","'use client';\n\nimport * as React from 'react';\n\nimport { cn } from '../lib/utils';\n\ntype LabelProps = React.ComponentProps<'label'>;\n\n/**\n * Label component for form controls.\n * Uses a standard HTML label element for maximum compatibility.\n */\nfunction Label({ className, ...props }: LabelProps) {\n\treturn (\n\t\t<label\n\t\t\tdata-slot=\"label\"\n\t\t\tclassName={cn(\n\t\t\t\t`text-foreground text-sm leading-4 font-medium select-none group-data-[disabled=true]:pointer-events-none\n\t\t\t\tgroup-data-[disabled=true]:opacity-50 peer-disabled:cursor-not-allowed peer-disabled:opacity-50\n\t\t\t\tdata-[disabled]:pointer-events-none data-[disabled]:opacity-50`,\n\t\t\t\tclassName,\n\t\t\t)}\n\t\t\t{...props}\n\t\t/>\n\t);\n}\n\nexport { Label };\nexport type { LabelProps };\n"]}
1
+ {"version":3,"file":"label.js","names":[],"sources":["../../src/components/label.tsx"],"sourcesContent":["'use client';\n\nimport * as React from 'react';\n\nimport { cn } from '../lib/utils';\n\ntype LabelProps = React.ComponentProps<'label'>;\n\n/**\n * Label component for form controls.\n * Uses a standard HTML label element for maximum compatibility.\n */\nfunction Label({ className, ...props }: LabelProps) {\n\treturn (\n\t\t<label\n\t\t\tdata-slot=\"label\"\n\t\t\tclassName={cn(\n\t\t\t\t`text-foreground text-sm leading-4 font-medium select-none group-data-[disabled=true]:pointer-events-none\n\t\t\t\tgroup-data-[disabled=true]:opacity-50 peer-disabled:cursor-not-allowed peer-disabled:opacity-50\n\t\t\t\tdata-[disabled]:pointer-events-none data-[disabled]:opacity-50`,\n\t\t\t\tclassName,\n\t\t\t)}\n\t\t\t{...props}\n\t\t/>\n\t);\n}\n\nexport { Label };\nexport type { LabelProps };\n"],"mappings":";;;;;;;;;;;AAYA,SAAS,MAAM,EAAE,WAAW,GAAG,SAAqB;CACnD,OACC,oBAAC,SAAD;EACC,aAAU;EACV,WAAW,GACV;;qEAGA,SACD;EACA,GAAI;CACJ;AAEH"}
@@ -1,108 +1,68 @@
1
- "use client";
2
- 'use strict';
1
+ 'use client';
3
2
 
4
- var React = require('react');
5
- var react = require('motion/react');
6
- var clsx = require('clsx');
7
- var tailwindMerge = require('tailwind-merge');
8
- var jsxRuntime = require('react/jsx-runtime');
3
+ Object.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });
4
+ const require_rolldown_runtime = require('../rolldown-runtime-D_qnwXdH.cjs');
5
+ const require_utils = require('../utils-CzTQ3-VI.cjs');
6
+ const require_motion_config = require('../motion-config-COCFHq1L.cjs');
7
+ let react = require("react");
8
+ react = require_rolldown_runtime.__toESM(react, 1);
9
+ let react_jsx_runtime = require("react/jsx-runtime");
10
+ let motion_react = require("motion/react");
9
11
 
10
- function _interopNamespace(e) {
11
- if (e && e.__esModule) return e;
12
- var n = Object.create(null);
13
- if (e) {
14
- Object.keys(e).forEach(function (k) {
15
- if (k !== 'default') {
16
- var d = Object.getOwnPropertyDescriptor(e, k);
17
- Object.defineProperty(n, k, d.get ? d : {
18
- enumerable: true,
19
- get: function () { return e[k]; }
20
- });
21
- }
22
- });
23
- }
24
- n.default = e;
25
- return Object.freeze(n);
26
- }
27
-
28
- var React__namespace = /*#__PURE__*/_interopNamespace(React);
29
-
30
- // src/lib/motion/motion-config.ts
31
- var easings = {
32
- /** Smooth both ways - good for hover states and toggles */
33
- easeInOut: [0.42, 0, 0.58, 1]};
34
- function cn(...inputs) {
35
- return tailwindMerge.twMerge(clsx.clsx(inputs));
36
- }
37
- var MotionGrid = ({
38
- gridSize,
39
- duration = 200,
40
- animate = true,
41
- cellClassName,
42
- cellProps,
43
- cellActiveClassName,
44
- cellInactiveClassName,
45
- className,
46
- style,
47
- ...props
48
- }) => {
49
- const [cols, rows] = gridSize;
50
- const frames = useLoadingFrames(cols, rows);
51
- const [index, setIndex] = React__namespace.useState(0);
52
- const intervalRef = React__namespace.useRef(null);
53
- const prefersReducedMotion = react.useReducedMotion();
54
- const shouldAnimate = animate && !prefersReducedMotion;
55
- React__namespace.useEffect(() => {
56
- if (!shouldAnimate || frames.length === 0) {
57
- setIndex(0);
58
- return;
59
- }
60
- intervalRef.current = setInterval(() => setIndex((i) => (i + 1) % frames.length), duration);
61
- return () => clearInterval(intervalRef.current);
62
- }, [frames.length, duration, shouldAnimate]);
63
- const active = new Set(frames[index]?.map(([x, y]) => y * cols + x) ?? []);
64
- return /* @__PURE__ */ jsxRuntime.jsx(
65
- "div",
66
- {
67
- className: cn("grid w-fit gap-0.5", className),
68
- style: {
69
- ...style,
70
- gridTemplateColumns: `repeat(${cols}, minmax(0, 1fr))`,
71
- gridAutoRows: "1fr"
72
- },
73
- ...props,
74
- children: Array.from({ length: cols * rows }).map((_, i) => /* @__PURE__ */ jsxRuntime.jsx(
75
- react.motion.div,
76
- {
77
- className: cn(
78
- "aspect-square size-3 rounded-full",
79
- active.has(i) ? cn("bg-primary scale-110", cellActiveClassName) : cn("bg-muted scale-100", cellInactiveClassName),
80
- cellClassName
81
- ),
82
- ...cellProps,
83
- transition: prefersReducedMotion ? { duration: 0 } : { duration: duration / 1e3, ease: easings.easeInOut }
84
- },
85
- i
86
- ))
87
- }
88
- );
12
+ //#region src/components/motion-grid.tsx
13
+ const MotionGrid = ({ gridSize, duration = 200, animate = true, cellClassName, cellProps, cellActiveClassName, cellInactiveClassName, className, style, ...props }) => {
14
+ const [cols, rows] = gridSize;
15
+ const frames = useLoadingFrames(cols, rows);
16
+ const [index, setIndex] = react.useState(0);
17
+ const intervalRef = react.useRef(null);
18
+ const prefersReducedMotion = (0, motion_react.useReducedMotion)();
19
+ const shouldAnimate = animate && !prefersReducedMotion;
20
+ react.useEffect(() => {
21
+ if (!shouldAnimate || frames.length === 0) {
22
+ setIndex(0);
23
+ return;
24
+ }
25
+ intervalRef.current = setInterval(() => setIndex((i) => (i + 1) % frames.length), duration);
26
+ return () => clearInterval(intervalRef.current);
27
+ }, [
28
+ frames.length,
29
+ duration,
30
+ shouldAnimate
31
+ ]);
32
+ const active = new Set(frames[index]?.map(([x, y]) => y * cols + x) ?? []);
33
+ return /* @__PURE__ */ (0, react_jsx_runtime.jsx)("div", {
34
+ className: require_utils.cn("grid w-fit gap-0.5", className),
35
+ style: {
36
+ ...style,
37
+ gridTemplateColumns: `repeat(${cols}, minmax(0, 1fr))`,
38
+ gridAutoRows: "1fr"
39
+ },
40
+ ...props,
41
+ children: Array.from({ length: cols * rows }).map((_, i) => /* @__PURE__ */ (0, react_jsx_runtime.jsx)(motion_react.motion.div, {
42
+ className: require_utils.cn("aspect-square size-3 rounded-full", active.has(i) ? require_utils.cn("bg-primary scale-110", cellActiveClassName) : require_utils.cn("bg-muted scale-100", cellInactiveClassName), cellClassName),
43
+ ...cellProps,
44
+ transition: prefersReducedMotion ? { duration: 0 } : {
45
+ duration: duration / 1e3,
46
+ ease: require_motion_config.easings.easeInOut
47
+ }
48
+ }, i))
49
+ });
89
50
  };
90
- var useLoadingFrames = (cols = 8, rows = 4) => {
91
- const loadingFrames = React__namespace.useMemo(() => {
92
- const frames = [];
93
- for (let s = 0; s < cols + rows; s++) {
94
- const dots = [];
95
- for (let y = 0; y < rows; y++) {
96
- const x = s - y;
97
- if (x >= 0 && x < cols) dots.push([x, y]);
98
- }
99
- frames.push(dots);
100
- }
101
- return frames;
102
- }, [cols, rows]);
103
- return loadingFrames;
51
+ const useLoadingFrames = (cols = 8, rows = 4) => {
52
+ return react.useMemo(() => {
53
+ const frames = [];
54
+ for (let s = 0; s < cols + rows; s++) {
55
+ const dots = [];
56
+ for (let y = 0; y < rows; y++) {
57
+ const x = s - y;
58
+ if (x >= 0 && x < cols) dots.push([x, y]);
59
+ }
60
+ frames.push(dots);
61
+ }
62
+ return frames;
63
+ }, [cols, rows]);
104
64
  };
105
65
 
66
+ //#endregion
106
67
  exports.MotionGrid = MotionGrid;
107
- //# sourceMappingURL=motion-grid.cjs.map
108
68
  //# sourceMappingURL=motion-grid.cjs.map
@@ -1 +1 @@
1
- {"version":3,"sources":["../../src/lib/motion/motion-config.ts","../../src/lib/utils.ts","../../src/components/motion-grid.tsx"],"names":["twMerge","clsx","React","useReducedMotion","jsx","motion"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAsBO,IAAM,OAAA,GAAU;AAAA,EAKA;AAAA,EAGtB,SAAA,EAAW,CAAC,IAAA,EAAM,CAAA,EAAG,MAAM,CAAC,CAa7B,CAAA;ACxCO,SAAS,MAAM,MAAA,EAAsB;AAC1C,EAAA,OAAOA,qBAAA,CAAQC,SAAA,CAAK,MAAM,CAAC,CAAA;AAC7B;ACkBA,IAAM,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I,IAAA,EAAM,CAAA,EAAA,EAAK;AAC9B,QAAA,MAAM,IAAI,CAAA,GAAI,CAAA;AACd,QAAA,IAAI,CAAA,IAAK,KAAK,CAAA,GAAI,IAAA,OAAW,IAAA,CAAK,CAAC,CAAA,EAAG,CAAC,CAAC,CAAA;AAAA,MACzC;AACA,MAAA,MAAA,CAAO,KAAK,IAAI,CAAA;AAAA,IACjB;AACA,IAAA,OAAO,MAAA;AAAA,EACR,CAAA,EAAG,CAAC,IAAA,EAAM,IAAI,CAAC,CAAA;AAEf,EAAA,OAAO,aAAA;AACR,CAAA","file":"motion-grid.cjs","sourcesContent":["import type { Transition } from 'motion/react';\n\n/**\n * Shared motion configuration for consistent animations across the app.\n * Based on practical animation tips from https://emilkowal.ski/ui/7-practical-animation-tips\n *\n * Key principles:\n * 1. Keep UI animations under 300ms\n * 2. Never animate from scale(0) - use 0.9+ for natural feel\n * 3. Use custom easing curves for more impactful animations\n * 4. Make animations origin-aware when possible\n * 5. Use blur to smooth transitions when needed\n */\n\n// =============================================================================\n// Easing Curves\n// =============================================================================\n\n/**\n * Standard easing curves for UI animations.\n * Reference: https://easings.co/\n */\nexport const easings = {\n\t/** Smooth deceleration - good for elements entering the screen */\n\teaseOut: [0.25, 0.1, 0.25, 1] as const,\n\n\t/** Smooth acceleration - good for elements leaving the screen */\n\teaseIn: [0.42, 0, 1, 1] as const,\n\n\t/** Smooth both ways - good for hover states and toggles */\n\teaseInOut: [0.42, 0, 0.58, 1] as const,\n\n\t/** Snappy entrance with soft landing - great for modals/dialogs */\n\tsnappy: [0.2, 0, 0, 1] as const,\n\n\t/** Bouncy feel - use sparingly for playful interactions */\n\tbounce: [0.34, 1.56, 0.64, 1] as const,\n\n\t/** Quick start, gradual stop - good for quick feedback */\n\temphasized: [0.4, 0, 0.2, 1] as const,\n\n\t/** Physical feel for exit animations */\n\tphysicalExit: [0.4, 0, 0.6, 1] as const,\n} as const;\n\n// =============================================================================\n// Duration Presets\n// =============================================================================\n\n/**\n * Duration presets in seconds.\n * Rule: UI animations should be under 300ms (0.3s)\n */\nexport const durations = {\n\t/** Instant feedback (button press, toggle) */\n\tinstant: 0.1,\n\n\t/** Quick transitions (tooltips, small elements) */\n\tfast: 0.15,\n\n\t/** Standard UI transitions (modals, panels) */\n\tnormal: 0.2,\n\n\t/** Deliberate animations (page transitions, complex reveals) */\n\tslow: 0.3,\n\n\t/** Maximum for UI - use rarely */\n\tdeliberate: 0.4,\n} as const;\n\n// =============================================================================\n// Spring Presets\n// =============================================================================\n\n/**\n * Spring configurations for physics-based animations.\n * These create more natural, organic motion.\n */\nexport const springs = {\n\t/** Snappy spring - good for quick interactions */\n\tsnappy: {\n\t\ttype: 'spring' as const,\n\t\tstiffness: 400,\n\t\tdamping: 30,\n\t\tmass: 0.8,\n\t},\n\n\t/** Bouncy spring - good for playful elements */\n\tbouncy: {\n\t\ttype: 'spring' as const,\n\t\tstiffness: 300,\n\t\tdamping: 20,\n\t\tmass: 0.6,\n\t},\n\n\t/** Gentle spring - good for large elements */\n\tgentle: {\n\t\ttype: 'spring' as const,\n\t\tstiffness: 150,\n\t\tdamping: 25,\n\t\tmass: 1,\n\t},\n\n\t/** Stiff spring - good for precise movements */\n\tstiff: {\n\t\ttype: 'spring' as const,\n\t\tstiffness: 500,\n\t\tdamping: 35,\n\t\tmass: 0.5,\n\t},\n\n\t/** Panel/sheet animations */\n\tpanel: {\n\t\ttype: 'spring' as const,\n\t\tstiffness: 150,\n\t\tdamping: 25,\n\t},\n} as const;\n\n// =============================================================================\n// Transition Presets\n// =============================================================================\n\n/**\n * Pre-configured transitions for common animation patterns.\n */\nexport const transitions = {\n\t/** Fast fade for overlays and simple elements */\n\tfade: {\n\t\tduration: durations.fast,\n\t\tease: easings.easeOut,\n\t} satisfies Transition,\n\n\t/** Standard enter/exit for UI elements */\n\tenterExit: {\n\t\tduration: durations.normal,\n\t\tease: easings.easeOut,\n\t} satisfies Transition,\n\n\t/** Snappy transition for interactive elements */\n\tsnappy: {\n\t\tduration: durations.fast,\n\t\tease: easings.snappy,\n\t} satisfies Transition,\n\n\t/** Panel slide transition */\n\tpanel: {\n\t\ttype: 'spring',\n\t\tstiffness: 150,\n\t\tdamping: 25,\n\t} satisfies Transition,\n\n\t/** Exit transition with physical feel */\n\texit: {\n\t\ttype: 'tween',\n\t\tduration: durations.normal,\n\t\tease: easings.physicalExit,\n\t} satisfies Transition,\n\n\t/** Layout animations */\n\tlayout: {\n\t\ttype: 'spring',\n\t\tstiffness: 300,\n\t\tdamping: 30,\n\t} satisfies Transition,\n} as const;\n\n// =============================================================================\n// Animation Variants\n// =============================================================================\n\n/**\n * Common animation variants for AnimatePresence patterns.\n * Follows the rule: never animate from scale(0), use 0.9+ instead.\n */\nexport const variants = {\n\t/** Fade with subtle scale - good for modals, cards */\n\tfadeScale: {\n\t\tinitial: { opacity: 0, scale: 0.95 },\n\t\tanimate: { opacity: 1, scale: 1 },\n\t\texit: { opacity: 0, scale: 0.95 },\n\t},\n\n\t/** Fade with subtle slide up - good for content reveals */\n\tfadeSlideUp: {\n\t\tinitial: { opacity: 0, y: 8 },\n\t\tanimate: { opacity: 1, y: 0 },\n\t\texit: { opacity: 0, y: -8 },\n\t},\n\n\t/** Fade with subtle slide down - good for dropdowns */\n\tfadeSlideDown: {\n\t\tinitial: { opacity: 0, y: -8 },\n\t\tanimate: { opacity: 1, y: 0 },\n\t\texit: { opacity: 0, y: 8 },\n\t},\n\n\t/** Simple fade - for overlays */\n\tfade: {\n\t\tinitial: { opacity: 0 },\n\t\tanimate: { opacity: 1 },\n\t\texit: { opacity: 0 },\n\t},\n\n\t/** Dock/floating element - scales from bottom */\n\tfloatUp: {\n\t\tinitial: { opacity: 0, y: 8, scale: 0.98 },\n\t\tanimate: { opacity: 1, y: 0, scale: 1 },\n\t\texit: { opacity: 0, y: 8, scale: 0.98 },\n\t},\n} as const;\n","import { clsx, type ClassValue } from 'clsx';\nimport { twMerge } from 'tailwind-merge';\n\nexport function cn(...inputs: ClassValue[]) {\n return twMerge(clsx(inputs));\n}\n","'use client';\n\nimport * as React from 'react';\nimport { motion, type HTMLMotionProps, useReducedMotion } from 'motion/react';\n\nimport { easings } from '../lib/motion/motion-config';\nimport { cn } from '../lib/utils';\n\ntype FrameDot = [number, number];\ntype Frame = FrameDot[];\ntype Frames = Frame[];\n\ntype MotionGridProps = {\n\tgridSize: [number, number];\n\t/** Duration in milliseconds for each frame of the animation */\n\tduration?: number;\n\tanimate?: boolean;\n\tcellClassName?: string;\n\tcellProps?: HTMLMotionProps<'div'>;\n\tcellActiveClassName?: string;\n\tcellInactiveClassName?: string;\n} & React.ComponentProps<'div'>;\n\nconst MotionGrid = ({\n\tgridSize,\n\tduration = 200,\n\tanimate = true,\n\tcellClassName,\n\tcellProps,\n\tcellActiveClassName,\n\tcellInactiveClassName,\n\tclassName,\n\tstyle,\n\t...props\n}: MotionGridProps) => {\n\tconst [cols, rows] = gridSize;\n\tconst frames = useLoadingFrames(cols, rows);\n\tconst [index, setIndex] = React.useState(0);\n\tconst intervalRef = React.useRef<NodeJS.Timeout | null>(null);\n\tconst prefersReducedMotion = useReducedMotion();\n\tconst shouldAnimate = animate && !prefersReducedMotion;\n\n\tReact.useEffect(() => {\n\t\tif (!shouldAnimate || frames.length === 0) {\n\t\t\tsetIndex(0);\n\t\t\treturn;\n\t\t}\n\t\tintervalRef.current = setInterval(() => setIndex((i) => (i + 1) % frames.length), duration);\n\t\treturn () => clearInterval(intervalRef.current!);\n\t}, [frames.length, duration, shouldAnimate]);\n\n\tconst active = new Set<number>(frames[index]?.map(([x, y]) => y * cols + x) ?? []);\n\n\treturn (\n\t\t<div\n\t\t\tclassName={cn('grid w-fit gap-0.5', className)}\n\t\t\tstyle={{\n\t\t\t\t...style,\n\t\t\t\tgridTemplateColumns: `repeat(${cols}, minmax(0, 1fr))`,\n\t\t\t\tgridAutoRows: '1fr',\n\t\t\t}}\n\t\t\t{...props}\n\t\t>\n\t\t\t{Array.from({ length: cols * rows }).map((_, i) => (\n\t\t\t\t<motion.div\n\t\t\t\t\tkey={i}\n\t\t\t\t\tclassName={cn(\n\t\t\t\t\t\t'aspect-square size-3 rounded-full',\n\t\t\t\t\t\tactive.has(i)\n\t\t\t\t\t\t\t? cn('bg-primary scale-110', cellActiveClassName)\n\t\t\t\t\t\t\t: cn('bg-muted scale-100', cellInactiveClassName),\n\t\t\t\t\t\tcellClassName,\n\t\t\t\t\t)}\n\t\t\t\t\t{...cellProps}\n\t\t\t\t\t// Convert ms to seconds for motion library\n\t\t\t\t\ttransition={prefersReducedMotion ? { duration: 0 } : { duration: duration / 1000, ease: easings.easeInOut }}\n\t\t\t\t/>\n\t\t\t))}\n\t\t</div>\n\t);\n};\n\nconst useLoadingFrames = (cols: number = 8, rows: number = 4) => {\n\t// Animated loading pattern for the preview area using MotionGrid\n\tconst loadingFrames = React.useMemo<Frames>(() => {\n\t\tconst frames: Frames = [];\n\t\tfor (let s = 0; s < cols + rows; s++) {\n\t\t\tconst dots: [number, number][] = [];\n\t\t\tfor (let y = 0; y < rows; y++) {\n\t\t\t\tconst x = s - y;\n\t\t\t\tif (x >= 0 && x < cols) dots.push([x, y]);\n\t\t\t}\n\t\t\tframes.push(dots);\n\t\t}\n\t\treturn frames;\n\t}, [cols, rows]);\n\n\treturn loadingFrames;\n};\n\nexport { MotionGrid, type MotionGridProps, type FrameDot, type Frame, type Frames };\n"]}
1
+ {"version":3,"file":"motion-grid.cjs","names":["React","cn","motion","easings"],"sources":["../../src/components/motion-grid.tsx"],"sourcesContent":["'use client';\n\nimport * as React from 'react';\nimport { motion, type HTMLMotionProps, useReducedMotion } from 'motion/react';\n\nimport { easings } from '../lib/motion/motion-config';\nimport { cn } from '../lib/utils';\n\ntype FrameDot = [number, number];\ntype Frame = FrameDot[];\ntype Frames = Frame[];\n\ntype MotionGridProps = {\n\tgridSize: [number, number];\n\t/** Duration in milliseconds for each frame of the animation */\n\tduration?: number;\n\tanimate?: boolean;\n\tcellClassName?: string;\n\tcellProps?: HTMLMotionProps<'div'>;\n\tcellActiveClassName?: string;\n\tcellInactiveClassName?: string;\n} & React.ComponentProps<'div'>;\n\nconst MotionGrid = ({\n\tgridSize,\n\tduration = 200,\n\tanimate = true,\n\tcellClassName,\n\tcellProps,\n\tcellActiveClassName,\n\tcellInactiveClassName,\n\tclassName,\n\tstyle,\n\t...props\n}: MotionGridProps) => {\n\tconst [cols, rows] = gridSize;\n\tconst frames = useLoadingFrames(cols, rows);\n\tconst [index, setIndex] = React.useState(0);\n\tconst intervalRef = React.useRef<NodeJS.Timeout | null>(null);\n\tconst prefersReducedMotion = useReducedMotion();\n\tconst shouldAnimate = animate && !prefersReducedMotion;\n\n\tReact.useEffect(() => {\n\t\tif (!shouldAnimate || frames.length === 0) {\n\t\t\tsetIndex(0);\n\t\t\treturn;\n\t\t}\n\t\tintervalRef.current = setInterval(() => setIndex((i) => (i + 1) % frames.length), duration);\n\t\treturn () => clearInterval(intervalRef.current!);\n\t}, [frames.length, duration, shouldAnimate]);\n\n\tconst active = new Set<number>(frames[index]?.map(([x, y]) => y * cols + x) ?? []);\n\n\treturn (\n\t\t<div\n\t\t\tclassName={cn('grid w-fit gap-0.5', className)}\n\t\t\tstyle={{\n\t\t\t\t...style,\n\t\t\t\tgridTemplateColumns: `repeat(${cols}, minmax(0, 1fr))`,\n\t\t\t\tgridAutoRows: '1fr',\n\t\t\t}}\n\t\t\t{...props}\n\t\t>\n\t\t\t{Array.from({ length: cols * rows }).map((_, i) => (\n\t\t\t\t<motion.div\n\t\t\t\t\tkey={i}\n\t\t\t\t\tclassName={cn(\n\t\t\t\t\t\t'aspect-square size-3 rounded-full',\n\t\t\t\t\t\tactive.has(i)\n\t\t\t\t\t\t\t? cn('bg-primary scale-110', cellActiveClassName)\n\t\t\t\t\t\t\t: cn('bg-muted scale-100', cellInactiveClassName),\n\t\t\t\t\t\tcellClassName,\n\t\t\t\t\t)}\n\t\t\t\t\t{...cellProps}\n\t\t\t\t\t// Convert ms to seconds for motion library\n\t\t\t\t\ttransition={prefersReducedMotion ? { duration: 0 } : { duration: duration / 1000, ease: easings.easeInOut }}\n\t\t\t\t/>\n\t\t\t))}\n\t\t</div>\n\t);\n};\n\nconst useLoadingFrames = (cols: number = 8, rows: number = 4) => {\n\t// Animated loading pattern for the preview area using MotionGrid\n\tconst loadingFrames = React.useMemo<Frames>(() => {\n\t\tconst frames: Frames = [];\n\t\tfor (let s = 0; s < cols + rows; s++) {\n\t\t\tconst dots: [number, number][] = [];\n\t\t\tfor (let y = 0; y < rows; y++) {\n\t\t\t\tconst x = s - y;\n\t\t\t\tif (x >= 0 && x < cols) dots.push([x, y]);\n\t\t\t}\n\t\t\tframes.push(dots);\n\t\t}\n\t\treturn frames;\n\t}, [cols, rows]);\n\n\treturn loadingFrames;\n};\n\nexport { MotionGrid, type MotionGridProps, type FrameDot, type Frame, type Frames };\n"],"mappings":";;;;;;;;;;;;AAuBA,MAAM,cAAc,EACnB,UACA,WAAW,KACX,UAAU,MACV,eACA,WACA,qBACA,uBACA,WACA,OACA,GAAG,YACmB;CACtB,MAAM,CAAC,MAAM,QAAQ;CACrB,MAAM,SAAS,iBAAiB,MAAM,IAAI;CAC1C,MAAM,CAAC,OAAO,YAAYA,MAAM,SAAS,CAAC;CAC1C,MAAM,cAAcA,MAAM,OAA8B,IAAI;CAC5D,MAAM,0DAAwC;CAC9C,MAAM,gBAAgB,WAAW,CAAC;CAElC,MAAM,gBAAgB;EACrB,IAAI,CAAC,iBAAiB,OAAO,WAAW,GAAG;GAC1C,SAAS,CAAC;GACV;EACD;EACA,YAAY,UAAU,kBAAkB,UAAU,OAAO,IAAI,KAAK,OAAO,MAAM,GAAG,QAAQ;EAC1F,aAAa,cAAc,YAAY,OAAQ;CAChD,GAAG;EAAC,OAAO;EAAQ;EAAU;CAAa,CAAC;CAE3C,MAAM,SAAS,IAAI,IAAY,OAAO,MAAM,EAAE,KAAK,CAAC,GAAG,OAAO,IAAI,OAAO,CAAC,KAAK,CAAC,CAAC;CAEjF,OACC,2CAAC,OAAD;EACC,WAAWC,iBAAG,sBAAsB,SAAS;EAC7C,OAAO;GACN,GAAG;GACH,qBAAqB,UAAU,KAAK;GACpC,cAAc;EACf;EACA,GAAI;YAEH,MAAM,KAAK,EAAE,QAAQ,OAAO,KAAK,CAAC,CAAC,CAAC,KAAK,GAAG,MAC5C,2CAACC,oBAAO,KAAR;GAEC,WAAWD,iBACV,qCACA,OAAO,IAAI,CAAC,IACTA,iBAAG,wBAAwB,mBAAmB,IAC9CA,iBAAG,sBAAsB,qBAAqB,GACjD,aACD;GACA,GAAI;GAEJ,YAAY,uBAAuB,EAAE,UAAU,EAAE,IAAI;IAAE,UAAU,WAAW;IAAM,MAAME,8BAAQ;GAAU;EAC1G,GAXK,CAWL,CACD;CACG;AAEP;AAEA,MAAM,oBAAoB,OAAe,GAAG,OAAe,MAAM;CAehE,OAbsBH,MAAM,cAAsB;EACjD,MAAM,SAAiB,CAAC;EACxB,KAAK,IAAI,IAAI,GAAG,IAAI,OAAO,MAAM,KAAK;GACrC,MAAM,OAA2B,CAAC;GAClC,KAAK,IAAI,IAAI,GAAG,IAAI,MAAM,KAAK;IAC9B,MAAM,IAAI,IAAI;IACd,IAAI,KAAK,KAAK,IAAI,MAAM,KAAK,KAAK,CAAC,GAAG,CAAC,CAAC;GACzC;GACA,OAAO,KAAK,IAAI;EACjB;EACA,OAAO;CACR,GAAG,CAAC,MAAM,IAAI,CAEK;AACpB"}
@@ -1,19 +1,20 @@
1
- import * as React from 'react';
2
- import { HTMLMotionProps } from 'motion/react';
3
-
1
+ import * as React$1 from "react";
2
+ import { HTMLMotionProps } from "motion/react";
3
+ //#region src/components/motion-grid.d.ts
4
4
  type FrameDot = [number, number];
5
5
  type Frame = FrameDot[];
6
6
  type Frames = Frame[];
7
7
  type MotionGridProps = {
8
- gridSize: [number, number];
9
- /** Duration in milliseconds for each frame of the animation */
10
- duration?: number;
11
- animate?: boolean;
12
- cellClassName?: string;
13
- cellProps?: HTMLMotionProps<'div'>;
14
- cellActiveClassName?: string;
15
- cellInactiveClassName?: string;
16
- } & React.ComponentProps<'div'>;
17
- declare const MotionGrid: ({ gridSize, duration, animate, cellClassName, cellProps, cellActiveClassName, cellInactiveClassName, className, style, ...props }: MotionGridProps) => React.JSX.Element;
18
-
8
+ gridSize: [number, number];
9
+ /** Duration in milliseconds for each frame of the animation */
10
+ duration?: number;
11
+ animate?: boolean;
12
+ cellClassName?: string;
13
+ cellProps?: HTMLMotionProps<'div'>;
14
+ cellActiveClassName?: string;
15
+ cellInactiveClassName?: string;
16
+ } & React$1.ComponentProps<'div'>;
17
+ declare const MotionGrid: ({ gridSize, duration, animate, cellClassName, cellProps, cellActiveClassName, cellInactiveClassName, className, style, ...props }: MotionGridProps) => React$1.JSX.Element;
18
+ //#endregion
19
19
  export { type Frame, type FrameDot, type Frames, MotionGrid, type MotionGridProps };
20
+ //# sourceMappingURL=motion-grid.d.cts.map
@@ -1,19 +1,20 @@
1
- import * as React from 'react';
2
- import { HTMLMotionProps } from 'motion/react';
3
-
1
+ import * as React$1 from "react";
2
+ import { HTMLMotionProps } from "motion/react";
3
+ //#region src/components/motion-grid.d.ts
4
4
  type FrameDot = [number, number];
5
5
  type Frame = FrameDot[];
6
6
  type Frames = Frame[];
7
7
  type MotionGridProps = {
8
- gridSize: [number, number];
9
- /** Duration in milliseconds for each frame of the animation */
10
- duration?: number;
11
- animate?: boolean;
12
- cellClassName?: string;
13
- cellProps?: HTMLMotionProps<'div'>;
14
- cellActiveClassName?: string;
15
- cellInactiveClassName?: string;
16
- } & React.ComponentProps<'div'>;
17
- declare const MotionGrid: ({ gridSize, duration, animate, cellClassName, cellProps, cellActiveClassName, cellInactiveClassName, className, style, ...props }: MotionGridProps) => React.JSX.Element;
18
-
8
+ gridSize: [number, number];
9
+ /** Duration in milliseconds for each frame of the animation */
10
+ duration?: number;
11
+ animate?: boolean;
12
+ cellClassName?: string;
13
+ cellProps?: HTMLMotionProps<'div'>;
14
+ cellActiveClassName?: string;
15
+ cellInactiveClassName?: string;
16
+ } & React$1.ComponentProps<'div'>;
17
+ declare const MotionGrid: ({ gridSize, duration, animate, cellClassName, cellProps, cellActiveClassName, cellInactiveClassName, className, style, ...props }: MotionGridProps) => React$1.JSX.Element;
18
+ //#endregion
19
19
  export { type Frame, type FrameDot, type Frames, MotionGrid, type MotionGridProps };
20
+ //# sourceMappingURL=motion-grid.d.ts.map
@@ -1,86 +1,65 @@
1
- "use client";
2
- import * as React from 'react';
3
- import { useReducedMotion, motion } from 'motion/react';
4
- import { clsx } from 'clsx';
5
- import { twMerge } from 'tailwind-merge';
6
- import { jsx } from 'react/jsx-runtime';
1
+ 'use client';
7
2
 
8
- // src/lib/motion/motion-config.ts
9
- var easings = {
10
- /** Smooth both ways - good for hover states and toggles */
11
- easeInOut: [0.42, 0, 0.58, 1]};
12
- function cn(...inputs) {
13
- return twMerge(clsx(inputs));
14
- }
15
- var MotionGrid = ({
16
- gridSize,
17
- duration = 200,
18
- animate = true,
19
- cellClassName,
20
- cellProps,
21
- cellActiveClassName,
22
- cellInactiveClassName,
23
- className,
24
- style,
25
- ...props
26
- }) => {
27
- const [cols, rows] = gridSize;
28
- const frames = useLoadingFrames(cols, rows);
29
- const [index, setIndex] = React.useState(0);
30
- const intervalRef = React.useRef(null);
31
- const prefersReducedMotion = useReducedMotion();
32
- const shouldAnimate = animate && !prefersReducedMotion;
33
- React.useEffect(() => {
34
- if (!shouldAnimate || frames.length === 0) {
35
- setIndex(0);
36
- return;
37
- }
38
- intervalRef.current = setInterval(() => setIndex((i) => (i + 1) % frames.length), duration);
39
- return () => clearInterval(intervalRef.current);
40
- }, [frames.length, duration, shouldAnimate]);
41
- const active = new Set(frames[index]?.map(([x, y]) => y * cols + x) ?? []);
42
- return /* @__PURE__ */ jsx(
43
- "div",
44
- {
45
- className: cn("grid w-fit gap-0.5", className),
46
- style: {
47
- ...style,
48
- gridTemplateColumns: `repeat(${cols}, minmax(0, 1fr))`,
49
- gridAutoRows: "1fr"
50
- },
51
- ...props,
52
- children: Array.from({ length: cols * rows }).map((_, i) => /* @__PURE__ */ jsx(
53
- motion.div,
54
- {
55
- className: cn(
56
- "aspect-square size-3 rounded-full",
57
- active.has(i) ? cn("bg-primary scale-110", cellActiveClassName) : cn("bg-muted scale-100", cellInactiveClassName),
58
- cellClassName
59
- ),
60
- ...cellProps,
61
- transition: prefersReducedMotion ? { duration: 0 } : { duration: duration / 1e3, ease: easings.easeInOut }
62
- },
63
- i
64
- ))
65
- }
66
- );
3
+ import { t as cn } from "../utils-BkMLyah9.js";
4
+ import { n as easings } from "../motion-config-COsZ6azM.js";
5
+ import * as React$1 from "react";
6
+ import { jsx } from "react/jsx-runtime";
7
+ import { motion, useReducedMotion } from "motion/react";
8
+
9
+ //#region src/components/motion-grid.tsx
10
+ const MotionGrid = ({ gridSize, duration = 200, animate = true, cellClassName, cellProps, cellActiveClassName, cellInactiveClassName, className, style, ...props }) => {
11
+ const [cols, rows] = gridSize;
12
+ const frames = useLoadingFrames(cols, rows);
13
+ const [index, setIndex] = React$1.useState(0);
14
+ const intervalRef = React$1.useRef(null);
15
+ const prefersReducedMotion = useReducedMotion();
16
+ const shouldAnimate = animate && !prefersReducedMotion;
17
+ React$1.useEffect(() => {
18
+ if (!shouldAnimate || frames.length === 0) {
19
+ setIndex(0);
20
+ return;
21
+ }
22
+ intervalRef.current = setInterval(() => setIndex((i) => (i + 1) % frames.length), duration);
23
+ return () => clearInterval(intervalRef.current);
24
+ }, [
25
+ frames.length,
26
+ duration,
27
+ shouldAnimate
28
+ ]);
29
+ const active = new Set(frames[index]?.map(([x, y]) => y * cols + x) ?? []);
30
+ return /* @__PURE__ */ jsx("div", {
31
+ className: cn("grid w-fit gap-0.5", className),
32
+ style: {
33
+ ...style,
34
+ gridTemplateColumns: `repeat(${cols}, minmax(0, 1fr))`,
35
+ gridAutoRows: "1fr"
36
+ },
37
+ ...props,
38
+ children: Array.from({ length: cols * rows }).map((_, i) => /* @__PURE__ */ jsx(motion.div, {
39
+ className: cn("aspect-square size-3 rounded-full", active.has(i) ? cn("bg-primary scale-110", cellActiveClassName) : cn("bg-muted scale-100", cellInactiveClassName), cellClassName),
40
+ ...cellProps,
41
+ transition: prefersReducedMotion ? { duration: 0 } : {
42
+ duration: duration / 1e3,
43
+ ease: easings.easeInOut
44
+ }
45
+ }, i))
46
+ });
67
47
  };
68
- var useLoadingFrames = (cols = 8, rows = 4) => {
69
- const loadingFrames = React.useMemo(() => {
70
- const frames = [];
71
- for (let s = 0; s < cols + rows; s++) {
72
- const dots = [];
73
- for (let y = 0; y < rows; y++) {
74
- const x = s - y;
75
- if (x >= 0 && x < cols) dots.push([x, y]);
76
- }
77
- frames.push(dots);
78
- }
79
- return frames;
80
- }, [cols, rows]);
81
- return loadingFrames;
48
+ const useLoadingFrames = (cols = 8, rows = 4) => {
49
+ return React$1.useMemo(() => {
50
+ const frames = [];
51
+ for (let s = 0; s < cols + rows; s++) {
52
+ const dots = [];
53
+ for (let y = 0; y < rows; y++) {
54
+ const x = s - y;
55
+ if (x >= 0 && x < cols) dots.push([x, y]);
56
+ }
57
+ frames.push(dots);
58
+ }
59
+ return frames;
60
+ }, [cols, rows]);
82
61
  };
83
62
 
63
+ //#endregion
84
64
  export { MotionGrid };
85
- //# sourceMappingURL=motion-grid.js.map
86
65
  //# sourceMappingURL=motion-grid.js.map
@@ -1 +1 @@
1
- {"version":3,"sources":["../../src/lib/motion/motion-config.ts","../../src/lib/utils.ts","../../src/components/motion-grid.tsx"],"names":[],"mappings":";;;;;;;AAsBO,IAAM,OAAA,GAAU;AAAA,EAKA;AAAA,EAGtB,SAAA,EAAW,CAAC,IAAA,EAAM,CAAA,EAAG,MAAM,CAAC,CAa7B,CAAA;ACxCO,SAAS,MAAM,MAAA,EAAsB;AAC1C,EAAA,OAAO,OAAA,CAAQ,IAAA,CAAK,MAAM,CAAC,CAAA;AAC7B;ACkBA,IAAM,aAAa,CAAC;AAAA,EACnB,QAAA;AAAA,EACA,QAAA,GAAW,GAAA;AAAA,EACX,OA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A,IAAI,CAAA,IAAK,KAAK,CAAA,GAAI,IAAA,OAAW,IAAA,CAAK,CAAC,CAAA,EAAG,CAAC,CAAC,CAAA;AAAA,MACzC;AACA,MAAA,MAAA,CAAO,KAAK,IAAI,CAAA;AAAA,IACjB;AACA,IAAA,OAAO,MAAA;AAAA,EACR,CAAA,EAAG,CAAC,IAAA,EAAM,IAAI,CAAC,CAAA;AAEf,EAAA,OAAO,aAAA;AACR,CAAA","file":"motion-grid.js","sourcesContent":["import type { Transition } from 'motion/react';\n\n/**\n * Shared motion configuration for consistent animations across the app.\n * Based on practical animation tips from https://emilkowal.ski/ui/7-practical-animation-tips\n *\n * Key principles:\n * 1. Keep UI animations under 300ms\n * 2. Never animate from scale(0) - use 0.9+ for natural feel\n * 3. Use custom easing curves for more impactful animations\n * 4. Make animations origin-aware when possible\n * 5. Use blur to smooth transitions when needed\n */\n\n// =============================================================================\n// Easing Curves\n// =============================================================================\n\n/**\n * Standard easing curves for UI animations.\n * Reference: https://easings.co/\n */\nexport const easings = {\n\t/** Smooth deceleration - good for elements entering the screen */\n\teaseOut: [0.25, 0.1, 0.25, 1] as const,\n\n\t/** Smooth acceleration - good for elements leaving the screen */\n\teaseIn: [0.42, 0, 1, 1] as const,\n\n\t/** Smooth both ways - good for hover states and toggles */\n\teaseInOut: [0.42, 0, 0.58, 1] as const,\n\n\t/** Snappy entrance with soft landing - great for modals/dialogs */\n\tsnappy: [0.2, 0, 0, 1] as const,\n\n\t/** Bouncy feel - use sparingly for playful interactions */\n\tbounce: [0.34, 1.56, 0.64, 1] as const,\n\n\t/** Quick start, gradual stop - good for quick feedback */\n\temphasized: [0.4, 0, 0.2, 1] as const,\n\n\t/** Physical feel for exit animations */\n\tphysicalExit: [0.4, 0, 0.6, 1] as const,\n} as const;\n\n// =============================================================================\n// Duration Presets\n// =============================================================================\n\n/**\n * Duration presets in seconds.\n * Rule: UI animations should be under 300ms (0.3s)\n */\nexport const durations = {\n\t/** Instant feedback (button press, toggle) */\n\tinstant: 0.1,\n\n\t/** Quick transitions (tooltips, small elements) */\n\tfast: 0.15,\n\n\t/** Standard UI transitions (modals, panels) */\n\tnormal: 0.2,\n\n\t/** Deliberate animations (page transitions, complex reveals) */\n\tslow: 0.3,\n\n\t/** Maximum for UI - use rarely */\n\tdeliberate: 0.4,\n} as const;\n\n// =============================================================================\n// Spring Presets\n// =============================================================================\n\n/**\n * Spring configurations for physics-based animations.\n * These create more natural, organic motion.\n */\nexport const springs = {\n\t/** Snappy spring - good for quick interactions */\n\tsnappy: {\n\t\ttype: 'spring' as const,\n\t\tstiffness: 400,\n\t\tdamping: 30,\n\t\tmass: 0.8,\n\t},\n\n\t/** Bouncy spring - good for playful elements */\n\tbouncy: {\n\t\ttype: 'spring' as const,\n\t\tstiffness: 300,\n\t\tdamping: 20,\n\t\tmass: 0.6,\n\t},\n\n\t/** Gentle spring - good for large elements */\n\tgentle: {\n\t\ttype: 'spring' as const,\n\t\tstiffness: 150,\n\t\tdamping: 25,\n\t\tmass: 1,\n\t},\n\n\t/** Stiff spring - good for precise movements */\n\tstiff: {\n\t\ttype: 'spring' as const,\n\t\tstiffness: 500,\n\t\tdamping: 35,\n\t\tmass: 0.5,\n\t},\n\n\t/** Panel/sheet animations */\n\tpanel: {\n\t\ttype: 'spring' as const,\n\t\tstiffness: 150,\n\t\tdamping: 25,\n\t},\n} as const;\n\n// =============================================================================\n// Transition Presets\n// =============================================================================\n\n/**\n * Pre-configured transitions for common animation patterns.\n */\nexport const transitions = {\n\t/** Fast fade for overlays and simple elements */\n\tfade: {\n\t\tduration: durations.fast,\n\t\tease: easings.easeOut,\n\t} satisfies Transition,\n\n\t/** Standard enter/exit for UI elements */\n\tenterExit: {\n\t\tduration: durations.normal,\n\t\tease: easings.easeOut,\n\t} satisfies Transition,\n\n\t/** Snappy transition for interactive elements */\n\tsnappy: {\n\t\tduration: durations.fast,\n\t\tease: easings.snappy,\n\t} satisfies Transition,\n\n\t/** Panel slide transition */\n\tpanel: {\n\t\ttype: 'spring',\n\t\tstiffness: 150,\n\t\tdamping: 25,\n\t} satisfies Transition,\n\n\t/** Exit transition with physical feel */\n\texit: {\n\t\ttype: 'tween',\n\t\tduration: durations.normal,\n\t\tease: easings.physicalExit,\n\t} satisfies Transition,\n\n\t/** Layout animations */\n\tlayout: {\n\t\ttype: 'spring',\n\t\tstiffness: 300,\n\t\tdamping: 30,\n\t} satisfies Transition,\n} as const;\n\n// =============================================================================\n// Animation Variants\n// =============================================================================\n\n/**\n * Common animation variants for AnimatePresence patterns.\n * Follows the rule: never animate from scale(0), use 0.9+ instead.\n */\nexport const variants = {\n\t/** Fade with subtle scale - good for modals, cards */\n\tfadeScale: {\n\t\tinitial: { opacity: 0, scale: 0.95 },\n\t\tanimate: { opacity: 1, scale: 1 },\n\t\texit: { opacity: 0, scale: 0.95 },\n\t},\n\n\t/** Fade with subtle slide up - good for content reveals */\n\tfadeSlideUp: {\n\t\tinitial: { opacity: 0, y: 8 },\n\t\tanimate: { opacity: 1, y: 0 },\n\t\texit: { opacity: 0, y: -8 },\n\t},\n\n\t/** Fade with subtle slide down - good for dropdowns */\n\tfadeSlideDown: {\n\t\tinitial: { opacity: 0, y: -8 },\n\t\tanimate: { opacity: 1, y: 0 },\n\t\texit: { opacity: 0, y: 8 },\n\t},\n\n\t/** Simple fade - for overlays */\n\tfade: {\n\t\tinitial: { opacity: 0 },\n\t\tanimate: { opacity: 1 },\n\t\texit: { opacity: 0 },\n\t},\n\n\t/** Dock/floating element - scales from bottom */\n\tfloatUp: {\n\t\tinitial: { opacity: 0, y: 8, scale: 0.98 },\n\t\tanimate: { opacity: 1, y: 0, scale: 1 },\n\t\texit: { opacity: 0, y: 8, scale: 0.98 },\n\t},\n} as const;\n","import { clsx, type ClassValue } from 'clsx';\nimport { twMerge } from 'tailwind-merge';\n\nexport function cn(...inputs: ClassValue[]) {\n return twMerge(clsx(inputs));\n}\n","'use client';\n\nimport * as React from 'react';\nimport { motion, type HTMLMotionProps, useReducedMotion } from 'motion/react';\n\nimport { easings } from '../lib/motion/motion-config';\nimport { cn } from '../lib/utils';\n\ntype FrameDot = [number, number];\ntype Frame = FrameDot[];\ntype Frames = Frame[];\n\ntype MotionGridProps = {\n\tgridSize: [number, number];\n\t/** Duration in milliseconds for each frame of the animation */\n\tduration?: number;\n\tanimate?: boolean;\n\tcellClassName?: string;\n\tcellProps?: HTMLMotionProps<'div'>;\n\tcellActiveClassName?: string;\n\tcellInactiveClassName?: string;\n} & React.ComponentProps<'div'>;\n\nconst MotionGrid = ({\n\tgridSize,\n\tduration = 200,\n\tanimate = true,\n\tcellClassName,\n\tcellProps,\n\tcellActiveClassName,\n\tcellInactiveClassName,\n\tclassName,\n\tstyle,\n\t...props\n}: MotionGridProps) => {\n\tconst [cols, rows] = gridSize;\n\tconst frames = useLoadingFrames(cols, rows);\n\tconst [index, setIndex] = React.useState(0);\n\tconst intervalRef = React.useRef<NodeJS.Timeout | null>(null);\n\tconst prefersReducedMotion = useReducedMotion();\n\tconst shouldAnimate = animate && !prefersReducedMotion;\n\n\tReact.useEffect(() => {\n\t\tif (!shouldAnimate || frames.length === 0) {\n\t\t\tsetIndex(0);\n\t\t\treturn;\n\t\t}\n\t\tintervalRef.current = setInterval(() => setIndex((i) => (i + 1) % frames.length), duration);\n\t\treturn () => clearInterval(intervalRef.current!);\n\t}, [frames.length, duration, shouldAnimate]);\n\n\tconst active = new Set<number>(frames[index]?.map(([x, y]) => y * cols + x) ?? []);\n\n\treturn (\n\t\t<div\n\t\t\tclassName={cn('grid w-fit gap-0.5', className)}\n\t\t\tstyle={{\n\t\t\t\t...style,\n\t\t\t\tgridTemplateColumns: `repeat(${cols}, minmax(0, 1fr))`,\n\t\t\t\tgridAutoRows: '1fr',\n\t\t\t}}\n\t\t\t{...props}\n\t\t>\n\t\t\t{Array.from({ length: cols * rows }).map((_, i) => (\n\t\t\t\t<motion.div\n\t\t\t\t\tkey={i}\n\t\t\t\t\tclassName={cn(\n\t\t\t\t\t\t'aspect-square size-3 rounded-full',\n\t\t\t\t\t\tactive.has(i)\n\t\t\t\t\t\t\t? cn('bg-primary scale-110', cellActiveClassName)\n\t\t\t\t\t\t\t: cn('bg-muted scale-100', cellInactiveClassName),\n\t\t\t\t\t\tcellClassName,\n\t\t\t\t\t)}\n\t\t\t\t\t{...cellProps}\n\t\t\t\t\t// Convert ms to seconds for motion library\n\t\t\t\t\ttransition={prefersReducedMotion ? { duration: 0 } : { duration: duration / 1000, ease: easings.easeInOut }}\n\t\t\t\t/>\n\t\t\t))}\n\t\t</div>\n\t);\n};\n\nconst useLoadingFrames = (cols: number = 8, rows: number = 4) => {\n\t// Animated loading pattern for the preview area using MotionGrid\n\tconst loadingFrames = React.useMemo<Frames>(() => {\n\t\tconst frames: Frames = [];\n\t\tfor (let s = 0; s < cols + rows; s++) {\n\t\t\tconst dots: [number, number][] = [];\n\t\t\tfor (let y = 0; y < rows; y++) {\n\t\t\t\tconst x = s - y;\n\t\t\t\tif (x >= 0 && x < cols) dots.push([x, y]);\n\t\t\t}\n\t\t\tframes.push(dots);\n\t\t}\n\t\treturn frames;\n\t}, [cols, rows]);\n\n\treturn loadingFrames;\n};\n\nexport { MotionGrid, type MotionGridProps, type FrameDot, type Frame, type Frames };\n"]}
1
+ {"version":3,"file":"motion-grid.js","names":["React"],"sources":["../../src/components/motion-grid.tsx"],"sourcesContent":["'use client';\n\nimport * as React from 'react';\nimport { motion, type HTMLMotionProps, useReducedMotion } from 'motion/react';\n\nimport { easings } from '../lib/motion/motion-config';\nimport { cn } from '../lib/utils';\n\ntype FrameDot = [number, number];\ntype Frame = FrameDot[];\ntype Frames = Frame[];\n\ntype MotionGridProps = {\n\tgridSize: [number, number];\n\t/** Duration in milliseconds for each frame of the animation */\n\tduration?: number;\n\tanimate?: boolean;\n\tcellClassName?: string;\n\tcellProps?: HTMLMotionProps<'div'>;\n\tcellActiveClassName?: string;\n\tcellInactiveClassName?: string;\n} & React.ComponentProps<'div'>;\n\nconst MotionGrid = ({\n\tgridSize,\n\tduration = 200,\n\tanimate = true,\n\tcellClassName,\n\tcellProps,\n\tcellActiveClassName,\n\tcellInactiveClassName,\n\tclassName,\n\tstyle,\n\t...props\n}: MotionGridProps) => {\n\tconst [cols, rows] = gridSize;\n\tconst frames = useLoadingFrames(cols, rows);\n\tconst [index, setIndex] = React.useState(0);\n\tconst intervalRef = React.useRef<NodeJS.Timeout | null>(null);\n\tconst prefersReducedMotion = useReducedMotion();\n\tconst shouldAnimate = animate && !prefersReducedMotion;\n\n\tReact.useEffect(() => {\n\t\tif (!shouldAnimate || frames.length === 0) {\n\t\t\tsetIndex(0);\n\t\t\treturn;\n\t\t}\n\t\tintervalRef.current = setInterval(() => setIndex((i) => (i + 1) % frames.length), duration);\n\t\treturn () => clearInterval(intervalRef.current!);\n\t}, [frames.length, duration, shouldAnimate]);\n\n\tconst active = new Set<number>(frames[index]?.map(([x, y]) => y * cols + x) ?? []);\n\n\treturn (\n\t\t<div\n\t\t\tclassName={cn('grid w-fit gap-0.5', className)}\n\t\t\tstyle={{\n\t\t\t\t...style,\n\t\t\t\tgridTemplateColumns: `repeat(${cols}, minmax(0, 1fr))`,\n\t\t\t\tgridAutoRows: '1fr',\n\t\t\t}}\n\t\t\t{...props}\n\t\t>\n\t\t\t{Array.from({ length: cols * rows }).map((_, i) => (\n\t\t\t\t<motion.div\n\t\t\t\t\tkey={i}\n\t\t\t\t\tclassName={cn(\n\t\t\t\t\t\t'aspect-square size-3 rounded-full',\n\t\t\t\t\t\tactive.has(i)\n\t\t\t\t\t\t\t? cn('bg-primary scale-110', cellActiveClassName)\n\t\t\t\t\t\t\t: cn('bg-muted scale-100', cellInactiveClassName),\n\t\t\t\t\t\tcellClassName,\n\t\t\t\t\t)}\n\t\t\t\t\t{...cellProps}\n\t\t\t\t\t// Convert ms to seconds for motion library\n\t\t\t\t\ttransition={prefersReducedMotion ? { duration: 0 } : { duration: duration / 1000, ease: easings.easeInOut }}\n\t\t\t\t/>\n\t\t\t))}\n\t\t</div>\n\t);\n};\n\nconst useLoadingFrames = (cols: number = 8, rows: number = 4) => {\n\t// Animated loading pattern for the preview area using MotionGrid\n\tconst loadingFrames = React.useMemo<Frames>(() => {\n\t\tconst frames: Frames = [];\n\t\tfor (let s = 0; s < cols + rows; s++) {\n\t\t\tconst dots: [number, number][] = [];\n\t\t\tfor (let y = 0; y < rows; y++) {\n\t\t\t\tconst x = s - y;\n\t\t\t\tif (x >= 0 && x < cols) dots.push([x, y]);\n\t\t\t}\n\t\t\tframes.push(dots);\n\t\t}\n\t\treturn frames;\n\t}, [cols, rows]);\n\n\treturn loadingFrames;\n};\n\nexport { MotionGrid, type MotionGridProps, type FrameDot, type Frame, type Frames };\n"],"mappings":";;;;;;;;;AAuBA,MAAM,cAAc,EACnB,UACA,WAAW,KACX,UAAU,MACV,eACA,WACA,qBACA,uBACA,WACA,OACA,GAAG,YACmB;CACtB,MAAM,CAAC,MAAM,QAAQ;CACrB,MAAM,SAAS,iBAAiB,MAAM,IAAI;CAC1C,MAAM,CAAC,OAAO,YAAYA,QAAM,SAAS,CAAC;CAC1C,MAAM,cAAcA,QAAM,OAA8B,IAAI;CAC5D,MAAM,uBAAuB,iBAAiB;CAC9C,MAAM,gBAAgB,WAAW,CAAC;CAElC,QAAM,gBAAgB;EACrB,IAAI,CAAC,iBAAiB,OAAO,WAAW,GAAG;GAC1C,SAAS,CAAC;GACV;EACD;EACA,YAAY,UAAU,kBAAkB,UAAU,OAAO,IAAI,KAAK,OAAO,MAAM,GAAG,QAAQ;EAC1F,aAAa,cAAc,YAAY,OAAQ;CAChD,GAAG;EAAC,OAAO;EAAQ;EAAU;CAAa,CAAC;CAE3C,MAAM,SAAS,IAAI,IAAY,OAAO,MAAM,EAAE,KAAK,CAAC,GAAG,OAAO,IAAI,OAAO,CAAC,KAAK,CAAC,CAAC;CAEjF,OACC,oBAAC,OAAD;EACC,WAAW,GAAG,sBAAsB,SAAS;EAC7C,OAAO;GACN,GAAG;GACH,qBAAqB,UAAU,KAAK;GACpC,cAA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