feat(M01): 로직 개선 시험 알약에서 마스터 화면으로 잇기 · 단가 없는 재료 알약에 이유 한 마디 (PLAN 5-3 · 5-4)
Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01PAdA5ThqmtVSsbzjusk1cJ
This commit is contained in:
@@ -59,6 +59,16 @@ export function takePendingLogicKey(): string | null {
|
||||
}
|
||||
}
|
||||
|
||||
/** 「로직 개선 시험」 알약 → 마스터 화면 — 표(키) 또는 요소(그룹 · 키 · 파일) */
|
||||
export type MasterJump =
|
||||
{ kind: "table"; key: string } | { kind: "element"; group: string; ref: string; file?: string };
|
||||
|
||||
let masterJump: (target: MasterJump) => void = () => {};
|
||||
export const setMasterJump = (fn: (target: MasterJump) => void): void => {
|
||||
masterJump = fn;
|
||||
};
|
||||
export const jumpToMaster = (target: MasterJump): void => masterJump(target);
|
||||
|
||||
/** 요소 화면에서 열 것 — 파일 · 하위 거름(구분·세부분류) · 상세구분 · 제목 */
|
||||
export interface Pick {
|
||||
group: string;
|
||||
@@ -82,6 +92,8 @@ export interface SideHandle {
|
||||
labHost: HTMLElement;
|
||||
/** 그룹의 파일 판본을 다시 받음(저장 뒤) — 돌려받는 것 = 새 목록 */
|
||||
refresh: (group: string) => Promise<FileInfo[]>;
|
||||
/** 그룹의 파일 목록(이미 받은 것) */
|
||||
files: (group: string) => FileInfo[];
|
||||
setActive: (id: string | null) => void;
|
||||
/** 좁은 화면에서 사용자가 거름을 다 골랐을 때 부를 것 — 패널을 접어 목록을 드러냄 */
|
||||
setOnPicked: (fn: () => void) => void;
|
||||
@@ -456,5 +468,6 @@ export function buildSide(
|
||||
const setOnPicked = (fn: () => void): void => {
|
||||
onPicked = fn;
|
||||
};
|
||||
return { root, logicHost, comboHost, labHost, refresh, setActive, setOnPicked, filter };
|
||||
const files = (group: string): FileInfo[] => lists.get(group as Group) ?? [];
|
||||
return { root, logicHost, comboHost, labHost, refresh, files, setActive, setOnPicked, filter };
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user