@miiflow/assistant-ui 0.1.1 → 0.2.2

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.
Files changed (68) hide show
  1. package/README.md +18 -0
  2. package/dist/{WelcomeScreen-B434H05-.d.cts → WelcomeScreen-BiY3uGhp.d.cts} +59 -4
  3. package/dist/{WelcomeScreen-TrcbOYob.d.ts → WelcomeScreen-YsXZsAwZ.d.ts} +59 -4
  4. package/dist/{avatar-DftdWqSs.d.ts → avatar-BgjqLv1r.d.ts} +1 -1
  5. package/dist/{avatar-DvOcT8NS.d.cts → avatar-CL1hlGO5.d.cts} +1 -1
  6. package/dist/chunk-3SEVU272.cjs +2 -0
  7. package/dist/chunk-3SEVU272.cjs.map +1 -0
  8. package/dist/chunk-65VDOUZG.js +2 -0
  9. package/dist/chunk-65VDOUZG.js.map +1 -0
  10. package/dist/chunk-D2PFIJNZ.js +2 -0
  11. package/dist/chunk-D2PFIJNZ.js.map +1 -0
  12. package/dist/chunk-HVCCZKEO.cjs +2 -0
  13. package/dist/chunk-HVCCZKEO.cjs.map +1 -0
  14. package/dist/chunk-POKFMILU.js +22 -0
  15. package/dist/chunk-POKFMILU.js.map +1 -0
  16. package/dist/chunk-QGRXQAWZ.cjs +22 -0
  17. package/dist/chunk-QGRXQAWZ.cjs.map +1 -0
  18. package/dist/chunk-TOYU46SZ.cjs +2 -0
  19. package/dist/chunk-TOYU46SZ.cjs.map +1 -0
  20. package/dist/chunk-W3HWTAF6.js +2 -0
  21. package/dist/chunk-W3HWTAF6.js.map +1 -0
  22. package/dist/{chunk-3ERHTQXR.js → chunk-WG77GQR3.js} +2 -2
  23. package/dist/{chunk-3ERHTQXR.js.map → chunk-WG77GQR3.js.map} +1 -1
  24. package/dist/{chunk-YMIEUVHK.cjs → chunk-ZKMXEECD.cjs} +2 -2
  25. package/dist/{chunk-YMIEUVHK.cjs.map → chunk-ZKMXEECD.cjs.map} +1 -1
  26. package/dist/client/index.cjs +5 -5
  27. package/dist/client/index.cjs.map +1 -1
  28. package/dist/client/index.d.cts +1 -1
  29. package/dist/client/index.d.ts +1 -1
  30. package/dist/client/index.js +5 -5
  31. package/dist/client/index.js.map +1 -1
  32. package/dist/context/index.d.cts +1 -1
  33. package/dist/context/index.d.ts +1 -1
  34. package/dist/hooks/index.cjs +1 -1
  35. package/dist/hooks/index.d.cts +46 -9
  36. package/dist/hooks/index.d.ts +46 -9
  37. package/dist/hooks/index.js +1 -1
  38. package/dist/index.cjs +1 -1
  39. package/dist/index.cjs.map +1 -1
  40. package/dist/index.d.cts +4 -4
  41. package/dist/index.d.ts +4 -4
  42. package/dist/index.js +1 -1
  43. package/dist/index.js.map +1 -1
  44. package/dist/{message-B21_kqE2.d.ts → message-4-BaKes3.d.ts} +11 -1
  45. package/dist/{message-a6VUd777.d.cts → message-9z0crkf9.d.cts} +11 -1
  46. package/dist/primitives/index.cjs +1 -1
  47. package/dist/primitives/index.d.cts +9 -4
  48. package/dist/primitives/index.d.ts +9 -4
  49. package/dist/primitives/index.js +1 -1
  50. package/dist/styled/index.cjs +1 -1
  51. package/dist/styled/index.d.cts +4 -4
  52. package/dist/styled/index.d.ts +4 -4
  53. package/dist/styled/index.js +1 -1
  54. package/dist/styles-no-preflight.css +1 -1
  55. package/dist/styles.css +1 -1
  56. package/package.json +11 -11
  57. package/dist/chunk-3KB4JYSQ.js +0 -2
  58. package/dist/chunk-3KB4JYSQ.js.map +0 -1
  59. package/dist/chunk-BA3VCHRC.js +0 -22
  60. package/dist/chunk-BA3VCHRC.js.map +0 -1
  61. package/dist/chunk-G7TGUXDN.cjs +0 -2
  62. package/dist/chunk-G7TGUXDN.cjs.map +0 -1
  63. package/dist/chunk-LJQHWCUK.js +0 -2
  64. package/dist/chunk-LJQHWCUK.js.map +0 -1
  65. package/dist/chunk-LLMC5JID.cjs +0 -2
  66. package/dist/chunk-LLMC5JID.cjs.map +0 -1
  67. package/dist/chunk-VQVCOIS3.cjs +0 -22
  68. package/dist/chunk-VQVCOIS3.cjs.map +0 -1
@@ -1,7 +1,7 @@
1
1
  import * as react_jsx_runtime from 'react/jsx-runtime';
2
2
  import * as react from 'react';
3
3
  import { ReactNode } from 'react';
4
- import { C as ChatMessage, P as ParticipantRole } from '../message-a6VUd777.cjs';
4
+ import { C as ChatMessage, P as ParticipantRole } from '../message-9z0crkf9.cjs';
5
5
  import { d as VisualizationActionEvent } from '../streaming-CF63E6iS.cjs';
6
6
 
7
7
  interface ChatContextValue {
@@ -1,7 +1,7 @@
1
1
  import * as react_jsx_runtime from 'react/jsx-runtime';
2
2
  import * as react from 'react';
3
3
  import { ReactNode } from 'react';
4
- import { C as ChatMessage, P as ParticipantRole } from '../message-B21_kqE2.js';
4
+ import { C as ChatMessage, P as ParticipantRole } from '../message-4-BaKes3.js';
5
5
  import { d as VisualizationActionEvent } from '../streaming-CF63E6iS.js';
6
6
 
7
7
  interface ChatContextValue {
@@ -1,2 +1,2 @@
1
- 'use strict';var chunkYMIEUVHK_cjs=require('../chunk-YMIEUVHK.cjs'),chunkLLMC5JID_cjs=require('../chunk-LLMC5JID.cjs'),chunkKSMAVBLY_cjs=require('../chunk-KSMAVBLY.cjs');Object.defineProperty(exports,"useAttachments",{enumerable:true,get:function(){return chunkYMIEUVHK_cjs.b}});Object.defineProperty(exports,"useStreaming",{enumerable:true,get:function(){return chunkYMIEUVHK_cjs.a}});Object.defineProperty(exports,"useAutoScroll",{enumerable:true,get:function(){return chunkLLMC5JID_cjs.a}});Object.defineProperty(exports,"useMessageComposer",{enumerable:true,get:function(){return chunkLLMC5JID_cjs.b}});Object.defineProperty(exports,"useBrandingCSSVars",{enumerable:true,get:function(){return chunkKSMAVBLY_cjs.b}});//# sourceMappingURL=index.cjs.map
1
+ 'use strict';var chunkZKMXEECD_cjs=require('../chunk-ZKMXEECD.cjs'),chunkHVCCZKEO_cjs=require('../chunk-HVCCZKEO.cjs'),chunkTOYU46SZ_cjs=require('../chunk-TOYU46SZ.cjs'),chunkKSMAVBLY_cjs=require('../chunk-KSMAVBLY.cjs');Object.defineProperty(exports,"useAttachments",{enumerable:true,get:function(){return chunkZKMXEECD_cjs.b}});Object.defineProperty(exports,"useStreaming",{enumerable:true,get:function(){return chunkZKMXEECD_cjs.a}});Object.defineProperty(exports,"useScrollLock",{enumerable:true,get:function(){return chunkHVCCZKEO_cjs.a}});Object.defineProperty(exports,"useAutoScroll",{enumerable:true,get:function(){return chunkTOYU46SZ_cjs.a}});Object.defineProperty(exports,"useMessageComposer",{enumerable:true,get:function(){return chunkTOYU46SZ_cjs.b}});Object.defineProperty(exports,"useBrandingCSSVars",{enumerable:true,get:function(){return chunkKSMAVBLY_cjs.b}});//# sourceMappingURL=index.cjs.map
2
2
  //# sourceMappingURL=index.cjs.map
@@ -1,25 +1,62 @@
1
1
  import * as react from 'react';
2
- import { KeyboardEvent } from 'react';
2
+ import { RefObject, KeyboardEvent } from 'react';
3
3
  import { b as StreamingOptions, a as StreamChunk } from '../streaming-CF63E6iS.cjs';
4
4
  import { B as BrandingData } from '../branding-SzYU4ncD.cjs';
5
5
 
6
6
  interface UseAutoScrollOptions {
7
7
  /** Whether auto-scroll is enabled */
8
8
  enabled?: boolean;
9
- /** Threshold from bottom to trigger auto-scroll (pixels) */
10
- threshold?: number;
11
9
  /** Smooth scroll behavior */
12
10
  smooth?: boolean;
11
+ /** Scroll to bottom when component mounts */
12
+ scrollToBottomOnMount?: boolean;
13
+ }
14
+ interface UseAutoScrollReturn<T extends HTMLElement> {
15
+ /** Ref to attach to the scrollable container */
16
+ containerRef: React.RefObject<T | null>;
17
+ /** Scroll to bottom programmatically (always forces scroll) */
18
+ scrollToBottom: (behavior?: ScrollBehavior) => void;
19
+ /** Whether the viewport is currently at the bottom */
20
+ isAtBottom: boolean;
13
21
  }
14
22
  /**
15
23
  * Hook to automatically scroll to the bottom of a container
16
24
  * when new content is added, unless the user has scrolled up.
25
+ *
26
+ * Combines ResizeObserver + MutationObserver to catch all height changes
27
+ * (image loads, panel expansion, streaming text, new messages).
28
+ *
29
+ * Uses a 1px tolerance for isAtBottom (matches assistant-ui) and
30
+ * persists scroll behavior across content resize to prevent
31
+ * the "content outraces scroll" bug.
17
32
  */
18
- declare function useAutoScroll<T extends HTMLElement>({ enabled, threshold, smooth, }?: UseAutoScrollOptions): {
19
- containerRef: react.RefObject<T | null>;
20
- scrollToBottom: (force?: boolean) => void;
21
- isAtBottom: boolean;
22
- };
33
+ declare function useAutoScroll<T extends HTMLElement>({ enabled, smooth, scrollToBottomOnMount, }?: UseAutoScrollOptions): UseAutoScrollReturn<T>;
34
+
35
+ /**
36
+ * Locks scroll position during collapsible/height animations.
37
+ *
38
+ * Prevents viewport jumps when content height changes during animations
39
+ * (e.g. ReasoningPanel expand/collapse). Finds the nearest scrollable
40
+ * ancestor and temporarily locks its scroll position for the animation duration.
41
+ *
42
+ * Adapted from assistant-ui's useScrollLock.
43
+ *
44
+ * @param animatedElementRef - Ref to the animated element
45
+ * @param animationDuration - Lock duration in milliseconds
46
+ * @returns Function to activate the scroll lock (call before toggling)
47
+ *
48
+ * @example
49
+ * ```tsx
50
+ * const panelRef = useRef<HTMLDivElement>(null);
51
+ * const lockScroll = useScrollLock(panelRef, 200);
52
+ *
53
+ * const handleToggle = () => {
54
+ * lockScroll();
55
+ * setIsExpanded(!isExpanded);
56
+ * };
57
+ * ```
58
+ */
59
+ declare function useScrollLock<T extends HTMLElement = HTMLElement>(animatedElementRef: RefObject<T | null>, animationDuration: number): () => void;
23
60
 
24
61
  /**
25
62
  * Hook to manage streaming message state.
@@ -106,4 +143,4 @@ declare function useBrandingCSSVars(branding: BrandingData | null | undefined, o
106
143
  iconColor?: string;
107
144
  }): React.CSSProperties;
108
145
 
109
- export { useAttachments, useAutoScroll, useBrandingCSSVars, useMessageComposer, useStreaming };
146
+ export { type UseAutoScrollOptions, type UseAutoScrollReturn, useAttachments, useAutoScroll, useBrandingCSSVars, useMessageComposer, useScrollLock, useStreaming };
@@ -1,25 +1,62 @@
1
1
  import * as react from 'react';
2
- import { KeyboardEvent } from 'react';
2
+ import { RefObject, KeyboardEvent } from 'react';
3
3
  import { b as StreamingOptions, a as StreamChunk } from '../streaming-CF63E6iS.js';
4
4
  import { B as BrandingData } from '../branding-SzYU4ncD.js';
5
5
 
6
6
  interface UseAutoScrollOptions {
7
7
  /** Whether auto-scroll is enabled */
8
8
  enabled?: boolean;
9
- /** Threshold from bottom to trigger auto-scroll (pixels) */
10
- threshold?: number;
11
9
  /** Smooth scroll behavior */
12
10
  smooth?: boolean;
11
+ /** Scroll to bottom when component mounts */
12
+ scrollToBottomOnMount?: boolean;
13
+ }
14
+ interface UseAutoScrollReturn<T extends HTMLElement> {
15
+ /** Ref to attach to the scrollable container */
16
+ containerRef: React.RefObject<T | null>;
17
+ /** Scroll to bottom programmatically (always forces scroll) */
18
+ scrollToBottom: (behavior?: ScrollBehavior) => void;
19
+ /** Whether the viewport is currently at the bottom */
20
+ isAtBottom: boolean;
13
21
  }
14
22
  /**
15
23
  * Hook to automatically scroll to the bottom of a container
16
24
  * when new content is added, unless the user has scrolled up.
25
+ *
26
+ * Combines ResizeObserver + MutationObserver to catch all height changes
27
+ * (image loads, panel expansion, streaming text, new messages).
28
+ *
29
+ * Uses a 1px tolerance for isAtBottom (matches assistant-ui) and
30
+ * persists scroll behavior across content resize to prevent
31
+ * the "content outraces scroll" bug.
17
32
  */
18
- declare function useAutoScroll<T extends HTMLElement>({ enabled, threshold, smooth, }?: UseAutoScrollOptions): {
19
- containerRef: react.RefObject<T | null>;
20
- scrollToBottom: (force?: boolean) => void;
21
- isAtBottom: boolean;
22
- };
33
+ declare function useAutoScroll<T extends HTMLElement>({ enabled, smooth, scrollToBottomOnMount, }?: UseAutoScrollOptions): UseAutoScrollReturn<T>;
34
+
35
+ /**
36
+ * Locks scroll position during collapsible/height animations.
37
+ *
38
+ * Prevents viewport jumps when content height changes during animations
39
+ * (e.g. ReasoningPanel expand/collapse). Finds the nearest scrollable
40
+ * ancestor and temporarily locks its scroll position for the animation duration.
41
+ *
42
+ * Adapted from assistant-ui's useScrollLock.
43
+ *
44
+ * @param animatedElementRef - Ref to the animated element
45
+ * @param animationDuration - Lock duration in milliseconds
46
+ * @returns Function to activate the scroll lock (call before toggling)
47
+ *
48
+ * @example
49
+ * ```tsx
50
+ * const panelRef = useRef<HTMLDivElement>(null);
51
+ * const lockScroll = useScrollLock(panelRef, 200);
52
+ *
53
+ * const handleToggle = () => {
54
+ * lockScroll();
55
+ * setIsExpanded(!isExpanded);
56
+ * };
57
+ * ```
58
+ */
59
+ declare function useScrollLock<T extends HTMLElement = HTMLElement>(animatedElementRef: RefObject<T | null>, animationDuration: number): () => void;
23
60
 
24
61
  /**
25
62
  * Hook to manage streaming message state.
@@ -106,4 +143,4 @@ declare function useBrandingCSSVars(branding: BrandingData | null | undefined, o
106
143
  iconColor?: string;
107
144
  }): React.CSSProperties;
108
145
 
109
- export { useAttachments, useAutoScroll, useBrandingCSSVars, useMessageComposer, useStreaming };
146
+ export { type UseAutoScrollOptions, type UseAutoScrollReturn, useAttachments, useAutoScroll, useBrandingCSSVars, useMessageComposer, useScrollLock, useStreaming };
@@ -1,2 +1,2 @@
1
- export{b as useAttachments,a as useStreaming}from'../chunk-3ERHTQXR.js';export{a as useAutoScroll,b as useMessageComposer}from'../chunk-LJQHWCUK.js';export{b as useBrandingCSSVars}from'../chunk-NSTK5EUQ.js';//# sourceMappingURL=index.js.map
1
+ 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-65VDOUZG.js';export{b as useBrandingCSSVars}from'../chunk-NSTK5EUQ.js';//# sourceMappingURL=index.js.map
2
2
  //# sourceMappingURL=index.js.map
package/dist/index.cjs CHANGED
@@ -1,2 +1,2 @@
1
- 'use strict';var chunkVQVCOIS3_cjs=require('./chunk-VQVCOIS3.cjs'),chunkG7TGUXDN_cjs=require('./chunk-G7TGUXDN.cjs'),chunkYMIEUVHK_cjs=require('./chunk-YMIEUVHK.cjs'),chunkLLMC5JID_cjs=require('./chunk-LLMC5JID.cjs'),chunkSFEPMZCU_cjs=require('./chunk-SFEPMZCU.cjs'),chunkKSMAVBLY_cjs=require('./chunk-KSMAVBLY.cjs');var i={hour:"numeric",minute:"2-digit",hour12:true},m={month:"short",day:"numeric"},Q={...m,year:"numeric",...i};function p(t){let e=typeof t=="string"?new Date(t):t,a=new Date;return e.getDate()===a.getDate()&&e.getMonth()===a.getMonth()&&e.getFullYear()===a.getFullYear()?e.toLocaleTimeString("en-US",i):e.getFullYear()===a.getFullYear()?`${e.toLocaleDateString("en-US",m)}, ${e.toLocaleTimeString("en-US",i)}`:e.toLocaleDateString("en-US",Q)}function X(t){let e=typeof t=="string"?new Date(t):t,g=new Date().getTime()-e.getTime(),s=Math.floor(g/1e3),r=Math.floor(s/60),o=Math.floor(r/60),n=Math.floor(o/24);return s<60?"just now":r<60?`${r} minute${r===1?"":"s"} ago`:o<24?`${o} hour${o===1?"":"s"} ago`:n<7?`${n} day${n===1?"":"s"} ago`:p(e)}var Z={spacing:{messageBetween:"1rem",messagePx:"0.875rem",messagePy:"0.625rem",container:"1rem",composerPadding:"1rem"},typography:{message:{fontSize:"1rem",lineHeight:1.5,letterSpacing:"0px"},caption:{fontSize:"0.875rem",lineHeight:1.4},small:{fontSize:"0.8125rem",lineHeight:1.3}},borderRadius:{message:"0.5rem",input:"1rem",panel:"0.5rem",button:"0.5rem",chip:"0.25rem"},colors:{primary:"var(--chat-primary, #106997)",secondary:"var(--chat-secondary, #56C18A)",error:"var(--chat-error, #B1001B)",warning:"var(--chat-warning, #DD9652)",messageBg:"var(--chat-message-bg, rgba(0, 0, 0, 0.03))",userMessageBg:"var(--chat-user-message-bg, var(--chat-primary, #106997))",userMessageText:"var(--chat-user-message-text, #ffffff)",panelBg:"var(--chat-panel-bg, rgba(0, 0, 0, 0.02))",panelBorder:"var(--chat-panel-border, rgba(0, 0, 0, 0.06))",border:"var(--chat-border, rgba(0, 0, 0, 0.06))",borderHover:"var(--chat-border-hover, rgba(0, 0, 0, 0.12))",text:"var(--chat-text, #1D2033)",subtle:"var(--chat-text-subtle, rgba(0, 0, 0, 0.5))",placeholder:"var(--chat-placeholder, rgba(0, 0, 0, 0.4))",status:{pending:{main:"rgba(0, 0, 0, 0.3)",bg:"rgba(0, 0, 0, 0.05)"},running:{main:"rgb(99, 102, 241)",bg:"rgba(99, 102, 241, 0.08)"},completed:{main:"rgb(16, 185, 129)",bg:"rgba(16, 185, 129, 0.08)"},failed:{main:"rgb(239, 68, 68)",bg:"rgba(239, 68, 68, 0.08)"}}},shadows:{subtle:"0 1px 2px rgba(0, 0, 0, 0.04)",input:"0 2px 8px rgba(0, 0, 0, 0.08)",inputFocus:"0 4px 16px rgba(0, 0, 0, 0.12)",button:"0 1px 3px rgba(0, 0, 0, 0.08)",buttonHover:"0 2px 6px rgba(0, 0, 0, 0.12)",primary:"0 2px 6px rgba(16, 105, 151, 0.3)",primaryHover:"0 4px 12px rgba(16, 105, 151, 0.4)"},animations:{messageEntrance:{initial:{opacity:0,y:8},animate:{opacity:1,y:0},transition:{duration:.3,ease:[.4,0,.2,1]}},fadeIn:{initial:{opacity:0},animate:{opacity:1},transition:{duration:.2}}}};Object.defineProperty(exports,"AttachmentPreview",{enumerable:true,get:function(){return chunkVQVCOIS3_cjs.b}});Object.defineProperty(exports,"Avatar",{enumerable:true,get:function(){return chunkVQVCOIS3_cjs.c}});Object.defineProperty(exports,"ChatContainer",{enumerable:true,get:function(){return chunkVQVCOIS3_cjs.d}});Object.defineProperty(exports,"ChatLayout",{enumerable:true,get:function(){return chunkVQVCOIS3_cjs.Y}});Object.defineProperty(exports,"MarkdownContent",{enumerable:true,get:function(){return chunkVQVCOIS3_cjs.f}});Object.defineProperty(exports,"Message",{enumerable:true,get:function(){return chunkVQVCOIS3_cjs.S}});Object.defineProperty(exports,"MessageComposer",{enumerable:true,get:function(){return chunkVQVCOIS3_cjs.T}});Object.defineProperty(exports,"MessageList",{enumerable:true,get:function(){return chunkVQVCOIS3_cjs.U}});Object.defineProperty(exports,"StreamingText",{enumerable:true,get:function(){return chunkVQVCOIS3_cjs.A}});Object.defineProperty(exports,"SuggestedActions",{enumerable:true,get:function(){return chunkVQVCOIS3_cjs.B}});Object.defineProperty(exports,"TypingIndicator",{enumerable:true,get:function(){return chunkVQVCOIS3_cjs.W}});Object.defineProperty(exports,"WelcomeScreen",{enumerable:true,get:function(){return chunkVQVCOIS3_cjs.Z}});Object.defineProperty(exports,"cn",{enumerable:true,get:function(){return chunkVQVCOIS3_cjs.a}});Object.defineProperty(exports,"ActionButton",{enumerable:true,get:function(){return chunkG7TGUXDN_cjs.q}});Object.defineProperty(exports,"AvatarPrimitive",{enumerable:true,get:function(){return chunkG7TGUXDN_cjs.l}});Object.defineProperty(exports,"ComposerContext",{enumerable:true,get:function(){return chunkG7TGUXDN_cjs.g}});Object.defineProperty(exports,"ComposerInput",{enumerable:true,get:function(){return chunkG7TGUXDN_cjs.j}});Object.defineProperty(exports,"ComposerSubmit",{enumerable:true,get:function(){return chunkG7TGUXDN_cjs.k}});Object.defineProperty(exports,"MessageComposerPrimitive",{enumerable:true,get:function(){return chunkG7TGUXDN_cjs.i}});Object.defineProperty(exports,"MessageContentPrimitive",{enumerable:true,get:function(){return chunkG7TGUXDN_cjs.d}});Object.defineProperty(exports,"MessageContext",{enumerable:true,get:function(){return chunkG7TGUXDN_cjs.a}});Object.defineProperty(exports,"MessageListPrimitive",{enumerable:true,get:function(){return chunkG7TGUXDN_cjs.f}});Object.defineProperty(exports,"MessagePrimitive",{enumerable:true,get:function(){return chunkG7TGUXDN_cjs.c}});Object.defineProperty(exports,"MessageTimestampPrimitive",{enumerable:true,get:function(){return chunkG7TGUXDN_cjs.e}});Object.defineProperty(exports,"StreamingTextPrimitive",{enumerable:true,get:function(){return chunkG7TGUXDN_cjs.m}});Object.defineProperty(exports,"SuggestedActionsContext",{enumerable:true,get:function(){return chunkG7TGUXDN_cjs.n}});Object.defineProperty(exports,"SuggestedActionsPrimitive",{enumerable:true,get:function(){return chunkG7TGUXDN_cjs.p}});Object.defineProperty(exports,"TypingIndicatorPrimitive",{enumerable:true,get:function(){return chunkG7TGUXDN_cjs.r}});Object.defineProperty(exports,"useComposer",{enumerable:true,get:function(){return chunkG7TGUXDN_cjs.h}});Object.defineProperty(exports,"useMessage",{enumerable:true,get:function(){return chunkG7TGUXDN_cjs.b}});Object.defineProperty(exports,"useSuggestedActions",{enumerable:true,get:function(){return chunkG7TGUXDN_cjs.o}});Object.defineProperty(exports,"useAttachments",{enumerable:true,get:function(){return chunkYMIEUVHK_cjs.b}});Object.defineProperty(exports,"useStreaming",{enumerable:true,get:function(){return chunkYMIEUVHK_cjs.a}});Object.defineProperty(exports,"useAutoScroll",{enumerable:true,get:function(){return chunkLLMC5JID_cjs.a}});Object.defineProperty(exports,"useMessageComposer",{enumerable:true,get:function(){return chunkLLMC5JID_cjs.b}});Object.defineProperty(exports,"ChatContext",{enumerable:true,get:function(){return chunkSFEPMZCU_cjs.a}});Object.defineProperty(exports,"ChatProvider",{enumerable:true,get:function(){return chunkSFEPMZCU_cjs.b}});Object.defineProperty(exports,"useChatContext",{enumerable:true,get:function(){return chunkSFEPMZCU_cjs.c}});Object.defineProperty(exports,"getContrastTextColor",{enumerable:true,get:function(){return chunkKSMAVBLY_cjs.a}});Object.defineProperty(exports,"useBrandingCSSVars",{enumerable:true,get:function(){return chunkKSMAVBLY_cjs.b}});exports.chatTokens=Z;exports.formatMessageTime=p;exports.formatRelativeTime=X;//# sourceMappingURL=index.cjs.map
1
+ 'use strict';var chunkQGRXQAWZ_cjs=require('./chunk-QGRXQAWZ.cjs'),chunk3SEVU272_cjs=require('./chunk-3SEVU272.cjs'),chunkZKMXEECD_cjs=require('./chunk-ZKMXEECD.cjs'),chunkHVCCZKEO_cjs=require('./chunk-HVCCZKEO.cjs'),chunkTOYU46SZ_cjs=require('./chunk-TOYU46SZ.cjs'),chunkSFEPMZCU_cjs=require('./chunk-SFEPMZCU.cjs'),chunkKSMAVBLY_cjs=require('./chunk-KSMAVBLY.cjs');var i={hour:"numeric",minute:"2-digit",hour12:true},m={month:"short",day:"numeric"},te={...m,year:"numeric",...i};function c(t){let e=typeof t=="string"?new Date(t):t,a=new Date;return e.getDate()===a.getDate()&&e.getMonth()===a.getMonth()&&e.getFullYear()===a.getFullYear()?e.toLocaleTimeString("en-US",i):e.getFullYear()===a.getFullYear()?`${e.toLocaleDateString("en-US",m)}, ${e.toLocaleTimeString("en-US",i)}`:e.toLocaleDateString("en-US",te)}function ae(t){let e=typeof t=="string"?new Date(t):t,g=new Date().getTime()-e.getTime(),s=Math.floor(g/1e3),r=Math.floor(s/60),o=Math.floor(r/60),n=Math.floor(o/24);return s<60?"just now":r<60?`${r} minute${r===1?"":"s"} ago`:o<24?`${o} hour${o===1?"":"s"} ago`:n<7?`${n} day${n===1?"":"s"} ago`:c(e)}var re={spacing:{messageBetween:"1rem",messagePx:"0.875rem",messagePy:"0.625rem",container:"1rem",composerPadding:"1rem"},typography:{message:{fontSize:"1rem",lineHeight:1.5,letterSpacing:"0px"},caption:{fontSize:"0.875rem",lineHeight:1.4},small:{fontSize:"0.8125rem",lineHeight:1.3}},borderRadius:{message:"0.5rem",input:"1rem",panel:"0.5rem",button:"0.5rem",chip:"0.25rem"},colors:{primary:"var(--chat-primary, #106997)",secondary:"var(--chat-secondary, #56C18A)",error:"var(--chat-error, #B1001B)",warning:"var(--chat-warning, #DD9652)",messageBg:"var(--chat-message-bg, rgba(0, 0, 0, 0.03))",userMessageBg:"var(--chat-user-message-bg, var(--chat-primary, #106997))",userMessageText:"var(--chat-user-message-text, #ffffff)",panelBg:"var(--chat-panel-bg, rgba(0, 0, 0, 0.02))",panelBorder:"var(--chat-panel-border, rgba(0, 0, 0, 0.06))",border:"var(--chat-border, rgba(0, 0, 0, 0.06))",borderHover:"var(--chat-border-hover, rgba(0, 0, 0, 0.12))",text:"var(--chat-text, #1D2033)",subtle:"var(--chat-text-subtle, rgba(0, 0, 0, 0.5))",placeholder:"var(--chat-placeholder, rgba(0, 0, 0, 0.4))",status:{pending:{main:"rgba(0, 0, 0, 0.3)",bg:"rgba(0, 0, 0, 0.05)"},running:{main:"rgb(99, 102, 241)",bg:"rgba(99, 102, 241, 0.08)"},completed:{main:"rgb(16, 185, 129)",bg:"rgba(16, 185, 129, 0.08)"},failed:{main:"rgb(239, 68, 68)",bg:"rgba(239, 68, 68, 0.08)"}}},shadows:{subtle:"0 1px 2px rgba(0, 0, 0, 0.04)",input:"0 2px 8px rgba(0, 0, 0, 0.08)",inputFocus:"0 4px 16px rgba(0, 0, 0, 0.12)",button:"0 1px 3px rgba(0, 0, 0, 0.08)",buttonHover:"0 2px 6px rgba(0, 0, 0, 0.12)",primary:"0 2px 6px rgba(16, 105, 151, 0.3)",primaryHover:"0 4px 12px rgba(16, 105, 151, 0.4)"},animations:{messageEntrance:{initial:{opacity:0,y:8},animate:{opacity:1,y:0},transition:{duration:.3,ease:[.4,0,.2,1]}},fadeIn:{initial:{opacity:0},animate:{opacity:1},transition:{duration:.2}}}};Object.defineProperty(exports,"AttachmentPreview",{enumerable:true,get:function(){return chunkQGRXQAWZ_cjs.b}});Object.defineProperty(exports,"Avatar",{enumerable:true,get:function(){return chunkQGRXQAWZ_cjs.c}});Object.defineProperty(exports,"ChatContainer",{enumerable:true,get:function(){return chunkQGRXQAWZ_cjs.d}});Object.defineProperty(exports,"ChatLayout",{enumerable:true,get:function(){return chunkQGRXQAWZ_cjs.$}});Object.defineProperty(exports,"MarkdownContent",{enumerable:true,get:function(){return chunkQGRXQAWZ_cjs.f}});Object.defineProperty(exports,"Message",{enumerable:true,get:function(){return chunkQGRXQAWZ_cjs.T}});Object.defineProperty(exports,"MessageActionBar",{enumerable:true,get:function(){return chunkQGRXQAWZ_cjs.k}});Object.defineProperty(exports,"MessageComposer",{enumerable:true,get:function(){return chunkQGRXQAWZ_cjs.U}});Object.defineProperty(exports,"MessageList",{enumerable:true,get:function(){return chunkQGRXQAWZ_cjs.W}});Object.defineProperty(exports,"ScrollToBottomButton",{enumerable:true,get:function(){return chunkQGRXQAWZ_cjs.V}});Object.defineProperty(exports,"StreamingText",{enumerable:true,get:function(){return chunkQGRXQAWZ_cjs.B}});Object.defineProperty(exports,"SuggestedActions",{enumerable:true,get:function(){return chunkQGRXQAWZ_cjs.C}});Object.defineProperty(exports,"ToolStatusIndicator",{enumerable:true,get:function(){return chunkQGRXQAWZ_cjs._}});Object.defineProperty(exports,"TypingIndicator",{enumerable:true,get:function(){return chunkQGRXQAWZ_cjs.Y}});Object.defineProperty(exports,"WelcomeScreen",{enumerable:true,get:function(){return chunkQGRXQAWZ_cjs.aa}});Object.defineProperty(exports,"cn",{enumerable:true,get:function(){return chunkQGRXQAWZ_cjs.a}});Object.defineProperty(exports,"ActionButton",{enumerable:true,get:function(){return chunk3SEVU272_cjs.q}});Object.defineProperty(exports,"AvatarPrimitive",{enumerable:true,get:function(){return chunk3SEVU272_cjs.l}});Object.defineProperty(exports,"ComposerContext",{enumerable:true,get:function(){return chunk3SEVU272_cjs.g}});Object.defineProperty(exports,"ComposerInput",{enumerable:true,get:function(){return chunk3SEVU272_cjs.j}});Object.defineProperty(exports,"ComposerSubmit",{enumerable:true,get:function(){return chunk3SEVU272_cjs.k}});Object.defineProperty(exports,"MessageComposerPrimitive",{enumerable:true,get:function(){return chunk3SEVU272_cjs.i}});Object.defineProperty(exports,"MessageContentPrimitive",{enumerable:true,get:function(){return chunk3SEVU272_cjs.d}});Object.defineProperty(exports,"MessageContext",{enumerable:true,get:function(){return chunk3SEVU272_cjs.a}});Object.defineProperty(exports,"MessageListPrimitive",{enumerable:true,get:function(){return chunk3SEVU272_cjs.f}});Object.defineProperty(exports,"MessagePrimitive",{enumerable:true,get:function(){return chunk3SEVU272_cjs.c}});Object.defineProperty(exports,"MessageTimestampPrimitive",{enumerable:true,get:function(){return chunk3SEVU272_cjs.e}});Object.defineProperty(exports,"StreamingTextPrimitive",{enumerable:true,get:function(){return chunk3SEVU272_cjs.m}});Object.defineProperty(exports,"SuggestedActionsContext",{enumerable:true,get:function(){return chunk3SEVU272_cjs.n}});Object.defineProperty(exports,"SuggestedActionsPrimitive",{enumerable:true,get:function(){return chunk3SEVU272_cjs.p}});Object.defineProperty(exports,"TypingIndicatorPrimitive",{enumerable:true,get:function(){return chunk3SEVU272_cjs.r}});Object.defineProperty(exports,"useComposer",{enumerable:true,get:function(){return chunk3SEVU272_cjs.h}});Object.defineProperty(exports,"useMessage",{enumerable:true,get:function(){return chunk3SEVU272_cjs.b}});Object.defineProperty(exports,"useSuggestedActions",{enumerable:true,get:function(){return chunk3SEVU272_cjs.o}});Object.defineProperty(exports,"useAttachments",{enumerable:true,get:function(){return chunkZKMXEECD_cjs.b}});Object.defineProperty(exports,"useStreaming",{enumerable:true,get:function(){return chunkZKMXEECD_cjs.a}});Object.defineProperty(exports,"useScrollLock",{enumerable:true,get:function(){return chunkHVCCZKEO_cjs.a}});Object.defineProperty(exports,"useAutoScroll",{enumerable:true,get:function(){return chunkTOYU46SZ_cjs.a}});Object.defineProperty(exports,"useMessageComposer",{enumerable:true,get:function(){return chunkTOYU46SZ_cjs.b}});Object.defineProperty(exports,"ChatContext",{enumerable:true,get:function(){return chunkSFEPMZCU_cjs.a}});Object.defineProperty(exports,"ChatProvider",{enumerable:true,get:function(){return chunkSFEPMZCU_cjs.b}});Object.defineProperty(exports,"useChatContext",{enumerable:true,get:function(){return chunkSFEPMZCU_cjs.c}});Object.defineProperty(exports,"getContrastTextColor",{enumerable:true,get:function(){return chunkKSMAVBLY_cjs.a}});Object.defineProperty(exports,"useBrandingCSSVars",{enumerable:true,get:function(){return chunkKSMAVBLY_cjs.b}});exports.chatTokens=re;exports.formatMessageTime=c;exports.formatRelativeTime=ae;//# sourceMappingURL=index.cjs.map
2
2
  //# sourceMappingURL=index.cjs.map
@@ -1 +1 @@
1
- {"version":3,"sources":["../src/utils/format-date.ts","../src/styles/tokens.ts"],"names":["TIME_FORMAT","DATE_FORMAT","FULL_FORMAT","formatMessageTime","date","d","now","formatRelativeTime","diffMs","diffSeconds","diffMinutes","diffHours","diffDays","chatTokens"],"mappings":"6TAIA,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,CAAAA,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,QAAA,CAAW,IAAI,IAAA,CAAKA,CAAI,EAAIA,CAAAA,CAChDE,CAAAA,CAAM,IAAI,IAAA,CAOhB,OAJED,CAAAA,CAAE,OAAA,KAAcC,CAAAA,CAAI,OAAA,IACpBD,CAAAA,CAAE,QAAA,KAAeC,CAAAA,CAAI,QAAA,EAAS,EAC9BD,CAAAA,CAAE,aAAY,GAAMC,CAAAA,CAAI,aAAY,CAG7BD,CAAAA,CAAE,mBAAmB,OAAA,CAASL,CAAW,CAAA,CAG/BK,CAAAA,CAAE,aAAY,GAAMC,CAAAA,CAAI,aAAY,CAG9C,CAAA,EAAGD,EAAE,kBAAA,CAAmB,OAAA,CAASJ,CAAW,CAAC,CAAA,EAAA,EAAKI,EAAE,kBAAA,CAAmB,OAAA,CAASL,CAAW,CAAC,CAAA,CAAA,CAG9FK,EAAE,kBAAA,CAAmB,OAAA,CAASH,CAAW,CAClD,CAKO,SAASK,CAAAA,CAAmBH,EAA6B,CAC9D,IAAMC,EAAI,OAAOD,CAAAA,EAAS,QAAA,CAAW,IAAI,KAAKA,CAAI,CAAA,CAAIA,EAEhDI,CAAAA,CADM,IAAI,MAAK,CACF,OAAA,EAAQ,CAAIH,CAAAA,CAAE,SAAQ,CACnCI,CAAAA,CAAc,K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A,CAAS,8BAAA,CAGT,UAAW,6CAAA,CACX,aAAA,CAAe,4DACf,eAAA,CAAiB,wCAAA,CAGjB,OAAA,CAAS,2CAAA,CACT,YAAa,+CAAA,CAGb,MAAA,CAAQ,0CACR,WAAA,CAAa,+CAAA,CAGb,KAAM,2BAAA,CACN,MAAA,CAAQ,8CACR,WAAA,CAAa,6CAAA,CAGb,OAAQ,CACN,OAAA,CAAS,CACP,IAAA,CAAM,oBAAA,CACN,GAAI,qBACN,CAAA,CACA,OAAA,CAAS,CACP,KAAM,mBAAA,CACN,EAAA,CAAI,0BACN,CAAA,CACA,SAAA,CAAW,CACT,IAAA,CAAM,mBAAA,CACN,EAAA,CAAI,0BACN,EACA,MAAA,CAAQ,CACN,KAAM,kBAAA,CACN,EAAA,CAAI,yBACN,CACF,CACF,CAAA,CAEA,OAAA,CAAS,CACP,MAAA,CAAQ,+BAAA,CACR,MAAO,+BAAA,CACP,UAAA,CAAY,iCACZ,MAAA,CAAQ,+BAAA,CACR,YAAa,+BAAA,CACb,OAAA,CAAS,oCACT,YAAA,CAAc,oCAChB,EAEA,UAAA,CAAY,CACV,gBAAiB,CACf,OAAA,CAAS,CAAE,OAAA,CAAS,EAAG,CAAA,CAAG,CAAE,EAC5B,OAAA,CAAS,CAAE,QAAS,CAAA,CAAG,CAAA,CAAG,CAAE,CAAA,CAC5B,UAAA,CAAY,CAAE,QAAA,CAAU,EAAA,CAAK,KAAM,CAAC,EAAA,CAAK,EAAG,EAAA,CAAK,CAAC,CAAE,CACtD,EACA,MAAA,CAAQ,CACN,QAAS,CAAE,OAAA,CAAS,CAAE,CAAA,CACtB,OAAA,CAAS,CAAE,OAAA,CAAS,CAAE,EACtB,UAAA,CAAY,CAAE,SAAU,EAAI,CAC9B,CACF,CACF","file":"index.cjs","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","/**\n * Design tokens for the chat UI.\n * These map to CSS custom properties for easy theming.\n */\n\nexport const chatTokens = {\n spacing: {\n /** Vertical spacing between messages (16px) */\n messageBetween: \"1rem\",\n /** Message bubble horizontal padding (14px) */\n messagePx: \"0.875rem\",\n /** Message bubble vertical padding (10px) */\n messagePy: \"0.625rem\",\n /** Container padding (16px) */\n container: \"1rem\",\n /** Composer padding (16px) */\n composerPadding: \"1rem\",\n },\n\n typography: {\n message: {\n fontSize: \"1rem\",\n lineHeight: 1.5,\n letterSpacing: \"0px\",\n },\n caption: {\n fontSize: \"0.875rem\",\n lineHeight: 1.4,\n },\n small: {\n fontSize: \"0.8125rem\",\n lineHeight: 1.3,\n },\n },\n\n borderRadius: {\n message: \"0.5rem\",\n input: \"1rem\",\n panel: \"0.5rem\",\n button: \"0.5rem\",\n chip: \"0.25rem\",\n },\n\n colors: {\n // CSS custom property references\n primary: \"var(--chat-primary, #106997)\",\n secondary: \"var(--chat-secondary, #56C18A)\",\n error: \"var(--chat-error, #B1001B)\",\n warning: \"var(--chat-warning, #DD9652)\",\n\n // Message backgrounds\n messageBg: \"var(--chat-message-bg, rgba(0, 0, 0, 0.03))\",\n userMessageBg: \"var(--chat-user-message-bg, var(--chat-primary, #106997))\",\n userMessageText: \"var(--chat-user-message-text, #ffffff)\",\n\n // Panel backgrounds\n panelBg: \"var(--chat-panel-bg, rgba(0, 0, 0, 0.02))\",\n panelBorder: \"var(--chat-panel-border, rgba(0, 0, 0, 0.06))\",\n\n // Borders\n border: \"var(--chat-border, rgba(0, 0, 0, 0.06))\",\n borderHover: \"var(--chat-border-hover, rgba(0, 0, 0, 0.12))\",\n\n // Text\n text: \"var(--chat-text, #1D2033)\",\n subtle: \"var(--chat-text-subtle, rgba(0, 0, 0, 0.5))\",\n placeholder: \"var(--chat-placeholder, rgba(0, 0, 0, 0.4))\",\n\n // Status colors\n status: {\n pending: {\n main: \"rgba(0, 0, 0, 0.3)\",\n bg: \"rgba(0, 0, 0, 0.05)\",\n },\n running: {\n main: \"rgb(99, 102, 241)\",\n bg: \"rgba(99, 102, 241, 0.08)\",\n },\n completed: {\n main: \"rgb(16, 185, 129)\",\n bg: \"rgba(16, 185, 129, 0.08)\",\n },\n failed: {\n main: \"rgb(239, 68, 68)\",\n bg: \"rgba(239, 68, 68, 0.08)\",\n },\n },\n },\n\n shadows: {\n subtle: \"0 1px 2px rgba(0, 0, 0, 0.04)\",\n input: \"0 2px 8px rgba(0, 0, 0, 0.08)\",\n inputFocus: \"0 4px 16px rgba(0, 0, 0, 0.12)\",\n button: \"0 1px 3px rgba(0, 0, 0, 0.08)\",\n buttonHover: \"0 2px 6px rgba(0, 0, 0, 0.12)\",\n primary: \"0 2px 6px rgba(16, 105, 151, 0.3)\",\n primaryHover: \"0 4px 12px rgba(16, 105, 151, 0.4)\",\n },\n\n animations: {\n messageEntrance: {\n initial: { opacity: 0, y: 8 },\n animate: { opacity: 1, y: 0 },\n transition: { duration: 0.3, ease: [0.4, 0, 0.2, 1] },\n },\n fadeIn: {\n initial: { opacity: 0 },\n animate: { opacity: 1 },\n transition: { duration: 0.2 },\n },\n },\n} as const;\n\nexport type ChatTokens = typeof chatTokens;\n"]}
1
+ {"version":3,"sources":["../src/utils/format-date.ts","../src/styles/tokens.ts"],"names":["TIME_FORMAT","DATE_FORMAT","FULL_FORMAT","formatMessageTime","date","d","now","formatRelativeTime","diffMs","diffSeconds","diffMinutes","diffHours","diffDays","chatTokens"],"mappings":"+WAIA,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,QAAA,CAAW,IAAI,IAAA,CAAKA,CAAI,EAAIA,CAAAA,CAChDE,CAAAA,CA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CAAS,CACP,MAAA,CAAQ,+BAAA,CACR,MAAO,+BAAA,CACP,UAAA,CAAY,iCACZ,MAAA,CAAQ,+BAAA,CACR,YAAa,+BAAA,CACb,OAAA,CAAS,oCACT,YAAA,CAAc,oCAChB,EAEA,UAAA,CAAY,CACV,gBAAiB,CACf,OAAA,CAAS,CAAE,OAAA,CAAS,EAAG,CAAA,CAAG,CAAE,EAC5B,OAAA,CAAS,CAAE,QAAS,CAAA,CAAG,CAAA,CAAG,CAAE,CAAA,CAC5B,UAAA,CAAY,CAAE,QAAA,CAAU,EAAA,CAAK,KAAM,CAAC,EAAA,CAAK,EAAG,EAAA,CAAK,CAAC,CAAE,CACtD,EACA,MAAA,CAAQ,CACN,QAAS,CAAE,OAAA,CAAS,CAAE,CAAA,CACtB,OAAA,CAAS,CAAE,OAAA,CAAS,CAAE,EACtB,UAAA,CAAY,CAAE,SAAU,EAAI,CAC9B,CACF,CACF","file":"index.cjs","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","/**\n * Design tokens for the chat UI.\n * These map to CSS custom properties for easy theming.\n */\n\nexport const chatTokens = {\n spacing: {\n /** Vertical spacing between messages (16px) */\n messageBetween: \"1rem\",\n /** Message bubble horizontal padding (14px) */\n messagePx: \"0.875rem\",\n /** Message bubble vertical padding (10px) */\n messagePy: \"0.625rem\",\n /** Container padding (16px) */\n container: \"1rem\",\n /** Composer padding (16px) */\n composerPadding: \"1rem\",\n },\n\n typography: {\n message: {\n fontSize: \"1rem\",\n lineHeight: 1.5,\n letterSpacing: \"0px\",\n },\n caption: {\n fontSize: \"0.875rem\",\n lineHeight: 1.4,\n },\n small: {\n fontSize: \"0.8125rem\",\n lineHeight: 1.3,\n },\n },\n\n borderRadius: {\n message: \"0.5rem\",\n input: \"1rem\",\n panel: \"0.5rem\",\n button: \"0.5rem\",\n chip: \"0.25rem\",\n },\n\n colors: {\n // CSS custom property references\n primary: \"var(--chat-primary, #106997)\",\n secondary: \"var(--chat-secondary, #56C18A)\",\n error: \"var(--chat-error, #B1001B)\",\n warning: \"var(--chat-warning, #DD9652)\",\n\n // Message backgrounds\n messageBg: \"var(--chat-message-bg, rgba(0, 0, 0, 0.03))\",\n userMessageBg: \"var(--chat-user-message-bg, var(--chat-primary, #106997))\",\n userMessageText: \"var(--chat-user-message-text, #ffffff)\",\n\n // Panel backgrounds\n panelBg: \"var(--chat-panel-bg, rgba(0, 0, 0, 0.02))\",\n panelBorder: \"var(--chat-panel-border, rgba(0, 0, 0, 0.06))\",\n\n // Borders\n border: \"var(--chat-border, rgba(0, 0, 0, 0.06))\",\n borderHover: \"var(--chat-border-hover, rgba(0, 0, 0, 0.12))\",\n\n // Text\n text: \"var(--chat-text, #1D2033)\",\n subtle: \"var(--chat-text-subtle, rgba(0, 0, 0, 0.5))\",\n placeholder: \"var(--chat-placeholder, rgba(0, 0, 0, 0.4))\",\n\n // Status colors\n status: {\n pending: {\n main: \"rgba(0, 0, 0, 0.3)\",\n bg: \"rgba(0, 0, 0, 0.05)\",\n },\n running: {\n main: \"rgb(99, 102, 241)\",\n bg: \"rgba(99, 102, 241, 0.08)\",\n },\n completed: {\n main: \"rgb(16, 185, 129)\",\n bg: \"rgba(16, 185, 129, 0.08)\",\n },\n failed: {\n main: \"rgb(239, 68, 68)\",\n bg: \"rgba(239, 68, 68, 0.08)\",\n },\n },\n },\n\n shadows: {\n subtle: \"0 1px 2px rgba(0, 0, 0, 0.04)\",\n input: \"0 2px 8px rgba(0, 0, 0, 0.08)\",\n inputFocus: \"0 4px 16px rgba(0, 0, 0, 0.12)\",\n button: \"0 1px 3px rgba(0, 0, 0, 0.08)\",\n buttonHover: \"0 2px 6px rgba(0, 0, 0, 0.12)\",\n primary: \"0 2px 6px rgba(16, 105, 151, 0.3)\",\n primaryHover: \"0 4px 12px rgba(16, 105, 151, 0.4)\",\n },\n\n animations: {\n messageEntrance: {\n initial: { opacity: 0, y: 8 },\n animate: { opacity: 1, y: 0 },\n transition: { duration: 0.3, ease: [0.4, 0, 0.2, 1] },\n },\n fadeIn: {\n initial: { opacity: 0 },\n animate: { opacity: 1 },\n transition: { duration: 0.2 },\n },\n },\n} as const;\n\nexport type ChatTokens = typeof chatTokens;\n"]}
package/dist/index.d.cts CHANGED
@@ -1,11 +1,11 @@
1
- export { A as Attachment, C as ChatMessage, M as MessageData, a as Participant, P as ParticipantRole, R as ReasoningChunk, S as SourceReference, b as SourceTypeConfig, c as SuggestedAction, d as SuggestedActionType } from './message-a6VUd777.cjs';
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-9z0crkf9.cjs';
2
2
  export { a as StreamChunk, b as StreamingOptions, c as StreamingState } from './streaming-CF63E6iS.cjs';
3
3
  export { B as BrandingData } from './branding-SzYU4ncD.cjs';
4
4
  export { ChatContext, ChatContextValue, ChatProvider, ChatProviderProps, useChatContext } from './context/index.cjs';
5
- export { useAttachments, useAutoScroll, useBrandingCSSVars, useMessageComposer, useStreaming } from './hooks/index.cjs';
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-DvOcT8NS.cjs';
5
+ export { useAttachments, useAutoScroll, useBrandingCSSVars, useMessageComposer, useScrollLock, useStreaming } from './hooks/index.cjs';
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-CL1hlGO5.cjs';
7
7
  export { ActionButton, MessageList as MessageListPrimitive, StreamingText as StreamingTextPrimitive, SuggestedActionsContext, SuggestedActions as SuggestedActionsPrimitive, TypingIndicator as TypingIndicatorPrimitive, useSuggestedActions } from './primitives/index.cjs';
8
- export { A as AttachmentPreview, a as Avatar, C as ChatContainer, b as ChatLayout, M as MarkdownContent, c as Message, d as MessageComposer, e as MessageList, S as StreamingText, f as SuggestedActions, T as TypingIndicator, W as WelcomeScreen } from './WelcomeScreen-B434H05-.cjs';
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-BiY3uGhp.cjs';
9
9
  import { ClassValue } from 'clsx';
10
10
  import 'react/jsx-runtime';
11
11
  import 'react';
package/dist/index.d.ts CHANGED
@@ -1,11 +1,11 @@
1
- export { A as Attachment, C as ChatMessage, M as MessageData, a as Participant, P as ParticipantRole, R as ReasoningChunk, S as SourceReference, b as SourceTypeConfig, c as SuggestedAction, d as SuggestedActionType } from './message-B21_kqE2.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-4-BaKes3.js';
2
2
  export { a as StreamChunk, b as StreamingOptions, c as StreamingState } from './streaming-CF63E6iS.js';
3
3
  export { B as BrandingData } from './branding-SzYU4ncD.js';
4
4
  export { ChatContext, ChatContextValue, ChatProvider, ChatProviderProps, useChatContext } from './context/index.js';
5
- export { useAttachments, useAutoScroll, useBrandingCSSVars, useMessageComposer, useStreaming } from './hooks/index.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-DftdWqSs.js';
5
+ export { useAttachments, useAutoScroll, useBrandingCSSVars, useMessageComposer, useScrollLock, useStreaming } from './hooks/index.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-BgjqLv1r.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, a as Avatar, C as ChatContainer, b as ChatLayout, M as MarkdownContent, c as Message, d as MessageComposer, e as MessageList, S as StreamingText, f as SuggestedActions, T as TypingIndicator, W as WelcomeScreen } from './WelcomeScreen-TrcbOYob.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-YsXZsAwZ.js';
9
9
  import { ClassValue } from 'clsx';
10
10
  import 'react/jsx-runtime';
11
11
  import 'react';
package/dist/index.js CHANGED
@@ -1,2 +1,2 @@
1
- export{b as AttachmentPreview,c as Avatar,d as ChatContainer,Y as ChatLayout,f as MarkdownContent,S as Message,T as MessageComposer,U as MessageList,A as StreamingText,B as SuggestedActions,W as TypingIndicator,Z as WelcomeScreen,a as cn}from'./chunk-BA3VCHRC.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-3KB4JYSQ.js';export{b as useAttachments,a as useStreaming}from'./chunk-3ERHTQXR.js';export{a as useAutoScroll,b as useMessageComposer}from'./chunk-LJQHWCUK.js';export{a as ChatContext,b as ChatProvider,c as useChatContext}from'./chunk-OCKHJ4WO.js';export{a as getContrastTextColor,b as useBrandingCSSVars}from'./chunk-NSTK5EUQ.js';var i={hour:"numeric",minute:"2-digit",hour12:true},m={month:"short",day:"numeric"},Q={...m,year:"numeric",...i};function p(t){let e=typeof t=="string"?new Date(t):t,a=new Date;return e.getDate()===a.getDate()&&e.getMonth()===a.getMonth()&&e.getFullYear()===a.getFullYear()?e.toLocaleTimeString("en-US",i):e.getFullYear()===a.getFullYear()?`${e.toLocaleDateString("en-US",m)}, ${e.toLocaleTimeString("en-US",i)}`:e.toLocaleDateString("en-US",Q)}function X(t){let e=typeof t=="string"?new Date(t):t,g=new Date().getTime()-e.getTime(),s=Math.floor(g/1e3),r=Math.floor(s/60),o=Math.floor(r/60),n=Math.floor(o/24);return s<60?"just now":r<60?`${r} minute${r===1?"":"s"} ago`:o<24?`${o} hour${o===1?"":"s"} ago`:n<7?`${n} day${n===1?"":"s"} ago`:p(e)}var Z={spacing:{messageBetween:"1rem",messagePx:"0.875rem",messagePy:"0.625rem",container:"1rem",composerPadding:"1rem"},typography:{message:{fontSize:"1rem",lineHeight:1.5,letterSpacing:"0px"},caption:{fontSize:"0.875rem",lineHeight:1.4},small:{fontSize:"0.8125rem",lineHeight:1.3}},borderRadius:{message:"0.5rem",input:"1rem",panel:"0.5rem",button:"0.5rem",chip:"0.25rem"},colors:{primary:"var(--chat-primary, #106997)",secondary:"var(--chat-secondary, #56C18A)",error:"var(--chat-error, #B1001B)",warning:"var(--chat-warning, #DD9652)",messageBg:"var(--chat-message-bg, rgba(0, 0, 0, 0.03))",userMessageBg:"var(--chat-user-message-bg, var(--chat-primary, #106997))",userMessageText:"var(--chat-user-message-text, #ffffff)",panelBg:"var(--chat-panel-bg, rgba(0, 0, 0, 0.02))",panelBorder:"var(--chat-panel-border, rgba(0, 0, 0, 0.06))",border:"var(--chat-border, rgba(0, 0, 0, 0.06))",borderHover:"var(--chat-border-hover, rgba(0, 0, 0, 0.12))",text:"var(--chat-text, #1D2033)",subtle:"var(--chat-text-subtle, rgba(0, 0, 0, 0.5))",placeholder:"var(--chat-placeholder, rgba(0, 0, 0, 0.4))",status:{pending:{main:"rgba(0, 0, 0, 0.3)",bg:"rgba(0, 0, 0, 0.05)"},running:{main:"rgb(99, 102, 241)",bg:"rgba(99, 102, 241, 0.08)"},completed:{main:"rgb(16, 185, 129)",bg:"rgba(16, 185, 129, 0.08)"},failed:{main:"rgb(239, 68, 68)",bg:"rgba(239, 68, 68, 0.08)"}}},shadows:{subtle:"0 1px 2px rgba(0, 0, 0, 0.04)",input:"0 2px 8px rgba(0, 0, 0, 0.08)",inputFocus:"0 4px 16px rgba(0, 0, 0, 0.12)",button:"0 1px 3px rgba(0, 0, 0, 0.08)",buttonHover:"0 2px 6px rgba(0, 0, 0, 0.12)",primary:"0 2px 6px rgba(16, 105, 151, 0.3)",primaryHover:"0 4px 12px rgba(16, 105, 151, 0.4)"},animations:{messageEntrance:{initial:{opacity:0,y:8},animate:{opacity:1,y:0},transition:{duration:.3,ease:[.4,0,.2,1]}},fadeIn:{initial:{opacity:0},animate:{opacity:1},transition:{duration:.2}}}};export{Z as chatTokens,p as formatMessageTime,X as formatRelativeTime};//# sourceMappingURL=index.js.map
1
+ export{b as AttachmentPreview,c as Avatar,d as ChatContainer,$ as ChatLayout,f as MarkdownContent,T as Message,k as MessageActionBar,U as MessageComposer,W as MessageList,V as ScrollToBottomButton,B as StreamingText,C as SuggestedActions,_ as ToolStatusIndicator,Y as TypingIndicator,aa as WelcomeScreen,a as cn}from'./chunk-POKFMILU.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-W3HWTAF6.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-65VDOUZG.js';export{a as ChatContext,b as ChatProvider,c as useChatContext}from'./chunk-OCKHJ4WO.js';export{a as getContrastTextColor,b as useBrandingCSSVars}from'./chunk-NSTK5EUQ.js';var i={hour:"numeric",minute:"2-digit",hour12:true},m={month:"short",day:"numeric"},te={...m,year:"numeric",...i};function c(t){let e=typeof t=="string"?new Date(t):t,a=new Date;return e.getDate()===a.getDate()&&e.getMonth()===a.getMonth()&&e.getFullYear()===a.getFullYear()?e.toLocaleTimeString("en-US",i):e.getFullYear()===a.getFullYear()?`${e.toLocaleDateString("en-US",m)}, ${e.toLocaleTimeString("en-US",i)}`:e.toLocaleDateString("en-US",te)}function ae(t){let e=typeof t=="string"?new Date(t):t,g=new Date().getTime()-e.getTime(),s=Math.floor(g/1e3),r=Math.floor(s/60),o=Math.floor(r/60),n=Math.floor(o/24);return s<60?"just now":r<60?`${r} minute${r===1?"":"s"} ago`:o<24?`${o} hour${o===1?"":"s"} ago`:n<7?`${n} day${n===1?"":"s"} ago`:c(e)}var re={spacing:{messageBetween:"1rem",messagePx:"0.875rem",messagePy:"0.625rem",container:"1rem",composerPadding:"1rem"},typography:{message:{fontSize:"1rem",lineHeight:1.5,letterSpacing:"0px"},caption:{fontSize:"0.875rem",lineHeight:1.4},small:{fontSize:"0.8125rem",lineHeight:1.3}},borderRadius:{message:"0.5rem",input:"1rem",panel:"0.5rem",button:"0.5rem",chip:"0.25rem"},colors:{primary:"var(--chat-primary, #106997)",secondary:"var(--chat-secondary, #56C18A)",error:"var(--chat-error, #B1001B)",warning:"var(--chat-warning, #DD9652)",messageBg:"var(--chat-message-bg, rgba(0, 0, 0, 0.03))",userMessageBg:"var(--chat-user-message-bg, var(--chat-primary, #106997))",userMessageText:"var(--chat-user-message-text, #ffffff)",panelBg:"var(--chat-panel-bg, rgba(0, 0, 0, 0.02))",panelBorder:"var(--chat-panel-border, rgba(0, 0, 0, 0.06))",border:"var(--chat-border, rgba(0, 0, 0, 0.06))",borderHover:"var(--chat-border-hover, rgba(0, 0, 0, 0.12))",text:"var(--chat-text, #1D2033)",subtle:"var(--chat-text-subtle, rgba(0, 0, 0, 0.5))",placeholder:"var(--chat-placeholder, rgba(0, 0, 0, 0.4))",status:{pending:{main:"rgba(0, 0, 0, 0.3)",bg:"rgba(0, 0, 0, 0.05)"},running:{main:"rgb(99, 102, 241)",bg:"rgba(99, 102, 241, 0.08)"},completed:{main:"rgb(16, 185, 129)",bg:"rgba(16, 185, 129, 0.08)"},failed:{main:"rgb(239, 68, 68)",bg:"rgba(239, 68, 68, 0.08)"}}},shadows:{subtle:"0 1px 2px rgba(0, 0, 0, 0.04)",input:"0 2px 8px rgba(0, 0, 0, 0.08)",inputFocus:"0 4px 16px rgba(0, 0, 0, 0.12)",button:"0 1px 3px rgba(0, 0, 0, 0.08)",buttonHover:"0 2px 6px rgba(0, 0, 0, 0.12)",primary:"0 2px 6px rgba(16, 105, 151, 0.3)",primaryHover:"0 4px 12px rgba(16, 105, 151, 0.4)"},animations:{messageEntrance:{initial:{opacity:0,y:8},animate:{opacity:1,y:0},transition:{duration:.3,ease:[.4,0,.2,1]}},fadeIn:{initial:{opacity:0},animate:{opacity:1},transition:{duration:.2}}}};export{re as chatTokens,c as formatMessageTime,ae 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","../src/styles/tokens.ts"],"names":["TIME_FORMAT","DATE_FORMAT","FULL_FORMAT","formatMessageTime","date","d","now","formatRelativeTime","diffMs","diffSeconds","diffMinutes","diffHours","diffD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CAAA,CACT,YAAa,+CAAA,CAGb,MAAA,CAAQ,0CACR,WAAA,CAAa,+CAAA,CAGb,KAAM,2BAAA,CACN,MAAA,CAAQ,8CACR,WAAA,CAAa,6CAAA,CAGb,OAAQ,CACN,OAAA,CAAS,CACP,IAAA,CAAM,oBAAA,CACN,GAAI,qBACN,CAAA,CACA,OAAA,CAAS,CACP,KAAM,mBAAA,CACN,EAAA,CAAI,0BACN,CAAA,CACA,SAAA,CAAW,CACT,IAAA,CAAM,mBAAA,CACN,EAAA,CAAI,0BACN,EACA,MAAA,CAAQ,CACN,KAAM,kBAAA,CACN,EAAA,CAAI,yBACN,CACF,CACF,CAAA,CAEA,OAAA,CAAS,CACP,MAAA,CAAQ,+BAAA,CACR,MAAO,+BAAA,CACP,UAAA,CAAY,iCACZ,MAAA,CAAQ,+BAAA,CACR,YAAa,+BAAA,CACb,OAAA,CAAS,oCACT,YAAA,CAAc,oCAChB,EAEA,UAAA,CAAY,CACV,gBAAiB,CACf,OAAA,CAAS,CAAE,OAAA,CAAS,EAAG,CAAA,CAAG,CAAE,EAC5B,OAAA,CAAS,CAAE,QAAS,CAAA,CAAG,CAAA,CAAG,CAAE,CAAA,CAC5B,UAAA,CAAY,CAAE,QAAA,CAAU,EAAA,CAAK,KAAM,CAAC,EAAA,CAAK,EAAG,EAAA,CAAK,CAAC,CAAE,CACtD,EACA,MAAA,CAAQ,CACN,QAAS,CAAE,OAAA,CAAS,CAAE,CAAA,CACtB,OAAA,CAAS,CAAE,OAAA,CAAS,CAAE,EACtB,UAAA,CAAY,CAAE,SAAU,EAAI,CAC9B,CACF,CACF","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","/**\n * Design tokens for the chat UI.\n * These map to CSS custom properties for easy theming.\n */\n\nexport const chatTokens = {\n spacing: {\n /** Vertical spacing between messages (16px) */\n messageBetween: \"1rem\",\n /** Message bubble horizontal padding (14px) */\n messagePx: \"0.875rem\",\n /** Message bubble vertical padding (10px) */\n messagePy: \"0.625rem\",\n /** Container padding (16px) */\n container: \"1rem\",\n /** Composer padding (16px) */\n composerPadding: \"1rem\",\n },\n\n typography: {\n message: {\n fontSize: \"1rem\",\n lineHeight: 1.5,\n letterSpacing: \"0px\",\n },\n caption: {\n fontSize: \"0.875rem\",\n lineHeight: 1.4,\n },\n small: {\n fontSize: \"0.8125rem\",\n lineHeight: 1.3,\n },\n },\n\n borderRadius: {\n message: \"0.5rem\",\n input: \"1rem\",\n panel: \"0.5rem\",\n button: \"0.5rem\",\n chip: \"0.25rem\",\n },\n\n colors: {\n // CSS custom property references\n primary: \"var(--chat-primary, #106997)\",\n secondary: \"var(--chat-secondary, #56C18A)\",\n error: \"var(--chat-error, #B1001B)\",\n warning: \"var(--chat-warning, #DD9652)\",\n\n // Message backgrounds\n messageBg: \"var(--chat-message-bg, rgba(0, 0, 0, 0.03))\",\n userMessageBg: \"var(--chat-user-message-bg, var(--chat-primary, #106997))\",\n userMessageText: \"var(--chat-user-message-text, #ffffff)\",\n\n // Panel backgrounds\n panelBg: \"var(--chat-panel-bg, rgba(0, 0, 0, 0.02))\",\n panelBorder: \"var(--chat-panel-border, rgba(0, 0, 0, 0.06))\",\n\n // Borders\n border: \"var(--chat-border, rgba(0, 0, 0, 0.06))\",\n borderHover: \"var(--chat-border-hover, rgba(0, 0, 0, 0.12))\",\n\n // Text\n text: \"var(--chat-text, #1D2033)\",\n subtle: \"var(--chat-text-subtle, rgba(0, 0, 0, 0.5))\",\n placeholder: \"var(--chat-placeholder, rgba(0, 0, 0, 0.4))\",\n\n // Status colors\n status: {\n pending: {\n main: \"rgba(0, 0, 0, 0.3)\",\n bg: \"rgba(0, 0, 0, 0.05)\",\n },\n running: {\n main: \"rgb(99, 102, 241)\",\n bg: \"rgba(99, 102, 241, 0.08)\",\n },\n completed: {\n main: \"rgb(16, 185, 129)\",\n bg: \"rgba(16, 185, 129, 0.08)\",\n },\n failed: {\n main: \"rgb(239, 68, 68)\",\n bg: \"rgba(239, 68, 68, 0.08)\",\n },\n },\n },\n\n shadows: {\n subtle: \"0 1px 2px rgba(0, 0, 0, 0.04)\",\n input: \"0 2px 8px rgba(0, 0, 0, 0.08)\",\n inputFocus: \"0 4px 16px rgba(0, 0, 0, 0.12)\",\n button: \"0 1px 3px rgba(0, 0, 0, 0.08)\",\n buttonHover: \"0 2px 6px rgba(0, 0, 0, 0.12)\",\n primary: \"0 2px 6px rgba(16, 105, 151, 0.3)\",\n primaryHover: \"0 4px 12px rgba(16, 105, 151, 0.4)\",\n },\n\n animations: {\n messageEntrance: {\n initial: { opacity: 0, y: 8 },\n animate: { opacity: 1, y: 0 },\n transition: { duration: 0.3, ease: [0.4, 0, 0.2, 1] },\n },\n fadeIn: {\n initial: { opacity: 0 },\n animate: { opacity: 1 },\n transition: { duration: 0.2 },\n },\n },\n} as const;\n\nexport type ChatTokens = typeof chatTokens;\n"]}
1
+ {"version":3,"sources":["../src/utils/format-date.ts","../src/styles/tokens.ts"],"names":["TIME_FORMAT","DATE_FORMAT","FULL_FORMAT","formatMessageTime","date","d","now","formatRelativeTime","diffMs","diffSeconds","diffMinutes","diffHours","diffDays","chatTokens"],"mappings":"spCAIA,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,QAAA,CAAW,IAAI,IAAA,CAAKA,CAAI,EAAIA,CAAAA,CAChDE,CAAAA,CAAM,IAAI,IAAA,CAOhB,OAJED,CAAAA,CAAE,OAAA,KAAcC,CAAAA,CAAI,OAAA,IACpBD,CAAAA,CAAE,QAAA,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Aa,+BAAA,CACb,OAAA,CAAS,oCACT,YAAA,CAAc,oCAChB,EAEA,UAAA,CAAY,CACV,gBAAiB,CACf,OAAA,CAAS,CAAE,OAAA,CAAS,EAAG,CAAA,CAAG,CAAE,EAC5B,OAAA,CAAS,CAAE,QAAS,CAAA,CAAG,CAAA,CAAG,CAAE,CAAA,CAC5B,UAAA,CAAY,CAAE,QAAA,CAAU,EAAA,CAAK,KAAM,CAAC,EAAA,CAAK,EAAG,EAAA,CAAK,CAAC,CAAE,CACtD,EACA,MAAA,CAAQ,CACN,QAAS,CAAE,OAAA,CAAS,CAAE,CAAA,CACtB,OAAA,CAAS,CAAE,OAAA,CAAS,CAAE,EACtB,UAAA,CAAY,CAAE,SAAU,EAAI,CAC9B,CACF,CACF","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","/**\n * Design tokens for the chat UI.\n * These map to CSS custom properties for easy theming.\n */\n\nexport const chatTokens = {\n spacing: {\n /** Vertical spacing between messages (16px) */\n messageBetween: \"1rem\",\n /** Message bubble horizontal padding (14px) */\n messagePx: \"0.875rem\",\n /** Message bubble vertical padding (10px) */\n messagePy: \"0.625rem\",\n /** Container padding (16px) */\n container: \"1rem\",\n /** Composer padding (16px) */\n composerPadding: \"1rem\",\n },\n\n typography: {\n message: {\n fontSize: \"1rem\",\n lineHeight: 1.5,\n letterSpacing: \"0px\",\n },\n caption: {\n fontSize: \"0.875rem\",\n lineHeight: 1.4,\n },\n small: {\n fontSize: \"0.8125rem\",\n lineHeight: 1.3,\n },\n },\n\n borderRadius: {\n message: \"0.5rem\",\n input: \"1rem\",\n panel: \"0.5rem\",\n button: \"0.5rem\",\n chip: \"0.25rem\",\n },\n\n colors: {\n // CSS custom property references\n primary: \"var(--chat-primary, #106997)\",\n secondary: \"var(--chat-secondary, #56C18A)\",\n error: \"var(--chat-error, #B1001B)\",\n warning: \"var(--chat-warning, #DD9652)\",\n\n // Message backgrounds\n messageBg: \"var(--chat-message-bg, rgba(0, 0, 0, 0.03))\",\n userMessageBg: \"var(--chat-user-message-bg, var(--chat-primary, #106997))\",\n userMessageText: \"var(--chat-user-message-text, #ffffff)\",\n\n // Panel backgrounds\n panelBg: \"var(--chat-panel-bg, rgba(0, 0, 0, 0.02))\",\n panelBorder: \"var(--chat-panel-border, rgba(0, 0, 0, 0.06))\",\n\n // Borders\n border: \"var(--chat-border, rgba(0, 0, 0, 0.06))\",\n borderHover: \"var(--chat-border-hover, rgba(0, 0, 0, 0.12))\",\n\n // Text\n text: \"var(--chat-text, #1D2033)\",\n subtle: \"var(--chat-text-subtle, rgba(0, 0, 0, 0.5))\",\n placeholder: \"var(--chat-placeholder, rgba(0, 0, 0, 0.4))\",\n\n // Status colors\n status: {\n pending: {\n main: \"rgba(0, 0, 0, 0.3)\",\n bg: \"rgba(0, 0, 0, 0.05)\",\n },\n running: {\n main: \"rgb(99, 102, 241)\",\n bg: \"rgba(99, 102, 241, 0.08)\",\n },\n completed: {\n main: \"rgb(16, 185, 129)\",\n bg: \"rgba(16, 185, 129, 0.08)\",\n },\n failed: {\n main: \"rgb(239, 68, 68)\",\n bg: \"rgba(239, 68, 68, 0.08)\",\n },\n },\n },\n\n shadows: {\n subtle: \"0 1px 2px rgba(0, 0, 0, 0.04)\",\n input: \"0 2px 8px rgba(0, 0, 0, 0.08)\",\n inputFocus: \"0 4px 16px rgba(0, 0, 0, 0.12)\",\n button: \"0 1px 3px rgba(0, 0, 0, 0.08)\",\n buttonHover: \"0 2px 6px rgba(0, 0, 0, 0.12)\",\n primary: \"0 2px 6px rgba(16, 105, 151, 0.3)\",\n primaryHover: \"0 4px 12px rgba(16, 105, 151, 0.4)\",\n },\n\n animations: {\n messageEntrance: {\n initial: { opacity: 0, y: 8 },\n animate: { opacity: 1, y: 0 },\n transition: { duration: 0.3, ease: [0.4, 0, 0.2, 1] },\n },\n fadeIn: {\n initial: { opacity: 0 },\n animate: { opacity: 1 },\n transition: { duration: 0.2 },\n },\n },\n} as const;\n\nexport type ChatTokens = typeof chatTokens;\n"]}
@@ -43,6 +43,12 @@ interface Attachment {
43
43
  humanReadableSize?: string;
44
44
  fileExtension?: string;
45
45
  }
46
+ interface MessageError {
47
+ /** Error message to display */
48
+ message: string;
49
+ /** Whether the error is recoverable (e.g. can retry) */
50
+ recoverable?: boolean;
51
+ }
46
52
  interface MessageData {
47
53
  id: string;
48
54
  textContent: string;
@@ -52,6 +58,8 @@ interface MessageData {
52
58
  attachments?: Attachment[];
53
59
  isStreaming?: boolean;
54
60
  metadata?: Record<string, unknown>;
61
+ /** Error associated with this message (e.g. generation failed) */
62
+ error?: MessageError;
55
63
  }
56
64
  type SuggestedActionType = "send_message" | "navigate" | "copy_text" | "compose_email" | "search_emails" | "open_modal" | "api_call";
57
65
  interface SuggestedAction {
@@ -67,6 +75,8 @@ interface ChatMessage extends MessageData {
67
75
  reasoning?: StreamingChunk[];
68
76
  citations?: SourceReference[];
69
77
  pendingClarification?: ClarificationData;
78
+ /** Wall-clock execution time in seconds (persisted after streaming completes) */
79
+ executionTime?: number;
70
80
  }
71
81
  interface ReasoningChunk {
72
82
  id: string;
@@ -75,4 +85,4 @@ interface ReasoningChunk {
75
85
  timestamp: string | Date;
76
86
  }
77
87
 
78
- export type { Attachment as A, ChatMessage as C, MessageData as M, ParticipantRole as P, ReasoningChunk as R, SourceReference as S, Participant as a, SourceTypeConfig as b, SuggestedAction as c, SuggestedActionType as d };
88
+ 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 };
@@ -43,6 +43,12 @@ interface Attachment {
43
43
  humanReadableSize?: string;
44
44
  fileExtension?: string;
45
45
  }
46
+ interface MessageError {
47
+ /** Error message to display */
48
+ message: string;
49
+ /** Whether the error is recoverable (e.g. can retry) */
50
+ recoverable?: boolean;
51
+ }
46
52
  interface MessageData {
47
53
  id: string;
48
54
  textContent: string;
@@ -52,6 +58,8 @@ interface MessageData {
52
58
  attachments?: Attachment[];
53
59
  isStreaming?: boolean;
54
60
  metadata?: Record<string, unknown>;
61
+ /** Error associated with this message (e.g. generation failed) */
62
+ error?: MessageError;
55
63
  }
56
64
  type SuggestedActionType = "send_message" | "navigate" | "copy_text" | "compose_email" | "search_emails" | "open_modal" | "api_call";
57
65
  interface SuggestedAction {
@@ -67,6 +75,8 @@ interface ChatMessage extends MessageData {
67
75
  reasoning?: StreamingChunk[];
68
76
  citations?: SourceReference[];
69
77
  pendingClarification?: ClarificationData;
78
+ /** Wall-clock execution time in seconds (persisted after streaming completes) */
79
+ executionTime?: number;
70
80
  }
71
81
  interface ReasoningChunk {
72
82
  id: string;
@@ -75,4 +85,4 @@ interface ReasoningChunk {
75
85
  timestamp: string | Date;
76
86
  }
77
87
 
78
- export type { Attachment as A, ChatMessage as C, MessageData as M, ParticipantRole as P, ReasoningChunk as R, SourceReference as S, Participant as a, SourceTypeConfig as b, SuggestedAction as c, SuggestedActionType as d };
88
+ 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,2 +1,2 @@
1
- 'use strict';var chunkG7TGUXDN_cjs=require('../chunk-G7TGUXDN.cjs');require('../chunk-LLMC5JID.cjs');Object.defineProperty(exports,"ActionButton",{enumerable:true,get:function(){return chunkG7TGUXDN_cjs.q}});Object.defineProperty(exports,"Avatar",{enumerable:true,get:function(){return chunkG7TGUXDN_cjs.l}});Object.defineProperty(exports,"ComposerContext",{enumerable:true,get:function(){return chunkG7TGUXDN_cjs.g}});Object.defineProperty(exports,"ComposerInput",{enumerable:true,get:function(){return chunkG7TGUXDN_cjs.j}});Object.defineProperty(exports,"ComposerSubmit",{enumerable:true,get:function(){return chunkG7TGUXDN_cjs.k}});Object.defineProperty(exports,"Message",{enumerable:true,get:function(){return chunkG7TGUXDN_cjs.c}});Object.defineProperty(exports,"MessageComposer",{enumerable:true,get:function(){return chunkG7TGUXDN_cjs.i}});Object.defineProperty(exports,"MessageContent",{enumerable:true,get:function(){return chunkG7TGUXDN_cjs.d}});Object.defineProperty(exports,"MessageContext",{enumerable:true,get:function(){return chunkG7TGUXDN_cjs.a}});Object.defineProperty(exports,"MessageList",{enumerable:true,get:function(){return chunkG7TGUXDN_cjs.f}});Object.defineProperty(exports,"MessageTimestamp",{enumerable:true,get:function(){return chunkG7TGUXDN_cjs.e}});Object.defineProperty(exports,"StreamingText",{enumerable:true,get:function(){return chunkG7TGUXDN_cjs.m}});Object.defineProperty(exports,"SuggestedActions",{enumerable:true,get:function(){return chunkG7TGUXDN_cjs.p}});Object.defineProperty(exports,"SuggestedActionsContext",{enumerable:true,get:function(){return chunkG7TGUXDN_cjs.n}});Object.defineProperty(exports,"TypingIndicator",{enumerable:true,get:function(){return chunkG7TGUXDN_cjs.r}});Object.defineProperty(exports,"useComposer",{enumerable:true,get:function(){return chunkG7TGUXDN_cjs.h}});Object.defineProperty(exports,"useMessage",{enumerable:true,get:function(){return chunkG7TGUXDN_cjs.b}});Object.defineProperty(exports,"useSuggestedActions",{enumerable:true,get:function(){return chunkG7TGUXDN_cjs.o}});//# sourceMappingURL=index.cjs.map
1
+ 'use strict';var chunk3SEVU272_cjs=require('../chunk-3SEVU272.cjs');require('../chunk-TOYU46SZ.cjs');Object.defineProperty(exports,"ActionButton",{enumerable:true,get:function(){return chunk3SEVU272_cjs.q}});Object.defineProperty(exports,"Avatar",{enumerable:true,get:function(){return chunk3SEVU272_cjs.l}});Object.defineProperty(exports,"ComposerContext",{enumerable:true,get:function(){return chunk3SEVU272_cjs.g}});Object.defineProperty(exports,"ComposerInput",{enumerable:true,get:function(){return chunk3SEVU272_cjs.j}});Object.defineProperty(exports,"ComposerSubmit",{enumerable:true,get:function(){return chunk3SEVU272_cjs.k}});Object.defineProperty(exports,"Message",{enumerable:true,get:function(){return chunk3SEVU272_cjs.c}});Object.defineProperty(exports,"MessageComposer",{enumerable:true,get:function(){return chunk3SEVU272_cjs.i}});Object.defineProperty(exports,"MessageContent",{enumerable:true,get:function(){return chunk3SEVU272_cjs.d}});Object.defineProperty(exports,"MessageContext",{enumerable:true,get:function(){return chunk3SEVU272_cjs.a}});Object.defineProperty(exports,"MessageList",{enumerable:true,get:function(){return chunk3SEVU272_cjs.f}});Object.defineProperty(exports,"MessageTimestamp",{enumerable:true,get:function(){return chunk3SEVU272_cjs.e}});Object.defineProperty(exports,"StreamingText",{enumerable:true,get:function(){return chunk3SEVU272_cjs.m}});Object.defineProperty(exports,"SuggestedActions",{enumerable:true,get:function(){return chunk3SEVU272_cjs.p}});Object.defineProperty(exports,"SuggestedActionsContext",{enumerable:true,get:function(){return chunk3SEVU272_cjs.n}});Object.defineProperty(exports,"TypingIndicator",{enumerable:true,get:function(){return chunk3SEVU272_cjs.r}});Object.defineProperty(exports,"useComposer",{enumerable:true,get:function(){return chunk3SEVU272_cjs.h}});Object.defineProperty(exports,"useMessage",{enumerable:true,get:function(){return chunk3SEVU272_cjs.b}});Object.defineProperty(exports,"useSuggestedActions",{enumerable:true,get:function(){return chunk3SEVU272_cjs.o}});//# sourceMappingURL=index.cjs.map
2
2
  //# sourceMappingURL=index.cjs.map
@@ -1,7 +1,7 @@
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-DvOcT8NS.cjs';
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-CL1hlGO5.cjs';
2
2
  import * as react from 'react';
3
3
  import { HTMLAttributes, ReactNode, ButtonHTMLAttributes } from 'react';
4
- import { c as SuggestedAction } from '../message-a6VUd777.cjs';
4
+ import { d as SuggestedAction } from '../message-9z0crkf9.cjs';
5
5
  import '../streaming-CF63E6iS.cjs';
6
6
 
7
7
  interface MessageListProps extends HTMLAttributes<HTMLDivElement> {
@@ -9,12 +9,17 @@ interface MessageListProps extends HTMLAttributes<HTMLDivElement> {
9
9
  children: ReactNode;
10
10
  /** Whether to auto-scroll to bottom on new messages */
11
11
  autoScroll?: boolean;
12
- /** Threshold from bottom to trigger auto-scroll (pixels) */
13
- scrollThreshold?: number;
12
+ /** Whether the viewport is currently at the bottom (exposed for scroll-to-bottom button) */
13
+ isAtBottom?: boolean;
14
+ /** Callback to receive scroll state updates */
15
+ onIsAtBottomChange?: (isAtBottom: boolean) => void;
16
+ /** Callback to receive scrollToBottom function */
17
+ onScrollToBottomRef?: (scrollToBottom: (behavior?: ScrollBehavior) => void) => void;
14
18
  }
15
19
  /**
16
20
  * Headless MessageList primitive.
17
21
  * Provides a scrollable container with auto-scroll behavior.
22
+ * Exposes isAtBottom and scrollToBottom for scroll-to-bottom button integration.
18
23
  */
19
24
  declare const MessageList: react.ForwardRefExoticComponent<MessageListProps & react.RefAttributes<HTMLDivElement>>;
20
25
 
@@ -1,7 +1,7 @@
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-DftdWqSs.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-BgjqLv1r.js';
2
2
  import * as react from 'react';
3
3
  import { HTMLAttributes, ReactNode, ButtonHTMLAttributes } from 'react';
4
- import { c as SuggestedAction } from '../message-B21_kqE2.js';
4
+ import { d as SuggestedAction } from '../message-4-BaKes3.js';
5
5
  import '../streaming-CF63E6iS.js';
6
6
 
7
7
  interface MessageListProps extends HTMLAttributes<HTMLDivElement> {
@@ -9,12 +9,17 @@ interface MessageListProps extends HTMLAttributes<HTMLDivElement> {
9
9
  children: ReactNode;
10
10
  /** Whether to auto-scroll to bottom on new messages */
11
11
  autoScroll?: boolean;
12
- /** Threshold from bottom to trigger auto-scroll (pixels) */
13
- scrollThreshold?: number;
12
+ /** Whether the viewport is currently at the bottom (exposed for scroll-to-bottom button) */
13
+ isAtBottom?: boolean;
14
+ /** Callback to receive scroll state updates */
15
+ onIsAtBottomChange?: (isAtBottom: boolean) => void;
16
+ /** Callback to receive scrollToBottom function */
17
+ onScrollToBottomRef?: (scrollToBottom: (behavior?: ScrollBehavior) => void) => void;
14
18
  }
15
19
  /**
16
20
  * Headless MessageList primitive.
17
21
  * Provides a scrollable container with auto-scroll behavior.
22
+ * Exposes isAtBottom and scrollToBottom for scroll-to-bottom button integration.
18
23
  */
19
24
  declare const MessageList: react.ForwardRefExoticComponent<MessageListProps & react.RefAttributes<HTMLDivElement>>;
20
25
 
@@ -1,2 +1,2 @@
1
- export{q as ActionButton,l as Avatar,g as ComposerContext,j as ComposerInput,k as ComposerSubmit,c as Message,i as MessageComposer,d as MessageContent,a as MessageContext,f as MessageList,e as MessageTimestamp,m as StreamingText,p as SuggestedActions,n as SuggestedActionsContext,r as TypingIndicator,h as useComposer,b as useMessage,o as useSuggestedActions}from'../chunk-3KB4JYSQ.js';import'../chunk-LJQHWCUK.js';//# sourceMappingURL=index.js.map
1
+ export{q as ActionButton,l as Avatar,g as ComposerContext,j as ComposerInput,k as ComposerSubmit,c as Message,i as MessageComposer,d as MessageContent,a as MessageContext,f as MessageList,e as MessageTimestamp,m as StreamingText,p as SuggestedActions,n as SuggestedActionsContext,r as TypingIndicator,h as useComposer,b as useMessage,o as useSuggestedActions}from'../chunk-W3HWTAF6.js';import'../chunk-65VDOUZG.js';//# sourceMappingURL=index.js.map
2
2
  //# sourceMappingURL=index.js.map
@@ -1,2 +1,2 @@
1
- 'use strict';var chunkVQVCOIS3_cjs=require('../chunk-VQVCOIS3.cjs'),chunkG7TGUXDN_cjs=require('../chunk-G7TGUXDN.cjs');require('../chunk-LLMC5JID.cjs');var chunkSFEPMZCU_cjs=require('../chunk-SFEPMZCU.cjs');Object.defineProperty(exports,"AttachmentPreview",{enumerable:true,get:function(){return chunkVQVCOIS3_cjs.b}});Object.defineProperty(exports,"Avatar",{enumerable:true,get:function(){return chunkVQVCOIS3_cjs.c}});Object.defineProperty(exports,"CardVisualization",{enumerable:true,get:function(){return chunkVQVCOIS3_cjs.E}});Object.defineProperty(exports,"ChartVisualization",{enumerable:true,get:function(){return chunkVQVCOIS3_cjs.C}});Object.defineProperty(exports,"ChatContainer",{enumerable:true,get:function(){return chunkVQVCOIS3_cjs.d}});Object.defineProperty(exports,"ChatHeader",{enumerable:true,get:function(){return chunkVQVCOIS3_cjs.X}});Object.defineProperty(exports,"ChatLayout",{enumerable:true,get:function(){return chunkVQVCOIS3_cjs.Y}});Object.defineProperty(exports,"CitationSources",{enumerable:true,get:function(){return chunkVQVCOIS3_cjs.g}});Object.defineProperty(exports,"ClarificationPanel",{enumerable:true,get:function(){return chunkVQVCOIS3_cjs.j}});Object.defineProperty(exports,"ClaudeToolPreview",{enumerable:true,get:function(){return chunkVQVCOIS3_cjs.t}});Object.defineProperty(exports,"CodePreviewVisualization",{enumerable:true,get:function(){return chunkVQVCOIS3_cjs.G}});Object.defineProperty(exports,"EventContent",{enumerable:true,get:function(){return chunkVQVCOIS3_cjs.o}});Object.defineProperty(exports,"EventTimeline",{enumerable:true,get:function(){return chunkVQVCOIS3_cjs.r}});Object.defineProperty(exports,"FileOperationPreview",{enumerable:true,get:function(){return chunkVQVCOIS3_cjs.v}});Object.defineProperty(exports,"FormVisualization",{enumerable:true,get:function(){return chunkVQVCOIS3_cjs.H}});Object.defineProperty(exports,"InlineCitation",{enumerable:true,get:function(){return chunkVQVCOIS3_cjs.i}});Object.defineProperty(exports,"KpiVisualization",{enumerable:true,get:function(){return chunkVQVCOIS3_cjs.F}});Object.defineProperty(exports,"LoadingDots",{enumerable:true,get:function(){return chunkVQVCOIS3_cjs.e}});Object.defineProperty(exports,"MarkdownContent",{enumerable:true,get:function(){return chunkVQVCOIS3_cjs.f}});Object.defineProperty(exports,"Message",{enumerable:true,get:function(){return chunkVQVCOIS3_cjs.S}});Object.defineProperty(exports,"MessageAttachments",{enumerable:true,get:function(){return chunkVQVCOIS3_cjs.k}});Object.defineProperty(exports,"MessageComposer",{enumerable:true,get:function(){return chunkVQVCOIS3_cjs.T}});Object.defineProperty(exports,"MessageList",{enumerable:true,get:function(){return chunkVQVCOIS3_cjs.U}});Object.defineProperty(exports,"PlanTimeline",{enumerable:true,get:function(){return chunkVQVCOIS3_cjs.s}});Object.defineProperty(exports,"ReasoningPanel",{enumerable:true,get:function(){return chunkVQVCOIS3_cjs.z}});Object.defineProperty(exports,"SearchResultsView",{enumerable:true,get:function(){return chunkVQVCOIS3_cjs.w}});Object.defineProperty(exports,"SourceDetailModal",{enumerable:true,get:function(){return chunkVQVCOIS3_cjs.h}});Object.defineProperty(exports,"StatusBadge",{enumerable:true,get:function(){return chunkVQVCOIS3_cjs.l}});Object.defineProperty(exports,"StreamingText",{enumerable:true,get:function(){return chunkVQVCOIS3_cjs.A}});Object.defineProperty(exports,"SubagentPanel",{enumerable:true,get:function(){return chunkVQVCOIS3_cjs.y}});Object.defineProperty(exports,"SuggestedActions",{enumerable:true,get:function(){return chunkVQVCOIS3_cjs.B}});Object.defineProperty(exports,"TableVisualization",{enumerable:true,get:function(){return chunkVQVCOIS3_cjs.D}});Object.defineProperty(exports,"TerminalOutput",{enumerable:true,get:function(){return chunkVQVCOIS3_cjs.u}});Object.defineProperty(exports,"TimeMarker",{enumerable:true,get:function(){return chunkVQVCOIS3_cjs.V}});Object.defineProperty(exports,"Timeline",{enumerable:true,get:function(){return chunkVQVCOIS3_cjs.m}});Object.defineProperty(exports,"TimelineItem",{enumerable:true,get:function(){return chunkVQVCOIS3_cjs.n}});Object.defineProperty(exports,"TypingIndicator",{enumerable:true,get:function(){return chunkVQVCOIS3_cjs.W}});Object.defineProperty(exports,"VisualizationRenderer",{enumerable:true,get:function(){return chunkVQVCOIS3_cjs.R}});Object.defineProperty(exports,"WebOperationPreview",{enumerable:true,get:function(){return chunkVQVCOIS3_cjs.x}});Object.defineProperty(exports,"WelcomeScreen",{enumerable:true,get:function(){return chunkVQVCOIS3_cjs.Z}});Object.defineProperty(exports,"cardVisualizationSchema",{enumerable:true,get:function(){return chunkVQVCOIS3_cjs.N}});Object.defineProperty(exports,"chartVisualizationSchema",{enumerable:true,get:function(){return chunkVQVCOIS3_cjs.L}});Object.defineProperty(exports,"codePreviewVisualizationSchema",{enumerable:true,get:function(){return chunkVQVCOIS3_cjs.P}});Object.defineProperty(exports,"convertChunkToEvent",{enumerable:true,get:function(){return chunkVQVCOIS3_cjs.p}});Object.defineProperty(exports,"convertTimelineToEvents",{enumerable:true,get:function(){return chunkVQVCOIS3_cjs.q}});Object.defineProperty(exports,"formVisualizationSchema",{enumerable:true,get:function(){return chunkVQVCOIS3_cjs.Q}});Object.defineProperty(exports,"getRegisteredTypes",{enumerable:true,get:function(){return chunkVQVCOIS3_cjs.K}});Object.defineProperty(exports,"getVisualization",{enumerable:true,get:function(){return chunkVQVCOIS3_cjs.J}});Object.defineProperty(exports,"kpiVisualizationSchema",{enumerable:true,get:function(){return chunkVQVCOIS3_cjs.O}});Object.defineProperty(exports,"registerVisualization",{enumerable:true,get:function(){return chunkVQVCOIS3_cjs.I}});Object.defineProperty(exports,"tableVisualizationSchema",{enumerable:true,get:function(){return chunkVQVCOIS3_cjs.M}});Object.defineProperty(exports,"useComposer",{enumerable:true,get:function(){return chunkG7TGUXDN_cjs.h}});Object.defineProperty(exports,"useMessage",{enumerable:true,get:function(){return chunkG7TGUXDN_cjs.b}});Object.defineProperty(exports,"ChatProvider",{enumerable:true,get:function(){return chunkSFEPMZCU_cjs.b}});Object.defineProperty(exports,"useChatContext",{enumerable:true,get:function(){return chunkSFEPMZCU_cjs.c}});//# sourceMappingURL=index.cjs.map
1
+ 'use strict';var chunkQGRXQAWZ_cjs=require('../chunk-QGRXQAWZ.cjs'),chunk3SEVU272_cjs=require('../chunk-3SEVU272.cjs');require('../chunk-HVCCZKEO.cjs'),require('../chunk-TOYU46SZ.cjs');var chunkSFEPMZCU_cjs=require('../chunk-SFEPMZCU.cjs');Object.defineProperty(exports,"AttachmentPreview",{enumerable:true,get:function(){return chunkQGRXQAWZ_cjs.b}});Object.defineProperty(exports,"Avatar",{enumerable:true,get:function(){return chunkQGRXQAWZ_cjs.c}});Object.defineProperty(exports,"CardVisualization",{enumerable:true,get:function(){return chunkQGRXQAWZ_cjs.F}});Object.defineProperty(exports,"ChartVisualization",{enumerable:true,get:function(){return chunkQGRXQAWZ_cjs.D}});Object.defineProperty(exports,"ChatContainer",{enumerable:true,get:function(){return chunkQGRXQAWZ_cjs.d}});Object.defineProperty(exports,"ChatHeader",{enumerable:true,get:function(){return chunkQGRXQAWZ_cjs.Z}});Object.defineProperty(exports,"ChatLayout",{enumerable:true,get:function(){return chunkQGRXQAWZ_cjs.$}});Object.defineProperty(exports,"CitationSources",{enumerable:true,get:function(){return chunkQGRXQAWZ_cjs.g}});Object.defineProperty(exports,"ClarificationPanel",{enumerable:true,get:function(){return chunkQGRXQAWZ_cjs.j}});Object.defineProperty(exports,"ClaudeToolPreview",{enumerable:true,get:function(){return chunkQGRXQAWZ_cjs.u}});Object.defineProperty(exports,"CodePreviewVisualization",{enumerable:true,get:function(){return chunkQGRXQAWZ_cjs.H}});Object.defineProperty(exports,"EventContent",{enumerable:true,get:function(){return chunkQGRXQAWZ_cjs.p}});Object.defineProperty(exports,"EventTimeline",{enumerable:true,get:function(){return chunkQGRXQAWZ_cjs.s}});Object.defineProperty(exports,"FileOperationPreview",{enumerable:true,get:function(){return chunkQGRXQAWZ_cjs.w}});Object.defineProperty(exports,"FormVisualization",{enumerable:true,get:function(){return chunkQGRXQAWZ_cjs.I}});Object.defineProperty(exports,"InlineCitation",{enumerable:true,get:function(){return chunkQGRXQAWZ_cjs.i}});Object.defineProperty(exports,"KpiVisualization",{enumerable:true,get:function(){return chunkQGRXQAWZ_cjs.G}});Object.defineProperty(exports,"LoadingDots",{enumerable:true,get:function(){return chunkQGRXQAWZ_cjs.e}});Object.defineProperty(exports,"MarkdownContent",{enumerable:true,get:function(){return chunkQGRXQAWZ_cjs.f}});Object.defineProperty(exports,"Message",{enumerable:true,get:function(){return chunkQGRXQAWZ_cjs.T}});Object.defineProperty(exports,"MessageActionBar",{enumerable:true,get:function(){return chunkQGRXQAWZ_cjs.k}});Object.defineProperty(exports,"MessageAttachments",{enumerable:true,get:function(){return chunkQGRXQAWZ_cjs.l}});Object.defineProperty(exports,"MessageComposer",{enumerable:true,get:function(){return chunkQGRXQAWZ_cjs.U}});Object.defineProperty(exports,"MessageList",{enumerable:true,get:function(){return chunkQGRXQAWZ_cjs.W}});Object.defineProperty(exports,"PlanTimeline",{enumerable:true,get:function(){return chunkQGRXQAWZ_cjs.t}});Object.defineProperty(exports,"ReasoningPanel",{enumerable:true,get:function(){return chunkQGRXQAWZ_cjs.A}});Object.defineProperty(exports,"ScrollToBottomButton",{enumerable:true,get:function(){return chunkQGRXQAWZ_cjs.V}});Object.defineProperty(exports,"SearchResultsView",{enumerable:true,get:function(){return chunkQGRXQAWZ_cjs.x}});Object.defineProperty(exports,"SourceDetailModal",{enumerable:true,get:function(){return chunkQGRXQAWZ_cjs.h}});Object.defineProperty(exports,"StatusBadge",{enumerable:true,get:function(){return chunkQGRXQAWZ_cjs.m}});Object.defineProperty(exports,"StreamingText",{enumerable:true,get:function(){return chunkQGRXQAWZ_cjs.B}});Object.defineProperty(exports,"SubagentPanel",{enumerable:true,get:function(){return chunkQGRXQAWZ_cjs.z}});Object.defineProperty(exports,"SuggestedActions",{enumerable:true,get:function(){return chunkQGRXQAWZ_cjs.C}});Object.defineProperty(exports,"TableVisualization",{enumerable:true,get:function(){return chunkQGRXQAWZ_cjs.E}});Object.defineProperty(exports,"TerminalOutput",{enumerable:true,get:function(){return chunkQGRXQAWZ_cjs.v}});Object.defineProperty(exports,"TimeMarker",{enumerable:true,get:function(){return chunkQGRXQAWZ_cjs.X}});Object.defineProperty(exports,"Timeline",{enumerable:true,get:function(){return chunkQGRXQAWZ_cjs.n}});Object.defineProperty(exports,"TimelineItem",{enumerable:true,get:function(){return chunkQGRXQAWZ_cjs.o}});Object.defineProperty(exports,"ToolStatusIndicator",{enumerable:true,get:function(){return chunkQGRXQAWZ_cjs._}});Object.defineProperty(exports,"TypingIndicator",{enumerable:true,get:function(){return chunkQGRXQAWZ_cjs.Y}});Object.defineProperty(exports,"VisualizationRenderer",{enumerable:true,get:function(){return chunkQGRXQAWZ_cjs.S}});Object.defineProperty(exports,"WebOperationPreview",{enumerable:true,get:function(){return chunkQGRXQAWZ_cjs.y}});Object.defineProperty(exports,"WelcomeScreen",{enumerable:true,get:function(){return chunkQGRXQAWZ_cjs.aa}});Object.defineProperty(exports,"cardVisualizationSchema",{enumerable:true,get:function(){return chunkQGRXQAWZ_cjs.O}});Object.defineProperty(exports,"chartVisualizationSchema",{enumerable:true,get:function(){return chunkQGRXQAWZ_cjs.M}});Object.defineProperty(exports,"codePreviewVisualizationSchema",{enumerable:true,get:function(){return chunkQGRXQAWZ_cjs.Q}});Object.defineProperty(exports,"convertChunkToEvent",{enumerable:true,get:function(){return chunkQGRXQAWZ_cjs.q}});Object.defineProperty(exports,"convertTimelineToEvents",{enumerable:true,get:function(){return chunkQGRXQAWZ_cjs.r}});Object.defineProperty(exports,"formVisualizationSchema",{enumerable:true,get:function(){return chunkQGRXQAWZ_cjs.R}});Object.defineProperty(exports,"getRegisteredTypes",{enumerable:true,get:function(){return chunkQGRXQAWZ_cjs.L}});Object.defineProperty(exports,"getVisualization",{enumerable:true,get:function(){return chunkQGRXQAWZ_cjs.K}});Object.defineProperty(exports,"kpiVisualizationSchema",{enumerable:true,get:function(){return chunkQGRXQAWZ_cjs.P}});Object.defineProperty(exports,"registerVisualization",{enumerable:true,get:function(){return chunkQGRXQAWZ_cjs.J}});Object.defineProperty(exports,"tableVisualizationSchema",{enumerable:true,get:function(){return chunkQGRXQAWZ_cjs.N}});Object.defineProperty(exports,"useComposer",{enumerable:true,get:function(){return chunk3SEVU272_cjs.h}});Object.defineProperty(exports,"useMessage",{enumerable:true,get:function(){return chunk3SEVU272_cjs.b}});Object.defineProperty(exports,"ChatProvider",{enumerable:true,get:function(){return chunkSFEPMZCU_cjs.b}});Object.defineProperty(exports,"useChatContext",{enumerable:true,get:function(){return chunkSFEPMZCU_cjs.c}});//# sourceMappingURL=index.cjs.map
2
2
  //# sourceMappingURL=index.cjs.map