// Well Plate types 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 } // Slot position for rack color coding export type SlotPosition = 'R' | 'G' | 'B' | 'Y' // Extended well data stored in Well.metadata export interface WellExtendedData { label?: string injectionVolume?: number injectionCount?: number customMethod?: string | null } // Data emitted when editing a well export interface WellEditData { wellId: string label: string sampleType: string injectionVolume: number injectionCount: number customMethod: string } // Fields shown in the edit popup export type WellEditField = 'label' | 'sampleType' | 'injectionVolume' | 'injectionCount' | 'customMethod' // External sample drop payloads for WellPlate / PlateEditor 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 // Legend item for sample type display export interface WellLegendItem { type: string label: string color: string } // Condition headers for dose-response / drug treatment plates 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[] } // Rack for PlateEditor 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' } // Sample Legend types export interface SampleType { id: string name: string color?: string count?: number description?: string } // Plate Map Editor types export interface PlateMap { id: string name: string format: WellPlateFormat wells: Record } export interface PlateMapEditorState { plates: PlateMap[] activePlateId: string samples: SampleType[] selectedWells: string[] activeSampleId?: string } // Experiment Timeline types 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 } // Sample Selector types export interface SampleGroup { name: string color: string samples: string[] } // Group Assigner types export interface GroupItem { name: string color: string count: number } // FileUploader types export type FileUploaderMode = 'file' | 'folder' // MoleculeInput types export interface MoleculeData { smiles: string molfile: string } // ReagentList types 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 } // SampleHierarchyTree types 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 }