@agentman/chat-widget
Version:
Agentman Chat Widget for easy integration with web applications
53 lines (52 loc) • 1.22 kB
TypeScript
/**
* TypewriterController - Animated typewriter effect for placeholder text
*
* Creates a realistic typing animation that cycles through multiple prompts
* Used in collapsed state to hint at capabilities
*/
export declare class TypewriterController {
private element;
private prompts;
private currentPromptIndex;
private currentCharIndex;
private isTyping;
private typingSpeed;
private deletingSpeed;
private pauseAfterTyping;
private pauseAfterDeleting;
private timeoutId;
private isDestroyed;
constructor(element: HTMLElement, prompts: string[]);
/**
* Start the typewriter animation
*/
private start;
/**
* Type the current character
*/
private type;
/**
* Delete the current character
*/
private delete;
/**
* Update the prompts (e.g., when config changes)
*/
updatePrompts(prompts: string[]): void;
/**
* Pause the animation
*/
pause(): void;
/**
* Resume the animation
*/
resume(): void;
/**
* Reset the animation to the beginning
*/
reset(): void;
/**
* Destroy the controller and clean up
*/
destroy(): void;
}