feat(B07): 그린 것을 블록으로 저장해 다시 놓고, 사진 넣기를 되살린다

조사표 4·7절 검토 결과를 반영한다.

- 블록 라이브러리: 선택한 객체를 이름 붙여 저장(BLOCK)하고 팔레트에서 골라
  클릭 한 번으로 놓는다(INSERT). 정의-참조 링크 없는 클론 방식이라 새 엔티티
  타입 없이 기존 직렬화·groupId를 그대로 쓴다. 기준점은 선택 영역 중심.
  라이브러리는 도면과 분리해 브라우저에 두고, 유실 대비로 파일 내보내기·
  가져오기를 붙였다.
- 사진 넣기: IMAGEATTACH가 파일 선택창을 띄우지 않아 도구가 FILE_SELECTED를
  영원히 기다리고 있었다. 도구형 명령도 run()을 함께 부르게 하고 파일 선택을
  붙여 되살렸다.
- 조사표 4·7절의 반영 등급·반영 열을 실제 코드에 맞춰 정정하고, 반영하지
  않기로 한 항목의 사유를 절마다 남겼다. 7절은 신규 구현 없음.

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
This commit is contained in:
2026-08-30 14:00:42 +09:00
co-authored by Claude Opus 5
parent eb4303253a
commit 3fccf8278b
13 changed files with 500 additions and 40 deletions
@@ -1,10 +1,10 @@
/** 명령 실행기 — 리본 버튼·명령행·단축키가 모두 이 경로로 들어온다. */
import { toast } from 'react-toastify';
import { Actor } from 'xstate';
import type { CadCommand } from './command.types';
import { getCommandById, resolveCommandInput } from './registry';
import { HtmlEvent } from '../App.types';
import { getSelectedEntities, setActiveToolActor } from '../state';
import type { CadCommand } from './command.types';
import { getCommandById, resolveCommandInput } from './registry';
const COMMAND_HISTORY_LIMIT = 200;
@@ -34,6 +34,8 @@ export function runCommand(command: CadCommand): string {
if (command.machine) {
setActiveToolActor(new Actor(command.machine));
// 도구를 켠 뒤 준비 동작이 필요한 명령(파일 선택 등)은 run()도 함께 부른다
command.run?.();
log(`${command.id} ${command.label}`);
return command.id;
}