Files
invyone/frontend/lib/registry/components/divider/index.ts
T
DDD1542 a8ded6455d refactor: ConfigPanel Inv 네이밍 통합 + legacy 패널 분리 + input cp 마이그
11 패널 일괄 Inv* prefix 통일:
- 통합 (lib/registry/components/X/): button / container / divider / search /
  stats / table / title / input → Inv*ConfigPanel
- frontend/components/v2/config-panels/V2FieldConfigPanel → InvFieldConfigPanel
- 옛 v2-* hidden 호환 → InvLegacy{Divider,Text,Button}ConfigPanel

input 통합 컴포넌트 cp 톤 신규 작성 (InvInputConfigPanel):
- 277줄 옛 디자인 → CPVisualGrid 10칸 type 카드 + 타입별 옵션 + FeatureChipGrid

getComponentConfigPanel.tsx 버그 수정 (Codex 검토):
- "stats" key 중복 제거 (옛 StatsCardConfigPanel 이 통합 stats 덮던 silent bug)
- ALIAS 에서 v2-button-primary/v2-divider-line/v2-text-display 제외
  (옵션 B 일관성 — 옛 hidden 컴포넌트는 InvLegacy 패널 사용)
- MAP 의 해당 키를 InvLegacy* 로 직접 매핑

호출처 일괄 갱신:
- 각 통합 컴포넌트의 index.ts 7개 (import / config_panel / re-export)
- v2-input/v2-select/v2-divider-line/v2-text-display/v2-button-primary
  의 index.ts (config_panel 매핑)
- V2PropertiesPanel.tsx 의 require pattern (v2-input/v2-select)

검증: tsc 우리 영역 0건 / V2FieldConfigPanel 잔재 0건 / 기존 path 잔재 0건

다음 세션: useDbTables hook 추출 + 잔여 V2* cp 마이그 + dead code 정리

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
2026-04-28 17:57:57 +09:00

58 lines
1.9 KiB
TypeScript

"use client";
import { createComponentDefinition } from "../../utils/createComponentDefinition";
import { ComponentCategory } from "@/types/component";
import { DividerWrapper } from "./DividerComponent";
import { InvDividerConfigPanel } from "./InvDividerConfigPanel";
import type { DividerConfig } from "./types";
/**
* Divider — 통합 구분선 컴포넌트 정의 (2026-04-11, Phase A-1)
*
* 흡수 대상:
* - v2-divider-line (가로 구분선 + 텍스트)
* - v2-split-line (세로 분할선 + 드래그는 다음 단계)
* - divider-line (legacy, 삭제 대상)
*
* 변형:
* - orientation: 'horizontal' | 'vertical'
* - text: 가운데 라벨 (horizontal 전용)
* - lineStyle: solid | dashed | dotted
* - rounded: 둥근 끝
*
* 관련 문서:
* notes/gbpark/2026-04-11-component-unification-plan.md §3.8
*/
const DEFAULT_CONFIG: Partial<DividerConfig> = {
orientation: "horizontal",
color: "#d1d5db",
thickness: "1px",
lineStyle: "solid",
rounded: false,
};
export const DividerDefinition = createComponentDefinition({
id: "divider",
name: "구분선",
name_eng: "Divider",
description:
"영역 구분용 통합 구분선. 가로/세로 · 텍스트 · 스타일 옵션 지원",
category: ComponentCategory.LAYOUT,
web_type: "text",
component: DividerWrapper,
default_config: DEFAULT_CONFIG as Record<string, any>,
default_size: { width: 400, height: 2 },
config_panel: InvDividerConfigPanel,
icon: "SeparatorHorizontal",
tags: ["구분선", "divider", "line", "separator", "v2-divider-line"],
version: "2.0.0",
author: "INVYONE",
documentation:
"notes/gbpark/2026-04-11-component-unification-plan.md#38-divider",
});
export type { DividerConfig } from "./types";
export { DividerComponent, DividerWrapper } from "./DividerComponent";
export { InvDividerConfigPanel } from "./InvDividerConfigPanel";