vibe-spec-overlay 0.1.1 → 0.1.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/index.d.ts +93 -1
- package/package.json +1 -1
package/dist/index.d.ts
CHANGED
|
@@ -1 +1,93 @@
|
|
|
1
|
-
|
|
1
|
+
import { JSX } from 'react/jsx-runtime';
|
|
2
|
+
import { PropsWithChildren } from 'react';
|
|
3
|
+
|
|
4
|
+
/**
|
|
5
|
+
* 기능 스펙을 정의하는 핵심 인터페이스입니다.
|
|
6
|
+
* UI의 특정 부분에 대한 요구사항, 입력/출력, 예외 케이스 등을 포함합니다.
|
|
7
|
+
*/
|
|
8
|
+
export declare interface FeatureSpec {
|
|
9
|
+
/** 스펙의 고유 식별자 (예: 'user-profile-01') */
|
|
10
|
+
id: string;
|
|
11
|
+
/** 부모 스펙의 ID. 스펙 체인(계층 구조)을 형성할 때 사용합니다. */
|
|
12
|
+
parentId?: string;
|
|
13
|
+
/** 사용자 또는 개발자에게 표시될 기능의 제목 */
|
|
14
|
+
title: string;
|
|
15
|
+
/** 기능에 대한 상세 설명 */
|
|
16
|
+
description: string;
|
|
17
|
+
/** 해당 기능에 필요한 입력값 목록 (예: ['username', 'password']) */
|
|
18
|
+
inputs?: string[];
|
|
19
|
+
/** 해당 기능의 결과로 발생하는 출력값 또는 상태 변화 (예: ['login-success', 'auth-token']) */
|
|
20
|
+
outputs?: string[];
|
|
21
|
+
/** 데이터 유효성 검사 규칙 (예: ['비밀번호 8자 이상', '특수문자 포함']) */
|
|
22
|
+
validation?: string[];
|
|
23
|
+
/** 발생 가능한 예외 상황 또는 엣지 케이스 (예: ['네트워크 단절', '중복 아이디']) */
|
|
24
|
+
edgeCases?: string[];
|
|
25
|
+
/** 기능의 우선순위 */
|
|
26
|
+
priority?: Priority;
|
|
27
|
+
}
|
|
28
|
+
|
|
29
|
+
/**
|
|
30
|
+
* 기능의 중요도 또는 우선순위를 나타냅니다.
|
|
31
|
+
* AI가 UI 요소를 렌더링하거나 필터링할 때 참고할 수 있습니다.
|
|
32
|
+
*/
|
|
33
|
+
export declare type Priority = 'low' | 'medium' | 'high';
|
|
34
|
+
|
|
35
|
+
/**
|
|
36
|
+
* 특정 UI 요소에 스펙 정보를 시각적으로 연결하는 래퍼 컴포넌트입니다.
|
|
37
|
+
* 마우스 호버 시 외곽선과 툴팁을 표시하고, 클릭 시 상세 스펙 정보를 Drawer로 엽니다.
|
|
38
|
+
*
|
|
39
|
+
* @example
|
|
40
|
+
* <SpecAnchor spec={{ id: 'submit-01', title: '전송 버튼', description: '데이터를 서버로 전송합니다.' }}>
|
|
41
|
+
* <Button>저장</Button>
|
|
42
|
+
* </SpecAnchor>
|
|
43
|
+
*/
|
|
44
|
+
export declare function SpecAnchor({ spec, children }: SpecAnchorProps): JSX.Element;
|
|
45
|
+
|
|
46
|
+
/**
|
|
47
|
+
* SpecAnchor의 Props 인터페이스입니다.
|
|
48
|
+
*/
|
|
49
|
+
declare interface SpecAnchorProps extends PropsWithChildren {
|
|
50
|
+
/**
|
|
51
|
+
* 앵커가 나타내는 기능의 스펙 정보입니다.
|
|
52
|
+
* 이 정보를 기반으로 툴팁과 상세 패널이 구성됩니다.
|
|
53
|
+
*/
|
|
54
|
+
spec: FeatureSpec;
|
|
55
|
+
}
|
|
56
|
+
|
|
57
|
+
export declare function SpecPanel(): JSX.Element;
|
|
58
|
+
|
|
59
|
+
/**
|
|
60
|
+
* 프로젝트 전체 또는 특정 범위 내의 스펙 상태를 관리하는 컨텍스트 프로바이더입니다.
|
|
61
|
+
* 활성화 여부, 현재 선택된 스펙, 호버 상태 등을 관리합니다.
|
|
62
|
+
*
|
|
63
|
+
* @example
|
|
64
|
+
* <SpecProvider specsMap={{ 'login-btn': { title: '로그인 버튼', ... } }}>
|
|
65
|
+
* <App />
|
|
66
|
+
* </SpecProvider>
|
|
67
|
+
*/
|
|
68
|
+
export declare function SpecProvider({ children, specsMap }: SpecProviderProps): JSX.Element;
|
|
69
|
+
|
|
70
|
+
/**
|
|
71
|
+
* SpecProvider의 Props 인터페이스입니다.
|
|
72
|
+
*/
|
|
73
|
+
declare interface SpecProviderProps extends PropsWithChildren {
|
|
74
|
+
/**
|
|
75
|
+
* 스펙 ID를 키로, FeatureSpec 객체를 값으로 가지는 매핑 정보입니다.
|
|
76
|
+
* SpecAnchor에서 전달받은 스펙 정보를 보완하거나 계층 구조를 관리할 때 사용됩니다.
|
|
77
|
+
*/
|
|
78
|
+
specsMap?: Record<string, FeatureSpec>;
|
|
79
|
+
}
|
|
80
|
+
|
|
81
|
+
declare interface SpecState {
|
|
82
|
+
enabled: boolean;
|
|
83
|
+
toggleEnabled: () => void;
|
|
84
|
+
selected?: FeatureSpec;
|
|
85
|
+
setSelected: (spec?: FeatureSpec) => void;
|
|
86
|
+
specsMap: Record<string, FeatureSpec>;
|
|
87
|
+
hoveredSpecId: string | null;
|
|
88
|
+
setHoveredSpecId: (id: string | null) => void;
|
|
89
|
+
}
|
|
90
|
+
|
|
91
|
+
export declare function useSpecContext(): SpecState;
|
|
92
|
+
|
|
93
|
+
export { }
|
package/package.json
CHANGED