- Marks 블록 덧칸 `어긋남 {줄합, 금액, 차, 덮음, 줄 [{행, 이름, 묶음, 셈, 금액, 차, 까닭}], 까닭}` · 읽기만
- SheetMap `missesOf` = 상세 시트 행 차례(덮음 실패 = 블록 머리 행 · 재현 못 한 줄 = 그 줄 행) · 칠 안 바꿈
- SheetNav 머리 막대 아래 띠(부품 createBanner) 「엑셀 셈 어긋남 n」 + [보기 i/m] 차례로 뛰기 · 그 행 까닭은 막대 글
- 북부청 임도 = 2 · 33(엑셀 합이 진동로울러 노무 뺌 · 차 2,637.1 · 3,418.7) · 64 · 95(글 꼴 밖 줄) · 81 맞음 · 영월 0
- 시험 새 test_778_5_hopyo_excel_misses · test_779_2 어긋남 한 줄 · helper_779_4 missesOf
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
40 lines
1.5 KiB
JavaScript
40 lines
1.5 KiB
JavaScript
/* 779-4 엑셀 보기 창 칠 · 뛸 곳 헬퍼 — `logic/M02_MasterTemplete_Hopyo_SheetMap.ts`(순수)를 트랜스파일해 Node 로 돌림.
|
|
* stdin = {grid(책 뺀 격자), briefs, blocks, drafts{번: 캐시}, tones[[상태, 체크, 캐시, 차례]], at[[시트, 행]]}
|
|
* stdout = {tones[{tone, mine}], blocks[{tone, 글}], jumps[[Jump]], paint{시트: {행: 꼴}}} JSON. */
|
|
const path = require("path");
|
|
const { makeLoader } = require("./helper_ts_stub_loader.cjs");
|
|
|
|
const ROOT = path.join(__dirname, "..", "..");
|
|
const { loadTs } = makeLoader({ root: ROOT });
|
|
const map = loadTs(
|
|
path.join(ROOT, "M02_MasterTemplete", "logic", "M02_MasterTemplete_Hopyo_SheetMap.ts"),
|
|
);
|
|
|
|
let raw = "";
|
|
process.stdin.on("data", (c) => (raw += c));
|
|
process.stdin.on("end", () => {
|
|
const input = JSON.parse(raw);
|
|
const out = {
|
|
tones: (input.tones ?? []).map(([s, c, d, at]) => map.lineTone(s, c, d, at)),
|
|
blocks: (input.blockTones ?? []).map((m) => map.blockTone(m ?? undefined)),
|
|
};
|
|
if (input.grid) {
|
|
const ix = map.indexOf(input.grid);
|
|
out.jumps = (input.at ?? []).map(([sheet, row]) => map.jumpsAt(ix, sheet, row));
|
|
const paint = map.paintOf(
|
|
ix,
|
|
input.briefs ?? [],
|
|
input.blocks ?? [],
|
|
(no) => (input.drafts ?? {})[no] ?? null,
|
|
);
|
|
out.misses = map.missesOf(ix, input.blocks ?? []); // 778-5 D-6
|
|
out.paint = Object.fromEntries(
|
|
[...paint].map(([sheet, rows]) => [
|
|
sheet,
|
|
Object.fromEntries([...rows].map(([r, m]) => [r, m.tone])),
|
|
]),
|
|
);
|
|
}
|
|
process.stdout.write(JSON.stringify(out));
|
|
});
|