@vezham/icons-mcp 1.0.6 → 1.0.7
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 +1 -1
- package/dist/README.md +1 -1
- package/dist/cli/index.js +4 -4
- package/dist/core/codegen.js +1 -3
- package/dist/core/index-builder.js +5 -2
- package/dist/core/search.js +1 -1
- package/dist/core/types.d.ts +1 -1
- package/dist/data/icon-index.json +1 -1
- package/dist/package.json +1 -1
- package/dist/server/index.js +5 -4
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -43,7 +43,7 @@ Or point directly at the local binary after building:
|
|
|
43
43
|
|
|
44
44
|
```bash
|
|
45
45
|
npx @vezham/icons-mcp search "shopping cart"
|
|
46
|
-
npx @vezham/icons-mcp view heart --weight
|
|
46
|
+
npx @vezham/icons-mcp view heart --weight filled
|
|
47
47
|
npx @vezham/icons-mcp apply heart --framework react --size 32 --color "#ef4444"
|
|
48
48
|
npx @vezham/icons-mcp categories
|
|
49
49
|
```
|
package/dist/README.md
CHANGED
|
@@ -43,7 +43,7 @@ Or point directly at the local binary after building:
|
|
|
43
43
|
|
|
44
44
|
```bash
|
|
45
45
|
npx @vezham/icons-mcp search "shopping cart"
|
|
46
|
-
npx @vezham/icons-mcp view heart --weight
|
|
46
|
+
npx @vezham/icons-mcp view heart --weight filled
|
|
47
47
|
npx @vezham/icons-mcp apply heart --framework react --size 32 --color "#ef4444"
|
|
48
48
|
npx @vezham/icons-mcp categories
|
|
49
49
|
```
|
package/dist/cli/index.js
CHANGED
|
@@ -81,10 +81,10 @@ export async function run(argv) {
|
|
|
81
81
|
case 'view': {
|
|
82
82
|
const name = positional[1];
|
|
83
83
|
if (!name) {
|
|
84
|
-
console.error('Usage: vezham-icons-mcp view <name> --weight
|
|
84
|
+
console.error('Usage: vezham-icons-mcp view <name> --weight outline|filled|duotone-outline|duotone-filled');
|
|
85
85
|
process.exit(1);
|
|
86
86
|
}
|
|
87
|
-
const weight = flags.weight || '
|
|
87
|
+
const weight = flags.weight || 'outline';
|
|
88
88
|
const result = handleViewIcon({ name, weight });
|
|
89
89
|
print(result);
|
|
90
90
|
if ('error' in result)
|
|
@@ -94,11 +94,11 @@ export async function run(argv) {
|
|
|
94
94
|
case 'apply': {
|
|
95
95
|
const name = positional[1];
|
|
96
96
|
if (!name) {
|
|
97
|
-
console.error('Usage: vezham-icons-mcp apply <name> --framework react|react-native|vue|svelte|html|svg [--weight
|
|
97
|
+
console.error('Usage: vezham-icons-mcp apply <name> --framework react|react-native|vue|svelte|html|svg [--weight outline|filled|duotone-outline|duotone-filled] [--size 24] [--color #hex] [--file path] [--marker "{/* ICON */}"]');
|
|
98
98
|
process.exit(1);
|
|
99
99
|
}
|
|
100
100
|
const framework = flags.framework || 'react';
|
|
101
|
-
const weight = flags.weight || '
|
|
101
|
+
const weight = flags.weight || 'outline';
|
|
102
102
|
const result = handleApplyIcon({
|
|
103
103
|
name,
|
|
104
104
|
weight,
|
package/dist/core/codegen.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
const W_KEYS = ['
|
|
1
|
+
const W_KEYS = ['outline', 'filled', 'duotone-outline', 'duotone-filled'];
|
|
2
2
|
function toPascalCase(str) {
|
|
3
3
|
return str
|
|
4
4
|
.split('-')
|
|
@@ -11,7 +11,10 @@ function stripSvgWrapper(code) {
|
|
|
11
11
|
return code.replace(/^<svg[^>]*>/, '').replace(/<\/svg>\s*$/, '').trim();
|
|
12
12
|
}
|
|
13
13
|
function rewriteColors(svg) {
|
|
14
|
-
return svg
|
|
14
|
+
return svg
|
|
15
|
+
.replace(/#1C274C/gi, 'currentColor')
|
|
16
|
+
.replace(/fill="white"/g, 'fill="currentColor"')
|
|
17
|
+
.replace(/stroke="white"/g, 'stroke="currentColor"');
|
|
15
18
|
}
|
|
16
19
|
function generateTags(name, description) {
|
|
17
20
|
const tags = new Set();
|
package/dist/core/search.js
CHANGED
|
@@ -1235,7 +1235,7 @@ export function searchIcons(index, query, options = {}) {
|
|
|
1235
1235
|
// Default limit raised from 5 → 8 for better agent context
|
|
1236
1236
|
const limit = options.limit ?? 8;
|
|
1237
1237
|
const tokens = tokenize(query);
|
|
1238
|
-
const weights = options.weight ? [options.weight] : ['
|
|
1238
|
+
const weights = options.weight ? [options.weight] : ['outline', 'filled', 'duotone-outline', 'duotone-filled'];
|
|
1239
1239
|
const results = [];
|
|
1240
1240
|
for (const icon of index.icons) {
|
|
1241
1241
|
for (const weight of weights) {
|
package/dist/core/types.d.ts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
export type IconWeight = '
|
|
1
|
+
export type IconWeight = 'outline' | 'filled' | 'duotone-outline' | 'duotone-filled';
|
|
2
2
|
export type Framework = 'react' | 'react-native' | 'vue' | 'svelte' | 'html' | 'svg';
|
|
3
3
|
export interface IconWeightData {
|
|
4
4
|
code: string;
|