에디터 인라인/속성 패널 리팩터링 및 폼 전송 기본 기능 추가
CI / pr_and_merge (push) Blocked by required conditions
CI / test (push) Has been cancelled

This commit is contained in:
2025-11-20 00:53:39 +09:00
parent 211b0f8230
commit a6ef5f01cd
29 changed files with 3371 additions and 1052 deletions
+90
View File
@@ -0,0 +1,90 @@
"use client";
import type {
Block,
SectionBlockProps,
TextBlockProps,
ButtonBlockProps,
} from "@/features/editor/state/editorStore";
export function createHeroTemplateBlocks(opts: {
sectionId: string;
createId: () => string;
}): { blocks: Block[]; lastSelectedId: string } {
const { sectionId, createId } = opts;
const sectionProps: SectionBlockProps = {
background: "default",
paddingY: "lg",
columns: [
{
id: `${sectionId}_col_1`,
span: 12,
},
],
};
const sectionBlock: Block = {
id: sectionId,
type: "section",
props: sectionProps,
sectionId: null,
columnId: null,
};
const firstColumnId = `${sectionId}_col_1`;
const heroHeadlineId = createId();
const heroHeadlineProps: TextBlockProps = {
text: "Hero 제목을 여기에 입력하세요",
align: "center",
size: "lg",
} as any;
const heroHeadline: Block = {
id: heroHeadlineId,
type: "text",
props: heroHeadlineProps,
sectionId,
columnId: firstColumnId,
};
const heroSubId = createId();
const heroSubProps: TextBlockProps = {
text: "제품이나 서비스를 한 문장으로 설명하는 서브텍스트입니다.",
align: "center",
size: "base",
} as any;
const heroSub: Block = {
id: heroSubId,
type: "text",
props: heroSubProps,
sectionId,
columnId: firstColumnId,
};
const heroButtonId = createId();
const heroButtonProps: ButtonBlockProps = {
label: "지금 시작하기",
href: "#",
align: "center",
size: "md",
variant: "solid",
colorPalette: "primary",
fullWidth: false,
borderRadius: "md",
fontSizeCustom: "14px",
fillColorCustom: "",
strokeColorCustom: "",
};
const heroButton: Block = {
id: heroButtonId,
type: "button",
props: heroButtonProps,
sectionId,
columnId: firstColumnId,
};
const blocks: Block[] = [sectionBlock, heroHeadline, heroSub, heroButton];
return { blocks, lastSelectedId: heroButtonId };
}