@qikdev/mcp 6.6.45 → 6.6.46
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/build/src/tools/component-marketplace.d.ts +96 -0
- package/build/src/tools/component-marketplace.d.ts.map +1 -0
- package/build/src/tools/component-marketplace.js +259 -0
- package/build/src/tools/component-marketplace.js.map +1 -0
- package/build/src/tools/components.d.ts +23 -0
- package/build/src/tools/components.d.ts.map +1 -0
- package/build/src/tools/components.js +388 -0
- package/build/src/tools/components.js.map +1 -0
- package/build/src/tools/create.d.ts.map +1 -1
- package/build/src/tools/create.js +38 -0
- package/build/src/tools/create.js.map +1 -1
- package/build/src/tools/enhanced-interfaces.d.ts +21 -0
- package/build/src/tools/enhanced-interfaces.d.ts.map +1 -0
- package/build/src/tools/enhanced-interfaces.js +64 -0
- package/build/src/tools/enhanced-interfaces.js.map +1 -0
- package/build/src/tools/index.d.ts.map +1 -1
- package/build/src/tools/index.js +17 -0
- package/build/src/tools/index.js.map +1 -1
- package/build/src/tools/interface-builder.d.ts +19 -0
- package/build/src/tools/interface-builder.d.ts.map +1 -0
- package/build/src/tools/interface-builder.js +477 -0
- package/build/src/tools/interface-builder.js.map +1 -0
- package/build/src/tools/interfaces.d.ts +23 -0
- package/build/src/tools/interfaces.d.ts.map +1 -0
- package/build/src/tools/interfaces.js +821 -0
- package/build/src/tools/interfaces.js.map +1 -0
- package/build/src/tools/nlp-parser.d.ts +33 -0
- package/build/src/tools/nlp-parser.d.ts.map +1 -0
- package/build/src/tools/nlp-parser.js +258 -0
- package/build/src/tools/nlp-parser.js.map +1 -0
- package/build/src/tools/route-generator.d.ts +61 -0
- package/build/src/tools/route-generator.d.ts.map +1 -0
- package/build/src/tools/route-generator.js +388 -0
- package/build/src/tools/route-generator.js.map +1 -0
- package/package.json +1 -1
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/tools/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,IAAI,EAAE,MAAM,oCAAoC,CAAC;
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/tools/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,IAAI,EAAE,MAAM,oCAAoC,CAAC;AA6B1D,eAAO,MAAM,KAAK,EAAE,IAAI,EAevB,CAAC;AAGF,eAAO,MAAM,YAAY,EAAE,MAAM,CAAC,MAAM,EAAE,QAAQ,CAejD,CAAC;AAGF,wBAAgB,cAAc,CAAC,IAAI,EAAE,MAAM,GAAG,QAAQ,GAAG,SAAS,CAEjE;AAGD,wBAAgB,cAAc,CAAC,IAAI,EAAE,MAAM,GAAG,OAAO,CAEpD"}
|
package/build/src/tools/index.js
CHANGED
|
@@ -4,6 +4,9 @@ import { listContentTool, handleListContent } from "./list.js";
|
|
|
4
4
|
import { updateContentTool, handleUpdateContent } from "./update.js";
|
|
5
5
|
import { getUserSessionTool, handleGetUserSession } from "./user.js";
|
|
6
6
|
import { getProfileTimelineTool, handleGetProfileTimeline } from "./profile.js";
|
|
7
|
+
import { getAvailableComponentsTool, getComponentDetailsTool, suggestComponentsTool, handleGetAvailableComponents, handleGetComponentDetails, handleSuggestComponents } from "./components.js";
|
|
8
|
+
import { createInterfaceTool, addInterfaceRouteTool, suggestInterfaceTemplatesTool, handleCreateInterface, handleAddInterfaceRoute, handleSuggestInterfaceTemplates } from "./interfaces.js";
|
|
9
|
+
import { buildInterfaceFromPromptTool, handleBuildInterfaceFromPrompt } from "./interface-builder.js";
|
|
7
10
|
// Registry of all available tools
|
|
8
11
|
export const tools = [
|
|
9
12
|
glossaryTool,
|
|
@@ -13,6 +16,13 @@ export const tools = [
|
|
|
13
16
|
updateContentTool,
|
|
14
17
|
getUserSessionTool,
|
|
15
18
|
getProfileTimelineTool,
|
|
19
|
+
getAvailableComponentsTool,
|
|
20
|
+
getComponentDetailsTool,
|
|
21
|
+
suggestComponentsTool,
|
|
22
|
+
createInterfaceTool,
|
|
23
|
+
addInterfaceRouteTool,
|
|
24
|
+
suggestInterfaceTemplatesTool,
|
|
25
|
+
buildInterfaceFromPromptTool,
|
|
16
26
|
];
|
|
17
27
|
// Registry of all tool handlers
|
|
18
28
|
export const toolHandlers = {
|
|
@@ -23,6 +33,13 @@ export const toolHandlers = {
|
|
|
23
33
|
"update_content": handleUpdateContent,
|
|
24
34
|
"get_user_session": handleGetUserSession,
|
|
25
35
|
"get_profile_timeline": handleGetProfileTimeline,
|
|
36
|
+
"get_available_components": handleGetAvailableComponents,
|
|
37
|
+
"get_component_details": handleGetComponentDetails,
|
|
38
|
+
"suggest_components": handleSuggestComponents,
|
|
39
|
+
"create_interface": handleCreateInterface,
|
|
40
|
+
"add_interface_route": handleAddInterfaceRoute,
|
|
41
|
+
"suggest_interface_templates": handleSuggestInterfaceTemplates,
|
|
42
|
+
"build_interface_from_prompt": handleBuildInterfaceFromPrompt,
|
|
26
43
|
};
|
|
27
44
|
// Helper function to get a tool handler by name
|
|
28
45
|
export function getToolHandler(name) {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/tools/index.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,YAAY,EAAE,kBAAkB,EAAE,iBAAiB,EAAE,2BAA2B,EAAE,MAAM,eAAe,CAAC;AACjH,OAAO,EAAE,iBAAiB,EAAE,mBAAmB,EAAE,MAAM,aAAa,CAAC;AACrE,OAAO,EAAE,eAAe,EAAE,iBAAiB,EAAE,MAAM,WAAW,CAAC;AAC/D,OAAO,EAAE,iBAAiB,EAAE,mBAAmB,EAAE,MAAM,aAAa,CAAC;AACrE,OAAO,EAAE,kBAAkB,EAAE,oBAAoB,EAAE,MAAM,WAAW,CAAC;AACrE,OAAO,EAAE,sBAAsB,EAAE,wBAAwB,EAAE,MAAM,cAAc,CAAC;
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/tools/index.ts"],"names":[],"mappings":"AAC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B,EAAE,mBAAmB;IACrC,kBAAkB,EAAE,oBAAoB;IACxC,sBAAsB,EAAE,wBAAwB;IAChD,0BAA0B,EAAE,4BAA4B;IACxD,uBAAuB,EAAE,yBAAyB;IAClD,oBAAoB,EAAE,uBAAuB;IAC7C,kBAAkB,EAAE,qBAAqB;IACzC,qBAAqB,EAAE,uBAAuB;IAC9C,6BAA6B,EAAE,+BAA+B;IAC9D,6BAA6B,EAAE,8BAA8B;CAC9D,CAAC;AAEF,gDAAgD;AAChD,MAAM,UAAU,cAAc,CAAC,IAAY;IACzC,OAAO,YAAY,CAAC,IAAI,CAAC,CAAC;AAC5B,CAAC;AAED,4CAA4C;AAC5C,MAAM,UAAU,cAAc,CAAC,IAAY;IACzC,OAAO,IAAI,IAAI,YAAY,CAAC;AAC9B,CAAC"}
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Interface Builder - Main Orchestration Tool
|
|
3
|
+
* Builds complete interfaces from natural language prompts
|
|
4
|
+
*/
|
|
5
|
+
import { Tool } from "@modelcontextprotocol/sdk/types.js";
|
|
6
|
+
/**
|
|
7
|
+
* Build Interface from Prompt Tool
|
|
8
|
+
*/
|
|
9
|
+
export declare const buildInterfaceFromPromptTool: Tool;
|
|
10
|
+
/**
|
|
11
|
+
* Handler for building interfaces from prompts
|
|
12
|
+
*/
|
|
13
|
+
export declare function handleBuildInterfaceFromPrompt(args: any): Promise<{
|
|
14
|
+
content: Array<{
|
|
15
|
+
type: string;
|
|
16
|
+
text: string;
|
|
17
|
+
}>;
|
|
18
|
+
}>;
|
|
19
|
+
//# sourceMappingURL=interface-builder.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"interface-builder.d.ts","sourceRoot":"","sources":["../../../src/tools/interface-builder.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAEH,OAAO,EAAE,IAAI,EAAE,MAAM,oCAAoC,CAAC;AAe1D;;GAEG;AACH,eAAO,MAAM,4BAA4B,EAAE,IAsB1C,CAAC;AAEF;;GAEG;AACH,wBAAsB,8BAA8B,CAAC,IAAI,EAAE,GAAG,GAAG,OAAO,CAAC;IAAE,OAAO,EAAE,KAAK,CAAC;QAAE,IAAI,EAAE,MAAM,CAAC;QAAC,IAAI,EAAE,MAAM,CAAA;KAAE,CAAC,CAAA;CAAE,CAAC,CAmI3H"}
|
|
@@ -0,0 +1,477 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Interface Builder - Main Orchestration Tool
|
|
3
|
+
* Builds complete interfaces from natural language prompts
|
|
4
|
+
*/
|
|
5
|
+
import { ConfigManager } from "../config.js";
|
|
6
|
+
import { parseInterfacePrompt } from "./nlp-parser.js";
|
|
7
|
+
import { getMarketplaceComponents } from "./component-marketplace.js";
|
|
8
|
+
import { generateRoutes, generateMenus, addLegalPages } from "./route-generator.js";
|
|
9
|
+
/**
|
|
10
|
+
* Build Interface from Prompt Tool
|
|
11
|
+
*/
|
|
12
|
+
export const buildInterfaceFromPromptTool = {
|
|
13
|
+
name: "build_interface_from_prompt",
|
|
14
|
+
description: "🎨 Build a complete, beautiful interface from a natural language description. Examples: 'Create a portfolio website with about, work, and contact pages' or 'Build a restaurant app with menu, locations, and reservations'",
|
|
15
|
+
inputSchema: {
|
|
16
|
+
type: "object",
|
|
17
|
+
properties: {
|
|
18
|
+
prompt: {
|
|
19
|
+
type: "string",
|
|
20
|
+
description: "Natural language description of the interface you want to build"
|
|
21
|
+
},
|
|
22
|
+
primaryColor: {
|
|
23
|
+
type: "string",
|
|
24
|
+
description: "Optional primary color for the interface (hex code, e.g., '#4a90e2'). Defaults to a nice blue."
|
|
25
|
+
},
|
|
26
|
+
includeAuth: {
|
|
27
|
+
type: "boolean",
|
|
28
|
+
description: "Force include authentication pages even if not mentioned in prompt. Defaults to auto-detect."
|
|
29
|
+
}
|
|
30
|
+
},
|
|
31
|
+
required: ["prompt"],
|
|
32
|
+
additionalProperties: false
|
|
33
|
+
},
|
|
34
|
+
};
|
|
35
|
+
/**
|
|
36
|
+
* Handler for building interfaces from prompts
|
|
37
|
+
*/
|
|
38
|
+
export async function handleBuildInterfaceFromPrompt(args) {
|
|
39
|
+
try {
|
|
40
|
+
const configManager = new ConfigManager();
|
|
41
|
+
const config = await configManager.loadConfig();
|
|
42
|
+
if (!config) {
|
|
43
|
+
throw new Error('Qik MCP server not configured. Run setup first.');
|
|
44
|
+
}
|
|
45
|
+
console.log('🎨 Starting interface build from prompt...');
|
|
46
|
+
console.log('Prompt:', args.prompt);
|
|
47
|
+
// Step 1: Parse the natural language prompt
|
|
48
|
+
const parsed = parseInterfacePrompt(args.prompt);
|
|
49
|
+
console.log('📋 Parsed requirements:', {
|
|
50
|
+
appName: parsed.appName,
|
|
51
|
+
appType: parsed.appType,
|
|
52
|
+
requiresAuth: parsed.requiresAuth,
|
|
53
|
+
pages: parsed.pages.map(p => p.name),
|
|
54
|
+
features: parsed.features
|
|
55
|
+
});
|
|
56
|
+
// Step 2: Fetch available components and glossary
|
|
57
|
+
const [components, glossaryResponse] = await Promise.all([
|
|
58
|
+
getMarketplaceComponents(config),
|
|
59
|
+
fetchGlossary(config)
|
|
60
|
+
]);
|
|
61
|
+
console.log(`📦 Found ${components.length} available components`);
|
|
62
|
+
console.log(`📚 Found ${glossaryResponse.length} content types in glossary`);
|
|
63
|
+
// Step 3: Generate routes from parsed pages
|
|
64
|
+
const routes = await generateRoutes(parsed.pages, components, glossaryResponse, config);
|
|
65
|
+
console.log(`🛣️ Generated ${routes.length} routes`);
|
|
66
|
+
// Step 4: Add authentication pages if needed
|
|
67
|
+
if (parsed.requiresAuth || args.includeAuth) {
|
|
68
|
+
addAuthPages(routes, components);
|
|
69
|
+
console.log('🔐 Added authentication pages');
|
|
70
|
+
}
|
|
71
|
+
// Step 5: Add legal pages (Privacy Policy, Terms)
|
|
72
|
+
addLegalPages(routes, components);
|
|
73
|
+
console.log('📄 Added legal pages');
|
|
74
|
+
// Step 6: Generate menus
|
|
75
|
+
const menus = generateMenus(routes);
|
|
76
|
+
console.log(`📋 Generated ${menus.length} menus`);
|
|
77
|
+
// Step 7: Build complete interface structure
|
|
78
|
+
const interfaceStructure = buildCompleteInterface(parsed, routes, menus, components, args.primaryColor);
|
|
79
|
+
// Step 8: Create the interface via API
|
|
80
|
+
const createResponse = await fetch(`${config.apiUrl || 'https://api.qik.dev'}/content/interface/create`, {
|
|
81
|
+
method: 'POST',
|
|
82
|
+
headers: {
|
|
83
|
+
'Authorization': `Bearer ${config.accessToken}`,
|
|
84
|
+
'Content-Type': 'application/json',
|
|
85
|
+
},
|
|
86
|
+
body: JSON.stringify(interfaceStructure)
|
|
87
|
+
});
|
|
88
|
+
if (!createResponse.ok) {
|
|
89
|
+
const errorText = await createResponse.text();
|
|
90
|
+
throw new Error(`Failed to create interface: HTTP ${createResponse.status} - ${errorText}`);
|
|
91
|
+
}
|
|
92
|
+
const createdInterface = await createResponse.json();
|
|
93
|
+
// Step 9: Format success response
|
|
94
|
+
let resultText = `🎨 **"${parsed.appName}" Interface Created Successfully!**\n\n`;
|
|
95
|
+
resultText += `**ID:** ${createdInterface._id}\n`;
|
|
96
|
+
resultText += `**Type:** ${parsed.appType}\n`;
|
|
97
|
+
resultText += `**Authentication:** ${parsed.requiresAuth ? 'Enabled ✓' : 'Not required'}\n\n`;
|
|
98
|
+
resultText += `**📄 Pages Created:**\n`;
|
|
99
|
+
routes.forEach((route) => {
|
|
100
|
+
resultText += ` • ${route.title} (${route.path})\n`;
|
|
101
|
+
if (route.routes && route.routes.length > 0) {
|
|
102
|
+
route.routes.forEach(subRoute => {
|
|
103
|
+
resultText += ` - ${subRoute.title} (${subRoute.path})\n`;
|
|
104
|
+
});
|
|
105
|
+
}
|
|
106
|
+
});
|
|
107
|
+
resultText += `\n**🎨 Features:**\n`;
|
|
108
|
+
resultText += ` • Beautiful default styling with responsive design\n`;
|
|
109
|
+
resultText += ` • Dark mode support\n`;
|
|
110
|
+
resultText += ` • Consistent v-wrap/h-wrap structure\n`;
|
|
111
|
+
resultText += ` • Professional typography\n`;
|
|
112
|
+
if (menus.length > 0) {
|
|
113
|
+
resultText += ` • ${menus.length} navigation menu(s)\n`;
|
|
114
|
+
}
|
|
115
|
+
if (parsed.features.length > 0) {
|
|
116
|
+
resultText += `\n**🌟 Detected Features:**\n`;
|
|
117
|
+
parsed.features.forEach(feature => {
|
|
118
|
+
resultText += ` • ${feature}\n`;
|
|
119
|
+
});
|
|
120
|
+
}
|
|
121
|
+
resultText += '\n🚀 Your interface is ready to customize and deploy!';
|
|
122
|
+
return {
|
|
123
|
+
content: [{
|
|
124
|
+
type: "text",
|
|
125
|
+
text: resultText
|
|
126
|
+
}]
|
|
127
|
+
};
|
|
128
|
+
}
|
|
129
|
+
catch (error) {
|
|
130
|
+
console.error('❌ Interface build failed:', error);
|
|
131
|
+
return {
|
|
132
|
+
content: [{
|
|
133
|
+
type: "text",
|
|
134
|
+
text: `❌ Failed to build interface: ${error.message}\n\n${error.stack || ''}`
|
|
135
|
+
}]
|
|
136
|
+
};
|
|
137
|
+
}
|
|
138
|
+
}
|
|
139
|
+
/**
|
|
140
|
+
* Fetch glossary from API
|
|
141
|
+
*/
|
|
142
|
+
async function fetchGlossary(config) {
|
|
143
|
+
const response = await fetch(`${config.apiUrl || 'https://api.qik.dev'}/glossary`, {
|
|
144
|
+
headers: {
|
|
145
|
+
'Authorization': `Bearer ${config.accessToken}`,
|
|
146
|
+
'Content-Type': 'application/json',
|
|
147
|
+
},
|
|
148
|
+
});
|
|
149
|
+
if (!response.ok) {
|
|
150
|
+
throw new Error(`Failed to fetch glossary: HTTP ${response.status}`);
|
|
151
|
+
}
|
|
152
|
+
const data = await response.json();
|
|
153
|
+
return Array.isArray(data) ? data : (data.items || data.types || []);
|
|
154
|
+
}
|
|
155
|
+
/**
|
|
156
|
+
* Add authentication pages to routes
|
|
157
|
+
*/
|
|
158
|
+
function addAuthPages(routes, components) {
|
|
159
|
+
const hasLogin = routes.some(r => r.name === 'userLogin' || r.name === 'login');
|
|
160
|
+
const hasSignup = routes.some(r => r.name === 'userSignup' || r.name === 'signup');
|
|
161
|
+
// Find auth component
|
|
162
|
+
const authComponent = components.find(c => c.title.toLowerCase().includes('combined') &&
|
|
163
|
+
c.title.toLowerCase().includes('auth')) || components.find(c => c.title.toLowerCase().includes('login'));
|
|
164
|
+
if (!authComponent) {
|
|
165
|
+
console.warn('⚠️ Auth component not found in marketplace');
|
|
166
|
+
return;
|
|
167
|
+
}
|
|
168
|
+
if (!hasLogin) {
|
|
169
|
+
routes.push(createAuthPage('Login', '/login', 'userLogin', authComponent, 'login'));
|
|
170
|
+
}
|
|
171
|
+
if (!hasSignup) {
|
|
172
|
+
routes.push(createAuthPage('Signup', '/signup', 'userSignup', authComponent, 'signup'));
|
|
173
|
+
}
|
|
174
|
+
}
|
|
175
|
+
/**
|
|
176
|
+
* Create an authentication page
|
|
177
|
+
*/
|
|
178
|
+
function createAuthPage(title, path, name, component, defaultState) {
|
|
179
|
+
return {
|
|
180
|
+
title,
|
|
181
|
+
path,
|
|
182
|
+
name,
|
|
183
|
+
type: 'route',
|
|
184
|
+
sections: [{
|
|
185
|
+
title: component.title,
|
|
186
|
+
uuid: generateUUID(),
|
|
187
|
+
componentID: component._id,
|
|
188
|
+
componentVersion: 'latest',
|
|
189
|
+
model: {
|
|
190
|
+
hideTitle: false,
|
|
191
|
+
redirectTo: 'home',
|
|
192
|
+
redirectFromIntent: true,
|
|
193
|
+
defaultState
|
|
194
|
+
},
|
|
195
|
+
slots: []
|
|
196
|
+
}],
|
|
197
|
+
seo: {
|
|
198
|
+
title,
|
|
199
|
+
description: `${title} page`,
|
|
200
|
+
sitemapDisabled: false
|
|
201
|
+
},
|
|
202
|
+
headerDisabled: false,
|
|
203
|
+
footerDisabled: false,
|
|
204
|
+
contextVisibility: {
|
|
205
|
+
hideAuthenticated: true,
|
|
206
|
+
hideUnauthenticated: false
|
|
207
|
+
}
|
|
208
|
+
};
|
|
209
|
+
}
|
|
210
|
+
/**
|
|
211
|
+
* Build complete interface structure
|
|
212
|
+
*/
|
|
213
|
+
function buildCompleteInterface(parsed, routes, menus, components, primaryColor) {
|
|
214
|
+
const styles = generateInterfaceStyles(primaryColor);
|
|
215
|
+
const header = generateHeader(menus, components);
|
|
216
|
+
const footer = generateFooter(menus, components);
|
|
217
|
+
return {
|
|
218
|
+
title: parsed.appName,
|
|
219
|
+
meta: {
|
|
220
|
+
status: 'active',
|
|
221
|
+
scopes: [], // Will be set by API
|
|
222
|
+
tags: [],
|
|
223
|
+
security: 'secure'
|
|
224
|
+
},
|
|
225
|
+
seo: {
|
|
226
|
+
title: parsed.appName,
|
|
227
|
+
description: `${parsed.appName} - Built with Qik Interface Builder`
|
|
228
|
+
},
|
|
229
|
+
menus,
|
|
230
|
+
services: [],
|
|
231
|
+
components: [],
|
|
232
|
+
styles,
|
|
233
|
+
header,
|
|
234
|
+
footer,
|
|
235
|
+
slots: [],
|
|
236
|
+
layout: '<div><header-slot /><route-slot /><footer-slot /></div>',
|
|
237
|
+
routes,
|
|
238
|
+
fields: []
|
|
239
|
+
};
|
|
240
|
+
}
|
|
241
|
+
/**
|
|
242
|
+
* Generate comprehensive interface styles
|
|
243
|
+
*/
|
|
244
|
+
function generateInterfaceStyles(primaryColor) {
|
|
245
|
+
const primary = primaryColor || '#4a90e2';
|
|
246
|
+
return {
|
|
247
|
+
pre: `:root {
|
|
248
|
+
--primary: ${primary};
|
|
249
|
+
--text: #333;
|
|
250
|
+
--headings: #111;
|
|
251
|
+
--bg: #fff;
|
|
252
|
+
--bg-secondary: #f8f9fa;
|
|
253
|
+
--border: #e0e0e0;
|
|
254
|
+
--wrap-width: 1200px;
|
|
255
|
+
--radius: 0.5rem;
|
|
256
|
+
--shadow: 0 2px 8px rgba(0,0,0,0.1);
|
|
257
|
+
}
|
|
258
|
+
|
|
259
|
+
@media(prefers-color-scheme: dark) {
|
|
260
|
+
:root {
|
|
261
|
+
--bg: #1a1a1a;
|
|
262
|
+
--bg-secondary: #2d2d2d;
|
|
263
|
+
--text: #e0e0e0;
|
|
264
|
+
--headings: #fff;
|
|
265
|
+
--border: #404040;
|
|
266
|
+
--shadow: 0 2px 8px rgba(0,0,0,0.3);
|
|
267
|
+
}
|
|
268
|
+
}`,
|
|
269
|
+
post: `body, html {
|
|
270
|
+
font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, sans-serif;
|
|
271
|
+
font-size: clamp(14px, 1.2vw, 18px);
|
|
272
|
+
line-height: 1.6;
|
|
273
|
+
color: var(--text);
|
|
274
|
+
background: var(--bg);
|
|
275
|
+
margin: 0;
|
|
276
|
+
padding: 0;
|
|
277
|
+
}
|
|
278
|
+
|
|
279
|
+
* {
|
|
280
|
+
box-sizing: border-box;
|
|
281
|
+
}
|
|
282
|
+
|
|
283
|
+
/* Vertical and Horizontal Wrapping */
|
|
284
|
+
.v-wrap {
|
|
285
|
+
padding: 3rem 0;
|
|
286
|
+
}
|
|
287
|
+
|
|
288
|
+
.h-wrap {
|
|
289
|
+
max-width: var(--wrap-width);
|
|
290
|
+
margin: 0 auto;
|
|
291
|
+
padding: 0 1.5rem;
|
|
292
|
+
}
|
|
293
|
+
|
|
294
|
+
/* Typography */
|
|
295
|
+
h1, h2, h3, h4, h5, h6 {
|
|
296
|
+
color: var(--headings);
|
|
297
|
+
line-height: 1.2;
|
|
298
|
+
margin-top: 0;
|
|
299
|
+
margin-bottom: 1rem;
|
|
300
|
+
font-weight: 700;
|
|
301
|
+
}
|
|
302
|
+
|
|
303
|
+
h1 { font-size: clamp(2rem, 5vw, 3rem); }
|
|
304
|
+
h2 { font-size: clamp(1.5rem, 4vw, 2.5rem); }
|
|
305
|
+
h3 { font-size: clamp(1.25rem, 3vw, 2rem); }
|
|
306
|
+
h4 { font-size: 1.5rem; }
|
|
307
|
+
h5 { font-size: 1.25rem; }
|
|
308
|
+
h6 { font-size: 1.1rem; }
|
|
309
|
+
|
|
310
|
+
p {
|
|
311
|
+
margin: 0 0 1rem 0;
|
|
312
|
+
}
|
|
313
|
+
|
|
314
|
+
a {
|
|
315
|
+
color: var(--primary);
|
|
316
|
+
text-decoration: none;
|
|
317
|
+
transition: opacity 0.2s;
|
|
318
|
+
}
|
|
319
|
+
|
|
320
|
+
a:hover {
|
|
321
|
+
opacity: 0.8;
|
|
322
|
+
}
|
|
323
|
+
|
|
324
|
+
/* Utility Classes */
|
|
325
|
+
.font-xs { font-size: 0.75rem; }
|
|
326
|
+
.font-sm { font-size: 0.875rem; }
|
|
327
|
+
.font-lg { font-size: 1.25rem; }
|
|
328
|
+
.font-xl { font-size: 1.5rem; }
|
|
329
|
+
.font-muted { opacity: 0.6; }
|
|
330
|
+
|
|
331
|
+
.text-center { text-align: center; }
|
|
332
|
+
.text-right { text-align: right; }
|
|
333
|
+
|
|
334
|
+
/* Responsive Grid */
|
|
335
|
+
.grid {
|
|
336
|
+
display: grid;
|
|
337
|
+
grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
|
|
338
|
+
gap: 2rem;
|
|
339
|
+
}
|
|
340
|
+
|
|
341
|
+
/* Card Component */
|
|
342
|
+
.card {
|
|
343
|
+
background: var(--bg-secondary);
|
|
344
|
+
border-radius: var(--radius);
|
|
345
|
+
padding: 1.5rem;
|
|
346
|
+
box-shadow: var(--shadow);
|
|
347
|
+
}
|
|
348
|
+
|
|
349
|
+
/* Button Styles */
|
|
350
|
+
button, .btn {
|
|
351
|
+
background: var(--primary);
|
|
352
|
+
color: white;
|
|
353
|
+
border: none;
|
|
354
|
+
padding: 0.75rem 1.5rem;
|
|
355
|
+
border-radius: var(--radius);
|
|
356
|
+
cursor: pointer;
|
|
357
|
+
font-size: 1rem;
|
|
358
|
+
transition: all 0.2s;
|
|
359
|
+
}
|
|
360
|
+
|
|
361
|
+
button:hover, .btn:hover {
|
|
362
|
+
transform: translateY(-2px);
|
|
363
|
+
box-shadow: var(--shadow);
|
|
364
|
+
}
|
|
365
|
+
|
|
366
|
+
/* Form Styles */
|
|
367
|
+
input, textarea, select {
|
|
368
|
+
width: 100%;
|
|
369
|
+
padding: 0.75rem;
|
|
370
|
+
border: 1px solid var(--border);
|
|
371
|
+
border-radius: var(--radius);
|
|
372
|
+
background: var(--bg);
|
|
373
|
+
color: var(--text);
|
|
374
|
+
font-size: 1rem;
|
|
375
|
+
}
|
|
376
|
+
|
|
377
|
+
input:focus, textarea:focus, select:focus {
|
|
378
|
+
outline: none;
|
|
379
|
+
border-color: var(--primary);
|
|
380
|
+
}
|
|
381
|
+
|
|
382
|
+
/* Responsive */
|
|
383
|
+
@media (max-width: 768px) {
|
|
384
|
+
.v-wrap {
|
|
385
|
+
padding: 2rem 0;
|
|
386
|
+
}
|
|
387
|
+
|
|
388
|
+
.h-wrap {
|
|
389
|
+
padding: 0 1rem;
|
|
390
|
+
}
|
|
391
|
+
|
|
392
|
+
.grid {
|
|
393
|
+
grid-template-columns: 1fr;
|
|
394
|
+
gap: 1rem;
|
|
395
|
+
}
|
|
396
|
+
}
|
|
397
|
+
|
|
398
|
+
/* Touch device optimization */
|
|
399
|
+
@media (pointer: coarse) {
|
|
400
|
+
* {
|
|
401
|
+
-webkit-tap-highlight-color: transparent;
|
|
402
|
+
}
|
|
403
|
+
|
|
404
|
+
button, .btn, a {
|
|
405
|
+
min-height: 44px;
|
|
406
|
+
min-width: 44px;
|
|
407
|
+
}
|
|
408
|
+
}`,
|
|
409
|
+
includes: [],
|
|
410
|
+
themes: []
|
|
411
|
+
};
|
|
412
|
+
}
|
|
413
|
+
/**
|
|
414
|
+
* Generate header structure
|
|
415
|
+
*/
|
|
416
|
+
function generateHeader(menus, components) {
|
|
417
|
+
// Find menu component
|
|
418
|
+
const menuComponent = components.find(c => c.title.toLowerCase().includes('horizontal') &&
|
|
419
|
+
c.title.toLowerCase().includes('menu'));
|
|
420
|
+
if (!menuComponent) {
|
|
421
|
+
return { sections: [] };
|
|
422
|
+
}
|
|
423
|
+
return {
|
|
424
|
+
sections: [{
|
|
425
|
+
title: 'Header Navigation',
|
|
426
|
+
uuid: generateUUID(),
|
|
427
|
+
componentID: menuComponent._id,
|
|
428
|
+
componentVersion: 'latest',
|
|
429
|
+
model: {
|
|
430
|
+
menu: 'primaryMenu',
|
|
431
|
+
style: 'horizontal'
|
|
432
|
+
},
|
|
433
|
+
slots: []
|
|
434
|
+
}]
|
|
435
|
+
};
|
|
436
|
+
}
|
|
437
|
+
/**
|
|
438
|
+
* Generate footer structure
|
|
439
|
+
*/
|
|
440
|
+
function generateFooter(menus, components) {
|
|
441
|
+
// Check if footer menu exists
|
|
442
|
+
const hasFooterMenu = menus.some(m => m.name === 'footerMenu');
|
|
443
|
+
if (!hasFooterMenu) {
|
|
444
|
+
return { sections: [] };
|
|
445
|
+
}
|
|
446
|
+
// Find menu component
|
|
447
|
+
const menuComponent = components.find(c => c.title.toLowerCase().includes('horizontal') &&
|
|
448
|
+
c.title.toLowerCase().includes('menu'));
|
|
449
|
+
if (!menuComponent) {
|
|
450
|
+
return { sections: [] };
|
|
451
|
+
}
|
|
452
|
+
return {
|
|
453
|
+
sections: [{
|
|
454
|
+
title: 'Footer Navigation',
|
|
455
|
+
uuid: generateUUID(),
|
|
456
|
+
componentID: menuComponent._id,
|
|
457
|
+
componentVersion: 'latest',
|
|
458
|
+
model: {
|
|
459
|
+
menu: 'footerMenu',
|
|
460
|
+
style: 'horizontal'
|
|
461
|
+
},
|
|
462
|
+
slots: []
|
|
463
|
+
}]
|
|
464
|
+
};
|
|
465
|
+
}
|
|
466
|
+
/**
|
|
467
|
+
* Generate UUID
|
|
468
|
+
*/
|
|
469
|
+
function generateUUID() {
|
|
470
|
+
const chars = 'ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789';
|
|
471
|
+
let result = '';
|
|
472
|
+
for (let i = 0; i < 10; i++) {
|
|
473
|
+
result += chars.charAt(Math.floor(Math.random() * chars.length));
|
|
474
|
+
}
|
|
475
|
+
return result;
|
|
476
|
+
}
|
|
477
|
+
//# sourceMappingURL=interface-builder.js.map
|
|
@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CAAC,QAAQ,CAAC,YAAY,CAAC;QAC5C,CAAC,CAAC,KAAK,CAAC,WAAW,EAAE,CAAC,QAAQ,CAAC,MAAM,CAAC,CACvC,CAAC;IAEF,IAAI,CAAC,aAAa,EAAE,CAAC;QACnB,OAAO,EAAE,QAAQ,EAAE,EAAE,EAAE,CAAC;IAC1B,CAAC;IAED,OAAO;QACL,QAAQ,EAAE,CAAC;gBACT,KAAK,EAAE,mBAAmB;gBAC1B,IAAI,EAAE,YAAY,EAAE;gBACpB,WAAW,EAAE,aAAa,CAAC,GAAG;gBAC9B,gBAAgB,EAAE,QAAQ;gBAC1B,KAAK,EAAE;oBACL,IAAI,EAAE,YAAY;oBAClB,KAAK,EAAE,YAAY;iBACpB;gBACD,KAAK,EAAE,EAAE;aACV,CAAC;KACH,CAAC;AACJ,CAAC;AAED;;GAEG;AACH,SAAS,YAAY;IACnB,MAAM,KAAK,GAAG,gEAAgE,CAAC;IAC/E,IAAI,MAAM,GAAG,EAAE,CAAC;IAChB,KAAK,IAAI,CAAC,GAAG,CAAC,EAAE,CAAC,GAAG,EAAE,EAAE,CAAC,EAAE,EAAE,CAAC;QAC5B,MAAM,IAAI,KAAK,CAAC,MAAM,CAAC,IAAI,CAAC,KAAK,CAAC,IAAI,CAAC,MAAM,EAAE,GAAG,KAAK,CAAC,MAAM,CAAC,CAAC,CAAC;IACnE,CAAC;IACD,OAAO,MAAM,CAAC;AAChB,CAAC"}
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
import { Tool } from "@modelcontextprotocol/sdk/types.js";
|
|
2
|
+
export declare const createInterfaceTool: Tool;
|
|
3
|
+
export declare const addInterfaceRouteTool: Tool;
|
|
4
|
+
export declare const suggestInterfaceTemplatesTool: Tool;
|
|
5
|
+
export declare function handleCreateInterface(args: any): Promise<{
|
|
6
|
+
content: Array<{
|
|
7
|
+
type: string;
|
|
8
|
+
text: string;
|
|
9
|
+
}>;
|
|
10
|
+
}>;
|
|
11
|
+
export declare function handleAddInterfaceRoute(args: any): Promise<{
|
|
12
|
+
content: Array<{
|
|
13
|
+
type: string;
|
|
14
|
+
text: string;
|
|
15
|
+
}>;
|
|
16
|
+
}>;
|
|
17
|
+
export declare function handleSuggestInterfaceTemplates(args: any): Promise<{
|
|
18
|
+
content: Array<{
|
|
19
|
+
type: string;
|
|
20
|
+
text: string;
|
|
21
|
+
}>;
|
|
22
|
+
}>;
|
|
23
|
+
//# sourceMappingURL=interfaces.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"interfaces.d.ts","sourceRoot":"","sources":["../../../src/tools/interfaces.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,IAAI,EAAE,MAAM,oCAAoC,CAAC;AAsD1D,eAAO,MAAM,mBAAmB,EAAE,IAgCjC,CAAC;AAGF,eAAO,MAAM,qBAAqB,EAAE,IAyCnC,CAAC;AAGF,eAAO,MAAM,6BAA6B,EAAE,IAuB3C,CAAC;AAGF,wBAAsB,qBAAqB,CAAC,IAAI,EAAE,GAAG,GAAG,OAAO,CAAC;IAAE,OAAO,EAAE,KAAK,CAAC;QAAE,IAAI,EAAE,MAAM,CAAC;QAAC,IAAI,EAAE,MAAM,CAAA;KAAE,CAAC,CAAA;CAAE,CAAC,CAuFlH;AAGD,wBAAsB,uBAAuB,CAAC,IAAI,EAAE,GAAG,GAAG,OAAO,CAAC;IAAE,OAAO,EAAE,KAAK,CAAC;QAAE,IAAI,EAAE,MAAM,CAAC;QAAC,IAAI,EAAE,MAAM,CAAA;KAAE,CAAC,CAAA;CAAE,CAAC,CAwIpH;AAGD,wBAAsB,+BAA+B,CAAC,IAAI,EAAE,GAAG,GAAG,OAAO,CAAC;IAAE,OAAO,EAAE,KAAK,CAAC;QAAE,IAAI,EAAE,MAAM,CAAC;QAAC,IAAI,EAAE,MAAM,CAAA;KAAE,CAAC,CAAA;CAAE,CAAC,CAgD5H"}
|