@spaced-out/ui-design-system 0.5.17 โ 0.5.19
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/.cspell/custom-words.txt +2 -0
- package/.github/workflows/publish-mcp.yml +81 -0
- package/CHANGELOG.md +16 -0
- package/COMPONENT_PROMPT_TEMPLATE.md +223 -0
- package/lib/components/Checklist/Checklist.d.ts +44 -0
- package/lib/components/Checklist/Checklist.d.ts.map +1 -0
- package/lib/components/Checklist/Checklist.js +146 -0
- package/lib/components/Checklist/Checklist.module.css +164 -0
- package/lib/components/Checklist/index.d.ts +2 -0
- package/lib/components/Checklist/index.d.ts.map +1 -0
- package/lib/components/Checklist/index.js +16 -0
- package/lib/components/PromptChip/PromptChip.d.ts +1 -0
- package/lib/components/PromptChip/PromptChip.d.ts.map +1 -1
- package/lib/components/PromptChip/PromptChip.js +14 -12
- package/lib/components/PromptChip/PromptChip.module.css +69 -37
- package/lib/components/TemplateCard/TemplateCard.d.ts +29 -0
- package/lib/components/TemplateCard/TemplateCard.d.ts.map +1 -0
- package/lib/components/TemplateCard/TemplateCard.js +92 -0
- package/lib/components/TemplateCard/TemplateCard.module.css +170 -0
- package/lib/components/TemplateCard/index.d.ts +2 -0
- package/lib/components/TemplateCard/index.d.ts.map +1 -0
- package/lib/components/TemplateCard/index.js +16 -0
- package/lib/components/index.d.ts +2 -0
- package/lib/components/index.d.ts.map +1 -1
- package/lib/components/index.js +22 -0
- package/mcp/README.md +306 -0
- package/mcp/build-mcp-data.js +247 -0
- package/mcp/index.js +1239 -0
- package/mcp/package.json +44 -0
- package/mcp/test-server.js +65 -0
- package/package.json +1 -1
package/mcp/package.json
ADDED
|
@@ -0,0 +1,44 @@
|
|
|
1
|
+
{
|
|
2
|
+
"name": "@spaced-out/genesis-mcp-server",
|
|
3
|
+
"version": "1.0.0",
|
|
4
|
+
"description": "MCP server for Genesis UI Design System - provides AI assistants with access to components, hooks, and design tokens",
|
|
5
|
+
"type": "module",
|
|
6
|
+
"main": "index.js",
|
|
7
|
+
"bin": {
|
|
8
|
+
"genesis-mcp": "./index.js"
|
|
9
|
+
},
|
|
10
|
+
"scripts": {
|
|
11
|
+
"build": "node build-mcp-data.js",
|
|
12
|
+
"test": "node index.js --test",
|
|
13
|
+
"prepublishOnly": "yarn build"
|
|
14
|
+
},
|
|
15
|
+
"files": [
|
|
16
|
+
"index.js",
|
|
17
|
+
"data/design-system.json",
|
|
18
|
+
"README.md"
|
|
19
|
+
],
|
|
20
|
+
"keywords": [
|
|
21
|
+
"mcp",
|
|
22
|
+
"model-context-protocol",
|
|
23
|
+
"design-system",
|
|
24
|
+
"genesis",
|
|
25
|
+
"ui-components",
|
|
26
|
+
"ai-assistant",
|
|
27
|
+
"claude",
|
|
28
|
+
"cursor"
|
|
29
|
+
],
|
|
30
|
+
"author": "SpacedOut",
|
|
31
|
+
"license": "UNLICENSED",
|
|
32
|
+
"repository": {
|
|
33
|
+
"type": "git",
|
|
34
|
+
"url": "https://github.com/spaced-out/ui-design-system.git",
|
|
35
|
+
"directory": "mcp"
|
|
36
|
+
},
|
|
37
|
+
"dependencies": {
|
|
38
|
+
"@modelcontextprotocol/sdk": "^0.6.0"
|
|
39
|
+
},
|
|
40
|
+
"engines": {
|
|
41
|
+
"node": ">=18.0.0"
|
|
42
|
+
}
|
|
43
|
+
}
|
|
44
|
+
|
|
@@ -0,0 +1,65 @@
|
|
|
1
|
+
#!/usr/bin/env node
|
|
2
|
+
|
|
3
|
+
/**
|
|
4
|
+
* Quick test to verify the MCP server can load data
|
|
5
|
+
*/
|
|
6
|
+
|
|
7
|
+
import { readFileSync } from 'fs';
|
|
8
|
+
import { join, dirname } from 'path';
|
|
9
|
+
import { fileURLToPath } from 'url';
|
|
10
|
+
|
|
11
|
+
const __filename = fileURLToPath(import.meta.url);
|
|
12
|
+
const __dirname = dirname(__filename);
|
|
13
|
+
|
|
14
|
+
console.log('๐งช Testing Genesis MCP Server...\n');
|
|
15
|
+
|
|
16
|
+
try {
|
|
17
|
+
// Test 1: Load the data file
|
|
18
|
+
console.log('Test 1: Loading bundled data...');
|
|
19
|
+
const dataPath = join(__dirname, 'data', 'design-system.json');
|
|
20
|
+
const data = JSON.parse(readFileSync(dataPath, 'utf-8'));
|
|
21
|
+
console.log(' โ
Data loaded successfully');
|
|
22
|
+
|
|
23
|
+
// Test 2: Verify structure
|
|
24
|
+
console.log('\nTest 2: Verifying data structure...');
|
|
25
|
+
if (!data.metadata) throw new Error('Missing metadata');
|
|
26
|
+
if (!data.components) throw new Error('Missing components');
|
|
27
|
+
if (!data.hooks) throw new Error('Missing hooks');
|
|
28
|
+
if (!data.tokens) throw new Error('Missing tokens');
|
|
29
|
+
console.log(' โ
Data structure valid');
|
|
30
|
+
|
|
31
|
+
// Test 3: Check content
|
|
32
|
+
console.log('\nTest 3: Checking content...');
|
|
33
|
+
const componentCount = Object.keys(data.components).length;
|
|
34
|
+
const hookCount = Object.keys(data.hooks).length;
|
|
35
|
+
const tokenCategories = Object.keys(data.tokens).length;
|
|
36
|
+
|
|
37
|
+
console.log(` - Components: ${componentCount}`);
|
|
38
|
+
console.log(` - Hooks: ${hookCount}`);
|
|
39
|
+
console.log(` - Token categories: ${tokenCategories}`);
|
|
40
|
+
console.log(` - Version: ${data.metadata.version}`);
|
|
41
|
+
console.log(` - Built: ${new Date(data.metadata.buildDate).toLocaleString()}`);
|
|
42
|
+
console.log(' โ
Content verified');
|
|
43
|
+
|
|
44
|
+
// Test 4: Sample a component
|
|
45
|
+
console.log('\nTest 4: Sampling component data...');
|
|
46
|
+
const sampleComponent = Object.keys(data.components)[0];
|
|
47
|
+
const component = data.components[sampleComponent];
|
|
48
|
+
console.log(` - Sample: ${sampleComponent}`);
|
|
49
|
+
console.log(` - Has main file: ${!!component.files.main}`);
|
|
50
|
+
console.log(` - Has story file: ${!!component.files.story}`);
|
|
51
|
+
console.log(` - Has CSS file: ${!!component.files.css}`);
|
|
52
|
+
console.log(' โ
Component data complete');
|
|
53
|
+
|
|
54
|
+
console.log('\nโจ All tests passed!');
|
|
55
|
+
console.log('\n๐ Next steps:');
|
|
56
|
+
console.log(' 1. Update package.json version if needed');
|
|
57
|
+
console.log(' 2. Publish: npm publish');
|
|
58
|
+
console.log(' 3. Users can run: npx @spaced-out/genesis-mcp-server@latest');
|
|
59
|
+
console.log('\n๐ MCP server is ready to use!\n');
|
|
60
|
+
|
|
61
|
+
} catch (error) {
|
|
62
|
+
console.error('\nโ Test failed:', error.message);
|
|
63
|
+
process.exit(1);
|
|
64
|
+
}
|
|
65
|
+
|