import { LitElement } from 'lit'; export declare class AmLyrics extends LitElement { static styles: import("lit").CSSResult; query?: string; musicId?: string; isrc?: string; ttml?: string; songTitle?: string; private downloadFormat; songArtist?: string; songAlbum?: string; songwriters?: string; songDurationMs?: number; highlightColor: string; fontFamily: string | undefined; autoScroll: boolean; interpolate: boolean; private showRomanization; private showTranslation; private toggleRomanization; private applyRomanization; private toggleTranslation; private applyTranslation; duration?: number; private _currentTime; set currentTime(value: number); get currentTime(): number; private isLoading; private lyrics?; private activeLineIndices; private activeMainWordIndices; private activeBackgroundWordIndices; private mainWordProgress; private backgroundWordProgress; private lyricsSource; private availableSources; private currentSourceIndex; private isFetchingAlternatives; private hasFetchedAllProviders; private _updateFooter; private animationFrameId?; private mainWordAnimations; private backgroundWordAnimations; private lyricsContainer?; private lastInstrumentalIndex; private userScrollTimeoutId?; private isUserScrolling; private isProgrammaticScroll; private isClickSeeking; private clickSeekTimeout?; private cachedLyricsLines; private cachedLineArray; private lineElementCache; private gapElementCache; private cachedAllGaps; private cachedIsUnsynced; private cachedLineData; private activeLineIds; private currentPrimaryActiveLine; private lastPrimaryActiveLine; private scrollAnimationState; private currentScrollOffset; private animatingLines; private scrollAnimationTimeout?; private scrollUnlockTimeout?; private fetchAbortController?; private lastActiveIndex; private visibleLineIds; private visibilityObserver?; private cachedScrollPaddingTop; private preActiveLineElements; private positionedLineElements; private activeGapLineElements; private _boundHandleUserScroll; private _boundAnimateProgress; connectedCallback(): void; disconnectedCallback(): void; private fetchLyrics; private onLyricsLoaded; private autoProcessLyrics; private static getRankForCollected; private static mergeAndSortSources; private switchSource; private resolveSongMetadata; private static parseQueryMetadata; private static searchLyricsPlusCatalog; private static fetchLyricsFromBiniLyrics; private static fetchLyricsFromYouLyPlus; /** * Parse LRC subtitle format into LyricsLine[]. * Handles "[mm:ss.xx] text" lines. */ private static parseLrcSubtitles; /** * Fetch lyrics from LRCLIB. * Uses search endpoint, prefers synced lyrics. */ private static fetchLyricsFromLrclib; private static fetchLyricsFromGenius; private static fetchLyricsFromUnison; private static calculateLineAlignments; private static parseTTML; private static convertKPoeLyrics; private static toMilliseconds; firstUpdated(): void; /** * Handle currentTime changes imperatively, bypassing Lit's render cycle. * This prevents the template from re-rendering on every frame, which would * reset imperative animation classes (highlight, finished, etc.) set by * updateSyllablesForLine. */ private _onTimeChanged; updated(changedProperties: Map): void; /** * Handle scrolling when active line indices change. * Called imperatively from _onTimeChanged instead of from updated(). * * Uses predictive scroll like YouLyPlus: computes a scrollLookAheadMs based * on the gap to the next line, finds the primary line at predictiveTime, * and scrolls with a duration matching the lookahead. */ private _handleActiveLineScroll; private _textWidthCanvas; private _textWidthCtx; private _getTextWidth; private _rebuildDomCache; private _getLineElement; private _getGapElement; private _invalidateCaches; private _updateCachedIsUnsynced; private _ensureLineDataCache; private _updateCharTimingData; private static arraysEqual; private static getLineIndexFromElement; private static getGapLoopDelay; private clearPreActiveClasses; private getPrimaryActiveLineIndex; private getPrimaryScrollLineIndex; private getOverlapClusterForActiveIndices; private focusLine; private setUserScrolling; private handleUserScroll; private clearPastLineHighlights; /** * Find the first (lowest-index) line whose raw time range contains `timeMs`. * Uses a stable forward scan so overlapping ranges always return the same * line, preventing primary-target jitter that causes scroll glitches. */ private getLineIndexAtTime; private findActiveLineIndices; private findInstrumentalGapAt; /** * Find ALL instrumental gaps in the song, regardless of current time. * Used by the template to always render gap elements in the DOM. */ private findAllInstrumentalGaps; private startAnimationFromTime; private updateActiveLineAndWords; private setupAnimations; private handleLineClick; private static getBackgroundTextPlacement; private scrollToActiveLine; private scrollToInstrumental; /** * Get the scroll padding top value from CSS variable */ private getScrollPaddingTop; /** * Animate scroll with staggered delay for smooth YouLyPlus-style scrolling */ private animateScrollYouLy; /** * Update position classes for YouLyPlus-style opacity/blur gradients */ private updatePositionClasses; /** * Scroll to active line with YouLyPlus-style animation */ private scrollToActiveLineYouLy; /** * Update syllable highlight animation - apply CSS wipe animation * (Exact copy from YouLyPlus _updateSyllableAnimation) */ private static updateSyllableAnimation; /** * Reset syllable animation state */ private static resetSyllable; /** * Reset all syllables in a line — batches deferred cleanup into a single rAF */ private static resetSyllables; /** * Gentle reset for normal playback: remove highlight/finished classes * without forcing inline styles. Lets CSS transition fade syllables * back to secondary colour smoothly. */ private static unfinishSyllables; private static finishSyllablesUpToTime; /** * Update syllables based on current time * Uses DOM caching and pre-highlight reset for smooth transitions */ private static updateSyllablesForLine; private animateProgress; private generateLRC; private generateTTML; private static formatTimestampLRC; private static formatTimestampTTML; private downloadLyrics; render(): import("lit-html").TemplateResult<1>; } //# sourceMappingURL=AmLyrics.d.ts.map