@deay/mcp 0.0.2 → 0.0.4

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/.npmrc ADDED
@@ -0,0 +1 @@
1
+ //registry.npmjs.org/:_authToken=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
package/README.md ADDED
@@ -0,0 +1,91 @@
1
+ # @deay/mcp - MCP Server for @deay/ui
2
+
3
+ Model Context Protocol (MCP) server that provides AI assistants with comprehensive documentation about @deay/ui components.
4
+
5
+ ## What This Does
6
+
7
+ This MCP server allows AI coding tools (Claude Desktop, Cursor, Windsurf) to:
8
+ - List all available @deay/ui components
9
+ - Get detailed component documentation (props, examples, best practices)
10
+ - Access Figma design specifications
11
+ - Generate accurate code examples
12
+
13
+ ## Installation
14
+
15
+ ### For Development (Local Path)
16
+
17
+ ```json
18
+ {
19
+ "mcpServers": {
20
+ "@deay/mcp": {
21
+ "command": "node",
22
+ "args": ["dist/index.js"],
23
+ "cwd": "/path/to/deay-monorepo/packages/mcp-server"
24
+ }
25
+ }
26
+ }
27
+ ```
28
+
29
+ ### For Production (After npm publish)
30
+
31
+ ```json
32
+ {
33
+ "mcpServers": {
34
+ "@deay/mcp": {
35
+ "command": "npx",
36
+ "args": ["-y", "@deay/mcp"]
37
+ }
38
+ }
39
+ }
40
+ ```
41
+
42
+ ## Usage
43
+
44
+ Once configured, ask your AI assistant:
45
+ - "How do I use the button component?"
46
+ - "Create a form with @deay/ui components"
47
+ - "What are the available sizes for the input component?"
48
+
49
+ ## How It Works
50
+
51
+ 1. **Local Execution**: Runs locally on your machine (no server deployment needed)
52
+ 2. **Stdin/Stdout**: Communicates via stdin/stdout, not HTTP
53
+ 3. **Offline Ready**: All documentation bundled, works offline after download
54
+ 4. **Privacy First**: Source code never leaves your machine
55
+
56
+ ## Available Tools
57
+
58
+ ### `list_components`
59
+ Lists all components in @deay/ui library.
60
+
61
+ ### `get_component_info`
62
+ Get detailed info about a specific component including:
63
+ - Props with types and defaults
64
+ - Usage examples
65
+ - Best practices
66
+ - Figma design specifications
67
+
68
+ ## Development
69
+
70
+ ```bash
71
+ # Build
72
+ npm run build
73
+
74
+ # Watch mode
75
+ npm run dev
76
+
77
+ # Start server
78
+ npm run start
79
+ ```
80
+
81
+ ## Contributing
82
+
83
+ When adding new components to @deay/ui:
84
+ 1. Update `src/registry.ts` with component documentation
85
+ 2. Rebuild: `npm run build`
86
+ 3. Test: `node test-mcp.js` (if available)
87
+ 4. Republish (if needed): `npm publish`
88
+
89
+ ## License
90
+
91
+ MIT
package/index.d.ts ADDED
@@ -0,0 +1,12 @@
1
+ #!/usr/bin/env node
2
+ /**
3
+ * @deay/mcp - MCP Server for @deay/ui Component Library
4
+ *
5
+ * This server provides AI assistants with comprehensive documentation
6
+ * about @deay/ui components following Figma design specifications.
7
+ *
8
+ * Run locally: bun run dev:mcp
9
+ * Or after npm publish: npx @deay/mcp
10
+ */
11
+ export {};
12
+ //# sourceMappingURL=index.d.ts.map
package/index.d.ts.map ADDED
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":";AACA;;;;;;;;GAQG"}
package/index.js ADDED
@@ -0,0 +1,134 @@
1
+ #!/usr/bin/env node
2
+ /**
3
+ * @deay/mcp - MCP Server for @deay/ui Component Library
4
+ *
5
+ * This server provides AI assistants with comprehensive documentation
6
+ * about @deay/ui components following Figma design specifications.
7
+ *
8
+ * Run locally: bun run dev:mcp
9
+ * Or after npm publish: npx @deay/mcp
10
+ */
11
+ import { Server } from '@modelcontextprotocol/sdk/server/index.js';
12
+ import { StdioServerTransport } from '@modelcontextprotocol/sdk/server/stdio.js';
13
+ import { CallToolRequestSchema, ListToolsRequestSchema, } from '@modelcontextprotocol/sdk/types.js';
14
+ import { getComponentInfo, listComponents, COMPONENT_REGISTRY } from './registry.js';
15
+ // Create server instance
16
+ const server = new Server({
17
+ name: '@deay/mcp',
18
+ version: '0.0.1',
19
+ }, {
20
+ capabilities: {
21
+ tools: {},
22
+ },
23
+ });
24
+ // List available tools
25
+ server.setRequestHandler(ListToolsRequestSchema, async () => {
26
+ return {
27
+ tools: [
28
+ {
29
+ name: 'get_component_info',
30
+ description: 'Get information about @deay/ui components including props, usage examples, and best practices',
31
+ inputSchema: {
32
+ type: 'object',
33
+ properties: {
34
+ component: {
35
+ type: 'string',
36
+ description: 'Component name (e.g., "button", "input")',
37
+ enum: ['button', 'input'],
38
+ },
39
+ },
40
+ required: ['component'],
41
+ },
42
+ },
43
+ {
44
+ name: 'list_components',
45
+ description: 'List all available components in @deay/ui',
46
+ inputSchema: {
47
+ type: 'object',
48
+ properties: {},
49
+ },
50
+ },
51
+ ],
52
+ };
53
+ });
54
+ // Handle tool calls
55
+ server.setRequestHandler(CallToolRequestSchema, async (request) => {
56
+ const { name, arguments: args } = request.params;
57
+ switch (name) {
58
+ case 'get_component_info': {
59
+ const componentName = args?.['component'];
60
+ const info = getComponentInfo(componentName);
61
+ if (!info) {
62
+ return {
63
+ content: [
64
+ {
65
+ type: 'text',
66
+ text: `Component "${componentName}" not found. Available components: ${listComponents().join(', ')}`,
67
+ },
68
+ ],
69
+ };
70
+ }
71
+ // Format the component info as a detailed markdown response
72
+ let response = `# ${info.name} Component\n\n`;
73
+ response += `**Selector:** \`${info.selector}\`\n\n`;
74
+ response += `**Description:** ${info.description}\n\n`;
75
+ response += `## Props\n\n`;
76
+ info.props.forEach((prop) => {
77
+ response += `### ${prop.name}\n`;
78
+ response += `- **Type:** \`${prop.type}\`\n`;
79
+ response += `- **Required:** ${prop.required ? 'Yes' : 'No'}\n`;
80
+ response += `- **Default:** \`${prop.default}\`\n`;
81
+ response += `- **Description:** ${prop.description}\n\n`;
82
+ });
83
+ response += `## Usage Examples\n\n`;
84
+ info.examples.forEach((example) => {
85
+ response += `### ${example.title}\n`;
86
+ response += `${example.description}\n\n`;
87
+ response += `\`\`\`html\n${example.code}\n\`\`\`\n\n`;
88
+ });
89
+ response += `## Best Practices\n\n`;
90
+ info.bestPractices.forEach((practice, index) => {
91
+ response += `${index + 1}. ${practice}\n`;
92
+ });
93
+ return {
94
+ content: [
95
+ {
96
+ type: 'text',
97
+ text: response,
98
+ },
99
+ ],
100
+ };
101
+ }
102
+ case 'list_components': {
103
+ const components = listComponents();
104
+ let response = '# Available Components in @deay/ui\n\n';
105
+ components.forEach((name) => {
106
+ const info = COMPONENT_REGISTRY[name];
107
+ response += `## ${info.name}\n`;
108
+ response += `- **Selector:** \`${info.selector}\`\n`;
109
+ response += `- **Description:** ${info.description}\n\n`;
110
+ });
111
+ return {
112
+ content: [
113
+ {
114
+ type: 'text',
115
+ text: response,
116
+ },
117
+ ],
118
+ };
119
+ }
120
+ default:
121
+ throw new Error(`Unknown tool: ${name}`);
122
+ }
123
+ });
124
+ // Start server
125
+ async function main() {
126
+ const transport = new StdioServerTransport();
127
+ await server.connect(transport);
128
+ console.error('@deay/mcp server running on stdio');
129
+ }
130
+ main().catch((error) => {
131
+ console.error('Server error:', error);
132
+ process.exit(1);
133
+ });
134
+ //# sourceMappingURL=index.js.map
package/index.js.map ADDED
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":";AACA;;;;;;;;GAQG;AAEH,OAAO,EAAE,MAAM,EAAE,MAAM,2CAA2C,CAAC;AACnE,OAAO,EAAE,oBAAoB,EAAE,MAAM,2CAA2C,CAAC;AACjF,OAAO,EACL,qBAAqB,EACrB,sBAAsB,GACvB,MAAM,oCAAoC,CAAC;AAC5C,OAAO,EAAE,gBAAgB,EAAE,cAAc,EAAE,kBAAkB,EAAE,MAAM,eAAe,CAAC;AAErF,yBAAyB;AACzB,MAAM,MAAM,GAAG,IAAI,MAAM,CACvB;IACE,IAAI,EAAE,WAAW;IACjB,OAAO,EAAE,OAAO;CACjB,EACD;IACE,YAAY,EAAE;QACZ,KAAK,EAAE,EAAE;KACV;CACF,CACF,CAAC;AAEF,uBA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QAED,KAAK,iBAAiB,CAAC,CAAC,CAAC;YACvB,MAAM,UAAU,GAAG,cAAc,EAAE,CAAC;YACpC,IAAI,QAAQ,GAAG,wCAAwC,CAAC;YAExD,UAAU,CAAC,OAAO,CAAC,CAAC,IAAI,EAAE,EAAE;gBAC1B,MAAM,IAAI,GAAG,kBAAkB,CAAC,IAAI,CAAC,CAAC;gBACtC,QAAQ,IAAI,MAAM,IAAI,CAAC,IAAI,IAAI,CAAC;gBAChC,QAAQ,IAAI,qBAAqB,IAAI,CAAC,QAAQ,MAAM,CAAC;gBACrD,QAAQ,IAAI,sBAAsB,IAAI,CAAC,WAAW,MAAM,CAAC;YAC3D,CAAC,CAAC,CAAC;YAEH,OAAO;gBACL,OAAO,EAAE;oBACP;wBACE,IAAI,EAAE,MAAM;wBACZ,IAAI,EAAE,QAAQ;qBACf;iBACF;aACF,CAAC;QACJ,CAAC;QAED;YACE,MAAM,IAAI,KAAK,CAAC,iBAAiB,IAAI,EAAE,CAAC,CAAC;IAC7C,CAAC;AACH,CAAC,CAAC,CAAC;AAEH,eAAe;AACf,KAAK,UAAU,IAAI;IACjB,MAAM,SAAS,GAAG,IAAI,oBAAoB,EAAE,CAAC;IAC7C,MAAM,MAAM,CAAC,OAAO,CAAC,SAAS,CAAC,CAAC;IAChC,OAAO,CAAC,KAAK,CAAC,mCAAmC,CAAC,CAAC;AACrD,CAAC;AAED,IAAI,EAAE,CAAC,KAAK,CAAC,CAAC,KAAK,EAAE,EAAE;IACrB,OAAO,CAAC,KAAK,CAAC,eAAe,EAAE,KAAK,CAAC,CAAC;IACtC,OAAO,CAAC,IAAI,CAAC,CAAC,CAAC,CAAC;AAClB,CAAC,CAAC,CAAC"}
package/package.json CHANGED
@@ -1,24 +1,19 @@
1
1
  {
2
2
  "name": "@deay/mcp",
3
- "version": "0.0.2",
3
+ "version": "0.0.4",
4
4
  "type": "module",
5
5
  "description": "MCP server for @deay/ui component library with Figma design specifications",
6
6
  "author": "Your Name",
7
7
  "license": "MIT",
8
8
  "bin": {
9
- "deay-mcp": "./dist/index.js"
9
+ "deay-mcp": "./index.js"
10
10
  },
11
11
  "files": [
12
- "dist/",
12
+ "**/*",
13
13
  "README.md"
14
14
  ],
15
15
  "dependencies": {
16
- "@modelcontextprotocol/sdk": "^0.6.0",
17
- "zod": "^3.23.0"
18
- },
19
- "scripts": {
20
- "build": "tsc",
21
- "start": "node dist/index.js",
22
- "dev": "tsc --watch"
16
+ "@modelcontextprotocol/sdk": "0.6.1",
17
+ "zod": "3.25.76"
23
18
  }
24
- }
19
+ }
package/registry.d.ts ADDED
@@ -0,0 +1,41 @@
1
+ /**
2
+ * Component Registry for @dai/ui
3
+ *
4
+ * This registry contains comprehensive documentation about all components
5
+ * in the @dai/ui library. It's used by the MCP server to provide AI assistants
6
+ * with accurate information about component usage, props, and best practices.
7
+ */
8
+ export interface ComponentProp {
9
+ name: string;
10
+ type: string;
11
+ required: boolean;
12
+ default: string | null;
13
+ description: string;
14
+ }
15
+ export interface ComponentExample {
16
+ title: string;
17
+ description: string;
18
+ code: string;
19
+ }
20
+ export interface ComponentInfo {
21
+ name: string;
22
+ selector: string;
23
+ description: string;
24
+ props: ComponentProp[];
25
+ examples: ComponentExample[];
26
+ bestPractices: string[];
27
+ }
28
+ export declare const COMPONENT_REGISTRY: Record<string, ComponentInfo>;
29
+ /**
30
+ * Get component information by name
31
+ */
32
+ export declare function getComponentInfo(name: string): ComponentInfo | undefined;
33
+ /**
34
+ * List all available components
35
+ */
36
+ export declare function listComponents(): string[];
37
+ /**
38
+ * Get component examples
39
+ */
40
+ export declare function getComponentExamples(name: string): ComponentExample[];
41
+ //# sourceMappingURL=registry.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"registry.d.ts","sourceRoot":"","sources":["../src/registry.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;AAEH,MAAM,WAAW,aAAa;IAC5B,IAAI,EAAE,MAAM,CAAC;IACb,IAAI,EAAE,MAAM,CAAC;IACb,QAAQ,EAAE,OAAO,CAAC;IAClB,OAAO,EAAE,MAAM,GAAG,IAAI,CAAC;IACvB,WAAW,EAAE,MAAM,CAAC;CACrB;AAED,MAAM,WAAW,gBAAgB;IAC/B,KAAK,EAAE,MAAM,CAAC;IACd,WAAW,EAAE,MAAM,CAAC;IACpB,IAAI,EAAE,MAAM,CAAC;CACd;AAED,MAAM,WAAW,aAAa;IAC5B,IAAI,EAAE,MAAM,CAAC;IACb,QAAQ,EAAE,MAAM,CAAC;IACjB,WAAW,EAAE,MAAM,CAAC;IACpB,KAAK,EAAE,aAAa,EAAE,CAAC;IACvB,QAAQ,EAAE,gBAAgB,EAAE,CAAC;IAC7B,aAAa,EAAE,MAAM,EAAE,CAAC;CACzB;AAED,eAAO,MAAM,kBAAkB,EAAE,MAAM,CAAC,MAAM,EAAE,aAAa,CAgO5D,CAAC;AAEF;;GAEG;AACH,wBAAgB,gBAAgB,CAAC,IAAI,EAAE,MAAM,GAAG,aAAa,GAAG,SAAS,CAExE;AAED;;GAEG;AACH,wBAAgB,cAAc,IAAI,MAAM,EAAE,CAEzC;AAED;;GAEG;AACH,wBAAgB,oBAAoB,CAAC,IAAI,EAAE,MAAM,GAAG,gBAAgB,EAAE,CAGrE"}
package/registry.js ADDED
@@ -0,0 +1,252 @@
1
+ /**
2
+ * Component Registry for @dai/ui
3
+ *
4
+ * This registry contains comprehensive documentation about all components
5
+ * in the @dai/ui library. It's used by the MCP server to provide AI assistants
6
+ * with accurate information about component usage, props, and best practices.
7
+ */
8
+ export const COMPONENT_REGISTRY = {
9
+ button: {
10
+ name: 'Button',
11
+ selector: 'dai-button',
12
+ description: 'Primary button component following Figma design specifications. Features three sizes (sm, md, lg), loading state with spinner, and full accessibility support. Built with Angular 19+ signal inputs.',
13
+ props: [
14
+ {
15
+ name: 'variant',
16
+ type: "'primary'",
17
+ required: false,
18
+ default: "'primary'",
19
+ description: 'Visual style variant (only primary available per Figma design)',
20
+ },
21
+ {
22
+ name: 'size',
23
+ type: "'sm' | 'md' | 'lg'",
24
+ required: false,
25
+ default: "'md'",
26
+ description: 'Size: Small (24px), Medium (32px), or Large (40px)',
27
+ },
28
+ {
29
+ name: 'disabled',
30
+ type: 'boolean',
31
+ required: false,
32
+ default: 'false',
33
+ description: 'Disables the button with Primary/400 color',
34
+ },
35
+ {
36
+ name: 'loading',
37
+ type: 'boolean',
38
+ required: false,
39
+ default: 'false',
40
+ description: 'Shows spinner and disables button with Primary/500 color',
41
+ },
42
+ ],
43
+ examples: [
44
+ {
45
+ title: 'Primary Button - Medium',
46
+ description: 'Standard medium-sized primary button',
47
+ code: `<dai-button size="md">
48
+ Button
49
+ </dai-button>`,
50
+ },
51
+ {
52
+ title: 'Button Sizes',
53
+ description: 'All three size variants',
54
+ code: `<dai-button size="sm">Button</dai-button>
55
+ <dai-button size="md">Button</dai-button>
56
+ <dai-button size="lg">Button</dai-button>`,
57
+ },
58
+ {
59
+ title: 'Loading State',
60
+ description: 'Button with loading spinner',
61
+ code: `<dai-button size="md" [loading]="true">
62
+ Button
63
+ </dai-button>`,
64
+ },
65
+ {
66
+ title: 'Disabled State',
67
+ description: 'Disabled button',
68
+ code: `<dai-button size="md" [disabled]="true">
69
+ Button
70
+ </dai-button>`,
71
+ },
72
+ ],
73
+ bestPractices: [
74
+ 'Use size="sm" for dense UI areas and tables (height: 24px, font: 12px)',
75
+ 'Use size="md" for standard buttons (height: 32px, font: 14px)',
76
+ 'Use size="lg" for prominent CTAs (height: 40px, font: 16px)',
77
+ 'Loading state automatically disables the button and shows spinner',
78
+ 'Disabled state uses Primary/400 color (#9098FA)',
79
+ 'Hover state uses Primary/600 color (#5164F7)',
80
+ 'Focus state shows Primary/800 border (#112EAC)',
81
+ 'Font: Poppins, weight 400',
82
+ 'Border radius: 50px (fully rounded)',
83
+ 'Button is zoneless-ready and uses OnPush change detection',
84
+ ],
85
+ },
86
+ input: {
87
+ name: 'Input',
88
+ selector: 'dai-input',
89
+ description: 'Input component following Figma design specifications. Features three sizes (sm, md, lg), error states, disabled states, and Angular Forms integration via ControlValueAccessor. Uses Poppins font family.',
90
+ props: [
91
+ {
92
+ name: 'label',
93
+ type: 'string',
94
+ required: false,
95
+ default: "''",
96
+ description: 'Label text displayed above the input (16px Poppins)',
97
+ },
98
+ {
99
+ name: 'placeholder',
100
+ type: 'string',
101
+ required: false,
102
+ default: "'Text'",
103
+ description: 'Placeholder text shown when empty',
104
+ },
105
+ {
106
+ name: 'type',
107
+ type: "'text' | 'password' | 'email'",
108
+ required: false,
109
+ default: "'text'",
110
+ description: 'HTML input type',
111
+ },
112
+ {
113
+ name: 'size',
114
+ type: "'sm' | 'md' | 'lg'",
115
+ required: false,
116
+ default: "'md'",
117
+ description: 'Size: Small, Medium (44px height), or Large (50px height)',
118
+ },
119
+ {
120
+ name: 'disabled',
121
+ type: 'boolean',
122
+ required: false,
123
+ default: 'false',
124
+ description: 'Disables with gray background (#DFDFDF)',
125
+ },
126
+ {
127
+ name: 'errorMessage',
128
+ type: 'string',
129
+ required: false,
130
+ default: "''",
131
+ description: 'Error message triggers error styling with red border',
132
+ },
133
+ {
134
+ name: 'value',
135
+ type: 'string (model)',
136
+ required: false,
137
+ default: "''",
138
+ description: 'Two-way bound value (Angular 19+ model)',
139
+ },
140
+ ],
141
+ examples: [
142
+ {
143
+ title: 'Small Input',
144
+ description: 'Compact input for tight spaces',
145
+ code: `<dai-input
146
+ label="Label"
147
+ size="sm"
148
+ placeholder="Text"
149
+ />`,
150
+ },
151
+ {
152
+ title: 'Medium Input (Default)',
153
+ description: 'Standard input size',
154
+ code: `<dai-input
155
+ label="Label"
156
+ size="md"
157
+ placeholder="Text"
158
+ />`,
159
+ },
160
+ {
161
+ title: 'Large Input',
162
+ description: 'Large input for prominence',
163
+ code: `<dai-input
164
+ label="Label"
165
+ size="lg"
166
+ placeholder="Text"
167
+ />`,
168
+ },
169
+ {
170
+ title: 'Error State',
171
+ description: 'Input with validation error',
172
+ code: `<dai-input
173
+ label="Label"
174
+ size="md"
175
+ placeholder="Text"
176
+ [errorMessage]="'Error Message'"
177
+ />`,
178
+ },
179
+ {
180
+ title: 'Disabled State',
181
+ description: 'Disabled input',
182
+ code: `<dai-input
183
+ label="Label"
184
+ size="md"
185
+ placeholder="Text"
186
+ [disabled]="true"
187
+ />`,
188
+ },
189
+ {
190
+ title: 'Two-way Binding',
191
+ description: 'Using Angular 19+ model binding',
192
+ code: `<dai-input
193
+ label="Email"
194
+ size="md"
195
+ placeholder="Text"
196
+ [(value)]="email"
197
+ />`,
198
+ },
199
+ {
200
+ title: 'Reactive Forms',
201
+ description: 'Integration with Angular reactive forms',
202
+ code: `<dai-input
203
+ label="Email"
204
+ size="md"
205
+ [formControl]="emailControl"
206
+ [errorMessage]="emailControl.errors ? 'Error Message' : ''"
207
+ />`,
208
+ },
209
+ ],
210
+ bestPractices: [
211
+ 'Label: 16px Poppins, weight 400, line-height 1.5em, color #000000',
212
+ 'Input text: 14px Poppins, weight 400, line-height 1.5em',
213
+ 'Placeholder color: #ABA7AF',
214
+ 'Default border: #E5E0EB (1px)',
215
+ 'Focus border sm: #061764 (2px)',
216
+ 'Focus border md/lg: #112EAC (1px)',
217
+ 'Error border: #D51A52 (2px)',
218
+ 'Error text: #D51A52, 14px Poppins',
219
+ 'Disabled background and border: #DFDFDF',
220
+ 'Border radius: 50px (fully rounded)',
221
+ 'Gap between elements: 8px',
222
+ 'Padding sm: 8px 12px',
223
+ 'Padding md: 12px (height: 44px)',
224
+ 'Padding lg: 14px 12px (height: 50px)',
225
+ 'Use size="sm" for compact forms',
226
+ 'Use size="md" for standard forms (default)',
227
+ 'Use size="lg" for prominent inputs',
228
+ 'Always provide labels for accessibility',
229
+ 'Error messages automatically show with ARIA attributes',
230
+ ],
231
+ },
232
+ };
233
+ /**
234
+ * Get component information by name
235
+ */
236
+ export function getComponentInfo(name) {
237
+ return COMPONENT_REGISTRY[name.toLowerCase()];
238
+ }
239
+ /**
240
+ * List all available components
241
+ */
242
+ export function listComponents() {
243
+ return Object.keys(COMPONENT_REGISTRY);
244
+ }
245
+ /**
246
+ * Get component examples
247
+ */
248
+ export function getComponentExamples(name) {
249
+ const info = getComponentInfo(name);
250
+ return info?.examples || [];
251
+ }
252
+ //# sourceMappingURL=registry.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"registry.js","sourceRoot":"","sources":["../src/registry.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;AAyBH,MAAM,CAAC,MAAM,kBAAkB,GAAkC;IAC/D,MAAM,EAAE;QACN,IAAI,EAAE,QAAQ;QACd,QAAQ,EAAE,YAAY;QACtB,WAAW,EAAE,sMAAsM;QACnN,KAAK,EAAE;YACL;gBACE,IAAI,EAAE,SAAS;gBACf,IAAI,EAAE,WAAW;gBACjB,QAAQ,EAAE,KAAK;gBACf,OAAO,EAAE,WAAW;gBACpB,WAAW,EAAE,gEAAgE;aAC9E;YACD;gBACE,IAAI,EAAE,MAAM;gBACZ,IAAI,EAAE,oBAAoB;gBAC1B,QAAQ,EAAE,KAAK;gBACf,OAAO,EAAE,MAAM;gBACf,WAAW,EAAE,oDAAoD;aAClE;YACD;gBACE,IAAI,EAAE,UAAU;gBAChB,IAAI,EAAE,SAAS;gBACf,QAAQ,EAAE,KAAK;gBACf,OAAO,EAAE,OAAO;gBAChB,WAAW,EAAE,4CAA4C;aAC1D;YACD;gBACE,IAAI,EAAE,SAAS;gBACf,IAAI,EAAE,SAAS;gBACf,QAAQ,EAAE,KAAK;gBACf,OAAO,EAAE,OAAO;gBAChB,WAAW,EAAE,0DAA0D;aACxE;SACF;QACD,QAAQ,EAAE;YACR;gBACE,KAAK,EAAE,yBAAyB;gBAChC,WAAW,EAAE,sCAAsC;gBACnD,IAAI,EAAE;;cAEA;aACP;YACD;gBACE,KAAK,EAAE,cAAc;gBACrB,WAAW,EAAE,yBAAyB;gBACtC,IAAI,EAAE;;0CAE4B;aACnC;YACD;gBACE,KAAK,EAAE,eAAe;gBACtB,WAAW,EAAE,6BAA6B;gBAC1C,IAAI,EAAE;;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