@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,121 +1,90 @@
1
- "use client";
2
- 'use strict';
1
+ 'use client';
3
2
 
4
- var React = require('react');
5
- var classVarianceAuthority = require('class-variance-authority');
6
- var react = require('motion/react');
7
- var clsx = require('clsx');
8
- var tailwindMerge = require('tailwind-merge');
9
- 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 class_variance_authority = require("class-variance-authority");
11
+ let motion_react = require("motion/react");
10
12
 
11
- function _interopDefault (e) { return e && e.__esModule ? e : { default: e }; }
12
-
13
- var React__default = /*#__PURE__*/_interopDefault(React);
14
-
15
- var springs = {
16
- /** Gentle spring - good for large elements */
17
- gentle: {
18
- stiffness: 150,
19
- mass: 1
20
- }};
21
- function cn(...inputs) {
22
- return tailwindMerge.twMerge(clsx.clsx(inputs));
23
- }
24
- var DEFAULT_SIZE = 40;
25
- var DEFAULT_MAGNIFICATION = 60;
26
- var DEFAULT_DISTANCE = 140;
27
- var dockVariants = classVarianceAuthority.cva(
28
- // Solid themed surface (no glass/blur)
29
- "mx-auto mt-8 flex h-[58px] w-max items-center justify-center gap-2 rounded-2xl bg-card p-2 shadow-card"
30
- );
31
- var Dock = React__default.default.forwardRef(
32
- ({
33
- className,
34
- children,
35
- iconSize = DEFAULT_SIZE,
36
- iconMagnification = DEFAULT_MAGNIFICATION,
37
- iconDistance = DEFAULT_DISTANCE,
38
- direction = "middle",
39
- ...props
40
- }, ref) => {
41
- const mouseX = react.useMotionValue(Infinity);
42
- const prefersReducedMotion = react.useReducedMotion();
43
- const renderChildren = () => {
44
- return React__default.default.Children.map(children, (child) => {
45
- if (React__default.default.isValidElement(child) && child.type === DockIcon) {
46
- return React__default.default.cloneElement(child, {
47
- ...child.props,
48
- mouseX,
49
- size: iconSize,
50
- magnification: iconMagnification,
51
- distance: iconDistance
52
- });
53
- }
54
- return child;
55
- });
56
- };
57
- return /* @__PURE__ */ jsxRuntime.jsx(
58
- react.motion.div,
59
- {
60
- ref,
61
- onMouseMove: prefersReducedMotion ? void 0 : (event) => mouseX.set(event.pageX),
62
- onMouseLeave: prefersReducedMotion ? void 0 : () => mouseX.set(Infinity),
63
- ...props,
64
- className: cn(dockVariants({ className }), {
65
- "items-start": direction === "top",
66
- "items-center": direction === "middle",
67
- "items-end": direction === "bottom"
68
- }),
69
- children: renderChildren()
70
- }
71
- );
72
- }
73
- );
13
+ //#region src/components/dock.tsx
14
+ const DEFAULT_SIZE = 40;
15
+ const DEFAULT_MAGNIFICATION = 60;
16
+ const DEFAULT_DISTANCE = 140;
17
+ const dockVariants = (0, class_variance_authority.cva)("mx-auto mt-8 flex h-[58px] w-max items-center justify-center gap-2 rounded-2xl bg-card p-2 shadow-card");
18
+ const Dock = react.default.forwardRef(({ className, children, iconSize = DEFAULT_SIZE, iconMagnification = DEFAULT_MAGNIFICATION, iconDistance = DEFAULT_DISTANCE, direction = "middle", ...props }, ref) => {
19
+ const mouseX = (0, motion_react.useMotionValue)(Infinity);
20
+ const prefersReducedMotion = (0, motion_react.useReducedMotion)();
21
+ const renderChildren = () => {
22
+ return react.default.Children.map(children, (child) => {
23
+ if (react.default.isValidElement(child) && child.type === DockIcon) return react.default.cloneElement(child, {
24
+ ...child.props,
25
+ mouseX,
26
+ size: iconSize,
27
+ magnification: iconMagnification,
28
+ distance: iconDistance
29
+ });
30
+ return child;
31
+ });
32
+ };
33
+ return /* @__PURE__ */ (0, react_jsx_runtime.jsx)(motion_react.motion.div, {
34
+ ref,
35
+ onMouseMove: prefersReducedMotion ? void 0 : (event) => mouseX.set(event.pageX),
36
+ onMouseLeave: prefersReducedMotion ? void 0 : () => mouseX.set(Infinity),
37
+ ...props,
38
+ className: require_utils.cn(dockVariants({ className }), {
39
+ "items-start": direction === "top",
40
+ "items-center": direction === "middle",
41
+ "items-end": direction === "bottom"
42
+ }),
43
+ children: renderChildren()
44
+ });
45
+ });
74
46
  Dock.displayName = "Dock";
75
- var DockIcon = ({
76
- size = DEFAULT_SIZE,
77
- magnification = DEFAULT_MAGNIFICATION,
78
- distance = DEFAULT_DISTANCE,
79
- mouseX,
80
- className,
81
- children,
82
- ...props
83
- }) => {
84
- const ref = React.useRef(null);
85
- const prefersReducedMotion = react.useReducedMotion();
86
- const padding = Math.max(6, size * 0.2);
87
- const defaultMouseX = react.useMotionValue(Infinity);
88
- const distanceCalc = react.useTransform(mouseX ?? defaultMouseX, (val) => {
89
- const bounds = ref.current?.getBoundingClientRect() ?? { x: 0, width: 0 };
90
- return val - bounds.x - bounds.width / 2;
91
- });
92
- const sizeTransform = react.useTransform(distanceCalc, [-distance, 0, distance], [size, magnification, size]);
93
- const scaleSize = react.useSpring(sizeTransform, {
94
- mass: springs.gentle.mass,
95
- stiffness: springs.gentle.stiffness,
96
- damping: 12
97
- });
98
- return /* @__PURE__ */ jsxRuntime.jsx(
99
- react.motion.div,
100
- {
101
- ref,
102
- style: { width: prefersReducedMotion ? size : scaleSize, height: prefersReducedMotion ? size : scaleSize, padding },
103
- className: cn(
104
- // Solid hover target with theme-aware colors
105
- "flex aspect-square cursor-pointer items-center justify-center rounded-full bg-transparent",
106
- `hover:bg-muted focus-visible:bg-muted/80 focus-visible:outline-ring transition-colors duration-200
107
- focus-visible:outline`,
108
- className
109
- ),
110
- ...props,
111
- children
112
- }
113
- );
47
+ const DockIcon = ({ size = DEFAULT_SIZE, magnification = DEFAULT_MAGNIFICATION, distance = DEFAULT_DISTANCE, mouseX, className, children, ...props }) => {
48
+ const ref = (0, react.useRef)(null);
49
+ const prefersReducedMotion = (0, motion_react.useReducedMotion)();
50
+ const padding = Math.max(6, size * .2);
51
+ const defaultMouseX = (0, motion_react.useMotionValue)(Infinity);
52
+ const scaleSize = (0, motion_react.useSpring)((0, motion_react.useTransform)((0, motion_react.useTransform)(mouseX ?? defaultMouseX, (val) => {
53
+ const bounds = ref.current?.getBoundingClientRect() ?? {
54
+ x: 0,
55
+ width: 0
56
+ };
57
+ return val - bounds.x - bounds.width / 2;
58
+ }), [
59
+ -distance,
60
+ 0,
61
+ distance
62
+ ], [
63
+ size,
64
+ magnification,
65
+ size
66
+ ]), {
67
+ mass: require_motion_config.springs.gentle.mass,
68
+ stiffness: require_motion_config.springs.gentle.stiffness,
69
+ damping: 12
70
+ });
71
+ return /* @__PURE__ */ (0, react_jsx_runtime.jsx)(motion_react.motion.div, {
72
+ ref,
73
+ style: {
74
+ width: prefersReducedMotion ? size : scaleSize,
75
+ height: prefersReducedMotion ? size : scaleSize,
76
+ padding
77
+ },
78
+ className: require_utils.cn("flex aspect-square cursor-pointer items-center justify-center rounded-full bg-transparent", `hover:bg-muted focus-visible:bg-muted/80 focus-visible:outline-ring transition-colors duration-200
79
+ focus-visible:outline`, className),
80
+ ...props,
81
+ children
82
+ });
114
83
  };
115
84
  DockIcon.displayName = "DockIcon";
116
85
 
86
+ //#endregion
117
87
  exports.Dock = Dock;
118
88
  exports.DockIcon = DockIcon;
119
89
  exports.dockVariants = dockVariants;
120
- //# sourceMappingURL=dock.cjs.map
121
90
  //# sourceMappingURL=dock.cjs.map
@@ -1 +1 @@
1
- {"version":3,"sources":["../../src/lib/motion/motion-config.ts","../../src/lib/utils.ts","../../src/components/dock.tsx"],"names":["twMerge","clsx","cva","React","useMotionValue","useReducedMotion","jsx","motion","useRef","useTransform","useSpring"],"mappings":";;;;;;;;;;;;;AA8EO,IAAM,OAAA,GAAU;AAAA,EAetB;AAAA,EAGA,MAAA,EAAQ;AAAA,IAEP,SAAA,EAAW,GAAA;AAAA,IAEX,IAAA,EAAM;AAAA,GAiBR,CAAA;AClHO,SAAS,MAAM,MAAA,EAAsB;AAC1C,EAAA,OAAOA,qBAAA,CAAQC,SAAA,CAAK,MAAM,CAAC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A,EAAM,aAAA,EAAe,IAAI,CAAC,CAAA;AAEtG,EAAA,MAAM,SAAA,GAAYC,gBAAU,aAAA,EAAe;AAAA,IAC1C,IAAA,EAAM,QAAQ,MAAA,CAAO,IAAA;AAAA,IACrB,SAAA,EAAW,QAAQ,MAAA,CAAO,SAAA;AAAA,IAC1B,OAAA,EAAS;AAAA,GACT,CAAA;AAED,EAAA,uBACCJ,cAAA;AAAA,IAACC,YAAA,CAAO,GAAA;AAAA,IAAP;AAAA,MACA,GAAA;AAAA,MACA,KAAA,EAAO,EAAE,KAAA,EAAO,oBAAA,GAAuB,IAAA,GAAO,WAAW,MAAA,EAAQ,oBAAA,GAAuB,IAAA,GAAO,SAAA,EAAW,OAAA,EAAQ;AAAA,MAClH,SAAA,EAAW,EAAA;AAAA;AAAA,QAEV,2FAAA;AAAA,QACA,CAAA;AAAA,yBAAA,CAAA;AAAA,QAEA;AAAA,OACD;AAAA,MACC,GAAG,KAAA;AAAA,MAEH;AAAA;AAAA,GACF;AAEF;AAEA,QAAA,CAAS,WAAA,GAAc,UAAA","file":"dock.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 React, { PropsWithChildren, useRef } from 'react';\nimport { cva, type VariantProps } from 'class-variance-authority';\nimport {\n\tmotion,\n\tMotionProps,\n\tMotionValue,\n\tuseMotionValue,\n\tuseReducedMotion,\n\tuseSpring,\n\tuseTransform,\n} from 'motion/react';\n\nimport { springs } from '../lib/motion/motion-config';\nimport { cn } from '../lib/utils';\n\nexport interface DockProps extends VariantProps<typeof dockVariants> {\n\tclassName?: string;\n\ticonSize?: number;\n\ticonMagnification?: number;\n\ticonDistance?: number;\n\tdirection?: 'top' | 'middle' | 'bottom';\n\tchildren: React.ReactNode;\n}\n\nconst DEFAULT_SIZE = 40;\nconst DEFAULT_MAGNIFICATION = 60;\nconst DEFAULT_DISTANCE = 140;\n\nconst dockVariants = cva(\n\t// Solid themed surface (no glass/blur)\n\t'mx-auto mt-8 flex h-[58px] w-max items-center justify-center gap-2 rounded-2xl bg-card p-2 shadow-card',\n);\n\nconst Dock = React.forwardRef<HTMLDivElement, DockProps>(\n\t(\n\t\t{\n\t\t\tclassName,\n\t\t\tchildren,\n\t\t\ticonSize = DEFAULT_SIZE,\n\t\t\ticonMagnification = DEFAULT_MAGNIFICATION,\n\t\t\ticonDistance = DEFAULT_DISTANCE,\n\t\t\tdirection = 'middle',\n\t\t\t...props\n\t\t},\n\t\tref,\n\t) => {\n\t\tconst mouseX = useMotionValue(Infinity);\n\t\tconst prefersReducedMotion = useReducedMotion();\n\n\t\tconst renderChildren = () => {\n\t\t\treturn React.Children.map(children, (child) => {\n\t\t\t\tif (React.isValidElement<DockIconProps>(child) && child.type === DockIcon) {\n\t\t\t\t\treturn React.cloneElement(child, {\n\t\t\t\t\t\t...child.props,\n\t\t\t\t\t\tmouseX: mouseX,\n\t\t\t\t\t\tsize: iconSize,\n\t\t\t\t\t\tmagnification: iconMagnification,\n\t\t\t\t\t\tdistance: iconDistance,\n\t\t\t\t\t});\n\t\t\t\t}\n\t\t\t\treturn child;\n\t\t\t});\n\t\t};\n\n\t\treturn (\n\t\t\t<motion.div\n\t\t\t\tref={ref}\n\t\t\t\tonMouseMove={prefersReducedMotion ? undefined : (event) => mouseX.set(event.pageX)}\n\t\t\t\tonMouseLeave={prefersReducedMotion ? undefined : () => mouseX.set(Infinity)}\n\t\t\t\t{...props}\n\t\t\t\tclassName={cn(dockVariants({ className }), {\n\t\t\t\t\t'items-start': direction === 'top',\n\t\t\t\t\t'items-center': direction === 'middle',\n\t\t\t\t\t'items-end': direction === 'bottom',\n\t\t\t\t})}\n\t\t\t>\n\t\t\t\t{renderChildren()}\n\t\t\t</motion.div>\n\t\t);\n\t},\n);\n\nDock.displayName = 'Dock';\n\nexport interface DockIconProps extends Omit<MotionProps & React.HTMLAttributes<HTMLDivElement>, 'children'> {\n\tsize?: number;\n\tmagnification?: number;\n\tdistance?: number;\n\tmouseX?: MotionValue<number>;\n\tclassName?: string;\n\tchildren?: React.ReactNode;\n\tprops?: PropsWithChildren;\n}\n\nconst DockIcon = ({\n\tsize = DEFAULT_SIZE,\n\tmagnification = DEFAULT_MAGNIFICATION,\n\tdistance = DEFAULT_DISTANCE,\n\tmouseX,\n\tclassName,\n\tchildren,\n\t...props\n}: DockIconProps) => {\n\tconst ref = useRef<HTMLDivElement>(null);\n\tconst prefersReducedMotion = useReducedMotion();\n\tconst padding = Math.max(6, size * 0.2);\n\tconst defaultMouseX = useMotionValue(Infinity);\n\n\tconst distanceCalc = useTransform(mouseX ?? defaultMouseX, (val: number) => {\n\t\tconst bounds = ref.current?.getBoundingClientRect() ?? { x: 0, width: 0 };\n\t\treturn val - bounds.x - bounds.width / 2;\n\t});\n\n\tconst sizeTransform = useTransform(distanceCalc, [-distance, 0, distance], [size, magnification, size]);\n\n\tconst scaleSize = useSpring(sizeTransform, {\n\t\tmass: springs.gentle.mass,\n\t\tstiffness: springs.gentle.stiffness,\n\t\tdamping: 12,\n\t});\n\n\treturn (\n\t\t<motion.div\n\t\t\tref={ref}\n\t\t\tstyle={{ width: prefersReducedMotion ? size : scaleSize, height: prefersReducedMotion ? size : scaleSize, padding }}\n\t\t\tclassName={cn(\n\t\t\t\t// Solid hover target with theme-aware colors\n\t\t\t\t'flex aspect-square cursor-pointer items-center justify-center rounded-full bg-transparent',\n\t\t\t\t`hover:bg-muted focus-visible:bg-muted/80 focus-visible:outline-ring transition-colors duration-200\n\t\t\t\tfocus-visible:outline`,\n\t\t\t\tclassName,\n\t\t\t)}\n\t\t\t{...props}\n\t\t>\n\t\t\t{children}\n\t\t</motion.div>\n\t);\n};\n\nDockIcon.displayName = 'DockIcon';\n\nexport { Dock, DockIcon, dockVariants };\n"]}
1
+ {"version":3,"file":"dock.cjs","names":["React","motion","cn","springs"],"sources":["../../src/components/dock.tsx"],"sourcesContent":["'use client';\n\nimport React, { PropsWithChildren, useRef } from 'react';\nimport { cva, type VariantProps } from 'class-variance-authority';\nimport {\n\tmotion,\n\tMotionProps,\n\tMotionValue,\n\tuseMotionValue,\n\tuseReducedMotion,\n\tuseSpring,\n\tuseTransform,\n} from 'motion/react';\n\nimport { springs } from '../lib/motion/motion-config';\nimport { cn } from '../lib/utils';\n\nexport interface DockProps extends VariantProps<typeof dockVariants> {\n\tclassName?: string;\n\ticonSize?: number;\n\ticonMagnification?: number;\n\ticonDistance?: number;\n\tdirection?: 'top' | 'middle' | 'bottom';\n\tchildren: React.ReactNode;\n}\n\nconst DEFAULT_SIZE = 40;\nconst DEFAULT_MAGNIFICATION = 60;\nconst DEFAULT_DISTANCE = 140;\n\nconst dockVariants = cva(\n\t// Solid themed surface (no glass/blur)\n\t'mx-auto mt-8 flex h-[58px] w-max items-center justify-center gap-2 rounded-2xl bg-card p-2 shadow-card',\n);\n\nconst Dock = React.forwardRef<HTMLDivElement, DockProps>(\n\t(\n\t\t{\n\t\t\tclassName,\n\t\t\tchildren,\n\t\t\ticonSize = DEFAULT_SIZE,\n\t\t\ticonMagnification = DEFAULT_MAGNIFICATION,\n\t\t\ticonDistance = DEFAULT_DISTANCE,\n\t\t\tdirection = 'middle',\n\t\t\t...props\n\t\t},\n\t\tref,\n\t) => {\n\t\tconst mouseX = useMotionValue(Infinity);\n\t\tconst prefersReducedMotion = useReducedMotion();\n\n\t\tconst renderChildren = () => {\n\t\t\treturn React.Children.map(children, (child) => {\n\t\t\t\tif (React.isValidElement<DockIconProps>(child) && child.type === DockIcon) {\n\t\t\t\t\treturn React.cloneElement(child, {\n\t\t\t\t\t\t...child.props,\n\t\t\t\t\t\tmouseX: mouseX,\n\t\t\t\t\t\tsize: iconSize,\n\t\t\t\t\t\tmagnification: iconMagnification,\n\t\t\t\t\t\tdistance: iconDistance,\n\t\t\t\t\t});\n\t\t\t\t}\n\t\t\t\treturn child;\n\t\t\t});\n\t\t};\n\n\t\treturn (\n\t\t\t<motion.div\n\t\t\t\tref={ref}\n\t\t\t\tonMouseMove={prefersReducedMotion ? undefined : (event) => mouseX.set(event.pageX)}\n\t\t\t\tonMouseLeave={prefersReducedMotion ? undefined : () => mouseX.set(Infinity)}\n\t\t\t\t{...props}\n\t\t\t\tclassName={cn(dockVariants({ className }), {\n\t\t\t\t\t'items-start': direction === 'top',\n\t\t\t\t\t'items-center': direction === 'middle',\n\t\t\t\t\t'items-end': direction === 'bottom',\n\t\t\t\t})}\n\t\t\t>\n\t\t\t\t{renderChildren()}\n\t\t\t</motion.div>\n\t\t);\n\t},\n);\n\nDock.displayName = 'Dock';\n\nexport interface DockIconProps extends Omit<MotionProps & React.HTMLAttributes<HTMLDivElement>, 'children'> {\n\tsize?: number;\n\tmagnification?: number;\n\tdistance?: number;\n\tmouseX?: MotionValue<number>;\n\tclassName?: string;\n\tchildren?: React.ReactNode;\n\tprops?: PropsWithChildren;\n}\n\nconst DockIcon = ({\n\tsize = DEFAULT_SIZE,\n\tmagnification = DEFAULT_MAGNIFICATION,\n\tdistance = DEFAULT_DISTANCE,\n\tmouseX,\n\tclassName,\n\tchildren,\n\t...props\n}: DockIconProps) => {\n\tconst ref = useRef<HTMLDivElement>(null);\n\tconst prefersReducedMotion = useReducedMotion();\n\tconst padding = Math.max(6, size * 0.2);\n\tconst defaultMouseX = useMotionValue(Infinity);\n\n\tconst distanceCalc = useTransform(mouseX ?? defaultMouseX, (val: number) => {\n\t\tconst bounds = ref.current?.getBoundingClientRect() ?? { x: 0, width: 0 };\n\t\treturn val - bounds.x - bounds.width / 2;\n\t});\n\n\tconst sizeTransform = useTransform(distanceCalc, [-distance, 0, distance], [size, magnification, size]);\n\n\tconst scaleSize = useSpring(sizeTransform, {\n\t\tmass: springs.gentle.mass,\n\t\tstiffness: springs.gentle.stiffness,\n\t\tdamping: 12,\n\t});\n\n\treturn (\n\t\t<motion.div\n\t\t\tref={ref}\n\t\t\tstyle={{ width: prefersReducedMotion ? size : scaleSize, height: prefersReducedMotion ? size : scaleSize, padding }}\n\t\t\tclassName={cn(\n\t\t\t\t// Solid hover target with theme-aware colors\n\t\t\t\t'flex aspect-square cursor-pointer items-center justify-center rounded-full bg-transparent',\n\t\t\t\t`hover:bg-muted focus-visible:bg-muted/80 focus-visible:outline-ring transition-colors duration-200\n\t\t\t\tfocus-visible:outline`,\n\t\t\t\tclassName,\n\t\t\t)}\n\t\t\t{...props}\n\t\t>\n\t\t\t{children}\n\t\t</motion.div>\n\t);\n};\n\nDockIcon.displayName = 'DockIcon';\n\nexport { Dock, DockIcon, dockVariants };\n"],"mappings":";;;;;;;;;;;;;AA0BA,MAAM,eAAe;AACrB,MAAM,wBAAwB;AAC9B,MAAM,mBAAmB;AAEzB,MAAM,iDAEL,wGACD;AAE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AWA,8BAAQ,OAAO;EAC1B,SAAS;CACV,CAAC;CAED,OACC,2CAACF,oBAAO,KAAR;EACM;EACL,OAAO;GAAE,OAAO,uBAAuB,OAAO;GAAW,QAAQ,uBAAuB,OAAO;GAAW;EAAQ;EAClH,WAAWC,iBAEV,6FACA;4BAEA,SACD;EACA,GAAI;EAEH;CACU;AAEd;AAEA,SAAS,cAAc"}
@@ -1,30 +1,30 @@
1
- import * as class_variance_authority_types from 'class-variance-authority/types';
2
- import React__default, { PropsWithChildren } from 'react';
3
- import { VariantProps } from 'class-variance-authority';
4
- import { MotionProps, MotionValue } from 'motion/react';
5
-
1
+ import React, { PropsWithChildren } from "react";
2
+ import { VariantProps } from "class-variance-authority";
3
+ import { MotionProps, MotionValue } from "motion/react";
4
+ //#region src/components/dock.d.ts
6
5
  interface DockProps extends VariantProps<typeof dockVariants> {
7
- className?: string;
8
- iconSize?: number;
9
- iconMagnification?: number;
10
- iconDistance?: number;
11
- direction?: 'top' | 'middle' | 'bottom';
12
- children: React__default.ReactNode;
6
+ className?: string;
7
+ iconSize?: number;
8
+ iconMagnification?: number;
9
+ iconDistance?: number;
10
+ direction?: 'top' | 'middle' | 'bottom';
11
+ children: React.ReactNode;
13
12
  }
14
- declare const dockVariants: (props?: class_variance_authority_types.ClassProp | undefined) => string;
15
- declare const Dock: React__default.ForwardRefExoticComponent<DockProps & React__default.RefAttributes<HTMLDivElement>>;
16
- interface DockIconProps extends Omit<MotionProps & React__default.HTMLAttributes<HTMLDivElement>, 'children'> {
17
- size?: number;
18
- magnification?: number;
19
- distance?: number;
20
- mouseX?: MotionValue<number>;
21
- className?: string;
22
- children?: React__default.ReactNode;
23
- props?: PropsWithChildren;
13
+ declare const dockVariants: (props?: import("class-variance-authority/types").ClassProp | undefined) => string;
14
+ declare const Dock: React.ForwardRefExoticComponent<DockProps & React.RefAttributes<HTMLDivElement>>;
15
+ interface DockIconProps extends Omit<MotionProps & React.HTMLAttributes<HTMLDivElement>, 'children'> {
16
+ size?: number;
17
+ magnification?: number;
18
+ distance?: number;
19
+ mouseX?: MotionValue<number>;
20
+ className?: string;
21
+ children?: React.ReactNode;
22
+ props?: PropsWithChildren;
24
23
  }
25
24
  declare const DockIcon: {
26
- ({ size, magnification, distance, mouseX, className, children, ...props }: DockIconProps): React__default.JSX.Element;
27
- displayName: string;
25
+ ({ size, magnification, distance, mouseX, className, children, ...props }: DockIconProps): React.JSX.Element;
26
+ displayName: string;
28
27
  };
29
-
30
- export { Dock, DockIcon, type DockIconProps, type DockProps, dockVariants };
28
+ //#endregion
29
+ export { Dock, DockIcon, DockIconProps, DockProps, dockVariants };
30
+ //# sourceMappingURL=dock.d.cts.map
@@ -1,30 +1,30 @@
1
- import * as class_variance_authority_types from 'class-variance-authority/types';
2
- import React__default, { PropsWithChildren } from 'react';
3
- import { VariantProps } from 'class-variance-authority';
4
- import { MotionProps, MotionValue } from 'motion/react';
5
-
1
+ import React, { PropsWithChildren } from "react";
2
+ import { VariantProps } from "class-variance-authority";
3
+ import { MotionProps, MotionValue } from "motion/react";
4
+ //#region src/components/dock.d.ts
6
5
  interface DockProps extends VariantProps<typeof dockVariants> {
7
- className?: string;
8
- iconSize?: number;
9
- iconMagnification?: number;
10
- iconDistance?: number;
11
- direction?: 'top' | 'middle' | 'bottom';
12
- children: React__default.ReactNode;
6
+ className?: string;
7
+ iconSize?: number;
8
+ iconMagnification?: number;
9
+ iconDistance?: number;
10
+ direction?: 'top' | 'middle' | 'bottom';
11
+ children: React.ReactNode;
13
12
  }
14
- declare const dockVariants: (props?: class_variance_authority_types.ClassProp | undefined) => string;
15
- declare const Dock: React__default.ForwardRefExoticComponent<DockProps & React__default.RefAttributes<HTMLDivElement>>;
16
- interface DockIconProps extends Omit<MotionProps & React__default.HTMLAttributes<HTMLDivElement>, 'children'> {
17
- size?: number;
18
- magnification?: number;
19
- distance?: number;
20
- mouseX?: MotionValue<number>;
21
- className?: string;
22
- children?: React__default.ReactNode;
23
- props?: PropsWithChildren;
13
+ declare const dockVariants: (props?: import("class-variance-authority/types").ClassProp | undefined) => string;
14
+ declare const Dock: React.ForwardRefExoticComponent<DockProps & React.RefAttributes<HTMLDivElement>>;
15
+ interface DockIconProps extends Omit<MotionProps & React.HTMLAttributes<HTMLDivElement>, 'children'> {
16
+ size?: number;
17
+ magnification?: number;
18
+ distance?: number;
19
+ mouseX?: MotionValue<number>;
20
+ className?: string;
21
+ children?: React.ReactNode;
22
+ props?: PropsWithChildren;
24
23
  }
25
24
  declare const DockIcon: {
26
- ({ size, magnification, distance, mouseX, className, children, ...props }: DockIconProps): React__default.JSX.Element;
27
- displayName: string;
25
+ ({ size, magnification, distance, mouseX, className, children, ...props }: DockIconProps): React.JSX.Element;
26
+ displayName: string;
28
27
  };
29
-
30
- export { Dock, DockIcon, type DockIconProps, type DockProps, dockVariants };
28
+ //#endregion
29
+ export { Dock, DockIcon, DockIconProps, DockProps, dockVariants };
30
+ //# sourceMappingURL=dock.d.ts.map
@@ -1,113 +1,85 @@
1
- "use client";
2
- import React, { useRef } from 'react';
3
- import { cva } from 'class-variance-authority';
4
- import { useMotionValue, useReducedMotion, motion, useTransform, useSpring } from 'motion/react';
5
- import { clsx } from 'clsx';
6
- import { twMerge } from 'tailwind-merge';
7
- import { jsx } from 'react/jsx-runtime';
1
+ 'use client';
8
2
 
9
- var springs = {
10
- /** Gentle spring - good for large elements */
11
- gentle: {
12
- stiffness: 150,
13
- mass: 1
14
- }};
15
- function cn(...inputs) {
16
- return twMerge(clsx(inputs));
17
- }
18
- var DEFAULT_SIZE = 40;
19
- var DEFAULT_MAGNIFICATION = 60;
20
- var DEFAULT_DISTANCE = 140;
21
- var dockVariants = cva(
22
- // Solid themed surface (no glass/blur)
23
- "mx-auto mt-8 flex h-[58px] w-max items-center justify-center gap-2 rounded-2xl bg-card p-2 shadow-card"
24
- );
25
- var Dock = React.forwardRef(
26
- ({
27
- className,
28
- children,
29
- iconSize = DEFAULT_SIZE,
30
- iconMagnification = DEFAULT_MAGNIFICATION,
31
- iconDistance = DEFAULT_DISTANCE,
32
- direction = "middle",
33
- ...props
34
- }, ref) => {
35
- const mouseX = useMotionValue(Infinity);
36
- const prefersReducedMotion = useReducedMotion();
37
- const renderChildren = () => {
38
- return React.Children.map(children, (child) => {
39
- if (React.isValidElement(child) && child.type === DockIcon) {
40
- return React.cloneElement(child, {
41
- ...child.props,
42
- mouseX,
43
- size: iconSize,
44
- magnification: iconMagnification,
45
- distance: iconDistance
46
- });
47
- }
48
- return child;
49
- });
50
- };
51
- return /* @__PURE__ */ jsx(
52
- motion.div,
53
- {
54
- ref,
55
- onMouseMove: prefersReducedMotion ? void 0 : (event) => mouseX.set(event.pageX),
56
- onMouseLeave: prefersReducedMotion ? void 0 : () => mouseX.set(Infinity),
57
- ...props,
58
- className: cn(dockVariants({ className }), {
59
- "items-start": direction === "top",
60
- "items-center": direction === "middle",
61
- "items-end": direction === "bottom"
62
- }),
63
- children: renderChildren()
64
- }
65
- );
66
- }
67
- );
3
+ import { t as cn } from "../utils-BkMLyah9.js";
4
+ import { r as springs } from "../motion-config-COsZ6azM.js";
5
+ import React, { useRef } from "react";
6
+ import { jsx } from "react/jsx-runtime";
7
+ import { cva } from "class-variance-authority";
8
+ import { motion, useMotionValue, useReducedMotion, useSpring, useTransform } from "motion/react";
9
+
10
+ //#region src/components/dock.tsx
11
+ const DEFAULT_SIZE = 40;
12
+ const DEFAULT_MAGNIFICATION = 60;
13
+ const DEFAULT_DISTANCE = 140;
14
+ const dockVariants = cva("mx-auto mt-8 flex h-[58px] w-max items-center justify-center gap-2 rounded-2xl bg-card p-2 shadow-card");
15
+ const Dock = React.forwardRef(({ className, children, iconSize = DEFAULT_SIZE, iconMagnification = DEFAULT_MAGNIFICATION, iconDistance = DEFAULT_DISTANCE, direction = "middle", ...props }, ref) => {
16
+ const mouseX = useMotionValue(Infinity);
17
+ const prefersReducedMotion = useReducedMotion();
18
+ const renderChildren = () => {
19
+ return React.Children.map(children, (child) => {
20
+ if (React.isValidElement(child) && child.type === DockIcon) return React.cloneElement(child, {
21
+ ...child.props,
22
+ mouseX,
23
+ size: iconSize,
24
+ magnification: iconMagnification,
25
+ distance: iconDistance
26
+ });
27
+ return child;
28
+ });
29
+ };
30
+ return /* @__PURE__ */ jsx(motion.div, {
31
+ ref,
32
+ onMouseMove: prefersReducedMotion ? void 0 : (event) => mouseX.set(event.pageX),
33
+ onMouseLeave: prefersReducedMotion ? void 0 : () => mouseX.set(Infinity),
34
+ ...props,
35
+ className: cn(dockVariants({ className }), {
36
+ "items-start": direction === "top",
37
+ "items-center": direction === "middle",
38
+ "items-end": direction === "bottom"
39
+ }),
40
+ children: renderChildren()
41
+ });
42
+ });
68
43
  Dock.displayName = "Dock";
69
- var DockIcon = ({
70
- size = DEFAULT_SIZE,
71
- magnification = DEFAULT_MAGNIFICATION,
72
- distance = DEFAULT_DISTANCE,
73
- mouseX,
74
- className,
75
- children,
76
- ...props
77
- }) => {
78
- const ref = useRef(null);
79
- const prefersReducedMotion = useReducedMotion();
80
- const padding = Math.max(6, size * 0.2);
81
- const defaultMouseX = useMotionValue(Infinity);
82
- const distanceCalc = useTransform(mouseX ?? defaultMouseX, (val) => {
83
- const bounds = ref.current?.getBoundingClientRect() ?? { x: 0, width: 0 };
84
- return val - bounds.x - bounds.width / 2;
85
- });
86
- const sizeTransform = useTransform(distanceCalc, [-distance, 0, distance], [size, magnification, size]);
87
- const scaleSize = useSpring(sizeTransform, {
88
- mass: springs.gentle.mass,
89
- stiffness: springs.gentle.stiffness,
90
- damping: 12
91
- });
92
- return /* @__PURE__ */ jsx(
93
- motion.div,
94
- {
95
- ref,
96
- style: { width: prefersReducedMotion ? size : scaleSize, height: prefersReducedMotion ? size : scaleSize, padding },
97
- className: cn(
98
- // Solid hover target with theme-aware colors
99
- "flex aspect-square cursor-pointer items-center justify-center rounded-full bg-transparent",
100
- `hover:bg-muted focus-visible:bg-muted/80 focus-visible:outline-ring transition-colors duration-200
101
- focus-visible:outline`,
102
- className
103
- ),
104
- ...props,
105
- children
106
- }
107
- );
44
+ const DockIcon = ({ size = DEFAULT_SIZE, magnification = DEFAULT_MAGNIFICATION, distance = DEFAULT_DISTANCE, mouseX, className, children, ...props }) => {
45
+ const ref = useRef(null);
46
+ const prefersReducedMotion = useReducedMotion();
47
+ const padding = Math.max(6, size * .2);
48
+ const defaultMouseX = useMotionValue(Infinity);
49
+ const scaleSize = useSpring(useTransform(useTransform(mouseX ?? defaultMouseX, (val) => {
50
+ const bounds = ref.current?.getBoundingClientRect() ?? {
51
+ x: 0,
52
+ width: 0
53
+ };
54
+ return val - bounds.x - bounds.width / 2;
55
+ }), [
56
+ -distance,
57
+ 0,
58
+ distance
59
+ ], [
60
+ size,
61
+ magnification,
62
+ size
63
+ ]), {
64
+ mass: springs.gentle.mass,
65
+ stiffness: springs.gentle.stiffness,
66
+ damping: 12
67
+ });
68
+ return /* @__PURE__ */ jsx(motion.div, {
69
+ ref,
70
+ style: {
71
+ width: prefersReducedMotion ? size : scaleSize,
72
+ height: prefersReducedMotion ? size : scaleSize,
73
+ padding
74
+ },
75
+ className: cn("flex aspect-square cursor-pointer items-center justify-center rounded-full bg-transparent", `hover:bg-muted focus-visible:bg-muted/80 focus-visible:outline-ring transition-colors duration-200
76
+ focus-visible:outline`, className),
77
+ ...props,
78
+ children
79
+ });
108
80
  };
109
81
  DockIcon.displayName = "DockIcon";
110
82
 
83
+ //#endregion
111
84
  export { Dock, DockIcon, dockVariants };
112
- //# sourceMappingURL=dock.js.map
113
85
  //# sourceMappingURL=dock.js.map
@@ -1 +1 @@
1
- {"version":3,"sources":["../../src/lib/motion/motion-config.ts","../../src/lib/utils.ts","../../src/components/dock.tsx"],"names":[],"mappings":";;;;;;;AA8EO,IAAM,OAAA,GAAU;AAAA,EAetB;AAAA,EAGA,MAAA,EAAQ;AAAA,IAEP,SAAA,EAAW,GAAA;AAAA,IAEX,IAAA,EAAM;AAAA,GAiBR,CAAA;AClHO,SAAS,MAAM,MAAA,EAAsB;AAC1C,EAAA,OAAO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G,CAAC,IAAA,EAAM,aAAA,EAAe,IAAI,CAAC,CAAA;AAEtG,EAAA,MAAM,SAAA,GAAY,UAAU,aAAA,EAAe;AAAA,IAC1C,IAAA,EAAM,QAAQ,MAAA,CAAO,IAAA;AAAA,IACrB,SAAA,EAAW,QAAQ,MAAA,CAAO,SAAA;AAAA,IAC1B,OAAA,EAAS;AAAA,GACT,CAAA;AAED,EAAA,uBACC,GAAA;AAAA,IAAC,MAAA,CAAO,GAAA;AAAA,IAAP;AAAA,MACA,GAAA;AAAA,MACA,KAAA,EAAO,EAAE,KAAA,EAAO,oBAAA,GAAuB,IAAA,GAAO,WAAW,MAAA,EAAQ,oBAAA,GAAuB,IAAA,GAAO,SAAA,EAAW,OAAA,EAAQ;AAAA,MAClH,SAAA,EAAW,EAAA;AAAA;AAAA,QAEV,2FAAA;AAAA,QACA,CAAA;AAAA,yBAAA,CAAA;AAAA,QAEA;AAAA,OACD;AAAA,MACC,GAAG,KAAA;AAAA,MAEH;AAAA;AAAA,GACF;AAEF;AAEA,QAAA,CAAS,WAAA,GAAc,UAAA","file":"dock.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 React, { PropsWithChildren, useRef } from 'react';\nimport { cva, type VariantProps } from 'class-variance-authority';\nimport {\n\tmotion,\n\tMotionProps,\n\tMotionValue,\n\tuseMotionValue,\n\tuseReducedMotion,\n\tuseSpring,\n\tuseTransform,\n} from 'motion/react';\n\nimport { springs } from '../lib/motion/motion-config';\nimport { cn } from '../lib/utils';\n\nexport interface DockProps extends VariantProps<typeof dockVariants> {\n\tclassName?: string;\n\ticonSize?: number;\n\ticonMagnification?: number;\n\ticonDistance?: number;\n\tdirection?: 'top' | 'middle' | 'bottom';\n\tchildren: React.ReactNode;\n}\n\nconst DEFAULT_SIZE = 40;\nconst DEFAULT_MAGNIFICATION = 60;\nconst DEFAULT_DISTANCE = 140;\n\nconst dockVariants = cva(\n\t// Solid themed surface (no glass/blur)\n\t'mx-auto mt-8 flex h-[58px] w-max items-center justify-center gap-2 rounded-2xl bg-card p-2 shadow-card',\n);\n\nconst Dock = React.forwardRef<HTMLDivElement, DockProps>(\n\t(\n\t\t{\n\t\t\tclassName,\n\t\t\tchildren,\n\t\t\ticonSize = DEFAULT_SIZE,\n\t\t\ticonMagnification = DEFAULT_MAGNIFICATION,\n\t\t\ticonDistance = DEFAULT_DISTANCE,\n\t\t\tdirection = 'middle',\n\t\t\t...props\n\t\t},\n\t\tref,\n\t) => {\n\t\tconst mouseX = useMotionValue(Infinity);\n\t\tconst prefersReducedMotion = useReducedMotion();\n\n\t\tconst renderChildren = () => {\n\t\t\treturn React.Children.map(children, (child) => {\n\t\t\t\tif (React.isValidElement<DockIconProps>(child) && child.type === DockIcon) {\n\t\t\t\t\treturn React.cloneElement(child, {\n\t\t\t\t\t\t...child.props,\n\t\t\t\t\t\tmouseX: mouseX,\n\t\t\t\t\t\tsize: iconSize,\n\t\t\t\t\t\tmagnification: iconMagnification,\n\t\t\t\t\t\tdistance: iconDistance,\n\t\t\t\t\t});\n\t\t\t\t}\n\t\t\t\treturn child;\n\t\t\t});\n\t\t};\n\n\t\treturn (\n\t\t\t<motion.div\n\t\t\t\tref={ref}\n\t\t\t\tonMouseMove={prefersReducedMotion ? undefined : (event) => mouseX.set(event.pageX)}\n\t\t\t\tonMouseLeave={prefersReducedMotion ? undefined : () => mouseX.set(Infinity)}\n\t\t\t\t{...props}\n\t\t\t\tclassName={cn(dockVariants({ className }), {\n\t\t\t\t\t'items-start': direction === 'top',\n\t\t\t\t\t'items-center': direction === 'middle',\n\t\t\t\t\t'items-end': direction === 'bottom',\n\t\t\t\t})}\n\t\t\t>\n\t\t\t\t{renderChildren()}\n\t\t\t</motion.div>\n\t\t);\n\t},\n);\n\nDock.displayName = 'Dock';\n\nexport interface DockIconProps extends Omit<MotionProps & React.HTMLAttributes<HTMLDivElement>, 'children'> {\n\tsize?: number;\n\tmagnification?: number;\n\tdistance?: number;\n\tmouseX?: MotionValue<number>;\n\tclassName?: string;\n\tchildren?: React.ReactNode;\n\tprops?: PropsWithChildren;\n}\n\nconst DockIcon = ({\n\tsize = DEFAULT_SIZE,\n\tmagnification = DEFAULT_MAGNIFICATION,\n\tdistance = DEFAULT_DISTANCE,\n\tmouseX,\n\tclassName,\n\tchildren,\n\t...props\n}: DockIconProps) => {\n\tconst ref = useRef<HTMLDivElement>(null);\n\tconst prefersReducedMotion = useReducedMotion();\n\tconst padding = Math.max(6, size * 0.2);\n\tconst defaultMouseX = useMotionValue(Infinity);\n\n\tconst distanceCalc = useTransform(mouseX ?? defaultMouseX, (val: number) => {\n\t\tconst bounds = ref.current?.getBoundingClientRect() ?? { x: 0, width: 0 };\n\t\treturn val - bounds.x - bounds.width / 2;\n\t});\n\n\tconst sizeTransform = useTransform(distanceCalc, [-distance, 0, distance], [size, magnification, size]);\n\n\tconst scaleSize = useSpring(sizeTransform, {\n\t\tmass: springs.gentle.mass,\n\t\tstiffness: springs.gentle.stiffness,\n\t\tdamping: 12,\n\t});\n\n\treturn (\n\t\t<motion.div\n\t\t\tref={ref}\n\t\t\tstyle={{ width: prefersReducedMotion ? size : scaleSize, height: prefersReducedMotion ? size : scaleSize, padding }}\n\t\t\tclassName={cn(\n\t\t\t\t// Solid hover target with theme-aware colors\n\t\t\t\t'flex aspect-square cursor-pointer items-center justify-center rounded-full bg-transparent',\n\t\t\t\t`hover:bg-muted focus-visible:bg-muted/80 focus-visible:outline-ring transition-colors duration-200\n\t\t\t\tfocus-visible:outline`,\n\t\t\t\tclassName,\n\t\t\t)}\n\t\t\t{...props}\n\t\t>\n\t\t\t{children}\n\t\t</motion.div>\n\t);\n};\n\nDockIcon.displayName = 'DockIcon';\n\nexport { Dock, DockIcon, dockVariants };\n"]}
1
+ {"version":3,"file":"dock.js","names":[],"sources":["../../src/components/dock.tsx"],"sourcesContent":["'use client';\n\nimport React, { PropsWithChildren, useRef } from 'react';\nimport { cva, type VariantProps } from 'class-variance-authority';\nimport {\n\tmotion,\n\tMotionProps,\n\tMotionValue,\n\tuseMotionValue,\n\tuseReducedMotion,\n\tuseSpring,\n\tuseTransform,\n} from 'motion/react';\n\nimport { springs } from '../lib/motion/motion-config';\nimport { cn } from '../lib/utils';\n\nexport interface DockProps extends VariantProps<typeof dockVariants> {\n\tclassName?: string;\n\ticonSize?: number;\n\ticonMagnification?: number;\n\ticonDistance?: number;\n\tdirection?: 'top' | 'middle' | 'bottom';\n\tchildren: React.ReactNode;\n}\n\nconst DEFAULT_SIZE = 40;\nconst DEFAULT_MAGNIFICATION = 60;\nconst DEFAULT_DISTANCE = 140;\n\nconst dockVariants = cva(\n\t// Solid themed surface (no glass/blur)\n\t'mx-auto mt-8 flex h-[58px] w-max items-center justify-center gap-2 rounded-2xl bg-card p-2 shadow-card',\n);\n\nconst Dock = React.forwardRef<HTMLDivElement, DockProps>(\n\t(\n\t\t{\n\t\t\tclassName,\n\t\t\tchildren,\n\t\t\ticonSize = DEFAULT_SIZE,\n\t\t\ticonMagnification = DEFAULT_MAGNIFICATION,\n\t\t\ticonDistance = DEFAULT_DISTANCE,\n\t\t\tdirection = 'middle',\n\t\t\t...props\n\t\t},\n\t\tref,\n\t) => {\n\t\tconst mouseX = useMotionValue(Infinity);\n\t\tconst prefersReducedMotion = useReducedMotion();\n\n\t\tconst renderChildren = () => {\n\t\t\treturn React.Children.map(children, (child) => {\n\t\t\t\tif (React.isValidElement<DockIconProps>(child) && child.type === DockIcon) {\n\t\t\t\t\treturn React.cloneElement(child, {\n\t\t\t\t\t\t...child.props,\n\t\t\t\t\t\tmouseX: mouseX,\n\t\t\t\t\t\tsize: iconSize,\n\t\t\t\t\t\tmagnification: iconMagnification,\n\t\t\t\t\t\tdistance: iconDistance,\n\t\t\t\t\t});\n\t\t\t\t}\n\t\t\t\treturn child;\n\t\t\t});\n\t\t};\n\n\t\treturn (\n\t\t\t<motion.div\n\t\t\t\tref={ref}\n\t\t\t\tonMouseMove={prefersReducedMotion ? undefined : (event) => mouseX.set(event.pageX)}\n\t\t\t\tonMouseLeave={prefersReducedMotion ? undefined : () => mouseX.set(Infinity)}\n\t\t\t\t{...props}\n\t\t\t\tclassName={cn(dockVariants({ className }), {\n\t\t\t\t\t'items-start': direction === 'top',\n\t\t\t\t\t'items-center': direction === 'middle',\n\t\t\t\t\t'items-end': direction === 'bottom',\n\t\t\t\t})}\n\t\t\t>\n\t\t\t\t{renderChildren()}\n\t\t\t</motion.div>\n\t\t);\n\t},\n);\n\nDock.displayName = 'Dock';\n\nexport interface DockIconProps extends Omit<MotionProps & React.HTMLAttributes<HTMLDivElement>, 'children'> {\n\tsize?: number;\n\tmagnification?: number;\n\tdistance?: number;\n\tmouseX?: MotionValue<number>;\n\tclassName?: string;\n\tchildren?: React.ReactNode;\n\tprops?: PropsWithChildren;\n}\n\nconst DockIcon = ({\n\tsize = DEFAULT_SIZE,\n\tmagnification = DEFAULT_MAGNIFICATION,\n\tdistance = DEFAULT_DISTANCE,\n\tmouseX,\n\tclassName,\n\tchildren,\n\t...props\n}: DockIconProps) => {\n\tconst ref = useRef<HTMLDivElement>(null);\n\tconst prefersReducedMotion = useReducedMotion();\n\tconst padding = Math.max(6, size * 0.2);\n\tconst defaultMouseX = useMotionValue(Infinity);\n\n\tconst distanceCalc = useTransform(mouseX ?? defaultMouseX, (val: number) => {\n\t\tconst bounds = ref.current?.getBoundingClientRect() ?? { x: 0, width: 0 };\n\t\treturn val - bounds.x - bounds.width / 2;\n\t});\n\n\tconst sizeTransform = useTransform(distanceCalc, [-distance, 0, distance], [size, magnification, size]);\n\n\tconst scaleSize = useSpring(sizeTransform, {\n\t\tmass: springs.gentle.mass,\n\t\tstiffness: springs.gentle.stiffness,\n\t\tdamping: 12,\n\t});\n\n\treturn (\n\t\t<motion.div\n\t\t\tref={ref}\n\t\t\tstyle={{ width: prefersReducedMotion ? size : scaleSize, height: prefersReducedMotion ? size : scaleSize, padding }}\n\t\t\tclassName={cn(\n\t\t\t\t// Solid hover target with theme-aware colors\n\t\t\t\t'flex aspect-square cursor-pointer items-center justify-center rounded-full bg-transparent',\n\t\t\t\t`hover:bg-muted focus-visible:bg-muted/80 focus-visible:outline-ring transition-colors duration-200\n\t\t\t\tfocus-visible:outline`,\n\t\t\t\tclassName,\n\t\t\t)}\n\t\t\t{...props}\n\t\t>\n\t\t\t{children}\n\t\t</motion.div>\n\t);\n};\n\nDockIcon.displayName = 'DockIcon';\n\nexport { Dock, DockIcon, dockVariants };\n"],"mappings":";;;;;;;;;;AA0BA,MAAM,eAAe;AACrB,MAAM,wBAAwB;AAC9B,MAAM,mBAAmB;AAEzB,MAAM,eAAe,IAEpB,wGACD;AAEA,MAAM,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