@debales/ai 1.1.33-canary.0 → 1.1.34-canary.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -1,4 +1,6 @@
1
- export default function ChatInputBox({ disabled, inputState, }: {
1
+ export default function ChatInputBox({ disabled, inputState, isInSupportMode, onSupportMessage, }: {
2
2
  disabled: boolean;
3
3
  inputState: boolean;
4
+ isInSupportMode?: boolean;
5
+ onSupportMessage?: (message: string) => void;
4
6
  }): import("react/jsx-runtime").JSX.Element;
@@ -0,0 +1,32 @@
1
+ import { default as React } from 'react';
2
+ interface SupportSystemProps {
3
+ botId: string;
4
+ messages: any[];
5
+ setMessages: (messages: any[] | ((prev: any[]) => any[])) => void;
6
+ setLastedBotmessageId: (id: string) => void;
7
+ setComponentVisibility: (visibility: any) => void;
8
+ storedLeadingQueries: string[];
9
+ setStoredLeadingQueries: (queries: string[]) => void;
10
+ children: (supportProps: SupportSystemRenderProps) => React.ReactNode;
11
+ }
12
+ interface SupportSystemRenderProps {
13
+ isSupportMode: boolean;
14
+ showSupportForm: boolean;
15
+ formData: {
16
+ name: string;
17
+ email: string;
18
+ message: string;
19
+ };
20
+ formErrors: {
21
+ name: string;
22
+ email: string;
23
+ message: string;
24
+ };
25
+ handleSupportClick: () => void;
26
+ handleSubmit: (e: React.FormEvent) => void;
27
+ handleFormChange: (field: string, value: string) => void;
28
+ exitSupportMode: () => void;
29
+ sendSupportMessage: (message: string) => void;
30
+ }
31
+ export declare const SupportSystem: React.FC<SupportSystemProps>;
32
+ export {};
@@ -0,0 +1,19 @@
1
+ import { Socket } from 'socket.io-client';
2
+ declare class SupportSocketManager {
3
+ private static instance;
4
+ private socket;
5
+ private isConnected;
6
+ private eventListeners;
7
+ private constructor();
8
+ static getInstance(): SupportSocketManager;
9
+ connect(url: string): Socket;
10
+ disconnect(): void;
11
+ getSocket(): Socket | null;
12
+ getIsConnected(): boolean;
13
+ on(event: string, callback: (...args: any[]) => void): void;
14
+ off(event: string, callback: (...args: any[]) => void): void;
15
+ emit(event: string, ...args: any[]): void;
16
+ private emitEvent;
17
+ }
18
+ export declare const supportSocketManager: SupportSocketManager;
19
+ export {};
package/package.json CHANGED
@@ -2,7 +2,7 @@
2
2
  "name": "@debales/ai",
3
3
  "private": false,
4
4
  "access": "public",
5
- "version": "1.1.33-canary.0",
5
+ "version": "1.1.34-canary.0",
6
6
  "type": "module",
7
7
  "main": "./dist/module/ai.js",
8
8
  "types": "./dist/module/index.d.ts",