import type { PainterModule } from "./painter"; import { type Theme } from "./theme"; export interface ResolvedElement { /** * The element as it is declared in the theme. */ element: unknown; type: string; /** * Position of the anchor of the element. The element draws relative to it. */ offset: { x: number; y: number; }; } export interface ResolvedLayout { width: number; height: number; /** * Elements in the order they are declared in the theme. */ elements: ResolvedElement[]; } /** * Resolve the dimensions of the canvas and the position of the anchor of every element. * * Only elements referenced as an anchor or as a layout contributor are measured, * themes that use neither resolve without calling into any module. */ export declare function resolveLayout({ theme, modules, painterCtx, size, contributors, }: { theme: Theme; modules: Record; painterCtx: unknown; /** * Minimum dimensions of the canvas, as declared in the theme. */ size: { width: number; height: number; }; contributors?: string[]; }): Promise;