@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,8 +1,8 @@
|
|
|
1
1
|
'use strict';
|
|
2
2
|
|
|
3
|
-
var
|
|
3
|
+
var chunk5VXRKOPR_cjs = require('./chunk-5VXRKOPR.cjs');
|
|
4
4
|
var chunkS5RVSXDV_cjs = require('./chunk-S5RVSXDV.cjs');
|
|
5
|
-
var
|
|
5
|
+
var React6 = require('react');
|
|
6
6
|
var classVarianceAuthority = require('class-variance-authority');
|
|
7
7
|
var jsxRuntime = require('react/jsx-runtime');
|
|
8
8
|
|
|
@@ -24,8 +24,512 @@ function _interopNamespace(e) {
|
|
|
24
24
|
return Object.freeze(n);
|
|
25
25
|
}
|
|
26
26
|
|
|
27
|
-
var
|
|
27
|
+
var React6__namespace = /*#__PURE__*/_interopNamespace(React6);
|
|
28
28
|
|
|
29
|
+
function isFileAccepted(file, accepted) {
|
|
30
|
+
if (!accepted || accepted.length === 0) return true;
|
|
31
|
+
const mime = file.type;
|
|
32
|
+
const name = file.name.toLowerCase();
|
|
33
|
+
return accepted.some((token) => {
|
|
34
|
+
if (token.startsWith(".")) return name.endsWith(token.toLowerCase());
|
|
35
|
+
if (token.endsWith("/*")) return mime.startsWith(token.slice(0, -1));
|
|
36
|
+
if (token.includes("/")) return mime === token;
|
|
37
|
+
return false;
|
|
38
|
+
});
|
|
39
|
+
}
|
|
40
|
+
function CharacterCounter({
|
|
41
|
+
current,
|
|
42
|
+
max,
|
|
43
|
+
showWarningAt = 0.9,
|
|
44
|
+
className
|
|
45
|
+
}) {
|
|
46
|
+
const percentage = current / max;
|
|
47
|
+
const isWarning = percentage >= showWarningAt && percentage < 1;
|
|
48
|
+
const isOver = current > max;
|
|
49
|
+
return /* @__PURE__ */ jsxRuntime.jsxs(
|
|
50
|
+
"span",
|
|
51
|
+
{
|
|
52
|
+
className: chunkS5RVSXDV_cjs.cn(
|
|
53
|
+
"text-xs tabular-nums",
|
|
54
|
+
isOver ? "font-medium text-red-700 dark:text-red-400" : isWarning ? "text-amber-700 dark:text-amber-400" : "text-neutral-600 dark:text-neutral-400",
|
|
55
|
+
className
|
|
56
|
+
),
|
|
57
|
+
"aria-live": "polite",
|
|
58
|
+
"aria-label": `${current} of ${max} characters`,
|
|
59
|
+
children: [
|
|
60
|
+
current,
|
|
61
|
+
"/",
|
|
62
|
+
max
|
|
63
|
+
]
|
|
64
|
+
}
|
|
65
|
+
);
|
|
66
|
+
}
|
|
67
|
+
CharacterCounter.displayName = "CharacterCounter";
|
|
68
|
+
var sendButtonVariants = classVarianceAuthority.cva(
|
|
69
|
+
[
|
|
70
|
+
"inline-flex items-center justify-center",
|
|
71
|
+
"rounded-full p-3 self-start",
|
|
72
|
+
"transition-all duration-200",
|
|
73
|
+
"focus:outline-none focus:ring-2 focus:ring-primary-500",
|
|
74
|
+
"disabled:opacity-50 disabled:cursor-not-allowed"
|
|
75
|
+
],
|
|
76
|
+
{
|
|
77
|
+
variants: {
|
|
78
|
+
variant: {
|
|
79
|
+
primary: [
|
|
80
|
+
"bg-primary-800 text-white",
|
|
81
|
+
"hover:bg-primary-900",
|
|
82
|
+
"active:scale-95"
|
|
83
|
+
],
|
|
84
|
+
subtle: [
|
|
85
|
+
"bg-transparent text-primary-800",
|
|
86
|
+
"hover:bg-primary-50 dark:hover:bg-primary-900/20"
|
|
87
|
+
]
|
|
88
|
+
},
|
|
89
|
+
canSend: {
|
|
90
|
+
true: "",
|
|
91
|
+
false: "opacity-50 cursor-not-allowed"
|
|
92
|
+
}
|
|
93
|
+
},
|
|
94
|
+
defaultVariants: {
|
|
95
|
+
variant: "primary",
|
|
96
|
+
canSend: false
|
|
97
|
+
}
|
|
98
|
+
}
|
|
99
|
+
);
|
|
100
|
+
var SendButton = React6__namespace.forwardRef(
|
|
101
|
+
({ className, variant, canSend, isLoading, disabled, ...props }, ref) => {
|
|
102
|
+
return /* @__PURE__ */ jsxRuntime.jsx(
|
|
103
|
+
"button",
|
|
104
|
+
{
|
|
105
|
+
ref,
|
|
106
|
+
type: "submit",
|
|
107
|
+
disabled: disabled || !canSend || isLoading,
|
|
108
|
+
"data-slot": "composer-send-button",
|
|
109
|
+
className: chunkS5RVSXDV_cjs.cn(sendButtonVariants({ variant, canSend }), className),
|
|
110
|
+
"aria-label": isLoading ? "Sending message" : "Send message",
|
|
111
|
+
...props,
|
|
112
|
+
children: isLoading ? /* @__PURE__ */ jsxRuntime.jsxs(
|
|
113
|
+
"svg",
|
|
114
|
+
{
|
|
115
|
+
"aria-hidden": "true",
|
|
116
|
+
className: "h-5 w-5 animate-spin",
|
|
117
|
+
fill: "none",
|
|
118
|
+
viewBox: "0 0 24 24",
|
|
119
|
+
children: [
|
|
120
|
+
/* @__PURE__ */ jsxRuntime.jsx(
|
|
121
|
+
"circle",
|
|
122
|
+
{
|
|
123
|
+
className: "opacity-25",
|
|
124
|
+
cx: "12",
|
|
125
|
+
cy: "12",
|
|
126
|
+
r: "10",
|
|
127
|
+
stroke: "currentColor",
|
|
128
|
+
strokeWidth: "4"
|
|
129
|
+
}
|
|
130
|
+
),
|
|
131
|
+
/* @__PURE__ */ jsxRuntime.jsx(
|
|
132
|
+
"path",
|
|
133
|
+
{
|
|
134
|
+
className: "opacity-75",
|
|
135
|
+
fill: "currentColor",
|
|
136
|
+
d: "M4 12a8 8 0 018-8V0C5.373 0 0 5.373 0 12h4z"
|
|
137
|
+
}
|
|
138
|
+
)
|
|
139
|
+
]
|
|
140
|
+
}
|
|
141
|
+
) : /* @__PURE__ */ jsxRuntime.jsx(
|
|
142
|
+
"svg",
|
|
143
|
+
{
|
|
144
|
+
"aria-hidden": "true",
|
|
145
|
+
className: "h-5 w-5",
|
|
146
|
+
fill: "none",
|
|
147
|
+
viewBox: "0 0 24 24",
|
|
148
|
+
stroke: "currentColor",
|
|
149
|
+
children: /* @__PURE__ */ jsxRuntime.jsx(
|
|
150
|
+
"path",
|
|
151
|
+
{
|
|
152
|
+
strokeLinecap: "round",
|
|
153
|
+
strokeLinejoin: "round",
|
|
154
|
+
strokeWidth: 2,
|
|
155
|
+
d: "M12 19l9 2-9-18-9 18 9-2zm0 0v-8"
|
|
156
|
+
}
|
|
157
|
+
)
|
|
158
|
+
}
|
|
159
|
+
)
|
|
160
|
+
}
|
|
161
|
+
);
|
|
162
|
+
}
|
|
163
|
+
);
|
|
164
|
+
SendButton.displayName = "SendButton";
|
|
165
|
+
var MessageComposer = React6__namespace.forwardRef(
|
|
166
|
+
({
|
|
167
|
+
onSend,
|
|
168
|
+
onTypingStart,
|
|
169
|
+
onTypingStop,
|
|
170
|
+
value: controlledValue,
|
|
171
|
+
onValueChange,
|
|
172
|
+
placeholder = "Type a message...",
|
|
173
|
+
maxLength = 1600,
|
|
174
|
+
showCharacterCount = false,
|
|
175
|
+
disabled = false,
|
|
176
|
+
isSending = false,
|
|
177
|
+
showAttachmentPicker = true,
|
|
178
|
+
showCameraButton = false,
|
|
179
|
+
acceptedFileTypes = ["image/*", "video/*", ".pdf", ".doc", ".docx"],
|
|
180
|
+
maxFileSize = 25 * 1024 * 1024,
|
|
181
|
+
maxAttachments = 10,
|
|
182
|
+
onError,
|
|
183
|
+
autoFocus = false,
|
|
184
|
+
replyTo = null,
|
|
185
|
+
onCancelReply,
|
|
186
|
+
variant = "default",
|
|
187
|
+
inputTrailing,
|
|
188
|
+
mentionOptions,
|
|
189
|
+
className
|
|
190
|
+
}, ref) => {
|
|
191
|
+
const textareaRef = React6__namespace.useRef(null);
|
|
192
|
+
const [internalContent, setInternalContent] = React6__namespace.useState("");
|
|
193
|
+
const isControlled = controlledValue !== void 0;
|
|
194
|
+
const content = isControlled ? controlledValue : internalContent;
|
|
195
|
+
const setContent = React6__namespace.useCallback(
|
|
196
|
+
(val) => {
|
|
197
|
+
if (isControlled) {
|
|
198
|
+
const newVal = typeof val === "function" ? val(controlledValue) : val;
|
|
199
|
+
onValueChange?.(newVal);
|
|
200
|
+
} else {
|
|
201
|
+
setInternalContent(val);
|
|
202
|
+
}
|
|
203
|
+
},
|
|
204
|
+
[isControlled, controlledValue, onValueChange]
|
|
205
|
+
);
|
|
206
|
+
const [attachments, setAttachments] = React6__namespace.useState(
|
|
207
|
+
[]
|
|
208
|
+
);
|
|
209
|
+
const [isTyping, setIsTyping] = React6__namespace.useState(false);
|
|
210
|
+
const typingTimeoutRef = React6__namespace.useRef(null);
|
|
211
|
+
React6__namespace.useImperativeHandle(ref, () => textareaRef.current);
|
|
212
|
+
React6__namespace.useEffect(() => {
|
|
213
|
+
const textarea = textareaRef.current;
|
|
214
|
+
if (textarea) {
|
|
215
|
+
textarea.style.height = "auto";
|
|
216
|
+
textarea.style.height = `${Math.min(textarea.scrollHeight, 150)}px`;
|
|
217
|
+
}
|
|
218
|
+
}, [content]);
|
|
219
|
+
React6__namespace.useEffect(() => {
|
|
220
|
+
if (content.length > 0 && !isTyping) {
|
|
221
|
+
setIsTyping(true);
|
|
222
|
+
onTypingStart?.();
|
|
223
|
+
}
|
|
224
|
+
if (typingTimeoutRef.current) {
|
|
225
|
+
clearTimeout(typingTimeoutRef.current);
|
|
226
|
+
}
|
|
227
|
+
typingTimeoutRef.current = setTimeout(() => {
|
|
228
|
+
if (isTyping) {
|
|
229
|
+
setIsTyping(false);
|
|
230
|
+
onTypingStop?.();
|
|
231
|
+
}
|
|
232
|
+
}, 2e3);
|
|
233
|
+
return () => {
|
|
234
|
+
if (typingTimeoutRef.current) {
|
|
235
|
+
clearTimeout(typingTimeoutRef.current);
|
|
236
|
+
}
|
|
237
|
+
};
|
|
238
|
+
}, [content, isTyping, onTypingStart, onTypingStop]);
|
|
239
|
+
React6__namespace.useEffect(() => {
|
|
240
|
+
if (autoFocus) {
|
|
241
|
+
textareaRef.current?.focus();
|
|
242
|
+
}
|
|
243
|
+
}, [autoFocus]);
|
|
244
|
+
React6__namespace.useEffect(() => {
|
|
245
|
+
if (replyTo) {
|
|
246
|
+
textareaRef.current?.focus();
|
|
247
|
+
}
|
|
248
|
+
}, [replyTo]);
|
|
249
|
+
const mention = chunk5VXRKOPR_cjs.useMentionAutocomplete({
|
|
250
|
+
options: mentionOptions,
|
|
251
|
+
value: content,
|
|
252
|
+
setValue: setContent,
|
|
253
|
+
textareaRef
|
|
254
|
+
});
|
|
255
|
+
const canSend = (content.trim().length > 0 || attachments.length > 0) && content.length <= maxLength && !disabled && !isSending;
|
|
256
|
+
const handleSubmit = async (event) => {
|
|
257
|
+
event.preventDefault();
|
|
258
|
+
if (!canSend) return;
|
|
259
|
+
const message = {
|
|
260
|
+
content: content.trim(),
|
|
261
|
+
attachments: attachments.map((a) => a.file),
|
|
262
|
+
replyToId: replyTo?.id
|
|
263
|
+
};
|
|
264
|
+
setContent("");
|
|
265
|
+
setAttachments([]);
|
|
266
|
+
setIsTyping(false);
|
|
267
|
+
onTypingStop?.();
|
|
268
|
+
try {
|
|
269
|
+
await onSend(message);
|
|
270
|
+
} catch {
|
|
271
|
+
setContent(message.content);
|
|
272
|
+
onError?.("Failed to send message");
|
|
273
|
+
}
|
|
274
|
+
};
|
|
275
|
+
const handleKeyDown = (event) => {
|
|
276
|
+
if (mention.handleKeyDown(event)) return;
|
|
277
|
+
if (event.key === "Enter" && !event.shiftKey) {
|
|
278
|
+
event.preventDefault();
|
|
279
|
+
if (canSend) {
|
|
280
|
+
handleSubmit(event);
|
|
281
|
+
}
|
|
282
|
+
}
|
|
283
|
+
};
|
|
284
|
+
const handleFilesSelected = (files) => {
|
|
285
|
+
const remainingSlots = maxAttachments - attachments.length;
|
|
286
|
+
const filesToAdd = files.slice(0, remainingSlots);
|
|
287
|
+
if (files.length > remainingSlots) {
|
|
288
|
+
onError?.(`Maximum ${maxAttachments} attachments allowed`);
|
|
289
|
+
}
|
|
290
|
+
const newAttachments = filesToAdd.map((file) => {
|
|
291
|
+
const type = chunk5VXRKOPR_cjs.getFileType(file.type);
|
|
292
|
+
let previewUrl;
|
|
293
|
+
if (type === "image" || type === "video") {
|
|
294
|
+
previewUrl = URL.createObjectURL(file);
|
|
295
|
+
}
|
|
296
|
+
return {
|
|
297
|
+
id: chunk5VXRKOPR_cjs.generateAttachmentId(),
|
|
298
|
+
file,
|
|
299
|
+
previewUrl,
|
|
300
|
+
type,
|
|
301
|
+
state: "pending"
|
|
302
|
+
};
|
|
303
|
+
});
|
|
304
|
+
setAttachments((prev) => [...prev, ...newAttachments]);
|
|
305
|
+
};
|
|
306
|
+
const handlePaste = (event) => {
|
|
307
|
+
if (!showAttachmentPicker || disabled) return;
|
|
308
|
+
const pasted = Array.from(event.clipboardData.items).filter((item) => item.kind === "file").map((item) => item.getAsFile()).filter((f) => f !== null).filter((f) => isFileAccepted(f, acceptedFileTypes));
|
|
309
|
+
if (pasted.length === 0) return;
|
|
310
|
+
event.preventDefault();
|
|
311
|
+
handleFilesSelected(pasted);
|
|
312
|
+
};
|
|
313
|
+
const handleRemoveAttachment = (attachmentId) => {
|
|
314
|
+
setAttachments((prev) => {
|
|
315
|
+
const attachment = prev.find((a) => a.id === attachmentId);
|
|
316
|
+
if (attachment?.previewUrl) {
|
|
317
|
+
URL.revokeObjectURL(attachment.previewUrl);
|
|
318
|
+
}
|
|
319
|
+
return prev.filter((a) => a.id !== attachmentId);
|
|
320
|
+
});
|
|
321
|
+
};
|
|
322
|
+
React6__namespace.useEffect(() => {
|
|
323
|
+
const currentAttachments = attachments;
|
|
324
|
+
return () => {
|
|
325
|
+
currentAttachments.forEach((a) => {
|
|
326
|
+
if (a.previewUrl) {
|
|
327
|
+
URL.revokeObjectURL(a.previewUrl);
|
|
328
|
+
}
|
|
329
|
+
});
|
|
330
|
+
};
|
|
331
|
+
}, [attachments]);
|
|
332
|
+
return /* @__PURE__ */ jsxRuntime.jsx(
|
|
333
|
+
chunk5VXRKOPR_cjs.DragDropZone,
|
|
334
|
+
{
|
|
335
|
+
onFilesDropped: handleFilesSelected,
|
|
336
|
+
acceptedTypes: acceptedFileTypes,
|
|
337
|
+
maxFileSize,
|
|
338
|
+
maxFiles: maxAttachments - attachments.length,
|
|
339
|
+
disabled: disabled || attachments.length >= maxAttachments,
|
|
340
|
+
onError,
|
|
341
|
+
className: chunkS5RVSXDV_cjs.cn("w-full", className),
|
|
342
|
+
children: /* @__PURE__ */ jsxRuntime.jsxs(
|
|
343
|
+
"form",
|
|
344
|
+
{
|
|
345
|
+
onSubmit: handleSubmit,
|
|
346
|
+
"data-slot": "message-composer",
|
|
347
|
+
className: "w-full",
|
|
348
|
+
children: [
|
|
349
|
+
replyTo && /* @__PURE__ */ jsxRuntime.jsxs(
|
|
350
|
+
"div",
|
|
351
|
+
{
|
|
352
|
+
"data-slot": "composer-reply-preview",
|
|
353
|
+
className: chunkS5RVSXDV_cjs.cn(
|
|
354
|
+
"flex items-center gap-2 px-4 py-2",
|
|
355
|
+
"bg-neutral-50 dark:bg-neutral-800/50",
|
|
356
|
+
"border-primary-500 border-s-4"
|
|
357
|
+
),
|
|
358
|
+
children: [
|
|
359
|
+
/* @__PURE__ */ jsxRuntime.jsxs("div", { className: "min-w-0 flex-1", children: [
|
|
360
|
+
/* @__PURE__ */ jsxRuntime.jsxs("span", { className: "text-primary-800 dark:text-primary-400 text-xs font-medium", children: [
|
|
361
|
+
"Replying to ",
|
|
362
|
+
replyTo.senderName
|
|
363
|
+
] }),
|
|
364
|
+
/* @__PURE__ */ jsxRuntime.jsx("p", { className: "truncate text-sm text-neutral-600 dark:text-neutral-300", children: replyTo.content })
|
|
365
|
+
] }),
|
|
366
|
+
/* @__PURE__ */ jsxRuntime.jsx(
|
|
367
|
+
"button",
|
|
368
|
+
{
|
|
369
|
+
type: "button",
|
|
370
|
+
onClick: onCancelReply,
|
|
371
|
+
className: chunkS5RVSXDV_cjs.cn(
|
|
372
|
+
"shrink-0 rounded p-1",
|
|
373
|
+
"text-neutral-500 hover:text-neutral-700",
|
|
374
|
+
"dark:text-neutral-400 dark:hover:text-neutral-200",
|
|
375
|
+
"focus:ring-primary-500 focus:ring-2 focus:outline-none"
|
|
376
|
+
),
|
|
377
|
+
"aria-label": "Cancel reply",
|
|
378
|
+
children: /* @__PURE__ */ jsxRuntime.jsx(
|
|
379
|
+
"svg",
|
|
380
|
+
{
|
|
381
|
+
"aria-hidden": "true",
|
|
382
|
+
className: "h-4 w-4",
|
|
383
|
+
fill: "none",
|
|
384
|
+
viewBox: "0 0 24 24",
|
|
385
|
+
stroke: "currentColor",
|
|
386
|
+
children: /* @__PURE__ */ jsxRuntime.jsx(
|
|
387
|
+
"path",
|
|
388
|
+
{
|
|
389
|
+
strokeLinecap: "round",
|
|
390
|
+
strokeLinejoin: "round",
|
|
391
|
+
strokeWidth: 2,
|
|
392
|
+
d: "M6 18L18 6M6 6l12 12"
|
|
393
|
+
}
|
|
394
|
+
)
|
|
395
|
+
}
|
|
396
|
+
)
|
|
397
|
+
}
|
|
398
|
+
)
|
|
399
|
+
]
|
|
400
|
+
}
|
|
401
|
+
),
|
|
402
|
+
attachments.length > 0 && /* @__PURE__ */ jsxRuntime.jsx(
|
|
403
|
+
"div",
|
|
404
|
+
{
|
|
405
|
+
"data-slot": "composer-attachments",
|
|
406
|
+
className: chunkS5RVSXDV_cjs.cn(
|
|
407
|
+
"flex flex-wrap gap-2 p-3",
|
|
408
|
+
"border-t border-neutral-200 dark:border-neutral-700"
|
|
409
|
+
),
|
|
410
|
+
children: attachments.map((attachment) => /* @__PURE__ */ jsxRuntime.jsx(
|
|
411
|
+
chunk5VXRKOPR_cjs.AttachmentPreviewItem,
|
|
412
|
+
{
|
|
413
|
+
attachment,
|
|
414
|
+
onRemove: () => handleRemoveAttachment(attachment.id)
|
|
415
|
+
},
|
|
416
|
+
attachment.id
|
|
417
|
+
))
|
|
418
|
+
}
|
|
419
|
+
),
|
|
420
|
+
/* @__PURE__ */ jsxRuntime.jsxs(
|
|
421
|
+
"div",
|
|
422
|
+
{
|
|
423
|
+
"data-slot": "composer-input-area",
|
|
424
|
+
className: chunkS5RVSXDV_cjs.cn(
|
|
425
|
+
"flex items-center gap-2 p-3",
|
|
426
|
+
"bg-white dark:bg-neutral-900",
|
|
427
|
+
variant === "default" && "border-t border-neutral-200 dark:border-neutral-700"
|
|
428
|
+
),
|
|
429
|
+
children: [
|
|
430
|
+
showAttachmentPicker && /* @__PURE__ */ jsxRuntime.jsx(
|
|
431
|
+
chunk5VXRKOPR_cjs.AttachmentPicker,
|
|
432
|
+
{
|
|
433
|
+
onFilesSelected: handleFilesSelected,
|
|
434
|
+
acceptedTypes: acceptedFileTypes,
|
|
435
|
+
maxFileSize,
|
|
436
|
+
maxFiles: maxAttachments - attachments.length,
|
|
437
|
+
disabled: disabled || attachments.length >= maxAttachments,
|
|
438
|
+
onError
|
|
439
|
+
}
|
|
440
|
+
),
|
|
441
|
+
showCameraButton && /* @__PURE__ */ jsxRuntime.jsx(
|
|
442
|
+
chunk5VXRKOPR_cjs.CameraButton,
|
|
443
|
+
{
|
|
444
|
+
onCapture: (file) => handleFilesSelected([file]),
|
|
445
|
+
disabled: disabled || attachments.length >= maxAttachments
|
|
446
|
+
}
|
|
447
|
+
),
|
|
448
|
+
/* @__PURE__ */ jsxRuntime.jsxs(
|
|
449
|
+
"div",
|
|
450
|
+
{
|
|
451
|
+
"data-slot": "composer-input-wrapper",
|
|
452
|
+
className: "relative flex-1",
|
|
453
|
+
ref: mention.anchorRef,
|
|
454
|
+
children: [
|
|
455
|
+
/* @__PURE__ */ jsxRuntime.jsx(chunk5VXRKOPR_cjs.MentionMenu, { mention }),
|
|
456
|
+
/* @__PURE__ */ jsxRuntime.jsx(
|
|
457
|
+
"textarea",
|
|
458
|
+
{
|
|
459
|
+
ref: textareaRef,
|
|
460
|
+
"data-slot": "composer-input",
|
|
461
|
+
value: content,
|
|
462
|
+
onChange: (e) => {
|
|
463
|
+
setContent(e.target.value);
|
|
464
|
+
mention.sync(
|
|
465
|
+
e.target.value,
|
|
466
|
+
e.target.selectionStart ?? e.target.value.length
|
|
467
|
+
);
|
|
468
|
+
},
|
|
469
|
+
onClick: (e) => {
|
|
470
|
+
const el = e.currentTarget;
|
|
471
|
+
mention.sync(el.value, el.selectionStart ?? el.value.length);
|
|
472
|
+
},
|
|
473
|
+
onKeyDown: handleKeyDown,
|
|
474
|
+
onPaste: handlePaste,
|
|
475
|
+
placeholder,
|
|
476
|
+
disabled: disabled || isSending,
|
|
477
|
+
rows: 1,
|
|
478
|
+
className: chunkS5RVSXDV_cjs.cn(
|
|
479
|
+
"w-full resize-none rounded-2xl py-2.5",
|
|
480
|
+
inputTrailing ? "ps-4 pe-10" : "px-4",
|
|
481
|
+
"bg-neutral-100 dark:bg-neutral-800",
|
|
482
|
+
"text-neutral-900 dark:text-neutral-100",
|
|
483
|
+
"placeholder:text-neutral-400 dark:placeholder:text-neutral-500",
|
|
484
|
+
"focus:ring-primary-500 focus:ring-2 focus:outline-none",
|
|
485
|
+
"disabled:cursor-not-allowed disabled:opacity-50",
|
|
486
|
+
"transition-colors",
|
|
487
|
+
"max-h-[150px]"
|
|
488
|
+
),
|
|
489
|
+
"aria-label": "Message",
|
|
490
|
+
"aria-describedby": showCharacterCount ? "char-count" : void 0,
|
|
491
|
+
...mention.inputProps
|
|
492
|
+
}
|
|
493
|
+
),
|
|
494
|
+
inputTrailing && /* @__PURE__ */ jsxRuntime.jsx(
|
|
495
|
+
"div",
|
|
496
|
+
{
|
|
497
|
+
"data-slot": "composer-input-trailing",
|
|
498
|
+
className: "pointer-events-none absolute end-1 top-0 flex h-[44px] items-center [&>*]:pointer-events-auto",
|
|
499
|
+
children: inputTrailing
|
|
500
|
+
}
|
|
501
|
+
),
|
|
502
|
+
showCharacterCount && /* @__PURE__ */ jsxRuntime.jsx(
|
|
503
|
+
"div",
|
|
504
|
+
{
|
|
505
|
+
"data-slot": "composer-char-count",
|
|
506
|
+
id: "char-count",
|
|
507
|
+
className: "absolute end-3 bottom-1.5",
|
|
508
|
+
children: /* @__PURE__ */ jsxRuntime.jsx(CharacterCounter, { current: content.length, max: maxLength })
|
|
509
|
+
}
|
|
510
|
+
)
|
|
511
|
+
]
|
|
512
|
+
}
|
|
513
|
+
),
|
|
514
|
+
/* @__PURE__ */ jsxRuntime.jsx(
|
|
515
|
+
SendButton,
|
|
516
|
+
{
|
|
517
|
+
canSend,
|
|
518
|
+
isLoading: isSending,
|
|
519
|
+
disabled
|
|
520
|
+
}
|
|
521
|
+
)
|
|
522
|
+
]
|
|
523
|
+
}
|
|
524
|
+
)
|
|
525
|
+
]
|
|
526
|
+
}
|
|
527
|
+
)
|
|
528
|
+
}
|
|
529
|
+
);
|
|
530
|
+
}
|
|
531
|
+
);
|
|
532
|
+
MessageComposer.displayName = "MessageComposer";
|
|
29
533
|
var statusIconVariants = classVarianceAuthority.cva(
|
|
30
534
|
"inline-flex items-center gap-0.5 text-current",
|
|
31
535
|
{
|
|
@@ -169,7 +673,10 @@ function ReadReceiptIndicator({
|
|
|
169
673
|
return /* @__PURE__ */ jsxRuntime.jsxs(
|
|
170
674
|
"div",
|
|
171
675
|
{
|
|
172
|
-
className: chunkS5RVSXDV_cjs.cn(
|
|
676
|
+
className: chunkS5RVSXDV_cjs.cn(
|
|
677
|
+
"flex items-center -space-x-1 rtl:space-x-reverse",
|
|
678
|
+
className
|
|
679
|
+
),
|
|
173
680
|
"aria-label": `Read by ${receipts.map((r) => r.participant.name).join(", ")}`,
|
|
174
681
|
children: [
|
|
175
682
|
visibleReceipts.map((receipt) => /* @__PURE__ */ jsxRuntime.jsx(
|
|
@@ -346,7 +853,7 @@ function AttachmentPreview({
|
|
|
346
853
|
)
|
|
347
854
|
}
|
|
348
855
|
) }),
|
|
349
|
-
/* @__PURE__ */ jsxRuntime.jsxs("div", { className: "min-w-0 flex-1 text-
|
|
856
|
+
/* @__PURE__ */ jsxRuntime.jsxs("div", { className: "min-w-0 flex-1 text-start", children: [
|
|
350
857
|
/* @__PURE__ */ jsxRuntime.jsx("p", { className: "truncate text-sm font-medium", children: attachment.filename }),
|
|
351
858
|
/* @__PURE__ */ jsxRuntime.jsx("p", { className: "text-xs opacity-70", children: formatFileSize(attachment.size) })
|
|
352
859
|
] })
|
|
@@ -368,12 +875,12 @@ var bubbleVariants = classVarianceAuthority.cva(
|
|
|
368
875
|
{
|
|
369
876
|
variants: {
|
|
370
877
|
variant: {
|
|
371
|
-
outgoing: ["bg-primary-800 text-white", "rounded-
|
|
878
|
+
outgoing: ["bg-primary-800 text-white", "rounded-ee-md", "ms-auto"],
|
|
372
879
|
incoming: [
|
|
373
880
|
"bg-neutral-100 text-neutral-900",
|
|
374
881
|
"dark:bg-neutral-800 dark:text-neutral-100",
|
|
375
|
-
"rounded-
|
|
376
|
-
"
|
|
882
|
+
"rounded-es-md",
|
|
883
|
+
"me-auto"
|
|
377
884
|
],
|
|
378
885
|
system: [
|
|
379
886
|
"mx-auto max-w-none",
|
|
@@ -403,7 +910,7 @@ function defaultFormatTimestamp(timestamp) {
|
|
|
403
910
|
minute: "2-digit"
|
|
404
911
|
});
|
|
405
912
|
}
|
|
406
|
-
var MessageBubble =
|
|
913
|
+
var MessageBubble = React6__namespace.forwardRef(
|
|
407
914
|
({
|
|
408
915
|
className,
|
|
409
916
|
message,
|
|
@@ -513,7 +1020,7 @@ var MessageBubble = React5__namespace.forwardRef(
|
|
|
513
1020
|
attachment.id
|
|
514
1021
|
)) }),
|
|
515
1022
|
hasText && /* @__PURE__ */ jsxRuntime.jsx("p", { className: "break-words whitespace-pre-wrap", children: message.isDeleted ? /* @__PURE__ */ jsxRuntime.jsx("span", { className: "italic opacity-60", children: "This message was deleted" }) : message.content }),
|
|
516
|
-
message.isEdited && !message.isDeleted && /* @__PURE__ */ jsxRuntime.jsx("span", { className: "
|
|
1023
|
+
message.isEdited && !message.isDeleted && /* @__PURE__ */ jsxRuntime.jsx("span", { className: "ms-1 text-xs opacity-60", children: "(edited)" })
|
|
517
1024
|
]
|
|
518
1025
|
}
|
|
519
1026
|
),
|
|
@@ -686,7 +1193,7 @@ function SkeletonMessage({
|
|
|
686
1193
|
"data-slot": "skeleton-bubble",
|
|
687
1194
|
className: chunkS5RVSXDV_cjs.cn(
|
|
688
1195
|
"animate-pulse rounded-2xl",
|
|
689
|
-
isOutgoing ? "bg-primary-800/30 rounded-
|
|
1196
|
+
isOutgoing ? "bg-primary-800/30 rounded-ee-md" : "rounded-es-md bg-neutral-200 dark:bg-neutral-700",
|
|
690
1197
|
"h-10 w-48"
|
|
691
1198
|
)
|
|
692
1199
|
}
|
|
@@ -710,7 +1217,7 @@ function TypingIndicator({ typingState, className }) {
|
|
|
710
1217
|
"aria-live": "polite",
|
|
711
1218
|
"aria-label": typingText,
|
|
712
1219
|
children: [
|
|
713
|
-
/* @__PURE__ */ jsxRuntime.jsxs("div", { className: "flex items-center gap-1 rounded-2xl rounded-
|
|
1220
|
+
/* @__PURE__ */ jsxRuntime.jsxs("div", { className: "flex items-center gap-1 rounded-2xl rounded-es-md bg-neutral-200 px-4 py-3 dark:bg-neutral-700", children: [
|
|
714
1221
|
/* @__PURE__ */ jsxRuntime.jsx(
|
|
715
1222
|
"span",
|
|
716
1223
|
{
|
|
@@ -878,7 +1385,7 @@ function LoadMoreButton({
|
|
|
878
1385
|
);
|
|
879
1386
|
}
|
|
880
1387
|
LoadMoreButton.displayName = "LoadMoreButton";
|
|
881
|
-
var MessageList =
|
|
1388
|
+
var MessageList = React6__namespace.forwardRef(
|
|
882
1389
|
({
|
|
883
1390
|
messages,
|
|
884
1391
|
currentUser,
|
|
@@ -897,19 +1404,19 @@ var MessageList = React5__namespace.forwardRef(
|
|
|
897
1404
|
className,
|
|
898
1405
|
autoScroll = "onNewMessage"
|
|
899
1406
|
}, ref) => {
|
|
900
|
-
const scrollContainerRef =
|
|
901
|
-
const bottomRef =
|
|
902
|
-
const [isUserScrolled, setIsUserScrolled] =
|
|
903
|
-
const prevMessageCountRef =
|
|
904
|
-
|
|
905
|
-
const handleScroll =
|
|
1407
|
+
const scrollContainerRef = React6__namespace.useRef(null);
|
|
1408
|
+
const bottomRef = React6__namespace.useRef(null);
|
|
1409
|
+
const [isUserScrolled, setIsUserScrolled] = React6__namespace.useState(false);
|
|
1410
|
+
const prevMessageCountRef = React6__namespace.useRef(messages.length);
|
|
1411
|
+
React6__namespace.useImperativeHandle(ref, () => scrollContainerRef.current);
|
|
1412
|
+
const handleScroll = React6__namespace.useCallback(() => {
|
|
906
1413
|
const container = scrollContainerRef.current;
|
|
907
1414
|
if (!container) return;
|
|
908
1415
|
const { scrollTop, scrollHeight, clientHeight } = container;
|
|
909
1416
|
const isAtBottom = scrollHeight - scrollTop - clientHeight < 100;
|
|
910
1417
|
setIsUserScrolled(!isAtBottom);
|
|
911
1418
|
}, []);
|
|
912
|
-
|
|
1419
|
+
React6__namespace.useEffect(() => {
|
|
913
1420
|
const container = scrollContainerRef.current;
|
|
914
1421
|
const bottom = bottomRef.current;
|
|
915
1422
|
if (!container || !bottom) return;
|
|
@@ -925,7 +1432,7 @@ var MessageList = React5__namespace.forwardRef(
|
|
|
925
1432
|
}
|
|
926
1433
|
}
|
|
927
1434
|
}, [messages, currentUser.id, autoScroll, isUserScrolled]);
|
|
928
|
-
|
|
1435
|
+
React6__namespace.useEffect(() => {
|
|
929
1436
|
const bottom = bottomRef.current;
|
|
930
1437
|
if (bottom && !isLoading) {
|
|
931
1438
|
bottom.scrollIntoView();
|
|
@@ -978,7 +1485,7 @@ var MessageList = React5__namespace.forwardRef(
|
|
|
978
1485
|
{
|
|
979
1486
|
"data-slot": "message-list-content",
|
|
980
1487
|
className: "flex flex-col gap-1 p-4",
|
|
981
|
-
children: messageGroups.map((group) => /* @__PURE__ */ jsxRuntime.jsxs(
|
|
1488
|
+
children: messageGroups.map((group) => /* @__PURE__ */ jsxRuntime.jsxs(React6__namespace.Fragment, { children: [
|
|
982
1489
|
groupByDate && group.label && /* @__PURE__ */ jsxRuntime.jsx(DateSeparator, { label: group.label }),
|
|
983
1490
|
group.messages.map((message, index) => {
|
|
984
1491
|
const prevMessage = group.messages[index - 1];
|
|
@@ -1022,7 +1529,7 @@ var MessageList = React5__namespace.forwardRef(
|
|
|
1022
1529
|
bottomRef.current?.scrollIntoView({ behavior: "smooth" });
|
|
1023
1530
|
},
|
|
1024
1531
|
className: chunkS5RVSXDV_cjs.cn(
|
|
1025
|
-
"fixed
|
|
1532
|
+
"fixed end-4 bottom-24 z-10",
|
|
1026
1533
|
"rounded-full p-3 shadow-lg",
|
|
1027
1534
|
"bg-white dark:bg-neutral-800",
|
|
1028
1535
|
"border border-neutral-200 dark:border-neutral-700",
|
|
@@ -1117,7 +1624,7 @@ function formatLastSeen(date) {
|
|
|
1117
1624
|
if (diffDays < 7) return `${diffDays}d ago`;
|
|
1118
1625
|
return date.toLocaleDateString();
|
|
1119
1626
|
}
|
|
1120
|
-
var ConversationHeader =
|
|
1627
|
+
var ConversationHeader = React6__namespace.forwardRef(
|
|
1121
1628
|
({
|
|
1122
1629
|
className,
|
|
1123
1630
|
size,
|
|
@@ -1152,7 +1659,7 @@ var ConversationHeader = React5__namespace.forwardRef(
|
|
|
1152
1659
|
type: "button",
|
|
1153
1660
|
onClick: onBack,
|
|
1154
1661
|
className: chunkS5RVSXDV_cjs.cn(
|
|
1155
|
-
"-
|
|
1662
|
+
"-ms-2 rounded-full p-2",
|
|
1156
1663
|
"text-neutral-500 hover:text-neutral-700",
|
|
1157
1664
|
"dark:text-neutral-400 dark:hover:text-neutral-200",
|
|
1158
1665
|
"hover:bg-neutral-100 dark:hover:bg-neutral-800",
|
|
@@ -1208,7 +1715,7 @@ var ConversationHeader = React5__namespace.forwardRef(
|
|
|
1208
1715
|
"span",
|
|
1209
1716
|
{
|
|
1210
1717
|
className: chunkS5RVSXDV_cjs.cn(
|
|
1211
|
-
"absolute
|
|
1718
|
+
"absolute end-0 bottom-0",
|
|
1212
1719
|
"h-3 w-3 rounded-full",
|
|
1213
1720
|
"bg-green-500 ring-2 ring-white dark:ring-neutral-900"
|
|
1214
1721
|
),
|
|
@@ -1239,7 +1746,7 @@ var ConversationHeader = React5__namespace.forwardRef(
|
|
|
1239
1746
|
}
|
|
1240
1747
|
);
|
|
1241
1748
|
ConversationHeader.displayName = "ConversationHeader";
|
|
1242
|
-
var ConversationListItem =
|
|
1749
|
+
var ConversationListItem = React6__namespace.forwardRef(({ className, conversation, isSelected, onSelect, ...props }, ref) => {
|
|
1243
1750
|
const participant = conversation.participants.find((p) => !p.isCurrentUser);
|
|
1244
1751
|
const title = getConversationTitle(conversation, participant);
|
|
1245
1752
|
const avatarUrl = conversation.avatarUrl || participant?.avatarUrl;
|
|
@@ -1279,7 +1786,7 @@ var ConversationListItem = React5__namespace.forwardRef(({ className, conversati
|
|
|
1279
1786
|
"data-slot": "conversation-list-item",
|
|
1280
1787
|
className: chunkS5RVSXDV_cjs.cn(
|
|
1281
1788
|
"flex w-full items-center gap-3 px-4 py-3",
|
|
1282
|
-
"text-
|
|
1789
|
+
"text-start transition-colors",
|
|
1283
1790
|
isSelected ? "bg-primary-50 dark:bg-primary-900/20" : "hover:bg-neutral-50 dark:hover:bg-neutral-800/50",
|
|
1284
1791
|
"focus:bg-neutral-50 focus:outline-none dark:focus:bg-neutral-800/50",
|
|
1285
1792
|
className
|
|
@@ -1314,7 +1821,7 @@ var ConversationListItem = React5__namespace.forwardRef(({ className, conversati
|
|
|
1314
1821
|
"span",
|
|
1315
1822
|
{
|
|
1316
1823
|
className: chunkS5RVSXDV_cjs.cn(
|
|
1317
|
-
"absolute
|
|
1824
|
+
"absolute end-0 bottom-0",
|
|
1318
1825
|
"h-3 w-3 rounded-full",
|
|
1319
1826
|
"bg-green-500 ring-2 ring-white dark:ring-neutral-900"
|
|
1320
1827
|
)
|
|
@@ -1447,7 +1954,7 @@ function ConversationListSkeleton({
|
|
|
1447
1954
|
}
|
|
1448
1955
|
ConversationListSkeleton.displayName = "ConversationListSkeleton";
|
|
1449
1956
|
function LightboxModal({ attachment, onClose }) {
|
|
1450
|
-
|
|
1957
|
+
React6__namespace.useEffect(() => {
|
|
1451
1958
|
const handleKeyDown = (event) => {
|
|
1452
1959
|
if (event.key === "Escape") {
|
|
1453
1960
|
onClose();
|
|
@@ -1489,7 +1996,7 @@ function LightboxModal({ attachment, onClose }) {
|
|
|
1489
1996
|
type: "button",
|
|
1490
1997
|
onClick: onClose,
|
|
1491
1998
|
className: chunkS5RVSXDV_cjs.cn(
|
|
1492
|
-
"absolute
|
|
1999
|
+
"absolute end-4 top-4 z-10",
|
|
1493
2000
|
"rounded-full p-2",
|
|
1494
2001
|
"bg-white/10 text-white",
|
|
1495
2002
|
"hover:bg-white/20",
|
|
@@ -1544,7 +2051,7 @@ function LightboxModal({ attachment, onClose }) {
|
|
|
1544
2051
|
);
|
|
1545
2052
|
}
|
|
1546
2053
|
LightboxModal.displayName = "LightboxModal";
|
|
1547
|
-
var MessageThread =
|
|
2054
|
+
var MessageThread = React6__namespace.forwardRef(
|
|
1548
2055
|
({
|
|
1549
2056
|
conversation,
|
|
1550
2057
|
messages,
|
|
@@ -1575,8 +2082,8 @@ var MessageThread = React5__namespace.forwardRef(
|
|
|
1575
2082
|
onError,
|
|
1576
2083
|
className
|
|
1577
2084
|
}, ref) => {
|
|
1578
|
-
const [lightboxAttachment, setLightboxAttachment] =
|
|
1579
|
-
const [replyTo, setReplyTo] =
|
|
2085
|
+
const [lightboxAttachment, setLightboxAttachment] = React6__namespace.useState(null);
|
|
2086
|
+
const [replyTo, setReplyTo] = React6__namespace.useState(null);
|
|
1580
2087
|
const participant = conversation?.type === "direct" ? conversation.participants.find((p) => p.id !== currentUser.id) : void 0;
|
|
1581
2088
|
const handleAttachmentClick = (attachment, message) => {
|
|
1582
2089
|
if (attachment.type === "image" || attachment.type === "video") {
|
|
@@ -1614,7 +2121,7 @@ var MessageThread = React5__namespace.forwardRef(
|
|
|
1614
2121
|
}
|
|
1615
2122
|
),
|
|
1616
2123
|
/* @__PURE__ */ jsxRuntime.jsx(
|
|
1617
|
-
|
|
2124
|
+
chunk5VXRKOPR_cjs.DragDropZone,
|
|
1618
2125
|
{
|
|
1619
2126
|
onFilesDropped: () => {
|
|
1620
2127
|
onError?.("Drop files on the composer to attach them");
|
|
@@ -1644,7 +2151,7 @@ var MessageThread = React5__namespace.forwardRef(
|
|
|
1644
2151
|
}
|
|
1645
2152
|
),
|
|
1646
2153
|
/* @__PURE__ */ jsxRuntime.jsx(
|
|
1647
|
-
|
|
2154
|
+
MessageComposer,
|
|
1648
2155
|
{
|
|
1649
2156
|
onSend: handleSendMessage,
|
|
1650
2157
|
onTypingStart: eventHandlers.onTypingStart,
|
|
@@ -1715,7 +2222,7 @@ function MessagingSplitView({
|
|
|
1715
2222
|
"data-slot": "messaging-list-pane",
|
|
1716
2223
|
className: chunkS5RVSXDV_cjs.cn(
|
|
1717
2224
|
"h-full w-full flex-shrink-0",
|
|
1718
|
-
"border-
|
|
2225
|
+
"border-e border-neutral-200 dark:border-neutral-700",
|
|
1719
2226
|
hideMobileClasses[mobileBreakpoint]
|
|
1720
2227
|
),
|
|
1721
2228
|
style: {
|
|
@@ -1748,13 +2255,13 @@ function useMessages(options) {
|
|
|
1748
2255
|
onRetry,
|
|
1749
2256
|
onLoadMore
|
|
1750
2257
|
} = options;
|
|
1751
|
-
const [messages, setMessages] =
|
|
1752
|
-
const [isSending, setIsSending] =
|
|
1753
|
-
const [isLoadingMore, setIsLoadingMore] =
|
|
1754
|
-
|
|
2258
|
+
const [messages, setMessages] = React6__namespace.useState(initialMessages);
|
|
2259
|
+
const [isSending, setIsSending] = React6__namespace.useState(false);
|
|
2260
|
+
const [isLoadingMore, setIsLoadingMore] = React6__namespace.useState(false);
|
|
2261
|
+
React6__namespace.useEffect(() => {
|
|
1755
2262
|
setMessages(initialMessages);
|
|
1756
2263
|
}, [initialMessages]);
|
|
1757
|
-
const addMessage =
|
|
2264
|
+
const addMessage = React6__namespace.useCallback((message) => {
|
|
1758
2265
|
setMessages((prev) => {
|
|
1759
2266
|
if (prev.some((m) => m.id === message.id)) {
|
|
1760
2267
|
return prev;
|
|
@@ -1762,7 +2269,7 @@ function useMessages(options) {
|
|
|
1762
2269
|
return [...prev, message];
|
|
1763
2270
|
});
|
|
1764
2271
|
}, []);
|
|
1765
|
-
const updateMessage =
|
|
2272
|
+
const updateMessage = React6__namespace.useCallback(
|
|
1766
2273
|
(messageId, updates) => {
|
|
1767
2274
|
setMessages(
|
|
1768
2275
|
(prev) => prev.map((m) => m.id === messageId ? { ...m, ...updates } : m)
|
|
@@ -1770,22 +2277,22 @@ function useMessages(options) {
|
|
|
1770
2277
|
},
|
|
1771
2278
|
[]
|
|
1772
2279
|
);
|
|
1773
|
-
const removeMessage =
|
|
2280
|
+
const removeMessage = React6__namespace.useCallback((messageId) => {
|
|
1774
2281
|
setMessages((prev) => prev.filter((m) => m.id !== messageId));
|
|
1775
2282
|
}, []);
|
|
1776
|
-
const updateStatus =
|
|
2283
|
+
const updateStatus = React6__namespace.useCallback(
|
|
1777
2284
|
(messageId, status) => {
|
|
1778
2285
|
updateMessage(messageId, { status });
|
|
1779
2286
|
},
|
|
1780
2287
|
[updateMessage]
|
|
1781
2288
|
);
|
|
1782
|
-
const markAsRead =
|
|
2289
|
+
const markAsRead = React6__namespace.useCallback(
|
|
1783
2290
|
(messageId) => {
|
|
1784
2291
|
updateStatus(messageId, "read");
|
|
1785
2292
|
},
|
|
1786
2293
|
[updateStatus]
|
|
1787
2294
|
);
|
|
1788
|
-
const sendMessage =
|
|
2295
|
+
const sendMessage = React6__namespace.useCallback(
|
|
1789
2296
|
async (newMessage) => {
|
|
1790
2297
|
const optimisticId = `optimistic-${Date.now()}`;
|
|
1791
2298
|
const optimisticMessage = {
|
|
@@ -1817,7 +2324,7 @@ function useMessages(options) {
|
|
|
1817
2324
|
},
|
|
1818
2325
|
[currentUser, onSend, addMessage, updateStatus]
|
|
1819
2326
|
);
|
|
1820
|
-
const retryMessage =
|
|
2327
|
+
const retryMessage = React6__namespace.useCallback(
|
|
1821
2328
|
async (messageId) => {
|
|
1822
2329
|
updateStatus(messageId, "sending");
|
|
1823
2330
|
try {
|
|
@@ -1831,7 +2338,7 @@ function useMessages(options) {
|
|
|
1831
2338
|
},
|
|
1832
2339
|
[onRetry, updateStatus]
|
|
1833
2340
|
);
|
|
1834
|
-
const loadMore =
|
|
2341
|
+
const loadMore = React6__namespace.useCallback(async () => {
|
|
1835
2342
|
if (isLoadingMore || !onLoadMore) return;
|
|
1836
2343
|
setIsLoadingMore(true);
|
|
1837
2344
|
try {
|
|
@@ -1862,13 +2369,13 @@ function useTypingIndicator(options = {}) {
|
|
|
1862
2369
|
onTypingStart,
|
|
1863
2370
|
onTypingStop
|
|
1864
2371
|
} = options;
|
|
1865
|
-
const [participants, setParticipants] =
|
|
1866
|
-
const [isLocalTyping, setIsLocalTyping] =
|
|
1867
|
-
const typingTimeoutRef =
|
|
1868
|
-
|
|
2372
|
+
const [participants, setParticipants] = React6__namespace.useState(initialParticipants);
|
|
2373
|
+
const [isLocalTyping, setIsLocalTyping] = React6__namespace.useState(false);
|
|
2374
|
+
const typingTimeoutRef = React6__namespace.useRef(null);
|
|
2375
|
+
React6__namespace.useEffect(() => {
|
|
1869
2376
|
setParticipants(initialParticipants);
|
|
1870
2377
|
}, [initialParticipants]);
|
|
1871
|
-
const startTyping =
|
|
2378
|
+
const startTyping = React6__namespace.useCallback(() => {
|
|
1872
2379
|
if (!isLocalTyping) {
|
|
1873
2380
|
setIsLocalTyping(true);
|
|
1874
2381
|
onTypingStart?.();
|
|
@@ -1881,21 +2388,21 @@ function useTypingIndicator(options = {}) {
|
|
|
1881
2388
|
onTypingStop?.();
|
|
1882
2389
|
}, debounceTime);
|
|
1883
2390
|
}, [isLocalTyping, debounceTime, onTypingStart, onTypingStop]);
|
|
1884
|
-
const stopTyping =
|
|
2391
|
+
const stopTyping = React6__namespace.useCallback(() => {
|
|
1885
2392
|
if (typingTimeoutRef.current) {
|
|
1886
2393
|
clearTimeout(typingTimeoutRef.current);
|
|
1887
2394
|
}
|
|
1888
2395
|
setIsLocalTyping(false);
|
|
1889
2396
|
onTypingStop?.();
|
|
1890
2397
|
}, [onTypingStop]);
|
|
1891
|
-
|
|
2398
|
+
React6__namespace.useEffect(() => {
|
|
1892
2399
|
return () => {
|
|
1893
2400
|
if (typingTimeoutRef.current) {
|
|
1894
2401
|
clearTimeout(typingTimeoutRef.current);
|
|
1895
2402
|
}
|
|
1896
2403
|
};
|
|
1897
2404
|
}, []);
|
|
1898
|
-
const typingState =
|
|
2405
|
+
const typingState = React6__namespace.useMemo(
|
|
1899
2406
|
() => ({
|
|
1900
2407
|
participants,
|
|
1901
2408
|
lastUpdated: /* @__PURE__ */ new Date()
|
|
@@ -1911,11 +2418,11 @@ function useTypingIndicator(options = {}) {
|
|
|
1911
2418
|
}
|
|
1912
2419
|
function useMessageScroll(options) {
|
|
1913
2420
|
const { messages, currentUserId, threshold = 100 } = options;
|
|
1914
|
-
const scrollContainerRef =
|
|
1915
|
-
const bottomRef =
|
|
1916
|
-
const [isScrolledUp, setIsScrolledUp] =
|
|
1917
|
-
const prevMessageCountRef =
|
|
1918
|
-
|
|
2421
|
+
const scrollContainerRef = React6__namespace.useRef(null);
|
|
2422
|
+
const bottomRef = React6__namespace.useRef(null);
|
|
2423
|
+
const [isScrolledUp, setIsScrolledUp] = React6__namespace.useState(false);
|
|
2424
|
+
const prevMessageCountRef = React6__namespace.useRef(messages.length);
|
|
2425
|
+
React6__namespace.useEffect(() => {
|
|
1919
2426
|
const container = scrollContainerRef.current;
|
|
1920
2427
|
if (!container) return;
|
|
1921
2428
|
const handleScroll = () => {
|
|
@@ -1926,12 +2433,12 @@ function useMessageScroll(options) {
|
|
|
1926
2433
|
container.addEventListener("scroll", handleScroll);
|
|
1927
2434
|
return () => container.removeEventListener("scroll", handleScroll);
|
|
1928
2435
|
}, [threshold]);
|
|
1929
|
-
const scrollToBottom =
|
|
2436
|
+
const scrollToBottom = React6__namespace.useCallback((smooth = true) => {
|
|
1930
2437
|
bottomRef.current?.scrollIntoView({
|
|
1931
2438
|
behavior: smooth ? "smooth" : "auto"
|
|
1932
2439
|
});
|
|
1933
2440
|
}, []);
|
|
1934
|
-
|
|
2441
|
+
React6__namespace.useEffect(() => {
|
|
1935
2442
|
const messageCountChanged = messages.length !== prevMessageCountRef.current;
|
|
1936
2443
|
prevMessageCountRef.current = messages.length;
|
|
1937
2444
|
if (!messageCountChanged) return;
|
|
@@ -1950,9 +2457,9 @@ function useMessageScroll(options) {
|
|
|
1950
2457
|
}
|
|
1951
2458
|
function useReadReceipts(options) {
|
|
1952
2459
|
const { currentUserId, onMarkRead, threshold = 0.5 } = options;
|
|
1953
|
-
const observerRef =
|
|
1954
|
-
const observedMessagesRef =
|
|
1955
|
-
|
|
2460
|
+
const observerRef = React6__namespace.useRef(null);
|
|
2461
|
+
const observedMessagesRef = React6__namespace.useRef(/* @__PURE__ */ new Set());
|
|
2462
|
+
React6__namespace.useEffect(() => {
|
|
1956
2463
|
observerRef.current = new IntersectionObserver(
|
|
1957
2464
|
(entries) => {
|
|
1958
2465
|
entries.forEach((entry) => {
|
|
@@ -1971,7 +2478,7 @@ function useReadReceipts(options) {
|
|
|
1971
2478
|
observerRef.current?.disconnect();
|
|
1972
2479
|
};
|
|
1973
2480
|
}, [onMarkRead, threshold]);
|
|
1974
|
-
const observeMessage =
|
|
2481
|
+
const observeMessage = React6__namespace.useCallback(
|
|
1975
2482
|
(element, message) => {
|
|
1976
2483
|
if (!element || !observerRef.current) return;
|
|
1977
2484
|
if (message.sender.id !== currentUserId && message.status !== "read" && !observedMessagesRef.current.has(message.id)) {
|
|
@@ -1985,6 +2492,7 @@ function useReadReceipts(options) {
|
|
|
1985
2492
|
}
|
|
1986
2493
|
|
|
1987
2494
|
exports.AttachmentPreview = AttachmentPreview;
|
|
2495
|
+
exports.CharacterCounter = CharacterCounter;
|
|
1988
2496
|
exports.ConversationHeader = ConversationHeader;
|
|
1989
2497
|
exports.ConversationListItem = ConversationListItem;
|
|
1990
2498
|
exports.ConversationListSkeleton = ConversationListSkeleton;
|
|
@@ -1993,11 +2501,13 @@ exports.EmptyState = EmptyState;
|
|
|
1993
2501
|
exports.LightboxModal = LightboxModal;
|
|
1994
2502
|
exports.LoadMoreButton = LoadMoreButton;
|
|
1995
2503
|
exports.MessageBubble = MessageBubble;
|
|
2504
|
+
exports.MessageComposer = MessageComposer;
|
|
1996
2505
|
exports.MessageList = MessageList;
|
|
1997
2506
|
exports.MessageStatusIcon = MessageStatusIcon;
|
|
1998
2507
|
exports.MessageThread = MessageThread;
|
|
1999
2508
|
exports.MessagingSplitView = MessagingSplitView;
|
|
2000
2509
|
exports.ReadReceiptIndicator = ReadReceiptIndicator;
|
|
2510
|
+
exports.SendButton = SendButton;
|
|
2001
2511
|
exports.SkeletonMessage = SkeletonMessage;
|
|
2002
2512
|
exports.TypingIndicator = TypingIndicator;
|
|
2003
2513
|
exports.bubbleVariants = bubbleVariants;
|
|
@@ -2009,9 +2519,10 @@ exports.getConversationTitle = getConversationTitle;
|
|
|
2009
2519
|
exports.groupMessagesByDate = groupMessagesByDate;
|
|
2010
2520
|
exports.headerVariants = headerVariants;
|
|
2011
2521
|
exports.isSameSenderGroup = isSameSenderGroup;
|
|
2522
|
+
exports.sendButtonVariants = sendButtonVariants;
|
|
2012
2523
|
exports.useMessageScroll = useMessageScroll;
|
|
2013
2524
|
exports.useMessages = useMessages;
|
|
2014
2525
|
exports.useReadReceipts = useReadReceipts;
|
|
2015
2526
|
exports.useTypingIndicator = useTypingIndicator;
|
|
2016
|
-
//# sourceMappingURL=chunk-
|
|
2017
|
-
//# sourceMappingURL=chunk-
|
|
2527
|
+
//# sourceMappingURL=chunk-O425FKDI.cjs.map
|
|
2528
|
+
//# sourceMappingURL=chunk-O425FKDI.cjs.map
|