@h4shed/skill-theme-factory 1.0.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 +27 -0
- package/package.json +32 -0
- package/src/index.ts +25 -0
- package/src/tools/generate-theme.ts +53 -0
- package/tsconfig.json +13 -0
package/README.md
ADDED
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
# @fused-gaming/skill-theme-factory
|
|
2
|
+
|
|
3
|
+
Design system and theme generation for consistent UI/UX across applications.
|
|
4
|
+
|
|
5
|
+
## Installation
|
|
6
|
+
|
|
7
|
+
```bash
|
|
8
|
+
npm install @fused-gaming/skill-theme-factory
|
|
9
|
+
```
|
|
10
|
+
|
|
11
|
+
## Tools
|
|
12
|
+
|
|
13
|
+
### `generate-theme`
|
|
14
|
+
|
|
15
|
+
Generate design system themes with colors, typography, and spacing.
|
|
16
|
+
|
|
17
|
+
## Use Cases
|
|
18
|
+
|
|
19
|
+
- 🎨 Design system creation
|
|
20
|
+
- 🌈 Theme generation
|
|
21
|
+
- 📐 Spacing/typography systems
|
|
22
|
+
|
|
23
|
+
## Implementation Status
|
|
24
|
+
|
|
25
|
+
- ✅ Tool definitions
|
|
26
|
+
- 📝 Theme templates
|
|
27
|
+
- ⏳ Full implementation (WIP)
|
package/package.json
ADDED
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
{
|
|
2
|
+
"name": "@h4shed/skill-theme-factory",
|
|
3
|
+
"version": "1.0.0",
|
|
4
|
+
"description": "Design system and theme generation for consistent UI/UX across applications",
|
|
5
|
+
"type": "module",
|
|
6
|
+
"main": "./dist/index.js",
|
|
7
|
+
"exports": {
|
|
8
|
+
".": "./dist/index.js"
|
|
9
|
+
},
|
|
10
|
+
"scripts": {
|
|
11
|
+
"build": "tsc --project tsconfig.json",
|
|
12
|
+
"dev": "tsc --project tsconfig.json --watch",
|
|
13
|
+
"test": "echo \"No tests yet\""
|
|
14
|
+
},
|
|
15
|
+
"dependencies": {
|
|
16
|
+
"@h4shed/mcp-core": "*"
|
|
17
|
+
},
|
|
18
|
+
"devDependencies": {
|
|
19
|
+
"@types/node": "^20.12.0",
|
|
20
|
+
"typescript": "^5.3.2"
|
|
21
|
+
},
|
|
22
|
+
"keywords": [
|
|
23
|
+
"mcp",
|
|
24
|
+
"skill",
|
|
25
|
+
"theme",
|
|
26
|
+
"design-system",
|
|
27
|
+
"tailwind",
|
|
28
|
+
"css"
|
|
29
|
+
],
|
|
30
|
+
"author": "Fused Gaming",
|
|
31
|
+
"license": "Apache-2.0"
|
|
32
|
+
}
|
package/src/index.ts
ADDED
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Theme Factory Skill
|
|
3
|
+
* Design system and theme generation for consistent UI/UX across applications
|
|
4
|
+
*/
|
|
5
|
+
|
|
6
|
+
import type { Skill, SkillConfig } from "@fused-gaming/mcp-core";
|
|
7
|
+
import { generateThemeTool } from "./tools/generate-theme.js";
|
|
8
|
+
|
|
9
|
+
export const themeFactorySkill: Skill = {
|
|
10
|
+
name: "theme-factory",
|
|
11
|
+
version: "1.0.0",
|
|
12
|
+
description:
|
|
13
|
+
"Generate design systems and themes for consistent UI/UX across applications",
|
|
14
|
+
tools: [generateThemeTool],
|
|
15
|
+
|
|
16
|
+
async initialize(_config: SkillConfig): Promise<void> {
|
|
17
|
+
console.log("[ThemeFactory] Skill initialized");
|
|
18
|
+
},
|
|
19
|
+
|
|
20
|
+
async cleanup(): Promise<void> {
|
|
21
|
+
console.log("[ThemeFactory] Skill cleaned up");
|
|
22
|
+
},
|
|
23
|
+
};
|
|
24
|
+
|
|
25
|
+
export default themeFactorySkill;
|
|
@@ -0,0 +1,53 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Generate Theme Tool
|
|
3
|
+
* Creates design system themes with colors, typography, and spacing
|
|
4
|
+
*/
|
|
5
|
+
|
|
6
|
+
import type { ToolDefinition } from "@fused-gaming/mcp-core";
|
|
7
|
+
|
|
8
|
+
export const generateThemeTool: ToolDefinition = {
|
|
9
|
+
name: "generate-theme",
|
|
10
|
+
description: "Generate design system themes with colors, typography, and spacing",
|
|
11
|
+
inputSchema: {
|
|
12
|
+
type: "object",
|
|
13
|
+
properties: {
|
|
14
|
+
name: {
|
|
15
|
+
type: "string",
|
|
16
|
+
description: "Theme name",
|
|
17
|
+
},
|
|
18
|
+
baseColor: {
|
|
19
|
+
type: "string",
|
|
20
|
+
description: "Primary color in hex format",
|
|
21
|
+
},
|
|
22
|
+
format: {
|
|
23
|
+
type: "string",
|
|
24
|
+
description: "Output format: tailwind, css, json, scss (default: tailwind)",
|
|
25
|
+
},
|
|
26
|
+
},
|
|
27
|
+
required: ["name"],
|
|
28
|
+
},
|
|
29
|
+
|
|
30
|
+
async handler(input: Record<string, unknown>): Promise<Record<string, unknown>> {
|
|
31
|
+
const { name, baseColor = "#3B82F6", format = "tailwind" } = input as {
|
|
32
|
+
name: string;
|
|
33
|
+
baseColor?: string;
|
|
34
|
+
format?: string;
|
|
35
|
+
};
|
|
36
|
+
|
|
37
|
+
try {
|
|
38
|
+
// TODO: Implement theme generation
|
|
39
|
+
const theme = `/* Theme: ${name} */`;
|
|
40
|
+
|
|
41
|
+
return {
|
|
42
|
+
success: true,
|
|
43
|
+
name,
|
|
44
|
+
baseColor,
|
|
45
|
+
format,
|
|
46
|
+
theme,
|
|
47
|
+
};
|
|
48
|
+
} catch (error) {
|
|
49
|
+
const err = error instanceof Error ? error.message : String(error);
|
|
50
|
+
throw new Error(`Failed to generate theme: ${err}`);
|
|
51
|
+
}
|
|
52
|
+
},
|
|
53
|
+
};
|
package/tsconfig.json
ADDED