reicon-mcp 1.1.0 → 1.1.102

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
@@ -36,7 +36,7 @@ Or point directly at the local binary after building:
36
36
  | :--- | :--- |
37
37
  | `search_icons` | Rank icons by keyword |
38
38
  | `view_icon` | Return raw SVG markup and metadata |
39
- | `apply_icon` | Generate framework-specific import and usage snippets |
39
+ | `apply_icon` | Generate framework-specific import and docs snippets |
40
40
  | `list_categories` | List all icon categories |
41
41
 
42
42
  ## CLI
package/cli/index.js CHANGED
@@ -28,13 +28,13 @@ function parseArgs(argv) {
28
28
  function print(data) {
29
29
  console.log(JSON.stringify(data, null, 2));
30
30
  }
31
- function applyToFile(filePath, marker, importStatement, usageSnippet) {
31
+ function applyToFile(filePath, marker, importStatement, docsSnippet) {
32
32
  const content = readFileSync(filePath, 'utf-8');
33
33
  if (!content.includes(marker)) {
34
34
  console.error(`Marker not found in ${filePath}: ${marker}`);
35
35
  process.exit(1);
36
36
  }
37
- let updated = content.replace(marker, usageSnippet);
37
+ let updated = content.replace(marker, docsSnippet);
38
38
  if (importStatement && !updated.includes(importStatement)) {
39
39
  const lines = updated.split('\n');
40
40
  let insertAt = 0;
@@ -112,7 +112,7 @@ export async function run(argv) {
112
112
  process.exit(1);
113
113
  }
114
114
  if (flags.file && flags.marker) {
115
- applyToFile(flags.file, flags.marker, result.importStatement, result.usageSnippet);
115
+ applyToFile(flags.file, flags.marker, result.importStatement, result.docsSnippet);
116
116
  }
117
117
  else {
118
118
  print(result);
package/core/codegen.js CHANGED
@@ -44,8 +44,8 @@ export function generateCode(icon, input) {
44
44
  colorAttr('react'),
45
45
  weightProp(weight, 'react'),
46
46
  ].join('');
47
- const usageSnippet = `<${component}${props} />`;
48
- return { importStatement, usageSnippet };
47
+ const docsSnippet = `<${component}${props} />`;
48
+ return { importStatement, docsSnippet };
49
49
  }
50
50
  case 'react-native': {
51
51
  const importStatement = `import { ${component} } from 'reicon-react-native';`;
@@ -54,8 +54,8 @@ export function generateCode(icon, input) {
54
54
  colorAttr('react-native'),
55
55
  weightProp(weight, 'react-native'),
56
56
  ].join('');
57
- const usageSnippet = `<${component}${props} />`;
58
- return { importStatement, usageSnippet };
57
+ const docsSnippet = `<${component}${props} />`;
58
+ return { importStatement, docsSnippet };
59
59
  }
60
60
  case 'vue': {
61
61
  const importStatement = `import { ${component} } from 'reicon-vue';`;
@@ -64,8 +64,8 @@ export function generateCode(icon, input) {
64
64
  colorAttr('vue'),
65
65
  weightProp(weight, 'vue'),
66
66
  ].join('');
67
- const usageSnippet = `<${component}${props} />`;
68
- return { importStatement, usageSnippet };
67
+ const docsSnippet = `<${component}${props} />`;
68
+ return { importStatement, docsSnippet };
69
69
  }
70
70
  case 'svelte': {
71
71
  const importStatement = `import { ${component} } from 'reicon-svelte';`;
@@ -74,24 +74,24 @@ export function generateCode(icon, input) {
74
74
  colorAttr('svelte'),
75
75
  weightProp(weight, 'svelte'),
76
76
  ].join('');
77
- const usageSnippet = `<${component}${props} />`;
78
- return { importStatement, usageSnippet };
77
+ const docsSnippet = `<${component}${props} />`;
78
+ return { importStatement, docsSnippet };
79
79
  }
80
80
  case 'html': {
81
- const importStatement = '<script src="https://unpkg.com/reicon/cdn/reicon.min.js"></script>';
81
+ const importStatement = '<script src="https://unpkg.com/reicon/cdn/reicon.js"></script>';
82
82
  const props = [
83
83
  ` icon="${icon.name}"`,
84
84
  sizeProp(size, 'html'),
85
85
  colorAttr('html'),
86
86
  weightProp(weight, 'html'),
87
87
  ].join('');
88
- const usageSnippet = `<re-icon${props}></re-icon>`;
89
- return { importStatement, usageSnippet };
88
+ const docsSnippet = `<re-icon${props}></re-icon>`;
89
+ return { importStatement, docsSnippet };
90
90
  }
91
91
  case 'svg': {
92
92
  const importStatement = '';
93
- const usageSnippet = `<svg xmlns="http://www.w3.org/2000/svg" width="${size}" height="${size}" viewBox="${weightData.viewBox}" fill="none">${weightData.code}</svg>`;
94
- return { importStatement, usageSnippet };
93
+ const docsSnippet = `<svg xmlns="http://www.w3.org/2000/svg" width="${size}" height="${size}" viewBox="${weightData.viewBox}" fill="none">${weightData.code}</svg>`;
94
+ return { importStatement, docsSnippet };
95
95
  }
96
96
  default:
97
97
  return { error: `Unknown framework: ${input.framework}` };
package/core/types.d.ts CHANGED
@@ -32,5 +32,5 @@ export interface ApplyIconInput {
32
32
  }
33
33
  export interface ApplyIconOutput {
34
34
  importStatement: string;
35
- usageSnippet: string;
35
+ docsSnippet: string;
36
36
  }