feat(M02): 구조물 옵션 정의 = 명세 이름 고치기 칸(명세 있는 종류 · 52-11)

- 명세가 있는 종류(STRUCTURE_SPECS)는 컨테이너 제목 › 항목 이름 › 값 이름 나무 · 이름만 고침 · 키 · 필수/선택 · 꼴은 읽기만
- 필수 컨테이너 제목 = 정의 그룹 이름 자리 · 나머지 = 종류.이름 표(B05 · B06 그리기와 같은 차례)
- 미리보기 = B05 · B06 명세 폼에 고친 이름 · 빈 이름은 저장 막음 · [저장] = 새 판 + 이력(48장 길 그대로)
- 옛 편집기(옵션 · 배치 · 그룹 · 규칙 · 기준 측점)는 명세 종류에서 숨김 · 명세 없는 종류는 그대로
- 시험: test_m02_so_def_spec(정의 사본) · ui_checks/52-11_정의_이름고치기

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01UoSr2sqvYtBf1dtQdus88s
This commit is contained in:
2026-10-05 23:42:11 +09:00
co-authored by Claude Opus 5.5
parent 9f3a00041d
commit 103a207cee
9 changed files with 501 additions and 15 deletions
+26 -14
View File
@@ -26,6 +26,8 @@ import {
} from "./M02_SO_Def_Model";
import { buildOptionsBlock } from "./M02_SO_Def_Options";
import { buildRulesBlock } from "./M02_SO_Def_Rules";
import { buildSpecBlock } from "./M02_SO_Def_Spec";
import { STRUCTURE_SPECS } from "../../A00_Common/design/design_structure_pipe";
import { checkBox, textBox } from "./M02_SO_Def_Ui";
import { buildGroupBlock } from "./M02_SO_Groups";
import { to } from "./M02_SO_Text";
@@ -182,6 +184,8 @@ function drawDef(first: StructDef, opt: DefScreenOptions): void {
}
const edit = canEdit();
const extra = (): NonNullable<StructDef["종류"][string]> => (d.종류[type.type_id] ??= {});
// 명세가 있는 종류(PLAN 52) = 이름만 고침 — 옛 편집기(옵션 · 배치 · 그룹 · 규칙 · 기준 측점)는 숨김
const spec = STRUCTURE_SPECS[type.type_id];
detail.replaceChildren(
el("div", {
className: "m02-sod__kindhead",
@@ -196,16 +200,20 @@ function drawDef(first: StructDef, opt: DefScreenOptions): void {
edit,
attr: "data-sod-kind-off",
}),
checkBox(
to("BaseStationShow"),
baseShown(d, type.type_id),
(v) => {
if (v) delete extra().기준측점;
else extra().기준측점 = false;
changed();
},
{ edit, attr: "data-sod-base" },
),
...(spec
? []
: [
checkBox(
to("BaseStationShow"),
baseShown(d, type.type_id),
(v) => {
if (v) delete extra().기준측점;
else extra().기준측점 = false;
changed();
},
{ edit, attr: "data-sod-base" },
),
]),
...(d.종류[type.type_id]?.동작 ?? []).map((a) => {
const tag = createTag(a, "neutral");
tag.title = d.동작[a] ?? "";
@@ -213,10 +221,14 @@ function drawDef(first: StructDef, opt: DefScreenOptions): void {
}),
],
}),
buildOptionsBlock({ def: d, type, edit, open, changed }),
buildLayoutBlock({ def: d, type, edit, changed }),
buildGroupBlock({ list: (d.그룹[type.type_id] ??= []), edit, changed }),
buildRulesBlock({ def: d, type, edit, changed }),
...(spec
? [buildSpecBlock({ def: d, type, spec, edit, changed })]
: [
buildOptionsBlock({ def: d, type, edit, open, changed }),
buildLayoutBlock({ def: d, type, edit, changed }),
buildGroupBlock({ list: (d.그룹[type.type_id] ??= []), edit, changed }),
buildRulesBlock({ def: d, type, edit, changed }),
]),
);
};