@eloquentai/chat-sdk 0.30.13 → 0.30.14-dev

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.
@@ -0,0 +1,6 @@
1
+ /**
2
+ * Tracks how much the on-screen keyboard overlaps the layout viewport, using
3
+ * the VisualViewport API. Used to lift the chat input above the keyboard
4
+ * without moving/resizing the rest of the chat window.
5
+ */
6
+ export declare function useKeyboardInset(enabled: boolean): number;
@@ -6,6 +6,7 @@ export interface ChatData {
6
6
  deviceId: string | null;
7
7
  messages: Message[];
8
8
  lastActivity?: number;
9
+ isChatClosed?: boolean;
9
10
  }
10
11
  /**
11
12
  * Hook to manage persistence of chat data, including conversation ID, user ID, last activity time, and messages.
@@ -19,4 +20,5 @@ export declare function usePersistence({ appId }: {
19
20
  clearChatData: () => void;
20
21
  getSavedChatData: () => ChatData;
21
22
  updateLastActivity: () => void;
23
+ markChatClosed: () => void;
22
24
  };
@@ -0,0 +1,6 @@
1
+ /**
2
+ * Locks scrolling on the host page while active. Uses the fixed-body trick
3
+ * (rather than plain `overflow: hidden`) so it also holds on iOS Safari,
4
+ * which otherwise still allows background scroll/bounce behind the chat.
5
+ */
6
+ export declare function useScrollLock(locked: boolean): void;
@@ -21,6 +21,7 @@ export interface UseSdkInitializationReturn {
21
21
  } | null;
22
22
  messages: Message[];
23
23
  isReady: boolean;
24
+ isChatClosed: boolean;
24
25
  }
25
26
  /**
26
27
  * Hook to handle SDK initialization for the EloquentAI Chat SDK
@@ -5,6 +5,8 @@ export interface ChatInterfaceProps {
5
5
  theme?: Partial<ThemeContextType>;
6
6
  isOpen?: boolean;
7
7
  isMobile?: boolean;
8
+ /** Current on-screen keyboard overlap (px), used to lift the input above it. */
9
+ keyboardInset?: number;
8
10
  messages?: Message[];
9
11
  assistantName?: string;
10
12
  assistantLogo?: string;