/** * The experiments view's "generate paper figure" pure rules: render one * metric's comparison rows as a standalone SVG bar-chart document (zero * dependencies, no CSS variables — the file must render identically outside * the panel's theme), derive its destination file name in the paper's * `figures/` directory, and compose the LaTeX-safe caption the wiki's * figures table registers. DOM-free so every rule is unit-testable. * @module dsh-client-ui-mimir/client/metric-figure */ import type { MetricChartRow } from './view-common.ts'; import type { MetricDirection } from 'dsh-mimir/types'; /** Escape the five XML specials so names/values can ride SVG text safely. */ export declare function escapeXml(text: string): string; /** * Escape the LaTeX specials a generated caption can contain (metric keys like * `pa_mpjpe` carry an underscore; experiment names are free text). The * figure block inserts the caption verbatim, so an unescaped `_` would break * the compile. */ export declare function escapeLatex(text: string): string; /** * The destination file name of one metric's figure inside the paper's * `figures/` directory: `metric-.svg` with every run of unsafe * characters folded to a single dash and edge dashes trimmed. An all-unsafe * key falls back to `metric-chart.svg` so the name is never empty. */ export declare function metricFigureFileName(metricKey: string): string; /** * The caption one metric figure registers and the LaTeX block carries: the * metric key plus every compared run's name and value, LaTeX-escaped, with * the metric's direction spelled out when one is set (#220). Runs * keep the chart's order (oldest first), so the caption reads like the bars. */ export declare function metricFigureCaption(metricKey: string, rows: readonly MetricChartRow[], direction?: MetricDirection): string; /** * Render one metric's comparison rows as a self-contained SVG document: one * horizontal bar per run on a ZERO baseline (negative bars extend left of it, * matching the panel chart — both consume the same {@link barSpans} rule, * #220), the run name wrapped to two lines in the label lane, and the * formatted value at each bar's far edge. The best run under the metric's * direction is shaded darker (`none` shades nothing). An empty row * list still yields a valid, title-only document. */ export declare function metricFigureSvg(metricKey: string, rows: readonly MetricChartRow[], direction?: MetricDirection): string; //# sourceMappingURL=metric-figure.d.ts.map