@mieweb/ui 0.10.0-dev.1 → 0.10.0-dev.11
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.
- package/agent/mieweb-ui.instructions.md +13 -1
- package/dist/CsvBlock-ROJCKJDP.cjs +16 -0
- package/dist/{CsvBlock-CVYA3HYS.cjs.map → CsvBlock-ROJCKJDP.cjs.map} +1 -1
- package/dist/CsvBlock-UWPMTLE2.js +7 -0
- package/dist/{CsvBlock-SM4NKSHA.js.map → CsvBlock-UWPMTLE2.js.map} +1 -1
- package/dist/HtmlPreviewBlock-DWFN6EUB.cjs +16 -0
- package/dist/{HtmlPreviewBlock-JF454L2L.cjs.map → HtmlPreviewBlock-DWFN6EUB.cjs.map} +1 -1
- package/dist/HtmlPreviewBlock-ME5U3XNS.js +7 -0
- package/dist/{HtmlPreviewBlock-FAMF4W24.js.map → HtmlPreviewBlock-ME5U3XNS.js.map} +1 -1
- package/dist/MermaidBlock-2B6CPD6Y.js +7 -0
- package/dist/{MermaidBlock-7V5G4K5A.js.map → MermaidBlock-2B6CPD6Y.js.map} +1 -1
- package/dist/MermaidBlock-D2UC5M55.cjs +16 -0
- package/dist/{MermaidBlock-FR5SQX4Q.cjs.map → MermaidBlock-D2UC5M55.cjs.map} +1 -1
- package/dist/SurveyBlock-4CD4AYMJ.cjs +16 -0
- package/dist/{SurveyBlock-MCJVWR7H.cjs.map → SurveyBlock-4CD4AYMJ.cjs.map} +1 -1
- package/dist/SurveyBlock-4DO62RBT.js +7 -0
- package/dist/{SurveyBlock-6K2POV7S.js.map → SurveyBlock-4DO62RBT.js.map} +1 -1
- package/dist/brands/index.cjs +20 -20
- package/dist/brands/index.js +4 -4
- package/dist/brands/types.cjs +4 -4
- package/dist/brands/types.d.cts +9 -0
- package/dist/brands/types.d.ts +9 -0
- package/dist/brands/types.js +1 -1
- package/dist/{chunk-XTHMC76F.cjs → chunk-2G75X6TS.cjs} +4 -4
- package/dist/{chunk-XTHMC76F.cjs.map → chunk-2G75X6TS.cjs.map} +1 -1
- package/dist/chunk-2IZLKPUW.js +412 -0
- package/dist/chunk-2IZLKPUW.js.map +1 -0
- package/dist/{chunk-VSVGMMNO.js → chunk-3M7TAXNR.js} +3 -3
- package/dist/{chunk-VSVGMMNO.js.map → chunk-3M7TAXNR.js.map} +1 -1
- package/dist/{chunk-5Z6UPVGC.cjs → chunk-3QEVGSFG.cjs} +5 -5
- package/dist/{chunk-5Z6UPVGC.cjs.map → chunk-3QEVGSFG.cjs.map} +1 -1
- package/dist/{chunk-PYHFVYVZ.js → chunk-3QGS6CXD.js} +3 -3
- package/dist/{chunk-PYHFVYVZ.js.map → chunk-3QGS6CXD.js.map} +1 -1
- package/dist/chunk-3YBS4WUQ.js +52 -0
- package/dist/chunk-3YBS4WUQ.js.map +1 -0
- package/dist/chunk-462XSCP3.cjs +199 -0
- package/dist/chunk-462XSCP3.cjs.map +1 -0
- package/dist/{chunk-X5YM3KXY.js → chunk-4A3W4TQF.js} +201 -4
- package/dist/chunk-4A3W4TQF.js.map +1 -0
- package/dist/chunk-4IS3QCOQ.cjs +453 -0
- package/dist/chunk-4IS3QCOQ.cjs.map +1 -0
- package/dist/chunk-4NCDU5IG.cjs +56 -0
- package/dist/chunk-4NCDU5IG.cjs.map +1 -0
- package/dist/{chunk-WOYUQ4AT.js → chunk-5GOWFNQ6.js} +9 -3
- package/dist/chunk-5GOWFNQ6.js.map +1 -0
- package/dist/chunk-5GUOOLPR.cjs +436 -0
- package/dist/chunk-5GUOOLPR.cjs.map +1 -0
- package/dist/{chunk-WUBMDOTG.js → chunk-5JJ2DAE4.js} +4 -4
- package/dist/{chunk-WUBMDOTG.js.map → chunk-5JJ2DAE4.js.map} +1 -1
- package/dist/{chunk-RSCA5AZW.cjs → chunk-5MCBWTIF.cjs} +4 -4
- package/dist/{chunk-RSCA5AZW.cjs.map → chunk-5MCBWTIF.cjs.map} +1 -1
- package/dist/chunk-6EN3IQQI.cjs +332 -0
- package/dist/chunk-6EN3IQQI.cjs.map +1 -0
- package/dist/chunk-74ENCTIK.js +162 -0
- package/dist/chunk-74ENCTIK.js.map +1 -0
- package/dist/chunk-76TBQDED.js +166 -0
- package/dist/chunk-76TBQDED.js.map +1 -0
- package/dist/{chunk-OAZUDUGX.js → chunk-7IBZA7G6.js} +4 -4
- package/dist/{chunk-OAZUDUGX.js.map → chunk-7IBZA7G6.js.map} +1 -1
- package/dist/{chunk-AUOTJQGO.cjs → chunk-7ZDPD5ZX.cjs} +4 -4
- package/dist/{chunk-AUOTJQGO.cjs.map → chunk-7ZDPD5ZX.cjs.map} +1 -1
- package/dist/{chunk-IB54SKWB.cjs → chunk-7ZXAQTV4.cjs} +8 -8
- package/dist/{chunk-IB54SKWB.cjs.map → chunk-7ZXAQTV4.cjs.map} +1 -1
- package/dist/{chunk-IIFQ6BSJ.js → chunk-ACCAXVOG.js} +6 -6
- package/dist/{chunk-IIFQ6BSJ.js.map → chunk-ACCAXVOG.js.map} +1 -1
- package/dist/{chunk-QO6PRHDX.cjs → chunk-AR7AKDM2.cjs} +2 -2
- package/dist/{chunk-QO6PRHDX.cjs.map → chunk-AR7AKDM2.cjs.map} +1 -1
- package/dist/{chunk-PY7XAG4D.cjs → chunk-ASSDGS4F.cjs} +201 -4
- package/dist/chunk-ASSDGS4F.cjs.map +1 -0
- package/dist/{chunk-24SEAAOH.js → chunk-AWJBOND5.js} +2 -2
- package/dist/{chunk-24SEAAOH.js.map → chunk-AWJBOND5.js.map} +1 -1
- package/dist/chunk-BM35CACB.js +148 -0
- package/dist/chunk-BM35CACB.js.map +1 -0
- package/dist/chunk-CR2SDI23.cjs +322 -0
- package/dist/chunk-CR2SDI23.cjs.map +1 -0
- package/dist/{chunk-OSPTA4UR.js → chunk-DEDN5HAG.js} +3 -3
- package/dist/{chunk-OSPTA4UR.js.map → chunk-DEDN5HAG.js.map} +1 -1
- package/dist/chunk-DZ5HFLRC.js +258 -0
- package/dist/chunk-DZ5HFLRC.js.map +1 -0
- package/dist/{chunk-PKD3JLS2.cjs → chunk-E4IBHYJ7.cjs} +9 -9
- package/dist/{chunk-PKD3JLS2.cjs.map → chunk-E4IBHYJ7.cjs.map} +1 -1
- package/dist/{chunk-QSVQABXD.js → chunk-ENKFJJZX.js} +7 -7
- package/dist/{chunk-QSVQABXD.js.map → chunk-ENKFJJZX.js.map} +1 -1
- package/dist/{chunk-MUIDWFYJ.js → chunk-FJ7YPVKV.js} +3 -3
- package/dist/{chunk-MUIDWFYJ.js.map → chunk-FJ7YPVKV.js.map} +1 -1
- package/dist/{chunk-3LHICE4I.cjs → chunk-FXO5ARBB.cjs} +5 -5
- package/dist/{chunk-3LHICE4I.cjs.map → chunk-FXO5ARBB.cjs.map} +1 -1
- package/dist/{chunk-QKAYRHWP.cjs → chunk-G3JX3UAU.cjs} +12 -12
- package/dist/{chunk-QKAYRHWP.cjs.map → chunk-G3JX3UAU.cjs.map} +1 -1
- package/dist/chunk-G4D6CLBT.js +333 -0
- package/dist/chunk-G4D6CLBT.js.map +1 -0
- package/dist/{chunk-OMAACCFW.cjs → chunk-GD7EBGC4.cjs} +19 -19
- package/dist/{chunk-OMAACCFW.cjs.map → chunk-GD7EBGC4.cjs.map} +1 -1
- package/dist/{chunk-KREUYVMZ.js → chunk-GOALNQZ2.js} +13 -4
- package/dist/chunk-GOALNQZ2.js.map +1 -0
- package/dist/{chunk-CK3KLRNF.js → chunk-H4ZXMQQW.js} +3 -3
- package/dist/{chunk-CK3KLRNF.js.map → chunk-H4ZXMQQW.js.map} +1 -1
- package/dist/chunk-IT775BYG.js +179 -0
- package/dist/chunk-IT775BYG.js.map +1 -0
- package/dist/{chunk-AHINB2TP.cjs → chunk-IX6KFB3K.cjs} +9 -9
- package/dist/{chunk-AHINB2TP.cjs.map → chunk-IX6KFB3K.cjs.map} +1 -1
- package/dist/chunk-IXFC7LK2.cjs +174 -0
- package/dist/chunk-IXFC7LK2.cjs.map +1 -0
- package/dist/{chunk-VNAREBLV.cjs → chunk-J5CSLNCN.cjs} +3 -3
- package/dist/{chunk-VNAREBLV.cjs.map → chunk-J5CSLNCN.cjs.map} +1 -1
- package/dist/{chunk-MM7QKUE3.cjs → chunk-JID7AZTO.cjs} +5 -5
- package/dist/{chunk-MM7QKUE3.cjs.map → chunk-JID7AZTO.cjs.map} +1 -1
- package/dist/{chunk-E3KC2XLN.cjs → chunk-KQUI4BGS.cjs} +51 -51
- package/dist/{chunk-E3KC2XLN.cjs.map → chunk-KQUI4BGS.cjs.map} +1 -1
- package/dist/{chunk-ZB54MTMQ.js → chunk-KZFBQ7GY.js} +3 -3
- package/dist/{chunk-ZB54MTMQ.js.map → chunk-KZFBQ7GY.js.map} +1 -1
- package/dist/{chunk-XBXDUAIM.js → chunk-LL6IWKI3.js} +4 -4
- package/dist/{chunk-XBXDUAIM.js.map → chunk-LL6IWKI3.js.map} +1 -1
- package/dist/{chunk-ON4JULCA.js → chunk-LMBXJZLG.js} +3 -3
- package/dist/{chunk-ON4JULCA.js.map → chunk-LMBXJZLG.js.map} +1 -1
- package/dist/{chunk-ZX2XRFE5.js → chunk-MNILXWVY.js} +7 -7
- package/dist/{chunk-ZX2XRFE5.js.map → chunk-MNILXWVY.js.map} +1 -1
- package/dist/chunk-MWVW4APN.cjs +260 -0
- package/dist/chunk-MWVW4APN.cjs.map +1 -0
- package/dist/{chunk-WIAQQNFU.cjs → chunk-MYHV2ND3.cjs} +37 -3
- package/dist/chunk-MYHV2ND3.cjs.map +1 -0
- package/dist/{chunk-BZAGP5W6.cjs → chunk-N6IY47YA.cjs} +8 -8
- package/dist/{chunk-BZAGP5W6.cjs.map → chunk-N6IY47YA.cjs.map} +1 -1
- package/dist/{chunk-OCV33S5Q.cjs → chunk-NFKX6QJP.cjs} +3 -3
- package/dist/{chunk-OCV33S5Q.cjs.map → chunk-NFKX6QJP.cjs.map} +1 -1
- package/dist/{chunk-J644FU54.cjs → chunk-NGQRS7AW.cjs} +9 -3
- package/dist/chunk-NGQRS7AW.cjs.map +1 -0
- package/dist/{chunk-QAKASRE6.js → chunk-NJ6MY6V5.js} +4 -4
- package/dist/{chunk-QAKASRE6.js.map → chunk-NJ6MY6V5.js.map} +1 -1
- package/dist/{chunk-P52GA3GJ.cjs → chunk-NM7O7RY5.cjs} +4 -2
- package/dist/chunk-NM7O7RY5.cjs.map +1 -0
- package/dist/chunk-OCSCBB52.cjs +188 -0
- package/dist/chunk-OCSCBB52.cjs.map +1 -0
- package/dist/{chunk-OFUKTVBN.cjs → chunk-OD47TTAW.cjs} +9 -9
- package/dist/{chunk-OFUKTVBN.cjs.map → chunk-OD47TTAW.cjs.map} +1 -1
- package/dist/{chunk-QKFJDQEK.js → chunk-OE5CKRUC.js} +4 -4
- package/dist/{chunk-QKFJDQEK.js.map → chunk-OE5CKRUC.js.map} +1 -1
- package/dist/chunk-OGNADPM4.cjs +170 -0
- package/dist/chunk-OGNADPM4.cjs.map +1 -0
- package/dist/{chunk-MBWF36DJ.js → chunk-P2CA3XGI.js} +3 -3
- package/dist/{chunk-MBWF36DJ.js.map → chunk-P2CA3XGI.js.map} +1 -1
- package/dist/chunk-POWS35OT.js +152 -0
- package/dist/chunk-POWS35OT.js.map +1 -0
- package/dist/chunk-PYJDVWXM.js +237 -0
- package/dist/chunk-PYJDVWXM.js.map +1 -0
- package/dist/{chunk-MTZPVOP6.js → chunk-Q77TE5DZ.js} +4 -2
- package/dist/chunk-Q77TE5DZ.js.map +1 -0
- package/dist/{chunk-L5W7TJQ5.js → chunk-RJ6NTJHC.js} +4 -4
- package/dist/{chunk-L5W7TJQ5.js.map → chunk-RJ6NTJHC.js.map} +1 -1
- package/dist/{chunk-C3DUS2VE.cjs → chunk-RS5VA6QU.cjs} +3 -3
- package/dist/{chunk-C3DUS2VE.cjs.map → chunk-RS5VA6QU.cjs.map} +1 -1
- package/dist/{chunk-IGNWT6RP.js → chunk-S7WCHDBO.js} +4 -4
- package/dist/{chunk-IGNWT6RP.js.map → chunk-S7WCHDBO.js.map} +1 -1
- package/dist/{chunk-RXPEZXAB.cjs → chunk-SGFYA22I.cjs} +5 -5
- package/dist/{chunk-RXPEZXAB.cjs.map → chunk-SGFYA22I.cjs.map} +1 -1
- package/dist/chunk-SQJFBZ42.js +297 -0
- package/dist/chunk-SQJFBZ42.js.map +1 -0
- package/dist/chunk-SUS3WFY3.js +156 -0
- package/dist/chunk-SUS3WFY3.js.map +1 -0
- package/dist/{chunk-H4AVMUOC.cjs → chunk-TAXD5ADA.cjs} +4 -4
- package/dist/{chunk-H4AVMUOC.cjs.map → chunk-TAXD5ADA.cjs.map} +1 -1
- package/dist/{chunk-NHN6A3ZO.js → chunk-TMMVIUUN.js} +4 -4
- package/dist/{chunk-NHN6A3ZO.js.map → chunk-TMMVIUUN.js.map} +1 -1
- package/dist/chunk-TPWKM7JH.js +196 -0
- package/dist/chunk-TPWKM7JH.js.map +1 -0
- package/dist/chunk-TU63764L.cjs +158 -0
- package/dist/chunk-TU63764L.cjs.map +1 -0
- package/dist/{chunk-7KWNY3HG.js → chunk-TVTIGV7Q.js} +9 -9
- package/dist/{chunk-7KWNY3HG.js.map → chunk-TVTIGV7Q.js.map} +1 -1
- package/dist/{chunk-22CYDCXA.js → chunk-TZJQB4P2.js} +37 -4
- package/dist/chunk-TZJQB4P2.js.map +1 -0
- package/dist/{chunk-X5QRRMGB.cjs → chunk-UAMXCMST.cjs} +4 -4
- package/dist/{chunk-X5QRRMGB.cjs.map → chunk-UAMXCMST.cjs.map} +1 -1
- package/dist/{chunk-QAQOCS2J.js → chunk-UBOVDAD7.js} +3 -3
- package/dist/{chunk-QAQOCS2J.js.map → chunk-UBOVDAD7.js.map} +1 -1
- package/dist/{chunk-IGSIWNX3.cjs → chunk-UQ3VVR6A.cjs} +4 -4
- package/dist/{chunk-IGSIWNX3.cjs.map → chunk-UQ3VVR6A.cjs.map} +1 -1
- package/dist/chunk-URAQIF67.cjs +356 -0
- package/dist/chunk-URAQIF67.cjs.map +1 -0
- package/dist/{chunk-6QKMMKRY.cjs → chunk-UV2FVNWT.cjs} +5 -5
- package/dist/{chunk-6QKMMKRY.cjs.map → chunk-UV2FVNWT.cjs.map} +1 -1
- package/dist/{chunk-EG7XFZ3W.js → chunk-V7D3YGUV.js} +4 -4
- package/dist/{chunk-EG7XFZ3W.js.map → chunk-V7D3YGUV.js.map} +1 -1
- package/dist/{chunk-Y6DFMDMH.js → chunk-VILW53UZ.js} +3 -3
- package/dist/{chunk-Y6DFMDMH.js.map → chunk-VILW53UZ.js.map} +1 -1
- package/dist/chunk-VINZZQBD.cjs +323 -0
- package/dist/chunk-VINZZQBD.cjs.map +1 -0
- package/dist/{chunk-5WOB4UBD.js → chunk-VKELAMAZ.js} +3 -3
- package/dist/{chunk-5WOB4UBD.js.map → chunk-VKELAMAZ.js.map} +1 -1
- package/dist/{chunk-IINZWUGK.cjs → chunk-VNYW4C4J.cjs} +13 -4
- package/dist/chunk-VNYW4C4J.cjs.map +1 -0
- package/dist/{chunk-RD3JDFYJ.js → chunk-VOKVG3ER.js} +4 -4
- package/dist/{chunk-RD3JDFYJ.js.map → chunk-VOKVG3ER.js.map} +1 -1
- package/dist/chunk-VPTASZ2O.cjs +171 -0
- package/dist/chunk-VPTASZ2O.cjs.map +1 -0
- package/dist/{chunk-37UZHCLM.cjs → chunk-VPWJCJCX.cjs} +3 -3
- package/dist/{chunk-37UZHCLM.cjs.map → chunk-VPWJCJCX.cjs.map} +1 -1
- package/dist/{chunk-3RB35GYK.js → chunk-VU6UTJRM.js} +4 -4
- package/dist/{chunk-3RB35GYK.js.map → chunk-VU6UTJRM.js.map} +1 -1
- package/dist/{chunk-6SAYPXHX.js → chunk-WGPLUCBD.js} +4 -4
- package/dist/{chunk-6SAYPXHX.js.map → chunk-WGPLUCBD.js.map} +1 -1
- package/dist/{chunk-KLJGJJHN.cjs → chunk-WNZAYBVB.cjs} +49 -49
- package/dist/{chunk-KLJGJJHN.cjs.map → chunk-WNZAYBVB.cjs.map} +1 -1
- package/dist/{chunk-BVMABVC4.cjs → chunk-WWJIW2IH.cjs} +3 -3
- package/dist/{chunk-BVMABVC4.cjs.map → chunk-WWJIW2IH.cjs.map} +1 -1
- package/dist/{chunk-OYQ7GYAA.cjs → chunk-X4XPNTCZ.cjs} +12 -12
- package/dist/{chunk-OYQ7GYAA.cjs.map → chunk-X4XPNTCZ.cjs.map} +1 -1
- package/dist/chunk-XDIMTPZU.cjs +202 -0
- package/dist/chunk-XDIMTPZU.cjs.map +1 -0
- package/dist/{chunk-IFDC4TXM.cjs → chunk-XEAT7XJG.cjs} +4 -4
- package/dist/{chunk-IFDC4TXM.cjs.map → chunk-XEAT7XJG.cjs.map} +1 -1
- package/dist/{chunk-S3BCHPXT.cjs → chunk-XI34EGK5.cjs} +9 -9
- package/dist/{chunk-S3BCHPXT.cjs.map → chunk-XI34EGK5.cjs.map} +1 -1
- package/dist/chunk-XVW5DPPP.js +429 -0
- package/dist/chunk-XVW5DPPP.js.map +1 -0
- package/dist/chunk-XZNN3S3S.cjs +281 -0
- package/dist/chunk-XZNN3S3S.cjs.map +1 -0
- package/dist/chunk-Y4QNLW7W.js +300 -0
- package/dist/chunk-Y4QNLW7W.js.map +1 -0
- package/dist/chunk-Y5HFM7LO.js +310 -0
- package/dist/chunk-Y5HFM7LO.js.map +1 -0
- package/dist/{chunk-LECJMLNE.js → chunk-YQDA366U.js} +3 -3
- package/dist/{chunk-LECJMLNE.js.map → chunk-YQDA366U.js.map} +1 -1
- package/dist/{chunk-PHK4XBO5.js → chunk-Z5V7SAZ4.js} +4 -4
- package/dist/{chunk-PHK4XBO5.js.map → chunk-Z5V7SAZ4.js.map} +1 -1
- package/dist/{chunk-TZX76ZNZ.js → chunk-ZGRCSNPK.js} +5 -5
- package/dist/{chunk-TZX76ZNZ.js.map → chunk-ZGRCSNPK.js.map} +1 -1
- package/dist/{chunk-AZP3DDBT.cjs → chunk-ZPSJ2UV6.cjs} +8 -8
- package/dist/{chunk-AZP3DDBT.cjs.map → chunk-ZPSJ2UV6.cjs.map} +1 -1
- package/dist/{chunk-SRA2L3SQ.cjs → chunk-ZSGEGISB.cjs} +4 -4
- package/dist/{chunk-SRA2L3SQ.cjs.map → chunk-ZSGEGISB.cjs.map} +1 -1
- package/dist/components/AlertDialog/index.cjs +6 -6
- package/dist/components/AlertDialog/index.js +5 -5
- package/dist/components/Autocomplete/index.cjs +3 -3
- package/dist/components/Autocomplete/index.js +2 -2
- package/dist/components/BoardView/index.cjs +24 -0
- package/dist/components/BoardView/index.cjs.map +1 -0
- package/dist/components/BoardView/index.d.cts +42 -0
- package/dist/components/BoardView/index.d.ts +42 -0
- package/dist/components/BoardView/index.js +7 -0
- package/dist/components/BoardView/index.js.map +1 -0
- package/dist/components/Button/index.cjs +3 -3
- package/dist/components/Button/index.d.cts +3 -0
- package/dist/components/Button/index.d.ts +3 -0
- package/dist/components/Button/index.js +1 -1
- package/dist/components/CalendarView/index.cjs +22 -0
- package/dist/components/CalendarView/index.cjs.map +1 -0
- package/dist/components/CalendarView/index.d.cts +40 -0
- package/dist/components/CalendarView/index.d.ts +40 -0
- package/dist/components/CalendarView/index.js +9 -0
- package/dist/components/CalendarView/index.js.map +1 -0
- package/dist/components/Collapsible/index.cjs +5 -5
- package/dist/components/Collapsible/index.js +2 -2
- package/dist/components/CountryCodeDropdown/index.cjs +6 -6
- package/dist/components/CountryCodeDropdown/index.js +3 -3
- package/dist/components/CustomizableDashboard/index.cjs +11 -11
- package/dist/components/CustomizableDashboard/index.js +4 -4
- package/dist/components/DateInput/index.cjs +4 -4
- package/dist/components/DateInput/index.js +3 -3
- package/dist/components/Dropdown/index.cjs +11 -11
- package/dist/components/Dropdown/index.js +4 -4
- package/dist/components/FloatingWindow/index.cjs +4 -4
- package/dist/components/FloatingWindow/index.js +2 -2
- package/dist/components/GanttView/index.cjs +20 -0
- package/dist/components/GanttView/index.cjs.map +1 -0
- package/dist/components/GanttView/index.d.cts +37 -0
- package/dist/components/GanttView/index.d.ts +37 -0
- package/dist/components/GanttView/index.js +7 -0
- package/dist/components/GanttView/index.js.map +1 -0
- package/dist/components/GlossaryTooltip/index.cjs +4 -4
- package/dist/components/GlossaryTooltip/index.js +3 -3
- package/dist/components/KeyboardShortcutsOverlay/index.cjs +6 -6
- package/dist/components/KeyboardShortcutsOverlay/index.js +4 -4
- package/dist/components/ListView/index.cjs +22 -0
- package/dist/components/ListView/index.cjs.map +1 -0
- package/dist/components/ListView/index.d.cts +37 -0
- package/dist/components/ListView/index.d.ts +37 -0
- package/dist/components/ListView/index.js +9 -0
- package/dist/components/ListView/index.js.map +1 -0
- package/dist/components/Markdown/index.cjs +19 -19
- package/dist/components/Markdown/index.js +7 -7
- package/dist/components/MediaEditor/index.cjs +16 -16
- package/dist/components/MediaEditor/index.js +11 -11
- package/dist/components/MediaPlayer/index.cjs +6 -6
- package/dist/components/MediaPlayer/index.js +3 -3
- package/dist/components/MegaMenu/index.cjs +23 -0
- package/dist/components/MegaMenu/index.cjs.map +1 -0
- package/dist/components/MegaMenu/index.d.cts +106 -0
- package/dist/components/MegaMenu/index.d.ts +106 -0
- package/dist/components/MegaMenu/index.js +6 -0
- package/dist/components/MegaMenu/index.js.map +1 -0
- package/dist/components/Modal/index.cjs +11 -11
- package/dist/components/Modal/index.js +3 -3
- package/dist/components/OrbitRing/index.cjs +14 -0
- package/dist/components/OrbitRing/index.cjs.map +1 -0
- package/dist/components/OrbitRing/index.d.cts +64 -0
- package/dist/components/OrbitRing/index.d.ts +64 -0
- package/dist/components/OrbitRing/index.js +5 -0
- package/dist/components/OrbitRing/index.js.map +1 -0
- package/dist/components/QuickAction/index.d.cts +1 -1
- package/dist/components/QuickAction/index.d.ts +1 -1
- package/dist/components/RadialExplorer/index.cjs +18 -0
- package/dist/components/RadialExplorer/index.cjs.map +1 -0
- package/dist/components/RadialExplorer/index.d.cts +83 -0
- package/dist/components/RadialExplorer/index.d.ts +83 -0
- package/dist/components/RadialExplorer/index.js +9 -0
- package/dist/components/RadialExplorer/index.js.map +1 -0
- package/dist/components/RichTextEditor/index.cjs +9 -9
- package/dist/components/RichTextEditor/index.js +6 -6
- package/dist/components/SectionSpyNav/index.cjs +4 -4
- package/dist/components/SectionSpyNav/index.js +3 -3
- package/dist/components/Select/index.cjs +5 -5
- package/dist/components/Select/index.js +3 -3
- package/dist/components/Sheet/index.cjs +11 -11
- package/dist/components/Sheet/index.js +2 -2
- package/dist/components/SliderCalculator/index.cjs +20 -0
- package/dist/components/SliderCalculator/index.cjs.map +1 -0
- package/dist/components/SliderCalculator/index.d.cts +100 -0
- package/dist/components/SliderCalculator/index.d.ts +100 -0
- package/dist/components/SliderCalculator/index.js +7 -0
- package/dist/components/SliderCalculator/index.js.map +1 -0
- package/dist/components/SourceTip/index.cjs +4 -4
- package/dist/components/SourceTip/index.js +3 -3
- package/dist/components/SuperChat/index.cjs +454 -279
- package/dist/components/SuperChat/index.cjs.map +1 -1
- package/dist/components/SuperChat/index.js +444 -269
- package/dist/components/SuperChat/index.js.map +1 -1
- package/dist/components/SuperChat/plugins/index.cjs +8 -8
- package/dist/components/SuperChat/plugins/index.js +7 -7
- package/dist/components/ThemeProvider/index.cjs +9 -9
- package/dist/components/ThemeProvider/index.js +3 -3
- package/dist/components/Tooltip/index.cjs +3 -3
- package/dist/components/Tooltip/index.js +2 -2
- package/dist/components/VideoCard/index.cjs +21 -0
- package/dist/components/VideoCard/index.cjs.map +1 -0
- package/dist/components/VideoCard/index.d.cts +75 -0
- package/dist/components/VideoCard/index.d.ts +75 -0
- package/dist/components/VideoCard/index.js +8 -0
- package/dist/components/VideoCard/index.js.map +1 -0
- package/dist/components/ViewSet/index.cjs +23 -0
- package/dist/components/ViewSet/index.cjs.map +1 -0
- package/dist/components/ViewSet/index.d.cts +89 -0
- package/dist/components/ViewSet/index.d.ts +89 -0
- package/dist/components/ViewSet/index.js +14 -0
- package/dist/components/ViewSet/index.js.map +1 -0
- package/dist/components/ViewSwitcher/index.cjs +20 -0
- package/dist/components/ViewSwitcher/index.cjs.map +1 -0
- package/dist/components/ViewSwitcher/index.d.cts +40 -0
- package/dist/components/ViewSwitcher/index.d.ts +40 -0
- package/dist/components/ViewSwitcher/index.js +7 -0
- package/dist/components/ViewSwitcher/index.js.map +1 -0
- package/dist/components/YearTimeline/index.cjs +26 -0
- package/dist/components/YearTimeline/index.cjs.map +1 -0
- package/dist/components/YearTimeline/index.d.cts +82 -0
- package/dist/components/YearTimeline/index.d.ts +82 -0
- package/dist/components/YearTimeline/index.js +5 -0
- package/dist/components/YearTimeline/index.js.map +1 -0
- package/dist/datavis.cjs +2 -2
- package/dist/datavis.js +1 -1
- package/dist/enterprise-health-ITUNXDIW.js +4 -0
- package/dist/{enterprise-health-CWLUB77O.js.map → enterprise-health-ITUNXDIW.js.map} +1 -1
- package/dist/enterprise-health-UHHPVPU6.cjs +19 -0
- package/dist/{enterprise-health-75VYWAVG.cjs.map → enterprise-health-UHHPVPU6.cjs.map} +1 -1
- package/dist/esheet.cjs +18 -18
- package/dist/esheet.js +15 -15
- package/dist/globe.cjs +306 -0
- package/dist/globe.cjs.map +1 -0
- package/dist/globe.d.cts +99 -0
- package/dist/globe.d.ts +99 -0
- package/dist/globe.js +279 -0
- package/dist/globe.js.map +1 -0
- package/dist/hooks/index.cjs +38 -24
- package/dist/hooks/index.d.cts +141 -1
- package/dist/hooks/index.d.ts +141 -1
- package/dist/hooks/index.js +6 -4
- package/dist/index.cjs +1510 -1205
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +97 -25
- package/dist/index.d.ts +97 -25
- package/dist/index.js +546 -379
- package/dist/index.js.map +1 -1
- package/dist/kerebron.cjs +58 -19
- package/dist/kerebron.cjs.map +1 -1
- package/dist/kerebron.d.cts +37 -0
- package/dist/kerebron.d.ts +37 -0
- package/dist/kerebron.js +58 -19
- package/dist/kerebron.js.map +1 -1
- package/dist/{speaker-verify-5GTWAN5Y.cjs → speaker-verify-4NEJAK6C.cjs} +57 -90
- package/dist/speaker-verify-4NEJAK6C.cjs.map +1 -0
- package/dist/{speaker-verify-R67P433H.js → speaker-verify-AWSKI6DI.js} +57 -90
- package/dist/speaker-verify-AWSKI6DI.js.map +1 -0
- package/dist/styles/effects.css +128 -0
- package/dist/styles/init.css +15 -0
- package/dist/styles.css +1 -1
- package/dist/tailwind-preset.cjs +4 -4
- package/dist/tailwind-preset.js +1 -1
- package/dist/types-CbWXIKbe.d.cts +119 -0
- package/dist/types-CbWXIKbe.d.ts +119 -0
- package/dist/utils/index.cjs +5 -5
- package/dist/utils/index.js +1 -1
- package/package.json +28 -2
- package/dist/CsvBlock-CVYA3HYS.cjs +0 -16
- package/dist/CsvBlock-SM4NKSHA.js +0 -7
- package/dist/HtmlPreviewBlock-FAMF4W24.js +0 -7
- package/dist/HtmlPreviewBlock-JF454L2L.cjs +0 -16
- package/dist/MermaidBlock-7V5G4K5A.js +0 -7
- package/dist/MermaidBlock-FR5SQX4Q.cjs +0 -16
- package/dist/SurveyBlock-6K2POV7S.js +0 -7
- package/dist/SurveyBlock-MCJVWR7H.cjs +0 -16
- package/dist/chunk-22CYDCXA.js.map +0 -1
- package/dist/chunk-IINZWUGK.cjs.map +0 -1
- package/dist/chunk-J644FU54.cjs.map +0 -1
- package/dist/chunk-KREUYVMZ.js.map +0 -1
- package/dist/chunk-MTZPVOP6.js.map +0 -1
- package/dist/chunk-P52GA3GJ.cjs.map +0 -1
- package/dist/chunk-PY7XAG4D.cjs.map +0 -1
- package/dist/chunk-WIAQQNFU.cjs.map +0 -1
- package/dist/chunk-WOYUQ4AT.js.map +0 -1
- package/dist/chunk-X5YM3KXY.js.map +0 -1
- package/dist/enterprise-health-75VYWAVG.cjs +0 -19
- package/dist/enterprise-health-CWLUB77O.js +0 -4
- package/dist/speaker-verify-5GTWAN5Y.cjs.map +0 -1
- package/dist/speaker-verify-R67P433H.js.map +0 -1
|
@@ -1,23 +1,25 @@
|
|
|
1
1
|
'use strict';
|
|
2
2
|
|
|
3
3
|
var chunkJFLC7SHM_cjs = require('../../chunk-JFLC7SHM.cjs');
|
|
4
|
-
var
|
|
5
|
-
var
|
|
6
|
-
var
|
|
4
|
+
var chunkMYHV2ND3_cjs = require('../../chunk-MYHV2ND3.cjs');
|
|
5
|
+
var chunkX4XPNTCZ_cjs = require('../../chunk-X4XPNTCZ.cjs');
|
|
6
|
+
var chunkSGFYA22I_cjs = require('../../chunk-SGFYA22I.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
|
+
require('../../chunk-FSGEDDF2.cjs');
|
|
14
|
+
require('../../chunk-AOHJILLU.cjs');
|
|
15
|
+
require('../../chunk-FHY3K6PL.cjs');
|
|
12
16
|
require('../../chunk-L7L5S2HO.cjs');
|
|
17
|
+
var chunk6HFFWEM3_cjs = require('../../chunk-6HFFWEM3.cjs');
|
|
13
18
|
var chunkYVL3XATO_cjs = require('../../chunk-YVL3XATO.cjs');
|
|
14
19
|
require('../../chunk-NV2CWBI2.cjs');
|
|
15
20
|
var chunkS5RVSXDV_cjs = require('../../chunk-S5RVSXDV.cjs');
|
|
16
|
-
require('../../chunk-FHY3K6PL.cjs');
|
|
17
|
-
require('../../chunk-FSGEDDF2.cjs');
|
|
18
|
-
require('../../chunk-AOHJILLU.cjs');
|
|
19
21
|
require('../../chunk-EUAMEVVI.cjs');
|
|
20
|
-
var
|
|
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
|
|
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 =
|
|
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(
|
|
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] =
|
|
502
|
-
const copiedTimer =
|
|
503
|
+
const [copied, setCopied] = React3__namespace.useState(false);
|
|
504
|
+
const copiedTimer = React3__namespace.useRef(
|
|
503
505
|
void 0
|
|
504
506
|
);
|
|
505
|
-
|
|
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(
|
|
551
|
+
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: [
|
|
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] =
|
|
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
|
-
|
|
583
|
+
chunkSGFYA22I_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 =
|
|
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] =
|
|
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
|
|
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
|
-
|
|
638
|
+
chunkSGFYA22I_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(
|
|
657
|
+
/* @__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)
|
|
660
658
|
) : /* @__PURE__ */ jsxRuntime.jsx(
|
|
661
|
-
|
|
659
|
+
chunkSGFYA22I_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 =
|
|
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] =
|
|
688
|
-
const [draft, setDraft] =
|
|
689
|
-
const
|
|
690
|
-
const
|
|
691
|
-
const
|
|
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
|
-
|
|
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
|
|
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 =
|
|
726
|
-
const [footerVisible, setFooterVisible] =
|
|
727
|
-
|
|
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
|
-
...
|
|
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.
|
|
862
|
-
|
|
863
|
-
|
|
864
|
-
"
|
|
865
|
-
|
|
866
|
-
|
|
867
|
-
|
|
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
|
-
|
|
885
|
+
!collapseToMenu && /* @__PURE__ */ jsxRuntime.jsx(
|
|
886
|
+
MessageActionsBar,
|
|
909
887
|
{
|
|
910
|
-
ref:
|
|
911
|
-
|
|
912
|
-
|
|
913
|
-
|
|
914
|
-
|
|
915
|
-
|
|
916
|
-
|
|
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
|
-
|
|
919
|
-
|
|
920
|
-
children:
|
|
921
|
-
|
|
922
|
-
|
|
923
|
-
|
|
924
|
-
|
|
925
|
-
|
|
926
|
-
|
|
927
|
-
|
|
928
|
-
|
|
929
|
-
|
|
930
|
-
|
|
931
|
-
|
|
932
|
-
|
|
933
|
-
|
|
934
|
-
|
|
935
|
-
|
|
936
|
-
|
|
937
|
-
|
|
938
|
-
|
|
939
|
-
|
|
940
|
-
|
|
941
|
-
|
|
942
|
-
|
|
943
|
-
|
|
944
|
-
|
|
945
|
-
|
|
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
|
-
"
|
|
956
|
+
"textarea",
|
|
948
957
|
{
|
|
949
|
-
|
|
950
|
-
|
|
951
|
-
|
|
952
|
-
|
|
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.
|
|
956
|
-
|
|
957
|
-
|
|
958
|
-
|
|
959
|
-
|
|
960
|
-
|
|
961
|
-
|
|
962
|
-
|
|
963
|
-
|
|
964
|
-
|
|
965
|
-
|
|
966
|
-
|
|
967
|
-
|
|
968
|
-
|
|
969
|
-
|
|
970
|
-
|
|
971
|
-
|
|
972
|
-
|
|
973
|
-
|
|
974
|
-
|
|
975
|
-
|
|
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
|
-
|
|
988
|
-
|
|
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
|
-
|
|
992
|
-
|
|
993
|
-
|
|
994
|
-
|
|
995
|
-
|
|
996
|
-
|
|
997
|
-
|
|
998
|
-
|
|
999
|
-
|
|
1000
|
-
|
|
1001
|
-
|
|
1002
|
-
|
|
1003
|
-
|
|
1004
|
-
|
|
1005
|
-
|
|
1006
|
-
|
|
1007
|
-
|
|
1008
|
-
|
|
1009
|
-
|
|
1010
|
-
|
|
1011
|
-
|
|
1012
|
-
|
|
1013
|
-
|
|
1014
|
-
|
|
1015
|
-
|
|
1016
|
-
|
|
1017
|
-
|
|
1018
|
-
|
|
1019
|
-
|
|
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
|
-
|
|
1054
|
-
|
|
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: () =>
|
|
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:
|
|
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 =
|
|
1140
|
-
|
|
1141
|
-
|
|
1157
|
+
const headingId = React3__namespace.useId();
|
|
1158
|
+
React3__namespace.useEffect(() => {
|
|
1159
|
+
chunkX4XPNTCZ_cjs.notifyComposerMigrationOnce("SuperChat");
|
|
1142
1160
|
}, []);
|
|
1143
|
-
const renderText =
|
|
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
|
|
1151
|
-
|
|
1152
|
-
|
|
1153
|
-
|
|
1154
|
-
|
|
1155
|
-
|
|
1156
|
-
|
|
1157
|
-
|
|
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 =
|
|
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
|
|
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 =
|
|
1328
|
+
const conversationRef = React3__namespace.useRef(conversation);
|
|
1169
1329
|
conversationRef.current = conversation;
|
|
1170
|
-
const handleMessageEdited =
|
|
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 =
|
|
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 =
|
|
1349
|
+
const composerAccept = React3__namespace.useMemo(
|
|
1190
1350
|
() => acceptTokensFor(acceptedFileTypes),
|
|
1191
1351
|
[acceptedFileTypes]
|
|
1192
1352
|
);
|
|
1193
|
-
const [draft, setDraft] =
|
|
1194
|
-
const draftEpochRef =
|
|
1195
|
-
const handleDraftChange =
|
|
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 =
|
|
1359
|
+
const handleComposerSend = React3__namespace.useCallback(
|
|
1200
1360
|
async (message) => {
|
|
1201
1361
|
const epoch = draftEpochRef.current;
|
|
1202
1362
|
try {
|
|
@@ -1286,70 +1446,85 @@ 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(
|
|
1449
|
+
children: /* @__PURE__ */ jsxRuntime.jsx(chunkMYHV2ND3_cjs.CloseIcon, {})
|
|
1290
1450
|
}
|
|
1291
1451
|
)
|
|
1292
1452
|
]
|
|
1293
1453
|
}
|
|
1294
1454
|
),
|
|
1295
|
-
|
|
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
|
-
|
|
1324
|
-
|
|
1325
|
-
|
|
1326
|
-
|
|
1327
|
-
|
|
1328
|
-
|
|
1329
|
-
|
|
1330
|
-
|
|
1331
|
-
|
|
1332
|
-
|
|
1333
|
-
|
|
1334
|
-
|
|
1335
|
-
|
|
1336
|
-
|
|
1337
|
-
|
|
1338
|
-
|
|
1339
|
-
|
|
1340
|
-
|
|
1341
|
-
|
|
1342
|
-
|
|
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
|
+
order !== "desc" && !isAtBottom && /* @__PURE__ */ jsxRuntime.jsx(
|
|
1510
|
+
chunkMYHV2ND3_cjs.JumpToBottomButton,
|
|
1511
|
+
{
|
|
1512
|
+
dataSlot: "superchat-jump-to-bottom",
|
|
1513
|
+
hasNewMessages: hasNewBelow,
|
|
1514
|
+
onClick: handleJumpToBottom
|
|
1515
|
+
}
|
|
1516
|
+
)
|
|
1517
|
+
]
|
|
1344
1518
|
}
|
|
1345
1519
|
),
|
|
1346
1520
|
/* @__PURE__ */ jsxRuntime.jsx(
|
|
1347
|
-
|
|
1521
|
+
chunkX4XPNTCZ_cjs.ChatComposer,
|
|
1348
1522
|
{
|
|
1349
1523
|
value: draft,
|
|
1350
1524
|
onValueChange: handleDraftChange,
|
|
1351
1525
|
onSend: handleComposerSend,
|
|
1352
1526
|
disabled: readOnly,
|
|
1527
|
+
className: "px-4 pb-4",
|
|
1353
1528
|
placeholder: readOnly ? "Read-only conversation" : "Type a message\u2026 use @ to address an agent",
|
|
1354
1529
|
mentionOptions,
|
|
1355
1530
|
allowAttachments: !readOnly,
|
|
@@ -1371,12 +1546,12 @@ function SuperChatConversations({
|
|
|
1371
1546
|
onConversationOpened,
|
|
1372
1547
|
onNewConversation
|
|
1373
1548
|
}) {
|
|
1374
|
-
const [internalActive, setInternalActive] =
|
|
1549
|
+
const [internalActive, setInternalActive] = React3__namespace.useState(
|
|
1375
1550
|
defaultActiveConversationId ?? conversations[0]?.id
|
|
1376
1551
|
);
|
|
1377
1552
|
const requestedId = activeConversationId ?? internalActive;
|
|
1378
1553
|
const activeId = conversations.some((c) => c.id === requestedId) ? requestedId : conversations[0]?.id;
|
|
1379
|
-
const sortedConversations =
|
|
1554
|
+
const sortedConversations = React3__namespace.useMemo(
|
|
1380
1555
|
() => [...conversations].sort((a, b) => lastActivityOf(b) - lastActivityOf(a)),
|
|
1381
1556
|
[conversations]
|
|
1382
1557
|
);
|
|
@@ -1465,13 +1640,13 @@ function SuperChatInbox({
|
|
|
1465
1640
|
onNewConversation,
|
|
1466
1641
|
onReferenceClick
|
|
1467
1642
|
}) {
|
|
1468
|
-
const [internalActive, setInternalActive] =
|
|
1643
|
+
const [internalActive, setInternalActive] = React3__namespace.useState(
|
|
1469
1644
|
defaultActiveConversationId ?? conversations[0]?.id
|
|
1470
1645
|
);
|
|
1471
1646
|
const requestedId = activeConversationId ?? internalActive;
|
|
1472
1647
|
const active = conversations.find((c) => c.id === requestedId) ?? conversations[0];
|
|
1473
1648
|
const activeId = active?.id;
|
|
1474
|
-
const [mobileView, setMobileView] =
|
|
1649
|
+
const [mobileView, setMobileView] = React3__namespace.useState("list");
|
|
1475
1650
|
const handleOpen = (c) => {
|
|
1476
1651
|
if (activeConversationId === void 0) setInternalActive(c.id);
|
|
1477
1652
|
setMobileView("chat");
|