@axis-ds/mcp 1.3.5 → 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.
- package/README.md +12 -0
- package/dist/data/tokens.json +2250 -126
- package/dist/index.js +113 -93
- package/dist/registry/index.json +1 -1
- package/dist/registry/registry.json +1 -1
- package/package.json +5 -3
- package/src/registry/data/tokens.json +0 -269
package/dist/index.js
CHANGED
|
@@ -10,61 +10,67 @@ import { z } from "zod";
|
|
|
10
10
|
import { readFileSync } from "fs";
|
|
11
11
|
import { join, dirname } from "path";
|
|
12
12
|
import { fileURLToPath } from "url";
|
|
13
|
+
|
|
14
|
+
// src/types.ts
|
|
15
|
+
var TOKEN_CATEGORIES = [
|
|
16
|
+
"color",
|
|
17
|
+
"typography",
|
|
18
|
+
"spacing",
|
|
19
|
+
"radius",
|
|
20
|
+
"shadow",
|
|
21
|
+
"density",
|
|
22
|
+
"component"
|
|
23
|
+
];
|
|
24
|
+
|
|
25
|
+
// src/registry/loader.ts
|
|
13
26
|
var __filename = fileURLToPath(import.meta.url);
|
|
14
27
|
var __dirname = dirname(__filename);
|
|
15
28
|
var DATA_DIR = join(__dirname, "data");
|
|
16
|
-
var
|
|
29
|
+
var cachedComponents = null;
|
|
30
|
+
var cachedTokens = null;
|
|
17
31
|
function loadComponents() {
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
32
|
+
if (!cachedComponents) {
|
|
33
|
+
const filePath = join(DATA_DIR, "components.json");
|
|
34
|
+
const content = readFileSync(filePath, "utf-8");
|
|
35
|
+
const data = JSON.parse(content);
|
|
36
|
+
cachedComponents = data.components;
|
|
37
|
+
}
|
|
38
|
+
return cachedComponents;
|
|
22
39
|
}
|
|
23
40
|
function loadTokens() {
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
}
|
|
29
|
-
function getRegistry() {
|
|
30
|
-
if (!cachedRegistry) {
|
|
31
|
-
cachedRegistry = {
|
|
32
|
-
components: loadComponents(),
|
|
33
|
-
tokens: loadTokens()
|
|
34
|
-
};
|
|
41
|
+
if (!cachedTokens) {
|
|
42
|
+
const filePath = join(DATA_DIR, "tokens.json");
|
|
43
|
+
const content = readFileSync(filePath, "utf-8");
|
|
44
|
+
const data = JSON.parse(content);
|
|
45
|
+
cachedTokens = { source: data.source, tokens: data.tokens };
|
|
35
46
|
}
|
|
36
|
-
return
|
|
47
|
+
return cachedTokens;
|
|
37
48
|
}
|
|
38
49
|
function getComponentMeta(name) {
|
|
39
|
-
|
|
40
|
-
return registry.components.find(
|
|
50
|
+
return loadComponents().find(
|
|
41
51
|
(c) => c.name.toLowerCase() === name.toLowerCase()
|
|
42
52
|
);
|
|
43
53
|
}
|
|
44
54
|
function listTokens(category) {
|
|
45
|
-
const
|
|
55
|
+
const { tokens } = loadTokens();
|
|
46
56
|
if (category) {
|
|
47
|
-
return
|
|
57
|
+
return tokens.filter((t) => t.category === category);
|
|
48
58
|
}
|
|
49
|
-
return
|
|
59
|
+
return tokens;
|
|
50
60
|
}
|
|
51
61
|
function getToken(path11) {
|
|
52
|
-
const
|
|
53
|
-
return
|
|
54
|
-
(t) => t.path.toLowerCase() ===
|
|
62
|
+
const q = path11.trim().toLowerCase();
|
|
63
|
+
return loadTokens().tokens.find(
|
|
64
|
+
(t) => t.path.toLowerCase() === q || (t.aliases ?? []).some((a) => a.toLowerCase() === q) || t.cssVariable.toLowerCase() === q
|
|
55
65
|
);
|
|
56
66
|
}
|
|
67
|
+
function getTokenSource() {
|
|
68
|
+
return loadTokens().source;
|
|
69
|
+
}
|
|
57
70
|
function getTokenStats() {
|
|
58
|
-
const
|
|
59
|
-
const stats =
|
|
60
|
-
|
|
61
|
-
typography: 0,
|
|
62
|
-
spacing: 0,
|
|
63
|
-
radius: 0,
|
|
64
|
-
shadow: 0,
|
|
65
|
-
animation: 0
|
|
66
|
-
};
|
|
67
|
-
for (const token of registry.tokens) {
|
|
71
|
+
const { tokens } = loadTokens();
|
|
72
|
+
const stats = Object.fromEntries(TOKEN_CATEGORIES.map((c) => [c, 0]));
|
|
73
|
+
for (const token of tokens) {
|
|
68
74
|
stats[token.category]++;
|
|
69
75
|
}
|
|
70
76
|
return stats;
|
|
@@ -1052,22 +1058,17 @@ function majorFromVersion(version) {
|
|
|
1052
1058
|
}
|
|
1053
1059
|
function detectTailwind(baseDirInput, pkg) {
|
|
1054
1060
|
const baseDir = resolve(baseDirInput);
|
|
1055
|
-
const installedFile = join2(baseDir, "node_modules", "tailwindcss", "package.json");
|
|
1056
1061
|
const declared = pkg ? hasDependency2(pkg, "tailwindcss") : void 0;
|
|
1057
1062
|
const bounds = declared !== void 0 ? tailwindMajorBounds(declared) : void 0;
|
|
1058
1063
|
const declaredMajor = bounds?.lower;
|
|
1059
|
-
|
|
1060
|
-
|
|
1061
|
-
|
|
1062
|
-
const
|
|
1063
|
-
if (
|
|
1064
|
-
|
|
1065
|
-
if (declared !== void 0 && bounds !== void 0 && !majorWithin(major, bounds)) {
|
|
1066
|
-
found.mismatch = { declared, declaredMajor: bounds.lower };
|
|
1067
|
-
}
|
|
1068
|
-
return found;
|
|
1064
|
+
const version = isPnpProject(baseDir) ? void 0 : findInstalledPackage(baseDir, "tailwindcss")?.version;
|
|
1065
|
+
const major = majorFromVersion(version);
|
|
1066
|
+
if (version !== void 0 && major !== void 0) {
|
|
1067
|
+
const found = { major, source: "installed", value: version };
|
|
1068
|
+
if (declared !== void 0 && bounds !== void 0 && !majorWithin(major, bounds)) {
|
|
1069
|
+
found.mismatch = { declared, declaredMajor: bounds.lower };
|
|
1069
1070
|
}
|
|
1070
|
-
|
|
1071
|
+
return found;
|
|
1071
1072
|
}
|
|
1072
1073
|
if (declared !== void 0) {
|
|
1073
1074
|
if (declaredMajor !== void 0) return { major: declaredMajor, source: "declared", value: declared };
|
|
@@ -1210,19 +1211,9 @@ function rangeLowerAtLeast(range, min) {
|
|
|
1210
1211
|
if (!lower || !target) return void 0;
|
|
1211
1212
|
return compareLower(lower, target) >= 0;
|
|
1212
1213
|
}
|
|
1213
|
-
function
|
|
1214
|
-
if (
|
|
1215
|
-
|
|
1216
|
-
if (!/^v?\d+\.\d+\.\d+(?:-[0-9A-Za-z.-]+)?(?:\+[0-9A-Za-z.-]+)?$/.test(v) || /^v?0\.0\.0-/.test(v)) return void 0;
|
|
1217
|
-
return v;
|
|
1218
|
-
}
|
|
1219
|
-
function installedVersion(baseDir, name) {
|
|
1220
|
-
try {
|
|
1221
|
-
const parsed = JSON.parse(readFileSync4(join2(baseDir, "node_modules", ...name.split("/"), "package.json"), "utf8"));
|
|
1222
|
-
return isPlainObject2(parsed) ? exactVersion(parsed.version) : void 0;
|
|
1223
|
-
} catch {
|
|
1224
|
-
return void 0;
|
|
1225
|
-
}
|
|
1214
|
+
function installedAxisVersion(baseDir, name) {
|
|
1215
|
+
if (isPnpProject(baseDir)) return void 0;
|
|
1216
|
+
return findInstalledPackage(baseDir, name)?.version;
|
|
1226
1217
|
}
|
|
1227
1218
|
function axisPackagesBelowTailwind4(pkg, baseDirInput) {
|
|
1228
1219
|
if (!pkg) return [];
|
|
@@ -1232,7 +1223,7 @@ function axisPackagesBelowTailwind4(pkg, baseDirInput) {
|
|
|
1232
1223
|
for (const name of TAILWIND4_AXIS_PACKAGES) {
|
|
1233
1224
|
const range = hasDependency2(pkg, name);
|
|
1234
1225
|
if (range === void 0 || range.trim().startsWith("workspace:")) continue;
|
|
1235
|
-
const installed = baseDir !== void 0 ?
|
|
1226
|
+
const installed = baseDir !== void 0 ? installedAxisVersion(baseDir, name) : void 0;
|
|
1236
1227
|
const installedLower = installed !== void 0 ? lowerOf(installed) : void 0;
|
|
1237
1228
|
if (installed !== void 0 && installedLower !== void 0) {
|
|
1238
1229
|
if (compareLower(installedLower, min) < 0) out.push({ name, range, status: "below", source: "installed", installed });
|
|
@@ -2727,20 +2718,36 @@ function formatComponentDetail(result) {
|
|
|
2727
2718
|
}
|
|
2728
2719
|
return lines.join("\n");
|
|
2729
2720
|
}
|
|
2730
|
-
function
|
|
2721
|
+
function cssUsage(token) {
|
|
2722
|
+
const shadcnColor = !token.cssVariable.startsWith("--axis-") && token.value.startsWith("hsl(");
|
|
2723
|
+
return shadcnColor ? `hsl(var(${token.cssVariable}))` : `var(${token.cssVariable})`;
|
|
2724
|
+
}
|
|
2725
|
+
function formatTokenNotFound(path11) {
|
|
2726
|
+
return [
|
|
2727
|
+
`\uD1A0\uD070\uC744 \uCC3E\uC744 \uC218 \uC5C6\uC2B5\uB2C8\uB2E4: \`${path11}\``,
|
|
2728
|
+
"",
|
|
2729
|
+
"- \uACBD\uB85C\uB294 `axis.list_tokens` \uB85C \uD655\uC778\uD558\uC138\uC694. \uACBD\uB85C \xB7 tokens \uC774\uB984 \uAE30\uBC18 \uACBD\uB85C(\uC608: `control.h.md`) \xB7 CSS \uBCC0\uC218 \uC774\uB984(\uC608: `--axis-control-h-md`)\uC744 \uBC1B\uC2B5\uB2C8\uB2E4.",
|
|
2730
|
+
"- \uBE0C\uB79C\uB4DC \uAC12\uC740 `axis.list_brands` \xB7 `axis.get_brand` \uB85C \uC870\uD68C\uD558\uC138\uC694."
|
|
2731
|
+
].join("\n");
|
|
2732
|
+
}
|
|
2733
|
+
function formatTokenDetail(token, query = "") {
|
|
2731
2734
|
if (!token) {
|
|
2732
|
-
return
|
|
2735
|
+
return formatTokenNotFound(query);
|
|
2733
2736
|
}
|
|
2734
2737
|
const lines = [];
|
|
2735
2738
|
lines.push(`# \uD1A0\uD070: ${token.path}`);
|
|
2736
2739
|
lines.push("");
|
|
2737
2740
|
lines.push(`- **\uAC12**: \`${token.value}\``);
|
|
2741
|
+
if (token.dark !== void 0) {
|
|
2742
|
+
lines.push(`- **\uB2E4\uD06C \uAC12**: \`${token.dark}\`${token.dark === token.value ? " (\uB77C\uC774\uD2B8\uC640 \uAC19\uC74C)" : ""}`);
|
|
2743
|
+
}
|
|
2738
2744
|
lines.push(`- **\uCE74\uD14C\uACE0\uB9AC**: ${token.category}`);
|
|
2739
2745
|
if (token.description) {
|
|
2740
2746
|
lines.push(`- **\uC124\uBA85**: ${token.description}`);
|
|
2741
2747
|
}
|
|
2742
|
-
|
|
2743
|
-
|
|
2748
|
+
lines.push(`- **CSS \uBCC0\uC218**: \`${token.cssVariable}\` (\uC0AC\uC6A9: \`${cssUsage(token)}\`)`);
|
|
2749
|
+
if (token.aliases && token.aliases.length > 0) {
|
|
2750
|
+
lines.push(`- **\uD568\uAED8 \uBC1B\uB294 \uACBD\uB85C**: ${token.aliases.map((a) => `\`${a}\``).join(", ")}`);
|
|
2744
2751
|
}
|
|
2745
2752
|
return lines.join("\n");
|
|
2746
2753
|
}
|
|
@@ -2776,7 +2783,8 @@ function handleListTokens(params) {
|
|
|
2776
2783
|
tokens,
|
|
2777
2784
|
totalCount: tokens.length,
|
|
2778
2785
|
stats,
|
|
2779
|
-
category
|
|
2786
|
+
category,
|
|
2787
|
+
sourceVersion: getTokenSource()?.version
|
|
2780
2788
|
};
|
|
2781
2789
|
}
|
|
2782
2790
|
function formatComponentList(result) {
|
|
@@ -2821,41 +2829,51 @@ function formatComponentList(result) {
|
|
|
2821
2829
|
lines.push("\uC124\uCE58: `axis.install_component` \uC5D0 `name`(\uB610\uB294 `names`)\uACFC \uD504\uB85C\uC81D\uD2B8 \uB8E8\uD2B8 `targetDir` \uB97C \uC8FC\uC138\uC694. \uC774\uB984\uC740 \uC704 \uD45C\uC758 \uC774\uB984 \uADF8\uB300\uB85C\uC785\uB2C8\uB2E4(agentic \uC740 `agentic-` \uC811\uB450 \uD3EC\uD568).");
|
|
2822
2830
|
return lines.join("\n");
|
|
2823
2831
|
}
|
|
2832
|
+
var TOKEN_CATEGORY_LABELS = {
|
|
2833
|
+
color: "Color",
|
|
2834
|
+
typography: "Typography",
|
|
2835
|
+
spacing: "Spacing",
|
|
2836
|
+
radius: "Radius",
|
|
2837
|
+
shadow: "Shadow",
|
|
2838
|
+
density: "Density (\uBC00\uB3C4)",
|
|
2839
|
+
component: "Component"
|
|
2840
|
+
};
|
|
2841
|
+
var cell = (v) => v.replace(/\|/g, "\\|");
|
|
2824
2842
|
function formatTokenList(result) {
|
|
2825
2843
|
const lines = [];
|
|
2844
|
+
const total = TOKEN_CATEGORIES.reduce((n, c) => n + result.stats[c], 0);
|
|
2826
2845
|
lines.push("# AXIS Design System \uD1A0\uD070 \uBAA9\uB85D");
|
|
2827
2846
|
lines.push("");
|
|
2847
|
+
if (result.sourceVersion) {
|
|
2848
|
+
lines.push(`- **\uCD9C\uCC98**: @axis-ds/tokens ${result.sourceVersion} \uBE4C\uB4DC \uC0B0\uCD9C\uBB3C\uC5D0\uC11C \uC0DD\uC131(\uB77C\uC774\uD2B8 :root \xB7 \uB2E4\uD06C .dark)`);
|
|
2849
|
+
}
|
|
2850
|
+
lines.push("- **\uBE0C\uB79C\uB4DC \uAC12**: `axis.list_brands` \xB7 `axis.get_brand` \uB85C \uC870\uD68C\uD558\uC138\uC694(\uB300\uC0C1 \uD504\uB85C\uC81D\uD2B8\uC5D0 \uC124\uCE58\uB41C tokens \uB97C \uC77D\uC74C)");
|
|
2851
|
+
lines.push("");
|
|
2828
2852
|
lines.push("## \uCE74\uD14C\uACE0\uB9AC\uBCC4 \uD1B5\uACC4");
|
|
2829
2853
|
lines.push("| \uCE74\uD14C\uACE0\uB9AC | \uAC1C\uC218 |");
|
|
2830
2854
|
lines.push("|----------|------|");
|
|
2831
|
-
|
|
2832
|
-
|
|
2833
|
-
|
|
2834
|
-
lines.push(`|
|
|
2835
|
-
lines.push(`| Shadow | ${result.stats.shadow} |`);
|
|
2836
|
-
lines.push(`| Animation | ${result.stats.animation} |`);
|
|
2837
|
-
lines.push(`| **\uD569\uACC4** | **${result.totalCount}** |`);
|
|
2855
|
+
for (const c of TOKEN_CATEGORIES) {
|
|
2856
|
+
lines.push(`| ${TOKEN_CATEGORY_LABELS[c]} | ${result.stats[c]} |`);
|
|
2857
|
+
}
|
|
2858
|
+
lines.push(`| **\uD569\uACC4** | **${total}** |`);
|
|
2838
2859
|
lines.push("");
|
|
2839
2860
|
if (result.category) {
|
|
2840
|
-
lines.push(`## ${result.category} \uD1A0\uD070`);
|
|
2861
|
+
lines.push(`## ${result.category} \uD1A0\uD070 (${result.totalCount}\uAC1C)`);
|
|
2841
2862
|
} else {
|
|
2842
2863
|
lines.push("## \uC804\uCCB4 \uD1A0\uD070");
|
|
2843
2864
|
}
|
|
2844
2865
|
lines.push("");
|
|
2845
|
-
const
|
|
2846
|
-
|
|
2847
|
-
if (
|
|
2848
|
-
|
|
2849
|
-
|
|
2850
|
-
|
|
2851
|
-
}
|
|
2852
|
-
for (const [category, tokens] of Object.entries(grouped)) {
|
|
2853
|
-
lines.push(`### ${category.charAt(0).toUpperCase() + category.slice(1)}`);
|
|
2854
|
-
lines.push("| \uACBD\uB85C | \uAC12 | \uC124\uBA85 |");
|
|
2855
|
-
lines.push("|------|-----|------|");
|
|
2866
|
+
for (const c of TOKEN_CATEGORIES) {
|
|
2867
|
+
const tokens = result.tokens.filter((t) => t.category === c);
|
|
2868
|
+
if (tokens.length === 0) continue;
|
|
2869
|
+
lines.push(`### ${TOKEN_CATEGORY_LABELS[c]}`);
|
|
2870
|
+
lines.push("| \uACBD\uB85C | \uAC12 | \uB2E4\uD06C | CSS | \uC124\uBA85 |");
|
|
2871
|
+
lines.push("|------|-----|------|-----|------|");
|
|
2856
2872
|
for (const t of tokens) {
|
|
2857
|
-
const
|
|
2858
|
-
lines.push(
|
|
2873
|
+
const dark = t.dark === void 0 ? "-" : t.dark === t.value ? "(\uAC19\uC74C)" : `\`${cell(t.dark)}\``;
|
|
2874
|
+
lines.push(
|
|
2875
|
+
`| \`${t.path}\` | \`${cell(t.value)}\` | ${dark} | \`${cssUsage(t)}\` | ${t.description ? cell(t.description) : "-"} |`
|
|
2876
|
+
);
|
|
2859
2877
|
}
|
|
2860
2878
|
lines.push("");
|
|
2861
2879
|
}
|
|
@@ -5233,7 +5251,7 @@ var server = new McpServer({
|
|
|
5233
5251
|
version: SERVER_VERSION
|
|
5234
5252
|
});
|
|
5235
5253
|
var ComponentCategorySchema = z.enum(["core", "agentic", "form", "layout", "ui"]).optional().describe("\uCEF4\uD3EC\uB10C\uD2B8 \uCE74\uD14C\uACE0\uB9AC \uD544\uD130 (ui = Core UI \uC804\uCCB4, agentic = Agentic UI)");
|
|
5236
|
-
var TokenCategorySchema = z.enum(
|
|
5254
|
+
var TokenCategorySchema = z.enum(TOKEN_CATEGORIES).optional().describe("\uD1A0\uD070 \uCE74\uD14C\uACE0\uB9AC \uD544\uD130 (density = \uCEE8\uD2B8\uB864 \uB192\uC774 \xB7 \uAE00\uC790 \uD06C\uAE30 \uB4F1 \uBC00\uB3C4 \uD1A0\uD070, component = \uCEF4\uD3EC\uB10C\uD2B8 \uD1A0\uD070)");
|
|
5237
5255
|
server.tool(
|
|
5238
5256
|
"axis.search_components",
|
|
5239
5257
|
"AXIS \uB514\uC790\uC778 \uC2DC\uC2A4\uD15C\uC5D0\uC11C \uCEF4\uD3EC\uB10C\uD2B8\uB97C \uAC80\uC0C9\uD569\uB2C8\uB2E4.",
|
|
@@ -5338,7 +5356,7 @@ server.tool(
|
|
|
5338
5356
|
);
|
|
5339
5357
|
server.tool(
|
|
5340
5358
|
"axis.list_tokens",
|
|
5341
|
-
"AXIS \uB514\uC790\uC778 \uC2DC\uC2A4\uD15C\uC758 \uB514\uC790\uC778 \uD1A0\uD070 \uBAA9\uB85D\uC744 \uC870\uD68C\uD569\uB2C8\uB2E4.",
|
|
5359
|
+
"AXIS \uB514\uC790\uC778 \uC2DC\uC2A4\uD15C\uC758 \uB514\uC790\uC778 \uD1A0\uD070 \uBAA9\uB85D(\uB77C\uC774\uD2B8 \xB7 \uB2E4\uD06C \uAC12, CSS \uBCC0\uC218)\uC744 \uC870\uD68C\uD569\uB2C8\uB2E4. \uAC12\uC740 @axis-ds/tokens \uBE4C\uB4DC \uC0B0\uCD9C\uBB3C\uC5D0\uC11C \uC0DD\uC131\uD569\uB2C8\uB2E4.",
|
|
5342
5360
|
{
|
|
5343
5361
|
category: TokenCategorySchema
|
|
5344
5362
|
},
|
|
@@ -5372,21 +5390,23 @@ server.tool(
|
|
|
5372
5390
|
);
|
|
5373
5391
|
server.tool(
|
|
5374
5392
|
"axis.get_token",
|
|
5375
|
-
"AXIS \uB514\uC790\uC778 \uC2DC\uC2A4\uD15C \uD1A0\uD070\uC758 \uC0C1\uC138 \uC815\uBCF4\uB97C \uC870\uD68C\uD569\uB2C8\uB2E4.",
|
|
5393
|
+
"AXIS \uB514\uC790\uC778 \uC2DC\uC2A4\uD15C \uD1A0\uD070\uC758 \uC0C1\uC138 \uC815\uBCF4(\uB77C\uC774\uD2B8 \xB7 \uB2E4\uD06C \uAC12, CSS \uBCC0\uC218)\uB97C \uC870\uD68C\uD569\uB2C8\uB2E4. \uC5C6\uB294 \uACBD\uB85C\uB294 isError \uB85C \uB2F5\uD569\uB2C8\uB2E4.",
|
|
5376
5394
|
{
|
|
5377
|
-
path: z.string().describe("\uD1A0\uD070 \uACBD\uB85C (\uC608: colors.primary, spacing.4)")
|
|
5395
|
+
path: z.string().describe("\uD1A0\uD070 \uACBD\uB85C (\uC608: colors.primary, spacing.4, control.h.md) \uB610\uB294 CSS \uBCC0\uC218 \uC774\uB984 (\uC608: --axis-control-h-md)")
|
|
5378
5396
|
},
|
|
5379
5397
|
async ({ path: path11 }) => {
|
|
5380
5398
|
try {
|
|
5381
5399
|
const token = handleGetToken({ path: path11 });
|
|
5382
|
-
const formatted = formatTokenDetail(token);
|
|
5400
|
+
const formatted = formatTokenDetail(token, path11);
|
|
5383
5401
|
return {
|
|
5384
5402
|
content: [
|
|
5385
5403
|
{
|
|
5386
5404
|
type: "text",
|
|
5387
5405
|
text: formatted
|
|
5388
5406
|
}
|
|
5389
|
-
]
|
|
5407
|
+
],
|
|
5408
|
+
// WI-0076: 없는 토큰은 일반 텍스트가 아니라 오류로 답합니다(응답 계약 변경)
|
|
5409
|
+
...token ? {} : { isError: true }
|
|
5390
5410
|
};
|
|
5391
5411
|
} catch (error) {
|
|
5392
5412
|
const message = error instanceof Error ? error.message : "\uC54C \uC218 \uC5C6\uB294 \uC624\uB958";
|
package/dist/registry/index.json
CHANGED
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@axis-ds/mcp",
|
|
3
|
-
"version": "1.
|
|
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
|
-
}
|