import { collectBundleStats, formatBytes, parseSize, type CollectorOptions } from './collector';
import { generateReport, analyzeBundle, type ReportOptions } from './report';
import { generateTreemap, openInBrowser, type TreemapOptions } from './treemap';
/**
 * Analyze a bundle directory and generate a report
 */
// eslint-disable-next-line pickier/no-unused-vars
export declare function analyze(options?: AnalyzeOptions): Promise<{
  stats: ReturnType<typeof collectBundleStats> extends Promise<infer T> ? T : never
  report: string
  outputPath?: string
  exceedsThreshold: boolean
}>;
/**
 * Quick summary of bundle size
 */
// eslint-disable-next-line pickier/no-unused-vars
export declare function getBundleSummary(directory: string): Promise<{
  totalSize: number
  totalSizeFormatted: string
  gzipSize: number
  gzipSizeFormatted: string
  moduleCount: number
  chunkCount: number
}>;
export declare interface AnalyzeOptions {
  directory?: string
  output?: string
  format?: 'html' | 'json' | 'text' | 'markdown'
  open?: boolean
  gzip?: boolean
  threshold?: string | number
  recommendations?: boolean
  topModules?: number
  parseImports?: boolean
}
/**
 * STX Bundle Analyzer
 *
 * Analyze and visualize bundle composition for optimization.
 *
 * @module bundle-analyzer
 *
 * @example
 * ```bash
 * # Generate HTML treemap
 * stx analyze dist/
 *
 * # JSON output for CI
 * stx analyze dist/ --json
 *
 * # Check size threshold
 * stx analyze dist/ --threshold 500KB
 * ```
 *
 * @example
 * ```typescript
 * import { collectBundleStats, generateReport, generateTreemap } from 'stx/bundle-analyzer'
 *
 * const stats = await collectBundleStats('dist/')
 * console.log(generateReport(stats, { format: 'text' }))
 * ```
 */
// ============================================================================
// Collector Exports
// ============================================================================
export {
  collectBundleStats,
  formatBytes,
  parseSize,
  percentage,
  type ModuleInfo,
  type ModuleType,
  type ChunkInfo,
  type DuplicateModule,
  type BundleStats,
  type CollectorOptions,
} from './collector';
// ============================================================================
// Report Exports
// ============================================================================
export {
  generateReport,
  analyzeBundle,
  getModuleRecommendation,
  type ReportOptions,
  type AnalysisResult,
  type AnalysisIssue,
  type Recommendation,
} from './report';
// ============================================================================
// Treemap Exports
// ============================================================================
export {
  generateTreemap,
  openInBrowser,
  type TreemapOptions,
} from './treemap';
