flipper-plugin
Version:
Flipper Desktop plugin SDK and components
20 lines • 904 B
TypeScript
/**
* Copyright (c) Meta Platforms, Inc. and affiliates.
*
* This source code is licensed under the MIT license found in the
* LICENSE file in the root directory of this source tree.
*
* @format
*/
import { Rect } from './Rect';
export declare const SNAP_SIZE = 16;
export declare function snapGrid(val: number): number;
export declare function getPossibleSnappedPosition(windows: Array<Rect>, { getGap, getNew, }: {
getNew: (win: Rect) => number;
getGap: (win: Rect) => number;
}): number | undefined;
export declare function getDistanceTo(props: Rect, win: Rect): number;
export declare function distance(x1: number, y1: number, x2: number, y2: number): number;
export declare function maybeSnapLeft(props: Rect, windows: Array<Rect>, left: number): number;
export declare function maybeSnapTop(_props: Rect, windows: Array<Rect>, top: number): number;
//# sourceMappingURL=snap.d.ts.map