From 676e58cad79a9dc1e183f87373deee2264d0748b Mon Sep 17 00:00:00 2001 From: Jaybe Date: Tue, 9 Dec 2025 18:53:21 +0900 Subject: [PATCH 1/2] =?UTF-8?q?=ED=85=8C=EB=A7=88=20=EC=A0=81=EC=9A=A9?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- next-env.d.ts | 2 +- src/app/api/export/route.ts | 17 +- src/app/editor/EditorCanvas.tsx | 10 +- .../forms/FormCheckboxPropertiesPanel.tsx | 60 ++-- src/app/editor/forms/FormControllerPanel.tsx | 68 ++--- .../editor/forms/FormInputPropertiesPanel.tsx | 56 ++-- .../editor/forms/FormRadioPropertiesPanel.tsx | 60 ++-- .../forms/FormSelectPropertiesPanel.tsx | 46 +-- src/app/editor/page.tsx | 81 ++--- src/app/editor/panels/BlocksSidebar.tsx | 101 ++++--- .../editor/panels/ButtonPropertiesPanel.tsx | 32 +- .../editor/panels/DividerPropertiesPanel.tsx | 10 +- .../editor/panels/ImagePropertiesPanel.tsx | 12 +- src/app/editor/panels/ListPropertiesPanel.tsx | 12 +- .../editor/panels/ProjectPropertiesPanel.tsx | 40 +-- src/app/editor/panels/PropertiesSidebar.tsx | 12 +- .../editor/panels/SectionPropertiesPanel.tsx | 20 +- src/app/editor/panels/TextPropertiesPanel.tsx | 16 +- .../editor/panels/VideoPropertiesPanel.tsx | 14 +- src/app/login/page.tsx | 42 ++- src/app/page.tsx | 4 +- src/app/preview/page.tsx | 23 +- src/app/projects/[slug]/submissions/page.tsx | 137 +++++++-- src/app/projects/page.tsx | 43 +-- src/app/projects/submissions/page.tsx | 23 +- src/app/signup/page.tsx | 96 +++++- .../editor/components/ColorPickerField.tsx | 30 +- .../components/NumericPropertyControl.tsx | 4 +- .../editor/components/PropertySliderField.tsx | 4 +- .../editor/components/PublicPageRenderer.tsx | 75 +++-- src/features/editor/utils/formHelpers.ts | 8 +- src/styles/builder.css | 32 +- src/styles/editor.css | 55 ++++ src/styles/globals.css | 1 + test-results/.last-run.json | 6 +- .../error-context.md | 37 +++ tests/api/export.spec.ts | 16 + tests/unit/AllProjectSubmissionsPage.spec.tsx | 50 ++++ tests/unit/BlocksSidebar.spec.tsx | 72 +++++ tests/unit/ButtonPropertiesPanel.spec.tsx | 101 +++++++ tests/unit/ColorPickerField.spec.tsx | 93 ++++++ tests/unit/DividerPropertiesPanel.spec.tsx | 39 +++ tests/unit/EditorCanvasBackground.spec.tsx | 28 +- tests/unit/EditorFormBlocksStyle.spec.tsx | 152 ++++++++++ tests/unit/EditorPageBackground.spec.tsx | 98 +++++- tests/unit/EditorSelectionFocus.spec.tsx | 118 ++++++++ tests/unit/FormControllerPanel.spec.tsx | 181 ++++++++++- tests/unit/FormFieldPropertiesPanels.spec.tsx | 283 ++++++++++++++++++ tests/unit/ImagePropertiesPanel.spec.tsx | 39 +++ tests/unit/ListPropertiesPanel.spec.tsx | 111 +++++++ tests/unit/LoginPage.spec.tsx | 80 +++++ tests/unit/NumericPropertyControl.spec.tsx | 33 ++ tests/unit/PreviewCanvasPreset.spec.tsx | 12 + tests/unit/ProjectPropertiesPanel.spec.tsx | 41 +++ tests/unit/ProjectSubmissionsPage.spec.tsx | 94 +++++- tests/unit/ProjectsPage.spec.tsx | 108 +++++++ tests/unit/PropertiesSidebar.spec.tsx | 85 ++++++ tests/unit/PropertySliderField.spec.tsx | 30 ++ .../PublicPageRendererBackground.spec.tsx | 1 + ...PublicPageRendererFormFieldStyles.spec.tsx | 204 +++++++++++-- .../PublicPageRendererSectionLayout.spec.tsx | 43 +++ tests/unit/SectionPropertiesPanel.spec.tsx | 94 ++++++ tests/unit/SignupPage.spec.tsx | 196 ++++++++++++ tests/unit/TextPropertiesPanel.spec.tsx | 114 +++++++ tests/unit/VideoPropertiesPanel.spec.tsx | 39 +++ tests/unit/formHelpers.spec.ts | 43 +++ uploads/test-image-1765237806516 | 1 + uploads/test-section-bg-1765237806519 | 1 + uploads/test-section-bg-video-1765237806525 | 1 + uploads/test-video-1765237806524 | 1 + uploads/test-video-poster-1765237806517 | 1 + 71 files changed, 3394 insertions(+), 498 deletions(-) create mode 100644 test-results/auth-비로그인-사용자가-projects-에-접근하면-login-으로-리다이렉트되어야-한다-chromium/error-context.md create mode 100644 tests/unit/ColorPickerField.spec.tsx create mode 100644 tests/unit/NumericPropertyControl.spec.tsx create mode 100644 tests/unit/PropertySliderField.spec.tsx create mode 100644 tests/unit/TextPropertiesPanel.spec.tsx create mode 100644 uploads/test-image-1765237806516 create mode 100644 uploads/test-section-bg-1765237806519 create mode 100644 uploads/test-section-bg-video-1765237806525 create mode 100644 uploads/test-video-1765237806524 create mode 100644 uploads/test-video-poster-1765237806517 diff --git a/next-env.d.ts b/next-env.d.ts index 9edff1c..c4b7818 100644 --- a/next-env.d.ts +++ b/next-env.d.ts @@ -1,6 +1,6 @@ /// /// -import "./.next/types/routes.d.ts"; +import "./.next/dev/types/routes.d.ts"; // NOTE: This file should not be edited // see https://nextjs.org/docs/app/api-reference/config/typescript for more information. diff --git a/src/app/api/export/route.ts b/src/app/api/export/route.ts index 5d26b85..c6b52e8 100644 --- a/src/app/api/export/route.ts +++ b/src/app/api/export/route.ts @@ -81,8 +81,10 @@ export const buildStaticHtml = (blocks: Block[], projectConfig?: ProjectConfig): const basePart = "margin:0 auto;padding:24px;box-sizing:border-box;"; const canvasStyle = `${widthPart}${bgPart}${basePart}`; - const bodyBgRaw = (projectConfig?.bodyBgColorHex ?? "#020617").trim() || "#020617"; - const bodyStyle = `background-color:${bodyBgRaw};margin:0;padding:0;`; + const bodyBgRaw = + typeof projectConfig?.bodyBgColorHex === "string" ? projectConfig.bodyBgColorHex.trim() : ""; + const bodyBgPart = bodyBgRaw ? `background-color:${bodyBgRaw};` : ""; + const bodyStyle = `${bodyBgPart}margin:0;padding:0;`; const trackingRaw = (projectConfig?.trackingScript ?? "").trim(); const trackingHtml = trackingRaw ? `\n${trackingRaw}\n` : ""; @@ -460,12 +462,19 @@ export const buildStaticHtml = (blocks: Block[], projectConfig?: ProjectConfig): const inputId = name; const fieldClass = isFloating ? "pb-form-field pb-form-field--floating" : "pb-form-field"; - let fieldStyleAttr = ""; + const cssVars: string[] = []; if (isFloating && typeof props.paddingY === "number" && props.paddingY >= 0) { const em = props.paddingY / 16; - fieldStyleAttr = ` style="--pb-input-padding-y:${em}rem"`; + cssVars.push(`--pb-input-padding-y:${em}rem`); } + // strokeColorCustom 이 있으면 플로팅 라벨 패치 색으로 사용할 CSS 변수에 전달한다. + if (typeof props.strokeColorCustom === "string" && props.strokeColorCustom.trim() !== "") { + cssVars.push(`--pb-input-border-color:${escapeAttr(props.strokeColorCustom.trim())}`); + } + + const fieldStyleAttr = cssVars.length > 0 ? ` style="${cssVars.join(";")}"` : ""; + const placeholderBase = typeof props.placeholder === "string" && props.placeholder.trim() !== "" ? props.placeholder.trim() diff --git a/src/app/editor/EditorCanvas.tsx b/src/app/editor/EditorCanvas.tsx index 4501223..01e106a 100644 --- a/src/app/editor/EditorCanvas.tsx +++ b/src/app/editor/EditorCanvas.tsx @@ -70,7 +70,7 @@ export function EditorCanvas(props: EditorCanvasProps) { return (
{ @@ -118,11 +118,11 @@ interface DragPreviewProps { block: Block | null; } -function DragPreview({ block }: DragPreviewProps) { +export function EditorCanvasDragPreview({ block }: DragPreviewProps) { if (!block) return null; return ( -
+
{block.type === "text" ? "Text" @@ -152,3 +152,7 @@ function DragPreview({ block }: DragPreviewProps) {
); } + +function DragPreview({ block }: DragPreviewProps) { + return ; +} diff --git a/src/app/editor/forms/FormCheckboxPropertiesPanel.tsx b/src/app/editor/forms/FormCheckboxPropertiesPanel.tsx index 4a99103..4196a7e 100644 --- a/src/app/editor/forms/FormCheckboxPropertiesPanel.tsx +++ b/src/app/editor/forms/FormCheckboxPropertiesPanel.tsx @@ -18,12 +18,12 @@ export function FormCheckboxPropertiesPanel({ block, selectedBlockId, updateBloc return (
-

체크박스 필드

+

체크박스 필드

{groupLabelDisplay === "visible" && ( -