@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
|
@@ -2,18 +2,19 @@
|
|
|
2
2
|
|
|
3
3
|
var chunkJFLC7SHM_cjs = require('../../chunk-JFLC7SHM.cjs');
|
|
4
4
|
var chunkXS35KPBZ_cjs = require('../../chunk-XS35KPBZ.cjs');
|
|
5
|
-
var
|
|
6
|
-
var
|
|
5
|
+
var chunkG52YRAJC_cjs = require('../../chunk-G52YRAJC.cjs');
|
|
6
|
+
var chunkQOJ4V7YX_cjs = require('../../chunk-QOJ4V7YX.cjs');
|
|
7
|
+
require('../../chunk-VBWRH4UW.cjs');
|
|
7
8
|
require('../../chunk-ZZJ4ZVYR.cjs');
|
|
8
9
|
var chunkU3JU6BI5_cjs = require('../../chunk-U3JU6BI5.cjs');
|
|
9
|
-
require('../../chunk-
|
|
10
|
-
require('../../chunk-
|
|
10
|
+
require('../../chunk-I44YNYI6.cjs');
|
|
11
|
+
require('../../chunk-Z5S5JEJD.cjs');
|
|
11
12
|
var chunkYVL3XATO_cjs = require('../../chunk-YVL3XATO.cjs');
|
|
12
13
|
require('../../chunk-FHY3K6PL.cjs');
|
|
13
14
|
require('../../chunk-FSGEDDF2.cjs');
|
|
14
|
-
require('../../chunk-
|
|
15
|
+
require('../../chunk-AOHJILLU.cjs');
|
|
15
16
|
var chunkS5RVSXDV_cjs = require('../../chunk-S5RVSXDV.cjs');
|
|
16
|
-
var
|
|
17
|
+
var React2 = require('react');
|
|
17
18
|
var Markdown = require('react-markdown');
|
|
18
19
|
var remarkGfm = require('remark-gfm');
|
|
19
20
|
var rehypeSanitize = require('rehype-sanitize');
|
|
@@ -42,7 +43,7 @@ function _interopNamespace(e) {
|
|
|
42
43
|
return Object.freeze(n);
|
|
43
44
|
}
|
|
44
45
|
|
|
45
|
-
var
|
|
46
|
+
var React2__namespace = /*#__PURE__*/_interopNamespace(React2);
|
|
46
47
|
var Markdown__default = /*#__PURE__*/_interopDefault(Markdown);
|
|
47
48
|
var remarkGfm__default = /*#__PURE__*/_interopDefault(remarkGfm);
|
|
48
49
|
var rehypeSanitize__default = /*#__PURE__*/_interopDefault(rehypeSanitize);
|
|
@@ -291,7 +292,7 @@ var transformUrl = (url, key, node) => {
|
|
|
291
292
|
}
|
|
292
293
|
return Markdown.defaultUrlTransform(url);
|
|
293
294
|
};
|
|
294
|
-
var MarkdownContent =
|
|
295
|
+
var MarkdownContent = React2__namespace.memo(function MarkdownContent2({
|
|
295
296
|
text,
|
|
296
297
|
messageId,
|
|
297
298
|
streaming,
|
|
@@ -486,13 +487,19 @@ function filesToComposerAttachments(files) {
|
|
|
486
487
|
)
|
|
487
488
|
);
|
|
488
489
|
}
|
|
489
|
-
|
|
490
|
-
|
|
491
|
-
|
|
492
|
-
|
|
490
|
+
var actionRevealClass = "opacity-0 transition-opacity group-focus-within:opacity-100 group-hover:opacity-100 focus-visible:opacity-100 [@media(pointer:coarse)]:opacity-100";
|
|
491
|
+
var actionButtonClass = "rounded p-1 text-neutral-400 hover:text-neutral-600 dark:hover:text-neutral-200";
|
|
492
|
+
function useMessageCopy({
|
|
493
|
+
markdown,
|
|
494
|
+
getHtml,
|
|
495
|
+
getText,
|
|
496
|
+
defaultFormat
|
|
497
|
+
}) {
|
|
498
|
+
const [copied, setCopied] = React2__namespace.useState(false);
|
|
499
|
+
const copiedTimer = React2__namespace.useRef(
|
|
493
500
|
void 0
|
|
494
501
|
);
|
|
495
|
-
|
|
502
|
+
React2__namespace.useEffect(() => () => window.clearTimeout(copiedTimer.current), []);
|
|
496
503
|
const flash = () => {
|
|
497
504
|
setCopied(true);
|
|
498
505
|
window.clearTimeout(copiedTimer.current);
|
|
@@ -523,21 +530,111 @@ function CopyMenu({ isSelf, markdown, getHtml, getText }) {
|
|
|
523
530
|
}
|
|
524
531
|
};
|
|
525
532
|
const run = (fn) => {
|
|
526
|
-
setOpen(false);
|
|
527
533
|
void fn().then(flash, () => {
|
|
528
534
|
});
|
|
529
535
|
};
|
|
536
|
+
const copyRich = () => run(writeBoth);
|
|
537
|
+
const copyMarkdown = () => run(() => writeText(markdown || getText()));
|
|
538
|
+
const copyPlain = () => run(() => writeText(getText()));
|
|
539
|
+
const copyDefault = defaultFormat === "markdown" ? copyMarkdown : defaultFormat === "plain" ? copyPlain : copyRich;
|
|
540
|
+
return { copied, copyDefault, copyRich, copyMarkdown, copyPlain };
|
|
541
|
+
}
|
|
542
|
+
function ActionMenuItem({
|
|
543
|
+
item,
|
|
544
|
+
onSelect
|
|
545
|
+
}) {
|
|
546
|
+
return /* @__PURE__ */ jsxRuntime.jsx(chunkQOJ4V7YX_cjs.DropdownItem, { onClick: () => onSelect(item.onSelect), children: item.description ? /* @__PURE__ */ jsxRuntime.jsxs("span", { className: "flex flex-col items-start", children: [
|
|
547
|
+
/* @__PURE__ */ jsxRuntime.jsx("span", { children: item.label }),
|
|
548
|
+
/* @__PURE__ */ jsxRuntime.jsx("span", { className: "text-[10px] font-normal text-neutral-400", children: item.description })
|
|
549
|
+
] }) : item.label });
|
|
550
|
+
}
|
|
551
|
+
function FooterActionButton({
|
|
552
|
+
action,
|
|
553
|
+
isSelf
|
|
554
|
+
}) {
|
|
555
|
+
const [open, setOpen] = React2__namespace.useState(false);
|
|
556
|
+
const onClickCapture = action.submenu ? (e) => {
|
|
557
|
+
if (e.metaKey || e.ctrlKey) {
|
|
558
|
+
e.preventDefault();
|
|
559
|
+
e.stopPropagation();
|
|
560
|
+
action.onSelect();
|
|
561
|
+
}
|
|
562
|
+
} : void 0;
|
|
563
|
+
const button = /* @__PURE__ */ jsxRuntime.jsx(
|
|
564
|
+
"button",
|
|
565
|
+
{
|
|
566
|
+
type: "button",
|
|
567
|
+
"data-slot": `superchat-action-${action.id}`,
|
|
568
|
+
"aria-label": action.label,
|
|
569
|
+
title: action.title ?? action.label,
|
|
570
|
+
onClick: action.submenu ? void 0 : action.onSelect,
|
|
571
|
+
onClickCapture,
|
|
572
|
+
className: actionButtonClass,
|
|
573
|
+
children: action.icon
|
|
574
|
+
}
|
|
575
|
+
);
|
|
576
|
+
if (!action.submenu) return button;
|
|
577
|
+
return /* @__PURE__ */ jsxRuntime.jsx(
|
|
578
|
+
chunkQOJ4V7YX_cjs.Dropdown,
|
|
579
|
+
{
|
|
580
|
+
open,
|
|
581
|
+
onOpenChange: setOpen,
|
|
582
|
+
placement: isSelf ? "top-end" : "top-start",
|
|
583
|
+
trigger: button,
|
|
584
|
+
children: action.submenu.items.map((item) => /* @__PURE__ */ jsxRuntime.jsx(
|
|
585
|
+
ActionMenuItem,
|
|
586
|
+
{
|
|
587
|
+
item,
|
|
588
|
+
onSelect: (fn) => {
|
|
589
|
+
setOpen(false);
|
|
590
|
+
fn();
|
|
591
|
+
}
|
|
592
|
+
},
|
|
593
|
+
item.id
|
|
594
|
+
))
|
|
595
|
+
}
|
|
596
|
+
);
|
|
597
|
+
}
|
|
598
|
+
var MessageActionsBar = React2__namespace.forwardRef(function MessageActionsBar2({ actions, isSelf }, ref) {
|
|
530
599
|
return /* @__PURE__ */ jsxRuntime.jsx(
|
|
531
600
|
"div",
|
|
532
601
|
{
|
|
602
|
+
ref,
|
|
603
|
+
"data-slot": "superchat-message-actions",
|
|
533
604
|
className: chunkS5RVSXDV_cjs.cn(
|
|
534
|
-
"
|
|
605
|
+
"flex items-center gap-0.5",
|
|
606
|
+
isSelf && "justify-end",
|
|
607
|
+
actionRevealClass
|
|
608
|
+
),
|
|
609
|
+
children: actions.map((action) => /* @__PURE__ */ jsxRuntime.jsx(FooterActionButton, { action, isSelf }, action.id))
|
|
610
|
+
}
|
|
611
|
+
);
|
|
612
|
+
});
|
|
613
|
+
function MessageOverflowMenu({
|
|
614
|
+
isSelf,
|
|
615
|
+
actions,
|
|
616
|
+
footerVisible
|
|
617
|
+
}) {
|
|
618
|
+
const [open, setOpen] = React2__namespace.useState(false);
|
|
619
|
+
const select = (fn) => {
|
|
620
|
+
setOpen(false);
|
|
621
|
+
fn();
|
|
622
|
+
};
|
|
623
|
+
return /* @__PURE__ */ jsxRuntime.jsx(
|
|
624
|
+
"div",
|
|
625
|
+
{
|
|
626
|
+
className: chunkS5RVSXDV_cjs.cn(
|
|
627
|
+
"sticky bottom-2 shrink-0 self-end transition-opacity",
|
|
535
628
|
// Rich content (e.g. NITRO tables) layers internals up to z-50, so the
|
|
536
629
|
// open menu's stacking context must clear that.
|
|
537
|
-
open ? "z-[60]" : "z-10"
|
|
630
|
+
open ? "z-[60]" : "z-10",
|
|
631
|
+
// Hand off to the footer bar when it's visible. `invisible` (not
|
|
632
|
+
// just opacity) drops the hidden button from the tab order so
|
|
633
|
+
// keyboard users can't focus an unseen control.
|
|
634
|
+
footerVisible && !open && "pointer-events-none invisible opacity-0"
|
|
538
635
|
),
|
|
539
|
-
children: /* @__PURE__ */ jsxRuntime.
|
|
540
|
-
|
|
636
|
+
children: /* @__PURE__ */ jsxRuntime.jsx(
|
|
637
|
+
chunkQOJ4V7YX_cjs.Dropdown,
|
|
541
638
|
{
|
|
542
639
|
open,
|
|
543
640
|
onOpenChange: setOpen,
|
|
@@ -546,32 +643,32 @@ function CopyMenu({ isSelf, markdown, getHtml, getText }) {
|
|
|
546
643
|
"button",
|
|
547
644
|
{
|
|
548
645
|
type: "button",
|
|
549
|
-
"data-slot": "superchat-
|
|
550
|
-
"aria-label": "
|
|
551
|
-
className:
|
|
552
|
-
children:
|
|
646
|
+
"data-slot": "superchat-overflow-button",
|
|
647
|
+
"aria-label": "Message actions",
|
|
648
|
+
className: chunkS5RVSXDV_cjs.cn(actionButtonClass, actionRevealClass),
|
|
649
|
+
children: /* @__PURE__ */ jsxRuntime.jsx(lucideReact.Ellipsis, { size: 14, "aria-hidden": "true" })
|
|
553
650
|
}
|
|
554
651
|
),
|
|
555
|
-
children:
|
|
556
|
-
|
|
557
|
-
|
|
558
|
-
|
|
559
|
-
|
|
560
|
-
/* @__PURE__ */ jsxRuntime.jsx(
|
|
561
|
-
|
|
652
|
+
children: actions.map(
|
|
653
|
+
(action) => action.submenu ? (
|
|
654
|
+
// Actions with variants collapse to just their submenu — a
|
|
655
|
+
// top-level default item would duplicate the flyout's options.
|
|
656
|
+
/* @__PURE__ */ jsxRuntime.jsx(chunkQOJ4V7YX_cjs.DropdownSubmenu, { label: action.submenu.label, children: action.submenu.items.map((item) => /* @__PURE__ */ jsxRuntime.jsx(ActionMenuItem, { item, onSelect: select }, item.id)) }, action.id)
|
|
657
|
+
) : /* @__PURE__ */ jsxRuntime.jsx(
|
|
658
|
+
chunkQOJ4V7YX_cjs.DropdownItem,
|
|
562
659
|
{
|
|
563
|
-
onClick: () =>
|
|
564
|
-
children:
|
|
565
|
-
}
|
|
566
|
-
|
|
567
|
-
|
|
568
|
-
|
|
660
|
+
onClick: () => select(action.onSelect),
|
|
661
|
+
children: action.label
|
|
662
|
+
},
|
|
663
|
+
action.id
|
|
664
|
+
)
|
|
665
|
+
)
|
|
569
666
|
}
|
|
570
667
|
)
|
|
571
668
|
}
|
|
572
669
|
);
|
|
573
670
|
}
|
|
574
|
-
var MessageRow =
|
|
671
|
+
var MessageRow = React2__namespace.memo(function MessageRow2({
|
|
575
672
|
message,
|
|
576
673
|
participant,
|
|
577
674
|
isSelf,
|
|
@@ -579,21 +676,22 @@ var MessageRow = React4__namespace.memo(function MessageRow2({
|
|
|
579
676
|
linkBuilder,
|
|
580
677
|
onReferenceClick,
|
|
581
678
|
editable,
|
|
582
|
-
onMessageEdited
|
|
679
|
+
onMessageEdited,
|
|
680
|
+
defaultCopyFormat = "rich"
|
|
583
681
|
}) {
|
|
584
682
|
const streaming = message.status === "streaming";
|
|
585
683
|
const hasBody = !!message.text || (message.content?.length ?? 0) > 0;
|
|
586
|
-
const [isEditing, setIsEditing] =
|
|
587
|
-
const [draft, setDraft] =
|
|
588
|
-
const editRef =
|
|
589
|
-
const bubbleRef =
|
|
590
|
-
const autosize =
|
|
684
|
+
const [isEditing, setIsEditing] = React2__namespace.useState(false);
|
|
685
|
+
const [draft, setDraft] = React2__namespace.useState(message.text ?? "");
|
|
686
|
+
const editRef = React2__namespace.useRef(null);
|
|
687
|
+
const bubbleRef = React2__namespace.useRef(null);
|
|
688
|
+
const autosize = React2__namespace.useCallback(() => {
|
|
591
689
|
const el = editRef.current;
|
|
592
690
|
if (!el) return;
|
|
593
691
|
el.style.height = "auto";
|
|
594
692
|
el.style.height = `${el.scrollHeight}px`;
|
|
595
693
|
}, []);
|
|
596
|
-
|
|
694
|
+
React2__namespace.useEffect(() => {
|
|
597
695
|
if (!isEditing) return;
|
|
598
696
|
const el = editRef.current;
|
|
599
697
|
if (!el) return;
|
|
@@ -601,6 +699,37 @@ var MessageRow = React4__namespace.memo(function MessageRow2({
|
|
|
601
699
|
el.setSelectionRange(el.value.length, el.value.length);
|
|
602
700
|
autosize();
|
|
603
701
|
}, [isEditing, autosize]);
|
|
702
|
+
const canEdit = !!editable && isSelf && !streaming && typeof message.text === "string" && !message.content?.length;
|
|
703
|
+
const markdownSource = typeof message.text === "string" && message.text ? message.text : message.content?.map((block) => {
|
|
704
|
+
if (block.type === "code" && block.text) {
|
|
705
|
+
return `\`\`\`${block.language ?? ""}
|
|
706
|
+
${block.text}
|
|
707
|
+
\`\`\``;
|
|
708
|
+
}
|
|
709
|
+
if ((block.type === "text" || block.type === "thinking") && block.text) {
|
|
710
|
+
return block.text;
|
|
711
|
+
}
|
|
712
|
+
return "";
|
|
713
|
+
}).filter(Boolean).join("\n\n") ?? "";
|
|
714
|
+
const canCopy = !isEditing && (!!message.content?.length || typeof message.text === "string" && message.text.length > 0);
|
|
715
|
+
const hasActions = canCopy || canEdit && !isEditing;
|
|
716
|
+
const copy = useMessageCopy({
|
|
717
|
+
markdown: markdownSource,
|
|
718
|
+
getHtml: () => bubbleRef.current?.innerHTML ?? "",
|
|
719
|
+
getText: () => bubbleRef.current?.textContent ?? "",
|
|
720
|
+
defaultFormat: defaultCopyFormat
|
|
721
|
+
});
|
|
722
|
+
const actionsBarRef = React2__namespace.useRef(null);
|
|
723
|
+
const [footerVisible, setFooterVisible] = React2__namespace.useState(true);
|
|
724
|
+
React2__namespace.useEffect(() => {
|
|
725
|
+
const el = actionsBarRef.current;
|
|
726
|
+
if (!el || typeof globalThis.IntersectionObserver === "undefined") return;
|
|
727
|
+
const observer = new globalThis.IntersectionObserver(([entry]) => {
|
|
728
|
+
setFooterVisible(entry?.isIntersecting ?? false);
|
|
729
|
+
});
|
|
730
|
+
observer.observe(el);
|
|
731
|
+
return () => observer.disconnect();
|
|
732
|
+
}, [hasActions]);
|
|
604
733
|
if (message.type === "system") {
|
|
605
734
|
return /* @__PURE__ */ jsxRuntime.jsx(
|
|
606
735
|
"div",
|
|
@@ -632,7 +761,6 @@ var MessageRow = React4__namespace.memo(function MessageRow2({
|
|
|
632
761
|
const accent = participant?.color;
|
|
633
762
|
const accentTextColor = accessibleAccentTextColor(accent);
|
|
634
763
|
const authorName = participant?.name ?? "Unknown";
|
|
635
|
-
const canEdit = !!editable && isSelf && !streaming && typeof message.text === "string" && !message.content?.length;
|
|
636
764
|
const startEdit = () => {
|
|
637
765
|
setDraft(message.text ?? "");
|
|
638
766
|
setIsEditing(true);
|
|
@@ -676,18 +804,46 @@ var MessageRow = React4__namespace.memo(function MessageRow2({
|
|
|
676
804
|
requestAnimationFrame(autosize);
|
|
677
805
|
});
|
|
678
806
|
};
|
|
679
|
-
const
|
|
680
|
-
|
|
681
|
-
|
|
682
|
-
|
|
683
|
-
|
|
684
|
-
|
|
685
|
-
|
|
686
|
-
|
|
687
|
-
|
|
688
|
-
|
|
689
|
-
|
|
690
|
-
|
|
807
|
+
const actions = [
|
|
808
|
+
...canCopy ? [
|
|
809
|
+
{
|
|
810
|
+
id: "copy",
|
|
811
|
+
label: "Copy message",
|
|
812
|
+
title: "Copy message (\u2318/Ctrl-click: default format)",
|
|
813
|
+
icon: copy.copied ? /* @__PURE__ */ jsxRuntime.jsx(lucideReact.Check, { size: 14, "aria-hidden": "true" }) : /* @__PURE__ */ jsxRuntime.jsx(lucideReact.Clipboard, { size: 14, "aria-hidden": "true" }),
|
|
814
|
+
onSelect: copy.copyDefault,
|
|
815
|
+
submenu: {
|
|
816
|
+
label: "Copy as",
|
|
817
|
+
items: [
|
|
818
|
+
{
|
|
819
|
+
id: "copy-rich",
|
|
820
|
+
label: "Copy as rich text",
|
|
821
|
+
description: "Rich text + Markdown",
|
|
822
|
+
onSelect: copy.copyRich
|
|
823
|
+
},
|
|
824
|
+
{
|
|
825
|
+
id: "copy-markdown",
|
|
826
|
+
label: "Copy as Markdown",
|
|
827
|
+
onSelect: copy.copyMarkdown
|
|
828
|
+
},
|
|
829
|
+
{
|
|
830
|
+
id: "copy-plain",
|
|
831
|
+
label: "Copy as plain text",
|
|
832
|
+
onSelect: copy.copyPlain
|
|
833
|
+
}
|
|
834
|
+
]
|
|
835
|
+
}
|
|
836
|
+
}
|
|
837
|
+
] : [],
|
|
838
|
+
...canEdit && !isEditing ? [
|
|
839
|
+
{
|
|
840
|
+
id: "edit",
|
|
841
|
+
label: "Edit message",
|
|
842
|
+
icon: /* @__PURE__ */ jsxRuntime.jsx(lucideReact.Pencil, { size: 14, "aria-hidden": "true" }),
|
|
843
|
+
onSelect: startEdit
|
|
844
|
+
}
|
|
845
|
+
] : []
|
|
846
|
+
];
|
|
691
847
|
return /* @__PURE__ */ jsxRuntime.jsxs(
|
|
692
848
|
"div",
|
|
693
849
|
{
|
|
@@ -725,17 +881,6 @@ ${block.text}
|
|
|
725
881
|
title: `Edited ${formatTime(message.editedAt)}`,
|
|
726
882
|
children: "(edited)"
|
|
727
883
|
}
|
|
728
|
-
),
|
|
729
|
-
canEdit && !isEditing && /* @__PURE__ */ jsxRuntime.jsx(
|
|
730
|
-
"button",
|
|
731
|
-
{
|
|
732
|
-
type: "button",
|
|
733
|
-
"data-slot": "superchat-edit-button",
|
|
734
|
-
onClick: startEdit,
|
|
735
|
-
"aria-label": "Edit message",
|
|
736
|
-
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",
|
|
737
|
-
children: /* @__PURE__ */ jsxRuntime.jsx(lucideReact.Pencil, { size: 14, "aria-hidden": "true" })
|
|
738
|
-
}
|
|
739
884
|
)
|
|
740
885
|
]
|
|
741
886
|
}
|
|
@@ -748,13 +893,12 @@ ${block.text}
|
|
|
748
893
|
isSelf ? "flex-row-reverse" : "flex-row"
|
|
749
894
|
),
|
|
750
895
|
children: [
|
|
751
|
-
|
|
752
|
-
|
|
896
|
+
hasActions && /* @__PURE__ */ jsxRuntime.jsx(
|
|
897
|
+
MessageOverflowMenu,
|
|
753
898
|
{
|
|
754
899
|
isSelf,
|
|
755
|
-
|
|
756
|
-
|
|
757
|
-
getText: () => bubbleRef.current?.textContent ?? ""
|
|
900
|
+
actions,
|
|
901
|
+
footerVisible
|
|
758
902
|
}
|
|
759
903
|
),
|
|
760
904
|
/* @__PURE__ */ jsxRuntime.jsx(
|
|
@@ -867,6 +1011,14 @@ ${block.text}
|
|
|
867
1011
|
)
|
|
868
1012
|
]
|
|
869
1013
|
}
|
|
1014
|
+
),
|
|
1015
|
+
hasActions && /* @__PURE__ */ jsxRuntime.jsx(
|
|
1016
|
+
MessageActionsBar,
|
|
1017
|
+
{
|
|
1018
|
+
ref: actionsBarRef,
|
|
1019
|
+
actions,
|
|
1020
|
+
isSelf
|
|
1021
|
+
}
|
|
870
1022
|
)
|
|
871
1023
|
] })
|
|
872
1024
|
]
|
|
@@ -894,11 +1046,12 @@ function VirtualThread({
|
|
|
894
1046
|
onReferenceClick,
|
|
895
1047
|
editable,
|
|
896
1048
|
onMessageEdited,
|
|
1049
|
+
defaultCopyFormat,
|
|
897
1050
|
order,
|
|
898
1051
|
conversationId,
|
|
899
1052
|
containerProps
|
|
900
1053
|
}) {
|
|
901
|
-
const parentRef =
|
|
1054
|
+
const parentRef = React2__namespace.useRef(null);
|
|
902
1055
|
const virtualizer = reactVirtual.useVirtualizer({
|
|
903
1056
|
count: items.length,
|
|
904
1057
|
getScrollElement: () => parentRef.current,
|
|
@@ -908,7 +1061,7 @@ function VirtualThread({
|
|
|
908
1061
|
getItemKey: (index) => items[index]?.id ?? index
|
|
909
1062
|
});
|
|
910
1063
|
const count = items.length;
|
|
911
|
-
|
|
1064
|
+
React2__namespace.useEffect(() => {
|
|
912
1065
|
if (count === 0) return;
|
|
913
1066
|
if (order === "desc") {
|
|
914
1067
|
virtualizer.scrollToIndex(0, { align: "start" });
|
|
@@ -950,7 +1103,8 @@ function VirtualThread({
|
|
|
950
1103
|
linkBuilder,
|
|
951
1104
|
onReferenceClick,
|
|
952
1105
|
editable,
|
|
953
|
-
onMessageEdited
|
|
1106
|
+
onMessageEdited,
|
|
1107
|
+
defaultCopyFormat
|
|
954
1108
|
}
|
|
955
1109
|
) })
|
|
956
1110
|
},
|
|
@@ -971,6 +1125,7 @@ function SuperChat({
|
|
|
971
1125
|
order = "asc",
|
|
972
1126
|
virtualized = false,
|
|
973
1127
|
linkBuilder,
|
|
1128
|
+
defaultCopyFormat,
|
|
974
1129
|
className,
|
|
975
1130
|
onMessageSent,
|
|
976
1131
|
onMessageEdited,
|
|
@@ -978,35 +1133,35 @@ function SuperChat({
|
|
|
978
1133
|
onReferenceClick,
|
|
979
1134
|
onBack
|
|
980
1135
|
}) {
|
|
981
|
-
const headingId =
|
|
982
|
-
const renderText =
|
|
1136
|
+
const headingId = React2__namespace.useId();
|
|
1137
|
+
const renderText = React2__namespace.useMemo(
|
|
983
1138
|
() => renderTextContent ?? createMarkdownRenderer({
|
|
984
1139
|
plugins: renderPlugins,
|
|
985
1140
|
trusted: trustedContent
|
|
986
1141
|
}),
|
|
987
1142
|
[renderTextContent, renderPlugins, trustedContent]
|
|
988
1143
|
);
|
|
989
|
-
const threadRef =
|
|
990
|
-
|
|
1144
|
+
const threadRef = React2__namespace.useRef(null);
|
|
1145
|
+
React2__namespace.useEffect(() => {
|
|
991
1146
|
if (virtualized) return;
|
|
992
1147
|
const el = threadRef.current;
|
|
993
1148
|
if (!el) return;
|
|
994
1149
|
el.scrollTop = order === "desc" ? 0 : el.scrollHeight;
|
|
995
1150
|
}, [conversation.thread.length, conversation.id, order, virtualized]);
|
|
996
|
-
const participantById =
|
|
1151
|
+
const participantById = React2__namespace.useMemo(() => {
|
|
997
1152
|
const map = /* @__PURE__ */ new Map();
|
|
998
1153
|
conversation.participants.forEach((p) => map.set(p.id, p));
|
|
999
1154
|
return map;
|
|
1000
1155
|
}, [conversation]);
|
|
1001
|
-
const orderedThread =
|
|
1156
|
+
const orderedThread = React2__namespace.useMemo(() => {
|
|
1002
1157
|
const sorted = [...conversation.thread].sort(byTime);
|
|
1003
1158
|
return order === "desc" ? sorted.reverse() : sorted;
|
|
1004
1159
|
}, [conversation, order]);
|
|
1005
|
-
const onMessageEditedRef =
|
|
1160
|
+
const onMessageEditedRef = React2__namespace.useRef(onMessageEdited);
|
|
1006
1161
|
onMessageEditedRef.current = onMessageEdited;
|
|
1007
|
-
const conversationRef =
|
|
1162
|
+
const conversationRef = React2__namespace.useRef(conversation);
|
|
1008
1163
|
conversationRef.current = conversation;
|
|
1009
|
-
const handleMessageEdited =
|
|
1164
|
+
const handleMessageEdited = React2__namespace.useCallback(
|
|
1010
1165
|
(messageId, text) => {
|
|
1011
1166
|
onMessageEditedRef.current?.(messageId, text, {
|
|
1012
1167
|
conversation: conversationRef.current
|
|
@@ -1015,7 +1170,7 @@ function SuperChat({
|
|
|
1015
1170
|
[]
|
|
1016
1171
|
);
|
|
1017
1172
|
const editable = !readOnly && !!onMessageEdited;
|
|
1018
|
-
const mentionOptions =
|
|
1173
|
+
const mentionOptions = React2__namespace.useMemo(
|
|
1019
1174
|
() => conversation.participants.filter((p) => p.kind !== "system").map((p) => ({
|
|
1020
1175
|
id: p.id,
|
|
1021
1176
|
label: p.name,
|
|
@@ -1025,11 +1180,11 @@ function SuperChat({
|
|
|
1025
1180
|
})),
|
|
1026
1181
|
[conversation.participants]
|
|
1027
1182
|
);
|
|
1028
|
-
const composerAccept =
|
|
1183
|
+
const composerAccept = React2__namespace.useMemo(
|
|
1029
1184
|
() => acceptTokensFor(acceptedFileTypes),
|
|
1030
1185
|
[acceptedFileTypes]
|
|
1031
1186
|
);
|
|
1032
|
-
const handleComposerSend =
|
|
1187
|
+
const handleComposerSend = React2__namespace.useCallback(
|
|
1033
1188
|
async (message) => {
|
|
1034
1189
|
const text = message.content;
|
|
1035
1190
|
const mentions = detectMentions(text, conversation.participants);
|
|
@@ -1127,6 +1282,7 @@ function SuperChat({
|
|
|
1127
1282
|
onReferenceClick,
|
|
1128
1283
|
editable,
|
|
1129
1284
|
onMessageEdited: handleMessageEdited,
|
|
1285
|
+
defaultCopyFormat,
|
|
1130
1286
|
order,
|
|
1131
1287
|
conversationId: conversation.id,
|
|
1132
1288
|
containerProps: {
|
|
@@ -1159,14 +1315,15 @@ function SuperChat({
|
|
|
1159
1315
|
linkBuilder,
|
|
1160
1316
|
onReferenceClick,
|
|
1161
1317
|
editable,
|
|
1162
|
-
onMessageEdited: handleMessageEdited
|
|
1318
|
+
onMessageEdited: handleMessageEdited,
|
|
1319
|
+
defaultCopyFormat
|
|
1163
1320
|
},
|
|
1164
1321
|
m.id
|
|
1165
1322
|
))
|
|
1166
1323
|
}
|
|
1167
1324
|
),
|
|
1168
1325
|
/* @__PURE__ */ jsxRuntime.jsx(
|
|
1169
|
-
|
|
1326
|
+
chunkG52YRAJC_cjs.MessageComposer,
|
|
1170
1327
|
{
|
|
1171
1328
|
onSend: handleComposerSend,
|
|
1172
1329
|
disabled: readOnly,
|
|
@@ -1190,12 +1347,12 @@ function SuperChatConversations({
|
|
|
1190
1347
|
onConversationOpened,
|
|
1191
1348
|
onNewConversation
|
|
1192
1349
|
}) {
|
|
1193
|
-
const [internalActive, setInternalActive] =
|
|
1350
|
+
const [internalActive, setInternalActive] = React2__namespace.useState(
|
|
1194
1351
|
defaultActiveConversationId ?? conversations[0]?.id
|
|
1195
1352
|
);
|
|
1196
1353
|
const requestedId = activeConversationId ?? internalActive;
|
|
1197
1354
|
const activeId = conversations.some((c) => c.id === requestedId) ? requestedId : conversations[0]?.id;
|
|
1198
|
-
const sortedConversations =
|
|
1355
|
+
const sortedConversations = React2__namespace.useMemo(
|
|
1199
1356
|
() => [...conversations].sort((a, b) => lastActivityOf(b) - lastActivityOf(a)),
|
|
1200
1357
|
[conversations]
|
|
1201
1358
|
);
|
|
@@ -1275,6 +1432,7 @@ function SuperChatInbox({
|
|
|
1275
1432
|
virtualized,
|
|
1276
1433
|
showSidebar = true,
|
|
1277
1434
|
linkBuilder,
|
|
1435
|
+
defaultCopyFormat,
|
|
1278
1436
|
className,
|
|
1279
1437
|
onMessageSent,
|
|
1280
1438
|
onMessageEdited,
|
|
@@ -1283,13 +1441,13 @@ function SuperChatInbox({
|
|
|
1283
1441
|
onNewConversation,
|
|
1284
1442
|
onReferenceClick
|
|
1285
1443
|
}) {
|
|
1286
|
-
const [internalActive, setInternalActive] =
|
|
1444
|
+
const [internalActive, setInternalActive] = React2__namespace.useState(
|
|
1287
1445
|
defaultActiveConversationId ?? conversations[0]?.id
|
|
1288
1446
|
);
|
|
1289
1447
|
const requestedId = activeConversationId ?? internalActive;
|
|
1290
1448
|
const active = conversations.find((c) => c.id === requestedId) ?? conversations[0];
|
|
1291
1449
|
const activeId = active?.id;
|
|
1292
|
-
const [mobileView, setMobileView] =
|
|
1450
|
+
const [mobileView, setMobileView] = React2__namespace.useState("list");
|
|
1293
1451
|
const handleOpen = (c) => {
|
|
1294
1452
|
if (activeConversationId === void 0) setInternalActive(c.id);
|
|
1295
1453
|
setMobileView("chat");
|
|
@@ -1332,6 +1490,7 @@ function SuperChatInbox({
|
|
|
1332
1490
|
order,
|
|
1333
1491
|
virtualized,
|
|
1334
1492
|
linkBuilder,
|
|
1493
|
+
defaultCopyFormat,
|
|
1335
1494
|
onMessageSent,
|
|
1336
1495
|
onMessageEdited,
|
|
1337
1496
|
onConversationClosed,
|