/** * The ONE module in `@godxjp/ui` that touches the optional `recharts` peer. * * WHY IT EXISTS (gh#409 · 6). `recharts` is declared optional in `peerDependenciesMeta`, so a * bundler that cannot resolve it substitutes an empty stub, and EVERY named import of that stub * becomes its own `[MISSING_EXPORT]` diagnostic. A consumer who had not installed recharts got 18 * of them, spread across `dist/components/charts/**`, none of which said what to install. * * Reading the peer through a NAMESPACE import removes those bindings — there is no named export * left to be missing. ONE named import is kept on purpose: it is what still fails the BUILD (a * silent build followed by a blank page at load is worse than a red build), and because the * bundler prints the offending SOURCE LINE, its local alias is written as the remedy — so the * single remaining diagnostic reads * * [MISSING_EXPORT] "ResponsiveContainer" is not exported by * "__vite-optional-peer-dep:recharts:@godxjp/ui". * ╭─[ …/dist/components/charts/recharts-peer.js:3:10 ] * 3 │ import { ResponsiveContainer as install_recharts_or_use_charts_compact_bar_trend } from "recharts"; * * which names the package, the fix, and the alternative that needs no peer at all. * * `assertRechartsPeer` covers the bundlers that resolve a missing optional peer to a silent empty * object instead of a throwing stub: there the first chart to render says what is missing. * * Do NOT `import … from "recharts"` anywhere else in the library. */ import * as peer from "recharts"; /** What a consumer has to do. Kept as one string so the message cannot drift between call sites. */ export declare const RECHARTS_PEER_MESSAGE: string; /** * Throw the remedy instead of an `undefined is not a component` render error. Called by each * recharts-backed chart before it renders anything. */ export declare function assertRechartsPeer(): void; export declare const Area: (props: peer.AreaProps) => import("react").ReactElement, AreaChart: (props: import("recharts/types/util/types").CartesianChartProps & { ref?: React.Ref; }) => React.ReactElement, Bar: (props: peer.BarProps) => import("react").ReactElement, BarChart: (props: import("recharts/types/util/types").CartesianChartProps & { ref?: React.Ref; }) => React.ReactElement, CartesianGrid: typeof peer.CartesianGrid, Cell: import("react").FunctionComponent, Legend: import("react").MemoExoticComponent<(outsideProps: peer.LegendProps) => React.ReactPortal | null>, Line: { (props: peer.LineProps): import("react").ReactElement; (props: peer.LineProps): import("react").ReactElement; }, LineChart: (props: import("recharts/types/util/types").CartesianChartProps & { ref?: React.Ref; }) => React.ReactElement, Pie: { (outsideProps: peer.PieProps): import("react").ReactElement; (outsideProps: peer.PieProps): import("react").ReactElement; }, PieChart: (props: import("recharts/types/util/types").PolarChartProps & { ref?: React.Ref; }) => React.ReactElement, ResponsiveContainer: import("react").ForwardRefExoticComponent>, Tooltip: typeof peer.Tooltip, XAxis: (props: peer.XAxisProps) => import("react").ReactElement, YAxis: (props: peer.YAxisProps) => import("react").ReactElement;