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

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 (398) 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.d.cts +37 -0
  329. package/dist/kerebron.d.ts +37 -0
  330. package/dist/kerebron.js +58 -19
  331. package/dist/kerebron.js.map +1 -1
  332. package/dist/motion.cjs +7 -7
  333. package/dist/motion.d.cts +186 -2
  334. package/dist/motion.d.ts +186 -2
  335. package/dist/motion.js +2 -2
  336. package/dist/q.d.cts +25 -3
  337. package/dist/q.d.ts +25 -3
  338. package/dist/{speaker-verify-5GTWAN5Y.cjs → speaker-verify-4NEJAK6C.cjs} +57 -90
  339. package/dist/speaker-verify-4NEJAK6C.cjs.map +1 -0
  340. package/dist/{speaker-verify-R67P433H.js → speaker-verify-AWSKI6DI.js} +57 -90
  341. package/dist/speaker-verify-AWSKI6DI.js.map +1 -0
  342. package/dist/styles/effects.css +33 -0
  343. package/dist/styles.css +1 -1
  344. package/dist/tailwind-preset.cjs +4 -4
  345. package/dist/tailwind-preset.js +1 -1
  346. package/dist/templates.cjs +103 -0
  347. package/dist/templates.cjs.map +1 -0
  348. package/dist/templates.d.cts +560 -0
  349. package/dist/templates.d.ts +560 -0
  350. package/dist/templates.js +10 -0
  351. package/dist/templates.js.map +1 -0
  352. package/dist/types-C3HQe74F.d.cts +86 -0
  353. package/dist/types-C3HQe74F.d.ts +86 -0
  354. package/dist/{types-B97JNRNQ.d.cts → types-DOxdTwmq.d.cts} +170 -2
  355. package/dist/{types-gZXrfLj6.d.ts → types-DOxdTwmq.d.ts} +170 -2
  356. package/dist/utils/index.d.cts +13 -2
  357. package/dist/utils/index.d.ts +13 -2
  358. package/package.json +21 -4
  359. package/dist/Animated-XmH6k8pZ.d.cts +0 -188
  360. package/dist/Animated-XmH6k8pZ.d.ts +0 -188
  361. package/dist/CsvBlock-ROJCKJDP.cjs +0 -16
  362. package/dist/CsvBlock-UWPMTLE2.js +0 -7
  363. package/dist/HtmlPreviewBlock-DWFN6EUB.cjs +0 -16
  364. package/dist/HtmlPreviewBlock-ME5U3XNS.js +0 -7
  365. package/dist/MedicationEditor-Bp4NLy7y.d.cts +0 -352
  366. package/dist/MedicationEditor-Bp4NLy7y.d.ts +0 -352
  367. package/dist/MermaidBlock-2B6CPD6Y.js +0 -7
  368. package/dist/MermaidBlock-D2UC5M55.cjs +0 -16
  369. package/dist/SurveyBlock-4CD4AYMJ.cjs +0 -16
  370. package/dist/SurveyBlock-4DO62RBT.js +0 -7
  371. package/dist/chunk-22CYDCXA.js.map +0 -1
  372. package/dist/chunk-ACCAXVOG.js.map +0 -1
  373. package/dist/chunk-GOALNQZ2.js.map +0 -1
  374. package/dist/chunk-JHULS3EC.js.map +0 -1
  375. package/dist/chunk-JI244Y7C.js.map +0 -1
  376. package/dist/chunk-NV2CWBI2.cjs.map +0 -1
  377. package/dist/chunk-U42F3HLE.cjs.map +0 -1
  378. package/dist/chunk-VNYW4C4J.cjs.map +0 -1
  379. package/dist/chunk-WIAQQNFU.cjs.map +0 -1
  380. package/dist/chunk-WNAA6CLE.cjs.map +0 -1
  381. package/dist/chunk-X4XPNTCZ.cjs.map +0 -1
  382. package/dist/chunk-XCP454Q6.js.map +0 -1
  383. package/dist/html-MdxqSzjD.d.cts +0 -13
  384. package/dist/html-MdxqSzjD.d.ts +0 -13
  385. package/dist/orderRows-BUJYgSc7.d.cts +0 -221
  386. package/dist/orderRows-BUJYgSc7.d.ts +0 -221
  387. package/dist/speaker-verify-5GTWAN5Y.cjs.map +0 -1
  388. package/dist/speaker-verify-R67P433H.js.map +0 -1
  389. package/dist/transcript-Cg7uSW-C.d.cts +0 -84
  390. package/dist/transcript-Cg7uSW-C.d.ts +0 -84
  391. package/dist/types-CnPEwzlp.d.cts +0 -254
  392. package/dist/types-CnPEwzlp.d.ts +0 -254
  393. package/dist/useAnchoredPosition-CKwLSQW8.d.cts +0 -76
  394. package/dist/useAnchoredPosition-CKwLSQW8.d.ts +0 -76
  395. package/dist/useTheme-B9SWu6ui.d.cts +0 -24
  396. package/dist/useTheme-B9SWu6ui.d.ts +0 -24
  397. package/dist/useTranscriptEdits-CGzlemHT.d.cts +0 -182
  398. package/dist/useTranscriptEdits-D32bLs0l.d.ts +0 -182
@@ -1,10 +1,11 @@
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-22CYDCXA.js';
4
- import { notifyComposerMigrationOnce, ChatComposer } from '../../chunk-ACCAXVOG.js';
5
- import { Dropdown, DropdownSubmenu, DropdownItem } from '../../chunk-ZGRCSNPK.js';
3
+ import { ChatBubble, MCPToolCallDisplay, AITypingIndicator, SparklesIcon, CloseIcon, JumpToBottomButton } from '../../chunk-TZJQB4P2.js';
4
+ import { notifyComposerMigrationOnce, ChatComposer } from '../../chunk-2ABWFQQH.js';
5
+ import { Dropdown, DropdownSubmenu, DropdownItem } from '../../chunk-TF7YWJHU.js';
6
6
  import { Avatar } from '../../chunk-HZ4MBUC3.js';
7
7
  import '../../chunk-IQ4KQJAO.js';
8
+ import { useStickToBottom, useStreamEndedBelowFold } from '../../chunk-BM35CACB.js';
8
9
  import '../../chunk-VVDE4CHU.js';
9
10
  import '../../chunk-6NZXWKUE.js';
10
11
  import '../../chunk-3IMM2PM4.js';
@@ -12,11 +13,12 @@ import '../../chunk-62ZOA6PX.js';
12
13
  import '../../chunk-WSNMQQ4P.js';
13
14
  import '../../chunk-T4ME7QCT.js';
14
15
  import '../../chunk-BKSPDTX4.js';
16
+ import { usePrefersReducedMotion } from '../../chunk-HB7C7NB5.js';
15
17
  import { Badge } from '../../chunk-BMSG4NBH.js';
16
- import '../../chunk-XCP454Q6.js';
18
+ import { AnimatedPresence, Animated } from '../../chunk-F4N67NAF.js';
17
19
  import { cn } from '../../chunk-TQONQSJO.js';
18
20
  import '../../chunk-PX6F3LHL.js';
19
- import * as React2 from 'react';
21
+ import * as React3 from 'react';
20
22
  import Markdown, { defaultUrlTransform } from 'react-markdown';
21
23
  import remarkGfm from 'remark-gfm';
22
24
  import rehypeSanitize, { defaultSchema } from 'rehype-sanitize';
@@ -269,7 +271,7 @@ var transformUrl = (url, key, node) => {
269
271
  }
270
272
  return defaultUrlTransform(url);
271
273
  };
272
- var MarkdownContent = React2.memo(function MarkdownContent2({
274
+ var MarkdownContent = React3.memo(function MarkdownContent2({
273
275
  text,
274
276
  messageId,
275
277
  streaming,
@@ -472,11 +474,11 @@ function useMessageCopy({
472
474
  getText,
473
475
  defaultFormat
474
476
  }) {
475
- const [copied, setCopied] = React2.useState(false);
476
- const copiedTimer = React2.useRef(
477
+ const [copied, setCopied] = React3.useState(false);
478
+ const copiedTimer = React3.useRef(
477
479
  void 0
478
480
  );
479
- React2.useEffect(() => () => window.clearTimeout(copiedTimer.current), []);
481
+ React3.useEffect(() => () => window.clearTimeout(copiedTimer.current), []);
480
482
  const flash = () => {
481
483
  setCopied(true);
482
484
  window.clearTimeout(copiedTimer.current);
@@ -529,7 +531,7 @@ function FooterActionButton({
529
531
  action,
530
532
  isSelf
531
533
  }) {
532
- const [open, setOpen] = React2.useState(false);
534
+ const [open, setOpen] = React3.useState(false);
533
535
  const onClickCapture = action.submenu ? (e) => {
534
536
  if (e.metaKey || e.ctrlKey) {
535
537
  e.preventDefault();
@@ -572,17 +574,13 @@ function FooterActionButton({
572
574
  }
573
575
  );
574
576
  }
575
- var MessageActionsBar = React2.forwardRef(function MessageActionsBar2({ actions, isSelf }, ref) {
577
+ var MessageActionsBar = React3.forwardRef(function MessageActionsBar2({ actions, isSelf }, ref) {
576
578
  return /* @__PURE__ */ jsx(
577
579
  "div",
578
580
  {
579
581
  ref,
580
582
  "data-slot": "superchat-message-actions",
581
- className: cn(
582
- "flex items-center gap-0.5",
583
- isSelf && "justify-end",
584
- actionRevealClass
585
- ),
583
+ className: cn("flex flex-col items-center gap-0.5", actionRevealClass),
586
584
  children: actions.map((action) => /* @__PURE__ */ jsx(FooterActionButton, { action, isSelf }, action.id))
587
585
  }
588
586
  );
@@ -592,7 +590,7 @@ function MessageOverflowMenu({
592
590
  actions,
593
591
  footerVisible
594
592
  }) {
595
- const [open, setOpen] = React2.useState(false);
593
+ const [open, setOpen] = React3.useState(false);
596
594
  const select = (fn) => {
597
595
  setOpen(false);
598
596
  fn();
@@ -601,7 +599,7 @@ function MessageOverflowMenu({
601
599
  "div",
602
600
  {
603
601
  className: cn(
604
- "sticky bottom-2 shrink-0 self-end transition-opacity",
602
+ "sticky bottom-2 mt-auto shrink-0 transition-opacity",
605
603
  // Rich content (e.g. NITRO tables) layers internals up to z-50, so the
606
604
  // open menu's stacking context must clear that.
607
605
  open ? "z-[60]" : "z-10",
@@ -645,7 +643,7 @@ function MessageOverflowMenu({
645
643
  }
646
644
  );
647
645
  }
648
- var MessageRow = React2.memo(function MessageRow2({
646
+ var MessageRow = React3.memo(function MessageRow2({
649
647
  message,
650
648
  participant,
651
649
  isSelf,
@@ -658,17 +656,18 @@ var MessageRow = React2.memo(function MessageRow2({
658
656
  }) {
659
657
  const streaming = message.status === "streaming";
660
658
  const hasBody = !!message.text || (message.content?.length ?? 0) > 0;
661
- const [isEditing, setIsEditing] = React2.useState(false);
662
- const [draft, setDraft] = React2.useState(message.text ?? "");
663
- const editRef = React2.useRef(null);
664
- const bubbleRef = React2.useRef(null);
665
- const autosize = React2.useCallback(() => {
659
+ const [isEditing, setIsEditing] = React3.useState(false);
660
+ const [draft, setDraft] = React3.useState(message.text ?? "");
661
+ const [editMinWidth, setEditMinWidth] = React3.useState();
662
+ const editRef = React3.useRef(null);
663
+ const bubbleRef = React3.useRef(null);
664
+ const autosize = React3.useCallback(() => {
666
665
  const el = editRef.current;
667
666
  if (!el) return;
668
667
  el.style.height = "auto";
669
668
  el.style.height = `${el.scrollHeight}px`;
670
669
  }, []);
671
- React2.useEffect(() => {
670
+ React3.useEffect(() => {
672
671
  if (!isEditing) return;
673
672
  const el = editRef.current;
674
673
  if (!el) return;
@@ -689,16 +688,19 @@ ${block.text}
689
688
  return "";
690
689
  }).filter(Boolean).join("\n\n") ?? "";
691
690
  const canCopy = !isEditing && (!!message.content?.length || typeof message.text === "string" && message.text.length > 0);
692
- const hasActions = canCopy || canEdit && !isEditing;
691
+ const showEditAction = canEdit && !isEditing;
692
+ const actionCount = (canCopy ? 1 : 0) + (showEditAction ? 1 : 0);
693
+ const hasActions = actionCount > 0;
694
+ const collapseToMenu = actionCount > 1;
693
695
  const copy = useMessageCopy({
694
696
  markdown: markdownSource,
695
697
  getHtml: () => bubbleRef.current?.innerHTML ?? "",
696
698
  getText: () => bubbleRef.current?.textContent ?? "",
697
699
  defaultFormat: defaultCopyFormat
698
700
  });
699
- const actionsBarRef = React2.useRef(null);
700
- const [footerVisible, setFooterVisible] = React2.useState(true);
701
- React2.useEffect(() => {
701
+ const actionsBarRef = React3.useRef(null);
702
+ const [footerVisible, setFooterVisible] = React3.useState(true);
703
+ React3.useEffect(() => {
702
704
  const el = actionsBarRef.current;
703
705
  if (!el || typeof globalThis.IntersectionObserver === "undefined") return;
704
706
  const observer = new globalThis.IntersectionObserver(([entry]) => {
@@ -706,7 +708,7 @@ ${block.text}
706
708
  });
707
709
  observer.observe(el);
708
710
  return () => observer.disconnect();
709
- }, [hasActions]);
711
+ }, [hasActions, collapseToMenu]);
710
712
  if (message.type === "system") {
711
713
  return /* @__PURE__ */ jsx(
712
714
  "div",
@@ -739,6 +741,12 @@ ${block.text}
739
741
  const accentTextColor = accessibleAccentTextColor(accent);
740
742
  const authorName = participant?.name ?? "Unknown";
741
743
  const startEdit = () => {
744
+ const el = bubbleRef.current;
745
+ if (el) {
746
+ const cs = getComputedStyle(el);
747
+ const contentWidth = el.clientWidth - parseFloat(cs.paddingLeft) - parseFloat(cs.paddingRight);
748
+ setEditMinWidth(contentWidth > 0 ? contentWidth : void 0);
749
+ }
742
750
  setDraft(message.text ?? "");
743
751
  setIsEditing(true);
744
752
  };
@@ -812,7 +820,7 @@ ${block.text}
812
820
  }
813
821
  }
814
822
  ] : [],
815
- ...canEdit && !isEditing ? [
823
+ ...showEditAction ? [
816
824
  {
817
825
  id: "edit",
818
826
  label: "Edit message",
@@ -832,172 +840,191 @@ ${block.text}
832
840
  isSelf ? "flex-row-reverse" : "flex-row"
833
841
  ),
834
842
  children: [
835
- /* @__PURE__ */ jsx(ParticipantAvatar, { participant }),
836
- /* @__PURE__ */ jsxs("div", { className: cn("flex min-w-0 flex-col gap-1", isSelf && "items-end"), children: [
837
- /* @__PURE__ */ jsxs(
838
- "div",
839
- {
840
- "data-slot": "superchat-message-meta",
841
- className: "flex items-baseline gap-2",
842
- children: [
843
+ /* @__PURE__ */ jsxs(
844
+ "div",
845
+ {
846
+ "data-slot": "superchat-message-gutter",
847
+ className: "flex shrink-0 flex-col items-center gap-1",
848
+ children: [
849
+ /* @__PURE__ */ jsx(ParticipantAvatar, { participant }),
850
+ hasActions && /* @__PURE__ */ jsxs(Fragment, { children: [
843
851
  /* @__PURE__ */ jsx(
844
- "span",
845
- {
846
- className: "text-xs font-medium",
847
- style: accentTextColor ? { color: accentTextColor } : void 0,
848
- children: authorName
849
- }
850
- ),
851
- participant?.role && /* @__PURE__ */ jsx("span", { className: "text-[10px] text-neutral-500 dark:text-neutral-400", children: participant.role }),
852
- /* @__PURE__ */ jsx("span", { className: "text-[10px] text-neutral-500 dark:text-neutral-400", children: formatTime(message.time) }),
853
- message.editedAt && /* @__PURE__ */ jsx(
854
- "span",
855
- {
856
- "data-slot": "superchat-edited-indicator",
857
- className: "text-[10px] text-neutral-500 dark:text-neutral-400",
858
- title: `Edited ${formatTime(message.editedAt)}`,
859
- children: "(edited)"
860
- }
861
- )
862
- ]
863
- }
864
- ),
865
- /* @__PURE__ */ jsxs(
866
- "div",
867
- {
868
- className: cn(
869
- "flex items-center gap-1",
870
- isSelf ? "flex-row-reverse" : "flex-row"
871
- ),
872
- children: [
873
- hasActions && /* @__PURE__ */ jsx(
874
852
  MessageOverflowMenu,
875
853
  {
876
854
  isSelf,
877
855
  actions,
878
- footerVisible
856
+ footerVisible: collapseToMenu ? false : footerVisible
879
857
  }
880
858
  ),
881
- /* @__PURE__ */ jsx(
882
- ChatBubble,
859
+ !collapseToMenu && /* @__PURE__ */ jsx(
860
+ MessageActionsBar,
883
861
  {
884
- ref: bubbleRef,
885
- "data-slot": "superchat-bubble",
886
- variant: isSelf ? "user" : "assistant",
887
- hasError: message.status === "error",
888
- className: "text-sm has-[[data-slot=superchat-nitro-table]]:w-full has-[[data-slot=superchat-nitro-table]]:max-w-full",
889
- children: isEditing ? /* @__PURE__ */ jsxs(
890
- "div",
862
+ ref: actionsBarRef,
863
+ actions,
864
+ isSelf
865
+ }
866
+ )
867
+ ] })
868
+ ]
869
+ }
870
+ ),
871
+ /* @__PURE__ */ jsxs(
872
+ "div",
873
+ {
874
+ className: cn(
875
+ "flex min-w-0 flex-1 flex-col gap-1",
876
+ isSelf && "items-end"
877
+ ),
878
+ children: [
879
+ /* @__PURE__ */ jsxs(
880
+ "div",
881
+ {
882
+ "data-slot": "superchat-message-meta",
883
+ className: "flex items-baseline gap-2",
884
+ children: [
885
+ /* @__PURE__ */ jsx(
886
+ "span",
891
887
  {
892
- "data-slot": "superchat-message-editor",
893
- className: "flex w-80 max-w-full flex-col gap-2",
894
- children: [
895
- /* @__PURE__ */ jsx(
896
- "textarea",
897
- {
898
- value: draft,
899
- ref: editRef,
900
- rows: 2,
901
- onChange: (e) => {
902
- setDraft(e.target.value);
903
- autosize();
904
- },
905
- onPaste: handleEditPaste,
906
- onKeyDown: (e) => {
907
- if (e.key === "Enter" && !e.shiftKey) {
908
- e.preventDefault();
909
- saveEdit();
910
- } else if (e.key === "Escape") {
911
- e.preventDefault();
912
- cancelEdit();
913
- }
914
- },
915
- "aria-label": "Edit message",
916
- 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"
917
- }
918
- ),
919
- /* @__PURE__ */ jsxs("div", { className: "flex justify-end gap-2", children: [
888
+ className: "text-xs font-medium",
889
+ style: accentTextColor ? { color: accentTextColor } : void 0,
890
+ children: authorName
891
+ }
892
+ ),
893
+ participant?.role && /* @__PURE__ */ jsx("span", { className: "text-[10px] text-neutral-500 dark:text-neutral-400", children: participant.role }),
894
+ /* @__PURE__ */ jsx("span", { className: "text-[10px] text-neutral-500 dark:text-neutral-400", children: formatTime(message.time) }),
895
+ message.editedAt && /* @__PURE__ */ jsx(
896
+ "span",
897
+ {
898
+ "data-slot": "superchat-edited-indicator",
899
+ className: "text-[10px] text-neutral-500 dark:text-neutral-400",
900
+ title: `Edited ${formatTime(message.editedAt)}`,
901
+ children: "(edited)"
902
+ }
903
+ )
904
+ ]
905
+ }
906
+ ),
907
+ /* @__PURE__ */ jsx(
908
+ "div",
909
+ {
910
+ className: cn(
911
+ "flex w-full items-center gap-1",
912
+ isSelf ? "flex-row-reverse" : "flex-row"
913
+ ),
914
+ children: /* @__PURE__ */ jsx(
915
+ ChatBubble,
916
+ {
917
+ ref: bubbleRef,
918
+ "data-slot": "superchat-bubble",
919
+ variant: isSelf ? "user" : "assistant",
920
+ hasError: message.status === "error",
921
+ className: "text-sm has-[[data-slot=superchat-nitro-table]]:w-full has-[[data-slot=superchat-nitro-table]]:max-w-full",
922
+ children: isEditing ? /* @__PURE__ */ jsxs(
923
+ "div",
924
+ {
925
+ "data-slot": "superchat-message-editor",
926
+ className: "flex w-80 max-w-full flex-col gap-2",
927
+ style: editMinWidth ? { minWidth: editMinWidth } : void 0,
928
+ children: [
920
929
  /* @__PURE__ */ jsx(
921
- "button",
930
+ "textarea",
922
931
  {
923
- type: "button",
924
- onClick: cancelEdit,
925
- className: "rounded-md px-2.5 py-1 text-xs font-medium text-neutral-200 hover:bg-white/10",
926
- children: "Cancel"
932
+ value: draft,
933
+ ref: editRef,
934
+ rows: 2,
935
+ onChange: (e) => {
936
+ setDraft(e.target.value);
937
+ autosize();
938
+ },
939
+ onPaste: handleEditPaste,
940
+ onKeyDown: (e) => {
941
+ if (e.key === "Enter" && !e.shiftKey) {
942
+ e.preventDefault();
943
+ saveEdit();
944
+ } else if (e.key === "Escape") {
945
+ e.preventDefault();
946
+ cancelEdit();
947
+ }
948
+ },
949
+ "aria-label": "Edit message",
950
+ 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"
927
951
  }
928
952
  ),
929
- /* @__PURE__ */ jsx(
930
- "button",
931
- {
932
- type: "button",
933
- onClick: saveEdit,
934
- disabled: !draft.trim() || draft.trim() === message.text,
935
- className: "rounded-md bg-white px-2.5 py-1 text-xs font-medium text-neutral-900 hover:bg-neutral-100 disabled:opacity-40",
936
- children: "Save"
937
- }
938
- )
939
- ] })
940
- ]
941
- }
942
- ) : /* @__PURE__ */ jsxs(Fragment, { children: [
943
- message.content?.map((block, i) => {
944
- if (block.type === "tool_use" && block.toolCall) {
945
- return /* @__PURE__ */ jsx(MCPToolCallDisplay, { toolCall: block.toolCall }, i);
946
- }
947
- if ((block.type === "text" || block.type === "thinking") && block.text) {
948
- return /* @__PURE__ */ jsx(
949
- "div",
950
- {
951
- className: "prose prose-sm dark:prose-invert max-w-none **:wrap-break-word",
952
- children: renderText(block.text, {
953
- messageId: message.id,
954
- streaming,
955
- role: participant?.kind === "human" ? "user" : "assistant"
956
- })
957
- },
958
- i
959
- );
953
+ /* @__PURE__ */ jsxs("div", { className: "flex justify-end gap-2", children: [
954
+ /* @__PURE__ */ jsx(
955
+ "button",
956
+ {
957
+ type: "button",
958
+ onClick: cancelEdit,
959
+ className: "rounded-md px-2.5 py-1 text-xs font-medium text-neutral-200 hover:bg-white/10",
960
+ children: "Cancel"
961
+ }
962
+ ),
963
+ /* @__PURE__ */ jsx(
964
+ "button",
965
+ {
966
+ type: "button",
967
+ onClick: saveEdit,
968
+ disabled: !draft.trim() || draft.trim() === message.text,
969
+ className: "rounded-md bg-white px-2.5 py-1 text-xs font-medium text-neutral-900 hover:bg-neutral-100 disabled:opacity-40",
970
+ children: "Save"
971
+ }
972
+ )
973
+ ] })
974
+ ]
960
975
  }
961
- if (block.type === "code" && block.text) {
962
- const fenced = `\`\`\`${block.language ?? ""}
976
+ ) : /* @__PURE__ */ jsxs(Fragment, { children: [
977
+ message.content?.map((block, i) => {
978
+ if (block.type === "tool_use" && block.toolCall) {
979
+ return /* @__PURE__ */ jsx(MCPToolCallDisplay, { toolCall: block.toolCall }, i);
980
+ }
981
+ if ((block.type === "text" || block.type === "thinking") && block.text) {
982
+ return /* @__PURE__ */ jsx(
983
+ "div",
984
+ {
985
+ className: "prose prose-sm dark:prose-invert max-w-none **:wrap-break-word",
986
+ children: renderText(block.text, {
987
+ messageId: message.id,
988
+ streaming,
989
+ role: participant?.kind === "human" ? "user" : "assistant"
990
+ })
991
+ },
992
+ i
993
+ );
994
+ }
995
+ if (block.type === "code" && block.text) {
996
+ const fenced = `\`\`\`${block.language ?? ""}
963
997
  ${block.text}
964
998
  \`\`\``;
965
- return /* @__PURE__ */ jsx(
966
- "div",
967
- {
968
- className: "prose prose-sm dark:prose-invert max-w-none **:wrap-break-word",
969
- children: renderText(fenced, {
970
- messageId: message.id,
971
- streaming,
972
- role: participant?.kind === "human" ? "user" : "assistant"
973
- })
974
- },
975
- i
976
- );
977
- }
978
- return null;
979
- }),
980
- message.text && /* @__PURE__ */ jsx("div", { className: "prose prose-sm dark:prose-invert max-w-none **:wrap-break-word", children: renderText(message.text, {
981
- messageId: message.id,
982
- streaming,
983
- role: participant?.kind === "human" ? "user" : "assistant"
984
- }) }),
985
- streaming && !hasBody && /* @__PURE__ */ jsx("div", { className: "flex items-center justify-center", children: /* @__PURE__ */ jsx(AITypingIndicator, {}) })
986
- ] })
987
- }
988
- )
989
- ]
990
- }
991
- ),
992
- hasActions && /* @__PURE__ */ jsx(
993
- MessageActionsBar,
994
- {
995
- ref: actionsBarRef,
996
- actions,
997
- isSelf
998
- }
999
- )
1000
- ] })
999
+ return /* @__PURE__ */ jsx(
1000
+ "div",
1001
+ {
1002
+ className: "prose prose-sm dark:prose-invert max-w-none **:wrap-break-word",
1003
+ children: renderText(fenced, {
1004
+ messageId: message.id,
1005
+ streaming,
1006
+ role: participant?.kind === "human" ? "user" : "assistant"
1007
+ })
1008
+ },
1009
+ i
1010
+ );
1011
+ }
1012
+ return null;
1013
+ }),
1014
+ message.text && /* @__PURE__ */ jsx("div", { className: "prose prose-sm dark:prose-invert max-w-none **:wrap-break-word", children: renderText(message.text, {
1015
+ messageId: message.id,
1016
+ streaming,
1017
+ role: participant?.kind === "human" ? "user" : "assistant"
1018
+ }) }),
1019
+ streaming && !hasBody && /* @__PURE__ */ jsx("div", { className: "flex items-center justify-center", children: /* @__PURE__ */ jsx(AITypingIndicator, {}) })
1020
+ ] })
1021
+ }
1022
+ )
1023
+ }
1024
+ )
1025
+ ]
1026
+ }
1027
+ )
1001
1028
  ]
1002
1029
  }
1003
1030
  );
@@ -1024,32 +1051,23 @@ function VirtualThread({
1024
1051
  editable,
1025
1052
  onMessageEdited,
1026
1053
  defaultCopyFormat,
1027
- order,
1028
- conversationId,
1054
+ scrollRef,
1055
+ contentRef,
1029
1056
  containerProps
1030
1057
  }) {
1031
- const parentRef = React2.useRef(null);
1032
1058
  const virtualizer = useVirtualizer({
1033
1059
  count: items.length,
1034
- getScrollElement: () => parentRef.current,
1060
+ getScrollElement: () => scrollRef.current,
1035
1061
  // Rough first guess; real heights are measured via measureElement.
1036
1062
  estimateSize: () => 88,
1037
1063
  overscan: 10,
1038
1064
  getItemKey: (index) => items[index]?.id ?? index
1039
1065
  });
1040
- const count = items.length;
1041
- React2.useEffect(() => {
1042
- if (count === 0) return;
1043
- if (order === "desc") {
1044
- virtualizer.scrollToIndex(0, { align: "start" });
1045
- } else {
1046
- virtualizer.scrollToIndex(count - 1, { align: "end" });
1047
- }
1048
- }, [count, conversationId, order]);
1049
1066
  const virtualItems = virtualizer.getVirtualItems();
1050
- return /* @__PURE__ */ jsx("div", { ...containerProps, ref: parentRef, children: /* @__PURE__ */ jsx(
1067
+ return /* @__PURE__ */ jsx("div", { ...containerProps, ref: scrollRef, children: /* @__PURE__ */ jsx(
1051
1068
  "div",
1052
1069
  {
1070
+ ref: contentRef,
1053
1071
  style: {
1054
1072
  height: virtualizer.getTotalSize(),
1055
1073
  position: "relative",
@@ -1110,38 +1128,180 @@ function SuperChat({
1110
1128
  onReferenceClick,
1111
1129
  onBack
1112
1130
  }) {
1113
- const headingId = React2.useId();
1114
- React2.useEffect(() => {
1131
+ const headingId = React3.useId();
1132
+ React3.useEffect(() => {
1115
1133
  notifyComposerMigrationOnce("SuperChat");
1116
1134
  }, []);
1117
- const renderText = React2.useMemo(
1135
+ const renderText = React3.useMemo(
1118
1136
  () => renderTextContent ?? createMarkdownRenderer({
1119
1137
  plugins: renderPlugins,
1120
1138
  trusted: trustedContent
1121
1139
  }),
1122
1140
  [renderTextContent, renderPlugins, trustedContent]
1123
1141
  );
1124
- const threadRef = React2.useRef(null);
1125
- React2.useEffect(() => {
1126
- if (virtualized) return;
1127
- const el = threadRef.current;
1128
- if (!el) return;
1129
- el.scrollTop = order === "desc" ? 0 : el.scrollHeight;
1130
- }, [conversation.thread.length, conversation.id, order, virtualized]);
1131
- const participantById = React2.useMemo(() => {
1142
+ const prefersReducedMotion = usePrefersReducedMotion();
1143
+ const {
1144
+ containerRef: threadRef,
1145
+ contentRef: threadContentRef,
1146
+ isAtBottom,
1147
+ scrollToBottom,
1148
+ anchorToTurnStart,
1149
+ followIfPinned,
1150
+ stopFollowing
1151
+ } = useStickToBottom({ disabled: order === "desc" });
1152
+ const [hasNewBelow, setHasNewBelow] = React3.useState(false);
1153
+ const [turnStartId, setTurnStartId] = React3.useState(null);
1154
+ const [turnMinHeight, setTurnMinHeight] = React3.useState();
1155
+ const anchoredTurnRef = React3.useRef(null);
1156
+ React3.useEffect(() => {
1157
+ setTurnStartId(null);
1158
+ anchoredTurnRef.current = null;
1159
+ if (order === "desc") {
1160
+ const el = threadRef.current;
1161
+ if (el) el.scrollTop = 0;
1162
+ } else {
1163
+ scrollToBottom("auto");
1164
+ }
1165
+ setHasNewBelow(false);
1166
+ }, [conversation.id, order]);
1167
+ const threadLength = conversation.thread.length;
1168
+ const prevThreadLengthRef = React3.useRef(threadLength);
1169
+ const prevMessageIdsRef = React3.useRef(
1170
+ new Set(conversation.thread.map((message) => message.id))
1171
+ );
1172
+ const policyConversationRef = React3.useRef(conversation.id);
1173
+ const policyBaselinedRef = React3.useRef(false);
1174
+ React3.useEffect(() => {
1175
+ if (!policyBaselinedRef.current || policyConversationRef.current !== conversation.id) {
1176
+ policyBaselinedRef.current = true;
1177
+ policyConversationRef.current = conversation.id;
1178
+ prevThreadLengthRef.current = threadLength;
1179
+ prevMessageIdsRef.current = new Set(
1180
+ conversation.thread.map((message) => message.id)
1181
+ );
1182
+ if (order !== "desc" && [...conversation.thread].sort(byTime).at(-1)?.status === "streaming") {
1183
+ stopFollowing();
1184
+ }
1185
+ return;
1186
+ }
1187
+ if (threadLength === prevThreadLengthRef.current) return;
1188
+ const grew = threadLength > prevThreadLengthRef.current;
1189
+ prevThreadLengthRef.current = threadLength;
1190
+ if (order === "desc") {
1191
+ const el = threadRef.current;
1192
+ if (el) el.scrollTop = 0;
1193
+ return;
1194
+ }
1195
+ const prevIds = prevMessageIdsRef.current;
1196
+ let turnStart;
1197
+ if (grew && currentParticipantId) {
1198
+ for (const message of [...conversation.thread].sort(byTime)) {
1199
+ if (!prevIds.has(message.id) && message.participantId === currentParticipantId) {
1200
+ turnStart = message.id;
1201
+ }
1202
+ }
1203
+ }
1204
+ if (turnStart) {
1205
+ if (virtualized) {
1206
+ scrollToBottom("auto");
1207
+ } else {
1208
+ setTurnStartId(turnStart);
1209
+ }
1210
+ } else if (grew) {
1211
+ const newest = [...conversation.thread].sort(byTime).at(-1);
1212
+ if (newest?.status === "streaming") {
1213
+ followIfPinned("auto");
1214
+ stopFollowing();
1215
+ } else if (!followIfPinned("auto")) {
1216
+ setHasNewBelow(true);
1217
+ }
1218
+ } else {
1219
+ followIfPinned("auto");
1220
+ }
1221
+ }, [threadLength, order, isAtBottom, conversation.id]);
1222
+ React3.useLayoutEffect(() => {
1223
+ if (!turnStartId || anchoredTurnRef.current === turnStartId) return;
1224
+ const container = threadRef.current;
1225
+ if (!container) return;
1226
+ const reserve = Math.max(0, container.clientHeight - 32);
1227
+ if (turnMinHeight !== reserve) {
1228
+ setTurnMinHeight(reserve);
1229
+ return;
1230
+ }
1231
+ const target = container.querySelector(
1232
+ '[data-slot="superchat-turn"]'
1233
+ );
1234
+ if (target) {
1235
+ anchorToTurnStart(target, prefersReducedMotion ? "auto" : "smooth");
1236
+ anchoredTurnRef.current = turnStartId;
1237
+ }
1238
+ }, [
1239
+ turnStartId,
1240
+ turnMinHeight,
1241
+ anchorToTurnStart,
1242
+ prefersReducedMotion,
1243
+ threadRef
1244
+ ]);
1245
+ React3.useEffect(() => {
1246
+ prevMessageIdsRef.current = new Set(
1247
+ conversation.thread.map((message) => message.id)
1248
+ );
1249
+ });
1250
+ React3.useEffect(() => {
1251
+ if (isAtBottom) setHasNewBelow(false);
1252
+ }, [isAtBottom]);
1253
+ const newestMessage = React3.useMemo(
1254
+ () => [...conversation.thread].sort(byTime).at(-1),
1255
+ [conversation]
1256
+ );
1257
+ const raiseNewBelow = React3.useCallback(() => {
1258
+ if (order !== "desc") setHasNewBelow(true);
1259
+ }, [order]);
1260
+ const resumeFollowing = React3.useCallback(() => {
1261
+ if (order !== "desc") scrollToBottom("auto");
1262
+ }, [order, scrollToBottom]);
1263
+ useStreamEndedBelowFold(
1264
+ newestMessage,
1265
+ isAtBottom,
1266
+ raiseNewBelow,
1267
+ resumeFollowing
1268
+ );
1269
+ const handleJumpToBottom = React3.useCallback(() => {
1270
+ scrollToBottom(prefersReducedMotion ? "auto" : "smooth");
1271
+ }, [scrollToBottom, prefersReducedMotion]);
1272
+ const participantById = React3.useMemo(() => {
1132
1273
  const map = /* @__PURE__ */ new Map();
1133
1274
  conversation.participants.forEach((p) => map.set(p.id, p));
1134
1275
  return map;
1135
1276
  }, [conversation]);
1136
- const orderedThread = React2.useMemo(() => {
1277
+ const orderedThread = React3.useMemo(() => {
1137
1278
  const sorted = [...conversation.thread].sort(byTime);
1138
1279
  return order === "desc" ? sorted.reverse() : sorted;
1139
1280
  }, [conversation, order]);
1140
- const onMessageEditedRef = React2.useRef(onMessageEdited);
1281
+ const turnIndex = React3.useMemo(
1282
+ () => turnStartId && order !== "desc" ? orderedThread.findIndex((message) => message.id === turnStartId) : -1,
1283
+ [orderedThread, turnStartId, order]
1284
+ );
1285
+ const renderMessageRow = (m) => /* @__PURE__ */ jsx(
1286
+ MessageRow,
1287
+ {
1288
+ message: m,
1289
+ participant: participantById.get(m.participantId),
1290
+ isSelf: !!currentParticipantId && m.participantId === currentParticipantId,
1291
+ renderText,
1292
+ linkBuilder,
1293
+ onReferenceClick,
1294
+ editable,
1295
+ onMessageEdited: handleMessageEdited,
1296
+ defaultCopyFormat
1297
+ },
1298
+ m.id
1299
+ );
1300
+ const onMessageEditedRef = React3.useRef(onMessageEdited);
1141
1301
  onMessageEditedRef.current = onMessageEdited;
1142
- const conversationRef = React2.useRef(conversation);
1302
+ const conversationRef = React3.useRef(conversation);
1143
1303
  conversationRef.current = conversation;
1144
- const handleMessageEdited = React2.useCallback(
1304
+ const handleMessageEdited = React3.useCallback(
1145
1305
  (messageId, text) => {
1146
1306
  onMessageEditedRef.current?.(messageId, text, {
1147
1307
  conversation: conversationRef.current
@@ -1150,7 +1310,7 @@ function SuperChat({
1150
1310
  []
1151
1311
  );
1152
1312
  const editable = !readOnly && !!onMessageEdited;
1153
- const mentionOptions = React2.useMemo(
1313
+ const mentionOptions = React3.useMemo(
1154
1314
  () => conversation.participants.filter((p) => p.kind !== "system").map((p) => ({
1155
1315
  id: p.id,
1156
1316
  label: p.name,
@@ -1160,17 +1320,17 @@ function SuperChat({
1160
1320
  })),
1161
1321
  [conversation.participants]
1162
1322
  );
1163
- const composerAccept = React2.useMemo(
1323
+ const composerAccept = React3.useMemo(
1164
1324
  () => acceptTokensFor(acceptedFileTypes),
1165
1325
  [acceptedFileTypes]
1166
1326
  );
1167
- const [draft, setDraft] = React2.useState("");
1168
- const draftEpochRef = React2.useRef(0);
1169
- const handleDraftChange = React2.useCallback((value) => {
1327
+ const [draft, setDraft] = React3.useState("");
1328
+ const draftEpochRef = React3.useRef(0);
1329
+ const handleDraftChange = React3.useCallback((value) => {
1170
1330
  draftEpochRef.current += 1;
1171
1331
  setDraft(value);
1172
1332
  }, []);
1173
- const handleComposerSend = React2.useCallback(
1333
+ const handleComposerSend = React3.useCallback(
1174
1334
  async (message) => {
1175
1335
  const epoch = draftEpochRef.current;
1176
1336
  try {
@@ -1266,55 +1426,78 @@ function SuperChat({
1266
1426
  ]
1267
1427
  }
1268
1428
  ),
1269
- virtualized ? /* @__PURE__ */ jsx(
1270
- VirtualThread,
1271
- {
1272
- items: orderedThread,
1273
- participantById,
1274
- currentParticipantId,
1275
- renderText,
1276
- linkBuilder,
1277
- onReferenceClick,
1278
- editable,
1279
- onMessageEdited: handleMessageEdited,
1280
- defaultCopyFormat,
1281
- order,
1282
- conversationId: conversation.id,
1283
- containerProps: {
1284
- "data-slot": "superchat-thread",
1285
- role: "log",
1286
- "aria-label": "Messages",
1287
- "aria-live": "polite",
1288
- // Focusable so keyboard-only users can scroll the message history.
1289
- tabIndex: 0,
1290
- className: "flex-1 overflow-y-auto p-4"
1291
- }
1292
- }
1293
- ) : /* @__PURE__ */ jsx(
1429
+ /* @__PURE__ */ jsxs(
1294
1430
  "div",
1295
1431
  {
1296
- "data-slot": "superchat-thread",
1297
- ref: threadRef,
1298
- role: "log",
1299
- "aria-label": "Messages",
1300
- "aria-live": "polite",
1301
- tabIndex: 0,
1302
- className: "flex-1 space-y-4 overflow-y-auto p-4",
1303
- children: orderedThread.map((m) => /* @__PURE__ */ jsx(
1304
- MessageRow,
1305
- {
1306
- message: m,
1307
- participant: participantById.get(m.participantId),
1308
- isSelf: !!currentParticipantId && m.participantId === currentParticipantId,
1309
- renderText,
1310
- linkBuilder,
1311
- onReferenceClick,
1312
- editable,
1313
- onMessageEdited: handleMessageEdited,
1314
- defaultCopyFormat
1315
- },
1316
- m.id
1317
- ))
1432
+ "data-slot": "superchat-thread-viewport",
1433
+ className: "relative flex min-h-0 flex-1 flex-col",
1434
+ children: [
1435
+ virtualized ? /* @__PURE__ */ jsx(
1436
+ VirtualThread,
1437
+ {
1438
+ items: orderedThread,
1439
+ participantById,
1440
+ currentParticipantId,
1441
+ renderText,
1442
+ linkBuilder,
1443
+ onReferenceClick,
1444
+ editable,
1445
+ onMessageEdited: handleMessageEdited,
1446
+ defaultCopyFormat,
1447
+ scrollRef: threadRef,
1448
+ contentRef: threadContentRef,
1449
+ containerProps: {
1450
+ "data-slot": "superchat-thread",
1451
+ role: "log",
1452
+ "aria-label": "Messages",
1453
+ "aria-live": "polite",
1454
+ // Focusable so keyboard-only users can scroll the message history.
1455
+ tabIndex: 0,
1456
+ className: "flex-1 overflow-y-auto p-4"
1457
+ }
1458
+ }
1459
+ ) : /* @__PURE__ */ jsx(
1460
+ "div",
1461
+ {
1462
+ "data-slot": "superchat-thread",
1463
+ ref: threadRef,
1464
+ role: "log",
1465
+ "aria-label": "Messages",
1466
+ "aria-live": "polite",
1467
+ tabIndex: 0,
1468
+ className: "flex-1 overflow-y-auto p-4",
1469
+ children: /* @__PURE__ */ jsxs("div", { ref: threadContentRef, className: "space-y-4", children: [
1470
+ (turnIndex === -1 ? orderedThread : orderedThread.slice(0, turnIndex)).map(renderMessageRow),
1471
+ turnIndex !== -1 && /* @__PURE__ */ jsx(
1472
+ "div",
1473
+ {
1474
+ "data-slot": "superchat-turn",
1475
+ className: "space-y-4",
1476
+ style: { minHeight: turnMinHeight },
1477
+ children: orderedThread.slice(turnIndex).map(renderMessageRow)
1478
+ }
1479
+ )
1480
+ ] })
1481
+ }
1482
+ ),
1483
+ /* @__PURE__ */ jsx(AnimatedPresence, { children: order !== "desc" && !isAtBottom && /* @__PURE__ */ jsx(
1484
+ Animated,
1485
+ {
1486
+ preset: "fade",
1487
+ mode: "presence",
1488
+ className: "absolute inset-x-0 bottom-0 z-20",
1489
+ children: /* @__PURE__ */ jsx(
1490
+ JumpToBottomButton,
1491
+ {
1492
+ dataSlot: "superchat-jump-to-bottom",
1493
+ hasNewMessages: hasNewBelow,
1494
+ onClick: handleJumpToBottom
1495
+ }
1496
+ )
1497
+ },
1498
+ "jump-to-bottom"
1499
+ ) })
1500
+ ]
1318
1501
  }
1319
1502
  ),
1320
1503
  /* @__PURE__ */ jsx(
@@ -1324,6 +1507,7 @@ function SuperChat({
1324
1507
  onValueChange: handleDraftChange,
1325
1508
  onSend: handleComposerSend,
1326
1509
  disabled: readOnly,
1510
+ className: "px-4 pb-4",
1327
1511
  placeholder: readOnly ? "Read-only conversation" : "Type a message\u2026 use @ to address an agent",
1328
1512
  mentionOptions,
1329
1513
  allowAttachments: !readOnly,
@@ -1345,12 +1529,14 @@ function SuperChatConversations({
1345
1529
  onConversationOpened,
1346
1530
  onNewConversation
1347
1531
  }) {
1348
- const [internalActive, setInternalActive] = React2.useState(
1532
+ const [internalActive, setInternalActive] = React3.useState(
1349
1533
  defaultActiveConversationId ?? conversations[0]?.id
1350
1534
  );
1535
+ const [hasMounted, setHasMounted] = React3.useState(false);
1536
+ React3.useEffect(() => setHasMounted(true), []);
1351
1537
  const requestedId = activeConversationId ?? internalActive;
1352
1538
  const activeId = conversations.some((c) => c.id === requestedId) ? requestedId : conversations[0]?.id;
1353
- const sortedConversations = React2.useMemo(
1539
+ const sortedConversations = React3.useMemo(
1354
1540
  () => [...conversations].sort((a, b) => lastActivityOf(b) - lastActivityOf(a)),
1355
1541
  [conversations]
1356
1542
  );
@@ -1402,10 +1588,21 @@ function SuperChatConversations({
1402
1588
  /* @__PURE__ */ jsx("span", { className: "block truncate font-medium", children: c.title }),
1403
1589
  last?.text && /* @__PURE__ */ jsx("span", { className: "block truncate text-xs text-neutral-600 dark:text-neutral-400", children: last.text })
1404
1590
  ] }),
1405
- !!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: [
1406
- c.unread,
1407
- /* @__PURE__ */ jsx("span", { className: "sr-only", children: " unread messages" })
1408
- ] })
1591
+ /* @__PURE__ */ jsx(AnimatedPresence, { initial: hasMounted, children: !!c.unread && /* @__PURE__ */ jsxs(
1592
+ Animated,
1593
+ {
1594
+ as: "span",
1595
+ preset: "pop",
1596
+ mode: "presence",
1597
+ "data-slot": "superchat-unread-badge",
1598
+ 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",
1599
+ children: [
1600
+ c.unread,
1601
+ /* @__PURE__ */ jsx("span", { className: "sr-only", children: " unread messages" })
1602
+ ]
1603
+ },
1604
+ "unread"
1605
+ ) })
1409
1606
  ]
1410
1607
  }
1411
1608
  ) }, c.id);
@@ -1439,13 +1636,13 @@ function SuperChatInbox({
1439
1636
  onNewConversation,
1440
1637
  onReferenceClick
1441
1638
  }) {
1442
- const [internalActive, setInternalActive] = React2.useState(
1639
+ const [internalActive, setInternalActive] = React3.useState(
1443
1640
  defaultActiveConversationId ?? conversations[0]?.id
1444
1641
  );
1445
1642
  const requestedId = activeConversationId ?? internalActive;
1446
1643
  const active = conversations.find((c) => c.id === requestedId) ?? conversations[0];
1447
1644
  const activeId = active?.id;
1448
- const [mobileView, setMobileView] = React2.useState("list");
1645
+ const [mobileView, setMobileView] = React3.useState("list");
1449
1646
  const handleOpen = (c) => {
1450
1647
  if (activeConversationId === void 0) setInternalActive(c.id);
1451
1648
  setMobileView("chat");