import { Coordinate, FeatureID, Json, SchemaID } from '../types'; import { ContentFormat } from './content-formats'; export declare class KeyframeAnnotationBuilder { static makeBoundingBox(): IKeyframeAnnotation; static makePolyline(): IKeyframeAnnotation; static makePoint(): IKeyframeAnnotation; static makeBoundingBoxKeyframe: (frame: number, content: Coordinate[]) => Keyframe; static makePolylineKeyframe: (frame: number, content: Coordinate[]) => Keyframe; static makePointKeyframe: (frame: number, content: Coordinate) => Keyframe; } export declare class KeyframeAnnotations { private createFeatureId; createKeyframeAnnotation: (objectType: SchemaID, content: IKeyframeAnnotation) => FeatureID; updateKeyframeAnnotation: (objectId: FeatureID, content: IKeyframeAnnotation) => FeatureID; } export declare function KeyframeAnnotationFromJson(json: KeyframeAnnotationJson): IKeyframeAnnotation; export interface IKeyframeAnnotation { createSegment(): ISegment; removeSegment(segment: ISegment): boolean; findSegment(frame: number): ISegment | undefined; validate(): void; toJson(): KeyframeAnnotationJson; } export interface ISegment { addKeyframe(keyframe: Keyframe): void; removeKeyframe(frame: number): boolean; getKeyframes(): IterableIterator; getRange(): [number | undefined, number | undefined]; getKeyframeCount(): number; validate(): void; toJson(): SegmentJson; } export interface IKeyframe { frame: number; content: Json; } export declare class Keyframe implements IKeyframe { format: ContentFormat; frame: number; content: Json; constructor(format: ContentFormat, frame: number, content: Json); } interface KeyframeAnnotationJson { format: ContentFormat; data: SegmentJson[]; } interface SegmentJson { keyframes: IKeyframe[]; } export declare class KeyframeAnnotation implements IKeyframeAnnotation { private _format; private _segmentsById; constructor(_format: ContentFormat); get format(): ContentFormat; toJson(): KeyframeAnnotationJson; _toApiJson(): KeyframeAnnotationJson; createSegment(): ISegment; removeSegment(segment: ISegment): boolean; findSegment(frame: number): ISegment | undefined; validate(): void; private _hasOverlappingIntervals; } export declare class Segment implements ISegment { private _format; private _keyframes; private _id; constructor(_format: ContentFormat); get Id(): string; get _data(): Keyframe[]; getKeyframes(): IterableIterator; addKeyframe(keyframe: Keyframe): void; removeKeyframe(frame: number): boolean; getRange(): [number | undefined, number | undefined]; getKeyframeCount(): number; validate(): void; _toApiJson(): SegmentJson; toJson(): SegmentJson; } export declare const keyframeAnnotations: KeyframeAnnotations; export {};