import type { ParsedFigmaData } from './parser.js'; /** * Bounds data for a single node, relative to the root node origin. */ export interface NodeBounds { x: number; y: number; width: number; height: number; } /** * Metadata for a single node used in diagnostic context. */ export interface NodeMeta { name: string; type: string; parentId: string | null; } /** * Cached layout bounds data produced by render_preview, * consumed by generate_layout_ast and verify_layout_bounds. */ /** Variable definition from Figma API /variables/local */ export interface VariableDef { name: string; resolvedType: string; valuesByMode: Record; } export interface LayoutBoundsCache { fileKey: string; rootNodeId: string; rootWidth: number; rootHeight: number; /** nodeId → absolute bounds relative to root node */ bounds: Map; /** nodeId → node metadata (name, type, parentId) */ nodeInfo: Map; /** The full parsed node tree (for AST enrichment) */ nodeTree: ParsedFigmaData; /** VariableID → variable definition (from /variables/local API) */ variableDefs: Record; } /** * Build and store a LayoutBoundsCache from a fully processed nodeTree * (after injectBounds has been called). */ export declare function buildBoundsCache(nodeTree: ParsedFigmaData, fileKey: string, rootNodeId: string, variableDefs?: Record): LayoutBoundsCache; /** * Retrieve a cached LayoutBoundsCache, or null if not found. */ export declare function getBoundsCache(fileKey: string, rootNodeId: string): LayoutBoundsCache | null; /** * Manually set a LayoutBoundsCache entry (e.g. for testing). */ export declare function setBoundsCache(entry: LayoutBoundsCache): void; //# sourceMappingURL=bounds-cache.d.ts.map