import { AccessControlled, AccessAudience, AccessAudienceInput } from '../permissions'; export type ContainerDirection = 'row' | 'column'; export type ButtonVariant = 'primary' | 'secondary' | 'cta' | 'danger' | 'success' | 'ghost'; export type ButtonSize = 'sm' | 'md' | 'lg'; interface ActionMenuItemBase { id: string; label: string; disabled?: boolean; danger?: boolean; /** Set on every item to make the menu a single choice (`menuitemradio`); true marks the current one. */ checked?: boolean; } export type ActionMenuItem = (ActionMenuItemBase & { href?: never; target?: never; }) | (ActionMenuItemBase & { href: string; target?: '_self' | '_blank' | '_parent' | '_top'; /** Links navigate; only buttons can be single-choice items. */ checked?: never; }); export type InputType = 'text' | 'password' | 'email' | 'number' | 'search' | 'tel' | 'url'; export type ModalSize = 'sm' | 'md' | 'lg' | 'xl' | 'full'; export type ModalVariant = 'centered' | 'drawer' | 'sheet'; export type ModalLayout = 'plain' | 'tabs' | 'rail'; /** Section descriptor for BaseModal's shell-level tab strip (layout="tabs") or rail (layout="rail"). */ export interface ModalTab { id: string; label: string; /** Monospace meta on the right of the label — a count, "2 unsaved", etc. No colored badge pill. */ meta?: string; /** * Rail only — 1rem stroke icon. Accepts SVG path data (string or string[]) * or trusted inline SVG markup rendered with `v-html`. Markup must be * plugin-author-controlled — never user-supplied data. */ icon?: string | string[]; /** Rail only — second line under the label; also shown as the pane subtitle. */ description?: string; /** * Rail only — heading of the section this tab belongs to. A heading (and a * divider after the first section) renders wherever the section changes, so * keep tabs of one section adjacent. */ section?: string; disabled?: boolean; } export type AlertType = 'success' | 'error' | 'warning' | 'info'; export interface ToastAction { label: string; onClick: () => void; primary?: boolean; } export interface Toast { id: number; /** Legacy single-line body; kept as an alias of `title`. */ message: string; type: 'success' | 'error' | 'warning' | 'info'; duration?: number; title?: string; detail?: string; /** At most two; extra entries are dropped. */ actions?: ToastAction[]; /** Render the close button (default true). */ dismissible?: boolean; /** `ttl` (default) shrinks over `duration`; `indeterminate` never auto-dismisses; `none` hides the bar. */ progress?: 'ttl' | 'indeterminate' | 'none'; /** Collapsed-stack count; renders the `×N` pill when above 1. */ count?: number; } export type ToastOptions = Omit & { title: string; type?: Toast['type']; message?: string; }; export interface TabItem { id: string; label: string; icon?: string | string[]; disabled?: boolean; badge?: string | number; } export type TabItemInput = TabItem | string; export type OptionPrimitive = string | number; export interface SelectOption { value: T; label: string; disabled?: boolean; description?: string; /** Short trailing classification, count, or status. */ meta?: string; /** Explanation shown for an unavailable option. */ disabledReason?: string; } export type SelectOptionInput = SelectOption | T; export interface RadioOption { value: string | number; label: string; disabled?: boolean; description?: string; } export type RadioOptionInput = RadioOption | OptionPrimitive; export interface FormFieldProps { label?: string; error?: string; hint?: string; required?: boolean; } export type SectionCardAccent = 'primary' | 'experiment' | 'project' | 'success' | 'error' | 'warning' | 'info'; export type SectionCardDivider = 'strong' | 'light'; export type SidebarBadgeTone = 'primary' | 'cta' | 'success' | 'warning' | 'error' | 'info' | 'neutral'; export interface SidebarToolSectionAction { id: string; label: string; icon?: string | string[]; iconColor?: string; tone?: SidebarBadgeTone; disabled?: boolean; } export interface SidebarToolSection { id: string; label: string; subtitle?: string; icon?: string | string[]; iconColor?: string; iconBg?: string; badge?: string | number; badgeTone?: SidebarBadgeTone; actions?: SidebarToolSectionAction[]; defaultOpen?: boolean; showToggle?: boolean; } export interface CollapsibleState { isOpen: boolean; toggle: () => void; open: () => void; close: () => void; } export type TopBarVariant = 'card' | 'default'; export interface PillNavOption { id: string; label: string; to?: string; href?: string; description?: string; disabled?: boolean; } export type PillNavOptionInput = PillNavOption | string; export interface TopBarSettingsConfig { title?: string; tabs?: SettingsTabInput[]; showAppearance?: boolean; /** List Appearance before the other tabs and open on it. */ appearanceFirst?: boolean; size?: 'md' | 'lg' | 'xl'; layout?: SettingsModalLayout; /** Schema-driven config — when set, fields auto-render via SDK form components. */ schema?: SettingsModalSchema; /** Model returned by defineControlModel(), or a raw nested ControlModel for one-step settings generation. */ model?: import('../composables/useControlSchema').ControlModel | import('../composables/useControlSchema').ControlModelBinding; /** Compact controls model — converted to `schema` when `schema` is not set. */ controls?: import('../composables/useControlSchema').ControlSchema; /** Conversion options for `controls`, such as section labels and columns. */ controlOptions?: import('../composables/useControlSchema').ControlSchemaOptions; /** Initial values when using `schema`, `model`, or `controls`. AppTopBar emits `settings-values-change` on change. */ values?: Record; /** Dynamic enhancements (validators, dynamic options, callbacks). Forwarded to SettingsModal. */ enhancements?: import('./form-builder').FormEnhancements; /** Optional user type override for permission-filtered settings content. Defaults to SDK auth/platform context. */ userType?: SettingsUserType; } export interface PillNavItem { id: string; label: string; icon?: string | string[]; to?: string; href?: string; disabled?: boolean; /** Shows a small error-colored dot after the label (e.g. an unacknowledged critical alert). */ dot?: boolean; children?: PillNavOption[]; } export type PillNavItemInput = (Omit & { children?: PillNavOptionInput[]; }) | string; export interface PageSelectorItem { id: string; label: string; icon?: string; hint?: string; to?: string; href?: string; disabled?: boolean; } export type PageSelectorItemInput = PageSelectorItem | string; export interface AccountMenuItem { id: string; label: string; icon?: string; rightLabel?: string; to?: string; href?: string; danger?: boolean; divider?: boolean; } export type { WellPlateFormat, WellState, WellPlateSelectionMode, WellPlateSize, WellShape, Well, WellClassValue, WellClassResolver, WellStyleResolver, HeatmapColorScale, HeatmapConfig, SlotPosition, WellExtendedData, WellEditData, WellEditField, WellSampleDropData, WellSampleDropContext, WellSampleDropParser, WellLegendItem, PlateCondition, ColumnCondition, RowCondition, Rack, PlateEditorClearConfirm, SampleType, PlateMap, PlateMapEditorState, ProtocolStepType, ProtocolStepStatus, ProtocolStep, SampleGroup, GroupItem, FileUploaderMode, MoleculeData, StorageCondition, ReagentColumn, Reagent, TreeNodeType, BadgeVariant, TreeNode, } from './componentLabTypes'; export interface SegmentedOption { value: string | number; label: string; description?: string; disabled?: boolean; /** Color token for a swatch before the label, e.g. a group color `var(--mint-sample-2)`. */ color?: string; } export type SegmentedOptionInput = SegmentedOption | OptionPrimitive; /** One series in the ChartContainer header legend. */ export interface ChartLegendItem { label: string; /** Swatch color, e.g. a group token `var(--mint-sample-1)` or a resolved color. */ color: string; /** Series is toggled off (rendered dimmed, `aria-pressed="false"`). */ hidden?: boolean; } export type SegmentedControlVariant = 'simple' | 'card'; export type SegmentedControlSize = 'sm' | 'md' | 'lg'; export interface MultiSelectOption { value: string | number; label: string; disabled?: boolean; } export type MultiSelectOptionInput = MultiSelectOption | OptionPrimitive; export type MultiSelectSize = 'sm' | 'md' | 'lg'; /** Visual style variant for pill/badge components */ export type PillVariant = 'default' | 'primary' | 'success' | 'warning' | 'error' | 'info' | 'outline'; /** Semantic color modifier for pill components — combine with variant="outline" for colored outlines */ export type PillColor = 'neutral' | 'primary' | 'success' | 'warning' | 'error' | 'info'; /** Size variant for pill components */ export type PillSize = 'sm' | 'md' | 'lg'; /** Date selection behavior for calendar component */ export type CalendarSelectionMode = 'none' | 'single' | 'range' | 'multiple'; /** Visual marker displayed on a calendar date */ export interface CalendarMarker { /** Date to mark */ date: Date | string; /** Marker color (CSS color value) */ color?: string; /** Tooltip/label for the marker */ label?: string; /** Visual style of the marker */ type?: 'dot' | 'bar' | 'highlight'; /** Additional custom data */ customData?: Record; } /** Context object for a calendar day cell */ export interface CalendarDayContext { /** The date for this day */ date: Date; /** Day of month (1-31) */ dayOfMonth: number; /** True if this is today's date */ isToday: boolean; /** True if this date is currently selected */ isSelected: boolean; /** True if this date is within a selected range */ isInRange: boolean; /** True if this date cannot be selected */ isDisabled: boolean; /** True if this date is from an adjacent month */ isOutsideMonth: boolean; /** Markers configured for this date */ markers: CalendarMarker[]; } /** Sort direction (null means unsorted) */ export type SortDirection = 'asc' | 'desc' | null; /** Current sort state for a table column */ export interface SortState { /** Column key being sorted */ key: string; /** Sort direction */ direction: SortDirection; } /** Column configuration for DataFrame component */ export interface DataFrameColumn> { /** Unique column key (supports nested keys like 'user.name') */ key: string; /** Display label for column header */ label: string; /** Enable sorting for this column */ sortable?: boolean; /** Text alignment */ align?: 'left' | 'center' | 'right'; /** Fixed column width */ width?: string | number; /** Minimum column width */ minWidth?: string | number; /** Truncate overflow text with ellipsis */ ellipsis?: boolean; /** Custom formatter for cell values */ formatter?: (value: unknown, row: T, index: number) => string; /** * Unit shown after the header label in its own mono element, never case-transformed * (`'µM'`, `'mL'`, `'m/z'`). Keep it out of `label`. */ unit?: string; /** * `'number'` renders cells right-aligned in mono with tabular figures (an explicit * `align` still wins). Default `'text'`. */ type?: 'text' | 'number'; /** Decimal places for numeric cell values (`toFixed`). Ignored when `formatter` is set. */ precision?: number; } /** Pagination state for table data */ export interface PaginationState { /** Current page (1-indexed) */ page: number; /** Number of rows per page */ pageSize: number; /** Total number of rows across all pages */ total: number; } export type SpinnerSize = 'xs' | 'sm' | 'md' | 'lg'; export type SpinnerVariant = 'primary' | 'cta' | 'muted'; export type DividerSpacing = 'sm' | 'md' | 'lg'; export type StatusType = 'success' | 'warning' | 'error' | 'info' | 'muted'; export type ProgressColor = 'primary' | 'success' | 'warning' | 'error' | 'info'; export type ProgressSize = 'sm' | 'md' | 'lg'; export type AvatarSize = 'xs' | 'sm' | 'md' | 'lg' | 'xl'; export type EmptyStateColor = 'primary' | 'cta' | 'success' | 'warning' | 'error' | 'muted'; export type EmptyStateSize = 'sm' | 'md' | 'lg'; export interface BreadcrumbItem { label: string; to?: string; href?: string; } export type BreadcrumbItemInput = BreadcrumbItem | string; export type TooltipPosition = 'top' | 'bottom' | 'left' | 'right'; export type ConfirmVariant = 'danger' | 'warning' | 'info'; export interface SettingsTab extends AccessControlled { id: string; label: string; /** * Inline SVG markup rendered with `v-html` in the vertical layout's rail. * Must be trusted, plugin-author-controlled markup — never user-supplied data. */ icon?: string; /** Optional one-line hint shown under the label (vertical layout) and as a section subtitle in the right pane. */ description?: string; /** Optional monospace meta shown right of the tab label — a count, "2 unsaved", etc. */ meta?: string; /** Rail section heading for this tab when Appearance is shown; defaults to "Plugin". */ section?: string; } export type SettingsTabInput = SettingsTab | string; export type SettingsModalLayout = 'horizontal' | 'vertical'; /** * Declarative settings group — becomes both a tab and a generated form section. * Plugin authors describe their parameters once and the modal auto-renders * SDK form components (BaseInput / BaseSelect / NumberInput / Toggle / …) * via the same registry that powers FormBuilder. */ export interface SettingsGroup extends AccessControlled { id: string; label: string; description?: string; /** * Inline SVG markup rendered with `v-html` in the vertical layout's rail. * Must be trusted, plugin-author-controlled markup — never user-supplied data. */ icon?: string; /** SDK form-builder field schemas. */ fields: import('./form-builder').FormFieldSchema[]; /** Grid columns for the rendered fields (1-3). Defaults to 1. */ columns?: 1 | 2 | 3; /** Hide the entire group (rail item + content) when this evaluates false against the form data. */ condition?: import('./form-builder').FieldCondition; } export interface SettingsModalSchema { groups: SettingsGroup[]; } export type SettingsUserType = Exclude; export type SettingsAudience = AccessAudience; export type SettingsAudienceInput = AccessAudienceInput; export type { NumberNotation, UnitOption, WizardStep, WizardStepState, AuditEntryType, AuditEntry, BatchItemStatus, BatchItem, BatchSummary, TimePickerFormat, TimeSlotDisabledFn, TimeRange, ScheduleView, ScheduleEventStatus, ScheduleEvent, ScheduleBlockedSlot, ScheduleSlotContext, ScheduleEventCreateContext, ScheduleEventUpdateContext, SummarySectionItem, SummarySection, SummaryData, ResourceStatus, ResourceSpec, ExperimentStatus, DatePreset, ExperimentSortField, ExperimentTypeOption, ExperimentSummary, ExperimentListResponse, ExperimentFilters, FitState, FitResultSummary, FitSeries, FitColumnLabels, } from './componentWorkflowTypes';