Builds and renders battery history charts in SwiftUI using Swift Charts. Use when implementing rolling history storage, sampling cadence, and trend visualization for battery percentage.
Collects and normalizes macOS battery metrics using IOKit with pmset fallback. Use when implementing or debugging battery status retrieval, charging state, capacities, temperature, cycle count, and power source fields.
Computes estimated time to full charge or depletion from recent battery trends. Use when implementing battery time remaining estimation and fallback rules for noisy or missing data.