import type { ProjectStructure } from '../../analyzer/project-structure'; import type { TreeNodeData } from '../types'; /** * Helper function to format bytes into human-readable form. */ export declare function formatBytes(bytes: number, decimals?: number): string; /** * Converts flat graph data (nodes and links) into a hierarchical tree structure * with calculated statistics for each node. */ export declare function buildTreeWithStats(projectStructure: ProjectStructure): TreeNodeData | null; /** * Compute aggregated stats (fileCount, totalSize, sizeByType, etc.) for a node by traversing * the full graph. If reachableModuleIds is provided, it will be used directly. * Returns both stats and the set of reachable module IDs for reuse in views. */ export declare function computeAggregatedStatsForNode(projectStructure: ProjectStructure, nodeId: string, nodeType: string, reachableModuleIds?: Set): { moduleIds: Set; fileCount: number; totalSize: number; fileTypes: Record; sizeByType: Record; selfSize?: number; };