@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 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 Filled
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 Filled
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 Outline|Filled');
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 || 'Outline';
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 Outline|Filled] [--size 24] [--color #hex] [--file path] [--marker "{/* ICON */}"]');
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 || 'Outline';
101
+ const weight = flags.weight || 'outline';
102
102
  const result = handleApplyIcon({
103
103
  name,
104
104
  weight,
@@ -1,8 +1,6 @@
1
1
  function weightProp(weight, framework) {
2
- if (weight === 'Outline')
2
+ if (weight === 'outline')
3
3
  return '';
4
- if (framework === 'html')
5
- return ' weight="filled"';
6
4
  return ` weight="${weight}"`;
7
5
  }
8
6
  function sizeProp(size, framework) {
@@ -1,4 +1,4 @@
1
- const W_KEYS = ['Outline', 'Filled'];
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.replace(/fill="white"/g, 'fill="currentColor"');
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();
@@ -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] : ['Outline', 'Filled'];
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) {
@@ -1,4 +1,4 @@
1
- export type IconWeight = 'Outline' | 'Filled';
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;