feat(M02): 359-2 목록 녹색 = 358-3 연결할 · 연결된 두 칸 먼저(없으면 옛 맞춤 숫자)

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_014utrjfoW831Vc5wJUd13kL
This commit is contained in:
2026-10-16 21:26:51 +09:00
co-authored by Claude Opus 5.5
parent ce483395bb
commit 86d82a78b2
3 changed files with 26 additions and 10 deletions
@@ -82,8 +82,20 @@ const won = (v: number | null | undefined): string =>
v === null || v === undefined ? "" : v.toLocaleString("ko-KR");
const note = (text: string): HTMLElement => el("span", { className: "m02-hopyo__note", text });
/** 목록 숫자 「연결된 줄 / 연결할 줄」 — 다 연결(같고 0 넘음)이면 참 · 0/0 은 색 없음 */
export const allLinked = (m: [number, number]): boolean => m[1] > 0 && m[0] === m[1];
/** 목록 숫자 「연결된 줄 / 연결할 줄」(358-3 두 칸 · 없으면 옛 맞춤 [제안, 줄]) — 다 연결(같고 0 넘음)이면 참 ·
* 0/0 은 색 없음 */
export function allLinked(h: {
맞춤: [number, number];
연결할?: number;
연결된?: number;
}): boolean {
const [done, all] = h.연결할 === undefined ? h.맞춤 : [h.연결된 ?? 0, h.연결할];
return all > 0 && done === all;
}
/** 목록 숫자 글 — 358-3 두 칸이 있으면 그것 */
const linkText = (h: { 맞춤: [number, number]; 연결할?: number; 연결된?: number }): string =>
h.연결할 === undefined ? `${h.맞춤[0]}/${h.맞춤[1]}` : `${h.연결된 ?? 0}/${h.연결할}`;
/** 엑셀 행(1부터)이 든 호표 번 · 없으면 null */
export const hopyoAtRow = (list: HopyoSpan[], row: number): number | null =>
@@ -280,8 +292,8 @@ export function openHopyoSheet(opt: HopyoSheetOptions): void {
else checked.delete(h.번);
paintGo();
});
const linked = note(`${h.맞춤[0]}/${h.맞춤[1]}`);
linked.classList.toggle("is-linked", allLinked(h.맞춤));
const linked = note(linkText(h));
linked.classList.toggle("is-linked", allLinked(h));
const row = el("div", {
className: `m02-hopyo-sheet__item${h.번 === current ? " is-current" : ""}`,
attrs: { "data-hopyo-no": String(h.번), title: `${h.이름} ${h.규격}`.trim() },