import { Graph, Layout } from '../types'; /** * Box metrics. Kept here rather than in the renderer because the layout has to * agree with the drawing about how big a box is, and two copies of that drift. */ export declare const METRICS: { headerHeight: number; rowHeight: number; paddingX: number; /** Rough width of one character at the font size the renderer uses. */ charWidth: number; minWidth: number; maxWidth: number; /** Room for the type, drawn right-aligned on the same row as the name. */ typeGutter: number; }; export type Direction = 'TB' | 'LR'; /** * How many fields a box shows before it gives up and counts the rest. * * Strapi's own `File` has fifteen, and a diagram where one box is four times * the height of its neighbours reads as a wall rather than a shape. The whole * list is still a click away in the Content-Type Builder; the picture is for * seeing how things connect. */ export declare const MAX_ROWS = 12; /** What a box actually draws, and how much it is leaving out. */ export declare const rowsOf: (node: Graph["nodes"][number]) => { fields: import('../types').Field[]; hidden: number; }; /** * Positions every box and routes every line. * * dagre does the hard part. It runs on the server, which is the whole point: * the incumbents in this category all layout in the browser with a React graph * library, which is what tied them to React and styled-components versions and * is why both of them broke. A layered-graph algorithm has no opinion about the * UI framework, and the SVG it feeds can be produced with no browser at all. */ export declare const layout: (graph: Graph, direction?: Direction) => Layout; export default layout;