From d21252eb1fe665d3a55a459cc0d450aea35597e8 Mon Sep 17 00:00:00 2001 From: Jaybe Date: Tue, 18 Nov 2025 06:26:02 +0900 Subject: [PATCH] =?UTF-8?q?=ED=85=8D=EC=8A=A4=ED=8A=B8/=EB=B2=84=ED=8A=BC/?= =?UTF-8?q?=EC=9D=B4=EB=AF=B8=EC=A7=80/=EC=84=B9=EC=85=98=20=EB=B8=94?= =?UTF-8?q?=EB=A1=9D=20=ED=83=80=EC=9E=85=20=ED=99=95=EC=9E=A5=20=EB=B0=8F?= =?UTF-8?q?=20=EC=97=90=EB=94=94=ED=84=B0=20UI=20=EC=97=B0=EB=8F=99?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/app/editor/page.tsx | 420 ++++++++++++++++++----- src/features/editor/state/editorStore.ts | 86 ++++- tests/e2e/editor.spec.ts | 24 ++ tests/unit/editorStore.spec.ts | 42 ++- 4 files changed, 474 insertions(+), 98 deletions(-) diff --git a/src/app/editor/page.tsx b/src/app/editor/page.tsx index 47f976f..1b0c8a6 100644 --- a/src/app/editor/page.tsx +++ b/src/app/editor/page.tsx @@ -17,12 +17,21 @@ import { } from "@dnd-kit/sortable"; import { CSS } from "@dnd-kit/utilities"; import { useEditorStore } from "@/features/editor/state/editorStore"; -import type { Block } from "@/features/editor/state/editorStore"; +import type { + Block, + TextBlockProps, + ButtonBlockProps, + ImageBlockProps, + SectionBlockProps, +} from "@/features/editor/state/editorStore"; export default function EditorPage() { const blocks = useEditorStore((state) => state.blocks); const selectedBlockId = useEditorStore((state) => state.selectedBlockId); const addTextBlock = useEditorStore((state) => state.addTextBlock); + const addButtonBlock = useEditorStore((state) => state.addButtonBlock); + const addImageBlock = useEditorStore((state) => state.addImageBlock); + const addSectionBlock = useEditorStore((state) => state.addSectionBlock); const updateBlock = useEditorStore((state) => state.updateBlock); const selectBlock = useEditorStore((state) => state.selectBlock); const replaceBlocks = useEditorStore((state) => state.replaceBlocks); @@ -166,6 +175,27 @@ export default function EditorPage() { > 텍스트 블록 추가 + + +

Text / Image / Button / Section 블록을 이 영역에서 추가할 수 있습니다.

@@ -214,66 +244,189 @@ export default function EditorPage() {

속성 패널

{selectedBlockId ? (
-
-

선택한 텍스트 블록 내용

-