@mandujs/mcp 0.9.21 → 0.9.42

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 CHANGED
@@ -1,41 +1,41 @@
1
- {
2
- "name": "@mandujs/mcp",
3
- "version": "0.9.21",
4
- "description": "Mandu MCP Server - Agent-native interface for Mandu framework operations",
5
- "type": "module",
6
- "main": "./src/index.ts",
7
- "bin": {
8
- "mandu-mcp": "./src/index.ts"
9
- },
10
- "exports": {
11
- ".": "./src/index.ts"
12
- },
13
- "files": [
14
- "src/**/*"
15
- ],
16
- "keywords": [
17
- "mandu",
18
- "mcp",
19
- "model-context-protocol",
20
- "ai",
21
- "agent",
22
- "code-generation"
23
- ],
24
- "repository": {
25
- "type": "git",
26
- "url": "https://github.com/konamgil/mandu.git",
27
- "directory": "packages/mcp"
28
- },
29
- "author": "konamgil",
30
- "license": "MIT",
31
- "publishConfig": {
32
- "access": "public"
33
- },
34
- "dependencies": {
35
- "@mandujs/core": "^0.9.25",
36
- "@modelcontextprotocol/sdk": "^1.25.3"
37
- },
38
- "engines": {
39
- "bun": ">=1.0.0"
40
- }
41
- }
1
+ {
2
+ "name": "@mandujs/mcp",
3
+ "version": "0.9.42",
4
+ "description": "Mandu MCP Server - Agent-native interface for Mandu framework operations",
5
+ "type": "module",
6
+ "main": "./src/index.ts",
7
+ "bin": {
8
+ "mandu-mcp": "./src/index.ts"
9
+ },
10
+ "exports": {
11
+ ".": "./src/index.ts"
12
+ },
13
+ "files": [
14
+ "src/**/*"
15
+ ],
16
+ "keywords": [
17
+ "mandu",
18
+ "mcp",
19
+ "model-context-protocol",
20
+ "ai",
21
+ "agent",
22
+ "code-generation"
23
+ ],
24
+ "repository": {
25
+ "type": "git",
26
+ "url": "https://github.com/konamgil/mandu.git",
27
+ "directory": "packages/mcp"
28
+ },
29
+ "author": "konamgil",
30
+ "license": "MIT",
31
+ "publishConfig": {
32
+ "access": "public"
33
+ },
34
+ "dependencies": {
35
+ "@mandujs/core": "workspace:*",
36
+ "@modelcontextprotocol/sdk": "^1.25.3"
37
+ },
38
+ "engines": {
39
+ "bun": ">=1.0.0"
40
+ }
41
+ }
@@ -1,92 +1,90 @@
1
1
  ---
2
2
  name: Mandu Styling
3
- description: CSS framework integration and Island styling patterns
3
+ description: Tailwind CSS v4 integration and Island styling patterns for Mandu Framework
4
4
  metadata:
5
- version: "1.0.0"
5
+ version: "2.0.0"
6
6
  author: mandu
7
+ tailwind: "v4.1+"
7
8
  globs:
8
- - "tailwind.config.{js,ts}"
9
- - "panda.config.{js,ts}"
10
- - "postcss.config.{js,ts}"
11
9
  - "**/*.css"
12
10
  - "**/*.module.css"
11
+ - "app/globals.css"
13
12
  ---
14
13
 
15
14
  # Mandu Styling Skill
16
15
 
17
- Mandu Island 아키텍처에 최적화된 CSS 스타일링 가이드입니다.
16
+ Mandu Island 아키텍처에 최적화된 Tailwind CSS v4 스타일링 가이드입니다.
18
17
 
19
18
  ## 핵심 원칙
20
19
 
21
20
  1. **Zero-Runtime**: 빌드 타임 CSS 생성 (SSR 호환)
22
- 2. **Island 격리**: 컴포넌트 스타일 충돌 방지
23
- 3. **Composition**: Tailwind utility + 컴포넌트 패턴
24
- 4. **Performance**: Critical CSS, Tree-shaking
21
+ 2. **CSS-First**: JavaScript 설정 대신 CSS에서 테마 정의
22
+ 3. **Island 격리**: 컴포넌트 스타일 충돌 방지
23
+ 4. **Auto Integration**: Mandu가 Tailwind v4 자동 감지 및 빌드
25
24
 
26
25
  ## 권장 스택
27
26
 
28
27
  ```
29
- Primary: Tailwind CSS + clsx/tailwind-merge
30
- Alternative: Panda CSS (type-safe 선호 시)
31
- Fallback: CSS Modules (최소 의존성)
28
+ Primary: Tailwind CSS v4 + clsx/tailwind-merge
29
+ Alternative: CSS Modules (최소 의존성)
32
30
  ```
33
31
 
34
32
  ## 빠른 시작
35
33
 
36
- ### Tailwind CSS 설정
34
+ ### 1. 설치
37
35
 
38
36
  ```bash
39
- bun add -d tailwindcss postcss autoprefixer
40
- bunx tailwindcss init -p
37
+ bun add -d tailwindcss@^4.1 @tailwindcss/cli@^4.1
38
+ bun add clsx tailwind-merge
41
39
  ```
42
40
 
43
- ```typescript
44
- // tailwind.config.ts
45
- import type { Config } from "tailwindcss";
46
-
47
- export default {
48
- content: ["./app/**/*.{ts,tsx}"],
49
- theme: {
50
- extend: {
51
- colors: {
52
- mandu: {
53
- primary: "#3b82f6",
54
- secondary: "#64748b",
55
- },
56
- },
57
- },
58
- },
59
- plugins: [],
60
- } satisfies Config;
61
- ```
41
+ ### 2. app/globals.css
62
42
 
63
43
  ```css
64
- /* app/globals.css */
65
- @tailwind base;
66
- @tailwind components;
67
- @tailwind utilities;
44
+ @import "tailwindcss";
45
+
46
+ @theme {
47
+ --color-primary: hsl(222.2 47.4% 11.2%);
48
+ --color-primary-foreground: hsl(210 40% 98%);
49
+ --color-background: hsl(0 0% 100%);
50
+ --color-foreground: hsl(222.2 84% 4.9%);
51
+ --radius-md: 0.5rem;
52
+ --font-sans: 'Inter', system-ui, sans-serif;
53
+ }
54
+
55
+ body {
56
+ background-color: var(--color-background);
57
+ color: var(--color-foreground);
58
+ }
68
59
  ```
69
60
 
70
- ### Island 스타일링
61
+ ### 3. Mandu 자동 통합
71
62
 
72
- ```tsx
73
- // app/counter/client.tsx
74
- "use client";
63
+ ```
64
+ mandu dev 실행 시:
65
+ ├─ @import "tailwindcss" 감지
66
+ ├─ Tailwind CLI --watch 자동 시작
67
+ ├─ 출력: .mandu/client/globals.css
68
+ ├─ SSR에서 <link> 자동 주입
69
+ └─ CSS 변경 시 HMR 핫 리로드
70
+ ```
75
71
 
76
- import { cn } from "@/lib/utils";
72
+ ## Island 스타일링
77
73
 
78
- interface CounterProps {
79
- variant?: "default" | "outline";
80
- }
74
+ ```tsx
75
+ // src/client/widgets/counter/Counter.island.tsx
76
+ "use client";
81
77
 
82
- export function CounterIsland({ variant = "default" }: CounterProps) {
83
- const variants = {
84
- default: "bg-mandu-primary text-white",
85
- outline: "border-2 border-mandu-primary text-mandu-primary",
86
- };
78
+ import { cn } from "@/shared/lib/utils";
87
79
 
80
+ export function CounterIsland({ variant = "default" }) {
88
81
  return (
89
- <button className={cn("px-4 py-2 rounded-lg", variants[variant])}>
82
+ <button className={cn(
83
+ "px-4 py-2 rounded-md font-medium transition-colors",
84
+ variant === "default"
85
+ ? "bg-primary text-primary-foreground hover:bg-primary/90"
86
+ : "border border-primary text-primary hover:bg-primary/10"
87
+ )}>
90
88
  Count: 0
91
89
  </button>
92
90
  );
@@ -96,7 +94,7 @@ export function CounterIsland({ variant = "default" }: CounterProps) {
96
94
  ## cn 유틸리티
97
95
 
98
96
  ```typescript
99
- // lib/utils.ts
97
+ // src/client/shared/lib/utils.ts
100
98
  import { clsx, type ClassValue } from "clsx";
101
99
  import { twMerge } from "tailwind-merge";
102
100
 
@@ -105,14 +103,52 @@ export function cn(...inputs: ClassValue[]) {
105
103
  }
106
104
  ```
107
105
 
106
+ ## Custom Utilities
107
+
108
+ ```css
109
+ /* v4 방식: @utility 사용 */
110
+ @utility text-balance {
111
+ text-wrap: balance;
112
+ }
113
+
114
+ @utility scrollbar-hide {
115
+ -ms-overflow-style: none;
116
+ scrollbar-width: none;
117
+ &::-webkit-scrollbar { display: none; }
118
+ }
119
+ ```
120
+
121
+ ## v4 주요 변경사항
122
+
123
+ | v3 | v4 |
124
+ |----|-----|
125
+ | `@tailwind base/utilities` | `@import "tailwindcss"` |
126
+ | `tailwind.config.ts` | `@theme { }` in CSS |
127
+ | `!bg-red-500` | `bg-red-500!` |
128
+ | `@layer utilities` | `@utility` |
129
+ | `bg-[--var]` | `bg-(--var)` |
130
+
131
+ > 자세한 내용은 `rules/style-tailwind-v4-gotchas.md` 참조
132
+
108
133
  ## 규칙 카테고리
109
134
 
110
135
  | Category | Description | Rules |
111
136
  |----------|-------------|-------|
112
- | Setup | 프레임워크 설정 | 3 |
137
+ | Setup | Tailwind v4 설정 | 1 |
138
+ | Gotchas | v4 주의사항/마이그레이션 | 1 |
113
139
  | Island | Island 스타일 패턴 | 3 |
114
140
  | Component | 컴포넌트 스타일 | 3 |
115
141
  | Performance | 최적화 | 2 |
116
142
  | Theme | 테마/다크모드 | 1 |
117
143
 
118
144
  → 세부 규칙은 `rules/` 폴더 참조
145
+
146
+ ## Browser Support
147
+
148
+ ```
149
+ Safari 16.4+ | Chrome 111+ | Firefox 128+
150
+ ```
151
+
152
+ > IE 및 구형 브라우저 미지원. 레거시 프로젝트는 Tailwind v3 유지 권장.
153
+
154
+ Reference: [Tailwind CSS v4](https://tailwindcss.com/docs)
@@ -1,12 +1,19 @@
1
1
  # Mandu Styling - Rule Categories
2
2
 
3
3
  ## Setup
4
- CSS 프레임워크 초기 설정 및 Bun 통합
4
+ CSS 프레임워크 초기 설정 및 Mandu 통합 (Tailwind v4 CSS-first)
5
5
 
6
6
  | Impact | Description |
7
7
  |--------|-------------|
8
8
  | CRITICAL | 프레임워크 설정 없이 스타일링 불가 |
9
9
 
10
+ ## Gotchas
11
+ Tailwind CSS v4 마이그레이션 주의사항 및 Breaking Changes
12
+
13
+ | Impact | Description |
14
+ |--------|-------------|
15
+ | HIGH | v3→v4 마이그레이션 시 필수 확인 사항 |
16
+
10
17
  ## Island
11
18
  Island 컴포넌트 특화 스타일링 패턴
12
19
 
@@ -1,13 +1,15 @@
1
1
  {
2
2
  "id": "mandu-styling",
3
3
  "name": "Mandu Styling",
4
- "version": "1.0.0",
5
- "description": "CSS framework integration and Island styling patterns",
4
+ "version": "2.0.0",
5
+ "description": "Tailwind CSS v4 integration and Island styling patterns for Mandu Framework",
6
6
  "author": "mandu",
7
+ "tailwind": "v4.1+",
7
8
  "references": [
8
9
  "https://tailwindcss.com/docs",
10
+ "https://tailwindcss.com/docs/upgrade-guide",
9
11
  "https://panda-css.com/docs",
10
12
  "https://lightningcss.dev/"
11
13
  ],
12
- "abstract": "Mandu Island 아키텍처에 최적화된 CSS 스타일링 패턴. Tailwind CSS primary로, Panda CSS와 CSS Modules를 대안으로 제공합니다."
14
+ "abstract": "Mandu Island 아키텍처에 최적화된 Tailwind CSS v4 스타일링 가이드. CSS-first 설정, @theme 블록, Mandu 자동 통합(CSS Auto-Build, HMR)을 지원합니다."
13
15
  }
@@ -1,97 +1,93 @@
1
1
  ---
2
- title: Tailwind CSS Setup
2
+ title: Tailwind CSS v4 Setup
3
3
  impact: CRITICAL
4
- impactDescription: Primary CSS framework for Mandu applications
5
- tags: styling, tailwind, setup, postcss
4
+ impactDescription: Primary CSS framework for Mandu applications (v4 required)
5
+ tags: styling, tailwind, setup, v4, css-first
6
6
  ---
7
7
 
8
- ## Tailwind CSS Setup
8
+ ## Tailwind CSS v4 Setup
9
9
 
10
10
  **Impact: CRITICAL (Primary CSS framework for Mandu applications)**
11
11
 
12
- Tailwind CSS를 Mandu 프로젝트에 설정하세요. Bun과 PostCSS 통합을 포함합니다.
12
+ Tailwind CSS v4를 Mandu 프로젝트에 설정합니다. v4는 Oxide Engine(Rust)으로 재작성되어 빌드 속도가 3.5~5배 향상되었습니다.
13
13
 
14
- **설치:**
14
+ ## 설치
15
15
 
16
16
  ```bash
17
- bun add -d tailwindcss postcss autoprefixer
17
+ bun add -d tailwindcss@^4.1 @tailwindcss/cli@^4.1
18
18
  bun add clsx tailwind-merge
19
- bunx tailwindcss init -p
20
19
  ```
21
20
 
22
- **tailwind.config.ts:**
21
+ > **Note:** PostCSS, autoprefixer는 불필요합니다. Tailwind v4가 내장 처리합니다.
23
22
 
24
- ```typescript
25
- import type { Config } from "tailwindcss";
23
+ ## app/globals.css (CSS-first Configuration)
26
24
 
27
- export default {
28
- content: [
29
- "./app/**/*.{ts,tsx}",
30
- "./components/**/*.{ts,tsx}",
31
- "./lib/**/*.{ts,tsx}",
32
- ],
33
- theme: {
34
- extend: {
35
- colors: {
36
- mandu: {
37
- primary: "hsl(var(--mandu-primary))",
38
- secondary: "hsl(var(--mandu-secondary))",
39
- accent: "hsl(var(--mandu-accent))",
40
- background: "hsl(var(--mandu-background))",
41
- foreground: "hsl(var(--mandu-foreground))",
42
- },
43
- },
44
- borderRadius: {
45
- mandu: "var(--mandu-radius)",
46
- },
47
- },
48
- },
49
- plugins: [],
50
- } satisfies Config;
51
- ```
25
+ ```css
26
+ @import "tailwindcss";
27
+
28
+ /*
29
+ * Tailwind CSS v4 - CSS-first Configuration
30
+ * JavaScript 설정 파일 대신 CSS에서 직접 테마 정의
31
+ */
32
+
33
+ @theme {
34
+ /* Colors - shadcn/ui compatible */
35
+ --color-background: hsl(0 0% 100%);
36
+ --color-foreground: hsl(222.2 84% 4.9%);
37
+ --color-card: hsl(0 0% 100%);
38
+ --color-card-foreground: hsl(222.2 84% 4.9%);
39
+ --color-primary: hsl(222.2 47.4% 11.2%);
40
+ --color-primary-foreground: hsl(210 40% 98%);
41
+ --color-secondary: hsl(210 40% 96.1%);
42
+ --color-secondary-foreground: hsl(222.2 47.4% 11.2%);
43
+ --color-muted: hsl(210 40% 96.1%);
44
+ --color-muted-foreground: hsl(215.4 16.3% 46.9%);
45
+ --color-accent: hsl(210 40% 96.1%);
46
+ --color-accent-foreground: hsl(222.2 47.4% 11.2%);
47
+ --color-destructive: hsl(0 84.2% 60.2%);
48
+ --color-destructive-foreground: hsl(210 40% 98%);
49
+ --color-border: hsl(214.3 31.8% 91.4%);
50
+ --color-input: hsl(214.3 31.8% 91.4%);
51
+ --color-ring: hsl(222.2 84% 4.9%);
52
+
53
+ /* Radius */
54
+ --radius-sm: 0.25rem;
55
+ --radius-md: 0.5rem;
56
+ --radius-lg: 0.75rem;
57
+
58
+ /* Fonts */
59
+ --font-sans: 'Inter', ui-sans-serif, system-ui, sans-serif;
60
+ }
52
61
 
53
- **postcss.config.js:**
62
+ /* Base styles */
63
+ * {
64
+ border-color: var(--color-border);
65
+ }
54
66
 
55
- ```javascript
56
- export default {
57
- plugins: {
58
- tailwindcss: {},
59
- autoprefixer: {},
60
- },
61
- };
67
+ body {
68
+ background-color: var(--color-background);
69
+ color: var(--color-foreground);
70
+ font-family: var(--font-sans);
71
+ }
62
72
  ```
63
73
 
64
- **app/globals.css:**
74
+ ## Mandu 자동 통합
65
75
 
66
- ```css
67
- @tailwind base;
68
- @tailwind components;
69
- @tailwind utilities;
70
-
71
- @layer base {
72
- :root {
73
- --mandu-primary: 221.2 83.2% 53.3%;
74
- --mandu-secondary: 210 40% 96.1%;
75
- --mandu-accent: 210 40% 96.1%;
76
- --mandu-background: 0 0% 100%;
77
- --mandu-foreground: 222.2 84% 4.9%;
78
- --mandu-radius: 0.5rem;
79
- }
76
+ Mandu는 Tailwind v4를 자동으로 감지하고 처리합니다:
80
77
 
81
- .dark {
82
- --mandu-primary: 217.2 91.2% 59.8%;
83
- --mandu-secondary: 217.2 32.6% 17.5%;
84
- --mandu-accent: 217.2 32.6% 17.5%;
85
- --mandu-background: 222.2 84% 4.9%;
86
- --mandu-foreground: 210 40% 98%;
87
- }
88
- }
78
+ ```
79
+ mandu dev 실행 시:
80
+ 1. app/globals.css에서 @import "tailwindcss" 감지
81
+ 2. bunx @tailwindcss/cli --watch 자동 시작
82
+ 3. 출력: .mandu/client/globals.css
83
+ 4. SSR에서 <link> 태그 자동 주입
84
+ 5. CSS 변경 시 HMR 핫 리로드
89
85
  ```
90
86
 
91
87
  ## cn 유틸리티 함수
92
88
 
93
89
  ```typescript
94
- // lib/utils.ts
90
+ // src/client/shared/lib/utils.ts
95
91
  import { clsx, type ClassValue } from "clsx";
96
92
  import { twMerge } from "tailwind-merge";
97
93
 
@@ -100,62 +96,75 @@ export function cn(...inputs: ClassValue[]) {
100
96
  }
101
97
  ```
102
98
 
103
- ## 사용 예시
99
+ ## Island 컴포넌트 스타일링
104
100
 
105
101
  ```tsx
106
- // app/button/client.tsx
102
+ // src/client/features/counter/CounterIsland.tsx
107
103
  "use client";
108
104
 
109
- import { cn } from "@/lib/utils";
105
+ import { cn } from "@/shared/lib/utils";
110
106
 
111
- interface ButtonProps extends React.ButtonHTMLAttributes<HTMLButtonElement> {
112
- variant?: "default" | "outline" | "ghost";
113
- size?: "sm" | "md" | "lg";
107
+ interface CounterProps {
108
+ variant?: "default" | "outline";
114
109
  }
115
110
 
116
- export function ButtonIsland({
117
- variant = "default",
118
- size = "md",
119
- className,
120
- ...props
121
- }: ButtonProps) {
111
+ export function CounterIsland({ variant = "default" }: CounterProps) {
112
+ const variants = {
113
+ default: "bg-primary text-primary-foreground",
114
+ outline: "border-2 border-primary text-primary",
115
+ };
116
+
122
117
  return (
123
- <button
124
- className={cn(
125
- // Base
126
- "inline-flex items-center justify-center rounded-mandu font-medium transition-colors",
127
- // Variants
128
- {
129
- default: "bg-mandu-primary text-white hover:bg-mandu-primary/90",
130
- outline: "border border-mandu-primary text-mandu-primary hover:bg-mandu-primary/10",
131
- ghost: "hover:bg-mandu-secondary",
132
- }[variant],
133
- // Sizes
134
- {
135
- sm: "h-8 px-3 text-sm",
136
- md: "h-10 px-4",
137
- lg: "h-12 px-6 text-lg",
138
- }[size],
139
- className
140
- )}
141
- {...props}
142
- />
118
+ <button className={cn(
119
+ "px-4 py-2 rounded-md transition-colors",
120
+ variants[variant]
121
+ )}>
122
+ Count: 0
123
+ </button>
143
124
  );
144
125
  }
145
126
  ```
146
127
 
128
+ ## Custom Utilities (v4 방식)
129
+
130
+ ```css
131
+ /* @layer utilities 대신 @utility 사용 */
132
+ @utility text-balance {
133
+ text-wrap: balance;
134
+ }
135
+
136
+ @utility scrollbar-hide {
137
+ -ms-overflow-style: none;
138
+ scrollbar-width: none;
139
+ &::-webkit-scrollbar {
140
+ display: none;
141
+ }
142
+ }
143
+ ```
144
+
147
145
  ## VSCode 설정
148
146
 
149
147
  ```json
150
148
  // .vscode/settings.json
151
149
  {
152
150
  "tailwindCSS.experimental.classRegex": [
153
- ["cn\\(([^)]*)\\)", "'([^']*)'"]
151
+ ["cn\\(([^)]*)\\)", "'([^']*)'"],
152
+ ["cva\\(([^)]*)\\)", "[\"'`]([^\"'`]*).*?[\"'`]"]
154
153
  ],
155
154
  "editor.quickSuggestions": {
156
155
  "strings": true
156
+ },
157
+ "files.associations": {
158
+ "*.css": "tailwindcss"
157
159
  }
158
160
  }
159
161
  ```
160
162
 
161
- Reference: [Tailwind CSS Documentation](https://tailwindcss.com/docs)
163
+ ## 삭제할 파일 (v3에서 마이그레이션 시)
164
+
165
+ ```bash
166
+ rm -f tailwind.config.ts tailwind.config.js
167
+ rm -f postcss.config.js postcss.config.ts
168
+ ```
169
+
170
+ Reference: [Tailwind CSS v4 Documentation](https://tailwindcss.com/docs)
@@ -0,0 +1,179 @@
1
+ ---
2
+ title: Tailwind CSS v4 Gotchas
3
+ impact: HIGH
4
+ impactDescription: Critical breaking changes when using or migrating to Tailwind v4
5
+ tags: styling, tailwind, v4, gotchas, migration, breaking-changes
6
+ ---
7
+
8
+ ## Tailwind CSS v4 Gotchas
9
+
10
+ **Impact: HIGH (Critical breaking changes when using or migrating to Tailwind v4)**
11
+
12
+ Tailwind v4는 완전히 재작성된 프레임워크입니다. v3에서 마이그레이션 시 반드시 확인해야 할 주의사항입니다.
13
+
14
+ ## Browser Support
15
+
16
+ ```
17
+ Safari 16.4+ | Chrome 111+ | Firefox 128+
18
+ ```
19
+
20
+ > **Warning:** IE 및 구형 브라우저 지원 불가. 레거시 프로젝트는 v3 유지 권장.
21
+
22
+ ## Import Syntax 변경
23
+
24
+ ```css
25
+ /* v3 (deprecated) */
26
+ @tailwind base;
27
+ @tailwind components;
28
+ @tailwind utilities;
29
+
30
+ /* v4 (required) */
31
+ @import "tailwindcss";
32
+ ```
33
+
34
+ ## Important Modifier 위치 변경
35
+
36
+ ```css
37
+ /* v3 */
38
+ !bg-red-500
39
+
40
+ /* v4 - 끝에 위치 */
41
+ bg-red-500!
42
+ ```
43
+
44
+ ## Custom Utilities 문법 변경
45
+
46
+ ```css
47
+ /* v3 */
48
+ @layer utilities {
49
+ .text-balance {
50
+ text-wrap: balance;
51
+ }
52
+ }
53
+
54
+ /* v4 - @utility 사용 */
55
+ @utility text-balance {
56
+ text-wrap: balance;
57
+ }
58
+ ```
59
+
60
+ ## Stacked Variants 순서 변경
61
+
62
+ ```html
63
+ <!-- v3: right-to-left (hover가 dark보다 우선) -->
64
+ <div class="dark:hover:bg-blue-500">
65
+
66
+ <!-- v4: left-to-right (dark가 hover보다 우선) -->
67
+ <div class="dark:hover:bg-blue-500">
68
+ ```
69
+
70
+ > v4에서는 왼쪽부터 적용되므로 variant 순서에 주의하세요.
71
+
72
+ ## CSS Variable Syntax 변경
73
+
74
+ ```html
75
+ <!-- v3 -->
76
+ <div class="bg-[var(--brand-color)]">
77
+ <div class="bg-[--brand-color]">
78
+
79
+ <!-- v4 - 괄호 문법 사용 -->
80
+ <div class="bg-(--brand-color)">
81
+ ```
82
+
83
+ ## hover: 동작 변경
84
+
85
+ ```html
86
+ <!-- v4에서 hover:는 hover 지원 기기에서만 적용 -->
87
+ <!-- 터치 기기에서는 적용되지 않음 -->
88
+ <button class="hover:bg-blue-500">
89
+
90
+ <!-- 모든 기기에서 적용하려면 -->
91
+ <button class="hover:bg-blue-500 active:bg-blue-500">
92
+ ```
93
+
94
+ ## Default Color 변경
95
+
96
+ ```css
97
+ /* v4 기본값 변경 */
98
+ border-color: currentColor; /* v3: gray-200 */
99
+ ring-width: 1px; /* v3: 3px */
100
+ ring-color: currentColor; /* v3: blue-500/50 */
101
+ ```
102
+
103
+ > 기존 디자인이 깨질 수 있으니 명시적 색상 지정 권장.
104
+
105
+ ## Transform 초기화 변경
106
+
107
+ ```html
108
+ <!-- v3 -->
109
+ <div class="transform-none">
110
+
111
+ <!-- v4 - 개별 속성 사용 -->
112
+ <div class="scale-none rotate-none translate-none">
113
+ ```
114
+
115
+ ## space-* / divide-* 선택자 변경
116
+
117
+ ```html
118
+ <!-- 레이아웃이 깨지면 gap으로 대체 -->
119
+ <div class="flex gap-4"> <!-- space-x-4 대신 -->
120
+ <div class="grid gap-4"> <!-- space-y-4 대신 -->
121
+ ```
122
+
123
+ ## CSS Modules에서 Theme 변수 접근
124
+
125
+ ```css
126
+ /* Component.module.css */
127
+ @reference "tailwindcss"; /* v4 필수 */
128
+
129
+ .button {
130
+ background-color: var(--color-primary);
131
+ }
132
+ ```
133
+
134
+ ## Prefix 설정 변경
135
+
136
+ ```css
137
+ /* v3: tailwind.config.js */
138
+ module.exports = { prefix: 'tw-' }
139
+
140
+ /* v4: CSS에서 설정 */
141
+ @import "tailwindcss" prefix(tw);
142
+
143
+ /* 사용 시 콜론 형식 */
144
+ <div class="tw:bg-blue-500">
145
+ ```
146
+
147
+ ## Mandu 특화 주의사항
148
+
149
+ ### Island 컴포넌트에서 @reference
150
+
151
+ ```tsx
152
+ // Island에서 CSS Modules 사용 시
153
+ import styles from './Counter.module.css';
154
+
155
+ // Counter.module.css에 @reference 필수
156
+ ```
157
+
158
+ ### SSR과 CSS 순서
159
+
160
+ Mandu의 CSS Auto-Build는 `/.mandu/client/globals.css`에 출력합니다.
161
+ SSR 시 이 경로로 자동 주입되므로 별도 설정 불필요.
162
+
163
+ ### HMR 동작
164
+
165
+ CSS 변경 시 `css-update` HMR 메시지로 스타일시트만 교체됩니다.
166
+ 페이지 전체 리로드 없이 스타일 변경 확인 가능.
167
+
168
+ ## 마이그레이션 체크리스트
169
+
170
+ - [ ] Browser support 확인 (Safari 16.4+)
171
+ - [ ] `@tailwind` → `@import "tailwindcss"` 변경
172
+ - [ ] `tailwind.config.ts` 삭제, `@theme`으로 이전
173
+ - [ ] `postcss.config.js` 삭제
174
+ - [ ] Important modifier 위치 변경 (`!` → 끝)
175
+ - [ ] `@layer utilities` → `@utility` 변경
176
+ - [ ] CSS variable 문법 확인 `[--var]` → `(--var)`
177
+ - [ ] space-*/divide-* 레이아웃 확인
178
+
179
+ Reference: [Tailwind CSS v4 Upgrade Guide](https://tailwindcss.com/docs/upgrade-guide)