import type { FontInfo } from './font'; import { FretDiagramSpec } from './fretdiagram'; import { RenderContext } from './rendercontext'; type Alignment = 'left' | 'center' | 'right'; /** A short rhythmic example shares a baseline with the surrounding text. */ export interface OpeningRhythm { notes: readonly string[]; beam?: boolean; /** Written count and occupied count, e.g. [3, 2] for a triplet. */ tuplet?: readonly [number, number]; scale?: number; } export type OpeningRun = string | { text: string; font?: FontInfo; } | OpeningRhythm; export type OpeningBlock = ({ kind: 'text'; runs: readonly OpeningRun[]; } | { kind: 'diagrams'; diagrams: readonly (FretDiagramSpec & { label: string; })[]; }) & { align?: Alignment; font?: FontInfo; }; /** Measurements use the same drawing units as the score and apply only to this composition. */ export interface ScoreOpening { indent?: number; font?: FontInfo; blocks?: readonly OpeningBlock[]; } /** Lay out each line at the available width. Each diagram stays with its label as the group wraps. */ export declare function layoutOpening(opening: ScoreOpening, x: number, y: number, width: number): { height: number; overflow: number; draw(ctx: RenderContext): void; }; export {};