motion-brew 0.0.0-stage → 0.1.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (663) hide show
  1. package/LICENSE +21 -0
  2. package/README.md +106 -2
  3. package/dist/account-menu.d.ts +1 -0
  4. package/dist/account-menu.js +16 -0
  5. package/dist/action-menu.d.ts +1 -0
  6. package/dist/action-menu.js +10 -0
  7. package/dist/activity-grid.d.ts +1 -0
  8. package/dist/activity-grid.js +14 -0
  9. package/dist/add-card.d.ts +1 -0
  10. package/dist/add-card.js +11 -0
  11. package/dist/amount-slider.d.ts +1 -0
  12. package/dist/amount-slider.js +10 -0
  13. package/dist/annotation-text.d.ts +1 -0
  14. package/dist/annotation-text.js +8 -0
  15. package/dist/aura-card.d.ts +1 -0
  16. package/dist/aura-card.js +19 -0
  17. package/dist/auth-card.d.ts +1 -0
  18. package/dist/auth-card.js +15 -0
  19. package/dist/avatar-testimonial.d.ts +1 -0
  20. package/dist/avatar-testimonial.js +8 -0
  21. package/dist/backspace-text.d.ts +1 -0
  22. package/dist/backspace-text.js +8 -0
  23. package/dist/bell-toggle.d.ts +1 -0
  24. package/dist/bell-toggle.js +8 -0
  25. package/dist/bill-list.d.ts +1 -0
  26. package/dist/bill-list.js +15 -0
  27. package/dist/binary-text.d.ts +1 -0
  28. package/dist/binary-text.js +8 -0
  29. package/dist/blur-accordion.d.ts +1 -0
  30. package/dist/blur-accordion.js +8 -0
  31. package/dist/blur-text.d.ts +1 -0
  32. package/dist/blur-text.js +8 -0
  33. package/dist/booking-card.d.ts +1 -0
  34. package/dist/booking-card.js +11 -0
  35. package/dist/brand-bridge.d.ts +1 -0
  36. package/dist/brand-bridge.js +12 -0
  37. package/dist/calendar-agenda.d.ts +1 -0
  38. package/dist/calendar-agenda.js +12 -0
  39. package/dist/channel-mix.d.ts +1 -0
  40. package/dist/channel-mix.js +11 -0
  41. package/dist/chunk-25254AZA.js +141 -0
  42. package/dist/chunk-2CIJ5TVW.js +59 -0
  43. package/dist/chunk-2GXY54MP.js +247 -0
  44. package/dist/chunk-2IMPUH4H.js +135 -0
  45. package/dist/chunk-2NRXP4HM.js +371 -0
  46. package/dist/chunk-2QCWELWT.js +120 -0
  47. package/dist/chunk-2TQSHVXA.js +12 -0
  48. package/dist/chunk-327TGRS5.js +75 -0
  49. package/dist/chunk-3B2RYSTL.js +867 -0
  50. package/dist/chunk-3RKCLFY5.js +634 -0
  51. package/dist/chunk-4BVCRIR4.js +51 -0
  52. package/dist/chunk-4CKKTOJK.js +366 -0
  53. package/dist/chunk-4IGMH34C.js +319 -0
  54. package/dist/chunk-4PI6UNIZ.js +464 -0
  55. package/dist/chunk-4RHQKP2P.js +664 -0
  56. package/dist/chunk-5IAO5YQA.js +373 -0
  57. package/dist/chunk-5MP5QNFG.js +560 -0
  58. package/dist/chunk-62RBYLIN.js +128 -0
  59. package/dist/chunk-6FTC5OQF.js +384 -0
  60. package/dist/chunk-6GAKTS3D.js +329 -0
  61. package/dist/chunk-6GRDT3OE.js +124 -0
  62. package/dist/chunk-6JQY7AX5.js +307 -0
  63. package/dist/chunk-6LOUA6XB.js +237 -0
  64. package/dist/chunk-6V6OTHNE.js +299 -0
  65. package/dist/chunk-6VZIT62Q.js +142 -0
  66. package/dist/chunk-6WSY725U.js +387 -0
  67. package/dist/chunk-6XSJC7M7.js +764 -0
  68. package/dist/chunk-75DEIDBX.js +129 -0
  69. package/dist/chunk-7FQ4XU7E.js +127 -0
  70. package/dist/chunk-7IL5WRJR.js +615 -0
  71. package/dist/chunk-7MPC3RUE.js +1462 -0
  72. package/dist/chunk-7PS2W7PU.js +112 -0
  73. package/dist/chunk-AATJOPNH.js +86 -0
  74. package/dist/chunk-ADXWPWJR.js +209 -0
  75. package/dist/chunk-ANNDITUM.js +47 -0
  76. package/dist/chunk-AQN6BHWC.js +325 -0
  77. package/dist/chunk-AVOS73MR.js +537 -0
  78. package/dist/chunk-B4LNE6YK.js +473 -0
  79. package/dist/chunk-BHUNLG6S.js +142 -0
  80. package/dist/chunk-BN4MA5UY.js +127 -0
  81. package/dist/chunk-BPE43MTT.js +183 -0
  82. package/dist/chunk-BPF3FQRS.js +590 -0
  83. package/dist/chunk-BRTZFUFR.js +503 -0
  84. package/dist/chunk-BS4ZFJKW.js +121 -0
  85. package/dist/chunk-BXAKCY6X.js +86 -0
  86. package/dist/chunk-CEQ56RF6.js +129 -0
  87. package/dist/chunk-CGDKH6BB.js +902 -0
  88. package/dist/chunk-CMTGYFT7.js +395 -0
  89. package/dist/chunk-DD55JZOI.js +257 -0
  90. package/dist/chunk-DQUXBNSH.js +412 -0
  91. package/dist/chunk-DR4DUSNF.js +265 -0
  92. package/dist/chunk-EDPCK6VU.js +419 -0
  93. package/dist/chunk-EEQ2WHTN.js +142 -0
  94. package/dist/chunk-ERVE5RSN.js +793 -0
  95. package/dist/chunk-FFUBTMDC.js +303 -0
  96. package/dist/chunk-FK4TZ5OW.js +29 -0
  97. package/dist/chunk-FXI6NHNR.js +1033 -0
  98. package/dist/chunk-G3XH7YT2.js +122 -0
  99. package/dist/chunk-G7KDH7ME.js +559 -0
  100. package/dist/chunk-GRUDTDLX.js +534 -0
  101. package/dist/chunk-GUQINNWS.js +770 -0
  102. package/dist/chunk-GV3Q4D2N.js +320 -0
  103. package/dist/chunk-GVWOJJ3T.js +129 -0
  104. package/dist/chunk-H2JOCJWM.js +125 -0
  105. package/dist/chunk-H7XKIWHA.js +135 -0
  106. package/dist/chunk-HHXK3NAH.js +1382 -0
  107. package/dist/chunk-HJINEW5T.js +3289 -0
  108. package/dist/chunk-HK34LPY6.js +112 -0
  109. package/dist/chunk-HLJXNSMM.js +320 -0
  110. package/dist/chunk-HPJJAQ5L.js +406 -0
  111. package/dist/chunk-HYSXVKZB.js +213 -0
  112. package/dist/chunk-I45D4XV4.js +124 -0
  113. package/dist/chunk-I7KTTOOJ.js +113 -0
  114. package/dist/chunk-IDJOKV6S.js +67 -0
  115. package/dist/chunk-IGI6OLRX.js +138 -0
  116. package/dist/chunk-IKM7EEYN.js +117 -0
  117. package/dist/chunk-INV5FI6O.js +394 -0
  118. package/dist/chunk-IUBUAIQZ.js +321 -0
  119. package/dist/chunk-IYZOANPX.js +159 -0
  120. package/dist/chunk-JFTD3YAL.js +163 -0
  121. package/dist/chunk-JGEV462J.js +235 -0
  122. package/dist/chunk-JHT6RCGY.js +127 -0
  123. package/dist/chunk-JJEWOQYQ.js +141 -0
  124. package/dist/chunk-JT2EIO5M.js +129 -0
  125. package/dist/chunk-K3HQEHJ6.js +663 -0
  126. package/dist/chunk-K6ET254T.js +398 -0
  127. package/dist/chunk-LBRMNY72.js +159 -0
  128. package/dist/chunk-LNBTWX4J.js +114 -0
  129. package/dist/chunk-LS4FP6SI.js +37 -0
  130. package/dist/chunk-M22UY764.js +135 -0
  131. package/dist/chunk-M4YMNHPI.js +204 -0
  132. package/dist/chunk-MGBS5LRY.js +412 -0
  133. package/dist/chunk-MKJOBHPQ.js +215 -0
  134. package/dist/chunk-MQDOFNKI.js +818 -0
  135. package/dist/chunk-MUDKP3LK.js +120 -0
  136. package/dist/chunk-N4ZNBWKO.js +118 -0
  137. package/dist/chunk-NB5CB65C.js +137 -0
  138. package/dist/chunk-NCEAUODT.js +172 -0
  139. package/dist/chunk-NGX34WJO.js +335 -0
  140. package/dist/chunk-NIQFSLPC.js +114 -0
  141. package/dist/chunk-NJWTPRGJ.js +806 -0
  142. package/dist/chunk-NNKC6NEH.js +128 -0
  143. package/dist/chunk-NY7M42KC.js +112 -0
  144. package/dist/chunk-O7G4ISAC.js +277 -0
  145. package/dist/chunk-O7QYPA6X.js +700 -0
  146. package/dist/chunk-OEDHLZ4T.js +651 -0
  147. package/dist/chunk-OGQQ2FZZ.js +114 -0
  148. package/dist/chunk-OINRQUYT.js +186 -0
  149. package/dist/chunk-OMJBDFEW.js +506 -0
  150. package/dist/chunk-ONUWTWKP.js +345 -0
  151. package/dist/chunk-OS6REIBR.js +154 -0
  152. package/dist/chunk-OUVP5VKH.js +702 -0
  153. package/dist/chunk-OVEBMZHA.js +573 -0
  154. package/dist/chunk-PJ5EVDNN.js +157 -0
  155. package/dist/chunk-PKM6B4JJ.js +108 -0
  156. package/dist/chunk-PV3OYTMT.js +596 -0
  157. package/dist/chunk-RBSLSNMW.js +444 -0
  158. package/dist/chunk-RE74K7KI.js +370 -0
  159. package/dist/chunk-RP22J4NX.js +247 -0
  160. package/dist/chunk-RU2Q2XVP.js +287 -0
  161. package/dist/chunk-RZ2UCZ3C.js +212 -0
  162. package/dist/chunk-SBDTC4UY.js +367 -0
  163. package/dist/chunk-SKEE23KW.js +137 -0
  164. package/dist/chunk-SOW7S7ET.js +1103 -0
  165. package/dist/chunk-SQ7F3VBU.js +1069 -0
  166. package/dist/chunk-SSWKGVRI.js +172 -0
  167. package/dist/chunk-SVK4MQMV.js +267 -0
  168. package/dist/chunk-SZAHSOSQ.js +932 -0
  169. package/dist/chunk-T2TSMDP3.js +1022 -0
  170. package/dist/chunk-TAFVHTWV.js +607 -0
  171. package/dist/chunk-TNLY4CSA.js +523 -0
  172. package/dist/chunk-TP3XIHL5.js +787 -0
  173. package/dist/chunk-TQ6KSDDE.js +682 -0
  174. package/dist/chunk-TRWXLGL7.js +885 -0
  175. package/dist/chunk-TTNORJF5.js +908 -0
  176. package/dist/chunk-UD5OQ2T3.js +117 -0
  177. package/dist/chunk-UDFBQWUH.js +333 -0
  178. package/dist/chunk-USRMXCZD.js +625 -0
  179. package/dist/chunk-VAPHE4G4.js +442 -0
  180. package/dist/chunk-VEC5QAOY.js +104 -0
  181. package/dist/chunk-VIR5NV5W.js +118 -0
  182. package/dist/chunk-VT2FNWQF.js +240 -0
  183. package/dist/chunk-VX4XEYQN.js +837 -0
  184. package/dist/chunk-W46CBUFX.js +425 -0
  185. package/dist/chunk-WE7VCUOA.js +130 -0
  186. package/dist/chunk-WFWO2EIW.js +120 -0
  187. package/dist/chunk-WGIT4MMH.js +350 -0
  188. package/dist/chunk-WOR2GMMN.js +114 -0
  189. package/dist/chunk-WTTDB475.js +54 -0
  190. package/dist/chunk-WWWKMU4Y.js +184 -0
  191. package/dist/chunk-XDR4FO6Q.js +124 -0
  192. package/dist/chunk-XH6YNONO.js +112 -0
  193. package/dist/chunk-XL4L2J6N.js +129 -0
  194. package/dist/chunk-Y6MTC46Q.js +684 -0
  195. package/dist/chunk-YFLQ4HPJ.js +119 -0
  196. package/dist/chunk-YGONLKWH.js +180 -0
  197. package/dist/chunk-YU6B7YRO.js +128 -0
  198. package/dist/chunk-YURGXJSP.js +102 -0
  199. package/dist/chunk-YVYYDPE2.js +124 -0
  200. package/dist/chunk-ZPGAMYOQ.js +1 -0
  201. package/dist/chunk-ZWGOAY27.js +234 -0
  202. package/dist/column-card.d.ts +1 -0
  203. package/dist/column-card.js +8 -0
  204. package/dist/components/account-menu/account-menu.d.ts +56 -0
  205. package/dist/components/account-menu/index.d.ts +1 -0
  206. package/dist/components/action-menu/action-menu.d.ts +45 -0
  207. package/dist/components/action-menu/index.d.ts +1 -0
  208. package/dist/components/activity-grid/activity-grid.d.ts +54 -0
  209. package/dist/components/activity-grid/index.d.ts +1 -0
  210. package/dist/components/add-card/add-card.d.ts +41 -0
  211. package/dist/components/add-card/index.d.ts +1 -0
  212. package/dist/components/amount-slider/amount-slider.d.ts +43 -0
  213. package/dist/components/amount-slider/index.d.ts +1 -0
  214. package/dist/components/annotation-text/annotation-text.d.ts +27 -0
  215. package/dist/components/annotation-text/index.d.ts +1 -0
  216. package/dist/components/aura-card/aura-card.d.ts +63 -0
  217. package/dist/components/aura-card/index.d.ts +1 -0
  218. package/dist/components/auth-card/auth-card.d.ts +51 -0
  219. package/dist/components/auth-card/index.d.ts +1 -0
  220. package/dist/components/avatar-testimonial/avatar-testimonial.d.ts +39 -0
  221. package/dist/components/avatar-testimonial/index.d.ts +1 -0
  222. package/dist/components/backspace-text/backspace-text.d.ts +27 -0
  223. package/dist/components/backspace-text/index.d.ts +1 -0
  224. package/dist/components/bell-toggle/bell-toggle.d.ts +33 -0
  225. package/dist/components/bell-toggle/index.d.ts +1 -0
  226. package/dist/components/bill-list/bill-list.d.ts +49 -0
  227. package/dist/components/bill-list/index.d.ts +1 -0
  228. package/dist/components/binary-text/binary-text.d.ts +24 -0
  229. package/dist/components/binary-text/index.d.ts +1 -0
  230. package/dist/components/blur-accordion/blur-accordion.d.ts +35 -0
  231. package/dist/components/blur-accordion/index.d.ts +1 -0
  232. package/dist/components/blur-text/blur-text.d.ts +33 -0
  233. package/dist/components/blur-text/index.d.ts +1 -0
  234. package/dist/components/booking-card/booking-card.d.ts +56 -0
  235. package/dist/components/booking-card/index.d.ts +1 -0
  236. package/dist/components/brand-bridge/brand-bridge.d.ts +63 -0
  237. package/dist/components/brand-bridge/index.d.ts +1 -0
  238. package/dist/components/calendar-agenda/calendar-agenda.d.ts +64 -0
  239. package/dist/components/calendar-agenda/index.d.ts +1 -0
  240. package/dist/components/channel-mix/channel-mix.d.ts +63 -0
  241. package/dist/components/channel-mix/index.d.ts +1 -0
  242. package/dist/components/column-card/column-card.d.ts +39 -0
  243. package/dist/components/column-card/index.d.ts +1 -0
  244. package/dist/components/contact-card/contact-card.d.ts +44 -0
  245. package/dist/components/contact-card/index.d.ts +1 -0
  246. package/dist/components/context-menu/context-menu.d.ts +59 -0
  247. package/dist/components/context-menu/index.d.ts +1 -0
  248. package/dist/components/contour-feature-card/contour-feature-card.d.ts +36 -0
  249. package/dist/components/contour-feature-card/index.d.ts +1 -0
  250. package/dist/components/contour-lines/contour-lines.d.ts +34 -0
  251. package/dist/components/contour-lines/index.d.ts +1 -0
  252. package/dist/components/decay-card/decay-card.d.ts +44 -0
  253. package/dist/components/decay-card/index.d.ts +1 -0
  254. package/dist/components/deploy-streak/deploy-streak.d.ts +30 -0
  255. package/dist/components/deploy-streak/index.d.ts +1 -0
  256. package/dist/components/depth-carousel/depth-carousel.d.ts +42 -0
  257. package/dist/components/depth-carousel/index.d.ts +1 -0
  258. package/dist/components/device-traffic/device-traffic.d.ts +59 -0
  259. package/dist/components/device-traffic/index.d.ts +1 -0
  260. package/dist/components/download-button/download-button.d.ts +36 -0
  261. package/dist/components/download-button/index.d.ts +1 -0
  262. package/dist/components/event-card/event-card.d.ts +55 -0
  263. package/dist/components/event-card/index.d.ts +1 -0
  264. package/dist/components/file-drop/file-drop.d.ts +46 -0
  265. package/dist/components/file-drop/index.d.ts +1 -0
  266. package/dist/components/flip-words/flip-words.d.ts +26 -0
  267. package/dist/components/flip-words/index.d.ts +1 -0
  268. package/dist/components/flux-card/flux-card.d.ts +56 -0
  269. package/dist/components/flux-card/index.d.ts +1 -0
  270. package/dist/components/fuse-button/fuse-button.d.ts +75 -0
  271. package/dist/components/fuse-button/index.d.ts +1 -0
  272. package/dist/components/globe-card/globe-card.d.ts +46 -0
  273. package/dist/components/globe-card/index.d.ts +1 -0
  274. package/dist/components/goal-gauge/goal-gauge.d.ts +47 -0
  275. package/dist/components/goal-gauge/index.d.ts +1 -0
  276. package/dist/components/gradient-card/gradient-card.d.ts +56 -0
  277. package/dist/components/gradient-card/index.d.ts +1 -0
  278. package/dist/components/gradient-text/gradient-text.d.ts +22 -0
  279. package/dist/components/gradient-text/index.d.ts +1 -0
  280. package/dist/components/gravity-tag-pile/gravity-tag-pile.d.ts +69 -0
  281. package/dist/components/gravity-tag-pile/index.d.ts +1 -0
  282. package/dist/components/growth-stream/growth-stream.d.ts +47 -0
  283. package/dist/components/growth-stream/index.d.ts +1 -0
  284. package/dist/components/highlight-text/highlight-text.d.ts +22 -0
  285. package/dist/components/highlight-text/index.d.ts +1 -0
  286. package/dist/components/hold-to-confirm/hold-to-confirm.d.ts +32 -0
  287. package/dist/components/hold-to-confirm/index.d.ts +1 -0
  288. package/dist/components/infinite-gallery/index.d.ts +1 -0
  289. package/dist/components/infinite-gallery/infinite-gallery.d.ts +73 -0
  290. package/dist/components/integration-hub/index.d.ts +1 -0
  291. package/dist/components/integration-hub/integration-hub.d.ts +40 -0
  292. package/dist/components/liquid-card/index.d.ts +1 -0
  293. package/dist/components/liquid-card/liquid-card.d.ts +66 -0
  294. package/dist/components/liquid-metal-card/index.d.ts +1 -0
  295. package/dist/components/liquid-metal-card/liquid-metal-card.d.ts +45 -0
  296. package/dist/components/liquid-tabs/index.d.ts +1 -0
  297. package/dist/components/liquid-tabs/liquid-tabs.d.ts +47 -0
  298. package/dist/components/magnetic-button/index.d.ts +1 -0
  299. package/dist/components/magnetic-button/magnetic-button.d.ts +46 -0
  300. package/dist/components/magnetic-flow/index.d.ts +1 -0
  301. package/dist/components/magnetic-flow/magnetic-flow.d.ts +35 -0
  302. package/dist/components/message-composer/index.d.ts +1 -0
  303. package/dist/components/message-composer/message-composer.d.ts +79 -0
  304. package/dist/components/metal-card-stack/index.d.ts +1 -0
  305. package/dist/components/metal-card-stack/metal-card-stack.d.ts +49 -0
  306. package/dist/components/metric-split/index.d.ts +1 -0
  307. package/dist/components/metric-split/metric-split.d.ts +45 -0
  308. package/dist/components/mix-chart/index.d.ts +1 -0
  309. package/dist/components/mix-chart/mix-chart.d.ts +59 -0
  310. package/dist/components/month-calendar/index.d.ts +1 -0
  311. package/dist/components/month-calendar/month-calendar.d.ts +34 -0
  312. package/dist/components/morph-search/index.d.ts +1 -0
  313. package/dist/components/morph-search/morph-search.d.ts +33 -0
  314. package/dist/components/orbit-card/index.d.ts +1 -0
  315. package/dist/components/orbit-card/orbit-card.d.ts +50 -0
  316. package/dist/components/otp-code/index.d.ts +1 -0
  317. package/dist/components/otp-code/otp-code.d.ts +61 -0
  318. package/dist/components/particle-card/index.d.ts +1 -0
  319. package/dist/components/particle-card/particle-card.d.ts +57 -0
  320. package/dist/components/payment-form/index.d.ts +1 -0
  321. package/dist/components/payment-form/payment-form.d.ts +54 -0
  322. package/dist/components/pill-tabs/index.d.ts +1 -0
  323. package/dist/components/pill-tabs/pill-tabs.d.ts +39 -0
  324. package/dist/components/pixel-blast/index.d.ts +1 -0
  325. package/dist/components/pixel-blast/pixel-blast.d.ts +41 -0
  326. package/dist/components/pixel-feature-card/index.d.ts +1 -0
  327. package/dist/components/pixel-feature-card/pixel-feature-card.d.ts +43 -0
  328. package/dist/components/pixel-scroll/index.d.ts +1 -0
  329. package/dist/components/pixel-scroll/pixel-scroll.d.ts +64 -0
  330. package/dist/components/pricing-card/index.d.ts +1 -0
  331. package/dist/components/pricing-card/pricing-card.d.ts +60 -0
  332. package/dist/components/prism-carousel/index.d.ts +1 -0
  333. package/dist/components/prism-carousel/prism-carousel.d.ts +54 -0
  334. package/dist/components/prism-flow/index.d.ts +1 -0
  335. package/dist/components/prism-flow/prism-flow.d.ts +41 -0
  336. package/dist/components/privacy-banner/index.d.ts +1 -0
  337. package/dist/components/privacy-banner/privacy-banner.d.ts +41 -0
  338. package/dist/components/profile-card/index.d.ts +1 -0
  339. package/dist/components/profile-card/profile-card.d.ts +52 -0
  340. package/dist/components/profile-menu/index.d.ts +1 -0
  341. package/dist/components/profile-menu/profile-menu.d.ts +43 -0
  342. package/dist/components/project-index/index.d.ts +1 -0
  343. package/dist/components/project-index/project-index.d.ts +65 -0
  344. package/dist/components/prompt-input/index.d.ts +1 -0
  345. package/dist/components/prompt-input/prompt-input.d.ts +49 -0
  346. package/dist/components/quota-gauge/index.d.ts +1 -0
  347. package/dist/components/quota-gauge/quota-gauge.d.ts +30 -0
  348. package/dist/components/range-chart/index.d.ts +1 -0
  349. package/dist/components/range-chart/range-chart.d.ts +47 -0
  350. package/dist/components/reaction-card/index.d.ts +1 -0
  351. package/dist/components/reaction-card/reaction-card.d.ts +60 -0
  352. package/dist/components/recap-card/index.d.ts +1 -0
  353. package/dist/components/recap-card/recap-card.d.ts +61 -0
  354. package/dist/components/receipt-button/index.d.ts +1 -0
  355. package/dist/components/receipt-button/receipt-button.d.ts +53 -0
  356. package/dist/components/ribbon-gallery/index.d.ts +1 -0
  357. package/dist/components/ribbon-gallery/ribbon-gallery.d.ts +61 -0
  358. package/dist/components/roadmap-card/index.d.ts +1 -0
  359. package/dist/components/roadmap-card/roadmap-card.d.ts +38 -0
  360. package/dist/components/rolling-card-stack/index.d.ts +1 -0
  361. package/dist/components/rolling-card-stack/rolling-card-stack.d.ts +53 -0
  362. package/dist/components/rolling-stepper/index.d.ts +1 -0
  363. package/dist/components/rolling-stepper/rolling-stepper.d.ts +33 -0
  364. package/dist/components/rotating-text/index.d.ts +1 -0
  365. package/dist/components/rotating-text/rotating-text.d.ts +25 -0
  366. package/dist/components/score-card/index.d.ts +1 -0
  367. package/dist/components/score-card/score-card.d.ts +40 -0
  368. package/dist/components/search-modal/index.d.ts +1 -0
  369. package/dist/components/search-modal/search-modal.d.ts +62 -0
  370. package/dist/components/shimmer-text/index.d.ts +1 -0
  371. package/dist/components/shimmer-text/shimmer-text.d.ts +22 -0
  372. package/dist/components/sidebar-nav/index.d.ts +1 -0
  373. package/dist/components/sidebar-nav/sidebar-nav.d.ts +71 -0
  374. package/dist/components/slide-commit/index.d.ts +1 -0
  375. package/dist/components/slide-commit/slide-commit.d.ts +39 -0
  376. package/dist/components/spatial-gallery/index.d.ts +1 -0
  377. package/dist/components/spatial-gallery/spatial-gallery.d.ts +88 -0
  378. package/dist/components/spending-meter/index.d.ts +1 -0
  379. package/dist/components/spending-meter/spending-meter.d.ts +41 -0
  380. package/dist/components/tab-bar/index.d.ts +1 -0
  381. package/dist/components/tab-bar/tab-bar.d.ts +44 -0
  382. package/dist/components/team-member-card/index.d.ts +1 -0
  383. package/dist/components/team-member-card/team-member-card.d.ts +66 -0
  384. package/dist/components/team-morph/index.d.ts +1 -0
  385. package/dist/components/team-morph/team-morph.d.ts +38 -0
  386. package/dist/components/tilt-card/index.d.ts +1 -0
  387. package/dist/components/tilt-card/tilt-card.d.ts +27 -0
  388. package/dist/components/tilt-carousel/index.d.ts +1 -0
  389. package/dist/components/tilt-carousel/tilt-carousel.d.ts +43 -0
  390. package/dist/components/toast-stack/index.d.ts +1 -0
  391. package/dist/components/toast-stack/toast-stack.d.ts +57 -0
  392. package/dist/components/usage-ring/index.d.ts +1 -0
  393. package/dist/components/usage-ring/usage-ring.d.ts +40 -0
  394. package/dist/components/verify-flow/index.d.ts +1 -0
  395. package/dist/components/verify-flow/verify-flow.d.ts +49 -0
  396. package/dist/components/voice-prompt/index.d.ts +1 -0
  397. package/dist/components/voice-prompt/voice-prompt.d.ts +55 -0
  398. package/dist/components/wallet-card/index.d.ts +1 -0
  399. package/dist/components/wallet-card/wallet-card.d.ts +54 -0
  400. package/dist/components/wave-text/index.d.ts +1 -0
  401. package/dist/components/wave-text/wave-text.d.ts +27 -0
  402. package/dist/contact-card.d.ts +1 -0
  403. package/dist/contact-card.js +12 -0
  404. package/dist/context-menu.d.ts +1 -0
  405. package/dist/context-menu.js +17 -0
  406. package/dist/contour-feature-card.d.ts +1 -0
  407. package/dist/contour-feature-card.js +9 -0
  408. package/dist/contour-lines.d.ts +1 -0
  409. package/dist/contour-lines.js +8 -0
  410. package/dist/decay-card.d.ts +1 -0
  411. package/dist/decay-card.js +8 -0
  412. package/dist/deploy-streak.d.ts +1 -0
  413. package/dist/deploy-streak.js +9 -0
  414. package/dist/depth-carousel.d.ts +1 -0
  415. package/dist/depth-carousel.js +8 -0
  416. package/dist/device-traffic.d.ts +1 -0
  417. package/dist/device-traffic.js +12 -0
  418. package/dist/download-button.d.ts +1 -0
  419. package/dist/download-button.js +8 -0
  420. package/dist/event-card.d.ts +1 -0
  421. package/dist/event-card.js +12 -0
  422. package/dist/file-drop.d.ts +1 -0
  423. package/dist/file-drop.js +12 -0
  424. package/dist/flip-words.d.ts +1 -0
  425. package/dist/flip-words.js +8 -0
  426. package/dist/flux-card.d.ts +1 -0
  427. package/dist/flux-card.js +13 -0
  428. package/dist/fuse-button.d.ts +1 -0
  429. package/dist/fuse-button.js +9 -0
  430. package/dist/globe-card.d.ts +1 -0
  431. package/dist/globe-card.js +8 -0
  432. package/dist/goal-gauge.d.ts +1 -0
  433. package/dist/goal-gauge.js +9 -0
  434. package/dist/gradient-card.d.ts +1 -0
  435. package/dist/gradient-card.js +8 -0
  436. package/dist/gradient-text.d.ts +1 -0
  437. package/dist/gradient-text.js +8 -0
  438. package/dist/gravity-tag-pile.d.ts +1 -0
  439. package/dist/gravity-tag-pile.js +9 -0
  440. package/dist/growth-stream.d.ts +1 -0
  441. package/dist/growth-stream.js +10 -0
  442. package/dist/highlight-text.d.ts +1 -0
  443. package/dist/highlight-text.js +8 -0
  444. package/dist/hold-to-confirm.d.ts +1 -0
  445. package/dist/hold-to-confirm.js +8 -0
  446. package/dist/icons/activity.d.ts +15 -0
  447. package/dist/icons/archive.d.ts +15 -0
  448. package/dist/icons/arrow-down-right.d.ts +15 -0
  449. package/dist/icons/arrow-down.d.ts +15 -0
  450. package/dist/icons/arrow-right.d.ts +15 -0
  451. package/dist/icons/arrow-up-right.d.ts +15 -0
  452. package/dist/icons/arrow-up.d.ts +15 -0
  453. package/dist/icons/at-sign.d.ts +15 -0
  454. package/dist/icons/attach-file.d.ts +15 -0
  455. package/dist/icons/badge-alert.d.ts +15 -0
  456. package/dist/icons/bell.d.ts +15 -0
  457. package/dist/icons/bold.d.ts +15 -0
  458. package/dist/icons/bookmark.d.ts +15 -0
  459. package/dist/icons/bot.d.ts +15 -0
  460. package/dist/icons/calendar-check-2.d.ts +15 -0
  461. package/dist/icons/calendar-check.d.ts +15 -0
  462. package/dist/icons/calendar-days.d.ts +15 -0
  463. package/dist/icons/chart-line.d.ts +15 -0
  464. package/dist/icons/chart-pie.d.ts +15 -0
  465. package/dist/icons/check.d.ts +15 -0
  466. package/dist/icons/chevron-down.d.ts +15 -0
  467. package/dist/icons/chevron-left.d.ts +15 -0
  468. package/dist/icons/chevron-right.d.ts +15 -0
  469. package/dist/icons/circle-check.d.ts +15 -0
  470. package/dist/icons/circle-dollar-sign.d.ts +15 -0
  471. package/dist/icons/clipboard-check.d.ts +15 -0
  472. package/dist/icons/clock.d.ts +15 -0
  473. package/dist/icons/cloud-upload.d.ts +15 -0
  474. package/dist/icons/compass.d.ts +15 -0
  475. package/dist/icons/contrast.d.ts +15 -0
  476. package/dist/icons/copy.d.ts +15 -0
  477. package/dist/icons/credit-card.d.ts +15 -0
  478. package/dist/icons/delete.d.ts +15 -0
  479. package/dist/icons/download.d.ts +15 -0
  480. package/dist/icons/dribbble.d.ts +15 -0
  481. package/dist/icons/earth.d.ts +15 -0
  482. package/dist/icons/eye-off.d.ts +15 -0
  483. package/dist/icons/eye.d.ts +15 -0
  484. package/dist/icons/feather.d.ts +15 -0
  485. package/dist/icons/figma.d.ts +15 -0
  486. package/dist/icons/file-text.d.ts +16 -0
  487. package/dist/icons/flame.d.ts +15 -0
  488. package/dist/icons/folder-input.d.ts +15 -0
  489. package/dist/icons/folder-open.d.ts +15 -0
  490. package/dist/icons/folders.d.ts +15 -0
  491. package/dist/icons/github.d.ts +15 -0
  492. package/dist/icons/hand-coins.d.ts +15 -0
  493. package/dist/icons/heart.d.ts +15 -0
  494. package/dist/icons/history.d.ts +15 -0
  495. package/dist/icons/home.d.ts +15 -0
  496. package/dist/icons/hourglass.d.ts +15 -0
  497. package/dist/icons/instagram.d.ts +15 -0
  498. package/dist/icons/italic.d.ts +15 -0
  499. package/dist/icons/layout-grid.d.ts +15 -0
  500. package/dist/icons/link.d.ts +15 -0
  501. package/dist/icons/linkedin.d.ts +15 -0
  502. package/dist/icons/loader-circle.d.ts +15 -0
  503. package/dist/icons/lock-keyhole-open.d.ts +15 -0
  504. package/dist/icons/lock-keyhole.d.ts +15 -0
  505. package/dist/icons/lock.d.ts +15 -0
  506. package/dist/icons/logout.d.ts +15 -0
  507. package/dist/icons/mail-check.d.ts +15 -0
  508. package/dist/icons/map-pin.d.ts +15 -0
  509. package/dist/icons/message-circle.d.ts +15 -0
  510. package/dist/icons/mic.d.ts +15 -0
  511. package/dist/icons/monitor-check.d.ts +15 -0
  512. package/dist/icons/moon.d.ts +15 -0
  513. package/dist/icons/palette.d.ts +15 -0
  514. package/dist/icons/panel-left-close.d.ts +15 -0
  515. package/dist/icons/panel-left-open.d.ts +15 -0
  516. package/dist/icons/plug-zap.d.ts +15 -0
  517. package/dist/icons/plus.d.ts +15 -0
  518. package/dist/icons/radio.d.ts +15 -0
  519. package/dist/icons/receipt.d.ts +15 -0
  520. package/dist/icons/refresh-cw.d.ts +15 -0
  521. package/dist/icons/rotate-ccw.d.ts +15 -0
  522. package/dist/icons/search.d.ts +15 -0
  523. package/dist/icons/send.d.ts +15 -0
  524. package/dist/icons/settings.d.ts +15 -0
  525. package/dist/icons/shield-check.d.ts +15 -0
  526. package/dist/icons/smartphone-nfc.d.ts +15 -0
  527. package/dist/icons/smile.d.ts +15 -0
  528. package/dist/icons/sparkles.d.ts +15 -0
  529. package/dist/icons/square-pen.d.ts +15 -0
  530. package/dist/icons/sun.d.ts +15 -0
  531. package/dist/icons/terminal.d.ts +15 -0
  532. package/dist/icons/timer.d.ts +15 -0
  533. package/dist/icons/trending-up.d.ts +15 -0
  534. package/dist/icons/twitter.d.ts +15 -0
  535. package/dist/icons/underline.d.ts +15 -0
  536. package/dist/icons/undo.d.ts +15 -0
  537. package/dist/icons/user-check.d.ts +15 -0
  538. package/dist/icons/user-plus.d.ts +15 -0
  539. package/dist/icons/user-round-plus.d.ts +15 -0
  540. package/dist/icons/user.d.ts +15 -0
  541. package/dist/icons/users.d.ts +15 -0
  542. package/dist/icons/wifi.d.ts +15 -0
  543. package/dist/icons/workflow.d.ts +15 -0
  544. package/dist/icons/x.d.ts +15 -0
  545. package/dist/icons/zap.d.ts +15 -0
  546. package/dist/index.d.ts +100 -0
  547. package/dist/index.js +472 -0
  548. package/dist/infinite-gallery.d.ts +1 -0
  549. package/dist/infinite-gallery.js +9 -0
  550. package/dist/integration-hub.d.ts +1 -0
  551. package/dist/integration-hub.js +8 -0
  552. package/dist/lib/cn.d.ts +3 -0
  553. package/dist/liquid-card.d.ts +1 -0
  554. package/dist/liquid-card.js +10 -0
  555. package/dist/liquid-metal-card.d.ts +1 -0
  556. package/dist/liquid-metal-card.js +8 -0
  557. package/dist/liquid-tabs.d.ts +1 -0
  558. package/dist/liquid-tabs.js +14 -0
  559. package/dist/magnetic-button.d.ts +1 -0
  560. package/dist/magnetic-button.js +8 -0
  561. package/dist/magnetic-flow.d.ts +1 -0
  562. package/dist/magnetic-flow.js +8 -0
  563. package/dist/message-composer.d.ts +1 -0
  564. package/dist/message-composer.js +20 -0
  565. package/dist/metal-card-stack.d.ts +1 -0
  566. package/dist/metal-card-stack.js +8 -0
  567. package/dist/metric-split.d.ts +1 -0
  568. package/dist/metric-split.js +9 -0
  569. package/dist/mix-chart.d.ts +1 -0
  570. package/dist/mix-chart.js +9 -0
  571. package/dist/month-calendar.d.ts +1 -0
  572. package/dist/month-calendar.js +10 -0
  573. package/dist/morph-search.d.ts +1 -0
  574. package/dist/morph-search.js +10 -0
  575. package/dist/orbit-card.d.ts +1 -0
  576. package/dist/orbit-card.js +8 -0
  577. package/dist/otp-code.d.ts +1 -0
  578. package/dist/otp-code.js +17 -0
  579. package/dist/particle-card.d.ts +1 -0
  580. package/dist/particle-card.js +8 -0
  581. package/dist/payment-form.d.ts +1 -0
  582. package/dist/payment-form.js +8 -0
  583. package/dist/pill-tabs.d.ts +1 -0
  584. package/dist/pill-tabs.js +9 -0
  585. package/dist/pixel-blast.d.ts +1 -0
  586. package/dist/pixel-blast.js +8 -0
  587. package/dist/pixel-feature-card.d.ts +1 -0
  588. package/dist/pixel-feature-card.js +9 -0
  589. package/dist/pixel-scroll.d.ts +1 -0
  590. package/dist/pixel-scroll.js +8 -0
  591. package/dist/pricing-card.d.ts +1 -0
  592. package/dist/pricing-card.js +14 -0
  593. package/dist/prism-carousel.d.ts +1 -0
  594. package/dist/prism-carousel.js +8 -0
  595. package/dist/prism-flow.d.ts +1 -0
  596. package/dist/prism-flow.js +8 -0
  597. package/dist/privacy-banner.d.ts +1 -0
  598. package/dist/privacy-banner.js +8 -0
  599. package/dist/profile-card.d.ts +1 -0
  600. package/dist/profile-card.js +14 -0
  601. package/dist/profile-menu.d.ts +1 -0
  602. package/dist/profile-menu.js +21 -0
  603. package/dist/project-index.d.ts +1 -0
  604. package/dist/project-index.js +9 -0
  605. package/dist/prompt-input.d.ts +1 -0
  606. package/dist/prompt-input.js +14 -0
  607. package/dist/quota-gauge.d.ts +1 -0
  608. package/dist/quota-gauge.js +9 -0
  609. package/dist/range-chart.d.ts +1 -0
  610. package/dist/range-chart.js +8 -0
  611. package/dist/reaction-card.d.ts +1 -0
  612. package/dist/reaction-card.js +8 -0
  613. package/dist/recap-card.d.ts +1 -0
  614. package/dist/recap-card.js +15 -0
  615. package/dist/receipt-button.d.ts +1 -0
  616. package/dist/receipt-button.js +8 -0
  617. package/dist/ribbon-gallery.d.ts +1 -0
  618. package/dist/ribbon-gallery.js +8 -0
  619. package/dist/roadmap-card.d.ts +1 -0
  620. package/dist/roadmap-card.js +11 -0
  621. package/dist/rolling-card-stack.d.ts +1 -0
  622. package/dist/rolling-card-stack.js +8 -0
  623. package/dist/rolling-stepper.d.ts +1 -0
  624. package/dist/rolling-stepper.js +8 -0
  625. package/dist/rotating-text.d.ts +1 -0
  626. package/dist/rotating-text.js +9 -0
  627. package/dist/score-card.d.ts +1 -0
  628. package/dist/score-card.js +10 -0
  629. package/dist/search-modal.d.ts +1 -0
  630. package/dist/search-modal.js +16 -0
  631. package/dist/shimmer-text.d.ts +1 -0
  632. package/dist/shimmer-text.js +8 -0
  633. package/dist/sidebar-nav.d.ts +1 -0
  634. package/dist/sidebar-nav.js +19 -0
  635. package/dist/slide-commit.d.ts +1 -0
  636. package/dist/slide-commit.js +9 -0
  637. package/dist/spatial-gallery.d.ts +1 -0
  638. package/dist/spatial-gallery.js +8 -0
  639. package/dist/spending-meter.d.ts +1 -0
  640. package/dist/spending-meter.js +9 -0
  641. package/dist/tab-bar.d.ts +1 -0
  642. package/dist/tab-bar.js +18 -0
  643. package/dist/team-member-card.d.ts +1 -0
  644. package/dist/team-member-card.js +14 -0
  645. package/dist/team-morph.d.ts +1 -0
  646. package/dist/team-morph.js +11 -0
  647. package/dist/tilt-card.d.ts +1 -0
  648. package/dist/tilt-card.js +8 -0
  649. package/dist/tilt-carousel.d.ts +1 -0
  650. package/dist/tilt-carousel.js +8 -0
  651. package/dist/toast-stack.d.ts +1 -0
  652. package/dist/toast-stack.js +13 -0
  653. package/dist/usage-ring.d.ts +1 -0
  654. package/dist/usage-ring.js +9 -0
  655. package/dist/verify-flow.d.ts +1 -0
  656. package/dist/verify-flow.js +10 -0
  657. package/dist/voice-prompt.d.ts +1 -0
  658. package/dist/voice-prompt.js +14 -0
  659. package/dist/wallet-card.d.ts +1 -0
  660. package/dist/wallet-card.js +15 -0
  661. package/dist/wave-text.d.ts +1 -0
  662. package/dist/wave-text.js +8 -0
  663. package/package.json +111 -4
@@ -0,0 +1,1022 @@
1
+ "use client";
2
+ import {
3
+ BookmarkIcon
4
+ } from "./chunk-VIR5NV5W.js";
5
+ import {
6
+ FolderOpenIcon
7
+ } from "./chunk-MUDKP3LK.js";
8
+ import {
9
+ ChevronRightIcon
10
+ } from "./chunk-XH6YNONO.js";
11
+ import {
12
+ DeleteIcon
13
+ } from "./chunk-JFTD3YAL.js";
14
+ import {
15
+ CopyIcon
16
+ } from "./chunk-M22UY764.js";
17
+ import {
18
+ EyeIcon
19
+ } from "./chunk-BN4MA5UY.js";
20
+ import {
21
+ SparklesIcon
22
+ } from "./chunk-YGONLKWH.js";
23
+ import {
24
+ DownloadIcon
25
+ } from "./chunk-IKM7EEYN.js";
26
+ import {
27
+ CheckIcon
28
+ } from "./chunk-JHT6RCGY.js";
29
+ import {
30
+ cn
31
+ } from "./chunk-2TQSHVXA.js";
32
+
33
+ // src/components/context-menu/context-menu.tsx
34
+ import * as React from "react";
35
+ import { createPortal } from "react-dom";
36
+ import {
37
+ AnimatePresence,
38
+ motion as motion5,
39
+ useReducedMotion as useReducedMotion5
40
+ } from "motion/react";
41
+
42
+ // src/icons/clipboard-check.tsx
43
+ import { motion, useAnimation, useReducedMotion } from "motion/react";
44
+ import { forwardRef, useCallback, useEffect, useImperativeHandle, useRef, useState } from "react";
45
+ import { jsx, jsxs } from "react/jsx-runtime";
46
+ var CHECK_VARIANTS = {
47
+ normal: {
48
+ pathLength: 1,
49
+ opacity: 0,
50
+ transition: {
51
+ duration: 0.3
52
+ }
53
+ },
54
+ animate: {
55
+ pathLength: [0, 1],
56
+ opacity: [0, 1],
57
+ transition: {
58
+ pathLength: { duration: 0.3, ease: "easeInOut" },
59
+ opacity: { duration: 0.3, ease: "easeInOut" }
60
+ }
61
+ }
62
+ };
63
+ var ClipboardCheckIcon = forwardRef(({ onMouseEnter, onMouseLeave, className, size, active, style, strokeWidth, ...props }, ref) => {
64
+ const controls = useAnimation();
65
+ const isControlledRef = useRef(false);
66
+ useImperativeHandle(ref, () => {
67
+ isControlledRef.current = true;
68
+ return {
69
+ startAnimation: () => controls.start("animate"),
70
+ stopAnimation: () => controls.start("normal")
71
+ };
72
+ });
73
+ const handleMouseEnter = useCallback(
74
+ (e) => {
75
+ if (isControlledRef.current) {
76
+ onMouseEnter?.(e);
77
+ } else {
78
+ controls.start("animate");
79
+ }
80
+ },
81
+ [controls, onMouseEnter]
82
+ );
83
+ const handleMouseLeave = useCallback(
84
+ (e) => {
85
+ if (isControlledRef.current) {
86
+ onMouseLeave?.(e);
87
+ } else {
88
+ controls.start("normal");
89
+ }
90
+ },
91
+ [controls, onMouseLeave]
92
+ );
93
+ const wrap = useRef(null);
94
+ const reduced = useReducedMotion();
95
+ const [hosted, setHosted] = useState(false);
96
+ useEffect(() => {
97
+ const fake = {};
98
+ if (reduced) {
99
+ setHosted(true);
100
+ return;
101
+ }
102
+ if (active !== void 0) {
103
+ setHosted(true);
104
+ (active ? handleMouseEnter : handleMouseLeave)(fake);
105
+ return;
106
+ }
107
+ const host = wrap.current?.parentElement?.closest("button, a, [role=button], [role=menuitem], [role=tab], [role=switch], [role=radio], label");
108
+ setHosted(!!host);
109
+ if (!host) return;
110
+ const on = () => handleMouseEnter(fake);
111
+ const off = () => handleMouseLeave(fake);
112
+ host.addEventListener("pointerenter", on);
113
+ host.addEventListener("pointerleave", off);
114
+ return () => {
115
+ host.removeEventListener("pointerenter", on);
116
+ host.removeEventListener("pointerleave", off);
117
+ };
118
+ }, [active, reduced, handleMouseEnter, handleMouseLeave]);
119
+ return /* @__PURE__ */ jsx(
120
+ "span",
121
+ {
122
+ ref: wrap,
123
+ className: cn("inline-grid size-6 shrink-0 place-items-center align-middle [&>svg]:size-full", className),
124
+ style: size ? { width: size, height: size, ...style } : style,
125
+ onMouseEnter: hosted ? void 0 : handleMouseEnter,
126
+ onMouseLeave: hosted ? void 0 : handleMouseLeave,
127
+ ...props,
128
+ children: /* @__PURE__ */ jsxs(
129
+ "svg",
130
+ {
131
+ fill: "none",
132
+ height: size,
133
+ stroke: "currentColor",
134
+ strokeLinecap: "round",
135
+ strokeLinejoin: "round",
136
+ strokeWidth: strokeWidth ?? 2,
137
+ viewBox: "0 0 24 24",
138
+ width: size,
139
+ xmlns: "http://www.w3.org/2000/svg",
140
+ children: [
141
+ /* @__PURE__ */ jsx("rect", { height: "4", rx: "1", ry: "1", width: "8", x: "8", y: "2" }),
142
+ /* @__PURE__ */ jsx("path", { d: "M16 4h2a2 2 0 0 1 2 2v14a2 2 0 0 1-2 2H6a2 2 0 0 1-2-2V6a2 2 0 0 1 2-2h2" }),
143
+ /* @__PURE__ */ jsx(
144
+ motion.path,
145
+ {
146
+ animate: controls,
147
+ d: "m9 14 2 2 4-4",
148
+ initial: "normal",
149
+ style: { transformOrigin: "center" },
150
+ variants: CHECK_VARIANTS
151
+ }
152
+ )
153
+ ]
154
+ }
155
+ )
156
+ }
157
+ );
158
+ });
159
+ ClipboardCheckIcon.displayName = "ClipboardCheckIcon";
160
+
161
+ // src/icons/folder-input.tsx
162
+ import { motion as motion2, useAnimation as useAnimation2, useReducedMotion as useReducedMotion2 } from "motion/react";
163
+ import { forwardRef as forwardRef2, useCallback as useCallback2, useEffect as useEffect2, useImperativeHandle as useImperativeHandle2, useRef as useRef2, useState as useState2 } from "react";
164
+ import { jsx as jsx2, jsxs as jsxs2 } from "react/jsx-runtime";
165
+ var ARROW_VARIANTS = {
166
+ normal: { x: 0 },
167
+ animate: { x: [0, 2, 0] }
168
+ };
169
+ var ARROW_TRANSITION = {
170
+ times: [0, 0.4, 1],
171
+ duration: 0.5
172
+ };
173
+ var FolderInputIcon = forwardRef2(
174
+ ({ onMouseEnter, onMouseLeave, className, size, active, style, strokeWidth, ...props }, ref) => {
175
+ const controls = useAnimation2();
176
+ const isControlledRef = useRef2(false);
177
+ useImperativeHandle2(ref, () => {
178
+ isControlledRef.current = true;
179
+ return {
180
+ startAnimation: () => controls.start("animate"),
181
+ stopAnimation: () => controls.start("normal")
182
+ };
183
+ });
184
+ const handleMouseEnter = useCallback2(
185
+ (event) => {
186
+ if (isControlledRef.current) {
187
+ onMouseEnter?.(event);
188
+ } else {
189
+ controls.start("animate");
190
+ }
191
+ },
192
+ [controls, onMouseEnter]
193
+ );
194
+ const handleMouseLeave = useCallback2(
195
+ (event) => {
196
+ if (isControlledRef.current) {
197
+ onMouseLeave?.(event);
198
+ } else {
199
+ controls.start("normal");
200
+ }
201
+ },
202
+ [controls, onMouseLeave]
203
+ );
204
+ const wrap = useRef2(null);
205
+ const reduced = useReducedMotion2();
206
+ const [hosted, setHosted] = useState2(false);
207
+ useEffect2(() => {
208
+ const fake = {};
209
+ if (reduced) {
210
+ setHosted(true);
211
+ return;
212
+ }
213
+ if (active !== void 0) {
214
+ setHosted(true);
215
+ (active ? handleMouseEnter : handleMouseLeave)(fake);
216
+ return;
217
+ }
218
+ const host = wrap.current?.parentElement?.closest("button, a, [role=button], [role=menuitem], [role=tab], [role=switch], [role=radio], label");
219
+ setHosted(!!host);
220
+ if (!host) return;
221
+ const on = () => handleMouseEnter(fake);
222
+ const off = () => handleMouseLeave(fake);
223
+ host.addEventListener("pointerenter", on);
224
+ host.addEventListener("pointerleave", off);
225
+ return () => {
226
+ host.removeEventListener("pointerenter", on);
227
+ host.removeEventListener("pointerleave", off);
228
+ };
229
+ }, [active, reduced, handleMouseEnter, handleMouseLeave]);
230
+ return /* @__PURE__ */ jsx2(
231
+ "span",
232
+ {
233
+ ref: wrap,
234
+ className: cn("inline-grid size-6 shrink-0 place-items-center align-middle [&>svg]:size-full", className),
235
+ style: size ? { width: size, height: size, ...style } : style,
236
+ onMouseEnter: hosted ? void 0 : handleMouseEnter,
237
+ onMouseLeave: hosted ? void 0 : handleMouseLeave,
238
+ ...props,
239
+ children: /* @__PURE__ */ jsxs2(
240
+ "svg",
241
+ {
242
+ fill: "none",
243
+ height: size,
244
+ stroke: "currentColor",
245
+ strokeLinecap: "round",
246
+ strokeLinejoin: "round",
247
+ strokeWidth: strokeWidth ?? 2,
248
+ viewBox: "0 0 24 24",
249
+ width: size,
250
+ xmlns: "http://www.w3.org/2000/svg",
251
+ children: [
252
+ /* @__PURE__ */ jsx2("path", { d: "M2 9V5a2 2 0 0 1 2-2h3.9a2 2 0 0 1 1.69.9l.81 1.2a2 2 0 0 0 1.67.9H20a2 2 0 0 1 2 2v10a2 2 0 0 1-2 2H4a2 2 0 0 1-2-2v-1" }),
253
+ /* @__PURE__ */ jsxs2(
254
+ motion2.g,
255
+ {
256
+ animate: controls,
257
+ initial: "normal",
258
+ transition: ARROW_TRANSITION,
259
+ variants: ARROW_VARIANTS,
260
+ children: [
261
+ /* @__PURE__ */ jsx2("path", { d: "M2 13h10" }),
262
+ /* @__PURE__ */ jsx2("path", { d: "m9 16 3-3-3-3" })
263
+ ]
264
+ }
265
+ )
266
+ ]
267
+ }
268
+ )
269
+ }
270
+ );
271
+ }
272
+ );
273
+ FolderInputIcon.displayName = "FolderInputIcon";
274
+
275
+ // src/icons/link.tsx
276
+ import { motion as motion3, useAnimation as useAnimation3, useReducedMotion as useReducedMotion3 } from "motion/react";
277
+ import { forwardRef as forwardRef3, useCallback as useCallback3, useEffect as useEffect3, useImperativeHandle as useImperativeHandle3, useRef as useRef3, useState as useState3 } from "react";
278
+ import { jsx as jsx3, jsxs as jsxs3 } from "react/jsx-runtime";
279
+ var PATH_VARIANTS = {
280
+ initial: { pathLength: 1, pathOffset: 0, rotate: 0 },
281
+ animate: {
282
+ pathLength: [1, 0.97, 1, 0.97, 1],
283
+ pathOffset: [0, 0.05, 0, 0.05, 0],
284
+ rotate: [0, -5, 0],
285
+ transition: {
286
+ rotate: {
287
+ duration: 0.5
288
+ },
289
+ duration: 1,
290
+ times: [0, 0.2, 0.4, 0.6, 1],
291
+ ease: "easeInOut"
292
+ }
293
+ }
294
+ };
295
+ var LinkIcon = forwardRef3(
296
+ ({ onMouseEnter, onMouseLeave, className, size, active, style, strokeWidth, ...props }, ref) => {
297
+ const controls = useAnimation3();
298
+ const isControlledRef = useRef3(false);
299
+ useImperativeHandle3(ref, () => {
300
+ isControlledRef.current = true;
301
+ return {
302
+ startAnimation: () => controls.start("animate"),
303
+ stopAnimation: () => controls.start("normal")
304
+ };
305
+ });
306
+ const handleMouseEnter = useCallback3(
307
+ (e) => {
308
+ if (isControlledRef.current) {
309
+ onMouseEnter?.(e);
310
+ } else {
311
+ controls.start("animate");
312
+ }
313
+ },
314
+ [controls, onMouseEnter]
315
+ );
316
+ const handleMouseLeave = useCallback3(
317
+ (e) => {
318
+ if (isControlledRef.current) {
319
+ onMouseLeave?.(e);
320
+ } else {
321
+ controls.start("normal");
322
+ }
323
+ },
324
+ [controls, onMouseLeave]
325
+ );
326
+ const wrap = useRef3(null);
327
+ const reduced = useReducedMotion3();
328
+ const [hosted, setHosted] = useState3(false);
329
+ useEffect3(() => {
330
+ const fake = {};
331
+ if (reduced) {
332
+ setHosted(true);
333
+ return;
334
+ }
335
+ if (active !== void 0) {
336
+ setHosted(true);
337
+ (active ? handleMouseEnter : handleMouseLeave)(fake);
338
+ return;
339
+ }
340
+ const host = wrap.current?.parentElement?.closest("button, a, [role=button], [role=menuitem], [role=tab], [role=switch], [role=radio], label");
341
+ setHosted(!!host);
342
+ if (!host) return;
343
+ const on = () => handleMouseEnter(fake);
344
+ const off = () => handleMouseLeave(fake);
345
+ host.addEventListener("pointerenter", on);
346
+ host.addEventListener("pointerleave", off);
347
+ return () => {
348
+ host.removeEventListener("pointerenter", on);
349
+ host.removeEventListener("pointerleave", off);
350
+ };
351
+ }, [active, reduced, handleMouseEnter, handleMouseLeave]);
352
+ return /* @__PURE__ */ jsx3(
353
+ "span",
354
+ {
355
+ ref: wrap,
356
+ className: cn("inline-grid size-6 shrink-0 place-items-center align-middle [&>svg]:size-full", className),
357
+ style: size ? { width: size, height: size, ...style } : style,
358
+ onMouseEnter: hosted ? void 0 : handleMouseEnter,
359
+ onMouseLeave: hosted ? void 0 : handleMouseLeave,
360
+ ...props,
361
+ children: /* @__PURE__ */ jsxs3(
362
+ "svg",
363
+ {
364
+ fill: "none",
365
+ height: size,
366
+ stroke: "currentColor",
367
+ strokeLinecap: "round",
368
+ strokeLinejoin: "round",
369
+ strokeWidth: strokeWidth ?? 2,
370
+ viewBox: "0 0 24 24",
371
+ width: size,
372
+ xmlns: "http://www.w3.org/2000/svg",
373
+ children: [
374
+ /* @__PURE__ */ jsx3(
375
+ motion3.path,
376
+ {
377
+ animate: controls,
378
+ d: "M10 13a5 5 0 0 0 7.54.54l3-3a5 5 0 0 0-7.07-7.07l-1.72 1.71",
379
+ variants: PATH_VARIANTS
380
+ }
381
+ ),
382
+ /* @__PURE__ */ jsx3(
383
+ motion3.path,
384
+ {
385
+ animate: controls,
386
+ d: "M14 11a5 5 0 0 0-7.54-.54l-3 3a5 5 0 0 0 7.07 7.07l1.71-1.71",
387
+ variants: PATH_VARIANTS
388
+ }
389
+ )
390
+ ]
391
+ }
392
+ )
393
+ }
394
+ );
395
+ }
396
+ );
397
+ LinkIcon.displayName = "LinkIcon";
398
+
399
+ // src/icons/square-pen.tsx
400
+ import { motion as motion4, useAnimation as useAnimation4, useReducedMotion as useReducedMotion4 } from "motion/react";
401
+ import { forwardRef as forwardRef4, useCallback as useCallback4, useEffect as useEffect4, useImperativeHandle as useImperativeHandle4, useRef as useRef4, useState as useState4 } from "react";
402
+ import { jsx as jsx4, jsxs as jsxs4 } from "react/jsx-runtime";
403
+ var PEN_VARIANTS = {
404
+ normal: {
405
+ rotate: 0,
406
+ x: 0,
407
+ y: 0
408
+ },
409
+ animate: {
410
+ rotate: [-0.5, 0.5, -0.5],
411
+ x: [0, -1, 1.5, 0],
412
+ y: [0, 1.5, -1, 0]
413
+ }
414
+ };
415
+ var SquarePenIcon = forwardRef4(
416
+ ({ onMouseEnter, onMouseLeave, className, size, active, style, strokeWidth, ...props }, ref) => {
417
+ const controls = useAnimation4();
418
+ const isControlledRef = useRef4(false);
419
+ useImperativeHandle4(ref, () => {
420
+ isControlledRef.current = true;
421
+ return {
422
+ startAnimation: () => controls.start("animate"),
423
+ stopAnimation: () => controls.start("normal")
424
+ };
425
+ });
426
+ const handleMouseEnter = useCallback4(
427
+ (e) => {
428
+ if (isControlledRef.current) {
429
+ onMouseEnter?.(e);
430
+ } else {
431
+ controls.start("animate");
432
+ }
433
+ },
434
+ [controls, onMouseEnter]
435
+ );
436
+ const handleMouseLeave = useCallback4(
437
+ (e) => {
438
+ if (isControlledRef.current) {
439
+ onMouseLeave?.(e);
440
+ } else {
441
+ controls.start("normal");
442
+ }
443
+ },
444
+ [controls, onMouseLeave]
445
+ );
446
+ const wrap = useRef4(null);
447
+ const reduced = useReducedMotion4();
448
+ const [hosted, setHosted] = useState4(false);
449
+ useEffect4(() => {
450
+ const fake = {};
451
+ if (reduced) {
452
+ setHosted(true);
453
+ return;
454
+ }
455
+ if (active !== void 0) {
456
+ setHosted(true);
457
+ (active ? handleMouseEnter : handleMouseLeave)(fake);
458
+ return;
459
+ }
460
+ const host = wrap.current?.parentElement?.closest("button, a, [role=button], [role=menuitem], [role=tab], [role=switch], [role=radio], label");
461
+ setHosted(!!host);
462
+ if (!host) return;
463
+ const on = () => handleMouseEnter(fake);
464
+ const off = () => handleMouseLeave(fake);
465
+ host.addEventListener("pointerenter", on);
466
+ host.addEventListener("pointerleave", off);
467
+ return () => {
468
+ host.removeEventListener("pointerenter", on);
469
+ host.removeEventListener("pointerleave", off);
470
+ };
471
+ }, [active, reduced, handleMouseEnter, handleMouseLeave]);
472
+ return /* @__PURE__ */ jsx4(
473
+ "span",
474
+ {
475
+ ref: wrap,
476
+ className: cn("inline-grid size-6 shrink-0 place-items-center align-middle [&>svg]:size-full", className),
477
+ style: size ? { width: size, height: size, ...style } : style,
478
+ onMouseEnter: hosted ? void 0 : handleMouseEnter,
479
+ onMouseLeave: hosted ? void 0 : handleMouseLeave,
480
+ ...props,
481
+ children: /* @__PURE__ */ jsxs4(
482
+ "svg",
483
+ {
484
+ fill: "none",
485
+ height: size,
486
+ stroke: "currentColor",
487
+ strokeLinecap: "round",
488
+ strokeLinejoin: "round",
489
+ strokeWidth: strokeWidth ?? 2,
490
+ style: { overflow: "visible" },
491
+ viewBox: "0 0 24 24",
492
+ width: size,
493
+ xmlns: "http://www.w3.org/2000/svg",
494
+ children: [
495
+ /* @__PURE__ */ jsx4("path", { d: "M12 3H5a2 2 0 0 0-2 2v14a2 2 0 0 0 2 2h14a2 2 0 0 0 2-2v-7" }),
496
+ /* @__PURE__ */ jsx4(
497
+ motion4.path,
498
+ {
499
+ animate: controls,
500
+ d: "M18.375 2.625a1 1 0 0 1 3 3l-9.013 9.014a2 2 0 0 1-.853.505l-2.873.84a.5.5 0 0 1-.62-.62l.84-2.873a2 2 0 0 1 .506-.852z",
501
+ variants: PEN_VARIANTS
502
+ }
503
+ )
504
+ ]
505
+ }
506
+ )
507
+ }
508
+ );
509
+ }
510
+ );
511
+ SquarePenIcon.displayName = "SquarePenIcon";
512
+
513
+ // src/components/context-menu/context-menu.tsx
514
+ import { Fragment, jsx as jsx5, jsxs as jsxs5 } from "react/jsx-runtime";
515
+ var isItem = (i) => !("separator" in i);
516
+ var DEFAULT_ITEMS = [
517
+ {
518
+ id: "ask",
519
+ label: "Ask AI about this",
520
+ icon: SparklesIcon,
521
+ feedback: "Asking AI"
522
+ },
523
+ { separator: true },
524
+ {
525
+ id: "open",
526
+ label: "Open",
527
+ icon: EyeIcon,
528
+ shortcut: "\u2318O",
529
+ feedback: "Opened"
530
+ },
531
+ {
532
+ id: "rename",
533
+ label: "Rename",
534
+ icon: SquarePenIcon,
535
+ shortcut: "F2",
536
+ feedback: "Renaming"
537
+ },
538
+ {
539
+ id: "duplicate",
540
+ label: "Duplicate",
541
+ icon: CopyIcon,
542
+ shortcut: "\u2318D",
543
+ feedback: "Duplicated"
544
+ },
545
+ {
546
+ id: "link",
547
+ label: "Copy link",
548
+ icon: LinkIcon,
549
+ shortcut: "\u2318L",
550
+ done: { label: "Link copied", icon: ClipboardCheckIcon },
551
+ feedback: "Link copied"
552
+ },
553
+ { id: "save", label: "Bookmark", icon: BookmarkIcon, feedback: "Bookmarked" },
554
+ {
555
+ id: "move",
556
+ label: "Move to",
557
+ icon: FolderInputIcon,
558
+ items: [
559
+ {
560
+ id: "design",
561
+ label: "Design",
562
+ icon: FolderOpenIcon,
563
+ feedback: "Moved to Design"
564
+ },
565
+ {
566
+ id: "marketing",
567
+ label: "Marketing",
568
+ icon: FolderOpenIcon,
569
+ feedback: "Moved to Marketing"
570
+ },
571
+ {
572
+ id: "archive",
573
+ label: "Archive",
574
+ icon: FolderOpenIcon,
575
+ feedback: "Moved to Archive"
576
+ }
577
+ ]
578
+ },
579
+ {
580
+ id: "download",
581
+ label: "Download",
582
+ icon: DownloadIcon,
583
+ shortcut: "\u2318S",
584
+ feedback: "Downloading"
585
+ },
586
+ { separator: true },
587
+ {
588
+ id: "delete",
589
+ label: "Delete",
590
+ icon: DeleteIcon,
591
+ shortcut: "\u232B",
592
+ danger: true,
593
+ confirm: "Click again to delete",
594
+ feedback: "Moved to trash"
595
+ }
596
+ ];
597
+ var GLIDE = [0.22, 1, 0.36, 1];
598
+ var PILL = { type: "spring", stiffness: 520, damping: 38 };
599
+ var MENU_W = 232;
600
+ var MENU = {
601
+ closed: { opacity: 0, scale: 0.9, filter: "blur(6px)" },
602
+ open: {
603
+ opacity: 1,
604
+ scale: 1,
605
+ filter: "blur(0px)",
606
+ transition: {
607
+ type: "spring",
608
+ stiffness: 460,
609
+ damping: 32,
610
+ staggerChildren: 0.025
611
+ }
612
+ },
613
+ exit: {
614
+ opacity: 0,
615
+ scale: 0.96,
616
+ filter: "blur(4px)",
617
+ transition: { duration: 0.14, ease: GLIDE }
618
+ }
619
+ };
620
+ var ROW = {
621
+ closed: { opacity: 0, y: 4 },
622
+ open: { opacity: 1, y: 0, transition: { duration: 0.25, ease: GLIDE } }
623
+ };
624
+ function FileCard() {
625
+ return /* @__PURE__ */ jsxs5("div", { className: "flex w-[280px] items-center gap-3 rounded-2xl bg-white p-3 shadow-[0_1px_2px_rgba(0,0,0,0.04),0_12px_32px_-16px_rgba(0,0,0,0.18)] dark:bg-zinc-900", children: [
626
+ /* @__PURE__ */ jsx5("span", { className: "grid size-11 shrink-0 place-items-center rounded-xl bg-[#242423]/[0.06] text-xs font-semibold text-zinc-500 dark:bg-white/[0.08]", children: "PDF" }),
627
+ /* @__PURE__ */ jsxs5("div", { className: "min-w-0 flex-1", children: [
628
+ /* @__PURE__ */ jsx5("p", { className: "truncate text-sm font-medium text-[#242423] dark:text-zinc-100", children: "Q3 report.pdf" }),
629
+ /* @__PURE__ */ jsx5("p", { className: "text-xs text-zinc-500 dark:text-zinc-400", children: "2.4 MB \xB7 Edited 2h ago" })
630
+ ] })
631
+ ] });
632
+ }
633
+ function Panel({
634
+ items,
635
+ hover,
636
+ setHover,
637
+ armed,
638
+ doneId,
639
+ openSub,
640
+ onPick,
641
+ onSub,
642
+ still,
643
+ pillId,
644
+ style,
645
+ origin,
646
+ onKey,
647
+ panelRef
648
+ }) {
649
+ return /* @__PURE__ */ jsx5(
650
+ motion5.div,
651
+ {
652
+ ref: panelRef,
653
+ role: "menu",
654
+ tabIndex: -1,
655
+ onKeyDown: onKey,
656
+ variants: still ? void 0 : MENU,
657
+ initial: still ? false : "closed",
658
+ animate: "open",
659
+ exit: still ? void 0 : "exit",
660
+ style: { ...style, transformOrigin: origin, width: MENU_W },
661
+ onPointerLeave: () => setHover(null),
662
+ className: "fixed z-[1000] rounded-2xl bg-white p-1.5 text-[#242423] shadow-[0_1px_2px_rgba(0,0,0,0.06),0_16px_40px_-12px_rgba(0,0,0,0.25)] ring-1 ring-black/5 outline-none dark:bg-zinc-900 dark:text-zinc-100 dark:ring-white/10",
663
+ children: items.map((it, i) => {
664
+ if (!isItem(it)) {
665
+ return /* @__PURE__ */ jsx5(
666
+ motion5.div,
667
+ {
668
+ variants: ROW,
669
+ "aria-hidden": true,
670
+ className: "mx-2.5 my-1 h-px bg-[#242423]/[0.07] dark:bg-white/10"
671
+ },
672
+ `sep-${i}`
673
+ );
674
+ }
675
+ const on = hover === it.id || openSub === it.id;
676
+ const isArmed = armed === it.id;
677
+ const isDone = doneId === it.id;
678
+ const Icon = isDone && it.done?.icon ? it.done.icon : it.icon;
679
+ const text = isDone && it.done ? it.done.label : isArmed && it.confirm ? it.confirm : it.label;
680
+ return /* @__PURE__ */ jsxs5(
681
+ motion5.button,
682
+ {
683
+ type: "button",
684
+ role: "menuitem",
685
+ "data-id": it.id,
686
+ "aria-haspopup": it.items ? "menu" : void 0,
687
+ "aria-expanded": it.items ? openSub === it.id : void 0,
688
+ variants: ROW,
689
+ onPointerEnter: (e) => {
690
+ setHover(it.id);
691
+ if (it.items) onSub(it, e.currentTarget);
692
+ },
693
+ onFocus: () => setHover(it.id),
694
+ onClick: (e) => it.items ? onSub(it, e.currentTarget) : onPick(it, e.currentTarget),
695
+ whileTap: still ? void 0 : { scale: 0.98 },
696
+ className: cn(
697
+ "relative flex h-9 w-full cursor-pointer items-center gap-2.5 rounded-xl px-2.5 text-left text-sm font-medium outline-none",
698
+ it.danger && "text-[#d23f3f] dark:text-[#f07070]"
699
+ ),
700
+ children: [
701
+ on && /* @__PURE__ */ jsx5(
702
+ motion5.span,
703
+ {
704
+ layoutId: pillId,
705
+ className: cn(
706
+ "absolute inset-0 rounded-xl",
707
+ it.danger ? "bg-[#d23f3f]/[0.08]" : "bg-[#242423]/[0.05] dark:bg-white/[0.06]"
708
+ ),
709
+ transition: still ? { duration: 0 } : PILL
710
+ }
711
+ ),
712
+ isArmed && /* @__PURE__ */ jsx5(
713
+ motion5.span,
714
+ {
715
+ "aria-hidden": true,
716
+ className: "absolute inset-0 origin-left rounded-xl bg-[#d23f3f]/[0.1]",
717
+ initial: still ? false : { scaleX: 0 },
718
+ animate: { scaleX: 1 },
719
+ transition: { duration: 0.35, ease: GLIDE }
720
+ }
721
+ ),
722
+ /* @__PURE__ */ jsx5(
723
+ "span",
724
+ {
725
+ className: cn(
726
+ "relative grid size-4 shrink-0 place-items-center transition-colors",
727
+ it.danger ? "" : on ? "text-[#242423] dark:text-zinc-100" : "text-zinc-500 dark:text-zinc-400",
728
+ isDone && "text-[#269a5a]"
729
+ ),
730
+ children: Icon && /* @__PURE__ */ jsx5(
731
+ Icon,
732
+ {
733
+ className: "size-4",
734
+ active: on || isDone || isArmed
735
+ },
736
+ isDone ? "done" : "icon"
737
+ )
738
+ }
739
+ ),
740
+ /* @__PURE__ */ jsx5("span", { className: "relative h-5 flex-1 overflow-hidden", children: /* @__PURE__ */ jsx5(AnimatePresence, { mode: "popLayout", initial: false, children: /* @__PURE__ */ jsx5(
741
+ motion5.span,
742
+ {
743
+ className: "block truncate leading-5",
744
+ initial: still ? false : { y: 14, opacity: 0 },
745
+ animate: { y: 0, opacity: 1 },
746
+ exit: still ? void 0 : { y: -14, opacity: 0 },
747
+ transition: { type: "spring", stiffness: 420, damping: 32 },
748
+ children: text
749
+ },
750
+ text
751
+ ) }) }),
752
+ it.items ? /* @__PURE__ */ jsx5("span", { className: "relative grid size-4 place-items-center text-zinc-400", children: /* @__PURE__ */ jsx5(ChevronRightIcon, { className: "size-4", active: on }) }) : it.shortcut ? /* @__PURE__ */ jsx5("kbd", { className: "relative font-sans text-xs text-zinc-400", children: it.shortcut }) : null
753
+ ]
754
+ },
755
+ it.id
756
+ );
757
+ })
758
+ }
759
+ );
760
+ }
761
+ var ContextMenu = React.forwardRef(
762
+ function ContextMenu2({
763
+ items = DEFAULT_ITEMS,
764
+ children,
765
+ label = "File, right click for actions",
766
+ className
767
+ }, ref) {
768
+ const still = !!useReducedMotion5();
769
+ const id = React.useId();
770
+ const root = React.useRef(null);
771
+ React.useImperativeHandle(ref, () => root.current);
772
+ const menuRef = React.useRef(null);
773
+ const subRef = React.useRef(null);
774
+ const [at, setAt] = React.useState(null);
775
+ const [hover, setHover] = React.useState(null);
776
+ const [subHover, setSubHover] = React.useState(null);
777
+ const [sub, setSub] = React.useState(null);
778
+ const [armed, setArmed] = React.useState(null);
779
+ const [doneId, setDoneId] = React.useState(null);
780
+ const [toast, setToast] = React.useState(null);
781
+ const press = React.useRef(0);
782
+ const close = React.useCallback(() => {
783
+ setAt(null);
784
+ setHover(null);
785
+ setSub(null);
786
+ setSubHover(null);
787
+ setArmed(null);
788
+ setDoneId(null);
789
+ }, []);
790
+ const openAt = (clientX, clientY) => {
791
+ const x = clientX;
792
+ const y = clientY;
793
+ const h = items.filter(isItem).length * 36 + (items.length - items.filter(isItem).length) * 9 + 16;
794
+ setAt({
795
+ x,
796
+ y,
797
+ flipX: clientX + MENU_W + 8 > window.innerWidth,
798
+ flipY: clientY + h + 8 > window.innerHeight
799
+ });
800
+ setHover(null);
801
+ setSub(null);
802
+ setArmed(null);
803
+ setDoneId(null);
804
+ requestAnimationFrame(() => menuRef.current?.focus());
805
+ };
806
+ React.useEffect(() => {
807
+ if (!at) return;
808
+ const down = (e) => {
809
+ if (!menuRef.current?.contains(e.target) && !subRef.current?.contains(e.target))
810
+ close();
811
+ };
812
+ document.addEventListener("pointerdown", down);
813
+ window.addEventListener("scroll", close, {
814
+ passive: true,
815
+ capture: true
816
+ });
817
+ return () => {
818
+ document.removeEventListener("pointerdown", down);
819
+ window.removeEventListener("scroll", close, { capture: true });
820
+ };
821
+ }, [at, close]);
822
+ React.useEffect(() => {
823
+ if (!toast) return;
824
+ const t = window.setTimeout(() => setToast(null), 2200);
825
+ return () => window.clearTimeout(t);
826
+ }, [toast]);
827
+ const run = (it) => {
828
+ it.onSelect?.();
829
+ if (it.feedback) setToast({ key: Date.now(), text: it.feedback });
830
+ };
831
+ const pick = (it) => {
832
+ if (it.confirm && armed !== it.id) {
833
+ setArmed(it.id);
834
+ return;
835
+ }
836
+ if (it.done) {
837
+ setDoneId(it.id);
838
+ window.setTimeout(
839
+ () => {
840
+ run(it);
841
+ close();
842
+ },
843
+ still ? 0 : 750
844
+ );
845
+ return;
846
+ }
847
+ run(it);
848
+ close();
849
+ };
850
+ const openSub = (it, row) => {
851
+ const m = menuRef.current.getBoundingClientRect();
852
+ const r = row.getBoundingClientRect();
853
+ const left = m.right + MENU_W + 8 > window.innerWidth;
854
+ const subH = (it.items?.length ?? 0) * 36 + 16;
855
+ const top = Math.max(
856
+ 8,
857
+ Math.min(r.top - 6, window.innerHeight - subH - 8)
858
+ );
859
+ setSub({
860
+ id: it.id,
861
+ top,
862
+ x: left ? m.left - MENU_W + 6 : m.right - 6,
863
+ left
864
+ });
865
+ };
866
+ const keys = (inSub) => (e) => {
867
+ const panel = (inSub ? subRef : menuRef).current;
868
+ if (!panel) return;
869
+ const rows = Array.from(
870
+ panel.querySelectorAll("[role=menuitem]")
871
+ );
872
+ const at2 = rows.indexOf(document.activeElement);
873
+ if (e.key === "ArrowDown" || e.key === "ArrowUp") {
874
+ e.preventDefault();
875
+ const n = e.key === "ArrowDown" ? (at2 + 1) % rows.length : (at2 - 1 + rows.length) % rows.length;
876
+ rows[at2 < 0 ? 0 : n]?.focus();
877
+ } else if (e.key === "ArrowRight" && !inSub && at2 >= 0) {
878
+ const it = items.filter(isItem).find((x) => x.id === rows[at2].dataset.id);
879
+ if (it?.items) {
880
+ e.preventDefault();
881
+ openSub(it, rows[at2]);
882
+ requestAnimationFrame(
883
+ () => subRef.current?.querySelector("[role=menuitem]")?.focus()
884
+ );
885
+ }
886
+ } else if ((e.key === "ArrowLeft" || e.key === "Escape") && inSub) {
887
+ e.preventDefault();
888
+ e.stopPropagation();
889
+ const owner = sub?.id;
890
+ setSub(null);
891
+ requestAnimationFrame(
892
+ () => menuRef.current?.querySelector(`[data-id="${owner}"]`)?.focus()
893
+ );
894
+ } else if (e.key === "Escape") {
895
+ e.preventDefault();
896
+ e.stopPropagation();
897
+ close();
898
+ root.current?.focus();
899
+ } else if (e.key === "Tab") {
900
+ e.preventDefault();
901
+ }
902
+ };
903
+ const subItems = sub ? items.filter(isItem).find((x) => x.id === sub.id)?.items ?? [] : [];
904
+ const pos = at ? {
905
+ left: Math.max(8, at.flipX ? at.x - MENU_W : at.x),
906
+ ...at.flipY ? { bottom: window.innerHeight - at.y } : { top: at.y }
907
+ } : {};
908
+ const origin = at ? `${at.flipY ? "bottom" : "top"} ${at.flipX ? "right" : "left"}` : "top left";
909
+ return /* @__PURE__ */ jsxs5(
910
+ "div",
911
+ {
912
+ ref: root,
913
+ tabIndex: 0,
914
+ role: "button",
915
+ "aria-label": label,
916
+ "aria-haspopup": "menu",
917
+ "aria-expanded": !!at,
918
+ onContextMenu: (e) => {
919
+ e.preventDefault();
920
+ openAt(e.clientX, e.clientY);
921
+ },
922
+ onKeyDown: (e) => {
923
+ if (at) return;
924
+ if (e.shiftKey && e.key === "F10" || e.key === "ContextMenu") {
925
+ e.preventDefault();
926
+ const r = root.current.getBoundingClientRect();
927
+ openAt(r.left + r.width / 2, r.top + r.height / 2);
928
+ }
929
+ },
930
+ onPointerDown: (e) => {
931
+ if (e.pointerType !== "touch") return;
932
+ const { clientX, clientY } = e;
933
+ window.clearTimeout(press.current);
934
+ press.current = window.setTimeout(
935
+ () => openAt(clientX, clientY),
936
+ 500
937
+ );
938
+ },
939
+ onPointerUp: () => window.clearTimeout(press.current),
940
+ onPointerCancel: () => window.clearTimeout(press.current),
941
+ className: cn(
942
+ "relative inline-block select-none rounded-2xl outline-none focus-visible:ring-2 focus-visible:ring-zinc-400 focus-visible:ring-offset-4",
943
+ className
944
+ ),
945
+ children: [
946
+ children ?? /* @__PURE__ */ jsx5(FileCard, {}),
947
+ typeof document !== "undefined" && createPortal(
948
+ /* @__PURE__ */ jsxs5(Fragment, { children: [
949
+ /* @__PURE__ */ jsx5(AnimatePresence, { children: at && /* @__PURE__ */ jsx5(
950
+ Panel,
951
+ {
952
+ panelRef: menuRef,
953
+ items,
954
+ hover,
955
+ setHover: (h) => {
956
+ setHover(h);
957
+ const it = items.filter(isItem).find((x) => x.id === h);
958
+ if (h && !it?.items) setSub(null);
959
+ if (h !== armed) setArmed(null);
960
+ },
961
+ armed,
962
+ doneId,
963
+ openSub: sub?.id ?? null,
964
+ onPick: (it) => pick(it),
965
+ onSub: (it, el) => openSub(it, el),
966
+ still,
967
+ pillId: `${id}-pill`,
968
+ style: pos,
969
+ origin,
970
+ onKey: keys(false)
971
+ },
972
+ "menu"
973
+ ) }),
974
+ /* @__PURE__ */ jsx5(AnimatePresence, { children: at && sub && /* @__PURE__ */ jsx5(
975
+ Panel,
976
+ {
977
+ panelRef: subRef,
978
+ items: subItems,
979
+ hover: subHover,
980
+ setHover: setSubHover,
981
+ armed: null,
982
+ doneId: null,
983
+ openSub: null,
984
+ onPick: (it) => pick(it),
985
+ onSub: () => {
986
+ },
987
+ still,
988
+ pillId: `${id}-subpill`,
989
+ style: { left: sub.x, top: sub.top },
990
+ origin: sub.left ? "top right" : "top left",
991
+ onKey: keys(true)
992
+ },
993
+ `sub-${sub.id}`
994
+ ) })
995
+ ] }),
996
+ document.body
997
+ ),
998
+ /* @__PURE__ */ jsx5("div", { className: "pointer-events-none absolute inset-x-0 top-full mt-4 flex justify-center", children: /* @__PURE__ */ jsx5(AnimatePresence, { mode: "popLayout", children: toast && /* @__PURE__ */ jsxs5(
999
+ motion5.span,
1000
+ {
1001
+ role: "status",
1002
+ initial: still ? false : { opacity: 0, y: 8, scale: 0.94 },
1003
+ animate: { opacity: 1, y: 0, scale: 1 },
1004
+ exit: still ? void 0 : { opacity: 0, y: -4, scale: 0.96 },
1005
+ transition: { type: "spring", stiffness: 420, damping: 28 },
1006
+ className: "inline-flex h-9 items-center gap-2 whitespace-nowrap rounded-full bg-[#242423] pl-3 pr-4 text-sm font-medium text-white dark:bg-zinc-100 dark:text-[#242423]",
1007
+ children: [
1008
+ /* @__PURE__ */ jsx5(CheckIcon, { className: "size-4", active: true }),
1009
+ toast.text
1010
+ ]
1011
+ },
1012
+ toast.key
1013
+ ) }) })
1014
+ ]
1015
+ }
1016
+ );
1017
+ }
1018
+ );
1019
+
1020
+ export {
1021
+ ContextMenu
1022
+ };