import type { SankeyOptions } from '../index'; import { EventBus } from "../core/events/EventBus"; import { Logger } from "../utils/Logger"; /** * Fuel configuration interface */ export interface FuelConfig { readonly fuel: string; readonly name: string; readonly color: string; } /** * Sector/Box configuration interface */ export interface BoxConfig { readonly box: string; readonly name: string; readonly color: string; } /** * Configuration Service - Mathematical Constants & Visual Parameters * * ARCHITECTURAL RESPONSIBILITY: Central Mathematical Constants Repository * * This service provides all the mathematical constants, visual parameters, and scaling factors * that determine the precise positioning, sizing, and styling of the energy visualization. * Every coordinate calculation, energy-to-pixel conversion, and visual spacing depends on * these carefully calibrated values. * * MATHEMATICAL SIGNIFICANCE OF CONSTANTS: * Each constant has been precisely calculated to ensure: * - Accurate proportional representation of energy values * - Optimal visual clarity and readability * - Smooth animation transitions between years * - Responsive behavior across different screen sizes * - Perfect alignment between flows and boxes * * COORDINATE SYSTEM ARCHITECTURE: * The visualization uses a custom coordinate system where: * - Origin (0,0) is at top-left of container * - X increases rightward (fuel boxes → sector boxes) * - Y increases downward (stacked vertically) * - All measurements in pixels for precise SVG positioning */ export declare class ConfigurationService { private container; options: SankeyOptions; private eventBus; private logger; hasHeatData: boolean; readonly HEIGHT = 620; readonly BOX_WIDTH: number; readonly BOX_HEIGHT = 30; readonly LEFT_X: number; readonly LEFT_Y: number; readonly SCALE: number; readonly ELECTRICITY_BOX_X: number; readonly ELECTRICITY_BOX_Y: number; readonly HEAT_BOX_X: number; readonly HEAT_BOX_Y: number; readonly LEFT_GAP: number; readonly RIGHT_GAP: number; readonly SPEED: number; readonly BLEED = 0.5; readonly SR3: number; readonly HSR3: number; readonly PATH_GAP: number; readonly ELECTRICITY_GAP = 19; readonly FUELS: readonly FuelConfig[]; readonly BOXES: readonly BoxConfig[]; readonly BOXES_DEFAULT_FLOW_PATHS_ORDER: { elec: number; res: number; ag: number; indus: number; trans: number; heat: number; }; readonly HEAT_BOX_FIRST_FLOW_PATHS_ORDER: { elec: number; heat: number; res: number; ag: number; indus: number; trans: number; }; FLOW_PATHS_ORDER: Record>; readonly BOX_NAMES: readonly string[]; readonly FUEL_NAMES: readonly string[]; constructor(container: HTMLElement, options: SankeyOptions, eventBus: EventBus, logger: Logger); /** * Get human-readable display name for fuel */ getFuelDisplayName(fuel: string): string; /** * Get responsive header dimensions for current container width */ getResponsiveHeaderInfo(): { containerWidth: number; isNarrow: boolean; isMobile: boolean; animationScale: number; }; /** * Get human-readable display name for sector/box */ getBoxDisplayName(sector: string): string; /** * Get color for fuel type */ getFuelColor(fuel: string): string; /** * Get color for sector type */ getSectorColor(sector: string): string; /** * Get dynamic width from container ConfigurationService.WIDTH getter * This dynamically calculates width based on actual container size */ get WIDTH(): number; /** * Get default width when container width cannot be determined */ private getDefaultWidth; /** * Apply responsive adjustments based on screen size */ private applyResponsiveAdjustments; /** * Calculate right box X position */ calculateRightBoxX(): number; /** * Validate configuration consistency * Ensures all required constants are properly defined */ private validateConfiguration; /** * Check if fuel is defined in configuration */ isValidFuel(fuel: string): boolean; /** * Check if sector is defined in configuration */ isValidSector(sector: string): boolean; /** * Get all fuel configurations */ getAllFuels(): readonly FuelConfig[]; /** * Get all sector configurations */ getAllSectors(): readonly BoxConfig[]; /** * Get fuel configuration by name */ getFuelConfig(fuel: string): FuelConfig | undefined; /** * Get sector configuration by name */ getSectorConfig(sector: string): BoxConfig | undefined; /** * Calculate responsive scaling factor based on container size * Maintains aspect ratio while fitting within container */ calculateResponsiveScale(containerWidth: number, containerHeight: number): { scale: number; width: number; height: number; offsetX: number; offsetY: number; }; /** * Get configuration optimized for mobile devices */ getMobileConfiguration(): Partial; /** * Check if current viewport suggests mobile device */ isMobileViewport(): boolean; } //# sourceMappingURL=ConfigurationService.d.ts.map