import { Rect } from './Rect';
/*!
 * Packery v2.1.2
 * Gapless, draggable grid layouts
 *
 * Licensed GPLv3 for open source use
 * or Packery Commercial License for commercial use
 *
 * https://packery.metafizzy.co
 * Copyright 2013-2018 Metafizzy
 */
type SortDirection = 'downwardLeftToRight' | 'rightwardTopToBottom';
/**
 * @param {Number} width
 * @param {Number} height
 * @param {String} sortDirection
 *   topLeft for vertical, leftTop for horizontal
 */
export declare class Packer {
    width: number;
    height: number;
    sortDirection: SortDirection;
    spaces: Rect[];
    sorter: (a: Rect, b: Rect) => number;
    constructor(width: number, height: number, sortDirection?: SortDirection);
    reset(): void;
    pack(rect: Rect): boolean;
    placeInSpace(rect: Rect, space: Rect): void;
    placed(rect: Rect): void;
    mergeSortSpaces(): void;
    addSpace(rect: Rect): void;
    /**
     * Remove redundant rectangle from array of rectangles
     * @param {Array} rects: an array of Rects
     * @returns {Array} rects: an array of Rects
     **/
    static mergeRects(rects: Rect[]): Rect[];
}
export {};
//# sourceMappingURL=Packer.d.ts.map