import type { Graph } from '@turing-machine-js/machine'; /** * Derived lookups over an engine `Graph` that the highlight + indicator * passes need. Recomputed once per Build; consumed read-only thereafter. * * Pure transformation of `graph` — same input always produces deep-equal * output. See `docs/graph-highlight-and-breakpoints.md` for how each * field is consumed. */ export type GraphIndexes = { /** `GraphNode.id` → containing callable-subtree frameId. Only nodes * with `frameId !== null` (i.e. in-frame states) are present. */ nodeFrameMap: Map; /** frameId → list of wrappers calling into that frame, each with the * wrapper's id and its override-target id. Used by both source and * destination return-chain passes. */ frameWrappersMap: Map>; /** Cluster label text (as emitted by `toMermaid`) → frameId. The * rendered SVG's `g.cluster` carries the label inside a * ``; consumers match by `label.textContent.trim()` to * build their own `clusterCache: Map`. */ frameLabelToId: Map; }; /** * Walk the engine graph once and build all derived lookups. Cheap; * intended to run on every Build (graph identity changes per build). */ export declare function indexGraph(graph: Graph | null): GraphIndexes;