@ncds/ui-admin-mcp 1.0.0-alpha.8 → 1.0.0-alpha.9
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/bin/definitions/instructions.md +14 -2
- package/bin/definitions/rules.json +2 -1
- package/bin/server.js +21 -14
- package/bin/tools/renderToHtml.d.ts +3 -2
- package/bin/tools/renderToHtml.js +119 -126
- package/bin/types.d.ts +9 -0
- package/bin/utils/dataLoader.d.ts +1 -10
- package/bin/utils/response.d.ts +2 -0
- package/bin/utils/response.js +7 -1
- package/data/badge-group.json +177 -3
- package/data/badge.json +118 -2
- package/data/bread-crumb.json +22 -2
- package/data/button.json +118 -2
- package/data/combo-box.json +19 -3
- package/data/date-picker.json +2 -1
- package/data/dropdown.json +93 -4
- package/data/empty-state.json +165 -2
- package/data/featured-icon.json +1 -1
- package/data/file-input.json +158 -4
- package/data/horizontal-tab.json +216 -1
- package/data/image-file-input.json +158 -4
- package/data/input-base.json +156 -2
- package/data/notification.json +21 -3
- package/data/number-input.json +156 -2
- package/data/password-input.json +220 -2
- package/data/progress-bar.json +21 -2
- package/data/range-date-picker-with-buttons.json +159 -6
- package/data/range-date-picker.json +158 -5
- package/data/select-box.json +19 -3
- package/data/select.json +19 -3
- package/data/spinner.json +1 -2
- package/data/switch.json +24 -2
- package/data/tag.json +59 -1
- package/data/vertical-tab.json +217 -2
- package/package.json +1 -1
- package/bin/instructions.d.ts +0 -1
- package/bin/instructions.js +0 -14
- package/bin/tools/getComponentHtml.d.ts +0 -3
- package/bin/tools/getComponentHtml.js +0 -30
package/data/select.json
CHANGED
|
@@ -62,9 +62,24 @@
|
|
|
62
62
|
"required": false
|
|
63
63
|
},
|
|
64
64
|
"optionItems": {
|
|
65
|
-
"type": "
|
|
65
|
+
"type": "object",
|
|
66
66
|
"required": false,
|
|
67
|
-
"rawType": "import(\"/Users/nhncommerce/Desktop/company/ai-driven-ncds/packages/ui-admin/src/types/dropdown/option\").OptionType[] | undefined"
|
|
67
|
+
"rawType": "import(\"/Users/nhncommerce/Desktop/company/ai-driven-ncds/packages/ui-admin/src/types/dropdown/option\").OptionType[] | undefined",
|
|
68
|
+
"properties": {
|
|
69
|
+
"id": {
|
|
70
|
+
"type": "string",
|
|
71
|
+
"required": true,
|
|
72
|
+
"rawType": "string | number"
|
|
73
|
+
},
|
|
74
|
+
"label": {
|
|
75
|
+
"type": "string",
|
|
76
|
+
"required": true
|
|
77
|
+
},
|
|
78
|
+
"icon": {
|
|
79
|
+
"type": "function",
|
|
80
|
+
"required": false
|
|
81
|
+
}
|
|
82
|
+
}
|
|
68
83
|
},
|
|
69
84
|
"placeholder": {
|
|
70
85
|
"type": "string",
|
|
@@ -72,7 +87,8 @@
|
|
|
72
87
|
},
|
|
73
88
|
"register": {
|
|
74
89
|
"type": "object",
|
|
75
|
-
"required": false
|
|
90
|
+
"required": false,
|
|
91
|
+
"rawType": "import(\"/Users/nhncommerce/Desktop/company/ai-driven-ncds/packages/ui-admin/node_modules/react-hook-form/dist/types/form\").UseFormRegisterReturn | undefined"
|
|
76
92
|
},
|
|
77
93
|
"size": {
|
|
78
94
|
"type": "enum",
|
package/data/spinner.json
CHANGED
package/data/switch.json
CHANGED
|
@@ -57,7 +57,18 @@
|
|
|
57
57
|
},
|
|
58
58
|
"left": {
|
|
59
59
|
"type": "object",
|
|
60
|
-
"required": true
|
|
60
|
+
"required": true,
|
|
61
|
+
"properties": {
|
|
62
|
+
"label": {
|
|
63
|
+
"type": "ReactNode",
|
|
64
|
+
"required": true
|
|
65
|
+
},
|
|
66
|
+
"value": {
|
|
67
|
+
"type": "string",
|
|
68
|
+
"required": true,
|
|
69
|
+
"rawType": "string | boolean"
|
|
70
|
+
}
|
|
71
|
+
}
|
|
61
72
|
},
|
|
62
73
|
"name": {
|
|
63
74
|
"type": "string",
|
|
@@ -73,7 +84,18 @@
|
|
|
73
84
|
},
|
|
74
85
|
"right": {
|
|
75
86
|
"type": "object",
|
|
76
|
-
"required": true
|
|
87
|
+
"required": true,
|
|
88
|
+
"properties": {
|
|
89
|
+
"label": {
|
|
90
|
+
"type": "ReactNode",
|
|
91
|
+
"required": true
|
|
92
|
+
},
|
|
93
|
+
"value": {
|
|
94
|
+
"type": "string",
|
|
95
|
+
"required": true,
|
|
96
|
+
"rawType": "string | boolean"
|
|
97
|
+
}
|
|
98
|
+
}
|
|
77
99
|
},
|
|
78
100
|
"size": {
|
|
79
101
|
"type": "string",
|
package/data/tag.json
CHANGED
|
@@ -53,7 +53,65 @@
|
|
|
53
53
|
},
|
|
54
54
|
"icon": {
|
|
55
55
|
"type": "object",
|
|
56
|
-
"required": false
|
|
56
|
+
"required": false,
|
|
57
|
+
"rawType": "import(\"/Users/nhncommerce/Desktop/company/ai-driven-ncds/packages/ui-admin/src/types/side-slot\").SideSlotType | undefined",
|
|
58
|
+
"properties": {
|
|
59
|
+
"type": {
|
|
60
|
+
"type": "string",
|
|
61
|
+
"required": true,
|
|
62
|
+
"rawType": "\"icon\""
|
|
63
|
+
},
|
|
64
|
+
"icon": {
|
|
65
|
+
"type": "function",
|
|
66
|
+
"required": false
|
|
67
|
+
},
|
|
68
|
+
"color": {
|
|
69
|
+
"type": "enum",
|
|
70
|
+
"required": false,
|
|
71
|
+
"values": [
|
|
72
|
+
"black",
|
|
73
|
+
"blue500",
|
|
74
|
+
"blue600",
|
|
75
|
+
"currentColor",
|
|
76
|
+
"gray100",
|
|
77
|
+
"gray200",
|
|
78
|
+
"gray300",
|
|
79
|
+
"gray400",
|
|
80
|
+
"gray500",
|
|
81
|
+
"gray600",
|
|
82
|
+
"gray700",
|
|
83
|
+
"green500",
|
|
84
|
+
"green600",
|
|
85
|
+
"orange500",
|
|
86
|
+
"orange600",
|
|
87
|
+
"pink100",
|
|
88
|
+
"pink600",
|
|
89
|
+
"red500",
|
|
90
|
+
"red600",
|
|
91
|
+
"secondary-gray-blue-100",
|
|
92
|
+
"secondary-gray-blue-200",
|
|
93
|
+
"secondary-gray-blue-300",
|
|
94
|
+
"secondary-gray-blue-400",
|
|
95
|
+
"secondary-gray-blue-450",
|
|
96
|
+
"secondary-gray-blue-50",
|
|
97
|
+
"secondary-gray-blue-500",
|
|
98
|
+
"secondary-gray-blue-600",
|
|
99
|
+
"secondary-gray-blue-700",
|
|
100
|
+
"violet300",
|
|
101
|
+
"violet600",
|
|
102
|
+
"white",
|
|
103
|
+
"yellow600"
|
|
104
|
+
]
|
|
105
|
+
},
|
|
106
|
+
"size": {
|
|
107
|
+
"type": "number",
|
|
108
|
+
"required": false
|
|
109
|
+
},
|
|
110
|
+
"children": {
|
|
111
|
+
"type": "ReactNode",
|
|
112
|
+
"required": false
|
|
113
|
+
}
|
|
114
|
+
}
|
|
57
115
|
},
|
|
58
116
|
"maxLength": {
|
|
59
117
|
"type": "number",
|
package/data/vertical-tab.json
CHANGED
|
@@ -57,9 +57,224 @@
|
|
|
57
57
|
"default": "pc"
|
|
58
58
|
},
|
|
59
59
|
"menus": {
|
|
60
|
-
"type": "
|
|
60
|
+
"type": "object",
|
|
61
61
|
"required": false,
|
|
62
|
-
"rawType": "import(\"/Users/nhncommerce/Desktop/company/ai-driven-ncds/packages/ui-admin/src/components/tab/TabButton\").TabButtonProps[] | undefined"
|
|
62
|
+
"rawType": "import(\"/Users/nhncommerce/Desktop/company/ai-driven-ncds/packages/ui-admin/src/components/tab/TabButton\").TabButtonProps[] | undefined",
|
|
63
|
+
"properties": {
|
|
64
|
+
"id": {
|
|
65
|
+
"type": "string",
|
|
66
|
+
"required": false
|
|
67
|
+
},
|
|
68
|
+
"label": {
|
|
69
|
+
"type": "string",
|
|
70
|
+
"required": false
|
|
71
|
+
},
|
|
72
|
+
"size": {
|
|
73
|
+
"type": "enum",
|
|
74
|
+
"required": false,
|
|
75
|
+
"values": [
|
|
76
|
+
"lg",
|
|
77
|
+
"md",
|
|
78
|
+
"sm"
|
|
79
|
+
]
|
|
80
|
+
},
|
|
81
|
+
"tabButtonType": {
|
|
82
|
+
"type": "enum",
|
|
83
|
+
"required": false,
|
|
84
|
+
"values": [
|
|
85
|
+
"button-primary",
|
|
86
|
+
"button-white",
|
|
87
|
+
"line-vertical",
|
|
88
|
+
"underline",
|
|
89
|
+
"underline-fill"
|
|
90
|
+
]
|
|
91
|
+
},
|
|
92
|
+
"isActive": {
|
|
93
|
+
"type": "boolean",
|
|
94
|
+
"required": false
|
|
95
|
+
},
|
|
96
|
+
"badgeInfo": {
|
|
97
|
+
"type": "object",
|
|
98
|
+
"required": false,
|
|
99
|
+
"rawType": "import(\"/Users/nhncommerce/Desktop/company/ai-driven-ncds/packages/ui-admin/src/components/badge/Badge\").BadgeProps | undefined",
|
|
100
|
+
"properties": {
|
|
101
|
+
"label": {
|
|
102
|
+
"type": "string",
|
|
103
|
+
"required": true
|
|
104
|
+
},
|
|
105
|
+
"type": {
|
|
106
|
+
"type": "enum",
|
|
107
|
+
"required": false,
|
|
108
|
+
"values": [
|
|
109
|
+
"pill-dark-color",
|
|
110
|
+
"pill-outline"
|
|
111
|
+
]
|
|
112
|
+
},
|
|
113
|
+
"color": {
|
|
114
|
+
"type": "enum",
|
|
115
|
+
"required": false,
|
|
116
|
+
"values": [
|
|
117
|
+
"blue",
|
|
118
|
+
"disabled",
|
|
119
|
+
"error",
|
|
120
|
+
"neutral",
|
|
121
|
+
"pink",
|
|
122
|
+
"success",
|
|
123
|
+
"warning"
|
|
124
|
+
]
|
|
125
|
+
},
|
|
126
|
+
"className": {
|
|
127
|
+
"type": "string",
|
|
128
|
+
"required": false
|
|
129
|
+
},
|
|
130
|
+
"leadingIcon": {
|
|
131
|
+
"type": "object",
|
|
132
|
+
"required": false,
|
|
133
|
+
"rawType": "import(\"/Users/nhncommerce/Desktop/company/ai-driven-ncds/packages/ui-admin/src/types/side-slot\").SideSlotType | undefined",
|
|
134
|
+
"properties": {
|
|
135
|
+
"type": {
|
|
136
|
+
"type": "string",
|
|
137
|
+
"required": true,
|
|
138
|
+
"rawType": "\"icon\""
|
|
139
|
+
},
|
|
140
|
+
"icon": {
|
|
141
|
+
"type": "function",
|
|
142
|
+
"required": false
|
|
143
|
+
},
|
|
144
|
+
"color": {
|
|
145
|
+
"type": "enum",
|
|
146
|
+
"required": false,
|
|
147
|
+
"values": [
|
|
148
|
+
"black",
|
|
149
|
+
"blue500",
|
|
150
|
+
"blue600",
|
|
151
|
+
"currentColor",
|
|
152
|
+
"gray100",
|
|
153
|
+
"gray200",
|
|
154
|
+
"gray300",
|
|
155
|
+
"gray400",
|
|
156
|
+
"gray500",
|
|
157
|
+
"gray600",
|
|
158
|
+
"gray700",
|
|
159
|
+
"green500",
|
|
160
|
+
"green600",
|
|
161
|
+
"orange500",
|
|
162
|
+
"orange600",
|
|
163
|
+
"pink100",
|
|
164
|
+
"pink600",
|
|
165
|
+
"red500",
|
|
166
|
+
"red600",
|
|
167
|
+
"secondary-gray-blue-100",
|
|
168
|
+
"secondary-gray-blue-200",
|
|
169
|
+
"secondary-gray-blue-300",
|
|
170
|
+
"secondary-gray-blue-400",
|
|
171
|
+
"secondary-gray-blue-450",
|
|
172
|
+
"secondary-gray-blue-50",
|
|
173
|
+
"secondary-gray-blue-500",
|
|
174
|
+
"secondary-gray-blue-600",
|
|
175
|
+
"secondary-gray-blue-700",
|
|
176
|
+
"violet300",
|
|
177
|
+
"violet600",
|
|
178
|
+
"white",
|
|
179
|
+
"yellow600"
|
|
180
|
+
]
|
|
181
|
+
},
|
|
182
|
+
"size": {
|
|
183
|
+
"type": "number",
|
|
184
|
+
"required": false
|
|
185
|
+
},
|
|
186
|
+
"children": {
|
|
187
|
+
"type": "ReactNode",
|
|
188
|
+
"required": false
|
|
189
|
+
}
|
|
190
|
+
}
|
|
191
|
+
},
|
|
192
|
+
"trailingIcon": {
|
|
193
|
+
"type": "object",
|
|
194
|
+
"required": false,
|
|
195
|
+
"rawType": "import(\"/Users/nhncommerce/Desktop/company/ai-driven-ncds/packages/ui-admin/src/types/side-slot\").SideSlotType | undefined",
|
|
196
|
+
"properties": {
|
|
197
|
+
"type": {
|
|
198
|
+
"type": "string",
|
|
199
|
+
"required": true,
|
|
200
|
+
"rawType": "\"icon\""
|
|
201
|
+
},
|
|
202
|
+
"icon": {
|
|
203
|
+
"type": "function",
|
|
204
|
+
"required": false
|
|
205
|
+
},
|
|
206
|
+
"color": {
|
|
207
|
+
"type": "enum",
|
|
208
|
+
"required": false,
|
|
209
|
+
"values": [
|
|
210
|
+
"black",
|
|
211
|
+
"blue500",
|
|
212
|
+
"blue600",
|
|
213
|
+
"currentColor",
|
|
214
|
+
"gray100",
|
|
215
|
+
"gray200",
|
|
216
|
+
"gray300",
|
|
217
|
+
"gray400",
|
|
218
|
+
"gray500",
|
|
219
|
+
"gray600",
|
|
220
|
+
"gray700",
|
|
221
|
+
"green500",
|
|
222
|
+
"green600",
|
|
223
|
+
"orange500",
|
|
224
|
+
"orange600",
|
|
225
|
+
"pink100",
|
|
226
|
+
"pink600",
|
|
227
|
+
"red500",
|
|
228
|
+
"red600",
|
|
229
|
+
"secondary-gray-blue-100",
|
|
230
|
+
"secondary-gray-blue-200",
|
|
231
|
+
"secondary-gray-blue-300",
|
|
232
|
+
"secondary-gray-blue-400",
|
|
233
|
+
"secondary-gray-blue-450",
|
|
234
|
+
"secondary-gray-blue-50",
|
|
235
|
+
"secondary-gray-blue-500",
|
|
236
|
+
"secondary-gray-blue-600",
|
|
237
|
+
"secondary-gray-blue-700",
|
|
238
|
+
"violet300",
|
|
239
|
+
"violet600",
|
|
240
|
+
"white",
|
|
241
|
+
"yellow600"
|
|
242
|
+
]
|
|
243
|
+
},
|
|
244
|
+
"size": {
|
|
245
|
+
"type": "number",
|
|
246
|
+
"required": false
|
|
247
|
+
},
|
|
248
|
+
"children": {
|
|
249
|
+
"type": "ReactNode",
|
|
250
|
+
"required": false
|
|
251
|
+
}
|
|
252
|
+
}
|
|
253
|
+
},
|
|
254
|
+
"size": {
|
|
255
|
+
"type": "enum",
|
|
256
|
+
"required": false,
|
|
257
|
+
"values": [
|
|
258
|
+
"md",
|
|
259
|
+
"sm",
|
|
260
|
+
"xs"
|
|
261
|
+
]
|
|
262
|
+
}
|
|
263
|
+
}
|
|
264
|
+
},
|
|
265
|
+
"className": {
|
|
266
|
+
"type": "string",
|
|
267
|
+
"required": false
|
|
268
|
+
},
|
|
269
|
+
"children": {
|
|
270
|
+
"type": "ReactNode",
|
|
271
|
+
"required": false
|
|
272
|
+
},
|
|
273
|
+
"onClick": {
|
|
274
|
+
"type": "function",
|
|
275
|
+
"required": false
|
|
276
|
+
}
|
|
277
|
+
}
|
|
63
278
|
},
|
|
64
279
|
"onSelect": {
|
|
65
280
|
"type": "function",
|
package/package.json
CHANGED
package/bin/instructions.d.ts
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export declare const INSTRUCTIONS: string;
|
package/bin/instructions.js
DELETED
|
@@ -1,14 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
3
|
-
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
4
|
-
};
|
|
5
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
6
|
-
exports.INSTRUCTIONS = void 0;
|
|
7
|
-
/**
|
|
8
|
-
* AI 에이전트가 MCP 서버 연결 시 자동으로 수신하는 필수 지침.
|
|
9
|
-
* definitions/instructions.md에서 로드한다.
|
|
10
|
-
*/
|
|
11
|
-
const path_1 = __importDefault(require("path"));
|
|
12
|
-
const fs_1 = __importDefault(require("fs"));
|
|
13
|
-
const INSTRUCTIONS_PATH = path_1.default.resolve(__dirname, 'definitions', 'instructions.md');
|
|
14
|
-
exports.INSTRUCTIONS = fs_1.default.readFileSync(INSTRUCTIONS_PATH, 'utf-8').trim();
|
|
@@ -1,30 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.getComponentHtml = void 0;
|
|
4
|
-
/**
|
|
5
|
-
* get_component_html tool — 컴포넌트 HTML 스니펫 반환 (순수 함수)
|
|
6
|
-
*/
|
|
7
|
-
const dataLoader_js_1 = require("../utils/dataLoader.js");
|
|
8
|
-
const response_js_1 = require("../utils/response.js");
|
|
9
|
-
/** default HTML에서 태그명 추출 */
|
|
10
|
-
const extractTag = (defaultHtml) => {
|
|
11
|
-
const match = defaultHtml.match(/^<(\w+)/);
|
|
12
|
-
return match ? match[1] : 'div';
|
|
13
|
-
};
|
|
14
|
-
const getComponentHtml = (componentMap, name, variant) => {
|
|
15
|
-
const normalized = (0, response_js_1.normalizeName)(name);
|
|
16
|
-
const component = (0, dataLoader_js_1.getComponent)(componentMap, normalized);
|
|
17
|
-
if (!component)
|
|
18
|
-
return (0, response_js_1.componentNotFoundResponse)(normalized);
|
|
19
|
-
if (!variant || Object.keys(variant).length === 0) {
|
|
20
|
-
return (0, response_js_1.successResponse)(component.html);
|
|
21
|
-
}
|
|
22
|
-
const rootClass = component.bemClasses.find((c) => !c.includes('--') && !c.includes('__')) ?? `ncua-${normalized}`;
|
|
23
|
-
const tag = extractTag(component.html.default);
|
|
24
|
-
const modifiers = Object.values(variant).map((v) => `${rootClass}--${v}`);
|
|
25
|
-
const classes = [rootClass, ...modifiers].join(' ');
|
|
26
|
-
const isVoid = /^<\w+\s[^>]*\/>$/.test(component.html.default);
|
|
27
|
-
const html = isVoid ? `<${tag} class="${classes}" />` : `<${tag} class="${classes}"></${tag}>`;
|
|
28
|
-
return (0, response_js_1.successResponse)({ variant, html });
|
|
29
|
-
};
|
|
30
|
-
exports.getComponentHtml = getComponentHtml;
|