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,3289 @@
1
+ "use client";
2
+ import {
3
+ ClockIcon
4
+ } from "./chunk-LBRMNY72.js";
5
+ import {
6
+ MicIcon
7
+ } from "./chunk-H2JOCJWM.js";
8
+ import {
9
+ ChevronLeftIcon
10
+ } from "./chunk-LNBTWX4J.js";
11
+ import {
12
+ XIcon
13
+ } from "./chunk-7FQ4XU7E.js";
14
+ import {
15
+ CalendarDaysIcon
16
+ } from "./chunk-JJEWOQYQ.js";
17
+ import {
18
+ ChevronRightIcon
19
+ } from "./chunk-XH6YNONO.js";
20
+ import {
21
+ DeleteIcon
22
+ } from "./chunk-JFTD3YAL.js";
23
+ import {
24
+ SparklesIcon
25
+ } from "./chunk-YGONLKWH.js";
26
+ import {
27
+ ChevronDownIcon
28
+ } from "./chunk-NIQFSLPC.js";
29
+ import {
30
+ PlusIcon
31
+ } from "./chunk-HK34LPY6.js";
32
+ import {
33
+ FILE_TEXT
34
+ } from "./chunk-OINRQUYT.js";
35
+ import {
36
+ CheckIcon
37
+ } from "./chunk-JHT6RCGY.js";
38
+ import {
39
+ cn
40
+ } from "./chunk-2TQSHVXA.js";
41
+
42
+ // src/components/message-composer/message-composer.tsx
43
+ import * as React from "react";
44
+ import {
45
+ AnimatePresence,
46
+ motion as motion7,
47
+ useAnimationControls,
48
+ useInView,
49
+ useReducedMotion as useReducedMotion7
50
+ } from "motion/react";
51
+ import {
52
+ BellOff,
53
+ Ellipsis,
54
+ List,
55
+ ListOrdered,
56
+ Play,
57
+ TextQuote,
58
+ Video
59
+ } from "lucide-react";
60
+
61
+ // src/icons/bold.tsx
62
+ import { motion, useAnimation, useReducedMotion } from "motion/react";
63
+ import { forwardRef, useCallback, useEffect, useImperativeHandle, useRef, useState } from "react";
64
+ import { jsx } from "react/jsx-runtime";
65
+ var PATH_VARIANTS = {
66
+ normal: {
67
+ strokeWidth: 2
68
+ },
69
+ animate: {
70
+ strokeWidth: 3.5
71
+ }
72
+ };
73
+ var BoldIcon = forwardRef(
74
+ ({ onMouseEnter, onMouseLeave, className, size, active, style, strokeWidth, ...props }, ref) => {
75
+ const controls = useAnimation();
76
+ const isControlledRef = useRef(false);
77
+ useImperativeHandle(ref, () => {
78
+ isControlledRef.current = true;
79
+ return {
80
+ startAnimation: () => controls.start("animate"),
81
+ stopAnimation: () => controls.start("normal")
82
+ };
83
+ });
84
+ const handleMouseEnter = useCallback(
85
+ (e) => {
86
+ if (isControlledRef.current) {
87
+ onMouseEnter?.(e);
88
+ } else {
89
+ controls.start("animate");
90
+ }
91
+ },
92
+ [controls, onMouseEnter]
93
+ );
94
+ const handleMouseLeave = useCallback(
95
+ (e) => {
96
+ if (isControlledRef.current) {
97
+ onMouseLeave?.(e);
98
+ } else {
99
+ controls.start("normal");
100
+ }
101
+ },
102
+ [controls, onMouseLeave]
103
+ );
104
+ const wrap = useRef(null);
105
+ const reduced = useReducedMotion();
106
+ const [hosted, setHosted] = useState(false);
107
+ useEffect(() => {
108
+ const fake = {};
109
+ if (reduced) {
110
+ setHosted(true);
111
+ return;
112
+ }
113
+ if (active !== void 0) {
114
+ setHosted(true);
115
+ (active ? handleMouseEnter : handleMouseLeave)(fake);
116
+ return;
117
+ }
118
+ const host = wrap.current?.parentElement?.closest("button, a, [role=button], [role=menuitem], [role=tab], [role=switch], [role=radio], label");
119
+ setHosted(!!host);
120
+ if (!host) return;
121
+ const on = () => handleMouseEnter(fake);
122
+ const off = () => handleMouseLeave(fake);
123
+ host.addEventListener("pointerenter", on);
124
+ host.addEventListener("pointerleave", off);
125
+ return () => {
126
+ host.removeEventListener("pointerenter", on);
127
+ host.removeEventListener("pointerleave", off);
128
+ };
129
+ }, [active, reduced, handleMouseEnter, handleMouseLeave]);
130
+ return /* @__PURE__ */ jsx(
131
+ "span",
132
+ {
133
+ ref: wrap,
134
+ className: cn("inline-grid size-6 shrink-0 place-items-center align-middle [&>svg]:size-full", className),
135
+ style: size ? { width: size, height: size, ...style } : style,
136
+ onMouseEnter: hosted ? void 0 : handleMouseEnter,
137
+ onMouseLeave: hosted ? void 0 : handleMouseLeave,
138
+ ...props,
139
+ children: /* @__PURE__ */ jsx(
140
+ "svg",
141
+ {
142
+ fill: "none",
143
+ height: size,
144
+ stroke: "currentColor",
145
+ strokeLinecap: "round",
146
+ strokeLinejoin: "round",
147
+ strokeWidth: strokeWidth ?? 2,
148
+ viewBox: "0 0 24 24",
149
+ width: size,
150
+ xmlns: "http://www.w3.org/2000/svg",
151
+ children: /* @__PURE__ */ jsx(
152
+ motion.path,
153
+ {
154
+ animate: controls,
155
+ d: "M6 12h9a4 4 0 0 1 0 8H7a1 1 0 0 1-1-1V5a1 1 0 0 1 1-1h7a4 4 0 0 1 0 8",
156
+ transition: { duration: 0.6 },
157
+ variants: PATH_VARIANTS
158
+ }
159
+ )
160
+ }
161
+ )
162
+ }
163
+ );
164
+ }
165
+ );
166
+ BoldIcon.displayName = "BoldIcon";
167
+
168
+ // src/icons/italic.tsx
169
+ import { motion as motion2, useAnimation as useAnimation2, useReducedMotion as useReducedMotion2 } from "motion/react";
170
+ import { forwardRef as forwardRef2, useCallback as useCallback2, useEffect as useEffect2, useImperativeHandle as useImperativeHandle2, useRef as useRef2, useState as useState2 } from "react";
171
+ import { jsx as jsx2, jsxs } from "react/jsx-runtime";
172
+ var LINE_VARIANTS = {
173
+ normal: { pathLength: 1, opacity: 1, pathOffset: 0 },
174
+ animate: {
175
+ pathLength: [0, 1],
176
+ opacity: [0, 1],
177
+ pathOffset: [1, 0]
178
+ }
179
+ };
180
+ var ItalicIcon = forwardRef2(
181
+ ({ onMouseEnter, onMouseLeave, className, size, active, style, strokeWidth, ...props }, ref) => {
182
+ const controls = useAnimation2();
183
+ const isControlledRef = useRef2(false);
184
+ useImperativeHandle2(ref, () => {
185
+ isControlledRef.current = true;
186
+ return {
187
+ startAnimation: () => controls.start("animate"),
188
+ stopAnimation: () => controls.start("normal")
189
+ };
190
+ });
191
+ const handleMouseEnter = useCallback2(
192
+ (e) => {
193
+ if (isControlledRef.current) {
194
+ onMouseEnter?.(e);
195
+ } else {
196
+ controls.start("animate");
197
+ }
198
+ },
199
+ [controls, onMouseEnter]
200
+ );
201
+ const handleMouseLeave = useCallback2(
202
+ (e) => {
203
+ if (isControlledRef.current) {
204
+ onMouseLeave?.(e);
205
+ } else {
206
+ controls.start("normal");
207
+ }
208
+ },
209
+ [controls, onMouseLeave]
210
+ );
211
+ const wrap = useRef2(null);
212
+ const reduced = useReducedMotion2();
213
+ const [hosted, setHosted] = useState2(false);
214
+ useEffect2(() => {
215
+ const fake = {};
216
+ if (reduced) {
217
+ setHosted(true);
218
+ return;
219
+ }
220
+ if (active !== void 0) {
221
+ setHosted(true);
222
+ (active ? handleMouseEnter : handleMouseLeave)(fake);
223
+ return;
224
+ }
225
+ const host = wrap.current?.parentElement?.closest("button, a, [role=button], [role=menuitem], [role=tab], [role=switch], [role=radio], label");
226
+ setHosted(!!host);
227
+ if (!host) return;
228
+ const on = () => handleMouseEnter(fake);
229
+ const off = () => handleMouseLeave(fake);
230
+ host.addEventListener("pointerenter", on);
231
+ host.addEventListener("pointerleave", off);
232
+ return () => {
233
+ host.removeEventListener("pointerenter", on);
234
+ host.removeEventListener("pointerleave", off);
235
+ };
236
+ }, [active, reduced, handleMouseEnter, handleMouseLeave]);
237
+ return /* @__PURE__ */ jsx2(
238
+ "span",
239
+ {
240
+ ref: wrap,
241
+ className: cn("inline-grid size-6 shrink-0 place-items-center align-middle [&>svg]:size-full", className),
242
+ style: size ? { width: size, height: size, ...style } : style,
243
+ onMouseEnter: hosted ? void 0 : handleMouseEnter,
244
+ onMouseLeave: hosted ? void 0 : handleMouseLeave,
245
+ ...props,
246
+ children: /* @__PURE__ */ jsxs(
247
+ "svg",
248
+ {
249
+ fill: "none",
250
+ height: size,
251
+ stroke: "currentColor",
252
+ strokeLinecap: "round",
253
+ strokeLinejoin: "round",
254
+ strokeWidth: strokeWidth ?? 2,
255
+ viewBox: "0 0 24 24",
256
+ width: size,
257
+ xmlns: "http://www.w3.org/2000/svg",
258
+ children: [
259
+ /* @__PURE__ */ jsx2(
260
+ motion2.line,
261
+ {
262
+ animate: controls,
263
+ transition: { duration: 0.2 },
264
+ variants: LINE_VARIANTS,
265
+ x1: "19",
266
+ x2: "10",
267
+ y1: "4",
268
+ y2: "4"
269
+ }
270
+ ),
271
+ /* @__PURE__ */ jsx2(
272
+ motion2.line,
273
+ {
274
+ animate: controls,
275
+ transition: { duration: 0.2 },
276
+ variants: LINE_VARIANTS,
277
+ x1: "14",
278
+ x2: "5",
279
+ y1: "20",
280
+ y2: "20"
281
+ }
282
+ ),
283
+ /* @__PURE__ */ jsx2(
284
+ motion2.line,
285
+ {
286
+ animate: controls,
287
+ transition: {
288
+ delay: 0.1,
289
+ duration: 0.4
290
+ },
291
+ variants: {
292
+ normal: { pathLength: 1, pathOffset: 0 },
293
+ animate: {
294
+ pathLength: [0, 1],
295
+ pathOffset: [1, 0]
296
+ }
297
+ },
298
+ x1: "15",
299
+ x2: "9",
300
+ y1: "4",
301
+ y2: "20"
302
+ }
303
+ )
304
+ ]
305
+ }
306
+ )
307
+ }
308
+ );
309
+ }
310
+ );
311
+ ItalicIcon.displayName = "ItalicIcon";
312
+
313
+ // src/icons/send.tsx
314
+ import { motion as motion3, useAnimation as useAnimation3, useReducedMotion as useReducedMotion3 } from "motion/react";
315
+ import { forwardRef as forwardRef3, useCallback as useCallback3, useEffect as useEffect3, useImperativeHandle as useImperativeHandle3, useRef as useRef3, useState as useState3 } from "react";
316
+ import { jsx as jsx3, jsxs as jsxs2 } from "react/jsx-runtime";
317
+ var SendIcon = forwardRef3(
318
+ ({ onMouseEnter, onMouseLeave, className, size, active, style, strokeWidth, ...props }, ref) => {
319
+ const controls = useAnimation3();
320
+ const isControlledRef = useRef3(false);
321
+ useImperativeHandle3(ref, () => {
322
+ isControlledRef.current = true;
323
+ return {
324
+ startAnimation: () => controls.start("animate"),
325
+ stopAnimation: () => controls.start("normal")
326
+ };
327
+ });
328
+ const handleMouseEnter = useCallback3(
329
+ (e) => {
330
+ if (isControlledRef.current) {
331
+ onMouseEnter?.(e);
332
+ } else {
333
+ controls.start("animate");
334
+ }
335
+ },
336
+ [controls, onMouseEnter]
337
+ );
338
+ const handleMouseLeave = useCallback3(
339
+ (e) => {
340
+ if (isControlledRef.current) {
341
+ onMouseLeave?.(e);
342
+ } else {
343
+ controls.start("normal");
344
+ }
345
+ },
346
+ [controls, onMouseLeave]
347
+ );
348
+ const wrap = useRef3(null);
349
+ const reduced = useReducedMotion3();
350
+ const [hosted, setHosted] = useState3(false);
351
+ useEffect3(() => {
352
+ const fake = {};
353
+ if (reduced) {
354
+ setHosted(true);
355
+ return;
356
+ }
357
+ if (active !== void 0) {
358
+ setHosted(true);
359
+ (active ? handleMouseEnter : handleMouseLeave)(fake);
360
+ return;
361
+ }
362
+ const host = wrap.current?.parentElement?.closest("button, a, [role=button], [role=menuitem], [role=tab], [role=switch], [role=radio], label");
363
+ setHosted(!!host);
364
+ if (!host) return;
365
+ const on = () => handleMouseEnter(fake);
366
+ const off = () => handleMouseLeave(fake);
367
+ host.addEventListener("pointerenter", on);
368
+ host.addEventListener("pointerleave", off);
369
+ return () => {
370
+ host.removeEventListener("pointerenter", on);
371
+ host.removeEventListener("pointerleave", off);
372
+ };
373
+ }, [active, reduced, handleMouseEnter, handleMouseLeave]);
374
+ return /* @__PURE__ */ jsx3(
375
+ "span",
376
+ {
377
+ ref: wrap,
378
+ className: cn("inline-grid size-6 shrink-0 place-items-center align-middle [&>svg]:size-full", className),
379
+ style: size ? { width: size, height: size, ...style } : style,
380
+ onMouseEnter: hosted ? void 0 : handleMouseEnter,
381
+ onMouseLeave: hosted ? void 0 : handleMouseLeave,
382
+ ...props,
383
+ children: /* @__PURE__ */ jsxs2(
384
+ "svg",
385
+ {
386
+ className: "overflow-visible",
387
+ fill: "none",
388
+ height: size,
389
+ stroke: "currentColor",
390
+ strokeLinecap: "round",
391
+ strokeLinejoin: "round",
392
+ strokeWidth: strokeWidth ?? 2,
393
+ viewBox: "0 0 24 24",
394
+ width: size,
395
+ xmlns: "http://www.w3.org/2000/svg",
396
+ children: [
397
+ /* @__PURE__ */ jsxs2(
398
+ motion3.g,
399
+ {
400
+ animate: controls,
401
+ transition: { duration: 0.5 },
402
+ variants: {
403
+ normal: { x: 0, y: 0, scale: 1 },
404
+ animate: {
405
+ x: 3,
406
+ y: -3,
407
+ scale: 0.8
408
+ }
409
+ },
410
+ children: [
411
+ /* @__PURE__ */ jsx3("path", { d: "M14.536 21.686a.5.5 0 0 0 .937-.024l6.5-19a.496.496 0 0 0-.635-.635l-19 6.5a.5.5 0 0 0-.024.937l7.93 3.18a2 2 0 0 1 1.112 1.11z" }),
412
+ /* @__PURE__ */ jsx3("path", { d: "m21.854 2.147-10.94 10.939" })
413
+ ]
414
+ }
415
+ ),
416
+ /* @__PURE__ */ jsx3(
417
+ motion3.path,
418
+ {
419
+ animate: controls,
420
+ d: "M -3 28 C -0.5 26.8 1.6 24.6 3.3 22 C 4.8 19.7 5.2 17.6 4.2 16.1 C 3.2 14.7 1.4 14.5 0.3 15.8 C -0.9 17.2 -0.6 19.4 1.2 20.4 C 3.4 21.5 6.4 19.4 9 15.8",
421
+ fill: "none",
422
+ initial: { opacity: 0, pathLength: 0 },
423
+ stroke: "currentColor",
424
+ strokeDasharray: "2 2",
425
+ strokeWidth: "1",
426
+ transition: { duration: 0.55, delay: 0.1 },
427
+ variants: {
428
+ normal: {
429
+ pathLength: 0,
430
+ opacity: 0,
431
+ translateX: -3,
432
+ translateY: 3,
433
+ transition: { duration: 0.3 }
434
+ },
435
+ animate: {
436
+ pathLength: 1,
437
+ opacity: 1,
438
+ translateX: 0,
439
+ translateY: 0
440
+ }
441
+ }
442
+ }
443
+ )
444
+ ]
445
+ }
446
+ )
447
+ }
448
+ );
449
+ }
450
+ );
451
+ SendIcon.displayName = "SendIcon";
452
+
453
+ // src/icons/smile.tsx
454
+ import { motion as motion4, useAnimation as useAnimation4, useReducedMotion as useReducedMotion4 } from "motion/react";
455
+ import { forwardRef as forwardRef4, useCallback as useCallback4, useEffect as useEffect4, useImperativeHandle as useImperativeHandle4, useRef as useRef4, useState as useState4 } from "react";
456
+ import { jsx as jsx4, jsxs as jsxs3 } from "react/jsx-runtime";
457
+ var SmileIcon = forwardRef4(
458
+ ({ onMouseEnter, onMouseLeave, className, size, active, style, strokeWidth, ...props }, ref) => {
459
+ const controls = useAnimation4();
460
+ const isControlledRef = useRef4(false);
461
+ useImperativeHandle4(ref, () => {
462
+ isControlledRef.current = true;
463
+ return {
464
+ startAnimation: () => controls.start("animate"),
465
+ stopAnimation: () => controls.start("normal")
466
+ };
467
+ });
468
+ const handleMouseEnter = useCallback4(
469
+ (e) => {
470
+ if (!isControlledRef.current) controls.start("animate");
471
+ onMouseEnter?.(e);
472
+ },
473
+ [controls, onMouseEnter]
474
+ );
475
+ const handleMouseLeave = useCallback4(
476
+ (e) => {
477
+ if (!isControlledRef.current) controls.start("normal");
478
+ onMouseLeave?.(e);
479
+ },
480
+ [controls, onMouseLeave]
481
+ );
482
+ const faceVariants = {
483
+ normal: {
484
+ scale: 1,
485
+ rotate: 0,
486
+ strokeWidth: 2,
487
+ transition: { duration: 0.3, ease: "easeOut" }
488
+ },
489
+ animate: {
490
+ scale: [1, 1.15, 1.05, 1.1],
491
+ rotate: [0, -3, 3, 0],
492
+ strokeWidth: [2, 2.5, 2.5, 2.5],
493
+ transition: {
494
+ duration: 0.8,
495
+ times: [0, 0.3, 0.6, 1],
496
+ ease: "easeInOut"
497
+ }
498
+ }
499
+ };
500
+ const mouthVariants = {
501
+ normal: {
502
+ d: "M8 14s1.5 2 4 2 4-2 4-2",
503
+ pathLength: 1,
504
+ pathOffset: 0,
505
+ strokeWidth: 2,
506
+ transition: { duration: 0.3, ease: "easeOut" }
507
+ },
508
+ animate: {
509
+ d: "M7 13.5s2.5 3.5 5 3.5 5-3.5 5-3.5",
510
+ pathLength: [0.3, 1, 1],
511
+ pathOffset: [0, 0, 0],
512
+ strokeWidth: 2.5,
513
+ transition: {
514
+ d: { duration: 0.4, ease: "easeOut" },
515
+ pathLength: {
516
+ duration: 0.5,
517
+ times: [0, 0.5, 1],
518
+ ease: "easeInOut"
519
+ },
520
+ delay: 0.1
521
+ }
522
+ }
523
+ };
524
+ const eyeVariants = {
525
+ normal: {
526
+ scale: 1,
527
+ opacity: 1,
528
+ transition: { duration: 0.3, ease: "easeOut" }
529
+ },
530
+ animate: {
531
+ scale: [1, 1.5, 0.8, 1.2],
532
+ opacity: [1, 1, 1, 1],
533
+ transition: {
534
+ duration: 0.5,
535
+ times: [0, 0.3, 0.6, 1],
536
+ ease: "easeInOut"
537
+ }
538
+ }
539
+ };
540
+ const wrap = useRef4(null);
541
+ const reduced = useReducedMotion4();
542
+ const [hosted, setHosted] = useState4(false);
543
+ useEffect4(() => {
544
+ const fake = {};
545
+ if (reduced) {
546
+ setHosted(true);
547
+ return;
548
+ }
549
+ if (active !== void 0) {
550
+ setHosted(true);
551
+ (active ? handleMouseEnter : handleMouseLeave)(fake);
552
+ return;
553
+ }
554
+ const host = wrap.current?.parentElement?.closest("button, a, [role=button], [role=menuitem], [role=tab], [role=switch], [role=radio], label");
555
+ setHosted(!!host);
556
+ if (!host) return;
557
+ const on = () => handleMouseEnter(fake);
558
+ const off = () => handleMouseLeave(fake);
559
+ host.addEventListener("pointerenter", on);
560
+ host.addEventListener("pointerleave", off);
561
+ return () => {
562
+ host.removeEventListener("pointerenter", on);
563
+ host.removeEventListener("pointerleave", off);
564
+ };
565
+ }, [active, reduced, handleMouseEnter, handleMouseLeave]);
566
+ return /* @__PURE__ */ jsx4(
567
+ "span",
568
+ {
569
+ ref: wrap,
570
+ className: cn("inline-grid size-6 shrink-0 place-items-center align-middle [&>svg]:size-full", className),
571
+ style: size ? { width: size, height: size, ...style } : style,
572
+ onMouseEnter: hosted ? void 0 : handleMouseEnter,
573
+ onMouseLeave: hosted ? void 0 : handleMouseLeave,
574
+ ...props,
575
+ children: /* @__PURE__ */ jsxs3(
576
+ motion4.svg,
577
+ {
578
+ animate: controls,
579
+ fill: "none",
580
+ height: size,
581
+ initial: "normal",
582
+ stroke: "currentColor",
583
+ strokeLinecap: "round",
584
+ strokeLinejoin: "round",
585
+ strokeWidth: strokeWidth ?? 2,
586
+ variants: faceVariants,
587
+ viewBox: "0 0 24 24",
588
+ width: size,
589
+ xmlns: "http://www.w3.org/2000/svg",
590
+ children: [
591
+ /* @__PURE__ */ jsx4(motion4.circle, { cx: "12", cy: "12", r: "10" }),
592
+ /* @__PURE__ */ jsx4(
593
+ motion4.path,
594
+ {
595
+ animate: controls,
596
+ d: "M8 14s1.5 2 4 2 4-2 4-2",
597
+ initial: "normal",
598
+ variants: mouthVariants
599
+ }
600
+ ),
601
+ /* @__PURE__ */ jsx4(
602
+ motion4.line,
603
+ {
604
+ animate: controls,
605
+ initial: "normal",
606
+ variants: eyeVariants,
607
+ x1: "9",
608
+ x2: "9.01",
609
+ y1: "9",
610
+ y2: "9"
611
+ }
612
+ ),
613
+ /* @__PURE__ */ jsx4(
614
+ motion4.line,
615
+ {
616
+ animate: controls,
617
+ initial: "normal",
618
+ variants: eyeVariants,
619
+ x1: "15",
620
+ x2: "15.01",
621
+ y1: "9",
622
+ y2: "9"
623
+ }
624
+ )
625
+ ]
626
+ }
627
+ )
628
+ }
629
+ );
630
+ }
631
+ );
632
+ SmileIcon.displayName = "SmileIcon";
633
+
634
+ // src/icons/terminal.tsx
635
+ import { motion as motion5, useAnimation as useAnimation5, useReducedMotion as useReducedMotion5 } from "motion/react";
636
+ import { forwardRef as forwardRef5, useCallback as useCallback5, useEffect as useEffect5, useImperativeHandle as useImperativeHandle5, useRef as useRef5, useState as useState5 } from "react";
637
+ import { jsx as jsx5, jsxs as jsxs4 } from "react/jsx-runtime";
638
+ var LINE_VARIANTS2 = {
639
+ normal: { opacity: 1 },
640
+ animate: {
641
+ opacity: [1, 0, 1],
642
+ transition: {
643
+ duration: 0.8,
644
+ repeat: Number.POSITIVE_INFINITY,
645
+ ease: "linear"
646
+ }
647
+ }
648
+ };
649
+ var TerminalIcon = forwardRef5(
650
+ ({ onMouseEnter, onMouseLeave, className, size, active, style, strokeWidth, ...props }, ref) => {
651
+ const controls = useAnimation5();
652
+ const isControlledRef = useRef5(false);
653
+ useImperativeHandle5(ref, () => {
654
+ isControlledRef.current = true;
655
+ return {
656
+ startAnimation: () => controls.start("animate"),
657
+ stopAnimation: () => controls.start("normal")
658
+ };
659
+ });
660
+ const handleMouseEnter = useCallback5(
661
+ (e) => {
662
+ if (isControlledRef.current) {
663
+ onMouseEnter?.(e);
664
+ } else {
665
+ controls.start("animate");
666
+ }
667
+ },
668
+ [controls, onMouseEnter]
669
+ );
670
+ const handleMouseLeave = useCallback5(
671
+ (e) => {
672
+ if (isControlledRef.current) {
673
+ onMouseLeave?.(e);
674
+ } else {
675
+ controls.start("normal");
676
+ }
677
+ },
678
+ [controls, onMouseLeave]
679
+ );
680
+ const wrap = useRef5(null);
681
+ const reduced = useReducedMotion5();
682
+ const [hosted, setHosted] = useState5(false);
683
+ useEffect5(() => {
684
+ const fake = {};
685
+ if (reduced) {
686
+ setHosted(true);
687
+ return;
688
+ }
689
+ if (active !== void 0) {
690
+ setHosted(true);
691
+ (active ? handleMouseEnter : handleMouseLeave)(fake);
692
+ return;
693
+ }
694
+ const host = wrap.current?.parentElement?.closest("button, a, [role=button], [role=menuitem], [role=tab], [role=switch], [role=radio], label");
695
+ setHosted(!!host);
696
+ if (!host) return;
697
+ const on = () => handleMouseEnter(fake);
698
+ const off = () => handleMouseLeave(fake);
699
+ host.addEventListener("pointerenter", on);
700
+ host.addEventListener("pointerleave", off);
701
+ return () => {
702
+ host.removeEventListener("pointerenter", on);
703
+ host.removeEventListener("pointerleave", off);
704
+ };
705
+ }, [active, reduced, handleMouseEnter, handleMouseLeave]);
706
+ return /* @__PURE__ */ jsx5(
707
+ "span",
708
+ {
709
+ ref: wrap,
710
+ className: cn("inline-grid size-6 shrink-0 place-items-center align-middle [&>svg]:size-full", className),
711
+ style: size ? { width: size, height: size, ...style } : style,
712
+ onMouseEnter: hosted ? void 0 : handleMouseEnter,
713
+ onMouseLeave: hosted ? void 0 : handleMouseLeave,
714
+ ...props,
715
+ children: /* @__PURE__ */ jsxs4(
716
+ "svg",
717
+ {
718
+ fill: "none",
719
+ height: size,
720
+ stroke: "currentColor",
721
+ strokeLinecap: "round",
722
+ strokeLinejoin: "round",
723
+ strokeWidth: strokeWidth ?? 2,
724
+ viewBox: "0 0 24 24",
725
+ width: size,
726
+ xmlns: "http://www.w3.org/2000/svg",
727
+ children: [
728
+ /* @__PURE__ */ jsx5("polyline", { points: "4 17 10 11 4 5" }),
729
+ /* @__PURE__ */ jsx5(
730
+ motion5.line,
731
+ {
732
+ animate: controls,
733
+ initial: "normal",
734
+ variants: LINE_VARIANTS2,
735
+ x1: "12",
736
+ x2: "20",
737
+ y1: "19",
738
+ y2: "19"
739
+ }
740
+ )
741
+ ]
742
+ }
743
+ )
744
+ }
745
+ );
746
+ }
747
+ );
748
+ TerminalIcon.displayName = "TerminalIcon";
749
+
750
+ // src/icons/underline.tsx
751
+ import { motion as motion6, useAnimation as useAnimation6, useReducedMotion as useReducedMotion6 } from "motion/react";
752
+ import { forwardRef as forwardRef6, useCallback as useCallback6, useEffect as useEffect6, useImperativeHandle as useImperativeHandle6, useRef as useRef6, useState as useState6 } from "react";
753
+ import { jsx as jsx6, jsxs as jsxs5 } from "react/jsx-runtime";
754
+ var VARIANTS = {
755
+ normal: { pathLength: 1, opacity: 1, pathOffset: 0 },
756
+ animate: {
757
+ pathLength: [0, 1],
758
+ opacity: [0, 1],
759
+ pathOffset: [1, 0]
760
+ }
761
+ };
762
+ var UnderlineIcon = forwardRef6(
763
+ ({ onMouseEnter, onMouseLeave, className, size, active, style, strokeWidth, ...props }, ref) => {
764
+ const controls = useAnimation6();
765
+ const isControlledRef = useRef6(false);
766
+ useImperativeHandle6(ref, () => {
767
+ isControlledRef.current = true;
768
+ return {
769
+ startAnimation: () => controls.start("animate"),
770
+ stopAnimation: () => controls.start("normal")
771
+ };
772
+ });
773
+ const handleMouseEnter = useCallback6(
774
+ (e) => {
775
+ if (isControlledRef.current) {
776
+ onMouseEnter?.(e);
777
+ } else {
778
+ controls.start("animate");
779
+ }
780
+ },
781
+ [controls, onMouseEnter]
782
+ );
783
+ const handleMouseLeave = useCallback6(
784
+ (e) => {
785
+ if (isControlledRef.current) {
786
+ onMouseLeave?.(e);
787
+ } else {
788
+ controls.start("normal");
789
+ }
790
+ },
791
+ [controls, onMouseLeave]
792
+ );
793
+ const wrap = useRef6(null);
794
+ const reduced = useReducedMotion6();
795
+ const [hosted, setHosted] = useState6(false);
796
+ useEffect6(() => {
797
+ const fake = {};
798
+ if (reduced) {
799
+ setHosted(true);
800
+ return;
801
+ }
802
+ if (active !== void 0) {
803
+ setHosted(true);
804
+ (active ? handleMouseEnter : handleMouseLeave)(fake);
805
+ return;
806
+ }
807
+ const host = wrap.current?.parentElement?.closest("button, a, [role=button], [role=menuitem], [role=tab], [role=switch], [role=radio], label");
808
+ setHosted(!!host);
809
+ if (!host) return;
810
+ const on = () => handleMouseEnter(fake);
811
+ const off = () => handleMouseLeave(fake);
812
+ host.addEventListener("pointerenter", on);
813
+ host.addEventListener("pointerleave", off);
814
+ return () => {
815
+ host.removeEventListener("pointerenter", on);
816
+ host.removeEventListener("pointerleave", off);
817
+ };
818
+ }, [active, reduced, handleMouseEnter, handleMouseLeave]);
819
+ return /* @__PURE__ */ jsx6(
820
+ "span",
821
+ {
822
+ ref: wrap,
823
+ className: cn("inline-grid size-6 shrink-0 place-items-center align-middle [&>svg]:size-full", className),
824
+ style: size ? { width: size, height: size, ...style } : style,
825
+ onMouseEnter: hosted ? void 0 : handleMouseEnter,
826
+ onMouseLeave: hosted ? void 0 : handleMouseLeave,
827
+ ...props,
828
+ children: /* @__PURE__ */ jsxs5(
829
+ "svg",
830
+ {
831
+ fill: "none",
832
+ height: size,
833
+ stroke: "currentColor",
834
+ strokeLinecap: "round",
835
+ strokeLinejoin: "round",
836
+ strokeWidth: strokeWidth ?? 2,
837
+ viewBox: "0 0 24 24",
838
+ width: size,
839
+ xmlns: "http://www.w3.org/2000/svg",
840
+ children: [
841
+ /* @__PURE__ */ jsx6(
842
+ motion6.path,
843
+ {
844
+ animate: controls,
845
+ d: "M6 4v6a6 6 0 0 0 12 0V4",
846
+ transition: { duration: 0.3 },
847
+ variants: VARIANTS
848
+ }
849
+ ),
850
+ /* @__PURE__ */ jsx6(
851
+ motion6.line,
852
+ {
853
+ animate: controls,
854
+ transition: {
855
+ delay: 0.2,
856
+ duration: 0.4
857
+ },
858
+ variants: VARIANTS,
859
+ x1: "4",
860
+ x2: "20",
861
+ y1: "20",
862
+ y2: "20"
863
+ }
864
+ )
865
+ ]
866
+ }
867
+ )
868
+ }
869
+ );
870
+ }
871
+ );
872
+ UnderlineIcon.displayName = "UnderlineIcon";
873
+
874
+ // src/components/message-composer/message-composer.tsx
875
+ import { Fragment, jsx as jsx7, jsxs as jsxs6 } from "react/jsx-runtime";
876
+ var GLIDE = [0.22, 1, 0.36, 1];
877
+ var POP = { type: "spring", stiffness: 520, damping: 30 };
878
+ var SOFT = { type: "spring", stiffness: 380, damping: 34 };
879
+ var STYLES = [
880
+ {
881
+ id: "title",
882
+ tag: "h2",
883
+ label: "Title",
884
+ preview: "text-[20px] font-semibold"
885
+ },
886
+ {
887
+ id: "heading",
888
+ tag: "h3",
889
+ label: "Heading",
890
+ preview: "text-[18px] font-semibold"
891
+ },
892
+ { id: "body", tag: "p", label: "Body", preview: "text-[16px]" },
893
+ {
894
+ id: "small",
895
+ tag: "h6",
896
+ label: "Small",
897
+ preview: "text-[14px] text-[#242423]/60"
898
+ }
899
+ ];
900
+ var EMOJI = [
901
+ "\u{1F600}",
902
+ "\u{1F602}",
903
+ "\u{1F979}",
904
+ "\u{1F60D}",
905
+ "\u{1F60E}",
906
+ "\u{1F914}",
907
+ "\u{1F64C}",
908
+ "\u{1F44F}",
909
+ "\u{1F389}",
910
+ "\u{1F525}",
911
+ "\u2728",
912
+ "\u{1F4A1}",
913
+ "\u2705",
914
+ "\u{1F440}",
915
+ "\u2764\uFE0F",
916
+ "\u{1F680}",
917
+ "\u{1F304}",
918
+ "\u2615"
919
+ ];
920
+ var face = (photo) => `https://images.unsplash.com/${photo}?w=96&h=96&fit=crop&crop=faces`;
921
+ var DEFAULT_PEOPLE = [
922
+ {
923
+ id: "maya",
924
+ name: "Maya Chen",
925
+ title: "Design lead",
926
+ avatar: face("photo-1438761681033-6461ffad8d80")
927
+ },
928
+ {
929
+ id: "leo",
930
+ name: "Leo Park",
931
+ title: "Engineer",
932
+ avatar: face("photo-1500648767791-00dcc994a43e")
933
+ },
934
+ {
935
+ id: "ava",
936
+ name: "Ava Moreno",
937
+ title: "Marketing",
938
+ avatar: face("photo-1494790108377-be9c29b29330")
939
+ },
940
+ { id: "noah", name: "Noah Reid", title: "Product" },
941
+ { id: "iris", name: "Iris Okafor", title: "Research" }
942
+ ];
943
+ var DRAFT = "Hi team, the launch shots are ready for review.\nPlease pick your two favourites by Friday so we can lock the post.";
944
+ var SAMPLE_CLIP = "https://images.unsplash.com/photo-1504893524553-b855bce32c67?w=240&h=240&fit=crop&q=80";
945
+ var CHIP = "mx-px inline-block cursor-default rounded-md bg-[#242423]/[0.07] px-1 font-medium text-[#242423] transition-colors duration-200 hover:bg-[#242423]/[0.12]";
946
+ var initials = (name) => name.split(" ").map((w) => w[0]).join("").slice(0, 2);
947
+ var fmt = (s) => `${Math.floor(s / 60)}:${String(s % 60).padStart(2, "0")}`;
948
+ var wait = (ms) => new Promise((r) => setTimeout(r, ms));
949
+ var uid = 0;
950
+ var nextId = () => `att-${Date.now().toString(36)}-${uid++}`;
951
+ var BLOCKS = /* @__PURE__ */ new Set([
952
+ "P",
953
+ "DIV",
954
+ "H2",
955
+ "H3",
956
+ "H6",
957
+ "LI",
958
+ "BLOCKQUOTE",
959
+ "PRE",
960
+ "UL",
961
+ "OL"
962
+ ]);
963
+ function mentionChip(p) {
964
+ const el = document.createElement("span");
965
+ el.dataset.mention = p.id;
966
+ el.contentEditable = "false";
967
+ el.className = CHIP;
968
+ el.textContent = `@${p.name}`;
969
+ return el;
970
+ }
971
+ function fill(editor, text, people) {
972
+ editor.innerHTML = "";
973
+ if (!text) return;
974
+ for (const line of text.split("\n")) {
975
+ const p = document.createElement("p");
976
+ let last = 0;
977
+ for (const m of line.matchAll(/@([\w-]+)/g)) {
978
+ const person = people.find((x) => x.id === m[1]);
979
+ if (!person) continue;
980
+ p.append(line.slice(last, m.index), mentionChip(person));
981
+ last = m.index + m[0].length;
982
+ }
983
+ p.append(line.slice(last));
984
+ if (!p.textContent) p.append(document.createElement("br"));
985
+ editor.append(p);
986
+ }
987
+ }
988
+ function readText(editor) {
989
+ let out = "";
990
+ const walk = (node) => {
991
+ if (node.nodeType === Node.TEXT_NODE) {
992
+ out += node.textContent;
993
+ return;
994
+ }
995
+ const el = node;
996
+ if (el.dataset?.mention) {
997
+ out += `@${el.dataset.mention}`;
998
+ return;
999
+ }
1000
+ if (el.tagName === "BR") {
1001
+ out += "\n";
1002
+ return;
1003
+ }
1004
+ el.childNodes.forEach(walk);
1005
+ if (BLOCKS.has(el.tagName) && !out.endsWith("\n")) out += "\n";
1006
+ };
1007
+ editor.childNodes.forEach(walk);
1008
+ return out.replace(/ /g, " ").replace(/\n{3,}/g, "\n\n").trim();
1009
+ }
1010
+ function tidy(text) {
1011
+ if (!text.trim()) return DRAFT;
1012
+ const next = text.split("\n").map((line) => {
1013
+ let l = line.replace(/[ \t]{2,}/g, " ").trim();
1014
+ if (!l) return l;
1015
+ l = l.replace(
1016
+ /(^|[.!?]\s+)([a-z])/g,
1017
+ (_, a, b) => a + b.toUpperCase()
1018
+ );
1019
+ l = l.replace(/\bi\b/g, "I");
1020
+ return /[.!?:,]$/.test(l) || /\p{Extended_Pictographic}$/u.test(l) ? l : `${l}.`;
1021
+ }).join("\n");
1022
+ if (next === text.trim() && !/thank/i.test(next))
1023
+ return `${next}
1024
+ Thanks so much!`;
1025
+ return next;
1026
+ }
1027
+ var LIST = /* @__PURE__ */ new Set(["UL", "OL"]);
1028
+ function lineBlocks(ed) {
1029
+ const out = [];
1030
+ for (const c of ed.children)
1031
+ out.push(
1032
+ ...LIST.has(c.tagName) ? [...c.children] : [c]
1033
+ );
1034
+ return out;
1035
+ }
1036
+ function wrapLoose(ed) {
1037
+ let p = null;
1038
+ for (const n of [...ed.childNodes]) {
1039
+ if (n.nodeType === Node.ELEMENT_NODE && BLOCKS.has(n.tagName)) {
1040
+ p = null;
1041
+ continue;
1042
+ }
1043
+ if (!p) {
1044
+ p = document.createElement("p");
1045
+ n.before(p);
1046
+ }
1047
+ p.append(n);
1048
+ }
1049
+ }
1050
+ function moveInto(from, to) {
1051
+ while (from.firstChild) to.appendChild(from.firstChild);
1052
+ }
1053
+ function liftItem(li, tag, moved) {
1054
+ const list = li.parentElement;
1055
+ const el = document.createElement(tag);
1056
+ moveInto(li, el);
1057
+ moved.set(li, el);
1058
+ const rest = list.cloneNode(false);
1059
+ while (li.nextSibling) rest.appendChild(li.nextSibling);
1060
+ li.remove();
1061
+ list.after(el);
1062
+ if (rest.childNodes.length) el.after(rest);
1063
+ if (!list.children.length) list.remove();
1064
+ return el;
1065
+ }
1066
+ function onLines(ed, change) {
1067
+ wrapLoose(ed);
1068
+ const sel = window.getSelection();
1069
+ if (!sel?.rangeCount) return;
1070
+ const range = sel.getRangeAt(0);
1071
+ const all = lineBlocks(ed);
1072
+ let lines = all.filter((l) => range.intersectsNode(l));
1073
+ if (!lines.length && all.length) lines = [all[all.length - 1]];
1074
+ if (!lines.length) return;
1075
+ const at2 = [
1076
+ sel.anchorNode,
1077
+ sel.anchorOffset,
1078
+ sel.focusNode,
1079
+ sel.focusOffset
1080
+ ];
1081
+ const moved = /* @__PURE__ */ new Map();
1082
+ change(lines, moved);
1083
+ const find = (n) => {
1084
+ while (moved.has(n)) n = moved.get(n);
1085
+ return n;
1086
+ };
1087
+ const a = find(at2[0]);
1088
+ const f = find(at2[2]);
1089
+ if (ed.contains(a) && ed.contains(f))
1090
+ sel.setBaseAndExtent(a, at2[1], f, at2[3]);
1091
+ }
1092
+ function setBlock(ed, tag) {
1093
+ onLines(ed, (lines, moved) => {
1094
+ for (const line of lines) {
1095
+ if (line.tagName === "LI") liftItem(line, tag, moved);
1096
+ else if (line.tagName !== tag.toUpperCase()) {
1097
+ const el = document.createElement(tag);
1098
+ moveInto(line, el);
1099
+ line.replaceWith(el);
1100
+ moved.set(line, el);
1101
+ }
1102
+ }
1103
+ });
1104
+ }
1105
+ function toggleList(ed, tag) {
1106
+ onLines(ed, (lines, moved) => {
1107
+ const inside = lines.every(
1108
+ (l) => l.tagName === "LI" && l.parentElement.tagName === tag.toUpperCase()
1109
+ );
1110
+ const flat = lines.map(
1111
+ (l) => l.tagName === "LI" ? liftItem(l, "p", moved) : l
1112
+ );
1113
+ if (inside) return;
1114
+ const list = document.createElement(tag);
1115
+ flat[0].before(list);
1116
+ for (const l of flat) {
1117
+ const li = document.createElement("li");
1118
+ moveInto(l, li);
1119
+ moved.set(l, li);
1120
+ list.append(li);
1121
+ l.remove();
1122
+ }
1123
+ const prev = list.previousElementSibling;
1124
+ if (prev?.tagName === list.tagName) {
1125
+ moveInto(list, prev);
1126
+ list.remove();
1127
+ const next = prev.nextElementSibling;
1128
+ if (next?.tagName === prev.tagName) {
1129
+ moveInto(next, prev);
1130
+ next.remove();
1131
+ }
1132
+ } else if (list.nextElementSibling?.tagName === list.tagName) {
1133
+ const next = list.nextElementSibling;
1134
+ moveInto(next, list);
1135
+ next.remove();
1136
+ }
1137
+ });
1138
+ }
1139
+ var NO_FORMAT = {
1140
+ bold: false,
1141
+ italic: false,
1142
+ underline: false,
1143
+ ul: false,
1144
+ ol: false,
1145
+ quote: false,
1146
+ code: false,
1147
+ style: "body"
1148
+ };
1149
+ function useDismiss(open, close, scope) {
1150
+ React.useEffect(() => {
1151
+ if (!open) return;
1152
+ const away = (e) => {
1153
+ if (!e.target.closest?.(`[data-pop="${scope}"]`)) close();
1154
+ };
1155
+ const esc = (e) => e.key === "Escape" && close();
1156
+ document.addEventListener("pointerdown", away);
1157
+ document.addEventListener("keydown", esc);
1158
+ return () => {
1159
+ document.removeEventListener("pointerdown", away);
1160
+ document.removeEventListener("keydown", esc);
1161
+ };
1162
+ }, [open, close, scope]);
1163
+ }
1164
+ function arrowKeys(e) {
1165
+ if (e.key !== "ArrowDown" && e.key !== "ArrowUp") return;
1166
+ e.preventDefault();
1167
+ const rows = [...e.currentTarget.querySelectorAll("[data-row]")];
1168
+ const at2 = rows.indexOf(document.activeElement);
1169
+ const next = e.key === "ArrowDown" ? at2 + 1 : at2 - 1;
1170
+ rows[(next + rows.length) % rows.length]?.focus();
1171
+ }
1172
+ function Pour({
1173
+ from,
1174
+ still,
1175
+ className,
1176
+ children,
1177
+ ...rest
1178
+ }) {
1179
+ const shut = from === "top" ? "inset(-40% -40% 100% -40% round 18px)" : "inset(100% -40% -40% -40% round 18px)";
1180
+ return /* @__PURE__ */ jsx7(
1181
+ motion7.div,
1182
+ {
1183
+ ...rest,
1184
+ initial: still ? { opacity: 0 } : { opacity: 0, clipPath: shut, y: from === "top" ? -4 : 4 },
1185
+ animate: {
1186
+ opacity: 1,
1187
+ clipPath: "inset(-40% -40% -40% -40% round 18px)",
1188
+ y: 0,
1189
+ transition: still ? { duration: 0 } : { duration: 0.38, ease: GLIDE }
1190
+ },
1191
+ exit: still ? { opacity: 0 } : {
1192
+ opacity: 0,
1193
+ clipPath: shut,
1194
+ transition: { duration: 0.22, ease: [0.4, 0, 1, 1] }
1195
+ },
1196
+ className: cn(
1197
+ "absolute z-30 rounded-[18px] bg-white p-1.5 shadow-[0_1px_2px_rgba(0,0,0,0.06),0_18px_44px_-14px_rgba(0,0,0,0.3)] ring-1 ring-black/5",
1198
+ className
1199
+ ),
1200
+ children
1201
+ }
1202
+ );
1203
+ }
1204
+ function Row({
1205
+ i,
1206
+ still,
1207
+ className,
1208
+ children,
1209
+ ...rest
1210
+ }) {
1211
+ return /* @__PURE__ */ jsx7(
1212
+ motion7.button,
1213
+ {
1214
+ type: "button",
1215
+ "data-row": "",
1216
+ ...rest,
1217
+ initial: still ? false : { opacity: 0, y: -6, filter: "blur(3px)" },
1218
+ animate: { opacity: 1, y: 0, filter: "blur(0px)" },
1219
+ transition: {
1220
+ duration: 0.3,
1221
+ ease: GLIDE,
1222
+ delay: still ? 0 : 0.05 + i * 0.035
1223
+ },
1224
+ className: cn(
1225
+ "group relative flex w-full cursor-pointer items-center gap-3 rounded-xl px-3 text-left text-[#242423] outline-none disabled:cursor-default disabled:opacity-40",
1226
+ className
1227
+ ),
1228
+ children
1229
+ }
1230
+ );
1231
+ }
1232
+ var DAY_MS = 864e5;
1233
+ var HOURS = [8, 9, 10, 12, 14, 16, 18, 20];
1234
+ var WEEK = ["S", "M", "T", "W", "T", "F", "S"];
1235
+ var at = (base, days, hour, minute = 0) => {
1236
+ const d = new Date(base);
1237
+ d.setDate(d.getDate() + days);
1238
+ d.setHours(hour, minute, 0, 0);
1239
+ return d;
1240
+ };
1241
+ var hourText = (h) => `${h % 12 || 12} ${h < 12 ? "AM" : "PM"}`;
1242
+ var timeText = (d) => d.toLocaleTimeString("en-US", { hour: "numeric", minute: "2-digit" });
1243
+ function whenText(d, now = /* @__PURE__ */ new Date()) {
1244
+ const days = Math.round(
1245
+ (at(d, 0, 0).getTime() - at(now, 0, 0).getTime()) / DAY_MS
1246
+ );
1247
+ const day = days === 0 ? "Today" : days === 1 ? "Tomorrow" : days < 7 ? d.toLocaleDateString("en-US", { weekday: "long" }) : d.toLocaleDateString("en-US", {
1248
+ weekday: "short",
1249
+ month: "short",
1250
+ day: "numeric"
1251
+ });
1252
+ return `${day}, ${timeText(d)}`;
1253
+ }
1254
+ function quickTimes(now) {
1255
+ const out = [];
1256
+ const soon = new Date(
1257
+ Math.ceil((now.getTime() + 36e5) / 3e5) * 3e5
1258
+ );
1259
+ out.push({ id: "hour", label: "In an hour", when: soon });
1260
+ if (now.getHours() < 17)
1261
+ out.push({ id: "evening", label: "This evening", when: at(now, 0, 18) });
1262
+ out.push({ id: "tomorrow", label: "Tomorrow morning", when: at(now, 1, 9) });
1263
+ const toMonday = (8 - now.getDay()) % 7 || 7;
1264
+ if (toMonday > 1)
1265
+ out.push({
1266
+ id: "monday",
1267
+ label: "Monday morning",
1268
+ when: at(now, toMonday, 9)
1269
+ });
1270
+ return out;
1271
+ }
1272
+ var zoneText = () => new Intl.DateTimeFormat("en-US", { timeZoneName: "short" }).formatToParts(/* @__PURE__ */ new Date()).find((p) => p.type === "timeZoneName")?.value ?? "";
1273
+ var roundIcon = "grid size-8 shrink-0 cursor-pointer place-items-center rounded-full text-[#242423]/60 outline-none transition-colors hover:bg-[#242423]/[0.05] hover:text-[#242423] focus-visible:ring-2 focus-visible:ring-[#242423]/30 disabled:cursor-default disabled:opacity-30 disabled:hover:bg-transparent";
1274
+ function SendMenu({
1275
+ uid: uid2,
1276
+ still,
1277
+ ready,
1278
+ sendAt,
1279
+ startView,
1280
+ onSend,
1281
+ onSchedule
1282
+ }) {
1283
+ const now = React.useMemo(() => /* @__PURE__ */ new Date(), []);
1284
+ const [view, setView] = React.useState(startView);
1285
+ const [dir, setDir] = React.useState(1);
1286
+ const [hover, setHover] = React.useState(null);
1287
+ const go = (next, d) => {
1288
+ setDir(d);
1289
+ setHover(null);
1290
+ setView(next);
1291
+ };
1292
+ const start = sendAt ?? at(now, 1, 9);
1293
+ const [month, setMonth] = React.useState(
1294
+ () => new Date(start.getFullYear(), start.getMonth(), 1)
1295
+ );
1296
+ const [day, setDay] = React.useState(() => at(start, 0, 0));
1297
+ const [hour, setHour] = React.useState(
1298
+ () => HOURS.includes(start.getHours()) ? start.getHours() : 9
1299
+ );
1300
+ const times = React.useMemo(() => quickTimes(now), [now]);
1301
+ const zone = React.useMemo(zoneText, []);
1302
+ const today = at(now, 0, 0);
1303
+ const chosen = at(day, 0, hour);
1304
+ const slotGone = (h) => at(day, 0, h) <= now;
1305
+ React.useEffect(() => {
1306
+ if (!slotGone(hour)) return;
1307
+ const open = HOURS.find((h) => !slotGone(h));
1308
+ if (open !== void 0) setHour(open);
1309
+ }, [day]);
1310
+ const inner = React.useRef(null);
1311
+ const [height, setHeight] = React.useState("auto");
1312
+ React.useLayoutEffect(() => {
1313
+ const el = inner.current;
1314
+ if (!el) return;
1315
+ setHeight(el.offsetHeight);
1316
+ if (typeof ResizeObserver === "undefined") return;
1317
+ const ro = new ResizeObserver(() => setHeight(el.offsetHeight));
1318
+ ro.observe(el);
1319
+ return () => ro.disconnect();
1320
+ }, []);
1321
+ const slide = {
1322
+ enter: (d) => still ? { opacity: 0 } : { opacity: 0, x: d * 48, filter: "blur(4px)" },
1323
+ center: { opacity: 1, x: 0, filter: "blur(0px)" },
1324
+ exit: (d) => still ? { opacity: 0 } : { opacity: 0, x: d * -48, filter: "blur(4px)" }
1325
+ };
1326
+ const first = month.getDay();
1327
+ const count = new Date(
1328
+ month.getFullYear(),
1329
+ month.getMonth() + 1,
1330
+ 0
1331
+ ).getDate();
1332
+ const cells = [
1333
+ ...Array.from({ length: first }, () => null),
1334
+ ...Array.from(
1335
+ { length: count },
1336
+ (_, i) => new Date(month.getFullYear(), month.getMonth(), i + 1)
1337
+ )
1338
+ ];
1339
+ const thisMonth = month.getFullYear() === now.getFullYear() && month.getMonth() === now.getMonth();
1340
+ const header = (title, back) => /* @__PURE__ */ jsxs6("div", { className: "flex items-center gap-1 px-1 pb-1", children: [
1341
+ /* @__PURE__ */ jsx7(
1342
+ "button",
1343
+ {
1344
+ type: "button",
1345
+ "aria-label": "Back",
1346
+ onClick: () => go(back, -1),
1347
+ className: roundIcon,
1348
+ children: /* @__PURE__ */ jsx7(ChevronLeftIcon, { className: "size-4", strokeWidth: 2.25 })
1349
+ }
1350
+ ),
1351
+ /* @__PURE__ */ jsx7("span", { className: "text-[14px] font-medium", children: title })
1352
+ ] });
1353
+ return /* @__PURE__ */ jsx7(
1354
+ Pour,
1355
+ {
1356
+ from: "bottom",
1357
+ still,
1358
+ role: "dialog",
1359
+ "aria-label": "Send options",
1360
+ onKeyDown: arrowKeys,
1361
+ onPointerLeave: () => setHover(null),
1362
+ className: "bottom-full right-0 mb-2 w-[296px] overflow-hidden",
1363
+ children: /* @__PURE__ */ jsx7(
1364
+ motion7.div,
1365
+ {
1366
+ animate: { height },
1367
+ transition: still ? { duration: 0 } : SOFT,
1368
+ className: "relative",
1369
+ children: /* @__PURE__ */ jsx7("div", { ref: inner, children: /* @__PURE__ */ jsx7(AnimatePresence, { mode: "popLayout", initial: false, custom: dir, children: /* @__PURE__ */ jsxs6(
1370
+ motion7.div,
1371
+ {
1372
+ custom: dir,
1373
+ variants: slide,
1374
+ initial: "enter",
1375
+ animate: "center",
1376
+ exit: "exit",
1377
+ transition: { duration: 0.32, ease: GLIDE },
1378
+ children: [
1379
+ view === "main" && /* @__PURE__ */ jsx7("div", { role: "menu", "aria-label": "Send options", children: [
1380
+ {
1381
+ id: "now",
1382
+ label: "Send now",
1383
+ hint: "Everyone gets it right away",
1384
+ icon: /* @__PURE__ */ jsx7(SendIcon, { className: "size-4", strokeWidth: 2 })
1385
+ },
1386
+ {
1387
+ id: "schedule",
1388
+ label: "Schedule",
1389
+ hint: sendAt ? whenText(sendAt, now) : "Pick a time to send",
1390
+ icon: /* @__PURE__ */ jsx7(ClockIcon, { className: "size-4", strokeWidth: 2 })
1391
+ },
1392
+ {
1393
+ id: "silent",
1394
+ label: "Send quietly",
1395
+ hint: "No notification sound",
1396
+ icon: /* @__PURE__ */ jsx7(Nudge, { children: /* @__PURE__ */ jsx7(BellOff, { className: "size-4", strokeWidth: 2 }) })
1397
+ }
1398
+ ].map((o, i, all) => /* @__PURE__ */ jsxs6(
1399
+ Row,
1400
+ {
1401
+ i: all.length - 1 - i,
1402
+ still,
1403
+ role: "menuitem",
1404
+ disabled: o.id !== "schedule" && !ready,
1405
+ onPointerEnter: () => setHover(o.id),
1406
+ onFocus: () => setHover(o.id),
1407
+ onClick: () => o.id === "schedule" ? go("schedule", 1) : onSend(o.id),
1408
+ className: "py-2",
1409
+ children: [
1410
+ hover === o.id && /* @__PURE__ */ jsx7(Glide, { id: `${uid2}-send-glide`, still }),
1411
+ /* @__PURE__ */ jsx7("span", { className: "relative grid size-8 shrink-0 place-items-center rounded-full bg-[#242423]/[0.05] text-[#242423]/80", children: o.icon }),
1412
+ /* @__PURE__ */ jsxs6("span", { className: "relative min-w-0 flex-1", children: [
1413
+ /* @__PURE__ */ jsx7("span", { className: "block text-[14px] font-medium leading-5", children: o.label }),
1414
+ /* @__PURE__ */ jsx7("span", { className: "block truncate text-[12px] leading-4 text-[#242423]/50", children: o.hint })
1415
+ ] }),
1416
+ o.id === "schedule" && /* @__PURE__ */ jsx7(
1417
+ ChevronRightIcon,
1418
+ {
1419
+ className: "relative size-4 text-[#242423]/40",
1420
+ strokeWidth: 2.25
1421
+ }
1422
+ )
1423
+ ]
1424
+ },
1425
+ o.id
1426
+ )) }),
1427
+ view === "schedule" && /* @__PURE__ */ jsxs6("div", { children: [
1428
+ header("Schedule send", "main"),
1429
+ /* @__PURE__ */ jsxs6("div", { role: "menu", "aria-label": "Quick times", children: [
1430
+ times.map((q, i) => {
1431
+ const on = sendAt?.getTime() === q.when.getTime();
1432
+ return /* @__PURE__ */ jsxs6(
1433
+ Row,
1434
+ {
1435
+ i,
1436
+ still,
1437
+ role: "menuitemradio",
1438
+ "aria-checked": on,
1439
+ onPointerEnter: () => setHover(q.id),
1440
+ onFocus: () => setHover(q.id),
1441
+ onClick: () => onSchedule(q.when),
1442
+ className: "h-11 justify-between",
1443
+ children: [
1444
+ hover === q.id && /* @__PURE__ */ jsx7(Glide, { id: `${uid2}-send-glide`, still }),
1445
+ /* @__PURE__ */ jsx7("span", { className: "relative text-[14px] font-medium", children: q.label }),
1446
+ /* @__PURE__ */ jsxs6("span", { className: "relative flex items-center gap-2 text-[12px] text-[#242423]/50", children: [
1447
+ whenText(q.when, now),
1448
+ on && /* @__PURE__ */ jsx7(
1449
+ CheckIcon,
1450
+ {
1451
+ className: "size-4 text-[#242423]",
1452
+ strokeWidth: 2.5,
1453
+ active: true
1454
+ }
1455
+ )
1456
+ ] })
1457
+ ]
1458
+ },
1459
+ q.id
1460
+ );
1461
+ }),
1462
+ /* @__PURE__ */ jsx7(
1463
+ "div",
1464
+ {
1465
+ "aria-hidden": true,
1466
+ className: "mx-3 my-1 h-px bg-[#242423]/[0.07]"
1467
+ }
1468
+ ),
1469
+ /* @__PURE__ */ jsxs6(
1470
+ Row,
1471
+ {
1472
+ i: times.length,
1473
+ still,
1474
+ role: "menuitem",
1475
+ onPointerEnter: () => setHover("pick"),
1476
+ onFocus: () => setHover("pick"),
1477
+ onClick: () => go("pick", 1),
1478
+ className: "h-11",
1479
+ children: [
1480
+ hover === "pick" && /* @__PURE__ */ jsx7(Glide, { id: `${uid2}-send-glide`, still }),
1481
+ /* @__PURE__ */ jsx7(
1482
+ CalendarDaysIcon,
1483
+ {
1484
+ className: "relative size-4 text-[#242423]/70",
1485
+ strokeWidth: 2
1486
+ }
1487
+ ),
1488
+ /* @__PURE__ */ jsx7("span", { className: "relative flex-1 text-[14px] font-medium", children: "Pick a date and time" }),
1489
+ /* @__PURE__ */ jsx7(
1490
+ ChevronRightIcon,
1491
+ {
1492
+ className: "relative size-4 text-[#242423]/40",
1493
+ strokeWidth: 2.25
1494
+ }
1495
+ )
1496
+ ]
1497
+ }
1498
+ )
1499
+ ] }),
1500
+ /* @__PURE__ */ jsxs6("p", { className: "px-3 pb-1 pt-2 text-[12px] text-[#242423]/45", children: [
1501
+ "Times are in your time zone",
1502
+ zone ? ` (${zone})` : ""
1503
+ ] })
1504
+ ] }),
1505
+ view === "pick" && /* @__PURE__ */ jsxs6("div", { className: "px-1 pb-1", children: [
1506
+ /* @__PURE__ */ jsxs6("div", { className: "flex items-center gap-1 pb-1", children: [
1507
+ /* @__PURE__ */ jsx7(
1508
+ "button",
1509
+ {
1510
+ type: "button",
1511
+ "aria-label": "Back",
1512
+ onClick: () => go("schedule", -1),
1513
+ className: roundIcon,
1514
+ children: /* @__PURE__ */ jsx7(ChevronLeftIcon, { className: "size-4", strokeWidth: 2.25 })
1515
+ }
1516
+ ),
1517
+ /* @__PURE__ */ jsx7("span", { className: "relative flex-1 overflow-hidden text-[14px] font-medium", children: /* @__PURE__ */ jsx7(AnimatePresence, { mode: "popLayout", initial: false, children: /* @__PURE__ */ jsx7(
1518
+ motion7.span,
1519
+ {
1520
+ className: "block",
1521
+ initial: still ? { opacity: 0 } : { opacity: 0, y: 10, filter: "blur(3px)" },
1522
+ animate: { opacity: 1, y: 0, filter: "blur(0px)" },
1523
+ exit: still ? { opacity: 0 } : { opacity: 0, y: -10, filter: "blur(3px)" },
1524
+ transition: { duration: 0.28, ease: GLIDE },
1525
+ children: month.toLocaleDateString("en-US", {
1526
+ month: "long",
1527
+ year: "numeric"
1528
+ })
1529
+ },
1530
+ month.getTime()
1531
+ ) }) }),
1532
+ /* @__PURE__ */ jsx7(
1533
+ "button",
1534
+ {
1535
+ type: "button",
1536
+ "aria-label": "Previous month",
1537
+ disabled: thisMonth,
1538
+ onClick: () => setMonth(
1539
+ new Date(
1540
+ month.getFullYear(),
1541
+ month.getMonth() - 1,
1542
+ 1
1543
+ )
1544
+ ),
1545
+ className: roundIcon,
1546
+ children: /* @__PURE__ */ jsx7(ChevronLeftIcon, { className: "size-4", strokeWidth: 2.25 })
1547
+ }
1548
+ ),
1549
+ /* @__PURE__ */ jsx7(
1550
+ "button",
1551
+ {
1552
+ type: "button",
1553
+ "aria-label": "Next month",
1554
+ onClick: () => setMonth(
1555
+ new Date(
1556
+ month.getFullYear(),
1557
+ month.getMonth() + 1,
1558
+ 1
1559
+ )
1560
+ ),
1561
+ className: roundIcon,
1562
+ children: /* @__PURE__ */ jsx7(ChevronRightIcon, { className: "size-4", strokeWidth: 2.25 })
1563
+ }
1564
+ )
1565
+ ] }),
1566
+ /* @__PURE__ */ jsx7("div", { className: "grid grid-cols-7 px-1 text-center text-[12px] font-medium leading-6 text-[#242423]/40", children: WEEK.map((w, i) => /* @__PURE__ */ jsx7("span", { "aria-hidden": true, children: w }, i)) }),
1567
+ /* @__PURE__ */ jsx7(
1568
+ "div",
1569
+ {
1570
+ role: "grid",
1571
+ "aria-label": "Day",
1572
+ className: "grid grid-cols-7 gap-y-0.5 px-1",
1573
+ children: cells.map(
1574
+ (d, i) => d ? /* @__PURE__ */ jsxs6(
1575
+ "button",
1576
+ {
1577
+ type: "button",
1578
+ "aria-label": d.toLocaleDateString("en-US", {
1579
+ weekday: "long",
1580
+ month: "long",
1581
+ day: "numeric"
1582
+ }),
1583
+ "aria-pressed": d.getTime() === day.getTime(),
1584
+ disabled: d < today,
1585
+ onClick: () => setDay(d),
1586
+ className: cn(
1587
+ "relative mx-auto grid size-9 cursor-pointer place-items-center rounded-full text-[14px] tabular-nums outline-none transition-colors focus-visible:ring-2 focus-visible:ring-[#242423]/30 disabled:cursor-default disabled:text-[#242423]/25",
1588
+ d.getTime() === day.getTime() ? "text-white" : "hover:bg-[#242423]/[0.05]"
1589
+ ),
1590
+ children: [
1591
+ d.getTime() === day.getTime() && /* @__PURE__ */ jsx7(
1592
+ motion7.span,
1593
+ {
1594
+ layoutId: `${uid2}-day`,
1595
+ transition: still ? { duration: 0 } : POP,
1596
+ className: "absolute inset-0 rounded-full bg-[#242423]"
1597
+ }
1598
+ ),
1599
+ /* @__PURE__ */ jsx7("span", { className: "relative", children: d.getDate() }),
1600
+ d.getTime() === today.getTime() && /* @__PURE__ */ jsx7(
1601
+ "span",
1602
+ {
1603
+ "aria-hidden": true,
1604
+ className: cn(
1605
+ "absolute bottom-1 left-1/2 size-1 -translate-x-1/2 rounded-full",
1606
+ d.getTime() === day.getTime() ? "bg-white" : "bg-[#242423]/50"
1607
+ )
1608
+ }
1609
+ )
1610
+ ]
1611
+ },
1612
+ i
1613
+ ) : /* @__PURE__ */ jsx7("span", {}, i)
1614
+ )
1615
+ }
1616
+ ),
1617
+ /* @__PURE__ */ jsx7(
1618
+ "div",
1619
+ {
1620
+ "aria-hidden": true,
1621
+ className: "mx-2 my-2 h-px bg-[#242423]/[0.07]"
1622
+ }
1623
+ ),
1624
+ /* @__PURE__ */ jsx7(
1625
+ "div",
1626
+ {
1627
+ role: "radiogroup",
1628
+ "aria-label": "Time",
1629
+ className: "grid grid-cols-4 gap-1 px-1",
1630
+ children: HOURS.map((h) => {
1631
+ const on = h === hour;
1632
+ return /* @__PURE__ */ jsxs6(
1633
+ "button",
1634
+ {
1635
+ type: "button",
1636
+ role: "radio",
1637
+ "aria-checked": on,
1638
+ disabled: slotGone(h),
1639
+ onClick: () => setHour(h),
1640
+ className: cn(
1641
+ "relative h-8 cursor-pointer rounded-full text-[12px] font-medium tabular-nums outline-none transition-colors focus-visible:ring-2 focus-visible:ring-[#242423]/30 disabled:cursor-default disabled:text-[#242423]/25",
1642
+ on ? "text-white" : "bg-[#242423]/[0.04] hover:bg-[#242423]/[0.08]"
1643
+ ),
1644
+ children: [
1645
+ on && /* @__PURE__ */ jsx7(
1646
+ motion7.span,
1647
+ {
1648
+ layoutId: `${uid2}-hour`,
1649
+ transition: still ? { duration: 0 } : POP,
1650
+ className: "absolute inset-0 rounded-full bg-[#242423]"
1651
+ }
1652
+ ),
1653
+ /* @__PURE__ */ jsx7("span", { className: "relative", children: hourText(h) })
1654
+ ]
1655
+ },
1656
+ h
1657
+ );
1658
+ })
1659
+ }
1660
+ ),
1661
+ /* @__PURE__ */ jsxs6("p", { className: "px-2 pb-2 pt-3 text-[12px] text-[#242423]/50", children: [
1662
+ "Sends ",
1663
+ whenText(chosen, now),
1664
+ zone ? ` ${zone}` : ""
1665
+ ] }),
1666
+ /* @__PURE__ */ jsxs6(
1667
+ motion7.button,
1668
+ {
1669
+ type: "button",
1670
+ disabled: chosen <= now,
1671
+ onClick: () => onSchedule(chosen),
1672
+ whileTap: still ? void 0 : { scale: 0.97 },
1673
+ transition: POP,
1674
+ className: "group flex h-9 w-full cursor-pointer items-center justify-center gap-2 rounded-full bg-[#242423] text-[14px] font-medium text-white outline-none focus-visible:ring-2 focus-visible:ring-[#242423]/30 focus-visible:ring-offset-2 disabled:cursor-default disabled:opacity-40",
1675
+ children: [
1676
+ /* @__PURE__ */ jsx7(ClockIcon, { className: "size-4", strokeWidth: 2.25 }),
1677
+ "Set time"
1678
+ ]
1679
+ }
1680
+ )
1681
+ ] })
1682
+ ]
1683
+ },
1684
+ view
1685
+ ) }) })
1686
+ }
1687
+ )
1688
+ }
1689
+ );
1690
+ }
1691
+ function Glide({ id, still }) {
1692
+ return /* @__PURE__ */ jsx7(
1693
+ motion7.span,
1694
+ {
1695
+ layoutId: id,
1696
+ transition: still ? { duration: 0 } : POP,
1697
+ className: "absolute inset-0 rounded-xl bg-[#242423]/[0.05]"
1698
+ }
1699
+ );
1700
+ }
1701
+ var Tool = React.forwardRef(function Tool2({
1702
+ label,
1703
+ on = false,
1704
+ toggle = false,
1705
+ danger = false,
1706
+ keepFocus = true,
1707
+ still,
1708
+ className,
1709
+ children,
1710
+ onMouseDown,
1711
+ ...rest
1712
+ }, ref) {
1713
+ return /* @__PURE__ */ jsxs6(
1714
+ motion7.button,
1715
+ {
1716
+ ref,
1717
+ type: "button",
1718
+ "aria-label": label,
1719
+ title: label,
1720
+ "aria-pressed": toggle ? on : void 0,
1721
+ onMouseDown: (e) => {
1722
+ if (keepFocus) e.preventDefault();
1723
+ onMouseDown?.(e);
1724
+ },
1725
+ whileTap: still || rest.disabled ? void 0 : { scale: 0.86 },
1726
+ transition: POP,
1727
+ ...rest,
1728
+ className: cn(
1729
+ "group relative grid size-8 shrink-0 cursor-pointer place-items-center rounded-full outline-none transition-colors focus-visible:ring-2 focus-visible:ring-[#242423]/30 disabled:cursor-default",
1730
+ danger ? "text-[#d64545] disabled:text-[#d64545]/35" : on ? "text-[#242423]" : "text-[#242423]/55 hover:text-[#242423] disabled:text-[#242423]/25",
1731
+ className
1732
+ ),
1733
+ children: [
1734
+ /* @__PURE__ */ jsx7(
1735
+ "span",
1736
+ {
1737
+ "aria-hidden": true,
1738
+ className: cn(
1739
+ "absolute inset-0 rounded-[inherit] opacity-0 transition-opacity duration-200 group-hover:opacity-100 group-disabled:opacity-0",
1740
+ danger ? "bg-[#d64545]/[0.09]" : "bg-[#242423]/[0.05]"
1741
+ )
1742
+ }
1743
+ ),
1744
+ /* @__PURE__ */ jsx7(AnimatePresence, { initial: false, children: on && /* @__PURE__ */ jsx7(
1745
+ motion7.span,
1746
+ {
1747
+ "aria-hidden": true,
1748
+ initial: still ? { opacity: 0 } : { opacity: 0, scale: 0.6 },
1749
+ animate: { opacity: 1, scale: 1 },
1750
+ exit: still ? { opacity: 0 } : { opacity: 0, scale: 0.6 },
1751
+ transition: POP,
1752
+ className: "absolute inset-0 rounded-[inherit] bg-[#242423]/[0.09]"
1753
+ }
1754
+ ) }),
1755
+ /* @__PURE__ */ jsx7("span", { className: "relative grid", children })
1756
+ ]
1757
+ }
1758
+ );
1759
+ });
1760
+ function Nudge({ children }) {
1761
+ return /* @__PURE__ */ jsx7("span", { className: "grid transition-transform duration-300 [transition-timing-function:cubic-bezier(0.34,1.56,0.64,1)] group-hover:-translate-y-px group-hover:scale-110 group-active:scale-90", children });
1762
+ }
1763
+ function Thumb({
1764
+ item,
1765
+ still,
1766
+ onRemove
1767
+ }) {
1768
+ const done = item.progress >= 1 && !item.failed;
1769
+ const [settled, setSettled] = React.useState(done);
1770
+ React.useEffect(() => {
1771
+ if (!done) return;
1772
+ const t = window.setTimeout(() => setSettled(true), still ? 0 : 750);
1773
+ return () => window.clearTimeout(t);
1774
+ }, [done, still]);
1775
+ const ext = item.name.split(".").pop()?.toUpperCase().slice(0, 4) ?? "FILE";
1776
+ return /* @__PURE__ */ jsxs6(
1777
+ motion7.div,
1778
+ {
1779
+ layout: true,
1780
+ initial: still ? { opacity: 0 } : { opacity: 0, scale: 0.6, filter: "blur(6px)" },
1781
+ animate: { opacity: 1, scale: 1, filter: "blur(0px)" },
1782
+ exit: still ? { opacity: 0 } : {
1783
+ opacity: 0,
1784
+ scale: 0.6,
1785
+ filter: "blur(6px)",
1786
+ transition: { duration: 0.22 }
1787
+ },
1788
+ transition: POP,
1789
+ className: "group/thumb relative size-16 shrink-0",
1790
+ children: [
1791
+ /* @__PURE__ */ jsxs6(
1792
+ "div",
1793
+ {
1794
+ className: cn(
1795
+ "relative size-full overflow-hidden rounded-2xl bg-[#242423]/[0.05]",
1796
+ item.failed && "ring-[1.5px] ring-[#d64545]"
1797
+ ),
1798
+ children: [
1799
+ (item.kind === "image" || item.kind === "video") && item.src ? /* @__PURE__ */ jsx7(
1800
+ "img",
1801
+ {
1802
+ src: item.src,
1803
+ alt: item.name,
1804
+ draggable: false,
1805
+ className: "size-full object-cover transition-transform duration-500 group-hover/thumb:scale-[1.06]"
1806
+ }
1807
+ ) : item.kind === "voice" ? /* @__PURE__ */ jsxs6("div", { className: "flex size-full flex-col items-center justify-center gap-1.5 text-[#242423]", children: [
1808
+ /* @__PURE__ */ jsx7("span", { "aria-hidden": true, className: "flex h-4 items-center gap-[2px]", children: [6, 12, 8, 14, 7, 10].map((h, i) => /* @__PURE__ */ jsx7(
1809
+ "span",
1810
+ {
1811
+ className: "w-[2px] rounded-full bg-current",
1812
+ style: { height: h }
1813
+ },
1814
+ i
1815
+ )) }),
1816
+ /* @__PURE__ */ jsx7("span", { className: "text-[12px] font-medium tabular-nums", children: item.duration })
1817
+ ] }) : /* @__PURE__ */ jsxs6("div", { className: "flex size-full flex-col items-center justify-center gap-1 text-[#242423]/70", children: [
1818
+ /* @__PURE__ */ jsx7(FILE_TEXT, { className: "size-5", strokeWidth: 1.75, "aria-hidden": true }),
1819
+ /* @__PURE__ */ jsx7("span", { className: "text-[12px] font-semibold tracking-wide", children: ext })
1820
+ ] }),
1821
+ item.kind === "video" && settled && /* @__PURE__ */ jsxs6(Fragment, { children: [
1822
+ /* @__PURE__ */ jsx7("span", { className: "absolute left-1/2 top-1/2 grid size-6 -translate-x-1/2 -translate-y-1/2 place-items-center rounded-full bg-white/90 text-[#242423] shadow-sm", children: /* @__PURE__ */ jsx7(
1823
+ Play,
1824
+ {
1825
+ className: "size-3 translate-x-px fill-current",
1826
+ "aria-hidden": true
1827
+ }
1828
+ ) }),
1829
+ item.duration && /* @__PURE__ */ jsx7("span", { className: "absolute bottom-1 left-1 rounded-md bg-black/45 px-1 text-[12px] font-medium leading-4 tabular-nums text-white", children: item.duration })
1830
+ ] }),
1831
+ /* @__PURE__ */ jsx7(AnimatePresence, { children: !settled && /* @__PURE__ */ jsx7(
1832
+ motion7.div,
1833
+ {
1834
+ initial: { opacity: 0 },
1835
+ animate: { opacity: 1 },
1836
+ exit: { opacity: 0, transition: { duration: 0.35 } },
1837
+ className: "absolute inset-0 grid place-items-center bg-[#242423]/40 backdrop-blur-[2px]",
1838
+ children: /* @__PURE__ */ jsx7(AnimatePresence, { mode: "popLayout", initial: false, children: done ? /* @__PURE__ */ jsx7(
1839
+ motion7.span,
1840
+ {
1841
+ initial: still ? { opacity: 0 } : { scale: 0, rotate: -30 },
1842
+ animate: { scale: 1, rotate: 0, opacity: 1 },
1843
+ transition: POP,
1844
+ className: "grid size-7 place-items-center rounded-full bg-white text-[#269a5a]",
1845
+ children: /* @__PURE__ */ jsx7(CheckIcon, { className: "size-4", strokeWidth: 2.75, active: true })
1846
+ },
1847
+ "done"
1848
+ ) : /* @__PURE__ */ jsxs6(
1849
+ motion7.svg,
1850
+ {
1851
+ viewBox: "0 0 28 28",
1852
+ className: "size-7 -rotate-90",
1853
+ exit: still ? { opacity: 0 } : { scale: 0.4, opacity: 0 },
1854
+ transition: { duration: 0.18 },
1855
+ "aria-hidden": true,
1856
+ children: [
1857
+ /* @__PURE__ */ jsx7(
1858
+ "circle",
1859
+ {
1860
+ cx: "14",
1861
+ cy: "14",
1862
+ r: "11",
1863
+ fill: "none",
1864
+ stroke: "rgba(255,255,255,0.3)",
1865
+ strokeWidth: "2.5"
1866
+ }
1867
+ ),
1868
+ /* @__PURE__ */ jsx7(
1869
+ motion7.circle,
1870
+ {
1871
+ cx: "14",
1872
+ cy: "14",
1873
+ r: "11",
1874
+ fill: "none",
1875
+ stroke: "white",
1876
+ strokeWidth: "2.5",
1877
+ strokeLinecap: "round",
1878
+ initial: { pathLength: 0 },
1879
+ animate: { pathLength: Math.max(0.04, item.progress) },
1880
+ transition: still ? { duration: 0 } : SOFT
1881
+ }
1882
+ )
1883
+ ]
1884
+ },
1885
+ "ring"
1886
+ ) })
1887
+ }
1888
+ ) })
1889
+ ]
1890
+ }
1891
+ ),
1892
+ /* @__PURE__ */ jsx7(
1893
+ "button",
1894
+ {
1895
+ type: "button",
1896
+ "aria-label": `Remove ${item.name}`,
1897
+ onClick: onRemove,
1898
+ className: "absolute -right-1.5 -top-1.5 grid size-5 scale-75 cursor-pointer place-items-center rounded-full bg-[#242423] text-white opacity-0 shadow-[0_0_0_2px_white] outline-none transition-[opacity,transform] duration-200 [transition-timing-function:cubic-bezier(0.34,1.56,0.64,1)] hover:scale-110 focus-visible:scale-100 focus-visible:opacity-100 group-hover/thumb:scale-100 group-hover/thumb:opacity-100",
1899
+ children: /* @__PURE__ */ jsx7(XIcon, { className: "size-3", strokeWidth: 2.75 })
1900
+ }
1901
+ ),
1902
+ /* @__PURE__ */ jsx7("span", { role: "status", className: "sr-only", children: item.failed ? `${item.name} failed to upload.` : done ? `${item.name} uploaded.` : "" })
1903
+ ]
1904
+ }
1905
+ );
1906
+ }
1907
+ var MessageComposer = React.forwardRef(function MessageComposer2({
1908
+ defaultValue = "",
1909
+ placeholder = "Write a message, type @ to mention someone",
1910
+ people = DEFAULT_PEOPLE,
1911
+ defaultAttachments = [],
1912
+ toolbar: toolbarProp = true,
1913
+ maxHeight = 240,
1914
+ onSend,
1915
+ onUpload,
1916
+ onEnhance,
1917
+ onVideo,
1918
+ onChange,
1919
+ className
1920
+ }, ref) {
1921
+ const still = !!useReducedMotion7();
1922
+ const id = React.useId();
1923
+ const root = React.useRef(null);
1924
+ React.useImperativeHandle(ref, () => root.current);
1925
+ const editor = React.useRef(null);
1926
+ const scroller = React.useRef(null);
1927
+ const fileInput = React.useRef(null);
1928
+ const saved = React.useRef(null);
1929
+ const seen = useInView(root, { once: true, amount: 0.3 });
1930
+ const appear = seen || still;
1931
+ const wipe = useAnimationControls();
1932
+ const [format, setFormat] = React.useState(NO_FORMAT);
1933
+ const [empty, setEmpty] = React.useState(!defaultValue);
1934
+ const [focused, setFocused] = React.useState(false);
1935
+ const [toolbar, setToolbar] = React.useState(toolbarProp);
1936
+ const [height, setHeight] = React.useState(24);
1937
+ const [files, setFiles] = React.useState(
1938
+ () => defaultAttachments.map((a) => ({ ...a, progress: 0 }))
1939
+ );
1940
+ const [styleMenu, setStyleMenu] = React.useState(false);
1941
+ const [emojiMenu, setEmojiMenu] = React.useState(false);
1942
+ const [sendMenu, setSendMenu] = React.useState(false);
1943
+ const [hover, setHover] = React.useState(null);
1944
+ const [peek, setPeek] = React.useState(null);
1945
+ const peekTimer = React.useRef(0);
1946
+ React.useEffect(() => () => window.clearTimeout(peekTimer.current), []);
1947
+ const peekAt = (e) => {
1948
+ const chip = e.target.closest?.("[data-mention]");
1949
+ if (!chip) return;
1950
+ const person = people.find((p) => p.id === chip.dataset.mention);
1951
+ if (!person) return;
1952
+ window.clearTimeout(peekTimer.current);
1953
+ const at2 = chip.getBoundingClientRect();
1954
+ const box = root.current.getBoundingClientRect();
1955
+ const scale = box.width / root.current.offsetWidth || 1;
1956
+ const half = 110;
1957
+ const x = (at2.left + at2.width / 2 - box.left) / scale;
1958
+ setPeek({
1959
+ person,
1960
+ x: Math.min(Math.max(x, half), root.current.offsetWidth - half),
1961
+ y: (at2.top - box.top) / scale - 8
1962
+ });
1963
+ };
1964
+ const unpeek = (e) => {
1965
+ const chip = e.target.closest?.("[data-mention]");
1966
+ if (!chip || chip.contains(e.relatedTarget)) return;
1967
+ window.clearTimeout(peekTimer.current);
1968
+ peekTimer.current = window.setTimeout(() => setPeek(null), 120);
1969
+ };
1970
+ const [mention, setMention] = React.useState(null);
1971
+ const [pick, setPick] = React.useState(0);
1972
+ const [recording, setRecording] = React.useState(null);
1973
+ const [thinking, setThinking] = React.useState(false);
1974
+ const [sending, setSending] = React.useState(false);
1975
+ const [flights, setFlights] = React.useState(0);
1976
+ const [result, setResult] = React.useState(null);
1977
+ const [sendAt, setSendAt] = React.useState(null);
1978
+ const [sentAt, setSentAt] = React.useState(null);
1979
+ const [sendView, setSendView] = React.useState("main");
1980
+ React.useEffect(() => setToolbar(toolbarProp), [toolbarProp]);
1981
+ const matches = React.useMemo(() => {
1982
+ if (!mention) return [];
1983
+ const q = mention.query.toLowerCase();
1984
+ return people.filter(
1985
+ (p) => p.name.toLowerCase().split(" ").some((w) => w.startsWith(q)) || p.id.startsWith(q)
1986
+ ).slice(0, 5);
1987
+ }, [mention, people]);
1988
+ React.useLayoutEffect(() => {
1989
+ if (editor.current && defaultValue)
1990
+ fill(editor.current, defaultValue, people);
1991
+ }, []);
1992
+ React.useLayoutEffect(() => {
1993
+ const el = scroller.current;
1994
+ if (!el) return;
1995
+ setHeight(el.offsetHeight);
1996
+ if (typeof ResizeObserver === "undefined") return;
1997
+ const ro = new ResizeObserver(() => setHeight(el.offsetHeight));
1998
+ ro.observe(el);
1999
+ return () => ro.disconnect();
2000
+ }, []);
2001
+ const refresh = React.useCallback(() => {
2002
+ const ed = editor.current;
2003
+ if (!ed) return;
2004
+ setEmpty(!ed.textContent?.trim() && !ed.querySelector("[data-mention],li"));
2005
+ const sel = window.getSelection();
2006
+ const node = sel?.anchorNode;
2007
+ if (!node || !ed.contains(node)) return;
2008
+ saved.current = sel.getRangeAt(0).cloneRange();
2009
+ const next = {
2010
+ ...NO_FORMAT,
2011
+ bold: document.queryCommandState("bold"),
2012
+ italic: document.queryCommandState("italic"),
2013
+ underline: document.queryCommandState("underline")
2014
+ };
2015
+ let el = node.nodeType === Node.TEXT_NODE ? node.parentElement : node;
2016
+ while (el && el !== ed) {
2017
+ const tag = el.tagName;
2018
+ if (tag === "UL") next.ul = true;
2019
+ if (tag === "OL") next.ol = true;
2020
+ if (tag === "BLOCKQUOTE") next.quote = true;
2021
+ if (tag === "PRE") next.code = true;
2022
+ const style = STYLES.find((s) => s.tag.toUpperCase() === tag);
2023
+ if (style && next.style === "body") next.style = style.id;
2024
+ el = el.parentElement;
2025
+ }
2026
+ setFormat(next);
2027
+ }, []);
2028
+ React.useEffect(() => {
2029
+ document.addEventListener("selectionchange", refresh);
2030
+ return () => document.removeEventListener("selectionchange", refresh);
2031
+ }, [refresh]);
2032
+ const uploading = files.some((f) => f.progress < 1 && !f.failed && !f.file);
2033
+ React.useEffect(() => {
2034
+ if (!appear || !uploading) return;
2035
+ const t = window.setInterval(() => {
2036
+ setFiles(
2037
+ (all) => all.map(
2038
+ (f) => f.progress < 1 && !f.file ? {
2039
+ ...f,
2040
+ progress: still ? 1 : Math.min(1, f.progress + 0.05 + Math.random() * 0.11)
2041
+ } : f
2042
+ )
2043
+ );
2044
+ }, 140);
2045
+ return () => window.clearInterval(t);
2046
+ }, [appear, uploading, still]);
2047
+ const isRecording = recording !== null;
2048
+ React.useEffect(() => {
2049
+ if (!isRecording) return;
2050
+ const t = window.setInterval(
2051
+ () => setRecording((s) => s === null ? s : s + 1),
2052
+ 1e3
2053
+ );
2054
+ return () => window.clearInterval(t);
2055
+ }, [isRecording]);
2056
+ const closeStyle = React.useCallback(() => setStyleMenu(false), []);
2057
+ const closeEmoji = React.useCallback(() => setEmojiMenu(false), []);
2058
+ const closeSend = React.useCallback(() => setSendMenu(false), []);
2059
+ useDismiss(styleMenu, closeStyle, `${id}-style`);
2060
+ useDismiss(emojiMenu, closeEmoji, `${id}-emoji`);
2061
+ useDismiss(sendMenu, closeSend, `${id}-send`);
2062
+ const ready = (!empty || files.length > 0) && files.every((f) => f.progress >= 1 && !f.failed) && !isRecording && !sending && !thinking;
2063
+ const restore = () => {
2064
+ const ed = editor.current;
2065
+ const sel = window.getSelection();
2066
+ if (document.activeElement === ed && sel.rangeCount && ed.contains(sel.anchorNode))
2067
+ return;
2068
+ ed.focus({ preventScroll: true });
2069
+ const r = saved.current;
2070
+ if (r && ed.contains(r.startContainer)) {
2071
+ sel.removeAllRanges();
2072
+ sel.addRange(r);
2073
+ } else {
2074
+ const end = document.createRange();
2075
+ end.selectNodeContents(ed);
2076
+ end.collapse(false);
2077
+ sel.removeAllRanges();
2078
+ sel.addRange(end);
2079
+ }
2080
+ };
2081
+ const seed = () => {
2082
+ const ed = editor.current;
2083
+ if (!ed || ed.childNodes.length > 0 || document.activeElement !== ed)
2084
+ return;
2085
+ const p = document.createElement("p");
2086
+ p.append(document.createElement("br"));
2087
+ ed.append(p);
2088
+ const r = document.createRange();
2089
+ r.setStart(p, 0);
2090
+ r.collapse(true);
2091
+ const sel = window.getSelection();
2092
+ sel.removeAllRanges();
2093
+ sel.addRange(r);
2094
+ };
2095
+ const changed = () => {
2096
+ refresh();
2097
+ if (onChange && editor.current) onChange(readText(editor.current));
2098
+ };
2099
+ const exec = (command, value) => {
2100
+ restore();
2101
+ document.execCommand(command, false, value);
2102
+ changed();
2103
+ };
2104
+ const lines = (change) => {
2105
+ restore();
2106
+ change(editor.current);
2107
+ changed();
2108
+ };
2109
+ const setStyle = (style) => {
2110
+ setStyleMenu(false);
2111
+ const tag = STYLES.find((s) => s.id === style).tag;
2112
+ lines((ed) => setBlock(ed, tag));
2113
+ };
2114
+ const findMention = () => {
2115
+ const sel = window.getSelection();
2116
+ const node = sel?.anchorNode;
2117
+ if (!sel?.isCollapsed || !node || node.nodeType !== Node.TEXT_NODE || !editor.current?.contains(node)) {
2118
+ setMention(null);
2119
+ return;
2120
+ }
2121
+ const before = node.textContent.slice(0, sel.anchorOffset);
2122
+ const m = before.match(/(^|\s)@([\w-]{0,20})$/);
2123
+ if (!m) {
2124
+ setMention(null);
2125
+ return;
2126
+ }
2127
+ const start = sel.anchorOffset - m[2].length - 1;
2128
+ const r = document.createRange();
2129
+ r.setStart(node, start);
2130
+ r.setEnd(node, start + 1);
2131
+ const at2 = r.getBoundingClientRect();
2132
+ const box = root.current.getBoundingClientRect();
2133
+ const scale = box.width / root.current.offsetWidth || 1;
2134
+ const x = Math.min(
2135
+ (at2.left - box.left) / scale - 8,
2136
+ root.current.offsetWidth - 252
2137
+ );
2138
+ setMention({
2139
+ query: m[2],
2140
+ node,
2141
+ start,
2142
+ end: sel.anchorOffset,
2143
+ x: Math.max(8, x),
2144
+ y: (at2.bottom - box.top) / scale + 8
2145
+ });
2146
+ setPick(0);
2147
+ };
2148
+ const insertMention = (p) => {
2149
+ if (!mention) return;
2150
+ const { node, start, end } = mention;
2151
+ const r = document.createRange();
2152
+ r.setStart(node, start);
2153
+ r.setEnd(node, Math.min(end, node.length));
2154
+ r.deleteContents();
2155
+ const chip = mentionChip(p);
2156
+ const space = document.createTextNode("\xA0");
2157
+ r.insertNode(space);
2158
+ r.insertNode(chip);
2159
+ const sel = window.getSelection();
2160
+ const after = document.createRange();
2161
+ after.setStart(space, 1);
2162
+ after.collapse(true);
2163
+ sel.removeAllRanges();
2164
+ sel.addRange(after);
2165
+ if (!still)
2166
+ chip.animate(
2167
+ [
2168
+ { transform: "scale(0.6)", opacity: 0, filter: "blur(3px)" },
2169
+ {
2170
+ transform: "scale(1.08)",
2171
+ opacity: 1,
2172
+ filter: "blur(0px)",
2173
+ offset: 0.6
2174
+ },
2175
+ { transform: "scale(1)" }
2176
+ ],
2177
+ { duration: 360, easing: "cubic-bezier(0.22,1,0.36,1)" }
2178
+ );
2179
+ setMention(null);
2180
+ editor.current?.focus({ preventScroll: true });
2181
+ changed();
2182
+ };
2183
+ const insertEmoji = (emoji) => {
2184
+ restore();
2185
+ document.execCommand("insertText", false, emoji);
2186
+ changed();
2187
+ };
2188
+ const addFiles = (list) => {
2189
+ if (!list) return;
2190
+ const added = [...list].map((file) => ({
2191
+ id: nextId(),
2192
+ name: file.name,
2193
+ kind: file.type.startsWith("image/") ? "image" : file.type.startsWith("video/") ? "video" : "file",
2194
+ src: file.type.startsWith("image/") ? URL.createObjectURL(file) : void 0,
2195
+ file: onUpload ? file : void 0,
2196
+ progress: 0
2197
+ }));
2198
+ setFiles((all) => [...all, ...added]);
2199
+ if (!onUpload) return;
2200
+ for (const a of added) {
2201
+ const set = (patch) => setFiles(
2202
+ (all) => all.map((f) => f.id === a.id ? { ...f, ...patch } : f)
2203
+ );
2204
+ onUpload(
2205
+ a.file,
2206
+ (v) => set({ progress: Math.min(0.99, Math.max(0, v)) })
2207
+ ).then(
2208
+ () => set({ progress: 1 }),
2209
+ () => set({ failed: true })
2210
+ );
2211
+ }
2212
+ };
2213
+ const remove = (item) => {
2214
+ if (item.src?.startsWith("blob:")) URL.revokeObjectURL(item.src);
2215
+ setFiles((all) => all.filter((f) => f.id !== item.id));
2216
+ };
2217
+ const toggleMic = () => {
2218
+ if (recording === null) {
2219
+ setRecording(0);
2220
+ return;
2221
+ }
2222
+ const seconds = Math.max(1, recording);
2223
+ setRecording(null);
2224
+ setFiles((all) => [
2225
+ ...all,
2226
+ {
2227
+ id: nextId(),
2228
+ name: "Voice note",
2229
+ kind: "voice",
2230
+ duration: fmt(seconds),
2231
+ progress: 0
2232
+ }
2233
+ ]);
2234
+ };
2235
+ const video = () => {
2236
+ if (onVideo) return onVideo();
2237
+ setFiles((all) => [
2238
+ ...all,
2239
+ {
2240
+ id: nextId(),
2241
+ name: "Clip.mp4",
2242
+ kind: "video",
2243
+ src: SAMPLE_CLIP,
2244
+ duration: "0:12",
2245
+ progress: 0
2246
+ }
2247
+ ]);
2248
+ };
2249
+ const swapText = async (next) => {
2250
+ const ed = editor.current;
2251
+ if (!still)
2252
+ await wipe.start({
2253
+ opacity: 0,
2254
+ y: -8,
2255
+ filter: "blur(6px)",
2256
+ transition: { duration: 0.22, ease: "easeIn" }
2257
+ });
2258
+ fill(ed, next, people);
2259
+ seed();
2260
+ saved.current = null;
2261
+ changed();
2262
+ setMention(null);
2263
+ if (!still) {
2264
+ wipe.set({ opacity: 0, y: 8, filter: "blur(6px)" });
2265
+ await wipe.start({
2266
+ opacity: 1,
2267
+ y: 0,
2268
+ filter: "blur(0px)",
2269
+ transition: { duration: 0.38, ease: GLIDE }
2270
+ });
2271
+ }
2272
+ };
2273
+ const enhance = async () => {
2274
+ if (thinking) return;
2275
+ const ed = editor.current;
2276
+ setThinking(true);
2277
+ try {
2278
+ const [next] = await Promise.all([
2279
+ Promise.resolve(
2280
+ onEnhance ? onEnhance(readText(ed)) : tidy(readText(ed))
2281
+ ),
2282
+ wait(still ? 0 : 1100)
2283
+ ]);
2284
+ await swapText(next);
2285
+ } finally {
2286
+ setThinking(false);
2287
+ }
2288
+ };
2289
+ const clear = () => {
2290
+ files.forEach(
2291
+ (f) => f.src?.startsWith("blob:") && URL.revokeObjectURL(f.src)
2292
+ );
2293
+ setFiles([]);
2294
+ void swapText("");
2295
+ };
2296
+ const send = async (mode) => {
2297
+ setSendMenu(false);
2298
+ if (!ready) return;
2299
+ const ed = editor.current;
2300
+ const message = {
2301
+ html: ed.innerHTML,
2302
+ text: readText(ed),
2303
+ mentions: [...ed.querySelectorAll("[data-mention]")].map(
2304
+ (m) => m.dataset.mention
2305
+ ),
2306
+ attachments: files.map(({ progress: _p, failed: _f, ...a }) => a),
2307
+ mode,
2308
+ sendAt: mode === "schedule" ? sendAt ?? at(/* @__PURE__ */ new Date(), 1, 9) : void 0
2309
+ };
2310
+ setSentAt(message.sendAt ?? null);
2311
+ setSendAt(null);
2312
+ setSending(true);
2313
+ setFlights((n) => n + 1);
2314
+ setResult(null);
2315
+ setFiles([]);
2316
+ try {
2317
+ await Promise.all([onSend?.(message), swapText("")]);
2318
+ setResult(mode);
2319
+ await wait(still ? 1200 : 1800);
2320
+ } finally {
2321
+ setSending(false);
2322
+ setResult(null);
2323
+ }
2324
+ };
2325
+ const onKeyDown = (e) => {
2326
+ seed();
2327
+ if (mention && matches.length) {
2328
+ if (e.key === "ArrowDown" || e.key === "ArrowUp") {
2329
+ e.preventDefault();
2330
+ setPick(
2331
+ (i) => (i + (e.key === "ArrowDown" ? 1 : matches.length - 1)) % matches.length
2332
+ );
2333
+ return;
2334
+ }
2335
+ if (e.key === "Enter" || e.key === "Tab") {
2336
+ e.preventDefault();
2337
+ insertMention(matches[pick] ?? matches[0]);
2338
+ return;
2339
+ }
2340
+ if (e.key === "Escape") {
2341
+ e.preventDefault();
2342
+ e.stopPropagation();
2343
+ setMention(null);
2344
+ return;
2345
+ }
2346
+ }
2347
+ if (e.key !== "Enter" || e.shiftKey) return;
2348
+ const inBlock = format.ul || format.ol || format.quote || format.code;
2349
+ if (e.metaKey || e.ctrlKey || !inBlock) {
2350
+ e.preventDefault();
2351
+ void send(sendAt ? "schedule" : "now");
2352
+ }
2353
+ };
2354
+ const current = STYLES.find((s) => s.id === format.style);
2355
+ const enter = (delay) => ({
2356
+ initial: still ? false : { opacity: 0, y: 8, filter: "blur(4px)" },
2357
+ animate: appear ? { opacity: 1, y: 0, filter: "blur(0px)" } : void 0,
2358
+ transition: { duration: 0.45, ease: GLIDE, delay: still ? 0 : delay }
2359
+ });
2360
+ const sendLabel = result === "schedule" ? "Scheduled" : result === "silent" ? "Sent quietly" : result === "now" ? "Sent" : sendAt ? "Schedule" : "Send";
2361
+ const divider = /* @__PURE__ */ jsx7("span", { "aria-hidden": true, className: "mx-1 h-5 w-px shrink-0 bg-[#242423]/10" });
2362
+ return /* @__PURE__ */ jsxs6(
2363
+ motion7.div,
2364
+ {
2365
+ ref: root,
2366
+ onKeyDown: (e) => {
2367
+ if (e.key !== "Escape" || !(styleMenu || emojiMenu || sendMenu)) return;
2368
+ e.stopPropagation();
2369
+ setStyleMenu(false);
2370
+ setEmojiMenu(false);
2371
+ setSendMenu(false);
2372
+ },
2373
+ initial: still ? false : { opacity: 0, y: 18, filter: "blur(8px)" },
2374
+ animate: appear ? { opacity: 1, y: 0, filter: "blur(0px)" } : void 0,
2375
+ transition: { duration: 0.6, ease: GLIDE },
2376
+ className: cn("relative w-[600px] max-w-full text-[#242423]", className),
2377
+ children: [
2378
+ /* @__PURE__ */ jsxs6(
2379
+ motion7.div,
2380
+ {
2381
+ animate: {
2382
+ boxShadow: focused ? "0 0 0 4px rgba(36,36,35,0.06), 0 1px 2px rgba(0,0,0,0.05), 0 16px 36px -18px rgba(0,0,0,0.22)" : "0 0 0 0px rgba(36,36,35,0), 0 1px 2px rgba(0,0,0,0.04), 0 12px 32px -16px rgba(0,0,0,0.18)"
2383
+ },
2384
+ transition: { duration: 0.25 },
2385
+ className: "relative rounded-[28px] bg-white p-2.5 max-sm:p-2",
2386
+ children: [
2387
+ /* @__PURE__ */ jsx7(AnimatePresence, { initial: false, children: toolbar && /* @__PURE__ */ jsx7(
2388
+ motion7.div,
2389
+ {
2390
+ initial: { height: 0, opacity: 0 },
2391
+ animate: {
2392
+ height: "auto",
2393
+ opacity: 1,
2394
+ transitionEnd: { overflow: "visible" }
2395
+ },
2396
+ exit: { height: 0, opacity: 0, overflow: "hidden" },
2397
+ transition: still ? { duration: 0 } : { duration: 0.32, ease: GLIDE },
2398
+ className: cn("relative overflow-hidden", styleMenu && "z-30"),
2399
+ children: /* @__PURE__ */ jsxs6(
2400
+ motion7.div,
2401
+ {
2402
+ role: "toolbar",
2403
+ "aria-label": "Formatting",
2404
+ ...enter(0.08),
2405
+ className: "mb-1 flex flex-wrap items-center gap-0.5 rounded-[18px] bg-[#f1f1ef] p-1",
2406
+ children: [
2407
+ /* @__PURE__ */ jsxs6("div", { className: "relative", "data-pop": `${id}-style`, children: [
2408
+ /* @__PURE__ */ jsxs6(
2409
+ motion7.button,
2410
+ {
2411
+ type: "button",
2412
+ "aria-haspopup": "listbox",
2413
+ "aria-expanded": styleMenu,
2414
+ onMouseDown: (e) => e.preventDefault(),
2415
+ onClick: () => setStyleMenu((m) => !m),
2416
+ whileTap: still ? void 0 : { scale: 0.95 },
2417
+ transition: POP,
2418
+ className: cn(
2419
+ "flex h-8 w-[112px] cursor-pointer items-center justify-between gap-2 rounded-full pl-3.5 pr-2.5 text-[14px] font-medium outline-none transition-colors focus-visible:ring-2 focus-visible:ring-[#242423]/30",
2420
+ styleMenu ? "bg-white shadow-[0_1px_2px_rgba(0,0,0,0.06)]" : "hover:bg-white/70"
2421
+ ),
2422
+ children: [
2423
+ /* @__PURE__ */ jsx7("span", { className: "relative inline-grid overflow-hidden", children: /* @__PURE__ */ jsx7(AnimatePresence, { mode: "popLayout", initial: false, children: /* @__PURE__ */ jsx7(
2424
+ motion7.span,
2425
+ {
2426
+ initial: still ? { opacity: 0 } : { opacity: 0, y: "80%", filter: "blur(3px)" },
2427
+ animate: { opacity: 1, y: 0, filter: "blur(0px)" },
2428
+ exit: still ? { opacity: 0 } : { opacity: 0, y: "-80%", filter: "blur(3px)" },
2429
+ transition: { duration: 0.28, ease: GLIDE },
2430
+ children: current.label
2431
+ },
2432
+ current.id
2433
+ ) }) }),
2434
+ /* @__PURE__ */ jsx7(
2435
+ motion7.span,
2436
+ {
2437
+ animate: { rotate: styleMenu ? 180 : 0 },
2438
+ transition: POP,
2439
+ className: "grid",
2440
+ children: /* @__PURE__ */ jsx7(
2441
+ ChevronDownIcon,
2442
+ {
2443
+ className: "size-4 text-[#242423]/50",
2444
+ strokeWidth: 2.25
2445
+ }
2446
+ )
2447
+ }
2448
+ )
2449
+ ]
2450
+ }
2451
+ ),
2452
+ /* @__PURE__ */ jsx7(AnimatePresence, { children: styleMenu && /* @__PURE__ */ jsx7(
2453
+ Pour,
2454
+ {
2455
+ from: "top",
2456
+ still,
2457
+ role: "listbox",
2458
+ "aria-label": "Text style",
2459
+ onKeyDown: arrowKeys,
2460
+ onPointerLeave: () => setHover(null),
2461
+ className: "left-0 top-full mt-2 w-52",
2462
+ children: STYLES.map((s, i) => /* @__PURE__ */ jsxs6(
2463
+ Row,
2464
+ {
2465
+ i,
2466
+ still,
2467
+ role: "option",
2468
+ "aria-selected": s.id === format.style,
2469
+ onMouseDown: (e) => e.preventDefault(),
2470
+ onPointerEnter: () => setHover(`style-${s.id}`),
2471
+ onFocus: () => setHover(`style-${s.id}`),
2472
+ onClick: () => setStyle(s.id),
2473
+ className: "h-11 justify-between",
2474
+ children: [
2475
+ (hover ?? `style-${format.style}`) === `style-${s.id}` && /* @__PURE__ */ jsx7(Glide, { id: `${id}-style-glide`, still }),
2476
+ /* @__PURE__ */ jsx7("span", { className: cn("relative", s.preview), children: s.label }),
2477
+ /* @__PURE__ */ jsx7(AnimatePresence, { children: s.id === format.style && /* @__PURE__ */ jsx7(
2478
+ motion7.span,
2479
+ {
2480
+ className: "relative grid",
2481
+ initial: still ? false : { scale: 0, opacity: 0 },
2482
+ animate: { scale: 1, opacity: 1 },
2483
+ exit: { scale: 0, opacity: 0 },
2484
+ transition: POP,
2485
+ children: /* @__PURE__ */ jsx7(
2486
+ CheckIcon,
2487
+ {
2488
+ className: "size-4",
2489
+ strokeWidth: 2.5,
2490
+ active: true
2491
+ }
2492
+ )
2493
+ }
2494
+ ) })
2495
+ ]
2496
+ },
2497
+ s.id
2498
+ ))
2499
+ }
2500
+ ) })
2501
+ ] }),
2502
+ divider,
2503
+ /* @__PURE__ */ jsx7(
2504
+ Tool,
2505
+ {
2506
+ label: "Bold",
2507
+ toggle: true,
2508
+ on: format.bold,
2509
+ still,
2510
+ onClick: () => exec("bold"),
2511
+ children: /* @__PURE__ */ jsx7(BoldIcon, { className: "size-4", strokeWidth: 2.5 })
2512
+ }
2513
+ ),
2514
+ /* @__PURE__ */ jsx7(
2515
+ Tool,
2516
+ {
2517
+ label: "Italic",
2518
+ toggle: true,
2519
+ on: format.italic,
2520
+ still,
2521
+ onClick: () => exec("italic"),
2522
+ children: /* @__PURE__ */ jsx7(ItalicIcon, { className: "size-4", strokeWidth: 2.25 })
2523
+ }
2524
+ ),
2525
+ /* @__PURE__ */ jsx7(
2526
+ Tool,
2527
+ {
2528
+ label: "Underline",
2529
+ toggle: true,
2530
+ on: format.underline,
2531
+ still,
2532
+ onClick: () => exec("underline"),
2533
+ children: /* @__PURE__ */ jsx7(UnderlineIcon, { className: "size-4", strokeWidth: 2.25 })
2534
+ }
2535
+ ),
2536
+ divider,
2537
+ /* @__PURE__ */ jsx7(
2538
+ Tool,
2539
+ {
2540
+ label: "Bulleted list",
2541
+ toggle: true,
2542
+ on: format.ul,
2543
+ still,
2544
+ onClick: () => lines((ed) => toggleList(ed, "ul")),
2545
+ children: /* @__PURE__ */ jsx7(Nudge, { children: /* @__PURE__ */ jsx7(List, { className: "size-4", strokeWidth: 2.25 }) })
2546
+ }
2547
+ ),
2548
+ /* @__PURE__ */ jsx7(
2549
+ Tool,
2550
+ {
2551
+ label: "Numbered list",
2552
+ toggle: true,
2553
+ on: format.ol,
2554
+ still,
2555
+ onClick: () => lines((ed) => toggleList(ed, "ol")),
2556
+ children: /* @__PURE__ */ jsx7(Nudge, { children: /* @__PURE__ */ jsx7(ListOrdered, { className: "size-4", strokeWidth: 2.25 }) })
2557
+ }
2558
+ ),
2559
+ /* @__PURE__ */ jsx7(
2560
+ Tool,
2561
+ {
2562
+ label: "Quote",
2563
+ toggle: true,
2564
+ on: format.quote,
2565
+ still,
2566
+ onClick: () => lines(
2567
+ (ed) => setBlock(ed, format.quote ? "p" : "blockquote")
2568
+ ),
2569
+ children: /* @__PURE__ */ jsx7(Nudge, { children: /* @__PURE__ */ jsx7(TextQuote, { className: "size-4", strokeWidth: 2.25 }) })
2570
+ }
2571
+ ),
2572
+ /* @__PURE__ */ jsx7(
2573
+ Tool,
2574
+ {
2575
+ label: "Code block",
2576
+ toggle: true,
2577
+ on: format.code,
2578
+ still,
2579
+ onClick: () => lines((ed) => setBlock(ed, format.code ? "p" : "pre")),
2580
+ children: /* @__PURE__ */ jsx7(TerminalIcon, { className: "size-4", strokeWidth: 2.25 })
2581
+ }
2582
+ ),
2583
+ /* @__PURE__ */ jsx7("span", { className: "flex-1" }),
2584
+ /* @__PURE__ */ jsx7(AnimatePresence, { initial: false, children: (!empty || files.length > 0) && /* @__PURE__ */ jsx7(
2585
+ motion7.span,
2586
+ {
2587
+ className: "grid",
2588
+ initial: still ? { opacity: 0 } : {
2589
+ opacity: 0,
2590
+ scale: 0.5,
2591
+ rotate: -20,
2592
+ filter: "blur(4px)"
2593
+ },
2594
+ animate: {
2595
+ opacity: 1,
2596
+ scale: 1,
2597
+ rotate: 0,
2598
+ filter: "blur(0px)"
2599
+ },
2600
+ exit: still ? { opacity: 0 } : {
2601
+ opacity: 0,
2602
+ scale: 0.5,
2603
+ filter: "blur(4px)",
2604
+ transition: { duration: 0.18 }
2605
+ },
2606
+ transition: POP,
2607
+ children: /* @__PURE__ */ jsx7(
2608
+ Tool,
2609
+ {
2610
+ label: "Clear message",
2611
+ danger: true,
2612
+ still,
2613
+ onClick: clear,
2614
+ children: /* @__PURE__ */ jsx7(DeleteIcon, { className: "size-4", strokeWidth: 2.25 })
2615
+ }
2616
+ )
2617
+ },
2618
+ "clear"
2619
+ ) })
2620
+ ]
2621
+ }
2622
+ )
2623
+ }
2624
+ ) }),
2625
+ /* @__PURE__ */ jsxs6(
2626
+ motion7.div,
2627
+ {
2628
+ ...enter(0.16),
2629
+ className: cn(
2630
+ "relative flex items-start gap-1 pl-3 pr-1 pt-2",
2631
+ emojiMenu && "z-30"
2632
+ ),
2633
+ children: [
2634
+ /* @__PURE__ */ jsxs6(
2635
+ motion7.div,
2636
+ {
2637
+ initial: false,
2638
+ animate: { height },
2639
+ transition: still ? { duration: 0 } : { type: "spring", stiffness: 300, damping: 30 },
2640
+ className: "relative min-w-0 flex-1 overflow-hidden",
2641
+ children: [
2642
+ /* @__PURE__ */ jsx7(
2643
+ "div",
2644
+ {
2645
+ ref: scroller,
2646
+ className: "overflow-y-auto overscroll-contain py-1.5",
2647
+ style: { maxHeight },
2648
+ children: /* @__PURE__ */ jsx7(motion7.div, { animate: wipe, children: /* @__PURE__ */ jsx7(
2649
+ "div",
2650
+ {
2651
+ ref: editor,
2652
+ contentEditable: true,
2653
+ suppressContentEditableWarning: true,
2654
+ role: "textbox",
2655
+ "aria-multiline": true,
2656
+ "aria-label": "Message",
2657
+ "aria-autocomplete": "list",
2658
+ "aria-expanded": !!mention && matches.length > 0,
2659
+ "aria-controls": `${id}-people`,
2660
+ spellCheck: true,
2661
+ onFocus: () => {
2662
+ setFocused(true);
2663
+ document.execCommand(
2664
+ "defaultParagraphSeparator",
2665
+ false,
2666
+ "p"
2667
+ );
2668
+ seed();
2669
+ },
2670
+ onBlur: () => {
2671
+ setFocused(false);
2672
+ setMention(null);
2673
+ },
2674
+ onPointerOver: peekAt,
2675
+ onPointerOut: unpeek,
2676
+ onInput: () => {
2677
+ setPeek(null);
2678
+ changed();
2679
+ findMention();
2680
+ },
2681
+ onKeyDown,
2682
+ onPaste: (e) => {
2683
+ e.preventDefault();
2684
+ document.execCommand(
2685
+ "insertText",
2686
+ false,
2687
+ e.clipboardData.getData("text/plain")
2688
+ );
2689
+ },
2690
+ className: cn(
2691
+ "min-h-6 break-words text-[16px] leading-6 outline-none",
2692
+ "[&_h2]:text-[24px] [&_h2]:font-semibold [&_h2]:leading-8 [&_h2]:tracking-tight",
2693
+ "[&_h3]:text-[18px] [&_h3]:font-semibold [&_h3]:leading-7",
2694
+ "[&_h6]:text-[14px] [&_h6]:font-normal [&_h6]:leading-6 [&_h6]:text-[#242423]/60",
2695
+ "[&_ol]:list-decimal [&_ol]:pl-6 [&_ul]:list-disc [&_ul]:pl-6 [&_li]:pl-0.5",
2696
+ "[&_blockquote]:my-1 [&_blockquote]:border-l-2 [&_blockquote]:border-[#242423]/20 [&_blockquote]:pl-3 [&_blockquote]:text-[#242423]/70",
2697
+ "[&_pre]:my-1 [&_pre]:whitespace-pre-wrap [&_pre]:rounded-xl [&_pre]:bg-[#242423]/[0.05] [&_pre]:px-3 [&_pre]:py-2 [&_pre]:font-mono [&_pre]:text-[14px]"
2698
+ )
2699
+ }
2700
+ ) })
2701
+ }
2702
+ ),
2703
+ /* @__PURE__ */ jsx7(AnimatePresence, { children: empty && /* @__PURE__ */ jsx7(
2704
+ motion7.span,
2705
+ {
2706
+ "aria-hidden": true,
2707
+ initial: still ? { opacity: 0 } : { opacity: 0, x: 6 },
2708
+ animate: { opacity: 1, x: 0 },
2709
+ exit: { opacity: 0, transition: { duration: 0.1 } },
2710
+ transition: { duration: 0.3, ease: GLIDE },
2711
+ className: "pointer-events-none absolute inset-x-0 top-1.5 truncate text-[16px] leading-6 text-[#242423]/40",
2712
+ children: placeholder
2713
+ }
2714
+ ) }),
2715
+ /* @__PURE__ */ jsx7(AnimatePresence, { children: thinking && !still && /* @__PURE__ */ jsx7(
2716
+ motion7.span,
2717
+ {
2718
+ "aria-hidden": true,
2719
+ initial: { opacity: 0 },
2720
+ animate: { opacity: 1 },
2721
+ exit: { opacity: 0 },
2722
+ className: "pointer-events-none absolute inset-0 overflow-hidden",
2723
+ children: /* @__PURE__ */ jsx7(
2724
+ motion7.span,
2725
+ {
2726
+ className: "absolute inset-y-0 w-1/2 bg-gradient-to-r from-transparent via-white/90 to-transparent",
2727
+ initial: { x: "-100%" },
2728
+ animate: { x: "250%" },
2729
+ transition: {
2730
+ duration: 1.1,
2731
+ ease: "easeInOut",
2732
+ repeat: Infinity
2733
+ }
2734
+ }
2735
+ )
2736
+ }
2737
+ ) })
2738
+ ]
2739
+ }
2740
+ ),
2741
+ /* @__PURE__ */ jsxs6("div", { className: "relative", "data-pop": `${id}-emoji`, children: [
2742
+ /* @__PURE__ */ jsx7(
2743
+ Tool,
2744
+ {
2745
+ label: "Add emoji",
2746
+ on: emojiMenu,
2747
+ still,
2748
+ "aria-haspopup": "dialog",
2749
+ "aria-expanded": emojiMenu,
2750
+ onClick: () => setEmojiMenu((m) => !m),
2751
+ children: /* @__PURE__ */ jsx7(SmileIcon, { className: "size-[18px]", strokeWidth: 2 })
2752
+ }
2753
+ ),
2754
+ /* @__PURE__ */ jsx7(AnimatePresence, { children: emojiMenu && /* @__PURE__ */ jsxs6(
2755
+ Pour,
2756
+ {
2757
+ from: "top",
2758
+ still,
2759
+ role: "dialog",
2760
+ "aria-label": "Emoji",
2761
+ className: "right-0 top-full mt-2 w-[248px] p-2",
2762
+ children: [
2763
+ /* @__PURE__ */ jsx7("p", { className: "px-1.5 pb-1.5 pt-0.5 text-[12px] font-medium text-[#242423]/45", children: "Quick reactions" }),
2764
+ /* @__PURE__ */ jsx7("div", { className: "grid grid-cols-6 gap-1", children: EMOJI.map((e, i) => /* @__PURE__ */ jsx7(
2765
+ motion7.button,
2766
+ {
2767
+ type: "button",
2768
+ "aria-label": `Insert ${e}`,
2769
+ onMouseDown: (ev) => ev.preventDefault(),
2770
+ onClick: () => insertEmoji(e),
2771
+ initial: still ? false : { opacity: 0, scale: 0.4 },
2772
+ animate: { opacity: 1, scale: 1 },
2773
+ whileTap: still ? void 0 : { scale: 0.85 },
2774
+ transition: {
2775
+ ...POP,
2776
+ delay: still ? 0 : 0.04 + i % 6 * 0.02 + Math.floor(i / 6) * 0.04
2777
+ },
2778
+ className: "group/emoji grid aspect-square w-full cursor-pointer place-items-center rounded-full outline-none transition-colors duration-200 hover:bg-[#242423]/[0.05] focus-visible:ring-2 focus-visible:ring-[#242423]/30",
2779
+ children: /* @__PURE__ */ jsx7(
2780
+ "span",
2781
+ {
2782
+ className: cn(
2783
+ "block text-[20px] leading-none transition-transform duration-300 [transition-timing-function:cubic-bezier(0.34,1.56,0.64,1)] group-hover/emoji:scale-125 group-active/emoji:scale-90",
2784
+ i % 2 ? "group-hover/emoji:rotate-[8deg]" : "group-hover/emoji:-rotate-[8deg]"
2785
+ ),
2786
+ children: e
2787
+ }
2788
+ )
2789
+ },
2790
+ e
2791
+ )) })
2792
+ ]
2793
+ }
2794
+ ) })
2795
+ ] })
2796
+ ]
2797
+ }
2798
+ ),
2799
+ /* @__PURE__ */ jsx7(AnimatePresence, { initial: false, children: files.length > 0 && /* @__PURE__ */ jsx7(
2800
+ motion7.div,
2801
+ {
2802
+ initial: { height: 0, opacity: 0 },
2803
+ animate: { height: "auto", opacity: 1 },
2804
+ exit: { height: 0, opacity: 0 },
2805
+ transition: still ? { duration: 0 } : { duration: 0.32, ease: GLIDE },
2806
+ className: "overflow-hidden",
2807
+ children: /* @__PURE__ */ jsx7(
2808
+ motion7.div,
2809
+ {
2810
+ ...enter(0.22),
2811
+ className: "flex flex-wrap gap-2.5 px-3 pb-1 pt-3",
2812
+ children: /* @__PURE__ */ jsx7(AnimatePresence, { initial: false, mode: "popLayout", children: files.map((f) => /* @__PURE__ */ jsx7(
2813
+ Thumb,
2814
+ {
2815
+ item: f,
2816
+ still,
2817
+ onRemove: () => remove(f)
2818
+ },
2819
+ f.id
2820
+ )) })
2821
+ }
2822
+ )
2823
+ }
2824
+ ) }),
2825
+ /* @__PURE__ */ jsx7(AnimatePresence, { initial: false, children: sendAt && /* @__PURE__ */ jsx7(
2826
+ motion7.div,
2827
+ {
2828
+ initial: { height: 0, opacity: 0 },
2829
+ animate: { height: "auto", opacity: 1 },
2830
+ exit: { height: 0, opacity: 0 },
2831
+ transition: still ? { duration: 0 } : { duration: 0.32, ease: GLIDE },
2832
+ className: "overflow-hidden",
2833
+ children: /* @__PURE__ */ jsx7("div", { className: "px-1.5 pt-3", children: /* @__PURE__ */ jsxs6(
2834
+ motion7.div,
2835
+ {
2836
+ initial: still ? false : { opacity: 0, scale: 0.9, filter: "blur(4px)" },
2837
+ animate: { opacity: 1, scale: 1, filter: "blur(0px)" },
2838
+ exit: { opacity: 0, scale: 0.9 },
2839
+ transition: POP,
2840
+ style: { transformOrigin: "0% 50%" },
2841
+ className: "inline-flex h-8 max-w-full items-center rounded-full bg-[#242423]/[0.05] text-[14px]",
2842
+ children: [
2843
+ /* @__PURE__ */ jsxs6(
2844
+ "button",
2845
+ {
2846
+ type: "button",
2847
+ "aria-label": "Change when it sends",
2848
+ "data-pop": `${id}-send`,
2849
+ onClick: () => {
2850
+ setSendView("schedule");
2851
+ setSendMenu(true);
2852
+ },
2853
+ className: "group flex h-8 min-w-0 cursor-pointer items-center gap-2 rounded-full pl-2.5 pr-2 outline-none transition-colors hover:bg-[#242423]/[0.05] focus-visible:ring-2 focus-visible:ring-[#242423]/30",
2854
+ children: [
2855
+ /* @__PURE__ */ jsx7(
2856
+ ClockIcon,
2857
+ {
2858
+ className: "size-4 text-[#242423]/70",
2859
+ strokeWidth: 2.25
2860
+ }
2861
+ ),
2862
+ /* @__PURE__ */ jsx7("span", { className: "text-[#242423]/55", children: "Sends" }),
2863
+ /* @__PURE__ */ jsx7("span", { className: "relative inline-grid overflow-hidden font-medium", children: /* @__PURE__ */ jsx7(AnimatePresence, { mode: "popLayout", initial: false, children: /* @__PURE__ */ jsx7(
2864
+ motion7.span,
2865
+ {
2866
+ className: "truncate",
2867
+ initial: still ? { opacity: 0 } : { opacity: 0, y: "80%", filter: "blur(3px)" },
2868
+ animate: { opacity: 1, y: 0, filter: "blur(0px)" },
2869
+ exit: still ? { opacity: 0 } : { opacity: 0, y: "-80%", filter: "blur(3px)" },
2870
+ transition: { duration: 0.3, ease: GLIDE },
2871
+ children: whenText(sendAt)
2872
+ },
2873
+ sendAt.getTime()
2874
+ ) }) })
2875
+ ]
2876
+ }
2877
+ ),
2878
+ /* @__PURE__ */ jsx7(
2879
+ "button",
2880
+ {
2881
+ type: "button",
2882
+ "aria-label": "Cancel schedule",
2883
+ onClick: () => setSendAt(null),
2884
+ className: "mr-0.5 grid size-7 shrink-0 cursor-pointer place-items-center rounded-full text-[#242423]/55 outline-none transition-colors hover:bg-[#242423]/[0.08] hover:text-[#242423] focus-visible:ring-2 focus-visible:ring-[#242423]/30",
2885
+ children: /* @__PURE__ */ jsx7(XIcon, { className: "size-3.5", strokeWidth: 2.5 })
2886
+ }
2887
+ )
2888
+ ]
2889
+ }
2890
+ ) })
2891
+ }
2892
+ ) }),
2893
+ /* @__PURE__ */ jsxs6(
2894
+ motion7.div,
2895
+ {
2896
+ ...enter(0.26),
2897
+ className: cn(
2898
+ "relative mt-2 flex items-center gap-0.5 max-sm:gap-0",
2899
+ sendMenu && "z-30"
2900
+ ),
2901
+ children: [
2902
+ /* @__PURE__ */ jsx7(
2903
+ "input",
2904
+ {
2905
+ ref: fileInput,
2906
+ type: "file",
2907
+ multiple: true,
2908
+ hidden: true,
2909
+ onChange: (e) => {
2910
+ addFiles(e.target.files);
2911
+ e.target.value = "";
2912
+ }
2913
+ }
2914
+ ),
2915
+ /* @__PURE__ */ jsx7(
2916
+ Tool,
2917
+ {
2918
+ label: "Attach files",
2919
+ still,
2920
+ keepFocus: false,
2921
+ onClick: () => fileInput.current?.click(),
2922
+ children: /* @__PURE__ */ jsx7(PlusIcon, { className: "size-[18px]", strokeWidth: 2.25 })
2923
+ }
2924
+ ),
2925
+ /* @__PURE__ */ jsx7(
2926
+ motion7.button,
2927
+ {
2928
+ type: "button",
2929
+ layout: true,
2930
+ "aria-label": isRecording ? "Stop recording" : "Record a voice note",
2931
+ title: isRecording ? "Stop recording" : "Record a voice note",
2932
+ "aria-pressed": isRecording,
2933
+ onClick: toggleMic,
2934
+ whileTap: still ? void 0 : { scale: 0.92 },
2935
+ transition: still ? { duration: 0 } : POP,
2936
+ style: { borderRadius: 999 },
2937
+ className: cn(
2938
+ "group relative flex h-8 shrink-0 cursor-pointer items-center justify-center overflow-hidden outline-none focus-visible:ring-2 focus-visible:ring-[#242423]/30",
2939
+ isRecording ? "gap-2 bg-[#d64545]/[0.08] pl-2.5 pr-2 text-[#d64545]" : "w-8 text-[#242423]/55 transition-colors hover:bg-[#242423]/[0.05] hover:text-[#242423]"
2940
+ ),
2941
+ children: /* @__PURE__ */ jsx7(AnimatePresence, { mode: "popLayout", initial: false, children: isRecording ? /* @__PURE__ */ jsxs6(
2942
+ motion7.span,
2943
+ {
2944
+ layout: "position",
2945
+ className: "flex items-center gap-2",
2946
+ initial: still ? { opacity: 0 } : { opacity: 0, scale: 0.7, filter: "blur(3px)" },
2947
+ animate: { opacity: 1, scale: 1, filter: "blur(0px)" },
2948
+ exit: { opacity: 0, scale: 0.7 },
2949
+ transition: POP,
2950
+ children: [
2951
+ /* @__PURE__ */ jsx7(
2952
+ motion7.span,
2953
+ {
2954
+ className: "size-2 rounded-full bg-current",
2955
+ animate: still ? void 0 : { opacity: [1, 0.3, 1] },
2956
+ transition: { duration: 1.2, repeat: Infinity }
2957
+ }
2958
+ ),
2959
+ /* @__PURE__ */ jsx7("span", { className: "text-[14px] font-medium tabular-nums", children: fmt(recording ?? 0) }),
2960
+ /* @__PURE__ */ jsx7("span", { "aria-hidden": true, className: "flex h-4 items-center gap-[2px]", children: [0, 1, 2, 3, 4].map((i) => /* @__PURE__ */ jsx7(
2961
+ motion7.span,
2962
+ {
2963
+ className: "w-[2px] rounded-full bg-current",
2964
+ animate: still ? { height: 8 } : { height: [4, 14, 6, 12, 4] },
2965
+ transition: {
2966
+ duration: 0.9,
2967
+ repeat: Infinity,
2968
+ delay: i * 0.1,
2969
+ ease: "easeInOut"
2970
+ }
2971
+ },
2972
+ i
2973
+ )) }),
2974
+ /* @__PURE__ */ jsx7("span", { className: "size-2.5 rounded-[3px] bg-current" })
2975
+ ]
2976
+ },
2977
+ "rec"
2978
+ ) : /* @__PURE__ */ jsx7(
2979
+ motion7.span,
2980
+ {
2981
+ className: "grid",
2982
+ initial: still ? { opacity: 0 } : { opacity: 0, scale: 0.6 },
2983
+ animate: { opacity: 1, scale: 1 },
2984
+ exit: { opacity: 0, scale: 0.6 },
2985
+ transition: POP,
2986
+ children: /* @__PURE__ */ jsx7(MicIcon, { className: "size-[18px]", strokeWidth: 2 })
2987
+ },
2988
+ "mic"
2989
+ ) })
2990
+ }
2991
+ ),
2992
+ /* @__PURE__ */ jsxs6(
2993
+ motion7.div,
2994
+ {
2995
+ layout: "position",
2996
+ transition: still ? { duration: 0 } : POP,
2997
+ className: "flex items-center gap-0.5 max-sm:gap-0",
2998
+ children: [
2999
+ /* @__PURE__ */ jsx7(Tool, { label: "Record a video", still, onClick: video, children: /* @__PURE__ */ jsx7(Nudge, { children: /* @__PURE__ */ jsx7(Video, { className: "size-[18px]", strokeWidth: 2 }) }) }),
3000
+ /* @__PURE__ */ jsx7(
3001
+ Tool,
3002
+ {
3003
+ label: thinking ? "Polishing" : "Polish with AI",
3004
+ on: thinking,
3005
+ still,
3006
+ disabled: sending,
3007
+ onClick: () => void enhance(),
3008
+ children: /* @__PURE__ */ jsx7(
3009
+ SparklesIcon,
3010
+ {
3011
+ className: "size-[18px]",
3012
+ strokeWidth: 2,
3013
+ active: thinking || void 0
3014
+ }
3015
+ )
3016
+ }
3017
+ ),
3018
+ /* @__PURE__ */ jsx7(
3019
+ Tool,
3020
+ {
3021
+ label: toolbar ? "Hide formatting" : "Show formatting",
3022
+ toggle: true,
3023
+ on: !toolbar,
3024
+ still,
3025
+ onClick: () => setToolbar((t) => !t),
3026
+ children: /* @__PURE__ */ jsx7(
3027
+ motion7.span,
3028
+ {
3029
+ animate: { rotate: toolbar ? 0 : 90 },
3030
+ transition: POP,
3031
+ className: "grid",
3032
+ children: /* @__PURE__ */ jsx7(Ellipsis, { className: "size-[18px]", strokeWidth: 2.25 })
3033
+ }
3034
+ )
3035
+ }
3036
+ )
3037
+ ]
3038
+ }
3039
+ ),
3040
+ /* @__PURE__ */ jsxs6("div", { className: "relative ml-auto flex", "data-pop": `${id}-send`, children: [
3041
+ /* @__PURE__ */ jsxs6(
3042
+ motion7.div,
3043
+ {
3044
+ animate: {
3045
+ backgroundColor: ready || sending ? "#242423" : "rgba(36,36,35,0.07)",
3046
+ color: ready || sending ? "#ffffff" : "rgba(36,36,35,0.35)"
3047
+ },
3048
+ transition: { duration: 0.25 },
3049
+ className: "flex h-9 items-center overflow-hidden rounded-full",
3050
+ children: [
3051
+ /* @__PURE__ */ jsxs6(
3052
+ motion7.button,
3053
+ {
3054
+ type: "button",
3055
+ layout: true,
3056
+ "aria-disabled": !ready,
3057
+ onClick: () => void send(sendAt ? "schedule" : "now"),
3058
+ whileTap: ready && !still ? { scale: 0.94 } : void 0,
3059
+ transition: still ? { duration: 0 } : POP,
3060
+ className: cn(
3061
+ "group flex h-9 items-center gap-2 pl-4 pr-3 max-sm:pl-3.5 max-sm:pr-2.5 text-[14px] font-medium outline-none focus-visible:ring-2 focus-visible:ring-inset focus-visible:ring-white/40",
3062
+ ready ? "cursor-pointer" : "cursor-default"
3063
+ ),
3064
+ children: [
3065
+ /* @__PURE__ */ jsx7("span", { className: "relative inline-grid overflow-hidden", children: /* @__PURE__ */ jsx7(AnimatePresence, { mode: "popLayout", initial: false, children: /* @__PURE__ */ jsx7(
3066
+ motion7.span,
3067
+ {
3068
+ initial: still ? { opacity: 0 } : { opacity: 0, y: "90%", filter: "blur(3px)" },
3069
+ animate: { opacity: 1, y: 0, filter: "blur(0px)" },
3070
+ exit: still ? { opacity: 0 } : { opacity: 0, y: "-90%", filter: "blur(3px)" },
3071
+ transition: { duration: 0.3, ease: GLIDE },
3072
+ className: "whitespace-nowrap",
3073
+ children: sendLabel
3074
+ },
3075
+ sendLabel
3076
+ ) }) }),
3077
+ /* @__PURE__ */ jsx7("span", { className: "relative grid size-4 place-items-center", children: /* @__PURE__ */ jsx7(AnimatePresence, { mode: "popLayout", children: result ? /* @__PURE__ */ jsx7(
3078
+ motion7.span,
3079
+ {
3080
+ className: "grid",
3081
+ initial: still ? { opacity: 0 } : { scale: 0, rotate: -40 },
3082
+ animate: { scale: 1, rotate: 0, opacity: 1 },
3083
+ exit: { scale: 0, opacity: 0 },
3084
+ transition: POP,
3085
+ children: /* @__PURE__ */ jsx7(
3086
+ CheckIcon,
3087
+ {
3088
+ className: "size-4",
3089
+ strokeWidth: 2.75,
3090
+ active: true
3091
+ }
3092
+ )
3093
+ },
3094
+ "done"
3095
+ ) : sendAt ? /* @__PURE__ */ jsx7(
3096
+ motion7.span,
3097
+ {
3098
+ className: "grid",
3099
+ initial: still ? { opacity: 0 } : { opacity: 0, scale: 0.4, rotate: -90 },
3100
+ animate: { opacity: 1, scale: 1, rotate: 0 },
3101
+ exit: still ? { opacity: 0 } : {
3102
+ opacity: 0,
3103
+ scale: 0.5,
3104
+ rotate: 270,
3105
+ transition: { duration: 0.35, ease: "easeIn" }
3106
+ },
3107
+ transition: POP,
3108
+ children: /* @__PURE__ */ jsx7(ClockIcon, { className: "size-4", strokeWidth: 2.25 })
3109
+ },
3110
+ `clock-${flights}`
3111
+ ) : /* @__PURE__ */ jsx7(
3112
+ motion7.span,
3113
+ {
3114
+ className: "grid",
3115
+ initial: still ? { opacity: 0 } : { opacity: 0, x: -12, y: 12, scale: 0.6 },
3116
+ animate: { opacity: 1, x: 0, y: 0, scale: 1 },
3117
+ exit: still ? { opacity: 0 } : {
3118
+ opacity: 0,
3119
+ x: 26,
3120
+ y: -26,
3121
+ scale: 0.8,
3122
+ transition: {
3123
+ duration: 0.32,
3124
+ ease: [0.5, 0, 0.75, 0]
3125
+ }
3126
+ },
3127
+ transition: POP,
3128
+ children: /* @__PURE__ */ jsx7(SendIcon, { className: "size-4", strokeWidth: 2.25 })
3129
+ },
3130
+ `plane-${flights}`
3131
+ ) }) })
3132
+ ]
3133
+ }
3134
+ ),
3135
+ /* @__PURE__ */ jsx7(
3136
+ "span",
3137
+ {
3138
+ "aria-hidden": true,
3139
+ className: cn(
3140
+ "h-4 w-px",
3141
+ ready || sending ? "bg-white/20" : "bg-[#242423]/10"
3142
+ )
3143
+ }
3144
+ ),
3145
+ /* @__PURE__ */ jsx7(
3146
+ motion7.button,
3147
+ {
3148
+ type: "button",
3149
+ "aria-label": "More ways to send",
3150
+ "aria-haspopup": "menu",
3151
+ "aria-expanded": sendMenu,
3152
+ onClick: () => {
3153
+ setSendView("main");
3154
+ setSendMenu((m) => !m);
3155
+ },
3156
+ whileTap: still ? void 0 : { scale: 0.88 },
3157
+ transition: POP,
3158
+ className: cn(
3159
+ "grid h-9 w-9 place-items-center max-sm:w-8 pr-0.5 outline-none focus-visible:ring-2 focus-visible:ring-inset focus-visible:ring-white/40",
3160
+ ready || sending ? "cursor-pointer hover:bg-white/10" : "cursor-pointer hover:bg-[#242423]/[0.06]"
3161
+ ),
3162
+ children: /* @__PURE__ */ jsx7(
3163
+ motion7.span,
3164
+ {
3165
+ animate: { rotate: sendMenu ? 180 : 0 },
3166
+ transition: POP,
3167
+ className: "grid",
3168
+ children: /* @__PURE__ */ jsx7(ChevronDownIcon, { className: "size-4", strokeWidth: 2.25 })
3169
+ }
3170
+ )
3171
+ }
3172
+ )
3173
+ ]
3174
+ }
3175
+ ),
3176
+ /* @__PURE__ */ jsx7(AnimatePresence, { children: sendMenu && /* @__PURE__ */ jsx7(
3177
+ SendMenu,
3178
+ {
3179
+ uid: id,
3180
+ still,
3181
+ ready,
3182
+ sendAt,
3183
+ startView: sendView,
3184
+ onSend: (mode) => void send(mode),
3185
+ onSchedule: (when) => {
3186
+ setSendAt(when);
3187
+ setSendMenu(false);
3188
+ }
3189
+ }
3190
+ ) })
3191
+ ] })
3192
+ ]
3193
+ }
3194
+ )
3195
+ ]
3196
+ }
3197
+ ),
3198
+ /* @__PURE__ */ jsx7(AnimatePresence, { children: peek && /* @__PURE__ */ jsx7(
3199
+ "div",
3200
+ {
3201
+ className: "pointer-events-none absolute z-40 -translate-x-1/2 -translate-y-full",
3202
+ style: { left: peek.x, top: peek.y },
3203
+ children: /* @__PURE__ */ jsxs6(
3204
+ motion7.div,
3205
+ {
3206
+ role: "tooltip",
3207
+ initial: still ? { opacity: 0 } : { opacity: 0, y: 6, scale: 0.94, filter: "blur(4px)" },
3208
+ animate: { opacity: 1, y: 0, scale: 1, filter: "blur(0px)" },
3209
+ exit: still ? { opacity: 0 } : {
3210
+ opacity: 0,
3211
+ y: 4,
3212
+ scale: 0.97,
3213
+ filter: "blur(3px)",
3214
+ transition: { duration: 0.15 }
3215
+ },
3216
+ transition: { duration: 0.25, ease: GLIDE },
3217
+ style: { transformOrigin: "50% 100%" },
3218
+ className: "flex items-center gap-2.5 whitespace-nowrap rounded-full bg-white py-1.5 pl-1.5 pr-4 shadow-[0_1px_2px_rgba(0,0,0,0.06),0_12px_28px_-10px_rgba(0,0,0,0.25)] ring-1 ring-black/5",
3219
+ children: [
3220
+ peek.person.avatar ? /* @__PURE__ */ jsx7(
3221
+ "img",
3222
+ {
3223
+ src: peek.person.avatar,
3224
+ alt: "",
3225
+ className: "size-8 rounded-full object-cover"
3226
+ }
3227
+ ) : /* @__PURE__ */ jsx7("span", { className: "grid size-8 place-items-center rounded-full bg-[#242423]/[0.07] text-[12px] font-semibold", children: initials(peek.person.name) }),
3228
+ /* @__PURE__ */ jsxs6("span", { children: [
3229
+ /* @__PURE__ */ jsx7("span", { className: "block text-[14px] font-medium leading-5", children: peek.person.name }),
3230
+ peek.person.title && /* @__PURE__ */ jsx7("span", { className: "block text-[12px] leading-4 text-[#242423]/50", children: peek.person.title })
3231
+ ] })
3232
+ ]
3233
+ }
3234
+ )
3235
+ },
3236
+ peek.person.id
3237
+ ) }),
3238
+ /* @__PURE__ */ jsx7(AnimatePresence, { children: mention && matches.length > 0 && /* @__PURE__ */ jsx7(
3239
+ Pour,
3240
+ {
3241
+ from: "top",
3242
+ still,
3243
+ id: `${id}-people`,
3244
+ role: "listbox",
3245
+ "aria-label": "People",
3246
+ onPointerLeave: () => setHover(null),
3247
+ className: "w-60",
3248
+ style: { left: mention.x, top: mention.y },
3249
+ children: matches.map((p, i) => /* @__PURE__ */ jsxs6(
3250
+ Row,
3251
+ {
3252
+ i,
3253
+ still,
3254
+ role: "option",
3255
+ "aria-selected": i === pick,
3256
+ tabIndex: -1,
3257
+ onMouseDown: (e) => e.preventDefault(),
3258
+ onPointerEnter: () => setPick(i),
3259
+ onClick: () => insertMention(p),
3260
+ className: "py-1.5",
3261
+ children: [
3262
+ i === pick && /* @__PURE__ */ jsx7(Glide, { id: `${id}-people-glide`, still }),
3263
+ p.avatar ? /* @__PURE__ */ jsx7(
3264
+ "img",
3265
+ {
3266
+ src: p.avatar,
3267
+ alt: "",
3268
+ className: "relative size-7 rounded-full object-cover"
3269
+ }
3270
+ ) : /* @__PURE__ */ jsx7("span", { className: "relative grid size-7 place-items-center rounded-full bg-[#242423]/[0.07] text-[12px] font-semibold", children: initials(p.name) }),
3271
+ /* @__PURE__ */ jsxs6("span", { className: "relative min-w-0", children: [
3272
+ /* @__PURE__ */ jsx7("span", { className: "block truncate text-[14px] font-medium leading-5", children: p.name }),
3273
+ p.title && /* @__PURE__ */ jsx7("span", { className: "block truncate text-[12px] leading-4 text-[#242423]/50", children: p.title })
3274
+ ] })
3275
+ ]
3276
+ },
3277
+ p.id
3278
+ ))
3279
+ }
3280
+ ) }),
3281
+ /* @__PURE__ */ jsx7("span", { role: "status", "aria-live": "polite", className: "sr-only", children: isRecording ? "Recording a voice note." : thinking ? "Polishing your message." : result === "schedule" ? `Message scheduled for ${sentAt ? whenText(sentAt) : "later"}.` : result ? "Message sent." : "" })
3282
+ ]
3283
+ }
3284
+ );
3285
+ });
3286
+
3287
+ export {
3288
+ MessageComposer
3289
+ };