feat: FormBlock 컨트롤러 정리 및 15.1 SEO/head 메타 관리 추가
CI / test (push) Failing after 7m19s
CI / pr_and_merge (push) Has been skipped

This commit is contained in:
2025-11-27 11:20:38 +09:00
parent 48e13d2a75
commit e16f8298ab
9 changed files with 341 additions and 147 deletions
+12
View File
@@ -684,6 +684,12 @@ export interface ProjectConfig {
bodyBgColorHex?: string;
headHtml?: string;
trackingScript?: string;
// SEO / 메타 설정 (15.1)
seoTitle?: string;
seoDescription?: string;
seoOgImageUrl?: string;
seoCanonicalUrl?: string;
seoNoIndex?: boolean;
}
// 공통 블록 모델
@@ -803,6 +809,12 @@ const createEditorState = (set: any, get: any): EditorState => ({
bodyBgColorHex: "#020617",
headHtml: "",
trackingScript: "",
// SEO 기본값: 필요할 때만 값을 채우고, 없으면 title 등을 사용한다.
seoTitle: "",
seoDescription: "",
seoOgImageUrl: "",
seoCanonicalUrl: "",
seoNoIndex: false,
},
updateProjectConfig: (partial: Partial<ProjectConfig>) => {
+4 -22
View File
@@ -861,26 +861,10 @@ export const computeFormControllerPublicTokens = (
);
const mappedSubmitLabel = (mappedSubmitButton?.props as ButtonBlockProps | undefined)?.label ?? null;
const widthMode = props.formWidthMode ?? "auto";
const formStyle: CSSProperties = {};
// FormBlock 은 레이아웃/스타일을 가지지 않는 순수 컨트롤러이므로
// formClassName 은 고정 기본값만 사용하고, formStyle 은 항상 빈 객체로 유지한다.
const formClassNames = ["space-y-3"];
if (widthMode === "full") {
formClassNames.push("w-full");
}
if (widthMode === "fixed" && typeof props.formWidthPx === "number" && props.formWidthPx > 0) {
formStyle.width = pxToEm(props.formWidthPx);
}
if (typeof props.marginYPx === "number") {
const marginEm = pxToEm(props.marginYPx);
formStyle.marginTop = marginEm;
formStyle.marginBottom = marginEm;
}
if (props.backgroundColorCustom && props.backgroundColorCustom.trim() !== "") {
formStyle.backgroundColor = props.backgroundColorCustom.trim();
}
const formStyle: CSSProperties = {};
return {
fields,
@@ -920,10 +904,8 @@ export const computeFormBlockExportTokens = (
fallbackFields = props.fields;
}
// FormBlock 은 Export 레이어에서도 컨테이너 배경/레이아웃 스타일을 가지지 않는다.
const formStyleParts: string[] = [];
if (typeof props.backgroundColorCustom === "string" && props.backgroundColorCustom.trim() !== "") {
formStyleParts.push(`background-color:${props.backgroundColorCustom.trim()}`);
}
return {
hasControllerFields: controllerFields.length > 0,