@mieweb/ui 0.8.0 → 0.9.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 (380) 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-RZJXCI53.js → chunk-22CYDCXA.js} +3 -3
  26. package/dist/{chunk-RZJXCI53.js.map → chunk-22CYDCXA.js.map} +1 -1
  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-26DPQUSB.cjs → chunk-5BVFVXHN.cjs} +224 -157
  38. package/dist/chunk-5BVFVXHN.cjs.map +1 -0
  39. package/dist/{chunk-QHTDWIED.js → chunk-5H7SAEQO.js} +5 -5
  40. package/dist/{chunk-QHTDWIED.js.map → chunk-5H7SAEQO.js.map} +1 -1
  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-RYQ3S3KO.cjs → chunk-FQBTGS3E.cjs} +23 -20
  84. package/dist/chunk-FQBTGS3E.cjs.map +1 -0
  85. package/dist/{chunk-LQHI44OZ.cjs → chunk-FUFBRKOG.cjs} +59 -59
  86. package/dist/{chunk-LQHI44OZ.cjs.map → chunk-FUFBRKOG.cjs.map} +1 -1
  87. package/dist/{chunk-DG7KE4YJ.cjs → chunk-FYAKUU2A.cjs} +38 -21
  88. package/dist/chunk-FYAKUU2A.cjs.map +1 -0
  89. package/dist/{chunk-7L7OPISJ.cjs → chunk-H4AVMUOC.cjs} +12 -6
  90. package/dist/chunk-H4AVMUOC.cjs.map +1 -0
  91. package/dist/{chunk-I2ECTLON.cjs → chunk-HXSA6QC5.cjs} +3 -3
  92. package/dist/{chunk-I2ECTLON.cjs.map → chunk-HXSA6QC5.cjs.map} +1 -1
  93. package/dist/{chunk-DCBMTFLE.js → chunk-HZ4MBUC3.js} +3 -3
  94. package/dist/{chunk-DCBMTFLE.js.map → chunk-HZ4MBUC3.js.map} +1 -1
  95. package/dist/{chunk-X5ZPYYMS.js → chunk-I3DQXUSC.js} +3 -3
  96. package/dist/{chunk-X5ZPYYMS.js.map → chunk-I3DQXUSC.js.map} +1 -1
  97. package/dist/{chunk-FN6VHMLM.cjs → chunk-IB54SKWB.cjs} +8 -8
  98. package/dist/{chunk-FN6VHMLM.cjs.map → chunk-IB54SKWB.cjs.map} +1 -1
  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-D2GID3YK.js → chunk-KREUYVMZ.js} +58 -6
  106. package/dist/chunk-KREUYVMZ.js.map +1 -0
  107. package/dist/{chunk-Y6YSJPVC.js → chunk-KRU6IGV7.js} +11 -3
  108. package/dist/chunk-KRU6IGV7.js.map +1 -0
  109. package/dist/{chunk-LZU7YBXG.js → chunk-KU3XRHWA.js} +169 -10
  110. package/dist/chunk-KU3XRHWA.js.map +1 -0
  111. package/dist/{chunk-P2VTQ5AR.cjs → chunk-L52N6BEN.cjs} +39 -23
  112. package/dist/chunk-L52N6BEN.cjs.map +1 -0
  113. package/dist/{chunk-XWYKLEKG.js → chunk-L5W7TJQ5.js} +11 -5
  114. package/dist/chunk-L5W7TJQ5.js.map +1 -0
  115. package/dist/{chunk-PAM5UUBL.cjs → chunk-L7L5S2HO.cjs} +18 -2
  116. package/dist/{chunk-PAM5UUBL.cjs.map → chunk-L7L5S2HO.cjs.map} +1 -1
  117. package/dist/{chunk-SEPYBAML.js → chunk-LAEIVOIY.js} +38 -21
  118. package/dist/chunk-LAEIVOIY.js.map +1 -0
  119. package/dist/{chunk-Z5KFXHDP.cjs → chunk-MM7QKUE3.cjs} +5 -5
  120. package/dist/{chunk-Z5KFXHDP.cjs.map → chunk-MM7QKUE3.cjs.map} +1 -1
  121. package/dist/{chunk-FJ7YPVKV.js → chunk-MUIDWFYJ.js} +3 -3
  122. package/dist/{chunk-FJ7YPVKV.js.map → chunk-MUIDWFYJ.js.map} +1 -1
  123. package/dist/{chunk-FDV7EQWH.js → chunk-MXQ7J4BB.js} +21 -18
  124. package/dist/chunk-MXQ7J4BB.js.map +1 -0
  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-EKRT7K2K.js → chunk-O6GJ4IYS.js} +222 -157
  132. package/dist/chunk-O6GJ4IYS.js.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-P3JEMF6E.cjs → chunk-RSCA5AZW.cjs} +4 -4
  168. package/dist/{chunk-P3JEMF6E.cjs.map → chunk-RSCA5AZW.cjs.map} +1 -1
  169. package/dist/{chunk-5Y5FSR4N.js → chunk-SCXELRRZ.js} +3 -3
  170. package/dist/{chunk-5Y5FSR4N.js.map → chunk-SCXELRRZ.js.map} +1 -1
  171. package/dist/{chunk-JWTCEWQ4.cjs → chunk-SNEQXSC5.cjs} +2 -2
  172. package/dist/{chunk-JWTCEWQ4.cjs.map → chunk-SNEQXSC5.cjs.map} +1 -1
  173. package/dist/{chunk-U5TTXN45.cjs → chunk-SRA2L3SQ.cjs} +9 -7
  174. package/dist/chunk-SRA2L3SQ.cjs.map +1 -0
  175. package/dist/{chunk-5U6GETAW.js → chunk-TQDZLRIE.js} +3 -3
  176. package/dist/chunk-TQDZLRIE.js.map +1 -0
  177. package/dist/{chunk-HK3AMH3Q.cjs → chunk-VROIMIHB.cjs} +11 -3
  178. package/dist/chunk-VROIMIHB.cjs.map +1 -0
  179. package/dist/{chunk-3SHLOF4V.cjs → chunk-VTR2KGLY.cjs} +9 -9
  180. package/dist/{chunk-3SHLOF4V.cjs.map → chunk-VTR2KGLY.cjs.map} +1 -1
  181. package/dist/{chunk-XO3WLK65.js → chunk-VVDE4CHU.js} +3 -3
  182. package/dist/{chunk-XO3WLK65.js.map → chunk-VVDE4CHU.js.map} +1 -1
  183. package/dist/{chunk-XS35KPBZ.cjs → chunk-WIAQQNFU.cjs} +4 -4
  184. package/dist/{chunk-XS35KPBZ.cjs.map → chunk-WIAQQNFU.cjs.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 +264 -106
  282. package/dist/components/SuperChat/index.cjs.map +1 -1
  283. package/dist/components/SuperChat/index.d.cts +13 -5
  284. package/dist/components/SuperChat/index.d.ts +13 -5
  285. package/dist/components/SuperChat/index.js +255 -97
  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 +2399 -1640
  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 +1296 -574
  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.map +0 -1
  345. package/dist/chunk-3PXOIAF6.js +0 -3
  346. package/dist/chunk-4AE2L6AO.cjs.map +0 -1
  347. package/dist/chunk-4PIW3Y5M.js.map +0 -1
  348. package/dist/chunk-5JZIDILK.cjs.map +0 -1
  349. package/dist/chunk-5U6GETAW.js.map +0 -1
  350. package/dist/chunk-6EWJGRC3.js.map +0 -1
  351. package/dist/chunk-7L7OPISJ.cjs.map +0 -1
  352. package/dist/chunk-AESFOMSH.js.map +0 -1
  353. package/dist/chunk-BOOJDRJO.js.map +0 -1
  354. package/dist/chunk-BOW7ZGI2.cjs.map +0 -1
  355. package/dist/chunk-D2GID3YK.js.map +0 -1
  356. package/dist/chunk-DG7KE4YJ.cjs.map +0 -1
  357. package/dist/chunk-EKRT7K2K.js.map +0 -1
  358. package/dist/chunk-EPQPUFS6.cjs.map +0 -1
  359. package/dist/chunk-FDUA6OGN.js.map +0 -1
  360. package/dist/chunk-FDV7EQWH.js.map +0 -1
  361. package/dist/chunk-FF235PKY.cjs.map +0 -1
  362. package/dist/chunk-H7QSGFMZ.cjs.map +0 -1
  363. package/dist/chunk-HK3AMH3Q.cjs.map +0 -1
  364. package/dist/chunk-IILJGFI5.js.map +0 -1
  365. package/dist/chunk-IYXCFIMP.js.map +0 -1
  366. package/dist/chunk-JHZW3Y62.js.map +0 -1
  367. package/dist/chunk-L6D4CKLV.cjs.map +0 -1
  368. package/dist/chunk-LZU7YBXG.js.map +0 -1
  369. package/dist/chunk-MYFZYUPR.cjs.map +0 -1
  370. package/dist/chunk-N3Y43KOB.js.map +0 -1
  371. package/dist/chunk-P2VTQ5AR.cjs.map +0 -1
  372. package/dist/chunk-RDGRKYQ5.cjs.map +0 -1
  373. package/dist/chunk-RYQ3S3KO.cjs.map +0 -1
  374. package/dist/chunk-SEPYBAML.js.map +0 -1
  375. package/dist/chunk-SK7H3Z67.cjs.map +0 -1
  376. package/dist/chunk-SPWVKDGC.cjs.map +0 -1
  377. package/dist/chunk-U5TTXN45.cjs.map +0 -1
  378. package/dist/chunk-XMCIXHGH.js.map +0 -1
  379. package/dist/chunk-XWYKLEKG.js.map +0 -1
  380. package/dist/chunk-Y6YSJPVC.js.map +0 -1
@@ -1,25 +1,25 @@
1
1
  import { TextRenderContext } from '../../chunk-I6CY5C6A.js';
2
2
  export { TextRenderContext, useTextRenderContext } from '../../chunk-I6CY5C6A.js';
3
- import { ChatBubble, MCPToolCallDisplay, AITypingIndicator, SparklesIcon, CloseIcon } from '../../chunk-RZJXCI53.js';
4
- import { MessageComposer } from '../../chunk-EKRT7K2K.js';
5
- import { Dropdown, DropdownItem } from '../../chunk-LZU7YBXG.js';
3
+ import { ChatBubble, MCPToolCallDisplay, AITypingIndicator, SparklesIcon, CloseIcon } from '../../chunk-22CYDCXA.js';
4
+ import { MessageComposer } from '../../chunk-O6GJ4IYS.js';
5
+ import { Dropdown, DropdownSubmenu, DropdownItem } from '../../chunk-KU3XRHWA.js';
6
+ import { Avatar } from '../../chunk-HZ4MBUC3.js';
6
7
  import '../../chunk-IQ4KQJAO.js';
7
- import '../../chunk-XO3WLK65.js';
8
- import { Avatar } from '../../chunk-DCBMTFLE.js';
8
+ import '../../chunk-VVDE4CHU.js';
9
9
  import '../../chunk-6NZXWKUE.js';
10
10
  import '../../chunk-3IMM2PM4.js';
11
11
  import { Badge } from '../../chunk-BMSG4NBH.js';
12
+ import { cn } from '../../chunk-TQONQSJO.js';
12
13
  import '../../chunk-T4ME7QCT.js';
13
14
  import '../../chunk-62ZOA6PX.js';
14
- import '../../chunk-BOOJDRJO.js';
15
- import { cn } from '../../chunk-TQONQSJO.js';
16
- import * as React4 from 'react';
15
+ import '../../chunk-WSNMQQ4P.js';
16
+ import * as React2 from 'react';
17
17
  import Markdown, { defaultUrlTransform } from 'react-markdown';
18
18
  import remarkGfm from 'remark-gfm';
19
19
  import rehypeSanitize, { defaultSchema } from 'rehype-sanitize';
20
20
  import { jsx, jsxs, Fragment } from 'react/jsx-runtime';
21
21
  import { cva } from 'class-variance-authority';
22
- import { Pencil, Check, Clipboard } from 'lucide-react';
22
+ import { Ellipsis, Check, Clipboard, Pencil } from 'lucide-react';
23
23
  import { useVirtualizer } from '@tanstack/react-virtual';
24
24
 
25
25
  function remarkPreserveLineBreaks() {
@@ -152,7 +152,7 @@ function baseComponents() {
152
152
  {
153
153
  ...props,
154
154
  className: cn(
155
- "w-full border-collapse text-sm [&_td]:border [&_td]:border-neutral-200 [&_td]:px-2 [&_td]:py-1 dark:[&_td]:border-neutral-700 [&_th]:border [&_th]:border-neutral-200 [&_th]:px-2 [&_th]:py-1 [&_th]:text-left dark:[&_th]:border-neutral-700",
155
+ "w-full border-collapse text-sm [&_td]:border [&_td]:border-neutral-200 [&_td]:px-2 [&_td]:py-1 dark:[&_td]:border-neutral-700 [&_th]:border [&_th]:border-neutral-200 [&_th]:px-2 [&_th]:py-1 [&_th]:text-start dark:[&_th]:border-neutral-700",
156
156
  props.className
157
157
  )
158
158
  }
@@ -266,7 +266,7 @@ var transformUrl = (url, key, node) => {
266
266
  }
267
267
  return defaultUrlTransform(url);
268
268
  };
269
- var MarkdownContent = React4.memo(function MarkdownContent2({
269
+ var MarkdownContent = React2.memo(function MarkdownContent2({
270
270
  text,
271
271
  messageId,
272
272
  streaming,
@@ -461,13 +461,19 @@ function filesToComposerAttachments(files) {
461
461
  )
462
462
  );
463
463
  }
464
- function CopyMenu({ isSelf, markdown, getHtml, getText }) {
465
- const [open, setOpen] = React4.useState(false);
466
- const [copied, setCopied] = React4.useState(false);
467
- const copiedTimer = React4.useRef(
464
+ var actionRevealClass = "opacity-0 transition-opacity group-focus-within:opacity-100 group-hover:opacity-100 focus-visible:opacity-100 [@media(pointer:coarse)]:opacity-100";
465
+ var actionButtonClass = "rounded p-1 text-neutral-400 hover:text-neutral-600 dark:hover:text-neutral-200";
466
+ function useMessageCopy({
467
+ markdown,
468
+ getHtml,
469
+ getText,
470
+ defaultFormat
471
+ }) {
472
+ const [copied, setCopied] = React2.useState(false);
473
+ const copiedTimer = React2.useRef(
468
474
  void 0
469
475
  );
470
- React4.useEffect(() => () => window.clearTimeout(copiedTimer.current), []);
476
+ React2.useEffect(() => () => window.clearTimeout(copiedTimer.current), []);
471
477
  const flash = () => {
472
478
  setCopied(true);
473
479
  window.clearTimeout(copiedTimer.current);
@@ -498,20 +504,110 @@ function CopyMenu({ isSelf, markdown, getHtml, getText }) {
498
504
  }
499
505
  };
500
506
  const run = (fn) => {
501
- setOpen(false);
502
507
  void fn().then(flash, () => {
503
508
  });
504
509
  };
510
+ const copyRich = () => run(writeBoth);
511
+ const copyMarkdown = () => run(() => writeText(markdown || getText()));
512
+ const copyPlain = () => run(() => writeText(getText()));
513
+ const copyDefault = defaultFormat === "markdown" ? copyMarkdown : defaultFormat === "plain" ? copyPlain : copyRich;
514
+ return { copied, copyDefault, copyRich, copyMarkdown, copyPlain };
515
+ }
516
+ function ActionMenuItem({
517
+ item,
518
+ onSelect
519
+ }) {
520
+ return /* @__PURE__ */ jsx(DropdownItem, { onClick: () => onSelect(item.onSelect), children: item.description ? /* @__PURE__ */ jsxs("span", { className: "flex flex-col items-start", children: [
521
+ /* @__PURE__ */ jsx("span", { children: item.label }),
522
+ /* @__PURE__ */ jsx("span", { className: "text-[10px] font-normal text-neutral-400", children: item.description })
523
+ ] }) : item.label });
524
+ }
525
+ function FooterActionButton({
526
+ action,
527
+ isSelf
528
+ }) {
529
+ const [open, setOpen] = React2.useState(false);
530
+ const onClickCapture = action.submenu ? (e) => {
531
+ if (e.metaKey || e.ctrlKey) {
532
+ e.preventDefault();
533
+ e.stopPropagation();
534
+ action.onSelect();
535
+ }
536
+ } : void 0;
537
+ const button = /* @__PURE__ */ jsx(
538
+ "button",
539
+ {
540
+ type: "button",
541
+ "data-slot": `superchat-action-${action.id}`,
542
+ "aria-label": action.label,
543
+ title: action.title ?? action.label,
544
+ onClick: action.submenu ? void 0 : action.onSelect,
545
+ onClickCapture,
546
+ className: actionButtonClass,
547
+ children: action.icon
548
+ }
549
+ );
550
+ if (!action.submenu) return button;
551
+ return /* @__PURE__ */ jsx(
552
+ Dropdown,
553
+ {
554
+ open,
555
+ onOpenChange: setOpen,
556
+ placement: isSelf ? "top-end" : "top-start",
557
+ trigger: button,
558
+ children: action.submenu.items.map((item) => /* @__PURE__ */ jsx(
559
+ ActionMenuItem,
560
+ {
561
+ item,
562
+ onSelect: (fn) => {
563
+ setOpen(false);
564
+ fn();
565
+ }
566
+ },
567
+ item.id
568
+ ))
569
+ }
570
+ );
571
+ }
572
+ var MessageActionsBar = React2.forwardRef(function MessageActionsBar2({ actions, isSelf }, ref) {
505
573
  return /* @__PURE__ */ jsx(
506
574
  "div",
507
575
  {
576
+ ref,
577
+ "data-slot": "superchat-message-actions",
508
578
  className: cn(
509
- "sticky bottom-2 shrink-0 self-end",
579
+ "flex items-center gap-0.5",
580
+ isSelf && "justify-end",
581
+ actionRevealClass
582
+ ),
583
+ children: actions.map((action) => /* @__PURE__ */ jsx(FooterActionButton, { action, isSelf }, action.id))
584
+ }
585
+ );
586
+ });
587
+ function MessageOverflowMenu({
588
+ isSelf,
589
+ actions,
590
+ footerVisible
591
+ }) {
592
+ const [open, setOpen] = React2.useState(false);
593
+ const select = (fn) => {
594
+ setOpen(false);
595
+ fn();
596
+ };
597
+ return /* @__PURE__ */ jsx(
598
+ "div",
599
+ {
600
+ className: cn(
601
+ "sticky bottom-2 shrink-0 self-end transition-opacity",
510
602
  // Rich content (e.g. NITRO tables) layers internals up to z-50, so the
511
603
  // open menu's stacking context must clear that.
512
- open ? "z-[60]" : "z-10"
604
+ open ? "z-[60]" : "z-10",
605
+ // Hand off to the footer bar when it's visible. `invisible` (not
606
+ // just opacity) drops the hidden button from the tab order so
607
+ // keyboard users can't focus an unseen control.
608
+ footerVisible && !open && "pointer-events-none invisible opacity-0"
513
609
  ),
514
- children: /* @__PURE__ */ jsxs(
610
+ children: /* @__PURE__ */ jsx(
515
611
  Dropdown,
516
612
  {
517
613
  open,
@@ -521,32 +617,32 @@ function CopyMenu({ isSelf, markdown, getHtml, getText }) {
521
617
  "button",
522
618
  {
523
619
  type: "button",
524
- "data-slot": "superchat-copy-button",
525
- "aria-label": "Copy message",
526
- className: "rounded p-1 text-neutral-400 opacity-0 transition-opacity group-focus-within:opacity-100 group-hover:opacity-100 hover:text-neutral-600 focus-visible:opacity-100 dark:hover:text-neutral-200",
527
- children: copied ? /* @__PURE__ */ jsx(Check, { size: 14, "aria-hidden": "true" }) : /* @__PURE__ */ jsx(Clipboard, { size: 14, "aria-hidden": "true" })
620
+ "data-slot": "superchat-overflow-button",
621
+ "aria-label": "Message actions",
622
+ className: cn(actionButtonClass, actionRevealClass),
623
+ children: /* @__PURE__ */ jsx(Ellipsis, { size: 14, "aria-hidden": "true" })
528
624
  }
529
625
  ),
530
- children: [
531
- /* @__PURE__ */ jsx(DropdownItem, { onClick: () => run(writeBoth), children: /* @__PURE__ */ jsxs("span", { className: "flex flex-col items-start", children: [
532
- /* @__PURE__ */ jsx("span", { children: "Copy" }),
533
- /* @__PURE__ */ jsx("span", { className: "text-[10px] font-normal text-neutral-400", children: "Rich text + Markdown" })
534
- ] }) }),
535
- /* @__PURE__ */ jsx(
626
+ children: actions.map(
627
+ (action) => action.submenu ? (
628
+ // Actions with variants collapse to just their submenu — a
629
+ // top-level default item would duplicate the flyout's options.
630
+ /* @__PURE__ */ jsx(DropdownSubmenu, { label: action.submenu.label, children: action.submenu.items.map((item) => /* @__PURE__ */ jsx(ActionMenuItem, { item, onSelect: select }, item.id)) }, action.id)
631
+ ) : /* @__PURE__ */ jsx(
536
632
  DropdownItem,
537
633
  {
538
- onClick: () => run(() => writeText(markdown || getText())),
539
- children: "Copy as Markdown"
540
- }
541
- ),
542
- /* @__PURE__ */ jsx(DropdownItem, { onClick: () => run(() => writeText(getText())), children: "Copy as plain text" })
543
- ]
634
+ onClick: () => select(action.onSelect),
635
+ children: action.label
636
+ },
637
+ action.id
638
+ )
639
+ )
544
640
  }
545
641
  )
546
642
  }
547
643
  );
548
644
  }
549
- var MessageRow = React4.memo(function MessageRow2({
645
+ var MessageRow = React2.memo(function MessageRow2({
550
646
  message,
551
647
  participant,
552
648
  isSelf,
@@ -554,21 +650,22 @@ var MessageRow = React4.memo(function MessageRow2({
554
650
  linkBuilder,
555
651
  onReferenceClick,
556
652
  editable,
557
- onMessageEdited
653
+ onMessageEdited,
654
+ defaultCopyFormat = "rich"
558
655
  }) {
559
656
  const streaming = message.status === "streaming";
560
657
  const hasBody = !!message.text || (message.content?.length ?? 0) > 0;
561
- const [isEditing, setIsEditing] = React4.useState(false);
562
- const [draft, setDraft] = React4.useState(message.text ?? "");
563
- const editRef = React4.useRef(null);
564
- const bubbleRef = React4.useRef(null);
565
- const autosize = React4.useCallback(() => {
658
+ const [isEditing, setIsEditing] = React2.useState(false);
659
+ const [draft, setDraft] = React2.useState(message.text ?? "");
660
+ const editRef = React2.useRef(null);
661
+ const bubbleRef = React2.useRef(null);
662
+ const autosize = React2.useCallback(() => {
566
663
  const el = editRef.current;
567
664
  if (!el) return;
568
665
  el.style.height = "auto";
569
666
  el.style.height = `${el.scrollHeight}px`;
570
667
  }, []);
571
- React4.useEffect(() => {
668
+ React2.useEffect(() => {
572
669
  if (!isEditing) return;
573
670
  const el = editRef.current;
574
671
  if (!el) return;
@@ -576,6 +673,37 @@ var MessageRow = React4.memo(function MessageRow2({
576
673
  el.setSelectionRange(el.value.length, el.value.length);
577
674
  autosize();
578
675
  }, [isEditing, autosize]);
676
+ const canEdit = !!editable && isSelf && !streaming && typeof message.text === "string" && !message.content?.length;
677
+ const markdownSource = typeof message.text === "string" && message.text ? message.text : message.content?.map((block) => {
678
+ if (block.type === "code" && block.text) {
679
+ return `\`\`\`${block.language ?? ""}
680
+ ${block.text}
681
+ \`\`\``;
682
+ }
683
+ if ((block.type === "text" || block.type === "thinking") && block.text) {
684
+ return block.text;
685
+ }
686
+ return "";
687
+ }).filter(Boolean).join("\n\n") ?? "";
688
+ const canCopy = !isEditing && (!!message.content?.length || typeof message.text === "string" && message.text.length > 0);
689
+ const hasActions = canCopy || canEdit && !isEditing;
690
+ const copy = useMessageCopy({
691
+ markdown: markdownSource,
692
+ getHtml: () => bubbleRef.current?.innerHTML ?? "",
693
+ getText: () => bubbleRef.current?.textContent ?? "",
694
+ defaultFormat: defaultCopyFormat
695
+ });
696
+ const actionsBarRef = React2.useRef(null);
697
+ const [footerVisible, setFooterVisible] = React2.useState(true);
698
+ React2.useEffect(() => {
699
+ const el = actionsBarRef.current;
700
+ if (!el || typeof globalThis.IntersectionObserver === "undefined") return;
701
+ const observer = new globalThis.IntersectionObserver(([entry]) => {
702
+ setFooterVisible(entry?.isIntersecting ?? false);
703
+ });
704
+ observer.observe(el);
705
+ return () => observer.disconnect();
706
+ }, [hasActions]);
579
707
  if (message.type === "system") {
580
708
  return /* @__PURE__ */ jsx(
581
709
  "div",
@@ -607,7 +735,6 @@ var MessageRow = React4.memo(function MessageRow2({
607
735
  const accent = participant?.color;
608
736
  const accentTextColor = accessibleAccentTextColor(accent);
609
737
  const authorName = participant?.name ?? "Unknown";
610
- const canEdit = !!editable && isSelf && !streaming && typeof message.text === "string" && !message.content?.length;
611
738
  const startEdit = () => {
612
739
  setDraft(message.text ?? "");
613
740
  setIsEditing(true);
@@ -651,18 +778,46 @@ var MessageRow = React4.memo(function MessageRow2({
651
778
  requestAnimationFrame(autosize);
652
779
  });
653
780
  };
654
- const markdownSource = typeof message.text === "string" && message.text ? message.text : message.content?.map((block) => {
655
- if (block.type === "code" && block.text) {
656
- return `\`\`\`${block.language ?? ""}
657
- ${block.text}
658
- \`\`\``;
659
- }
660
- if ((block.type === "text" || block.type === "thinking") && block.text) {
661
- return block.text;
662
- }
663
- return "";
664
- }).filter(Boolean).join("\n\n") ?? "";
665
- const canCopy = !isEditing && (!!message.content?.length || typeof message.text === "string" && message.text.length > 0);
781
+ const actions = [
782
+ ...canCopy ? [
783
+ {
784
+ id: "copy",
785
+ label: "Copy message",
786
+ title: "Copy message (\u2318/Ctrl-click: default format)",
787
+ icon: copy.copied ? /* @__PURE__ */ jsx(Check, { size: 14, "aria-hidden": "true" }) : /* @__PURE__ */ jsx(Clipboard, { size: 14, "aria-hidden": "true" }),
788
+ onSelect: copy.copyDefault,
789
+ submenu: {
790
+ label: "Copy as",
791
+ items: [
792
+ {
793
+ id: "copy-rich",
794
+ label: "Copy as rich text",
795
+ description: "Rich text + Markdown",
796
+ onSelect: copy.copyRich
797
+ },
798
+ {
799
+ id: "copy-markdown",
800
+ label: "Copy as Markdown",
801
+ onSelect: copy.copyMarkdown
802
+ },
803
+ {
804
+ id: "copy-plain",
805
+ label: "Copy as plain text",
806
+ onSelect: copy.copyPlain
807
+ }
808
+ ]
809
+ }
810
+ }
811
+ ] : [],
812
+ ...canEdit && !isEditing ? [
813
+ {
814
+ id: "edit",
815
+ label: "Edit message",
816
+ icon: /* @__PURE__ */ jsx(Pencil, { size: 14, "aria-hidden": "true" }),
817
+ onSelect: startEdit
818
+ }
819
+ ] : []
820
+ ];
666
821
  return /* @__PURE__ */ jsxs(
667
822
  "div",
668
823
  {
@@ -700,17 +855,6 @@ ${block.text}
700
855
  title: `Edited ${formatTime(message.editedAt)}`,
701
856
  children: "(edited)"
702
857
  }
703
- ),
704
- canEdit && !isEditing && /* @__PURE__ */ jsx(
705
- "button",
706
- {
707
- type: "button",
708
- "data-slot": "superchat-edit-button",
709
- onClick: startEdit,
710
- "aria-label": "Edit message",
711
- className: "rounded p-0.5 text-neutral-400 opacity-0 transition-opacity group-focus-within:opacity-100 group-hover:opacity-100 hover:text-neutral-600 focus-visible:opacity-100 dark:hover:text-neutral-200",
712
- children: /* @__PURE__ */ jsx(Pencil, { size: 14, "aria-hidden": "true" })
713
- }
714
858
  )
715
859
  ]
716
860
  }
@@ -723,13 +867,12 @@ ${block.text}
723
867
  isSelf ? "flex-row-reverse" : "flex-row"
724
868
  ),
725
869
  children: [
726
- canCopy && /* @__PURE__ */ jsx(
727
- CopyMenu,
870
+ hasActions && /* @__PURE__ */ jsx(
871
+ MessageOverflowMenu,
728
872
  {
729
873
  isSelf,
730
- markdown: markdownSource,
731
- getHtml: () => bubbleRef.current?.innerHTML ?? "",
732
- getText: () => bubbleRef.current?.textContent ?? ""
874
+ actions,
875
+ footerVisible
733
876
  }
734
877
  ),
735
878
  /* @__PURE__ */ jsx(
@@ -842,6 +985,14 @@ ${block.text}
842
985
  )
843
986
  ]
844
987
  }
988
+ ),
989
+ hasActions && /* @__PURE__ */ jsx(
990
+ MessageActionsBar,
991
+ {
992
+ ref: actionsBarRef,
993
+ actions,
994
+ isSelf
995
+ }
845
996
  )
846
997
  ] })
847
998
  ]
@@ -849,7 +1000,7 @@ ${block.text}
849
1000
  );
850
1001
  });
851
1002
  var sidebarItem = cva(
852
- "flex w-full items-center gap-2 rounded-lg px-3 py-2 text-left text-sm transition-colors",
1003
+ "flex w-full items-center gap-2 rounded-lg px-3 py-2 text-start text-sm transition-colors",
853
1004
  {
854
1005
  variants: {
855
1006
  active: {
@@ -869,11 +1020,12 @@ function VirtualThread({
869
1020
  onReferenceClick,
870
1021
  editable,
871
1022
  onMessageEdited,
1023
+ defaultCopyFormat,
872
1024
  order,
873
1025
  conversationId,
874
1026
  containerProps
875
1027
  }) {
876
- const parentRef = React4.useRef(null);
1028
+ const parentRef = React2.useRef(null);
877
1029
  const virtualizer = useVirtualizer({
878
1030
  count: items.length,
879
1031
  getScrollElement: () => parentRef.current,
@@ -883,7 +1035,7 @@ function VirtualThread({
883
1035
  getItemKey: (index) => items[index]?.id ?? index
884
1036
  });
885
1037
  const count = items.length;
886
- React4.useEffect(() => {
1038
+ React2.useEffect(() => {
887
1039
  if (count === 0) return;
888
1040
  if (order === "desc") {
889
1041
  virtualizer.scrollToIndex(0, { align: "start" });
@@ -925,7 +1077,8 @@ function VirtualThread({
925
1077
  linkBuilder,
926
1078
  onReferenceClick,
927
1079
  editable,
928
- onMessageEdited
1080
+ onMessageEdited,
1081
+ defaultCopyFormat
929
1082
  }
930
1083
  ) })
931
1084
  },
@@ -946,6 +1099,7 @@ function SuperChat({
946
1099
  order = "asc",
947
1100
  virtualized = false,
948
1101
  linkBuilder,
1102
+ defaultCopyFormat,
949
1103
  className,
950
1104
  onMessageSent,
951
1105
  onMessageEdited,
@@ -953,35 +1107,35 @@ function SuperChat({
953
1107
  onReferenceClick,
954
1108
  onBack
955
1109
  }) {
956
- const headingId = React4.useId();
957
- const renderText = React4.useMemo(
1110
+ const headingId = React2.useId();
1111
+ const renderText = React2.useMemo(
958
1112
  () => renderTextContent ?? createMarkdownRenderer({
959
1113
  plugins: renderPlugins,
960
1114
  trusted: trustedContent
961
1115
  }),
962
1116
  [renderTextContent, renderPlugins, trustedContent]
963
1117
  );
964
- const threadRef = React4.useRef(null);
965
- React4.useEffect(() => {
1118
+ const threadRef = React2.useRef(null);
1119
+ React2.useEffect(() => {
966
1120
  if (virtualized) return;
967
1121
  const el = threadRef.current;
968
1122
  if (!el) return;
969
1123
  el.scrollTop = order === "desc" ? 0 : el.scrollHeight;
970
1124
  }, [conversation.thread.length, conversation.id, order, virtualized]);
971
- const participantById = React4.useMemo(() => {
1125
+ const participantById = React2.useMemo(() => {
972
1126
  const map = /* @__PURE__ */ new Map();
973
1127
  conversation.participants.forEach((p) => map.set(p.id, p));
974
1128
  return map;
975
1129
  }, [conversation]);
976
- const orderedThread = React4.useMemo(() => {
1130
+ const orderedThread = React2.useMemo(() => {
977
1131
  const sorted = [...conversation.thread].sort(byTime);
978
1132
  return order === "desc" ? sorted.reverse() : sorted;
979
1133
  }, [conversation, order]);
980
- const onMessageEditedRef = React4.useRef(onMessageEdited);
1134
+ const onMessageEditedRef = React2.useRef(onMessageEdited);
981
1135
  onMessageEditedRef.current = onMessageEdited;
982
- const conversationRef = React4.useRef(conversation);
1136
+ const conversationRef = React2.useRef(conversation);
983
1137
  conversationRef.current = conversation;
984
- const handleMessageEdited = React4.useCallback(
1138
+ const handleMessageEdited = React2.useCallback(
985
1139
  (messageId, text) => {
986
1140
  onMessageEditedRef.current?.(messageId, text, {
987
1141
  conversation: conversationRef.current
@@ -990,7 +1144,7 @@ function SuperChat({
990
1144
  []
991
1145
  );
992
1146
  const editable = !readOnly && !!onMessageEdited;
993
- const mentionOptions = React4.useMemo(
1147
+ const mentionOptions = React2.useMemo(
994
1148
  () => conversation.participants.filter((p) => p.kind !== "system").map((p) => ({
995
1149
  id: p.id,
996
1150
  label: p.name,
@@ -1000,11 +1154,11 @@ function SuperChat({
1000
1154
  })),
1001
1155
  [conversation.participants]
1002
1156
  );
1003
- const composerAccept = React4.useMemo(
1157
+ const composerAccept = React2.useMemo(
1004
1158
  () => acceptTokensFor(acceptedFileTypes),
1005
1159
  [acceptedFileTypes]
1006
1160
  );
1007
- const handleComposerSend = React4.useCallback(
1161
+ const handleComposerSend = React2.useCallback(
1008
1162
  async (message) => {
1009
1163
  const text = message.content;
1010
1164
  const mentions = detectMentions(text, conversation.participants);
@@ -1039,7 +1193,7 @@ function SuperChat({
1039
1193
  type: "button",
1040
1194
  onClick: onBack,
1041
1195
  "aria-label": "Back to conversations",
1042
- className: "-ml-1 shrink-0 rounded-md p-1 text-neutral-500 hover:bg-neutral-100 sm:hidden dark:text-neutral-300 dark:hover:bg-neutral-800",
1196
+ className: "-ms-1 shrink-0 rounded-md p-1 text-neutral-500 hover:bg-neutral-100 sm:hidden dark:text-neutral-300 dark:hover:bg-neutral-800",
1043
1197
  children: /* @__PURE__ */ jsx(
1044
1198
  "svg",
1045
1199
  {
@@ -1102,6 +1256,7 @@ function SuperChat({
1102
1256
  onReferenceClick,
1103
1257
  editable,
1104
1258
  onMessageEdited: handleMessageEdited,
1259
+ defaultCopyFormat,
1105
1260
  order,
1106
1261
  conversationId: conversation.id,
1107
1262
  containerProps: {
@@ -1134,7 +1289,8 @@ function SuperChat({
1134
1289
  linkBuilder,
1135
1290
  onReferenceClick,
1136
1291
  editable,
1137
- onMessageEdited: handleMessageEdited
1292
+ onMessageEdited: handleMessageEdited,
1293
+ defaultCopyFormat
1138
1294
  },
1139
1295
  m.id
1140
1296
  ))
@@ -1165,12 +1321,12 @@ function SuperChatConversations({
1165
1321
  onConversationOpened,
1166
1322
  onNewConversation
1167
1323
  }) {
1168
- const [internalActive, setInternalActive] = React4.useState(
1324
+ const [internalActive, setInternalActive] = React2.useState(
1169
1325
  defaultActiveConversationId ?? conversations[0]?.id
1170
1326
  );
1171
1327
  const requestedId = activeConversationId ?? internalActive;
1172
1328
  const activeId = conversations.some((c) => c.id === requestedId) ? requestedId : conversations[0]?.id;
1173
- const sortedConversations = React4.useMemo(
1329
+ const sortedConversations = React2.useMemo(
1174
1330
  () => [...conversations].sort((a, b) => lastActivityOf(b) - lastActivityOf(a)),
1175
1331
  [conversations]
1176
1332
  );
@@ -1184,7 +1340,7 @@ function SuperChatConversations({
1184
1340
  "data-slot": "superchat-conversations",
1185
1341
  "aria-label": "Conversations",
1186
1342
  className: cn(
1187
- "flex w-64 shrink-0 flex-col border-r border-neutral-200 dark:border-neutral-700",
1343
+ "flex w-64 shrink-0 flex-col border-e border-neutral-200 dark:border-neutral-700",
1188
1344
  className
1189
1345
  ),
1190
1346
  children: [
@@ -1222,7 +1378,7 @@ function SuperChatConversations({
1222
1378
  /* @__PURE__ */ jsx("span", { className: "block truncate font-medium", children: c.title }),
1223
1379
  last?.text && /* @__PURE__ */ jsx("span", { className: "block truncate text-xs text-neutral-600 dark:text-neutral-400", children: last.text })
1224
1380
  ] }),
1225
- !!c.unread && /* @__PURE__ */ jsxs("span", { className: "bg-primary-600 ml-1 inline-flex h-5 min-w-5 items-center justify-center rounded-full px-1.5 text-[10px] font-semibold text-white", children: [
1381
+ !!c.unread && /* @__PURE__ */ jsxs("span", { className: "bg-primary-600 ms-1 inline-flex h-5 min-w-5 items-center justify-center rounded-full px-1.5 text-[10px] font-semibold text-white", children: [
1226
1382
  c.unread,
1227
1383
  /* @__PURE__ */ jsx("span", { className: "sr-only", children: " unread messages" })
1228
1384
  ] })
@@ -1250,6 +1406,7 @@ function SuperChatInbox({
1250
1406
  virtualized,
1251
1407
  showSidebar = true,
1252
1408
  linkBuilder,
1409
+ defaultCopyFormat,
1253
1410
  className,
1254
1411
  onMessageSent,
1255
1412
  onMessageEdited,
@@ -1258,13 +1415,13 @@ function SuperChatInbox({
1258
1415
  onNewConversation,
1259
1416
  onReferenceClick
1260
1417
  }) {
1261
- const [internalActive, setInternalActive] = React4.useState(
1418
+ const [internalActive, setInternalActive] = React2.useState(
1262
1419
  defaultActiveConversationId ?? conversations[0]?.id
1263
1420
  );
1264
1421
  const requestedId = activeConversationId ?? internalActive;
1265
1422
  const active = conversations.find((c) => c.id === requestedId) ?? conversations[0];
1266
1423
  const activeId = active?.id;
1267
- const [mobileView, setMobileView] = React4.useState("list");
1424
+ const [mobileView, setMobileView] = React2.useState("list");
1268
1425
  const handleOpen = (c) => {
1269
1426
  if (activeConversationId === void 0) setInternalActive(c.id);
1270
1427
  setMobileView("chat");
@@ -1307,6 +1464,7 @@ function SuperChatInbox({
1307
1464
  order,
1308
1465
  virtualized,
1309
1466
  linkBuilder,
1467
+ defaultCopyFormat,
1310
1468
  onMessageSent,
1311
1469
  onMessageEdited,
1312
1470
  onConversationClosed,