Devkit general
General TypeScript types from react-devkit
General type definitions from the react-devkit package.
Package
@tetherto/mdk-react-devkit
Types
@tetherto/mdk-react-devkit
Import the public APIs on this page from @tetherto/mdk-react-devkit.
ActionButtonProps
type ActionButtonProps = { /** Button label text */ label?: string /** Shows a spinner on the trigger button */ loading?: boolean /** Disables the trigger button */ disabled?: boolean /** Additional class for the trigger button */ className?: string /** * Visual s…ActualEbitdaCardProps
type ActualEbitdaCardProps = { value: number }AddSparePartModalProps
Props for AddSparePartModal; option lists and handlers are supplied by the caller
type AddSparePartModalProps = { /** Whether the modal is open */ isOpen: boolean /** Called when the modal requests to close */ onClose: VoidFunction /** Part-type tabs */ partTypes: SparePartSubTypesModalPartType[] /** Initially selected part type */ defaultPartTypeId…AddUserModalProps
type AddUserModalProps = { /** Controls whether the dialog is visible */ open: boolean /** Called when the user dismisses the modal (cancel or backdrop) */ onClose: VoidFunction /** List of assignable roles rendered in the role select drop-down */ roles: RoleOptio…AlarmsBellButtonProps
type AlarmsBellButtonProps = { /** * Severity-bucketed alarm counts rendered in the stacked badge. * @default {} */ counts?: AlarmsBellButtonCounts /** Click handler — typically opens an alerts panel or routes to /alerts. */ onClick?: (event: MouseEvent<HTMLButtonElem…AlertConfirmationModalProps
type AlertConfirmationModalProps = { /** Controls dialog visibility */ isOpen: boolean /** Called when the user confirms the action */ onOk: VoidFunction }AlertsProps
type AlertsProps = { /** * Devices powering the "Current Alerts" table — a flat list of rows that carry * `last.alerts`. Any backend that can produce that shape works; there is no * response envelope to reproduce. */ devices?: Device[] /** * Loading flag for…AlertsTableTitleProps
type AlertsTableTitleProps = { /** Section heading */ title: ReactNode /** Optional subtitle or count badge */ subtitle?: ReactNode /** Additional CSS class */ className?: string }AppHeaderProps
type AppHeaderProps = { /** Left-most slot — typically the app's brand lockup / logo. */ logo?: ReactNode /** Left-edge content — e.g. a sidebar collapse toggle or brand wordmark. */ start?: ReactNode /** Middle slot — e.g. the dashboard stats strip or page tit…AreaChartProps
type AreaChartProps = { /** Chart data - required, provided by parent */ data: ChartJS<'line'>['data'] /** Chart.js options - merged with defaults */ options?: ChartJS<'line'>['options'] /** Custom HTML tooltip configuration. When provided, replaces the default…ArrowIconProps
type ArrowIconProps = { isOpen?: boolean } & IconPropsAssignPoolModalProps
type AssignPoolModalProps = { /** Controls modal visibility */ isOpen: boolean /** Called when the modal is dismissed (× button or backdrop) */ onClose: () => void /** Called with the selected pool when the form is submitted */ onSubmit: (values: { pool: PoolSummary…AverageDowntimeChartProps
type AverageDowntimeChartProps = Partial<{ /** * Chart title (unit renders on its own line below) * @default "Monthly Average Downtime" */ title: string /** * Unit subtitle under the title * @default % */ unit: string /** * Chart height in pixels * @default 280 */ height:…AvgAllInCostChartProps
type AvgAllInCostChartProps = { data?: ReadonlyArray<AvgAllInCostDataPoint> dateRange: FinancialDateRange | null isLoading?: boolean }BadgeProps
type BadgeProps = { /** * Badge content (wraps children with badge) */ children?: ReactNode /** * Number to display in badge * If > overflowCount, will show "overflowCount+" * @default 0 */ count?: number /** * Maximum count to display * @default 99 */ over…BarChartProps
type BarChartProps = { /** Chart data - required, provided by parent. Use `as any` for mixed bar+line datasets. */ data: any /** Chart.js options - merged with defaults */ options?: ChartJS<'bar'>['options'] /** * Stack bars on top of each other * @default fal…BatchMoveSparePartsModalProps
Props for BatchMoveSparePartsModal; unselected location/status arrive as null on submit
type BatchMoveSparePartsModalProps = { /** Whether the modal is open */ isOpen: boolean /** Called when the modal requests to close */ onClose: VoidFunction /** The parts to move, rendered in the table */ spareParts: BatchMoveSparePart[] /** New-location options */ locationOp…BitcoinPriceCardProps
type BitcoinPriceCardProps = { value: number }BitcoinProducedCardProps
type BitcoinProducedCardProps = { value: number }BitcoinProducedChartProps
type BitcoinProducedChartProps = { chartData: BarChartDataResult isLoading?: boolean hasAllZeros?: boolean height?: number }BitcoinProductionCostCardProps
type BitcoinProductionCostCardProps = { value: number }BitMainControlsTabProps
type BitMainControlsTabProps = { /** Device data */ data: Device }BitMainHydroSettingsProps
type BitMainHydroSettingsProps = { /** Device data */ data?: Device }BitMainImmersionSummaryBoxProps
type BitMainImmersionSummaryBoxProps = { /** Live device object from the devices store. Returns `null` when omitted. */ data?: Device /** * Optional threshold configuration that drives colour/flash states on temperature stats * @default null */ containerSettings?: BitMainImmers…BreadcrumbsProps
type BreadcrumbsProps = { /** Ordered trail; the last item is rendered as current */ items: BreadcrumbItem[] /** * Show a leading "Back" button * @default false */ showBack?: boolean /** * Label for the back button * @default "Back" */ backLabel?: string /** Root…BtcAveragePriceProps
type BtcAveragePriceProps = Partial<{ /** * BTC price in USD; formatted with grouping and no decimal places. * When `null`, `undefined`, non-finite, or negative, the value shows `-` (`FALLBACK` from format utils). */ price: number | null /** * Label for the BTC avera…BulkAddSparePartsModalProps
Props for BulkAddSparePartsModal; onSubmit receives the parsed CSV records
type BulkAddSparePartsModalProps = { /** Whether the modal is open */ isOpen: boolean /** Called when the modal requests to close */ onClose: VoidFunction /** Submit handler; return `{ error }` to show an inline error */ onSubmit: (records: CSVRecord[]) => Promise<{ error?:…ButtonProps
Props for Button. Extends all native <button> attributes
type ButtonProps = Partial< { /** * Show a spinner instead of the content and disable the button. * @default false */ loading: boolean /** * Make the button stretch to fill its container. * @default false */ fullWidth: boolean /** Icon node rendered alongsid…CabinetDetailCardProps
type CabinetDetailCardProps = { /** Cabinet display title (`LV Cabinet 1` / transformer title). */ title: string /** Non-root powermeter reading rows. */ powerMeters: CabinetReadingRow[] /** The cabinet-root temperature reading, when present. */ rootTempSensor?: Cabine…CardBodyProps
Props for CardBody slot. Forwards all native <div> attributes
type CardBodyProps = HTMLAttributes<HTMLDivElement>CardFooterProps
Props for CardFooter slot. Forwards all native <div> attributes
type CardFooterProps = HTMLAttributes<HTMLDivElement>CardHeaderProps
Props for CardHeader slot. Forwards all native <div> attributes
type CardHeaderProps = HTMLAttributes<HTMLDivElement>CascaderProps
Cascader component props
type CascaderProps = { /** * Hierarchical options to display in the cascader * Parent options with children appear in the left panel * Child options appear in the right panel when parent is selected */ options: CascaderOption[] /** * Current selected value(s)…ChangeConfirmationModalProps
type ChangeConfirmationModalProps = { /** Controls whether the dialog is visible */ open: boolean /** Dialog header title */ title: string /** Called when the user clicks the confirm button */ onConfirm: VoidFunction /** Called when the user cancels or dismisses the dialog *…ChartContainerProps
type ChartContainerProps = { /** Chart heading (renders as `<h3>` unless `header` is provided) */ title?: string /** * Optional node rendered immediately after the title text (e.g. an info * tooltip). Only shown when `title` is set and `header` is not. Additive - *…ChartExpandActionProps
type ChartExpandActionProps = { /** Whether the parent chart is currently expanded to full width. */ isExpanded: boolean /** Toggles the expanded state. */ onToggle?: VoidFunction }ChartStatsFooterProps
type ChartStatsFooterProps = Partial<{ /** Min/Max/Avg values row */ minMaxAvg: MinMaxAvgValues /** Additional stats displayed in a columnar grid */ stats: ChartStatsFooterItem[] /** * Number of stat items per column (default: 1) * @default 1 */ statsPerColumn: number…CheckboxProps
type CheckboxProps = { // Key controlled-state props re-declared from the Radix root so they surface in // the generated docs (types reuse Radix's via indexed access — cannot drift). /** Controlled checked state */ checked?: CheckboxRootProps['checked'] /** Un…ConfirmDeleteSparePartModalProps
Props for ConfirmDeleteSparePartModal
type ConfirmDeleteSparePartModalProps = { /** Whether the modal is open */ isOpen?: boolean /** Called when the modal requests to close */ onClose?: VoidFunction /** Called with the part when the user confirms */ onConfirm?: (sparePart: ConfirmDeleteSparePartModalSparePart) => P…ContainerChartsProps
type ContainerChartsProps = { /** When false, shows an empty state (feature gate). @default true */ featureEnabled?: boolean /** * Message when `featureEnabled` is false * @default 'Container Charts feature is not enabled' */ disabledMessage?: string /** Options for…ContainerControlsBoxProps
type ContainerControlsBoxProps = { /** The container device object */ data?: Device /** * When `true`, operates on `selectedDevices` instead of a single `data` record * @default false */ isBatch?: boolean isCompact?: boolean // --- data from outside (no API calls inside)…ContainerDetailProps
type ContainerDetailProps = { /** * Container display name shown in the header. Optional — omit it when the * host already renders the container name as the page title (e.g. the shell's * `PageLayout`), so the name is not shown twice. */ name?: ReactNode /** Ordered…ContainerWidgetCardProps
type ContainerWidgetCardProps = { /** Container display name shown in the header row. */ title: string /** Latest container power draw in watts (rendered in kW by the top row). */ power?: number /** Power unit label shown next to the reading. */ powerUnit?: string /** Pe…ContainerWidgetsProps
type ContainerWidgetsProps = { /** Card-ready data for every container, shaped by the data hook. */ containers: ContainerWidgetItem[] /** Section heading. */ title?: string /** * Shows a spinner while the first load is in flight. * @default false */ isLoading?: boolea…CostChartsProps
type CostChartsProps = { costLog: ReadonlyArray<CostTimeSeriesEntry> btcPriceLog: ReadonlyArray<BtcPriceTimeSeriesEntry> totals: CostSummaryMonetaryTotals | null dateRange: FinancialDateRange | null avgAllInCostData?: ReadonlyArray<AvgAllInCostDataPoint> isLoadi…CostContentProps
type CostContentProps = CostViewModelProps & CostQueryStateProps & { /** Active date range; drives x-axis labels across all charts */ dateRange: FinancialDateRange | null /** Optional revenue/cost time-series for the Avg All-in Cost panel. */ avgAllInCostData?: R…CostMetricsProps
type CostMetricsProps = { metrics: CostSummaryDisplayMetrics }CostProps
type CostProps = CostContentProps & CostChromePropsCurrentAlertsProps
type CurrentAlertsProps = { /** * Devices carrying alerts (`last.alerts`), as a flat list. Unwrapping any * backend envelope is the data layer's job, not this component's. * Shape mirrors the API response from the source app. */ devices?: Device[] /** * Show DataTa…DashboardDateRangePickerProps
type DashboardDateRangePickerProps = { /** Current range as `{ start, end }` epoch-millisecond timestamps. */ value: DashboardDateRange /** Fires with the next `{ start, end }` window when the user applies a range. */ onChange: (next: DashboardDateRange) => void /** * Display…DataLabelProps
type DataLabelProps = Partial<{ /** * Range start; formatted in the active timezone (`dd/MM/yy`). */ startDate: Date | null /** * Range end; formatted in the active timezone (`dd/MM/yy`). */ endDate: Date | null /** * Label text; defaults to `PERIOD`. * @defaul…DataTableProps
type DataTableProps = { /** * The data to be shown in the table. See https://tanstack.com/table/v8/docs/guide/data */ data: I[] /** * The column configuration table. See https://tanstack.com/table/v8/docs/guide/column-defs */ columns: DataTableColumnDef<I, any>…DatePickerProps
type DatePickerProps = { /** * Currently selected date */ selected?: Date /** * Callback when date changes */ onSelect?: (date: Date | undefined) => void /** * Placeholder text when no date is selected * @default "Pick a date" */ placeholder?: string /** * Date…DateRangePickerProps
type DateRangePickerProps = { /** * Selected date range */ selected?: DateRange /** * Callback when date range changes */ onSelect?: (range: DateRange | undefined) => void /** * Placeholder text when no range is selected * @default "Pick a date range" */ placeholder?…DetailLegendProps
type DetailLegendProps = { /** Legend items to display */ items: DetailLegendItem[] /** Callback when a legend item is toggled */ onToggle?: (label: string, index: number) => void /** Custom class name */ className?: string }DeviceExplorerProps
type DeviceExplorerProps = { /** Active device-type tab */ deviceType: DeviceExplorerDeviceType /** Additional class names */ className?: string /** Controlled row-selection state */ selectedDevices?: DataTableRowSelectionState /** Setter for row selection */ onSele…DialogContentProps
type DialogContentProps = { /** Renders `DialogTitle` (and optional `DialogDescription`) inside the header */ title?: string /** Renders `DialogDescription` below the title */ description?: string /** * Whether clicking the overlay closes the dialog * @default true…DialogHeaderProps
type DialogHeaderProps = { /** * Applies `mdk-dialog__header--bare` to the header * @default false */ bare?: boolean /** Shows an ✕ close button in the header */ closable?: boolean /** Fired when the ✕ button is clicked */ onClose?: VoidFunction }DividerProps
type DividerProps = { /** * Line orientation * @default 'horizontal' */ orientation?: DividerOrientation /** * Line style * @default false */ dashed?: boolean /** * Renders a dotted line (takes precedence over `dashed`) * @default false */ dotted?: boolean /*…DoughnutChartProps
type DoughnutChartProps = { /** Array of labelled slices */ data: DoughnutChartDataset[] /** * Unit suffix appended to values in tooltips and legends * @default '' */ unit?: string /** Chart.js options – merged with defaults */ options?: ChartJS<'doughnut'>['option…EbitdaChartsProps
type EbitdaChartsProps = { showEbitdaBarChart: boolean ebitdaChartData: BarChartDataResult btcDisplayData: BarChartDataResult isLoading: boolean hasBtcProducedAllZeros: boolean }EbitdaHodlCardProps
type EbitdaHodlCardProps = { value: number currentBTCPrice: number }EbitdaMetricsProps
type EbitdaMetricsProps = { metrics: EbitdaDisplayMetrics currentBTCPrice: number }EbitdaProps
type EbitdaProps = { /** Computed EBITDA metrics */ metrics: EbitdaDisplayMetrics | null /** Data for the EBITDA bar chart */ ebitdaChartInput: ToBarChartDataInput | null /** Data for the BTC produced chart */ btcProducedChartInput: ToBarChartDataInput | nul…EbitdaSellingCardProps
type EbitdaSellingCardProps = { value: number }EfficiencyMinerTypeViewProps
type EfficiencyMinerTypeViewProps = Omit<EfficiencyBarViewProps, 'title'>EfficiencyMinerUnitViewProps
type EfficiencyMinerUnitViewProps = Omit<EfficiencyBarViewProps, 'title'>EfficiencySiteViewProps
type EfficiencySiteViewProps = { /** * Efficiency log entries * @default [] */ log?: MetricsEfficiencyLogEntry[] /** * Average efficiency value * @default null */ avgEfficiency?: number | null /** * Nominal target efficiency * @default null */ nominalValue?: number | nu…EmptyStateProps
type EmptyStateProps = { /** * Description text or ReactNode displayed below the image */ description: ReactNode /** * Image to display. Use "default" for the standard illustration, * "simple" for a minimal icon, or pass a custom ReactNode. * @default "default"…EnabledDisableToggleProps
type EnabledDisableToggleProps = { /** Current state. A boolean drives a switch display; non-boolean shows action buttons. */ value: unknown /** Tank identifier used in the label (`Tank {N} Circulation`). Pass an empty string for the air exhaust label. */ tankNumber: numb…EnergyBalanceCostChartsProps
type EnergyBalanceCostChartsProps = { costChartData: BarChartDataResult btcUnit: EnergyCostChartInput['btcUnit'] powerChartInput: ThresholdLineChartInput displayMode: DisplayMode barLabelFormatter: (v: number) => string onDisplayModeChange: (mode: DisplayMode) => void /** Sh…EnergyBalanceCostMetricsProps
type EnergyBalanceCostMetricsProps = { metrics: EnergyCostMetrics }EnergyBalancePowerChartProps
type EnergyBalancePowerChartProps = { /** * Chart height when `fillHeight` is false * @default 280 */ height?: number /** * Stretch the panel and chart to fill a mosaic cell (uses height `320` and `mdk-energy-balance__panel--fill`). Used on the revenue tab power column in `E…EnergyBalanceProps
type EnergyBalanceProps = { /** All display state: chart inputs, metrics, active tab, display modes, loading/error flags. Returned directly by `useEnergyBalanceViewModel`. */ viewModel: EnergyBalanceViewModel /** Called when the user switches between Revenue and Co…EnergyBalanceRevenueChartsProps
type EnergyBalanceRevenueChartsProps = { revenueChartData: BarChartDataResult averageDowntimeData: AverageDowntimeChartData powerChartInput: ThresholdLineChartInput displayMode: DisplayMode barLabelFormatter: (v: number) => string onDisplayModeChange: (mode: DisplayMode) => voi…EnergyBalanceRevenueMetricsProps
type EnergyBalanceRevenueMetricsProps = { metrics: EnergyRevenueMetrics }EnergyCostChartProps
type EnergyCostChartProps = { chartData: BarChartDataResult btcUnit: EnergyCostChartInput['btcUnit'] displayMode: DisplayMode barLabelFormatter: (v: number) => string onDisplayModeChange: (mode: DisplayMode) => void height?: number }EnergyMetricCardProps
type EnergyMetricCardProps = { /** Metric label shown on the card */ name: string /** Metric value, formatted via `formatNumber` */ value: number /** Unit suffix shown next to the value */ unit: string /** Text shown when `value` can't be formatted */ fallback?: strin…EnergyReportMinerTypeViewProps
type EnergyReportMinerTypeViewProps = EnergyReportGroupedBarViewPropsEnergyReportMinerUnitViewProps
type EnergyReportMinerUnitViewProps = EnergyReportGroupedBarViewPropsEnergyReportProps
type EnergyReportProps = { defaultTab?: EnergyReportTabValue siteView?: Omit<EnergyReportSiteViewProps, 'dateRange'> & { dateRange?: EnergyReportDateRange } minerTypeView?: EnergyReportMinerTypeViewProps minerUnitView?: EnergyReportMinerUnitViewProps className?: s…EnergyReportSiteViewProps
type EnergyReportSiteViewProps = Omit<UseEnergyReportSiteInput, 'dateRange'> & { snapshotLoading?: boolean onRefetchSnapshot?: VoidFunction dateRange: EnergyReportDateRange onDateRangeChange?: (range: EnergyReportDateRange) => void }EnergyRevenueChartProps
type EnergyRevenueChartProps = { chartData: BarChartDataResult displayMode: DisplayMode barLabelFormatter: (v: number) => string onDisplayModeChange: (mode: DisplayMode) => void height?: number }ErrorCardProps
type ErrorCardProps = { /** * Error message string. Supports `\n` for line breaks. */ error: string /** * Title displayed above the error message * @default "Errors" */ title?: string /** * Display variant. "card" shows a bordered container, "inline" shows flat…ExplorerDetailProps
type ExplorerDetailProps = { /** The active Explorer tab — selects which per-type panel renders. */ deviceType: DeviceExplorerDeviceType /** * Router navigate used by alarm rows to deep-link into `/alerts/:id`. * @default no-op */ onNavigate?: (path: string) => void…ExplorerLayoutProps
type ExplorerLayoutProps = { /** Page heading; nothing renders when omitted */ title?: string /** Optional header controls (export button, etc.) shown next to the title. */ headerActions?: ReactNode /** The list column — typically a tab switch plus the device/contai…ExportButtonProps
type ExportButtonProps = { /** Fires with the chosen format when the user picks an item. */ onExport: (format: ExportFormat) => void /** * Formats to offer in the dropdown — defaults to `['csv', 'json']`. * @default ['csv', 'json'] */ formats?: readonly ExportForm…FeatureFlagsSettingsProps
type FeatureFlagsSettingsProps = { /** Current flag values keyed by flag name */ featureFlags: Record<string, boolean> /** Whether editing is permitted */ isEditingEnabled: boolean /** * Show loading state * @default false */ isLoading?: boolean /** * Show saving spinner…FormCascaderProps
type FormCascaderProps = BaseFormFieldProps<TFieldValues, TName> & { options: CascaderOption[] multiple?: boolean cascaderProps?: Omit< React.ComponentProps<typeof Cascader>, 'value' | 'onChange' | 'options' | 'placeholder' > }FormCheckboxProps
type FormCheckboxProps = BaseFormFieldProps<TFieldValues, TName> & { checkboxProps?: React.ComponentProps<typeof Checkbox> layout?: 'row' | 'column' }FormDatePickerProps
type FormDatePickerProps = BaseFormFieldProps<TFieldValues, TName> & { datePickerProps?: Omit<React.ComponentProps<typeof DatePicker>, 'selected' | 'onSelect'> }FormInputProps
type FormInputProps = BaseFormFieldProps<TFieldValues, TName> & { type?: React.ComponentProps<typeof Input>['type'] variant?: React.ComponentProps<typeof Input>['variant'] inputProps?: Omit<React.ComponentProps<typeof Input>, 'type' | 'variant'> }FormProps
Form wrapper that provides react-hook-form context to child components
type FormProps = Omit< ComponentProps<'form'>, 'children' > & { form: UseFormReturn<TFieldValues> children: ReactNode }FormRadioGroupProps
type FormRadioGroupProps = BaseFormFieldProps<TFieldValues, TName> & { options: FormRadioOption[] orientation?: 'horizontal' | 'vertical' radioGroupProps?: Omit< React.ComponentProps<typeof RadioGroup>, 'onValueChange' | 'defaultValue' | 'orientation' > }FormSelectProps
type FormSelectProps = BaseFormFieldProps<TFieldValues, TName> & { options: FormSelectOption[] selectProps?: Omit<React.ComponentProps<typeof Select>, 'onValueChange' | 'defaultValue'> }FormSwitchProps
type FormSwitchProps = BaseFormFieldProps<TFieldValues, TName> & { switchProps?: Omit<React.ComponentProps<typeof Switch>, 'checked' | 'onCheckedChange'> layout?: 'row' | 'column' }FormTagInputProps
type FormTagInputProps = BaseFormFieldProps<TFieldValues, TName> & { options?: TagInputOption[] allowCustomTags?: boolean variant?: 'default' | 'search' tagInputProps?: Omit< React.ComponentProps<typeof TagInput>, 'value' | 'onTagsChange' | 'label' | 'placeholder'…FormTextAreaProps
type FormTextAreaProps = BaseFormFieldProps<TFieldValues, TName> & { textAreaProps?: React.ComponentProps<typeof TextArea> }GaugeChartProps
type GaugeChartProps = { /** Value between 0 and 1 (e.g. 0.75 = 75%). Values outside the range are clamped. */ percent: number /** * Arc colours in HEX format. * @default [COLOR.GREEN, COLOR.RED] */ colors?: string[] /** * Arc thickness as a fraction of the gaug…HashBalanceCostPanelProps
type HashBalanceCostPanelProps = HashBalancePanelPropsHashBalanceProps
type HashBalanceProps = Partial<{ /** * Show error state * @default false */ isError: boolean /** * Show loading state * @default false */ isLoading: boolean /** * Error copy when `isError` * @default 'Error loading hash balance data. Please try again later.' */…HashBalanceRevenuePanelProps
type HashBalanceRevenuePanelProps = HashBalancePanelProps & { /** `USD` or `BTC` label for per-PH/day units */ currency: HashBalanceCurrency /** Currency toggle handler */ onCurrencyChange: (currency: HashBalanceCurrency) => void }HashrateMinerTypeViewProps
type HashrateMinerTypeViewProps = { /** * Hashrate log grouped by miner type (groupBy=miner). * @default [] */ log?: HashrateGroupedLog /** * Drives the chart spinner * @default false */ isLoading?: boolean /** Selected date range */ dateRange?: HashrateDateRange /** Fires…HashrateMiningUnitViewProps
type HashrateMiningUnitViewProps = { /** * Hashrate log grouped by container / mining unit (groupBy=container). * @default [] */ log?: HashrateGroupedLog /** * Drives the chart spinner * @default false */ isLoading?: boolean /** Selected date range */ dateRange?: HashrateDa…HashrateProps
type HashrateProps = { /** * Tab selected on first render. Defaults to the Site View. * @default "site-view" */ defaultTab?: HashrateTabValue /** Props forwarded to the Site View tab. */ siteView?: HashrateSiteViewProps /** Props forwarded to the Miner Type Vi…HashrateSiteViewProps
type HashrateSiteViewProps = { /** * Hashrate log grouped by miner type. * @default [] */ log?: HashrateGroupedLog /** * Loading state - drives the chart spinner. * @default false */ isLoading?: boolean /** Selected date range used by the host to drive the query. */ d…HeaderConsumptionBoxProps
type HeaderConsumptionBoxProps = { /** Icon shown next to the stat */ icon?: ReactNode /** Current site-level power consumption, in megawatts. */ valueMw?: number /** * Unit label — defaults to `MW`. * @default MW */ unit?: string /** Additional class names */ className?:…HeaderControlsSettingsProps
type HeaderControlsSettingsProps = { /** Current header preference values */ preferences: HeaderPreferences /** * Show loading state * @default false */ isLoading?: boolean /** Called when a preference toggle changes */ onToggle: (key: keyof HeaderPreferences, value: boolea…HeaderEfficiencyBoxProps
type HeaderEfficiencyBoxProps = { /** Icon shown next to the stat */ icon?: ReactNode /** Efficiency in watts per TH/s. */ valueWthS?: number /** * Unit label — defaults to `W/TH/S`. * @default W/TH/S */ unit?: string /** Additional class names */ className?: string }HeaderHashrateBoxProps
type HeaderHashrateBoxProps = { /** Icon shown next to the stat */ icon?: ReactNode /** App-side aggregate hashrate in PH/s. */ appPhs?: number /** Pool-side aggregate hashrate in PH/s. */ poolPhs?: number /** * Hashrate unit label — defaults to `PH/s`. * @default PH/s…HeaderMinersBoxProps
type HeaderMinersBoxProps = { /** Icon shown next to the "Miners" label. Caller-provided so the package stays icon-agnostic. */ icon?: ReactNode /** Total miners across the site (denominator of the `158 / 2,188` ratio). */ total?: number /** Online miners (the `158`…HeaderStatsBarProps
type HeaderStatsBarProps = { /** Stat boxes to render in order, left-to-right. */ children: ReactNode /** Optional class hook. */ className?: string }HeatmapLegendProps
type HeatmapLegendProps = { /** Value (or pre-formatted label) at the low end of the scale. */ min: number | string /** Value (or pre-formatted label) at the high end of the scale. */ max: number | string /** Unit suffix appended to `min`/`max`. */ unit?: string /*…HeatmapProps
type HeatmapProps = { /** Rows of cells (row-major). Rows may be ragged. */ data: HeatmapCell[][] /** * Range floor (maps to the first gradient stop); auto-derived from the finite values when omitted. * @default auto */ min?: number /** * Range ceiling (maps…HistoricalAlertsProps
type HistoricalAlertsProps = { /** * Pre-fetched historical alerts log entries (each with a `thing` device payload). * @default [] */ alerts?: Alert[] /** * Show DataTable loading overlay * @default false */ isLoading?: boolean /** * Filters and search tags coming fro…ImportExportSettingsProps
type ImportExportSettingsProps = { /** Trigger configuration export */ onExport: VoidFunction /** Apply imported configuration */ onImport: (data: SettingsExportData) => void /** Custom file-parsing function */ onParseFile?: (file: File) => Promise<SettingsExportData> /**…IndicatorProps
type IndicatorProps = { /** * Color variant of the indicator * @default 'gray' */ color?: IndicatorColor /** * Size variant of the indicator * @default 'md' */ size?: ComponentSize /** * Custom className for the root element */ className?: string /** * When tru…InputProps
type InputProps = Omit<ComponentProps<'input'>, 'prefix' | 'size'> & { /** * Optional label displayed above the input */ label?: string /** * HTML id for the input. Required when using label for accessibility. * @default auto-generated */ id?: string /** *…LabeledCardProps
type LabeledCardProps = Partial<{ /** * Applies a dark background modifier * @default false */ isDark: boolean /** Additional class for the root element */ className: string /** * Prevents content from wrapping * @default false */ hasNoWrap: boolean /** * Sets `p…LineChartCardProps
type LineChartCardProps = Partial<{ /** Pre-adapted chart data (use this OR rawData+dataAdapter) */ data: LineChartCardData /** Raw data to be transformed by dataAdapter */ rawData: unknown /** Adapter to transform rawData into LineChartCardData */ dataAdapter: (da…LoaderProps
type LoaderProps = { /** * Size of each dot in pixels * @default 10 */ size?: number /** * Number of dots to display * @default 5 */ count?: 3 | 5 | 7 /** * Color variant of the loader * @default 'orange' */ color?: 'red' | 'gray' | 'blue' | 'amber' | 'orang…LogActivityIconProps
type LogActivityIconProps = { status: string }LogDotProps
type LogDotProps = { /** `'Incidents'` renders a colored circle; `'Activity'` renders an activity icon */ type: string /** Severity string for color mapping */ status: string }LogItemProps
type LogItemProps = { data: LogData onLogClicked?: (uuid: string) => void }LogRowProps
type LogRowProps = { /** Log entry data */ log: LogData /** Log type (controls dot appearance) */ type: string /** Inline style for the row container */ style?: CSSProperties /** Click handler */ onLogClicked?: (uuid: string) => void }LogsCardProps
type LogsCardProps = Partial<{ /** Log type (`'Incidents'` or `'Activity'`); controls the `LogDot` appearance */ type: string /** Card header label */ label: string /** * Applies dark card theme * @default false */ isDark: boolean /** * Shows skeleton rows whi…ManageUserModalProps
type ManageUserModalProps = { /** Controls dialog visibility */ open: boolean /** Called when the dialog closes */ onClose: VoidFunction /** The user being edited */ user: SettingsUser /** Available role options */ roles: RoleOption[] /** Permission levels per role *…MdkWordmarkProps
type MdkWordmarkProps = { /** * Visual size of the wordmark. `sm` ≈ 24px tall, `md` ≈ 32px, `lg` ≈ 64px * @default 'md' */ size?: MdkWordmarkSize /** Optional class hook on the outer `<svg>`. */ className?: string /** * Accessible label * @default 'MDK' */ title?…MicroBTWidgetBoxProps
type MicroBTWidgetBoxProps = { /** Live device object. Returns `null` when omitted. */ data?: Device }MinersSummaryBoxProps
type MinersSummaryBoxProps = { /** Array of label-value pairs to display in a 2-column grid */ params: MinersSummaryParam[] /** Additional CSS class name */ className?: string }MiningPoolsPanelProps
type MiningPoolsPanelProps = Partial<{ /** * Override the card title — defaults to `Mining Pools`. * @default "Mining Pools" */ label: string /** * Hide the title row entirely. * @default false */ hideHeader: boolean /** * Loading state — renders skeleton rows. * @def…MinMaxAvgProps
type MinMaxAvgProps = MinMaxAvgValues & { /** Additional root class */ className?: string }MonthlyEbitdaChartProps
type MonthlyEbitdaChartProps = { chartData: BarChartDataResult height?: number }MovementDetailsModalProps
Props for MovementDetailsModal; pass the selected movement and open/close handlers
type MovementDetailsModalProps = Partial<{ /** * Whether the modal is open * @default false */ isOpen: boolean /** Called when the modal requests to close (overlay click, escape, or close button) */ onClose: () => void /** The selected movement; when omitted the modal ren…MoveSparePartModalProps
Props for MoveSparePartModal
type MoveSparePartModalProps = { /** Whether the modal is open */ isOpen?: boolean /** Called when the modal requests to close */ onClose?: VoidFunction /** The part to move; when omitted the modal renders nothing */ sparePart?: MoveSparePartModalSparePart /** Pre-seeds…MultiSelectProps
type MultiSelectProps = { /** `{ value, label, disabled? }` entries to render as option rows */ options: MultiSelectOption[] /** Controlled selected values. Omit to use `defaultValue` for uncontrolled mode. */ value?: string[] /** * Initial values for uncontrolle…NotFoundPageProps
type NotFoundPageProps = { /** * Callback fired when the "Go Home" button is clicked */ onGoHome?: VoidFunction /** * Page title * @default "404" */ title?: string /** * Message displayed below the title * @default "The page you are looking for does not exist." */…OperationalDashboardProps
Props for the operational dashboard composite
type OperationalDashboardProps = Partial<{ /** Shaped hashrate trend (`LineChartCardData`) */ hashrate: OperationalDashboardTrendInput /** Shaped power-consumption trend */ consumption: OperationalDashboardTrendInput /** Shaped site-efficiency trend */ efficiency: Operati…OperationalMinersStatusChartProps
Props for the miners-status chart component
type OperationalMinersStatusChartProps = Partial<{ data: MinersStatusChartData isLoading: boolean isExpanded: boolean onToggleExpand: VoidFunction }>OperationsEfficiencyProps
type OperationsEfficiencyProps = { /** * Initially selected tab * @default 'site-view' */ defaultTab?: EfficiencyTabValue /** Props forwarded to `EfficiencySiteView` */ siteView?: EfficiencySiteViewProps /** Props forwarded to `EfficiencyMinerTypeView` */ minerTypeView?:…OperationsEnergyChartProps
type OperationsEnergyChartProps = { totals: CostSummaryMonetaryTotals | null isLoading?: boolean }OperationsEnergyCostChartProps
type OperationsEnergyCostChartProps = Partial<{ /** * Chart title * @default "Operations vs Energy Cost" */ title: string /** * Subtitle and tooltip unit label * @default $/MWh */ unit: string /** * Doughnut height in pixels * @default 200 */ height: number /** Extra class on…PaginationProps
type PaginationProps = { /** * Current active page number * @default 1 */ current?: number /** * Total number of items * @default 0 */ total?: number /** * Number of items per page * @default 20 */ pageSize?: number /** * Page size options for the select dropdow…PendingActionsButtonProps
type PendingActionsButtonProps = { /** * Click handler override — defaults to toggling the actionsStore sidebar. * @default toggles the actions sidebar */ onClick?: (event: MouseEvent<HTMLButtonElement>) => void /** Additional class names */ className?: string }PoolDetailsCardProps
type PoolDetailsCardProps = PoolDetailsCardPartialProps & { /** Detail rows to render */ details: PoolDetailItem[] }PoolManagerMinerExplorerProps
type PoolManagerMinerExplorerProps = { /** Miners to render in the explorer table. */ miners: ListThingsDevice[] /** Pool configurations powering the "Assign Pool" dropdown. */ poolConfig: PoolConfigData[] /** Called when the operator clicks the "Pool Manager" back link. */ b…PoolManagerPoolsProps
type PoolManagerPoolsProps = { /** Array of pool configurations to render. */ poolConfig: PoolConfigData[] /** Called when the operator clicks the "Pool Manager" back link. */ backButtonClick: VoidFunction }PoolManagerProps
type PoolManagerProps = { /** Pool configurations shared by every sub-view (Pools, Miner Explorer, Sites). */ poolConfig: PoolConfigData[] /** Dashboard site-level stat blocks. */ stats?: DashboardStats /** Dashboard stats loading flag. */ isStatsLoading?: boolea…PoolManagerSiteOverviewDetailsProps
type PoolManagerSiteOverviewDetailsProps = { /** The site (container unit) to render details for. */ unit: UnitData /** Display name shown in the breadcrumb (`Site Overview / <unitName>`). */ unitName: string /** Pool configurations powering the per-pool detail rows. */ poolConfig:…PoolManagerSitesOverviewProps
type PoolManagerSitesOverviewProps = { /** Sites to render (already normalised through `useSitesOverviewData`). */ units: ProcessedContainerUnit[] /** Pool configurations powering each card's pool summary. */ poolConfig: PoolConfigData[] /** * Show a skeleton placeholder whil…PowerModeTimelineChartProps
Props for PowerModeTimelineChart
type PowerModeTimelineChartProps = Partial<{ /** * Initial power-mode entries (each with start/end ts + mode). * @default [] */ data: PowerModeTimelineEntry[] /** * Streaming updates appended to the initial data. * @default [] */ dataUpdates: PowerModeTimelineEntry[] /** *…ProductionCostChartProps
type ProductionCostChartProps = { costLog: ReadonlyArray<CostTimeSeriesEntry> btcPriceLog: ReadonlyArray<BtcPriceTimeSeriesEntry> dateRange: FinancialDateRange | null isLoading?: boolean }ProfileMenuProps
type ProfileMenuProps = { /** Items rendered in the dropdown, top-to-bottom. */ items: ProfileMenuItem[] /** Optional user label rendered at the top of the dropdown (e.g. an email). */ user?: ReactNode /** * Override the trigger icon — defaults to the user-avatar…RadioGroupProps
type RadioGroupProps = { /** * Layout orientation * @default 'vertical' */ orientation?: 'horizontal' | 'vertical' /** * Remove gap between radio items * @default false */ noGap?: boolean /** * Custom className for the group */ className?: string } & ComponentPr…RadioProps
type RadioProps = { // Key prop re-declared from the Radix item so it surfaces in the generated docs // (type reuses Radix's via indexed access — cannot drift). /** Value associated with this option */ value: RadioItemProps['value'] /** * Size variant of th…RBACControlSettingsProps
type RBACControlSettingsProps = { /** List of current users */ users: SettingsUser[] /** Available role options */ roles: RoleOption[] /** Permission levels per role */ rolePermissions: Record<string, Record<string, PermLevel>> /** Display labels for permission keys */ p…RepairLogChangesSubRowProps
type RepairLogChangesSubRowProps = { /** * The repair batch action whose part changes should be displayed. */ batchAction: RepairBatchAction /** * Devices referenced by the batch action, pre-fetched by the parent. */ devices: RepairDevice[] /** * Show a spinner while the pa…ReportTimeFrameSelectorProps
type ReportTimeFrameSelectorProps = Pick< ReportTimeFrameSelectorState, 'presetTimeFrame' | 'dateRange' | 'setPresetTimeFrame' | 'setDateRange' >RequireAuthProps
type RequireAuthProps = { /** Rendered when a token is present. */ children: ReactNode /** Rendered when no token is present — typically `<Navigate to="/signin" />`. */ fallback: ReactNode /** * When true (default), the current location is persisted to sessionSto…RevenueChartProps
Props for RevenueChart; pass pre-fetched data and optional legend layout overrides
type RevenueChartProps = Partial<{ /** * Raw API response, each entry is one time period with site IDs as dynamic keys * @default [] */ data: RevenueDataItem[] /** * Shows a loading spinner while data is being fetched * @default false */ isLoading: boolean /** * L…SelectProps
type SelectProps = SelectRootProps & { // Key controlled-state props re-declared from the Radix root so they surface in // the generated docs (types reuse Radix's via indexed access — cannot drift). /** Controlled value */ value?: SelectRootProps['value'] /*…SettingsDashboardProps
type SettingsDashboardProps = { /** Danger-zone action buttons (reset, delete) */ dangerActions?: ActionButtonProps[] /** Props forwarded to `HeaderControlsSettings` */ headerControlsProps?: HeaderControlsSettingsProps /** Props forwarded to `RBACControlSettings` */ rb…SidebarProps
type SidebarProps = SidebarOptions & SidebarCallbacks & { /** Menu items (supports nested `items`) */ items: SidebarMenuItem[] }SignInGoogleButtonProps
type SignInGoogleButtonProps = Omit<ButtonProps, 'onClick' | 'children'> & { /** * Base URL of the OAuth backend (no trailing slash). Click navigates to * `${oauthBaseUrl}/oauth/google`. */ oauthBaseUrl: string /** * Override the visible button label. * @default "Sign i…SiteStatsBarProps
type SiteStatsBarProps = { /** Site label rendered in the header row. */ title: string /** Current site-level power consumption, in watts (or whatever `powerUnit` says). */ power?: number /** * Display unit for `power` — defaults to `kW`. * @default 'kW' */ powerU…SkeletonBlockProps
type SkeletonBlockProps = Partial<{ /** * Renders a perfect circle using `height` as the diameter * @default false */ circle: boolean /** Additional class for the element */ className: string /** Width in pixels (number) or any CSS value (string) */ width: number |…SocketProps
type SocketProps = { /** * Current in amperes * @default null */ current_a?: number | null /** * Power in watts * @default null */ power_w?: number | null /** * Whether socket is enabled * @default false */ enabled?: boolean /** * Socket number/index * @defa…SparePartSubTypesModalProps
Props for SparePartSubTypesModal; the active part type is controlled by the caller
type SparePartSubTypesModalProps = { /** Whether the modal is open */ isOpen: boolean /** Called when the modal requests to close */ onClose: VoidFunction /** Part-type tabs */ partTypes: SparePartSubTypesModalPartType[] /** The selected part type (controlled by the parent)…SpinnerProps
type SpinnerProps = { /** * Size variant of the spinner * @default 'md' */ size?: ComponentSize /** * Color variant of the spinner * @default 'primary' */ color?: 'primary' | 'secondary' /** * Whether to display in fullscreen mode * @default false */ fullScre…SupplyLiquidBoxProps
type SupplyLiquidBoxProps = { /** Live device object. Returns `null` when omitted. */ data?: Device /** * Optional threshold map that controls colour and flash states on readings * @default null */ containerSettings?: SupplyLiquidBoxContainerSettings | null }SwitchProps
type SwitchProps = { // Key controlled-state props re-declared from the Radix root so they surface in // the generated docs (types reuse Radix's via indexed access — cannot drift). /** Controlled checked state */ checked?: SwitchRootProps['checked'] /** Unco…TagFilterBarProps
type TagFilterBarProps = { /** Active tag filter values */ filterTags: string[] /** Current local filter state */ localFilters: AlertLocalFilters /** Called when tag filter changes */ onSearchTagsChange: (tags: string[]) => void /** Called when any local filter ch…TagInputProps
type TagInputProps = { /** * Controlled tags (array of tag values) * @default [] */ value?: string[] /** * Callback when tags change (add/remove) */ onTagsChange?: (tags: string[]) => void /** * Callback when input value changes (typing). Receives current inpu…TagProps
type TagProps = { /** * Color variant of the tag * @default 'dark' */ color?: 'dark' | 'red' | 'green' | 'amber' | 'blue' /** * Custom className for the root element */ className?: string /** * Children content */ children?: ReactNode } & ComponentPropsWi…TankRowProps
type TankRowProps = { /** Tank identifier label (e.g. "Tank 1") */ label: string /** Current temperature value */ temperature: number /** Temperature unit string (e.g. "°C") */ unit: string /** Running state for the oil pump */ oilPumpEnabled: boolean /** Run…TanksBoxProps
type TanksBoxProps = { /** Tank telemetry arrays; returns `null` when omitted */ data?: { oil_pump: Tank[] water_pump: WaterPump[] pressure: TanksBoxPressure[] } }TextAreaProps
type TextAreaProps = ComponentProps<'textarea'> & { /** * Optional label displayed above the textarea */ label?: string /** * HTML id for the textarea. Required when using label for accessibility. * @default auto-generated */ id?: string /** * Validation error…ThresholdLineChartProps
type ThresholdLineChartProps = Partial<{ /** Chart title (unit appended when `unit` is set) */ title: string /** Shown in title and axis/tooltip formatting */ unit: string /** * Chart height in pixels (`360` when `isTall`) * @default 280 */ height: number /** * When tru…TimeframeControlsProps
type TimeframeControlsProps = Partial<{ /** Helper text below the controls */ hint: string /** Called when the Reset button is clicked */ onReset: VoidFunction /** * Shows the Reset button * @default false */ showResetButton: boolean /** * Show week selector * @default…TimeframeWeekFlatContentProps
type TimeframeWeekFlatContentProps = { visibleWeeks: ReturnType<typeof weeksOfMonth> }TimeframeWeekTreeContentProps
type TimeframeWeekTreeContentProps = { timezone: string selectedYear: number selectedMonth: number }TimelineChartProps
type TimelineChartProps = { /** Initial timeline data */ initialData: TimelineChartData /** Streaming updates appended to the initial data */ newData?: TimelineChartData /** * Ignore `newData` * @default false */ skipUpdates?: boolean /** Visible time window */ ran…TimelineSelectorProps
type TimelineSelectorProps = { /** Currently selected timeline value (e.g. `'1m'`, `'5m'`). */ value: string /** Called whenever the user picks a new option. */ onChange: (next: string) => void /** * Available options — defaults to {@link getTimelineOptions}. Pass a c…TypographyProps
type TypographyProps = { /** * Determines the rendered HTML element and base style * @default 'body' */ variant?: 'heading1' | 'heading2' | 'heading3' | 'body' | 'secondary' | 'caption' /** * Text size; defaults to the variant's size when unset. */ size?: 'xs' |…WidgetTopRowProps
type WidgetTopRowProps = { /** Widget title */ title: string /** Power reading; rendered in kilo-units */ power?: number /** Power unit (e.g. `"kW"`) */ unit?: string /** Error tooltip content; replaces power */ statsErrorMessage?: string | ErrorWithTimestamp[] |…