// Extract a compact, bounded per-file record for the cross-file dependency graph. // We keep ONLY what cross-file rules need — import bindings, the components a file // defines and the accessibility-relevant signals of the control each renders, the // ids it defines, and whether it declares . The parsed AST/Doc are // discarded after extraction, so memory stays O(file count), never whole-repo. import { type AstNode, type AstFile, asNode, asNodes, walkAst } from "../parse/jsx-ast.js"; import { jsxName, isIntrinsic, normAttrName } from "../parse/jsx-bridge.js"; import type { Doc } from "../parse/html.js"; import { hasAttr, attr } from "../parse/html.js"; import { toPosix } from "../glob.js"; export interface ImportRec { source: string; // raw specifier, e.g. "./IconButton" local: string; // local binding name imported: string; // "default" | "*" | the named export } export interface ComponentDef { name: string; // declared/export name ("default" for the default export) file: string; // posix path of the defining file line: number; // 1-based position of the control (or the component) in the file col: number; // Signals about the primary control (