"use client"; import type { VideoBlockProps } from "@/features/editor/state/editorStore"; import { NumericPropertyControl } from "@/features/editor/components/NumericPropertyControl"; import { ColorPickerField, TEXT_COLOR_PALETTE } from "@/features/editor/components/ColorPickerField"; export type VideoPropertiesPanelProps = { videoProps: VideoBlockProps; selectedBlockId: string; updateBlock: (id: string, partial: Partial) => void; }; export function VideoPropertiesPanel({ videoProps, selectedBlockId, updateBlock }: VideoPropertiesPanelProps) { // 비디오 소스 유형: 업로드(/api/video/:id) 또는 외부 URL 구분 const source: "url" | "upload" = videoProps.sourceType === "asset" || (videoProps.sourceUrl && videoProps.sourceUrl.startsWith("/api/video/")) ? "upload" : "url"; return ( <> {/* 비디오 소스 선택 (URL / 업로드) */}
{/* URL 입력 */} {source === "url" && (
{/* 접근성: 제목 / aria-label / 캡션 텍스트 (현재는 UI에서 숨김 처리) */}
)}
{/* 파일 업로드 */} {source === "upload" && (
)}

비디오 스타일

{/* 카드 배경색 */}
{ const next = hex && hex.trim().length > 0 ? hex : undefined; updateBlock(selectedBlockId, { backgroundColorCustom: next } as any); }} palette={TEXT_COLOR_PALETTE} />
{/* 정렬 */} {/* 너비 모드 */} {(videoProps.widthMode ?? "auto") === "fixed" && ( { updateBlock(selectedBlockId, { widthPx: v, } as any); }} /> )} {/* 카드 패딩 */} { const safe = Number.isFinite(v) && v >= 0 ? v : 0; updateBlock(selectedBlockId, { cardPaddingPx: safe } as any); }} /> {/* 카드 모서리 둥글기 */} { const safe = Number.isFinite(v) && v >= 0 ? v : 0; updateBlock(selectedBlockId, { borderRadiusPx: safe } as any); }} /> {/* 시작 시점 (초) */} { const safe = Number.isFinite(v) && v >= 0 ? v : 0; updateBlock(selectedBlockId, { startTimeSec: safe } as any); }} /> {/* 종료 시점 (초) */} { const safe = Number.isFinite(v) && v >= 0 ? v : 0; updateBlock(selectedBlockId, { endTimeSec: safe } as any); }} /> {/* 화면 비율 */} {/* 재생 옵션 */}
); }