@sheetxl/models
Version:
Models - A Headless javascript spreadsheet library.
78 lines • 2.32 kB
TypeScript
import { SerializableProperties } from "../primitives";
import { AdjustedColor, SchemeColorLookup } from "../color";
import { IDocThemes } from "./IDocThemes";
export interface ColorSchemeValues {
dk1: AdjustedColor;
lt1: AdjustedColor;
dk2: AdjustedColor;
lt2: AdjustedColor;
accent1: AdjustedColor;
accent2: AdjustedColor;
accent3: AdjustedColor;
accent4: AdjustedColor;
accent5: AdjustedColor;
accent6: AdjustedColor;
hlink: AdjustedColor;
folHlink: AdjustedColor;
name: string;
}
export interface IColorScheme extends Readonly<ColorSchemeValues> {
}
export interface FontSchemeValues {
majorFont: string;
minorFont: string;
name: string;
}
export interface IFontScheme extends Readonly<FontSchemeValues> {
}
export interface DocThemeValues {
name: string;
colorScheme: ColorSchemeValues;
fontScheme: FontSchemeValues;
}
/**
* A collection of colors, fonts, and effects that determine the overall look of your document.
*/
export interface IDocTheme extends Omit<DocThemeValues, "colorScheme" | "fontScheme"> {
/** Human readable text describing the theme */
readonly name: string;
/**
* A set of colors that are used in a document.
*/
readonly colorScheme: IColorScheme;
/**
* A set of fonts that are used in a document.
*/
readonly fontScheme: IFontScheme;
/**
* This is available for functions that want to resolve themed colors
*
* @remarks
* In most instances the scheme lookup from the style should be used unless specifically
* rendering for a theme.
*/
schemeLookup(): SchemeColorLookup;
/**
* If a custom theme or built in theme.
*/
isCustom(): boolean;
/**
* Parses the color using the current Theme schema (if required)
* @param str
*
* @remarks
* In most instances the scheme lookup from the style should be used unless specifically
* rendering for a theme.
*/
parseColor(str: string): AdjustedColor;
/**
* Creates a persistable version of Themes
*/
toJSON(): SerializableProperties<DocThemeValues>;
}
export interface SelectedDocThemeContext {
currentTheme: IDocTheme;
currentThemes: IDocThemes;
darkMode: boolean;
}
//# sourceMappingURL=IDocTheme.d.ts.map