import { type ToolContext } from '../tools/types.js'; import { type PlacementCheckResult, type PlacementConstraintRegion, type SafeRegionPreference, type SafeRegionResult } from '../layout/placement.js'; import type { PrimitiveRotation } from './primitive-bounds.js'; export interface LivePlacementCandidateInput { width: number; height: number; /** Omit x/y to search for a safe region instead of validating a specific spot. */ x?: number; y?: number; rotation?: PrimitiveRotation; preference?: SafeRegionPreference; } export interface GatherLivePlacementCheckOptions { /** Extra caller-defined reserved regions, beyond the inferred title block. */ reservedRegions?: readonly PlacementConstraintRegion[]; minimumClearance?: number; /** primitiveIds to exclude from the live occupied-region set (e.g. the component being moved). */ excludePrimitiveIds?: readonly string[]; } export type LivePlacementCheckResult = ({ mode: 'check-placement'; } & PlacementCheckResult) | ({ mode: 'select-safe-region'; } & SafeRegionResult); /** * Reads live sheet geometry and every other placed primitive's real rendered * bounds, then either validates a specific candidate placement (`checkPlacement`) * or searches for a safe region for a given size (`selectSafeRegion`) -- * read-only, no writes. Existing unrelated primitives are read as occupied * regions and are never treated as free space. */ export declare function gatherLivePlacementCheck(ctx: ToolContext, projectId: string, candidate: LivePlacementCandidateInput, options?: GatherLivePlacementCheckOptions): Promise;