import type { Bounds } from './boundingbox'; import type { EasyScoreComposition, EasyScoreStaveSpec } from './easyscore/composition'; /** One drawn occurrence. Event-wide marks omit sourceHead. Systems, measures and pages start at one. */ export interface HeadOccurrence { sourceEvent: string; sourceHead?: number | string; /** Kind of ink. A cue or ossia preserves the identity of its underlying notehead, fret or mark. */ role: 'notehead' | 'fret' | 'mark'; reference?: 'cue' | 'ossia'; projection: boolean; /** Physical display staff and original rhythmic staff, respectively. */ staff: string; sourceStaff: string; measure: number; system: number; space: 'score' | 'page-mm'; page?: number; bounds: Bounds; } /** Lookup never depends on SVG markup. Keep a source ID across formats and rebuild the screen snapshot after reflow. */ export declare class HeadOccurrenceIndex { readonly occurrences: readonly HeadOccurrence[]; private readonly byEvent; constructor(occurrences: readonly HeadOccurrence[]); /** Omitting the head returns the whole event, including drawings registered on the event itself. */ get(event: string, head?: string | number): readonly HeadOccurrence[]; /** The smallest enclosing ink box wins where a head overlaps an event-wide mark. */ hitTest(x: number, y: number): HeadOccurrence | undefined; } /** Independently built cue fragments and condensed parts retain the original event's staff-local address. */ interface SourceView { measureOffset?: number; players?: readonly [string, string]; } /** Collect geometry after native formatting, in the same logical units for Canvas and SVG. */ export declare function collectHeads(score: EasyScoreComposition, staves: readonly Pick[], view?: SourceView): HeadOccurrence[]; /** Apply the same uniform scale and translation used to mount a score or inset on the final page. */ export declare function placedHead(head: HeadOccurrence, dx: number, dy: number, scale: number): HeadOccurrence; export {};