import type { ModeHost, ModeState, NotePopupOptions } from './mode-states.js'; import type { MakeThisBetterConfig } from '../types.js'; export declare class WidgetController implements ModeHost { private config; private brandColors; private shadow; private tab; private toolbar; private session; private drawBar; private dim; private pageOffset; private chatPopup; private scrollLock; private success; private frustrationPrompt; private apiClient; private consoleCollector; private breadcrumbCollector; private frustrationDetector; private messages; private state; private via; private currentAnnotation; private lastPopupPos; private recordingManager; private lifecycle; private touchHintShown; private lastHandoff; constructor(config: MakeThisBetterConfig); /** * The single mutation point of the mode machine: the outgoing state exits, * the incoming state enters, and the launcher reflects the new mode. */ transitionTo(next: ModeState): void; private handleKeydown; private buildUI; private mountTab; /** Opens annotation mode. Idempotent: a second call while open does nothing. */ open(): void; close(): void; showLauncher(): void; hideLauncher(): void; setLocale(locale: string): void; private handleFrustration; dismissSuccess(): void; dismissFrustrationPrompt(): void; hasAnnotationChrome(): boolean; mountAnnotationChrome(): void; ensureSession(): void; destroySession(): void; clearCurrentAnnotation(): void; startRecorder(): void; destroyRecordingManager(): void; stopRecordingIntoNote: () => void; mountDrawBar(): void; /** * The note sheet for a finished drawing on touch. * * Cancel here means "throw the drawing away and keep annotating", not "close * the widget" — the reporter is mid-task and a stray stroke should cost one * tap, not the whole session. */ mountDrawSheet(): void; private handleDrawUndoRedo; refreshDrawBar(): void; cancelDraw(): void; teardownDrawBar(): void; private handleDrawSubmit; private mountChatAfterSubmit; mountNotePopup({ x, y, targetName, targetRect }: NotePopupOptions): void; /** * The Markup-button escape from a note popup. The popup's mount destroyed * the session's overlay (dismissInteraction), so the session goes with it — * AnnotatingState.enter() rebuilds a fresh one and the reporter can point * and draw again, rather than facing a dead overlay under a leftover scrim. */ dismissNotePopup(): void; private engageScrollLock; private releaseScrollLock; private buildMyFeedbackHandler; private teardownSubmittingUi; revertToolbarDuringClarify(): void; releaseClarifyUi(): void; private handleFinalized; private showSuccess; private buildEmailCapture; private buildViewFeedbackHandler; /** * The reserved strip belongs to the toolbar, so it goes back the moment the * toolbar does. Both teardown paths route through here: exit, and the * successful submit — which never passes through exitAll and used to leave * the host page padded for the rest of its life. */ private teardownToolbar; exitAll(): void; destroy(): void; } //# sourceMappingURL=controller.d.ts.map