Let chart views avoid the dashboard utility bulk
The intraday chart data builder lived inside dashboard-utils with observation-source and TAF helpers, so chart consumers had to depend on the large dashboard utility surface. This moves chart data preparation, observation-source helpers, and TAF marker labels into focused modules while keeping dashboard-utils re-export compatibility. Constraint: Preserve existing chart data shape, observation labels, TAF labels, and legacy dashboard-utils exports. Rejected: Rewrite chart data generation while moving it | this pass is a boundary move only so visual behavior remains stable. Confidence: high Scope-risk: moderate Reversibility: clean Tested: TypeScript diagnostics for chart-utils, dashboard-utils, observation-source-utils, and taf-utils Tested: npm run build Not-tested: Browser visual regression across every chart city.
This commit is contained in:
@@ -12,10 +12,10 @@ import { getOfficialSourceLinks } from "@/lib/dashboard-official-sources";
|
||||
import { CityDetail } from "@/lib/dashboard-types";
|
||||
import { trackAppEvent } from "@/lib/app-analytics";
|
||||
import { getTodayPolymarketUrl } from "@/lib/polymarket-market-links";
|
||||
import { getTemperatureChartData } from "@/lib/chart-utils";
|
||||
import {
|
||||
getCityProfileStats,
|
||||
getRiskBadgeLabel,
|
||||
getTemperatureChartData,
|
||||
} from "@/lib/dashboard-utils";
|
||||
import { normalizeObservationSourceLabel } from "@/lib/source-labels";
|
||||
|
||||
|
||||
@@ -23,11 +23,11 @@ import {
|
||||
ModelForecast,
|
||||
ProbabilityDistribution,
|
||||
} from "@/components/dashboard/PanelSections";
|
||||
import { getTemperatureChartData } from "@/lib/chart-utils";
|
||||
import {
|
||||
getFutureModalView,
|
||||
getModelView,
|
||||
getProbabilityView,
|
||||
getTemperatureChartData,
|
||||
getWeatherSummary,
|
||||
} from "@/lib/dashboard-utils";
|
||||
import { getTodayPaceView } from "@/lib/pace-utils";
|
||||
|
||||
@@ -12,12 +12,12 @@ import {
|
||||
MarketTopBucket,
|
||||
ProbabilityBucket,
|
||||
} from "@/lib/dashboard-types";
|
||||
import { getTemperatureChartData } from "@/lib/chart-utils";
|
||||
import {
|
||||
getHeroMetaItems,
|
||||
getModelView,
|
||||
getProbabilityView,
|
||||
getRiskBadgeLabel,
|
||||
getTemperatureChartData,
|
||||
getWeatherSummary,
|
||||
} from "@/lib/dashboard-utils";
|
||||
import {
|
||||
|
||||
@@ -4,7 +4,7 @@ import { BarChart3 } from "lucide-react";
|
||||
import type { CityDetail } from "@/lib/dashboard-types";
|
||||
import { useChart } from "@/hooks/useChart";
|
||||
import { useI18n } from "@/hooks/useI18n";
|
||||
import { getTemperatureChartData } from "@/lib/dashboard-utils";
|
||||
import { getTemperatureChartData } from "@/lib/chart-utils";
|
||||
|
||||
type TemperatureChartData = NonNullable<ReturnType<typeof getTemperatureChartData>>;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user