export type WellPlateFormat = 6 | 12 | 24 | 48 | 54 | 96 | 384; export type WellState = 'empty' | 'filled' | 'selected' | 'disabled'; export type WellPlateSelectionMode = 'none' | 'single' | 'multiple' | 'rectangle' | 'drag'; export type WellPlateSize = 'xs' | 'sm' | 'md' | 'lg' | 'xl' | 'fill'; export type WellShape = 'circle' | 'rounded'; export interface Well { id: string; row: number; col: number; state: WellState; sampleType?: string; /** Group id (PlateEditor `groups`); colors the well, while `sampleType` sets its marker shape. */ group?: string; value?: number; metadata?: Record; } export type WellClassValue = string | string[] | Record; export type WellClassResolver = (well: Well) => WellClassValue | undefined; export type WellStyleResolver = (well: Well) => Record | undefined; export type HeatmapColorScale = 'viridis' | 'plasma' | 'turbo' | 'custom'; export interface HeatmapConfig { enabled: boolean; min?: number; max?: number; colorScale?: HeatmapColorScale; customColors?: string[]; showLegend?: boolean; } export type SlotPosition = 'R' | 'G' | 'B' | 'Y'; export interface WellExtendedData { label?: string; injectionVolume?: number; injectionCount?: number; customMethod?: string | null; } export interface WellEditData { wellId: string; label: string; sampleType: string; injectionVolume: number; injectionCount: number; customMethod: string; } export type WellEditField = 'label' | 'sampleType' | 'injectionVolume' | 'injectionCount' | 'customMethod'; export interface WellSampleDropData { id?: string; sampleName?: string; label?: string; sampleType?: string; injectionVolume?: number; injectionCount?: number; customMethod?: string | null; metadata?: Record; raw?: unknown; } export interface WellSampleDropContext { wellId: string; event: DragEvent; } export type WellSampleDropParser = (event: DragEvent, context: WellSampleDropContext) => WellSampleDropData | null | undefined; export interface WellLegendItem { type: string; label: string; color: string; } export interface PlateCondition { label: string; color: string; concentrations: number[]; unit?: string; } export interface ColumnCondition extends PlateCondition { cols: number[]; } export interface RowCondition extends PlateCondition { rows: string[]; } export interface Rack { id: string; name: string; format: WellPlateFormat; slot: SlotPosition; injectionVolume: number; wells: Record>; } /** PlateEditor `clearConfirm`: text and variant of the Clear confirmation; unset fields keep the defaults. */ export interface PlateEditorClearConfirm { title?: string; message?: string; confirmLabel?: string; variant?: 'danger' | 'warning' | 'info'; } export interface SampleType { id: string; name: string; color?: string; count?: number; description?: string; } export interface PlateMap { id: string; name: string; format: WellPlateFormat; wells: Record; } export interface PlateMapEditorState { plates: PlateMap[]; activePlateId: string; samples: SampleType[]; selectedWells: string[]; activeSampleId?: string; } export type ProtocolStepType = 'incubation' | 'wash' | 'addition' | 'measurement' | 'transfer' | 'centrifuge' | 'mix' | 'custom'; export type ProtocolStepStatus = 'pending' | 'in_progress' | 'completed' | 'failed' | 'skipped'; export interface ProtocolStep { id: string; type: ProtocolStepType; name: string; description?: string; duration?: number; status: ProtocolStepStatus; parameters?: Record; order: number; /** * Percent complete, 0–100. ExperimentTimeline shows it as a 2px bar and a * mono percent on the `in_progress` step only; out-of-range values clamp. */ progress?: number; } export interface SampleGroup { name: string; color: string; samples: string[]; } export interface GroupItem { name: string; color: string; count: number; } export type FileUploaderMode = 'file' | 'folder'; export interface MoleculeData { smiles: string; molfile: string; } export type StorageCondition = 'RT' | '4C' | '-20C' | '-80C'; export type ReagentColumn = 'name' | 'catalog' | 'lot' | 'expiry' | 'storage' | 'location' | 'stock' | 'supplier'; export interface Reagent { id: string; name: string; catalogNumber?: string; lotNumber?: string; expiryDate?: Date | string; storageCondition?: StorageCondition; location?: string; stockLevel?: number; stockUnit?: string; supplier?: string; url?: string; } export type TreeNodeType = 'study' | 'experiment' | 'plate' | 'sample' | 'cell_line' | 'passage' | 'clone' | 'treatment' | 'folder' | 'custom'; export type BadgeVariant = 'default' | 'success' | 'warning' | 'error'; export interface TreeNode { id: string; label: string; type?: TreeNodeType; icon?: string; children?: TreeNode[]; metadata?: Record; badge?: string | number; badgeVariant?: BadgeVariant; }