react-grid-layout
Version:
A draggable and resizable grid layout with responsive breakpoints, for React.
34 lines (30 loc) • 3.1 kB
TypeScript
import { L as Layout, C as CompactType, a as LayoutItem } from './types-Cxf4nHNr.js';
export { A as ArrayElement, B as Breakpoint, n as BreakpointCols, b as Breakpoints, c as Compactor, p as DeepPartial, k as DragConfig, h as DragOverEvent, m as DropConfig, D as DroppingPosition, E as EventCallback, j as GridConfig, G as GridDragEvent, e as GridResizeEvent, M as Mutable, o as OnBreakpointChangeCallback, O as OnLayoutChangeCallback, f as PartialPosition, P as Position, i as PositionStrategy, g as ReactDraggableCallbackData, l as ResizeConfig, d as ResizeHandleAxis, R as ResponsiveLayouts, S as Size, r as defaultDragConfig, t as defaultDropConfig, q as defaultGridConfig, s as defaultResizeConfig } from './types-Cxf4nHNr.js';
export { c as collides, h as findOrGenerateResponsiveLayout, a as getAllCollisions, e as getBreakpointFromWidth, f as getColsFromBreakpoint, g as getFirstCollision, j as getIndentationValue, i as sortBreakpoints, s as sortLayoutItems, d as sortLayoutItemsByColRow, b as sortLayoutItemsByRowCol } from './responsive-C4L1ESlm.js';
export { z as absoluteStrategy, b as bottom, c as cloneLayout, a as cloneLayoutItem, t as compactItemHorizontal, q as compactItemVertical, k as correctBounds, A as createScaledStrategy, B as defaultPositionStrategy, d as getCompactor, g as getLayoutItem, i as getStatics, h as horizontalCompactor, p as horizontalOverlapCompactor, j as modifyLayout, m as moveElement, l as moveElementAwayFromCollision, n as noCompactor, u as perc, x as resizeItemInDirection, r as resolveCompactionCollision, f as setTopLeft, s as setTransform, y as transformStrategy, v as validateLayout, e as verticalCompactor, o as verticalOverlapCompactor, w as withLayoutItem } from './position-Dk2b4ZMS.js';
export { d as GridCellConfig, G as GridCellDimensions, P as PositionParams, h as calcGridCellDimensions, e as calcGridColWidth, c as calcGridItemPosition, f as calcGridItemWHPx, b as calcWH, a as calcXY, g as clamp } from './calculate-mgLpNJ5O.js';
/**
* Legacy compaction API - backwards compatibility layer.
*
* This file implements the exact v1 compaction algorithm for backwards compatibility.
* The algorithm matches lib/utils.js compact/compactItem functions exactly.
*/
/**
* Compact a layout by removing gaps between items.
*
* This is the exact algorithm from lib/utils.js compact function.
*
* @param layout - Layout to compact
* @param compactType - 'vertical', 'horizontal', or null
* @param cols - Number of columns in the grid
* @param allowOverlap - If true, overlapping is allowed
* @returns Compacted layout
*/
declare function compact(layout: Layout, compactType: CompactType, cols: number, allowOverlap?: boolean): LayoutItem[];
/**
* Compact a single item within the layout.
*
* @deprecated Use compact() instead, which handles the full layout.
*/
declare function compactItem(compareWith: Layout, l: LayoutItem, compactType: CompactType, cols: number, fullLayout: Layout, allowOverlap: boolean | undefined, maxY: number | undefined): LayoutItem;
export { CompactType, Layout, LayoutItem, compact, compactItem };