@mieweb/ui 0.7.3 → 0.8.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 +45 -24
- package/agent/README.md +20 -0
- package/agent/init-agent.mjs +61 -0
- package/agent/mieweb-ui.instructions.md +169 -0
- package/dist/ag-grid.cjs +11 -0
- package/dist/ag-grid.cjs.map +1 -1
- package/dist/ag-grid.d.cts +4 -0
- package/dist/ag-grid.d.ts +4 -0
- package/dist/ag-grid.js +11 -0
- package/dist/ag-grid.js.map +1 -1
- package/dist/brands/index.cjs +12 -12
- package/dist/brands/index.js +3 -3
- package/dist/{chunk-EGWWTIWS.js → chunk-2AB4PQYL.js} +126 -96
- package/dist/chunk-2AB4PQYL.js.map +1 -0
- package/dist/{chunk-NQ2D2V6O.cjs → chunk-2PEVRI26.cjs} +37 -37
- package/dist/{chunk-NQ2D2V6O.cjs.map → chunk-2PEVRI26.cjs.map} +1 -1
- package/dist/{chunk-6J7UGYT5.cjs → chunk-2SSAAE3I.cjs} +49 -9
- package/dist/chunk-2SSAAE3I.cjs.map +1 -0
- package/dist/chunk-3IMM2PM4.js +259 -0
- package/dist/chunk-3IMM2PM4.js.map +1 -0
- package/dist/{chunk-SYIFEJSF.cjs → chunk-3RADKLLD.cjs} +13 -13
- package/dist/{chunk-SYIFEJSF.cjs.map → chunk-3RADKLLD.cjs.map} +1 -1
- package/dist/chunk-3SHLOF4V.cjs +128 -0
- package/dist/chunk-3SHLOF4V.cjs.map +1 -0
- package/dist/chunk-3TXOFAXP.cjs +139 -0
- package/dist/chunk-3TXOFAXP.cjs.map +1 -0
- package/dist/{chunk-LJDBD2DD.cjs → chunk-5BPUZK2B.cjs} +386 -4
- package/dist/chunk-5BPUZK2B.cjs.map +1 -0
- package/dist/chunk-5JZIDILK.cjs +164 -0
- package/dist/chunk-5JZIDILK.cjs.map +1 -0
- package/dist/chunk-5MXO6PEV.cjs +78 -0
- package/dist/chunk-5MXO6PEV.cjs.map +1 -0
- package/dist/chunk-5QZ73PZC.js +62 -0
- package/dist/chunk-5QZ73PZC.js.map +1 -0
- package/dist/chunk-6GKX36JX.js +269 -0
- package/dist/chunk-6GKX36JX.js.map +1 -0
- package/dist/chunk-6NZXWKUE.js +3 -0
- package/dist/chunk-6NZXWKUE.js.map +1 -0
- package/dist/chunk-6SCQ7FKT.js +115 -0
- package/dist/chunk-6SCQ7FKT.js.map +1 -0
- package/dist/{chunk-KFLDXJEE.js → chunk-753Z3NXL.js} +46 -15
- package/dist/chunk-753Z3NXL.js.map +1 -0
- package/dist/{chunk-S3MKIDYG.cjs → chunk-7AECNMYV.cjs} +46 -15
- package/dist/chunk-7AECNMYV.cjs.map +1 -0
- package/dist/chunk-7IKLGH3Z.cjs +92 -0
- package/dist/chunk-7IKLGH3Z.cjs.map +1 -0
- package/dist/chunk-7RV6CAP6.cjs +106 -0
- package/dist/chunk-7RV6CAP6.cjs.map +1 -0
- package/dist/chunk-AHHFFXJR.cjs +230 -0
- package/dist/chunk-AHHFFXJR.cjs.map +1 -0
- package/dist/{chunk-HIDV32ZX.js → chunk-AHUYW673.js} +168 -9
- package/dist/chunk-AHUYW673.js.map +1 -0
- package/dist/{chunk-MYFZYUPR.cjs → chunk-AOHJILLU.cjs} +38 -3
- package/dist/chunk-AOHJILLU.cjs.map +1 -0
- package/dist/{chunk-DLBV42JD.js → chunk-ATOWMVZH.js} +157 -40
- package/dist/chunk-ATOWMVZH.js.map +1 -0
- package/dist/{chunk-WUNWHOLA.cjs → chunk-BSDBI6H7.cjs} +116 -26
- package/dist/chunk-BSDBI6H7.cjs.map +1 -0
- package/dist/chunk-CG4ZKJLE.js +84 -0
- package/dist/chunk-CG4ZKJLE.js.map +1 -0
- package/dist/{chunk-4PIW3Y5M.js → chunk-DJ4JPFWI.js} +3 -3
- package/dist/{chunk-4PIW3Y5M.js.map → chunk-DJ4JPFWI.js.map} +1 -1
- package/dist/{chunk-Z4PECE5S.js → chunk-DX64KLSN.js} +2 -2
- package/dist/{chunk-Z4PECE5S.js.map → chunk-DX64KLSN.js.map} +1 -1
- package/dist/{chunk-FDV7EQWH.js → chunk-EK6DYGFG.js} +3 -3
- package/dist/{chunk-FDV7EQWH.js.map → chunk-EK6DYGFG.js.map} +1 -1
- package/dist/{chunk-QUUBTNMH.js → chunk-EPSB4WTL.js} +45 -15
- package/dist/chunk-EPSB4WTL.js.map +1 -0
- package/dist/{chunk-KRGKPUJH.js → chunk-F2S6NV5N.js} +8 -8
- package/dist/{chunk-KRGKPUJH.js.map → chunk-F2S6NV5N.js.map} +1 -1
- package/dist/chunk-F57VRLKP.js +708 -0
- package/dist/chunk-F57VRLKP.js.map +1 -0
- package/dist/{chunk-26DPQUSB.cjs → chunk-G52YRAJC.cjs} +4 -4
- package/dist/{chunk-26DPQUSB.cjs.map → chunk-G52YRAJC.cjs.map} +1 -1
- package/dist/{chunk-5IDYOJHO.cjs → chunk-G7EQ3JPX.cjs} +45 -15
- package/dist/chunk-G7EQ3JPX.cjs.map +1 -0
- package/dist/{chunk-FKLUSYFP.cjs → chunk-GQVL2JKQ.cjs} +4 -4
- package/dist/{chunk-FKLUSYFP.cjs.map → chunk-GQVL2JKQ.cjs.map} +1 -1
- package/dist/{chunk-3D4ITDLO.js → chunk-GXODR6V4.js} +3 -3
- package/dist/{chunk-3D4ITDLO.js.map → chunk-GXODR6V4.js.map} +1 -1
- package/dist/{chunk-AFGADE3B.js → chunk-H3YO5GBM.js} +117 -27
- package/dist/chunk-H3YO5GBM.js.map +1 -0
- package/dist/chunk-HK3AMH3Q.cjs +151 -0
- package/dist/chunk-HK3AMH3Q.cjs.map +1 -0
- package/dist/chunk-HQ3XPCHG.js +114 -0
- package/dist/chunk-HQ3XPCHG.js.map +1 -0
- package/dist/chunk-I44YNYI6.cjs +4 -0
- package/dist/chunk-I44YNYI6.cjs.map +1 -0
- package/dist/chunk-JHZW3Y62.js +142 -0
- package/dist/chunk-JHZW3Y62.js.map +1 -0
- package/dist/{chunk-FTRGZOVJ.js → chunk-JQQABHDN.js} +3 -3
- package/dist/{chunk-FTRGZOVJ.js.map → chunk-JQQABHDN.js.map} +1 -1
- package/dist/chunk-JR4QIU54.cjs +291 -0
- package/dist/chunk-JR4QIU54.cjs.map +1 -0
- package/dist/{chunk-JDHIBJ5K.cjs → chunk-JWTCEWQ4.cjs} +2 -2
- package/dist/{chunk-JDHIBJ5K.cjs.map → chunk-JWTCEWQ4.cjs.map} +1 -1
- package/dist/{chunk-ZBI52NP2.cjs → chunk-K5GQPTTA.cjs} +158 -41
- package/dist/chunk-K5GQPTTA.cjs.map +1 -0
- package/dist/chunk-KFEN2SRZ.js +208 -0
- package/dist/chunk-KFEN2SRZ.js.map +1 -0
- package/dist/chunk-L6MDULYB.js +87 -0
- package/dist/chunk-L6MDULYB.js.map +1 -0
- package/dist/{chunk-RYQ3S3KO.cjs → chunk-LDCFNWJC.cjs} +5 -5
- package/dist/{chunk-RYQ3S3KO.cjs.map → chunk-LDCFNWJC.cjs.map} +1 -1
- package/dist/{chunk-LC7YHZXM.js → chunk-LDQ2T27A.js} +5 -5
- package/dist/{chunk-LC7YHZXM.js.map → chunk-LDQ2T27A.js.map} +1 -1
- package/dist/chunk-N5O47VGS.cjs +109 -0
- package/dist/chunk-N5O47VGS.cjs.map +1 -0
- package/dist/chunk-NGSDBWKA.cjs +84 -0
- package/dist/chunk-NGSDBWKA.cjs.map +1 -0
- package/dist/chunk-NMBYU7D7.cjs +31 -0
- package/dist/chunk-NMBYU7D7.cjs.map +1 -0
- package/dist/{chunk-SPWVKDGC.cjs → chunk-QMKYJ4AT.cjs} +4 -4
- package/dist/{chunk-SPWVKDGC.cjs.map → chunk-QMKYJ4AT.cjs.map} +1 -1
- package/dist/{chunk-RBS3GHDZ.cjs → chunk-QOJ4V7YX.cjs} +170 -10
- package/dist/chunk-QOJ4V7YX.cjs.map +1 -0
- package/dist/chunk-RUGHNFQG.js +28 -0
- package/dist/chunk-RUGHNFQG.js.map +1 -0
- package/dist/{chunk-P6L74SKG.js → chunk-SVZ4MQVQ.js} +48 -8
- package/dist/chunk-SVZ4MQVQ.js.map +1 -0
- package/dist/{chunk-URHXR5SC.cjs → chunk-TQZPYDUL.cjs} +7 -7
- package/dist/{chunk-URHXR5SC.cjs.map → chunk-TQZPYDUL.cjs.map} +1 -1
- package/dist/{chunk-MO65V64I.js → chunk-TXRQQMG5.js} +2 -2
- package/dist/{chunk-MO65V64I.js.map → chunk-TXRQQMG5.js.map} +1 -1
- package/dist/{chunk-EKRT7K2K.js → chunk-UJS3JTVT.js} +3 -3
- package/dist/{chunk-EKRT7K2K.js.map → chunk-UJS3JTVT.js.map} +1 -1
- package/dist/{chunk-6MMIWE7H.js → chunk-VQ5HJCTP.js} +386 -4
- package/dist/chunk-VQ5HJCTP.js.map +1 -0
- package/dist/chunk-WBGUYSWY.js +90 -0
- package/dist/chunk-WBGUYSWY.js.map +1 -0
- package/dist/{chunk-LJBWCUKP.cjs → chunk-WIYQI35R.cjs} +2 -2
- package/dist/{chunk-LJBWCUKP.cjs.map → chunk-WIYQI35R.cjs.map} +1 -1
- package/dist/chunk-WKSUL2ZN.js +56 -0
- package/dist/chunk-WKSUL2ZN.js.map +1 -0
- package/dist/{chunk-BOOJDRJO.js → chunk-WSNMQQ4P.js} +38 -3
- package/dist/chunk-WSNMQQ4P.js.map +1 -0
- package/dist/chunk-X5ZPYYMS.js +105 -0
- package/dist/chunk-X5ZPYYMS.js.map +1 -0
- package/dist/{chunk-XB54G7WS.cjs → chunk-XJTFZLWH.cjs} +2 -86
- package/dist/chunk-XJTFZLWH.cjs.map +1 -0
- package/dist/{chunk-GTHNWP4P.js → chunk-XUVEF2RQ.js} +4 -87
- package/dist/chunk-XUVEF2RQ.js.map +1 -0
- package/dist/chunk-Y6YSJPVC.js +129 -0
- package/dist/chunk-Y6YSJPVC.js.map +1 -0
- package/dist/{chunk-OAHORW4N.cjs → chunk-YRLCR76L.cjs} +129 -99
- package/dist/chunk-YRLCR76L.cjs.map +1 -0
- package/dist/chunk-YVIH26FG.cjs +736 -0
- package/dist/chunk-YVIH26FG.cjs.map +1 -0
- package/dist/chunk-Z5S5JEJD.cjs +286 -0
- package/dist/chunk-Z5S5JEJD.cjs.map +1 -0
- package/dist/chunk-ZO4L6C2Y.cjs +137 -0
- package/dist/chunk-ZO4L6C2Y.cjs.map +1 -0
- package/dist/{collabKit-QZL4P5T5.js → collabKit-A643VH2I.js} +7 -3
- package/dist/collabKit-A643VH2I.js.map +1 -0
- package/dist/{collabKit-UF7E6V3N.cjs → collabKit-Q4A36LDA.cjs} +7 -3
- package/dist/collabKit-Q4A36LDA.cjs.map +1 -0
- package/dist/components/Accordion/index.cjs +13 -0
- package/dist/components/Accordion/index.cjs.map +1 -0
- package/dist/components/Accordion/index.d.cts +50 -0
- package/dist/components/Accordion/index.d.ts +50 -0
- package/dist/components/Accordion/index.js +4 -0
- package/dist/components/Accordion/index.js.map +1 -0
- package/dist/components/Alert/index.d.cts +1 -1
- package/dist/components/Alert/index.d.ts +1 -1
- package/dist/components/Autocomplete/index.cjs +5 -4
- package/dist/components/Autocomplete/index.d.cts +20 -3
- package/dist/components/Autocomplete/index.d.ts +20 -3
- package/dist/components/Autocomplete/index.js +4 -3
- package/dist/components/Badge/index.d.cts +1 -1
- package/dist/components/Badge/index.d.ts +1 -1
- package/dist/components/Card/index.d.cts +1 -1
- package/dist/components/Card/index.d.ts +1 -1
- package/dist/components/Checkbox/index.cjs +5 -4
- package/dist/components/Checkbox/index.d.cts +9 -1
- package/dist/components/Checkbox/index.d.ts +9 -1
- package/dist/components/Checkbox/index.js +2 -1
- package/dist/components/ClampedText/index.cjs +13 -0
- package/dist/components/ClampedText/index.cjs.map +1 -0
- package/dist/components/ClampedText/index.d.cts +33 -0
- package/dist/components/ClampedText/index.d.ts +33 -0
- package/dist/components/ClampedText/index.js +4 -0
- package/dist/components/ClampedText/index.js.map +1 -0
- package/dist/components/CopyButton/index.cjs +13 -0
- package/dist/components/CopyButton/index.cjs.map +1 -0
- package/dist/components/CopyButton/index.d.cts +29 -0
- package/dist/components/CopyButton/index.d.ts +29 -0
- package/dist/components/CopyButton/index.js +4 -0
- package/dist/components/CopyButton/index.js.map +1 -0
- package/dist/components/CountryCodeDropdown/index.cjs +5 -5
- package/dist/components/CountryCodeDropdown/index.js +2 -2
- package/dist/components/CustomizableDashboard/index.cjs +43 -0
- package/dist/components/CustomizableDashboard/index.cjs.map +1 -0
- package/dist/components/CustomizableDashboard/index.d.cts +195 -0
- package/dist/components/CustomizableDashboard/index.d.ts +195 -0
- package/dist/components/CustomizableDashboard/index.js +10 -0
- package/dist/components/CustomizableDashboard/index.js.map +1 -0
- package/dist/components/DateInput/index.cjs +5 -4
- package/dist/components/DateInput/index.d.cts +1 -0
- package/dist/components/DateInput/index.d.ts +1 -0
- package/dist/components/DateInput/index.js +4 -3
- package/dist/components/Dropdown/index.cjs +14 -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 +4 -3
- package/dist/components/FilterSummaryBar/index.cjs +13 -0
- package/dist/components/FilterSummaryBar/index.cjs.map +1 -0
- package/dist/components/FilterSummaryBar/index.d.cts +53 -0
- package/dist/components/FilterSummaryBar/index.d.ts +53 -0
- package/dist/components/FilterSummaryBar/index.js +4 -0
- package/dist/components/FilterSummaryBar/index.js.map +1 -0
- package/dist/components/FreshnessBadge/index.cjs +25 -0
- package/dist/components/FreshnessBadge/index.cjs.map +1 -0
- package/dist/components/FreshnessBadge/index.d.cts +49 -0
- package/dist/components/FreshnessBadge/index.d.ts +49 -0
- package/dist/components/FreshnessBadge/index.js +4 -0
- package/dist/components/FreshnessBadge/index.js.map +1 -0
- package/dist/components/GlossaryTooltip/index.cjs +15 -0
- package/dist/components/GlossaryTooltip/index.cjs.map +1 -0
- package/dist/components/GlossaryTooltip/index.d.cts +64 -0
- package/dist/components/GlossaryTooltip/index.d.ts +64 -0
- package/dist/components/GlossaryTooltip/index.js +6 -0
- package/dist/components/GlossaryTooltip/index.js.map +1 -0
- package/dist/components/Input/index.cjs +20 -3
- package/dist/components/Input/index.d.cts +37 -2
- package/dist/components/Input/index.d.ts +37 -2
- package/dist/components/Input/index.js +2 -1
- package/dist/components/KeyboardShortcutsOverlay/index.cjs +21 -0
- package/dist/components/KeyboardShortcutsOverlay/index.cjs.map +1 -0
- package/dist/components/KeyboardShortcutsOverlay/index.d.cts +54 -0
- package/dist/components/KeyboardShortcutsOverlay/index.d.ts +54 -0
- package/dist/components/KeyboardShortcutsOverlay/index.js +8 -0
- package/dist/components/KeyboardShortcutsOverlay/index.js.map +1 -0
- package/dist/components/Markdown/index.cjs +10 -10
- package/dist/components/Markdown/index.js +2 -2
- package/dist/components/MediaEditor/index.cjs +11 -10
- package/dist/components/MediaEditor/index.js +6 -5
- package/dist/components/PhoneInput/index.cjs +5 -4
- package/dist/components/PhoneInput/index.js +3 -2
- package/dist/components/Progress/index.d.cts +1 -1
- package/dist/components/Progress/index.d.ts +1 -1
- package/dist/components/Radio/index.cjs +5 -4
- package/dist/components/Radio/index.d.cts +9 -1
- package/dist/components/Radio/index.d.ts +9 -1
- package/dist/components/Radio/index.js +2 -1
- package/dist/components/ReadingProgressBar/index.cjs +13 -0
- package/dist/components/ReadingProgressBar/index.cjs.map +1 -0
- package/dist/components/ReadingProgressBar/index.d.cts +20 -0
- package/dist/components/ReadingProgressBar/index.d.ts +20 -0
- package/dist/components/ReadingProgressBar/index.js +4 -0
- package/dist/components/ReadingProgressBar/index.js.map +1 -0
- package/dist/components/RichTextEditor/index.cjs +8 -7
- package/dist/components/RichTextEditor/index.js +5 -4
- package/dist/components/SectionSpyNav/index.cjs +15 -0
- package/dist/components/SectionSpyNav/index.cjs.map +1 -0
- package/dist/components/SectionSpyNav/index.d.cts +63 -0
- package/dist/components/SectionSpyNav/index.d.ts +63 -0
- package/dist/components/SectionSpyNav/index.js +6 -0
- package/dist/components/SectionSpyNav/index.js.map +1 -0
- package/dist/components/Select/index.cjs +6 -4
- package/dist/components/Select/index.d.cts +56 -9
- package/dist/components/Select/index.d.ts +56 -9
- package/dist/components/Select/index.js +4 -2
- package/dist/components/Slider/index.d.cts +2 -2
- package/dist/components/Slider/index.d.ts +2 -2
- package/dist/components/SourceTip/index.cjs +15 -0
- package/dist/components/SourceTip/index.cjs.map +1 -0
- package/dist/components/SourceTip/index.d.cts +58 -0
- package/dist/components/SourceTip/index.d.ts +58 -0
- package/dist/components/SourceTip/index.js +6 -0
- package/dist/components/SourceTip/index.js.map +1 -0
- package/dist/components/Sparkline/index.cjs +13 -0
- package/dist/components/Sparkline/index.cjs.map +1 -0
- package/dist/components/Sparkline/index.d.cts +53 -0
- package/dist/components/Sparkline/index.d.ts +53 -0
- package/dist/components/Sparkline/index.js +4 -0
- package/dist/components/Sparkline/index.js.map +1 -0
- package/dist/components/Spinner/index.d.cts +1 -1
- package/dist/components/Spinner/index.d.ts +1 -1
- package/dist/components/SuperChat/index.cjs +252 -93
- package/dist/components/SuperChat/index.cjs.map +1 -1
- package/dist/components/SuperChat/index.d.cts +13 -5
- package/dist/components/SuperChat/index.d.ts +13 -5
- package/dist/components/SuperChat/index.js +249 -90
- package/dist/components/SuperChat/index.js.map +1 -1
- package/dist/components/SuperChat/plugins/index.cjs +6 -26
- 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 +4 -24
- 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/Textarea/index.cjs +5 -3
- package/dist/components/Textarea/index.d.cts +19 -1
- package/dist/components/Textarea/index.d.ts +19 -1
- package/dist/components/Textarea/index.js +3 -1
- package/dist/datavis.cjs +1 -1
- package/dist/datavis.js +1 -1
- package/dist/esheet.cjs +12 -11
- package/dist/esheet.cjs.map +1 -1
- package/dist/esheet.js +9 -8
- package/dist/esheet.js.map +1 -1
- package/dist/hooks/index.cjs +29 -19
- package/dist/hooks/index.d.cts +17 -2
- package/dist/hooks/index.d.ts +17 -2
- package/dist/hooks/index.js +4 -2
- package/dist/index.cjs +2965 -2043
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +193 -48
- package/dist/index.d.ts +193 -48
- package/dist/index.js +2135 -1330
- package/dist/index.js.map +1 -1
- package/dist/kerebron.cjs +200 -68
- package/dist/kerebron.cjs.map +1 -1
- package/dist/kerebron.css +129 -0
- package/dist/kerebron.d.cts +52 -3
- package/dist/kerebron.d.ts +52 -3
- package/dist/kerebron.js +201 -69
- package/dist/kerebron.js.map +1 -1
- 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.cts → useAnchoredPosition-CKwLSQW8.d.cts} +10 -3
- package/dist/{useAnchoredPosition-C7PNglzD.d.ts → useAnchoredPosition-CKwLSQW8.d.ts} +10 -3
- package/dist/utils/index.cjs +9 -9
- package/dist/utils/index.js +1 -1
- package/package.json +13 -4
- package/dist/chunk-5IDYOJHO.cjs.map +0 -1
- package/dist/chunk-6ECKH4DJ.cjs +0 -147
- package/dist/chunk-6ECKH4DJ.cjs.map +0 -1
- package/dist/chunk-6J7UGYT5.cjs.map +0 -1
- package/dist/chunk-6MMIWE7H.js.map +0 -1
- package/dist/chunk-AFGADE3B.js.map +0 -1
- package/dist/chunk-BOOJDRJO.js.map +0 -1
- package/dist/chunk-DLBV42JD.js.map +0 -1
- package/dist/chunk-EGWWTIWS.js.map +0 -1
- package/dist/chunk-GTHNWP4P.js.map +0 -1
- package/dist/chunk-HIDV32ZX.js.map +0 -1
- package/dist/chunk-KFLDXJEE.js.map +0 -1
- package/dist/chunk-LJDBD2DD.cjs.map +0 -1
- package/dist/chunk-MYFZYUPR.cjs.map +0 -1
- package/dist/chunk-OAHORW4N.cjs.map +0 -1
- package/dist/chunk-P6L74SKG.js.map +0 -1
- package/dist/chunk-QUUBTNMH.js.map +0 -1
- package/dist/chunk-RBS3GHDZ.cjs.map +0 -1
- package/dist/chunk-S3MKIDYG.cjs.map +0 -1
- package/dist/chunk-WUNWHOLA.cjs.map +0 -1
- package/dist/chunk-XB54G7WS.cjs.map +0 -1
- package/dist/chunk-YXCE2HSK.js +0 -124
- package/dist/chunk-YXCE2HSK.js.map +0 -1
- package/dist/chunk-ZBI52NP2.cjs.map +0 -1
- package/dist/collabKit-QZL4P5T5.js.map +0 -1
- package/dist/collabKit-UF7E6V3N.cjs.map +0 -1
|
@@ -1,24 +1,25 @@
|
|
|
1
1
|
import { TextRenderContext } from '../../chunk-I6CY5C6A.js';
|
|
2
2
|
export { TextRenderContext, useTextRenderContext } from '../../chunk-I6CY5C6A.js';
|
|
3
3
|
import { ChatBubble, MCPToolCallDisplay, AITypingIndicator, SparklesIcon, CloseIcon } from '../../chunk-RZJXCI53.js';
|
|
4
|
-
import { MessageComposer } from '../../chunk-
|
|
5
|
-
import { Dropdown, DropdownItem } from '../../chunk-
|
|
4
|
+
import { MessageComposer } from '../../chunk-UJS3JTVT.js';
|
|
5
|
+
import { Dropdown, DropdownSubmenu, DropdownItem } from '../../chunk-AHUYW673.js';
|
|
6
|
+
import '../../chunk-IQ4KQJAO.js';
|
|
6
7
|
import '../../chunk-XO3WLK65.js';
|
|
7
8
|
import { Avatar } from '../../chunk-DCBMTFLE.js';
|
|
8
|
-
import '../../chunk-
|
|
9
|
-
import '../../chunk-
|
|
9
|
+
import '../../chunk-6NZXWKUE.js';
|
|
10
|
+
import '../../chunk-3IMM2PM4.js';
|
|
10
11
|
import { Badge } from '../../chunk-BMSG4NBH.js';
|
|
11
12
|
import '../../chunk-T4ME7QCT.js';
|
|
12
13
|
import '../../chunk-62ZOA6PX.js';
|
|
13
|
-
import '../../chunk-
|
|
14
|
+
import '../../chunk-WSNMQQ4P.js';
|
|
14
15
|
import { cn } from '../../chunk-TQONQSJO.js';
|
|
15
|
-
import * as
|
|
16
|
+
import * as React2 from 'react';
|
|
16
17
|
import Markdown, { defaultUrlTransform } from 'react-markdown';
|
|
17
18
|
import remarkGfm from 'remark-gfm';
|
|
18
19
|
import rehypeSanitize, { defaultSchema } from 'rehype-sanitize';
|
|
19
20
|
import { jsx, jsxs, Fragment } from 'react/jsx-runtime';
|
|
20
21
|
import { cva } from 'class-variance-authority';
|
|
21
|
-
import {
|
|
22
|
+
import { Ellipsis, Check, Clipboard, Pencil } from 'lucide-react';
|
|
22
23
|
import { useVirtualizer } from '@tanstack/react-virtual';
|
|
23
24
|
|
|
24
25
|
function remarkPreserveLineBreaks() {
|
|
@@ -265,7 +266,7 @@ var transformUrl = (url, key, node) => {
|
|
|
265
266
|
}
|
|
266
267
|
return defaultUrlTransform(url);
|
|
267
268
|
};
|
|
268
|
-
var MarkdownContent =
|
|
269
|
+
var MarkdownContent = React2.memo(function MarkdownContent2({
|
|
269
270
|
text,
|
|
270
271
|
messageId,
|
|
271
272
|
streaming,
|
|
@@ -460,13 +461,19 @@ function filesToComposerAttachments(files) {
|
|
|
460
461
|
)
|
|
461
462
|
);
|
|
462
463
|
}
|
|
463
|
-
|
|
464
|
-
|
|
465
|
-
|
|
466
|
-
|
|
464
|
+
var actionRevealClass = "opacity-0 transition-opacity group-focus-within:opacity-100 group-hover:opacity-100 focus-visible:opacity-100 [@media(pointer:coarse)]:opacity-100";
|
|
465
|
+
var actionButtonClass = "rounded p-1 text-neutral-400 hover:text-neutral-600 dark:hover:text-neutral-200";
|
|
466
|
+
function useMessageCopy({
|
|
467
|
+
markdown,
|
|
468
|
+
getHtml,
|
|
469
|
+
getText,
|
|
470
|
+
defaultFormat
|
|
471
|
+
}) {
|
|
472
|
+
const [copied, setCopied] = React2.useState(false);
|
|
473
|
+
const copiedTimer = React2.useRef(
|
|
467
474
|
void 0
|
|
468
475
|
);
|
|
469
|
-
|
|
476
|
+
React2.useEffect(() => () => window.clearTimeout(copiedTimer.current), []);
|
|
470
477
|
const flash = () => {
|
|
471
478
|
setCopied(true);
|
|
472
479
|
window.clearTimeout(copiedTimer.current);
|
|
@@ -497,20 +504,110 @@ function CopyMenu({ isSelf, markdown, getHtml, getText }) {
|
|
|
497
504
|
}
|
|
498
505
|
};
|
|
499
506
|
const run = (fn) => {
|
|
500
|
-
setOpen(false);
|
|
501
507
|
void fn().then(flash, () => {
|
|
502
508
|
});
|
|
503
509
|
};
|
|
510
|
+
const copyRich = () => run(writeBoth);
|
|
511
|
+
const copyMarkdown = () => run(() => writeText(markdown || getText()));
|
|
512
|
+
const copyPlain = () => run(() => writeText(getText()));
|
|
513
|
+
const copyDefault = defaultFormat === "markdown" ? copyMarkdown : defaultFormat === "plain" ? copyPlain : copyRich;
|
|
514
|
+
return { copied, copyDefault, copyRich, copyMarkdown, copyPlain };
|
|
515
|
+
}
|
|
516
|
+
function ActionMenuItem({
|
|
517
|
+
item,
|
|
518
|
+
onSelect
|
|
519
|
+
}) {
|
|
520
|
+
return /* @__PURE__ */ jsx(DropdownItem, { onClick: () => onSelect(item.onSelect), children: item.description ? /* @__PURE__ */ jsxs("span", { className: "flex flex-col items-start", children: [
|
|
521
|
+
/* @__PURE__ */ jsx("span", { children: item.label }),
|
|
522
|
+
/* @__PURE__ */ jsx("span", { className: "text-[10px] font-normal text-neutral-400", children: item.description })
|
|
523
|
+
] }) : item.label });
|
|
524
|
+
}
|
|
525
|
+
function FooterActionButton({
|
|
526
|
+
action,
|
|
527
|
+
isSelf
|
|
528
|
+
}) {
|
|
529
|
+
const [open, setOpen] = React2.useState(false);
|
|
530
|
+
const onClickCapture = action.submenu ? (e) => {
|
|
531
|
+
if (e.metaKey || e.ctrlKey) {
|
|
532
|
+
e.preventDefault();
|
|
533
|
+
e.stopPropagation();
|
|
534
|
+
action.onSelect();
|
|
535
|
+
}
|
|
536
|
+
} : void 0;
|
|
537
|
+
const button = /* @__PURE__ */ jsx(
|
|
538
|
+
"button",
|
|
539
|
+
{
|
|
540
|
+
type: "button",
|
|
541
|
+
"data-slot": `superchat-action-${action.id}`,
|
|
542
|
+
"aria-label": action.label,
|
|
543
|
+
title: action.title ?? action.label,
|
|
544
|
+
onClick: action.submenu ? void 0 : action.onSelect,
|
|
545
|
+
onClickCapture,
|
|
546
|
+
className: actionButtonClass,
|
|
547
|
+
children: action.icon
|
|
548
|
+
}
|
|
549
|
+
);
|
|
550
|
+
if (!action.submenu) return button;
|
|
551
|
+
return /* @__PURE__ */ jsx(
|
|
552
|
+
Dropdown,
|
|
553
|
+
{
|
|
554
|
+
open,
|
|
555
|
+
onOpenChange: setOpen,
|
|
556
|
+
placement: isSelf ? "top-end" : "top-start",
|
|
557
|
+
trigger: button,
|
|
558
|
+
children: action.submenu.items.map((item) => /* @__PURE__ */ jsx(
|
|
559
|
+
ActionMenuItem,
|
|
560
|
+
{
|
|
561
|
+
item,
|
|
562
|
+
onSelect: (fn) => {
|
|
563
|
+
setOpen(false);
|
|
564
|
+
fn();
|
|
565
|
+
}
|
|
566
|
+
},
|
|
567
|
+
item.id
|
|
568
|
+
))
|
|
569
|
+
}
|
|
570
|
+
);
|
|
571
|
+
}
|
|
572
|
+
var MessageActionsBar = React2.forwardRef(function MessageActionsBar2({ actions, isSelf }, ref) {
|
|
504
573
|
return /* @__PURE__ */ jsx(
|
|
505
574
|
"div",
|
|
506
575
|
{
|
|
576
|
+
ref,
|
|
577
|
+
"data-slot": "superchat-message-actions",
|
|
507
578
|
className: cn(
|
|
508
|
-
"
|
|
579
|
+
"flex items-center gap-0.5",
|
|
580
|
+
isSelf && "justify-end",
|
|
581
|
+
actionRevealClass
|
|
582
|
+
),
|
|
583
|
+
children: actions.map((action) => /* @__PURE__ */ jsx(FooterActionButton, { action, isSelf }, action.id))
|
|
584
|
+
}
|
|
585
|
+
);
|
|
586
|
+
});
|
|
587
|
+
function MessageOverflowMenu({
|
|
588
|
+
isSelf,
|
|
589
|
+
actions,
|
|
590
|
+
footerVisible
|
|
591
|
+
}) {
|
|
592
|
+
const [open, setOpen] = React2.useState(false);
|
|
593
|
+
const select = (fn) => {
|
|
594
|
+
setOpen(false);
|
|
595
|
+
fn();
|
|
596
|
+
};
|
|
597
|
+
return /* @__PURE__ */ jsx(
|
|
598
|
+
"div",
|
|
599
|
+
{
|
|
600
|
+
className: cn(
|
|
601
|
+
"sticky bottom-2 shrink-0 self-end transition-opacity",
|
|
509
602
|
// Rich content (e.g. NITRO tables) layers internals up to z-50, so the
|
|
510
603
|
// open menu's stacking context must clear that.
|
|
511
|
-
open ? "z-[60]" : "z-10"
|
|
604
|
+
open ? "z-[60]" : "z-10",
|
|
605
|
+
// Hand off to the footer bar when it's visible. `invisible` (not
|
|
606
|
+
// just opacity) drops the hidden button from the tab order so
|
|
607
|
+
// keyboard users can't focus an unseen control.
|
|
608
|
+
footerVisible && !open && "pointer-events-none invisible opacity-0"
|
|
512
609
|
),
|
|
513
|
-
children: /* @__PURE__ */
|
|
610
|
+
children: /* @__PURE__ */ jsx(
|
|
514
611
|
Dropdown,
|
|
515
612
|
{
|
|
516
613
|
open,
|
|
@@ -520,32 +617,32 @@ function CopyMenu({ isSelf, markdown, getHtml, getText }) {
|
|
|
520
617
|
"button",
|
|
521
618
|
{
|
|
522
619
|
type: "button",
|
|
523
|
-
"data-slot": "superchat-
|
|
524
|
-
"aria-label": "
|
|
525
|
-
className:
|
|
526
|
-
children:
|
|
620
|
+
"data-slot": "superchat-overflow-button",
|
|
621
|
+
"aria-label": "Message actions",
|
|
622
|
+
className: cn(actionButtonClass, actionRevealClass),
|
|
623
|
+
children: /* @__PURE__ */ jsx(Ellipsis, { size: 14, "aria-hidden": "true" })
|
|
527
624
|
}
|
|
528
625
|
),
|
|
529
|
-
children:
|
|
530
|
-
|
|
531
|
-
|
|
532
|
-
|
|
533
|
-
|
|
534
|
-
/* @__PURE__ */ jsx(
|
|
626
|
+
children: actions.map(
|
|
627
|
+
(action) => action.submenu ? (
|
|
628
|
+
// Actions with variants collapse to just their submenu — a
|
|
629
|
+
// top-level default item would duplicate the flyout's options.
|
|
630
|
+
/* @__PURE__ */ jsx(DropdownSubmenu, { label: action.submenu.label, children: action.submenu.items.map((item) => /* @__PURE__ */ jsx(ActionMenuItem, { item, onSelect: select }, item.id)) }, action.id)
|
|
631
|
+
) : /* @__PURE__ */ jsx(
|
|
535
632
|
DropdownItem,
|
|
536
633
|
{
|
|
537
|
-
onClick: () =>
|
|
538
|
-
children:
|
|
539
|
-
}
|
|
540
|
-
|
|
541
|
-
|
|
542
|
-
|
|
634
|
+
onClick: () => select(action.onSelect),
|
|
635
|
+
children: action.label
|
|
636
|
+
},
|
|
637
|
+
action.id
|
|
638
|
+
)
|
|
639
|
+
)
|
|
543
640
|
}
|
|
544
641
|
)
|
|
545
642
|
}
|
|
546
643
|
);
|
|
547
644
|
}
|
|
548
|
-
var MessageRow =
|
|
645
|
+
var MessageRow = React2.memo(function MessageRow2({
|
|
549
646
|
message,
|
|
550
647
|
participant,
|
|
551
648
|
isSelf,
|
|
@@ -553,21 +650,22 @@ var MessageRow = React4.memo(function MessageRow2({
|
|
|
553
650
|
linkBuilder,
|
|
554
651
|
onReferenceClick,
|
|
555
652
|
editable,
|
|
556
|
-
onMessageEdited
|
|
653
|
+
onMessageEdited,
|
|
654
|
+
defaultCopyFormat = "rich"
|
|
557
655
|
}) {
|
|
558
656
|
const streaming = message.status === "streaming";
|
|
559
657
|
const hasBody = !!message.text || (message.content?.length ?? 0) > 0;
|
|
560
|
-
const [isEditing, setIsEditing] =
|
|
561
|
-
const [draft, setDraft] =
|
|
562
|
-
const editRef =
|
|
563
|
-
const bubbleRef =
|
|
564
|
-
const autosize =
|
|
658
|
+
const [isEditing, setIsEditing] = React2.useState(false);
|
|
659
|
+
const [draft, setDraft] = React2.useState(message.text ?? "");
|
|
660
|
+
const editRef = React2.useRef(null);
|
|
661
|
+
const bubbleRef = React2.useRef(null);
|
|
662
|
+
const autosize = React2.useCallback(() => {
|
|
565
663
|
const el = editRef.current;
|
|
566
664
|
if (!el) return;
|
|
567
665
|
el.style.height = "auto";
|
|
568
666
|
el.style.height = `${el.scrollHeight}px`;
|
|
569
667
|
}, []);
|
|
570
|
-
|
|
668
|
+
React2.useEffect(() => {
|
|
571
669
|
if (!isEditing) return;
|
|
572
670
|
const el = editRef.current;
|
|
573
671
|
if (!el) return;
|
|
@@ -575,6 +673,37 @@ var MessageRow = React4.memo(function MessageRow2({
|
|
|
575
673
|
el.setSelectionRange(el.value.length, el.value.length);
|
|
576
674
|
autosize();
|
|
577
675
|
}, [isEditing, autosize]);
|
|
676
|
+
const canEdit = !!editable && isSelf && !streaming && typeof message.text === "string" && !message.content?.length;
|
|
677
|
+
const markdownSource = typeof message.text === "string" && message.text ? message.text : message.content?.map((block) => {
|
|
678
|
+
if (block.type === "code" && block.text) {
|
|
679
|
+
return `\`\`\`${block.language ?? ""}
|
|
680
|
+
${block.text}
|
|
681
|
+
\`\`\``;
|
|
682
|
+
}
|
|
683
|
+
if ((block.type === "text" || block.type === "thinking") && block.text) {
|
|
684
|
+
return block.text;
|
|
685
|
+
}
|
|
686
|
+
return "";
|
|
687
|
+
}).filter(Boolean).join("\n\n") ?? "";
|
|
688
|
+
const canCopy = !isEditing && (!!message.content?.length || typeof message.text === "string" && message.text.length > 0);
|
|
689
|
+
const hasActions = canCopy || canEdit && !isEditing;
|
|
690
|
+
const copy = useMessageCopy({
|
|
691
|
+
markdown: markdownSource,
|
|
692
|
+
getHtml: () => bubbleRef.current?.innerHTML ?? "",
|
|
693
|
+
getText: () => bubbleRef.current?.textContent ?? "",
|
|
694
|
+
defaultFormat: defaultCopyFormat
|
|
695
|
+
});
|
|
696
|
+
const actionsBarRef = React2.useRef(null);
|
|
697
|
+
const [footerVisible, setFooterVisible] = React2.useState(true);
|
|
698
|
+
React2.useEffect(() => {
|
|
699
|
+
const el = actionsBarRef.current;
|
|
700
|
+
if (!el || typeof globalThis.IntersectionObserver === "undefined") return;
|
|
701
|
+
const observer = new globalThis.IntersectionObserver(([entry]) => {
|
|
702
|
+
setFooterVisible(entry?.isIntersecting ?? false);
|
|
703
|
+
});
|
|
704
|
+
observer.observe(el);
|
|
705
|
+
return () => observer.disconnect();
|
|
706
|
+
}, [hasActions]);
|
|
578
707
|
if (message.type === "system") {
|
|
579
708
|
return /* @__PURE__ */ jsx(
|
|
580
709
|
"div",
|
|
@@ -606,7 +735,6 @@ var MessageRow = React4.memo(function MessageRow2({
|
|
|
606
735
|
const accent = participant?.color;
|
|
607
736
|
const accentTextColor = accessibleAccentTextColor(accent);
|
|
608
737
|
const authorName = participant?.name ?? "Unknown";
|
|
609
|
-
const canEdit = !!editable && isSelf && !streaming && typeof message.text === "string" && !message.content?.length;
|
|
610
738
|
const startEdit = () => {
|
|
611
739
|
setDraft(message.text ?? "");
|
|
612
740
|
setIsEditing(true);
|
|
@@ -650,18 +778,46 @@ var MessageRow = React4.memo(function MessageRow2({
|
|
|
650
778
|
requestAnimationFrame(autosize);
|
|
651
779
|
});
|
|
652
780
|
};
|
|
653
|
-
const
|
|
654
|
-
|
|
655
|
-
|
|
656
|
-
|
|
657
|
-
|
|
658
|
-
|
|
659
|
-
|
|
660
|
-
|
|
661
|
-
|
|
662
|
-
|
|
663
|
-
|
|
664
|
-
|
|
781
|
+
const actions = [
|
|
782
|
+
...canCopy ? [
|
|
783
|
+
{
|
|
784
|
+
id: "copy",
|
|
785
|
+
label: "Copy message",
|
|
786
|
+
title: "Copy message (\u2318/Ctrl-click: default format)",
|
|
787
|
+
icon: copy.copied ? /* @__PURE__ */ jsx(Check, { size: 14, "aria-hidden": "true" }) : /* @__PURE__ */ jsx(Clipboard, { size: 14, "aria-hidden": "true" }),
|
|
788
|
+
onSelect: copy.copyDefault,
|
|
789
|
+
submenu: {
|
|
790
|
+
label: "Copy as",
|
|
791
|
+
items: [
|
|
792
|
+
{
|
|
793
|
+
id: "copy-rich",
|
|
794
|
+
label: "Copy as rich text",
|
|
795
|
+
description: "Rich text + Markdown",
|
|
796
|
+
onSelect: copy.copyRich
|
|
797
|
+
},
|
|
798
|
+
{
|
|
799
|
+
id: "copy-markdown",
|
|
800
|
+
label: "Copy as Markdown",
|
|
801
|
+
onSelect: copy.copyMarkdown
|
|
802
|
+
},
|
|
803
|
+
{
|
|
804
|
+
id: "copy-plain",
|
|
805
|
+
label: "Copy as plain text",
|
|
806
|
+
onSelect: copy.copyPlain
|
|
807
|
+
}
|
|
808
|
+
]
|
|
809
|
+
}
|
|
810
|
+
}
|
|
811
|
+
] : [],
|
|
812
|
+
...canEdit && !isEditing ? [
|
|
813
|
+
{
|
|
814
|
+
id: "edit",
|
|
815
|
+
label: "Edit message",
|
|
816
|
+
icon: /* @__PURE__ */ jsx(Pencil, { size: 14, "aria-hidden": "true" }),
|
|
817
|
+
onSelect: startEdit
|
|
818
|
+
}
|
|
819
|
+
] : []
|
|
820
|
+
];
|
|
665
821
|
return /* @__PURE__ */ jsxs(
|
|
666
822
|
"div",
|
|
667
823
|
{
|
|
@@ -699,17 +855,6 @@ ${block.text}
|
|
|
699
855
|
title: `Edited ${formatTime(message.editedAt)}`,
|
|
700
856
|
children: "(edited)"
|
|
701
857
|
}
|
|
702
|
-
),
|
|
703
|
-
canEdit && !isEditing && /* @__PURE__ */ jsx(
|
|
704
|
-
"button",
|
|
705
|
-
{
|
|
706
|
-
type: "button",
|
|
707
|
-
"data-slot": "superchat-edit-button",
|
|
708
|
-
onClick: startEdit,
|
|
709
|
-
"aria-label": "Edit message",
|
|
710
|
-
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",
|
|
711
|
-
children: /* @__PURE__ */ jsx(Pencil, { size: 14, "aria-hidden": "true" })
|
|
712
|
-
}
|
|
713
858
|
)
|
|
714
859
|
]
|
|
715
860
|
}
|
|
@@ -722,13 +867,12 @@ ${block.text}
|
|
|
722
867
|
isSelf ? "flex-row-reverse" : "flex-row"
|
|
723
868
|
),
|
|
724
869
|
children: [
|
|
725
|
-
|
|
726
|
-
|
|
870
|
+
hasActions && /* @__PURE__ */ jsx(
|
|
871
|
+
MessageOverflowMenu,
|
|
727
872
|
{
|
|
728
873
|
isSelf,
|
|
729
|
-
|
|
730
|
-
|
|
731
|
-
getText: () => bubbleRef.current?.textContent ?? ""
|
|
874
|
+
actions,
|
|
875
|
+
footerVisible
|
|
732
876
|
}
|
|
733
877
|
),
|
|
734
878
|
/* @__PURE__ */ jsx(
|
|
@@ -841,6 +985,14 @@ ${block.text}
|
|
|
841
985
|
)
|
|
842
986
|
]
|
|
843
987
|
}
|
|
988
|
+
),
|
|
989
|
+
hasActions && /* @__PURE__ */ jsx(
|
|
990
|
+
MessageActionsBar,
|
|
991
|
+
{
|
|
992
|
+
ref: actionsBarRef,
|
|
993
|
+
actions,
|
|
994
|
+
isSelf
|
|
995
|
+
}
|
|
844
996
|
)
|
|
845
997
|
] })
|
|
846
998
|
]
|
|
@@ -868,11 +1020,12 @@ function VirtualThread({
|
|
|
868
1020
|
onReferenceClick,
|
|
869
1021
|
editable,
|
|
870
1022
|
onMessageEdited,
|
|
1023
|
+
defaultCopyFormat,
|
|
871
1024
|
order,
|
|
872
1025
|
conversationId,
|
|
873
1026
|
containerProps
|
|
874
1027
|
}) {
|
|
875
|
-
const parentRef =
|
|
1028
|
+
const parentRef = React2.useRef(null);
|
|
876
1029
|
const virtualizer = useVirtualizer({
|
|
877
1030
|
count: items.length,
|
|
878
1031
|
getScrollElement: () => parentRef.current,
|
|
@@ -882,7 +1035,7 @@ function VirtualThread({
|
|
|
882
1035
|
getItemKey: (index) => items[index]?.id ?? index
|
|
883
1036
|
});
|
|
884
1037
|
const count = items.length;
|
|
885
|
-
|
|
1038
|
+
React2.useEffect(() => {
|
|
886
1039
|
if (count === 0) return;
|
|
887
1040
|
if (order === "desc") {
|
|
888
1041
|
virtualizer.scrollToIndex(0, { align: "start" });
|
|
@@ -924,7 +1077,8 @@ function VirtualThread({
|
|
|
924
1077
|
linkBuilder,
|
|
925
1078
|
onReferenceClick,
|
|
926
1079
|
editable,
|
|
927
|
-
onMessageEdited
|
|
1080
|
+
onMessageEdited,
|
|
1081
|
+
defaultCopyFormat
|
|
928
1082
|
}
|
|
929
1083
|
) })
|
|
930
1084
|
},
|
|
@@ -945,6 +1099,7 @@ function SuperChat({
|
|
|
945
1099
|
order = "asc",
|
|
946
1100
|
virtualized = false,
|
|
947
1101
|
linkBuilder,
|
|
1102
|
+
defaultCopyFormat,
|
|
948
1103
|
className,
|
|
949
1104
|
onMessageSent,
|
|
950
1105
|
onMessageEdited,
|
|
@@ -952,35 +1107,35 @@ function SuperChat({
|
|
|
952
1107
|
onReferenceClick,
|
|
953
1108
|
onBack
|
|
954
1109
|
}) {
|
|
955
|
-
const headingId =
|
|
956
|
-
const renderText =
|
|
1110
|
+
const headingId = React2.useId();
|
|
1111
|
+
const renderText = React2.useMemo(
|
|
957
1112
|
() => renderTextContent ?? createMarkdownRenderer({
|
|
958
1113
|
plugins: renderPlugins,
|
|
959
1114
|
trusted: trustedContent
|
|
960
1115
|
}),
|
|
961
1116
|
[renderTextContent, renderPlugins, trustedContent]
|
|
962
1117
|
);
|
|
963
|
-
const threadRef =
|
|
964
|
-
|
|
1118
|
+
const threadRef = React2.useRef(null);
|
|
1119
|
+
React2.useEffect(() => {
|
|
965
1120
|
if (virtualized) return;
|
|
966
1121
|
const el = threadRef.current;
|
|
967
1122
|
if (!el) return;
|
|
968
1123
|
el.scrollTop = order === "desc" ? 0 : el.scrollHeight;
|
|
969
1124
|
}, [conversation.thread.length, conversation.id, order, virtualized]);
|
|
970
|
-
const participantById =
|
|
1125
|
+
const participantById = React2.useMemo(() => {
|
|
971
1126
|
const map = /* @__PURE__ */ new Map();
|
|
972
1127
|
conversation.participants.forEach((p) => map.set(p.id, p));
|
|
973
1128
|
return map;
|
|
974
1129
|
}, [conversation]);
|
|
975
|
-
const orderedThread =
|
|
1130
|
+
const orderedThread = React2.useMemo(() => {
|
|
976
1131
|
const sorted = [...conversation.thread].sort(byTime);
|
|
977
1132
|
return order === "desc" ? sorted.reverse() : sorted;
|
|
978
1133
|
}, [conversation, order]);
|
|
979
|
-
const onMessageEditedRef =
|
|
1134
|
+
const onMessageEditedRef = React2.useRef(onMessageEdited);
|
|
980
1135
|
onMessageEditedRef.current = onMessageEdited;
|
|
981
|
-
const conversationRef =
|
|
1136
|
+
const conversationRef = React2.useRef(conversation);
|
|
982
1137
|
conversationRef.current = conversation;
|
|
983
|
-
const handleMessageEdited =
|
|
1138
|
+
const handleMessageEdited = React2.useCallback(
|
|
984
1139
|
(messageId, text) => {
|
|
985
1140
|
onMessageEditedRef.current?.(messageId, text, {
|
|
986
1141
|
conversation: conversationRef.current
|
|
@@ -989,7 +1144,7 @@ function SuperChat({
|
|
|
989
1144
|
[]
|
|
990
1145
|
);
|
|
991
1146
|
const editable = !readOnly && !!onMessageEdited;
|
|
992
|
-
const mentionOptions =
|
|
1147
|
+
const mentionOptions = React2.useMemo(
|
|
993
1148
|
() => conversation.participants.filter((p) => p.kind !== "system").map((p) => ({
|
|
994
1149
|
id: p.id,
|
|
995
1150
|
label: p.name,
|
|
@@ -999,11 +1154,11 @@ function SuperChat({
|
|
|
999
1154
|
})),
|
|
1000
1155
|
[conversation.participants]
|
|
1001
1156
|
);
|
|
1002
|
-
const composerAccept =
|
|
1157
|
+
const composerAccept = React2.useMemo(
|
|
1003
1158
|
() => acceptTokensFor(acceptedFileTypes),
|
|
1004
1159
|
[acceptedFileTypes]
|
|
1005
1160
|
);
|
|
1006
|
-
const handleComposerSend =
|
|
1161
|
+
const handleComposerSend = React2.useCallback(
|
|
1007
1162
|
async (message) => {
|
|
1008
1163
|
const text = message.content;
|
|
1009
1164
|
const mentions = detectMentions(text, conversation.participants);
|
|
@@ -1101,6 +1256,7 @@ function SuperChat({
|
|
|
1101
1256
|
onReferenceClick,
|
|
1102
1257
|
editable,
|
|
1103
1258
|
onMessageEdited: handleMessageEdited,
|
|
1259
|
+
defaultCopyFormat,
|
|
1104
1260
|
order,
|
|
1105
1261
|
conversationId: conversation.id,
|
|
1106
1262
|
containerProps: {
|
|
@@ -1133,7 +1289,8 @@ function SuperChat({
|
|
|
1133
1289
|
linkBuilder,
|
|
1134
1290
|
onReferenceClick,
|
|
1135
1291
|
editable,
|
|
1136
|
-
onMessageEdited: handleMessageEdited
|
|
1292
|
+
onMessageEdited: handleMessageEdited,
|
|
1293
|
+
defaultCopyFormat
|
|
1137
1294
|
},
|
|
1138
1295
|
m.id
|
|
1139
1296
|
))
|
|
@@ -1164,12 +1321,12 @@ function SuperChatConversations({
|
|
|
1164
1321
|
onConversationOpened,
|
|
1165
1322
|
onNewConversation
|
|
1166
1323
|
}) {
|
|
1167
|
-
const [internalActive, setInternalActive] =
|
|
1324
|
+
const [internalActive, setInternalActive] = React2.useState(
|
|
1168
1325
|
defaultActiveConversationId ?? conversations[0]?.id
|
|
1169
1326
|
);
|
|
1170
1327
|
const requestedId = activeConversationId ?? internalActive;
|
|
1171
1328
|
const activeId = conversations.some((c) => c.id === requestedId) ? requestedId : conversations[0]?.id;
|
|
1172
|
-
const sortedConversations =
|
|
1329
|
+
const sortedConversations = React2.useMemo(
|
|
1173
1330
|
() => [...conversations].sort((a, b) => lastActivityOf(b) - lastActivityOf(a)),
|
|
1174
1331
|
[conversations]
|
|
1175
1332
|
);
|
|
@@ -1249,6 +1406,7 @@ function SuperChatInbox({
|
|
|
1249
1406
|
virtualized,
|
|
1250
1407
|
showSidebar = true,
|
|
1251
1408
|
linkBuilder,
|
|
1409
|
+
defaultCopyFormat,
|
|
1252
1410
|
className,
|
|
1253
1411
|
onMessageSent,
|
|
1254
1412
|
onMessageEdited,
|
|
@@ -1257,13 +1415,13 @@ function SuperChatInbox({
|
|
|
1257
1415
|
onNewConversation,
|
|
1258
1416
|
onReferenceClick
|
|
1259
1417
|
}) {
|
|
1260
|
-
const [internalActive, setInternalActive] =
|
|
1418
|
+
const [internalActive, setInternalActive] = React2.useState(
|
|
1261
1419
|
defaultActiveConversationId ?? conversations[0]?.id
|
|
1262
1420
|
);
|
|
1263
1421
|
const requestedId = activeConversationId ?? internalActive;
|
|
1264
1422
|
const active = conversations.find((c) => c.id === requestedId) ?? conversations[0];
|
|
1265
1423
|
const activeId = active?.id;
|
|
1266
|
-
const [mobileView, setMobileView] =
|
|
1424
|
+
const [mobileView, setMobileView] = React2.useState("list");
|
|
1267
1425
|
const handleOpen = (c) => {
|
|
1268
1426
|
if (activeConversationId === void 0) setInternalActive(c.id);
|
|
1269
1427
|
setMobileView("chat");
|
|
@@ -1306,6 +1464,7 @@ function SuperChatInbox({
|
|
|
1306
1464
|
order,
|
|
1307
1465
|
virtualized,
|
|
1308
1466
|
linkBuilder,
|
|
1467
|
+
defaultCopyFormat,
|
|
1309
1468
|
onMessageSent,
|
|
1310
1469
|
onMessageEdited,
|
|
1311
1470
|
onConversationClosed,
|