import { IGraphNode, IViewport } from '../../lib/graph'; export interface GraphMiniMapProps { /** The nodes to plot. Only position and size are read. */ nodes: IGraphNode[]; /** The canvas's current pan and zoom. */ viewport: IViewport; /** * Pixel size of the canvas the minimap mirrors. Get it from `GraphCanvas`'s * `onSizeChange`; without it the viewport indicator can't be drawn. */ canvasSize: { width: number; height: number; }; /** * Called with a viewport that recentres the canvas. Omit it and the minimap * becomes a read-only overview. */ onViewportChange?: (viewport: IViewport) => void; /** Minimap width in pixels. Defaults to `180`. */ width?: number; /** Minimap height in pixels. Defaults to `120`. */ height?: number; /** * Fill colour for a node, as a CSS colour or Tailwind class. Receives the * node, so you can colour by `kind`. Defaults to the muted foreground. */ nodeColor?: (node: IGraphNode) => string; /** * Highlight these node ids — a selection, or search results. Drawn in the * primary colour above the rest. */ highlightIds?: string[]; /** Padding around the plotted content, in minimap pixels. Defaults to `8`. */ padding?: number; /** How far an arrow key pans, in graph units. Defaults to `80`. */ panDistance?: number; /** Accessible label. Defaults to `"Graph minimap"`. */ 'aria-label'?: string; /** Extra classes merged onto the root element. */ className?: string; } /** * A scaled overview of the whole graph, with an indicator showing what the * canvas is currently looking at. * * Click anywhere to jump there, drag to pan continuously, or focus it and use * the arrow keys. The zoom level is never changed — a minimap answers "where am * I", and changing scale on a click makes that answer harder to trust. * * The plotted extent is the union of the graph's bounds and the current * viewport, so the indicator stays visible even when you have panned far away * from every node. Without that, panning into empty space makes the minimap * appear broken. * * Fully controlled: it reads `viewport` and reports where you want to go, but * never moves the canvas itself. * * @example * ```tsx * const [viewport, setViewport] = useState(IDENTITY_VIEWPORT); * const [size, setSize] = useState({ width: 0, height: 0 }); * * * } * > * … * * ``` */ export declare const GraphMiniMap: ({ nodes, viewport, canvasSize, onViewportChange, width, height, nodeColor, highlightIds, padding, panDistance, "aria-label": ariaLabel, className, }: GraphMiniMapProps) => import("react/jsx-runtime").JSX.Element;