import { Association, DiagramLayout, Entity, Geo, LogicalGroup, LogicalModel, ModelId, Note, Point, Style } from './types'; export interface ResolvedEntity { entity: Entity; geo: Geo; collapsed: boolean; /** 편집 잠금 (layout.locked 통과) — 캔버스 draggable·인스펙터 read-only 게이트 */ locked: boolean; /** 이 엔티티가 속한 그룹(있으면) — 캔버스가 parent 노드로 배치 */ groupRef?: ModelId; /** 헤더 바 색상 등 (레이아웃 style 참조 통과 — swatch 변경 시 computed 무효화) */ style?: Style; /** 속성별 강조 색상 (attribute modelId 참조) */ attributeStyles?: Record; /** 메서드별 강조 색상 (operation modelId 참조) */ operationStyles?: Record; } export interface ResolvedAssociation { association: Association; waypoints: Point[]; sourceColumnRef?: ModelId; targetColumnRef?: ModelId; } export interface ResolvedGroup { group: LogicalGroup; geo: Geo; /** 그룹 배경 색상 등 (레이아웃 style 참조 통과 — swatch 변경 시 computed 무효화) */ style?: Style; /** 편집 잠금 (layout.locked 통과) — 그룹 draggable·논리수정 게이트 */ locked: boolean; } export interface ResolvedNoteConnection { noteRef: ModelId; targetRef: ModelId; waypoints: Point[]; } export interface ResolvedNote { note: Note; /** * 이 노트가 시각적으로 포함된 그룹(있으면) — 캔버스가 parent 노드로 배치(상대좌표 렌더). * 엔티티 멤버십(LogicalGroup.memberEntityRefs, 논리)과 달리 노트 멤버십은 * GroupLayout.memberNoteRefs(레이아웃)에서 온다. note.geo는 절대좌표(깊은복제) 유지. */ groupRef?: ModelId; } export interface ResolvedDiagram { entities: ResolvedEntity[]; associations: ResolvedAssociation[]; groups: ResolvedGroup[]; notes: ResolvedNote[]; /** 노트 → 대상 엔티티 연결선 (대상이 존재하는 것만; dangling은 prune) */ noteConnections: ResolvedNoteConnection[]; } export interface AutoLayoutOptions { startX: number; startY: number; columnGap: number; rowGap: number; perRow: number; defaultSize: { width: number; height: number; }; } export declare function resolveDiagram(logical: LogicalModel, layout: DiagramLayout, autoLayoutOptions?: Partial): ResolvedDiagram;