import { Accidental } from './accidental'; import { InlineOssia } from './anchoreddetail'; import type { Bounds } from './boundingbox'; import { ContinuousSpan, SpanFragment } from './continuousspan'; import type { EasyScoreComposition, EasyScoreCompositionSpec, EasyScoreStaffState } from './easyscore/composition'; import type { PlacedCompositionMark } from './easyscore/engraving'; import type { InteriorBar } from './easyscore/independentmeter'; import type { SystemTextLanes } from './easyscore/textlanes'; import { Element } from './element'; import { ScoreOpening } from './openinglayout'; import { RenderContext } from './rendercontext'; import type { SheetOptions, SheetRow } from './sheet'; import type { Stave } from './stave'; export interface ContinuousBoundary { /** One-based source measure number, independent of rest compression. */ measure: number; breakBefore?: 'force' | 'keep'; rehearsal?: string; navigation?: { kind: 'segno' | 'coda'; id: string; } | { kind: 'dalSegno' | 'toCoda'; target: string; } | { kind: 'daCapo' | 'fine'; }; repeatStart?: boolean; repeatEnd?: boolean; keepRest?: boolean; } export interface ContinuousOptions { /** Opening blocks above the first system and extra horizontal indent before its connector. */ opening?: ScoreOpening; /** Align lead harmonies and verses across each printed system and continue their connectors across breaks. */ textLanes?: 'system'; /** Fit horizontal ink profiles of adjacent staves and rows. Defaults to the traditional full-width envelope. */ verticalSpacing?: 'profile' | 'envelope'; /** Extra measured ink on this stave, in current score coordinates. Measure numbers are one-based. */ inkBounds?: (stave: Stave, measure: number) => readonly Bounds[]; /** Reflow staff-local measure grids on a common rhythmic timeline. */ independentMeters?: boolean; mode?: 'balanced' | 'greedy'; boundaries?: readonly ContinuousBoundary[]; /** Ordered event IDs share one native duration ratio and a bracket that follows them across systems. */ tuplets?: readonly { id: string; members: readonly string[]; numNotes: number; notesOccupied: number; side?: 'above' | 'below'; }[]; spans?: readonly ContinuousSpan[]; /** Cue-sized passages that follow a specific event when the systems reflow. */ ossias?: readonly InlineOssia[]; hideEmptyStaves?: boolean; compressRests?: boolean; measureNumbers?: boolean; courtesy?: boolean; /** Aligned half or quarter notes, or eighth notes with a native beam on one of the two staves. */ splitChords?: readonly { id: string; upper: string; lower: string; }[]; groups?: readonly { first: string; last: string; type: 'brace' | 'bracket'; barlines?: boolean; }[]; } export interface ContinuousRow extends SheetRow { /** Height above the first system reserved for the score opening. */ openingHeight?: number; measures: number[]; visibleStaves: string[]; restGroups: number[][]; } type State = Required; /** A row has one shared staff map. A compressed rest maps back to every original measure. */ export declare class ContinuousLayout { private readonly score; private readonly spec; private readonly interiorBars; private readonly textLanes?; readonly hidden: Set; readonly diagnostics: { code: 'RowOverflow' | 'CurveCollision' | 'SplitStemAlignment' | 'SpanOverflow' | 'StaffSpacingLimit'; measures: number[]; source?: string; }[]; readonly fragments: SpanFragment[]; /** Event-owned ossias and individual pedal signs in final sheet coordinates. */ readonly detailMarks: PlacedCompositionMark[]; private readonly details; readonly rows: ContinuousRow[]; private readonly rowInk; private readonly marks; private readonly boundaries; private readonly spans; private readonly names; private readonly groups; private drawing; private readonly headerLabels; /** Reuse measured labels when a resize moves a measure to another row. */ private headerLabel; private headerParts; private readonly splitChords; private readonly spelledSpans; private readonly options; /** Keep incoming ties and beams clear of the repeated clef at a row start. */ private readonly continuationPadding; private readonly arrivals; constructor(score: EasyScoreComposition, spec: EasyScoreCompositionSpec, starts: State[][], ends: State[][], placed?: Set, interiorBars?: InteriorBar[], textLanes?: SystemTextLanes | undefined); /** Only undecorated, wholly resting measures can disappear into a numbered rest. */ private plainRest; /** Add cached signs for the candidate boundaries and reserve actual end-modifier width. */ private boundaryWidth; private units; private endWidth; private install; /** Reserve the full 14 px brace width and the 8 px offset of each additional connector. */ private connectorWidth; private indent; /** Preserve staves carrying a spanning instruction or cross-staff note, including silent middle rows. */ private visible; private suppress; format(options: Required, alignedWidths?: readonly number[]): ContinuousRow[]; /** A tie only needs other fret numbers; a slur can run past modifiers or other positions of its own chord. */ private tabCurveInk; /** The selected digits can have different widths or positions within their respective chords. */ private tabSlurEnds; /** Choose one side for the whole TAB curve after the positions of all its frets are known. */ private fitTabCurveRows; /** Measure native ink once the horizontal positions and beam fits for this row are known. */ private measureStaffInk; /** Share the largest required staff distance across all measures, bounded to four native refits. */ private alignStaves; /** Fit local curves and labels to their native notes before comparing adjoining staff profiles. */ private profileSpans; /** Fit the music and its curves first, then reserve a shared baseline for each text lane. */ private fitTextLanes; /** Reconcile staff envelopes across all measures in a row, then translate the entire solved row once. */ private layoutRow; /** Carry the source syllable's distance from its top staff line to each continuation. */ private lyricBaseline; /** Keep continuation hooks and labels on the correct end when a span crosses a row. */ private makeFragment; /** Add labels, connectors and numbered rests after all native positions have settled. */ private decorate; draw(context: RenderContext): void; } export {};