import type { MouseEvent as ReactMouseEvent, KeyboardEvent as ReactKeyboardEvent, FocusEvent as ReactFocusEvent } from 'react'; import type { ConstructableLayoutApi } from './ApiRegistry'; import type { Coordinate, StructureItemType } from './DashboardJSON'; import type { Mode, SelectedItem } from './DashboardState'; export type LayoutCapability = 'zoom' | 'gridlines' | 'line-shape' | 'shapes' | 'icon-gallery' | 'empty-visualization' | 'input-alignment' | 'layout-type-switch' | 'layering' | 'layout-display-options' | 'fullscreen-fit-to-width'; export interface Dimension { width: number | string; height: number | string; } export type SelectionEvent = MouseEvent | ReactMouseEvent | ReactKeyboardEvent | ReactFocusEvent; export interface RenderResponsiveLineProps { from: Coordinate; to: Coordinate; onLineSelect: (e: SelectionEvent) => void; } export type DragHandleRenderMetadata = { dragHandlePortal?: React.MutableRefObject; }; type ItemDimensionProps = Dimension | (Dimension & { y: number; canvasHeight: number; }) | RenderResponsiveLineProps; export type LayoutItemProps = DragHandleRenderMetadata & ItemDimensionProps; export type OnItemSelected = (e: SelectionEvent, items: SelectedItem[]) => void; export type RenderLayoutItem = (itemId: string, props: LayoutItemProps, type: StructureItemType, onSelected?: OnItemSelected) => JSX.Element; export interface BaseLayoutProps { containerHeight: number; containerWidth: number; layoutId: string; layoutStructure?: TStructure; mode: Mode; onLayoutItemsSelect: (selectedItems: SelectedItem[]) => void; onLayoutStructureChange: (structure: TStructure) => void; options?: TOptions; renderLayoutItem: RenderLayoutItem; selectedItems?: SelectedItem[]; } export interface LayoutStatics { initialShowGrid?: boolean; config?: { name?: string; description?: string; layoutApi?: ConstructableLayoutApi; scrollOnItemAdd?: boolean; structureSchema?: Record; supports?: LayoutCapability[]; }; } export {}; //# sourceMappingURL=Layouts.d.ts.map