fix(M02): 31-3 합치기 충돌 표시 풀기 — 도면 카드(31-4) · 엑셀 카드(31-3) 둘 다 살림

- main_laptop_1 의 auto 커밋(99a514d9)이 ItemCards · Structure · UI_Main 에 충돌 표시를 그대로 올림 — 군데마다 양쪽을 합침
- ItemCards: 글(도면 버림 물음 + 저장 글) · 옵션(onDirty + sheetEdit) · 손잡이 dirty = 도면 또는 엑셀 · saveAll = 도면 먼저 · 엑셀 · discard 새로 · 옛 hideToolbar 는 DrawingCard 몫이라 뺌
- DrawingCard: save() 드러냄(위 [저장]이 먼저 부름 · 못 하면 던짐)
- Structure: 다른 항목 고름 물음은 한 번(카드 셋 모두) · 확인이면 discard 뒤 읽음 · 손잡이 dirty 한 벌 · saveCards
- UI_Main: 떠나기 · 창 닫기 막기 = busy()(이 화면 + 카드 둘)
- 시험 test_m02_drawing_card 물음 판정을 합친 모양으로

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01Ly2oHAaTDYRjcniAmHR81z
This commit is contained in:
2026-09-30 20:38:52 +09:00
co-authored by Claude Opus 5.5
parent 99a514d9b8
commit 63c6fa360c
5 changed files with 29 additions and 57 deletions
@@ -75,6 +75,8 @@ export interface DrawingCardHandle {
/** 카드 머리에 붙일 [저장] · ? (보기만이면 빈 칸) */
tools: HTMLElement;
dirty: () => boolean;
/** 고친 것이 있으면 카드 [저장]과 같이 저장 — 못 하면 던짐(위 [저장]이 먼저 부름) */
save: () => Promise<void>;
destroy: () => void;
}
@@ -153,6 +155,11 @@ export function mountDrawingCard(host: HTMLElement, opt: DrawingCardOptions): Dr
return {
tools: el("span", { className: "m02-struct__tools", children: edit ? [help, save] : [] }),
dirty: () => dirty,
save: async () => {
if (!dirty) return;
await doSave();
if (dirty) throw new Error(TEXT.failed.replace("{value}", ""));
},
destroy: () => {
handle.destroy();
helpBox.remove();