유형 B 파이프라인 연결: block_assembler type B 조립 + zone 기반 전환 시작

- block_assembler: _assemble_slide_html_type_b 추가 (filled/after용 HTML 생성)
- fit_verifier: redistribute()가 ROLE_ZONE_MAP 대신 containers zone 사용
- renderer: render_slide_from_html()에 zone 기반 높이 탐색 추가
- pipeline: 팝업 HTML CSS를 콘텐츠 유형별(table/list/text) 분기
- run_from_stage1b: MDX 파일 하드코딩 제거 + layout_template 전달 추가

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
This commit is contained in:
2026-04-07 04:39:02 +09:00
parent ef9bae7711
commit d4eaec694c
6 changed files with 476 additions and 38 deletions

View File

@@ -547,9 +547,24 @@ def render_slide_from_html(
_tokens = _ldt()
_header_h = _tokens.get("header_height", 66)
_gap_small = _tokens["spacing_small"]
_bg_h = int(redist.get("배경", containers.get("배경", {}).get("height_px", 0)))
_core_h = int(redist.get("본심", containers.get("본심", {}).get("height_px", 0)))
_footer_h = int(redist.get("결론", containers.get("결론", {}).get("height_px", 0)))
# zone 기반으로 body/footer 높이를 동적 탐색 (유형 A: 배경+본심, 유형 B: zone별)
def _find_h(role_name, zone_name=None):
"""redist → containers 순으로 높이 탐색. role_name 없으면 zone으로 fallback."""
h = redist.get(role_name, 0)
if h:
return int(h)
ci = containers.get(role_name, {})
if ci:
return int(ci.get("height_px", 0))
if zone_name:
for _r, _c in containers.items():
if isinstance(_c, dict) and _c.get("zone") == zone_name:
return int(redist.get(_r, _c.get("height_px", 0)))
return 0
_bg_h = _find_h("배경")
_core_h = _find_h("본심")
_footer_h = _find_h("결론", "footer")
_body_row_h = _bg_h + _core_h + _gap_small if _bg_h and _core_h else 0
if _body_row_h > 0 and _footer_h > 0:
grid_rows = f"auto {_body_row_h}px {_footer_h}px"