merge(sub_laptop_6): 552-3 묶음 부품 15 — 부품 모음 목록 import 충돌 양쪽 살림(552-2 기본 import + 552-3 부품 파일 import)
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
@@ -236,6 +236,7 @@ const { loadTs } = makeLoader({
|
||||
openDrawing: (item) => API.fetchDesignDrawing("p1", item.id),
|
||||
syncDrawings: (_, list) => calls.push(["sync", list.length]),
|
||||
};
|
||||
if (request.endsWith(".css")) return {}; // 부품 CSS(552-3) — 트랜스파일 안 함
|
||||
if (request.startsWith(".")) return loadTs(path.join(path.dirname(full), `${request}.ts`));
|
||||
throw new Error(`stub 없음: ${request}`);
|
||||
},
|
||||
|
||||
@@ -94,6 +94,7 @@ const { loadTs } = makeLoader({
|
||||
currentLanguageIndex: 0,
|
||||
ui_locales: new Proxy({}, { get: (_, key) => [String(key)] }),
|
||||
};
|
||||
if (request.endsWith(".css")) return {}; // 부품 CSS(552-3) — 트랜스파일 안 함
|
||||
if (request.startsWith(".")) {
|
||||
const target = path.join(path.dirname(full), `${request}.ts`);
|
||||
return fs.existsSync(target) ? loadTs(target) : {};
|
||||
|
||||
@@ -206,6 +206,7 @@ const { loadTs } = makeLoader({
|
||||
if (STUBS[request]) return STUBS[request];
|
||||
if (request === "@ui/ui_template_collapsible")
|
||||
return loadTs(path.join(UI, "ui_template_collapsible.ts"));
|
||||
if (request.endsWith(".css")) return {}; // 부품 CSS(552-3) — 트랜스파일 안 함
|
||||
if (request.startsWith(".")) {
|
||||
const target = path.join(path.dirname(full), `${request}.ts`);
|
||||
return fs.existsSync(target) ? loadTs(target) : {};
|
||||
|
||||
@@ -140,6 +140,7 @@ const { loadTs } = makeLoader({
|
||||
if (request === "@ui/ui_template_collapsible")
|
||||
return loadTs(path.join(ROOT, "ui_template", "ui_template_collapsible.ts"));
|
||||
if (request.endsWith(".css")) return {};
|
||||
if (request.endsWith(".css")) return {}; // 부품 CSS(552-3) — 트랜스파일 안 함
|
||||
if (request.startsWith(".")) return loadTs(`${path.resolve(path.dirname(full), request)}.ts`);
|
||||
return require(request);
|
||||
},
|
||||
|
||||
@@ -60,5 +60,7 @@ def test_빈_초안은_고침_아님_취향은_둠(out):
|
||||
def test_공용_이동_한_곳에서_부름():
|
||||
nav = (ROOT / "A00_Common/b_workflow_nav.ts").read_text(encoding="utf-8")
|
||||
assert "return enterProject(" in nav and "./b_project_switch" in nav
|
||||
ui = (ROOT / "ui_template/ui_template_elements.ts").read_text(encoding="utf-8")
|
||||
assert 'cancelLabel = "취소"' in ui and "label: cancelLabel" in ui
|
||||
ui = (ROOT / "ui_template/ui_template_modal.ts").read_text(
|
||||
encoding="utf-8"
|
||||
) # 확인창 = 부품(552-3)
|
||||
assert 'cancelLabel = "취소"' in ui and "okLabel: confirmLabel, cancelLabel" in ui
|
||||
|
||||
@@ -82,8 +82,8 @@ def test_1_가림막_저장도_도중_고침_검사() -> None:
|
||||
assert "const touched = !route && designSignature(ctx.projectId) !== sent;" in save
|
||||
assert "if (touched && locked)" in save and "저장 중 고친 값은 아직 저장 안 됨" in save
|
||||
assert "!locked && designSignature" not in save
|
||||
elements = _read("ui_template/ui_template_elements.ts")
|
||||
assert "keydown" not in elements[elements.index("function ensureOverlay") :][:1200]
|
||||
toast = _read("ui_template/ui_template_toast.ts") # 가림막 = 부품 「알림」(552-3)
|
||||
assert "keydown" not in toast[toast.index("function ensureOverlay") :][:1200]
|
||||
|
||||
|
||||
def test_8_저장_중_초기화_막음() -> None:
|
||||
|
||||
@@ -22,4 +22,4 @@ def test_banner():
|
||||
assert 'tone === "success" ? "✓ "' in ts # 색만으로 안 가름
|
||||
for tone in ("warning", "danger", "success"):
|
||||
assert f".ui-banner--{tone}" in css
|
||||
assert '"aria-label": "닫기"' in ts
|
||||
assert 'createIconButton({ icon: "x", title: "닫기", size: 20 })' in ts # 단추 부품(552-2)
|
||||
|
||||
@@ -0,0 +1,20 @@
|
||||
"""552-3 부품 「파일 놓기 칸」 지킴 시험 — 끌어 옴(.is-over) · 고르기 단추(단추 부품 28) · 진행 · 오류 · 막힘."""
|
||||
|
||||
from test_552_3_card import _text, check_part
|
||||
|
||||
|
||||
def test_drop():
|
||||
check_part(
|
||||
"drop",
|
||||
"ui_template_drop.ts",
|
||||
["ui_template_drop.css"],
|
||||
["createDrop"],
|
||||
["ui-drop", "ui-drop__text", "ui-drop__hint", "ui-drop__error", "is-over"],
|
||||
)
|
||||
ts, css = _text("ui_template_drop.ts"), _text("ui_template_drop.css")
|
||||
assert 'label: "파일 고르기"' in ts and "size: 28" in ts
|
||||
assert 'input.value = ""' in ts # 같은 파일 다시 고름
|
||||
assert "createProgressBar({ thick: 6 })" in ts
|
||||
assert '.ui-drop:is(.is-over, [data-state="hover"])' in css
|
||||
assert '.ui-drop:is(.is-error, [data-state="error"])' in css
|
||||
assert "min-height: 48px" in css
|
||||
@@ -0,0 +1,32 @@
|
||||
"""552-3 부품 「모달 · 확인창」 지킴 시험 — 폭 단 · 확인 · 위험 확인 · 글 묻기(prompt 대신) · 옛 부름 꼴 · 가림막 색."""
|
||||
|
||||
from test_552_3_card import _text, check_part
|
||||
|
||||
|
||||
def test_modal():
|
||||
check_part(
|
||||
"modal",
|
||||
"ui_template_modal.ts",
|
||||
["ui_template_modal.css"],
|
||||
["openModal", "buildModal", "confirmPanel", "askConfirm", "askText", "showConfirmDialog"],
|
||||
[
|
||||
"ui-modal",
|
||||
"ui-modal__top",
|
||||
"ui-modal__body",
|
||||
"ui-modal--wide",
|
||||
"ui-confirm",
|
||||
"ui-confirm__input",
|
||||
],
|
||||
)
|
||||
ts, css = _text("ui_template_modal.ts"), _text("ui_template_modal.css")
|
||||
assert 'width?: "24rem" | "40rem" | "960px"' in ts
|
||||
for w in ("24rem", "40rem", "960px"):
|
||||
assert f'.ui-modal[data-width="{w}"]' in css
|
||||
assert 'variant: opts.danger ? "danger" : "filled"' in ts
|
||||
assert "r.ok ? r.text : null" in ts # 취소 = null(prompt 와 같음)
|
||||
assert "background-color: var(--color-scrim);" in css and "rgba(" not in css
|
||||
elements = _text("ui_template_elements.ts")
|
||||
assert (
|
||||
'export { askConfirm, askText, showConfirmDialog } from "./ui_template_modal";' in elements
|
||||
)
|
||||
assert "export function showConfirmDialog" not in elements # 한 벌
|
||||
@@ -0,0 +1,25 @@
|
||||
"""552-3 부품 「⋯ · 오른쪽 메뉴」 지킴 시험 — 아이콘 단추 28 · 위험 = 확인창 · 한 번에 하나 장부 · 대시보드 rowMenu 가 부품을 씀."""
|
||||
|
||||
from test_552_3_card import ROOT, _text
|
||||
|
||||
|
||||
def test_row_menu():
|
||||
ts = _text("ui_template_context_menu.ts")
|
||||
head = ts[ts.index("부품 「⋯ · 오른쪽 메뉴」") :].split("*/", 1)[0]
|
||||
for word in ("꼴", "크기", "상태", "쓰는 법", "대신하는"):
|
||||
assert word in head, word
|
||||
assert "export function createRowMenu" in ts
|
||||
assert 'createIconButton({ icon: "dots", title: "더 보기", size: 28 })' in ts
|
||||
assert "if (open) enterMenu(entry);" in ts and "showConfirmDialog(" in ts
|
||||
css = _text("ui_template_context_menu.css")
|
||||
mine = css[css.index("(552-3)") :]
|
||||
assert "rgb" not in mine and "#" not in mine and "--b01-" not in mine
|
||||
assert '.ui-row-menu__item:is(:hover, [data-state="hover"]):not(:disabled)' in mine
|
||||
assert ".ui-row-menu__item.is-danger" in mine and ".ui-row-menu__item:disabled" in mine
|
||||
kit = (ROOT / "B01_Dashboard" / "B01_Dashboard_UI_PageKit.ts").read_text(encoding="utf-8")
|
||||
assert "createRowMenu as rowMenu, type RowMenuItem" in kit
|
||||
from test_552_3_card import kit_line
|
||||
|
||||
line = kit_line("row-menu")
|
||||
assert 'file: "ui_template_context_menu.ts"' in line and "demo:" in line
|
||||
assert "legacy: true" not in line
|
||||
@@ -0,0 +1,22 @@
|
||||
"""552-3 부품 「설정 줄」 지킴 시험 — 줄 52 · 오른쪽 55 % · 빈 값 「-」 · 대시보드 settingRow 가 부품을 씀."""
|
||||
|
||||
from test_552_3_card import ROOT, _text, check_part
|
||||
|
||||
|
||||
def test_setting_row():
|
||||
check_part(
|
||||
"setting-row",
|
||||
"ui_template_setting_row.ts",
|
||||
["ui_template_setting_row.css"],
|
||||
["settingRow", "settingCard"],
|
||||
["ui-setting-row", "ui-setting-row__text", "ui-setting-row__side", "ui-setting-card"],
|
||||
)
|
||||
css = _text("ui_template_setting_row.css")
|
||||
assert "min-height: 52px" in css and "max-width: 55%" in css
|
||||
b01 = ROOT / "B01_Dashboard"
|
||||
kit = (b01 / "B01_Dashboard_UI_PageKit.ts").read_text(encoding="utf-8")
|
||||
assert (
|
||||
'export { settingCard, settingRow, valueText } from "@ui/ui_template_setting_row";' in kit
|
||||
)
|
||||
profile = (b01 / "B01_Dashboard_UI_Profile.ts").read_text(encoding="utf-8")
|
||||
assert ".ui-setting-row__text" in profile and ".b01-pg-row" not in profile
|
||||
@@ -0,0 +1,23 @@
|
||||
"""552-3 부품 「표」 지킴 시험 — 일반 40 · 데이터 28 · ⋯ 칸 · 빈 줄 · 줄 상태 · 대시보드 dataTable 이 부품을 씀."""
|
||||
|
||||
from test_552_3_card import ROOT, _text, check_part
|
||||
|
||||
|
||||
def test_table():
|
||||
check_part(
|
||||
"table",
|
||||
"ui_template_table.ts",
|
||||
["ui_template_table.css"],
|
||||
["createTable", "tableShell", "tableRow", "emptyRow"],
|
||||
["ui-table", "ui-table--data", "ui-table-wrap", "ui-table__menucell", "ui-table__empty"],
|
||||
)
|
||||
css = _text("ui_template_table.css")
|
||||
assert "height: 40px" in css and "height: 28px" in css
|
||||
for state in (".is-active", ".is-changed", ".is-removed", "tr.is-sub"):
|
||||
assert state in css, state
|
||||
kit = (ROOT / "B01_Dashboard" / "B01_Dashboard_UI_PageKit.ts").read_text(encoding="utf-8")
|
||||
assert "createTable as dataTable," in kit # 한 벌 · 부름 꼴 그대로
|
||||
pages = (ROOT / "B01_Dashboard" / "B01_Dashboard_UI_Style_Pages.css").read_text(
|
||||
encoding="utf-8"
|
||||
)
|
||||
assert ".b01-pg-table" not in pages
|
||||
Reference in New Issue
Block a user