@mieweb/ui 0.10.0-dev.2 → 0.10.0-dev.21

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 (399) hide show
  1. package/agent/mieweb-ui.instructions.md +13 -1
  2. package/dist/CsvBlock-FX5YNGNE.cjs +17 -0
  3. package/dist/{CsvBlock-ROJCKJDP.cjs.map → CsvBlock-FX5YNGNE.cjs.map} +1 -1
  4. package/dist/CsvBlock-VLMG7GUO.js +8 -0
  5. package/dist/{CsvBlock-UWPMTLE2.js.map → CsvBlock-VLMG7GUO.js.map} +1 -1
  6. package/dist/HtmlPreviewBlock-5JE7L3GR.js +8 -0
  7. package/dist/{HtmlPreviewBlock-ME5U3XNS.js.map → HtmlPreviewBlock-5JE7L3GR.js.map} +1 -1
  8. package/dist/HtmlPreviewBlock-UO37JQ3K.cjs +17 -0
  9. package/dist/{HtmlPreviewBlock-DWFN6EUB.cjs.map → HtmlPreviewBlock-UO37JQ3K.cjs.map} +1 -1
  10. package/dist/Input-yN516s5_.d.cts +3 -0
  11. package/dist/Input-yN516s5_.d.ts +3 -0
  12. package/dist/MermaidBlock-3XHFBAMV.js +8 -0
  13. package/dist/{MermaidBlock-2B6CPD6Y.js.map → MermaidBlock-3XHFBAMV.js.map} +1 -1
  14. package/dist/MermaidBlock-RZ75RPZA.cjs +17 -0
  15. package/dist/{MermaidBlock-D2UC5M55.cjs.map → MermaidBlock-RZ75RPZA.cjs.map} +1 -1
  16. package/dist/SurveyBlock-MUVJ3JUI.js +8 -0
  17. package/dist/{SurveyBlock-4DO62RBT.js.map → SurveyBlock-MUVJ3JUI.js.map} +1 -1
  18. package/dist/SurveyBlock-VH47YXZC.cjs +17 -0
  19. package/dist/{SurveyBlock-4CD4AYMJ.cjs.map → SurveyBlock-VH47YXZC.cjs.map} +1 -1
  20. package/dist/ag-grid.d.cts +142 -1
  21. package/dist/ag-grid.d.ts +142 -1
  22. package/dist/{chunk-ACCAXVOG.js → chunk-2ABWFQQH.js} +133 -55
  23. package/dist/chunk-2ABWFQQH.js.map +1 -0
  24. package/dist/{chunk-Y5HFM7LO.js → chunk-2BARVD4C.js} +3 -3
  25. package/dist/{chunk-Y5HFM7LO.js.map → chunk-2BARVD4C.js.map} +1 -1
  26. package/dist/{chunk-G3JX3UAU.cjs → chunk-3KPDQG5O.cjs} +5 -5
  27. package/dist/{chunk-G3JX3UAU.cjs.map → chunk-3KPDQG5O.cjs.map} +1 -1
  28. package/dist/chunk-3YBS4WUQ.js +52 -0
  29. package/dist/chunk-3YBS4WUQ.js.map +1 -0
  30. package/dist/chunk-4HC2IBOX.js +258 -0
  31. package/dist/chunk-4HC2IBOX.js.map +1 -0
  32. package/dist/chunk-4IS3QCOQ.cjs +453 -0
  33. package/dist/chunk-4IS3QCOQ.cjs.map +1 -0
  34. package/dist/chunk-4NCDU5IG.cjs +56 -0
  35. package/dist/chunk-4NCDU5IG.cjs.map +1 -0
  36. package/dist/{chunk-E4IBHYJ7.cjs → chunk-6N6LIAUJ.cjs} +9 -9
  37. package/dist/{chunk-E4IBHYJ7.cjs.map → chunk-6N6LIAUJ.cjs.map} +1 -1
  38. package/dist/chunk-74ENCTIK.js +162 -0
  39. package/dist/chunk-74ENCTIK.js.map +1 -0
  40. package/dist/{chunk-GOALNQZ2.js → chunk-7YO7DNUV.js} +4 -83
  41. package/dist/chunk-7YO7DNUV.js.map +1 -0
  42. package/dist/{chunk-VILW53UZ.js → chunk-BIQ7GSO2.js} +3 -3
  43. package/dist/{chunk-VILW53UZ.js.map → chunk-BIQ7GSO2.js.map} +1 -1
  44. package/dist/chunk-BM35CACB.js +148 -0
  45. package/dist/chunk-BM35CACB.js.map +1 -0
  46. package/dist/{chunk-XI34EGK5.cjs → chunk-CPPUT74P.cjs} +9 -9
  47. package/dist/{chunk-XI34EGK5.cjs.map → chunk-CPPUT74P.cjs.map} +1 -1
  48. package/dist/{chunk-WNM7IZJ7.js → chunk-DSB4DKWG.js} +7 -7
  49. package/dist/{chunk-WNM7IZJ7.js.map → chunk-DSB4DKWG.js.map} +1 -1
  50. package/dist/chunk-DXEPYK3I.cjs +92 -0
  51. package/dist/chunk-DXEPYK3I.cjs.map +1 -0
  52. package/dist/{chunk-JI244Y7C.js → chunk-EK3BCET6.js} +57 -4
  53. package/dist/chunk-EK3BCET6.js.map +1 -0
  54. package/dist/{chunk-5JJ2DAE4.js → chunk-ENMXHZNE.js} +3 -3
  55. package/dist/{chunk-5JJ2DAE4.js.map → chunk-ENMXHZNE.js.map} +1 -1
  56. package/dist/{chunk-XCP454Q6.js → chunk-F4N67NAF.js} +12 -3
  57. package/dist/chunk-F4N67NAF.js.map +1 -0
  58. package/dist/{chunk-VKELAMAZ.js → chunk-FBLVPM2K.js} +3 -3
  59. package/dist/{chunk-VKELAMAZ.js.map → chunk-FBLVPM2K.js.map} +1 -1
  60. package/dist/{chunk-VU6UTJRM.js → chunk-FIKO4WR6.js} +3 -3
  61. package/dist/{chunk-VU6UTJRM.js.map → chunk-FIKO4WR6.js.map} +1 -1
  62. package/dist/{chunk-DEDN5HAG.js → chunk-FZURBQJ2.js} +3 -3
  63. package/dist/{chunk-DEDN5HAG.js.map → chunk-FZURBQJ2.js.map} +1 -1
  64. package/dist/{chunk-ENKFJJZX.js → chunk-G45FBKKV.js} +5 -5
  65. package/dist/{chunk-ENKFJJZX.js.map → chunk-G45FBKKV.js.map} +1 -1
  66. package/dist/{chunk-JHULS3EC.js → chunk-GBUVIGD5.js} +89 -3
  67. package/dist/chunk-GBUVIGD5.js.map +1 -0
  68. package/dist/chunk-GU5OS7JJ.cjs +281 -0
  69. package/dist/chunk-GU5OS7JJ.cjs.map +1 -0
  70. package/dist/{chunk-V7D3YGUV.js → chunk-GVLNXPJX.js} +4 -4
  71. package/dist/{chunk-V7D3YGUV.js.map → chunk-GVLNXPJX.js.map} +1 -1
  72. package/dist/chunk-GVM6DTR5.js +90 -0
  73. package/dist/chunk-GVM6DTR5.js.map +1 -0
  74. package/dist/{chunk-3QEVGSFG.cjs → chunk-GYXUS65N.cjs} +5 -5
  75. package/dist/{chunk-3QEVGSFG.cjs.map → chunk-GYXUS65N.cjs.map} +1 -1
  76. package/dist/{chunk-WGPLUCBD.js → chunk-H2IAMSHK.js} +3 -3
  77. package/dist/{chunk-WGPLUCBD.js.map → chunk-H2IAMSHK.js.map} +1 -1
  78. package/dist/{chunk-7ZXAQTV4.cjs → chunk-HIZWOAWY.cjs} +8 -8
  79. package/dist/{chunk-7ZXAQTV4.cjs.map → chunk-HIZWOAWY.cjs.map} +1 -1
  80. package/dist/{chunk-ELPW32ZI.cjs → chunk-HQ4CGVWX.cjs} +41 -41
  81. package/dist/{chunk-ELPW32ZI.cjs.map → chunk-HQ4CGVWX.cjs.map} +1 -1
  82. package/dist/{chunk-6EN3IQQI.cjs → chunk-I4LXSHKO.cjs} +4 -4
  83. package/dist/{chunk-6EN3IQQI.cjs.map → chunk-I4LXSHKO.cjs.map} +1 -1
  84. package/dist/{chunk-NV2CWBI2.cjs → chunk-IEY3ZJIT.cjs} +12 -3
  85. package/dist/chunk-IEY3ZJIT.cjs.map +1 -0
  86. package/dist/{chunk-2YCERQWC.js → chunk-IH55BEB3.js} +4 -4
  87. package/dist/{chunk-2YCERQWC.js.map → chunk-IH55BEB3.js.map} +1 -1
  88. package/dist/chunk-IT775BYG.js +179 -0
  89. package/dist/chunk-IT775BYG.js.map +1 -0
  90. package/dist/chunk-IYWG72DM.js +166 -0
  91. package/dist/chunk-IYWG72DM.js.map +1 -0
  92. package/dist/{chunk-IX6KFB3K.cjs → chunk-JELTRRR5.cjs} +9 -9
  93. package/dist/{chunk-IX6KFB3K.cjs.map → chunk-JELTRRR5.cjs.map} +1 -1
  94. package/dist/{chunk-FXO5ARBB.cjs → chunk-KDW6BD4O.cjs} +4 -4
  95. package/dist/{chunk-FXO5ARBB.cjs.map → chunk-KDW6BD4O.cjs.map} +1 -1
  96. package/dist/chunk-KHSFJTEX.js +1924 -0
  97. package/dist/chunk-KHSFJTEX.js.map +1 -0
  98. package/dist/{chunk-UV2FVNWT.cjs → chunk-LFPJ3OUM.cjs} +5 -5
  99. package/dist/{chunk-UV2FVNWT.cjs.map → chunk-LFPJ3OUM.cjs.map} +1 -1
  100. package/dist/{chunk-WNAA6CLE.cjs → chunk-LHBWRMNC.cjs} +94 -2
  101. package/dist/chunk-LHBWRMNC.cjs.map +1 -0
  102. package/dist/{chunk-X4XPNTCZ.cjs → chunk-LJZKEMAH.cjs} +135 -57
  103. package/dist/chunk-LJZKEMAH.cjs.map +1 -0
  104. package/dist/{chunk-2QKBTPUC.cjs → chunk-MQPG3KVK.cjs} +8 -8
  105. package/dist/{chunk-2QKBTPUC.cjs.map → chunk-MQPG3KVK.cjs.map} +1 -1
  106. package/dist/{chunk-WIAQQNFU.cjs → chunk-MYHV2ND3.cjs} +37 -3
  107. package/dist/chunk-MYHV2ND3.cjs.map +1 -0
  108. package/dist/{chunk-OE5CKRUC.js → chunk-MZNCLXXU.js} +4 -4
  109. package/dist/{chunk-OE5CKRUC.js.map → chunk-MZNCLXXU.js.map} +1 -1
  110. package/dist/{chunk-XEAT7XJG.cjs → chunk-N2CJJHHB.cjs} +4 -4
  111. package/dist/{chunk-XEAT7XJG.cjs.map → chunk-N2CJJHHB.cjs.map} +1 -1
  112. package/dist/chunk-N7C4OEP7.cjs +356 -0
  113. package/dist/chunk-N7C4OEP7.cjs.map +1 -0
  114. package/dist/chunk-OGNADPM4.cjs +170 -0
  115. package/dist/chunk-OGNADPM4.cjs.map +1 -0
  116. package/dist/{chunk-5GUOOLPR.cjs → chunk-P5CMZZRZ.cjs} +5 -5
  117. package/dist/{chunk-5GUOOLPR.cjs.map → chunk-P5CMZZRZ.cjs.map} +1 -1
  118. package/dist/{chunk-U42F3HLE.cjs → chunk-QNDP6PE5.cjs} +57 -4
  119. package/dist/chunk-QNDP6PE5.cjs.map +1 -0
  120. package/dist/{chunk-H4ZXMQQW.js → chunk-QOVJ6Z6R.js} +3 -3
  121. package/dist/{chunk-H4ZXMQQW.js.map → chunk-QOVJ6Z6R.js.map} +1 -1
  122. package/dist/{chunk-GD7EBGC4.cjs → chunk-R2O72G6Z.cjs} +19 -19
  123. package/dist/{chunk-GD7EBGC4.cjs.map → chunk-R2O72G6Z.cjs.map} +1 -1
  124. package/dist/{chunk-TMMVIUUN.js → chunk-R6KPWIGO.js} +4 -4
  125. package/dist/{chunk-TMMVIUUN.js.map → chunk-R6KPWIGO.js.map} +1 -1
  126. package/dist/{chunk-VPWJCJCX.cjs → chunk-S45EERW3.cjs} +5 -5
  127. package/dist/{chunk-VPWJCJCX.cjs.map → chunk-S45EERW3.cjs.map} +1 -1
  128. package/dist/{chunk-WNZAYBVB.cjs → chunk-SQ2D7AON.cjs} +45 -45
  129. package/dist/{chunk-WNZAYBVB.cjs.map → chunk-SQ2D7AON.cjs.map} +1 -1
  130. package/dist/{chunk-P2CA3XGI.js → chunk-SYRLCTDV.js} +3 -3
  131. package/dist/{chunk-P2CA3XGI.js.map → chunk-SYRLCTDV.js.map} +1 -1
  132. package/dist/{chunk-7ZDPD5ZX.cjs → chunk-T4L7Q5FA.cjs} +7 -7
  133. package/dist/{chunk-7ZDPD5ZX.cjs.map → chunk-T4L7Q5FA.cjs.map} +1 -1
  134. package/dist/{chunk-ZGRCSNPK.js → chunk-TF7YWJHU.js} +3 -3
  135. package/dist/{chunk-ZGRCSNPK.js.map → chunk-TF7YWJHU.js.map} +1 -1
  136. package/dist/{chunk-2IZLKPUW.js → chunk-THLIL6PY.js} +3 -3
  137. package/dist/{chunk-2IZLKPUW.js.map → chunk-THLIL6PY.js.map} +1 -1
  138. package/dist/{chunk-N6IY47YA.cjs → chunk-TTSSUOEV.cjs} +8 -8
  139. package/dist/{chunk-N6IY47YA.cjs.map → chunk-TTSSUOEV.cjs.map} +1 -1
  140. package/dist/{chunk-5MCBWTIF.cjs → chunk-TYE5K5WV.cjs} +4 -4
  141. package/dist/{chunk-5MCBWTIF.cjs.map → chunk-TYE5K5WV.cjs.map} +1 -1
  142. package/dist/{chunk-22CYDCXA.js → chunk-TZJQB4P2.js} +37 -4
  143. package/dist/chunk-TZJQB4P2.js.map +1 -0
  144. package/dist/{chunk-VOKVG3ER.js → chunk-UBSH27C2.js} +4 -4
  145. package/dist/{chunk-VOKVG3ER.js.map → chunk-UBSH27C2.js.map} +1 -1
  146. package/dist/chunk-VINZZQBD.cjs +323 -0
  147. package/dist/chunk-VINZZQBD.cjs.map +1 -0
  148. package/dist/chunk-VPTASZ2O.cjs +171 -0
  149. package/dist/chunk-VPTASZ2O.cjs.map +1 -0
  150. package/dist/{chunk-SGFYA22I.cjs → chunk-VYPPQPSZ.cjs} +7 -7
  151. package/dist/{chunk-SGFYA22I.cjs.map → chunk-VYPPQPSZ.cjs.map} +1 -1
  152. package/dist/chunk-WCDJFMZO.cjs +1967 -0
  153. package/dist/chunk-WCDJFMZO.cjs.map +1 -0
  154. package/dist/{chunk-VNYW4C4J.cjs → chunk-X6A27RGO.cjs} +4 -84
  155. package/dist/chunk-X6A27RGO.cjs.map +1 -0
  156. package/dist/chunk-XBTKZCZF.js +333 -0
  157. package/dist/chunk-XBTKZCZF.js.map +1 -0
  158. package/dist/chunk-XDIMTPZU.cjs +202 -0
  159. package/dist/chunk-XDIMTPZU.cjs.map +1 -0
  160. package/dist/chunk-XVW5DPPP.js +429 -0
  161. package/dist/chunk-XVW5DPPP.js.map +1 -0
  162. package/dist/chunk-Y4E2WRUR.cjs +188 -0
  163. package/dist/chunk-Y4E2WRUR.cjs.map +1 -0
  164. package/dist/chunk-Y4QNLW7W.js +300 -0
  165. package/dist/chunk-Y4QNLW7W.js.map +1 -0
  166. package/dist/{chunk-KZFBQ7GY.js → chunk-YU55JD35.js} +3 -3
  167. package/dist/{chunk-KZFBQ7GY.js.map → chunk-YU55JD35.js.map} +1 -1
  168. package/dist/{chunk-OD47TTAW.cjs → chunk-Z4JR23IB.cjs} +9 -9
  169. package/dist/{chunk-OD47TTAW.cjs.map → chunk-Z4JR23IB.cjs.map} +1 -1
  170. package/dist/{chunk-3M7TAXNR.js → chunk-ZTW4KODY.js} +3 -3
  171. package/dist/{chunk-3M7TAXNR.js.map → chunk-ZTW4KODY.js.map} +1 -1
  172. package/dist/{chunk-3QGS6CXD.js → chunk-ZYL4SNOR.js} +3 -3
  173. package/dist/{chunk-3QGS6CXD.js.map → chunk-ZYL4SNOR.js.map} +1 -1
  174. package/dist/components/Alert/index.d.cts +1 -1
  175. package/dist/components/Alert/index.d.ts +1 -1
  176. package/dist/components/AlertDialog/index.cjs +6 -5
  177. package/dist/components/AlertDialog/index.d.cts +28 -3
  178. package/dist/components/AlertDialog/index.d.ts +28 -3
  179. package/dist/components/AlertDialog/index.js +5 -4
  180. package/dist/components/AudioRecorder/index.d.cts +2 -2
  181. package/dist/components/AudioRecorder/index.d.ts +2 -2
  182. package/dist/components/Autocomplete/index.d.cts +8 -2
  183. package/dist/components/Autocomplete/index.d.ts +8 -2
  184. package/dist/components/Avatar/index.d.cts +1 -1
  185. package/dist/components/Avatar/index.d.ts +1 -1
  186. package/dist/components/Badge/index.d.cts +1 -1
  187. package/dist/components/Badge/index.d.ts +1 -1
  188. package/dist/components/BoardView/index.cjs +24 -0
  189. package/dist/components/BoardView/index.cjs.map +1 -0
  190. package/dist/components/BoardView/index.d.cts +129 -0
  191. package/dist/components/BoardView/index.d.ts +129 -0
  192. package/dist/components/BoardView/index.js +7 -0
  193. package/dist/components/BoardView/index.js.map +1 -0
  194. package/dist/components/Button/index.cjs +4 -3
  195. package/dist/components/Button/index.d.cts +2 -1
  196. package/dist/components/Button/index.d.ts +2 -1
  197. package/dist/components/Button/index.js +2 -1
  198. package/dist/components/CalendarView/index.cjs +23 -0
  199. package/dist/components/CalendarView/index.cjs.map +1 -0
  200. package/dist/components/CalendarView/index.d.cts +39 -0
  201. package/dist/components/CalendarView/index.d.ts +39 -0
  202. package/dist/components/CalendarView/index.js +10 -0
  203. package/dist/components/CalendarView/index.js.map +1 -0
  204. package/dist/components/Card/index.d.cts +3 -3
  205. package/dist/components/Card/index.d.ts +3 -3
  206. package/dist/components/Collapsible/index.cjs +5 -5
  207. package/dist/components/Collapsible/index.js +2 -2
  208. package/dist/components/CustomizableDashboard/index.cjs +10 -9
  209. package/dist/components/CustomizableDashboard/index.js +3 -2
  210. package/dist/components/Dropdown/index.cjs +9 -9
  211. package/dist/components/Dropdown/index.d.cts +2 -1
  212. package/dist/components/Dropdown/index.d.ts +2 -1
  213. package/dist/components/Dropdown/index.js +2 -2
  214. package/dist/components/FloatingWindow/index.cjs +5 -4
  215. package/dist/components/FloatingWindow/index.js +3 -2
  216. package/dist/components/GanttView/index.cjs +20 -0
  217. package/dist/components/GanttView/index.cjs.map +1 -0
  218. package/dist/components/GanttView/index.d.cts +36 -0
  219. package/dist/components/GanttView/index.d.ts +36 -0
  220. package/dist/components/GanttView/index.js +7 -0
  221. package/dist/components/GanttView/index.js.map +1 -0
  222. package/dist/components/KeyboardShortcutsOverlay/index.cjs +5 -5
  223. package/dist/components/KeyboardShortcutsOverlay/index.js +3 -3
  224. package/dist/components/ListView/index.cjs +23 -0
  225. package/dist/components/ListView/index.cjs.map +1 -0
  226. package/dist/components/ListView/index.d.cts +124 -0
  227. package/dist/components/ListView/index.d.ts +124 -0
  228. package/dist/components/ListView/index.js +10 -0
  229. package/dist/components/ListView/index.js.map +1 -0
  230. package/dist/components/Markdown/index.cjs +20 -19
  231. package/dist/components/Markdown/index.js +8 -7
  232. package/dist/components/MediaEditor/index.cjs +11 -10
  233. package/dist/components/MediaEditor/index.d.cts +91 -2
  234. package/dist/components/MediaEditor/index.d.ts +91 -2
  235. package/dist/components/MediaEditor/index.js +6 -5
  236. package/dist/components/MediaPlayer/index.cjs +6 -5
  237. package/dist/components/MediaPlayer/index.d.cts +1 -1
  238. package/dist/components/MediaPlayer/index.d.ts +1 -1
  239. package/dist/components/MediaPlayer/index.js +3 -2
  240. package/dist/components/MegaMenu/index.cjs +6 -5
  241. package/dist/components/MegaMenu/index.js +3 -2
  242. package/dist/components/Modal/index.cjs +10 -10
  243. package/dist/components/Modal/index.js +2 -2
  244. package/dist/components/Pagination/index.d.cts +1 -1
  245. package/dist/components/Pagination/index.d.ts +1 -1
  246. package/dist/components/PhoneInput/index.d.cts +36 -3
  247. package/dist/components/PhoneInput/index.d.ts +36 -3
  248. package/dist/components/Progress/index.d.cts +1 -1
  249. package/dist/components/Progress/index.d.ts +1 -1
  250. package/dist/components/Q/index.d.cts +2 -2
  251. package/dist/components/Q/index.d.ts +2 -2
  252. package/dist/components/QuickAction/index.d.cts +1 -1
  253. package/dist/components/QuickAction/index.d.ts +1 -1
  254. package/dist/components/RadialExplorer/index.cjs +4 -3
  255. package/dist/components/RadialExplorer/index.js +3 -2
  256. package/dist/components/RecordButton/index.d.cts +1 -1
  257. package/dist/components/RecordButton/index.d.ts +1 -1
  258. package/dist/components/RichTextEditor/index.cjs +8 -7
  259. package/dist/components/RichTextEditor/index.d.cts +7 -2
  260. package/dist/components/RichTextEditor/index.d.ts +7 -2
  261. package/dist/components/RichTextEditor/index.js +5 -4
  262. package/dist/components/ScrollArea/index.d.cts +1 -1
  263. package/dist/components/ScrollArea/index.d.ts +1 -1
  264. package/dist/components/SectionSpyNav/index.cjs +4 -3
  265. package/dist/components/SectionSpyNav/index.js +3 -2
  266. package/dist/components/Select/index.d.cts +1 -2
  267. package/dist/components/Select/index.d.ts +1 -2
  268. package/dist/components/Skeleton/index.d.cts +1 -1
  269. package/dist/components/Skeleton/index.d.ts +1 -1
  270. package/dist/components/Slider/index.d.cts +2 -2
  271. package/dist/components/Slider/index.d.ts +2 -2
  272. package/dist/components/Spinner/index.d.cts +2 -2
  273. package/dist/components/Spinner/index.d.ts +2 -2
  274. package/dist/components/SuperChat/index.cjs +478 -281
  275. package/dist/components/SuperChat/index.cjs.map +1 -1
  276. package/dist/components/SuperChat/index.d.cts +2 -4
  277. package/dist/components/SuperChat/index.d.ts +2 -4
  278. package/dist/components/SuperChat/index.js +468 -271
  279. package/dist/components/SuperChat/index.js.map +1 -1
  280. package/dist/components/SuperChat/plugins/index.cjs +5 -5
  281. package/dist/components/SuperChat/plugins/index.d.cts +2 -3
  282. package/dist/components/SuperChat/plugins/index.d.ts +2 -3
  283. package/dist/components/SuperChat/plugins/index.js +4 -4
  284. package/dist/components/Text/index.d.cts +3 -3
  285. package/dist/components/Text/index.d.ts +3 -3
  286. package/dist/components/Textarea/index.d.cts +1 -2
  287. package/dist/components/Textarea/index.d.ts +1 -2
  288. package/dist/components/ThemeProvider/index.d.cts +3 -1
  289. package/dist/components/ThemeProvider/index.d.ts +3 -1
  290. package/dist/components/TranscriptView/index.d.cts +85 -4
  291. package/dist/components/TranscriptView/index.d.ts +85 -4
  292. package/dist/components/ViewSet/index.cjs +24 -0
  293. package/dist/components/ViewSet/index.cjs.map +1 -0
  294. package/dist/components/ViewSet/index.d.cts +300 -0
  295. package/dist/components/ViewSet/index.d.ts +300 -0
  296. package/dist/components/ViewSet/index.js +15 -0
  297. package/dist/components/ViewSet/index.js.map +1 -0
  298. package/dist/components/ViewSwitcher/index.cjs +20 -0
  299. package/dist/components/ViewSwitcher/index.cjs.map +1 -0
  300. package/dist/components/ViewSwitcher/index.d.cts +57 -0
  301. package/dist/components/ViewSwitcher/index.d.ts +57 -0
  302. package/dist/components/ViewSwitcher/index.js +7 -0
  303. package/dist/components/ViewSwitcher/index.js.map +1 -0
  304. package/dist/datavis.cjs +3 -2
  305. package/dist/datavis.cjs.map +1 -1
  306. package/dist/datavis.d.cts +167 -13
  307. package/dist/datavis.d.ts +167 -13
  308. package/dist/datavis.js +2 -1
  309. package/dist/datavis.js.map +1 -1
  310. package/dist/esheet.cjs +9 -8
  311. package/dist/esheet.cjs.map +1 -1
  312. package/dist/esheet.d.cts +183 -1
  313. package/dist/esheet.d.ts +183 -1
  314. package/dist/esheet.js +6 -5
  315. package/dist/esheet.js.map +1 -1
  316. package/dist/hooks/index.cjs +49 -16
  317. package/dist/hooks/index.d.cts +590 -31
  318. package/dist/hooks/index.d.ts +590 -31
  319. package/dist/hooks/index.js +3 -2
  320. package/dist/index.cjs +1375 -1088
  321. package/dist/index.cjs.map +1 -1
  322. package/dist/index.d.cts +8596 -683
  323. package/dist/index.d.ts +8596 -683
  324. package/dist/index.js +433 -340
  325. package/dist/index.js.map +1 -1
  326. package/dist/kerebron.cjs +58 -19
  327. package/dist/kerebron.cjs.map +1 -1
  328. package/dist/kerebron.css +115 -0
  329. package/dist/kerebron.d.cts +37 -0
  330. package/dist/kerebron.d.ts +37 -0
  331. package/dist/kerebron.js +58 -19
  332. package/dist/kerebron.js.map +1 -1
  333. package/dist/motion.cjs +7 -7
  334. package/dist/motion.d.cts +186 -2
  335. package/dist/motion.d.ts +186 -2
  336. package/dist/motion.js +2 -2
  337. package/dist/q.d.cts +25 -3
  338. package/dist/q.d.ts +25 -3
  339. package/dist/{speaker-verify-5GTWAN5Y.cjs → speaker-verify-4NEJAK6C.cjs} +57 -90
  340. package/dist/speaker-verify-4NEJAK6C.cjs.map +1 -0
  341. package/dist/{speaker-verify-R67P433H.js → speaker-verify-AWSKI6DI.js} +57 -90
  342. package/dist/speaker-verify-AWSKI6DI.js.map +1 -0
  343. package/dist/styles/effects.css +33 -0
  344. package/dist/styles.css +1 -1
  345. package/dist/tailwind-preset.cjs +4 -4
  346. package/dist/tailwind-preset.js +1 -1
  347. package/dist/templates.cjs +103 -0
  348. package/dist/templates.cjs.map +1 -0
  349. package/dist/templates.d.cts +560 -0
  350. package/dist/templates.d.ts +560 -0
  351. package/dist/templates.js +10 -0
  352. package/dist/templates.js.map +1 -0
  353. package/dist/types-C3HQe74F.d.cts +86 -0
  354. package/dist/types-C3HQe74F.d.ts +86 -0
  355. package/dist/{types-B97JNRNQ.d.cts → types-DOxdTwmq.d.cts} +170 -2
  356. package/dist/{types-gZXrfLj6.d.ts → types-DOxdTwmq.d.ts} +170 -2
  357. package/dist/utils/index.d.cts +13 -2
  358. package/dist/utils/index.d.ts +13 -2
  359. package/package.json +29 -12
  360. package/dist/Animated-XmH6k8pZ.d.cts +0 -188
  361. package/dist/Animated-XmH6k8pZ.d.ts +0 -188
  362. package/dist/CsvBlock-ROJCKJDP.cjs +0 -16
  363. package/dist/CsvBlock-UWPMTLE2.js +0 -7
  364. package/dist/HtmlPreviewBlock-DWFN6EUB.cjs +0 -16
  365. package/dist/HtmlPreviewBlock-ME5U3XNS.js +0 -7
  366. package/dist/MedicationEditor-Bp4NLy7y.d.cts +0 -352
  367. package/dist/MedicationEditor-Bp4NLy7y.d.ts +0 -352
  368. package/dist/MermaidBlock-2B6CPD6Y.js +0 -7
  369. package/dist/MermaidBlock-D2UC5M55.cjs +0 -16
  370. package/dist/SurveyBlock-4CD4AYMJ.cjs +0 -16
  371. package/dist/SurveyBlock-4DO62RBT.js +0 -7
  372. package/dist/chunk-22CYDCXA.js.map +0 -1
  373. package/dist/chunk-ACCAXVOG.js.map +0 -1
  374. package/dist/chunk-GOALNQZ2.js.map +0 -1
  375. package/dist/chunk-JHULS3EC.js.map +0 -1
  376. package/dist/chunk-JI244Y7C.js.map +0 -1
  377. package/dist/chunk-NV2CWBI2.cjs.map +0 -1
  378. package/dist/chunk-U42F3HLE.cjs.map +0 -1
  379. package/dist/chunk-VNYW4C4J.cjs.map +0 -1
  380. package/dist/chunk-WIAQQNFU.cjs.map +0 -1
  381. package/dist/chunk-WNAA6CLE.cjs.map +0 -1
  382. package/dist/chunk-X4XPNTCZ.cjs.map +0 -1
  383. package/dist/chunk-XCP454Q6.js.map +0 -1
  384. package/dist/html-MdxqSzjD.d.cts +0 -13
  385. package/dist/html-MdxqSzjD.d.ts +0 -13
  386. package/dist/orderRows-BUJYgSc7.d.cts +0 -221
  387. package/dist/orderRows-BUJYgSc7.d.ts +0 -221
  388. package/dist/speaker-verify-5GTWAN5Y.cjs.map +0 -1
  389. package/dist/speaker-verify-R67P433H.js.map +0 -1
  390. package/dist/transcript-Cg7uSW-C.d.cts +0 -84
  391. package/dist/transcript-Cg7uSW-C.d.ts +0 -84
  392. package/dist/types-CnPEwzlp.d.cts +0 -254
  393. package/dist/types-CnPEwzlp.d.ts +0 -254
  394. package/dist/useAnchoredPosition-CKwLSQW8.d.cts +0 -76
  395. package/dist/useAnchoredPosition-CKwLSQW8.d.ts +0 -76
  396. package/dist/useTheme-B9SWu6ui.d.cts +0 -24
  397. package/dist/useTheme-B9SWu6ui.d.ts +0 -24
  398. package/dist/useTranscriptEdits-CGzlemHT.d.cts +0 -182
  399. package/dist/useTranscriptEdits-D32bLs0l.d.ts +0 -182
@@ -1,11 +1,12 @@
1
1
  'use strict';
2
2
 
3
3
  var chunkJFLC7SHM_cjs = require('../../chunk-JFLC7SHM.cjs');
4
- var chunkWIAQQNFU_cjs = require('../../chunk-WIAQQNFU.cjs');
5
- var chunkX4XPNTCZ_cjs = require('../../chunk-X4XPNTCZ.cjs');
6
- var chunkSGFYA22I_cjs = require('../../chunk-SGFYA22I.cjs');
4
+ var chunkMYHV2ND3_cjs = require('../../chunk-MYHV2ND3.cjs');
5
+ var chunkLJZKEMAH_cjs = require('../../chunk-LJZKEMAH.cjs');
6
+ var chunkVYPPQPSZ_cjs = require('../../chunk-VYPPQPSZ.cjs');
7
7
  var chunkJEIW7BSV_cjs = require('../../chunk-JEIW7BSV.cjs');
8
8
  require('../../chunk-VBWRH4UW.cjs');
9
+ var chunkVPTASZ2O_cjs = require('../../chunk-VPTASZ2O.cjs');
9
10
  require('../../chunk-PJ6CC53R.cjs');
10
11
  require('../../chunk-I44YNYI6.cjs');
11
12
  require('../../chunk-Z5S5JEJD.cjs');
@@ -13,11 +14,12 @@ require('../../chunk-FSGEDDF2.cjs');
13
14
  require('../../chunk-AOHJILLU.cjs');
14
15
  require('../../chunk-FHY3K6PL.cjs');
15
16
  require('../../chunk-L7L5S2HO.cjs');
17
+ var chunk6HFFWEM3_cjs = require('../../chunk-6HFFWEM3.cjs');
16
18
  var chunkYVL3XATO_cjs = require('../../chunk-YVL3XATO.cjs');
17
- require('../../chunk-NV2CWBI2.cjs');
19
+ var chunkIEY3ZJIT_cjs = require('../../chunk-IEY3ZJIT.cjs');
18
20
  var chunkS5RVSXDV_cjs = require('../../chunk-S5RVSXDV.cjs');
19
21
  require('../../chunk-EUAMEVVI.cjs');
20
- var React2 = require('react');
22
+ var React3 = require('react');
21
23
  var Markdown = require('react-markdown');
22
24
  var remarkGfm = require('remark-gfm');
23
25
  var rehypeSanitize = require('rehype-sanitize');
@@ -46,7 +48,7 @@ function _interopNamespace(e) {
46
48
  return Object.freeze(n);
47
49
  }
48
50
 
49
- var React2__namespace = /*#__PURE__*/_interopNamespace(React2);
51
+ var React3__namespace = /*#__PURE__*/_interopNamespace(React3);
50
52
  var Markdown__default = /*#__PURE__*/_interopDefault(Markdown);
51
53
  var remarkGfm__default = /*#__PURE__*/_interopDefault(remarkGfm);
52
54
  var rehypeSanitize__default = /*#__PURE__*/_interopDefault(rehypeSanitize);
@@ -295,7 +297,7 @@ var transformUrl = (url, key, node) => {
295
297
  }
296
298
  return Markdown.defaultUrlTransform(url);
297
299
  };
298
- var MarkdownContent = React2__namespace.memo(function MarkdownContent2({
300
+ var MarkdownContent = React3__namespace.memo(function MarkdownContent2({
299
301
  text,
300
302
  messageId,
301
303
  streaming,
@@ -405,7 +407,7 @@ function ParticipantAvatar({
405
407
  src: participant?.avatar,
406
408
  alt: "",
407
409
  name: participant?.name ?? "?",
408
- fallback: isAgent ? /* @__PURE__ */ jsxRuntime.jsx(chunkWIAQQNFU_cjs.SparklesIcon, { size: "sm" }) : void 0,
410
+ fallback: isAgent ? /* @__PURE__ */ jsxRuntime.jsx(chunkMYHV2ND3_cjs.SparklesIcon, { size: "sm" }) : void 0,
409
411
  style: { backgroundColor },
410
412
  "aria-hidden": "true",
411
413
  className: "shrink-0"
@@ -498,11 +500,11 @@ function useMessageCopy({
498
500
  getText,
499
501
  defaultFormat
500
502
  }) {
501
- const [copied, setCopied] = React2__namespace.useState(false);
502
- const copiedTimer = React2__namespace.useRef(
503
+ const [copied, setCopied] = React3__namespace.useState(false);
504
+ const copiedTimer = React3__namespace.useRef(
503
505
  void 0
504
506
  );
505
- React2__namespace.useEffect(() => () => window.clearTimeout(copiedTimer.current), []);
507
+ React3__namespace.useEffect(() => () => window.clearTimeout(copiedTimer.current), []);
506
508
  const flash = () => {
507
509
  setCopied(true);
508
510
  window.clearTimeout(copiedTimer.current);
@@ -546,7 +548,7 @@ function ActionMenuItem({
546
548
  item,
547
549
  onSelect
548
550
  }) {
549
- return /* @__PURE__ */ jsxRuntime.jsx(chunkSGFYA22I_cjs.DropdownItem, { onClick: () => onSelect(item.onSelect), children: item.description ? /* @__PURE__ */ jsxRuntime.jsxs("span", { className: "flex flex-col items-start", children: [
551
+ return /* @__PURE__ */ jsxRuntime.jsx(chunkVYPPQPSZ_cjs.DropdownItem, { onClick: () => onSelect(item.onSelect), children: item.description ? /* @__PURE__ */ jsxRuntime.jsxs("span", { className: "flex flex-col items-start", children: [
550
552
  /* @__PURE__ */ jsxRuntime.jsx("span", { children: item.label }),
551
553
  /* @__PURE__ */ jsxRuntime.jsx("span", { className: "text-[10px] font-normal text-neutral-400", children: item.description })
552
554
  ] }) : item.label });
@@ -555,7 +557,7 @@ function FooterActionButton({
555
557
  action,
556
558
  isSelf
557
559
  }) {
558
- const [open, setOpen] = React2__namespace.useState(false);
560
+ const [open, setOpen] = React3__namespace.useState(false);
559
561
  const onClickCapture = action.submenu ? (e) => {
560
562
  if (e.metaKey || e.ctrlKey) {
561
563
  e.preventDefault();
@@ -578,7 +580,7 @@ function FooterActionButton({
578
580
  );
579
581
  if (!action.submenu) return button;
580
582
  return /* @__PURE__ */ jsxRuntime.jsx(
581
- chunkSGFYA22I_cjs.Dropdown,
583
+ chunkVYPPQPSZ_cjs.Dropdown,
582
584
  {
583
585
  open,
584
586
  onOpenChange: setOpen,
@@ -598,17 +600,13 @@ function FooterActionButton({
598
600
  }
599
601
  );
600
602
  }
601
- var MessageActionsBar = React2__namespace.forwardRef(function MessageActionsBar2({ actions, isSelf }, ref) {
603
+ var MessageActionsBar = React3__namespace.forwardRef(function MessageActionsBar2({ actions, isSelf }, ref) {
602
604
  return /* @__PURE__ */ jsxRuntime.jsx(
603
605
  "div",
604
606
  {
605
607
  ref,
606
608
  "data-slot": "superchat-message-actions",
607
- className: chunkS5RVSXDV_cjs.cn(
608
- "flex items-center gap-0.5",
609
- isSelf && "justify-end",
610
- actionRevealClass
611
- ),
609
+ className: chunkS5RVSXDV_cjs.cn("flex flex-col items-center gap-0.5", actionRevealClass),
612
610
  children: actions.map((action) => /* @__PURE__ */ jsxRuntime.jsx(FooterActionButton, { action, isSelf }, action.id))
613
611
  }
614
612
  );
@@ -618,7 +616,7 @@ function MessageOverflowMenu({
618
616
  actions,
619
617
  footerVisible
620
618
  }) {
621
- const [open, setOpen] = React2__namespace.useState(false);
619
+ const [open, setOpen] = React3__namespace.useState(false);
622
620
  const select = (fn) => {
623
621
  setOpen(false);
624
622
  fn();
@@ -627,7 +625,7 @@ function MessageOverflowMenu({
627
625
  "div",
628
626
  {
629
627
  className: chunkS5RVSXDV_cjs.cn(
630
- "sticky bottom-2 shrink-0 self-end transition-opacity",
628
+ "sticky bottom-2 mt-auto shrink-0 transition-opacity",
631
629
  // Rich content (e.g. NITRO tables) layers internals up to z-50, so the
632
630
  // open menu's stacking context must clear that.
633
631
  open ? "z-[60]" : "z-10",
@@ -637,7 +635,7 @@ function MessageOverflowMenu({
637
635
  footerVisible && !open && "pointer-events-none invisible opacity-0"
638
636
  ),
639
637
  children: /* @__PURE__ */ jsxRuntime.jsx(
640
- chunkSGFYA22I_cjs.Dropdown,
638
+ chunkVYPPQPSZ_cjs.Dropdown,
641
639
  {
642
640
  open,
643
641
  onOpenChange: setOpen,
@@ -656,9 +654,9 @@ function MessageOverflowMenu({
656
654
  (action) => action.submenu ? (
657
655
  // Actions with variants collapse to just their submenu — a
658
656
  // top-level default item would duplicate the flyout's options.
659
- /* @__PURE__ */ jsxRuntime.jsx(chunkSGFYA22I_cjs.DropdownSubmenu, { label: action.submenu.label, children: action.submenu.items.map((item) => /* @__PURE__ */ jsxRuntime.jsx(ActionMenuItem, { item, onSelect: select }, item.id)) }, action.id)
657
+ /* @__PURE__ */ jsxRuntime.jsx(chunkVYPPQPSZ_cjs.DropdownSubmenu, { label: action.submenu.label, children: action.submenu.items.map((item) => /* @__PURE__ */ jsxRuntime.jsx(ActionMenuItem, { item, onSelect: select }, item.id)) }, action.id)
660
658
  ) : /* @__PURE__ */ jsxRuntime.jsx(
661
- chunkSGFYA22I_cjs.DropdownItem,
659
+ chunkVYPPQPSZ_cjs.DropdownItem,
662
660
  {
663
661
  onClick: () => select(action.onSelect),
664
662
  children: action.label
@@ -671,7 +669,7 @@ function MessageOverflowMenu({
671
669
  }
672
670
  );
673
671
  }
674
- var MessageRow = React2__namespace.memo(function MessageRow2({
672
+ var MessageRow = React3__namespace.memo(function MessageRow2({
675
673
  message,
676
674
  participant,
677
675
  isSelf,
@@ -684,17 +682,18 @@ var MessageRow = React2__namespace.memo(function MessageRow2({
684
682
  }) {
685
683
  const streaming = message.status === "streaming";
686
684
  const hasBody = !!message.text || (message.content?.length ?? 0) > 0;
687
- const [isEditing, setIsEditing] = React2__namespace.useState(false);
688
- const [draft, setDraft] = React2__namespace.useState(message.text ?? "");
689
- const editRef = React2__namespace.useRef(null);
690
- const bubbleRef = React2__namespace.useRef(null);
691
- const autosize = React2__namespace.useCallback(() => {
685
+ const [isEditing, setIsEditing] = React3__namespace.useState(false);
686
+ const [draft, setDraft] = React3__namespace.useState(message.text ?? "");
687
+ const [editMinWidth, setEditMinWidth] = React3__namespace.useState();
688
+ const editRef = React3__namespace.useRef(null);
689
+ const bubbleRef = React3__namespace.useRef(null);
690
+ const autosize = React3__namespace.useCallback(() => {
692
691
  const el = editRef.current;
693
692
  if (!el) return;
694
693
  el.style.height = "auto";
695
694
  el.style.height = `${el.scrollHeight}px`;
696
695
  }, []);
697
- React2__namespace.useEffect(() => {
696
+ React3__namespace.useEffect(() => {
698
697
  if (!isEditing) return;
699
698
  const el = editRef.current;
700
699
  if (!el) return;
@@ -715,16 +714,19 @@ ${block.text}
715
714
  return "";
716
715
  }).filter(Boolean).join("\n\n") ?? "";
717
716
  const canCopy = !isEditing && (!!message.content?.length || typeof message.text === "string" && message.text.length > 0);
718
- const hasActions = canCopy || canEdit && !isEditing;
717
+ const showEditAction = canEdit && !isEditing;
718
+ const actionCount = (canCopy ? 1 : 0) + (showEditAction ? 1 : 0);
719
+ const hasActions = actionCount > 0;
720
+ const collapseToMenu = actionCount > 1;
719
721
  const copy = useMessageCopy({
720
722
  markdown: markdownSource,
721
723
  getHtml: () => bubbleRef.current?.innerHTML ?? "",
722
724
  getText: () => bubbleRef.current?.textContent ?? "",
723
725
  defaultFormat: defaultCopyFormat
724
726
  });
725
- const actionsBarRef = React2__namespace.useRef(null);
726
- const [footerVisible, setFooterVisible] = React2__namespace.useState(true);
727
- React2__namespace.useEffect(() => {
727
+ const actionsBarRef = React3__namespace.useRef(null);
728
+ const [footerVisible, setFooterVisible] = React3__namespace.useState(true);
729
+ React3__namespace.useEffect(() => {
728
730
  const el = actionsBarRef.current;
729
731
  if (!el || typeof globalThis.IntersectionObserver === "undefined") return;
730
732
  const observer = new globalThis.IntersectionObserver(([entry]) => {
@@ -732,7 +734,7 @@ ${block.text}
732
734
  });
733
735
  observer.observe(el);
734
736
  return () => observer.disconnect();
735
- }, [hasActions]);
737
+ }, [hasActions, collapseToMenu]);
736
738
  if (message.type === "system") {
737
739
  return /* @__PURE__ */ jsxRuntime.jsx(
738
740
  "div",
@@ -765,6 +767,12 @@ ${block.text}
765
767
  const accentTextColor = accessibleAccentTextColor(accent);
766
768
  const authorName = participant?.name ?? "Unknown";
767
769
  const startEdit = () => {
770
+ const el = bubbleRef.current;
771
+ if (el) {
772
+ const cs = getComputedStyle(el);
773
+ const contentWidth = el.clientWidth - parseFloat(cs.paddingLeft) - parseFloat(cs.paddingRight);
774
+ setEditMinWidth(contentWidth > 0 ? contentWidth : void 0);
775
+ }
768
776
  setDraft(message.text ?? "");
769
777
  setIsEditing(true);
770
778
  };
@@ -838,7 +846,7 @@ ${block.text}
838
846
  }
839
847
  }
840
848
  ] : [],
841
- ...canEdit && !isEditing ? [
849
+ ...showEditAction ? [
842
850
  {
843
851
  id: "edit",
844
852
  label: "Edit message",
@@ -858,172 +866,191 @@ ${block.text}
858
866
  isSelf ? "flex-row-reverse" : "flex-row"
859
867
  ),
860
868
  children: [
861
- /* @__PURE__ */ jsxRuntime.jsx(ParticipantAvatar, { participant }),
862
- /* @__PURE__ */ jsxRuntime.jsxs("div", { className: chunkS5RVSXDV_cjs.cn("flex min-w-0 flex-col gap-1", isSelf && "items-end"), children: [
863
- /* @__PURE__ */ jsxRuntime.jsxs(
864
- "div",
865
- {
866
- "data-slot": "superchat-message-meta",
867
- className: "flex items-baseline gap-2",
868
- children: [
869
+ /* @__PURE__ */ jsxRuntime.jsxs(
870
+ "div",
871
+ {
872
+ "data-slot": "superchat-message-gutter",
873
+ className: "flex shrink-0 flex-col items-center gap-1",
874
+ children: [
875
+ /* @__PURE__ */ jsxRuntime.jsx(ParticipantAvatar, { participant }),
876
+ hasActions && /* @__PURE__ */ jsxRuntime.jsxs(jsxRuntime.Fragment, { children: [
869
877
  /* @__PURE__ */ jsxRuntime.jsx(
870
- "span",
871
- {
872
- className: "text-xs font-medium",
873
- style: accentTextColor ? { color: accentTextColor } : void 0,
874
- children: authorName
875
- }
876
- ),
877
- participant?.role && /* @__PURE__ */ jsxRuntime.jsx("span", { className: "text-[10px] text-neutral-500 dark:text-neutral-400", children: participant.role }),
878
- /* @__PURE__ */ jsxRuntime.jsx("span", { className: "text-[10px] text-neutral-500 dark:text-neutral-400", children: formatTime(message.time) }),
879
- message.editedAt && /* @__PURE__ */ jsxRuntime.jsx(
880
- "span",
881
- {
882
- "data-slot": "superchat-edited-indicator",
883
- className: "text-[10px] text-neutral-500 dark:text-neutral-400",
884
- title: `Edited ${formatTime(message.editedAt)}`,
885
- children: "(edited)"
886
- }
887
- )
888
- ]
889
- }
890
- ),
891
- /* @__PURE__ */ jsxRuntime.jsxs(
892
- "div",
893
- {
894
- className: chunkS5RVSXDV_cjs.cn(
895
- "flex items-center gap-1",
896
- isSelf ? "flex-row-reverse" : "flex-row"
897
- ),
898
- children: [
899
- hasActions && /* @__PURE__ */ jsxRuntime.jsx(
900
878
  MessageOverflowMenu,
901
879
  {
902
880
  isSelf,
903
881
  actions,
904
- footerVisible
882
+ footerVisible: collapseToMenu ? false : footerVisible
905
883
  }
906
884
  ),
907
- /* @__PURE__ */ jsxRuntime.jsx(
908
- chunkWIAQQNFU_cjs.ChatBubble,
885
+ !collapseToMenu && /* @__PURE__ */ jsxRuntime.jsx(
886
+ MessageActionsBar,
909
887
  {
910
- ref: bubbleRef,
911
- "data-slot": "superchat-bubble",
912
- variant: isSelf ? "user" : "assistant",
913
- hasError: message.status === "error",
914
- className: "text-sm has-[[data-slot=superchat-nitro-table]]:w-full has-[[data-slot=superchat-nitro-table]]:max-w-full",
915
- children: isEditing ? /* @__PURE__ */ jsxRuntime.jsxs(
916
- "div",
888
+ ref: actionsBarRef,
889
+ actions,
890
+ isSelf
891
+ }
892
+ )
893
+ ] })
894
+ ]
895
+ }
896
+ ),
897
+ /* @__PURE__ */ jsxRuntime.jsxs(
898
+ "div",
899
+ {
900
+ className: chunkS5RVSXDV_cjs.cn(
901
+ "flex min-w-0 flex-1 flex-col gap-1",
902
+ isSelf && "items-end"
903
+ ),
904
+ children: [
905
+ /* @__PURE__ */ jsxRuntime.jsxs(
906
+ "div",
907
+ {
908
+ "data-slot": "superchat-message-meta",
909
+ className: "flex items-baseline gap-2",
910
+ children: [
911
+ /* @__PURE__ */ jsxRuntime.jsx(
912
+ "span",
917
913
  {
918
- "data-slot": "superchat-message-editor",
919
- className: "flex w-80 max-w-full flex-col gap-2",
920
- children: [
921
- /* @__PURE__ */ jsxRuntime.jsx(
922
- "textarea",
923
- {
924
- value: draft,
925
- ref: editRef,
926
- rows: 2,
927
- onChange: (e) => {
928
- setDraft(e.target.value);
929
- autosize();
930
- },
931
- onPaste: handleEditPaste,
932
- onKeyDown: (e) => {
933
- if (e.key === "Enter" && !e.shiftKey) {
934
- e.preventDefault();
935
- saveEdit();
936
- } else if (e.key === "Escape") {
937
- e.preventDefault();
938
- cancelEdit();
939
- }
940
- },
941
- "aria-label": "Edit message",
942
- className: "focus:ring-primary-500 max-h-60 min-h-16 w-full resize-none rounded-lg border border-neutral-300 bg-white px-3 py-2 text-sm text-neutral-900 focus:ring-1 focus:outline-none dark:border-neutral-600 dark:bg-neutral-900 dark:text-white"
943
- }
944
- ),
945
- /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "flex justify-end gap-2", children: [
914
+ className: "text-xs font-medium",
915
+ style: accentTextColor ? { color: accentTextColor } : void 0,
916
+ children: authorName
917
+ }
918
+ ),
919
+ participant?.role && /* @__PURE__ */ jsxRuntime.jsx("span", { className: "text-[10px] text-neutral-500 dark:text-neutral-400", children: participant.role }),
920
+ /* @__PURE__ */ jsxRuntime.jsx("span", { className: "text-[10px] text-neutral-500 dark:text-neutral-400", children: formatTime(message.time) }),
921
+ message.editedAt && /* @__PURE__ */ jsxRuntime.jsx(
922
+ "span",
923
+ {
924
+ "data-slot": "superchat-edited-indicator",
925
+ className: "text-[10px] text-neutral-500 dark:text-neutral-400",
926
+ title: `Edited ${formatTime(message.editedAt)}`,
927
+ children: "(edited)"
928
+ }
929
+ )
930
+ ]
931
+ }
932
+ ),
933
+ /* @__PURE__ */ jsxRuntime.jsx(
934
+ "div",
935
+ {
936
+ className: chunkS5RVSXDV_cjs.cn(
937
+ "flex w-full items-center gap-1",
938
+ isSelf ? "flex-row-reverse" : "flex-row"
939
+ ),
940
+ children: /* @__PURE__ */ jsxRuntime.jsx(
941
+ chunkMYHV2ND3_cjs.ChatBubble,
942
+ {
943
+ ref: bubbleRef,
944
+ "data-slot": "superchat-bubble",
945
+ variant: isSelf ? "user" : "assistant",
946
+ hasError: message.status === "error",
947
+ className: "text-sm has-[[data-slot=superchat-nitro-table]]:w-full has-[[data-slot=superchat-nitro-table]]:max-w-full",
948
+ children: isEditing ? /* @__PURE__ */ jsxRuntime.jsxs(
949
+ "div",
950
+ {
951
+ "data-slot": "superchat-message-editor",
952
+ className: "flex w-80 max-w-full flex-col gap-2",
953
+ style: editMinWidth ? { minWidth: editMinWidth } : void 0,
954
+ children: [
946
955
  /* @__PURE__ */ jsxRuntime.jsx(
947
- "button",
956
+ "textarea",
948
957
  {
949
- type: "button",
950
- onClick: cancelEdit,
951
- className: "rounded-md px-2.5 py-1 text-xs font-medium text-neutral-200 hover:bg-white/10",
952
- children: "Cancel"
958
+ value: draft,
959
+ ref: editRef,
960
+ rows: 2,
961
+ onChange: (e) => {
962
+ setDraft(e.target.value);
963
+ autosize();
964
+ },
965
+ onPaste: handleEditPaste,
966
+ onKeyDown: (e) => {
967
+ if (e.key === "Enter" && !e.shiftKey) {
968
+ e.preventDefault();
969
+ saveEdit();
970
+ } else if (e.key === "Escape") {
971
+ e.preventDefault();
972
+ cancelEdit();
973
+ }
974
+ },
975
+ "aria-label": "Edit message",
976
+ className: "focus:ring-primary-500 max-h-60 min-h-16 w-full resize-none rounded-lg border border-neutral-300 bg-white px-3 py-2 text-sm text-neutral-900 focus:ring-1 focus:outline-none dark:border-neutral-600 dark:bg-neutral-900 dark:text-white"
953
977
  }
954
978
  ),
955
- /* @__PURE__ */ jsxRuntime.jsx(
956
- "button",
957
- {
958
- type: "button",
959
- onClick: saveEdit,
960
- disabled: !draft.trim() || draft.trim() === message.text,
961
- className: "rounded-md bg-white px-2.5 py-1 text-xs font-medium text-neutral-900 hover:bg-neutral-100 disabled:opacity-40",
962
- children: "Save"
963
- }
964
- )
965
- ] })
966
- ]
967
- }
968
- ) : /* @__PURE__ */ jsxRuntime.jsxs(jsxRuntime.Fragment, { children: [
969
- message.content?.map((block, i) => {
970
- if (block.type === "tool_use" && block.toolCall) {
971
- return /* @__PURE__ */ jsxRuntime.jsx(chunkWIAQQNFU_cjs.MCPToolCallDisplay, { toolCall: block.toolCall }, i);
972
- }
973
- if ((block.type === "text" || block.type === "thinking") && block.text) {
974
- return /* @__PURE__ */ jsxRuntime.jsx(
975
- "div",
976
- {
977
- className: "prose prose-sm dark:prose-invert max-w-none **:wrap-break-word",
978
- children: renderText(block.text, {
979
- messageId: message.id,
980
- streaming,
981
- role: participant?.kind === "human" ? "user" : "assistant"
982
- })
983
- },
984
- i
985
- );
979
+ /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "flex justify-end gap-2", children: [
980
+ /* @__PURE__ */ jsxRuntime.jsx(
981
+ "button",
982
+ {
983
+ type: "button",
984
+ onClick: cancelEdit,
985
+ className: "rounded-md px-2.5 py-1 text-xs font-medium text-neutral-200 hover:bg-white/10",
986
+ children: "Cancel"
987
+ }
988
+ ),
989
+ /* @__PURE__ */ jsxRuntime.jsx(
990
+ "button",
991
+ {
992
+ type: "button",
993
+ onClick: saveEdit,
994
+ disabled: !draft.trim() || draft.trim() === message.text,
995
+ className: "rounded-md bg-white px-2.5 py-1 text-xs font-medium text-neutral-900 hover:bg-neutral-100 disabled:opacity-40",
996
+ children: "Save"
997
+ }
998
+ )
999
+ ] })
1000
+ ]
986
1001
  }
987
- if (block.type === "code" && block.text) {
988
- const fenced = `\`\`\`${block.language ?? ""}
1002
+ ) : /* @__PURE__ */ jsxRuntime.jsxs(jsxRuntime.Fragment, { children: [
1003
+ message.content?.map((block, i) => {
1004
+ if (block.type === "tool_use" && block.toolCall) {
1005
+ return /* @__PURE__ */ jsxRuntime.jsx(chunkMYHV2ND3_cjs.MCPToolCallDisplay, { toolCall: block.toolCall }, i);
1006
+ }
1007
+ if ((block.type === "text" || block.type === "thinking") && block.text) {
1008
+ return /* @__PURE__ */ jsxRuntime.jsx(
1009
+ "div",
1010
+ {
1011
+ className: "prose prose-sm dark:prose-invert max-w-none **:wrap-break-word",
1012
+ children: renderText(block.text, {
1013
+ messageId: message.id,
1014
+ streaming,
1015
+ role: participant?.kind === "human" ? "user" : "assistant"
1016
+ })
1017
+ },
1018
+ i
1019
+ );
1020
+ }
1021
+ if (block.type === "code" && block.text) {
1022
+ const fenced = `\`\`\`${block.language ?? ""}
989
1023
  ${block.text}
990
1024
  \`\`\``;
991
- return /* @__PURE__ */ jsxRuntime.jsx(
992
- "div",
993
- {
994
- className: "prose prose-sm dark:prose-invert max-w-none **:wrap-break-word",
995
- children: renderText(fenced, {
996
- messageId: message.id,
997
- streaming,
998
- role: participant?.kind === "human" ? "user" : "assistant"
999
- })
1000
- },
1001
- i
1002
- );
1003
- }
1004
- return null;
1005
- }),
1006
- message.text && /* @__PURE__ */ jsxRuntime.jsx("div", { className: "prose prose-sm dark:prose-invert max-w-none **:wrap-break-word", children: renderText(message.text, {
1007
- messageId: message.id,
1008
- streaming,
1009
- role: participant?.kind === "human" ? "user" : "assistant"
1010
- }) }),
1011
- streaming && !hasBody && /* @__PURE__ */ jsxRuntime.jsx("div", { className: "flex items-center justify-center", children: /* @__PURE__ */ jsxRuntime.jsx(chunkWIAQQNFU_cjs.AITypingIndicator, {}) })
1012
- ] })
1013
- }
1014
- )
1015
- ]
1016
- }
1017
- ),
1018
- hasActions && /* @__PURE__ */ jsxRuntime.jsx(
1019
- MessageActionsBar,
1020
- {
1021
- ref: actionsBarRef,
1022
- actions,
1023
- isSelf
1024
- }
1025
- )
1026
- ] })
1025
+ return /* @__PURE__ */ jsxRuntime.jsx(
1026
+ "div",
1027
+ {
1028
+ className: "prose prose-sm dark:prose-invert max-w-none **:wrap-break-word",
1029
+ children: renderText(fenced, {
1030
+ messageId: message.id,
1031
+ streaming,
1032
+ role: participant?.kind === "human" ? "user" : "assistant"
1033
+ })
1034
+ },
1035
+ i
1036
+ );
1037
+ }
1038
+ return null;
1039
+ }),
1040
+ message.text && /* @__PURE__ */ jsxRuntime.jsx("div", { className: "prose prose-sm dark:prose-invert max-w-none **:wrap-break-word", children: renderText(message.text, {
1041
+ messageId: message.id,
1042
+ streaming,
1043
+ role: participant?.kind === "human" ? "user" : "assistant"
1044
+ }) }),
1045
+ streaming && !hasBody && /* @__PURE__ */ jsxRuntime.jsx("div", { className: "flex items-center justify-center", children: /* @__PURE__ */ jsxRuntime.jsx(chunkMYHV2ND3_cjs.AITypingIndicator, {}) })
1046
+ ] })
1047
+ }
1048
+ )
1049
+ }
1050
+ )
1051
+ ]
1052
+ }
1053
+ )
1027
1054
  ]
1028
1055
  }
1029
1056
  );
@@ -1050,32 +1077,23 @@ function VirtualThread({
1050
1077
  editable,
1051
1078
  onMessageEdited,
1052
1079
  defaultCopyFormat,
1053
- order,
1054
- conversationId,
1080
+ scrollRef,
1081
+ contentRef,
1055
1082
  containerProps
1056
1083
  }) {
1057
- const parentRef = React2__namespace.useRef(null);
1058
1084
  const virtualizer = reactVirtual.useVirtualizer({
1059
1085
  count: items.length,
1060
- getScrollElement: () => parentRef.current,
1086
+ getScrollElement: () => scrollRef.current,
1061
1087
  // Rough first guess; real heights are measured via measureElement.
1062
1088
  estimateSize: () => 88,
1063
1089
  overscan: 10,
1064
1090
  getItemKey: (index) => items[index]?.id ?? index
1065
1091
  });
1066
- const count = items.length;
1067
- React2__namespace.useEffect(() => {
1068
- if (count === 0) return;
1069
- if (order === "desc") {
1070
- virtualizer.scrollToIndex(0, { align: "start" });
1071
- } else {
1072
- virtualizer.scrollToIndex(count - 1, { align: "end" });
1073
- }
1074
- }, [count, conversationId, order]);
1075
1092
  const virtualItems = virtualizer.getVirtualItems();
1076
- return /* @__PURE__ */ jsxRuntime.jsx("div", { ...containerProps, ref: parentRef, children: /* @__PURE__ */ jsxRuntime.jsx(
1093
+ return /* @__PURE__ */ jsxRuntime.jsx("div", { ...containerProps, ref: scrollRef, children: /* @__PURE__ */ jsxRuntime.jsx(
1077
1094
  "div",
1078
1095
  {
1096
+ ref: contentRef,
1079
1097
  style: {
1080
1098
  height: virtualizer.getTotalSize(),
1081
1099
  position: "relative",
@@ -1136,38 +1154,180 @@ function SuperChat({
1136
1154
  onReferenceClick,
1137
1155
  onBack
1138
1156
  }) {
1139
- const headingId = React2__namespace.useId();
1140
- React2__namespace.useEffect(() => {
1141
- chunkX4XPNTCZ_cjs.notifyComposerMigrationOnce("SuperChat");
1157
+ const headingId = React3__namespace.useId();
1158
+ React3__namespace.useEffect(() => {
1159
+ chunkLJZKEMAH_cjs.notifyComposerMigrationOnce("SuperChat");
1142
1160
  }, []);
1143
- const renderText = React2__namespace.useMemo(
1161
+ const renderText = React3__namespace.useMemo(
1144
1162
  () => renderTextContent ?? createMarkdownRenderer({
1145
1163
  plugins: renderPlugins,
1146
1164
  trusted: trustedContent
1147
1165
  }),
1148
1166
  [renderTextContent, renderPlugins, trustedContent]
1149
1167
  );
1150
- const threadRef = React2__namespace.useRef(null);
1151
- React2__namespace.useEffect(() => {
1152
- if (virtualized) return;
1153
- const el = threadRef.current;
1154
- if (!el) return;
1155
- el.scrollTop = order === "desc" ? 0 : el.scrollHeight;
1156
- }, [conversation.thread.length, conversation.id, order, virtualized]);
1157
- const participantById = React2__namespace.useMemo(() => {
1168
+ const prefersReducedMotion = chunk6HFFWEM3_cjs.usePrefersReducedMotion();
1169
+ const {
1170
+ containerRef: threadRef,
1171
+ contentRef: threadContentRef,
1172
+ isAtBottom,
1173
+ scrollToBottom,
1174
+ anchorToTurnStart,
1175
+ followIfPinned,
1176
+ stopFollowing
1177
+ } = chunkVPTASZ2O_cjs.useStickToBottom({ disabled: order === "desc" });
1178
+ const [hasNewBelow, setHasNewBelow] = React3__namespace.useState(false);
1179
+ const [turnStartId, setTurnStartId] = React3__namespace.useState(null);
1180
+ const [turnMinHeight, setTurnMinHeight] = React3__namespace.useState();
1181
+ const anchoredTurnRef = React3__namespace.useRef(null);
1182
+ React3__namespace.useEffect(() => {
1183
+ setTurnStartId(null);
1184
+ anchoredTurnRef.current = null;
1185
+ if (order === "desc") {
1186
+ const el = threadRef.current;
1187
+ if (el) el.scrollTop = 0;
1188
+ } else {
1189
+ scrollToBottom("auto");
1190
+ }
1191
+ setHasNewBelow(false);
1192
+ }, [conversation.id, order]);
1193
+ const threadLength = conversation.thread.length;
1194
+ const prevThreadLengthRef = React3__namespace.useRef(threadLength);
1195
+ const prevMessageIdsRef = React3__namespace.useRef(
1196
+ new Set(conversation.thread.map((message) => message.id))
1197
+ );
1198
+ const policyConversationRef = React3__namespace.useRef(conversation.id);
1199
+ const policyBaselinedRef = React3__namespace.useRef(false);
1200
+ React3__namespace.useEffect(() => {
1201
+ if (!policyBaselinedRef.current || policyConversationRef.current !== conversation.id) {
1202
+ policyBaselinedRef.current = true;
1203
+ policyConversationRef.current = conversation.id;
1204
+ prevThreadLengthRef.current = threadLength;
1205
+ prevMessageIdsRef.current = new Set(
1206
+ conversation.thread.map((message) => message.id)
1207
+ );
1208
+ if (order !== "desc" && [...conversation.thread].sort(byTime).at(-1)?.status === "streaming") {
1209
+ stopFollowing();
1210
+ }
1211
+ return;
1212
+ }
1213
+ if (threadLength === prevThreadLengthRef.current) return;
1214
+ const grew = threadLength > prevThreadLengthRef.current;
1215
+ prevThreadLengthRef.current = threadLength;
1216
+ if (order === "desc") {
1217
+ const el = threadRef.current;
1218
+ if (el) el.scrollTop = 0;
1219
+ return;
1220
+ }
1221
+ const prevIds = prevMessageIdsRef.current;
1222
+ let turnStart;
1223
+ if (grew && currentParticipantId) {
1224
+ for (const message of [...conversation.thread].sort(byTime)) {
1225
+ if (!prevIds.has(message.id) && message.participantId === currentParticipantId) {
1226
+ turnStart = message.id;
1227
+ }
1228
+ }
1229
+ }
1230
+ if (turnStart) {
1231
+ if (virtualized) {
1232
+ scrollToBottom("auto");
1233
+ } else {
1234
+ setTurnStartId(turnStart);
1235
+ }
1236
+ } else if (grew) {
1237
+ const newest = [...conversation.thread].sort(byTime).at(-1);
1238
+ if (newest?.status === "streaming") {
1239
+ followIfPinned("auto");
1240
+ stopFollowing();
1241
+ } else if (!followIfPinned("auto")) {
1242
+ setHasNewBelow(true);
1243
+ }
1244
+ } else {
1245
+ followIfPinned("auto");
1246
+ }
1247
+ }, [threadLength, order, isAtBottom, conversation.id]);
1248
+ React3__namespace.useLayoutEffect(() => {
1249
+ if (!turnStartId || anchoredTurnRef.current === turnStartId) return;
1250
+ const container = threadRef.current;
1251
+ if (!container) return;
1252
+ const reserve = Math.max(0, container.clientHeight - 32);
1253
+ if (turnMinHeight !== reserve) {
1254
+ setTurnMinHeight(reserve);
1255
+ return;
1256
+ }
1257
+ const target = container.querySelector(
1258
+ '[data-slot="superchat-turn"]'
1259
+ );
1260
+ if (target) {
1261
+ anchorToTurnStart(target, prefersReducedMotion ? "auto" : "smooth");
1262
+ anchoredTurnRef.current = turnStartId;
1263
+ }
1264
+ }, [
1265
+ turnStartId,
1266
+ turnMinHeight,
1267
+ anchorToTurnStart,
1268
+ prefersReducedMotion,
1269
+ threadRef
1270
+ ]);
1271
+ React3__namespace.useEffect(() => {
1272
+ prevMessageIdsRef.current = new Set(
1273
+ conversation.thread.map((message) => message.id)
1274
+ );
1275
+ });
1276
+ React3__namespace.useEffect(() => {
1277
+ if (isAtBottom) setHasNewBelow(false);
1278
+ }, [isAtBottom]);
1279
+ const newestMessage = React3__namespace.useMemo(
1280
+ () => [...conversation.thread].sort(byTime).at(-1),
1281
+ [conversation]
1282
+ );
1283
+ const raiseNewBelow = React3__namespace.useCallback(() => {
1284
+ if (order !== "desc") setHasNewBelow(true);
1285
+ }, [order]);
1286
+ const resumeFollowing = React3__namespace.useCallback(() => {
1287
+ if (order !== "desc") scrollToBottom("auto");
1288
+ }, [order, scrollToBottom]);
1289
+ chunkVPTASZ2O_cjs.useStreamEndedBelowFold(
1290
+ newestMessage,
1291
+ isAtBottom,
1292
+ raiseNewBelow,
1293
+ resumeFollowing
1294
+ );
1295
+ const handleJumpToBottom = React3__namespace.useCallback(() => {
1296
+ scrollToBottom(prefersReducedMotion ? "auto" : "smooth");
1297
+ }, [scrollToBottom, prefersReducedMotion]);
1298
+ const participantById = React3__namespace.useMemo(() => {
1158
1299
  const map = /* @__PURE__ */ new Map();
1159
1300
  conversation.participants.forEach((p) => map.set(p.id, p));
1160
1301
  return map;
1161
1302
  }, [conversation]);
1162
- const orderedThread = React2__namespace.useMemo(() => {
1303
+ const orderedThread = React3__namespace.useMemo(() => {
1163
1304
  const sorted = [...conversation.thread].sort(byTime);
1164
1305
  return order === "desc" ? sorted.reverse() : sorted;
1165
1306
  }, [conversation, order]);
1166
- const onMessageEditedRef = React2__namespace.useRef(onMessageEdited);
1307
+ const turnIndex = React3__namespace.useMemo(
1308
+ () => turnStartId && order !== "desc" ? orderedThread.findIndex((message) => message.id === turnStartId) : -1,
1309
+ [orderedThread, turnStartId, order]
1310
+ );
1311
+ const renderMessageRow = (m) => /* @__PURE__ */ jsxRuntime.jsx(
1312
+ MessageRow,
1313
+ {
1314
+ message: m,
1315
+ participant: participantById.get(m.participantId),
1316
+ isSelf: !!currentParticipantId && m.participantId === currentParticipantId,
1317
+ renderText,
1318
+ linkBuilder,
1319
+ onReferenceClick,
1320
+ editable,
1321
+ onMessageEdited: handleMessageEdited,
1322
+ defaultCopyFormat
1323
+ },
1324
+ m.id
1325
+ );
1326
+ const onMessageEditedRef = React3__namespace.useRef(onMessageEdited);
1167
1327
  onMessageEditedRef.current = onMessageEdited;
1168
- const conversationRef = React2__namespace.useRef(conversation);
1328
+ const conversationRef = React3__namespace.useRef(conversation);
1169
1329
  conversationRef.current = conversation;
1170
- const handleMessageEdited = React2__namespace.useCallback(
1330
+ const handleMessageEdited = React3__namespace.useCallback(
1171
1331
  (messageId, text) => {
1172
1332
  onMessageEditedRef.current?.(messageId, text, {
1173
1333
  conversation: conversationRef.current
@@ -1176,7 +1336,7 @@ function SuperChat({
1176
1336
  []
1177
1337
  );
1178
1338
  const editable = !readOnly && !!onMessageEdited;
1179
- const mentionOptions = React2__namespace.useMemo(
1339
+ const mentionOptions = React3__namespace.useMemo(
1180
1340
  () => conversation.participants.filter((p) => p.kind !== "system").map((p) => ({
1181
1341
  id: p.id,
1182
1342
  label: p.name,
@@ -1186,17 +1346,17 @@ function SuperChat({
1186
1346
  })),
1187
1347
  [conversation.participants]
1188
1348
  );
1189
- const composerAccept = React2__namespace.useMemo(
1349
+ const composerAccept = React3__namespace.useMemo(
1190
1350
  () => acceptTokensFor(acceptedFileTypes),
1191
1351
  [acceptedFileTypes]
1192
1352
  );
1193
- const [draft, setDraft] = React2__namespace.useState("");
1194
- const draftEpochRef = React2__namespace.useRef(0);
1195
- const handleDraftChange = React2__namespace.useCallback((value) => {
1353
+ const [draft, setDraft] = React3__namespace.useState("");
1354
+ const draftEpochRef = React3__namespace.useRef(0);
1355
+ const handleDraftChange = React3__namespace.useCallback((value) => {
1196
1356
  draftEpochRef.current += 1;
1197
1357
  setDraft(value);
1198
1358
  }, []);
1199
- const handleComposerSend = React2__namespace.useCallback(
1359
+ const handleComposerSend = React3__namespace.useCallback(
1200
1360
  async (message) => {
1201
1361
  const epoch = draftEpochRef.current;
1202
1362
  try {
@@ -1286,70 +1446,94 @@ function SuperChat({
1286
1446
  onClick: () => onConversationClosed(conversation),
1287
1447
  "aria-label": "Close conversation",
1288
1448
  className: "rounded-md p-1 text-neutral-400 hover:bg-neutral-100 dark:hover:bg-neutral-800",
1289
- children: /* @__PURE__ */ jsxRuntime.jsx(chunkWIAQQNFU_cjs.CloseIcon, {})
1449
+ children: /* @__PURE__ */ jsxRuntime.jsx(chunkMYHV2ND3_cjs.CloseIcon, {})
1290
1450
  }
1291
1451
  )
1292
1452
  ]
1293
1453
  }
1294
1454
  ),
1295
- virtualized ? /* @__PURE__ */ jsxRuntime.jsx(
1296
- VirtualThread,
1297
- {
1298
- items: orderedThread,
1299
- participantById,
1300
- currentParticipantId,
1301
- renderText,
1302
- linkBuilder,
1303
- onReferenceClick,
1304
- editable,
1305
- onMessageEdited: handleMessageEdited,
1306
- defaultCopyFormat,
1307
- order,
1308
- conversationId: conversation.id,
1309
- containerProps: {
1310
- "data-slot": "superchat-thread",
1311
- role: "log",
1312
- "aria-label": "Messages",
1313
- "aria-live": "polite",
1314
- // Focusable so keyboard-only users can scroll the message history.
1315
- tabIndex: 0,
1316
- className: "flex-1 overflow-y-auto p-4"
1317
- }
1318
- }
1319
- ) : /* @__PURE__ */ jsxRuntime.jsx(
1455
+ /* @__PURE__ */ jsxRuntime.jsxs(
1320
1456
  "div",
1321
1457
  {
1322
- "data-slot": "superchat-thread",
1323
- ref: threadRef,
1324
- role: "log",
1325
- "aria-label": "Messages",
1326
- "aria-live": "polite",
1327
- tabIndex: 0,
1328
- className: "flex-1 space-y-4 overflow-y-auto p-4",
1329
- children: orderedThread.map((m) => /* @__PURE__ */ jsxRuntime.jsx(
1330
- MessageRow,
1331
- {
1332
- message: m,
1333
- participant: participantById.get(m.participantId),
1334
- isSelf: !!currentParticipantId && m.participantId === currentParticipantId,
1335
- renderText,
1336
- linkBuilder,
1337
- onReferenceClick,
1338
- editable,
1339
- onMessageEdited: handleMessageEdited,
1340
- defaultCopyFormat
1341
- },
1342
- m.id
1343
- ))
1458
+ "data-slot": "superchat-thread-viewport",
1459
+ className: "relative flex min-h-0 flex-1 flex-col",
1460
+ children: [
1461
+ virtualized ? /* @__PURE__ */ jsxRuntime.jsx(
1462
+ VirtualThread,
1463
+ {
1464
+ items: orderedThread,
1465
+ participantById,
1466
+ currentParticipantId,
1467
+ renderText,
1468
+ linkBuilder,
1469
+ onReferenceClick,
1470
+ editable,
1471
+ onMessageEdited: handleMessageEdited,
1472
+ defaultCopyFormat,
1473
+ scrollRef: threadRef,
1474
+ contentRef: threadContentRef,
1475
+ containerProps: {
1476
+ "data-slot": "superchat-thread",
1477
+ role: "log",
1478
+ "aria-label": "Messages",
1479
+ "aria-live": "polite",
1480
+ // Focusable so keyboard-only users can scroll the message history.
1481
+ tabIndex: 0,
1482
+ className: "flex-1 overflow-y-auto p-4"
1483
+ }
1484
+ }
1485
+ ) : /* @__PURE__ */ jsxRuntime.jsx(
1486
+ "div",
1487
+ {
1488
+ "data-slot": "superchat-thread",
1489
+ ref: threadRef,
1490
+ role: "log",
1491
+ "aria-label": "Messages",
1492
+ "aria-live": "polite",
1493
+ tabIndex: 0,
1494
+ className: "flex-1 overflow-y-auto p-4",
1495
+ children: /* @__PURE__ */ jsxRuntime.jsxs("div", { ref: threadContentRef, className: "space-y-4", children: [
1496
+ (turnIndex === -1 ? orderedThread : orderedThread.slice(0, turnIndex)).map(renderMessageRow),
1497
+ turnIndex !== -1 && /* @__PURE__ */ jsxRuntime.jsx(
1498
+ "div",
1499
+ {
1500
+ "data-slot": "superchat-turn",
1501
+ className: "space-y-4",
1502
+ style: { minHeight: turnMinHeight },
1503
+ children: orderedThread.slice(turnIndex).map(renderMessageRow)
1504
+ }
1505
+ )
1506
+ ] })
1507
+ }
1508
+ ),
1509
+ /* @__PURE__ */ jsxRuntime.jsx(chunkIEY3ZJIT_cjs.AnimatedPresence, { children: order !== "desc" && !isAtBottom && /* @__PURE__ */ jsxRuntime.jsx(
1510
+ chunkIEY3ZJIT_cjs.Animated,
1511
+ {
1512
+ preset: "fade",
1513
+ mode: "presence",
1514
+ className: "absolute inset-x-0 bottom-0 z-20",
1515
+ children: /* @__PURE__ */ jsxRuntime.jsx(
1516
+ chunkMYHV2ND3_cjs.JumpToBottomButton,
1517
+ {
1518
+ dataSlot: "superchat-jump-to-bottom",
1519
+ hasNewMessages: hasNewBelow,
1520
+ onClick: handleJumpToBottom
1521
+ }
1522
+ )
1523
+ },
1524
+ "jump-to-bottom"
1525
+ ) })
1526
+ ]
1344
1527
  }
1345
1528
  ),
1346
1529
  /* @__PURE__ */ jsxRuntime.jsx(
1347
- chunkX4XPNTCZ_cjs.ChatComposer,
1530
+ chunkLJZKEMAH_cjs.ChatComposer,
1348
1531
  {
1349
1532
  value: draft,
1350
1533
  onValueChange: handleDraftChange,
1351
1534
  onSend: handleComposerSend,
1352
1535
  disabled: readOnly,
1536
+ className: "px-4 pb-4",
1353
1537
  placeholder: readOnly ? "Read-only conversation" : "Type a message\u2026 use @ to address an agent",
1354
1538
  mentionOptions,
1355
1539
  allowAttachments: !readOnly,
@@ -1371,12 +1555,14 @@ function SuperChatConversations({
1371
1555
  onConversationOpened,
1372
1556
  onNewConversation
1373
1557
  }) {
1374
- const [internalActive, setInternalActive] = React2__namespace.useState(
1558
+ const [internalActive, setInternalActive] = React3__namespace.useState(
1375
1559
  defaultActiveConversationId ?? conversations[0]?.id
1376
1560
  );
1561
+ const [hasMounted, setHasMounted] = React3__namespace.useState(false);
1562
+ React3__namespace.useEffect(() => setHasMounted(true), []);
1377
1563
  const requestedId = activeConversationId ?? internalActive;
1378
1564
  const activeId = conversations.some((c) => c.id === requestedId) ? requestedId : conversations[0]?.id;
1379
- const sortedConversations = React2__namespace.useMemo(
1565
+ const sortedConversations = React3__namespace.useMemo(
1380
1566
  () => [...conversations].sort((a, b) => lastActivityOf(b) - lastActivityOf(a)),
1381
1567
  [conversations]
1382
1568
  );
@@ -1428,10 +1614,21 @@ function SuperChatConversations({
1428
1614
  /* @__PURE__ */ jsxRuntime.jsx("span", { className: "block truncate font-medium", children: c.title }),
1429
1615
  last?.text && /* @__PURE__ */ jsxRuntime.jsx("span", { className: "block truncate text-xs text-neutral-600 dark:text-neutral-400", children: last.text })
1430
1616
  ] }),
1431
- !!c.unread && /* @__PURE__ */ jsxRuntime.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: [
1432
- c.unread,
1433
- /* @__PURE__ */ jsxRuntime.jsx("span", { className: "sr-only", children: " unread messages" })
1434
- ] })
1617
+ /* @__PURE__ */ jsxRuntime.jsx(chunkIEY3ZJIT_cjs.AnimatedPresence, { initial: hasMounted, children: !!c.unread && /* @__PURE__ */ jsxRuntime.jsxs(
1618
+ chunkIEY3ZJIT_cjs.Animated,
1619
+ {
1620
+ as: "span",
1621
+ preset: "pop",
1622
+ mode: "presence",
1623
+ "data-slot": "superchat-unread-badge",
1624
+ 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",
1625
+ children: [
1626
+ c.unread,
1627
+ /* @__PURE__ */ jsxRuntime.jsx("span", { className: "sr-only", children: " unread messages" })
1628
+ ]
1629
+ },
1630
+ "unread"
1631
+ ) })
1435
1632
  ]
1436
1633
  }
1437
1634
  ) }, c.id);
@@ -1465,13 +1662,13 @@ function SuperChatInbox({
1465
1662
  onNewConversation,
1466
1663
  onReferenceClick
1467
1664
  }) {
1468
- const [internalActive, setInternalActive] = React2__namespace.useState(
1665
+ const [internalActive, setInternalActive] = React3__namespace.useState(
1469
1666
  defaultActiveConversationId ?? conversations[0]?.id
1470
1667
  );
1471
1668
  const requestedId = activeConversationId ?? internalActive;
1472
1669
  const active = conversations.find((c) => c.id === requestedId) ?? conversations[0];
1473
1670
  const activeId = active?.id;
1474
- const [mobileView, setMobileView] = React2__namespace.useState("list");
1671
+ const [mobileView, setMobileView] = React3__namespace.useState("list");
1475
1672
  const handleOpen = (c) => {
1476
1673
  if (activeConversationId === void 0) setInternalActive(c.id);
1477
1674
  setMobileView("chat");