import type { ParseResult } from "@babel/parser";
import type { Node, NodePath } from "@babel/traverse";
import type { File } from "@babel/types";
import type { Tracer } from "@opentelemetry/api";
import type { SbElement } from "@superblocksteam/library-shared/types";
export type FileMeta = {
    code: string;
    ast: ParseResult<File> | null;
    imports: Record<string, string>;
};
export type SourceKind = "api" | "ts";
export declare class SourceTracker {
    private elementToLocation;
    private elementToFilePath;
    private fileToMeta;
    private changedFiles;
    constructor(_tracer: Tracer);
    /**
     * Add a file to the changed files set with normalized path (Windows compatibility)
     */
    private addChangedFile;
    getCurrentFiles(): Record<string, FileMeta>;
    /**
     * Retrieves and clears the changes made to files, returning them as a record of file
     * names and their corresponding code.
     * @returns A Record<string, string> object containing the file names as keys and their corresponding code as values.
     */
    getAndFlushChanges: () => Promise<Array<{
        fileName: string;
        source: string;
        kind: SourceKind;
    }>>;
    getElementToFilePath(): Record<SbElement, string>;
    getElementToFilePath(el: SbElement): string;
    getElementToLocation(): Record<SbElement, NodePath<Node>>;
    getElementToLocation(el: SbElement): NodePath<Node>;
    private parseJsxFromEntrypoint;
    /**
     * Clears cached element mappings for a specific file so re-indexing
     * cannot retain stale element IDs from previous AST snapshots.
     */
    private clearElementMappingsForFile;
    initializeSourceTracker: ({ files }: {
        files: Record<string, string>;
    }) => void;
    removeFile: (fileName: string) => void;
    updateFileContents(filePath: string, code: string): void;
    addApi: ({ apiName: _apiName }: {
        apiName: string;
    }) => Promise<string>;
    deleteApi: ({ apiName: _apiName, }: {
        apiName: string;
    }) => string | undefined;
}
//# sourceMappingURL=source-tracker.d.ts.map