import { Box2 } from '../math/box2'; /** 画板布局模式。 */ export declare enum FrameLayoutMode { /** 自动布局:元素按行列规则自动排布。 */ AUTO = "auto", /** 自由布局:元素位置不受布局约束。 */ FREE = "free" } /** * FrameInfo 实现位于 `gizmo/frame-relation.ts`(gizmo 依赖收口); * 此处反向 re-export,保持 gesture-handler barrel 与既有引用不变。 */ export type FrameInfo = { id: string; box: Box2; layoutMode: FrameLayoutMode; children: string[]; layoutInfos: Record; }; /** 元素在自动布局中的位置信息。 */ export type LayoutInfo = { /** * 所在行号(可为小数)。 * 整数部分为主行号(0, 1, 2...),小数部分为分行后的子行号(如 1.5 表示第 1 行的第 5 个子行), * 仅支持两层(即小数部分为 0-9)。 */ row: number; /** 所在列号(必须为整数)。 */ column: number; /** 元素在布局中的位置(相对于画板左上角,可选)。 */ position?: [number, number]; }; /** Frame automatic-layout constraints. */ export type AutoLayoutConfig = { maxRowWidth?: number; maxRowCount?: number; };