mcp-react-toolkit 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.
Files changed (228) hide show
  1. package/CONTRIBUTING.md +157 -0
  2. package/HOW_IT_WORKS.md +270 -0
  3. package/README.md +259 -0
  4. package/demo/legacy-app/src/App.jsx +12 -0
  5. package/demo/legacy-app/src/components/Dashboard.jsx +51 -0
  6. package/demo/legacy-app/src/components/UserCard.jsx +32 -0
  7. package/demo/legacy-app/src/hooks/useUsers.js +38 -0
  8. package/demo/legacy-app/src/utils/api.js +30 -0
  9. package/glama.json +4 -0
  10. package/package.json +39 -0
  11. package/tools/accessibility-checker/build/index.d.ts +3 -0
  12. package/tools/accessibility-checker/build/index.d.ts.map +1 -0
  13. package/tools/accessibility-checker/build/index.js +112 -0
  14. package/tools/accessibility-checker/build/index.js.map +1 -0
  15. package/tools/accessibility-checker/build/rules.d.ts +22 -0
  16. package/tools/accessibility-checker/build/rules.d.ts.map +1 -0
  17. package/tools/accessibility-checker/build/rules.js +244 -0
  18. package/tools/accessibility-checker/build/rules.js.map +1 -0
  19. package/tools/accessibility-checker/build/rules.test.d.ts +2 -0
  20. package/tools/accessibility-checker/build/rules.test.d.ts.map +1 -0
  21. package/tools/accessibility-checker/build/rules.test.js.map +1 -0
  22. package/tools/accessibility-checker/package.json +20 -0
  23. package/tools/code-modernizer/build/index.d.ts +3 -0
  24. package/tools/code-modernizer/build/index.d.ts.map +1 -0
  25. package/tools/code-modernizer/build/index.js +58 -0
  26. package/tools/code-modernizer/build/index.js.map +1 -0
  27. package/tools/code-modernizer/build/tools/01-convert-to-typescript.d.ts +3 -0
  28. package/tools/code-modernizer/build/tools/01-convert-to-typescript.d.ts.map +1 -0
  29. package/tools/code-modernizer/build/tools/01-convert-to-typescript.js +110 -0
  30. package/tools/code-modernizer/build/tools/01-convert-to-typescript.js.map +1 -0
  31. package/tools/code-modernizer/build/types.d.ts +57 -0
  32. package/tools/code-modernizer/build/types.d.ts.map +1 -0
  33. package/tools/code-modernizer/build/types.js +5 -0
  34. package/tools/code-modernizer/build/types.js.map +1 -0
  35. package/tools/code-modernizer/build/utils/ast-parser.d.ts +6 -0
  36. package/tools/code-modernizer/build/utils/ast-parser.d.ts.map +1 -0
  37. package/tools/code-modernizer/build/utils/ast-parser.js +177 -0
  38. package/tools/code-modernizer/build/utils/ast-parser.js.map +1 -0
  39. package/tools/code-modernizer/build/utils/file-ops.d.ts +8 -0
  40. package/tools/code-modernizer/build/utils/file-ops.d.ts.map +1 -0
  41. package/tools/code-modernizer/build/utils/file-ops.js +63 -0
  42. package/tools/code-modernizer/build/utils/file-ops.js.map +1 -0
  43. package/tools/code-modernizer/build/utils/file-ops.test.d.ts +2 -0
  44. package/tools/code-modernizer/build/utils/file-ops.test.d.ts.map +1 -0
  45. package/tools/code-modernizer/build/utils/file-ops.test.js.map +1 -0
  46. package/tools/code-modernizer/build/utils/type-generator.d.ts +4 -0
  47. package/tools/code-modernizer/build/utils/type-generator.d.ts.map +1 -0
  48. package/tools/code-modernizer/build/utils/type-generator.js +37 -0
  49. package/tools/code-modernizer/build/utils/type-generator.js.map +1 -0
  50. package/tools/code-modernizer/package.json +23 -0
  51. package/tools/component-factory/build/index.d.ts +3 -0
  52. package/tools/component-factory/build/index.d.ts.map +1 -0
  53. package/tools/component-factory/build/index.js +534 -0
  54. package/tools/component-factory/build/index.js.map +1 -0
  55. package/tools/component-factory/build/utils.d.ts +6 -0
  56. package/tools/component-factory/build/utils.d.ts.map +1 -0
  57. package/tools/component-factory/build/utils.js +11 -0
  58. package/tools/component-factory/build/utils.js.map +1 -0
  59. package/tools/component-factory/build/utils.test.d.ts +2 -0
  60. package/tools/component-factory/build/utils.test.d.ts.map +1 -0
  61. package/tools/component-factory/build/utils.test.js.map +1 -0
  62. package/tools/component-factory/package.json +20 -0
  63. package/tools/component-factory/templates/accordion.tsx +57 -0
  64. package/tools/component-factory/templates/alert.tsx +59 -0
  65. package/tools/component-factory/templates/aspect-ratio.tsx +8 -0
  66. package/tools/component-factory/templates/avatar.tsx +51 -0
  67. package/tools/component-factory/templates/badge.tsx +37 -0
  68. package/tools/component-factory/templates/breadcrumb.tsx +116 -0
  69. package/tools/component-factory/templates/button.tsx +57 -0
  70. package/tools/component-factory/templates/calendar.tsx +66 -0
  71. package/tools/component-factory/templates/card.tsx +80 -0
  72. package/tools/component-factory/templates/checkbox.tsx +31 -0
  73. package/tools/component-factory/templates/collapsible.tsx +11 -0
  74. package/tools/component-factory/templates/command.tsx +150 -0
  75. package/tools/component-factory/templates/context-menu.tsx +199 -0
  76. package/tools/component-factory/templates/dialog.tsx +123 -0
  77. package/tools/component-factory/templates/drawer.tsx +118 -0
  78. package/tools/component-factory/templates/dropdown-menu.tsx +201 -0
  79. package/tools/component-factory/templates/form.tsx +178 -0
  80. package/tools/component-factory/templates/hover-card.tsx +29 -0
  81. package/tools/component-factory/templates/input-otp.tsx +71 -0
  82. package/tools/component-factory/templates/input.tsx +23 -0
  83. package/tools/component-factory/templates/label.tsx +27 -0
  84. package/tools/component-factory/templates/menubar.tsx +236 -0
  85. package/tools/component-factory/templates/navigation-menu.tsx +128 -0
  86. package/tools/component-factory/templates/pagination.tsx +120 -0
  87. package/tools/component-factory/templates/popover.tsx +31 -0
  88. package/tools/component-factory/templates/progress.tsx +28 -0
  89. package/tools/component-factory/templates/radio-group.tsx +44 -0
  90. package/tools/component-factory/templates/scroll-area.tsx +48 -0
  91. package/tools/component-factory/templates/select.tsx +159 -0
  92. package/tools/component-factory/templates/separator.tsx +32 -0
  93. package/tools/component-factory/templates/sheet.tsx +140 -0
  94. package/tools/component-factory/templates/skeleton.tsx +15 -0
  95. package/tools/component-factory/templates/slider.tsx +28 -0
  96. package/tools/component-factory/templates/sonner.tsx +31 -0
  97. package/tools/component-factory/templates/switch.tsx +29 -0
  98. package/tools/component-factory/templates/table.tsx +117 -0
  99. package/tools/component-factory/templates/tabs.tsx +56 -0
  100. package/tools/component-factory/templates/textarea.tsx +22 -0
  101. package/tools/component-factory/templates/toggle-group.tsx +61 -0
  102. package/tools/component-factory/templates/toggle.tsx +45 -0
  103. package/tools/component-factory/templates/tooltip.tsx +30 -0
  104. package/tools/dep-auditor/build/index.d.ts +18 -0
  105. package/tools/dep-auditor/build/index.d.ts.map +1 -0
  106. package/tools/dep-auditor/build/index.js +247 -0
  107. package/tools/dep-auditor/build/index.js.map +1 -0
  108. package/tools/dep-auditor/build/index.test.d.ts +2 -0
  109. package/tools/dep-auditor/build/index.test.d.ts.map +1 -0
  110. package/tools/dep-auditor/build/index.test.js.map +1 -0
  111. package/tools/dep-auditor/package.json +20 -0
  112. package/tools/generate-tests/build/analyzer.d.ts +31 -0
  113. package/tools/generate-tests/build/analyzer.d.ts.map +1 -0
  114. package/tools/generate-tests/build/analyzer.js +105 -0
  115. package/tools/generate-tests/build/analyzer.js.map +1 -0
  116. package/tools/generate-tests/build/analyzer.test.d.ts +2 -0
  117. package/tools/generate-tests/build/analyzer.test.d.ts.map +1 -0
  118. package/tools/generate-tests/build/analyzer.test.js.map +1 -0
  119. package/tools/generate-tests/build/generators.d.ts +6 -0
  120. package/tools/generate-tests/build/generators.d.ts.map +1 -0
  121. package/tools/generate-tests/build/generators.js +161 -0
  122. package/tools/generate-tests/build/generators.js.map +1 -0
  123. package/tools/generate-tests/build/index.d.ts +3 -0
  124. package/tools/generate-tests/build/index.d.ts.map +1 -0
  125. package/tools/generate-tests/build/index.js +148 -0
  126. package/tools/generate-tests/build/index.js.map +1 -0
  127. package/tools/generate-tests/package.json +20 -0
  128. package/tools/json-viewer/build/index.d.ts +3 -0
  129. package/tools/json-viewer/build/index.d.ts.map +1 -0
  130. package/tools/json-viewer/build/index.js +282 -0
  131. package/tools/json-viewer/build/index.js.map +1 -0
  132. package/tools/json-viewer/build/utils.d.ts +5 -0
  133. package/tools/json-viewer/build/utils.d.ts.map +1 -0
  134. package/tools/json-viewer/build/utils.js +40 -0
  135. package/tools/json-viewer/build/utils.js.map +1 -0
  136. package/tools/json-viewer/build/utils.test.d.ts +2 -0
  137. package/tools/json-viewer/build/utils.test.d.ts.map +1 -0
  138. package/tools/json-viewer/build/utils.test.js.map +1 -0
  139. package/tools/json-viewer/package.json +20 -0
  140. package/tools/monorepo-manager/build/index.d.ts +3 -0
  141. package/tools/monorepo-manager/build/index.d.ts.map +1 -0
  142. package/tools/monorepo-manager/build/index.js +318 -0
  143. package/tools/monorepo-manager/build/index.js.map +1 -0
  144. package/tools/monorepo-manager/build/types.d.ts +17 -0
  145. package/tools/monorepo-manager/build/types.d.ts.map +1 -0
  146. package/tools/monorepo-manager/build/types.js +2 -0
  147. package/tools/monorepo-manager/build/types.js.map +1 -0
  148. package/tools/monorepo-manager/build/utils.d.ts +9 -0
  149. package/tools/monorepo-manager/build/utils.d.ts.map +1 -0
  150. package/tools/monorepo-manager/build/utils.js +135 -0
  151. package/tools/monorepo-manager/build/utils.js.map +1 -0
  152. package/tools/monorepo-manager/build/utils.test.d.ts +2 -0
  153. package/tools/monorepo-manager/build/utils.test.d.ts.map +1 -0
  154. package/tools/monorepo-manager/build/utils.test.js.map +1 -0
  155. package/tools/monorepo-manager/package.json +20 -0
  156. package/tools/quality-pipeline/build/index.d.ts +3 -0
  157. package/tools/quality-pipeline/build/index.d.ts.map +1 -0
  158. package/tools/quality-pipeline/build/index.js +538 -0
  159. package/tools/quality-pipeline/build/index.js.map +1 -0
  160. package/tools/quality-pipeline/build/utils.d.ts +9 -0
  161. package/tools/quality-pipeline/build/utils.d.ts.map +1 -0
  162. package/tools/quality-pipeline/build/utils.js +15 -0
  163. package/tools/quality-pipeline/build/utils.js.map +1 -0
  164. package/tools/quality-pipeline/build/utils.test.d.ts +2 -0
  165. package/tools/quality-pipeline/build/utils.test.d.ts.map +1 -0
  166. package/tools/quality-pipeline/build/utils.test.js.map +1 -0
  167. package/tools/quality-pipeline/package.json +20 -0
  168. package/tools/shared/build/McpServerBase.d.ts +18 -0
  169. package/tools/shared/build/McpServerBase.d.ts.map +1 -0
  170. package/tools/shared/build/McpServerBase.js +74 -0
  171. package/tools/shared/build/McpServerBase.js.map +1 -0
  172. package/tools/shared/build/ToolRegistry.d.ts +9 -0
  173. package/tools/shared/build/ToolRegistry.d.ts.map +1 -0
  174. package/tools/shared/build/ToolRegistry.js +22 -0
  175. package/tools/shared/build/ToolRegistry.js.map +1 -0
  176. package/tools/shared/build/index.d.ts +4 -0
  177. package/tools/shared/build/index.d.ts.map +1 -0
  178. package/tools/shared/build/index.js +4 -0
  179. package/tools/shared/build/index.js.map +1 -0
  180. package/tools/shared/build/types.d.ts +36 -0
  181. package/tools/shared/build/types.d.ts.map +1 -0
  182. package/tools/shared/build/types.js +5 -0
  183. package/tools/shared/build/types.js.map +1 -0
  184. package/tools/shared/package.json +23 -0
  185. package/tools/typescript-enforcer/build/index.d.ts +3 -0
  186. package/tools/typescript-enforcer/build/index.d.ts.map +1 -0
  187. package/tools/typescript-enforcer/build/index.js +155 -0
  188. package/tools/typescript-enforcer/build/index.js.map +1 -0
  189. package/tools/typescript-enforcer/build/rules/branded-types.d.ts +3 -0
  190. package/tools/typescript-enforcer/build/rules/branded-types.d.ts.map +1 -0
  191. package/tools/typescript-enforcer/build/rules/branded-types.js +4 -0
  192. package/tools/typescript-enforcer/build/rules/branded-types.js.map +1 -0
  193. package/tools/typescript-enforcer/build/rules/discriminated-unions.d.ts +3 -0
  194. package/tools/typescript-enforcer/build/rules/discriminated-unions.d.ts.map +1 -0
  195. package/tools/typescript-enforcer/build/rules/discriminated-unions.js +4 -0
  196. package/tools/typescript-enforcer/build/rules/discriminated-unions.js.map +1 -0
  197. package/tools/typescript-enforcer/build/rules/generics.d.ts +3 -0
  198. package/tools/typescript-enforcer/build/rules/generics.d.ts.map +1 -0
  199. package/tools/typescript-enforcer/build/rules/generics.js +182 -0
  200. package/tools/typescript-enforcer/build/rules/generics.js.map +1 -0
  201. package/tools/typescript-enforcer/build/rules/modifiers.d.ts +3 -0
  202. package/tools/typescript-enforcer/build/rules/modifiers.d.ts.map +1 -0
  203. package/tools/typescript-enforcer/build/rules/modifiers.js +214 -0
  204. package/tools/typescript-enforcer/build/rules/modifiers.js.map +1 -0
  205. package/tools/typescript-enforcer/build/rules/no-any.d.ts +3 -0
  206. package/tools/typescript-enforcer/build/rules/no-any.d.ts.map +1 -0
  207. package/tools/typescript-enforcer/build/rules/no-any.js +138 -0
  208. package/tools/typescript-enforcer/build/rules/no-any.js.map +1 -0
  209. package/tools/typescript-enforcer/build/rules/type-guards.d.ts +3 -0
  210. package/tools/typescript-enforcer/build/rules/type-guards.d.ts.map +1 -0
  211. package/tools/typescript-enforcer/build/rules/type-guards.js +176 -0
  212. package/tools/typescript-enforcer/build/rules/type-guards.js.map +1 -0
  213. package/tools/typescript-enforcer/build/rules/utility-types.d.ts +3 -0
  214. package/tools/typescript-enforcer/build/rules/utility-types.d.ts.map +1 -0
  215. package/tools/typescript-enforcer/build/rules/utility-types.js +101 -0
  216. package/tools/typescript-enforcer/build/rules/utility-types.js.map +1 -0
  217. package/tools/typescript-enforcer/build/scanner.d.ts +4 -0
  218. package/tools/typescript-enforcer/build/scanner.d.ts.map +1 -0
  219. package/tools/typescript-enforcer/build/scanner.js +114 -0
  220. package/tools/typescript-enforcer/build/scanner.js.map +1 -0
  221. package/tools/typescript-enforcer/build/scanner.test.d.ts +2 -0
  222. package/tools/typescript-enforcer/build/scanner.test.d.ts.map +1 -0
  223. package/tools/typescript-enforcer/build/scanner.test.js.map +1 -0
  224. package/tools/typescript-enforcer/build/types.d.ts +55 -0
  225. package/tools/typescript-enforcer/build/types.d.ts.map +1 -0
  226. package/tools/typescript-enforcer/build/types.js +2 -0
  227. package/tools/typescript-enforcer/build/types.js.map +1 -0
  228. package/tools/typescript-enforcer/package.json +20 -0
@@ -0,0 +1,37 @@
1
+ // ============================================================================
2
+ // TYPE GENERATOR - Generate TypeScript type strings from AST analysis
3
+ // ============================================================================
4
+ export function generatePropsInterface(componentName, props) {
5
+ if (props.length === 0)
6
+ return `interface ${componentName}Props {}`;
7
+ const propLines = props.map(prop => prop === '{...}' ? ` // TODO: Define destructured props` : ` ${prop}?: unknown;`);
8
+ return `interface ${componentName}Props {\n${propLines.join('\n')}\n}`;
9
+ }
10
+ export function generateParamType(paramName) {
11
+ const commonTypes = {
12
+ event: 'React.FormEvent',
13
+ e: 'React.ChangeEvent<HTMLInputElement>',
14
+ props: 'Props',
15
+ children: 'React.ReactNode',
16
+ id: 'string | number',
17
+ name: 'string',
18
+ value: 'string',
19
+ onClick: '() => void',
20
+ onChange: '(value: string) => void',
21
+ className: 'string',
22
+ style: 'React.CSSProperties',
23
+ loading: 'boolean',
24
+ disabled: 'boolean',
25
+ data: 'unknown',
26
+ index: 'number',
27
+ };
28
+ return commonTypes[paramName] || 'unknown';
29
+ }
30
+ export function generateFileHeader(toolName) {
31
+ return `// ============================================================================
32
+ // Generated by code-modernizer: ${toolName}
33
+ // Generated at: ${new Date().toISOString()}
34
+ // ============================================================================
35
+ `;
36
+ }
37
+ //# sourceMappingURL=type-generator.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"type-generator.js","sourceRoot":"","sources":["../../src/utils/type-generator.ts"],"names":[],"mappings":"AAAA,+EAA+E;AAC/E,sEAAsE;AACtE,+EAA+E;AAE/E,MAAM,UAAU,sBAAsB,CAAC,aAAqB,EAAE,KAAe;IAC3E,IAAI,KAAK,CAAC,MAAM,KAAK,CAAC;QAAE,OAAO,aAAa,aAAa,UAAU,CAAC;IACpE,MAAM,SAAS,GAAG,KAAK,CAAC,GAAG,CAAC,IAAI,CAAC,EAAE,CAAC,IAAI,KAAK,OAAO,CAAC,CAAC,CAAC,sCAAsC,CAAC,CAAC,CAAC,KAAK,IAAI,aAAa,CAAC,CAAC;IACxH,OAAO,aAAa,aAAa,YAAY,SAAS,CAAC,IAAI,CAAC,IAAI,CAAC,KAAK,CAAC;AACzE,CAAC;AAED,MAAM,UAAU,iBAAiB,CAAC,SAAiB;IACjD,MAAM,WAAW,GAA2B;QAC1C,KAAK,EAAE,iBAAiB;QACxB,CAAC,EAAE,qCAAqC;QACxC,KAAK,EAAE,OAAO;QACd,QAAQ,EAAE,iBAAiB;QAC3B,EAAE,EAAE,iBAAiB;QACrB,IAAI,EAAE,QAAQ;QACd,KAAK,EAAE,QAAQ;QACf,OAAO,EAAE,YAAY;QACrB,QAAQ,EAAE,yBAAyB;QACnC,SAAS,EAAE,QAAQ;QACnB,KAAK,EAAE,qBAAqB;QAC5B,OAAO,EAAE,SAAS;QAClB,QAAQ,EAAE,SAAS;QACnB,IAAI,EAAE,SAAS;QACf,KAAK,EAAE,QAAQ;KAChB,CAAC;IACF,OAAO,WAAW,CAAC,SAAS,CAAC,IAAI,SAAS,CAAC;AAC7C,CAAC;AAED,MAAM,UAAU,kBAAkB,CAAC,QAAgB;IACjD,OAAO;mCAC0B,QAAQ;mBACxB,IAAI,IAAI,EAAE,CAAC,WAAW,EAAE;;CAE1C,CAAC;AACF,CAAC"}
@@ -0,0 +1,23 @@
1
+ {
2
+ "name": "@mcp-showcase/code-modernizer",
3
+ "version": "1.0.0",
4
+ "type": "module",
5
+ "main": "./build/index.js",
6
+ "scripts": {
7
+ "build": "tsc && chmod +x build/index.js",
8
+ "dev": "tsc --watch",
9
+ "test": "vitest run"
10
+ },
11
+ "dependencies": {
12
+ "@modelcontextprotocol/sdk": "^1.12.0",
13
+ "@typescript-eslint/parser": "^8.0.0",
14
+ "fs-extra": "^11.2.0",
15
+ "glob": "^10.3.10"
16
+ },
17
+ "devDependencies": {
18
+ "@types/fs-extra": "^11.0.0",
19
+ "@types/node": "^20.0.0",
20
+ "typescript": "^5.0.0",
21
+ "vitest": "^2.0.0"
22
+ }
23
+ }
@@ -0,0 +1,3 @@
1
+ #!/usr/bin/env node
2
+ export {};
3
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":""}
@@ -0,0 +1,534 @@
1
+ #!/usr/bin/env node
2
+ import { McpServerBase } from '@mcp-showcase/shared';
3
+ import * as fs from 'fs';
4
+ import * as path from 'path';
5
+ import { execSync } from 'child_process';
6
+ import { fileURLToPath } from 'url';
7
+ import { dirname } from 'path';
8
+ // ============================================================================
9
+ // PATHS (ES module compatible)
10
+ // ============================================================================
11
+ const __filename = fileURLToPath(import.meta.url);
12
+ const __dirname = dirname(__filename);
13
+ // templates/ lives alongside build/ at the tool root
14
+ const TEMPLATES_DIR = path.join(__dirname, '..', 'templates');
15
+ import { validateComponentName } from './utils.js';
16
+ // ============================================================================
17
+ // TEMPLATE READER
18
+ // ============================================================================
19
+ function readTemplate(componentName) {
20
+ const templatePath = path.join(TEMPLATES_DIR, `${componentName}.tsx`);
21
+ if (!fs.existsSync(templatePath)) {
22
+ throw new Error(`Template not found: ${componentName}. Available: ${getAvailableTemplates().join(', ')}`);
23
+ }
24
+ const content = fs.readFileSync(templatePath, 'utf-8');
25
+ // Fix @/lib/utils import for standalone use
26
+ return content.replace(/import\s+\{?\s*cn\s*\}?\s+from\s+["']@\/lib\/utils["']/g, 'import { cn } from "../../lib/utils"');
27
+ }
28
+ function getAvailableTemplates() {
29
+ if (!fs.existsSync(TEMPLATES_DIR))
30
+ return [];
31
+ return fs.readdirSync(TEMPLATES_DIR).filter(f => f.endsWith('.tsx')).map(f => f.replace('.tsx', ''));
32
+ }
33
+ // ============================================================================
34
+ // VOID ELEMENT DETECTION
35
+ // ============================================================================
36
+ const VOID_COMPONENTS = ['input', 'img', 'separator', 'divider'];
37
+ function isVoidElement(name) {
38
+ return VOID_COMPONENTS.includes(name.toLowerCase());
39
+ }
40
+ // ============================================================================
41
+ // CODE GENERATORS
42
+ // ============================================================================
43
+ function generateTypesCode(name, templateContent) {
44
+ const typeExports = [];
45
+ const re = /^export\s+(?:interface|type)\s+(\w+)/gm;
46
+ let m;
47
+ while ((m = re.exec(templateContent)) !== null)
48
+ typeExports.push(m[1]);
49
+ if (typeExports.length > 0) {
50
+ return `// Re-exports of types defined in ${name}.tsx\nexport type { ${typeExports.join(', ')} } from './${name}'\n`;
51
+ }
52
+ return `import * as React from "react"\n\nexport interface ${name}ExtendedProps {\n className?: string\n children?: React.ReactNode\n}\n`;
53
+ }
54
+ function generateTestCode(name, templateContent) {
55
+ const isVoid = isVoidElement(name);
56
+ const hasCva = templateContent.includes('cva(');
57
+ const hasVariants = hasCva && templateContent.includes('variant:');
58
+ const hasSizes = hasCva && templateContent.includes('size:');
59
+ const hasDisplayName = templateContent.includes('.displayName');
60
+ const displayNameTest = hasDisplayName
61
+ ? `\n it('has correct displayName', () => {\n expect(${name}.displayName).toBe('${name}')\n })\n` : '';
62
+ const variantTest = hasVariants && !isVoid
63
+ ? `\n it('renders destructive variant', () => {\n const { container } = render(<${name} variant="destructive">Delete</${name}>)\n expect(container.firstChild).toBeInTheDocument()\n })\n` : '';
64
+ const sizeTest = hasSizes && !isVoid
65
+ ? `\n it('renders sm size', () => {\n const { container } = render(<${name} size="sm">Small</${name}>)\n expect(container.firstChild).toBeInTheDocument()\n })\n` : '';
66
+ if (isVoid) {
67
+ return `import { describe, it, expect } from 'vitest'\nimport { render, screen } from '@testing-library/react'\nimport { ${name} } from './${name}'\n\ndescribe('${name}', () => {\n it('renders successfully', () => {\n render(<${name} placeholder="test input" />)\n expect(screen.getByPlaceholderText('test input')).toBeInTheDocument()\n })\n${displayNameTest}})\n`;
68
+ }
69
+ return `import { describe, it, expect } from 'vitest'\nimport { render, screen } from '@testing-library/react'\nimport { ${name} } from './${name}'\n\ndescribe('${name}', () => {\n it('renders successfully', () => {\n render(<${name}>Test Content</${name}>)\n expect(screen.getByText('Test Content')).toBeInTheDocument()\n })\n\n it('applies custom className', () => {\n const { container } = render(<${name} className="custom-class">Test</${name}>)\n expect(container.firstChild).toHaveClass('custom-class')\n })\n${variantTest}${sizeTest}${displayNameTest}})\n`;
70
+ }
71
+ function generateStoriesCode(name) {
72
+ const isVoid = isVoidElement(name);
73
+ if (isVoid) {
74
+ return `import type { Meta, StoryObj } from '@storybook/react'\nimport { ${name} } from './${name}'\n\nconst meta: Meta<typeof ${name}> = {\n title: 'Components/${name}',\n component: ${name},\n tags: ['autodocs'],\n}\n\nexport default meta\ntype Story = StoryObj<typeof ${name}>\n\nexport const Default: Story = {\n args: { placeholder: 'Enter text...', type: 'text' },\n}\n`;
75
+ }
76
+ return `import type { Meta, StoryObj } from '@storybook/react'\nimport { ${name} } from './${name}'\n\nconst meta: Meta<typeof ${name}> = {\n title: 'Components/${name}',\n component: ${name},\n tags: ['autodocs'],\n}\n\nexport default meta\ntype Story = StoryObj<typeof ${name}>\n\nexport const Default: Story = {\n args: { children: '${name}', variant: 'default' },\n}\n\nexport const Destructive: Story = {\n args: { children: '${name}', variant: 'destructive' },\n}\n`;
77
+ }
78
+ function generateDocsCode(name, templateContent) {
79
+ const exportMatches = templateContent.match(/export\s*\{([^}]+)\}/);
80
+ const exports = exportMatches ? exportMatches[1].split(',').map(e => e.trim()) : [name];
81
+ return `# ${name} Component\n\nA ${name.toLowerCase()} component built with shadcn/ui patterns.\n\n## Exports\n${exports.map(e => `- \`${e}\``).join('\n')}\n\n## Usage\n\n\`\`\`tsx\nimport { ${name} } from './${name}'\n\n<${name}>Click me</${name}>\n\`\`\`\n`;
82
+ }
83
+ function generateIndexCode(name) {
84
+ return `export * from './${name}'\n`;
85
+ }
86
+ // ============================================================================
87
+ // REVIEW / FIX HELPERS
88
+ // ============================================================================
89
+ function runTypeScriptCheck(componentDir) {
90
+ try {
91
+ const tsconfig = findTsconfig(componentDir);
92
+ if (!tsconfig)
93
+ return { errors: ['No tsconfig.json found'], passed: false };
94
+ execSync(`npx tsc --noEmit --project ${tsconfig}`, { cwd: componentDir, stdio: 'pipe', timeout: 30000 });
95
+ return { errors: [], passed: true };
96
+ }
97
+ catch (error) {
98
+ const err = error;
99
+ const output = err.stdout?.toString() || err.stderr?.toString() || err.message;
100
+ return { errors: output.split('\n').filter((l) => l.trim()), passed: false };
101
+ }
102
+ }
103
+ function checkAccessibility(componentDir, componentName) {
104
+ const issues = [];
105
+ const mainFile = path.join(componentDir, `${componentName}.tsx`);
106
+ if (!fs.existsSync(mainFile)) {
107
+ issues.push('Component file not found');
108
+ return issues;
109
+ }
110
+ const content = fs.readFileSync(mainFile, 'utf-8');
111
+ if (!content.includes('aria-') && !content.includes('role='))
112
+ issues.push('Consider adding ARIA attributes');
113
+ if (!content.includes('focus-visible'))
114
+ issues.push('Consider adding focus-visible styles');
115
+ if (!content.includes('displayName'))
116
+ issues.push('Consider adding displayName for React DevTools');
117
+ return issues;
118
+ }
119
+ function findTsconfig(dir) {
120
+ let current = dir;
121
+ while (current !== '/' && current !== '.') {
122
+ const tsconfig = path.join(current, 'tsconfig.json');
123
+ if (fs.existsSync(tsconfig))
124
+ return tsconfig;
125
+ current = path.dirname(current);
126
+ }
127
+ return null;
128
+ }
129
+ // ============================================================================
130
+ // MAIN SERVER CLASS
131
+ // ============================================================================
132
+ class ComponentFactoryServer extends McpServerBase {
133
+ constructor() {
134
+ super({ name: 'component-factory', version: '2.0.0' });
135
+ }
136
+ registerTools() {
137
+ this.addTool('generate_component', 'Generate a React component using actual shadcn/ui source code with TypeScript types, tests, and Storybook stories', {
138
+ type: 'object',
139
+ properties: {
140
+ name: { type: 'string', description: 'Component name in PascalCase (e.g., Button, Card, Input)' },
141
+ outputPath: { type: 'string', description: 'Output directory path' },
142
+ includeTests: { type: 'boolean', description: 'Generate Vitest test file', default: true },
143
+ includeStories: { type: 'boolean', description: 'Generate Storybook stories', default: true },
144
+ includeTypes: { type: 'boolean', description: 'Generate separate types file', default: true },
145
+ includeDocs: { type: 'boolean', description: 'Generate documentation file', default: true },
146
+ },
147
+ required: ['name', 'outputPath'],
148
+ }, this.handleGenerateComponent.bind(this));
149
+ this.addTool('list_templates', 'List all available shadcn/ui component templates', { type: 'object', properties: {} }, this.handleListTemplates.bind(this));
150
+ this.addTool('generate_component_library', 'Generate multiple components at once using shadcn/ui templates', {
151
+ type: 'object',
152
+ properties: {
153
+ components: { type: 'array', items: { type: 'string' }, description: 'List of component names in PascalCase' },
154
+ outputPath: { type: 'string', description: 'Base output directory path' },
155
+ includeTests: { type: 'boolean', default: true },
156
+ includeStories: { type: 'boolean', default: true },
157
+ },
158
+ required: ['components', 'outputPath'],
159
+ }, this.handleGenerateLibrary.bind(this));
160
+ this.addTool('check_component_exists', 'Check if a component already exists at the specified path', {
161
+ type: 'object',
162
+ properties: {
163
+ name: { type: 'string', description: 'Component name' },
164
+ outputPath: { type: 'string', description: 'Output directory path' },
165
+ },
166
+ required: ['name', 'outputPath'],
167
+ }, this.handleCheckExists.bind(this));
168
+ this.addTool('review_component', 'Review a generated component for TypeScript errors and accessibility issues. Returns a quality score and suggestions.', {
169
+ type: 'object',
170
+ properties: {
171
+ path: { type: 'string', description: 'Path to the component directory' },
172
+ },
173
+ required: ['path'],
174
+ }, this.handleReviewComponent.bind(this));
175
+ this.addTool('fix_component', 'Auto-fix common issues in a component: broken import paths, missing displayName, @/lib/utils → relative path', {
176
+ type: 'object',
177
+ properties: {
178
+ path: { type: 'string', description: 'Path to the component directory' },
179
+ },
180
+ required: ['path'],
181
+ }, this.handleFixComponent.bind(this));
182
+ this.addTool('improve_component', 'Improve a component by expanding tests with edge cases, adding more Storybook story variants, and enhancing docs', {
183
+ type: 'object',
184
+ properties: {
185
+ path: { type: 'string', description: 'Path to the component directory' },
186
+ },
187
+ required: ['path'],
188
+ }, this.handleImproveComponent.bind(this));
189
+ }
190
+ async handleGenerateComponent(args) {
191
+ const { name, outputPath, includeTests = true, includeStories = true, includeTypes = true, includeDocs = true } = args;
192
+ const validation = validateComponentName(name);
193
+ if (!validation.valid) {
194
+ return {
195
+ content: [{ type: 'text', text: JSON.stringify({ success: false, error: validation.error, suggestion: validation.suggestion }, null, 2) }],
196
+ isError: true,
197
+ };
198
+ }
199
+ try {
200
+ const componentName = name.toLowerCase();
201
+ const templateContent = readTemplate(componentName);
202
+ const componentDir = path.join(outputPath, name);
203
+ const resolvedDir = path.resolve(componentDir);
204
+ if (fs.existsSync(resolvedDir))
205
+ fs.rmSync(resolvedDir, { recursive: true, force: true });
206
+ fs.mkdirSync(resolvedDir, { recursive: true });
207
+ const files = [];
208
+ const componentPath = path.join(componentDir, `${name}.tsx`);
209
+ fs.writeFileSync(componentPath, templateContent);
210
+ files.push(componentPath);
211
+ if (includeTypes) {
212
+ const typesPath = path.join(componentDir, `${name}.types.ts`);
213
+ fs.writeFileSync(typesPath, generateTypesCode(name, templateContent));
214
+ files.push(typesPath);
215
+ }
216
+ if (includeTests) {
217
+ const testPath = path.join(componentDir, `${name}.test.tsx`);
218
+ fs.writeFileSync(testPath, generateTestCode(name, templateContent));
219
+ files.push(testPath);
220
+ }
221
+ if (includeStories) {
222
+ const storiesPath = path.join(componentDir, `${name}.stories.tsx`);
223
+ fs.writeFileSync(storiesPath, generateStoriesCode(name));
224
+ files.push(storiesPath);
225
+ }
226
+ if (includeDocs) {
227
+ const docsPath = path.join(componentDir, `${name}.docs.md`);
228
+ fs.writeFileSync(docsPath, generateDocsCode(name, templateContent));
229
+ files.push(docsPath);
230
+ }
231
+ const indexPath = path.join(componentDir, 'index.ts');
232
+ fs.writeFileSync(indexPath, generateIndexCode(name));
233
+ files.push(indexPath);
234
+ return this.success({
235
+ componentName: name,
236
+ outputDirectory: componentDir,
237
+ source: 'shadcn/ui template',
238
+ filesGenerated: files.length,
239
+ files,
240
+ message: `Successfully generated ${name} component with ${files.length} files`,
241
+ });
242
+ }
243
+ catch (error) {
244
+ return this.error(error);
245
+ }
246
+ }
247
+ async handleListTemplates(_args) {
248
+ const templates = getAvailableTemplates();
249
+ return this.success({ templates, count: templates.length, message: `Found ${templates.length} shadcn/ui component templates` });
250
+ }
251
+ async handleGenerateLibrary(args) {
252
+ const { components, outputPath, includeTests = true, includeStories = true } = args;
253
+ const results = [];
254
+ for (const componentName of components) {
255
+ const result = await this.handleGenerateComponent({ name: componentName, outputPath, includeTests, includeStories, includeTypes: true, includeDocs: true });
256
+ results.push(JSON.parse(result.content[0].text || '{}'));
257
+ }
258
+ return this.success({ totalComponents: components.length, results, message: `Generated ${components.length} components` });
259
+ }
260
+ async handleCheckExists(args) {
261
+ const { name, outputPath } = args;
262
+ const componentDir = path.join(outputPath, name);
263
+ const exists = fs.existsSync(componentDir);
264
+ return this.success({
265
+ exists,
266
+ path: componentDir,
267
+ files: exists ? fs.readdirSync(componentDir) : [],
268
+ message: exists ? `Component ${name} already exists` : `Component ${name} does not exist`,
269
+ });
270
+ }
271
+ async handleReviewComponent(args) {
272
+ const { path: componentPath } = args;
273
+ if (!fs.existsSync(componentPath))
274
+ throw new Error(`Component path does not exist: ${componentPath}`);
275
+ const componentName = path.basename(componentPath);
276
+ const tsResult = runTypeScriptCheck(componentPath);
277
+ const a11yIssues = checkAccessibility(componentPath, componentName);
278
+ // Grade calculation
279
+ let score = 100;
280
+ if (!tsResult.passed)
281
+ score -= 30;
282
+ score -= Math.min(a11yIssues.length * 10, 30);
283
+ const grade = score >= 90 ? 'A' : score >= 75 ? 'B' : score >= 60 ? 'C' : score >= 40 ? 'D' : 'F';
284
+ const suggestions = [];
285
+ if (!tsResult.passed)
286
+ suggestions.push('Fix TypeScript compilation errors');
287
+ if (a11yIssues.length > 0)
288
+ suggestions.push('Address accessibility issues');
289
+ return this.success({
290
+ component: componentName,
291
+ grade,
292
+ score,
293
+ typescriptErrors: tsResult.errors,
294
+ accessibilityIssues: a11yIssues,
295
+ suggestions,
296
+ summary: score >= 75 ? 'Good quality component' : 'Needs improvement',
297
+ });
298
+ }
299
+ async handleFixComponent(args) {
300
+ const { path: componentPath } = args;
301
+ if (!fs.existsSync(componentPath))
302
+ throw new Error(`Component path does not exist: ${componentPath}`);
303
+ const componentName = path.basename(componentPath);
304
+ const mainFile = path.join(componentPath, `${componentName}.tsx`);
305
+ const fixed = [];
306
+ const remaining = [];
307
+ if (!fs.existsSync(mainFile)) {
308
+ remaining.push('Component .tsx file not found');
309
+ return this.success({ component: componentName, fixed, remaining });
310
+ }
311
+ let content = fs.readFileSync(mainFile, 'utf-8');
312
+ let modified = false;
313
+ // Fix @/lib/utils import paths
314
+ if (content.includes('@/lib/utils')) {
315
+ content = content.replace(/import\s+\{?\s*cn\s*\}?\s+from\s+["']@\/lib\/utils["']/g, 'import { cn } from "../../lib/utils"');
316
+ fixed.push('Fixed @/lib/utils import → relative path');
317
+ modified = true;
318
+ }
319
+ // Fix @/components/* imports
320
+ if (content.match(/from\s+["']@\/components\//)) {
321
+ content = content.replace(/from\s+["']@\/components\//g, 'from "../../components/');
322
+ fixed.push('Fixed @/components/* imports → relative paths');
323
+ modified = true;
324
+ }
325
+ // Add missing displayName (only for forwardRef components without it)
326
+ if (content.includes('React.forwardRef') && !content.includes('.displayName')) {
327
+ content = content + `\n${componentName}.displayName = '${componentName}';\n`;
328
+ fixed.push(`Added ${componentName}.displayName`);
329
+ modified = true;
330
+ }
331
+ if (modified) {
332
+ fs.writeFileSync(mainFile, content);
333
+ }
334
+ else {
335
+ remaining.push('No auto-fixable issues found');
336
+ }
337
+ // Re-run review after fixes
338
+ const tsResult = runTypeScriptCheck(componentPath);
339
+ const a11yIssues = checkAccessibility(componentPath, componentName);
340
+ return this.success({
341
+ component: componentName,
342
+ fixed,
343
+ remaining,
344
+ afterFix: {
345
+ typescriptPassed: tsResult.passed,
346
+ accessibilityIssues: a11yIssues,
347
+ },
348
+ message: fixed.length > 0 ? `Applied ${fixed.length} fix(es)` : 'No changes needed',
349
+ });
350
+ }
351
+ async handleImproveComponent(args) {
352
+ const { path: componentPath } = args;
353
+ if (!fs.existsSync(componentPath))
354
+ throw new Error(`Component path does not exist: ${componentPath}`);
355
+ const componentName = path.basename(componentPath);
356
+ const enhanced = [];
357
+ // Read actual component for context-aware improvements
358
+ const componentFile = path.join(componentPath, `${componentName}.tsx`);
359
+ const templateContent = fs.existsSync(componentFile) ? fs.readFileSync(componentFile, 'utf-8') : '';
360
+ // Improve test file
361
+ const testFile = path.join(componentPath, `${componentName}.test.tsx`);
362
+ if (fs.existsSync(testFile)) {
363
+ const improvedTests = generateExtendedTestCode(componentName, templateContent);
364
+ fs.writeFileSync(testFile, improvedTests);
365
+ enhanced.push('Updated tests with edge cases and event handling');
366
+ }
367
+ // Improve stories file
368
+ const storiesFile = path.join(componentPath, `${componentName}.stories.tsx`);
369
+ if (fs.existsSync(storiesFile)) {
370
+ const improvedStories = generateExtendedStoriesCode(componentName, templateContent);
371
+ fs.writeFileSync(storiesFile, improvedStories);
372
+ enhanced.push('Extended stories with more variants and states');
373
+ }
374
+ // Improve docs
375
+ const docsFile = path.join(componentPath, `${componentName}.docs.md`);
376
+ if (fs.existsSync(docsFile)) {
377
+ const improvedDocs = generateDocsCode(componentName, templateContent);
378
+ fs.writeFileSync(docsFile, improvedDocs);
379
+ enhanced.push('Updated documentation');
380
+ }
381
+ return this.success({
382
+ component: componentName,
383
+ enhanced,
384
+ message: enhanced.length > 0 ? `Improved ${enhanced.length} file(s)` : 'No files found to improve',
385
+ });
386
+ }
387
+ }
388
+ // ============================================================================
389
+ // EXTENDED CODE GENERATORS (for improve_component)
390
+ // ============================================================================
391
+ function generateExtendedTestCode(name, templateContent) {
392
+ const isVoid = ['input', 'img', 'separator', 'divider'].includes(name.toLowerCase());
393
+ const hasCva = templateContent.includes('cva(');
394
+ const hasVariants = hasCva && templateContent.includes('variant:');
395
+ const hasSizes = hasCva && templateContent.includes('size:');
396
+ const hasDisplayName = templateContent.includes('.displayName');
397
+ if (isVoid) {
398
+ return `import { describe, it, expect, vi } from 'vitest'
399
+ import { render, screen, fireEvent } from '@testing-library/react'
400
+ import { ${name} } from './${name}'
401
+
402
+ describe('${name}', () => {
403
+ it('renders successfully', () => {
404
+ render(<${name} placeholder="test input" />)
405
+ expect(screen.getByPlaceholderText('test input')).toBeInTheDocument()
406
+ })
407
+
408
+ it('applies custom className', () => {
409
+ const { container } = render(<${name} className="custom-class" placeholder="test" />)
410
+ expect(container.firstChild).toHaveClass('custom-class')
411
+ })
412
+
413
+ it('forwards ref correctly', () => {
414
+ const ref = { current: null }
415
+ render(<${name} ref={ref} placeholder="test" />)
416
+ expect(ref.current).not.toBeNull()
417
+ })
418
+
419
+ it('handles onChange events', () => {
420
+ const handleChange = vi.fn()
421
+ render(<${name} onChange={handleChange} placeholder="test" />)
422
+ const input = screen.getByPlaceholderText('test')
423
+ fireEvent.change(input, { target: { value: 'new value' } })
424
+ expect(handleChange).toHaveBeenCalledTimes(1)
425
+ })
426
+
427
+ it('handles disabled state', () => {
428
+ render(<${name} disabled placeholder="test" />)
429
+ expect(screen.getByPlaceholderText('test')).toBeDisabled()
430
+ })
431
+ ${hasDisplayName ? `
432
+ it('has correct displayName', () => {
433
+ expect(${name}.displayName).toBe('${name}')
434
+ })
435
+ ` : ''}})
436
+ `;
437
+ }
438
+ return `import { describe, it, expect, vi } from 'vitest'
439
+ import { render, screen, fireEvent } from '@testing-library/react'
440
+ import { ${name} } from './${name}'
441
+
442
+ describe('${name}', () => {
443
+ it('renders successfully', () => {
444
+ render(<${name}>Test Content</${name}>)
445
+ expect(screen.getByText('Test Content')).toBeInTheDocument()
446
+ })
447
+
448
+ it('applies custom className', () => {
449
+ const { container } = render(<${name} className="custom-class">Test</${name}>)
450
+ expect(container.firstChild).toHaveClass('custom-class')
451
+ })
452
+
453
+ it('forwards ref correctly', () => {
454
+ const ref = { current: null }
455
+ render(<${name} ref={ref}>Test</${name}>)
456
+ expect(ref.current).not.toBeNull()
457
+ })
458
+
459
+ it('handles onClick events', () => {
460
+ const handleClick = vi.fn()
461
+ render(<${name} onClick={handleClick}>Click me</${name}>)
462
+ fireEvent.click(screen.getByText('Click me'))
463
+ expect(handleClick).toHaveBeenCalledTimes(1)
464
+ })
465
+
466
+ it('spreads additional props', () => {
467
+ render(<${name} data-testid="test-component">Test</${name}>)
468
+ expect(screen.getByTestId('test-component')).toBeInTheDocument()
469
+ })
470
+ ${hasVariants ? `
471
+ it('renders destructive variant', () => {
472
+ const { container } = render(<${name} variant="destructive">Delete</${name}>)
473
+ expect(container.firstChild).toBeInTheDocument()
474
+ })
475
+ ` : ''}${hasSizes ? `
476
+ it('renders sm size', () => {
477
+ const { container } = render(<${name} size="sm">Small</${name}>)
478
+ expect(container.firstChild).toBeInTheDocument()
479
+ })
480
+ ` : ''}${hasDisplayName ? `
481
+ it('has correct displayName', () => {
482
+ expect(${name}.displayName).toBe('${name}')
483
+ })
484
+ ` : ''}})
485
+ `;
486
+ }
487
+ function generateExtendedStoriesCode(name, templateContent) {
488
+ const hasCva = templateContent.includes('cva(');
489
+ const hasVariants = hasCva && templateContent.includes('variant:');
490
+ const hasSizes = hasCva && templateContent.includes('size:');
491
+ return `import type { Meta, StoryObj } from '@storybook/react'
492
+ import { ${name} } from './${name}'
493
+
494
+ const meta: Meta<typeof ${name}> = {
495
+ title: 'Components/${name}',
496
+ component: ${name},
497
+ tags: ['autodocs'],
498
+ parameters: { layout: 'centered' },
499
+ }
500
+
501
+ export default meta
502
+ type Story = StoryObj<typeof ${name}>
503
+
504
+ export const Default: Story = {
505
+ args: { children: '${name}', variant: 'default' },
506
+ }
507
+ ${hasVariants ? `
508
+ export const Destructive: Story = {
509
+ args: { children: 'Delete', variant: 'destructive' },
510
+ }
511
+
512
+ export const Outline: Story = {
513
+ args: { children: 'Outline', variant: 'outline' },
514
+ }
515
+
516
+ export const Ghost: Story = {
517
+ args: { children: 'Ghost', variant: 'ghost' },
518
+ }
519
+ ` : ''}${hasSizes ? `
520
+ export const Small: Story = {
521
+ args: { children: 'Small', size: 'sm' },
522
+ }
523
+
524
+ export const Large: Story = {
525
+ args: { children: 'Large', size: 'lg' },
526
+ }
527
+ ` : ''}
528
+ export const Disabled: Story = {
529
+ args: { children: 'Disabled', disabled: true },
530
+ }
531
+ `;
532
+ }
533
+ new ComponentFactoryServer().run().catch(console.error);
534
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":";AACA,OAAO,EAAE,aAAa,EAAE,MAAM,s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A2B,CAAC,IAAY,EAAE,eAAuB;IACxE,MAAM,MAAM,GAAG,eAAe,CAAC,QAAQ,CAAC,MAAM,CAAC,CAAC;IAChD,MAAM,WAAW,GAAG,MAAM,IAAI,eAAe,CAAC,QAAQ,CAAC,UAAU,CAAC,CAAC;IACnE,MAAM,QAAQ,GAAG,MAAM,IAAI,eAAe,CAAC,QAAQ,CAAC,OAAO,CAAC,CAAC;IAE7D,OAAO;WACE,IAAI,cAAc,IAAI;;0BAEP,IAAI;uBACP,IAAI;eACZ,IAAI;;;;;;+BAMY,IAAI;;;uBAGZ,IAAI;;EAEzB,WAAW,CAAC,CAAC,CAAC;;;;;;;;;;;;CAYf,CAAC,CAAC,CAAC,EAAE,GAAG,QAAQ,CAAC,CAAC,CAAC;;;;;;;;CAQnB,CAAC,CAAC,CAAC,EAAE;;;;CAIL,CAAC;AACF,CAAC;AAED,IAAI,sBAAsB,EAAE,CAAC,GAAG,EAAE,CAAC,KAAK,CAAC,OAAO,CAAC,KAAK,CAAC,CAAC"}
@@ -0,0 +1,6 @@
1
+ export declare function validateComponentName(name: string): {
2
+ valid: boolean;
3
+ suggestion?: string;
4
+ error?: string;
5
+ };
6
+ //# sourceMappingURL=utils.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"utils.d.ts","sourceRoot":"","sources":["../src/utils.ts"],"names":[],"mappings":"AAAA,wBAAgB,qBAAqB,CAAC,IAAI,EAAE,MAAM,GAAG;IAAE,KAAK,EAAE,OAAO,CAAC;IAAC,UAAU,CAAC,EAAE,MAAM,CAAC;IAAC,KAAK,CAAC,EAAE,MAAM,CAAA;CAAE,CAS3G"}