@axis-ds/mcp 1.3.4 → 1.4.0

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.
@@ -15,7 +15,7 @@
15
15
  {
16
16
  "path": "components/ui/toast.tsx",
17
17
  "type": "registry:ui",
18
- "content": "import * as React from \"react\";\nimport * as ToastPrimitives from \"@radix-ui/react-toast\";\nimport { cva, type VariantProps } from \"class-variance-authority\";\nimport { cn } from \"@/registry/axis/lib/utils\";\n\n/** 토스트 알림 시스템의 프로바이더 컴포넌트. 앱 루트에 배치하여 토스트 기능을 활성화한다. */\nconst ToastProvider = ToastPrimitives.Provider;\n\n/** 토스트 알림이 표시되는 뷰포트 영역. 화면 하단 우측에 고정 위치로 렌더링된다. */\nconst ToastViewport = React.forwardRef<\n React.ElementRef<typeof ToastPrimitives.Viewport>,\n React.ComponentPropsWithoutRef<typeof ToastPrimitives.Viewport>\n>(({ className, ...props }, ref) => (\n <ToastPrimitives.Viewport\n ref={ref}\n className={cn(\n \"fixed top-0 z-[100] flex max-h-screen w-full flex-col-reverse p-4 sm:bottom-0 sm:right-0 sm:top-auto sm:flex-col md:max-w-[420px]\",\n className\n )}\n {...props}\n />\n));\nToastViewport.displayName = ToastPrimitives.Viewport.displayName;\n\nconst toastVariants = cva(\n \"group pointer-events-auto relative flex w-full items-center justify-between space-x-4 overflow-hidden rounded-md border p-6 pr-8 shadow-lg transition-all data-[swipe=cancel]:translate-x-0 data-[swipe=end]:translate-x-[var(--radix-toast-swipe-end-x)] data-[swipe=move]:translate-x-[var(--radix-toast-swipe-move-x)] data-[swipe=move]:transition-none data-[state=open]:animate-in data-[state=closed]:animate-out data-[swipe=end]:animate-out data-[state=closed]:fade-out-80 data-[state=closed]:slide-out-to-right-full data-[state=open]:slide-in-from-top-full data-[state=open]:sm:slide-in-from-bottom-full motion-reduce:!animate-none\",\n {\n variants: {\n variant: {\n default:\n \"border-[var(--axis-border-default)] bg-[var(--axis-surface-default)] text-[var(--axis-text-primary)]\",\n success:\n \"border-[var(--axis-border-success)] bg-[var(--axis-surface-success)] text-[var(--axis-text-success)]\",\n error:\n \"border-[var(--axis-border-error)] bg-[var(--axis-surface-error)] text-[var(--axis-text-error)]\",\n warning:\n \"border-transparent bg-[var(--axis-surface-warning)] text-[var(--axis-text-warning)]\",\n },\n },\n defaultVariants: {\n variant: \"default\",\n },\n }\n);\n\n/** 토스트 알림의 루트 컴포넌트. default, success, error, warning 변형을 지원하며 스와이프로 닫을 수 있다. */\nconst Toast = React.forwardRef<\n React.ElementRef<typeof ToastPrimitives.Root>,\n React.ComponentPropsWithoutRef<typeof ToastPrimitives.Root> &\n VariantProps<typeof toastVariants>\n>(({ className, variant, ...props }, ref) => (\n <ToastPrimitives.Root\n ref={ref}\n className={cn(toastVariants({ variant }), className)}\n {...props}\n />\n));\nToast.displayName = ToastPrimitives.Root.displayName;\n\n/** 토스트 내에 표시되는 액션 버튼 컴포넌트. 사용자 상호작용을 위한 CTA를 제공한다. */\nconst ToastAction = React.forwardRef<\n React.ElementRef<typeof ToastPrimitives.Action>,\n React.ComponentPropsWithoutRef<typeof ToastPrimitives.Action>\n>(({ className, ...props }, ref) => (\n <ToastPrimitives.Action\n ref={ref}\n className={cn(\n \"inline-flex h-8 shrink-0 items-center justify-center rounded-md border px-3 text-sm font-medium transition-colors\",\n \"border-[var(--axis-border-default)] bg-transparent\",\n \"hover:bg-[var(--axis-surface-secondary)]\",\n \"focus:outline-none focus:ring-2 focus:ring-[var(--axis-border-focus)]\",\n \"disabled:pointer-events-none disabled:opacity-50\",\n className\n )}\n {...props}\n />\n));\nToastAction.displayName = ToastPrimitives.Action.displayName;\n\n/** 토스트를 닫는 닫기 버튼 컴포넌트. 호버 시 표시되며 X 아이콘을 포함한다. */\nconst ToastClose = React.forwardRef<\n React.ElementRef<typeof ToastPrimitives.Close>,\n React.ComponentPropsWithoutRef<typeof ToastPrimitives.Close>\n>(({ className, ...props }, ref) => (\n <ToastPrimitives.Close\n ref={ref}\n className={cn(\n \"absolute right-2 top-2 rounded-md p-1 text-[var(--axis-text-secondary)] opacity-0 transition-opacity\",\n \"hover:text-[var(--axis-text-primary)]\",\n \"focus:opacity-100 focus:outline-none focus:ring-2\",\n \"group-hover:opacity-100\",\n className\n )}\n toast-close=\"\"\n {...props}\n >\n <svg className=\"h-4 w-4\" fill=\"none\" stroke=\"currentColor\" viewBox=\"0 0 24 24\">\n <path strokeLinecap=\"round\" strokeLinejoin=\"round\" strokeWidth={2} d=\"M6 18L18 6M6 6l12 12\" />\n </svg>\n </ToastPrimitives.Close>\n));\nToastClose.displayName = ToastPrimitives.Close.displayName;\n\n/** 토스트의 제목을 표시하는 컴포넌트 */\nconst ToastTitle = React.forwardRef<\n React.ElementRef<typeof ToastPrimitives.Title>,\n React.ComponentPropsWithoutRef<typeof ToastPrimitives.Title>\n>(({ className, ...props }, ref) => (\n <ToastPrimitives.Title\n ref={ref}\n className={cn(\"text-sm font-semibold\", className)}\n {...props}\n />\n));\nToastTitle.displayName = ToastPrimitives.Title.displayName;\n\n/** 토스트의 상세 설명을 표시하는 컴포넌트 */\nconst ToastDescription = React.forwardRef<\n React.ElementRef<typeof ToastPrimitives.Description>,\n React.ComponentPropsWithoutRef<typeof ToastPrimitives.Description>\n>(({ className, ...props }, ref) => (\n <ToastPrimitives.Description\n ref={ref}\n className={cn(\"text-sm opacity-90\", className)}\n {...props}\n />\n));\nToastDescription.displayName = ToastPrimitives.Description.displayName;\n\nexport {\n ToastProvider,\n ToastViewport,\n Toast,\n ToastTitle,\n ToastDescription,\n ToastClose,\n ToastAction,\n};\n"
18
+ "content": "import * as React from \"react\";\nimport * as ToastPrimitives from \"@radix-ui/react-toast\";\nimport { cva, type VariantProps } from \"class-variance-authority\";\nimport { cn } from \"@/registry/axis/lib/utils\";\n\n/** 토스트 알림 시스템의 프로바이더 컴포넌트. 앱 루트에 배치하여 토스트 기능을 활성화한다. */\nconst ToastProvider = ToastPrimitives.Provider;\n\n/** 토스트 알림이 표시되는 뷰포트 영역. 화면 하단 우측에 고정 위치로 렌더링된다. */\nconst ToastViewport = React.forwardRef<\n React.ElementRef<typeof ToastPrimitives.Viewport>,\n React.ComponentPropsWithoutRef<typeof ToastPrimitives.Viewport>\n>(({ className, ...props }, ref) => (\n <ToastPrimitives.Viewport\n ref={ref}\n className={cn(\n \"fixed top-0 z-[100] flex max-h-screen w-full flex-col-reverse p-4 sm:bottom-0 sm:right-0 sm:top-auto sm:flex-col md:max-w-[420px]\",\n className\n )}\n {...props}\n />\n));\nToastViewport.displayName = ToastPrimitives.Viewport.displayName;\n\nconst toastVariants = cva(\n \"group pointer-events-auto relative flex w-full items-center justify-between space-x-4 overflow-hidden rounded-md border p-6 pr-8 shadow-lg transition-all data-[swipe=cancel]:translate-x-0 data-[swipe=end]:translate-x-[var(--radix-toast-swipe-end-x)] data-[swipe=move]:translate-x-[var(--radix-toast-swipe-move-x)] data-[swipe=move]:transition-none data-[state=open]:animate-in data-[state=closed]:animate-out data-[swipe=end]:animate-out data-[state=closed]:fade-out-80 data-[state=closed]:slide-out-to-right-full data-[state=open]:slide-in-from-top-full data-[state=open]:sm:slide-in-from-bottom-full motion-reduce:!animate-none\",\n {\n variants: {\n variant: {\n default:\n \"border-[var(--axis-border-default)] bg-[var(--axis-surface-default)] text-[var(--axis-text-primary)]\",\n success:\n \"border-[var(--axis-border-success)] bg-[var(--axis-surface-success)] text-[var(--axis-text-success)]\",\n error:\n \"border-[var(--axis-border-error)] bg-[var(--axis-surface-error)] text-[var(--axis-text-error)]\",\n warning:\n \"border-transparent bg-[var(--axis-surface-warning)] text-[var(--axis-text-warning)]\",\n },\n },\n defaultVariants: {\n variant: \"default\",\n },\n }\n);\n\n/** 토스트 알림의 루트 컴포넌트. default, success, error, warning 변형을 지원하며 스와이프로 닫을 수 있다. */\nconst Toast = React.forwardRef<\n React.ElementRef<typeof ToastPrimitives.Root>,\n React.ComponentPropsWithoutRef<typeof ToastPrimitives.Root> &\n VariantProps<typeof toastVariants>\n>(({ className, variant, ...props }, ref) => (\n <ToastPrimitives.Root\n ref={ref}\n className={cn(toastVariants({ variant }), className)}\n {...props}\n />\n));\nToast.displayName = ToastPrimitives.Root.displayName;\n\n/** 토스트 내에 표시되는 액션 버튼 컴포넌트. 사용자 상호작용을 위한 CTA를 제공한다. */\nconst ToastAction = React.forwardRef<\n React.ElementRef<typeof ToastPrimitives.Action>,\n React.ComponentPropsWithoutRef<typeof ToastPrimitives.Action>\n>(({ className, ...props }, ref) => (\n <ToastPrimitives.Action\n ref={ref}\n className={cn(\n \"inline-flex h-8 shrink-0 items-center justify-center rounded-md border px-3 text-sm font-medium transition-colors\",\n \"border-[var(--axis-border-default)] bg-transparent\",\n \"hover:bg-[var(--axis-surface-secondary)]\",\n \"focus:outline-none focus:ring-2 focus:ring-[var(--axis-border-focus)]\",\n \"disabled:pointer-events-none disabled:opacity-50\",\n className\n )}\n {...props}\n />\n));\nToastAction.displayName = ToastPrimitives.Action.displayName;\n\n/** 토스트를 닫는 닫기 버튼 컴포넌트. 호버 시 표시되며 X 아이콘을 포함한다. */\nconst ToastClose = React.forwardRef<\n React.ElementRef<typeof ToastPrimitives.Close>,\n React.ComponentPropsWithoutRef<typeof ToastPrimitives.Close>\n>(({ className, ...props }, ref) => (\n <ToastPrimitives.Close\n ref={ref}\n className={cn(\n \"absolute right-2 top-2 rounded-md p-1 text-[var(--axis-text-secondary)] opacity-0 transition-opacity\",\n \"hover:text-[var(--axis-text-primary)]\",\n \"focus:opacity-100 focus:outline-none focus:ring-2\",\n \"group-hover:opacity-100\",\n className\n )}\n toast-close=\"\"\n {...props}\n >\n <svg className=\"h-4 w-4\" fill=\"none\" stroke=\"currentColor\" viewBox=\"0 0 24 24\">\n <path strokeLinecap=\"round\" strokeLinejoin=\"round\" strokeWidth={2} d=\"M6 18L18 6M6 6l12 12\" />\n </svg>\n </ToastPrimitives.Close>\n));\nToastClose.displayName = ToastPrimitives.Close.displayName;\n\n/** 토스트의 제목을 표시하는 컴포넌트 */\nconst ToastTitle = React.forwardRef<\n React.ElementRef<typeof ToastPrimitives.Title>,\n React.ComponentPropsWithoutRef<typeof ToastPrimitives.Title>\n>(({ className, ...props }, ref) => (\n <ToastPrimitives.Title\n ref={ref}\n className={cn(\"text-sm font-semibold\", className)}\n {...props}\n />\n));\nToastTitle.displayName = ToastPrimitives.Title.displayName;\n\n/** 토스트의 상세 설명을 표시하는 컴포넌트 */\nconst ToastDescription = React.forwardRef<\n React.ElementRef<typeof ToastPrimitives.Description>,\n React.ComponentPropsWithoutRef<typeof ToastPrimitives.Description>\n>(({ className, ...props }, ref) => (\n <ToastPrimitives.Description\n ref={ref}\n className={cn(\"text-sm\", className)}\n {...props}\n />\n));\nToastDescription.displayName = ToastPrimitives.Description.displayName;\n\nexport {\n ToastProvider,\n ToastViewport,\n Toast,\n ToastTitle,\n ToastDescription,\n ToastClose,\n ToastAction,\n};\n"
19
19
  }
20
20
  ]
21
21
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@axis-ds/mcp",
3
- "version": "1.3.4",
3
+ "version": "1.4.0",
4
4
  "type": "module",
5
5
  "description": "AXIS Design System - MCP Server for AI-assisted component discovery",
6
6
  "bin": {
@@ -27,7 +27,8 @@
27
27
  "tsup": "^8.0.0",
28
28
  "typescript": "^5.7.0",
29
29
  "vitest": "^2.1.0",
30
- "@axis-ds/registry-core": "0.0.0"
30
+ "@axis-ds/registry-core": "0.0.0",
31
+ "@axis-ds/tokens": "1.8.1"
31
32
  },
32
33
  "keywords": [
33
34
  "mcp",
@@ -44,8 +45,9 @@
44
45
  },
45
46
  "homepage": "https://axis-design-system.pages.dev",
46
47
  "scripts": {
47
- "build": "tsup src/index.ts --format esm --dts --clean && npm run copy-data && npm run copy-registry",
48
+ "build": "tsup src/index.ts --format esm --dts --clean && npm run copy-data && npm run gen-tokens && npm run copy-registry",
48
49
  "copy-data": "node -e \"const fs=require('fs');fs.cpSync('src/registry/data','dist/data',{recursive:true})\"",
50
+ "gen-tokens": "node src/registry/token-gen.mjs dist/data/tokens.json",
49
51
  "copy-registry": "node ../axis-cli/scripts/copy-registry.mjs ../../apps/web/public/r dist/registry",
50
52
  "dev": "tsup src/index.ts --format esm --watch",
51
53
  "clean": "rm -rf dist",
@@ -1,269 +0,0 @@
1
- {
2
- "tokens": [
3
- {
4
- "path": "colors.background",
5
- "value": "hsl(0 0% 100%)",
6
- "category": "color",
7
- "description": "기본 배경색",
8
- "cssVariable": "--background"
9
- },
10
- {
11
- "path": "colors.foreground",
12
- "value": "hsl(222.2 84% 4.9%)",
13
- "category": "color",
14
- "description": "기본 전경색 (텍스트)",
15
- "cssVariable": "--foreground"
16
- },
17
- {
18
- "path": "colors.primary",
19
- "value": "hsl(222.2 47.4% 11.2%)",
20
- "category": "color",
21
- "description": "주요 브랜드 색상",
22
- "cssVariable": "--primary"
23
- },
24
- {
25
- "path": "colors.primary.foreground",
26
- "value": "hsl(210 40% 98%)",
27
- "category": "color",
28
- "description": "주요 색상 위 텍스트",
29
- "cssVariable": "--primary-foreground"
30
- },
31
- {
32
- "path": "colors.secondary",
33
- "value": "hsl(210 40% 96.1%)",
34
- "category": "color",
35
- "description": "보조 색상",
36
- "cssVariable": "--secondary"
37
- },
38
- {
39
- "path": "colors.secondary.foreground",
40
- "value": "hsl(222.2 47.4% 11.2%)",
41
- "category": "color",
42
- "description": "보조 색상 위 텍스트",
43
- "cssVariable": "--secondary-foreground"
44
- },
45
- {
46
- "path": "colors.muted",
47
- "value": "hsl(210 40% 96.1%)",
48
- "category": "color",
49
- "description": "음소거/비활성 배경색",
50
- "cssVariable": "--muted"
51
- },
52
- {
53
- "path": "colors.muted.foreground",
54
- "value": "hsl(215.4 16.3% 46.9%)",
55
- "category": "color",
56
- "description": "음소거 텍스트 색상",
57
- "cssVariable": "--muted-foreground"
58
- },
59
- {
60
- "path": "colors.accent",
61
- "value": "hsl(210 40% 96.1%)",
62
- "category": "color",
63
- "description": "강조 배경색",
64
- "cssVariable": "--accent"
65
- },
66
- {
67
- "path": "colors.accent.foreground",
68
- "value": "hsl(222.2 47.4% 11.2%)",
69
- "category": "color",
70
- "description": "강조 텍스트 색상",
71
- "cssVariable": "--accent-foreground"
72
- },
73
- {
74
- "path": "colors.destructive",
75
- "value": "hsl(0 84.2% 60.2%)",
76
- "category": "color",
77
- "description": "위험/삭제 작업 색상",
78
- "cssVariable": "--destructive"
79
- },
80
- {
81
- "path": "colors.destructive.foreground",
82
- "value": "hsl(210 40% 98%)",
83
- "category": "color",
84
- "description": "위험 색상 위 텍스트",
85
- "cssVariable": "--destructive-foreground"
86
- },
87
- {
88
- "path": "colors.border",
89
- "value": "hsl(214.3 31.8% 91.4%)",
90
- "category": "color",
91
- "description": "테두리 색상",
92
- "cssVariable": "--border"
93
- },
94
- {
95
- "path": "colors.ring",
96
- "value": "hsl(222.2 84% 4.9%)",
97
- "category": "color",
98
- "description": "포커스 링 색상",
99
- "cssVariable": "--ring"
100
- },
101
- {
102
- "path": "typography.fontFamily.sans",
103
- "value": "ui-sans-serif, system-ui, sans-serif",
104
- "category": "typography",
105
- "description": "기본 산세리프 폰트"
106
- },
107
- {
108
- "path": "typography.fontFamily.mono",
109
- "value": "ui-monospace, monospace",
110
- "category": "typography",
111
- "description": "모노스페이스 폰트"
112
- },
113
- {
114
- "path": "typography.fontSize.xs",
115
- "value": "0.75rem",
116
- "category": "typography",
117
- "description": "아주 작은 텍스트 (12px)"
118
- },
119
- {
120
- "path": "typography.fontSize.sm",
121
- "value": "0.875rem",
122
- "category": "typography",
123
- "description": "작은 텍스트 (14px)"
124
- },
125
- {
126
- "path": "typography.fontSize.base",
127
- "value": "1rem",
128
- "category": "typography",
129
- "description": "기본 텍스트 (16px)"
130
- },
131
- {
132
- "path": "typography.fontSize.lg",
133
- "value": "1.125rem",
134
- "category": "typography",
135
- "description": "큰 텍스트 (18px)"
136
- },
137
- {
138
- "path": "typography.fontSize.xl",
139
- "value": "1.25rem",
140
- "category": "typography",
141
- "description": "더 큰 텍스트 (20px)"
142
- },
143
- {
144
- "path": "typography.fontSize.2xl",
145
- "value": "1.5rem",
146
- "category": "typography",
147
- "description": "제목 텍스트 (24px)"
148
- },
149
- {
150
- "path": "spacing.0",
151
- "value": "0",
152
- "category": "spacing",
153
- "description": "0 간격"
154
- },
155
- {
156
- "path": "spacing.1",
157
- "value": "0.25rem",
158
- "category": "spacing",
159
- "description": "4px 간격"
160
- },
161
- {
162
- "path": "spacing.2",
163
- "value": "0.5rem",
164
- "category": "spacing",
165
- "description": "8px 간격"
166
- },
167
- {
168
- "path": "spacing.3",
169
- "value": "0.75rem",
170
- "category": "spacing",
171
- "description": "12px 간격"
172
- },
173
- {
174
- "path": "spacing.4",
175
- "value": "1rem",
176
- "category": "spacing",
177
- "description": "16px 간격"
178
- },
179
- {
180
- "path": "spacing.6",
181
- "value": "1.5rem",
182
- "category": "spacing",
183
- "description": "24px 간격"
184
- },
185
- {
186
- "path": "spacing.8",
187
- "value": "2rem",
188
- "category": "spacing",
189
- "description": "32px 간격"
190
- },
191
- {
192
- "path": "radius.none",
193
- "value": "0",
194
- "category": "radius",
195
- "description": "모서리 없음",
196
- "cssVariable": "--radius-none"
197
- },
198
- {
199
- "path": "radius.sm",
200
- "value": "0.125rem",
201
- "category": "radius",
202
- "description": "작은 모서리 (2px)",
203
- "cssVariable": "--radius-sm"
204
- },
205
- {
206
- "path": "radius.md",
207
- "value": "0.375rem",
208
- "category": "radius",
209
- "description": "중간 모서리 (6px)",
210
- "cssVariable": "--radius"
211
- },
212
- {
213
- "path": "radius.lg",
214
- "value": "0.5rem",
215
- "category": "radius",
216
- "description": "큰 모서리 (8px)",
217
- "cssVariable": "--radius-lg"
218
- },
219
- {
220
- "path": "radius.full",
221
- "value": "9999px",
222
- "category": "radius",
223
- "description": "완전한 원형",
224
- "cssVariable": "--radius-full"
225
- },
226
- {
227
- "path": "shadow.sm",
228
- "value": "0 1px 2px 0 rgb(0 0 0 / 0.05)",
229
- "category": "shadow",
230
- "description": "작은 그림자"
231
- },
232
- {
233
- "path": "shadow.md",
234
- "value": "0 4px 6px -1px rgb(0 0 0 / 0.1)",
235
- "category": "shadow",
236
- "description": "중간 그림자"
237
- },
238
- {
239
- "path": "shadow.lg",
240
- "value": "0 10px 15px -3px rgb(0 0 0 / 0.1)",
241
- "category": "shadow",
242
- "description": "큰 그림자"
243
- },
244
- {
245
- "path": "animation.duration.fast",
246
- "value": "150ms",
247
- "category": "animation",
248
- "description": "빠른 애니메이션"
249
- },
250
- {
251
- "path": "animation.duration.normal",
252
- "value": "200ms",
253
- "category": "animation",
254
- "description": "기본 애니메이션"
255
- },
256
- {
257
- "path": "animation.duration.slow",
258
- "value": "300ms",
259
- "category": "animation",
260
- "description": "느린 애니메이션"
261
- },
262
- {
263
- "path": "animation.easing.default",
264
- "value": "cubic-bezier(0.4, 0, 0.2, 1)",
265
- "category": "animation",
266
- "description": "기본 이징"
267
- }
268
- ]
269
- }