musealpha / uiprototype2 /src /types.ts
asdf98's picture
Upload 112 files
3d7d9b5 verified
export interface RefImage {
id: string;
url: string;
x: number;
y: number;
width: number;
height: number;
aspectRatio: number;
isDesaturated?: boolean;
isFlippedH?: boolean;
isFlippedV?: boolean;
groupId?: string;
crop?: { left: number; right: number; top: number; bottom: number; };
}
export interface TextNote {
id: string;
text: string;
x: number;
y: number;
width: number;
height?: number;
color?: string;
bgColor?: string;
fontSize?: number;
fontFamily?: string;
alignment?: 'left' | 'center' | 'right';
isBold?: boolean;
isItalic?: boolean;
isUnderline?: boolean;
groupId?: string;
}
export type ContextMenuState = {
x: number;
y: number;
imageId: string | null;
} | null;
export interface Point {
x: number;
y: number;
}
export interface Palette {
imageId: string;
colors: string[];
x: number;
y: number;
}
export interface AnnotationPath {
id: string;
points: Point[];
color: string;
strokeWidth: number;
groupId?: string;
isHighlighter?: boolean;
}