import type { Corti, CortiAuth } from "@corti/sdk"; import { LitElement } from "lit"; import { type Ref } from "lit/directives/ref.js"; import type { ConfigurableSettings, ProxyOptions, RecordingState } from "../types.js"; type CortiProviderRoot = LitElement & { recordingState?: RecordingState; languages?: Corti.TranscribeSupportedLanguage[]; devices?: MediaDeviceInfo[]; selectedDevice?: MediaDeviceInfo | undefined; pushToTalkKeybinding?: string | null | undefined; toggleToTalkKeybinding?: string | null | undefined; }; type CortiRecordingButtonHost = LitElement & { startRecording(): void; stopRecording(): void; toggleRecording(): void; openConnection(): Promise; closeConnection(): Promise; }; /** * Shared base for all-in-one Corti host elements (e.g. corti-dictation, corti-ambient). * Intentionally minimal; shared behavior will move here incrementally. */ export declare class CortiRoot extends LitElement { static styles: import("lit").CSSResult; /** * Latest access token */ accessToken?: string; /** * Authentication configuration with optional refresh mechanism. */ authConfig?: CortiAuth.AuthTokenDerivable; /** * WebSocket URL for proxy connection. When provided, uses CortiWebSocketProxyClient instead of CortiClient. */ socketUrl?: string; /** * Socket proxy configuration object. When provided, uses CortiWebSocketProxyClient instead of CortiClient. */ socketProxy?: ProxyOptions; /** * Extra keys on `x-corti-analytics`. `web_component` and * `web_component_version` are reserved by the component. */ analytics?: Record; /** * Which settings should be available in the UI. * If an empty array is passed, the settings will be disabled entirely. */ settingsEnabled: ConfigurableSettings[]; /** * When false (default), clicking the start/stop button does not move focus * to the button, allowing textareas or other input elements to keep focus. * Set to true to allow the button to receive focus on click. */ allowButtonFocus: boolean; /** * List of all language codes available for use with the Web Component. * Default list depends on the accessToken */ set languagesSupported(value: Corti.TranscribeSupportedLanguage[] | undefined); get languagesSupported(): Corti.TranscribeSupportedLanguage[]; protected _languagesSupported?: Corti.TranscribeSupportedLanguage[]; /** * List of available recording devices */ set devices(value: MediaDeviceInfo[] | undefined); get devices(): MediaDeviceInfo[]; protected _devices?: MediaDeviceInfo[]; /** * The selected device used for recording (MediaDeviceInfo). */ set selectedDevice(value: MediaDeviceInfo | undefined); get selectedDevice(): MediaDeviceInfo | undefined; protected _selectedDevice?: MediaDeviceInfo; /** * Push-to-talk keybinding for keyboard shortcut. Single key only (e.g., "Space", "k", "meta", "ctrl"). * Combinations with "+" are not supported. * Keydown starts recording, keyup stops recording. * Defaults to "Space" if keybinding is in settingsEnabled, otherwise undefined */ set pushToTalkKeybinding(value: string | null | undefined); get pushToTalkKeybinding(): string | null | undefined; protected _pushToTalkKeybinding?: string | null; /** * Toggle-to-talk keybinding for keyboard shortcut. Single key only (e.g., "`", "k", "meta", "ctrl"). * Combinations with "+" are not supported. * Pressing the key toggles recording on/off. * Defaults to "Enter" if keybinding is in settingsEnabled, otherwise undefined */ set toggleToTalkKeybinding(value: string | null | undefined); get toggleToTalkKeybinding(): string | null | undefined; protected _toggleToTalkKeybinding?: string | null; protected _contextProviderRef: Ref; protected _recordingButtonRef: Ref; /** * Current state of recording (stopped, recording, initializing and stopping, ). */ get recordingState(): RecordingState; /** * Starts a recording. */ startRecording(): void; /** * Stops a recording. */ stopRecording(): void; /** * Starts or stops recording. Convenience layer on top of the start/stop methods. */ toggleRecording(): void; /** * Opens the WebSocket connection without starting recording. * Use this to pre-establish the connection before recording starts. */ openConnection(): Promise; /** * Closes the WebSocket connection by sending "end" and waiting for "ended". * Call this to receive "usage" statistics or when done with the connection. */ closeConnection(): Promise; render(): import("lit").TemplateResult<1>; } export {};