// 포팅된 JavaScript 2D 엔진의 공개 interface입니다.
export class Viewer2D {
  constructor(container: HTMLElement);
  /** Render a DWG/DXF parseResult. `keepView` preserves pan/zoom on re-render. */
  load(result: unknown, opts?: { keepView?: boolean }): void;
  /** Zoom-extents to the loaded drawing. */
  fit(): void;
  /** Resync renderer/camera to the container size (call after un-hiding). */
  resize(): void;
  onSelect(cb: (entity: unknown) => void): void;
  setZoomSpeed(speed: number): void;
  getZoomSpeed(): number;
  setTheme(dark: boolean): void;
  setGrid(visible: boolean): void;
  getLayerInfo(): { name: string; colorHex: string; count: number; visible: boolean }[];
  setHiddenLayers(nameSet: Set<string>): void;
  getZoomPercent(): number;
  onViewChange(cb: () => void): () => void;
  getStats(): { entities: number; blocks: number };
  snapshotWebPBlob(): Promise<Blob | null>;
  startMeasure(cb: (r: { phase: string; ax: number; ay: number; az: number; bx: number; by: number; bz: number; d: number }) => void): void;
  stopMeasure(): void;
  setAccent(hex: string): void;
  /** RAF, DOM listener, WebGL 자원과 canvas를 멱등으로 해제합니다. */
  dispose(): void;
}
