import { AppState, Annotation, AnnotationId, Settings, ToolMode, OutputLevel, EventMap, BeforeAnnotationCreateHook } from './types'; import { Store } from './store'; import { EventBus } from './event-bus'; import { AnnotationManager } from './annotations/annotation'; import { FreezeManager } from './dom/freeze'; export interface AnnotationCoreOptions { /** Initial settings override */ settings?: Partial; /** Whether to load persisted annotations */ loadPersisted?: boolean; /** Hook called before creating an annotation - can add context, modify comment, or cancel */ onBeforeAnnotationCreate?: BeforeAnnotationCreateHook; /** Callback when an annotation is created */ onAnnotationCreate?: (annotation: Annotation) => void; /** Callback when an annotation is updated */ onAnnotationUpdate?: (annotation: Annotation) => void; /** Callback when an annotation is deleted */ onAnnotationDelete?: (id: AnnotationId) => void; /** Callback when all annotations are cleared */ onAnnotationsClear?: (annotations: Annotation[]) => void; /** Callback when output is copied */ onCopy?: (content: string, level: OutputLevel) => void; /** Whether to copy to clipboard automatically */ copyToClipboard?: boolean; } export interface AnnotationCore { /** Store for state management */ store: Store; /** Event bus for cross-component communication */ eventBus: EventBus; /** Annotation manager for CRUD operations */ annotations: AnnotationManager; /** Freeze manager for animations/videos */ freeze: FreezeManager; /** Activate the tool */ activate: (mode?: ToolMode) => void; /** Deactivate the tool */ deactivate: () => void; /** Toggle activation */ toggle: () => void; /** Check if active */ isActive: () => boolean; /** Set tool mode */ setMode: (mode: ToolMode) => void; /** Get current mode */ getMode: () => ToolMode; /** Update settings */ updateSettings: (settings: Partial) => void; /** Get current settings */ getSettings: () => Settings; /** Generate and copy output */ copyOutput: (level?: OutputLevel) => Promise; /** Get output without copying */ getOutput: (level?: OutputLevel) => string; /** Show popup for creating/editing annotation */ showPopup: (annotationId?: AnnotationId, anchor?: { x: number; y: number; }) => void; /** Hide popup */ hidePopup: () => void; /** Subscribe to state changes */ subscribe: (listener: (state: AppState) => void) => () => void; /** Destroy and clean up */ destroy: () => void; } /** * Create the core Annotation controller */ export declare function createAnnotationCore(options?: AnnotationCoreOptions): AnnotationCore; //# sourceMappingURL=controller.d.ts.map