import { Archive } from '../classes/Archive.js'; import { XmlFile } from '../classes/XmlFile.js'; import { FileMime } from '../enums.js'; /** * Represents the various 'scheme' elements that comprise a theme. * * Currently, only FontScheme is implemented. It functions as a fallback for * determining which fonts to apply when the StylesXml cannot determine which * font to apply for the required Normal style in MS Word. * * @TODO Implement ColorScheme and FormatScheme */ export declare type Font = { script?: string; typeface: string; }; export interface LatinFont extends Font { typeface: string; /** * The Panose system is used by ooxml and other word processors as a reference * system to classify fonts based on their attributes. e.g. Family, Serif, Weight, etc. * The system represents 10 attributes with a single (hex) digit for each, * with each attribute separated by a 0. */ panose: string; } export declare type FontScheme = { majorFont: { latinFont: LatinFont; otherFonts: Font[]; }; minorFont: { latinFont: LatinFont; otherFonts: Font[]; }; }; export declare class ThemeXml extends XmlFile { static contentType: FileMime; fontScheme: FontScheme; constructor(location: string); setFontScheme(fontScheme: FontScheme): void; getFontScheme(): FontScheme; setMajorFonts(latin: LatinFont, others: Font[]): void; getMajorFonts(): { latinFont: LatinFont; otherFonts: Font[]; }; setMinorFonts(latin: LatinFont, others: Font[]): void; getMinorFonts(): { latinFont: LatinFont; otherFonts: Font[]; }; toNode(): Document; static fromDom(dom: Document, location: string): Promise; /** * Instantiate this class by looking at the DOCX XML for it. */ static fromArchive(archive: Archive, location?: string): Promise; }