/** * Import/Export Parser * * Parses source files to extract imports and exports. * Uses regex-based parsing for speed and simplicity. * Supports JavaScript/TypeScript, Python, and Java. */ /** * Information about an import statement */ export interface ImportInfo { source: string; isRelative: boolean; isPackage: boolean; isBuiltin: boolean; importedNames: string[]; /** * Exact names bound from the source module for statically named imports. * Unlike importedNames, aliases retain their source identity (`X as Y` -> X). * Absent for default, namespace, star, dynamic, and otherwise uncertain forms. */ importedSourceNames?: string[]; /** Python only: true when the import is module-level and therefore may re-export a binding. */ isTopLevel?: boolean; hasDefault: boolean; hasNamespace: boolean; isTypeOnly: boolean; isDynamic: boolean; line: number; /** * Set when this import is an HTML asset reference (`