@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,9 +1,8 @@
1
- import { c as CommandProvider, C as ChatComposerCommand, a as ChatComposerSubmitPayload } from '../types-DeHbndy0.js';
2
- export { b as ChatComposerToken } from '../types-DeHbndy0.js';
1
+ import { C as CommandProvider, a as ChatComposerCommand, b as ChatComposerSubmitPayload } from '../types-Du00UBst.js';
2
+ export { c as ChatComposerToken } from '../types-Du00UBst.js';
3
3
  import { DecoratorNode, NodeKey, Spread, SerializedLexicalNode, DOMExportOutput, DOMConversionMap, LexicalNode } from 'lexical';
4
4
  import * as react from 'react';
5
5
  import { ReactNode } from 'react';
6
- import * as react_jsx_runtime from 'react/jsx-runtime';
7
6
 
8
7
  type SerializedCommandTokenNode = Spread<{
9
8
  commandId: string;
@@ -137,7 +136,7 @@ interface CommandTokenViewProps {
137
136
  /** Pass-through id for ARIA wiring (used by typeahead). */
138
137
  htmlId?: string;
139
138
  }
140
- declare function CommandTokenView({ id, kind, label, description, icon, tag, variant, selected, onMouseEnter, onMouseDown, htmlId, }: CommandTokenViewProps): react_jsx_runtime.JSX.Element;
139
+ declare function CommandTokenView({ id, kind, label, description, icon, tag, variant, selected, onMouseEnter, onMouseDown, htmlId, }: CommandTokenViewProps): react.JSX.Element;
141
140
 
142
141
  interface LexicalChatInputHandle {
143
142
  /** Clear the editor contents and reset history. */
@@ -146,6 +145,12 @@ interface LexicalChatInputHandle {
146
145
  submit: () => void;
147
146
  /** Focus the editor. */
148
147
  focus: () => void;
148
+ /**
149
+ * Insert text at the caret (or at the end when there is no selection) and
150
+ * focus the editor. Used by toolbar buttons to type trigger characters
151
+ * like "/" or "@" so the matching typeahead opens.
152
+ */
153
+ insertText: (text: string) => void;
149
154
  }
150
155
  interface LexicalChatInputProps {
151
156
  placeholder?: string;
@@ -153,6 +158,8 @@ interface LexicalChatInputProps {
153
158
  className?: string;
154
159
  /** Tailwind classes applied to the inner ContentEditable element. */
155
160
  inputClassName?: string;
161
+ /** Tailwind classes applied to the placeholder overlay (e.g. font sizing). */
162
+ placeholderClassName?: string;
156
163
  /** Slot for additional Lexical plugins (mounted inside LexicalComposer). */
157
164
  children?: ReactNode;
158
165
  /**
@@ -1,2 +1,2 @@
1
- export{d as $createCommandTokenNode,e as $isCommandTokenNode,f as COMMAND_TOKEN_REGEX,c as CommandTokenNode,h as CommandTokenPlugin,b as CommandTokenView,i as LexicalChatInput,g as findInlineCommandTokens}from'../chunk-IUCKTDTZ.js';//# sourceMappingURL=index.js.map
1
+ export{d as $createCommandTokenNode,e as $isCommandTokenNode,f as COMMAND_TOKEN_REGEX,c as CommandTokenNode,h as CommandTokenPlugin,b as CommandTokenView,i as LexicalChatInput,g as findInlineCommandTokens}from'../chunk-ZP4FGAAH.js';//# sourceMappingURL=index.js.map
2
2
  //# sourceMappingURL=index.js.map
@@ -1,8 +1,7 @@
1
- import * as react_jsx_runtime from 'react/jsx-runtime';
2
1
  import * as react from 'react';
3
2
  import { ReactNode } from 'react';
4
- import { C as ChatMessage, b as ParticipantRole } from '../message-D2ElX5k7.js';
5
- import { V as VisualizationActionEvent } from '../streaming-B_u_jno6.js';
3
+ import { C as ChatMessage, P as ParticipantRole } from '../message-D0oMw3tR.js';
4
+ import { f as VisualizationActionEvent } from '../streaming-CmQo_OOA.js';
6
5
 
7
6
  interface ChatContextValue {
8
7
  /** List of messages in the conversation */
@@ -50,7 +49,7 @@ interface ChatProviderProps {
50
49
  tag?: ReactNode;
51
50
  } | undefined;
52
51
  }
53
- declare function ChatProvider({ children, messages, isStreaming, streamingMessageId, viewerRole, onSendMessage, onStopStreaming, onRetryLastMessage, customData, onVisualizationAction, resolveCommandToken, }: ChatProviderProps): react_jsx_runtime.JSX.Element;
52
+ declare function ChatProvider({ children, messages, isStreaming, streamingMessageId, viewerRole, onSendMessage, onStopStreaming, onRetryLastMessage, customData, onVisualizationAction, resolveCommandToken, }: ChatProviderProps): react.JSX.Element;
54
53
  declare function useChatContext(): ChatContextValue;
55
54
 
56
55
  export { ChatContext, type ChatContextValue, ChatProvider, type ChatProviderProps, useChatContext };
@@ -1,6 +1,6 @@
1
1
  import * as react from 'react';
2
2
  import { RefObject, KeyboardEvent } from 'react';
3
- import { m as StreamingOptions, S as StreamChunk } from '../streaming-B_u_jno6.js';
3
+ import { d as StreamingOptions, c as StreamChunk } from '../streaming-CmQo_OOA.js';
4
4
  import { B as BrandingData } from '../branding-NieTEGQf.js';
5
5
 
6
6
  interface UseAutoScrollOptions {
package/dist/index.d.ts CHANGED
@@ -1,15 +1,14 @@
1
- export { A as Attachment, C as ChatMessage, M as MessageData, a as MessageError, P as Participant, b as ParticipantRole, R as ReasoningChunk, S as SourceReference, c as SourceTypeConfig, d as SuggestedAction, e as SuggestedActionType } from './message-D2ElX5k7.js';
2
- export { S as StreamChunk, m as StreamingOptions, n as StreamingState } from './streaming-B_u_jno6.js';
1
+ export { A as Attachment, C as ChatMessage, M as MessageData, a as MessageError, b as Participant, P as ParticipantRole, R as ReasoningChunk, S as SourceReference, c as SourceTypeConfig, d as SuggestedAction, e as SuggestedActionType } from './message-D0oMw3tR.js';
2
+ export { a as ClarificationAnswer, C as ClarificationData, b as ClarificationQuestion, c as StreamChunk, d as StreamingOptions, e as StreamingState } from './streaming-CmQo_OOA.js';
3
3
  export { B as BrandingData } from './branding-NieTEGQf.js';
4
4
  export { ChatContext, ChatContextValue, ChatProvider, ChatProviderProps, useChatContext } from './context/index.js';
5
5
  export { useAttachments, useAutoScroll, useBrandingCSSVars, useMessageComposer, useScrollLock, useStreaming } from './hooks/index.js';
6
- export { A as AvatarPrimitive, C as ComposerContext, b as ComposerInput, d as ComposerSubmit, f as MessageComposerPrimitive, h as MessageContentPrimitive, j as MessageContext, M as MessagePrimitive, l as MessageTimestampPrimitive, u as useComposer, n as useMessage } from './avatar-DnLePg72.js';
6
+ export { A as AvatarPrimitive, C as ComposerContext, a as ComposerInput, b as ComposerSubmit, M as MessageComposerPrimitive, c as MessageContentPrimitive, d as MessageContext, e as MessagePrimitive, f as MessageTimestampPrimitive, u as useComposer, g as useMessage } from './avatar-CD685KQV.js';
7
7
  export { ActionButton, MessageList as MessageListPrimitive, StreamingText as StreamingTextPrimitive, SuggestedActionsContext, SuggestedActions as SuggestedActionsPrimitive, TypingIndicator as TypingIndicatorPrimitive, useSuggestedActions } from './primitives/index.js';
8
- export { A as AttachmentPreview, b as Avatar, C as ChatContainer, e as ChatLayout, M as MarkdownContent, h as Message, i as MessageActionBar, k as MessageComposer, m as MessageList, S as ScrollToBottomButton, q as StreamingText, s as SuggestedActions, u as ToolStatusIndicator, w as TypingIndicator, W as WelcomeScreen } from './WelcomeScreen-CVxniqqK.js';
8
+ export { A as AttachmentPreview, a as Avatar, C as ChatContainer, b as ChatLayout, M as MarkdownContent, c as Message, d as MessageActionBar, e as MessageComposer, f as MessageList, S as ScrollToBottomButton, g as StreamingText, h as SuggestedActions, T as ToolStatusIndicator, i as TypingIndicator, W as WelcomeScreen } from './WelcomeScreen-EGO8Qt2y.js';
9
9
  import { ClassValue } from 'clsx';
10
- import 'react/jsx-runtime';
11
10
  import 'react';
12
- import './types-DeHbndy0.js';
11
+ import './types-Du00UBst.js';
13
12
 
14
13
  /**
15
14
  * Utility function to merge Tailwind CSS classes with proper precedence.
package/dist/index.js CHANGED
@@ -1,2 +1,2 @@
1
- export{a as AttachmentPreview,b as Avatar,c as ChatContainer,aa as ChatLayout,e as MarkdownContent,U as Message,k as MessageActionBar,V as MessageComposer,X as MessageList,W as ScrollToBottomButton,w as StreamingText,x as SuggestedActions,$ as ToolStatusIndicator,Z as TypingIndicator,ba as WelcomeScreen,T as parseContentWithInlineMarkers}from'./chunk-ERJKVQQT.js';export{q as ActionButton,l as AvatarPrimitive,g as ComposerContext,j as ComposerInput,k as ComposerSubmit,i as MessageComposerPrimitive,d as MessageContentPrimitive,a as MessageContext,f as MessageListPrimitive,c as MessagePrimitive,e as MessageTimestampPrimitive,m as StreamingTextPrimitive,n as SuggestedActionsContext,p as SuggestedActionsPrimitive,r as TypingIndicatorPrimitive,h as useComposer,b as useMessage,o as useSuggestedActions}from'./chunk-6RN7SUWT.js';export{b as useAttachments,a as useStreaming}from'./chunk-WG77GQR3.js';export{a as useScrollLock}from'./chunk-D2PFIJNZ.js';export{a as useAutoScroll,b as useMessageComposer}from'./chunk-4WWJTYYA.js';export{a as ChatContext,b as ChatProvider,c as useChatContext}from'./chunk-NKLA5PPB.js';export{a as chatTokens}from'./chunk-NG4HKXYB.js';export{a as getContrastTextColor,b as useBrandingCSSVars}from'./chunk-QECTWT2H.js';export{a as cn}from'./chunk-IUCKTDTZ.js';var i={hour:"numeric",minute:"2-digit",hour12:true},m={month:"short",day:"numeric"},se={...m,year:"numeric",...i};function u(t){let e=typeof t=="string"?new Date(t):t,o=new Date;return e.getDate()===o.getDate()&&e.getMonth()===o.getMonth()&&e.getFullYear()===o.getFullYear()?e.toLocaleTimeString("en-US",i):e.getFullYear()===o.getFullYear()?`${e.toLocaleDateString("en-US",m)}, ${e.toLocaleTimeString("en-US",i)}`:e.toLocaleDateString("en-US",se)}function re(t){let e=typeof t=="string"?new Date(t):t,g=new Date().getTime()-e.getTime(),n=Math.floor(g/1e3),s=Math.floor(n/60),r=Math.floor(s/60),a=Math.floor(r/24);return n<60?"just now":s<60?`${s} minute${s===1?"":"s"} ago`:r<24?`${r} hour${r===1?"":"s"} ago`:a<7?`${a} day${a===1?"":"s"} ago`:u(e)}export{u as formatMessageTime,re as formatRelativeTime};//# sourceMappingURL=index.js.map
1
+ export{a as AttachmentPreview,b as Avatar,c as ChatContainer,ba as ChatLayout,f as MarkdownContent,V as Message,l as MessageActionBar,W as MessageComposer,Y as MessageList,X as ScrollToBottomButton,x as StreamingText,y as SuggestedActions,aa as ToolStatusIndicator,_ as TypingIndicator,ca as WelcomeScreen,U as parseContentWithInlineMarkers}from'./chunk-HYFMOOLH.js';export{q as ActionButton,l as AvatarPrimitive,g as ComposerContext,j as ComposerInput,k as ComposerSubmit,i as MessageComposerPrimitive,d as MessageContentPrimitive,a as MessageContext,f as MessageListPrimitive,c as MessagePrimitive,e as MessageTimestampPrimitive,m as StreamingTextPrimitive,n as SuggestedActionsContext,p as SuggestedActionsPrimitive,r as TypingIndicatorPrimitive,h as useComposer,b as useMessage,o as useSuggestedActions}from'./chunk-6RN7SUWT.js';export{b as useAttachments,a as useStreaming}from'./chunk-WG77GQR3.js';export{a as useScrollLock}from'./chunk-D2PFIJNZ.js';export{a as useAutoScroll,b as useMessageComposer}from'./chunk-4WWJTYYA.js';export{a as ChatContext,b as ChatProvider,c as useChatContext}from'./chunk-NKLA5PPB.js';export{a as chatTokens}from'./chunk-NG4HKXYB.js';export{a as getContrastTextColor,b as useBrandingCSSVars}from'./chunk-QECTWT2H.js';export{a as cn}from'./chunk-ZP4FGAAH.js';var i={hour:"numeric",minute:"2-digit",hour12:true},m={month:"short",day:"numeric"},se={...m,year:"numeric",...i};function c(t){let e=typeof t=="string"?new Date(t):t,o=new Date;return e.getDate()===o.getDate()&&e.getMonth()===o.getMonth()&&e.getFullYear()===o.getFullYear()?e.toLocaleTimeString("en-US",i):e.getFullYear()===o.getFullYear()?`${e.toLocaleDateString("en-US",m)}, ${e.toLocaleTimeString("en-US",i)}`:e.toLocaleDateString("en-US",se)}function re(t){let e=typeof t=="string"?new Date(t):t,g=new Date().getTime()-e.getTime(),n=Math.floor(g/1e3),s=Math.floor(n/60),r=Math.floor(s/60),a=Math.floor(r/24);return n<60?"just now":s<60?`${s} minute${s===1?"":"s"} ago`:r<24?`${r} hour${r===1?"":"s"} ago`:a<7?`${a} day${a===1?"":"s"} ago`:c(e)}export{c as formatMessageTime,re as formatRelativeTime};//# sourceMappingURL=index.js.map
2
2
  //# sourceMappingURL=index.js.map
package/dist/index.js.map CHANGED
@@ -1 +1 @@
1
- {"version":3,"sources":["../src/utils/format-date.ts"],"names":["TIME_FORMAT","DATE_FORMAT","FULL_FORMAT","formatMessageTime","date","d","now","formatRelativeTime","diffMs","diffSeconds","diffMinutes","diffHours","diffDays"],"mappings":"4wCAIA,IAAMA,EAA0C,CAC9C,IAAA,CAAM,UACN,MAAA,CAAQ,SAAA,CACR,OAAQ,IACV,CAAA,CAEMC,CAAAA,CAA0C,CAC9C,MAAO,OAAA,CACP,GAAA,CAAK,SACP,CAAA,CAEMC,EAAAA,CAA0C,CAC9C,GAAGD,CAAAA,CACH,IAAA,CAAM,SAAA,CACN,GAAGD,CACL,CAAA,CAQO,SAASG,CAAAA,CAAkBC,CAAAA,CAA6B,CAC7D,IAAMC,CAAAA,CAAI,OAAOD,CAAAA,EAAS,SAAW,IAAI,IAAA,CAAKA,CAAI,CAAA,CAAIA,CAAAA,CAChDE,EAAM,IAAI,IAAA,CAOhB,OAJED,CAAAA,CAAE,SAAQ,GAAMC,CAAAA,CAAI,SAAQ,EAC5BD,CAAAA,CAAE,UAAS,GAAMC,CAAAA,CAAI,QAAA,EAAS,EAC9BD,EAAE,WAAA,EAAY,GAAMC,EAAI,WAAA,EAAY,CAG7BD,EAAE,kBAAA,CAAmB,OAAA,CAASL,CAAW,CAAA,CAG/BK,EAAE,WAAA,EAAY,GAAMC,EAAI,WAAA,EAAY,CAG9C,GAAGD,CAAAA,CAAE,kBAAA,CAAmB,QAASJ,CAAW,CAAC,KAAKI,CAAAA,CAAE,kBAAA,CAAmB,QAASL,CAAW,CAAC,GAG9FK,CAAAA,CAAE,kBAAA,CAAmB,OAAA,CAASH,EAAW,CAClD,CAKO,SAASK,GAAmBH,CAAAA,CAA6B,CAC9D,IAAMC,CAAAA,CAAI,OAAOD,CAAAA,EAAS,QAAA,CAAW,IAAI,IAAA,CAAKA,CAAI,EAAIA,CAAAA,CAEhDI,CAAAA,CADM,IAAI,IAAA,EAAK,CACF,OAAA,EAAQ,CAAIH,EAAE,OAAA,EAAQ,CACnCI,EAAc,IAAA,CAAK,KAAA,CAAMD,EAAS,GAAI,CAAA,CACtCE,CAAAA,CAAc,IAAA,CAAK,MAAMD,CAAAA,CAAc,EAAE,EACzCE,CAAAA,CAAY,IAAA,CAAK,MAAMD,CAAAA,CAAc,EAAE,CAAA,CACvCE,CAAAA,CAAW,KAAK,KAAA,CAAMD,CAAAA,CAAY,EAAE,CAAA,CAE1C,OAAIF,EAAc,EAAA,CACT,UAAA,CAGLC,CAAAA,CAAc,EAAA,CACT,GAAGA,CAAW,CAAA,OAAA,EAAUA,IAAgB,CAAA,CAAI,EAAA,CAAK,GAAG,CAAA,IAAA,CAAA,CAGzDC,CAAAA,CAAY,EAAA,CACP,CAAA,EAAGA,CAAS,CAAA,KAAA,EAAQA,CAAAA,GAAc,EAAI,EAAA,CAAK,GAAG,OAGnDC,CAAAA,CAAW,CAAA,CACN,GAAGA,CAAQ,CAAA,IAAA,EAAOA,IAAa,CAAA,CAAI,EAAA,CAAK,GAAG,CAAA,IAAA,CAAA,CAG7CT,CAAAA,CAAkBE,CAAC,CAC5B","file":"index.js","sourcesContent":["/**\n * Format a date for display in chat messages.\n */\n\nconst TIME_FORMAT: Intl.DateTimeFormatOptions = {\n hour: \"numeric\",\n minute: \"2-digit\",\n hour12: true,\n};\n\nconst DATE_FORMAT: Intl.DateTimeFormatOptions = {\n month: \"short\",\n day: \"numeric\",\n};\n\nconst FULL_FORMAT: Intl.DateTimeFormatOptions = {\n ...DATE_FORMAT,\n year: \"numeric\",\n ...TIME_FORMAT,\n};\n\n/**\n * Format a timestamp for display.\n * - Today: \"2:30 PM\"\n * - This year: \"Dec 15, 2:30 PM\"\n * - Other years: \"Dec 15, 2024, 2:30 PM\"\n */\nexport function formatMessageTime(date: Date | string): string {\n const d = typeof date === \"string\" ? new Date(date) : date;\n const now = new Date();\n\n const isToday =\n d.getDate() === now.getDate() &&\n d.getMonth() === now.getMonth() &&\n d.getFullYear() === now.getFullYear();\n\n if (isToday) {\n return d.toLocaleTimeString(\"en-US\", TIME_FORMAT);\n }\n\n const isThisYear = d.getFullYear() === now.getFullYear();\n\n if (isThisYear) {\n return `${d.toLocaleDateString(\"en-US\", DATE_FORMAT)}, ${d.toLocaleTimeString(\"en-US\", TIME_FORMAT)}`;\n }\n\n return d.toLocaleDateString(\"en-US\", FULL_FORMAT);\n}\n\n/**\n * Format a relative time (e.g., \"2 minutes ago\").\n */\nexport function formatRelativeTime(date: Date | string): string {\n const d = typeof date === \"string\" ? new Date(date) : date;\n const now = new Date();\n const diffMs = now.getTime() - d.getTime();\n const diffSeconds = Math.floor(diffMs / 1000);\n const diffMinutes = Math.floor(diffSeconds / 60);\n const diffHours = Math.floor(diffMinutes / 60);\n const diffDays = Math.floor(diffHours / 24);\n\n if (diffSeconds < 60) {\n return \"just now\";\n }\n\n if (diffMinutes < 60) {\n return `${diffMinutes} minute${diffMinutes === 1 ? \"\" : \"s\"} ago`;\n }\n\n if (diffHours < 24) {\n return `${diffHours} hour${diffHours === 1 ? \"\" : \"s\"} ago`;\n }\n\n if (diffDays < 7) {\n return `${diffDays} day${diffDays === 1 ? \"\" : \"s\"} ago`;\n }\n\n return formatMessageTime(d);\n}\n"]}
1
+ {"version":3,"sources":["../src/utils/format-date.ts"],"names":["TIME_FORMAT","DATE_FORMAT","FULL_FORMAT","formatMessageTime","date","d","now","formatRelativeTime","diffMs","diffSeconds","diffMinutes","diffHours","diffDays"],"mappings":"6wCAIA,IAAMA,EAA0C,CAC9C,IAAA,CAAM,UACN,MAAA,CAAQ,SAAA,CACR,OAAQ,IACV,CAAA,CAEMC,CAAAA,CAA0C,CAC9C,MAAO,OAAA,CACP,GAAA,CAAK,SACP,CAAA,CAEMC,EAAAA,CAA0C,CAC9C,GAAGD,CAAAA,CACH,IAAA,CAAM,SAAA,CACN,GAAGD,CACL,CAAA,CAQO,SAASG,CAAAA,CAAkBC,CAAAA,CAA6B,CAC7D,IAAMC,CAAAA,CAAI,OAAOD,CAAAA,EAAS,SAAW,IAAI,IAAA,CAAKA,CAAI,CAAA,CAAIA,CAAAA,CAChDE,EAAM,IAAI,IAAA,CAOhB,OAJED,CAAAA,CAAE,SAAQ,GAAMC,CAAAA,CAAI,SAAQ,EAC5BD,CAAAA,CAAE,UAAS,GAAMC,CAAAA,CAAI,QAAA,EAAS,EAC9BD,EAAE,WAAA,EAAY,GAAMC,EAAI,WAAA,EAAY,CAG7BD,EAAE,kBAAA,CAAmB,OAAA,CAASL,CAAW,CAAA,CAG/BK,EAAE,WAAA,EAAY,GAAMC,EAAI,WAAA,EAAY,CAG9C,GAAGD,CAAAA,CAAE,kBAAA,CAAmB,QAASJ,CAAW,CAAC,KAAKI,CAAAA,CAAE,kBAAA,CAAmB,QAASL,CAAW,CAAC,GAG9FK,CAAAA,CAAE,kBAAA,CAAmB,OAAA,CAASH,EAAW,CAClD,CAKO,SAASK,GAAmBH,CAAAA,CAA6B,CAC9D,IAAMC,CAAAA,CAAI,OAAOD,CAAAA,EAAS,QAAA,CAAW,IAAI,IAAA,CAAKA,CAAI,EAAIA,CAAAA,CAEhDI,CAAAA,CADM,IAAI,IAAA,EAAK,CACF,OAAA,EAAQ,CAAIH,EAAE,OAAA,EAAQ,CACnCI,EAAc,IAAA,CAAK,KAAA,CAAMD,EAAS,GAAI,CAAA,CACtCE,CAAAA,CAAc,IAAA,CAAK,MAAMD,CAAAA,CAAc,EAAE,EACzCE,CAAAA,CAAY,IAAA,CAAK,MAAMD,CAAAA,CAAc,EAAE,CAAA,CACvCE,CAAAA,CAAW,KAAK,KAAA,CAAMD,CAAAA,CAAY,EAAE,CAAA,CAE1C,OAAIF,EAAc,EAAA,CACT,UAAA,CAGLC,CAAAA,CAAc,EAAA,CACT,GAAGA,CAAW,CAAA,OAAA,EAAUA,IAAgB,CAAA,CAAI,EAAA,CAAK,GAAG,CAAA,IAAA,CAAA,CAGzDC,CAAAA,CAAY,EAAA,CACP,CAAA,EAAGA,CAAS,CAAA,KAAA,EAAQA,CAAAA,GAAc,EAAI,EAAA,CAAK,GAAG,OAGnDC,CAAAA,CAAW,CAAA,CACN,GAAGA,CAAQ,CAAA,IAAA,EAAOA,IAAa,CAAA,CAAI,EAAA,CAAK,GAAG,CAAA,IAAA,CAAA,CAG7CT,CAAAA,CAAkBE,CAAC,CAC5B","file":"index.js","sourcesContent":["/**\n * Format a date for display in chat messages.\n */\n\nconst TIME_FORMAT: Intl.DateTimeFormatOptions = {\n hour: \"numeric\",\n minute: \"2-digit\",\n hour12: true,\n};\n\nconst DATE_FORMAT: Intl.DateTimeFormatOptions = {\n month: \"short\",\n day: \"numeric\",\n};\n\nconst FULL_FORMAT: Intl.DateTimeFormatOptions = {\n ...DATE_FORMAT,\n year: \"numeric\",\n ...TIME_FORMAT,\n};\n\n/**\n * Format a timestamp for display.\n * - Today: \"2:30 PM\"\n * - This year: \"Dec 15, 2:30 PM\"\n * - Other years: \"Dec 15, 2024, 2:30 PM\"\n */\nexport function formatMessageTime(date: Date | string): string {\n const d = typeof date === \"string\" ? new Date(date) : date;\n const now = new Date();\n\n const isToday =\n d.getDate() === now.getDate() &&\n d.getMonth() === now.getMonth() &&\n d.getFullYear() === now.getFullYear();\n\n if (isToday) {\n return d.toLocaleTimeString(\"en-US\", TIME_FORMAT);\n }\n\n const isThisYear = d.getFullYear() === now.getFullYear();\n\n if (isThisYear) {\n return `${d.toLocaleDateString(\"en-US\", DATE_FORMAT)}, ${d.toLocaleTimeString(\"en-US\", TIME_FORMAT)}`;\n }\n\n return d.toLocaleDateString(\"en-US\", FULL_FORMAT);\n}\n\n/**\n * Format a relative time (e.g., \"2 minutes ago\").\n */\nexport function formatRelativeTime(date: Date | string): string {\n const d = typeof date === \"string\" ? new Date(date) : date;\n const now = new Date();\n const diffMs = now.getTime() - d.getTime();\n const diffSeconds = Math.floor(diffMs / 1000);\n const diffMinutes = Math.floor(diffSeconds / 60);\n const diffHours = Math.floor(diffMinutes / 60);\n const diffDays = Math.floor(diffHours / 24);\n\n if (diffSeconds < 60) {\n return \"just now\";\n }\n\n if (diffMinutes < 60) {\n return `${diffMinutes} minute${diffMinutes === 1 ? \"\" : \"s\"} ago`;\n }\n\n if (diffHours < 24) {\n return `${diffHours} hour${diffHours === 1 ? \"\" : \"s\"} ago`;\n }\n\n if (diffDays < 7) {\n return `${diffDays} day${diffDays === 1 ? \"\" : \"s\"} ago`;\n }\n\n return formatMessageTime(d);\n}\n"]}
@@ -1,4 +1,4 @@
1
- import { k as StreamingChunk, d as ClarificationData, s as ToolApprovalData, M as MediaChunkData, A as ArtifactChunkData } from './streaming-B_u_jno6.js';
1
+ import { S as StreamingChunk, C as ClarificationData, T as ToolApprovalData, M as MediaChunkData, A as ArtifactChunkData } from './streaming-CmQo_OOA.js';
2
2
 
3
3
  /**
4
4
  * Citation source types for AI-generated content.
@@ -90,4 +90,4 @@ interface ReasoningChunk {
90
90
  timestamp: string | Date;
91
91
  }
92
92
 
93
- export type { Attachment as A, ChatMessage as C, MessageData as M, Participant as P, ReasoningChunk as R, SourceReference as S, MessageError as a, ParticipantRole as b, SourceTypeConfig as c, SuggestedAction as d, SuggestedActionType as e };
93
+ export type { Attachment as A, ChatMessage as C, MessageData as M, ParticipantRole as P, ReasoningChunk as R, SourceReference as S, MessageError as a, Participant as b, SourceTypeConfig as c, SuggestedAction as d, SuggestedActionType as e };
@@ -1,8 +1,8 @@
1
- export { A as Avatar, a as AvatarProps, C as ComposerContext, b as ComposerInput, c as ComposerInputProps, d as ComposerSubmit, e as ComposerSubmitProps, M as Message, f as MessageComposer, g as MessageComposerProps, h as MessageContent, i as MessageContentProps, j as MessageContext, k as MessageProps, l as MessageTimestamp, m as MessageTimestampProps, u as useComposer, n as useMessage } from '../avatar-DnLePg72.js';
1
+ export { A as Avatar, h as AvatarProps, C as ComposerContext, a as ComposerInput, i as ComposerInputProps, b as ComposerSubmit, j as ComposerSubmitProps, e as Message, M as MessageComposer, k as MessageComposerProps, c as MessageContent, l as MessageContentProps, d as MessageContext, m as MessageProps, f as MessageTimestamp, n as MessageTimestampProps, u as useComposer, g as useMessage } from '../avatar-CD685KQV.js';
2
2
  import * as react from 'react';
3
3
  import { HTMLAttributes, ReactNode, ButtonHTMLAttributes } from 'react';
4
- import { d as SuggestedAction } from '../message-D2ElX5k7.js';
5
- import '../streaming-B_u_jno6.js';
4
+ import { d as SuggestedAction } from '../message-D0oMw3tR.js';
5
+ import '../streaming-CmQo_OOA.js';
6
6
 
7
7
  interface MessageListProps extends HTMLAttributes<HTMLDivElement> {
8
8
  /** Messages to render */
@@ -70,16 +70,56 @@ interface SubagentChunkData {
70
70
  durationMs?: number;
71
71
  nestedChunks: StreamingChunk[];
72
72
  }
73
- interface ClarificationData {
73
+ interface ClarificationQuestion {
74
74
  question: string;
75
- options?: string[];
75
+ options: string[];
76
+ /** When true the user may pick several options (checkboxes). */
77
+ multiSelect?: boolean;
78
+ /**
79
+ * Stable slug identifying the question's subject (e.g. "daily_budget"). Set by
80
+ * the agent; carried through so the answer is mapped back to it structurally —
81
+ * no parsing of formatted answer text.
82
+ */
83
+ key?: string;
84
+ /**
85
+ * When true the panel renders an inline "Other" choice with a text input so
86
+ * the user can type a custom value INSTEAD of picking an option. The typed
87
+ * value is submitted together with the other answers in one response — no
88
+ * extra "what would you like?" round trip.
89
+ */
90
+ allowFreeText?: boolean;
91
+ /** Wire-format aliases: the server emits snake_case question dicts verbatim.
92
+ * The panel resolves either casing — keep both for pass-through safety. */
93
+ multi_select?: boolean;
94
+ allow_free_text?: boolean;
95
+ }
96
+ /**
97
+ * A structured answer to one clarification question. Emitted by the panel and sent
98
+ * in the answer message metadata so the server records the established fact by
99
+ * (key, selected) deterministically instead of regex-parsing a "Q → A" string.
100
+ */
101
+ interface ClarificationAnswer {
102
+ key?: string;
103
+ question: string;
104
+ selected: string[];
105
+ }
106
+ interface ClarificationData {
107
+ /** Multiple-choice questions to put to the user (current shape). */
108
+ questions?: ClarificationQuestion[];
76
109
  context?: string;
110
+ /** @deprecated legacy single-question text, kept for rendering old history. */
111
+ question?: string;
112
+ /** @deprecated legacy single-question options. */
113
+ options?: string[];
114
+ /** @deprecated legacy free-text flag, no longer emitted. */
77
115
  allowFreeText?: boolean;
78
116
  subtaskId?: number;
79
117
  subtaskDescription?: string;
80
118
  subagentName?: string;
81
119
  subagentRole?: string;
82
120
  toolCallId?: string;
121
+ /** Durable checkpoint interrupt id — echo back as `interrupt_id` metadata on the answer so the server can reject a stale panel. */
122
+ interruptId?: string;
83
123
  }
84
124
  interface ToolApprovalData {
85
125
  toolName: string;
@@ -87,8 +127,16 @@ interface ToolApprovalData {
87
127
  toolInputs: Record<string, unknown>;
88
128
  toolSchema?: Record<string, unknown>;
89
129
  toolCallId?: string;
130
+ /** Durable checkpoint interrupt id — echo back as `interrupt_id` metadata on the answer so the server can reject a stale panel. */
131
+ interruptId?: string;
90
132
  /** Human-readable tool identity surfaced in the approval eyebrow (e.g. "Yahoo Finance · Stock Basic Info"). Falls back to toolName when omitted. */
91
133
  toolLabel?: string;
134
+ /**
135
+ * Opaque, host-app-interpreted preview payload. chat-ui only transports this —
136
+ * it never reads its shape. Used by host apps to render a specialized approval
137
+ * surface (e.g. an ad-mutation before/after diff) in place of the generic card.
138
+ */
139
+ preview?: unknown;
92
140
  }
93
141
  type VisualizationType = "chart" | "table" | "card" | "kpi" | "code_preview" | "form";
94
142
  type ChartDataType = "line" | "bar" | "pie" | "area" | "scatter" | "composed";
@@ -389,4 +437,4 @@ type VisualizationActionEvent = {
389
437
  action: string;
390
438
  };
391
439
 
392
- export type { ArtifactChunkData as A, CardVisualizationData as C, Event as E, FollowupAction as F, KpiVisualizationData as K, MediaChunkData as M, ObservationEvent as O, PlanData as P, StreamChunk as S, TableVisualizationData as T, VisualizationActionEvent as V, ArtifactStatus as a, ChartVisualizationData as b, ChunkType as c, ClarificationData as d, CodePreviewVisualizationData as e, EventStatus as f, EventType as g, FormVisualizationData as h, PlanningEvent as i, ProgressData as j, StreamingChunk as k, StreamingMessage as l, StreamingOptions as m, StreamingState as n, SubTaskData as o, SubagentChunkData as p, SubtaskEvent as q, ThinkingEvent as r, ToolApprovalData as s, ToolEvent as t, VisualizationChunkData as u, VisualizationConfig as v, VisualizationType as w };
440
+ export type { ArtifactChunkData as A, ClarificationData as C, Event as E, FormVisualizationData as F, KpiVisualizationData as K, MediaChunkData as M, ObservationEvent as O, PlanData as P, StreamingChunk as S, ToolApprovalData as T, VisualizationChunkData as V, ClarificationAnswer as a, ClarificationQuestion as b, StreamChunk as c, StreamingOptions as d, StreamingState as e, VisualizationActionEvent as f, ChartVisualizationData as g, VisualizationConfig as h, TableVisualizationData as i, CardVisualizationData as j, CodePreviewVisualizationData as k, EventStatus as l, ArtifactStatus as m, ChunkType as n, EventType as o, FollowupAction as p, PlanningEvent as q, ProgressData as r, StreamingMessage as s, SubTaskData as t, SubagentChunkData as u, SubtaskEvent as v, ThinkingEvent as w, ToolEvent as x, VisualizationType as y };
@@ -1,15 +1,32 @@
1
- export { A as AttachmentPreview, a as AttachmentPreviewProps, b as Avatar, c as AvatarProps, C as ChatContainer, d as ChatContainerProps, e as ChatLayout, f as ChatLayoutProps, M as MarkdownContent, g as MarkdownContentProps, h as Message, i as MessageActionBar, j as MessageActionBarProps, k as MessageComposer, l as MessageComposerProps, m as MessageList, n as MessageListProps, o as MessageProps, S as ScrollToBottomButton, p as ScrollToBottomButtonProps, q as StreamingText, r as StreamingTextProps, s as SuggestedActions, t as SuggestedActionsProps, T as ToolStatus, u as ToolStatusIndicator, v as ToolStatusIndicatorProps, w as TypingIndicator, x as TypingIndicatorProps, W as WelcomeScreen, y as WelcomeScreenProps } from '../WelcomeScreen-CVxniqqK.js';
2
- import * as react_jsx_runtime from 'react/jsx-runtime';
1
+ export { A as AttachmentPreview, j as AttachmentPreviewProps, a as Avatar, k as AvatarProps, C as ChatContainer, l as ChatContainerProps, b as ChatLayout, m as ChatLayoutProps, M as MarkdownContent, n as MarkdownContentProps, c as Message, d as MessageActionBar, o as MessageActionBarProps, e as MessageComposer, p as MessageComposerProps, f as MessageList, q as MessageListProps, r as MessageProps, S as ScrollToBottomButton, s as ScrollToBottomButtonProps, g as StreamingText, t as StreamingTextProps, h as SuggestedActions, u as SuggestedActionsProps, v as ToolStatus, T as ToolStatusIndicator, w as ToolStatusIndicatorProps, i as TypingIndicator, x as TypingIndicatorProps, W as WelcomeScreen, y as WelcomeScreenProps } from '../WelcomeScreen-EGO8Qt2y.js';
2
+ import * as react from 'react';
3
3
  import react__default, { ReactNode, ComponentType } from 'react';
4
- import { A as Attachment, S as SourceReference } from '../message-D2ElX5k7.js';
5
- export { C as ChatMessage, M as MessageData, a as MessageError, P as Participant, b as ParticipantRole, c as SourceTypeConfig, d as SuggestedAction, e as SuggestedActionType } from '../message-D2ElX5k7.js';
6
- import { k as StreamingChunk, P as PlanData, d as ClarificationData, s as ToolApprovalData, u as VisualizationChunkData, V as VisualizationActionEvent, M as MediaChunkData, b as ChartVisualizationData, v as VisualizationConfig, T as TableVisualizationData, C as CardVisualizationData, K as KpiVisualizationData, e as CodePreviewVisualizationData, h as FormVisualizationData, A as ArtifactChunkData, E as Event, f as EventStatus } from '../streaming-B_u_jno6.js';
7
- export { a as ArtifactStatus, c as ChunkType, g as EventType, F as FollowupAction, O as ObservationEvent, i as PlanningEvent, j as ProgressData, l as StreamingMessage, o as SubTaskData, p as SubagentChunkData, q as SubtaskEvent, r as ThinkingEvent, t as ToolEvent, w as VisualizationType } from '../streaming-B_u_jno6.js';
4
+ import { A as Attachment, S as SourceReference } from '../message-D0oMw3tR.js';
5
+ export { C as ChatMessage, M as MessageData, a as MessageError, b as Participant, P as ParticipantRole, c as SourceTypeConfig, d as SuggestedAction, e as SuggestedActionType } from '../message-D0oMw3tR.js';
6
+ import { S as StreamingChunk, P as PlanData, C as ClarificationData, a as ClarificationAnswer, T as ToolApprovalData, V as VisualizationChunkData, f as VisualizationActionEvent, M as MediaChunkData, g as ChartVisualizationData, h as VisualizationConfig, i as TableVisualizationData, j as CardVisualizationData, K as KpiVisualizationData, k as CodePreviewVisualizationData, F as FormVisualizationData, A as ArtifactChunkData, E as Event, l as EventStatus } from '../streaming-CmQo_OOA.js';
7
+ export { m as ArtifactStatus, n as ChunkType, o as EventType, p as FollowupAction, O as ObservationEvent, q as PlanningEvent, r as ProgressData, s as StreamingMessage, t as SubTaskData, u as SubagentChunkData, v as SubtaskEvent, w as ThinkingEvent, x as ToolEvent, y as VisualizationType } from '../streaming-CmQo_OOA.js';
8
8
  import { z, ZodSchema } from 'zod';
9
9
  export { ChatContextValue, ChatProvider, ChatProviderProps, useChatContext } from '../context/index.js';
10
10
  export { B as BrandingData } from '../branding-NieTEGQf.js';
11
- export { u as useComposer, n as useMessage } from '../avatar-DnLePg72.js';
12
- import '../types-DeHbndy0.js';
11
+ export { u as useComposer, g as useMessage } from '../avatar-CD685KQV.js';
12
+ import '../types-Du00UBst.js';
13
+
14
+ /**
15
+ * Bottom toolbar row for composers: attach button, an Enter-to-send hint that
16
+ * fades in while the composer is focused (requires `group` on the shell), and
17
+ * a trailing slot for the send/stop button.
18
+ */
19
+ declare function ComposerToolbar({ onAttachClick, disabled, hint, showHint, endSlot, className, }: {
20
+ /** Renders the "+" attach button when provided. */
21
+ onAttachClick?: () => void;
22
+ disabled?: boolean;
23
+ /** Keyboard hint shown while focused. Pass showHint={false} to hide. */
24
+ hint?: string;
25
+ showHint?: boolean;
26
+ /** Send / stop button. */
27
+ endSlot?: ReactNode;
28
+ className?: string;
29
+ }): react.JSX.Element;
13
30
 
14
31
  interface LoadingDotsProps {
15
32
  /** Size variant */
@@ -20,7 +37,7 @@ interface LoadingDotsProps {
20
37
  /**
21
38
  * Animated loading dots indicator
22
39
  */
23
- declare function LoadingDots({ size, className }: LoadingDotsProps): react_jsx_runtime.JSX.Element;
40
+ declare function LoadingDots({ size, className }: LoadingDotsProps): react.JSX.Element;
24
41
 
25
42
  interface TimeMarkerProps {
26
43
  /** The label to display (e.g. "Today", "Yesterday", "Monday") */
@@ -32,7 +49,7 @@ interface TimeMarkerProps {
32
49
  * Centered time separator between message groups.
33
50
  * Displays a label like "Today" or "Yesterday" with horizontal rules.
34
51
  */
35
- declare function TimeMarker({ label, className }: TimeMarkerProps): react_jsx_runtime.JSX.Element;
52
+ declare function TimeMarker({ label, className }: TimeMarkerProps): react.JSX.Element;
36
53
 
37
54
  interface ChatHeaderAction {
38
55
  id: string;
@@ -61,7 +78,7 @@ interface ChatHeaderProps {
61
78
  /** Custom styles via CSS variables */
62
79
  style?: react__default.CSSProperties;
63
80
  }
64
- declare function ChatHeader({ title, subtitle, logo, actions, showClose, onClose, loading, className, style, }: ChatHeaderProps): react_jsx_runtime.JSX.Element;
81
+ declare function ChatHeader({ title, subtitle, logo, actions, showClose, onClose, loading, className, style, }: ChatHeaderProps): react__default.JSX.Element;
65
82
 
66
83
  interface MessageAttachmentsProps {
67
84
  /** List of attachments to display */
@@ -76,7 +93,7 @@ interface MessageAttachmentsProps {
76
93
  /**
77
94
  * Display attachments (images, videos, documents) in messages
78
95
  */
79
- declare function MessageAttachments({ attachments, onDownload, onPreview, className, }: MessageAttachmentsProps): react_jsx_runtime.JSX.Element | null;
96
+ declare function MessageAttachments({ attachments, onDownload, onPreview, className, }: MessageAttachmentsProps): react.JSX.Element | null;
80
97
 
81
98
  interface ReasoningPanelProps {
82
99
  /** Whether currently streaming */
@@ -101,29 +118,35 @@ interface ReasoningPanelProps {
101
118
  /** Additional class names */
102
119
  className?: string;
103
120
  }
104
- declare function ReasoningPanel({ isStreaming, chunks, plan, executionTimeline, userMessageTimestamp, executionTime, defaultExpanded, expanded: controlledExpanded, onExpandedChange, className, }: ReasoningPanelProps): react_jsx_runtime.JSX.Element | null;
121
+ declare function ReasoningPanel({ isStreaming, chunks, plan, executionTimeline, userMessageTimestamp, executionTime, defaultExpanded, expanded: controlledExpanded, onExpandedChange, className, }: ReasoningPanelProps): react.JSX.Element | null;
105
122
 
106
123
  interface ClarificationPanelProps {
107
124
  clarification: ClarificationData;
108
- onSubmit?: (response: string) => void;
125
+ /**
126
+ * Called on submit with both the human-readable text (for the transcript) AND
127
+ * the structured per-question answers (for deterministic server-side capture —
128
+ * no parsing of the text).
129
+ */
130
+ onSubmit?: (response: string, answers: ClarificationAnswer[]) => void;
131
+ /** Best-effort callback fired when an option is selected (legacy hook). */
109
132
  onOptionSelect?: (option: string) => void;
110
133
  disabled?: boolean;
111
134
  loading?: boolean;
112
135
  className?: string;
113
136
  /**
114
137
  * When set, renders a read-only "answered" state showing the user's response
115
- * inline with the question. Used in scrolled-back chat history so a past
116
- * clarification still shows what was asked and answered.
138
+ * inline. Used in scrolled-back chat history so a past clarification still
139
+ * shows what was answered.
117
140
  */
118
141
  answer?: string;
119
142
  }
120
143
  /**
121
- * Stateless clarification panel - displays when the AI agent needs user input.
122
- * Orange left-border panel with question, radio options, and free-text input.
144
+ * Clarification panel displays when the agent needs the user to pick from
145
+ * one or more multiple-choice questions. Orange left-border panel.
123
146
  *
124
147
  * If `answer` is provided, switches to a read-only "answered" view.
125
148
  */
126
- declare function ClarificationPanel({ clarification, onSubmit, onOptionSelect, disabled, loading, className, answer, }: ClarificationPanelProps): react_jsx_runtime.JSX.Element;
149
+ declare function ClarificationPanel({ clarification, onSubmit, onOptionSelect, disabled, loading, className, answer, }: ClarificationPanelProps): react.JSX.Element | null;
127
150
 
128
151
  interface ApprovalButtonSlotProps {
129
152
  onClick: () => void;
@@ -174,7 +197,7 @@ interface ToolApprovalPanelProps {
174
197
  * Buttons and the chat input are slottable via the `slots` prop so host apps
175
198
  * can swap in their own brand-aligned components.
176
199
  */
177
- declare function ToolApprovalPanel({ approval, onApprove, onReject, disabled, className, slots, }: ToolApprovalPanelProps): react_jsx_runtime.JSX.Element;
200
+ declare function ToolApprovalPanel({ approval, onApprove, onReject, disabled, className, slots, }: ToolApprovalPanelProps): react.JSX.Element;
178
201
 
179
202
  interface CitationSourcesProps {
180
203
  sources: SourceReference[];
@@ -184,12 +207,12 @@ interface CitationSourcesProps {
184
207
  * Renders citation sources as a horizontal row of clickable chips.
185
208
  * Clicking a chip opens a modal showing full source content.
186
209
  */
187
- declare function CitationSources({ sources, className, }: CitationSourcesProps): react_jsx_runtime.JSX.Element | null;
210
+ declare function CitationSources({ sources, className, }: CitationSourcesProps): react.JSX.Element | null;
188
211
  interface SourceDetailModalProps {
189
212
  source: SourceReference | null;
190
213
  onClose: () => void;
191
214
  }
192
- declare function SourceDetailModal({ source, onClose, }: SourceDetailModalProps): react_jsx_runtime.JSX.Element | null;
215
+ declare function SourceDetailModal({ source, onClose, }: SourceDetailModalProps): react.JSX.Element | null;
193
216
  /**
194
217
  * Inline citation badge - renders a small numbered badge like [1]
195
218
  * with optional tooltip on hover and click-to-open URL.
@@ -198,7 +221,7 @@ interface InlineCitationProps {
198
221
  index: number;
199
222
  source?: SourceReference;
200
223
  }
201
- declare function InlineCitation({ index, source }: InlineCitationProps): react_jsx_runtime.JSX.Element;
224
+ declare function InlineCitation({ index, source }: InlineCitationProps): react.JSX.Element;
202
225
 
203
226
  interface SubagentPanelProps {
204
227
  chunk: StreamingChunk;
@@ -209,7 +232,7 @@ interface SubagentPanelProps {
209
232
  * multi-agent rows. Nested chunks (thinking/tool/observation/sub-assistant)
210
233
  * render as an indented `EventTimeline` underneath.
211
234
  */
212
- declare function SubagentPanel({ chunk }: SubagentPanelProps): react_jsx_runtime.JSX.Element | null;
235
+ declare function SubagentPanel({ chunk }: SubagentPanelProps): react.JSX.Element | null;
213
236
 
214
237
  declare const chartVisualizationSchema: z.ZodObject<{
215
238
  chartType: z.ZodEnum<{
@@ -365,14 +388,14 @@ interface VisualizationRendererProps {
365
388
  /** Message-level media bag used to resolve `media_ref:<id>` cell values. */
366
389
  medias?: MediaChunkData[];
367
390
  }
368
- declare function VisualizationRenderer({ data, isStreaming, onAction, medias, }: VisualizationRendererProps): react_jsx_runtime.JSX.Element;
391
+ declare function VisualizationRenderer({ data, isStreaming, onAction, medias, }: VisualizationRendererProps): react.JSX.Element;
369
392
 
370
393
  interface ChartVisualizationProps {
371
394
  data: ChartVisualizationData;
372
395
  config?: VisualizationConfig;
373
396
  isStreaming?: boolean;
374
397
  }
375
- declare function ChartVisualization({ data, config, isStreaming }: ChartVisualizationProps): react_jsx_runtime.JSX.Element;
398
+ declare function ChartVisualization({ data, config, isStreaming }: ChartVisualizationProps): react.JSX.Element;
376
399
 
377
400
  interface TableVisualizationProps {
378
401
  data: TableVisualizationData;
@@ -381,7 +404,7 @@ interface TableVisualizationProps {
381
404
  /** Message-level media bag used to resolve `media_ref:<id>` cell values. */
382
405
  medias?: MediaChunkData[];
383
406
  }
384
- declare function TableVisualization({ data, config, medias }: TableVisualizationProps): react_jsx_runtime.JSX.Element;
407
+ declare function TableVisualization({ data, config, medias }: TableVisualizationProps): react.JSX.Element;
385
408
 
386
409
  interface CardVisualizationProps {
387
410
  data: CardVisualizationData;
@@ -389,21 +412,21 @@ interface CardVisualizationProps {
389
412
  isStreaming?: boolean;
390
413
  onAction?: (event: VisualizationActionEvent) => void;
391
414
  }
392
- declare function CardVisualization({ data, config, onAction }: CardVisualizationProps): react_jsx_runtime.JSX.Element;
415
+ declare function CardVisualization({ data, config, onAction }: CardVisualizationProps): react.JSX.Element;
393
416
 
394
417
  interface KpiVisualizationProps {
395
418
  data: KpiVisualizationData;
396
419
  config?: VisualizationConfig;
397
420
  isStreaming?: boolean;
398
421
  }
399
- declare function KpiVisualization({ data, config, isStreaming }: KpiVisualizationProps): react_jsx_runtime.JSX.Element;
422
+ declare function KpiVisualization({ data, config, isStreaming }: KpiVisualizationProps): react.JSX.Element;
400
423
 
401
424
  interface CodePreviewVisualizationProps {
402
425
  data: CodePreviewVisualizationData;
403
426
  config?: VisualizationConfig;
404
427
  isStreaming?: boolean;
405
428
  }
406
- declare function CodePreviewVisualization({ data }: CodePreviewVisualizationProps): react_jsx_runtime.JSX.Element;
429
+ declare function CodePreviewVisualization({ data }: CodePreviewVisualizationProps): react.JSX.Element;
407
430
 
408
431
  interface FormVisualizationProps {
409
432
  data: FormVisualizationData;
@@ -411,7 +434,7 @@ interface FormVisualizationProps {
411
434
  isStreaming?: boolean;
412
435
  onAction?: (event: VisualizationActionEvent) => void;
413
436
  }
414
- declare function FormVisualization({ data, config, isStreaming, onAction }: FormVisualizationProps): react_jsx_runtime.JSX.Element;
437
+ declare function FormVisualization({ data, config, isStreaming, onAction }: FormVisualizationProps): react.JSX.Element;
415
438
 
416
439
  interface VisualizationEntry {
417
440
  component: React.ComponentType<{
@@ -448,7 +471,7 @@ interface ArtifactInlineCardProps {
448
471
  * shipped with the chat-ui package so headless / embedded consumers still
449
472
  * render something when a tool emits an artifact.
450
473
  */
451
- declare function ArtifactInlineCard({ artifact, isStreaming, onOpen, }: ArtifactInlineCardProps): react_jsx_runtime.JSX.Element;
474
+ declare function ArtifactInlineCard({ artifact, isStreaming, onOpen, }: ArtifactInlineCardProps): react.JSX.Element;
452
475
 
453
476
  interface ArtifactListProps {
454
477
  artifacts: ArtifactChunkData[];
@@ -459,7 +482,7 @@ interface ArtifactListProps {
459
482
  * Renders one inline card per artifact using the registered renderer when
460
483
  * available; falls back to the unstyled `ArtifactInlineCard` otherwise.
461
484
  */
462
- declare function ArtifactList({ artifacts, isStreaming, onOpen, }: ArtifactListProps): react_jsx_runtime.JSX.Element | null;
485
+ declare function ArtifactList({ artifacts, isStreaming, onOpen, }: ArtifactListProps): react.JSX.Element | null;
463
486
 
464
487
  /**
465
488
  * Shape of a registered artifact type.
@@ -516,7 +539,7 @@ interface EventContentProps {
516
539
  * bar — the panel reads as a tiny trace.
517
540
  * - Observations use a quiet tinted background, no side-stripe.
518
541
  */
519
- declare function EventContent({ event, className, isRunning, maxDurationSeconds, }: EventContentProps): react_jsx_runtime.JSX.Element | null;
542
+ declare function EventContent({ event, className, isRunning, maxDurationSeconds, }: EventContentProps): react.JSX.Element | null;
520
543
 
521
544
  /**
522
545
  * Convert StreamingChunk to Event format
@@ -539,7 +562,7 @@ interface EventTimelineProps {
539
562
  * Unified event timeline component
540
563
  * Displays thinking, tool execution, and observation events
541
564
  */
542
- declare function EventTimeline({ events, className }: EventTimelineProps): react_jsx_runtime.JSX.Element | null;
565
+ declare function EventTimeline({ events, className }: EventTimelineProps): react.JSX.Element | null;
543
566
 
544
567
  interface PlanTimelineProps {
545
568
  plan: PlanData;
@@ -550,7 +573,7 @@ interface PlanTimelineProps {
550
573
  * Minimal timeline for Plan & Execute mode.
551
574
  * Matches in-house style: simple "Plan:" header + inline text rows.
552
575
  */
553
- declare function PlanTimeline({ plan, streamingChunks, className, }: PlanTimelineProps): react_jsx_runtime.JSX.Element;
576
+ declare function PlanTimeline({ plan, streamingChunks, className, }: PlanTimelineProps): react.JSX.Element;
554
577
 
555
578
  type TimelineItemKind = "thinking" | "planning" | "tool" | "observation" | "subagent";
556
579
  interface TimelineItemData {
@@ -585,7 +608,7 @@ interface TimelineProps {
585
608
  * side. Spacing varies by adjacency so the panel reads like prose, not a
586
609
  * uniform list.
587
610
  */
588
- declare function Timeline({ items, badgeSize, className }: TimelineProps): react_jsx_runtime.JSX.Element | null;
611
+ declare function Timeline({ items, badgeSize, className }: TimelineProps): react.JSX.Element | null;
589
612
  interface TimelineItemProps {
590
613
  status: EventStatus;
591
614
  isLast?: boolean;
@@ -597,7 +620,7 @@ interface TimelineItemProps {
597
620
  * Single timeline item (alternative API). Matches the refreshed look of
598
621
  * the parent `Timeline`: hairline rail, ink-dot markers, no card chrome.
599
622
  */
600
- declare function TimelineItem({ status, isLast, badgeSize, children, className, }: TimelineItemProps): react_jsx_runtime.JSX.Element;
623
+ declare function TimelineItem({ status, isLast, badgeSize, children, className, }: TimelineItemProps): react.JSX.Element;
601
624
 
602
625
  interface StatusBadgeProps {
603
626
  status: EventStatus;
@@ -621,7 +644,7 @@ interface StatusBadgeProps {
621
644
  * `--chat-primary`; callers whose primary is neutral can override the
622
645
  * activity accent independently via `BrandingData.activityAccentColor`.
623
646
  */
624
- declare function StatusBadge({ status, size, className, kind }: StatusBadgeProps): react_jsx_runtime.JSX.Element;
647
+ declare function StatusBadge({ status, size, className, kind }: StatusBadgeProps): react.JSX.Element;
625
648
 
626
649
  interface TimelineRowProps {
627
650
  /** Primary label — subtask description, agent name, or humanized handle. */
@@ -651,6 +674,6 @@ interface TimelineRowProps {
651
674
  * that rotates on expand; the duration is rendered as a tabular-num pill
652
675
  * with quiet weight so it reads as data, not chrome.
653
676
  */
654
- declare function TimelineRow({ label, description, durationSeconds, isFailed, defaultExpanded, nestedEvents, hideChevron, }: TimelineRowProps): react_jsx_runtime.JSX.Element;
677
+ declare function TimelineRow({ label, description, durationSeconds, isFailed, defaultExpanded, nestedEvents, hideChevron, }: TimelineRowProps): react.JSX.Element;
655
678
 
656
- export { type ApprovalButtonSlotProps, type ApprovalChatInputSlotProps, ArtifactChunkData, type ArtifactEntry, ArtifactInlineCard, type ArtifactInlineCardProps, ArtifactList, type ArtifactListProps, Attachment, CardVisualization, type CardVisualizationProps, ChartVisualization, type ChartVisualizationProps, ChatHeader, type ChatHeaderAction, type ChatHeaderProps, CitationSources, type CitationSourcesProps, ClarificationData, ClarificationPanel, type ClarificationPanelProps, CodePreviewVisualization, type CodePreviewVisualizationProps, Event, EventContent, EventStatus, EventTimeline, type EventTimelineProps, FormVisualization, type FormVisualizationProps, InlineCitation, type InlineCitationProps, KpiVisualization, type KpiVisualizationProps, LoadingDots, type LoadingDotsProps, MediaChunkData, MessageAttachments, type MessageAttachmentsProps, PlanData, PlanTimeline, type PlanTimelineProps, ReasoningPanel, type ReasoningPanelProps, SourceDetailModal, type SourceDetailModalProps, SourceReference, StatusBadge, StreamingChunk, SubagentPanel, type SubagentPanelProps, TableVisualization, type TableVisualizationProps, TimeMarker, type TimeMarkerProps, Timeline, TimelineItem, type TimelineItemData, type TimelineItemProps, type TimelineProps, TimelineRow, type TimelineRowProps, ToolApprovalPanel, type ToolApprovalPanelProps, type ToolApprovalSlots, VisualizationActionEvent, VisualizationChunkData, VisualizationConfig, type VisualizationEntry, VisualizationRenderer, type VisualizationRendererProps, cardVisualizationSchema, chartVisualizationSchema, codePreviewVisualizationSchema, convertChunkToEvent, convertTimelineToEvents, formVisualizationSchema, getArtifact, getRegisteredArtifactTypes, getRegisteredTypes, getVisualization, kpiVisualizationSchema, registerArtifact, registerVisualization, tableVisualizationSchema };
679
+ export { type ApprovalButtonSlotProps, type ApprovalChatInputSlotProps, ArtifactChunkData, type ArtifactEntry, ArtifactInlineCard, type ArtifactInlineCardProps, ArtifactList, type ArtifactListProps, Attachment, CardVisualization, type CardVisualizationProps, ChartVisualization, type ChartVisualizationProps, ChatHeader, type ChatHeaderAction, type ChatHeaderProps, CitationSources, type CitationSourcesProps, ClarificationData, ClarificationPanel, type ClarificationPanelProps, CodePreviewVisualization, type CodePreviewVisualizationProps, ComposerToolbar, Event, EventContent, EventStatus, EventTimeline, type EventTimelineProps, FormVisualization, type FormVisualizationProps, InlineCitation, type InlineCitationProps, KpiVisualization, type KpiVisualizationProps, LoadingDots, type LoadingDotsProps, MediaChunkData, MessageAttachments, type MessageAttachmentsProps, PlanData, PlanTimeline, type PlanTimelineProps, ReasoningPanel, type ReasoningPanelProps, SourceDetailModal, type SourceDetailModalProps, SourceReference, StatusBadge, StreamingChunk, SubagentPanel, type SubagentPanelProps, TableVisualization, type TableVisualizationProps, TimeMarker, type TimeMarkerProps, Timeline, TimelineItem, type TimelineItemData, type TimelineItemProps, type TimelineProps, TimelineRow, type TimelineRowProps, ToolApprovalPanel, type ToolApprovalPanelProps, type ToolApprovalSlots, VisualizationActionEvent, VisualizationChunkData, VisualizationConfig, type VisualizationEntry, VisualizationRenderer, type VisualizationRendererProps, cardVisualizationSchema, chartVisualizationSchema, codePreviewVisualizationSchema, convertChunkToEvent, convertTimelineToEvents, formVisualizationSchema, getArtifact, getRegisteredArtifactTypes, getRegisteredTypes, getVisualization, kpiVisualizationSchema, registerArtifact, registerVisualization, tableVisualizationSchema };
@@ -1,2 +1,2 @@
1
- export{O as ArtifactInlineCard,S as ArtifactList,a as AttachmentPreview,b as Avatar,A as CardVisualization,y as ChartVisualization,c as ChatContainer,_ as ChatHeader,aa as ChatLayout,f as CitationSources,i as ClarificationPanel,C as CodePreviewVisualization,p as EventContent,s as EventTimeline,D as FormVisualization,h as InlineCitation,B as KpiVisualization,d as LoadingDots,e as MarkdownContent,U as Message,k as MessageActionBar,l as MessageAttachments,V as MessageComposer,X as MessageList,u as PlanTimeline,v as ReasoningPanel,W as ScrollToBottomButton,g as SourceDetailModal,m as StatusBadge,w as StreamingText,ca as SubagentPanel,x as SuggestedActions,z as TableVisualization,Y as TimeMarker,n as Timeline,o as TimelineItem,t as TimelineRow,j as ToolApprovalPanel,$ as ToolStatusIndicator,Z as TypingIndicator,N as VisualizationRenderer,ba as WelcomeScreen,J as cardVisualizationSchema,H as chartVisualizationSchema,L as codePreviewVisualizationSchema,q as convertChunkToEvent,r as convertTimelineToEvents,M as formVisualizationSchema,Q as getArtifact,R as getRegisteredArtifactTypes,G as getRegisteredTypes,F as getVisualization,K as kpiVisualizationSchema,P as registerArtifact,E as registerVisualization,I as tableVisualizationSchema}from'../chunk-ERJKVQQT.js';export{h as useComposer,b as useMessage}from'../chunk-6RN7SUWT.js';import'../chunk-D2PFIJNZ.js';import'../chunk-4WWJTYYA.js';export{b as ChatProvider,c as useChatContext}from'../chunk-NKLA5PPB.js';import'../chunk-NG4HKXYB.js';import'../chunk-IUCKTDTZ.js';//# sourceMappingURL=index.js.map
1
+ export{P as ArtifactInlineCard,T as ArtifactList,a as AttachmentPreview,b as Avatar,B as CardVisualization,z as ChartVisualization,c as ChatContainer,$ as ChatHeader,ba as ChatLayout,g as CitationSources,j as ClarificationPanel,D as CodePreviewVisualization,d as ComposerToolbar,q as EventContent,t as EventTimeline,E as FormVisualization,i as InlineCitation,C as KpiVisualization,e as LoadingDots,f as MarkdownContent,V as Message,l as MessageActionBar,m as MessageAttachments,W as MessageComposer,Y as MessageList,v as PlanTimeline,w as ReasoningPanel,X as ScrollToBottomButton,h as SourceDetailModal,n as StatusBadge,x as StreamingText,da as SubagentPanel,y as SuggestedActions,A as TableVisualization,Z as TimeMarker,o as Timeline,p as TimelineItem,u as TimelineRow,k as ToolApprovalPanel,aa as ToolStatusIndicator,_ as TypingIndicator,O as VisualizationRenderer,ca as WelcomeScreen,K as cardVisualizationSchema,I as chartVisualizationSchema,M as codePreviewVisualizationSchema,r as convertChunkToEvent,s as convertTimelineToEvents,N as formVisualizationSchema,R as getArtifact,S as getRegisteredArtifactTypes,H as getRegisteredTypes,G as getVisualization,L as kpiVisualizationSchema,Q as registerArtifact,F as registerVisualization,J as tableVisualizationSchema}from'../chunk-HYFMOOLH.js';export{h as useComposer,b as useMessage}from'../chunk-6RN7SUWT.js';import'../chunk-D2PFIJNZ.js';import'../chunk-4WWJTYYA.js';export{b as ChatProvider,c as useChatContext}from'../chunk-NKLA5PPB.js';import'../chunk-NG4HKXYB.js';import'../chunk-ZP4FGAAH.js';//# sourceMappingURL=index.js.map
2
2
  //# sourceMappingURL=index.js.map