import { SxProps, Theme } from '@mui/material'; import * as echarts from 'echarts'; export declare const DEFAULT_INIT_OPTS: { renderer: "svg"; height: number; }; export type EchartsEventHandler = (event: unknown) => void; export interface EchartUIProps { option: echarts.EChartsOption; /** * Keys to merge as arrays (replace by index) instead of by id. The middleware * memoizes this content-stably, so identical sets don't re-trigger setOption. */ replaceMerge?: readonly string[]; /** * Opaque ECharts event passthrough — handlers fire untransformed. * * **Must be referentially stable** (memoize it with `useMemo` / * `useCallback`, or hoist to module scope). The binding effect depends on * the `onEvents` object identity; an inline `{ click: handler }` literal * recreates the object on every render and causes every listener to be * detached and re-attached each commit. */ onEvents?: Record; /** * Init options forwarded to echarts.init. Captured at mount only — to change * `renderer` or `height` after mount, unmount and remount the chart. * Defaults: `{ renderer: 'svg', height: 304 }`. */ init?: echarts.EChartsInitOpts; /** * Optional callback fired once after the ECharts instance is created * (`onInstance(chart)`) and once when it's about to be disposed * (`onInstance(null)`). Used by `Widget.Echart` to publish the live * instance to the per-widget registry so other actions (e.g. * `ZoomToggle`'s disable handler) can reach it without DOM lookups. * No need to memoize — the bridge wraps it in `useEffectEvent` so an * unstable reference does not re-init the chart. */ onInstance?: (chart: echarts.ECharts | null) => void; className?: string; sx?: SxProps; } export declare function EchartUI({ option, replaceMerge, onEvents, init, onInstance, className, sx, }: EchartUIProps): import("react/jsx-runtime").JSX.Element;