import type { AlignmentTickContexts } from './formatter'; import { Voice } from './voice'; /** Equal durations occupy equal horizontal distances. */ export interface ProportionalSpacing { mode: 'proportional'; /** Omit to fit the available width, or choose the minimum scale when no width is supplied. */ pixelsPerQuarter?: number; } /** Optical spacing reserves measured ink first and distributes spare width by square-root duration. */ export type MeasuredSpacing = ProportionalSpacing | { mode: 'optical'; }; /** Build a common rational timeline without advancing time for clefs or barlines. */ export declare class ProportionalFormatter { readonly contexts: AlignmentTickContexts; private readonly anchors; private readonly quarterTicks; private readonly duration; private origin; private tail; private minimumScale; private centeredWidth; constructor(voices: Voice[], resolutionMultiplier: number); /** Convert an exact timeline key once, at the point where pixels are needed. */ private quarters; /** Measure each stave independently so unrelated onsets on other staves do not compete. */ private measure; /** Compute one scale and validate it before changing any anchor positions. */ private dimensions; /** Find the earliest legal anchor at each onset. A wide mark still occupies * its stave while other staves advance. Extra width can only enlarge gaps. */ private opticalLayout; /** Minimum total width for autoWidth, honoring a supplied exact scale. */ minimumWidth(spacing: MeasuredSpacing): number; /** Convert a single exact time scale into the same placement data as optical spacing. */ private proportionalLayout; /** Place anchors and prefixes, retaining the established centering exception for measure rests. */ format(spacing: MeasuredSpacing, width: number): number; }