import { Annotation, AnnotationId, OutputLevel, ThemeMode, Settings, PartialTranslationStrings, BeforeAnnotationCreateHook, BeforeAnnotationCreateData, BeforeAnnotationCreateResult } from '../../core/types'; import { AnnotationElement, registerAnnotationElement } from '../../element/annotation-element'; export interface AnnotationOptions { /** Container element to append Annotation to (defaults to document.body) */ container?: HTMLElement; /** Theme mode */ theme?: ThemeMode; /** Output detail level */ outputLevel?: OutputLevel; /** Annotation marker color */ annotationColor?: string; /** Whether to auto-activate on mount */ autoActivate?: 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; /** Locale for UI strings (default: 'en') */ locale?: string; /** Custom translation overrides */ translations?: PartialTranslationStrings; /** Whether to translate markdown output (default: false for AI compatibility) */ translateOutput?: boolean; } export interface AnnotationInstance { /** The underlying custom element */ element: AnnotationElement; /** Activate the tool */ activate: () => void; /** Deactivate the tool */ deactivate: () => void; /** Toggle activation */ toggle: () => void; /** Copy output to clipboard */ copyOutput: (level?: OutputLevel) => Promise; /** Get output without copying */ getOutput: (level?: OutputLevel) => string; /** Clear all annotations */ clearAll: () => void; /** Destroy and remove the element */ destroy: () => void; } /** * Create an Annotation instance * * @example * ```js * import { createAnnotation } from 'annotation/vanilla'; * * const instance = createAnnotation({ * theme: 'auto', * onAnnotationCreate: (annotation) => console.log('Created:', annotation), * }); * * // Later: * instance.activate(); * ``` */ export declare function createAnnotation(options?: AnnotationOptions): AnnotationInstance; /** * Initialize Annotation with a simple API * * @example * ```js * import { init } from 'annotation/vanilla'; * * const instance = init(); // Creates and activates immediately * ``` */ export declare function init(options?: Omit): AnnotationInstance; export type { Annotation, AnnotationId, OutputLevel, ThemeMode, Settings, PartialTranslationStrings, BeforeAnnotationCreateHook, BeforeAnnotationCreateData, BeforeAnnotationCreateResult }; export { AnnotationElement, registerAnnotationElement }; export { initI18n } from '../../core/i18n'; //# sourceMappingURL=index.d.ts.map