/** * @license Copyright © HatioLab Inc. All rights reserved. * * Placeholder → 도메인 type 변환 helper. * * 대상: board-import 가 떨어뜨린 generic-* placeholder 컴포넌트 — 사용자가 모델러에서 * 구체 type 으로 변환하는 액션. property-panel 의 shapes 섹션이 호출. * * 정책: * - **placeholder type 한정** — 일반 컴포넌트 (Stocker, Forklift 등) 는 대상 X. 안전. * - things-scene 의 `Scene.undoableChange` 로 감싸 undo/redo 자연스럽게 통합. * - 좌표/크기/회전/id 보존. 새 type 의 default state 는 클래스 생성자가 처리. * * things-scene 의 컴포넌트 type 변경은 클래스 자체 교체가 필요 (메서드 binding 이라). * 단순 `state.type` 갱신으론 부족 → 기존 컴포넌트 제거 + 새 type 으로 compile + 같은 위치에 추가. */ import { Component } from '@hatiolab/things-scene'; /** * 변환 대상 placeholder 인지 판정. property-panel 의 conditional 렌더 가드. */ export declare function isPlaceholderComponent(component: Component | undefined | null): boolean; export declare function getConvertibleTypes(): string[]; /** * placeholder 를 새 type 으로 변환. 좌표/크기/회전/id 보존. * * 동작: * 1) component.hierarchy 로 모델 snapshot * 2) 새 모델 = snapshot + { type: newType } * 3) Scene.undoableChange 안에서: removeSelf → compile(newModel) → parent.insertComponentAt 같은 index * 4) snapshot-commander 가 자동으로 undoable snapshot 캡처 * * 실패 (newType 미등록 / 컴포넌트 placeholder 아님 등) 시 throw. */ export declare function convertComponentType(component: Component, newType: string): void;