UNPKG

@sheetxl/models

Version:

Models - A Headless javascript spreadsheet library.

92 lines 2.53 kB
import { ImmutableRectangle } from './Coordinates'; import AdjustedColor from '../color/AdjustedColor'; import { SchemeColorLookup } from '../color/AdjustedColor'; export default abstract class Fill { _private: any; constructor(); get isRotatedWithShape(): boolean; readonly abstract type: string; abstract toJSON(): any; } export declare class Tile { _private: any; constructor(json: any); toJSON(): any; get align(): any; get mirror(): any; get bounds(): any; } export declare class NoneFill extends Fill { toJSON(): { none: boolean; }; get type(): string; } export declare class BackgroundFill extends Fill { toJSON(): { background: boolean; }; get type(): string; } export declare class GroupFill extends Fill { toJSON(): { group: boolean; }; get type(): string; } export declare class SolidFill extends Fill { constructor(json: any, schemeLookup?: SchemeColorLookup); get color(): any; toRGBA(): any; toJSON(): { solid: any; }; get type(): string; } export declare class PatternFill extends Fill { constructor(fill: any, schemeLookup?: SchemeColorLookup); get patternType(): string; get foreground(): AdjustedColor; get background(): AdjustedColor; toJSON(): { pattern: any; }; get type(): string; } export declare class GradientStop { _offset: number; _color: AdjustedColor; constructor(offset: number, color: AdjustedColor); get offset(): number; get color(): AdjustedColor; } /** * TODO - fill to and tile are treated differently in office but are similar concepts for both gradient and image. We need to review and rationalize */ export declare class GradientFill extends Fill { constructor(json: any, schemeLookup?: SchemeColorLookup); get stops(): GradientStop[]; get gradientType(): string; get angle(): number; get fillTo(): ImmutableRectangle; get tile(): Tile; toJSON(): { gradient: any; }; get type(): string; } export declare class ImageFill extends Fill { constructor(json: any, _schemeLookup?: SchemeColorLookup); get ref(): string; get alpha(): number; get insets(): ImmutableRectangle; get stretch(): ImmutableRectangle; get tile(): Tile; toJSON(): { image: any; }; get type(): string; } export declare const resolveFill: (fill: any, schemeLookup: SchemeColorLookup) => Fill | null; //# sourceMappingURL=Fills.d.ts.map