@mieweb/ui 0.9.0 → 0.10.0-dev.0
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/MIGRATION.md +112 -0
- package/dist/{Animated-Cs-naa2g.d.cts → Animated-XmH6k8pZ.d.cts} +16 -3
- package/dist/{Animated-Cs-naa2g.d.ts → Animated-XmH6k8pZ.d.ts} +16 -3
- package/dist/{chunk-XUVEF2RQ.js → chunk-24SEAAOH.js} +2 -2
- package/dist/{chunk-XUVEF2RQ.js.map → chunk-24SEAAOH.js.map} +1 -1
- package/dist/{chunk-FUFBRKOG.cjs → chunk-2WBPNXO2.cjs} +21 -21
- package/dist/{chunk-FUFBRKOG.cjs.map → chunk-2WBPNXO2.cjs.map} +1 -1
- package/dist/{chunk-IUDY6S7I.cjs → chunk-37UZHCLM.cjs} +35 -14
- package/dist/chunk-37UZHCLM.cjs.map +1 -0
- package/dist/{chunk-L52N6BEN.cjs → chunk-AUOTJQGO.cjs} +7 -7
- package/dist/{chunk-L52N6BEN.cjs.map → chunk-AUOTJQGO.cjs.map} +1 -1
- package/dist/{chunk-6XDPJWSC.cjs → chunk-E7G22IQM.cjs} +32 -28
- package/dist/chunk-E7G22IQM.cjs.map +1 -0
- package/dist/chunk-IIFQ6BSJ.js +1888 -0
- package/dist/chunk-IIFQ6BSJ.js.map +1 -0
- package/dist/{chunk-ONNY7UO4.js → chunk-JDJQTKTX.js} +3 -3
- package/dist/{chunk-ONNY7UO4.js.map → chunk-JDJQTKTX.js.map} +1 -1
- package/dist/{chunk-BJKAVWED.js → chunk-MBWF36DJ.js} +35 -14
- package/dist/chunk-MBWF36DJ.js.map +1 -0
- package/dist/chunk-NV2CWBI2.cjs +290 -0
- package/dist/chunk-NV2CWBI2.cjs.map +1 -0
- package/dist/{chunk-FQBTGS3E.cjs → chunk-OFUKTVBN.cjs} +363 -285
- package/dist/chunk-OFUKTVBN.cjs.map +1 -0
- package/dist/{chunk-7KN6J7XV.cjs → chunk-OMAACCFW.cjs} +7 -7
- package/dist/{chunk-7KN6J7XV.cjs.map → chunk-OMAACCFW.cjs.map} +1 -1
- package/dist/chunk-OYQ7GYAA.cjs +1921 -0
- package/dist/chunk-OYQ7GYAA.cjs.map +1 -0
- package/dist/{chunk-YJP6DUFO.cjs → chunk-PKD3JLS2.cjs} +6 -6
- package/dist/{chunk-YJP6DUFO.cjs.map → chunk-PKD3JLS2.cjs.map} +1 -1
- package/dist/{chunk-CXDMZT45.cjs → chunk-PY7XAG4D.cjs} +27 -4
- package/dist/chunk-PY7XAG4D.cjs.map +1 -0
- package/dist/{chunk-5H7SAEQO.js → chunk-QKFJDQEK.js} +3 -3
- package/dist/{chunk-5H7SAEQO.js.map → chunk-QKFJDQEK.js.map} +1 -1
- package/dist/{chunk-XJTFZLWH.cjs → chunk-QO6PRHDX.cjs} +2 -2
- package/dist/{chunk-XJTFZLWH.cjs.map → chunk-QO6PRHDX.cjs.map} +1 -1
- package/dist/{chunk-OHDIJOGG.js → chunk-RD3JDFYJ.js} +3 -3
- package/dist/{chunk-OHDIJOGG.js.map → chunk-RD3JDFYJ.js.map} +1 -1
- package/dist/{chunk-4SM3I7WE.cjs → chunk-RXPEZXAB.cjs} +67 -38
- package/dist/chunk-RXPEZXAB.cjs.map +1 -0
- package/dist/{chunk-VTR2KGLY.cjs → chunk-S3BCHPXT.cjs} +9 -9
- package/dist/{chunk-VTR2KGLY.cjs.map → chunk-S3BCHPXT.cjs.map} +1 -1
- package/dist/{chunk-KU3XRHWA.js → chunk-TZX76ZNZ.js} +67 -38
- package/dist/chunk-TZX76ZNZ.js.map +1 -0
- package/dist/{chunk-MXQ7J4BB.js → chunk-VSVGMMNO.js} +361 -284
- package/dist/chunk-VSVGMMNO.js.map +1 -0
- package/dist/{chunk-Q7G56ZIO.js → chunk-WUBMDOTG.js} +3 -3
- package/dist/{chunk-Q7G56ZIO.js.map → chunk-WUBMDOTG.js.map} +1 -1
- package/dist/{chunk-DGRXAIWK.js → chunk-X5YM3KXY.js} +27 -4
- package/dist/chunk-X5YM3KXY.js.map +1 -0
- package/dist/chunk-XCP454Q6.js +263 -0
- package/dist/chunk-XCP454Q6.js.map +1 -0
- package/dist/{chunk-I3DQXUSC.js → chunk-Y6DFMDMH.js} +3 -3
- package/dist/{chunk-I3DQXUSC.js.map → chunk-Y6DFMDMH.js.map} +1 -1
- package/dist/{chunk-ODYQYLO2.js → chunk-YSEMAI4I.js} +8 -4
- package/dist/chunk-YSEMAI4I.js.map +1 -0
- package/dist/components/AlertDialog/index.cjs +4 -4
- package/dist/components/AlertDialog/index.js +3 -3
- package/dist/components/Collapsible/index.cjs +6 -4
- package/dist/components/Collapsible/index.js +3 -1
- package/dist/components/Dropdown/index.cjs +9 -8
- package/dist/components/Dropdown/index.js +2 -1
- package/dist/components/KeyboardShortcutsOverlay/index.cjs +5 -5
- package/dist/components/KeyboardShortcutsOverlay/index.js +3 -3
- package/dist/components/MediaEditor/index.cjs +8 -8
- package/dist/components/MediaEditor/index.js +3 -3
- package/dist/components/Modal/index.cjs +10 -10
- package/dist/components/Modal/index.js +2 -2
- package/dist/components/RichTextEditor/index.cjs +6 -5
- package/dist/components/RichTextEditor/index.js +3 -2
- package/dist/components/SuperChat/index.cjs +40 -17
- package/dist/components/SuperChat/index.cjs.map +1 -1
- package/dist/components/SuperChat/index.d.cts +20 -7
- package/dist/components/SuperChat/index.d.ts +20 -7
- package/dist/components/SuperChat/index.js +35 -12
- package/dist/components/SuperChat/index.js.map +1 -1
- package/dist/components/SuperChat/plugins/index.cjs +10 -3
- package/dist/components/SuperChat/plugins/index.cjs.map +1 -1
- package/dist/components/SuperChat/plugins/index.d.cts +3 -3
- package/dist/components/SuperChat/plugins/index.d.ts +3 -3
- package/dist/components/SuperChat/plugins/index.js +9 -2
- package/dist/components/SuperChat/plugins/index.js.map +1 -1
- package/dist/esheet.cjs +6 -6
- package/dist/esheet.js +3 -3
- package/dist/hooks/index.cjs +13 -13
- package/dist/hooks/index.js +1 -1
- package/dist/index.cjs +720 -1671
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +347 -347
- package/dist/index.d.ts +347 -347
- package/dist/index.js +459 -1405
- package/dist/index.js.map +1 -1
- package/dist/motion.cjs +7 -7
- package/dist/motion.d.cts +1 -1
- package/dist/motion.d.ts +1 -1
- package/dist/motion.js +2 -2
- package/dist/styles.css +1 -1
- package/dist/tailwind-preset.cjs +4 -4
- package/dist/tailwind-preset.js +1 -1
- package/dist/{types-DZDroUW8.d.cts → types-B97JNRNQ.d.cts} +1 -1
- package/dist/{types-B2RLmdVd.d.ts → types-CnPEwzlp.d.cts} +6 -2
- package/dist/{types-B2RLmdVd.d.cts → types-CnPEwzlp.d.ts} +6 -2
- package/dist/{types-9vK_YdEb.d.ts → types-gZXrfLj6.d.ts} +1 -1
- package/package.json +2 -1
- package/dist/chunk-4SM3I7WE.cjs.map +0 -1
- package/dist/chunk-5BVFVXHN.cjs +0 -1244
- package/dist/chunk-5BVFVXHN.cjs.map +0 -1
- package/dist/chunk-6XDPJWSC.cjs.map +0 -1
- package/dist/chunk-BJKAVWED.js.map +0 -1
- package/dist/chunk-BN75TLUN.cjs +0 -163
- package/dist/chunk-BN75TLUN.cjs.map +0 -1
- package/dist/chunk-CXDMZT45.cjs.map +0 -1
- package/dist/chunk-DGRXAIWK.js.map +0 -1
- package/dist/chunk-FQBTGS3E.cjs.map +0 -1
- package/dist/chunk-IUDY6S7I.cjs.map +0 -1
- package/dist/chunk-KU3XRHWA.js.map +0 -1
- package/dist/chunk-MXQ7J4BB.js.map +0 -1
- package/dist/chunk-O6GJ4IYS.js +0 -1210
- package/dist/chunk-O6GJ4IYS.js.map +0 -1
- package/dist/chunk-ODYQYLO2.js.map +0 -1
- package/dist/chunk-WYMO3IIK.js +0 -136
- package/dist/chunk-WYMO3IIK.js.map +0 -1
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import * as react_jsx_runtime from 'react/jsx-runtime';
|
|
2
|
-
import { S as SuperChatConversation, a as SuperChatRenderPlugin, A as AttachmentKind, b as SuperChatLinkBuilder, c as SuperChatCopyFormat, C as ComposerAttachment, d as SuperChatRef } from '../../types-
|
|
3
|
-
export { G as GenUIBlockPayload, e as GenUIPrefetchPolicy, f as GenUIRegistry, g as GenUIWidgetEntry, h as GenUIWidgetProps, P as Participant, i as ParticipantKind, j as ParticipantStatus, k as StandardSchemaV1, l as SuperChatChannel, m as SuperChatItemType, n as SuperChatMessage, o as SuperChatPluggable, p as SuperChatPluggableList } from '../../types-
|
|
4
|
-
import { b as AIRenderTextContent } from '../../types-
|
|
5
|
-
export { A as AIMessageContent, a as AIMessageStatus, c as AITextRenderContext, M as MCPResourceLink } from '../../types-
|
|
2
|
+
import { S as SuperChatConversation, a as SuperChatRenderPlugin, A as AttachmentKind, b as SuperChatLinkBuilder, c as SuperChatCopyFormat, C as ComposerAttachment, d as SuperChatRef } from '../../types-B97JNRNQ.cjs';
|
|
3
|
+
export { G as GenUIBlockPayload, e as GenUIPrefetchPolicy, f as GenUIRegistry, g as GenUIWidgetEntry, h as GenUIWidgetProps, P as Participant, i as ParticipantKind, j as ParticipantStatus, k as StandardSchemaV1, l as SuperChatChannel, m as SuperChatItemType, n as SuperChatMessage, o as SuperChatPluggable, p as SuperChatPluggableList } from '../../types-B97JNRNQ.cjs';
|
|
4
|
+
import { b as AIRenderTextContent } from '../../types-CnPEwzlp.cjs';
|
|
5
|
+
export { A as AIMessageContent, a as AIMessageStatus, c as AITextRenderContext, M as MCPResourceLink } from '../../types-CnPEwzlp.cjs';
|
|
6
6
|
import * as React from 'react';
|
|
7
7
|
|
|
8
8
|
interface SuperChatProps {
|
|
@@ -19,7 +19,8 @@ interface SuperChatProps {
|
|
|
19
19
|
/** Disable the composer. */
|
|
20
20
|
readOnly?: boolean;
|
|
21
21
|
/**
|
|
22
|
-
* File categories the composer accepts for paste and the
|
|
22
|
+
* File categories the composer accepts for paste, drag-and-drop, and the
|
|
23
|
+
* file picker in the `+` → “Attach files” menu.
|
|
23
24
|
* Defaults to `['image', 'video', 'audio', 'pdf']`.
|
|
24
25
|
*/
|
|
25
26
|
acceptedFileTypes?: AttachmentKind[];
|
|
@@ -47,11 +48,17 @@ interface SuperChatProps {
|
|
|
47
48
|
defaultCopyFormat?: SuperChatCopyFormat;
|
|
48
49
|
/** Additional class name. */
|
|
49
50
|
className?: string;
|
|
51
|
+
/**
|
|
52
|
+
* Fired when the local user sends a message. If the callback returns a
|
|
53
|
+
* promise it is awaited, and a rejected send restores the typed text into
|
|
54
|
+
* the composer (the declared `void` return keeps every previously valid
|
|
55
|
+
* callback assignable).
|
|
56
|
+
*/
|
|
50
57
|
onMessageSent?: (text: string, meta: {
|
|
51
58
|
conversation: SuperChatConversation;
|
|
52
59
|
mentions: string[];
|
|
53
60
|
attachments: ComposerAttachment[];
|
|
54
|
-
}) => void
|
|
61
|
+
}) => void | Promise<void>;
|
|
55
62
|
/**
|
|
56
63
|
* Fired when the local user saves an edit to one of their own messages.
|
|
57
64
|
* Providing this enables the inline "Edit" affordance on self-authored
|
|
@@ -110,7 +117,8 @@ interface SuperChatInboxProps {
|
|
|
110
117
|
/** Disable the composer. */
|
|
111
118
|
readOnly?: boolean;
|
|
112
119
|
/**
|
|
113
|
-
* File categories the composer accepts for paste and the
|
|
120
|
+
* File categories the composer accepts for paste, drag-and-drop, and the
|
|
121
|
+
* file picker in the `+` → “Attach files” menu.
|
|
114
122
|
* Defaults to `['image', 'video', 'audio', 'pdf']`.
|
|
115
123
|
*/
|
|
116
124
|
acceptedFileTypes?: AttachmentKind[];
|
|
@@ -126,6 +134,11 @@ interface SuperChatInboxProps {
|
|
|
126
134
|
defaultCopyFormat?: SuperChatCopyFormat;
|
|
127
135
|
/** Additional class name. */
|
|
128
136
|
className?: string;
|
|
137
|
+
/**
|
|
138
|
+
* Fired when the local user sends a message. If the callback returns a
|
|
139
|
+
* promise it is awaited, and a rejected send restores the typed text into
|
|
140
|
+
* the composer (same contract as {@link SuperChatProps.onMessageSent}).
|
|
141
|
+
*/
|
|
129
142
|
onMessageSent?: (text: string, meta: {
|
|
130
143
|
conversation: SuperChatConversation;
|
|
131
144
|
mentions: string[];
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import * as react_jsx_runtime from 'react/jsx-runtime';
|
|
2
|
-
import { S as SuperChatConversation, a as SuperChatRenderPlugin, A as AttachmentKind, b as SuperChatLinkBuilder, c as SuperChatCopyFormat, C as ComposerAttachment, d as SuperChatRef } from '../../types-
|
|
3
|
-
export { G as GenUIBlockPayload, e as GenUIPrefetchPolicy, f as GenUIRegistry, g as GenUIWidgetEntry, h as GenUIWidgetProps, P as Participant, i as ParticipantKind, j as ParticipantStatus, k as StandardSchemaV1, l as SuperChatChannel, m as SuperChatItemType, n as SuperChatMessage, o as SuperChatPluggable, p as SuperChatPluggableList } from '../../types-
|
|
4
|
-
import { b as AIRenderTextContent } from '../../types-
|
|
5
|
-
export { A as AIMessageContent, a as AIMessageStatus, c as AITextRenderContext, M as MCPResourceLink } from '../../types-
|
|
2
|
+
import { S as SuperChatConversation, a as SuperChatRenderPlugin, A as AttachmentKind, b as SuperChatLinkBuilder, c as SuperChatCopyFormat, C as ComposerAttachment, d as SuperChatRef } from '../../types-gZXrfLj6.js';
|
|
3
|
+
export { G as GenUIBlockPayload, e as GenUIPrefetchPolicy, f as GenUIRegistry, g as GenUIWidgetEntry, h as GenUIWidgetProps, P as Participant, i as ParticipantKind, j as ParticipantStatus, k as StandardSchemaV1, l as SuperChatChannel, m as SuperChatItemType, n as SuperChatMessage, o as SuperChatPluggable, p as SuperChatPluggableList } from '../../types-gZXrfLj6.js';
|
|
4
|
+
import { b as AIRenderTextContent } from '../../types-CnPEwzlp.js';
|
|
5
|
+
export { A as AIMessageContent, a as AIMessageStatus, c as AITextRenderContext, M as MCPResourceLink } from '../../types-CnPEwzlp.js';
|
|
6
6
|
import * as React from 'react';
|
|
7
7
|
|
|
8
8
|
interface SuperChatProps {
|
|
@@ -19,7 +19,8 @@ interface SuperChatProps {
|
|
|
19
19
|
/** Disable the composer. */
|
|
20
20
|
readOnly?: boolean;
|
|
21
21
|
/**
|
|
22
|
-
* File categories the composer accepts for paste and the
|
|
22
|
+
* File categories the composer accepts for paste, drag-and-drop, and the
|
|
23
|
+
* file picker in the `+` → “Attach files” menu.
|
|
23
24
|
* Defaults to `['image', 'video', 'audio', 'pdf']`.
|
|
24
25
|
*/
|
|
25
26
|
acceptedFileTypes?: AttachmentKind[];
|
|
@@ -47,11 +48,17 @@ interface SuperChatProps {
|
|
|
47
48
|
defaultCopyFormat?: SuperChatCopyFormat;
|
|
48
49
|
/** Additional class name. */
|
|
49
50
|
className?: string;
|
|
51
|
+
/**
|
|
52
|
+
* Fired when the local user sends a message. If the callback returns a
|
|
53
|
+
* promise it is awaited, and a rejected send restores the typed text into
|
|
54
|
+
* the composer (the declared `void` return keeps every previously valid
|
|
55
|
+
* callback assignable).
|
|
56
|
+
*/
|
|
50
57
|
onMessageSent?: (text: string, meta: {
|
|
51
58
|
conversation: SuperChatConversation;
|
|
52
59
|
mentions: string[];
|
|
53
60
|
attachments: ComposerAttachment[];
|
|
54
|
-
}) => void
|
|
61
|
+
}) => void | Promise<void>;
|
|
55
62
|
/**
|
|
56
63
|
* Fired when the local user saves an edit to one of their own messages.
|
|
57
64
|
* Providing this enables the inline "Edit" affordance on self-authored
|
|
@@ -110,7 +117,8 @@ interface SuperChatInboxProps {
|
|
|
110
117
|
/** Disable the composer. */
|
|
111
118
|
readOnly?: boolean;
|
|
112
119
|
/**
|
|
113
|
-
* File categories the composer accepts for paste and the
|
|
120
|
+
* File categories the composer accepts for paste, drag-and-drop, and the
|
|
121
|
+
* file picker in the `+` → “Attach files” menu.
|
|
114
122
|
* Defaults to `['image', 'video', 'audio', 'pdf']`.
|
|
115
123
|
*/
|
|
116
124
|
acceptedFileTypes?: AttachmentKind[];
|
|
@@ -126,6 +134,11 @@ interface SuperChatInboxProps {
|
|
|
126
134
|
defaultCopyFormat?: SuperChatCopyFormat;
|
|
127
135
|
/** Additional class name. */
|
|
128
136
|
className?: string;
|
|
137
|
+
/**
|
|
138
|
+
* Fired when the local user sends a message. If the callback returns a
|
|
139
|
+
* promise it is awaited, and a rejected send restores the typed text into
|
|
140
|
+
* the composer (same contract as {@link SuperChatProps.onMessageSent}).
|
|
141
|
+
*/
|
|
129
142
|
onMessageSent?: (text: string, meta: {
|
|
130
143
|
conversation: SuperChatConversation;
|
|
131
144
|
mentions: string[];
|
|
@@ -1,14 +1,16 @@
|
|
|
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-22CYDCXA.js';
|
|
4
|
-
import {
|
|
5
|
-
import { Dropdown, DropdownSubmenu, DropdownItem } from '../../chunk-
|
|
4
|
+
import { notifyComposerMigrationOnce, ChatComposer } from '../../chunk-IIFQ6BSJ.js';
|
|
5
|
+
import { Dropdown, DropdownSubmenu, DropdownItem } from '../../chunk-TZX76ZNZ.js';
|
|
6
6
|
import { Avatar } from '../../chunk-HZ4MBUC3.js';
|
|
7
7
|
import '../../chunk-IQ4KQJAO.js';
|
|
8
8
|
import '../../chunk-VVDE4CHU.js';
|
|
9
9
|
import '../../chunk-6NZXWKUE.js';
|
|
10
10
|
import '../../chunk-3IMM2PM4.js';
|
|
11
|
+
import '../../chunk-BKSPDTX4.js';
|
|
11
12
|
import { Badge } from '../../chunk-BMSG4NBH.js';
|
|
13
|
+
import '../../chunk-XCP454Q6.js';
|
|
12
14
|
import { cn } from '../../chunk-TQONQSJO.js';
|
|
13
15
|
import '../../chunk-T4ME7QCT.js';
|
|
14
16
|
import '../../chunk-62ZOA6PX.js';
|
|
@@ -1108,6 +1110,9 @@ function SuperChat({
|
|
|
1108
1110
|
onBack
|
|
1109
1111
|
}) {
|
|
1110
1112
|
const headingId = React2.useId();
|
|
1113
|
+
React2.useEffect(() => {
|
|
1114
|
+
notifyComposerMigrationOnce("SuperChat");
|
|
1115
|
+
}, []);
|
|
1111
1116
|
const renderText = React2.useMemo(
|
|
1112
1117
|
() => renderTextContent ?? createMarkdownRenderer({
|
|
1113
1118
|
plugins: renderPlugins,
|
|
@@ -1158,14 +1163,29 @@ function SuperChat({
|
|
|
1158
1163
|
() => acceptTokensFor(acceptedFileTypes),
|
|
1159
1164
|
[acceptedFileTypes]
|
|
1160
1165
|
);
|
|
1166
|
+
const [draft, setDraft] = React2.useState("");
|
|
1167
|
+
const draftEpochRef = React2.useRef(0);
|
|
1168
|
+
const handleDraftChange = React2.useCallback((value) => {
|
|
1169
|
+
draftEpochRef.current += 1;
|
|
1170
|
+
setDraft(value);
|
|
1171
|
+
}, []);
|
|
1161
1172
|
const handleComposerSend = React2.useCallback(
|
|
1162
1173
|
async (message) => {
|
|
1163
|
-
const
|
|
1164
|
-
|
|
1165
|
-
|
|
1166
|
-
|
|
1167
|
-
|
|
1168
|
-
|
|
1174
|
+
const epoch = draftEpochRef.current;
|
|
1175
|
+
try {
|
|
1176
|
+
const text = message.content;
|
|
1177
|
+
const mentions = detectMentions(text, conversation.participants);
|
|
1178
|
+
const attachments = await filesToComposerAttachments(
|
|
1179
|
+
message.attachments ?? []
|
|
1180
|
+
);
|
|
1181
|
+
await Promise.resolve(
|
|
1182
|
+
onMessageSent?.(text, { conversation, mentions, attachments })
|
|
1183
|
+
);
|
|
1184
|
+
} catch {
|
|
1185
|
+
if (draftEpochRef.current === epoch) {
|
|
1186
|
+
setDraft(message.content);
|
|
1187
|
+
}
|
|
1188
|
+
}
|
|
1169
1189
|
},
|
|
1170
1190
|
[conversation, onMessageSent]
|
|
1171
1191
|
);
|
|
@@ -1297,16 +1317,19 @@ function SuperChat({
|
|
|
1297
1317
|
}
|
|
1298
1318
|
),
|
|
1299
1319
|
/* @__PURE__ */ jsx(
|
|
1300
|
-
|
|
1320
|
+
ChatComposer,
|
|
1301
1321
|
{
|
|
1322
|
+
value: draft,
|
|
1323
|
+
onValueChange: handleDraftChange,
|
|
1302
1324
|
onSend: handleComposerSend,
|
|
1303
1325
|
disabled: readOnly,
|
|
1304
1326
|
placeholder: readOnly ? "Read-only conversation" : "Type a message\u2026 use @ to address an agent",
|
|
1305
1327
|
mentionOptions,
|
|
1306
|
-
|
|
1307
|
-
showCameraButton: false,
|
|
1328
|
+
allowAttachments: !readOnly,
|
|
1308
1329
|
acceptedFileTypes: composerAccept,
|
|
1309
|
-
|
|
1330
|
+
maxFileSize: 25 * 1024 * 1024,
|
|
1331
|
+
maxLength: 1e5,
|
|
1332
|
+
inputLabel: "Message"
|
|
1310
1333
|
}
|
|
1311
1334
|
)
|
|
1312
1335
|
]
|