UNPKG

@omnia/fx-models

Version:
156 lines (155 loc) • 4.81 kB
import { ToolbarProperties } from "./ToolbarProperties"; import { EditorCommand } from "./EditorCommand"; import { EditorMenuBar } from "./EditorMenuBar"; import { MultilingualString } from "../MultilingualString"; import { GuidValue } from "@omnia/fx-models/internal-do-not-import-from-here/shared/models"; import { RichTextEditorExtensionSettings } from "../RichTextEditorExtension"; export interface HeadingCommand extends EditorCommand { heading?: (option: { header: HeadingConfiguration; class: string; }) => void; } export interface HeadingMenuBar extends EditorMenuBar<HeadingCommand> { } export interface HeadingToolbarProperties extends ToolbarProperties<HeadingCommand>, HeadingToolbarSettings { } export interface HeadingToolbarSettings extends RichTextEditorExtensionSettings { headings: Array<GuidValue>; } export interface HeadingEditorExtensionConfiguration extends HeadingToolbarProperties { } export interface HeadingConfiguration extends HeadingStyleConfiguration { id: GuidValue; title: MultilingualString; hover?: HeadingStyleConfiguration; containerElement: string; class?: string; builtin: boolean; enabled: boolean; isHiddenStyle?: boolean; } export interface HeadingStyleConfiguration { fontSize: IHeadingFontSize; fontStyle: IHeadingFontStyle; fontColor: IHeadingFontColor; lineHeight: IHeadingLineHeight; fontFamily: IHeadingFontFamily; } export interface HeadingSettings { headings: Array<HeadingConfiguration>; } export interface IHeadingFontStyle { fontStyleType: FontStyleTypes; } export interface IHeadingFontColor { fontColorType: FontColorTypes; } export interface IHeadingFontSize { fontSizeType: FontSizeTypes; } export interface IHeadingLineHeight { lineHeightType: LineHeightTypes; } export interface IHeadingFontFamily { fontFamilyType: FontFamilyTypes; } export declare enum FontStyleTypes { Inherit = "IInheritFontStyle", Custom = "ICustomFontStyle" } export interface IInheritFontStyle extends IHeadingFontStyle { } export interface ICustomFontStyle extends IHeadingFontStyle { bold: boolean; italic: boolean; underline: boolean; } export declare class InheritFontStyle implements IInheritFontStyle { fontStyleType: FontStyleTypes; constructor(); } export declare class CustomFontStyle implements ICustomFontStyle { bold: boolean; italic: boolean; underline: boolean; fontStyleType: FontStyleTypes; constructor(bold: boolean, italic: boolean, underline: boolean); } export declare enum FontColorTypes { Inherit = "IInheritFontColor", Custom = "ICustomFontColor" } export interface IInheritFontColor extends IHeadingFontColor { } export interface ICustomFontColor extends IHeadingFontColor { value: string; } export declare class InheritFontColor implements IInheritFontColor { fontColorType: FontColorTypes; constructor(); } export declare class CustomFontColor implements ICustomFontColor { value: string; fontColorType: FontColorTypes; constructor(value: string); } export declare enum FontSizeTypes { Inherit = "IInheritFontSize", Custom = "ICustomFontSize" } export interface IInheritFontSize extends IHeadingFontSize { } export interface ICustomFontSize extends IHeadingFontSize { value: string; } export declare class InheritFontSize implements IInheritFontSize { fontSizeType: FontSizeTypes; constructor(); } export declare class CustomFontSize implements ICustomFontSize { value: string; fontSizeType: FontSizeTypes; constructor(value: string); } export declare enum LineHeightTypes { Inherit = "IInheritLineHeight", Custom = "ICustomLineHeight" } export interface IInheritLineHeight extends IHeadingLineHeight { } export interface ICustomLineHeight extends IHeadingLineHeight { value: string; } export declare class InheritLineHeight implements IInheritLineHeight { lineHeightType: LineHeightTypes; constructor(); } export declare class CustomLineHeight implements IInheritLineHeight { value: string; lineHeightType: LineHeightTypes; constructor(value: string); } export declare enum FontFamilyTypes { Inherit = "IInheritFontFamily", Custom = "ICustomFontFamily" } export interface IInheritFontFamily extends IHeadingFontFamily { } export interface ICustomFontFamily extends IHeadingFontFamily { value: string; } export declare class InheritFontFamily implements IInheritFontFamily { fontFamilyType: FontFamilyTypes; constructor(); } export declare class CustomFontFamily implements ICustomFontFamily { value: string; fontFamilyType: FontFamilyTypes; constructor(value: string); } export interface HeaderLevel { id: GuidValue; title: string; containerElement: string; }