/* 408-2 평면 상태줄 올림 — `logic/B05_Profile_RouteEdit_InfoLift.ts` 를 Node 로 돌려 JSON 한 줄 * (`test_408_2_status_lift.py` 가 판정). * node helper_408_2_status_lift.cjs */ const fs = require("fs"); const path = require("path"); const ts = require(path.join(__dirname, "..", "..", "config", "node_modules", "typescript")); const file = path.join( __dirname, "..", "..", "B05_Profile", "logic", "B05_Profile_RouteEdit_InfoLift.ts", ); const js = ts.transpileModule(fs.readFileSync(file, "utf8"), { compilerOptions: { module: ts.ModuleKind.CommonJS, target: ts.ScriptTarget.ES2020 }, }).outputText; const box = { exports: {} }; new Function("exports", "module", "require", js)(box.exports, box, require); const { infoLiftPx, bottomRowNarrow } = box.exports; // 화면 1078 px · 지도 칸 0~1078 process.stdout.write( JSON.stringify({ open: infoLiftPx(1078, 1078, 430), // 종단 판 열림(648 px) collapsed: infoLiftPx(1078, 1078, 1077), // 접힘(테두리 1 px) popout: infoLiftPx(1078, 1078, null), // 창 분할 = 판 없음 below: infoLiftPx(600, 600, 700), // 횡단 보기 = 판이 지도 아래 흐름 tall: infoLiftPx(1078, 1078, 20), // 판을 끝까지 올림 = 지도 안에 남김 // 408-4 지도 칸 1172 px · 횡단 판 접힘(손잡이 32) · 460 열림 · 891 넓힘 — 반 폭 200 아래면 쌓음 narrow: [32, 492, 891, 736, 737].map((side) => bottomRowNarrow(1172, side)), }), );