import { type Snippet } from 'svelte'; import { type GridItem, type GridDensity } from '../../../utils/layoutGrid.js'; export type DashboardGridDensity = GridDensity; export interface DashboardWidgetMeta { id: string; title?: string; description?: string; type?: string; loading?: boolean; empty?: boolean; /** When false, no card border/header (frameless body). Default true. */ showChrome?: boolean; /** Remove body padding (often with frameless). */ flush?: boolean; /** Show collapse control in header. Ignored when showChrome is false. */ collapsible?: boolean; /** Called when the user clicks reload in the header. */ onReload?: () => void | Promise; } export interface DashboardGridSettings { cols: number; rowHeight: number; gap: number; compact: boolean; editable: boolean; showGrid: boolean; density: GridDensity | 'custom'; } interface DashboardGridProps { layout?: GridItem[]; /** Optional titles/meta keyed by layout id */ widgets?: DashboardWidgetMeta[]; cols?: number; rowHeight?: number; gap?: number; editable?: boolean; /** Allow drag-to-move (off = use config panel / toolbar instead) */ draggable?: boolean; compact?: boolean; /** Draw dashed cell guides */ showGrid?: boolean; /** Built-in density / cols / gap controls */ showToolbar?: boolean; density?: GridDensity | 'custom'; minRows?: number; /** Extra empty rows below content while editing */ padRows?: number; showSizeBadge?: boolean; emptyTitle?: string; emptyDescription?: string; class?: string; /** Custom body per widget id */ render?: Snippet<[DashboardWidgetMeta, GridItem]>; onchange?: (layout: GridItem[]) => void; onsettingschange?: (settings: DashboardGridSettings) => void; onselect?: (id: string) => void; onedit?: (id: string) => void; selectedId?: string | null; onremove?: (id: string) => void; onadd?: () => void; onreset?: () => void; /** Label shown in the drop placeholder while dragging */ dropLabel?: string; /** * Container width (px) below which the grid stacks into a single column. * Measured on the grid itself (sidebar-aware). Pass `false` to disable. * Default `960`. */ stackBelow?: number | false; } declare const DashboardGrid: import("svelte").Component; type DashboardGrid = ReturnType; export default DashboardGrid;