/**
 * Instrumentation for diagnosing editor interaction latency
 * (currently: component selection).
 *
 * Opt-in. Enable with the `parhelia_perf=1` query param or
 * `localStorage.setItem("parhelia:perf", "1")` (flag family as
 * `parhelia:bridge:debug`), then reload. `window.__parheliaPerf.enable()` /
 * `.disable()` set the localStorage flag for you.
 *
 * A trace begins at a trigger (e.g. a canvas click), collects named steps from
 * anywhere in the editor, and finalizes automatically once no step has arrived
 * for QUIET_MS (or at HARD_CAP_MS). Each step logs one console line as it
 * happens; the finalized trace prints a waterfall `console.table` and a
 * `performance.measure` span so the same steps line up in the DevTools
 * Performance panel (marks/measures are prefixed `parhelia:perf:`).
 *
 * Steps recorded while no trace is active (e.g. a fetch that resolves after
 * the trace settled) still log standalone lines, so slow stragglers stay
 * visible.
 *
 * Everything is a no-op when the flag is off.
 */
type PerfDetail = Record<string, unknown>;
export declare function isPerfTraceEnabled(): boolean;
export declare function isPerfTraceActive(): boolean;
/**
 * Start a new trace. An unfinished previous trace is finalized first so
 * rapid successive clicks each get their own waterfall.
 *
 * `startedAtEpochMs` backdates the trace start to an epoch timestamp captured
 * elsewhere (e.g. `Date.now()` stamped by the editing host at the original DOM
 * click), so host-side latency shows up inside the trace instead of before it.
 */
export declare function beginPerfTrace(name: string, detail?: PerfDetail, startedAtEpochMs?: number): void;
/**
 * Record a step in the active trace (one console line + performance.mark).
 * Without an active trace, logs a standalone line so late async completions
 * (fetches resolving after the trace settled) remain visible.
 */
export declare function perfTraceStep(step: string, detail?: PerfDetail): void;
/**
 * Record `step` after the next frame has painted (double rAF), measuring how
 * long the browser needed to actually put the pending update on screen.
 */
export declare function perfTracePaintStep(step: string, detail?: PerfDetail): void;
export {};
