@su-record/vibe 2.8.39 → 2.8.41
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/package.json +1 -1
- package/skills/vibe.figma/SKILL.md +103 -22
- package/skills/vibe.figma/templates/figma-handoff.md +37 -33
- package/skills/vibe.figma.convert/SKILL.md +65 -34
- package/skills/vibe.figma.convert/rubrics/conversion-rules.md +14 -5
- package/skills/vibe.figma.convert/templates/component.md +14 -16
- package/skills/vibe.figma.extract/SKILL.md +2 -2
- package/skills/vibe.figma.extract/rubrics/image-rules.md +69 -47
- package/skills/vibe.figma.analyze/SKILL.md +0 -10
- package/skills/vibe.figma.analyze/rubrics/analysis-dimensions.md +0 -53
- package/skills/vibe.figma.codegen/SKILL.md +0 -10
- package/skills/vibe.figma.codegen/rubrics/code-quality.md +0 -54
- package/skills/vibe.figma.consolidate/SKILL.md +0 -10
- package/skills/vibe.figma.consolidate/templates/consolidation-report.md +0 -95
- package/skills/vibe.figma.frame/SKILL.md +0 -10
- package/skills/vibe.figma.frame/rubrics/frame-selection.md +0 -55
- package/skills/vibe.figma.pipeline/SKILL.md +0 -11
- package/skills/vibe.figma.pipeline/rubrics/pipeline-stages.md +0 -96
- package/skills/vibe.figma.rules/SKILL.md +0 -10
- package/skills/vibe.figma.rules/rubrics/naming-conventions.md +0 -70
- package/skills/vibe.figma.style/SKILL.md +0 -10
- package/skills/vibe.figma.style/rubrics/style-mapping.md +0 -100
package/package.json
CHANGED
|
@@ -37,11 +37,43 @@ Figma 트리가 코드의 원천이다. 스크린샷은 검증용이다.
|
|
|
37
37
|
```
|
|
38
38
|
/vibe.figma
|
|
39
39
|
→ Phase 0: Setup (스택 감지, 디렉토리 생성, 기존 자산 인덱싱)
|
|
40
|
-
→ Phase 1: Storyboard (스토리보드 →
|
|
41
|
-
→ Phase 2: 재료 확보 (디자인 URL → 트리 + 이미지 + 스크린샷)
|
|
40
|
+
→ Phase 1: Storyboard (스토리보드 → 기능 스펙 문서 작성, 파일 생성 없음)
|
|
41
|
+
→ Phase 2: 재료 확보 (디자인 URL → 트리 + 노드 렌더링 이미지 + 스크린샷)
|
|
42
42
|
→ Phase 3: 구조적 코드 생성 (트리 → HTML+SCSS 매핑 + 시맨틱 보강)
|
|
43
43
|
→ Phase 3.5: 컴파일 게이트 (tsc → build → dev 확인)
|
|
44
44
|
→ Phase 4: 시각 검증 루프 (렌더링 vs 스크린샷 비교 → 수정)
|
|
45
|
+
─── 추가 브레이크포인트가 있으면 Phase 2~4 반복 ───
|
|
46
|
+
→ Phase 5: 공통화 (브레이크포인트별 작업 병합 → 최종 프로젝트 구조)
|
|
47
|
+
|
|
48
|
+
브레이크포인트별 작업 구조:
|
|
49
|
+
각 Figma URL의 ROOT name에서 폴더명 추출 (kebab-case):
|
|
50
|
+
"MO_Main ..." → /tmp/{feature}/mo-main/
|
|
51
|
+
"PC_Main ..." → /tmp/{feature}/pc-main/
|
|
52
|
+
|
|
53
|
+
/tmp/{feature}/
|
|
54
|
+
├── mo-main/ ← 첫 번째 URL (모바일)
|
|
55
|
+
│ ├── tree.json
|
|
56
|
+
│ ├── bg/
|
|
57
|
+
│ ├── content/
|
|
58
|
+
│ └── sections/
|
|
59
|
+
├── pc-main/ ← 두 번째 URL (데스크탑)
|
|
60
|
+
│ ├── tree.json
|
|
61
|
+
│ ├── bg/
|
|
62
|
+
│ ├── content/
|
|
63
|
+
│ └── sections/
|
|
64
|
+
└── final/ ← Phase 5 공통화 결과
|
|
65
|
+
├── components/{feature}/
|
|
66
|
+
└── styles/{feature}/
|
|
67
|
+
|
|
68
|
+
Phase 5 공통화:
|
|
69
|
+
1. 각 브레이크포인트의 컴포넌트 diff
|
|
70
|
+
→ 구조 동일: 1개로 병합
|
|
71
|
+
→ 구조 다름: props로 분기 또는 별도 유지
|
|
72
|
+
2. SCSS diff
|
|
73
|
+
→ 같은 값: 기본 스타일
|
|
74
|
+
→ 다른 값: @media 오버라이드
|
|
75
|
+
3. 토큰 diff → 합집합 정리
|
|
76
|
+
4. /tmp/ 임시 폴더 → 프로젝트 디렉토리에 최종 배치
|
|
45
77
|
```
|
|
46
78
|
|
|
47
79
|
---
|
|
@@ -186,7 +218,7 @@ URL에서 fileKey, nodeId 추출
|
|
|
186
218
|
|
|
187
219
|
2단계: name 패턴으로 프레임 분류
|
|
188
220
|
SPEC — "기능 정의서", "정책" → depth 높여서 텍스트 추출
|
|
189
|
-
CONFIG — "해상도", "브라우저" →
|
|
221
|
+
CONFIG — "해상도", "브라우저" → designWidth, minWidth, breakpoint 확보
|
|
190
222
|
SHARED — "공통", "GNB", "Footer", "Popup" → 공통 컴포넌트 파악
|
|
191
223
|
PAGE — "화면설계", "메인 -" → 섹션 목록 + 인터랙션 스펙
|
|
192
224
|
|
|
@@ -369,15 +401,26 @@ Phase 2 완료 시 /tmp/{feature}/ 에 다음이 준비되어야 함:
|
|
|
369
401
|
- 간격: padding, gap, margin 사용 빈도 높은 값
|
|
370
402
|
```
|
|
371
403
|
|
|
372
|
-
###
|
|
404
|
+
### 반응형 단위 (scaleFactor 사용하지 않음)
|
|
373
405
|
|
|
374
406
|
```
|
|
375
|
-
스토리보드 CONFIG
|
|
376
|
-
|
|
377
|
-
|
|
407
|
+
스토리보드 CONFIG에서 확보:
|
|
408
|
+
designWidth: 디자인 너비 (예: 모바일 720px, PC 2560px)
|
|
409
|
+
minWidth: 최소 지원 너비 (예: 340px)
|
|
410
|
+
breakpoint: PC/모바일 분계 (예: 1025px)
|
|
411
|
+
|
|
412
|
+
UI 요소 → vw 비례:
|
|
413
|
+
vw값 = (Figma px / designWidth) × 100
|
|
414
|
+
예: gap: 24px → 24/720 × 100 = 3.33vw
|
|
415
|
+
예: width: 620px → 620/720 = 86.11% (부모 대비)
|
|
416
|
+
|
|
417
|
+
폰트 → clamp(최소, vw, 최대):
|
|
418
|
+
최소값 = 역할별 가독성 기준 (h1:16px, 본문:12px, 캡션:10px)
|
|
419
|
+
vw값 = (Figma px / designWidth) × 100
|
|
420
|
+
최대값 = Figma 원본 px
|
|
421
|
+
예: 24px 본문 → clamp(12px, 3.33vw, 24px)
|
|
378
422
|
|
|
379
|
-
|
|
380
|
-
적용 안 함: color, opacity, font-weight, z-index, line-height(단위 없을 때)
|
|
423
|
+
변환 안 함: color, opacity, font-weight, z-index, line-height(단위 없을 때)
|
|
381
424
|
```
|
|
382
425
|
|
|
383
426
|
---
|
|
@@ -533,7 +576,44 @@ Phase 1에서 생성한 빈 SCSS 파일에 기본 내용 Write:
|
|
|
533
576
|
❌ 90% 유사한데 새로 만들기 금지
|
|
534
577
|
```
|
|
535
578
|
|
|
536
|
-
### 3-1.
|
|
579
|
+
### 3-1. 순차 블록 빌딩 (병렬 금지)
|
|
580
|
+
|
|
581
|
+
```
|
|
582
|
+
❌ 여러 섹션을 동시에 생성하지 않는다
|
|
583
|
+
→ 병렬 생성 시 컨텍스트 분산 → 매핑 정확도 저하 → 품질 하락
|
|
584
|
+
→ 앞 섹션 결과를 확인하지 않으면 실수가 누적됨
|
|
585
|
+
|
|
586
|
+
✅ 한 섹션씩 순차적으로 블록을 쌓듯 만든다:
|
|
587
|
+
|
|
588
|
+
작업 폴더: ROOT name에서 추출 (Phase 2에서 결정)
|
|
589
|
+
"MO_Main ..." → /tmp/{feature}/mo-main/
|
|
590
|
+
코드 출력도 이 폴더 안에:
|
|
591
|
+
/tmp/{feature}/mo-main/components/{feature}/
|
|
592
|
+
/tmp/{feature}/mo-main/styles/{feature}/
|
|
593
|
+
Phase 5에서 최종 프로젝트 디렉토리에 배치
|
|
594
|
+
|
|
595
|
+
섹션 1 (Hero):
|
|
596
|
+
1. tree.json에서 Hero 노드 Read
|
|
597
|
+
2. 코드 생성 (컴포넌트 + SCSS)
|
|
598
|
+
3. 브라우저에서 확인 (dev 서버)
|
|
599
|
+
4. OK → 다음 섹션으로
|
|
600
|
+
NG → 수정 후 재확인
|
|
601
|
+
|
|
602
|
+
섹션 2 (KID):
|
|
603
|
+
1. tree.json에서 KID 노드 Read
|
|
604
|
+
2. 코드 생성
|
|
605
|
+
3. 브라우저에서 확인 (이전 섹션도 함께)
|
|
606
|
+
4. OK → 다음 섹션으로
|
|
607
|
+
|
|
608
|
+
섹션 3 (Daily) → ... 반복
|
|
609
|
+
|
|
610
|
+
각 섹션 완료 시:
|
|
611
|
+
- 해당 섹션의 컴포넌트 + SCSS가 동작하는 상태
|
|
612
|
+
- pages/{feature}.vue에 해당 섹션이 추가된 상태
|
|
613
|
+
- 브라우저에서 이전 섹션 + 현재 섹션이 모두 보이는 상태
|
|
614
|
+
```
|
|
615
|
+
|
|
616
|
+
### 3-2. 트리 기반 구조적 코드 생성
|
|
537
617
|
|
|
538
618
|
```
|
|
539
619
|
각 섹션에 대해 (vibe.figma.convert 참조):
|
|
@@ -543,18 +623,19 @@ Phase 1에서 생성한 빈 SCSS 파일에 기본 내용 Write:
|
|
|
543
623
|
→ 스크린샷은 검증용으로만 참조
|
|
544
624
|
|
|
545
625
|
2. 기계적 매핑 (추정 없음):
|
|
546
|
-
a.
|
|
626
|
+
a. 이미지: 노드 렌더링된 이미지를 static/images/{feature}/에 배치
|
|
547
627
|
b. 노드 → HTML 매핑:
|
|
628
|
+
- BG 프레임 → CSS background-image (img 태그 아님)
|
|
548
629
|
- Auto Layout 있음 → <div> + flex (direction/gap/padding 직접)
|
|
549
630
|
- Auto Layout 없음 → <div> + position:relative (자식 absolute)
|
|
550
631
|
- TEXT 노드 → <span> (Claude가 h2/p/button으로 승격)
|
|
551
|
-
-
|
|
632
|
+
- 콘텐츠 이미지 → <img src="렌더링된 파일">
|
|
552
633
|
- 반복 패턴 (동일 구조 3+) → v-for
|
|
553
634
|
c. CSS 직접 매핑:
|
|
554
635
|
- node.css의 모든 속성을 SCSS에 1:1 매핑
|
|
555
|
-
-
|
|
636
|
+
- vw/clamp 반응형 단위 변환 (vibe.figma.convert 참조)
|
|
556
637
|
- tree.json에 없는 CSS 값은 작성하지 않음
|
|
557
|
-
d. Phase 1의 JSDoc, 인터페이스, 핸들러
|
|
638
|
+
d. Phase 1의 JSDoc, 인터페이스, 핸들러 삽입
|
|
558
639
|
|
|
559
640
|
3. Claude 시맨틱 보강:
|
|
560
641
|
- div → section/h2/p/button 태그 승격
|
|
@@ -562,14 +643,14 @@ Phase 1에서 생성한 빈 SCSS 파일에 기본 내용 Write:
|
|
|
562
643
|
- 접근성 (alt, aria)
|
|
563
644
|
- 인터랙션 (클릭, 상태)
|
|
564
645
|
|
|
565
|
-
4.
|
|
566
|
-
-
|
|
567
|
-
-
|
|
568
|
-
-
|
|
569
|
-
-
|
|
646
|
+
4. 브라우저 확인 (섹션별 게이트):
|
|
647
|
+
- dev 서버에서 현재까지 만든 섹션이 모두 보이는지 확인
|
|
648
|
+
- 이미지 로드, 레이아웃, 텍스트 확인
|
|
649
|
+
- OK → 다음 섹션 진행
|
|
650
|
+
- NG → 수정 후 재확인 (다음 섹션으로 넘어가지 않음)
|
|
570
651
|
```
|
|
571
652
|
|
|
572
|
-
### 3-
|
|
653
|
+
### 3-3. 코드 작성 규칙
|
|
573
654
|
|
|
574
655
|
```
|
|
575
656
|
컴포넌트 (Vue 예시):
|
|
@@ -589,7 +670,7 @@ Phase 1에서 생성한 빈 SCSS 파일에 기본 내용 Write:
|
|
|
589
670
|
SCSS (vibe.figma.convert 참조):
|
|
590
671
|
layout/ → position, display, flex, width, height, padding, gap
|
|
591
672
|
components/ → font, color, border, shadow, opacity
|
|
592
|
-
모든 수치는
|
|
673
|
+
모든 수치는 tree.json의 정확한 값 → vw/clamp 변환 (vibe.figma.convert 참조).
|
|
593
674
|
추정 금지 — 값이 없으면 tree.json에서 다시 찾는다.
|
|
594
675
|
```
|
|
595
676
|
|
|
@@ -780,7 +861,7 @@ import { getComputedStyles, compareStyles, diffsToIssues } from 'src/infra/lib/b
|
|
|
780
861
|
])
|
|
781
862
|
|
|
782
863
|
2. Figma 재료함의 기대값과 비교:
|
|
783
|
-
// tree.json에서 해당 노드의 CSS 수치 (
|
|
864
|
+
// tree.json에서 해당 노드의 CSS 수치 (vw/clamp 변환 후)
|
|
784
865
|
const expected = { 'font-size': '16px', 'color': '#ffffff', 'width': '465px' }
|
|
785
866
|
const diffs = compareStyles(expected, actual)
|
|
786
867
|
|
|
@@ -9,14 +9,15 @@
|
|
|
9
9
|
|
|
10
10
|
## Design Specs
|
|
11
11
|
|
|
12
|
-
### Viewport /
|
|
12
|
+
### Viewport / Responsive
|
|
13
13
|
|
|
14
|
-
| Breakpoint | Design Width |
|
|
15
|
-
|
|
16
|
-
| Mobile (base) | {{DESIGN_MOBILE_PX}}px | {{
|
|
17
|
-
| Desktop | {{DESIGN_PC_PX}}px |
|
|
14
|
+
| Breakpoint | Design Width | Min Width | CSS 단위 |
|
|
15
|
+
|-----------|-------------|-----------|---------|
|
|
16
|
+
| Mobile (base) | {{DESIGN_MOBILE_PX}}px | {{MIN_WIDTH}}px | vw + clamp |
|
|
17
|
+
| Desktop | {{DESIGN_PC_PX}}px | — | vw + clamp |
|
|
18
18
|
|
|
19
19
|
Breakpoint threshold: `@media (min-width: {{BP_PC}}px)`
|
|
20
|
+
ROOT folder: `{{MO_FOLDER}}/`, `{{PC_FOLDER}}/`
|
|
20
21
|
|
|
21
22
|
### Color Tokens
|
|
22
23
|
|
|
@@ -26,15 +27,15 @@ Breakpoint threshold: `@media (min-width: {{BP_PC}}px)`
|
|
|
26
27
|
|
|
27
28
|
### Typography Tokens
|
|
28
29
|
|
|
29
|
-
| Token | Figma px |
|
|
30
|
-
|
|
31
|
-
| `$text-{{ROLE}}` | {{FIGMA_PX}}px | {{
|
|
30
|
+
| Token | Figma px | vw | clamp 최소 | Role |
|
|
31
|
+
|-------|---------|-----|----------|------|
|
|
32
|
+
| `$text-{{ROLE}}` | {{FIGMA_PX}}px | {{VW}}vw | {{MIN_PX}}px | {{ROLE}} |
|
|
32
33
|
|
|
33
34
|
### Spacing Tokens
|
|
34
35
|
|
|
35
|
-
| Token | Figma px |
|
|
36
|
-
|
|
37
|
-
| `$space-{{NAME}}` | {{FIGMA_PX}}px | {{
|
|
36
|
+
| Token | Figma px | vw | Usage |
|
|
37
|
+
|-------|---------|-----|-------|
|
|
38
|
+
| `$space-{{NAME}}` | {{FIGMA_PX}}px | {{VW}}vw | {{USAGE}} |
|
|
38
39
|
|
|
39
40
|
---
|
|
40
41
|
|
|
@@ -44,38 +45,40 @@ Breakpoint threshold: `@media (min-width: {{BP_PC}}px)`
|
|
|
44
45
|
|---|-------------|---------------|-----------|----------------|
|
|
45
46
|
| 1 | {{SECTION_NAME}} | `components/{{FEATURE_KEY}}/{{ComponentName}}.vue` | {{NODE_COUNT}} | {{HEIGHT}}px |
|
|
46
47
|
|
|
47
|
-
**Generation:** tree.json → HTML+SCSS 구조적 매핑 (
|
|
48
|
+
**Generation:** tree.json → HTML+SCSS 구조적 매핑 (vw/clamp 반응형)
|
|
48
49
|
|
|
49
50
|
---
|
|
50
51
|
|
|
51
52
|
## Asset Manifest
|
|
52
53
|
|
|
53
|
-
|
|
|
54
|
-
|
|
55
|
-
|
|
|
54
|
+
| Image | Local Path | Type | Render Method |
|
|
55
|
+
|-------|-----------|------|--------------|
|
|
56
|
+
| {{NAME}} | `/images/{{FEATURE_KEY}}/{{FILE_NAME}}.png` | {{bg\|content\|vector-text}} | {{frame-render\|node-render\|group-render}} |
|
|
56
57
|
|
|
57
|
-
Total assets: {{ASSET_COUNT}}
|
|
58
|
+
Total assets: {{ASSET_COUNT}} (BG 렌더링 {{BG_COUNT}}장 + 콘텐츠 {{CONTENT_COUNT}}장)
|
|
58
59
|
|
|
59
60
|
---
|
|
60
61
|
|
|
61
62
|
## File Structure
|
|
62
63
|
|
|
63
64
|
```
|
|
64
|
-
|
|
65
|
-
{{
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
65
|
+
/tmp/{{FEATURE_KEY}}/
|
|
66
|
+
{{MO_FOLDER}}/ ← 모바일 작업
|
|
67
|
+
tree.json
|
|
68
|
+
bg/
|
|
69
|
+
content/
|
|
70
|
+
sections/
|
|
71
|
+
{{PC_FOLDER}}/ ← 데스크탑 작업
|
|
72
|
+
...
|
|
73
|
+
final/ ← Phase 5 공통화 결과
|
|
74
|
+
components/{{FEATURE_KEY}}/
|
|
75
|
+
styles/{{FEATURE_KEY}}/
|
|
76
|
+
index.scss
|
|
77
|
+
_tokens.scss
|
|
78
|
+
_mixins.scss
|
|
79
|
+
_base.scss
|
|
80
|
+
layout/
|
|
81
|
+
components/
|
|
79
82
|
```
|
|
80
83
|
|
|
81
84
|
---
|
|
@@ -84,8 +87,9 @@ styles/{{FEATURE_KEY}}/
|
|
|
84
87
|
|
|
85
88
|
- [ ] No `figma.com/api` URLs in any generated file
|
|
86
89
|
- [ ] No `placeholder` or empty `src=""` in components
|
|
87
|
-
- [ ] No `<style>` blocks in components
|
|
88
|
-
- [ ] All
|
|
90
|
+
- [ ] No `<style>` blocks in components
|
|
91
|
+
- [ ] All images are node-rendered (no imageRef direct download)
|
|
92
|
+
- [ ] No image file > 5MB (텍스처 fill 의심)
|
|
89
93
|
- [ ] Build passes without errors
|
|
90
94
|
- [ ] Screenshot comparison: P1 issues = 0
|
|
91
95
|
|
|
@@ -44,7 +44,8 @@ component-index (/tmp/{feature}/component-index.json) 에서 매칭되는 컴포
|
|
|
44
44
|
- tree.json (노드 트리 + CSS 속성 — 코드 생성의 PRIMARY 소스)
|
|
45
45
|
- /tmp/{feature}/images/ (다운로드된 이미지 에셋)
|
|
46
46
|
- 섹션 스크린샷 (검증용 — 생성에 사용하지 않음)
|
|
47
|
-
-
|
|
47
|
+
- designWidth (스토리보드 CONFIG: 모바일 720px, PC 2560px)
|
|
48
|
+
- minWidth (최소 지원: 340px)
|
|
48
49
|
|
|
49
50
|
출력:
|
|
50
51
|
- 컴포넌트 파일 (Vue SFC / React TSX)
|
|
@@ -92,10 +93,10 @@ tree.json의 css 객체를 SCSS로 직접 변환한다. 추정하지 않는다.
|
|
|
92
93
|
node.css.flexDirection → flex-direction
|
|
93
94
|
node.css.justifyContent → justify-content
|
|
94
95
|
node.css.alignItems → align-items
|
|
95
|
-
node.css.gap → gap (
|
|
96
|
-
node.css.padding → padding (
|
|
97
|
-
node.css.width → width (
|
|
98
|
-
node.css.height → height (
|
|
96
|
+
node.css.gap → gap (→ vw 변환)
|
|
97
|
+
node.css.padding → padding (→ vw 변환)
|
|
98
|
+
node.css.width → width (→ vw 또는 % 변환)
|
|
99
|
+
node.css.height → height (→ vw 변환, 또는 auto)
|
|
99
100
|
node.css.overflow → overflow
|
|
100
101
|
node.css.position → position
|
|
101
102
|
|
|
@@ -103,24 +104,52 @@ tree.json의 css 객체를 SCSS로 직접 변환한다. 추정하지 않는다.
|
|
|
103
104
|
node.css.backgroundColor → background-color
|
|
104
105
|
node.css.color → color
|
|
105
106
|
node.css.fontFamily → font-family
|
|
106
|
-
node.css.fontSize → font-size (
|
|
107
|
+
node.css.fontSize → font-size (→ clamp 변환)
|
|
107
108
|
node.css.fontWeight → font-weight
|
|
108
109
|
node.css.lineHeight → line-height
|
|
109
|
-
node.css.letterSpacing → letter-spacing (
|
|
110
|
+
node.css.letterSpacing → letter-spacing (→ vw 변환)
|
|
110
111
|
node.css.textAlign → text-align
|
|
111
|
-
node.css.borderRadius → border-radius (
|
|
112
|
-
node.css.border → border (width
|
|
113
|
-
node.css.boxShadow → box-shadow (px
|
|
112
|
+
node.css.borderRadius → border-radius (→ vw 변환)
|
|
113
|
+
node.css.border → border (width → vw 변환)
|
|
114
|
+
node.css.boxShadow → box-shadow (px → vw 변환)
|
|
114
115
|
node.css.opacity → opacity
|
|
115
116
|
node.css.mixBlendMode → mix-blend-mode
|
|
116
|
-
node.css.filter → filter (px
|
|
117
|
-
node.css.backdropFilter → backdrop-filter (px
|
|
118
|
-
|
|
119
|
-
scaleFactor
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
|
|
117
|
+
node.css.filter → filter (px → vw 변환)
|
|
118
|
+
node.css.backdropFilter → backdrop-filter (px → vw 변환)
|
|
119
|
+
|
|
120
|
+
반응형 단위 변환 (scaleFactor 사용하지 않음):
|
|
121
|
+
스토리보드 CONFIG에서 확보:
|
|
122
|
+
designWidth: 디자인 너비 (예: 720px 모바일, 2560px PC)
|
|
123
|
+
minWidth: 최소 지원 너비 (예: 340px)
|
|
124
|
+
breakpoint: PC/모바일 분계 (예: 1025px)
|
|
125
|
+
|
|
126
|
+
UI 요소 (width, height, padding, gap, border-radius, shadow 등):
|
|
127
|
+
→ vw 비례: vw값 = (Figma px / designWidth) × 100
|
|
128
|
+
→ 예: gap: 24px / 720 × 100 = 3.33vw
|
|
129
|
+
→ width: 부모 대비 %도 가능 (620/720 = 86%)
|
|
130
|
+
|
|
131
|
+
폰트 (font-size):
|
|
132
|
+
→ clamp(최소, vw, 최대): 가독성 최소값 보장
|
|
133
|
+
→ vw값 = (Figma px / designWidth) × 100
|
|
134
|
+
→ 최소값 = 역할(role)에 따라 결정 (Claude 시맨틱 판단)
|
|
135
|
+
→ 최대값 = Figma 원본 px
|
|
136
|
+
|
|
137
|
+
| 역할 | 최소 | 판단 기준 |
|
|
138
|
+
|------|------|----------|
|
|
139
|
+
| h1~h2 제목 | 16px | name에 "title", 가장 큰 fontSize |
|
|
140
|
+
| h3~h4 소제목 | 14px | 중간 크기 fontSize |
|
|
141
|
+
| 본문 p | 12px | TEXT 노드, 긴 텍스트 |
|
|
142
|
+
| 캡션/라벨 | 10px | 작은 fontSize, 짧은 텍스트 |
|
|
143
|
+
| 버튼 | 12px | name에 "btn" |
|
|
144
|
+
|
|
145
|
+
예시:
|
|
146
|
+
디자인 24px, 본문 → font-size: clamp(12px, 3.33vw, 24px);
|
|
147
|
+
디자인 48px, 제목 → font-size: clamp(16px, 6.67vw, 48px);
|
|
148
|
+
디자인 16px, 캡션 → font-size: clamp(10px, 2.22vw, 16px);
|
|
149
|
+
|
|
150
|
+
변환하지 않는 속성:
|
|
151
|
+
color, opacity, font-weight, font-family, z-index,
|
|
152
|
+
line-height(단위 없을 때), text-align, mix-blend-mode
|
|
124
153
|
|
|
125
154
|
값이 없으면:
|
|
126
155
|
→ 해당 속성 생략 (추정 금지)
|
|
@@ -173,21 +202,21 @@ components/ → font-size, font-weight, color, line-height, letter-spacing,
|
|
|
173
202
|
background-color, background-image, mix-blend-mode, filter
|
|
174
203
|
```
|
|
175
204
|
|
|
176
|
-
### layout 예시 (트리 기반 —
|
|
205
|
+
### layout 예시 (트리 기반 — vw 반응형)
|
|
177
206
|
|
|
178
207
|
```scss
|
|
179
208
|
// tree.json 데이터:
|
|
180
209
|
// Hero: { width:720, height:1280 }
|
|
181
210
|
// Title: { display:flex, flexDirection:column, alignItems:center, gap:24px, width:620, height:230 }
|
|
182
211
|
// Period: { display:flex, flexDirection:column, gap:10px, padding:"22px 14px", width:600, height:220 }
|
|
183
|
-
//
|
|
212
|
+
// designWidth = 720px → vw = (px / 720) × 100
|
|
184
213
|
|
|
185
214
|
@use '../tokens' as t;
|
|
186
215
|
|
|
187
216
|
.heroSection {
|
|
188
217
|
position: relative;
|
|
189
218
|
width: 100%;
|
|
190
|
-
height:
|
|
219
|
+
height: 177.78vw; // 1280 / 720 × 100
|
|
191
220
|
overflow: hidden; // tree: overflow:hidden
|
|
192
221
|
}
|
|
193
222
|
|
|
@@ -195,30 +224,32 @@ components/ → font-size, font-weight, color, line-height, letter-spacing,
|
|
|
195
224
|
display: flex; // tree: display:flex
|
|
196
225
|
flex-direction: column; // tree: flexDirection:column
|
|
197
226
|
align-items: center; // tree: alignItems:center
|
|
198
|
-
gap:
|
|
199
|
-
width:
|
|
227
|
+
gap: 3.33vw; // tree: 24 / 720 × 100
|
|
228
|
+
width: 86.11%; // tree: 620 / 720 (부모 대비 %)
|
|
200
229
|
}
|
|
201
230
|
|
|
202
231
|
.heroPeriod {
|
|
203
232
|
display: flex; // tree: display:flex
|
|
204
233
|
flex-direction: column; // tree: flexDirection:column
|
|
205
|
-
gap:
|
|
206
|
-
padding:
|
|
207
|
-
width:
|
|
234
|
+
gap: 1.39vw; // tree: 10 / 720 × 100
|
|
235
|
+
padding: 3.06vw 1.94vw; // tree: "22px 14px" / 720 × 100
|
|
236
|
+
width: 83.33%; // tree: 600 / 720
|
|
208
237
|
}
|
|
209
238
|
```
|
|
210
239
|
|
|
211
|
-
### components 예시 (트리 기반)
|
|
240
|
+
### components 예시 (트리 기반 — clamp 폰트)
|
|
212
241
|
|
|
213
242
|
```scss
|
|
214
243
|
// tree.json 데이터:
|
|
215
244
|
// TEXT "참여 대상": { fontSize:24px, fontWeight:600, color:#ffffff, fontFamily:Pretendard }
|
|
216
245
|
// BTN_Share: { borderRadius:500px, backgroundColor:rgba(13,40,61,0.5), border:"1px solid #ffffff" }
|
|
246
|
+
// designWidth = 720px, minWidth = 340px
|
|
217
247
|
|
|
218
248
|
@use '../tokens' as t;
|
|
219
249
|
|
|
220
250
|
.heroTarget {
|
|
221
|
-
|
|
251
|
+
// 본문 역할 → 최소 12px
|
|
252
|
+
font-size: clamp(12px, 3.33vw, 24px); // tree: 24 / 720 × 100 = 3.33vw
|
|
222
253
|
font-weight: 600; // tree: fontWeight:600
|
|
223
254
|
color: #ffffff; // tree: color:#ffffff
|
|
224
255
|
font-family: t.$font-pretendard;
|
|
@@ -226,11 +257,11 @@ components/ → font-size, font-weight, color, line-height, letter-spacing,
|
|
|
226
257
|
}
|
|
227
258
|
|
|
228
259
|
.heroShareBtn {
|
|
229
|
-
border-radius:
|
|
260
|
+
border-radius: 69.44vw; // tree: 500 / 720 × 100 (원형 유지)
|
|
230
261
|
background-color: rgba(13, 40, 61, 0.5); // tree 그대로
|
|
231
|
-
border:
|
|
232
|
-
width:
|
|
233
|
-
height:
|
|
262
|
+
border: 0.14vw solid #ffffff; // tree: 1 / 720 × 100
|
|
263
|
+
width: 10vw; // tree: 72 / 720 × 100
|
|
264
|
+
height: 10vw; // 정사각형 유지
|
|
234
265
|
display: flex; // tree: display:flex
|
|
235
266
|
justify-content: center; // tree: justifyContent:center
|
|
236
267
|
align-items: center; // tree: alignItems:center
|
|
@@ -382,7 +413,7 @@ function handleShare(): void {
|
|
|
382
413
|
|
|
383
414
|
콘텐츠 이미지:
|
|
384
415
|
조건: imageRef 있음 + 독립적 크기 + TEXT 형제 없음
|
|
385
|
-
매핑: width/height
|
|
416
|
+
매핑: width/height → vw 변환
|
|
386
417
|
태그: <img alt="가장 가까운 TEXT 노드의 characters" />
|
|
387
418
|
|
|
388
419
|
장식 이미지:
|
|
@@ -392,7 +423,7 @@ function handleShare(): void {
|
|
|
392
423
|
|
|
393
424
|
아이콘:
|
|
394
425
|
조건: VECTOR/GROUP + 크기 ≤ 64px
|
|
395
|
-
매핑: width/height
|
|
426
|
+
매핑: width/height → vw 변환
|
|
396
427
|
태그: <img alt="기능 설명" /> 또는 인라인 SVG
|
|
397
428
|
```
|
|
398
429
|
|
|
@@ -42,13 +42,22 @@ line-height, letter-spacing, text-align, border, border-radius,
|
|
|
42
42
|
box-shadow, opacity, mix-blend-mode, filter, backdrop-filter
|
|
43
43
|
```
|
|
44
44
|
|
|
45
|
-
##
|
|
45
|
+
## 반응형 단위 변환 (scaleFactor 사용하지 않음)
|
|
46
46
|
|
|
47
|
-
|
|
48
|
-
font-size, padding, margin, gap, width, height, border-radius,
|
|
49
|
-
border-width, box-shadow px, filter px, letter-spacing
|
|
47
|
+
스토리보드 CONFIG에서 designWidth, minWidth 확보.
|
|
50
48
|
|
|
51
|
-
|
|
49
|
+
**UI 요소 → vw 비례:**
|
|
50
|
+
vw값 = (Figma px / designWidth) × 100
|
|
51
|
+
적용: width, height, padding, gap, margin, border-radius,
|
|
52
|
+
border-width, box-shadow px, filter px, letter-spacing
|
|
53
|
+
|
|
54
|
+
**폰트 → clamp(최소, vw, 최대):**
|
|
55
|
+
vw값 = (Figma px / designWidth) × 100
|
|
56
|
+
최소값 = 역할에 따라 결정:
|
|
57
|
+
h1~h2: 16px, h3~h4: 14px, 본문: 12px, 캡션: 10px, 버튼: 12px
|
|
58
|
+
최대값 = Figma 원본 px
|
|
59
|
+
|
|
60
|
+
**변환하지 않는 속성:**
|
|
52
61
|
color, opacity, font-weight, font-family, z-index,
|
|
53
62
|
line-height(단위 없을 때), text-align, mix-blend-mode,
|
|
54
63
|
rotate, % 값
|
|
@@ -75,48 +75,46 @@ defineProps<{
|
|
|
75
75
|
|
|
76
76
|
---
|
|
77
77
|
|
|
78
|
-
## SCSS Layout (tree.json
|
|
78
|
+
## SCSS Layout (tree.json → vw 반응형)
|
|
79
79
|
|
|
80
80
|
```scss
|
|
81
81
|
// tree.json 데이터:
|
|
82
82
|
// {{SECTION_NAME}}: { width:{{WIDTH}}, height:{{HEIGHT}}, overflow:hidden }
|
|
83
83
|
// {{CHILD_1}}: { display:flex, flexDirection:column, gap:{{GAP}}px, padding:"{{PADDING}}" }
|
|
84
|
-
//
|
|
84
|
+
// designWidth = {{DESIGN_WIDTH}}px → vw = (px / designWidth) × 100
|
|
85
85
|
|
|
86
86
|
.{{sectionName}} {
|
|
87
87
|
position: relative;
|
|
88
88
|
width: 100%;
|
|
89
|
-
height: {{
|
|
89
|
+
height: {{HEIGHT_VW}}vw; // tree: {{HEIGHT}} / {{DESIGN_WIDTH}} × 100
|
|
90
90
|
overflow: hidden; // tree: overflow:hidden
|
|
91
|
-
}
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
position: absolute;
|
|
95
|
-
inset: 0;
|
|
96
|
-
z-index: 0;
|
|
97
|
-
img { width: 100%; height: 100%; object-fit: cover; }
|
|
91
|
+
background-image: url('/images/{{FEATURE_KEY}}/{{section}}-bg.png');
|
|
92
|
+
background-size: cover;
|
|
93
|
+
background-position: center top;
|
|
98
94
|
}
|
|
99
95
|
|
|
100
96
|
.{{sectionName}}__{{child1Name}} {
|
|
101
97
|
display: flex; // tree: display:flex
|
|
102
98
|
flex-direction: column; // tree: flexDirection:column
|
|
103
|
-
gap: {{
|
|
104
|
-
padding: {{
|
|
99
|
+
gap: {{GAP_VW}}vw; // tree: {{GAP}} / {{DESIGN_WIDTH}} × 100
|
|
100
|
+
padding: {{PADDING_VW}}; // tree: "{{PADDING}}" / {{DESIGN_WIDTH}} × 100
|
|
105
101
|
}
|
|
106
102
|
```
|
|
107
103
|
|
|
108
104
|
---
|
|
109
105
|
|
|
110
|
-
## SCSS Components (tree.json
|
|
106
|
+
## SCSS Components (tree.json → clamp 폰트)
|
|
111
107
|
|
|
112
108
|
```scss
|
|
113
109
|
// tree.json 데이터:
|
|
114
110
|
// TEXT "{{TEXT_1}}": { fontSize:{{FONT_SIZE}}px, fontWeight:{{FONT_WEIGHT}}, color:{{COLOR}} }
|
|
111
|
+
// designWidth = {{DESIGN_WIDTH}}px
|
|
115
112
|
|
|
116
113
|
.{{sectionName}}__title {
|
|
117
|
-
|
|
118
|
-
font-
|
|
119
|
-
|
|
114
|
+
// 역할: 제목 → 최소 16px
|
|
115
|
+
font-size: clamp(16px, {{FONT_SIZE_VW}}vw, {{FONT_SIZE}}px); // tree: {{FONT_SIZE}} / {{DESIGN_WIDTH}} × 100
|
|
116
|
+
font-weight: {{FONT_WEIGHT}}; // tree: 직접 (변환 안 함)
|
|
117
|
+
color: {{COLOR}}; // tree: 직접 (변환 안 함)
|
|
120
118
|
}
|
|
121
119
|
```
|
|
122
120
|
|
|
@@ -42,7 +42,7 @@ Bash:
|
|
|
42
42
|
|
|
43
43
|
트리 데이터의 용도 (vibe.figma.convert에서 직접 매핑):
|
|
44
44
|
- Auto Layout → CSS Flexbox (direction, gap, padding, align 1:1)
|
|
45
|
-
- absoluteBoundingBox → width, height (
|
|
45
|
+
- absoluteBoundingBox → width, height (→ vw 변환)
|
|
46
46
|
- fills/strokes/effects → background, border, shadow 등
|
|
47
47
|
- TEXT 노드 → 텍스트 콘텐츠 + 타이포그래피 CSS
|
|
48
48
|
- imageRef → 이미지 에셋 매핑
|
|
@@ -53,7 +53,7 @@ Bash:
|
|
|
53
53
|
|
|
54
54
|
트리 추출 도구가 자동 변환하는 속성. **이 값들이 SCSS에 직접 매핑된다:**
|
|
55
55
|
|
|
56
|
-
| Figma 속성 | CSS |
|
|
56
|
+
| Figma 속성 | CSS | vw 변환 |
|
|
57
57
|
|-----------|-----|-----------------|
|
|
58
58
|
| `layoutMode=VERTICAL` | `display:flex; flex-direction:column` | ❌ |
|
|
59
59
|
| `layoutMode=HORIZONTAL` | `display:flex; flex-direction:row` | ❌ |
|