@convai/web-widget 0.1.3 → 0.2.0-beta.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (48) hide show
  1. package/README.md +55 -11
  2. package/chunks/lightbox-Dxfdw3VU.js +683 -0
  3. package/index.d.ts +26 -0
  4. package/index.js +4 -0
  5. package/package.json +53 -2
  6. package/react.d.ts +23 -0
  7. package/react.js +3551 -0
  8. package/runtime.js +12023 -12685
  9. package/types.d.ts +62 -0
  10. package/ui/react/components/ConvaiWidget.d.ts +86 -0
  11. package/ui/react/components/index.d.ts +1 -0
  12. package/ui/react/components/rtc-widget/components/AudioSettingsPanel.d.ts +9 -0
  13. package/ui/react/components/rtc-widget/components/AudioVisualizer.d.ts +35 -0
  14. package/ui/react/components/rtc-widget/components/ConviMessage.d.ts +13 -0
  15. package/ui/react/components/rtc-widget/components/FloatingVideo.d.ts +8 -0
  16. package/ui/react/components/rtc-widget/components/MarkdownRenderer.d.ts +31 -0
  17. package/ui/react/components/rtc-widget/components/MessageBubble.d.ts +9 -0
  18. package/ui/react/components/rtc-widget/components/MessageList.d.ts +14 -0
  19. package/ui/react/components/rtc-widget/components/SiteCard.d.ts +15 -0
  20. package/ui/react/components/rtc-widget/components/UserMessage.d.ts +9 -0
  21. package/ui/react/components/rtc-widget/components/conviComponents/ConviButton.d.ts +6 -0
  22. package/ui/react/components/rtc-widget/components/conviComponents/ConviFooter.d.ts +24 -0
  23. package/ui/react/components/rtc-widget/components/conviComponents/ConviHeader.d.ts +16 -0
  24. package/ui/react/components/rtc-widget/components/conviComponents/SettingsTray.d.ts +12 -0
  25. package/ui/react/components/rtc-widget/components/conviComponents/VoiceModeOverlay.d.ts +14 -0
  26. package/ui/react/components/rtc-widget/components/conviComponents/index.d.ts +5 -0
  27. package/ui/react/components/rtc-widget/components/index.d.ts +8 -0
  28. package/ui/react/components/rtc-widget/index.d.ts +5 -0
  29. package/ui/react/components/rtc-widget/styles/framerConfig.d.ts +115 -0
  30. package/ui/react/components/rtc-widget/styles/icons.d.ts +27 -0
  31. package/ui/react/components/rtc-widget/styles/index.d.ts +5 -0
  32. package/ui/react/components/rtc-widget/styles/styledComponents.d.ts +53 -0
  33. package/ui/react/components/rtc-widget/styles/theme.d.ts +187 -0
  34. package/ui/react/components/rtc-widget/types/index.d.ts +59 -0
  35. package/ui/react/hooks/useCharacterInfo.d.ts +18 -0
  36. package/ui/react/hooks/useLocalCameraTrack.d.ts +21 -0
  37. package/ui/react/icons.d.ts +37 -0
  38. package/ui/shared/lightbox.d.ts +15 -0
  39. package/ui/shared/linkStyles.d.ts +64 -0
  40. package/ui/shared/logger.d.ts +30 -0
  41. package/ui/vanilla/ConvaiWidget.d.ts +46 -0
  42. package/ui/vanilla/WidgetEventSubscriptions.d.ts +14 -0
  43. package/ui/vanilla/icons.d.ts +34 -0
  44. package/ui/vanilla/styles.d.ts +168 -0
  45. package/ui/vanilla/types.d.ts +170 -0
  46. package/v1.js +2 -2
  47. package/vanilla.d.ts +21 -0
  48. package/vanilla.js +2512 -0
package/types.d.ts ADDED
@@ -0,0 +1,62 @@
1
+ export type ErrorCode = 'config' | 'auth' | 'network' | 'runtime' | 'mic-permission';
2
+ export type Placement = 'bottom-right' | 'bottom-left' | 'top-right' | 'top-left' | 'inline';
3
+ export type Preload = 'none' | 'hover' | 'idle';
4
+ export interface WidgetConfig {
5
+ /**
6
+ * Absent in publication mode and only there. A published integration names
7
+ * a publication and nothing else — the character id stays server-side,
8
+ * which is the whole privacy property `publicationId` exists to preserve.
9
+ * Every other mode requires it, and `readConfig` enforces that.
10
+ */
11
+ characterId?: string;
12
+ /**
13
+ * Publication mode. When set, the widget resolves its session from the
14
+ * Character API's chat-publication endpoints instead of from any
15
+ * credential on this page, and `tokenEndpoint`/`connectEndpoint`/`apiKey`
16
+ * are neither required nor read.
17
+ */
18
+ publicationId?: string;
19
+ /** Character API origin serving the publication. Defaults to api.convai.com. */
20
+ publicationApiUrl?: string;
21
+ /** Core/realtime origin override for the published connect exchange. */
22
+ coreUrl?: string;
23
+ tokenEndpoint?: string;
24
+ connectEndpoint?: string;
25
+ apiKey?: string;
26
+ endUserId?: string;
27
+ endUserMetadata?: Record<string, unknown>;
28
+ placement: Placement;
29
+ preload: Preload;
30
+ startOpen: boolean;
31
+ startWithAudio: boolean;
32
+ accent?: string;
33
+ greeting?: string;
34
+ launcherLabel?: string;
35
+ avatarSrc?: string;
36
+ disabled: boolean;
37
+ debug: boolean;
38
+ }
39
+ export type ConfigResult = {
40
+ ok: true;
41
+ config: WidgetConfig;
42
+ } | {
43
+ ok: false;
44
+ message: string;
45
+ };
46
+ /** What runtime.mount() hands back to the loader. */
47
+ export interface RuntimeController {
48
+ open(): void;
49
+ close(): void;
50
+ toggle(): void;
51
+ sendMessage(text: string): void;
52
+ destroy(): void;
53
+ readonly client: unknown;
54
+ }
55
+ export interface MessageDetail {
56
+ sender: 'user' | 'bot';
57
+ content: string;
58
+ }
59
+ export interface ErrorDetail {
60
+ code: ErrorCode;
61
+ message: string;
62
+ }
@@ -0,0 +1,86 @@
1
+ import type { LinkPreviewResolver } from "@convai/web-sdk/core";
2
+ import type { IConvaiClient, PublishedChatConnectOptions } from "@convai/web-sdk/core";
3
+ import type { PublishedChatDescriptor } from "@convai/web-sdk/embed";
4
+ interface ConvaiWidgetProps {
5
+ /** Convai client instance (required) */
6
+ convaiClient: IConvaiClient & {
7
+ activity?: string;
8
+ isAudioMuted: boolean;
9
+ isVideoEnabled: boolean;
10
+ isScreenShareActive: boolean;
11
+ };
12
+ /**
13
+ * Show video toggle button in settings (default: true).
14
+ * Only works if connection type is "video". If false, hides the video button.
15
+ */
16
+ showVideo?: boolean;
17
+ /**
18
+ * Show screen share toggle button in settings (default: true).
19
+ * Only works if connection type is "video". If false, hides the screen share button.
20
+ */
21
+ showScreenShare?: boolean;
22
+ /**
23
+ * Start in voice mode by default when widget opens (default: true).
24
+ * When true, the widget will open directly in voice mode with microphone enabled.
25
+ */
26
+ defaultVoiceMode?: boolean;
27
+ /**
28
+ * Mint a fresh single-use grant when a published-chat session is reopened.
29
+ * Required when using this widget with connectWithPublicationGrant().
30
+ */
31
+ requestPublicationGrant?: () => Promise<string>;
32
+ /** Core endpoint override used with requestPublicationGrant. */
33
+ publishedChatConnectOptions?: PublishedChatConnectOptions;
34
+ /**
35
+ * Open Graph lookup for plain web links the character sends. Supply a
36
+ * function that asks your backend for a page's metadata and each such link
37
+ * gets a site card (favicon, site name, title, description, image) once it
38
+ * resolves. Omit it and links render as before. See
39
+ * docs/convai_link_previews.md, "Site cards".
40
+ */
41
+ linkPreviewResolver?: LinkPreviewResolver;
42
+ /** Public descriptor used to label a credential-free published session. */
43
+ publishedChatDescriptor?: Pick<PublishedChatDescriptor, "display_name" | "image_url">;
44
+ }
45
+ /**
46
+ * ConvaiWidget - A consolidated chat widget component for real-time conversations
47
+ *
48
+ * This component provides a complete UI for interacting with Convai characters.
49
+ * Connection configuration should be handled via useConvaiClient.connect().
50
+ *
51
+ * Features:
52
+ * - Collapsed circular button with status indicator
53
+ * - Expandable/collapsible chat interface
54
+ * - Voice mode support
55
+ * - Real-time message streaming
56
+ * - Audio controls (mute/unmute)
57
+ * - Settings tray with session reset
58
+ * - Optional video and screen share (when connection type supports it)
59
+ *
60
+ * @param {ConvaiWidgetProps} props - Component props
61
+ * @param {ConvaiClient} props.convaiClient - Convai client instance (required)
62
+ * @param {boolean} props.showVideo - Show video toggle in settings (default: true)
63
+ * @param {boolean} props.showScreenShare - Show screen share toggle in settings (default: true)
64
+ * @param {boolean} props.defaultVoiceMode - Start in voice mode when widget opens (default: true)
65
+ *
66
+ * @example
67
+ * ```tsx
68
+ * function App() {
69
+ * const convaiClient = useConvaiClient({
70
+ * apiKey: 'your-api-key',
71
+ * characterId: 'your-character-id',
72
+ * enableVideo: true,
73
+ * });
74
+ *
75
+ * return (
76
+ * <ConvaiWidget
77
+ * convaiClient={convaiClient}
78
+ * showVideo={true}
79
+ * showScreenShare={true}
80
+ * />
81
+ * );
82
+ * }
83
+ * ```
84
+ */
85
+ export declare const ConvaiWidget: React.FC<ConvaiWidgetProps>;
86
+ export {};
@@ -0,0 +1 @@
1
+ export { ConvaiWidget } from './ConvaiWidget';
@@ -0,0 +1,9 @@
1
+ import React from "react";
2
+ import { AudioSettings } from "@convai/web-sdk/core";
3
+ interface AudioSettingsPanelProps {
4
+ currentSettings: AudioSettings;
5
+ onUpdateSettings: (settings: Partial<AudioSettings>) => Promise<void>;
6
+ isConnected: boolean;
7
+ }
8
+ export declare const AudioSettingsPanel: React.FC<AudioSettingsPanelProps>;
9
+ export {};
@@ -0,0 +1,35 @@
1
+ import { Room } from 'livekit-client';
2
+ interface AudioVisualizerProps {
3
+ /** LiveKit room instance containing the remote participant's audio track */
4
+ room: Room | null;
5
+ /** Canvas size in pixels (width and height) */
6
+ size?: number;
7
+ /** CSS color value for the bars */
8
+ color?: string;
9
+ /** Base opacity of the bars (0-1), actual opacity varies with audio intensity */
10
+ opacity?: number;
11
+ /** Radius of the circular visualization area in pixels */
12
+ avatarRadius?: number;
13
+ /** Number of radial bars to display around the circle */
14
+ barCount?: number;
15
+ /** Callback function called when speaking state changes */
16
+ onSpeakingChange?: (isSpeaking: boolean) => void;
17
+ }
18
+ /**
19
+ * Circular Audio Visualizer Component
20
+ *
21
+ * A real-time circular audio visualization component that displays radial bars arranged
22
+ * in a circle around an avatar. The visualization reacts to the remote participant's
23
+ * (bot) audio output from a LiveKit room, using logarithmic frequency bands and a
24
+ * traveling wave animation effect.
25
+ *
26
+ * Features:
27
+ * - Circular radial bar visualization with configurable bar count
28
+ * - Logarithmic frequency band distribution (low frequencies distributed around the ring)
29
+ * - Traveling wave animation that propagates around the circle
30
+ * - Speaking detection with callback support
31
+ * - Automatic track detection and reconnection
32
+ * - Canvas-based rendering for smooth animations
33
+ */
34
+ export declare const AudioVisualizer: React.FC<AudioVisualizerProps>;
35
+ export {};
@@ -0,0 +1,13 @@
1
+ import React from "react";
2
+ import type { LinkPreviewResolver } from "@convai/web-sdk/core";
3
+ interface ConviMessageProps {
4
+ message: string;
5
+ timestamp?: string;
6
+ className?: string;
7
+ showLogo?: boolean;
8
+ sender?: string;
9
+ /** Open Graph lookup for plain web links; see MarkdownRenderer. */
10
+ resolveLinkPreview?: LinkPreviewResolver;
11
+ }
12
+ export declare const ConviMessage: ({ message, timestamp, className, showLogo, sender, resolveLinkPreview, }: ConviMessageProps) => React.JSX.Element;
13
+ export {};
@@ -0,0 +1,8 @@
1
+ import React from "react";
2
+ interface FloatingVideoProps {
3
+ isVisible: boolean;
4
+ onClose: () => void;
5
+ mirror?: boolean;
6
+ }
7
+ export declare const FloatingVideo: React.FC<FloatingVideoProps>;
8
+ export {};
@@ -0,0 +1,31 @@
1
+ import React from "react";
2
+ import type { LinkPreviewResolver } from "@convai/web-sdk/core";
3
+ /**
4
+ * The widget's bubble renderer. Everything visual comes from
5
+ * utils/linkPresentation so this file and the vanilla widget cannot drift;
6
+ * this file only maps tokenizer nodes onto JSX.
7
+ *
8
+ * `data-convai-part` mirrors the vanilla widget's `part` names. React renders
9
+ * in light DOM where `part` means nothing, but the same names let tests and
10
+ * host CSS target both renderers with one vocabulary.
11
+ */
12
+ interface MarkdownRendererProps {
13
+ text: string;
14
+ /**
15
+ * Render cards and chips under links. Bot messages want them; the user's
16
+ * own bubble does not — you already know what you typed, and a preview
17
+ * there would let a URL a user pasted embed remote media into the
18
+ * transcript. Links stay clickable either way.
19
+ */
20
+ media?: boolean;
21
+ /** Test seam for mixed-content detection. Defaults to the page's protocol. */
22
+ pageProtocol?: string;
23
+ /**
24
+ * Host-supplied Open Graph lookup. With it, a plain web link in a bot
25
+ * bubble gets a site card once the lookup settles; without it, nothing
26
+ * changes. See docs/convai_link_previews.md, "Site cards".
27
+ */
28
+ resolveLinkPreview?: LinkPreviewResolver;
29
+ }
30
+ export declare const MarkdownRenderer: React.FC<MarkdownRendererProps>;
31
+ export {};
@@ -0,0 +1,9 @@
1
+ import React from "react";
2
+ interface MessageBubbleProps {
3
+ children: React.ReactNode;
4
+ isUser?: boolean;
5
+ timestamp?: string;
6
+ className?: string;
7
+ }
8
+ export declare const MessageBubble: ({ children, isUser, timestamp, className, }: MessageBubbleProps) => React.JSX.Element;
9
+ export {};
@@ -0,0 +1,14 @@
1
+ import React from "react";
2
+ import type { LinkPreviewResolver } from "@convai/web-sdk/core";
3
+ import { RTCChatMessage } from "../types";
4
+ type Message = RTCChatMessage;
5
+ interface MessageListProps {
6
+ messages: Message[];
7
+ className?: string;
8
+ isStreaming?: boolean;
9
+ forceToBottomToken?: string | number | boolean;
10
+ /** Open Graph lookup for plain web links in bot bubbles. */
11
+ linkPreviewResolver?: LinkPreviewResolver;
12
+ }
13
+ export declare const MessageList: ({ messages, className, isStreaming, forceToBottomToken, linkPreviewResolver, }: MessageListProps) => React.JSX.Element;
14
+ export {};
@@ -0,0 +1,15 @@
1
+ import React from "react";
2
+ import { type LinkPreviewResolver } from "@convai/web-sdk/core";
3
+ /**
4
+ * Open Graph card under a plain web link. Renders nothing until the host's
5
+ * resolver settles and nothing at all unless the result has a title or an
6
+ * image: most links resolve to nothing card-worthy, and a placeholder that
7
+ * then vanishes reads worse than a card that appears.
8
+ *
9
+ * Everything from the resolver lands in text nodes or an `img` src that
10
+ * `resolveLinkPreviewCached` already restricted to http(s). Never markup.
11
+ */
12
+ export declare const SiteCard: ({ href, resolver }: {
13
+ href: string;
14
+ resolver: LinkPreviewResolver;
15
+ }) => React.JSX.Element | null;
@@ -0,0 +1,9 @@
1
+ import React from "react";
2
+ interface UserMessageProps {
3
+ message: string;
4
+ timestamp?: string;
5
+ className?: string;
6
+ sender?: string;
7
+ }
8
+ export declare const UserMessage: ({ message, timestamp, className, sender, }: UserMessageProps) => React.JSX.Element;
9
+ export {};
@@ -0,0 +1,6 @@
1
+ import React from "react";
2
+ interface ConviButtonProps {
3
+ isOpen: boolean;
4
+ }
5
+ export declare const ConviButton: ({ isOpen }: ConviButtonProps) => React.JSX.Element;
6
+ export {};
@@ -0,0 +1,24 @@
1
+ import React from "react";
2
+ interface ConviFooterProps {
3
+ inputMode: "conversation" | "speaker" | "voice" | "verbosity";
4
+ inputValue: string;
5
+ liveUserText: string;
6
+ chatbotMic: boolean;
7
+ localIsTyping: boolean;
8
+ convaiIsTyping: boolean;
9
+ isCreatingSpeaker: boolean;
10
+ isPressingMic: boolean;
11
+ isSettingsOpen: boolean;
12
+ isVoiceMode: boolean;
13
+ onInputChange: (e: React.ChangeEvent<HTMLInputElement>) => void;
14
+ onKeyPress: (e: React.KeyboardEvent) => void;
15
+ onSend: () => void;
16
+ onMicPress: () => void;
17
+ onMicRelease: () => void;
18
+ setIsPressingMic: (value: boolean) => void;
19
+ onToggleVoiceMode: () => void;
20
+ verbosityChanged?: boolean;
21
+ onContinue?: () => void;
22
+ }
23
+ export declare const ConviFooter: ({ inputMode, inputValue, liveUserText, chatbotMic, localIsTyping, convaiIsTyping, isCreatingSpeaker, isPressingMic, isSettingsOpen, isVoiceMode, onInputChange, onKeyPress, onSend, onMicPress, onMicRelease, setIsPressingMic, onToggleVoiceMode, verbosityChanged, onContinue, }: ConviFooterProps) => React.JSX.Element;
24
+ export {};
@@ -0,0 +1,16 @@
1
+ import React from "react";
2
+ interface ConviHeaderProps {
3
+ isOpen: boolean;
4
+ isSpeakerEditMode: boolean;
5
+ isVoiceMode: boolean;
6
+ isVerbosityMode: boolean;
7
+ isMuted: boolean;
8
+ characterImage?: string;
9
+ characterName?: string;
10
+ onClose: () => void;
11
+ onSettingsToggle: () => void;
12
+ onToggleMute: () => void;
13
+ settingsButtonRef: React.RefObject<HTMLButtonElement>;
14
+ }
15
+ export declare const ConviHeader: ({ isOpen, isSpeakerEditMode, isVoiceMode, isVerbosityMode, isMuted, characterImage, characterName, onClose, onSettingsToggle, onToggleMute, settingsButtonRef, }: ConviHeaderProps) => React.JSX.Element;
16
+ export {};
@@ -0,0 +1,12 @@
1
+ import React from "react";
2
+ interface SettingsTrayProps {
3
+ isOpen: boolean;
4
+ isVideoVisible?: boolean;
5
+ isScreenShareActive?: boolean;
6
+ onReset?: () => void;
7
+ onDisconnect?: () => void;
8
+ onToggleVideo?: () => void;
9
+ onToggleScreenShare?: () => void;
10
+ }
11
+ export declare const SettingsTray: ({ isOpen, isVideoVisible, isScreenShareActive, onReset, onDisconnect, onToggleVideo, onToggleScreenShare, }: SettingsTrayProps) => React.JSX.Element | null;
12
+ export {};
@@ -0,0 +1,14 @@
1
+ import React from "react";
2
+ import { Room } from "livekit-client";
3
+ interface VoiceModeOverlayProps {
4
+ isActive: boolean;
5
+ isTalking: boolean;
6
+ /** When true (user is speaking, from server), show "Listening..." label */
7
+ isListening?: boolean;
8
+ convaiClient?: any;
9
+ characterImage?: string;
10
+ characterName?: string;
11
+ room?: Room | null;
12
+ }
13
+ export declare const VoiceModeOverlay: ({ isActive, isTalking, isListening, convaiClient, characterImage, characterName, room, }: VoiceModeOverlayProps) => React.JSX.Element;
14
+ export {};
@@ -0,0 +1,5 @@
1
+ export { ConviButton } from "./ConviButton";
2
+ export { ConviHeader } from "./ConviHeader";
3
+ export { ConviFooter } from "./ConviFooter";
4
+ export { SettingsTray } from "./SettingsTray";
5
+ export { VoiceModeOverlay } from "./VoiceModeOverlay";
@@ -0,0 +1,8 @@
1
+ export { MessageBubble } from "./MessageBubble";
2
+ export { MessageList } from "./MessageList";
3
+ export { UserMessage } from "./UserMessage";
4
+ export { ConviMessage } from "./ConviMessage";
5
+ export { MarkdownRenderer } from "./MarkdownRenderer";
6
+ export { FloatingVideo } from "./FloatingVideo";
7
+ export { AudioVisualizer } from "./AudioVisualizer";
8
+ export { ConviButton, ConviHeader, ConviFooter, SettingsTray, VoiceModeOverlay, } from "./conviComponents";
@@ -0,0 +1,5 @@
1
+ export { MessageBubble, MessageList, UserMessage, ConviMessage, FloatingVideo, ConviButton, ConviHeader, ConviFooter, SettingsTray, VoiceModeOverlay, } from "./components";
2
+ export { aeroTheme, glassStyles, iconSizes, variants, iosTransitions, animationVariants, ConvaiLogo, ChevronDown, } from "./styles";
3
+ export { ConvaiContainer, MorphingContainer, ButtonContent, Logo, ChatContent, Header, Title, HeaderLogo, CloseButton, SettingsButton, Content, Footer, InputContainer, Input, ActionButton, } from "./styles";
4
+ export type { RTCChatMessage, CharacterVerbosityConfig, ConviUIProps, } from "./types";
5
+ export type { LogoState } from "./styles";
@@ -0,0 +1,115 @@
1
+ export declare const iosTransitions: {
2
+ snappy: {
3
+ type: "spring";
4
+ stiffness: number;
5
+ damping: number;
6
+ };
7
+ fadePop: {
8
+ type: "spring";
9
+ stiffness: number;
10
+ damping: number;
11
+ };
12
+ layoutMorph: {
13
+ type: "spring";
14
+ stiffness: number;
15
+ damping: number;
16
+ };
17
+ modalSlide: {
18
+ type: "spring";
19
+ stiffness: number;
20
+ damping: number;
21
+ };
22
+ scale: {
23
+ type: "spring";
24
+ stiffness: number;
25
+ damping: number;
26
+ };
27
+ slide: {
28
+ type: "spring";
29
+ stiffness: number;
30
+ damping: number;
31
+ };
32
+ };
33
+ export declare const animationVariants: {
34
+ fadeIn: {
35
+ initial: {
36
+ opacity: number;
37
+ };
38
+ animate: {
39
+ opacity: number;
40
+ };
41
+ exit: {
42
+ opacity: number;
43
+ };
44
+ };
45
+ slideUp: {
46
+ initial: {
47
+ y: number;
48
+ opacity: number;
49
+ };
50
+ animate: {
51
+ y: number;
52
+ opacity: number;
53
+ };
54
+ exit: {
55
+ y: number;
56
+ opacity: number;
57
+ };
58
+ };
59
+ slideDown: {
60
+ initial: {
61
+ y: number;
62
+ opacity: number;
63
+ };
64
+ animate: {
65
+ y: number;
66
+ opacity: number;
67
+ };
68
+ exit: {
69
+ y: number;
70
+ opacity: number;
71
+ };
72
+ };
73
+ scaleIn: {
74
+ initial: {
75
+ scale: number;
76
+ opacity: number;
77
+ };
78
+ animate: {
79
+ scale: number;
80
+ opacity: number;
81
+ };
82
+ exit: {
83
+ scale: number;
84
+ opacity: number;
85
+ };
86
+ };
87
+ slideInFromRight: {
88
+ initial: {
89
+ x: string;
90
+ opacity: number;
91
+ };
92
+ animate: {
93
+ x: number;
94
+ opacity: number;
95
+ };
96
+ exit: {
97
+ x: string;
98
+ opacity: number;
99
+ };
100
+ };
101
+ slideInFromLeft: {
102
+ initial: {
103
+ x: string;
104
+ opacity: number;
105
+ };
106
+ animate: {
107
+ x: number;
108
+ opacity: number;
109
+ };
110
+ exit: {
111
+ x: string;
112
+ opacity: number;
113
+ };
114
+ };
115
+ };
@@ -0,0 +1,27 @@
1
+ import { iconSizes } from "./theme";
2
+ export type LogoState = "idle" | "connecting" | "connected" | "disconnected" | "typing" | "listening" | "processing";
3
+ export declare const AeroIcons: {
4
+ ChevronDown: ({ size, color, }: {
5
+ size?: keyof typeof iconSizes;
6
+ color?: string;
7
+ }) => import("react").JSX.Element;
8
+ ConvaiLogo: ({ size, color, animate, state, }: {
9
+ size?: keyof typeof iconSizes;
10
+ color?: string;
11
+ animate?: boolean;
12
+ state?: LogoState;
13
+ }) => import("react").JSX.Element;
14
+ };
15
+ export declare const IconButton: import("styled-components/dist/types").IStyledComponentBase<"web", import("styled-components/dist/types").Substitute<import("react").DetailedHTMLProps<import("react").ButtonHTMLAttributes<HTMLButtonElement>, HTMLButtonElement>, {
16
+ $size?: keyof typeof iconSizes;
17
+ $variant?: "ghost" | "glass";
18
+ }>> & string;
19
+ export declare const ChevronDown: ({ size, color, }: {
20
+ size?: keyof typeof iconSizes;
21
+ color?: string;
22
+ }) => import("react").JSX.Element, ConvaiLogo: ({ size, color, animate, state, }: {
23
+ size?: keyof typeof iconSizes;
24
+ color?: string;
25
+ animate?: boolean;
26
+ state?: LogoState;
27
+ }) => import("react").JSX.Element;
@@ -0,0 +1,5 @@
1
+ export { aeroTheme, glassStyles, iconSizes, variants } from "./theme";
2
+ export { iosTransitions, animationVariants } from "./framerConfig";
3
+ export { ConvaiContainer, MorphingContainer, ButtonContent, Logo, ChatContent, Header, Title, HeaderLogo, CloseButton, SettingsButton, SettingsTray, SettingsOption, Content, Footer, InputContainer, Input, ActionButton, MessageList, Message, MessageBubble, MessageTime, ButtonContainer, ButtonLogo, ConviBubble, ConviMessageContainer, MessageHeader, ConviLabel, LogoWrapper, UserBubble, UserMessageContainer, UserLabel, BubbleContainer, Bubble, Timestamp, MessageListContainer, MessageWrapper, EmptyState, } from "./styledComponents";
4
+ export { ConvaiLogo, ChevronDown, AeroIcons, IconButton } from "./icons";
5
+ export type { LogoState } from "./icons";
@@ -0,0 +1,53 @@
1
+ export declare const ConvaiContainer: import("styled-components/dist/types").IStyledComponentBase<"web", import("styled-components").FastOmit<Omit<import("framer-motion").HTMLMotionProps<"div">, "ref"> & import("react").RefAttributes<HTMLDivElement>, never>> & string & Omit<import("framer-motion").ForwardRefComponent<HTMLDivElement, import("framer-motion").HTMLMotionProps<"div">>, keyof import("react").Component<any, {}, any>>;
2
+ export declare const MorphingContainer: import("styled-components/dist/types").IStyledComponentBase<"web", import("styled-components/dist/types").Substitute<Omit<import("framer-motion").HTMLMotionProps<"div">, "ref"> & import("react").RefAttributes<HTMLDivElement>, {
3
+ $backgroundOpacity?: number;
4
+ }>> & string & Omit<import("framer-motion").ForwardRefComponent<HTMLDivElement, import("framer-motion").HTMLMotionProps<"div">>, keyof import("react").Component<any, {}, any>>;
5
+ export declare const ButtonContent: import("styled-components/dist/types").IStyledComponentBase<"web", import("styled-components").FastOmit<Omit<import("framer-motion").HTMLMotionProps<"div">, "ref"> & import("react").RefAttributes<HTMLDivElement>, never>> & string & Omit<import("framer-motion").ForwardRefComponent<HTMLDivElement, import("framer-motion").HTMLMotionProps<"div">>, keyof import("react").Component<any, {}, any>>;
6
+ export declare const Logo: import("styled-components/dist/types").IStyledComponentBase<"web", import("styled-components").FastOmit<Omit<import("framer-motion").HTMLMotionProps<"div">, "ref"> & import("react").RefAttributes<HTMLDivElement>, never>> & string & Omit<import("framer-motion").ForwardRefComponent<HTMLDivElement, import("framer-motion").HTMLMotionProps<"div">>, keyof import("react").Component<any, {}, any>>;
7
+ export declare const ChatContent: import("styled-components/dist/types").IStyledComponentBase<"web", import("styled-components").FastOmit<Omit<import("framer-motion").HTMLMotionProps<"div">, "ref"> & import("react").RefAttributes<HTMLDivElement>, never>> & string & Omit<import("framer-motion").ForwardRefComponent<HTMLDivElement, import("framer-motion").HTMLMotionProps<"div">>, keyof import("react").Component<any, {}, any>>;
8
+ export declare const Header: import("styled-components/dist/types").IStyledComponentBase<"web", import("styled-components").FastOmit<Omit<import("framer-motion").HTMLMotionProps<"div">, "ref"> & import("react").RefAttributes<HTMLDivElement>, never>> & string & Omit<import("framer-motion").ForwardRefComponent<HTMLDivElement, import("framer-motion").HTMLMotionProps<"div">>, keyof import("react").Component<any, {}, any>>;
9
+ export declare const Title: import("styled-components/dist/types").IStyledComponentBase<"web", import("styled-components").FastOmit<import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLHeadingElement>, HTMLHeadingElement>, never>> & string;
10
+ export declare const HeaderLogo: import("styled-components/dist/types").IStyledComponentBase<"web", import("styled-components").FastOmit<import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLDivElement>, HTMLDivElement>, never>> & string;
11
+ export declare const CloseButton: import("styled-components/dist/types").IStyledComponentBase<"web", import("styled-components").FastOmit<Omit<import("framer-motion").HTMLMotionProps<"button">, "ref"> & import("react").RefAttributes<HTMLButtonElement>, never>> & string & Omit<import("framer-motion").ForwardRefComponent<HTMLButtonElement, import("framer-motion").HTMLMotionProps<"button">>, keyof import("react").Component<any, {}, any>>;
12
+ export declare const SettingsButton: import("styled-components/dist/types").IStyledComponentBase<"web", import("styled-components").FastOmit<Omit<import("framer-motion").HTMLMotionProps<"button">, "ref"> & import("react").RefAttributes<HTMLButtonElement>, never>> & string & Omit<import("framer-motion").ForwardRefComponent<HTMLButtonElement, import("framer-motion").HTMLMotionProps<"button">>, keyof import("react").Component<any, {}, any>>;
13
+ export declare const SettingsTray: import("styled-components/dist/types").IStyledComponentBase<"web", import("styled-components").FastOmit<Omit<import("framer-motion").HTMLMotionProps<"div">, "ref"> & import("react").RefAttributes<HTMLDivElement>, never>> & string & Omit<import("framer-motion").ForwardRefComponent<HTMLDivElement, import("framer-motion").HTMLMotionProps<"div">>, keyof import("react").Component<any, {}, any>>;
14
+ export declare const SettingsOption: import("styled-components/dist/types").IStyledComponentBase<"web", import("styled-components").FastOmit<Omit<import("framer-motion").HTMLMotionProps<"button">, "ref"> & import("react").RefAttributes<HTMLButtonElement>, never>> & string & Omit<import("framer-motion").ForwardRefComponent<HTMLButtonElement, import("framer-motion").HTMLMotionProps<"button">>, keyof import("react").Component<any, {}, any>>;
15
+ export declare const Content: import("styled-components/dist/types").IStyledComponentBase<"web", import("styled-components").FastOmit<Omit<import("framer-motion").HTMLMotionProps<"div">, "ref"> & import("react").RefAttributes<HTMLDivElement>, never>> & string & Omit<import("framer-motion").ForwardRefComponent<HTMLDivElement, import("framer-motion").HTMLMotionProps<"div">>, keyof import("react").Component<any, {}, any>>;
16
+ export declare const Footer: import("styled-components/dist/types").IStyledComponentBase<"web", import("styled-components").FastOmit<Omit<import("framer-motion").HTMLMotionProps<"div">, "ref"> & import("react").RefAttributes<HTMLDivElement>, never>> & string & Omit<import("framer-motion").ForwardRefComponent<HTMLDivElement, import("framer-motion").HTMLMotionProps<"div">>, keyof import("react").Component<any, {}, any>>;
17
+ export declare const InputContainer: import("styled-components/dist/types").IStyledComponentBase<"web", import("styled-components").FastOmit<Omit<import("framer-motion").HTMLMotionProps<"div">, "ref"> & import("react").RefAttributes<HTMLDivElement>, never>> & string & Omit<import("framer-motion").ForwardRefComponent<HTMLDivElement, import("framer-motion").HTMLMotionProps<"div">>, keyof import("react").Component<any, {}, any>>;
18
+ export declare const Input: import("styled-components/dist/types").IStyledComponentBase<"web", import("styled-components").FastOmit<import("react").DetailedHTMLProps<import("react").InputHTMLAttributes<HTMLInputElement>, HTMLInputElement>, never>> & string;
19
+ export declare const ActionButton: import("styled-components/dist/types").IStyledComponentBase<"web", import("styled-components/dist/types").Substitute<Omit<import("framer-motion").HTMLMotionProps<"button">, "ref"> & import("react").RefAttributes<HTMLButtonElement>, {
20
+ $active?: boolean;
21
+ }>> & string & Omit<import("framer-motion").ForwardRefComponent<HTMLButtonElement, import("framer-motion").HTMLMotionProps<"button">>, keyof import("react").Component<any, {}, any>>;
22
+ export declare const MessageList: import("styled-components/dist/types").IStyledComponentBase<"web", import("styled-components").FastOmit<import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLDivElement>, HTMLDivElement>, never>> & string;
23
+ export declare const Message: import("styled-components/dist/types").IStyledComponentBase<"web", import("styled-components/dist/types").Substitute<import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLDivElement>, HTMLDivElement>, {
24
+ isUser: boolean;
25
+ }>> & string;
26
+ export declare const MessageBubble: import("styled-components/dist/types").IStyledComponentBase<"web", import("styled-components/dist/types").Substitute<import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLDivElement>, HTMLDivElement>, {
27
+ isUser: boolean;
28
+ }>> & string;
29
+ export declare const MessageTime: import("styled-components/dist/types").IStyledComponentBase<"web", import("styled-components/dist/types").Substitute<import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLDivElement>, HTMLDivElement>, {
30
+ isUser: boolean;
31
+ }>> & string;
32
+ export declare const ButtonContainer: import("styled-components/dist/types").IStyledComponentBase<"web", import("styled-components").FastOmit<Omit<import("framer-motion").HTMLMotionProps<"button">, "ref"> & import("react").RefAttributes<HTMLButtonElement>, never>> & string & Omit<import("framer-motion").ForwardRefComponent<HTMLButtonElement, import("framer-motion").HTMLMotionProps<"button">>, keyof import("react").Component<any, {}, any>>;
33
+ export declare const ButtonLogo: import("styled-components/dist/types").IStyledComponentBase<"web", import("styled-components").FastOmit<Omit<import("framer-motion").HTMLMotionProps<"div">, "ref"> & import("react").RefAttributes<HTMLDivElement>, never>> & string & Omit<import("framer-motion").ForwardRefComponent<HTMLDivElement, import("framer-motion").HTMLMotionProps<"div">>, keyof import("react").Component<any, {}, any>>;
34
+ export declare const ConviBubble: import("styled-components/dist/types").IStyledComponentBase<"web", import("styled-components").FastOmit<import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLDivElement>, HTMLDivElement>, never>> & string;
35
+ export declare const ConviMessageContainer: import("styled-components/dist/types").IStyledComponentBase<"web", import("styled-components").FastOmit<import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLDivElement>, HTMLDivElement>, never>> & string;
36
+ export declare const MessageHeader: import("styled-components/dist/types").IStyledComponentBase<"web", import("styled-components").FastOmit<import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLDivElement>, HTMLDivElement>, never>> & string;
37
+ export declare const ConviLabel: import("styled-components/dist/types").IStyledComponentBase<"web", import("styled-components").FastOmit<import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLSpanElement>, HTMLSpanElement>, never>> & string;
38
+ export declare const LogoWrapper: import("styled-components/dist/types").IStyledComponentBase<"web", import("styled-components").FastOmit<import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLDivElement>, HTMLDivElement>, never>> & string;
39
+ export declare const UserBubble: import("styled-components/dist/types").IStyledComponentBase<"web", import("styled-components").FastOmit<import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLDivElement>, HTMLDivElement>, never>> & string;
40
+ export declare const UserMessageContainer: import("styled-components/dist/types").IStyledComponentBase<"web", import("styled-components").FastOmit<import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLDivElement>, HTMLDivElement>, never>> & string;
41
+ export declare const UserLabel: import("styled-components/dist/types").IStyledComponentBase<"web", import("styled-components").FastOmit<import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLSpanElement>, HTMLSpanElement>, never>> & string;
42
+ export declare const BubbleContainer: import("styled-components/dist/types").IStyledComponentBase<"web", import("styled-components/dist/types").Substitute<Omit<import("framer-motion").HTMLMotionProps<"div">, "ref"> & import("react").RefAttributes<HTMLDivElement>, {
43
+ $isUser: boolean;
44
+ }>> & string & Omit<import("framer-motion").ForwardRefComponent<HTMLDivElement, import("framer-motion").HTMLMotionProps<"div">>, keyof import("react").Component<any, {}, any>>;
45
+ export declare const Bubble: import("styled-components/dist/types").IStyledComponentBase<"web", import("styled-components/dist/types").Substitute<Omit<import("framer-motion").HTMLMotionProps<"div">, "ref"> & import("react").RefAttributes<HTMLDivElement>, {
46
+ $isUser: boolean;
47
+ }>> & string & Omit<import("framer-motion").ForwardRefComponent<HTMLDivElement, import("framer-motion").HTMLMotionProps<"div">>, keyof import("react").Component<any, {}, any>>;
48
+ export declare const Timestamp: import("styled-components/dist/types").IStyledComponentBase<"web", import("styled-components/dist/types").Substitute<import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLSpanElement>, HTMLSpanElement>, {
49
+ $isUser: boolean;
50
+ }>> & string;
51
+ export declare const MessageListContainer: import("styled-components/dist/types").IStyledComponentBase<"web", import("styled-components").FastOmit<import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLDivElement>, HTMLDivElement>, never>> & string;
52
+ export declare const MessageWrapper: import("styled-components/dist/types").IStyledComponentBase<"web", import("styled-components").FastOmit<import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLDivElement>, HTMLDivElement>, never>> & string;
53
+ export declare const EmptyState: import("styled-components/dist/types").IStyledComponentBase<"web", import("styled-components").FastOmit<import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLDivElement>, HTMLDivElement>, never>> & string;