richuj's picture
feat: initial project structure and UI components
e008c35
Raw History Blame Contribute Delete
1.28 kB
export type MaskKind = string;
export type SurfaceType =
| "wall"
| "floor"
| "ceiling"
| "countertop"
| "cabinet"
| "door"
| "wardrobe"
| "backsplash"
| "vanity"
| "island"
| "window"
| "shelf"
| "mirror"
| "rug"
| "lamp"
| "drawer"
| "light"
| "painting"
| "poster";
export type MaskOption = {
id: MaskKind;
label: string;
color: string;
icon: string;
};
export type TileTexture = {
id: string;
name: string;
src: string;
groutColor: string;
category?: string;
sku?: string;
size?: string;
finish?: string;
applicableSurfaces?: SurfaceType[];
};
export type VisualizerControls = {
scale: number;
groutSpacing: number;
opacity: number;
rotation: number;
};
export type SurfaceRenderMode = "auto" | "manual";
export type SegmentResponse = {
masks: Record<MaskKind, string>;
centroids?: Record<MaskKind, [number, number]>;
surface_types?: Record<string, SurfaceType>;
source: "sam" | "segformer" | "fallback";
width: number;
height: number;
diagnostics?: string[];
};
export type SurfaceInfo = {
key: string;
type: SurfaceType;
label: string;
centroid: [number, number];
};
export type DetectionStatus =
| "idle"
| "uploading"
| "detecting"
| "complete"
| "error";