import { type ComponentType } from "react"; import { type StyleProp, type ViewStyle } from "../../style/index.js"; import { type DragDropProviderProps, type DropZoneProps, type DraggableProps, type DragHandleProps } from "../drag-drop/drag-drop.shared.js"; import { type DashboardTier, type DashboardWidget } from "./dashboard-grid.logic.js"; import { type DashboardGridSkin } from "./dashboard-grid.styles.js"; export type { DashboardWidget, DashboardTier }; /** * Forget the widget order saved under `storageKey`, so the next uncontrolled DashboardGrid * seeded from that key falls back to `defaultOrder` (or the `items` array order). This is * what a "Reset layout" action calls. A no-op wherever there is no storage (native, SSR), * matching the write side, and safe to call for a key that was never written. */ export declare function clearStoredDashboardOrder(storageKey: string): void; /** * KIT-INTERNAL: the px width of a cell spanning `span` of the 12 columns, in a grid `width` * wide whose cells sit `gap` apart. The board is modeled as 12 equal column units separated * by 11 gaps, so a multi-column span also swallows the gaps it straddles: two 6-column cells * plus the one gap between them fill the row exactly, as do twelve 1-column cells and their * eleven gaps. Floored, so rounding can only ever leave a sub-pixel sliver rather than * overflow the row into an extra wrap. Deliberately NOT re-exported from the platform entry * files: it is the layout's own arithmetic, not public API. */ export declare function dashboardCellWidth(width: number, span: number, gap: number): number; export interface DashboardGridProps { /** The widgets to lay out, and the canonical collection prop. Their array order is the * fallback order: any widget whose id is missing from the active order is appended, so * adding one to a release never breaks a saved layout. */ items?: DashboardWidget[]; /** * Deprecated alias for `items`, kept working so existing call sites are untouched. Pass * `items` instead: it is the spelling every collection-taking component in the kit uses * (Sidebar, StackedList, DescriptionList, Feed, Stats). `items` wins if both are passed. * @deprecated Use `items`. */ widgets?: DashboardWidget[]; /** * CONTROLLED widget order, as ids. The primary path: the consuming app owns the array and * persists it through its own API, applying each `onOrderChange`. Ids the widget list does * not hold are ignored, and widgets missing from it are appended, so a stored order * survives a release that adds or drops a widget. */ order?: string[]; /** Initial order for UNCONTROLLED use; the grid then applies each drop itself. Defaults to * the `items` array order. */ defaultOrder?: string[]; /** Fired with the full, reconciled next order after every drop that changes it, in BOTH * the controlled and the uncontrolled mode. */ onOrderChange?: (order: string[]) => void; /** Customize mode: cells gain the edit affordance and a drag grip, and the board becomes * reorderable. The grid never flips this itself; the app owns the "Done" / "Customize" * control. Locked (the default) the drag provider is not mounted at all. */ unlocked?: boolean; /** Web-only convenience for the UNCONTROLLED path: seed the initial order from browser * storage under this key and write each drop back to it. Ignored when `order` is passed * (the controlled order owns persistence). On native there is no storage, so the order is * session-only there; `clearStoredDashboardOrder` forgets a saved layout. A server-rendered * board renders `defaultOrder` first and adopts the saved layout in the commit right after * hydration, so React always hydrates against the markup the server actually sent. */ storageKey?: string; compact?: boolean; /** E2E hook forwarded to the root element. */ testID?: string; /** Outer layout composition only (width/flex within a parent), never a restyle hook. */ style?: StyleProp; } export interface DashboardGridParts { DragDropProvider: ComponentType; DropZone: ComponentType; Draggable: ComponentType>; DragHandle: ComponentType; } /** Build a DashboardGrid component from a platform skin and its platform-styled parts. */ export declare function createDashboardGrid(skin: DashboardGridSkin, parts?: DashboardGridParts): (props: DashboardGridProps) => import("react").JSX.Element; //# sourceMappingURL=dashboard-grid.shared.d.ts.map