/** * Shared helpers for chart renderers. * - HTML document shell (header + main with the chart SVG + legend) * - SVG canvas geometry constants (viewBox, plot margins) * - categorical color palette + per-series tone resolver * * Aesthetic CSS loading uses the shared utility at src/utils/aesthetic-loader. */ export { loadAestheticCss } from "../../utils/aesthetic-loader.js"; export declare const VIEWBOX_W = 800; export declare const VIEWBOX_H = 480; export declare const MARGIN_LEFT = 60; export declare const MARGIN_RIGHT = 40; export declare const MARGIN_TOP = 30; export declare const MARGIN_BOTTOM = 60; export declare const PLOT_W: number; export declare const PLOT_H: number; export declare const CATEGORICAL_PALETTE: readonly ["#22d3ee", "#34d399", "#a78bfa", "#fbbf24", "#fb7185", "#fb923c", "#94a3b8", "#c084fc"]; /** * Resolve a series color: caller override wins, else cycle the palette. * Cycle wraps for >8 series (parser caps before this in practice). */ export declare function seriesColor(index: number, override?: string): string; export declare const BASE_CHART_CSS = "\n body {\n background: var(--bg);\n color: var(--text);\n font-family: 'Inter', system-ui, sans-serif;\n padding: 32px 24px 40px;\n max-width: 960px;\n margin: 0 auto;\n }\n header { margin-bottom: 20px; }\n .header-eyebrow {\n font-family: 'Space Mono', monospace;\n font-size: 11px;\n letter-spacing: 0.08em;\n text-transform: uppercase;\n color: var(--text-muted);\n }\n h1 { font-size: 28px; font-weight: 700; margin: 6px 0 4px; font-family: 'Outfit', sans-serif; }\n .header-subtitle { color: var(--text-dim); font-size: 13px; margin: 0; max-width: 740px; }\n\n .chart-wrap {\n width: 100%;\n max-width: 880px;\n margin: 24px auto 16px;\n background: var(--bg-panel);\n border: 1px solid var(--border-bright);\n border-radius: 10px;\n padding: 14px;\n }\n .chart-svg {\n width: 100%;\n height: auto;\n display: block;\n }\n\n /* Axes + gridlines */\n .axis-line { stroke: var(--border-bright); stroke-width: 1; }\n .axis-tick { stroke: var(--border-bright); stroke-width: 1; }\n .axis-label {\n font-family: 'Space Mono', monospace;\n font-size: 10px;\n fill: var(--text-muted);\n }\n .axis-title {\n font-family: 'Space Mono', monospace;\n font-size: 11px;\n font-weight: 700;\n fill: var(--text-dim);\n letter-spacing: 0.04em;\n }\n .gridline { stroke: var(--border); stroke-width: 0.5; stroke-dasharray: 2 3; }\n\n /* Legend (HTML, sits below the SVG) */\n .chart-legend {\n margin-top: 12px;\n display: flex;\n flex-wrap: wrap;\n gap: 6px 18px;\n justify-content: center;\n font-family: 'Space Mono', monospace;\n font-size: 11px;\n color: var(--text-dim);\n }\n .legend-swatch {\n display: inline-block;\n width: 12px;\n height: 12px;\n border-radius: 2px;\n margin-right: 6px;\n vertical-align: -1px;\n }"; export interface ChartShellInput { title: string; eyebrow: string; subtitle?: string | undefined; aestheticCss: string; chartCss: string; chartHtml: string; legendHtml?: string | undefined; /** Optional CDN / inline scripts injected before (e.g. Chart.js). */ scripts?: string[] | undefined; } /** * Wrap a chart body in the standard chart HTML shell. Returns a single-file * offline-safe HTML string. */ export declare function renderChartShell({ title, eyebrow, subtitle, aestheticCss, chartCss, chartHtml, legendHtml, scripts, }: ChartShellInput): string; /** Build the standard legend block from a list of (label, color) pairs. */ export declare function renderLegend(items: Array<{ label: string; color: string; }>): string; //# sourceMappingURL=_shared.d.ts.map