2c0a97f2ba
- components/builder/* 폐기 (12-grid 미완성 빌더 14개 파일)
- components/template-builder/TemplateBuilder.tsx 신규
(자유배치 + 3뷰 + Zustand 스토어 + 드래그/리사이즈/히스토리/격자)
- admin/builder/page.tsx 진입점 전환 (BuilderLayout → TemplateBuilder)
- 타입 정리: FreePosition / TemplateComponent / ViewConfig / Card /
Dashboard / CardConnection 추가, 레거시(GridPosition/TemplateKind/
DEFAULT_COMPONENT_LAYOUTS/CANVAS_KEYWORDS) @deprecated 표기
- v2-* 마이그레이션 1차:
· 완전: v2-table-list (ResizeObserver), v2-table-search-widget (@container)
· 경량: button/input/select/date/text-display/card-display/aggregation-widget
(withContainerQuery HOC)
- 다크 모드 대응: Tailwind dark: variant 21패턴 71곳 치환
- /test-card-responsive PoC 검증 페이지
세션 후반 버그 픽스 (phase1-log §7):
- test-card-responsive (main) 그룹 밖 이동 (AppLayout 탭 시스템 회피)
- useRegistryPalette default_size {width,height}/{w,h} 포맷 정규화
- dark: variant 중복 체인 정리
검증: (A) 반응형 메커니즘, (B) TemplateBuilder UI 통과
(C) 기존 VEX 화면은 마이그레이션 미완 상태라 Phase 2 이후 개별 진행
스펙: notes/gbpark/2026-04-10-card-engine-final-spec.md
로그: notes/gbpark/2026-04-10-card-engine-phase1-log.md
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
64 lines
2.0 KiB
TypeScript
64 lines
2.0 KiB
TypeScript
"use client";
|
|
|
|
import { createComponentDefinition } from "../../utils/createComponentDefinition";
|
|
import { ComponentCategory } from "@/types/component";
|
|
import { ButtonPrimaryWrapper } from "./ButtonPrimaryComponent";
|
|
import { V2ButtonConfigPanel } from "@/components/v2/config-panels/V2ButtonConfigPanel";
|
|
import { withContainerQuery } from "../../hoc/withContainerQuery";
|
|
|
|
/**
|
|
* ButtonPrimary 컴포넌트 정의
|
|
* button-primary 컴포넌트입니다
|
|
*/
|
|
export const V2ButtonPrimaryDefinition = createComponentDefinition({
|
|
id: "v2-button-primary",
|
|
name: "기본 버튼",
|
|
name_eng: "ButtonPrimary Component",
|
|
description: "일반적인 액션을 위한 기본 버튼 컴포넌트",
|
|
category: ComponentCategory.ACTION,
|
|
web_type: "button",
|
|
component: withContainerQuery(ButtonPrimaryWrapper, "v2-button-primary"),
|
|
default_config: {
|
|
text: "저장",
|
|
actionType: "button",
|
|
variant: "primary",
|
|
action: {
|
|
type: "save",
|
|
successMessage: "저장되었습니다.",
|
|
errorMessage: "저장 중 오류가 발생했습니다.",
|
|
},
|
|
displayMode: "icon-text",
|
|
icon: {
|
|
name: "Check",
|
|
type: "lucide",
|
|
size: "보통",
|
|
},
|
|
iconTextPosition: "right",
|
|
iconGap: 6,
|
|
style: {
|
|
borderRadius: "8px",
|
|
labelColor: "#FFFFFF",
|
|
fontSize: "12px",
|
|
fontWeight: "normal",
|
|
labelTextAlign: "left",
|
|
backgroundColor: "#3B83F6",
|
|
},
|
|
},
|
|
default_size: { width: 100, height: 40 },
|
|
config_panel: V2ButtonConfigPanel,
|
|
icon: "MousePointer",
|
|
tags: ["버튼", "액션", "클릭"],
|
|
version: "1.0.0",
|
|
author: "개발팀",
|
|
documentation: "https://docs.example.com/components/button-primary",
|
|
});
|
|
|
|
// 컴포넌트는 ButtonPrimaryRenderer에서 자동 등록됩니다
|
|
|
|
// 타입 내보내기
|
|
export type { ButtonPrimaryConfig } from "./types";
|
|
|
|
// 컴포넌트 내보내기
|
|
export { ButtonPrimaryComponent } from "./ButtonPrimaryComponent";
|
|
export { ButtonPrimaryRenderer } from "./ButtonPrimaryRenderer";
|