@mieweb/ui 0.8.0 → 0.9.0-dev.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (384) hide show
  1. package/README.md +162 -739
  2. package/agent/mieweb-ui.instructions.md +34 -16
  3. package/dist/Animated-Cs-naa2g.d.cts +175 -0
  4. package/dist/Animated-Cs-naa2g.d.ts +175 -0
  5. package/dist/CsvBlock-D7Z6ZCRP.js +6 -0
  6. package/dist/{CsvBlock-PUSTBQ5B.js.map → CsvBlock-D7Z6ZCRP.js.map} +1 -1
  7. package/dist/CsvBlock-QXXZ7ZUM.cjs +15 -0
  8. package/dist/{CsvBlock-OTFG3PYZ.cjs.map → CsvBlock-QXXZ7ZUM.cjs.map} +1 -1
  9. package/dist/HtmlPreviewBlock-AADG7MVB.cjs +15 -0
  10. package/dist/{HtmlPreviewBlock-QHLSIMWJ.cjs.map → HtmlPreviewBlock-AADG7MVB.cjs.map} +1 -1
  11. package/dist/HtmlPreviewBlock-F5VDM2EN.js +6 -0
  12. package/dist/{HtmlPreviewBlock-YF2YVKKX.js.map → HtmlPreviewBlock-F5VDM2EN.js.map} +1 -1
  13. package/dist/MermaidBlock-6PLITRBZ.js +6 -0
  14. package/dist/{MermaidBlock-H3TWNC4D.js.map → MermaidBlock-6PLITRBZ.js.map} +1 -1
  15. package/dist/MermaidBlock-TQ2O5CLV.cjs +15 -0
  16. package/dist/{MermaidBlock-ZLLBO3VY.cjs.map → MermaidBlock-TQ2O5CLV.cjs.map} +1 -1
  17. package/dist/SurveyBlock-OYL3VNU5.cjs +15 -0
  18. package/dist/{SurveyBlock-M2ZRTGVJ.cjs.map → SurveyBlock-OYL3VNU5.cjs.map} +1 -1
  19. package/dist/SurveyBlock-W5PSQ62F.js +6 -0
  20. package/dist/{SurveyBlock-JLHS3YQD.js.map → SurveyBlock-W5PSQ62F.js.map} +1 -1
  21. package/dist/ag-grid.cjs +5 -5
  22. package/dist/ag-grid.js +1 -1
  23. package/dist/brands/index.cjs +7 -7
  24. package/dist/brands/index.js +2 -2
  25. package/dist/{chunk-XS35KPBZ.cjs → chunk-2A2FLQJC.cjs} +1140 -14
  26. package/dist/chunk-2A2FLQJC.cjs.map +1 -0
  27. package/dist/{chunk-OTQ72WX3.js → chunk-2BPIVWAK.js} +3 -3
  28. package/dist/{chunk-OTQ72WX3.js.map → chunk-2BPIVWAK.js.map} +1 -1
  29. package/dist/{chunk-6EWJGRC3.js → chunk-3JWAABYI.js} +6 -6
  30. package/dist/chunk-3JWAABYI.js.map +1 -0
  31. package/dist/{chunk-5JZIDILK.cjs → chunk-3LHICE4I.cjs} +6 -6
  32. package/dist/chunk-3LHICE4I.cjs.map +1 -0
  33. package/dist/{chunk-JHZW3Y62.js → chunk-3RB35GYK.js} +5 -5
  34. package/dist/chunk-3RB35GYK.js.map +1 -0
  35. package/dist/{chunk-BOW7ZGI2.cjs → chunk-4SM3I7WE.cjs} +170 -10
  36. package/dist/chunk-4SM3I7WE.cjs.map +1 -0
  37. package/dist/{chunk-QHTDWIED.js → chunk-5H7SAEQO.js} +5 -5
  38. package/dist/{chunk-QHTDWIED.js.map → chunk-5H7SAEQO.js.map} +1 -1
  39. package/dist/chunk-5VXRKOPR.cjs +735 -0
  40. package/dist/chunk-5VXRKOPR.cjs.map +1 -0
  41. package/dist/{chunk-EMMYFHOT.js → chunk-5WOB4UBD.js} +3 -3
  42. package/dist/{chunk-EMMYFHOT.js.map → chunk-5WOB4UBD.js.map} +1 -1
  43. package/dist/{chunk-4CUFXCC5.cjs → chunk-5Z6UPVGC.cjs} +6 -6
  44. package/dist/{chunk-4CUFXCC5.cjs.map → chunk-5Z6UPVGC.cjs.map} +1 -1
  45. package/dist/{chunk-YIXTGWT4.cjs → chunk-6QKMMKRY.cjs} +5 -5
  46. package/dist/{chunk-YIXTGWT4.cjs.map → chunk-6QKMMKRY.cjs.map} +1 -1
  47. package/dist/{chunk-F57VRLKP.js → chunk-6SAYPXHX.js} +4 -4
  48. package/dist/{chunk-F57VRLKP.js.map → chunk-6SAYPXHX.js.map} +1 -1
  49. package/dist/{chunk-SK7H3Z67.cjs → chunk-6XDPJWSC.cjs} +99 -83
  50. package/dist/chunk-6XDPJWSC.cjs.map +1 -0
  51. package/dist/{chunk-4AE2L6AO.cjs → chunk-7FTBPLA6.cjs} +8 -8
  52. package/dist/chunk-7FTBPLA6.cjs.map +1 -0
  53. package/dist/{chunk-KVE7PQ5P.cjs → chunk-7KN6J7XV.cjs} +20 -20
  54. package/dist/{chunk-KVE7PQ5P.cjs.map → chunk-7KN6J7XV.cjs.map} +1 -1
  55. package/dist/{chunk-K4S4FAYX.cjs → chunk-AHINB2TP.cjs} +11 -11
  56. package/dist/{chunk-K4S4FAYX.cjs.map → chunk-AHINB2TP.cjs.map} +1 -1
  57. package/dist/{chunk-MYFZYUPR.cjs → chunk-AOHJILLU.cjs} +38 -3
  58. package/dist/chunk-AOHJILLU.cjs.map +1 -0
  59. package/dist/chunk-BKSPDTX4.js +3 -0
  60. package/dist/{chunk-3PXOIAF6.js.map → chunk-BKSPDTX4.js.map} +1 -1
  61. package/dist/chunk-BN75TLUN.cjs +163 -0
  62. package/dist/chunk-BN75TLUN.cjs.map +1 -0
  63. package/dist/{chunk-WWJIW2IH.cjs → chunk-BVMABVC4.cjs} +3 -3
  64. package/dist/{chunk-WWJIW2IH.cjs.map → chunk-BVMABVC4.cjs.map} +1 -1
  65. package/dist/{chunk-H7QSGFMZ.cjs → chunk-BZAGP5W6.cjs} +17 -10
  66. package/dist/chunk-BZAGP5W6.cjs.map +1 -0
  67. package/dist/{chunk-RS5VA6QU.cjs → chunk-C3DUS2VE.cjs} +3 -3
  68. package/dist/{chunk-RS5VA6QU.cjs.map → chunk-C3DUS2VE.cjs.map} +1 -1
  69. package/dist/{chunk-NLBT5O2X.js → chunk-CK3KLRNF.js} +3 -3
  70. package/dist/{chunk-NLBT5O2X.js.map → chunk-CK3KLRNF.js.map} +1 -1
  71. package/dist/{chunk-L6D4CKLV.cjs → chunk-CXDMZT45.cjs} +135 -4
  72. package/dist/chunk-CXDMZT45.cjs.map +1 -0
  73. package/dist/{chunk-TXRQQMG5.js → chunk-CYMZ2QS5.js} +2 -2
  74. package/dist/{chunk-TXRQQMG5.js.map → chunk-CYMZ2QS5.js.map} +1 -1
  75. package/dist/{chunk-DX64KLSN.js → chunk-D25WH7MH.js} +7 -7
  76. package/dist/{chunk-DX64KLSN.js.map → chunk-D25WH7MH.js.map} +1 -1
  77. package/dist/{chunk-XBKOZRDO.js → chunk-DFYMIRMW.js} +4 -4
  78. package/dist/{chunk-XBKOZRDO.js.map → chunk-DFYMIRMW.js.map} +1 -1
  79. package/dist/{chunk-AESFOMSH.js → chunk-DGRXAIWK.js} +135 -4
  80. package/dist/chunk-DGRXAIWK.js.map +1 -0
  81. package/dist/{chunk-UZ5NGGMI.js → chunk-EG7XFZ3W.js} +4 -4
  82. package/dist/{chunk-UZ5NGGMI.js.map → chunk-EG7XFZ3W.js.map} +1 -1
  83. package/dist/{chunk-LQHI44OZ.cjs → chunk-FUFBRKOG.cjs} +59 -59
  84. package/dist/{chunk-LQHI44OZ.cjs.map → chunk-FUFBRKOG.cjs.map} +1 -1
  85. package/dist/{chunk-DG7KE4YJ.cjs → chunk-FYAKUU2A.cjs} +38 -21
  86. package/dist/chunk-FYAKUU2A.cjs.map +1 -0
  87. package/dist/{chunk-7L7OPISJ.cjs → chunk-H4AVMUOC.cjs} +12 -6
  88. package/dist/chunk-H4AVMUOC.cjs.map +1 -0
  89. package/dist/{chunk-I2ECTLON.cjs → chunk-HXSA6QC5.cjs} +3 -3
  90. package/dist/{chunk-I2ECTLON.cjs.map → chunk-HXSA6QC5.cjs.map} +1 -1
  91. package/dist/{chunk-DCBMTFLE.js → chunk-HZ4MBUC3.js} +3 -3
  92. package/dist/{chunk-DCBMTFLE.js.map → chunk-HZ4MBUC3.js.map} +1 -1
  93. package/dist/{chunk-X5ZPYYMS.js → chunk-I3DQXUSC.js} +3 -3
  94. package/dist/{chunk-X5ZPYYMS.js.map → chunk-I3DQXUSC.js.map} +1 -1
  95. package/dist/{chunk-FN6VHMLM.cjs → chunk-IB54SKWB.cjs} +8 -8
  96. package/dist/{chunk-FN6VHMLM.cjs.map → chunk-IB54SKWB.cjs.map} +1 -1
  97. package/dist/chunk-IF3X2WZP.js +705 -0
  98. package/dist/chunk-IF3X2WZP.js.map +1 -0
  99. package/dist/{chunk-JP5SGIXA.cjs → chunk-IFDC4TXM.cjs} +4 -4
  100. package/dist/{chunk-JP5SGIXA.cjs.map → chunk-IFDC4TXM.cjs.map} +1 -1
  101. package/dist/{chunk-RDGRKYQ5.cjs → chunk-IINZWUGK.cjs} +58 -6
  102. package/dist/chunk-IINZWUGK.cjs.map +1 -0
  103. package/dist/{chunk-U3JU6BI5.cjs → chunk-JEIW7BSV.cjs} +3 -3
  104. package/dist/{chunk-U3JU6BI5.cjs.map → chunk-JEIW7BSV.cjs.map} +1 -1
  105. package/dist/{chunk-RZJXCI53.js → chunk-KATEJG2F.js} +1138 -14
  106. package/dist/chunk-KATEJG2F.js.map +1 -0
  107. package/dist/{chunk-D2GID3YK.js → chunk-KREUYVMZ.js} +58 -6
  108. package/dist/chunk-KREUYVMZ.js.map +1 -0
  109. package/dist/{chunk-Y6YSJPVC.js → chunk-KRU6IGV7.js} +11 -3
  110. package/dist/chunk-KRU6IGV7.js.map +1 -0
  111. package/dist/{chunk-LZU7YBXG.js → chunk-KU3XRHWA.js} +169 -10
  112. package/dist/chunk-KU3XRHWA.js.map +1 -0
  113. package/dist/{chunk-P2VTQ5AR.cjs → chunk-L52N6BEN.cjs} +39 -23
  114. package/dist/chunk-L52N6BEN.cjs.map +1 -0
  115. package/dist/{chunk-XWYKLEKG.js → chunk-L5W7TJQ5.js} +11 -5
  116. package/dist/chunk-L5W7TJQ5.js.map +1 -0
  117. package/dist/{chunk-PAM5UUBL.cjs → chunk-L7L5S2HO.cjs} +18 -2
  118. package/dist/{chunk-PAM5UUBL.cjs.map → chunk-L7L5S2HO.cjs.map} +1 -1
  119. package/dist/{chunk-SEPYBAML.js → chunk-LAEIVOIY.js} +38 -21
  120. package/dist/chunk-LAEIVOIY.js.map +1 -0
  121. package/dist/{chunk-Z5KFXHDP.cjs → chunk-MM7QKUE3.cjs} +5 -5
  122. package/dist/{chunk-Z5KFXHDP.cjs.map → chunk-MM7QKUE3.cjs.map} +1 -1
  123. package/dist/{chunk-FJ7YPVKV.js → chunk-MUIDWFYJ.js} +3 -3
  124. package/dist/{chunk-FJ7YPVKV.js.map → chunk-MUIDWFYJ.js.map} +1 -1
  125. package/dist/{chunk-YMHOF6WA.cjs → chunk-MYAU2ZUC.cjs} +3 -3
  126. package/dist/{chunk-YMHOF6WA.cjs.map → chunk-MYAU2ZUC.cjs.map} +1 -1
  127. package/dist/{chunk-5J5PEUUA.js → chunk-NHN6A3ZO.js} +6 -6
  128. package/dist/{chunk-5J5PEUUA.js.map → chunk-NHN6A3ZO.js.map} +1 -1
  129. package/dist/{chunk-EPQPUFS6.cjs → chunk-NYJIXR4Y.cjs} +6 -6
  130. package/dist/chunk-NYJIXR4Y.cjs.map +1 -0
  131. package/dist/{chunk-RYQ3S3KO.cjs → chunk-O425FKDI.cjs} +581 -70
  132. package/dist/chunk-O425FKDI.cjs.map +1 -0
  133. package/dist/{chunk-WIYQI35R.cjs → chunk-O7XHHTTP.cjs} +8 -8
  134. package/dist/{chunk-WIYQI35R.cjs.map → chunk-O7XHHTTP.cjs.map} +1 -1
  135. package/dist/{chunk-IILJGFI5.js → chunk-OAZUDUGX.js} +8 -6
  136. package/dist/chunk-OAZUDUGX.js.map +1 -0
  137. package/dist/{chunk-JHGMZX4I.cjs → chunk-OCV33S5Q.cjs} +6 -6
  138. package/dist/{chunk-JHGMZX4I.cjs.map → chunk-OCV33S5Q.cjs.map} +1 -1
  139. package/dist/{chunk-IYXCFIMP.js → chunk-ODYQYLO2.js} +33 -17
  140. package/dist/chunk-ODYQYLO2.js.map +1 -0
  141. package/dist/{chunk-FPVRQCCL.js → chunk-OHDIJOGG.js} +4 -4
  142. package/dist/{chunk-FPVRQCCL.js.map → chunk-OHDIJOGG.js.map} +1 -1
  143. package/dist/{chunk-GQVL2JKQ.cjs → chunk-OHKO5THF.cjs} +3 -3
  144. package/dist/{chunk-GQVL2JKQ.cjs.map → chunk-OHKO5THF.cjs.map} +1 -1
  145. package/dist/{chunk-LMBXJZLG.js → chunk-ON4JULCA.js} +3 -3
  146. package/dist/{chunk-LMBXJZLG.js.map → chunk-ON4JULCA.js.map} +1 -1
  147. package/dist/{chunk-A5YOIJKL.js → chunk-ONNY7UO4.js} +15 -15
  148. package/dist/{chunk-A5YOIJKL.js.map → chunk-ONNY7UO4.js.map} +1 -1
  149. package/dist/{chunk-DWCYEPTT.js → chunk-OSPTA4UR.js} +4 -4
  150. package/dist/{chunk-DWCYEPTT.js.map → chunk-OSPTA4UR.js.map} +1 -1
  151. package/dist/{chunk-FDUA6OGN.js → chunk-PFKRHNYV.js} +8 -8
  152. package/dist/chunk-PFKRHNYV.js.map +1 -0
  153. package/dist/{chunk-XMECP2MD.js → chunk-PHK4XBO5.js} +4 -4
  154. package/dist/{chunk-XMECP2MD.js.map → chunk-PHK4XBO5.js.map} +1 -1
  155. package/dist/{chunk-ZZJ4ZVYR.cjs → chunk-PJ6CC53R.cjs} +3 -3
  156. package/dist/{chunk-ZZJ4ZVYR.cjs.map → chunk-PJ6CC53R.cjs.map} +1 -1
  157. package/dist/{chunk-N3Y43KOB.js → chunk-PYHFVYVZ.js} +12 -5
  158. package/dist/chunk-PYHFVYVZ.js.map +1 -0
  159. package/dist/{chunk-XMCIXHGH.js → chunk-Q7G56ZIO.js} +39 -23
  160. package/dist/chunk-Q7G56ZIO.js.map +1 -0
  161. package/dist/{chunk-4PIW3Y5M.js → chunk-QAKASRE6.js} +34 -26
  162. package/dist/chunk-QAKASRE6.js.map +1 -0
  163. package/dist/{chunk-QGZC43L7.js → chunk-QAQOCS2J.js} +5 -5
  164. package/dist/{chunk-QGZC43L7.js.map → chunk-QAQOCS2J.js.map} +1 -1
  165. package/dist/{chunk-YVIH26FG.cjs → chunk-QKAYRHWP.cjs} +12 -12
  166. package/dist/{chunk-YVIH26FG.cjs.map → chunk-QKAYRHWP.cjs.map} +1 -1
  167. package/dist/{chunk-FDV7EQWH.js → chunk-RPG2ZP2T.js} +575 -68
  168. package/dist/chunk-RPG2ZP2T.js.map +1 -0
  169. package/dist/{chunk-P3JEMF6E.cjs → chunk-RSCA5AZW.cjs} +4 -4
  170. package/dist/{chunk-P3JEMF6E.cjs.map → chunk-RSCA5AZW.cjs.map} +1 -1
  171. package/dist/{chunk-5Y5FSR4N.js → chunk-SCXELRRZ.js} +3 -3
  172. package/dist/{chunk-5Y5FSR4N.js.map → chunk-SCXELRRZ.js.map} +1 -1
  173. package/dist/{chunk-JWTCEWQ4.cjs → chunk-SNEQXSC5.cjs} +2 -2
  174. package/dist/{chunk-JWTCEWQ4.cjs.map → chunk-SNEQXSC5.cjs.map} +1 -1
  175. package/dist/{chunk-U5TTXN45.cjs → chunk-SRA2L3SQ.cjs} +9 -7
  176. package/dist/chunk-SRA2L3SQ.cjs.map +1 -0
  177. package/dist/{chunk-5U6GETAW.js → chunk-TQDZLRIE.js} +3 -3
  178. package/dist/chunk-TQDZLRIE.js.map +1 -0
  179. package/dist/{chunk-HK3AMH3Q.cjs → chunk-VROIMIHB.cjs} +11 -3
  180. package/dist/chunk-VROIMIHB.cjs.map +1 -0
  181. package/dist/{chunk-3SHLOF4V.cjs → chunk-VTR2KGLY.cjs} +9 -9
  182. package/dist/{chunk-3SHLOF4V.cjs.map → chunk-VTR2KGLY.cjs.map} +1 -1
  183. package/dist/{chunk-XO3WLK65.js → chunk-VVDE4CHU.js} +3 -3
  184. package/dist/{chunk-XO3WLK65.js.map → chunk-VVDE4CHU.js.map} +1 -1
  185. package/dist/{chunk-BOOJDRJO.js → chunk-WSNMQQ4P.js} +38 -3
  186. package/dist/chunk-WSNMQQ4P.js.map +1 -0
  187. package/dist/chunk-WYMO3IIK.js +136 -0
  188. package/dist/chunk-WYMO3IIK.js.map +1 -0
  189. package/dist/{chunk-SPWVKDGC.cjs → chunk-X5QRRMGB.cjs} +35 -27
  190. package/dist/chunk-X5QRRMGB.cjs.map +1 -0
  191. package/dist/{chunk-SH6B4MG5.js → chunk-XBXDUAIM.js} +4 -4
  192. package/dist/{chunk-SH6B4MG5.js.map → chunk-XBXDUAIM.js.map} +1 -1
  193. package/dist/{chunk-56QJHQ5C.cjs → chunk-XEEVDZDK.cjs} +5 -5
  194. package/dist/{chunk-56QJHQ5C.cjs.map → chunk-XEEVDZDK.cjs.map} +1 -1
  195. package/dist/{chunk-GXODR6V4.js → chunk-XOIIUO6O.js} +3 -3
  196. package/dist/{chunk-GXODR6V4.js.map → chunk-XOIIUO6O.js.map} +1 -1
  197. package/dist/{chunk-ELYGV32O.cjs → chunk-XTHMC76F.cjs} +5 -5
  198. package/dist/{chunk-ELYGV32O.cjs.map → chunk-XTHMC76F.cjs.map} +1 -1
  199. package/dist/{chunk-FF235PKY.cjs → chunk-XWZEECEX.cjs} +3 -3
  200. package/dist/chunk-XWZEECEX.cjs.map +1 -0
  201. package/dist/{chunk-TVLZZI5Q.cjs → chunk-YJP6DUFO.cjs} +9 -9
  202. package/dist/{chunk-TVLZZI5Q.cjs.map → chunk-YJP6DUFO.cjs.map} +1 -1
  203. package/dist/{chunk-EHQ77LL5.js → chunk-ZB54MTMQ.js} +3 -3
  204. package/dist/{chunk-EHQ77LL5.js.map → chunk-ZB54MTMQ.js.map} +1 -1
  205. package/dist/components/Accordion/index.cjs +2 -2
  206. package/dist/components/Accordion/index.js +1 -1
  207. package/dist/components/Alert/index.cjs +5 -5
  208. package/dist/components/Alert/index.d.cts +1 -1
  209. package/dist/components/Alert/index.d.ts +1 -1
  210. package/dist/components/Alert/index.js +1 -1
  211. package/dist/components/AlertDialog/index.cjs +6 -5
  212. package/dist/components/AlertDialog/index.js +5 -4
  213. package/dist/components/AudioPlayer/index.cjs +6 -6
  214. package/dist/components/AudioPlayer/index.js +1 -1
  215. package/dist/components/Autocomplete/index.cjs +4 -4
  216. package/dist/components/Autocomplete/index.js +3 -3
  217. package/dist/components/Avatar/index.cjs +5 -5
  218. package/dist/components/Avatar/index.js +1 -1
  219. package/dist/components/Badge/index.d.cts +1 -1
  220. package/dist/components/Badge/index.d.ts +1 -1
  221. package/dist/components/Breadcrumb/index.cjs +3 -3
  222. package/dist/components/Breadcrumb/index.js +1 -1
  223. package/dist/components/Button/index.cjs +3 -3
  224. package/dist/components/Button/index.js +1 -1
  225. package/dist/components/Card/index.d.cts +2 -2
  226. package/dist/components/Card/index.d.ts +2 -2
  227. package/dist/components/CountryCodeDropdown/index.cjs +6 -6
  228. package/dist/components/CountryCodeDropdown/index.d.cts +11 -1
  229. package/dist/components/CountryCodeDropdown/index.d.ts +11 -1
  230. package/dist/components/CountryCodeDropdown/index.js +3 -3
  231. package/dist/components/CustomizableDashboard/index.cjs +11 -11
  232. package/dist/components/CustomizableDashboard/index.js +4 -4
  233. package/dist/components/DateInput/index.cjs +4 -4
  234. package/dist/components/DateInput/index.js +3 -3
  235. package/dist/components/Dropdown/index.cjs +13 -9
  236. package/dist/components/Dropdown/index.d.cts +38 -2
  237. package/dist/components/Dropdown/index.d.ts +38 -2
  238. package/dist/components/Dropdown/index.js +3 -3
  239. package/dist/components/FloatingWindow/index.cjs +4 -4
  240. package/dist/components/FloatingWindow/index.js +2 -2
  241. package/dist/components/GlossaryTooltip/index.cjs +4 -4
  242. package/dist/components/GlossaryTooltip/index.js +3 -3
  243. package/dist/components/KeyboardShortcutsOverlay/index.cjs +6 -5
  244. package/dist/components/KeyboardShortcutsOverlay/index.js +4 -3
  245. package/dist/components/Markdown/index.cjs +19 -19
  246. package/dist/components/Markdown/index.js +7 -7
  247. package/dist/components/MediaEditor/index.cjs +15 -14
  248. package/dist/components/MediaEditor/index.js +10 -9
  249. package/dist/components/MediaPlayer/index.cjs +6 -6
  250. package/dist/components/MediaPlayer/index.js +3 -3
  251. package/dist/components/Modal/index.cjs +11 -10
  252. package/dist/components/Modal/index.d.cts +1 -1
  253. package/dist/components/Modal/index.d.ts +1 -1
  254. package/dist/components/Modal/index.js +3 -2
  255. package/dist/components/Pagination/index.cjs +4 -4
  256. package/dist/components/Pagination/index.d.cts +1 -1
  257. package/dist/components/Pagination/index.d.ts +1 -1
  258. package/dist/components/Pagination/index.js +1 -1
  259. package/dist/components/PhoneInput/index.cjs +4 -4
  260. package/dist/components/PhoneInput/index.js +2 -2
  261. package/dist/components/Progress/index.d.cts +1 -1
  262. package/dist/components/Progress/index.d.ts +1 -1
  263. package/dist/components/QuickAction/index.cjs +6 -6
  264. package/dist/components/QuickAction/index.js +1 -1
  265. package/dist/components/RecordButton/index.d.cts +1 -1
  266. package/dist/components/RecordButton/index.d.ts +1 -1
  267. package/dist/components/RichTextEditor/index.cjs +9 -9
  268. package/dist/components/RichTextEditor/index.js +6 -6
  269. package/dist/components/SectionSpyNav/index.cjs +4 -4
  270. package/dist/components/SectionSpyNav/index.js +3 -3
  271. package/dist/components/Select/index.cjs +5 -5
  272. package/dist/components/Select/index.js +3 -3
  273. package/dist/components/Sheet/index.cjs +11 -11
  274. package/dist/components/Sheet/index.js +2 -2
  275. package/dist/components/Slider/index.cjs +5 -5
  276. package/dist/components/Slider/index.d.cts +2 -2
  277. package/dist/components/Slider/index.d.ts +2 -2
  278. package/dist/components/Slider/index.js +1 -1
  279. package/dist/components/SourceTip/index.cjs +4 -4
  280. package/dist/components/SourceTip/index.js +3 -3
  281. package/dist/components/SuperChat/index.cjs +292 -115
  282. package/dist/components/SuperChat/index.cjs.map +1 -1
  283. package/dist/components/SuperChat/index.d.cts +29 -8
  284. package/dist/components/SuperChat/index.d.ts +29 -8
  285. package/dist/components/SuperChat/index.js +284 -107
  286. package/dist/components/SuperChat/index.js.map +1 -1
  287. package/dist/components/SuperChat/plugins/index.cjs +7 -7
  288. package/dist/components/SuperChat/plugins/index.cjs.map +1 -1
  289. package/dist/components/SuperChat/plugins/index.d.cts +2 -2
  290. package/dist/components/SuperChat/plugins/index.d.ts +2 -2
  291. package/dist/components/SuperChat/plugins/index.js +6 -6
  292. package/dist/components/SuperChat/plugins/index.js.map +1 -1
  293. package/dist/components/Text/index.d.cts +1 -1
  294. package/dist/components/Text/index.d.ts +1 -1
  295. package/dist/components/ThemeProvider/index.cjs +9 -9
  296. package/dist/components/ThemeProvider/index.d.cts +1 -1
  297. package/dist/components/ThemeProvider/index.d.ts +1 -1
  298. package/dist/components/ThemeProvider/index.js +3 -3
  299. package/dist/components/Toggle/index.d.cts +1 -1
  300. package/dist/components/Toggle/index.d.ts +1 -1
  301. package/dist/components/Tooltip/index.cjs +3 -3
  302. package/dist/components/Tooltip/index.js +2 -2
  303. package/dist/components/TranscriptView/index.cjs +3 -3
  304. package/dist/components/TranscriptView/index.js +1 -1
  305. package/dist/datavis.cjs +2 -2
  306. package/dist/datavis.js +1 -1
  307. package/dist/esheet.cjs +15 -14
  308. package/dist/esheet.cjs.map +1 -1
  309. package/dist/esheet.js +12 -11
  310. package/dist/esheet.js.map +1 -1
  311. package/dist/hooks/index.cjs +3 -3
  312. package/dist/hooks/index.d.cts +1 -1
  313. package/dist/hooks/index.d.ts +1 -1
  314. package/dist/hooks/index.js +2 -2
  315. package/dist/index.cjs +2509 -2860
  316. package/dist/index.cjs.map +1 -1
  317. package/dist/index.d.cts +278 -43
  318. package/dist/index.d.ts +278 -43
  319. package/dist/index.js +1305 -1700
  320. package/dist/index.js.map +1 -1
  321. package/dist/motion.cjs +87 -0
  322. package/dist/motion.cjs.map +1 -0
  323. package/dist/motion.d.cts +52 -0
  324. package/dist/motion.d.ts +52 -0
  325. package/dist/motion.js +50 -0
  326. package/dist/motion.js.map +1 -0
  327. package/dist/styles/init.css +25 -0
  328. package/dist/styles.css +1 -1
  329. package/dist/tailwind-preset.cjs +4 -4
  330. package/dist/tailwind-preset.js +1 -1
  331. package/dist/{types-BoTeTPdH.d.ts → types-9vK_YdEb.d.ts} +12 -1
  332. package/dist/{types-DyIB9HYT.d.cts → types-DZDroUW8.d.cts} +12 -1
  333. package/dist/{useAnchoredPosition-C7PNglzD.d.ts → useAnchoredPosition-CKwLSQW8.d.cts} +10 -3
  334. package/dist/{useAnchoredPosition-C7PNglzD.d.cts → useAnchoredPosition-CKwLSQW8.d.ts} +10 -3
  335. package/package.json +21 -2
  336. package/dist/CsvBlock-OTFG3PYZ.cjs +0 -15
  337. package/dist/CsvBlock-PUSTBQ5B.js +0 -6
  338. package/dist/HtmlPreviewBlock-QHLSIMWJ.cjs +0 -15
  339. package/dist/HtmlPreviewBlock-YF2YVKKX.js +0 -6
  340. package/dist/MermaidBlock-H3TWNC4D.js +0 -6
  341. package/dist/MermaidBlock-ZLLBO3VY.cjs +0 -15
  342. package/dist/SurveyBlock-JLHS3YQD.js +0 -6
  343. package/dist/SurveyBlock-M2ZRTGVJ.cjs +0 -15
  344. package/dist/chunk-26DPQUSB.cjs +0 -1177
  345. package/dist/chunk-26DPQUSB.cjs.map +0 -1
  346. package/dist/chunk-3PXOIAF6.js +0 -3
  347. package/dist/chunk-4AE2L6AO.cjs.map +0 -1
  348. package/dist/chunk-4PIW3Y5M.js.map +0 -1
  349. package/dist/chunk-5JZIDILK.cjs.map +0 -1
  350. package/dist/chunk-5U6GETAW.js.map +0 -1
  351. package/dist/chunk-6EWJGRC3.js.map +0 -1
  352. package/dist/chunk-7L7OPISJ.cjs.map +0 -1
  353. package/dist/chunk-AESFOMSH.js.map +0 -1
  354. package/dist/chunk-BOOJDRJO.js.map +0 -1
  355. package/dist/chunk-BOW7ZGI2.cjs.map +0 -1
  356. package/dist/chunk-D2GID3YK.js.map +0 -1
  357. package/dist/chunk-DG7KE4YJ.cjs.map +0 -1
  358. package/dist/chunk-EKRT7K2K.js +0 -1145
  359. package/dist/chunk-EKRT7K2K.js.map +0 -1
  360. package/dist/chunk-EPQPUFS6.cjs.map +0 -1
  361. package/dist/chunk-FDUA6OGN.js.map +0 -1
  362. package/dist/chunk-FDV7EQWH.js.map +0 -1
  363. package/dist/chunk-FF235PKY.cjs.map +0 -1
  364. package/dist/chunk-H7QSGFMZ.cjs.map +0 -1
  365. package/dist/chunk-HK3AMH3Q.cjs.map +0 -1
  366. package/dist/chunk-IILJGFI5.js.map +0 -1
  367. package/dist/chunk-IYXCFIMP.js.map +0 -1
  368. package/dist/chunk-JHZW3Y62.js.map +0 -1
  369. package/dist/chunk-L6D4CKLV.cjs.map +0 -1
  370. package/dist/chunk-LZU7YBXG.js.map +0 -1
  371. package/dist/chunk-MYFZYUPR.cjs.map +0 -1
  372. package/dist/chunk-N3Y43KOB.js.map +0 -1
  373. package/dist/chunk-P2VTQ5AR.cjs.map +0 -1
  374. package/dist/chunk-RDGRKYQ5.cjs.map +0 -1
  375. package/dist/chunk-RYQ3S3KO.cjs.map +0 -1
  376. package/dist/chunk-RZJXCI53.js.map +0 -1
  377. package/dist/chunk-SEPYBAML.js.map +0 -1
  378. package/dist/chunk-SK7H3Z67.cjs.map +0 -1
  379. package/dist/chunk-SPWVKDGC.cjs.map +0 -1
  380. package/dist/chunk-U5TTXN45.cjs.map +0 -1
  381. package/dist/chunk-XMCIXHGH.js.map +0 -1
  382. package/dist/chunk-XS35KPBZ.cjs.map +0 -1
  383. package/dist/chunk-XWYKLEKG.js.map +0 -1
  384. package/dist/chunk-Y6YSJPVC.js.map +0 -1
@@ -1,1177 +0,0 @@
1
- 'use strict';
2
-
3
- var chunkMYFZYUPR_cjs = require('./chunk-MYFZYUPR.cjs');
4
- var chunkS5RVSXDV_cjs = require('./chunk-S5RVSXDV.cjs');
5
- var React2 = require('react');
6
- var jsxRuntime = require('react/jsx-runtime');
7
- var reactDom = require('react-dom');
8
- var classVarianceAuthority = require('class-variance-authority');
9
-
10
- function _interopNamespace(e) {
11
- if (e && e.__esModule) return e;
12
- var n = Object.create(null);
13
- if (e) {
14
- Object.keys(e).forEach(function (k) {
15
- if (k !== 'default') {
16
- var d = Object.getOwnPropertyDescriptor(e, k);
17
- Object.defineProperty(n, k, d.get ? d : {
18
- enumerable: true,
19
- get: function () { return e[k]; }
20
- });
21
- }
22
- });
23
- }
24
- n.default = e;
25
- return Object.freeze(n);
26
- }
27
-
28
- var React2__namespace = /*#__PURE__*/_interopNamespace(React2);
29
-
30
- function getFileType(mimeType) {
31
- if (mimeType.startsWith("image/")) return "image";
32
- if (mimeType.startsWith("video/")) return "video";
33
- if (mimeType.startsWith("audio/")) return "audio";
34
- if (mimeType.includes("pdf") || mimeType.includes("document") || mimeType.includes("text")) {
35
- return "document";
36
- }
37
- return "file";
38
- }
39
- function formatFileSize(bytes) {
40
- if (bytes < 1024) return `${bytes} B`;
41
- if (bytes < 1024 * 1024) return `${(bytes / 1024).toFixed(1)} KB`;
42
- return `${(bytes / (1024 * 1024)).toFixed(1)} MB`;
43
- }
44
- function validateFile(file, acceptedTypes, maxSize) {
45
- if (acceptedTypes && acceptedTypes.length > 0) {
46
- const isAccepted = acceptedTypes.some((type) => {
47
- if (type.startsWith(".")) {
48
- return file.name.toLowerCase().endsWith(type.toLowerCase());
49
- }
50
- if (type.endsWith("/*")) {
51
- return file.type.startsWith(type.replace("/*", "/"));
52
- }
53
- return file.type === type;
54
- });
55
- if (!isAccepted) {
56
- return { valid: false, error: "File type not supported" };
57
- }
58
- }
59
- if (maxSize && file.size > maxSize) {
60
- return {
61
- valid: false,
62
- error: `File too large (max ${formatFileSize(maxSize)})`
63
- };
64
- }
65
- return { valid: true };
66
- }
67
- function generateAttachmentId() {
68
- return `attachment-${Date.now()}-${Math.random().toString(36).substr(2, 9)}`;
69
- }
70
- function AttachmentPreviewItem({
71
- attachment,
72
- onRemove,
73
- onRetry,
74
- className
75
- }) {
76
- const { file, previewUrl, type, state, progress } = attachment;
77
- const isImage = type === "image";
78
- const isVideo = type === "video";
79
- const isUploading = state === "uploading";
80
- const isFailed = state === "failed";
81
- return /* @__PURE__ */ jsxRuntime.jsxs(
82
- "div",
83
- {
84
- className: chunkS5RVSXDV_cjs.cn(
85
- "group relative overflow-hidden rounded-lg",
86
- "bg-neutral-100 dark:bg-neutral-800",
87
- "border border-neutral-200 dark:border-neutral-700",
88
- isFailed && "border-red-500",
89
- className
90
- ),
91
- children: [
92
- (isImage || isVideo) && previewUrl ? /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "relative h-20 w-20", children: [
93
- /* @__PURE__ */ jsxRuntime.jsx(
94
- "img",
95
- {
96
- src: previewUrl,
97
- alt: file.name,
98
- className: chunkS5RVSXDV_cjs.cn(
99
- "h-full w-full object-cover",
100
- (isUploading || isFailed) && "opacity-50"
101
- )
102
- }
103
- ),
104
- isVideo && /* @__PURE__ */ jsxRuntime.jsx("div", { className: "absolute inset-0 flex items-center justify-center", children: /* @__PURE__ */ jsxRuntime.jsx(
105
- "svg",
106
- {
107
- "aria-hidden": "true",
108
- className: "h-6 w-6 text-white drop-shadow",
109
- fill: "currentColor",
110
- viewBox: "0 0 24 24",
111
- children: /* @__PURE__ */ jsxRuntime.jsx("path", { d: "M8 5v14l11-7z" })
112
- }
113
- ) })
114
- ] }) : (
115
- /* File preview */
116
- /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "flex h-20 w-20 flex-col items-center justify-center p-2", children: [
117
- /* @__PURE__ */ jsxRuntime.jsx(
118
- "svg",
119
- {
120
- "aria-hidden": "true",
121
- className: "h-8 w-8 text-neutral-500",
122
- fill: "none",
123
- viewBox: "0 0 24 24",
124
- stroke: "currentColor",
125
- children: /* @__PURE__ */ jsxRuntime.jsx(
126
- "path",
127
- {
128
- strokeLinecap: "round",
129
- strokeLinejoin: "round",
130
- strokeWidth: 2,
131
- d: "M9 12h6m-6 4h6m2 5H7a2 2 0 01-2-2V5a2 2 0 012-2h5.586a1 1 0 01.707.293l5.414 5.414a1 1 0 01.293.707V19a2 2 0 01-2 2z"
132
- }
133
- )
134
- }
135
- ),
136
- /* @__PURE__ */ jsxRuntime.jsx("span", { className: "mt-1 max-w-full truncate px-1 text-xs text-neutral-500", children: file.name.split(".").pop()?.toUpperCase() })
137
- ] })
138
- ),
139
- isUploading && progress !== void 0 && /* @__PURE__ */ jsxRuntime.jsx("div", { className: "absolute inset-0 flex items-center justify-center bg-black/50", children: /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "text-center text-white", children: [
140
- /* @__PURE__ */ jsxRuntime.jsxs(
141
- "svg",
142
- {
143
- "aria-hidden": "true",
144
- className: "mx-auto h-6 w-6 animate-spin",
145
- fill: "none",
146
- viewBox: "0 0 24 24",
147
- children: [
148
- /* @__PURE__ */ jsxRuntime.jsx(
149
- "circle",
150
- {
151
- className: "opacity-25",
152
- cx: "12",
153
- cy: "12",
154
- r: "10",
155
- stroke: "currentColor",
156
- strokeWidth: "4"
157
- }
158
- ),
159
- /* @__PURE__ */ jsxRuntime.jsx(
160
- "path",
161
- {
162
- className: "opacity-75",
163
- fill: "currentColor",
164
- d: "M4 12a8 8 0 018-8V0C5.373 0 0 5.373 0 12h4z"
165
- }
166
- )
167
- ]
168
- }
169
- ),
170
- /* @__PURE__ */ jsxRuntime.jsxs("span", { className: "mt-1 text-xs", children: [
171
- progress,
172
- "%"
173
- ] })
174
- ] }) }),
175
- isFailed && /* @__PURE__ */ jsxRuntime.jsx("div", { className: "absolute inset-0 flex items-center justify-center bg-black/50", children: /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "text-center", children: [
176
- /* @__PURE__ */ jsxRuntime.jsx(
177
- "svg",
178
- {
179
- "aria-hidden": "true",
180
- className: "mx-auto h-6 w-6 text-red-400",
181
- fill: "none",
182
- viewBox: "0 0 24 24",
183
- stroke: "currentColor",
184
- children: /* @__PURE__ */ jsxRuntime.jsx(
185
- "path",
186
- {
187
- strokeLinecap: "round",
188
- strokeLinejoin: "round",
189
- strokeWidth: 2,
190
- d: "M12 9v2m0 4h.01m-6.938 4h13.856c1.54 0 2.502-1.667 1.732-3L13.732 4c-.77-1.333-2.694-1.333-3.464 0L3.34 16c-.77 1.333.192 3 1.732 3z"
191
- }
192
- )
193
- }
194
- ),
195
- onRetry && /* @__PURE__ */ jsxRuntime.jsx(
196
- "button",
197
- {
198
- type: "button",
199
- onClick: onRetry,
200
- className: "mt-1 text-xs text-white underline hover:no-underline",
201
- children: "Retry"
202
- }
203
- )
204
- ] }) }),
205
- /* @__PURE__ */ jsxRuntime.jsx(
206
- "button",
207
- {
208
- type: "button",
209
- onClick: onRemove,
210
- className: chunkS5RVSXDV_cjs.cn(
211
- "absolute -top-1 -right-1 z-10",
212
- "rounded-full p-1",
213
- "bg-neutral-900 text-white",
214
- "opacity-0 group-hover:opacity-100",
215
- "focus:ring-primary-500 focus:opacity-100 focus:ring-2 focus:outline-none",
216
- "transition-opacity"
217
- ),
218
- "aria-label": `Remove ${file.name}`,
219
- children: /* @__PURE__ */ jsxRuntime.jsx(
220
- "svg",
221
- {
222
- "aria-hidden": "true",
223
- className: "h-3 w-3",
224
- fill: "none",
225
- viewBox: "0 0 24 24",
226
- stroke: "currentColor",
227
- children: /* @__PURE__ */ jsxRuntime.jsx(
228
- "path",
229
- {
230
- strokeLinecap: "round",
231
- strokeLinejoin: "round",
232
- strokeWidth: 2,
233
- d: "M6 18L18 6M6 6l12 12"
234
- }
235
- )
236
- }
237
- )
238
- }
239
- ),
240
- /* @__PURE__ */ jsxRuntime.jsx(
241
- "div",
242
- {
243
- className: chunkS5RVSXDV_cjs.cn(
244
- "absolute right-0 bottom-0 left-0",
245
- "bg-black/70 px-1 py-0.5",
246
- "opacity-0 group-hover:opacity-100",
247
- "transition-opacity"
248
- ),
249
- children: /* @__PURE__ */ jsxRuntime.jsx("p", { className: "truncate text-xs text-white", children: file.name })
250
- }
251
- )
252
- ]
253
- }
254
- );
255
- }
256
- AttachmentPreviewItem.displayName = "AttachmentPreviewItem";
257
- var AttachmentPicker = React2__namespace.forwardRef(
258
- ({
259
- onFilesSelected,
260
- acceptedTypes = ["image/*", "video/*", ".pdf", ".doc", ".docx"],
261
- maxFileSize = 25 * 1024 * 1024,
262
- // 25MB
263
- maxFiles = 10,
264
- multiple = true,
265
- disabled = false,
266
- onError,
267
- className,
268
- children
269
- }, ref) => {
270
- const inputRef = React2__namespace.useRef(null);
271
- React2__namespace.useImperativeHandle(ref, () => inputRef.current);
272
- const handleClick = () => {
273
- inputRef.current?.click();
274
- };
275
- const handleChange = (event) => {
276
- const files = Array.from(event.target.files || []);
277
- if (files.length === 0) return;
278
- const validFiles = [];
279
- for (const file of files.slice(0, maxFiles)) {
280
- const validation = validateFile(file, acceptedTypes, maxFileSize);
281
- if (validation.valid) {
282
- validFiles.push(file);
283
- } else if (onError) {
284
- onError(`${file.name}: ${validation.error}`);
285
- }
286
- }
287
- if (files.length > maxFiles && onError) {
288
- onError(`Maximum ${maxFiles} files allowed`);
289
- }
290
- if (validFiles.length > 0) {
291
- onFilesSelected(validFiles);
292
- }
293
- event.target.value = "";
294
- };
295
- return /* @__PURE__ */ jsxRuntime.jsxs(jsxRuntime.Fragment, { children: [
296
- /* @__PURE__ */ jsxRuntime.jsx(
297
- "input",
298
- {
299
- ref: inputRef,
300
- type: "file",
301
- accept: acceptedTypes.join(","),
302
- multiple,
303
- onChange: handleChange,
304
- disabled,
305
- className: "sr-only",
306
- "aria-label": "Select files to attach"
307
- }
308
- ),
309
- /* @__PURE__ */ jsxRuntime.jsx(
310
- "button",
311
- {
312
- type: "button",
313
- onClick: handleClick,
314
- disabled,
315
- "data-slot": "attachment-picker-button",
316
- className: chunkS5RVSXDV_cjs.cn(
317
- "inline-flex items-center justify-center",
318
- "rounded-full p-2",
319
- "text-neutral-500 hover:text-neutral-700",
320
- "dark:text-neutral-400 dark:hover:text-neutral-200",
321
- "hover:bg-neutral-100 dark:hover:bg-neutral-800",
322
- "focus:ring-primary-500 focus:ring-2 focus:outline-none",
323
- "disabled:cursor-not-allowed disabled:opacity-50",
324
- "transition-colors",
325
- className
326
- ),
327
- "aria-label": "Attach files",
328
- children: children || /* @__PURE__ */ jsxRuntime.jsx(
329
- "svg",
330
- {
331
- "aria-hidden": "true",
332
- className: "h-5 w-5",
333
- fill: "none",
334
- viewBox: "0 0 24 24",
335
- stroke: "currentColor",
336
- children: /* @__PURE__ */ jsxRuntime.jsx(
337
- "path",
338
- {
339
- strokeLinecap: "round",
340
- strokeLinejoin: "round",
341
- strokeWidth: 2,
342
- d: "M15.172 7l-6.586 6.586a2 2 0 102.828 2.828l6.414-6.586a4 4 0 00-5.656-5.656l-6.415 6.585a6 6 0 108.486 8.486L20.5 13"
343
- }
344
- )
345
- }
346
- )
347
- }
348
- )
349
- ] });
350
- }
351
- );
352
- AttachmentPicker.displayName = "AttachmentPicker";
353
- function DragDropZone({
354
- onFilesDropped,
355
- acceptedTypes,
356
- maxFileSize,
357
- maxFiles = 10,
358
- disabled = false,
359
- onError,
360
- children,
361
- className
362
- }) {
363
- const [isDragging, setIsDragging] = React2__namespace.useState(false);
364
- const dragCounterRef = React2__namespace.useRef(0);
365
- const handleDragEnter = (event) => {
366
- event.preventDefault();
367
- event.stopPropagation();
368
- if (disabled) return;
369
- dragCounterRef.current++;
370
- if (event.dataTransfer.items && event.dataTransfer.items.length > 0) {
371
- setIsDragging(true);
372
- }
373
- };
374
- const handleDragLeave = (event) => {
375
- event.preventDefault();
376
- event.stopPropagation();
377
- if (disabled) return;
378
- dragCounterRef.current--;
379
- if (dragCounterRef.current === 0) {
380
- setIsDragging(false);
381
- }
382
- };
383
- const handleDragOver = (event) => {
384
- event.preventDefault();
385
- event.stopPropagation();
386
- };
387
- const handleDrop = (event) => {
388
- event.preventDefault();
389
- event.stopPropagation();
390
- if (disabled) return;
391
- setIsDragging(false);
392
- dragCounterRef.current = 0;
393
- const files = Array.from(event.dataTransfer.files);
394
- if (files.length === 0) return;
395
- const validFiles = [];
396
- for (const file of files.slice(0, maxFiles)) {
397
- const validation = validateFile(file, acceptedTypes, maxFileSize);
398
- if (validation.valid) {
399
- validFiles.push(file);
400
- } else if (onError) {
401
- onError(`${file.name}: ${validation.error}`);
402
- }
403
- }
404
- if (files.length > maxFiles && onError) {
405
- onError(`Maximum ${maxFiles} files allowed`);
406
- }
407
- if (validFiles.length > 0) {
408
- onFilesDropped(validFiles);
409
- }
410
- };
411
- return /* @__PURE__ */ jsxRuntime.jsxs(
412
- "div",
413
- {
414
- onDragEnter: handleDragEnter,
415
- onDragLeave: handleDragLeave,
416
- onDragOver: handleDragOver,
417
- onDrop: handleDrop,
418
- className: chunkS5RVSXDV_cjs.cn("relative", className),
419
- children: [
420
- children,
421
- isDragging && /* @__PURE__ */ jsxRuntime.jsx(
422
- "div",
423
- {
424
- className: chunkS5RVSXDV_cjs.cn(
425
- "absolute inset-0 z-50",
426
- "flex items-center justify-center",
427
- "bg-primary-50/90 dark:bg-primary-900/90",
428
- "border-primary-500 border-2 border-dashed",
429
- "rounded-lg"
430
- ),
431
- children: /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "text-center", children: [
432
- /* @__PURE__ */ jsxRuntime.jsx(
433
- "svg",
434
- {
435
- "aria-hidden": "true",
436
- className: "text-primary-800 mx-auto h-12 w-12",
437
- fill: "none",
438
- viewBox: "0 0 24 24",
439
- stroke: "currentColor",
440
- children: /* @__PURE__ */ jsxRuntime.jsx(
441
- "path",
442
- {
443
- strokeLinecap: "round",
444
- strokeLinejoin: "round",
445
- strokeWidth: 2,
446
- d: "M7 16a4 4 0 01-.88-7.903A5 5 0 1115.9 6L16 6a5 5 0 011 9.9M15 13l-3-3m0 0l-3 3m3-3v12"
447
- }
448
- )
449
- }
450
- ),
451
- /* @__PURE__ */ jsxRuntime.jsx("p", { className: "text-primary-700 dark:text-primary-300 mt-2 text-sm font-medium", children: "Drop files here" })
452
- ] })
453
- }
454
- )
455
- ]
456
- }
457
- );
458
- }
459
- DragDropZone.displayName = "DragDropZone";
460
- function CameraButton({
461
- onCapture,
462
- useFrontCamera = false,
463
- disabled = false,
464
- className
465
- }) {
466
- const inputRef = React2__namespace.useRef(null);
467
- const handleClick = () => {
468
- inputRef.current?.click();
469
- };
470
- const handleChange = (event) => {
471
- const file = event.target.files?.[0];
472
- if (file) {
473
- onCapture(file);
474
- }
475
- event.target.value = "";
476
- };
477
- return /* @__PURE__ */ jsxRuntime.jsxs(jsxRuntime.Fragment, { children: [
478
- /* @__PURE__ */ jsxRuntime.jsx(
479
- "input",
480
- {
481
- ref: inputRef,
482
- type: "file",
483
- accept: "image/*",
484
- capture: useFrontCamera ? "user" : "environment",
485
- onChange: handleChange,
486
- disabled,
487
- className: "sr-only",
488
- "aria-label": "Take a photo"
489
- }
490
- ),
491
- /* @__PURE__ */ jsxRuntime.jsx(
492
- "button",
493
- {
494
- type: "button",
495
- onClick: handleClick,
496
- disabled,
497
- className: chunkS5RVSXDV_cjs.cn(
498
- "inline-flex items-center justify-center",
499
- "rounded-full p-2",
500
- "text-neutral-500 hover:text-neutral-700",
501
- "dark:text-neutral-400 dark:hover:text-neutral-200",
502
- "hover:bg-neutral-100 dark:hover:bg-neutral-800",
503
- "focus:ring-primary-500 focus:ring-2 focus:outline-none",
504
- "disabled:cursor-not-allowed disabled:opacity-50",
505
- "transition-colors",
506
- className
507
- ),
508
- "aria-label": "Take a photo",
509
- children: /* @__PURE__ */ jsxRuntime.jsxs(
510
- "svg",
511
- {
512
- "aria-hidden": "true",
513
- className: "h-5 w-5",
514
- fill: "none",
515
- viewBox: "0 0 24 24",
516
- stroke: "currentColor",
517
- children: [
518
- /* @__PURE__ */ jsxRuntime.jsx(
519
- "path",
520
- {
521
- strokeLinecap: "round",
522
- strokeLinejoin: "round",
523
- strokeWidth: 2,
524
- d: "M3 9a2 2 0 012-2h.93a2 2 0 001.664-.89l.812-1.22A2 2 0 0110.07 4h3.86a2 2 0 011.664.89l.812 1.22A2 2 0 0018.07 7H19a2 2 0 012 2v9a2 2 0 01-2 2H5a2 2 0 01-2-2V9z"
525
- }
526
- ),
527
- /* @__PURE__ */ jsxRuntime.jsx(
528
- "path",
529
- {
530
- strokeLinecap: "round",
531
- strokeLinejoin: "round",
532
- strokeWidth: 2,
533
- d: "M15 13a3 3 0 11-6 0 3 3 0 016 0z"
534
- }
535
- )
536
- ]
537
- }
538
- )
539
- }
540
- )
541
- ] });
542
- }
543
- CameraButton.displayName = "CameraButton";
544
- function activeMentionQuery(value, caret) {
545
- const upToCaret = value.slice(0, caret);
546
- const match = /(^|\s)@([^\s@]*)$/.exec(upToCaret);
547
- if (!match) return null;
548
- const query = match[2];
549
- return { query, start: caret - query.length - 1 };
550
- }
551
- function isFileAccepted(file, accepted) {
552
- if (!accepted || accepted.length === 0) return true;
553
- const mime = file.type;
554
- const name = file.name.toLowerCase();
555
- return accepted.some((token) => {
556
- if (token.startsWith(".")) return name.endsWith(token.toLowerCase());
557
- if (token.endsWith("/*")) return mime.startsWith(token.slice(0, -1));
558
- if (token.includes("/")) return mime === token;
559
- return false;
560
- });
561
- }
562
- function CharacterCounter({
563
- current,
564
- max,
565
- showWarningAt = 0.9,
566
- className
567
- }) {
568
- const percentage = current / max;
569
- const isWarning = percentage >= showWarningAt && percentage < 1;
570
- const isOver = current > max;
571
- return /* @__PURE__ */ jsxRuntime.jsxs(
572
- "span",
573
- {
574
- className: chunkS5RVSXDV_cjs.cn(
575
- "text-xs tabular-nums",
576
- isOver ? "font-medium text-red-700 dark:text-red-400" : isWarning ? "text-amber-700 dark:text-amber-400" : "text-neutral-600 dark:text-neutral-400",
577
- className
578
- ),
579
- "aria-live": "polite",
580
- "aria-label": `${current} of ${max} characters`,
581
- children: [
582
- current,
583
- "/",
584
- max
585
- ]
586
- }
587
- );
588
- }
589
- CharacterCounter.displayName = "CharacterCounter";
590
- var sendButtonVariants = classVarianceAuthority.cva(
591
- [
592
- "inline-flex items-center justify-center",
593
- "rounded-full p-3 self-start",
594
- "transition-all duration-200",
595
- "focus:outline-none focus:ring-2 focus:ring-primary-500",
596
- "disabled:opacity-50 disabled:cursor-not-allowed"
597
- ],
598
- {
599
- variants: {
600
- variant: {
601
- primary: [
602
- "bg-primary-800 text-white",
603
- "hover:bg-primary-900",
604
- "active:scale-95"
605
- ],
606
- subtle: [
607
- "bg-transparent text-primary-800",
608
- "hover:bg-primary-50 dark:hover:bg-primary-900/20"
609
- ]
610
- },
611
- canSend: {
612
- true: "",
613
- false: "opacity-50 cursor-not-allowed"
614
- }
615
- },
616
- defaultVariants: {
617
- variant: "primary",
618
- canSend: false
619
- }
620
- }
621
- );
622
- var SendButton = React2__namespace.forwardRef(
623
- ({ className, variant, canSend, isLoading, disabled, ...props }, ref) => {
624
- return /* @__PURE__ */ jsxRuntime.jsx(
625
- "button",
626
- {
627
- ref,
628
- type: "submit",
629
- disabled: disabled || !canSend || isLoading,
630
- "data-slot": "composer-send-button",
631
- className: chunkS5RVSXDV_cjs.cn(sendButtonVariants({ variant, canSend }), className),
632
- "aria-label": isLoading ? "Sending message" : "Send message",
633
- ...props,
634
- children: isLoading ? /* @__PURE__ */ jsxRuntime.jsxs(
635
- "svg",
636
- {
637
- "aria-hidden": "true",
638
- className: "h-5 w-5 animate-spin",
639
- fill: "none",
640
- viewBox: "0 0 24 24",
641
- children: [
642
- /* @__PURE__ */ jsxRuntime.jsx(
643
- "circle",
644
- {
645
- className: "opacity-25",
646
- cx: "12",
647
- cy: "12",
648
- r: "10",
649
- stroke: "currentColor",
650
- strokeWidth: "4"
651
- }
652
- ),
653
- /* @__PURE__ */ jsxRuntime.jsx(
654
- "path",
655
- {
656
- className: "opacity-75",
657
- fill: "currentColor",
658
- d: "M4 12a8 8 0 018-8V0C5.373 0 0 5.373 0 12h4z"
659
- }
660
- )
661
- ]
662
- }
663
- ) : /* @__PURE__ */ jsxRuntime.jsx(
664
- "svg",
665
- {
666
- "aria-hidden": "true",
667
- className: "h-5 w-5",
668
- fill: "none",
669
- viewBox: "0 0 24 24",
670
- stroke: "currentColor",
671
- children: /* @__PURE__ */ jsxRuntime.jsx(
672
- "path",
673
- {
674
- strokeLinecap: "round",
675
- strokeLinejoin: "round",
676
- strokeWidth: 2,
677
- d: "M12 19l9 2-9-18-9 18 9-2zm0 0v-8"
678
- }
679
- )
680
- }
681
- )
682
- }
683
- );
684
- }
685
- );
686
- SendButton.displayName = "SendButton";
687
- var MessageComposer = React2__namespace.forwardRef(
688
- ({
689
- onSend,
690
- onTypingStart,
691
- onTypingStop,
692
- value: controlledValue,
693
- onValueChange,
694
- placeholder = "Type a message...",
695
- maxLength = 1600,
696
- showCharacterCount = false,
697
- disabled = false,
698
- isSending = false,
699
- showAttachmentPicker = true,
700
- showCameraButton = false,
701
- acceptedFileTypes = ["image/*", "video/*", ".pdf", ".doc", ".docx"],
702
- maxFileSize = 25 * 1024 * 1024,
703
- maxAttachments = 10,
704
- onError,
705
- autoFocus = false,
706
- replyTo = null,
707
- onCancelReply,
708
- variant = "default",
709
- inputTrailing,
710
- mentionOptions,
711
- className
712
- }, ref) => {
713
- const textareaRef = React2__namespace.useRef(null);
714
- const [internalContent, setInternalContent] = React2__namespace.useState("");
715
- const isControlled = controlledValue !== void 0;
716
- const content = isControlled ? controlledValue : internalContent;
717
- const setContent = React2__namespace.useCallback(
718
- (val) => {
719
- if (isControlled) {
720
- const newVal = typeof val === "function" ? val(controlledValue) : val;
721
- onValueChange?.(newVal);
722
- } else {
723
- setInternalContent(val);
724
- }
725
- },
726
- [isControlled, controlledValue, onValueChange]
727
- );
728
- const [attachments, setAttachments] = React2__namespace.useState(
729
- []
730
- );
731
- const [isTyping, setIsTyping] = React2__namespace.useState(false);
732
- const typingTimeoutRef = React2__namespace.useRef(null);
733
- React2__namespace.useImperativeHandle(ref, () => textareaRef.current);
734
- React2__namespace.useEffect(() => {
735
- const textarea = textareaRef.current;
736
- if (textarea) {
737
- textarea.style.height = "auto";
738
- textarea.style.height = `${Math.min(textarea.scrollHeight, 150)}px`;
739
- }
740
- }, [content]);
741
- React2__namespace.useEffect(() => {
742
- if (content.length > 0 && !isTyping) {
743
- setIsTyping(true);
744
- onTypingStart?.();
745
- }
746
- if (typingTimeoutRef.current) {
747
- clearTimeout(typingTimeoutRef.current);
748
- }
749
- typingTimeoutRef.current = setTimeout(() => {
750
- if (isTyping) {
751
- setIsTyping(false);
752
- onTypingStop?.();
753
- }
754
- }, 2e3);
755
- return () => {
756
- if (typingTimeoutRef.current) {
757
- clearTimeout(typingTimeoutRef.current);
758
- }
759
- };
760
- }, [content, isTyping, onTypingStart, onTypingStop]);
761
- React2__namespace.useEffect(() => {
762
- if (autoFocus) {
763
- textareaRef.current?.focus();
764
- }
765
- }, [autoFocus]);
766
- React2__namespace.useEffect(() => {
767
- if (replyTo) {
768
- textareaRef.current?.focus();
769
- }
770
- }, [replyTo]);
771
- const mentionsEnabled = !!mentionOptions && mentionOptions.length > 0;
772
- const [mention, setMention] = React2__namespace.useState(null);
773
- const [mentionHighlight, setMentionHighlight] = React2__namespace.useState(0);
774
- const mentionListId = React2__namespace.useId();
775
- const mentionOptionId = (i) => `${mentionListId}-option-${i}`;
776
- const mentionSuggestions = React2__namespace.useMemo(() => {
777
- if (!mention || !mentionOptions) return [];
778
- const q = mention.query.toLowerCase();
779
- return mentionOptions.filter((o) => o.label.toLowerCase().includes(q));
780
- }, [mention, mentionOptions]);
781
- const mentionMenuOpen = mentionsEnabled && mention !== null && mentionSuggestions.length > 0;
782
- const {
783
- anchorRef: mentionAnchorRef,
784
- floatingRef: mentionFloatingRef,
785
- style: mentionStyle
786
- } = chunkMYFZYUPR_cjs.useAnchoredPosition({
787
- open: mentionMenuOpen,
788
- placement: "top-start",
789
- maxHeight: 224
790
- });
791
- const clampedMentionHighlight = mentionMenuOpen ? Math.min(mentionHighlight, mentionSuggestions.length - 1) : -1;
792
- const activeMentionOptionId = mentionMenuOpen ? mentionOptionId(clampedMentionHighlight) : void 0;
793
- const syncMention = React2__namespace.useCallback(
794
- (value, caret) => {
795
- if (!mentionsEnabled) return;
796
- setMention(activeMentionQuery(value, caret));
797
- setMentionHighlight(0);
798
- },
799
- [mentionsEnabled]
800
- );
801
- const insertMention = (option) => {
802
- if (!mention) return;
803
- const insertValue = option.value ?? option.label.split(" ")[0];
804
- const before = content.slice(0, mention.start);
805
- const after = content.slice(mention.start + 1 + mention.query.length);
806
- const insert = `@${insertValue} `;
807
- setContent(before + insert + after);
808
- setMention(null);
809
- const caret = before.length + insert.length;
810
- requestAnimationFrame(() => {
811
- const el = textareaRef.current;
812
- if (el) {
813
- el.focus();
814
- el.setSelectionRange(caret, caret);
815
- }
816
- });
817
- };
818
- const canSend = (content.trim().length > 0 || attachments.length > 0) && content.length <= maxLength && !disabled && !isSending;
819
- const handleSubmit = async (event) => {
820
- event.preventDefault();
821
- if (!canSend) return;
822
- const message = {
823
- content: content.trim(),
824
- attachments: attachments.map((a) => a.file),
825
- replyToId: replyTo?.id
826
- };
827
- setContent("");
828
- setAttachments([]);
829
- setIsTyping(false);
830
- onTypingStop?.();
831
- try {
832
- await onSend(message);
833
- } catch {
834
- setContent(message.content);
835
- onError?.("Failed to send message");
836
- }
837
- };
838
- const handleKeyDown = (event) => {
839
- if (mentionMenuOpen) {
840
- if (event.key === "ArrowDown") {
841
- event.preventDefault();
842
- setMentionHighlight((h) => (h + 1) % mentionSuggestions.length);
843
- return;
844
- }
845
- if (event.key === "ArrowUp") {
846
- event.preventDefault();
847
- setMentionHighlight(
848
- (h) => (h - 1 + mentionSuggestions.length) % mentionSuggestions.length
849
- );
850
- return;
851
- }
852
- if (event.key === "Enter" || event.key === "Tab") {
853
- event.preventDefault();
854
- const chosen = mentionSuggestions[mentionHighlight] ?? mentionSuggestions[0];
855
- if (chosen) insertMention(chosen);
856
- return;
857
- }
858
- if (event.key === "Escape") {
859
- event.preventDefault();
860
- setMention(null);
861
- return;
862
- }
863
- }
864
- if (event.key === "Enter" && !event.shiftKey) {
865
- event.preventDefault();
866
- if (canSend) {
867
- handleSubmit(event);
868
- }
869
- }
870
- };
871
- const handleFilesSelected = (files) => {
872
- const remainingSlots = maxAttachments - attachments.length;
873
- const filesToAdd = files.slice(0, remainingSlots);
874
- if (files.length > remainingSlots) {
875
- onError?.(`Maximum ${maxAttachments} attachments allowed`);
876
- }
877
- const newAttachments = filesToAdd.map((file) => {
878
- const type = getFileType(file.type);
879
- let previewUrl;
880
- if (type === "image" || type === "video") {
881
- previewUrl = URL.createObjectURL(file);
882
- }
883
- return {
884
- id: generateAttachmentId(),
885
- file,
886
- previewUrl,
887
- type,
888
- state: "pending"
889
- };
890
- });
891
- setAttachments((prev) => [...prev, ...newAttachments]);
892
- };
893
- const handlePaste = (event) => {
894
- if (!showAttachmentPicker || disabled) return;
895
- const pasted = Array.from(event.clipboardData.items).filter((item) => item.kind === "file").map((item) => item.getAsFile()).filter((f) => f !== null).filter((f) => isFileAccepted(f, acceptedFileTypes));
896
- if (pasted.length === 0) return;
897
- event.preventDefault();
898
- handleFilesSelected(pasted);
899
- };
900
- const handleRemoveAttachment = (attachmentId) => {
901
- setAttachments((prev) => {
902
- const attachment = prev.find((a) => a.id === attachmentId);
903
- if (attachment?.previewUrl) {
904
- URL.revokeObjectURL(attachment.previewUrl);
905
- }
906
- return prev.filter((a) => a.id !== attachmentId);
907
- });
908
- };
909
- React2__namespace.useEffect(() => {
910
- const currentAttachments = attachments;
911
- return () => {
912
- currentAttachments.forEach((a) => {
913
- if (a.previewUrl) {
914
- URL.revokeObjectURL(a.previewUrl);
915
- }
916
- });
917
- };
918
- }, [attachments]);
919
- return /* @__PURE__ */ jsxRuntime.jsx(
920
- DragDropZone,
921
- {
922
- onFilesDropped: handleFilesSelected,
923
- acceptedTypes: acceptedFileTypes,
924
- maxFileSize,
925
- maxFiles: maxAttachments - attachments.length,
926
- disabled: disabled || attachments.length >= maxAttachments,
927
- onError,
928
- className: chunkS5RVSXDV_cjs.cn("w-full", className),
929
- children: /* @__PURE__ */ jsxRuntime.jsxs(
930
- "form",
931
- {
932
- onSubmit: handleSubmit,
933
- "data-slot": "message-composer",
934
- className: "w-full",
935
- children: [
936
- replyTo && /* @__PURE__ */ jsxRuntime.jsxs(
937
- "div",
938
- {
939
- "data-slot": "composer-reply-preview",
940
- className: chunkS5RVSXDV_cjs.cn(
941
- "flex items-center gap-2 px-4 py-2",
942
- "bg-neutral-50 dark:bg-neutral-800/50",
943
- "border-primary-500 border-l-4"
944
- ),
945
- children: [
946
- /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "min-w-0 flex-1", children: [
947
- /* @__PURE__ */ jsxRuntime.jsxs("span", { className: "text-primary-800 dark:text-primary-400 text-xs font-medium", children: [
948
- "Replying to ",
949
- replyTo.senderName
950
- ] }),
951
- /* @__PURE__ */ jsxRuntime.jsx("p", { className: "truncate text-sm text-neutral-600 dark:text-neutral-300", children: replyTo.content })
952
- ] }),
953
- /* @__PURE__ */ jsxRuntime.jsx(
954
- "button",
955
- {
956
- type: "button",
957
- onClick: onCancelReply,
958
- className: chunkS5RVSXDV_cjs.cn(
959
- "shrink-0 rounded p-1",
960
- "text-neutral-500 hover:text-neutral-700",
961
- "dark:text-neutral-400 dark:hover:text-neutral-200",
962
- "focus:ring-primary-500 focus:ring-2 focus:outline-none"
963
- ),
964
- "aria-label": "Cancel reply",
965
- children: /* @__PURE__ */ jsxRuntime.jsx(
966
- "svg",
967
- {
968
- "aria-hidden": "true",
969
- className: "h-4 w-4",
970
- fill: "none",
971
- viewBox: "0 0 24 24",
972
- stroke: "currentColor",
973
- children: /* @__PURE__ */ jsxRuntime.jsx(
974
- "path",
975
- {
976
- strokeLinecap: "round",
977
- strokeLinejoin: "round",
978
- strokeWidth: 2,
979
- d: "M6 18L18 6M6 6l12 12"
980
- }
981
- )
982
- }
983
- )
984
- }
985
- )
986
- ]
987
- }
988
- ),
989
- attachments.length > 0 && /* @__PURE__ */ jsxRuntime.jsx(
990
- "div",
991
- {
992
- "data-slot": "composer-attachments",
993
- className: chunkS5RVSXDV_cjs.cn(
994
- "flex flex-wrap gap-2 p-3",
995
- "border-t border-neutral-200 dark:border-neutral-700"
996
- ),
997
- children: attachments.map((attachment) => /* @__PURE__ */ jsxRuntime.jsx(
998
- AttachmentPreviewItem,
999
- {
1000
- attachment,
1001
- onRemove: () => handleRemoveAttachment(attachment.id)
1002
- },
1003
- attachment.id
1004
- ))
1005
- }
1006
- ),
1007
- /* @__PURE__ */ jsxRuntime.jsxs(
1008
- "div",
1009
- {
1010
- "data-slot": "composer-input-area",
1011
- className: chunkS5RVSXDV_cjs.cn(
1012
- "flex items-center gap-2 p-3",
1013
- "bg-white dark:bg-neutral-900",
1014
- variant === "default" && "border-t border-neutral-200 dark:border-neutral-700"
1015
- ),
1016
- children: [
1017
- showAttachmentPicker && /* @__PURE__ */ jsxRuntime.jsx(
1018
- AttachmentPicker,
1019
- {
1020
- onFilesSelected: handleFilesSelected,
1021
- acceptedTypes: acceptedFileTypes,
1022
- maxFileSize,
1023
- maxFiles: maxAttachments - attachments.length,
1024
- disabled: disabled || attachments.length >= maxAttachments,
1025
- onError
1026
- }
1027
- ),
1028
- showCameraButton && /* @__PURE__ */ jsxRuntime.jsx(
1029
- CameraButton,
1030
- {
1031
- onCapture: (file) => handleFilesSelected([file]),
1032
- disabled: disabled || attachments.length >= maxAttachments
1033
- }
1034
- ),
1035
- /* @__PURE__ */ jsxRuntime.jsxs(
1036
- "div",
1037
- {
1038
- "data-slot": "composer-input-wrapper",
1039
- className: "relative flex-1",
1040
- ref: mentionAnchorRef,
1041
- children: [
1042
- mentionMenuOpen && reactDom.createPortal(
1043
- /* @__PURE__ */ jsxRuntime.jsx(
1044
- "ul",
1045
- {
1046
- ref: mentionFloatingRef,
1047
- style: mentionStyle,
1048
- id: mentionListId,
1049
- role: "listbox",
1050
- "aria-label": "Mention",
1051
- "data-slot": "composer-mention-list",
1052
- className: "w-64 overflow-y-auto rounded-lg border border-neutral-200 bg-white py-1 shadow-lg dark:border-neutral-700 dark:bg-neutral-800",
1053
- children: mentionSuggestions.map((option, i) => /* @__PURE__ */ jsxRuntime.jsx("li", { children: /* @__PURE__ */ jsxRuntime.jsxs(
1054
- "button",
1055
- {
1056
- type: "button",
1057
- id: mentionOptionId(i),
1058
- role: "option",
1059
- "aria-selected": i === clampedMentionHighlight,
1060
- onMouseDown: (e) => {
1061
- e.preventDefault();
1062
- insertMention(option);
1063
- },
1064
- onMouseEnter: () => setMentionHighlight(i),
1065
- className: chunkS5RVSXDV_cjs.cn(
1066
- "flex w-full items-center gap-2 px-3 py-1.5 text-left text-sm",
1067
- i === clampedMentionHighlight ? "bg-primary-100 text-primary-900 dark:bg-primary-900/40 dark:text-primary-100" : "text-neutral-700 dark:text-neutral-200"
1068
- ),
1069
- children: [
1070
- option.icon,
1071
- /* @__PURE__ */ jsxRuntime.jsxs("span", { className: "min-w-0 flex-1 truncate", children: [
1072
- /* @__PURE__ */ jsxRuntime.jsx("span", { className: "font-medium", children: option.label }),
1073
- option.description && /* @__PURE__ */ jsxRuntime.jsx("span", { className: "ml-1 text-xs text-neutral-400", children: option.description })
1074
- ] }),
1075
- option.meta && /* @__PURE__ */ jsxRuntime.jsx("span", { className: "text-[10px] text-neutral-400", children: option.meta })
1076
- ]
1077
- }
1078
- ) }, option.id))
1079
- }
1080
- ),
1081
- document.body
1082
- ),
1083
- /* @__PURE__ */ jsxRuntime.jsx(
1084
- "textarea",
1085
- {
1086
- ref: textareaRef,
1087
- "data-slot": "composer-input",
1088
- value: content,
1089
- onChange: (e) => {
1090
- setContent(e.target.value);
1091
- syncMention(
1092
- e.target.value,
1093
- e.target.selectionStart ?? e.target.value.length
1094
- );
1095
- },
1096
- onClick: (e) => {
1097
- const el = e.currentTarget;
1098
- syncMention(el.value, el.selectionStart ?? el.value.length);
1099
- },
1100
- onKeyDown: handleKeyDown,
1101
- onPaste: handlePaste,
1102
- placeholder,
1103
- disabled: disabled || isSending,
1104
- rows: 1,
1105
- className: chunkS5RVSXDV_cjs.cn(
1106
- "w-full resize-none rounded-2xl py-2.5",
1107
- inputTrailing ? "pr-10 pl-4" : "px-4",
1108
- "bg-neutral-100 dark:bg-neutral-800",
1109
- "text-neutral-900 dark:text-neutral-100",
1110
- "placeholder:text-neutral-400 dark:placeholder:text-neutral-500",
1111
- "focus:ring-primary-500 focus:ring-2 focus:outline-none",
1112
- "disabled:cursor-not-allowed disabled:opacity-50",
1113
- "transition-colors",
1114
- "max-h-[150px]"
1115
- ),
1116
- "aria-label": "Message",
1117
- "aria-describedby": showCharacterCount ? "char-count" : void 0,
1118
- ...mentionsEnabled ? {
1119
- "aria-controls": mentionMenuOpen ? mentionListId : void 0,
1120
- "aria-activedescendant": activeMentionOptionId,
1121
- "aria-autocomplete": "list"
1122
- } : {}
1123
- }
1124
- ),
1125
- inputTrailing && /* @__PURE__ */ jsxRuntime.jsx(
1126
- "div",
1127
- {
1128
- "data-slot": "composer-input-trailing",
1129
- className: "pointer-events-none absolute top-0 right-1 flex h-[44px] items-center [&>*]:pointer-events-auto",
1130
- children: inputTrailing
1131
- }
1132
- ),
1133
- showCharacterCount && /* @__PURE__ */ jsxRuntime.jsx(
1134
- "div",
1135
- {
1136
- "data-slot": "composer-char-count",
1137
- id: "char-count",
1138
- className: "absolute right-3 bottom-1.5",
1139
- children: /* @__PURE__ */ jsxRuntime.jsx(CharacterCounter, { current: content.length, max: maxLength })
1140
- }
1141
- )
1142
- ]
1143
- }
1144
- ),
1145
- /* @__PURE__ */ jsxRuntime.jsx(
1146
- SendButton,
1147
- {
1148
- canSend,
1149
- isLoading: isSending,
1150
- disabled
1151
- }
1152
- )
1153
- ]
1154
- }
1155
- )
1156
- ]
1157
- }
1158
- )
1159
- }
1160
- );
1161
- }
1162
- );
1163
- MessageComposer.displayName = "MessageComposer";
1164
-
1165
- exports.AttachmentPicker = AttachmentPicker;
1166
- exports.AttachmentPreviewItem = AttachmentPreviewItem;
1167
- exports.CameraButton = CameraButton;
1168
- exports.CharacterCounter = CharacterCounter;
1169
- exports.DragDropZone = DragDropZone;
1170
- exports.MessageComposer = MessageComposer;
1171
- exports.SendButton = SendButton;
1172
- exports.generateAttachmentId = generateAttachmentId;
1173
- exports.getFileType = getFileType;
1174
- exports.sendButtonVariants = sendButtonVariants;
1175
- exports.validateFile = validateFile;
1176
- //# sourceMappingURL=chunk-26DPQUSB.cjs.map
1177
- //# sourceMappingURL=chunk-26DPQUSB.cjs.map