import type { FontSpec, TextLineMetrics } from './text-metrics'; import type { Sides } from './layout'; type PlotTitleAlign = `start` | `middle` | `end`; type PlotTitleFontOverrides = Partial; export type PlotTitleLineKind = `title` | `subtitle`; export interface PlotTitleConfig { text?: string; subtitle?: string; align?: PlotTitleAlign; max_lines?: number; gap?: number; font?: PlotTitleFontOverrides; subtitle_font?: PlotTitleFontOverrides; } export type PlotTitleProp = string | PlotTitleConfig; export declare const normalize_plot_title: (title: PlotTitleProp | null | undefined) => PlotTitleConfig | null; export declare const pad_for_plot_title: (pad: Required, config: PlotTitleConfig | null, width: number, height: number) => Required; interface PlotTitleLayoutInput { width: number; x?: number; y?: number; } export type PlotTitleMeasure = (text: string, font: Readonly) => TextLineMetrics; interface PlotTitleLine { readonly kind: PlotTitleLineKind; readonly text: string; readonly x: number; readonly y: number; readonly width: number; readonly ascent: number; readonly descent: number; readonly source: TextLineMetrics[`source`]; } export interface PlotTitleBlockLayout { readonly kind: PlotTitleLineKind; readonly label: string; readonly x: number; readonly y: number; readonly width: number; readonly height: number; readonly font: Readonly; readonly lines: readonly PlotTitleLine[]; } interface ResolvedPlotTitle { readonly align: PlotTitleAlign; readonly block_height: number; readonly title: PlotTitleBlockLayout | null; readonly subtitle: PlotTitleBlockLayout | null; } export declare function resolve_plot_title(config: PlotTitleConfig | null | undefined, input: PlotTitleLayoutInput, measure?: PlotTitleMeasure): ResolvedPlotTitle; export {};