/** * dsh-widgets — the chart registry. * * ONE line per chart kind. This file is the only thing a new chart touches: add a * renderer module and register it here (the plan's "new chart = new renderer + a * registry entry", instead of growing a conditional chain). * * A renderer is rendered AS A COMPONENT (`createElement`), never called as a plain * function. That matters the moment a renderer needs its own state: called inline, * its hooks would land on `CardBody`'s fibre — and the skeleton → loaded swap (which * returns before the chart on the skeleton pass) then renders MORE hooks than the * previous pass, which React rejects with #310 and the whole rail slot disappears. * Measured 2026-09-29 with the `quotas` renderer's measuring hook. */ import type { ReactElement } from 'react'; import type { WidgetChart } from '../../lib/contract/types'; import type { ChartProps } from './types'; /** Draw a widget chart (null when the kind has no renderer). The renderer becomes a * real element, so its hooks (e.g. `quotas`' height measurement) belong to it. */ export declare function renderChart(props: ChartProps): ReactElement | null; /** Kinds whose chart stretches to fill the card body (the body gets `flex: 1`). * Was an inline `kind === 'line' || kind === 'lanes'` test in CardBody. */ export declare const CHART_FILLS_BODY: ReadonlySet;