import { Vowel } from '../core/VowelClient'; import { VowelAction, ActionHandler, VowelVoiceConfig, VowelClientConfig } from '../types'; /** * Action registration entry */ interface ActionRegistration { definition: VowelAction; handler: ActionHandler; } /** * Per-instance state */ interface InstanceState { /** Unique instance ID */ id: string; /** Vowel client instance */ client: Vowel | null; /** Registered actions for this instance */ actions: Map; /** Instance configuration */ config: { instructions?: string; systemInstructionOverride?: string; language?: string; initialGreetingPrompt?: string; turnDetectionPreset?: 'aggressive' | 'balanced' | 'conservative'; /** @deprecated Prefer `_voiceConfig`. */ voiceConfig?: VowelVoiceConfig; _voiceConfig?: VowelVoiceConfig; floatingCursor?: VowelClientConfig['floatingCursor']; _caption?: VowelClientConfig['_caption']; borderGlow?: VowelClientConfig['borderGlow']; }; } /** * Global registry of web component instances */ declare class VowelWebComponentRegistry { private instances; private elementToInstanceId; /** * Register a new web component instance */ registerInstance(element: HTMLElement): string; /** * Unregister a web component instance */ unregisterInstance(instanceIdOrElement: string | HTMLElement): void; /** * Get instance ID from element */ getInstanceId(element: HTMLElement): string | undefined; /** * Get instance state */ getInstance(instanceIdOrElement: string | HTMLElement): InstanceState | undefined; /** * Set Vowel client for an instance */ setClient(instanceId: string, client: Vowel): void; /** * Get Vowel client for an instance */ getClient(instanceIdOrElement: string | HTMLElement): Vowel | null; /** * Register an action for a specific instance */ registerAction(instanceIdOrElement: string | HTMLElement, name: string, definition: VowelAction, handler: ActionHandler): void; /** * Get all actions for an instance */ getActions(instanceIdOrElement: string | HTMLElement): Map; /** * Set configuration for an instance */ setConfig(instanceIdOrElement: string | HTMLElement, config: InstanceState['config']): void; /** * Get configuration for an instance */ getConfig(instanceIdOrElement: string | HTMLElement): InstanceState['config']; /** * Generate a unique instance ID */ private generateInstanceId; /** * Get all registered instances (for debugging) */ getAllInstances(): string[]; } /** * Global singleton instance */ export declare const vowelRegistry: VowelWebComponentRegistry; export {}; //# sourceMappingURL=VowelWebComponentRegistry.d.ts.map