@labelu/image-annotator-react
Version:
image annotator for react
22 lines • 781 B
TypeScript
/// <reference types="react" />
import type { ToolName, AnnotationData } from '@labelu/image';
import type { GlobalAnnotationPayload } from './annotation.context';
export interface ImageSample {
id: string | number;
name?: string;
url: string;
meta?: {
width: number;
height: number;
rotate: number;
};
data: Partial<GlobalAnnotationPayload> & Partial<Record<ToolName, AnnotationData[]>>;
}
export interface SampleContextType {
currentSample: ImageSample | undefined;
samples: ImageSample[];
onSampleSelect: (sample: ImageSample) => void;
}
export declare const SampleContext: import("react").Context<SampleContextType>;
export declare function useSample(): SampleContextType;
//# sourceMappingURL=sample.context.d.ts.map