import { type CSSProperties } from "react"; import type { Hex } from "viem"; import type { TraceFrame } from "../types.js"; import { type LayoutOptions } from "./flamegraphLayout.js"; export interface GasFlamegraphClassNames { root?: string; header?: string; chart?: string; bar?: string; tooltip?: string; legend?: string; } export interface GasFlamegraphProps { /** Root of the call tree. */ frame: TraceFrame; /** Optional click handler for a bar. */ onSelect?: (frame: TraceFrame) => void; /** Resolve a 4-byte selector to a readable label (e.g. "transfer"). */ resolveSelector?: LayoutOptions["resolveSelector"]; /** Bar pixel height. Default 22. */ barHeight?: number; /** Minimum percentage width for a bar to be drawn (smaller bars are * omitted to avoid sub-pixel rendering). Default 0.3. */ minBarWidth?: number; /** Hide the header bar. */ hideHeader?: boolean; /** Hide the legend strip. */ hideLegend?: boolean; /** Per-slot class names for theming. */ classNames?: GasFlamegraphClassNames; /** Inline style on the root element. */ style?: CSSProperties; /** className on the root. */ className?: string; } /** * Chrome-DevTools-style horizontal flamegraph. Each row is a depth level; * each bar's width is proportional to the frame's gas usage. Bars below * `minBarWidth` percent are hidden for legibility. * * Headless: default colors and layout are built in; consumers theme via * `classNames`, `className`, or `style` on the root. */ export declare function GasFlamegraph({ frame, onSelect, resolveSelector, barHeight, minBarWidth, hideHeader, hideLegend, classNames, style, className, }: GasFlamegraphProps): React.JSX.Element; export { buildFlamegraphLayout, adjustBrightness, getBarColor, type FlamegraphBar, type LayoutOptions, } from "./flamegraphLayout.js"; export type { Hex }; //# sourceMappingURL=GasFlamegraph.d.ts.map