/**
 * Mock 2D canvas rendering context — structurally a `Partial<CanvasRenderingContext2D>`
 * with method spies, plus a few extra stub fields. Typed as a loose stringy
 * bag because vitest's `vi.fn()` return type doesn't line up with
 * `CanvasRenderingContext2D`'s method signatures and tests inspect the spies
 * directly via `ctx.fillRect.mock.calls` etc.
 */
export type CanvasContextMock = Record<string, unknown>;
/**
 * Creates a mock 2D canvas rendering context with all commonly used
 * methods stubbed as vi.fn() and properties set to sensible defaults.
 *
 * This is the single canonical canvas mock for the entire test suite.
 * Import from "../../test-utils/canvasMock" (or appropriate relative path).
 */
export declare function createMockCanvasContext(): CanvasContextMock;
/**
 * Record style state at the moment each draw op fires.
 *
 * Counting `ctx.fill` / `ctx.stroke` calls is brittle — a refactor that
 * batches two paths into one stroke changes the count without changing
 * what's visible. This helper instead captures the style state (`fillStyle`,
 * `strokeStyle`, `globalAlpha`, `lineWidth`) at each draw call, so tests
 * can assert on *what was drawn with what appearance* rather than on how
 * many primitives the renderer emitted to get there.
 *
 * Usage:
 *   const ctx = createMockCanvasContext()
 *   const ops = recordCanvasOps(ctx)
 *   someRenderer(ctx, nodes, ...)
 *   expect(ops.fillStyles).toEqual(["#e41a1c", "rgba(255,255,0,0.5)"])
 */
export interface CanvasOpLog {
    fillStyles: string[];
    strokeStyles: string[];
    fillAlphas: number[];
    strokeAlphas: number[];
    /** `lineWidth` at the moment each stroke fired — useful for pulse /
     *  emphasis renderers that vary stroke weight by intensity. */
    strokeLineWidths: number[];
}
export declare function recordCanvasOps(ctx: CanvasContextMock): CanvasOpLog;
/**
 * Sets up the canvas getContext mock on HTMLCanvasElement.prototype,
 * mocks requestAnimationFrame to execute callbacks synchronously,
 * and mocks cancelAnimationFrame.
 *
 * @returns A cleanup function that restores the mocked globals.
 *
 * @example
 * ```ts
 * let cleanup: () => void
 * beforeEach(() => { cleanup = setupCanvasMock() })
 * afterEach(() => { cleanup() })
 * ```
 */
export declare function setupCanvasMock(): () => void;
