@miiflow/assistant-ui 0.9.0 → 0.13.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.
@@ -1,10 +1,9 @@
1
1
  import * as react from 'react';
2
2
  import { HTMLAttributes, ReactNode } from 'react';
3
- import { A as Attachment, M as MessageData, b as ParticipantRole, d as SuggestedAction, S as SourceReference } from './message-D2ElX5k7.js';
4
- import { a as AvatarProps$1 } from './avatar-DnLePg72.js';
5
- import { k as StreamingChunk, u as VisualizationChunkData, M as MediaChunkData, A as ArtifactChunkData, d as ClarificationData, s as ToolApprovalData } from './streaming-B_u_jno6.js';
6
- import { c as CommandProvider } from './types-DeHbndy0.js';
7
- import * as react_jsx_runtime from 'react/jsx-runtime';
3
+ import { A as Attachment, M as MessageData, P as ParticipantRole, d as SuggestedAction, S as SourceReference } from './message-D0oMw3tR.js';
4
+ import { h as AvatarProps$1 } from './avatar-CD685KQV.js';
5
+ import { S as StreamingChunk, V as VisualizationChunkData, M as MediaChunkData, A as ArtifactChunkData, C as ClarificationData, T as ToolApprovalData } from './streaming-CmQo_OOA.js';
6
+ import { C as CommandProvider } from './types-Du00UBst.js';
8
7
 
9
8
  interface AttachmentPreviewProps {
10
9
  /** The attachment to preview */
@@ -54,7 +53,7 @@ interface MarkdownContentProps {
54
53
  * Styled markdown renderer with syntax highlighting, copy-to-clipboard,
55
54
  * and heading anchor links.
56
55
  */
57
- declare function MarkdownContent({ children, className, baselineFontSize, darkCodeTheme, }: MarkdownContentProps): react_jsx_runtime.JSX.Element;
56
+ declare function MarkdownContent({ children, className, baselineFontSize, darkCodeTheme, }: MarkdownContentProps): react.JSX.Element;
58
57
 
59
58
  interface MessageProps {
60
59
  /** The message data */
@@ -114,6 +113,10 @@ interface MessageProps {
114
113
  onReportIncorrect?: (reason?: string) => void;
115
114
  /** Confirm this assistant response was correct/helpful */
116
115
  onConfirmCorrect?: () => void;
116
+ /** Edit-and-resubmit for the viewer's own messages (ChatGPT-style). When
117
+ * provided, a pencil appears in the hover action bar; submitting replaces
118
+ * this message and everything after it with a fresh agent turn. */
119
+ onEditSubmit?: (newText: string) => void;
117
120
  }
118
121
  /**
119
122
  * Styled Message component with grid layout matching the main app.
@@ -166,17 +169,21 @@ declare const MessageComposer: react.ForwardRefExoticComponent<MessageComposerPr
166
169
  interface MessageListProps {
167
170
  /** Messages to render */
168
171
  children: ReactNode;
169
- /** Whether to auto-scroll to bottom */
172
+ /** Whether to auto-scroll to bottom while streaming (follows only when at the live edge) */
170
173
  autoScroll?: boolean;
171
174
  /** Whether to show the scroll-to-bottom button */
172
175
  showScrollToBottom?: boolean;
173
- /** Additional CSS classes */
176
+ /** Additional CSS classes applied to the transcript container (e.g. horizontal padding) */
174
177
  className?: string;
175
178
  }
176
179
  /**
177
- * Styled MessageList with scrolling, spacing, and scroll-to-bottom button.
178
- * Uses the enhanced useAutoScroll hook directly instead of going through
179
- * the primitive, since we need reactive isAtBottom for the button.
180
+ * Styled MessageList scroll container for a chat transcript.
181
+ *
182
+ * Scroll behavior is provided by shadcn's `@shadcn/react` message-scroller
183
+ * engine (auto-follow while at the live edge, position preservation, scroll
184
+ * anchoring) rather than the legacy `useAutoScroll` hook. The public API is
185
+ * unchanged: pass message rows as `children`; each direct child is wrapped in a
186
+ * `MessageScroller.Item` for measurement and anchoring.
180
187
  */
181
188
  declare const MessageList: react.ForwardRefExoticComponent<MessageListProps & react.RefAttributes<HTMLDivElement>>;
182
189
 
@@ -248,7 +255,7 @@ interface MessageActionBarProps {
248
255
  * Action bar that appears on hover below assistant message bubbles.
249
256
  * Currently implements Copy; onRegenerate and onEdit are reserved for future use.
250
257
  */
251
- declare function MessageActionBar({ textContent, onRegenerate, onEdit, onReportIncorrect, onConfirmCorrect, className, }: MessageActionBarProps): react_jsx_runtime.JSX.Element;
258
+ declare function MessageActionBar({ textContent, onRegenerate, onEdit, onReportIncorrect, onConfirmCorrect, className, }: MessageActionBarProps): react.JSX.Element;
252
259
 
253
260
  interface ScrollToBottomButtonProps {
254
261
  /** Whether the viewport is at the bottom (hides button when true) */
@@ -263,7 +270,7 @@ interface ScrollToBottomButtonProps {
263
270
  * allowing them to quickly jump back to the latest messages.
264
271
  * Fades in/out based on scroll position.
265
272
  */
266
- declare function ScrollToBottomButton({ isAtBottom, onScrollToBottom, className, }: ScrollToBottomButtonProps): react_jsx_runtime.JSX.Element;
273
+ declare function ScrollToBottomButton({ isAtBottom, onScrollToBottom, className, }: ScrollToBottomButtonProps): react.JSX.Element;
267
274
 
268
275
  type ToolStatus = "running" | "complete" | "failed" | "pending";
269
276
  interface ToolStatusIndicatorProps {
@@ -281,7 +288,7 @@ interface ToolStatusIndicatorProps {
281
288
  * Shows tool name + status icon (spinner/check/X/clock).
282
289
  * Running state includes a subtle shimmer animation.
283
290
  */
284
- declare function ToolStatusIndicator({ toolName, status, description, className, }: ToolStatusIndicatorProps): react_jsx_runtime.JSX.Element;
291
+ declare function ToolStatusIndicator({ toolName, status, description, className, }: ToolStatusIndicatorProps): react.JSX.Element;
285
292
 
286
293
  interface ChatLayoutProps {
287
294
  /** Whether the chat is in empty state (no messages) */
@@ -344,4 +351,4 @@ interface WelcomeScreenProps {
344
351
  */
345
352
  declare const WelcomeScreen: react.ForwardRefExoticComponent<WelcomeScreenProps & react.RefAttributes<HTMLDivElement>>;
346
353
 
347
- export { AttachmentPreview as A, ChatContainer as C, MarkdownContent as M, ScrollToBottomButton as S, type ToolStatus as T, WelcomeScreen as W, type AttachmentPreviewProps as a, Avatar as b, type AvatarProps as c, type ChatContainerProps as d, ChatLayout as e, type ChatLayoutProps as f, type MarkdownContentProps as g, Message as h, MessageActionBar as i, type MessageActionBarProps as j, MessageComposer as k, type MessageComposerProps as l, MessageList as m, type MessageListProps as n, type MessageProps as o, type ScrollToBottomButtonProps as p, StreamingText as q, type StreamingTextProps as r, SuggestedActions as s, type SuggestedActionsProps as t, ToolStatusIndicator as u, type ToolStatusIndicatorProps as v, TypingIndicator as w, type TypingIndicatorProps as x, type WelcomeScreenProps as y };
354
+ export { AttachmentPreview as A, ChatContainer as C, MarkdownContent as M, ScrollToBottomButton as S, ToolStatusIndicator as T, WelcomeScreen as W, Avatar as a, ChatLayout as b, Message as c, MessageActionBar as d, MessageComposer as e, MessageList as f, StreamingText as g, SuggestedActions as h, TypingIndicator as i, type AttachmentPreviewProps as j, type AvatarProps as k, type ChatContainerProps as l, type ChatLayoutProps as m, type MarkdownContentProps as n, type MessageActionBarProps as o, type MessageComposerProps as p, type MessageListProps as q, type MessageProps as r, type ScrollToBottomButtonProps as s, type StreamingTextProps as t, type SuggestedActionsProps as u, type ToolStatus as v, type ToolStatusIndicatorProps as w, type TypingIndicatorProps as x, type WelcomeScreenProps as y };
@@ -1,6 +1,6 @@
1
1
  import * as react from 'react';
2
2
  import { HTMLAttributes, ReactNode, TextareaHTMLAttributes, ButtonHTMLAttributes } from 'react';
3
- import { M as MessageData, b as ParticipantRole } from './message-D2ElX5k7.js';
3
+ import { M as MessageData, P as ParticipantRole } from './message-D0oMw3tR.js';
4
4
 
5
5
  interface MessageContextValue {
6
6
  message: MessageData;
@@ -106,4 +106,4 @@ interface AvatarProps extends HTMLAttributes<HTMLDivElement> {
106
106
  */
107
107
  declare const Avatar: react.ForwardRefExoticComponent<AvatarProps & react.RefAttributes<HTMLDivElement>>;
108
108
 
109
- export { Avatar as A, ComposerContext as C, Message as M, type AvatarProps as a, ComposerInput as b, type ComposerInputProps as c, ComposerSubmit as d, type ComposerSubmitProps as e, MessageComposer as f, type MessageComposerProps as g, MessageContent as h, type MessageContentProps as i, MessageContext as j, type MessageProps as k, MessageTimestamp as l, type MessageTimestampProps as m, useMessage as n, useComposer as u };
109
+ export { Avatar as A, ComposerContext as C, MessageComposer as M, ComposerInput as a, ComposerSubmit as b, MessageContent as c, MessageContext as d, Message as e, MessageTimestamp as f, useMessage as g, type AvatarProps as h, type ComposerInputProps as i, type ComposerSubmitProps as j, type MessageComposerProps as k, type MessageContentProps as l, type MessageProps as m, type MessageTimestampProps as n, useComposer as u };