@mieweb/ui 0.11.0-dev.50 → 0.11.0-dev.52
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/dist/{chunk-G56OUIGH.cjs → chunk-ARI25ZYT.cjs} +42 -11
- package/dist/chunk-ARI25ZYT.cjs.map +1 -0
- package/dist/{chunk-I65QJMFB.js → chunk-EOIGNUWI.js} +6 -2
- package/dist/chunk-EOIGNUWI.js.map +1 -0
- package/dist/{chunk-TLXQ2E57.cjs → chunk-LEJHDPLM.cjs} +6 -2
- package/dist/chunk-LEJHDPLM.cjs.map +1 -0
- package/dist/{chunk-O3MN3TYS.js → chunk-NCC3VF6V.js} +42 -11
- package/dist/chunk-NCC3VF6V.js.map +1 -0
- package/dist/components/DictationButton/index.cjs +4 -4
- package/dist/components/DictationButton/index.d.cts +4 -0
- package/dist/components/DictationButton/index.d.ts +4 -0
- package/dist/components/DictationButton/index.js +1 -1
- package/dist/components/SuperChat/index.cjs +33 -8
- package/dist/components/SuperChat/index.cjs.map +1 -1
- package/dist/components/SuperChat/index.d.cts +15 -3
- package/dist/components/SuperChat/index.d.ts +15 -3
- package/dist/components/SuperChat/index.js +27 -2
- package/dist/components/SuperChat/index.js.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/index.cjs +32 -32
- package/dist/index.d.cts +13 -1
- package/dist/index.d.ts +13 -1
- package/dist/index.js +3 -3
- package/dist/{types-ByK_dbT7.d.cts → types-BFbvl6xU.d.cts} +6 -0
- package/dist/{types-ByK_dbT7.d.ts → types-BFbvl6xU.d.ts} +6 -0
- package/package.json +1 -1
- package/dist/chunk-G56OUIGH.cjs.map +0 -1
- package/dist/chunk-I65QJMFB.js.map +0 -1
- package/dist/chunk-O3MN3TYS.js.map +0 -1
- package/dist/chunk-TLXQ2E57.cjs.map +0 -1
|
@@ -1,7 +1,10 @@
|
|
|
1
1
|
import * as react_jsx_runtime from 'react/jsx-runtime';
|
|
2
2
|
import * as React from 'react';
|
|
3
|
-
import {
|
|
4
|
-
|
|
3
|
+
import { DictationButtonProps } from '../DictationButton/index.cjs';
|
|
4
|
+
import { c as SuperChatConversation, d as SuperChatView, e as SuperChatMediaFeedProps, f as SuperChatMediaLabels, S as SuperChatRenderPlugin, A as AIRenderTextContent, g as AttachmentKind, h as SuperChatLinkBuilder, i as SuperChatCopyFormat, C as ComposerAttachment, j as SuperChatRef, k as SuperChatMediaItem } from '../../types-BFbvl6xU.cjs';
|
|
5
|
+
export { l as AIMessageContent, m as AIMessageStatus, n as AITextRenderContext, o as GenUIBlockPayload, p as GenUIPrefetchPolicy, G as GenUIRegistry, a as GenUIWidgetEntry, b as GenUIWidgetProps, M as MCPResourceLink, P as Participant, q as ParticipantKind, r as ParticipantStatus, s as StandardSchemaV1, t as SuperChatChannel, u as SuperChatItemType, v as SuperChatMediaAttachment, w as SuperChatMessage, x as SuperChatPluggable, y as SuperChatPluggableList } from '../../types-BFbvl6xU.cjs';
|
|
6
|
+
import '../RecordButton/index.cjs';
|
|
7
|
+
import 'class-variance-authority/types';
|
|
5
8
|
|
|
6
9
|
type ProviderModelValue = {
|
|
7
10
|
provider: string;
|
|
@@ -148,11 +151,20 @@ interface SuperChatProps {
|
|
|
148
151
|
agentSelectorLabel?: string;
|
|
149
152
|
/** Props for the composer's model selector (shown when provided). */
|
|
150
153
|
modelSelectorProps?: ComposerModelSelectorProps;
|
|
154
|
+
/** Extra controls at the end of the composer's agent/model row (e.g. a display setting). */
|
|
155
|
+
composerSelectorsEndSlot?: React.ReactNode;
|
|
151
156
|
/** While true, the send button becomes a stop button (requires `onStop`). */
|
|
152
157
|
isStreaming?: boolean;
|
|
153
158
|
onStop?: () => void;
|
|
154
159
|
/** Localized accessible label for the icon-only stop button. */
|
|
155
160
|
stopLabel?: string;
|
|
161
|
+
/**
|
|
162
|
+
* Show a dictation (voice typing) button in the composer. The transcript is
|
|
163
|
+
* appended to the editable draft and never sent automatically. `true` uses
|
|
164
|
+
* on-device Whisper (large first-use download); pass `{ transcribe }` to use
|
|
165
|
+
* a server provider. See the `Dictation` story and `DictationButton`.
|
|
166
|
+
*/
|
|
167
|
+
dictation?: boolean | Omit<DictationButtonProps, 'onText'>;
|
|
156
168
|
/**
|
|
157
169
|
* Fired when the local user sends a message. If the callback returns a
|
|
158
170
|
* promise it is awaited, and a rejected send restores the typed text into
|
|
@@ -185,7 +197,7 @@ interface SuperChatProps {
|
|
|
185
197
|
* Single-conversation chat panel. See the module `MAINTAINERS.md` for the
|
|
186
198
|
* participant model and render-plugin architecture.
|
|
187
199
|
*/
|
|
188
|
-
declare function SuperChat({ conversation, view, defaultView, onViewChange, mediaFeedProps, mediaLabels, currentParticipantId, renderPlugins, renderTextContent, trustedContent, readOnly, acceptedFileTypes, order, virtualized, linkBuilder, defaultCopyFormat, className, showHeader, placeholder, allowAttachments, agents, selectedAgent, onAgentChange, agentSelectorLabel, modelSelectorProps, isStreaming, onStop, stopLabel, onMessageSent, onMessageEdited, onConversationClosed, onReferenceClick, onBack, }: SuperChatProps): react_jsx_runtime.JSX.Element;
|
|
200
|
+
declare function SuperChat({ conversation, view, defaultView, onViewChange, mediaFeedProps, mediaLabels, currentParticipantId, renderPlugins, renderTextContent, trustedContent, readOnly, acceptedFileTypes, order, virtualized, linkBuilder, defaultCopyFormat, className, showHeader, placeholder, allowAttachments, agents, selectedAgent, onAgentChange, agentSelectorLabel, modelSelectorProps, composerSelectorsEndSlot, isStreaming, onStop, stopLabel, dictation, onMessageSent, onMessageEdited, onConversationClosed, onReferenceClick, onBack, }: SuperChatProps): react_jsx_runtime.JSX.Element;
|
|
189
201
|
|
|
190
202
|
interface SuperChatConversationsProps {
|
|
191
203
|
/** All conversations (host-owned state). */
|
|
@@ -1,7 +1,10 @@
|
|
|
1
1
|
import * as react_jsx_runtime from 'react/jsx-runtime';
|
|
2
2
|
import * as React from 'react';
|
|
3
|
-
import {
|
|
4
|
-
|
|
3
|
+
import { DictationButtonProps } from '../DictationButton/index.js';
|
|
4
|
+
import { c as SuperChatConversation, d as SuperChatView, e as SuperChatMediaFeedProps, f as SuperChatMediaLabels, S as SuperChatRenderPlugin, A as AIRenderTextContent, g as AttachmentKind, h as SuperChatLinkBuilder, i as SuperChatCopyFormat, C as ComposerAttachment, j as SuperChatRef, k as SuperChatMediaItem } from '../../types-BFbvl6xU.js';
|
|
5
|
+
export { l as AIMessageContent, m as AIMessageStatus, n as AITextRenderContext, o as GenUIBlockPayload, p as GenUIPrefetchPolicy, G as GenUIRegistry, a as GenUIWidgetEntry, b as GenUIWidgetProps, M as MCPResourceLink, P as Participant, q as ParticipantKind, r as ParticipantStatus, s as StandardSchemaV1, t as SuperChatChannel, u as SuperChatItemType, v as SuperChatMediaAttachment, w as SuperChatMessage, x as SuperChatPluggable, y as SuperChatPluggableList } from '../../types-BFbvl6xU.js';
|
|
6
|
+
import '../RecordButton/index.js';
|
|
7
|
+
import 'class-variance-authority/types';
|
|
5
8
|
|
|
6
9
|
type ProviderModelValue = {
|
|
7
10
|
provider: string;
|
|
@@ -148,11 +151,20 @@ interface SuperChatProps {
|
|
|
148
151
|
agentSelectorLabel?: string;
|
|
149
152
|
/** Props for the composer's model selector (shown when provided). */
|
|
150
153
|
modelSelectorProps?: ComposerModelSelectorProps;
|
|
154
|
+
/** Extra controls at the end of the composer's agent/model row (e.g. a display setting). */
|
|
155
|
+
composerSelectorsEndSlot?: React.ReactNode;
|
|
151
156
|
/** While true, the send button becomes a stop button (requires `onStop`). */
|
|
152
157
|
isStreaming?: boolean;
|
|
153
158
|
onStop?: () => void;
|
|
154
159
|
/** Localized accessible label for the icon-only stop button. */
|
|
155
160
|
stopLabel?: string;
|
|
161
|
+
/**
|
|
162
|
+
* Show a dictation (voice typing) button in the composer. The transcript is
|
|
163
|
+
* appended to the editable draft and never sent automatically. `true` uses
|
|
164
|
+
* on-device Whisper (large first-use download); pass `{ transcribe }` to use
|
|
165
|
+
* a server provider. See the `Dictation` story and `DictationButton`.
|
|
166
|
+
*/
|
|
167
|
+
dictation?: boolean | Omit<DictationButtonProps, 'onText'>;
|
|
156
168
|
/**
|
|
157
169
|
* Fired when the local user sends a message. If the callback returns a
|
|
158
170
|
* promise it is awaited, and a rejected send restores the typed text into
|
|
@@ -185,7 +197,7 @@ interface SuperChatProps {
|
|
|
185
197
|
* Single-conversation chat panel. See the module `MAINTAINERS.md` for the
|
|
186
198
|
* participant model and render-plugin architecture.
|
|
187
199
|
*/
|
|
188
|
-
declare function SuperChat({ conversation, view, defaultView, onViewChange, mediaFeedProps, mediaLabels, currentParticipantId, renderPlugins, renderTextContent, trustedContent, readOnly, acceptedFileTypes, order, virtualized, linkBuilder, defaultCopyFormat, className, showHeader, placeholder, allowAttachments, agents, selectedAgent, onAgentChange, agentSelectorLabel, modelSelectorProps, isStreaming, onStop, stopLabel, onMessageSent, onMessageEdited, onConversationClosed, onReferenceClick, onBack, }: SuperChatProps): react_jsx_runtime.JSX.Element;
|
|
200
|
+
declare function SuperChat({ conversation, view, defaultView, onViewChange, mediaFeedProps, mediaLabels, currentParticipantId, renderPlugins, renderTextContent, trustedContent, readOnly, acceptedFileTypes, order, virtualized, linkBuilder, defaultCopyFormat, className, showHeader, placeholder, allowAttachments, agents, selectedAgent, onAgentChange, agentSelectorLabel, modelSelectorProps, composerSelectorsEndSlot, isStreaming, onStop, stopLabel, dictation, onMessageSent, onMessageEdited, onConversationClosed, onReferenceClick, onBack, }: SuperChatProps): react_jsx_runtime.JSX.Element;
|
|
189
201
|
|
|
190
202
|
interface SuperChatConversationsProps {
|
|
191
203
|
/** All conversations (host-owned state). */
|
|
@@ -1,7 +1,9 @@
|
|
|
1
1
|
import { TextRenderContext } from '../../chunk-I6CY5C6A.js';
|
|
2
2
|
export { TextRenderContext, useTextRenderContext } from '../../chunk-I6CY5C6A.js';
|
|
3
|
-
import { ChatBubble, MCPToolCallDisplay, AITypingIndicator, SparklesIcon, CloseIcon, JumpToBottomButton } from '../../chunk-
|
|
3
|
+
import { ChatBubble, MCPToolCallDisplay, AITypingIndicator, SparklesIcon, CloseIcon, JumpToBottomButton } from '../../chunk-NCC3VF6V.js';
|
|
4
4
|
import { notifyComposerMigrationOnce, ChatComposer } from '../../chunk-KP72MDFB.js';
|
|
5
|
+
import { DictationButton } from '../../chunk-EOIGNUWI.js';
|
|
6
|
+
import '../../chunk-URHUNFFC.js';
|
|
5
7
|
import { MediaFeed } from '../../chunk-3XDU7XIC.js';
|
|
6
8
|
import '../../chunk-SCGXD334.js';
|
|
7
9
|
import { MediaPlayer } from '../../chunk-IGUDEWIW.js';
|
|
@@ -1279,9 +1281,11 @@ function SuperChat({
|
|
|
1279
1281
|
onAgentChange,
|
|
1280
1282
|
agentSelectorLabel,
|
|
1281
1283
|
modelSelectorProps,
|
|
1284
|
+
composerSelectorsEndSlot,
|
|
1282
1285
|
isStreaming,
|
|
1283
1286
|
onStop,
|
|
1284
1287
|
stopLabel,
|
|
1288
|
+
dictation,
|
|
1285
1289
|
onMessageSent,
|
|
1286
1290
|
onMessageEdited,
|
|
1287
1291
|
onConversationClosed,
|
|
@@ -1659,6 +1663,13 @@ function SuperChat({
|
|
|
1659
1663
|
draftEpochRef.current += 1;
|
|
1660
1664
|
setDraft(value);
|
|
1661
1665
|
}, []);
|
|
1666
|
+
const appendDictation = React3.useCallback((text) => {
|
|
1667
|
+
draftEpochRef.current += 1;
|
|
1668
|
+
setDraft(
|
|
1669
|
+
(current) => !current || /\s$/.test(current) ? current + text : `${current} ${text}`
|
|
1670
|
+
);
|
|
1671
|
+
}, []);
|
|
1672
|
+
const dictationProps = typeof dictation === "object" ? dictation : void 0;
|
|
1662
1673
|
const handleComposerSend = React3.useCallback(
|
|
1663
1674
|
async (message) => {
|
|
1664
1675
|
const epoch = draftEpochRef.current;
|
|
@@ -1905,9 +1916,23 @@ function SuperChat({
|
|
|
1905
1916
|
agentSelectorLabel,
|
|
1906
1917
|
showModelSelector: !!modelSelectorProps,
|
|
1907
1918
|
modelSelectorProps,
|
|
1919
|
+
selectorsEndSlot: readOnly ? void 0 : composerSelectorsEndSlot,
|
|
1908
1920
|
isStreaming,
|
|
1909
1921
|
onStop,
|
|
1910
|
-
stopLabel
|
|
1922
|
+
stopLabel,
|
|
1923
|
+
micSlot: dictation && !readOnly ? (
|
|
1924
|
+
// Keyed by conversation so switching drops any in-flight take.
|
|
1925
|
+
/* @__PURE__ */ jsx(
|
|
1926
|
+
DictationButton,
|
|
1927
|
+
{
|
|
1928
|
+
showStatus: true,
|
|
1929
|
+
showPulse: false,
|
|
1930
|
+
...dictationProps,
|
|
1931
|
+
onText: appendDictation
|
|
1932
|
+
},
|
|
1933
|
+
conversation.id
|
|
1934
|
+
)
|
|
1935
|
+
) : void 0
|
|
1911
1936
|
}
|
|
1912
1937
|
)
|
|
1913
1938
|
]
|