@mieweb/ui 0.8.0 → 0.9.0-dev.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +162 -739
- package/agent/mieweb-ui.instructions.md +34 -16
- package/dist/Animated-Cs-naa2g.d.cts +175 -0
- package/dist/Animated-Cs-naa2g.d.ts +175 -0
- package/dist/CsvBlock-D7Z6ZCRP.js +6 -0
- package/dist/{CsvBlock-PUSTBQ5B.js.map → CsvBlock-D7Z6ZCRP.js.map} +1 -1
- package/dist/CsvBlock-QXXZ7ZUM.cjs +15 -0
- package/dist/{CsvBlock-OTFG3PYZ.cjs.map → CsvBlock-QXXZ7ZUM.cjs.map} +1 -1
- package/dist/HtmlPreviewBlock-AADG7MVB.cjs +15 -0
- package/dist/{HtmlPreviewBlock-QHLSIMWJ.cjs.map → HtmlPreviewBlock-AADG7MVB.cjs.map} +1 -1
- package/dist/HtmlPreviewBlock-F5VDM2EN.js +6 -0
- package/dist/{HtmlPreviewBlock-YF2YVKKX.js.map → HtmlPreviewBlock-F5VDM2EN.js.map} +1 -1
- package/dist/MermaidBlock-6PLITRBZ.js +6 -0
- package/dist/{MermaidBlock-H3TWNC4D.js.map → MermaidBlock-6PLITRBZ.js.map} +1 -1
- package/dist/MermaidBlock-TQ2O5CLV.cjs +15 -0
- package/dist/{MermaidBlock-ZLLBO3VY.cjs.map → MermaidBlock-TQ2O5CLV.cjs.map} +1 -1
- package/dist/SurveyBlock-OYL3VNU5.cjs +15 -0
- package/dist/{SurveyBlock-M2ZRTGVJ.cjs.map → SurveyBlock-OYL3VNU5.cjs.map} +1 -1
- package/dist/SurveyBlock-W5PSQ62F.js +6 -0
- package/dist/{SurveyBlock-JLHS3YQD.js.map → SurveyBlock-W5PSQ62F.js.map} +1 -1
- package/dist/ag-grid.cjs +5 -5
- package/dist/ag-grid.js +1 -1
- package/dist/brands/index.cjs +7 -7
- package/dist/brands/index.js +2 -2
- package/dist/{chunk-XS35KPBZ.cjs → chunk-2A2FLQJC.cjs} +1140 -14
- package/dist/chunk-2A2FLQJC.cjs.map +1 -0
- package/dist/{chunk-OTQ72WX3.js → chunk-2BPIVWAK.js} +3 -3
- package/dist/{chunk-OTQ72WX3.js.map → chunk-2BPIVWAK.js.map} +1 -1
- package/dist/{chunk-6EWJGRC3.js → chunk-3JWAABYI.js} +6 -6
- package/dist/chunk-3JWAABYI.js.map +1 -0
- package/dist/{chunk-5JZIDILK.cjs → chunk-3LHICE4I.cjs} +6 -6
- package/dist/chunk-3LHICE4I.cjs.map +1 -0
- package/dist/{chunk-JHZW3Y62.js → chunk-3RB35GYK.js} +5 -5
- package/dist/chunk-3RB35GYK.js.map +1 -0
- package/dist/{chunk-BOW7ZGI2.cjs → chunk-4SM3I7WE.cjs} +170 -10
- package/dist/chunk-4SM3I7WE.cjs.map +1 -0
- package/dist/{chunk-QHTDWIED.js → chunk-5H7SAEQO.js} +5 -5
- package/dist/{chunk-QHTDWIED.js.map → chunk-5H7SAEQO.js.map} +1 -1
- package/dist/chunk-5VXRKOPR.cjs +735 -0
- package/dist/chunk-5VXRKOPR.cjs.map +1 -0
- package/dist/{chunk-EMMYFHOT.js → chunk-5WOB4UBD.js} +3 -3
- package/dist/{chunk-EMMYFHOT.js.map → chunk-5WOB4UBD.js.map} +1 -1
- package/dist/{chunk-4CUFXCC5.cjs → chunk-5Z6UPVGC.cjs} +6 -6
- package/dist/{chunk-4CUFXCC5.cjs.map → chunk-5Z6UPVGC.cjs.map} +1 -1
- package/dist/{chunk-YIXTGWT4.cjs → chunk-6QKMMKRY.cjs} +5 -5
- package/dist/{chunk-YIXTGWT4.cjs.map → chunk-6QKMMKRY.cjs.map} +1 -1
- package/dist/{chunk-F57VRLKP.js → chunk-6SAYPXHX.js} +4 -4
- package/dist/{chunk-F57VRLKP.js.map → chunk-6SAYPXHX.js.map} +1 -1
- package/dist/{chunk-SK7H3Z67.cjs → chunk-6XDPJWSC.cjs} +99 -83
- package/dist/chunk-6XDPJWSC.cjs.map +1 -0
- package/dist/{chunk-4AE2L6AO.cjs → chunk-7FTBPLA6.cjs} +8 -8
- package/dist/chunk-7FTBPLA6.cjs.map +1 -0
- package/dist/{chunk-KVE7PQ5P.cjs → chunk-7KN6J7XV.cjs} +20 -20
- package/dist/{chunk-KVE7PQ5P.cjs.map → chunk-7KN6J7XV.cjs.map} +1 -1
- package/dist/{chunk-K4S4FAYX.cjs → chunk-AHINB2TP.cjs} +11 -11
- package/dist/{chunk-K4S4FAYX.cjs.map → chunk-AHINB2TP.cjs.map} +1 -1
- package/dist/{chunk-MYFZYUPR.cjs → chunk-AOHJILLU.cjs} +38 -3
- package/dist/chunk-AOHJILLU.cjs.map +1 -0
- package/dist/chunk-BKSPDTX4.js +3 -0
- package/dist/{chunk-3PXOIAF6.js.map → chunk-BKSPDTX4.js.map} +1 -1
- package/dist/chunk-BN75TLUN.cjs +163 -0
- package/dist/chunk-BN75TLUN.cjs.map +1 -0
- package/dist/{chunk-WWJIW2IH.cjs → chunk-BVMABVC4.cjs} +3 -3
- package/dist/{chunk-WWJIW2IH.cjs.map → chunk-BVMABVC4.cjs.map} +1 -1
- package/dist/{chunk-H7QSGFMZ.cjs → chunk-BZAGP5W6.cjs} +17 -10
- package/dist/chunk-BZAGP5W6.cjs.map +1 -0
- package/dist/{chunk-RS5VA6QU.cjs → chunk-C3DUS2VE.cjs} +3 -3
- package/dist/{chunk-RS5VA6QU.cjs.map → chunk-C3DUS2VE.cjs.map} +1 -1
- package/dist/{chunk-NLBT5O2X.js → chunk-CK3KLRNF.js} +3 -3
- package/dist/{chunk-NLBT5O2X.js.map → chunk-CK3KLRNF.js.map} +1 -1
- package/dist/{chunk-L6D4CKLV.cjs → chunk-CXDMZT45.cjs} +135 -4
- package/dist/chunk-CXDMZT45.cjs.map +1 -0
- package/dist/{chunk-TXRQQMG5.js → chunk-CYMZ2QS5.js} +2 -2
- package/dist/{chunk-TXRQQMG5.js.map → chunk-CYMZ2QS5.js.map} +1 -1
- package/dist/{chunk-DX64KLSN.js → chunk-D25WH7MH.js} +7 -7
- package/dist/{chunk-DX64KLSN.js.map → chunk-D25WH7MH.js.map} +1 -1
- package/dist/{chunk-XBKOZRDO.js → chunk-DFYMIRMW.js} +4 -4
- package/dist/{chunk-XBKOZRDO.js.map → chunk-DFYMIRMW.js.map} +1 -1
- package/dist/{chunk-AESFOMSH.js → chunk-DGRXAIWK.js} +135 -4
- package/dist/chunk-DGRXAIWK.js.map +1 -0
- package/dist/{chunk-UZ5NGGMI.js → chunk-EG7XFZ3W.js} +4 -4
- package/dist/{chunk-UZ5NGGMI.js.map → chunk-EG7XFZ3W.js.map} +1 -1
- package/dist/{chunk-LQHI44OZ.cjs → chunk-FUFBRKOG.cjs} +59 -59
- package/dist/{chunk-LQHI44OZ.cjs.map → chunk-FUFBRKOG.cjs.map} +1 -1
- package/dist/{chunk-DG7KE4YJ.cjs → chunk-FYAKUU2A.cjs} +38 -21
- package/dist/chunk-FYAKUU2A.cjs.map +1 -0
- package/dist/{chunk-7L7OPISJ.cjs → chunk-H4AVMUOC.cjs} +12 -6
- package/dist/chunk-H4AVMUOC.cjs.map +1 -0
- package/dist/{chunk-I2ECTLON.cjs → chunk-HXSA6QC5.cjs} +3 -3
- package/dist/{chunk-I2ECTLON.cjs.map → chunk-HXSA6QC5.cjs.map} +1 -1
- package/dist/{chunk-DCBMTFLE.js → chunk-HZ4MBUC3.js} +3 -3
- package/dist/{chunk-DCBMTFLE.js.map → chunk-HZ4MBUC3.js.map} +1 -1
- package/dist/{chunk-X5ZPYYMS.js → chunk-I3DQXUSC.js} +3 -3
- package/dist/{chunk-X5ZPYYMS.js.map → chunk-I3DQXUSC.js.map} +1 -1
- package/dist/{chunk-FN6VHMLM.cjs → chunk-IB54SKWB.cjs} +8 -8
- package/dist/{chunk-FN6VHMLM.cjs.map → chunk-IB54SKWB.cjs.map} +1 -1
- package/dist/chunk-IF3X2WZP.js +705 -0
- package/dist/chunk-IF3X2WZP.js.map +1 -0
- package/dist/{chunk-JP5SGIXA.cjs → chunk-IFDC4TXM.cjs} +4 -4
- package/dist/{chunk-JP5SGIXA.cjs.map → chunk-IFDC4TXM.cjs.map} +1 -1
- package/dist/{chunk-RDGRKYQ5.cjs → chunk-IINZWUGK.cjs} +58 -6
- package/dist/chunk-IINZWUGK.cjs.map +1 -0
- package/dist/{chunk-U3JU6BI5.cjs → chunk-JEIW7BSV.cjs} +3 -3
- package/dist/{chunk-U3JU6BI5.cjs.map → chunk-JEIW7BSV.cjs.map} +1 -1
- package/dist/{chunk-RZJXCI53.js → chunk-KATEJG2F.js} +1138 -14
- package/dist/chunk-KATEJG2F.js.map +1 -0
- package/dist/{chunk-D2GID3YK.js → chunk-KREUYVMZ.js} +58 -6
- package/dist/chunk-KREUYVMZ.js.map +1 -0
- package/dist/{chunk-Y6YSJPVC.js → chunk-KRU6IGV7.js} +11 -3
- package/dist/chunk-KRU6IGV7.js.map +1 -0
- package/dist/{chunk-LZU7YBXG.js → chunk-KU3XRHWA.js} +169 -10
- package/dist/chunk-KU3XRHWA.js.map +1 -0
- package/dist/{chunk-P2VTQ5AR.cjs → chunk-L52N6BEN.cjs} +39 -23
- package/dist/chunk-L52N6BEN.cjs.map +1 -0
- package/dist/{chunk-XWYKLEKG.js → chunk-L5W7TJQ5.js} +11 -5
- package/dist/chunk-L5W7TJQ5.js.map +1 -0
- package/dist/{chunk-PAM5UUBL.cjs → chunk-L7L5S2HO.cjs} +18 -2
- package/dist/{chunk-PAM5UUBL.cjs.map → chunk-L7L5S2HO.cjs.map} +1 -1
- package/dist/{chunk-SEPYBAML.js → chunk-LAEIVOIY.js} +38 -21
- package/dist/chunk-LAEIVOIY.js.map +1 -0
- package/dist/{chunk-Z5KFXHDP.cjs → chunk-MM7QKUE3.cjs} +5 -5
- package/dist/{chunk-Z5KFXHDP.cjs.map → chunk-MM7QKUE3.cjs.map} +1 -1
- package/dist/{chunk-FJ7YPVKV.js → chunk-MUIDWFYJ.js} +3 -3
- package/dist/{chunk-FJ7YPVKV.js.map → chunk-MUIDWFYJ.js.map} +1 -1
- package/dist/{chunk-YMHOF6WA.cjs → chunk-MYAU2ZUC.cjs} +3 -3
- package/dist/{chunk-YMHOF6WA.cjs.map → chunk-MYAU2ZUC.cjs.map} +1 -1
- package/dist/{chunk-5J5PEUUA.js → chunk-NHN6A3ZO.js} +6 -6
- package/dist/{chunk-5J5PEUUA.js.map → chunk-NHN6A3ZO.js.map} +1 -1
- package/dist/{chunk-EPQPUFS6.cjs → chunk-NYJIXR4Y.cjs} +6 -6
- package/dist/chunk-NYJIXR4Y.cjs.map +1 -0
- package/dist/{chunk-RYQ3S3KO.cjs → chunk-O425FKDI.cjs} +581 -70
- package/dist/chunk-O425FKDI.cjs.map +1 -0
- package/dist/{chunk-WIYQI35R.cjs → chunk-O7XHHTTP.cjs} +8 -8
- package/dist/{chunk-WIYQI35R.cjs.map → chunk-O7XHHTTP.cjs.map} +1 -1
- package/dist/{chunk-IILJGFI5.js → chunk-OAZUDUGX.js} +8 -6
- package/dist/chunk-OAZUDUGX.js.map +1 -0
- package/dist/{chunk-JHGMZX4I.cjs → chunk-OCV33S5Q.cjs} +6 -6
- package/dist/{chunk-JHGMZX4I.cjs.map → chunk-OCV33S5Q.cjs.map} +1 -1
- package/dist/{chunk-IYXCFIMP.js → chunk-ODYQYLO2.js} +33 -17
- package/dist/chunk-ODYQYLO2.js.map +1 -0
- package/dist/{chunk-FPVRQCCL.js → chunk-OHDIJOGG.js} +4 -4
- package/dist/{chunk-FPVRQCCL.js.map → chunk-OHDIJOGG.js.map} +1 -1
- package/dist/{chunk-GQVL2JKQ.cjs → chunk-OHKO5THF.cjs} +3 -3
- package/dist/{chunk-GQVL2JKQ.cjs.map → chunk-OHKO5THF.cjs.map} +1 -1
- package/dist/{chunk-LMBXJZLG.js → chunk-ON4JULCA.js} +3 -3
- package/dist/{chunk-LMBXJZLG.js.map → chunk-ON4JULCA.js.map} +1 -1
- package/dist/{chunk-A5YOIJKL.js → chunk-ONNY7UO4.js} +15 -15
- package/dist/{chunk-A5YOIJKL.js.map → chunk-ONNY7UO4.js.map} +1 -1
- package/dist/{chunk-DWCYEPTT.js → chunk-OSPTA4UR.js} +4 -4
- package/dist/{chunk-DWCYEPTT.js.map → chunk-OSPTA4UR.js.map} +1 -1
- package/dist/{chunk-FDUA6OGN.js → chunk-PFKRHNYV.js} +8 -8
- package/dist/chunk-PFKRHNYV.js.map +1 -0
- package/dist/{chunk-XMECP2MD.js → chunk-PHK4XBO5.js} +4 -4
- package/dist/{chunk-XMECP2MD.js.map → chunk-PHK4XBO5.js.map} +1 -1
- package/dist/{chunk-ZZJ4ZVYR.cjs → chunk-PJ6CC53R.cjs} +3 -3
- package/dist/{chunk-ZZJ4ZVYR.cjs.map → chunk-PJ6CC53R.cjs.map} +1 -1
- package/dist/{chunk-N3Y43KOB.js → chunk-PYHFVYVZ.js} +12 -5
- package/dist/chunk-PYHFVYVZ.js.map +1 -0
- package/dist/{chunk-XMCIXHGH.js → chunk-Q7G56ZIO.js} +39 -23
- package/dist/chunk-Q7G56ZIO.js.map +1 -0
- package/dist/{chunk-4PIW3Y5M.js → chunk-QAKASRE6.js} +34 -26
- package/dist/chunk-QAKASRE6.js.map +1 -0
- package/dist/{chunk-QGZC43L7.js → chunk-QAQOCS2J.js} +5 -5
- package/dist/{chunk-QGZC43L7.js.map → chunk-QAQOCS2J.js.map} +1 -1
- package/dist/{chunk-YVIH26FG.cjs → chunk-QKAYRHWP.cjs} +12 -12
- package/dist/{chunk-YVIH26FG.cjs.map → chunk-QKAYRHWP.cjs.map} +1 -1
- package/dist/{chunk-FDV7EQWH.js → chunk-RPG2ZP2T.js} +575 -68
- package/dist/chunk-RPG2ZP2T.js.map +1 -0
- package/dist/{chunk-P3JEMF6E.cjs → chunk-RSCA5AZW.cjs} +4 -4
- package/dist/{chunk-P3JEMF6E.cjs.map → chunk-RSCA5AZW.cjs.map} +1 -1
- package/dist/{chunk-5Y5FSR4N.js → chunk-SCXELRRZ.js} +3 -3
- package/dist/{chunk-5Y5FSR4N.js.map → chunk-SCXELRRZ.js.map} +1 -1
- package/dist/{chunk-JWTCEWQ4.cjs → chunk-SNEQXSC5.cjs} +2 -2
- package/dist/{chunk-JWTCEWQ4.cjs.map → chunk-SNEQXSC5.cjs.map} +1 -1
- package/dist/{chunk-U5TTXN45.cjs → chunk-SRA2L3SQ.cjs} +9 -7
- package/dist/chunk-SRA2L3SQ.cjs.map +1 -0
- package/dist/{chunk-5U6GETAW.js → chunk-TQDZLRIE.js} +3 -3
- package/dist/chunk-TQDZLRIE.js.map +1 -0
- package/dist/{chunk-HK3AMH3Q.cjs → chunk-VROIMIHB.cjs} +11 -3
- package/dist/chunk-VROIMIHB.cjs.map +1 -0
- package/dist/{chunk-3SHLOF4V.cjs → chunk-VTR2KGLY.cjs} +9 -9
- package/dist/{chunk-3SHLOF4V.cjs.map → chunk-VTR2KGLY.cjs.map} +1 -1
- package/dist/{chunk-XO3WLK65.js → chunk-VVDE4CHU.js} +3 -3
- package/dist/{chunk-XO3WLK65.js.map → chunk-VVDE4CHU.js.map} +1 -1
- package/dist/{chunk-BOOJDRJO.js → chunk-WSNMQQ4P.js} +38 -3
- package/dist/chunk-WSNMQQ4P.js.map +1 -0
- package/dist/chunk-WYMO3IIK.js +136 -0
- package/dist/chunk-WYMO3IIK.js.map +1 -0
- package/dist/{chunk-SPWVKDGC.cjs → chunk-X5QRRMGB.cjs} +35 -27
- package/dist/chunk-X5QRRMGB.cjs.map +1 -0
- package/dist/{chunk-SH6B4MG5.js → chunk-XBXDUAIM.js} +4 -4
- package/dist/{chunk-SH6B4MG5.js.map → chunk-XBXDUAIM.js.map} +1 -1
- package/dist/{chunk-56QJHQ5C.cjs → chunk-XEEVDZDK.cjs} +5 -5
- package/dist/{chunk-56QJHQ5C.cjs.map → chunk-XEEVDZDK.cjs.map} +1 -1
- package/dist/{chunk-GXODR6V4.js → chunk-XOIIUO6O.js} +3 -3
- package/dist/{chunk-GXODR6V4.js.map → chunk-XOIIUO6O.js.map} +1 -1
- package/dist/{chunk-ELYGV32O.cjs → chunk-XTHMC76F.cjs} +5 -5
- package/dist/{chunk-ELYGV32O.cjs.map → chunk-XTHMC76F.cjs.map} +1 -1
- package/dist/{chunk-FF235PKY.cjs → chunk-XWZEECEX.cjs} +3 -3
- package/dist/chunk-XWZEECEX.cjs.map +1 -0
- package/dist/{chunk-TVLZZI5Q.cjs → chunk-YJP6DUFO.cjs} +9 -9
- package/dist/{chunk-TVLZZI5Q.cjs.map → chunk-YJP6DUFO.cjs.map} +1 -1
- package/dist/{chunk-EHQ77LL5.js → chunk-ZB54MTMQ.js} +3 -3
- package/dist/{chunk-EHQ77LL5.js.map → chunk-ZB54MTMQ.js.map} +1 -1
- package/dist/components/Accordion/index.cjs +2 -2
- package/dist/components/Accordion/index.js +1 -1
- package/dist/components/Alert/index.cjs +5 -5
- package/dist/components/Alert/index.d.cts +1 -1
- package/dist/components/Alert/index.d.ts +1 -1
- package/dist/components/Alert/index.js +1 -1
- package/dist/components/AlertDialog/index.cjs +6 -5
- package/dist/components/AlertDialog/index.js +5 -4
- package/dist/components/AudioPlayer/index.cjs +6 -6
- package/dist/components/AudioPlayer/index.js +1 -1
- package/dist/components/Autocomplete/index.cjs +4 -4
- package/dist/components/Autocomplete/index.js +3 -3
- package/dist/components/Avatar/index.cjs +5 -5
- package/dist/components/Avatar/index.js +1 -1
- package/dist/components/Badge/index.d.cts +1 -1
- package/dist/components/Badge/index.d.ts +1 -1
- package/dist/components/Breadcrumb/index.cjs +3 -3
- package/dist/components/Breadcrumb/index.js +1 -1
- package/dist/components/Button/index.cjs +3 -3
- package/dist/components/Button/index.js +1 -1
- package/dist/components/Card/index.d.cts +2 -2
- package/dist/components/Card/index.d.ts +2 -2
- package/dist/components/CountryCodeDropdown/index.cjs +6 -6
- package/dist/components/CountryCodeDropdown/index.d.cts +11 -1
- package/dist/components/CountryCodeDropdown/index.d.ts +11 -1
- 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 +13 -9
- package/dist/components/Dropdown/index.d.cts +38 -2
- package/dist/components/Dropdown/index.d.ts +38 -2
- package/dist/components/Dropdown/index.js +3 -3
- package/dist/components/FloatingWindow/index.cjs +4 -4
- package/dist/components/FloatingWindow/index.js +2 -2
- package/dist/components/GlossaryTooltip/index.cjs +4 -4
- package/dist/components/GlossaryTooltip/index.js +3 -3
- package/dist/components/KeyboardShortcutsOverlay/index.cjs +6 -5
- package/dist/components/KeyboardShortcutsOverlay/index.js +4 -3
- package/dist/components/Markdown/index.cjs +19 -19
- package/dist/components/Markdown/index.js +7 -7
- package/dist/components/MediaEditor/index.cjs +15 -14
- package/dist/components/MediaEditor/index.js +10 -9
- package/dist/components/MediaPlayer/index.cjs +6 -6
- package/dist/components/MediaPlayer/index.js +3 -3
- package/dist/components/Modal/index.cjs +11 -10
- package/dist/components/Modal/index.d.cts +1 -1
- package/dist/components/Modal/index.d.ts +1 -1
- package/dist/components/Modal/index.js +3 -2
- package/dist/components/Pagination/index.cjs +4 -4
- package/dist/components/Pagination/index.d.cts +1 -1
- package/dist/components/Pagination/index.d.ts +1 -1
- package/dist/components/Pagination/index.js +1 -1
- package/dist/components/PhoneInput/index.cjs +4 -4
- package/dist/components/PhoneInput/index.js +2 -2
- package/dist/components/Progress/index.d.cts +1 -1
- package/dist/components/Progress/index.d.ts +1 -1
- package/dist/components/QuickAction/index.cjs +6 -6
- package/dist/components/QuickAction/index.js +1 -1
- package/dist/components/RecordButton/index.d.cts +1 -1
- package/dist/components/RecordButton/index.d.ts +1 -1
- 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/Slider/index.cjs +5 -5
- package/dist/components/Slider/index.d.cts +2 -2
- package/dist/components/Slider/index.d.ts +2 -2
- package/dist/components/Slider/index.js +1 -1
- package/dist/components/SourceTip/index.cjs +4 -4
- package/dist/components/SourceTip/index.js +3 -3
- package/dist/components/SuperChat/index.cjs +292 -115
- package/dist/components/SuperChat/index.cjs.map +1 -1
- package/dist/components/SuperChat/index.d.cts +29 -8
- package/dist/components/SuperChat/index.d.ts +29 -8
- package/dist/components/SuperChat/index.js +284 -107
- package/dist/components/SuperChat/index.js.map +1 -1
- package/dist/components/SuperChat/plugins/index.cjs +7 -7
- package/dist/components/SuperChat/plugins/index.cjs.map +1 -1
- package/dist/components/SuperChat/plugins/index.d.cts +2 -2
- package/dist/components/SuperChat/plugins/index.d.ts +2 -2
- package/dist/components/SuperChat/plugins/index.js +6 -6
- package/dist/components/SuperChat/plugins/index.js.map +1 -1
- package/dist/components/Text/index.d.cts +1 -1
- package/dist/components/Text/index.d.ts +1 -1
- package/dist/components/ThemeProvider/index.cjs +9 -9
- package/dist/components/ThemeProvider/index.d.cts +1 -1
- package/dist/components/ThemeProvider/index.d.ts +1 -1
- package/dist/components/ThemeProvider/index.js +3 -3
- package/dist/components/Toggle/index.d.cts +1 -1
- package/dist/components/Toggle/index.d.ts +1 -1
- package/dist/components/Tooltip/index.cjs +3 -3
- package/dist/components/Tooltip/index.js +2 -2
- package/dist/components/TranscriptView/index.cjs +3 -3
- package/dist/components/TranscriptView/index.js +1 -1
- package/dist/datavis.cjs +2 -2
- package/dist/datavis.js +1 -1
- package/dist/esheet.cjs +15 -14
- package/dist/esheet.cjs.map +1 -1
- package/dist/esheet.js +12 -11
- package/dist/esheet.js.map +1 -1
- package/dist/hooks/index.cjs +3 -3
- package/dist/hooks/index.d.cts +1 -1
- package/dist/hooks/index.d.ts +1 -1
- package/dist/hooks/index.js +2 -2
- package/dist/index.cjs +2509 -2860
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +278 -43
- package/dist/index.d.ts +278 -43
- package/dist/index.js +1305 -1700
- package/dist/index.js.map +1 -1
- package/dist/motion.cjs +87 -0
- package/dist/motion.cjs.map +1 -0
- package/dist/motion.d.cts +52 -0
- package/dist/motion.d.ts +52 -0
- package/dist/motion.js +50 -0
- package/dist/motion.js.map +1 -0
- package/dist/styles/init.css +25 -0
- package/dist/styles.css +1 -1
- package/dist/tailwind-preset.cjs +4 -4
- package/dist/tailwind-preset.js +1 -1
- package/dist/{types-BoTeTPdH.d.ts → types-9vK_YdEb.d.ts} +12 -1
- package/dist/{types-DyIB9HYT.d.cts → types-DZDroUW8.d.cts} +12 -1
- package/dist/{useAnchoredPosition-C7PNglzD.d.ts → useAnchoredPosition-CKwLSQW8.d.cts} +10 -3
- package/dist/{useAnchoredPosition-C7PNglzD.d.cts → useAnchoredPosition-CKwLSQW8.d.ts} +10 -3
- package/package.json +21 -2
- package/dist/CsvBlock-OTFG3PYZ.cjs +0 -15
- package/dist/CsvBlock-PUSTBQ5B.js +0 -6
- package/dist/HtmlPreviewBlock-QHLSIMWJ.cjs +0 -15
- package/dist/HtmlPreviewBlock-YF2YVKKX.js +0 -6
- package/dist/MermaidBlock-H3TWNC4D.js +0 -6
- package/dist/MermaidBlock-ZLLBO3VY.cjs +0 -15
- package/dist/SurveyBlock-JLHS3YQD.js +0 -6
- package/dist/SurveyBlock-M2ZRTGVJ.cjs +0 -15
- package/dist/chunk-26DPQUSB.cjs +0 -1177
- package/dist/chunk-26DPQUSB.cjs.map +0 -1
- package/dist/chunk-3PXOIAF6.js +0 -3
- package/dist/chunk-4AE2L6AO.cjs.map +0 -1
- package/dist/chunk-4PIW3Y5M.js.map +0 -1
- package/dist/chunk-5JZIDILK.cjs.map +0 -1
- package/dist/chunk-5U6GETAW.js.map +0 -1
- package/dist/chunk-6EWJGRC3.js.map +0 -1
- package/dist/chunk-7L7OPISJ.cjs.map +0 -1
- package/dist/chunk-AESFOMSH.js.map +0 -1
- package/dist/chunk-BOOJDRJO.js.map +0 -1
- package/dist/chunk-BOW7ZGI2.cjs.map +0 -1
- package/dist/chunk-D2GID3YK.js.map +0 -1
- package/dist/chunk-DG7KE4YJ.cjs.map +0 -1
- package/dist/chunk-EKRT7K2K.js +0 -1145
- package/dist/chunk-EKRT7K2K.js.map +0 -1
- package/dist/chunk-EPQPUFS6.cjs.map +0 -1
- package/dist/chunk-FDUA6OGN.js.map +0 -1
- package/dist/chunk-FDV7EQWH.js.map +0 -1
- package/dist/chunk-FF235PKY.cjs.map +0 -1
- package/dist/chunk-H7QSGFMZ.cjs.map +0 -1
- package/dist/chunk-HK3AMH3Q.cjs.map +0 -1
- package/dist/chunk-IILJGFI5.js.map +0 -1
- package/dist/chunk-IYXCFIMP.js.map +0 -1
- package/dist/chunk-JHZW3Y62.js.map +0 -1
- package/dist/chunk-L6D4CKLV.cjs.map +0 -1
- package/dist/chunk-LZU7YBXG.js.map +0 -1
- package/dist/chunk-MYFZYUPR.cjs.map +0 -1
- package/dist/chunk-N3Y43KOB.js.map +0 -1
- package/dist/chunk-P2VTQ5AR.cjs.map +0 -1
- package/dist/chunk-RDGRKYQ5.cjs.map +0 -1
- package/dist/chunk-RYQ3S3KO.cjs.map +0 -1
- package/dist/chunk-RZJXCI53.js.map +0 -1
- package/dist/chunk-SEPYBAML.js.map +0 -1
- package/dist/chunk-SK7H3Z67.cjs.map +0 -1
- package/dist/chunk-SPWVKDGC.cjs.map +0 -1
- package/dist/chunk-U5TTXN45.cjs.map +0 -1
- package/dist/chunk-XMCIXHGH.js.map +0 -1
- package/dist/chunk-XS35KPBZ.cjs.map +0 -1
- package/dist/chunk-XWYKLEKG.js.map +0 -1
- package/dist/chunk-Y6YSJPVC.js.map +0 -1
|
@@ -1,25 +1,26 @@
|
|
|
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-
|
|
4
|
-
import
|
|
5
|
-
import { Dropdown, DropdownItem } from '../../chunk-
|
|
3
|
+
import { ChatBubble, MCPToolCallDisplay, AITypingIndicator, SparklesIcon, CloseIcon, ChatComposer } from '../../chunk-KATEJG2F.js';
|
|
4
|
+
import '../../chunk-IF3X2WZP.js';
|
|
5
|
+
import { Dropdown, DropdownSubmenu, DropdownItem } from '../../chunk-KU3XRHWA.js';
|
|
6
|
+
import { Avatar } from '../../chunk-HZ4MBUC3.js';
|
|
6
7
|
import '../../chunk-IQ4KQJAO.js';
|
|
7
|
-
import '../../chunk-
|
|
8
|
-
import { Avatar } from '../../chunk-DCBMTFLE.js';
|
|
8
|
+
import '../../chunk-VVDE4CHU.js';
|
|
9
9
|
import '../../chunk-6NZXWKUE.js';
|
|
10
10
|
import '../../chunk-3IMM2PM4.js';
|
|
11
|
+
import '../../chunk-BKSPDTX4.js';
|
|
11
12
|
import { Badge } from '../../chunk-BMSG4NBH.js';
|
|
13
|
+
import { cn } from '../../chunk-TQONQSJO.js';
|
|
12
14
|
import '../../chunk-T4ME7QCT.js';
|
|
13
15
|
import '../../chunk-62ZOA6PX.js';
|
|
14
|
-
import '../../chunk-
|
|
15
|
-
import
|
|
16
|
-
import * as React4 from 'react';
|
|
16
|
+
import '../../chunk-WSNMQQ4P.js';
|
|
17
|
+
import * as React2 from 'react';
|
|
17
18
|
import Markdown, { defaultUrlTransform } from 'react-markdown';
|
|
18
19
|
import remarkGfm from 'remark-gfm';
|
|
19
20
|
import rehypeSanitize, { defaultSchema } from 'rehype-sanitize';
|
|
20
21
|
import { jsx, jsxs, Fragment } from 'react/jsx-runtime';
|
|
21
22
|
import { cva } from 'class-variance-authority';
|
|
22
|
-
import {
|
|
23
|
+
import { Ellipsis, Check, Clipboard, Pencil } from 'lucide-react';
|
|
23
24
|
import { useVirtualizer } from '@tanstack/react-virtual';
|
|
24
25
|
|
|
25
26
|
function remarkPreserveLineBreaks() {
|
|
@@ -152,7 +153,7 @@ function baseComponents() {
|
|
|
152
153
|
{
|
|
153
154
|
...props,
|
|
154
155
|
className: cn(
|
|
155
|
-
"w-full border-collapse text-sm [&_td]:border [&_td]:border-neutral-200 [&_td]:px-2 [&_td]:py-1 dark:[&_td]:border-neutral-700 [&_th]:border [&_th]:border-neutral-200 [&_th]:px-2 [&_th]:py-1 [&_th]:text-
|
|
156
|
+
"w-full border-collapse text-sm [&_td]:border [&_td]:border-neutral-200 [&_td]:px-2 [&_td]:py-1 dark:[&_td]:border-neutral-700 [&_th]:border [&_th]:border-neutral-200 [&_th]:px-2 [&_th]:py-1 [&_th]:text-start dark:[&_th]:border-neutral-700",
|
|
156
157
|
props.className
|
|
157
158
|
)
|
|
158
159
|
}
|
|
@@ -266,7 +267,7 @@ var transformUrl = (url, key, node) => {
|
|
|
266
267
|
}
|
|
267
268
|
return defaultUrlTransform(url);
|
|
268
269
|
};
|
|
269
|
-
var MarkdownContent =
|
|
270
|
+
var MarkdownContent = React2.memo(function MarkdownContent2({
|
|
270
271
|
text,
|
|
271
272
|
messageId,
|
|
272
273
|
streaming,
|
|
@@ -461,13 +462,19 @@ function filesToComposerAttachments(files) {
|
|
|
461
462
|
)
|
|
462
463
|
);
|
|
463
464
|
}
|
|
464
|
-
|
|
465
|
-
|
|
466
|
-
|
|
467
|
-
|
|
465
|
+
var actionRevealClass = "opacity-0 transition-opacity group-focus-within:opacity-100 group-hover:opacity-100 focus-visible:opacity-100 [@media(pointer:coarse)]:opacity-100";
|
|
466
|
+
var actionButtonClass = "rounded p-1 text-neutral-400 hover:text-neutral-600 dark:hover:text-neutral-200";
|
|
467
|
+
function useMessageCopy({
|
|
468
|
+
markdown,
|
|
469
|
+
getHtml,
|
|
470
|
+
getText,
|
|
471
|
+
defaultFormat
|
|
472
|
+
}) {
|
|
473
|
+
const [copied, setCopied] = React2.useState(false);
|
|
474
|
+
const copiedTimer = React2.useRef(
|
|
468
475
|
void 0
|
|
469
476
|
);
|
|
470
|
-
|
|
477
|
+
React2.useEffect(() => () => window.clearTimeout(copiedTimer.current), []);
|
|
471
478
|
const flash = () => {
|
|
472
479
|
setCopied(true);
|
|
473
480
|
window.clearTimeout(copiedTimer.current);
|
|
@@ -498,20 +505,110 @@ function CopyMenu({ isSelf, markdown, getHtml, getText }) {
|
|
|
498
505
|
}
|
|
499
506
|
};
|
|
500
507
|
const run = (fn) => {
|
|
501
|
-
setOpen(false);
|
|
502
508
|
void fn().then(flash, () => {
|
|
503
509
|
});
|
|
504
510
|
};
|
|
511
|
+
const copyRich = () => run(writeBoth);
|
|
512
|
+
const copyMarkdown = () => run(() => writeText(markdown || getText()));
|
|
513
|
+
const copyPlain = () => run(() => writeText(getText()));
|
|
514
|
+
const copyDefault = defaultFormat === "markdown" ? copyMarkdown : defaultFormat === "plain" ? copyPlain : copyRich;
|
|
515
|
+
return { copied, copyDefault, copyRich, copyMarkdown, copyPlain };
|
|
516
|
+
}
|
|
517
|
+
function ActionMenuItem({
|
|
518
|
+
item,
|
|
519
|
+
onSelect
|
|
520
|
+
}) {
|
|
521
|
+
return /* @__PURE__ */ jsx(DropdownItem, { onClick: () => onSelect(item.onSelect), children: item.description ? /* @__PURE__ */ jsxs("span", { className: "flex flex-col items-start", children: [
|
|
522
|
+
/* @__PURE__ */ jsx("span", { children: item.label }),
|
|
523
|
+
/* @__PURE__ */ jsx("span", { className: "text-[10px] font-normal text-neutral-400", children: item.description })
|
|
524
|
+
] }) : item.label });
|
|
525
|
+
}
|
|
526
|
+
function FooterActionButton({
|
|
527
|
+
action,
|
|
528
|
+
isSelf
|
|
529
|
+
}) {
|
|
530
|
+
const [open, setOpen] = React2.useState(false);
|
|
531
|
+
const onClickCapture = action.submenu ? (e) => {
|
|
532
|
+
if (e.metaKey || e.ctrlKey) {
|
|
533
|
+
e.preventDefault();
|
|
534
|
+
e.stopPropagation();
|
|
535
|
+
action.onSelect();
|
|
536
|
+
}
|
|
537
|
+
} : void 0;
|
|
538
|
+
const button = /* @__PURE__ */ jsx(
|
|
539
|
+
"button",
|
|
540
|
+
{
|
|
541
|
+
type: "button",
|
|
542
|
+
"data-slot": `superchat-action-${action.id}`,
|
|
543
|
+
"aria-label": action.label,
|
|
544
|
+
title: action.title ?? action.label,
|
|
545
|
+
onClick: action.submenu ? void 0 : action.onSelect,
|
|
546
|
+
onClickCapture,
|
|
547
|
+
className: actionButtonClass,
|
|
548
|
+
children: action.icon
|
|
549
|
+
}
|
|
550
|
+
);
|
|
551
|
+
if (!action.submenu) return button;
|
|
552
|
+
return /* @__PURE__ */ jsx(
|
|
553
|
+
Dropdown,
|
|
554
|
+
{
|
|
555
|
+
open,
|
|
556
|
+
onOpenChange: setOpen,
|
|
557
|
+
placement: isSelf ? "top-end" : "top-start",
|
|
558
|
+
trigger: button,
|
|
559
|
+
children: action.submenu.items.map((item) => /* @__PURE__ */ jsx(
|
|
560
|
+
ActionMenuItem,
|
|
561
|
+
{
|
|
562
|
+
item,
|
|
563
|
+
onSelect: (fn) => {
|
|
564
|
+
setOpen(false);
|
|
565
|
+
fn();
|
|
566
|
+
}
|
|
567
|
+
},
|
|
568
|
+
item.id
|
|
569
|
+
))
|
|
570
|
+
}
|
|
571
|
+
);
|
|
572
|
+
}
|
|
573
|
+
var MessageActionsBar = React2.forwardRef(function MessageActionsBar2({ actions, isSelf }, ref) {
|
|
574
|
+
return /* @__PURE__ */ jsx(
|
|
575
|
+
"div",
|
|
576
|
+
{
|
|
577
|
+
ref,
|
|
578
|
+
"data-slot": "superchat-message-actions",
|
|
579
|
+
className: cn(
|
|
580
|
+
"flex items-center gap-0.5",
|
|
581
|
+
isSelf && "justify-end",
|
|
582
|
+
actionRevealClass
|
|
583
|
+
),
|
|
584
|
+
children: actions.map((action) => /* @__PURE__ */ jsx(FooterActionButton, { action, isSelf }, action.id))
|
|
585
|
+
}
|
|
586
|
+
);
|
|
587
|
+
});
|
|
588
|
+
function MessageOverflowMenu({
|
|
589
|
+
isSelf,
|
|
590
|
+
actions,
|
|
591
|
+
footerVisible
|
|
592
|
+
}) {
|
|
593
|
+
const [open, setOpen] = React2.useState(false);
|
|
594
|
+
const select = (fn) => {
|
|
595
|
+
setOpen(false);
|
|
596
|
+
fn();
|
|
597
|
+
};
|
|
505
598
|
return /* @__PURE__ */ jsx(
|
|
506
599
|
"div",
|
|
507
600
|
{
|
|
508
601
|
className: cn(
|
|
509
|
-
"sticky bottom-2 shrink-0 self-end",
|
|
602
|
+
"sticky bottom-2 shrink-0 self-end transition-opacity",
|
|
510
603
|
// Rich content (e.g. NITRO tables) layers internals up to z-50, so the
|
|
511
604
|
// open menu's stacking context must clear that.
|
|
512
|
-
open ? "z-[60]" : "z-10"
|
|
605
|
+
open ? "z-[60]" : "z-10",
|
|
606
|
+
// Hand off to the footer bar when it's visible. `invisible` (not
|
|
607
|
+
// just opacity) drops the hidden button from the tab order so
|
|
608
|
+
// keyboard users can't focus an unseen control.
|
|
609
|
+
footerVisible && !open && "pointer-events-none invisible opacity-0"
|
|
513
610
|
),
|
|
514
|
-
children: /* @__PURE__ */
|
|
611
|
+
children: /* @__PURE__ */ jsx(
|
|
515
612
|
Dropdown,
|
|
516
613
|
{
|
|
517
614
|
open,
|
|
@@ -521,32 +618,32 @@ function CopyMenu({ isSelf, markdown, getHtml, getText }) {
|
|
|
521
618
|
"button",
|
|
522
619
|
{
|
|
523
620
|
type: "button",
|
|
524
|
-
"data-slot": "superchat-
|
|
525
|
-
"aria-label": "
|
|
526
|
-
className:
|
|
527
|
-
children:
|
|
621
|
+
"data-slot": "superchat-overflow-button",
|
|
622
|
+
"aria-label": "Message actions",
|
|
623
|
+
className: cn(actionButtonClass, actionRevealClass),
|
|
624
|
+
children: /* @__PURE__ */ jsx(Ellipsis, { size: 14, "aria-hidden": "true" })
|
|
528
625
|
}
|
|
529
626
|
),
|
|
530
|
-
children:
|
|
531
|
-
|
|
532
|
-
|
|
533
|
-
|
|
534
|
-
|
|
535
|
-
/* @__PURE__ */ jsx(
|
|
627
|
+
children: actions.map(
|
|
628
|
+
(action) => action.submenu ? (
|
|
629
|
+
// Actions with variants collapse to just their submenu — a
|
|
630
|
+
// top-level default item would duplicate the flyout's options.
|
|
631
|
+
/* @__PURE__ */ jsx(DropdownSubmenu, { label: action.submenu.label, children: action.submenu.items.map((item) => /* @__PURE__ */ jsx(ActionMenuItem, { item, onSelect: select }, item.id)) }, action.id)
|
|
632
|
+
) : /* @__PURE__ */ jsx(
|
|
536
633
|
DropdownItem,
|
|
537
634
|
{
|
|
538
|
-
onClick: () =>
|
|
539
|
-
children:
|
|
540
|
-
}
|
|
541
|
-
|
|
542
|
-
|
|
543
|
-
|
|
635
|
+
onClick: () => select(action.onSelect),
|
|
636
|
+
children: action.label
|
|
637
|
+
},
|
|
638
|
+
action.id
|
|
639
|
+
)
|
|
640
|
+
)
|
|
544
641
|
}
|
|
545
642
|
)
|
|
546
643
|
}
|
|
547
644
|
);
|
|
548
645
|
}
|
|
549
|
-
var MessageRow =
|
|
646
|
+
var MessageRow = React2.memo(function MessageRow2({
|
|
550
647
|
message,
|
|
551
648
|
participant,
|
|
552
649
|
isSelf,
|
|
@@ -554,21 +651,22 @@ var MessageRow = React4.memo(function MessageRow2({
|
|
|
554
651
|
linkBuilder,
|
|
555
652
|
onReferenceClick,
|
|
556
653
|
editable,
|
|
557
|
-
onMessageEdited
|
|
654
|
+
onMessageEdited,
|
|
655
|
+
defaultCopyFormat = "rich"
|
|
558
656
|
}) {
|
|
559
657
|
const streaming = message.status === "streaming";
|
|
560
658
|
const hasBody = !!message.text || (message.content?.length ?? 0) > 0;
|
|
561
|
-
const [isEditing, setIsEditing] =
|
|
562
|
-
const [draft, setDraft] =
|
|
563
|
-
const editRef =
|
|
564
|
-
const bubbleRef =
|
|
565
|
-
const autosize =
|
|
659
|
+
const [isEditing, setIsEditing] = React2.useState(false);
|
|
660
|
+
const [draft, setDraft] = React2.useState(message.text ?? "");
|
|
661
|
+
const editRef = React2.useRef(null);
|
|
662
|
+
const bubbleRef = React2.useRef(null);
|
|
663
|
+
const autosize = React2.useCallback(() => {
|
|
566
664
|
const el = editRef.current;
|
|
567
665
|
if (!el) return;
|
|
568
666
|
el.style.height = "auto";
|
|
569
667
|
el.style.height = `${el.scrollHeight}px`;
|
|
570
668
|
}, []);
|
|
571
|
-
|
|
669
|
+
React2.useEffect(() => {
|
|
572
670
|
if (!isEditing) return;
|
|
573
671
|
const el = editRef.current;
|
|
574
672
|
if (!el) return;
|
|
@@ -576,6 +674,37 @@ var MessageRow = React4.memo(function MessageRow2({
|
|
|
576
674
|
el.setSelectionRange(el.value.length, el.value.length);
|
|
577
675
|
autosize();
|
|
578
676
|
}, [isEditing, autosize]);
|
|
677
|
+
const canEdit = !!editable && isSelf && !streaming && typeof message.text === "string" && !message.content?.length;
|
|
678
|
+
const markdownSource = typeof message.text === "string" && message.text ? message.text : message.content?.map((block) => {
|
|
679
|
+
if (block.type === "code" && block.text) {
|
|
680
|
+
return `\`\`\`${block.language ?? ""}
|
|
681
|
+
${block.text}
|
|
682
|
+
\`\`\``;
|
|
683
|
+
}
|
|
684
|
+
if ((block.type === "text" || block.type === "thinking") && block.text) {
|
|
685
|
+
return block.text;
|
|
686
|
+
}
|
|
687
|
+
return "";
|
|
688
|
+
}).filter(Boolean).join("\n\n") ?? "";
|
|
689
|
+
const canCopy = !isEditing && (!!message.content?.length || typeof message.text === "string" && message.text.length > 0);
|
|
690
|
+
const hasActions = canCopy || canEdit && !isEditing;
|
|
691
|
+
const copy = useMessageCopy({
|
|
692
|
+
markdown: markdownSource,
|
|
693
|
+
getHtml: () => bubbleRef.current?.innerHTML ?? "",
|
|
694
|
+
getText: () => bubbleRef.current?.textContent ?? "",
|
|
695
|
+
defaultFormat: defaultCopyFormat
|
|
696
|
+
});
|
|
697
|
+
const actionsBarRef = React2.useRef(null);
|
|
698
|
+
const [footerVisible, setFooterVisible] = React2.useState(true);
|
|
699
|
+
React2.useEffect(() => {
|
|
700
|
+
const el = actionsBarRef.current;
|
|
701
|
+
if (!el || typeof globalThis.IntersectionObserver === "undefined") return;
|
|
702
|
+
const observer = new globalThis.IntersectionObserver(([entry]) => {
|
|
703
|
+
setFooterVisible(entry?.isIntersecting ?? false);
|
|
704
|
+
});
|
|
705
|
+
observer.observe(el);
|
|
706
|
+
return () => observer.disconnect();
|
|
707
|
+
}, [hasActions]);
|
|
579
708
|
if (message.type === "system") {
|
|
580
709
|
return /* @__PURE__ */ jsx(
|
|
581
710
|
"div",
|
|
@@ -607,7 +736,6 @@ var MessageRow = React4.memo(function MessageRow2({
|
|
|
607
736
|
const accent = participant?.color;
|
|
608
737
|
const accentTextColor = accessibleAccentTextColor(accent);
|
|
609
738
|
const authorName = participant?.name ?? "Unknown";
|
|
610
|
-
const canEdit = !!editable && isSelf && !streaming && typeof message.text === "string" && !message.content?.length;
|
|
611
739
|
const startEdit = () => {
|
|
612
740
|
setDraft(message.text ?? "");
|
|
613
741
|
setIsEditing(true);
|
|
@@ -651,18 +779,46 @@ var MessageRow = React4.memo(function MessageRow2({
|
|
|
651
779
|
requestAnimationFrame(autosize);
|
|
652
780
|
});
|
|
653
781
|
};
|
|
654
|
-
const
|
|
655
|
-
|
|
656
|
-
|
|
657
|
-
|
|
658
|
-
|
|
659
|
-
|
|
660
|
-
|
|
661
|
-
|
|
662
|
-
|
|
663
|
-
|
|
664
|
-
|
|
665
|
-
|
|
782
|
+
const actions = [
|
|
783
|
+
...canCopy ? [
|
|
784
|
+
{
|
|
785
|
+
id: "copy",
|
|
786
|
+
label: "Copy message",
|
|
787
|
+
title: "Copy message (\u2318/Ctrl-click: default format)",
|
|
788
|
+
icon: copy.copied ? /* @__PURE__ */ jsx(Check, { size: 14, "aria-hidden": "true" }) : /* @__PURE__ */ jsx(Clipboard, { size: 14, "aria-hidden": "true" }),
|
|
789
|
+
onSelect: copy.copyDefault,
|
|
790
|
+
submenu: {
|
|
791
|
+
label: "Copy as",
|
|
792
|
+
items: [
|
|
793
|
+
{
|
|
794
|
+
id: "copy-rich",
|
|
795
|
+
label: "Copy as rich text",
|
|
796
|
+
description: "Rich text + Markdown",
|
|
797
|
+
onSelect: copy.copyRich
|
|
798
|
+
},
|
|
799
|
+
{
|
|
800
|
+
id: "copy-markdown",
|
|
801
|
+
label: "Copy as Markdown",
|
|
802
|
+
onSelect: copy.copyMarkdown
|
|
803
|
+
},
|
|
804
|
+
{
|
|
805
|
+
id: "copy-plain",
|
|
806
|
+
label: "Copy as plain text",
|
|
807
|
+
onSelect: copy.copyPlain
|
|
808
|
+
}
|
|
809
|
+
]
|
|
810
|
+
}
|
|
811
|
+
}
|
|
812
|
+
] : [],
|
|
813
|
+
...canEdit && !isEditing ? [
|
|
814
|
+
{
|
|
815
|
+
id: "edit",
|
|
816
|
+
label: "Edit message",
|
|
817
|
+
icon: /* @__PURE__ */ jsx(Pencil, { size: 14, "aria-hidden": "true" }),
|
|
818
|
+
onSelect: startEdit
|
|
819
|
+
}
|
|
820
|
+
] : []
|
|
821
|
+
];
|
|
666
822
|
return /* @__PURE__ */ jsxs(
|
|
667
823
|
"div",
|
|
668
824
|
{
|
|
@@ -700,17 +856,6 @@ ${block.text}
|
|
|
700
856
|
title: `Edited ${formatTime(message.editedAt)}`,
|
|
701
857
|
children: "(edited)"
|
|
702
858
|
}
|
|
703
|
-
),
|
|
704
|
-
canEdit && !isEditing && /* @__PURE__ */ jsx(
|
|
705
|
-
"button",
|
|
706
|
-
{
|
|
707
|
-
type: "button",
|
|
708
|
-
"data-slot": "superchat-edit-button",
|
|
709
|
-
onClick: startEdit,
|
|
710
|
-
"aria-label": "Edit message",
|
|
711
|
-
className: "rounded p-0.5 text-neutral-400 opacity-0 transition-opacity group-focus-within:opacity-100 group-hover:opacity-100 hover:text-neutral-600 focus-visible:opacity-100 dark:hover:text-neutral-200",
|
|
712
|
-
children: /* @__PURE__ */ jsx(Pencil, { size: 14, "aria-hidden": "true" })
|
|
713
|
-
}
|
|
714
859
|
)
|
|
715
860
|
]
|
|
716
861
|
}
|
|
@@ -723,13 +868,12 @@ ${block.text}
|
|
|
723
868
|
isSelf ? "flex-row-reverse" : "flex-row"
|
|
724
869
|
),
|
|
725
870
|
children: [
|
|
726
|
-
|
|
727
|
-
|
|
871
|
+
hasActions && /* @__PURE__ */ jsx(
|
|
872
|
+
MessageOverflowMenu,
|
|
728
873
|
{
|
|
729
874
|
isSelf,
|
|
730
|
-
|
|
731
|
-
|
|
732
|
-
getText: () => bubbleRef.current?.textContent ?? ""
|
|
875
|
+
actions,
|
|
876
|
+
footerVisible
|
|
733
877
|
}
|
|
734
878
|
),
|
|
735
879
|
/* @__PURE__ */ jsx(
|
|
@@ -842,6 +986,14 @@ ${block.text}
|
|
|
842
986
|
)
|
|
843
987
|
]
|
|
844
988
|
}
|
|
989
|
+
),
|
|
990
|
+
hasActions && /* @__PURE__ */ jsx(
|
|
991
|
+
MessageActionsBar,
|
|
992
|
+
{
|
|
993
|
+
ref: actionsBarRef,
|
|
994
|
+
actions,
|
|
995
|
+
isSelf
|
|
996
|
+
}
|
|
845
997
|
)
|
|
846
998
|
] })
|
|
847
999
|
]
|
|
@@ -849,7 +1001,7 @@ ${block.text}
|
|
|
849
1001
|
);
|
|
850
1002
|
});
|
|
851
1003
|
var sidebarItem = cva(
|
|
852
|
-
"flex w-full items-center gap-2 rounded-lg px-3 py-2 text-
|
|
1004
|
+
"flex w-full items-center gap-2 rounded-lg px-3 py-2 text-start text-sm transition-colors",
|
|
853
1005
|
{
|
|
854
1006
|
variants: {
|
|
855
1007
|
active: {
|
|
@@ -869,11 +1021,12 @@ function VirtualThread({
|
|
|
869
1021
|
onReferenceClick,
|
|
870
1022
|
editable,
|
|
871
1023
|
onMessageEdited,
|
|
1024
|
+
defaultCopyFormat,
|
|
872
1025
|
order,
|
|
873
1026
|
conversationId,
|
|
874
1027
|
containerProps
|
|
875
1028
|
}) {
|
|
876
|
-
const parentRef =
|
|
1029
|
+
const parentRef = React2.useRef(null);
|
|
877
1030
|
const virtualizer = useVirtualizer({
|
|
878
1031
|
count: items.length,
|
|
879
1032
|
getScrollElement: () => parentRef.current,
|
|
@@ -883,7 +1036,7 @@ function VirtualThread({
|
|
|
883
1036
|
getItemKey: (index) => items[index]?.id ?? index
|
|
884
1037
|
});
|
|
885
1038
|
const count = items.length;
|
|
886
|
-
|
|
1039
|
+
React2.useEffect(() => {
|
|
887
1040
|
if (count === 0) return;
|
|
888
1041
|
if (order === "desc") {
|
|
889
1042
|
virtualizer.scrollToIndex(0, { align: "start" });
|
|
@@ -925,7 +1078,8 @@ function VirtualThread({
|
|
|
925
1078
|
linkBuilder,
|
|
926
1079
|
onReferenceClick,
|
|
927
1080
|
editable,
|
|
928
|
-
onMessageEdited
|
|
1081
|
+
onMessageEdited,
|
|
1082
|
+
defaultCopyFormat
|
|
929
1083
|
}
|
|
930
1084
|
) })
|
|
931
1085
|
},
|
|
@@ -946,6 +1100,7 @@ function SuperChat({
|
|
|
946
1100
|
order = "asc",
|
|
947
1101
|
virtualized = false,
|
|
948
1102
|
linkBuilder,
|
|
1103
|
+
defaultCopyFormat,
|
|
949
1104
|
className,
|
|
950
1105
|
onMessageSent,
|
|
951
1106
|
onMessageEdited,
|
|
@@ -953,35 +1108,35 @@ function SuperChat({
|
|
|
953
1108
|
onReferenceClick,
|
|
954
1109
|
onBack
|
|
955
1110
|
}) {
|
|
956
|
-
const headingId =
|
|
957
|
-
const renderText =
|
|
1111
|
+
const headingId = React2.useId();
|
|
1112
|
+
const renderText = React2.useMemo(
|
|
958
1113
|
() => renderTextContent ?? createMarkdownRenderer({
|
|
959
1114
|
plugins: renderPlugins,
|
|
960
1115
|
trusted: trustedContent
|
|
961
1116
|
}),
|
|
962
1117
|
[renderTextContent, renderPlugins, trustedContent]
|
|
963
1118
|
);
|
|
964
|
-
const threadRef =
|
|
965
|
-
|
|
1119
|
+
const threadRef = React2.useRef(null);
|
|
1120
|
+
React2.useEffect(() => {
|
|
966
1121
|
if (virtualized) return;
|
|
967
1122
|
const el = threadRef.current;
|
|
968
1123
|
if (!el) return;
|
|
969
1124
|
el.scrollTop = order === "desc" ? 0 : el.scrollHeight;
|
|
970
1125
|
}, [conversation.thread.length, conversation.id, order, virtualized]);
|
|
971
|
-
const participantById =
|
|
1126
|
+
const participantById = React2.useMemo(() => {
|
|
972
1127
|
const map = /* @__PURE__ */ new Map();
|
|
973
1128
|
conversation.participants.forEach((p) => map.set(p.id, p));
|
|
974
1129
|
return map;
|
|
975
1130
|
}, [conversation]);
|
|
976
|
-
const orderedThread =
|
|
1131
|
+
const orderedThread = React2.useMemo(() => {
|
|
977
1132
|
const sorted = [...conversation.thread].sort(byTime);
|
|
978
1133
|
return order === "desc" ? sorted.reverse() : sorted;
|
|
979
1134
|
}, [conversation, order]);
|
|
980
|
-
const onMessageEditedRef =
|
|
1135
|
+
const onMessageEditedRef = React2.useRef(onMessageEdited);
|
|
981
1136
|
onMessageEditedRef.current = onMessageEdited;
|
|
982
|
-
const conversationRef =
|
|
1137
|
+
const conversationRef = React2.useRef(conversation);
|
|
983
1138
|
conversationRef.current = conversation;
|
|
984
|
-
const handleMessageEdited =
|
|
1139
|
+
const handleMessageEdited = React2.useCallback(
|
|
985
1140
|
(messageId, text) => {
|
|
986
1141
|
onMessageEditedRef.current?.(messageId, text, {
|
|
987
1142
|
conversation: conversationRef.current
|
|
@@ -990,7 +1145,7 @@ function SuperChat({
|
|
|
990
1145
|
[]
|
|
991
1146
|
);
|
|
992
1147
|
const editable = !readOnly && !!onMessageEdited;
|
|
993
|
-
const mentionOptions =
|
|
1148
|
+
const mentionOptions = React2.useMemo(
|
|
994
1149
|
() => conversation.participants.filter((p) => p.kind !== "system").map((p) => ({
|
|
995
1150
|
id: p.id,
|
|
996
1151
|
label: p.name,
|
|
@@ -1000,18 +1155,33 @@ function SuperChat({
|
|
|
1000
1155
|
})),
|
|
1001
1156
|
[conversation.participants]
|
|
1002
1157
|
);
|
|
1003
|
-
const composerAccept =
|
|
1158
|
+
const composerAccept = React2.useMemo(
|
|
1004
1159
|
() => acceptTokensFor(acceptedFileTypes),
|
|
1005
1160
|
[acceptedFileTypes]
|
|
1006
1161
|
);
|
|
1007
|
-
const
|
|
1162
|
+
const [draft, setDraft] = React2.useState("");
|
|
1163
|
+
const draftEpochRef = React2.useRef(0);
|
|
1164
|
+
const handleDraftChange = React2.useCallback((value) => {
|
|
1165
|
+
draftEpochRef.current += 1;
|
|
1166
|
+
setDraft(value);
|
|
1167
|
+
}, []);
|
|
1168
|
+
const handleComposerSend = React2.useCallback(
|
|
1008
1169
|
async (message) => {
|
|
1009
|
-
const
|
|
1010
|
-
|
|
1011
|
-
|
|
1012
|
-
|
|
1013
|
-
|
|
1014
|
-
|
|
1170
|
+
const epoch = draftEpochRef.current;
|
|
1171
|
+
try {
|
|
1172
|
+
const text = message.content;
|
|
1173
|
+
const mentions = detectMentions(text, conversation.participants);
|
|
1174
|
+
const attachments = await filesToComposerAttachments(
|
|
1175
|
+
message.attachments ?? []
|
|
1176
|
+
);
|
|
1177
|
+
await Promise.resolve(
|
|
1178
|
+
onMessageSent?.(text, { conversation, mentions, attachments })
|
|
1179
|
+
);
|
|
1180
|
+
} catch {
|
|
1181
|
+
if (draftEpochRef.current === epoch) {
|
|
1182
|
+
setDraft(message.content);
|
|
1183
|
+
}
|
|
1184
|
+
}
|
|
1015
1185
|
},
|
|
1016
1186
|
[conversation, onMessageSent]
|
|
1017
1187
|
);
|
|
@@ -1039,7 +1209,7 @@ function SuperChat({
|
|
|
1039
1209
|
type: "button",
|
|
1040
1210
|
onClick: onBack,
|
|
1041
1211
|
"aria-label": "Back to conversations",
|
|
1042
|
-
className: "-
|
|
1212
|
+
className: "-ms-1 shrink-0 rounded-md p-1 text-neutral-500 hover:bg-neutral-100 sm:hidden dark:text-neutral-300 dark:hover:bg-neutral-800",
|
|
1043
1213
|
children: /* @__PURE__ */ jsx(
|
|
1044
1214
|
"svg",
|
|
1045
1215
|
{
|
|
@@ -1102,6 +1272,7 @@ function SuperChat({
|
|
|
1102
1272
|
onReferenceClick,
|
|
1103
1273
|
editable,
|
|
1104
1274
|
onMessageEdited: handleMessageEdited,
|
|
1275
|
+
defaultCopyFormat,
|
|
1105
1276
|
order,
|
|
1106
1277
|
conversationId: conversation.id,
|
|
1107
1278
|
containerProps: {
|
|
@@ -1134,23 +1305,27 @@ function SuperChat({
|
|
|
1134
1305
|
linkBuilder,
|
|
1135
1306
|
onReferenceClick,
|
|
1136
1307
|
editable,
|
|
1137
|
-
onMessageEdited: handleMessageEdited
|
|
1308
|
+
onMessageEdited: handleMessageEdited,
|
|
1309
|
+
defaultCopyFormat
|
|
1138
1310
|
},
|
|
1139
1311
|
m.id
|
|
1140
1312
|
))
|
|
1141
1313
|
}
|
|
1142
1314
|
),
|
|
1143
1315
|
/* @__PURE__ */ jsx(
|
|
1144
|
-
|
|
1316
|
+
ChatComposer,
|
|
1145
1317
|
{
|
|
1318
|
+
value: draft,
|
|
1319
|
+
onValueChange: handleDraftChange,
|
|
1146
1320
|
onSend: handleComposerSend,
|
|
1147
1321
|
disabled: readOnly,
|
|
1148
1322
|
placeholder: readOnly ? "Read-only conversation" : "Type a message\u2026 use @ to address an agent",
|
|
1149
1323
|
mentionOptions,
|
|
1150
|
-
|
|
1151
|
-
showCameraButton: false,
|
|
1324
|
+
allowAttachments: !readOnly,
|
|
1152
1325
|
acceptedFileTypes: composerAccept,
|
|
1153
|
-
|
|
1326
|
+
maxFileSize: 25 * 1024 * 1024,
|
|
1327
|
+
maxLength: 1e5,
|
|
1328
|
+
inputLabel: "Message"
|
|
1154
1329
|
}
|
|
1155
1330
|
)
|
|
1156
1331
|
]
|
|
@@ -1165,12 +1340,12 @@ function SuperChatConversations({
|
|
|
1165
1340
|
onConversationOpened,
|
|
1166
1341
|
onNewConversation
|
|
1167
1342
|
}) {
|
|
1168
|
-
const [internalActive, setInternalActive] =
|
|
1343
|
+
const [internalActive, setInternalActive] = React2.useState(
|
|
1169
1344
|
defaultActiveConversationId ?? conversations[0]?.id
|
|
1170
1345
|
);
|
|
1171
1346
|
const requestedId = activeConversationId ?? internalActive;
|
|
1172
1347
|
const activeId = conversations.some((c) => c.id === requestedId) ? requestedId : conversations[0]?.id;
|
|
1173
|
-
const sortedConversations =
|
|
1348
|
+
const sortedConversations = React2.useMemo(
|
|
1174
1349
|
() => [...conversations].sort((a, b) => lastActivityOf(b) - lastActivityOf(a)),
|
|
1175
1350
|
[conversations]
|
|
1176
1351
|
);
|
|
@@ -1184,7 +1359,7 @@ function SuperChatConversations({
|
|
|
1184
1359
|
"data-slot": "superchat-conversations",
|
|
1185
1360
|
"aria-label": "Conversations",
|
|
1186
1361
|
className: cn(
|
|
1187
|
-
"flex w-64 shrink-0 flex-col border-
|
|
1362
|
+
"flex w-64 shrink-0 flex-col border-e border-neutral-200 dark:border-neutral-700",
|
|
1188
1363
|
className
|
|
1189
1364
|
),
|
|
1190
1365
|
children: [
|
|
@@ -1222,7 +1397,7 @@ function SuperChatConversations({
|
|
|
1222
1397
|
/* @__PURE__ */ jsx("span", { className: "block truncate font-medium", children: c.title }),
|
|
1223
1398
|
last?.text && /* @__PURE__ */ jsx("span", { className: "block truncate text-xs text-neutral-600 dark:text-neutral-400", children: last.text })
|
|
1224
1399
|
] }),
|
|
1225
|
-
!!c.unread && /* @__PURE__ */ jsxs("span", { className: "bg-primary-600
|
|
1400
|
+
!!c.unread && /* @__PURE__ */ jsxs("span", { className: "bg-primary-600 ms-1 inline-flex h-5 min-w-5 items-center justify-center rounded-full px-1.5 text-[10px] font-semibold text-white", children: [
|
|
1226
1401
|
c.unread,
|
|
1227
1402
|
/* @__PURE__ */ jsx("span", { className: "sr-only", children: " unread messages" })
|
|
1228
1403
|
] })
|
|
@@ -1250,6 +1425,7 @@ function SuperChatInbox({
|
|
|
1250
1425
|
virtualized,
|
|
1251
1426
|
showSidebar = true,
|
|
1252
1427
|
linkBuilder,
|
|
1428
|
+
defaultCopyFormat,
|
|
1253
1429
|
className,
|
|
1254
1430
|
onMessageSent,
|
|
1255
1431
|
onMessageEdited,
|
|
@@ -1258,13 +1434,13 @@ function SuperChatInbox({
|
|
|
1258
1434
|
onNewConversation,
|
|
1259
1435
|
onReferenceClick
|
|
1260
1436
|
}) {
|
|
1261
|
-
const [internalActive, setInternalActive] =
|
|
1437
|
+
const [internalActive, setInternalActive] = React2.useState(
|
|
1262
1438
|
defaultActiveConversationId ?? conversations[0]?.id
|
|
1263
1439
|
);
|
|
1264
1440
|
const requestedId = activeConversationId ?? internalActive;
|
|
1265
1441
|
const active = conversations.find((c) => c.id === requestedId) ?? conversations[0];
|
|
1266
1442
|
const activeId = active?.id;
|
|
1267
|
-
const [mobileView, setMobileView] =
|
|
1443
|
+
const [mobileView, setMobileView] = React2.useState("list");
|
|
1268
1444
|
const handleOpen = (c) => {
|
|
1269
1445
|
if (activeConversationId === void 0) setInternalActive(c.id);
|
|
1270
1446
|
setMobileView("chat");
|
|
@@ -1307,6 +1483,7 @@ function SuperChatInbox({
|
|
|
1307
1483
|
order,
|
|
1308
1484
|
virtualized,
|
|
1309
1485
|
linkBuilder,
|
|
1486
|
+
defaultCopyFormat,
|
|
1310
1487
|
onMessageSent,
|
|
1311
1488
|
onMessageEdited,
|
|
1312
1489
|
onConversationClosed,
|