@revrag-ai/embed-react-native
Version:
A powerful React Native library for integrating AI-powered voice agents into mobile applications. Features real-time voice communication, intelligent speech processing, customizable UI components, and comprehensive event handling for building conversation
49 lines • 1.84 kB
TypeScript
/**
* @file EmbedButton.helpers.ts
* @description Helper functions and utilities for the EmbedButton component
*/
export declare const SCREEN_WIDTH: number, SCREEN_HEIGHT: number;
export declare const BUTTON_DIMENSIONS: {
readonly WIDTH: 60;
readonly HEIGHT: 60;
readonly EXPANDED_WIDTH: number;
};
export declare const ICON_URLS: {
readonly MIC_ON: "https://revrag-dev.s3.ap-south-1.amazonaws.com/Avatars/Mute+button.png";
readonly MIC_OFF: "https://revrag-dev.s3.ap-south-1.amazonaws.com/Avatars/unmute.png";
readonly END_CALL: "https://revrag-dev.s3.ap-south-1.amazonaws.com/Avatars/end+button.png";
readonly AMPLIFY_ANIMATION: "https://revrag-dev.s3.ap-south-1.amazonaws.com/Avatars/amplify.json";
};
export declare const DEFAULT_GRADIENT_COLORS: string[];
export declare const DEFAULT_POPUP_DELAY_MS = 15000;
export interface ConfigData {
inactivity_behaviour?: 'show_popup' | 'auto_trigger' | 'none';
popup_delay_ms?: number | string;
popup_description?: string;
icon_animation?: string;
gradient?: string[];
agent_name?: string;
agent_type?: string;
connect_button_title?: string;
}
/**
* Safely parse delay value to ensure it's a valid number
*/
export declare const parseDelayMs: (delay: number | string | undefined) => number;
/**
* Format seconds to MM:SS format
*/
export declare const formatDuration: (seconds: number) => string;
/**
* Calculate the max X position for button drag constraints
*/
export declare const calculateMaxX: (isOpen: boolean) => number;
/**
* Calculate the max Y position for button drag constraints
*/
export declare const calculateMaxY: () => number;
/**
* Clamp a value between a min and max
*/
export declare const clamp: (value: number, min: number, max: number) => number;
//# sourceMappingURL=EmbedButton.helpers.d.ts.map