import type { ParsedDocument } from './parser-utils.js'; import type { DiagramDTO, MemoElement, SourceGraphDTO } from './semantic.js'; /** A file and the files it can draw names from. */ export interface SourceGraph { /** file → files it depends on, transitively (never includes itself). */ dependsOn: Map>; /** file → files that depend on it, transitively. */ dependents: Map>; } /** * Build the file-level dependency graph from parsed documents. * * Import paths name packages, not files, so resolution goes * package → declaring file. A package declared across several files * contributes all of them: any one can supply the imported name. */ export declare function buildSourceGraph(documents: ParsedDocument[]): SourceGraph; /** * Every file that can change what a view renders. * * That is the view's own source, the files owning the elements it displays, * and the transitive import closure of both. A view with no explicit element * selection shows whatever the model gives it, so its own closure is all that * can be stated. */ export declare function viewSourceFiles(diagram: Pick, elements: ReadonlyMap | Record, graph: SourceGraph): string[]; /** Serializable form of the graph, shipped with the model DTO. */ export declare function sourceGraphToDTO(graph: SourceGraph): SourceGraphDTO; export { affectedBy, affectingFiles, changeAffects } from './source-affinity.js'; //# sourceMappingURL=source-graph.d.ts.map