@waiframe/mcp-server 0.1.1
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/LICENSE +21 -0
- package/README.md +106 -0
- package/dist/api-client.d.ts +27 -0
- package/dist/api-client.d.ts.map +1 -0
- package/dist/api-client.js +66 -0
- package/dist/api-client.js.map +1 -0
- package/dist/data/component-catalog.d.ts +16 -0
- package/dist/data/component-catalog.d.ts.map +1 -0
- package/dist/data/component-catalog.js +101 -0
- package/dist/data/component-catalog.js.map +1 -0
- package/dist/data/design-patterns.d.ts +17 -0
- package/dist/data/design-patterns.d.ts.map +1 -0
- package/dist/data/design-patterns.js +43 -0
- package/dist/data/design-patterns.js.map +1 -0
- package/dist/index.d.ts +3 -0
- package/dist/index.d.ts.map +1 -0
- package/dist/index.js +36 -0
- package/dist/index.js.map +1 -0
- package/dist/resources/component-catalog.d.ts +3 -0
- package/dist/resources/component-catalog.d.ts.map +1 -0
- package/dist/resources/component-catalog.js +16 -0
- package/dist/resources/component-catalog.js.map +1 -0
- package/dist/resources/design-patterns.d.ts +3 -0
- package/dist/resources/design-patterns.d.ts.map +1 -0
- package/dist/resources/design-patterns.js +16 -0
- package/dist/resources/design-patterns.js.map +1 -0
- package/dist/tools/component-spec.d.ts +3 -0
- package/dist/tools/component-spec.d.ts.map +1 -0
- package/dist/tools/component-spec.js +33 -0
- package/dist/tools/component-spec.js.map +1 -0
- package/dist/tools/context.d.ts +4 -0
- package/dist/tools/context.d.ts.map +1 -0
- package/dist/tools/context.js +34 -0
- package/dist/tools/context.js.map +1 -0
- package/dist/tools/flows.d.ts +4 -0
- package/dist/tools/flows.d.ts.map +1 -0
- package/dist/tools/flows.js +43 -0
- package/dist/tools/flows.js.map +1 -0
- package/dist/tools/projects.d.ts +4 -0
- package/dist/tools/projects.d.ts.map +1 -0
- package/dist/tools/projects.js +41 -0
- package/dist/tools/projects.js.map +1 -0
- package/dist/tools/screens.d.ts +4 -0
- package/dist/tools/screens.d.ts.map +1 -0
- package/dist/tools/screens.js +59 -0
- package/dist/tools/screens.js.map +1 -0
- package/dist/transform/semantic.d.ts +15 -0
- package/dist/transform/semantic.d.ts.map +1 -0
- package/dist/transform/semantic.js +87 -0
- package/dist/transform/semantic.js.map +1 -0
- package/dist/types.d.ts +129 -0
- package/dist/types.d.ts.map +1 -0
- package/dist/types.js +6 -0
- package/dist/types.js.map +1 -0
- package/package.json +44 -0
package/LICENSE
ADDED
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
MIT License
|
|
2
|
+
|
|
3
|
+
Copyright (c) 2026 waiframe.com
|
|
4
|
+
|
|
5
|
+
Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
6
|
+
of this software and associated documentation files (the "Software"), to deal
|
|
7
|
+
in the Software without restriction, including without limitation the rights
|
|
8
|
+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
9
|
+
copies of the Software, and to permit persons to whom the Software is
|
|
10
|
+
furnished to do so, subject to the following conditions:
|
|
11
|
+
|
|
12
|
+
The above copyright notice and this permission notice shall be included in all
|
|
13
|
+
copies or substantial portions of the Software.
|
|
14
|
+
|
|
15
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
16
|
+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
17
|
+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
18
|
+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
19
|
+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
20
|
+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
21
|
+
SOFTWARE.
|
package/README.md
ADDED
|
@@ -0,0 +1,106 @@
|
|
|
1
|
+
# Waiframe MCP Server
|
|
2
|
+
|
|
3
|
+
Connect AI coding tools to your [Waiframe.ai](https://waiframe.ai) wireframe designs using the [Model Context Protocol](https://modelcontextprotocol.io).
|
|
4
|
+
|
|
5
|
+
Build UI code that matches your wireframes — your AI coding tool gets structured context about screens, components, navigation flows, and design patterns.
|
|
6
|
+
|
|
7
|
+
## Quick Start
|
|
8
|
+
|
|
9
|
+
### 1. Get an API Key
|
|
10
|
+
|
|
11
|
+
Go to [waiframe.ai/app/settings?tab=api-keys](https://waiframe.ai/app/settings?tab=api-keys) and create an API key.
|
|
12
|
+
|
|
13
|
+
### 2. Configure Your AI Tool
|
|
14
|
+
|
|
15
|
+
**Claude Code** — add to your MCP settings:
|
|
16
|
+
|
|
17
|
+
```json
|
|
18
|
+
{
|
|
19
|
+
"mcpServers": {
|
|
20
|
+
"waiframe": {
|
|
21
|
+
"command": "npx",
|
|
22
|
+
"args": ["-y", "@waiframe/mcp-server"],
|
|
23
|
+
"env": {
|
|
24
|
+
"WAIFRAME_API_KEY": "wf_sk_your_key_here"
|
|
25
|
+
}
|
|
26
|
+
}
|
|
27
|
+
}
|
|
28
|
+
}
|
|
29
|
+
```
|
|
30
|
+
|
|
31
|
+
**Cursor** — add the same config to your MCP settings file.
|
|
32
|
+
|
|
33
|
+
### 3. Use It
|
|
34
|
+
|
|
35
|
+
Once connected, your AI tool can:
|
|
36
|
+
|
|
37
|
+
- **List your projects** — see all wireframe projects
|
|
38
|
+
- **Read screens** — get component layouts in a semantic format (no UUIDs or pixel positions)
|
|
39
|
+
- **Follow flows** — understand navigation between screens
|
|
40
|
+
- **Get design context** — app type, audience, features, brand style
|
|
41
|
+
- **Look up components** — specs for any of the 60+ wireframe component types
|
|
42
|
+
|
|
43
|
+
## Tools
|
|
44
|
+
|
|
45
|
+
| Tool | Description |
|
|
46
|
+
|------|-------------|
|
|
47
|
+
| `list_projects` | List all your wireframe projects |
|
|
48
|
+
| `get_project_overview` | Project details with screen and flow names |
|
|
49
|
+
| `get_screen` | Semantic wireframe layout for a screen |
|
|
50
|
+
| `get_flow` | Navigation flow between screens |
|
|
51
|
+
| `get_design_context` | App context (type, audience, features) |
|
|
52
|
+
| `get_component_spec` | Component specification and properties |
|
|
53
|
+
|
|
54
|
+
## Resources
|
|
55
|
+
|
|
56
|
+
| Resource | Description |
|
|
57
|
+
|----------|-------------|
|
|
58
|
+
| `waiframe://component-catalog` | Full catalog of 60+ wireframe components |
|
|
59
|
+
| `waiframe://design-patterns` | 20 curated UI design patterns |
|
|
60
|
+
|
|
61
|
+
## How It Works
|
|
62
|
+
|
|
63
|
+
```
|
|
64
|
+
AI Coding Tool ←stdio→ @waiframe/mcp-server ←HTTPS→ waiframe.ai API
|
|
65
|
+
```
|
|
66
|
+
|
|
67
|
+
The MCP server runs locally on your machine. It connects to the Waiframe API using your API key and translates wireframe data into an AI-friendly format:
|
|
68
|
+
|
|
69
|
+
- **Strips** UUIDs, pixel positions, and sizes
|
|
70
|
+
- **Keeps** component types, properties, labels, and text
|
|
71
|
+
- **Resolves** navigation connections to screen names
|
|
72
|
+
- **Sorts** elements top-to-bottom for reading order
|
|
73
|
+
|
|
74
|
+
### Example
|
|
75
|
+
|
|
76
|
+
A button in your wireframe becomes:
|
|
77
|
+
|
|
78
|
+
```
|
|
79
|
+
- button-primary {label: "Sign In"} → Dashboard
|
|
80
|
+
```
|
|
81
|
+
|
|
82
|
+
Instead of raw JSON with UUIDs and coordinates.
|
|
83
|
+
|
|
84
|
+
## Environment Variables
|
|
85
|
+
|
|
86
|
+
| Variable | Required | Default | Description |
|
|
87
|
+
|----------|----------|---------|-------------|
|
|
88
|
+
| `WAIFRAME_API_KEY` | Yes | — | Your API key from waiframe.ai |
|
|
89
|
+
| `WAIFRAME_BASE_URL` | No | `https://waiframe.ai` | API base URL (for development) |
|
|
90
|
+
|
|
91
|
+
## Development
|
|
92
|
+
|
|
93
|
+
```bash
|
|
94
|
+
# Install dependencies
|
|
95
|
+
npm install
|
|
96
|
+
|
|
97
|
+
# Build
|
|
98
|
+
npm run build
|
|
99
|
+
|
|
100
|
+
# Run locally
|
|
101
|
+
WAIFRAME_API_KEY=wf_sk_... node dist/index.js
|
|
102
|
+
```
|
|
103
|
+
|
|
104
|
+
## License
|
|
105
|
+
|
|
106
|
+
MIT
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
import type { ProjectOverview, ProjectDetail, Screen, Flow, ProjectContext } from "./types.js";
|
|
2
|
+
export declare class WaiframeApiClient {
|
|
3
|
+
private baseUrl;
|
|
4
|
+
private apiKey;
|
|
5
|
+
private cache;
|
|
6
|
+
constructor(apiKey: string, baseUrl?: string);
|
|
7
|
+
private request;
|
|
8
|
+
listProjects(): Promise<ProjectOverview[]>;
|
|
9
|
+
getProjectOverview(projectId: string): Promise<ProjectDetail>;
|
|
10
|
+
getScreens(projectId: string): Promise<Screen[]>;
|
|
11
|
+
getScreen(projectId: string, screenId: string): Promise<Screen>;
|
|
12
|
+
getFlows(projectId: string): Promise<Flow[]>;
|
|
13
|
+
getContext(projectId: string): Promise<{
|
|
14
|
+
project: {
|
|
15
|
+
name: string;
|
|
16
|
+
description?: string | null;
|
|
17
|
+
platform: string;
|
|
18
|
+
dimensions: {
|
|
19
|
+
width: number;
|
|
20
|
+
height: number;
|
|
21
|
+
};
|
|
22
|
+
};
|
|
23
|
+
context: ProjectContext | null;
|
|
24
|
+
}>;
|
|
25
|
+
clearCache(): void;
|
|
26
|
+
}
|
|
27
|
+
//# sourceMappingURL=api-client.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"api-client.d.ts","sourceRoot":"","sources":["../src/api-client.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EACV,eAAe,EACf,aAAa,EACb,MAAM,EACN,IAAI,EACJ,cAAc,EACf,MAAM,YAAY,CAAC;AASpB,qBAAa,iBAAiB;IAC5B,OAAO,CAAC,OAAO,CAAS;IACxB,OAAO,CAAC,MAAM,CAAS;IACvB,OAAO,CAAC,KAAK,CAA0C;gBAE3C,MAAM,EAAE,MAAM,EAAE,OAAO,SAAwB;YAK7C,OAAO;IAqCf,YAAY,IAAI,OAAO,CAAC,eAAe,EAAE,CAAC;IAK1C,kBAAkB,CAAC,SAAS,EAAE,MAAM,GAAG,OAAO,CAAC,aAAa,CAAC;IAI7D,UAAU,CAAC,SAAS,EAAE,MAAM,GAAG,OAAO,CAAC,MAAM,EAAE,CAAC;IAKhD,SAAS,CAAC,SAAS,EAAE,MAAM,EAAE,QAAQ,EAAE,MAAM,GAAG,OAAO,CAAC,MAAM,CAAC;IAK/D,QAAQ,CAAC,SAAS,EAAE,MAAM,GAAG,OAAO,CAAC,IAAI,EAAE,CAAC;IAK5C,UAAU,CAAC,SAAS,EAAE,MAAM,GAAG,OAAO,CAAC;QAAE,OAAO,EAAE;YAAE,IAAI,EAAE,MAAM,CAAC;YAAC,WAAW,CAAC,EAAE,MAAM,GAAG,IAAI,CAAC;YAAC,QAAQ,EAAE,MAAM,CAAC;YAAC,UAAU,EAAE;gBAAE,KAAK,EAAE,MAAM,CAAC;gBAAC,MAAM,EAAE,MAAM,CAAA;aAAE,CAAA;SAAE,CAAC;QAAC,OAAO,EAAE,cAAc,GAAG,IAAI,CAAA;KAAE,CAAC;IAIzM,UAAU,IAAI,IAAI;CAGnB"}
|
|
@@ -0,0 +1,66 @@
|
|
|
1
|
+
const CACHE_TTL = 5 * 60 * 1000; // 5 minutes
|
|
2
|
+
export class WaiframeApiClient {
|
|
3
|
+
baseUrl;
|
|
4
|
+
apiKey;
|
|
5
|
+
cache = new Map();
|
|
6
|
+
constructor(apiKey, baseUrl = "https://waiframe.ai") {
|
|
7
|
+
this.apiKey = apiKey;
|
|
8
|
+
this.baseUrl = baseUrl.replace(/\/$/, "");
|
|
9
|
+
}
|
|
10
|
+
async request(path, useCache = true) {
|
|
11
|
+
const url = `${this.baseUrl}/api/mcp${path}`;
|
|
12
|
+
// Check cache
|
|
13
|
+
if (useCache) {
|
|
14
|
+
const cached = this.cache.get(url);
|
|
15
|
+
if (cached && Date.now() - cached.timestamp < CACHE_TTL) {
|
|
16
|
+
return cached.data;
|
|
17
|
+
}
|
|
18
|
+
}
|
|
19
|
+
const response = await fetch(url, {
|
|
20
|
+
headers: {
|
|
21
|
+
Authorization: `Bearer ${this.apiKey}`,
|
|
22
|
+
"Content-Type": "application/json",
|
|
23
|
+
},
|
|
24
|
+
});
|
|
25
|
+
if (!response.ok) {
|
|
26
|
+
if (response.status === 401) {
|
|
27
|
+
throw new Error("Invalid API key. Generate a new key at waiframe.ai/app/settings?tab=api-keys");
|
|
28
|
+
}
|
|
29
|
+
if (response.status === 404) {
|
|
30
|
+
throw new Error("Resource not found");
|
|
31
|
+
}
|
|
32
|
+
const body = await response.text();
|
|
33
|
+
throw new Error(`API error (${response.status}): ${body}`);
|
|
34
|
+
}
|
|
35
|
+
const data = await response.json();
|
|
36
|
+
// Update cache
|
|
37
|
+
this.cache.set(url, { data, timestamp: Date.now() });
|
|
38
|
+
return data;
|
|
39
|
+
}
|
|
40
|
+
async listProjects() {
|
|
41
|
+
const result = await this.request("/projects");
|
|
42
|
+
return result.projects;
|
|
43
|
+
}
|
|
44
|
+
async getProjectOverview(projectId) {
|
|
45
|
+
return this.request(`/projects/${projectId}`);
|
|
46
|
+
}
|
|
47
|
+
async getScreens(projectId) {
|
|
48
|
+
const result = await this.request(`/projects/${projectId}/screens`);
|
|
49
|
+
return result.screens;
|
|
50
|
+
}
|
|
51
|
+
async getScreen(projectId, screenId) {
|
|
52
|
+
const result = await this.request(`/projects/${projectId}/screens/${screenId}`);
|
|
53
|
+
return result.screen;
|
|
54
|
+
}
|
|
55
|
+
async getFlows(projectId) {
|
|
56
|
+
const result = await this.request(`/projects/${projectId}/flows`);
|
|
57
|
+
return result.flows;
|
|
58
|
+
}
|
|
59
|
+
async getContext(projectId) {
|
|
60
|
+
return this.request(`/projects/${projectId}/context`);
|
|
61
|
+
}
|
|
62
|
+
clearCache() {
|
|
63
|
+
this.cache.clear();
|
|
64
|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M,GAAG,MAAM,IAAI,CAAC,OAAO,CAAoB,aAAa,SAAS,QAAQ,CAAC,CAAC;QACrF,OAAO,MAAM,CAAC,KAAK,CAAC;IACtB,CAAC;IAED,KAAK,CAAC,UAAU,CAAC,SAAiB;QAChC,OAAO,IAAI,CAAC,OAAO,CAAC,aAAa,SAAS,UAAU,CAAC,CAAC;IACxD,CAAC;IAED,UAAU;QACR,IAAI,CAAC,KAAK,CAAC,KAAK,EAAE,CAAC;IACrB,CAAC;CACF"}
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Static component catalog data for the MCP resource.
|
|
3
|
+
* Sourced from apps/web/src/lib/ai/component-schema.ts
|
|
4
|
+
*
|
|
5
|
+
* This is a text summary format optimized for AI code generation context.
|
|
6
|
+
*/
|
|
7
|
+
export interface ComponentData {
|
|
8
|
+
type: string;
|
|
9
|
+
category: string;
|
|
10
|
+
description: string;
|
|
11
|
+
props: Record<string, string>;
|
|
12
|
+
}
|
|
13
|
+
export declare const COMPONENT_CATALOG: ComponentData[];
|
|
14
|
+
export declare function formatComponentCatalogText(): string;
|
|
15
|
+
export declare function getComponentByType(type: string): ComponentData | undefined;
|
|
16
|
+
//# sourceMappingURL=component-catalog.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"component-catalog.d.ts","sourceRoot":"","sources":["../../src/data/component-catalog.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAEH,MAAM,WAAW,aAAa;IAC5B,IAAI,EAAE,MAAM,CAAC;IACb,QAAQ,EAAE,MAAM,CAAC;IACjB,WAAW,EAAE,MAAM,CAAC;IACpB,KAAK,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,CAAC;CAC/B;AAED,eAAO,MAAM,iBAAiB,EAAE,aAAa,EAmF5C,CAAC;AAEF,wBAAgB,0BAA0B,IAAI,MAAM,CAiBnD;AAED,wBAAgB,kBAAkB,CAAC,IAAI,EAAE,MAAM,GAAG,aAAa,GAAG,SAAS,CAE1E"}
|
|
@@ -0,0 +1,101 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Static component catalog data for the MCP resource.
|
|
3
|
+
* Sourced from apps/web/src/lib/ai/component-schema.ts
|
|
4
|
+
*
|
|
5
|
+
* This is a text summary format optimized for AI code generation context.
|
|
6
|
+
*/
|
|
7
|
+
export const COMPONENT_CATALOG = [
|
|
8
|
+
// BUTTONS
|
|
9
|
+
{ type: "button-primary", category: "buttons", description: "Main call-to-action button with solid background", props: { label: "string", disabled: "boolean?", icon: "string?" } },
|
|
10
|
+
{ type: "button-secondary", category: "buttons", description: "Secondary button with subtle styling", props: { label: "string", disabled: "boolean?", icon: "string?" } },
|
|
11
|
+
{ type: "button-outline", category: "buttons", description: "Button with border only, no fill", props: { label: "string", disabled: "boolean?" } },
|
|
12
|
+
{ type: "button-ghost", category: "buttons", description: "Transparent button, visible on hover", props: { label: "string", disabled: "boolean?" } },
|
|
13
|
+
{ type: "button-link", category: "buttons", description: "Text-only button styled as a link", props: { label: "string", disabled: "boolean?" } },
|
|
14
|
+
{ type: "icon-button", category: "buttons", description: "Square button with only an icon", props: { icon: "string (Lucide icon name)", disabled: "boolean?" } },
|
|
15
|
+
{ type: "fab", category: "buttons", description: "Floating action button, circular", props: { icon: "string", fixed: "boolean?", fixedVertical: "enum:top|center|bottom", fixedHorizontal: "enum:left|center|right" } },
|
|
16
|
+
{ type: "social-button", category: "buttons", description: "Social login button (Google, Apple, Facebook, etc.)", props: { text: "string", provider: "enum:google|apple|facebook|twitter|github|microsoft" } },
|
|
17
|
+
// FORM INPUTS
|
|
18
|
+
{ type: "text-input", category: "form", description: "Single-line text input with built-in label", props: { label: "string?", placeholder: "string?", value: "string?", disabled: "boolean?" } },
|
|
19
|
+
{ type: "email-input", category: "form", description: "Email input with email keyboard on mobile", props: { label: "string?", placeholder: "string?", disabled: "boolean?" } },
|
|
20
|
+
{ type: "password-input", category: "form", description: "Password input with masked characters", props: { label: "string?", placeholder: "string?", disabled: "boolean?" } },
|
|
21
|
+
{ type: "phone-input", category: "form", description: "Phone number input", props: { label: "string?", placeholder: "string?", disabled: "boolean?" } },
|
|
22
|
+
{ type: "number-input", category: "form", description: "Numeric input", props: { label: "string?", placeholder: "string?", min: "number?", max: "number?", disabled: "boolean?" } },
|
|
23
|
+
{ type: "textarea", category: "form", description: "Multi-line text area", props: { label: "string?", placeholder: "string?", rows: "number?", disabled: "boolean?" } },
|
|
24
|
+
{ type: "search-bar", category: "form", description: "Search input with search icon", props: { placeholder: "string?", value: "string?" } },
|
|
25
|
+
{ type: "dropdown", category: "form", description: "Dropdown select with options", props: { label: "string?", placeholder: "string?", items: "string[]", disabled: "boolean?" } },
|
|
26
|
+
{ type: "checkbox", category: "form", description: "Checkbox with label", props: { label: "string", checked: "boolean?" } },
|
|
27
|
+
{ type: "radio-group", category: "form", description: "Radio button group", props: { label: "string?", items: "string[]", selected: "number?" } },
|
|
28
|
+
{ type: "toggle", category: "form", description: "Toggle/switch control", props: { label: "string?", checked: "boolean?" } },
|
|
29
|
+
{ type: "slider", category: "form", description: "Range slider", props: { label: "string?", min: "number?", max: "number?", value: "number?" } },
|
|
30
|
+
{ type: "date-picker", category: "form", description: "Date selection input", props: { label: "string?", placeholder: "string?" } },
|
|
31
|
+
{ type: "file-upload", category: "form", description: "File upload area", props: { label: "string?", accept: "string?", multiple: "boolean?" } },
|
|
32
|
+
// TYPOGRAPHY
|
|
33
|
+
{ type: "heading", category: "typography", description: "Heading text (h1-h6 level)", props: { text: "string", level: "enum:1|2|3|4|5|6" } },
|
|
34
|
+
{ type: "paragraph", category: "typography", description: "Body text paragraph", props: { text: "string" } },
|
|
35
|
+
{ type: "label", category: "typography", description: "Small label text", props: { text: "string" } },
|
|
36
|
+
// DATA DISPLAY
|
|
37
|
+
{ type: "avatar", category: "data-display", description: "User avatar circle", props: { initials: "string?", size: "enum:sm|md|lg" } },
|
|
38
|
+
{ type: "badge", category: "data-display", description: "Status badge/tag", props: { text: "string", variant: "enum:default|success|warning|error|info" } },
|
|
39
|
+
{ type: "stat-card", category: "data-display", description: "Metric card with label, value, and optional change indicator", props: { label: "string", value: "string", change: "string?", changeType: "enum:positive|negative|neutral" } },
|
|
40
|
+
{ type: "rating", category: "data-display", description: "Star rating display", props: { value: "number", max: "number?" } },
|
|
41
|
+
{ type: "progress-bar", category: "data-display", description: "Progress indicator bar", props: { value: "number", max: "number?", label: "string?" } },
|
|
42
|
+
{ type: "tag", category: "data-display", description: "Removable tag/chip", props: { text: "string", removable: "boolean?" } },
|
|
43
|
+
// LAYOUT
|
|
44
|
+
{ type: "card", category: "layout", description: "Content card container", props: { title: "string?", padding: "boolean?" } },
|
|
45
|
+
{ type: "container", category: "layout", description: "Generic container/section wrapper", props: { padding: "boolean?" } },
|
|
46
|
+
{ type: "divider", category: "layout", description: "Horizontal divider line", props: { label: "string?" } },
|
|
47
|
+
{ type: "spacer", category: "layout", description: "Empty spacing element", props: { height: "number?" } },
|
|
48
|
+
{ type: "accordion", category: "layout", description: "Expandable section", props: { title: "string", expanded: "boolean?" } },
|
|
49
|
+
{ type: "tabs", category: "layout", description: "Tab panel container", props: { items: "string[]", activeIndex: "number?" } },
|
|
50
|
+
// NAVIGATION
|
|
51
|
+
{ type: "navbar", category: "navigation", description: "Top navigation bar", props: { title: "string?", showBack: "boolean?", showMenu: "boolean?" } },
|
|
52
|
+
{ type: "bottom-nav", category: "navigation", description: "Bottom tab navigation bar", props: { items: "string[]", activeIndex: "number?", icons: "string[]?" } },
|
|
53
|
+
{ type: "tab-bar", category: "navigation", description: "Horizontal tab bar", props: { items: "string[]", activeIndex: "number?" } },
|
|
54
|
+
{ type: "sidebar", category: "navigation", description: "Side navigation panel", props: { title: "string?", items: "string[]", activeIndex: "number?" } },
|
|
55
|
+
{ type: "header", category: "navigation", description: "Desktop page header with nav", props: { title: "string?", items: "string[]?", showLogo: "boolean?" } },
|
|
56
|
+
{ type: "breadcrumb", category: "navigation", description: "Breadcrumb trail", props: { items: "string[]" } },
|
|
57
|
+
{ type: "pagination", category: "navigation", description: "Page navigation controls", props: { totalPages: "number?", currentPage: "number?" } },
|
|
58
|
+
{ type: "stepper", category: "navigation", description: "Step progress indicator", props: { steps: "string[]", currentStep: "number?" } },
|
|
59
|
+
// LIST
|
|
60
|
+
{ type: "list", category: "list", description: "Vertical list of items", props: { items: "string[]", showDividers: "boolean?", showArrows: "boolean?" } },
|
|
61
|
+
{ type: "product-card", category: "list", description: "E-commerce product card with image area, title, price", props: { title: "string?", price: "string?", image: "boolean?" } },
|
|
62
|
+
// MEDIA
|
|
63
|
+
{ type: "image", category: "media", description: "Image placeholder", props: { alt: "string?", aspectRatio: "enum:1:1|4:3|16:9|3:2" } },
|
|
64
|
+
{ type: "video-placeholder", category: "media", description: "Video placeholder with play button", props: { aspectRatio: "enum:16:9|4:3" } },
|
|
65
|
+
{ type: "logo-placeholder", category: "media", description: "Logo/brand placeholder", props: { size: "enum:sm|md|lg" } },
|
|
66
|
+
{ type: "icon", category: "media", description: "Single icon display", props: { name: "string (Lucide icon name)", size: "enum:sm|md|lg" } },
|
|
67
|
+
{ type: "map-placeholder", category: "media", description: "Map view placeholder", props: { aspectRatio: "enum:1:1|4:3|16:9" } },
|
|
68
|
+
{ type: "chart-placeholder", category: "media", description: "Chart/graph placeholder", props: { chartType: "enum:bar|line|pie|area", title: "string?" } },
|
|
69
|
+
{ type: "carousel", category: "media", description: "Image/content carousel", props: { itemCount: "number?", showDots: "boolean?", showArrows: "boolean?" } },
|
|
70
|
+
// FEEDBACK
|
|
71
|
+
{ type: "alert", category: "feedback", description: "Alert/notification banner", props: { title: "string?", message: "string", variant: "enum:info|success|warning|error" } },
|
|
72
|
+
{ type: "toast", category: "feedback", description: "Toast notification", props: { message: "string", variant: "enum:info|success|warning|error" } },
|
|
73
|
+
{ type: "modal", category: "feedback", description: "Modal dialog overlay", props: { title: "string?", showClose: "boolean?" } },
|
|
74
|
+
{ type: "tooltip", category: "feedback", description: "Tooltip popup", props: { text: "string" } },
|
|
75
|
+
{ type: "skeleton", category: "feedback", description: "Loading skeleton placeholder", props: { lines: "number?", avatar: "boolean?" } },
|
|
76
|
+
{ type: "empty-state", category: "feedback", description: "Empty state with illustration placeholder", props: { title: "string?", message: "string?", showAction: "boolean?" } },
|
|
77
|
+
// DATA
|
|
78
|
+
{ type: "table", category: "data", description: "Data table with columns", props: { columns: "string[]", rows: "number?", showHeader: "boolean?" } },
|
|
79
|
+
{ type: "calendar", category: "data", description: "Calendar view", props: { showHeader: "boolean?" } },
|
|
80
|
+
{ type: "timeline", category: "data", description: "Vertical timeline", props: { items: "string[]" } },
|
|
81
|
+
];
|
|
82
|
+
export function formatComponentCatalogText() {
|
|
83
|
+
const lines = ["# Waiframe Component Catalog", ""];
|
|
84
|
+
let currentCategory = "";
|
|
85
|
+
for (const c of COMPONENT_CATALOG) {
|
|
86
|
+
if (c.category !== currentCategory) {
|
|
87
|
+
currentCategory = c.category;
|
|
88
|
+
lines.push(`## ${currentCategory.charAt(0).toUpperCase() + currentCategory.slice(1)}`, "");
|
|
89
|
+
}
|
|
90
|
+
const propsStr = Object.entries(c.props)
|
|
91
|
+
.map(([k, v]) => `${k}: ${v}`)
|
|
92
|
+
.join(", ");
|
|
93
|
+
lines.push(`- **${c.type}**: ${c.description}`);
|
|
94
|
+
lines.push(` Props: ${propsStr}`);
|
|
95
|
+
}
|
|
96
|
+
return lines.join("\n");
|
|
97
|
+
}
|
|
98
|
+
export function getComponentByType(type) {
|
|
99
|
+
return COMPONENT_CATALOG.find((c) => c.type === type);
|
|
100
|
+
}
|
|
101
|
+
//# sourceMappingURL=component-catalog.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"component-catalog.js","sourceRoot":"","sources":["../../src/data/component-catalog.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AASH,MAAM,CAAC,MAAM,iBAAiB,GAAoB;IAChD,UAAU;IACV,EAAE,IAAI,EAAE,gBAAgB,EAAE,QAAQ,EAAE,SAA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,CAAC,IAAI,CAAC,MAAM,eAAe,CAAC,MAAM,CAAC,CAAC,CAAC,CAAC,WAAW,EAAE,GAAG,eAAe,CAAC,KAAK,CAAC,CAAC,CAAC,EAAE,EAAE,EAAE,CAAC,CAAC;QAC7F,CAAC;QACD,MAAM,QAAQ,GAAG,MAAM,CAAC,OAAO,CAAC,CAAC,CAAC,KAAK,CAAC;aACrC,GAAG,CAAC,CAAC,CAAC,CAAC,EAAE,CAAC,CAAC,EAAE,EAAE,CAAC,GAAG,CAAC,KAAK,CAAC,EAAE,CAAC;aAC7B,IAAI,CAAC,IAAI,CAAC,CAAC;QACd,KAAK,CAAC,IAAI,CAAC,OAAO,CAAC,CAAC,IAAI,OAAO,CAAC,CAAC,WAAW,EAAE,CAAC,CAAC;QAChD,KAAK,CAAC,IAAI,CAAC,YAAY,QAAQ,EAAE,CAAC,CAAC;IACrC,CAAC;IAED,OAAO,KAAK,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC;AAC1B,CAAC;AAED,MAAM,UAAU,kBAAkB,CAAC,IAAY;IAC7C,OAAO,iBAAiB,CAAC,IAAI,CAAC,CAAC,CAAC,EAAE,EAAE,CAAC,CAAC,CAAC,IAAI,KAAK,IAAI,CAAC,CAAC;AACxD,CAAC"}
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Static design pattern data for the MCP resource.
|
|
3
|
+
* Sourced from apps/web/src/lib/ai/design-patterns.ts
|
|
4
|
+
*/
|
|
5
|
+
export interface DesignPatternData {
|
|
6
|
+
id: string;
|
|
7
|
+
name: string;
|
|
8
|
+
category: string;
|
|
9
|
+
platforms: string[];
|
|
10
|
+
description: string;
|
|
11
|
+
layout: string;
|
|
12
|
+
keyComponents: string[];
|
|
13
|
+
spacingStrategy: string;
|
|
14
|
+
}
|
|
15
|
+
export declare const DESIGN_PATTERNS: DesignPatternData[];
|
|
16
|
+
export declare function formatDesignPatternsText(): string;
|
|
17
|
+
//# sourceMappingURL=design-patterns.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"design-patterns.d.ts","sourceRoot":"","sources":["../../src/data/design-patterns.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAEH,MAAM,WAAW,iBAAiB;IAChC,EAAE,EAAE,MAAM,CAAC;IACX,IAAI,EAAE,MAAM,CAAC;IACb,QAAQ,EAAE,MAAM,CAAC;IACjB,SAAS,EAAE,MAAM,EAAE,CAAC;IACpB,WAAW,EAAE,MAAM,CAAC;IACpB,MAAM,EAAE,MAAM,CAAC;IACf,aAAa,EAAE,MAAM,EAAE,CAAC;IACxB,eAAe,EAAE,MAAM,CAAC;CACzB;AAED,eAAO,MAAM,eAAe,EAAE,iBAAiB,EAoB9C,CAAC;AAEF,wBAAgB,wBAAwB,IAAI,MAAM,CAkBjD"}
|
|
@@ -0,0 +1,43 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Static design pattern data for the MCP resource.
|
|
3
|
+
* Sourced from apps/web/src/lib/ai/design-patterns.ts
|
|
4
|
+
*/
|
|
5
|
+
export const DESIGN_PATTERNS = [
|
|
6
|
+
{ id: "auth-form-centered", name: "Centered Auth Form", category: "auth", platforms: ["mobile", "desktop", "tablet"], description: "Login/signup with centered card, logo above, social buttons below form", layout: "vertical-centered", keyComponents: ["logo-placeholder", "card", "email-input", "password-input", "button-primary", "social-button", "button-link"], spacingStrategy: "comfortable" },
|
|
7
|
+
{ id: "auth-split-screen", name: "Split Screen Auth", category: "auth", platforms: ["desktop", "tablet"], description: "Left panel with branding/hero image, right panel with auth form", layout: "horizontal-split", keyComponents: ["image", "heading", "paragraph", "email-input", "password-input", "button-primary", "social-button"], spacingStrategy: "spacious" },
|
|
8
|
+
{ id: "dashboard-stats-grid", name: "Stats Grid Dashboard", category: "dashboard", platforms: ["mobile", "desktop", "tablet"], description: "Top row of stat-cards followed by charts and recent activity list", layout: "stat-grid-then-content", keyComponents: ["stat-card", "chart-placeholder", "list", "heading"], spacingStrategy: "comfortable" },
|
|
9
|
+
{ id: "dashboard-sidebar-layout", name: "Sidebar Dashboard", category: "dashboard", platforms: ["desktop", "tablet"], description: "Persistent sidebar navigation with main content area showing stats and charts", layout: "sidebar-main", keyComponents: ["sidebar", "header", "stat-card", "chart-placeholder", "table"], spacingStrategy: "comfortable" },
|
|
10
|
+
{ id: "dashboard-mobile-cards", name: "Mobile Card Dashboard", category: "dashboard", platforms: ["mobile"], description: "Stacked cards with key metrics, scrollable activity feed, bottom navigation", layout: "vertical-scroll-cards", keyComponents: ["navbar", "stat-card", "card", "list", "bottom-nav"], spacingStrategy: "compact" },
|
|
11
|
+
{ id: "list-searchable", name: "Searchable List", category: "list", platforms: ["mobile", "desktop", "tablet"], description: "Search bar at top, filterable list with avatars and action indicators", layout: "search-then-list", keyComponents: ["search-bar", "tab-bar", "list", "fab"], spacingStrategy: "compact" },
|
|
12
|
+
{ id: "list-card-grid", name: "Card Grid", category: "list", platforms: ["desktop", "tablet"], description: "Grid of content cards with images, titles, and metadata", layout: "responsive-grid", keyComponents: ["search-bar", "card", "image", "heading", "badge"], spacingStrategy: "comfortable" },
|
|
13
|
+
{ id: "detail-hero-content", name: "Hero Detail Page", category: "detail", platforms: ["mobile", "desktop", "tablet"], description: "Large hero image/header, content sections below with actions", layout: "hero-then-content", keyComponents: ["image", "heading", "paragraph", "badge", "button-primary", "divider", "list"], spacingStrategy: "spacious" },
|
|
14
|
+
{ id: "detail-profile", name: "User Profile", category: "detail", platforms: ["mobile", "desktop", "tablet"], description: "Avatar with name/bio, stats row, tabbed content sections", layout: "profile-centered", keyComponents: ["avatar", "heading", "paragraph", "stat-card", "tab-bar", "list"], spacingStrategy: "comfortable" },
|
|
15
|
+
{ id: "detail-product", name: "Product Detail", category: "detail", platforms: ["mobile", "desktop", "tablet"], description: "Product image carousel, pricing, description, add to cart CTA", layout: "image-then-details", keyComponents: ["image", "heading", "paragraph", "badge", "rating", "button-primary", "button-outline"], spacingStrategy: "comfortable" },
|
|
16
|
+
{ id: "settings-grouped-list", name: "Grouped Settings", category: "settings", platforms: ["mobile", "desktop", "tablet"], description: "Categorized settings with toggles, list items, and navigation arrows", layout: "grouped-sections", keyComponents: ["heading", "list", "toggle", "divider", "avatar"], spacingStrategy: "compact" },
|
|
17
|
+
{ id: "onboarding-carousel", name: "Onboarding Carousel", category: "onboarding", platforms: ["mobile", "tablet"], description: "Full-screen slides with illustration, heading, description, progress dots, and CTA", layout: "full-screen-centered", keyComponents: ["image", "heading", "paragraph", "button-primary", "button-link"], spacingStrategy: "spacious" },
|
|
18
|
+
{ id: "commerce-product-list", name: "Product Catalog", category: "commerce", platforms: ["mobile", "desktop", "tablet"], description: "Product grid with filters, search, sorting, and product cards", layout: "filter-then-grid", keyComponents: ["search-bar", "tab-bar", "product-card", "badge"], spacingStrategy: "compact" },
|
|
19
|
+
{ id: "commerce-cart", name: "Shopping Cart", category: "commerce", platforms: ["mobile", "desktop", "tablet"], description: "Cart item list with quantities, price summary, and checkout CTA", layout: "list-then-summary", keyComponents: ["list", "heading", "paragraph", "divider", "button-primary", "stat-card"], spacingStrategy: "comfortable" },
|
|
20
|
+
{ id: "commerce-checkout", name: "Checkout Form", category: "commerce", platforms: ["mobile", "desktop", "tablet"], description: "Multi-section form with shipping, payment, and order summary", layout: "stepped-form", keyComponents: ["heading", "text-input", "email-input", "dropdown", "card", "button-primary", "divider"], spacingStrategy: "comfortable" },
|
|
21
|
+
{ id: "social-feed", name: "Social Feed", category: "social", platforms: ["mobile", "desktop", "tablet"], description: "Scrollable feed of post cards with avatar, content, images, and engagement actions", layout: "vertical-feed", keyComponents: ["card", "avatar", "paragraph", "image", "icon-button", "heading"], spacingStrategy: "compact" },
|
|
22
|
+
{ id: "messaging-chat", name: "Chat Interface", category: "messaging", platforms: ["mobile", "desktop", "tablet"], description: "Chat header, message bubbles area, bottom input with send button", layout: "header-content-input", keyComponents: ["navbar", "container", "card", "avatar", "text-input", "icon-button"], spacingStrategy: "compact" },
|
|
23
|
+
{ id: "messaging-inbox", name: "Message Inbox", category: "messaging", platforms: ["mobile", "desktop", "tablet"], description: "List of conversations with avatars, preview text, timestamps, and unread indicators", layout: "search-then-list", keyComponents: ["search-bar", "list", "avatar", "badge"], spacingStrategy: "compact" },
|
|
24
|
+
{ id: "content-article", name: "Article/Blog Page", category: "content", platforms: ["mobile", "desktop", "tablet"], description: "Hero image, title, metadata (author, date), body paragraphs with headings", layout: "article-flow", keyComponents: ["image", "heading", "paragraph", "avatar", "badge", "divider"], spacingStrategy: "spacious" },
|
|
25
|
+
];
|
|
26
|
+
export function formatDesignPatternsText() {
|
|
27
|
+
const lines = ["# Waiframe Design Patterns", ""];
|
|
28
|
+
let currentCategory = "";
|
|
29
|
+
for (const p of DESIGN_PATTERNS) {
|
|
30
|
+
if (p.category !== currentCategory) {
|
|
31
|
+
currentCategory = p.category;
|
|
32
|
+
lines.push(`## ${currentCategory.charAt(0).toUpperCase() + currentCategory.slice(1)}`, "");
|
|
33
|
+
}
|
|
34
|
+
lines.push(`### ${p.name} (${p.id})`);
|
|
35
|
+
lines.push(`Platforms: ${p.platforms.join(", ")}`);
|
|
36
|
+
lines.push(`Layout: ${p.layout} | Spacing: ${p.spacingStrategy}`);
|
|
37
|
+
lines.push(`${p.description}`);
|
|
38
|
+
lines.push(`Components: ${p.keyComponents.join(", ")}`);
|
|
39
|
+
lines.push("");
|
|
40
|
+
}
|
|
41
|
+
return lines.join("\n");
|
|
42
|
+
}
|
|
43
|
+
//# sourceMappingURL=design-patterns.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"design-patterns.js","sourceRoot":"","sources":["../../src/data/design-patterns.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAaH,MAAM,CAAC,MAAM,eAAe,GAAwB;IAClD,EAAE,EAAE,EAAE,oBAAoB,EAAE,IAAI,EAAE,oBAAoB,EAAE,QAAQ,EAAE,MAAM,EAAE,SAAS,EAAE,CAAC,QAAQ,EAAE,SAAS,EAAE,QAAQ,CAAC,EAAE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AC,CAAC,QAAQ,CAAC;YAC7B,KAAK,CAAC,IAAI,CAAC,MAAM,eAAe,CAAC,MAAM,CAAC,CAAC,CAAC,CAAC,WAAW,EAAE,GAAG,eAAe,CAAC,KAAK,CAAC,CAAC,CAAC,EAAE,EAAE,EAAE,CAAC,CAAC;QAC7F,CAAC;QACD,KAAK,CAAC,IAAI,CAAC,OAAO,CAAC,CAAC,IAAI,KAAK,CAAC,CAAC,EAAE,GAAG,CAAC,CAAC;QACtC,KAAK,CAAC,IAAI,CAAC,cAAc,CAAC,CAAC,SAAS,CAAC,IAAI,CAAC,IAAI,CAAC,EAAE,CAAC,CAAC;QACnD,KAAK,CAAC,IAAI,CAAC,WAAW,CAAC,CAAC,MAAM,eAAe,CAAC,CAAC,eAAe,EAAE,CAAC,CAAC;QAClE,KAAK,CAAC,IAAI,CAAC,GAAG,CAAC,CAAC,WAAW,EAAE,CAAC,CAAC;QAC/B,KAAK,CAAC,IAAI,CAAC,eAAe,CAAC,CAAC,aAAa,CAAC,IAAI,CAAC,IAAI,CAAC,EAAE,CAAC,CAAC;QACxD,KAAK,CAAC,IAAI,CAAC,EAAE,CAAC,CAAC;IACjB,CAAC;IAED,OAAO,KAAK,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC;AAC1B,CAAC"}
|
package/dist/index.d.ts
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":""}
|
package/dist/index.js
ADDED
|
@@ -0,0 +1,36 @@
|
|
|
1
|
+
#!/usr/bin/env node
|
|
2
|
+
import { McpServer } from "@modelcontextprotocol/sdk/server/mcp.js";
|
|
3
|
+
import { StdioServerTransport } from "@modelcontextprotocol/sdk/server/stdio.js";
|
|
4
|
+
import { WaiframeApiClient } from "./api-client.js";
|
|
5
|
+
import { registerProjectTools } from "./tools/projects.js";
|
|
6
|
+
import { registerScreenTools } from "./tools/screens.js";
|
|
7
|
+
import { registerFlowTools } from "./tools/flows.js";
|
|
8
|
+
import { registerContextTools } from "./tools/context.js";
|
|
9
|
+
import { registerComponentSpecTools } from "./tools/component-spec.js";
|
|
10
|
+
import { registerComponentCatalogResource } from "./resources/component-catalog.js";
|
|
11
|
+
import { registerDesignPatternsResource } from "./resources/design-patterns.js";
|
|
12
|
+
const apiKey = process.env.WAIFRAME_API_KEY;
|
|
13
|
+
if (!apiKey) {
|
|
14
|
+
console.error("Error: WAIFRAME_API_KEY environment variable is required.");
|
|
15
|
+
console.error("Generate one at: https://waiframe.ai/app/settings?tab=api-keys");
|
|
16
|
+
process.exit(1);
|
|
17
|
+
}
|
|
18
|
+
const baseUrl = process.env.WAIFRAME_BASE_URL || "https://waiframe.ai";
|
|
19
|
+
const client = new WaiframeApiClient(apiKey, baseUrl);
|
|
20
|
+
const server = new McpServer({
|
|
21
|
+
name: "waiframe",
|
|
22
|
+
version: "0.1.0",
|
|
23
|
+
});
|
|
24
|
+
// Register tools
|
|
25
|
+
registerProjectTools(server, client);
|
|
26
|
+
registerScreenTools(server, client);
|
|
27
|
+
registerFlowTools(server, client);
|
|
28
|
+
registerContextTools(server, client);
|
|
29
|
+
registerComponentSpecTools(server);
|
|
30
|
+
// Register resources
|
|
31
|
+
registerComponentCatalogResource(server);
|
|
32
|
+
registerDesignPatternsResource(server);
|
|
33
|
+
// Start server
|
|
34
|
+
const transport = new StdioServerTransport();
|
|
35
|
+
await server.connect(transport);
|
|
36
|
+
//# sourceMappingURL=index.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":";AAEA,OAAO,EAAE,SAAS,EAAE,MAAM,yCAAyC,CAAC;AACpE,OAAO,EAAE,oBAAoB,EAAE,MAAM,2CAA2C,CAAC;AACjF,OAAO,EAAE,iBAAiB,EAAE,MAAM,iBAAiB,CAAC;AACpD,OAAO,EAAE,oBAAoB,EAAE,MAAM,qBAAqB,CAAC;AAC3D,O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oB,EAAE,CAAC;AAC7C,MAAM,MAAM,CAAC,OAAO,CAAC,SAAS,CAAC,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"component-catalog.d.ts","sourceRoot":"","sources":["../../src/resources/component-catalog.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAE,MAAM,yCAAyC,CAAC;AAGpE,wBAAgB,gCAAgC,CAAC,MAAM,EAAE,SAAS,QAmBjE"}
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
import { formatComponentCatalogText } from "../data/component-catalog.js";
|
|
2
|
+
export function registerComponentCatalogResource(server) {
|
|
3
|
+
server.resource("component-catalog", "waiframe://component-catalog", {
|
|
4
|
+
description: "Complete catalog of all Waiframe wireframe components with their properties and descriptions",
|
|
5
|
+
mimeType: "text/markdown",
|
|
6
|
+
}, async () => ({
|
|
7
|
+
contents: [
|
|
8
|
+
{
|
|
9
|
+
uri: "waiframe://component-catalog",
|
|
10
|
+
mimeType: "text/markdown",
|
|
11
|
+
text: formatComponentCatalogText(),
|
|
12
|
+
},
|
|
13
|
+
],
|
|
14
|
+
}));
|
|
15
|
+
}
|
|
16
|
+
//# sourceMappingURL=component-catalog.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"component-catalog.js","sourceRoot":"","sources":["../../src/resources/component-catalog.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,0BAA0B,EAAE,MAAM,8BAA8B,CAAC;AAE1E,MAAM,UAAU,gCAAgC,CAAC,MAAiB;IAChE,MAAM,CAAC,QAAQ,CACb,mBAAmB,EACnB,8BAA8B,EAC9B;QACE,WAAW,EACT,8FAA8F;QAChG,QAAQ,EAAE,eAAe;KAC1B,EACD,KAAK,IAAI,EAAE,CAAC,CAAC;QACX,QAAQ,EAAE;YACR;gBACE,GAAG,EAAE,8BAA8B;gBACnC,QAAQ,EAAE,eAAe;gBACzB,IAAI,EAAE,0BAA0B,EAAE;aACnC;SACF;KACF,CAAC,CACH,CAAC;AACJ,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"design-patterns.d.ts","sourceRoot":"","sources":["../../src/resources/design-patterns.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAE,MAAM,yCAAyC,CAAC;AAGpE,wBAAgB,8BAA8B,CAAC,MAAM,EAAE,SAAS,QAmB/D"}
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
import { formatDesignPatternsText } from "../data/design-patterns.js";
|
|
2
|
+
export function registerDesignPatternsResource(server) {
|
|
3
|
+
server.resource("design-patterns", "waiframe://design-patterns", {
|
|
4
|
+
description: "Curated UI design patterns for wireframe layouts (auth, dashboard, list, detail, settings, etc.)",
|
|
5
|
+
mimeType: "text/markdown",
|
|
6
|
+
}, async () => ({
|
|
7
|
+
contents: [
|
|
8
|
+
{
|
|
9
|
+
uri: "waiframe://design-patterns",
|
|
10
|
+
mimeType: "text/markdown",
|
|
11
|
+
text: formatDesignPatternsText(),
|
|
12
|
+
},
|
|
13
|
+
],
|
|
14
|
+
}));
|
|
15
|
+
}
|
|
16
|
+
//# sourceMappingURL=design-patterns.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"design-patterns.js","sourceRoot":"","sources":["../../src/resources/design-patterns.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,wBAAwB,EAAE,MAAM,4BAA4B,CAAC;AAEtE,MAAM,UAAU,8BAA8B,CAAC,MAAiB;IAC9D,MAAM,CAAC,QAAQ,CACb,iBAAiB,EACjB,4BAA4B,EAC5B;QACE,WAAW,EACT,kGAAkG;QACpG,QAAQ,EAAE,eAAe;KAC1B,EACD,KAAK,IAAI,EAAE,CAAC,CAAC;QACX,QAAQ,EAAE;YACR;gBACE,GAAG,EAAE,4BAA4B;gBACjC,QAAQ,EAAE,eAAe;gBACzB,IAAI,EAAE,wBAAwB,EAAE;aACjC;SACF;KACF,CAAC,CACH,CAAC;AACJ,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"component-spec.d.ts","sourceRoot":"","sources":["../../src/tools/component-spec.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAE,MAAM,yCAAyC,CAAC;AAIpE,wBAAgB,0BAA0B,CAAC,MAAM,EAAE,SAAS,QAsC3D"}
|