@axis-ds/cli 1.7.0 → 1.7.2
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 +3 -2
- package/dist/chunk-YYSEFWYD.js +473 -0
- package/dist/index.js +335 -358
- package/dist/monet.d.ts +6 -1
- package/dist/monet.js +5 -3
- package/package.json +1 -1
- package/dist/chunk-LVMDBOXD.js +0 -192
package/dist/monet.d.ts
CHANGED
|
@@ -87,7 +87,12 @@ declare class MonetClient {
|
|
|
87
87
|
interactive?: boolean;
|
|
88
88
|
}): Promise<void>;
|
|
89
89
|
}
|
|
90
|
+
/**
|
|
91
|
+
* `monet import` 저장 뒤 다음 단계(WI-0085). 의존성 설치 줄은 `baseDir`(import 는 cwd 기준으로 axis.config.json 을 읽음)의
|
|
92
|
+
* lockfile · `packageManager` 로 매니저를 고릅니다. 종전에는 `(pnpm add ...)` 고정이었습니다.
|
|
93
|
+
*/
|
|
94
|
+
declare function monetImportNextSteps(baseDir: string): string[];
|
|
90
95
|
declare function getMonetUrl(path: string): string;
|
|
91
96
|
declare function getMonetMcpConfig(): object;
|
|
92
97
|
|
|
93
|
-
export { MONET_CATEGORIES, MonetClient, type MonetComponent, getMonetMcpConfig, getMonetUrl };
|
|
98
|
+
export { MONET_CATEGORIES, MonetClient, type MonetComponent, getMonetMcpConfig, getMonetUrl, monetImportNextSteps };
|
package/dist/monet.js
CHANGED
|
@@ -2,12 +2,14 @@ import {
|
|
|
2
2
|
MONET_CATEGORIES,
|
|
3
3
|
MonetClient,
|
|
4
4
|
getMonetMcpConfig,
|
|
5
|
-
getMonetUrl
|
|
6
|
-
|
|
5
|
+
getMonetUrl,
|
|
6
|
+
monetImportNextSteps
|
|
7
|
+
} from "./chunk-YYSEFWYD.js";
|
|
7
8
|
import "./chunk-HFMMK6R4.js";
|
|
8
9
|
export {
|
|
9
10
|
MONET_CATEGORIES,
|
|
10
11
|
MonetClient,
|
|
11
12
|
getMonetMcpConfig,
|
|
12
|
-
getMonetUrl
|
|
13
|
+
getMonetUrl,
|
|
14
|
+
monetImportNextSteps
|
|
13
15
|
};
|
package/package.json
CHANGED
package/dist/chunk-LVMDBOXD.js
DELETED
|
@@ -1,192 +0,0 @@
|
|
|
1
|
-
import {
|
|
2
|
-
ask,
|
|
3
|
-
failNonInteractive,
|
|
4
|
-
isInteractive
|
|
5
|
-
} from "./chunk-HFMMK6R4.js";
|
|
6
|
-
|
|
7
|
-
// src/monet.ts
|
|
8
|
-
import chalk from "chalk";
|
|
9
|
-
import fs from "fs-extra";
|
|
10
|
-
import path from "path";
|
|
11
|
-
var MONET_CATEGORIES = [
|
|
12
|
-
{ id: "hero", name: "Hero Sections", count: 120 },
|
|
13
|
-
{ id: "feature", name: "Feature Sections", count: 191 },
|
|
14
|
-
{ id: "testimonial", name: "Testimonials", count: 47 },
|
|
15
|
-
{ id: "pricing", name: "Pricing Tables", count: 35 },
|
|
16
|
-
{ id: "cta", name: "Call to Action", count: 42 },
|
|
17
|
-
{ id: "stats", name: "Statistics", count: 28 },
|
|
18
|
-
{ id: "footer", name: "Footers", count: 38 },
|
|
19
|
-
{ id: "header", name: "Headers/Navigation", count: 45 },
|
|
20
|
-
{ id: "logo-cloud", name: "Logo Clouds", count: 22 },
|
|
21
|
-
{ id: "team", name: "Team Sections", count: 31 },
|
|
22
|
-
{ id: "faq", name: "FAQ Sections", count: 24 },
|
|
23
|
-
{ id: "contact", name: "Contact Forms", count: 29 },
|
|
24
|
-
{ id: "newsletter", name: "Newsletter", count: 18 },
|
|
25
|
-
{ id: "landing", name: "Full Landing Pages", count: 28 }
|
|
26
|
-
];
|
|
27
|
-
var MonetClient = class {
|
|
28
|
-
apiKey;
|
|
29
|
-
baseUrl = "https://www.monet.design";
|
|
30
|
-
constructor(apiKey) {
|
|
31
|
-
this.apiKey = apiKey || process.env.MONET_API_KEY;
|
|
32
|
-
}
|
|
33
|
-
// 카테고리 목록 출력
|
|
34
|
-
async listCategories() {
|
|
35
|
-
console.log(chalk.blue("\n\u{1F3A8} Monet Design \uCE74\uD14C\uACE0\uB9AC\n"));
|
|
36
|
-
console.log(chalk.gray("https://monet.design - 1000+ React UI \uCEF4\uD3EC\uB10C\uD2B8\n"));
|
|
37
|
-
for (const cat of MONET_CATEGORIES) {
|
|
38
|
-
console.log(
|
|
39
|
-
` ${chalk.cyan(cat.id.padEnd(15))} ${cat.name.padEnd(25)} ${chalk.gray(`(${cat.count}\uAC1C)`)}`
|
|
40
|
-
);
|
|
41
|
-
}
|
|
42
|
-
console.log(chalk.gray("\n\uC0AC\uC6A9\uBC95:"));
|
|
43
|
-
console.log(chalk.gray(" npx @axis-ds/cli monet browse <category> # \uCE74\uD14C\uACE0\uB9AC \uCEF4\uD3EC\uB10C\uD2B8 \uBCF4\uAE30"));
|
|
44
|
-
console.log(chalk.gray(" npx @axis-ds/cli monet search <query> # \uCEF4\uD3EC\uB10C\uD2B8 \uAC80\uC0C9\n"));
|
|
45
|
-
}
|
|
46
|
-
// 컴포넌트 검색 (웹 URL 안내)
|
|
47
|
-
async searchComponents(query) {
|
|
48
|
-
console.log(chalk.blue(`
|
|
49
|
-
\u{1F50D} "${query}" \uAC80\uC0C9 \uC911...
|
|
50
|
-
`));
|
|
51
|
-
const searchUrl = `${this.baseUrl}/c?q=${encodeURIComponent(query)}`;
|
|
52
|
-
console.log(chalk.yellow("Monet\uC740 \uC9C1\uC811 API\uB97C \uC81C\uACF5\uD558\uC9C0 \uC54A\uC2B5\uB2C8\uB2E4."));
|
|
53
|
-
console.log(chalk.gray("\uB2E4\uC74C \uBC29\uBC95\uC73C\uB85C \uCEF4\uD3EC\uB10C\uD2B8\uB97C \uAC00\uC838\uC62C \uC218 \uC788\uC2B5\uB2C8\uB2E4:\n"));
|
|
54
|
-
console.log(chalk.bold("1. \uC6F9\uC5D0\uC11C \uAC80\uC0C9:"));
|
|
55
|
-
console.log(chalk.cyan(` ${searchUrl}
|
|
56
|
-
`));
|
|
57
|
-
console.log(chalk.bold("2. MCP \uC5F0\uB3D9 (Claude Code):"));
|
|
58
|
-
console.log(chalk.gray(" .claude/mcp.json\uC5D0 monet \uC11C\uBC84 \uD65C\uC131\uD654 \uD6C4"));
|
|
59
|
-
console.log(chalk.cyan(' "monet\uC5D0\uC11C hero \uCEF4\uD3EC\uB10C\uD2B8 \uCC3E\uC544\uC918"'));
|
|
60
|
-
console.log(chalk.gray(" \u2192 API \uD0A4 \uD544\uC694: https://monet.design/mcp\n"));
|
|
61
|
-
console.log(chalk.bold("3. \uC218\uB3D9 \uBCF5\uC0AC-\uBD99\uC5EC\uB123\uAE30:"));
|
|
62
|
-
console.log(chalk.gray(" \uC6F9\uC5D0\uC11C \uCEF4\uD3EC\uB10C\uD2B8 \uC120\uD0DD \u2192 Copy Code \u2192 \uD504\uB85C\uC81D\uD2B8\uC5D0 \uBD99\uC5EC\uB123\uAE30\n"));
|
|
63
|
-
}
|
|
64
|
-
// 카테고리별 컴포넌트 브라우징
|
|
65
|
-
async browseCategory(category) {
|
|
66
|
-
const cat = MONET_CATEGORIES.find((c) => c.id === category);
|
|
67
|
-
if (!cat) {
|
|
68
|
-
console.log(chalk.red(`
|
|
69
|
-
\u274C '${category}' \uCE74\uD14C\uACE0\uB9AC\uB97C \uCC3E\uC744 \uC218 \uC5C6\uC2B5\uB2C8\uB2E4.
|
|
70
|
-
`));
|
|
71
|
-
console.log(chalk.gray("\uC0AC\uC6A9 \uAC00\uB2A5\uD55C \uCE74\uD14C\uACE0\uB9AC:"));
|
|
72
|
-
MONET_CATEGORIES.forEach((c) => console.log(chalk.cyan(` ${c.id}`)));
|
|
73
|
-
return;
|
|
74
|
-
}
|
|
75
|
-
console.log(chalk.blue(`
|
|
76
|
-
\u{1F4C2} ${cat.name} (${cat.count}\uAC1C \uCEF4\uD3EC\uB10C\uD2B8)
|
|
77
|
-
`));
|
|
78
|
-
const browseUrl = `${this.baseUrl}/c?category=${category}`;
|
|
79
|
-
console.log(chalk.gray("\uC6F9\uC5D0\uC11C \uCEF4\uD3EC\uB10C\uD2B8\uB97C \uD655\uC778\uD558\uC138\uC694:"));
|
|
80
|
-
console.log(chalk.cyan(`${browseUrl}
|
|
81
|
-
`));
|
|
82
|
-
console.log(chalk.bold("\uC778\uAE30 \uCEF4\uD3EC\uB10C\uD2B8 \uC608\uC2DC:"));
|
|
83
|
-
const examples = this.getCategoryExamples(category);
|
|
84
|
-
examples.forEach((ex) => {
|
|
85
|
-
console.log(` ${chalk.cyan(ex.id.padEnd(30))} ${chalk.gray(ex.desc)}`);
|
|
86
|
-
});
|
|
87
|
-
console.log(chalk.gray("\n\uCEF4\uD3EC\uB10C\uD2B8 \uAC00\uC838\uC624\uAE30:"));
|
|
88
|
-
console.log(chalk.gray(" 1. \uC6F9\uC5D0\uC11C \uCEF4\uD3EC\uB10C\uD2B8 \uC120\uD0DD"));
|
|
89
|
-
console.log(chalk.gray(" 2. Copy Code \uBC84\uD2BC \uD074\uB9AD"));
|
|
90
|
-
console.log(chalk.gray(" 3. npx @axis-ds/cli monet import \uC2E4\uD589\n"));
|
|
91
|
-
}
|
|
92
|
-
// 카테고리별 예시 컴포넌트
|
|
93
|
-
getCategoryExamples(category) {
|
|
94
|
-
const examples = {
|
|
95
|
-
hero: [
|
|
96
|
-
{ id: "hero-with-image", desc: "\uC774\uBBF8\uC9C0 \uBC30\uACBD \uD788\uC5B4\uB85C" },
|
|
97
|
-
{ id: "hero-centered", desc: "\uC911\uC559 \uC815\uB82C \uD788\uC5B4\uB85C" },
|
|
98
|
-
{ id: "hero-split", desc: "\uBD84\uD560 \uB808\uC774\uC544\uC6C3 \uD788\uC5B4\uB85C" }
|
|
99
|
-
],
|
|
100
|
-
feature: [
|
|
101
|
-
{ id: "feature-grid", desc: "\uADF8\uB9AC\uB4DC \uD615\uC2DD \uAE30\uB2A5 \uC18C\uAC1C" },
|
|
102
|
-
{ id: "feature-alternating", desc: "\uAD50\uCC28 \uB808\uC774\uC544\uC6C3 \uAE30\uB2A5" },
|
|
103
|
-
{ id: "feature-icons", desc: "\uC544\uC774\uCF58 \uAE30\uBC18 \uAE30\uB2A5" }
|
|
104
|
-
],
|
|
105
|
-
pricing: [
|
|
106
|
-
{ id: "pricing-three-tiers", desc: "3\uB2E8 \uC694\uAE08\uC81C" },
|
|
107
|
-
{ id: "pricing-comparison", desc: "\uBE44\uAD50 \uD14C\uC774\uBE14 \uC694\uAE08\uC81C" },
|
|
108
|
-
{ id: "pricing-toggle", desc: "\uC6D4/\uC5F0 \uD1A0\uAE00 \uC694\uAE08\uC81C" }
|
|
109
|
-
],
|
|
110
|
-
landing: [
|
|
111
|
-
{ id: "deepcon-ai-landing", desc: "AI SaaS \uB79C\uB529\uD398\uC774\uC9C0" },
|
|
112
|
-
{ id: "saas-landing", desc: "SaaS \uC2A4\uD0C0\uD130 \uB79C\uB529" },
|
|
113
|
-
{ id: "agency-landing", desc: "\uC5D0\uC774\uC804\uC2DC \uB79C\uB529\uD398\uC774\uC9C0" }
|
|
114
|
-
]
|
|
115
|
-
};
|
|
116
|
-
return examples[category] || [{ id: `${category}-basic`, desc: "\uAE30\uBCF8 \uD15C\uD50C\uB9BF" }];
|
|
117
|
-
}
|
|
118
|
-
// 클립보드에서 Monet 코드 가져오기
|
|
119
|
-
/** opts.interactive: 질문을 띄울 수 있는지(WI-0075). 없으면 stdin 이 TTY 인지로 정합니다 */
|
|
120
|
-
async importFromClipboard(opts = {}) {
|
|
121
|
-
console.log(chalk.blue("\n\u{1F4CB} \uD074\uB9BD\uBCF4\uB4DC\uC5D0\uC11C Monet \uCEF4\uD3EC\uB10C\uD2B8 \uAC00\uC838\uC624\uAE30\n"));
|
|
122
|
-
console.log(chalk.yellow("\uC900\uBE44 \uB2E8\uACC4:"));
|
|
123
|
-
console.log(chalk.gray(" 1. monet.design\uC5D0\uC11C \uCEF4\uD3EC\uB10C\uD2B8 \uC120\uD0DD"));
|
|
124
|
-
console.log(chalk.gray(" 2. 'Copy Code' \uBC84\uD2BC\uC73C\uB85C \uCF54\uB4DC \uBCF5\uC0AC"));
|
|
125
|
-
console.log(chalk.gray(" 3. \uC774 \uBA85\uB839\uC5B4 \uC2E4\uD589\n"));
|
|
126
|
-
const interactive = opts.interactive ?? isInteractive();
|
|
127
|
-
if (!interactive) {
|
|
128
|
-
failNonInteractive("\uCEF4\uD3EC\uB10C\uD2B8 \uC774\uB984\uACFC \uBD99\uC5EC \uB123\uC744 \uCF54\uB4DC\uB97C \uBB3C\uC744 \uC218 \uC5C6\uC2B5\uB2C8\uB2E4. \uC544\uBB34\uAC83\uB3C4 \uC4F0\uC9C0 \uC54A\uC558\uC2B5\uB2C8\uB2E4.", [
|
|
129
|
-
"\uB300\uD654\uD615 \uD130\uBBF8\uB110\uC5D0\uC11C \uB2E4\uC2DC \uC2E4\uD589\uD558\uC138\uC694: axis monet import"
|
|
130
|
-
]);
|
|
131
|
-
return;
|
|
132
|
-
}
|
|
133
|
-
const { componentName } = await ask(
|
|
134
|
-
{
|
|
135
|
-
type: "text",
|
|
136
|
-
name: "componentName",
|
|
137
|
-
message: "\uCEF4\uD3EC\uB10C\uD2B8 \uC774\uB984 (\uC608: hero-section):",
|
|
138
|
-
validate: (v) => v.length > 0 ? true : "\uC774\uB984\uC744 \uC785\uB825\uD558\uC138\uC694"
|
|
139
|
-
},
|
|
140
|
-
interactive
|
|
141
|
-
);
|
|
142
|
-
if (!componentName) return;
|
|
143
|
-
const { componentCode } = await ask(
|
|
144
|
-
{
|
|
145
|
-
type: "text",
|
|
146
|
-
name: "componentCode",
|
|
147
|
-
message: "\uBCF5\uC0AC\uD55C \uCF54\uB4DC\uB97C \uBD99\uC5EC\uB123\uC73C\uC138\uC694 (\uD55C \uC904\uB85C):"
|
|
148
|
-
},
|
|
149
|
-
interactive
|
|
150
|
-
);
|
|
151
|
-
if (!componentCode) {
|
|
152
|
-
console.log(chalk.yellow("\n\uCF54\uB4DC\uAC00 \uC785\uB825\uB418\uC9C0 \uC54A\uC558\uC2B5\uB2C8\uB2E4."));
|
|
153
|
-
return;
|
|
154
|
-
}
|
|
155
|
-
const configPath = path.resolve("axis.config.json");
|
|
156
|
-
let componentsDir = "./src/components/monet";
|
|
157
|
-
if (await fs.pathExists(configPath)) {
|
|
158
|
-
const config = await fs.readJSON(configPath);
|
|
159
|
-
componentsDir = config.monetDir || path.join(path.dirname(config.componentsDir), "monet");
|
|
160
|
-
}
|
|
161
|
-
const fileName = `${componentName}.tsx`;
|
|
162
|
-
const filePath = path.join(componentsDir, fileName);
|
|
163
|
-
await fs.ensureDir(componentsDir);
|
|
164
|
-
await fs.writeFile(filePath, componentCode);
|
|
165
|
-
console.log(chalk.green(`
|
|
166
|
-
\u2713 ${filePath} \uC800\uC7A5 \uC644\uB8CC`));
|
|
167
|
-
console.log(chalk.gray("\n\uB2E4\uC74C \uB2E8\uACC4:"));
|
|
168
|
-
console.log(chalk.gray(" 1. \uD30C\uC77C\uC744 \uC5F4\uC5B4 import \uACBD\uB85C \uC218\uC815"));
|
|
169
|
-
console.log(chalk.gray(" 2. \uD544\uC694\uD55C \uC758\uC874\uC131 \uC124\uCE58 (pnpm add ...)"));
|
|
170
|
-
console.log(chalk.gray(" 3. \uCEF4\uD3EC\uB10C\uD2B8 \uC0AC\uC6A9\n"));
|
|
171
|
-
}
|
|
172
|
-
};
|
|
173
|
-
function getMonetUrl(path2) {
|
|
174
|
-
return `https://monet.design${path2}`;
|
|
175
|
-
}
|
|
176
|
-
function getMonetMcpConfig() {
|
|
177
|
-
return {
|
|
178
|
-
monet: {
|
|
179
|
-
url: "https://www.monet.design/api/remote/mcp",
|
|
180
|
-
headers: {
|
|
181
|
-
Authorization: "Bearer ${MONET_API_KEY}"
|
|
182
|
-
}
|
|
183
|
-
}
|
|
184
|
-
};
|
|
185
|
-
}
|
|
186
|
-
|
|
187
|
-
export {
|
|
188
|
-
MONET_CATEGORIES,
|
|
189
|
-
MonetClient,
|
|
190
|
-
getMonetUrl,
|
|
191
|
-
getMonetMcpConfig
|
|
192
|
-
};
|