chordsong
Version:
ChordSong is a simple text format for the notation of lyrics with guitar chords, and an application that renders them to portable HTML pages.
35 lines (34 loc) • 862 B
TypeScript
import { Chord } from './Chord';
export declare const chordsRegEx: RegExp;
interface Replacement {
index: number;
length: number;
replacement: string;
}
interface Directive {
title: string;
content: string;
}
export type RenderMode = 'chordName' | 'diagram';
export declare class Renderer {
chords: {
[name: string]: Chord;
};
directives: Directive[];
replacements: Replacement[];
chordRenderMode: RenderMode;
text: string;
constructor(text: string, defaultRenderMode?: RenderMode);
get title(): string;
get artist(): string;
directive(name: string): string;
parseChords(): void;
parseDirectives(): number;
parseLyricsComments(): void;
private renderDirective;
private renderChord;
private renderDiagram;
renderDiagrams(): string;
render(): string;
}
export {};