@mohityadav0903/branintelle-mcp 2.0.1 → 2.1.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.
- package/components-data.cjs +157 -0
- package/components-data.js +207 -1091
- package/mcp-server.js +10 -5
- package/package.json +1 -1
- package/real-component-api.cjs.json +1240 -0
|
@@ -0,0 +1,157 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Branintelle UI Library - Component Metadata
|
|
3
|
+
* AUTO-GENERATED FROM SOURCE CODE - DO NOT MANUALLY EDIT
|
|
4
|
+
*
|
|
5
|
+
* This file contains REAL component APIs extracted directly from TypeScript source files.
|
|
6
|
+
* Every @Input(), @Output(), interface, and type is verified against the actual codebase.
|
|
7
|
+
*/
|
|
8
|
+
|
|
9
|
+
const fs = require('fs');
|
|
10
|
+
const path = require('path');
|
|
11
|
+
|
|
12
|
+
// Load raw API data
|
|
13
|
+
const rawApiData = JSON.parse(
|
|
14
|
+
fs.readFileSync(path.join(__dirname, 'real-component-api.cjs.json'), 'utf-8')
|
|
15
|
+
);
|
|
16
|
+
|
|
17
|
+
// Helper to convert kebab-case to PascalCase
|
|
18
|
+
function formatComponentName(kebabName) {
|
|
19
|
+
return kebabName
|
|
20
|
+
.split('-')
|
|
21
|
+
.map(word => word.charAt(0).toUpperCase() + word.slice(1))
|
|
22
|
+
.join('') + 'Component';
|
|
23
|
+
}
|
|
24
|
+
|
|
25
|
+
// Categorize components
|
|
26
|
+
function categorizeComponent(name) {
|
|
27
|
+
if (name.includes('button')) return 'Buttons';
|
|
28
|
+
if (name.includes('dropdown') || name.includes('select')) return 'Dropdowns';
|
|
29
|
+
if (name.includes('table')) return 'Tables';
|
|
30
|
+
if (name.includes('pill') || name === 'status-pill') return 'Status & Pills';
|
|
31
|
+
if (name.includes('progress')) return 'Progress';
|
|
32
|
+
if (name.includes('card')) return 'Cards';
|
|
33
|
+
if (name.includes('stepper') || name.includes('stages')) return 'Stages & Workflows';
|
|
34
|
+
if (name.includes('search') || name.includes('filter') || name === 'checklist') return 'Search & Filters';
|
|
35
|
+
if (name === 'accordion') return 'Accordion & Expandable';
|
|
36
|
+
if (name.includes('tooltip')) return 'Tooltips & Overlays';
|
|
37
|
+
if (name === 'confirm-warning') return 'Dialogs & Modals';
|
|
38
|
+
if (name.includes('breadcrumb') || name.includes('tabs')) return 'Navigation & Breadcrumb';
|
|
39
|
+
if (name.includes('user')) return 'User Management';
|
|
40
|
+
if (name.includes('text') || name.includes('header')) return 'Text & Headers';
|
|
41
|
+
if (name.includes('menu')) return 'Filters & Menus';
|
|
42
|
+
return 'Components';
|
|
43
|
+
}
|
|
44
|
+
|
|
45
|
+
// Generate description
|
|
46
|
+
function generateDescription(name, data) {
|
|
47
|
+
const descriptions = {
|
|
48
|
+
'custom-button': 'Primary action button with loading state and custom styling',
|
|
49
|
+
'approve-button': 'Specialized approve button with loading state',
|
|
50
|
+
'cancel-button': 'Cancel button with configurable styling',
|
|
51
|
+
'back-button': 'Navigation back button',
|
|
52
|
+
'button-image': 'Button with image/icon and text',
|
|
53
|
+
'status-pill': 'Status indicator pill with icon and customizable colors',
|
|
54
|
+
'pill-badge': 'Badge with icon and text',
|
|
55
|
+
'pill-box': 'Simple colored text pill',
|
|
56
|
+
'progress-bar': 'Linear progress bar with numeric values',
|
|
57
|
+
'segmented-progress-bar': 'Multi-segment progress bar with legend',
|
|
58
|
+
'vertical-stepper': 'Vertical step indicator for multi-step workflows',
|
|
59
|
+
'custom-breadcrumb': 'Breadcrumb navigation component',
|
|
60
|
+
'title-header-subtext': 'Header with title, description, and optional pill',
|
|
61
|
+
'help-text': 'Help text component',
|
|
62
|
+
'header-tabs': 'Tabbed navigation with status icons and counts',
|
|
63
|
+
'search-bar': 'Search input with clear functionality',
|
|
64
|
+
'checklist': 'Checkbox list with search',
|
|
65
|
+
'horizontal-card': 'Horizontal card layout with multiple data fields',
|
|
66
|
+
'info-action-card': 'Action card with image, title, and description',
|
|
67
|
+
'progress-display-card': 'Card displaying progress information',
|
|
68
|
+
'profile-image-list': 'List of user profile images with overflow indicator',
|
|
69
|
+
'single-select-dropdown': 'Single selection dropdown',
|
|
70
|
+
'multi-select-dropdown': 'Multiple selection dropdown with chips',
|
|
71
|
+
'dropdown-with-status': 'Dropdown with status indicators',
|
|
72
|
+
'multiline-option-dropdown': 'Advanced dropdown with multi-line options and search',
|
|
73
|
+
'expandable-menu-dropdown': 'Collapsible menu with icons',
|
|
74
|
+
'custom-tooltip': 'Custom tooltip with numeric values',
|
|
75
|
+
'confirm-warning': 'Confirmation dialog with customizable buttons',
|
|
76
|
+
'vertical-stages': 'Vertical workflow stages with user assignment',
|
|
77
|
+
'user-selection': 'User selection component with search and load more',
|
|
78
|
+
'accordion': 'Accordion menu with submenu items',
|
|
79
|
+
'geo-tag-filter': 'Multi-tab filter with apply/reset functionality',
|
|
80
|
+
'table-action-menu': 'Context menu for table actions',
|
|
81
|
+
'scrollable-data-table': 'Advanced data table with grouping, sorting, search, and infinite scroll',
|
|
82
|
+
'collapsable-table': 'Budget table with collapsible groups and Excel export',
|
|
83
|
+
'collapsable-table-small': 'Compact budget table with collapsible groups'
|
|
84
|
+
};
|
|
85
|
+
return descriptions[name] || `${formatComponentName(name)}`;
|
|
86
|
+
}
|
|
87
|
+
|
|
88
|
+
// Generate usage example
|
|
89
|
+
function generateUsageExample(name, data) {
|
|
90
|
+
const inputs = Object.entries(data.inputs || {}).slice(0, 3); // Show first 3 inputs
|
|
91
|
+
const outputs = Object.entries(data.outputs || {}).slice(0, 2); // Show first 2 outputs
|
|
92
|
+
|
|
93
|
+
const inputBindings = inputs.map(([key, value]) => {
|
|
94
|
+
let exampleValue = value.default || '';
|
|
95
|
+
if (!exampleValue) {
|
|
96
|
+
if (value.type.includes('[]')) exampleValue = '[]';
|
|
97
|
+
else if (value.type === 'boolean') exampleValue = 'false';
|
|
98
|
+
else if (value.type === 'number') exampleValue = '0';
|
|
99
|
+
else if (value.type === 'string') exampleValue = "'example'";
|
|
100
|
+
else exampleValue = '{}';
|
|
101
|
+
}
|
|
102
|
+
return ` [${key}]="${exampleValue}"`;
|
|
103
|
+
}).join('\n');
|
|
104
|
+
|
|
105
|
+
const outputBindings = outputs.map(([key]) => {
|
|
106
|
+
return ` (${key})="on${key.charAt(0).toUpperCase() + key.slice(1)}($event)"`;
|
|
107
|
+
}).join('\n');
|
|
108
|
+
|
|
109
|
+
const allBindings = [inputBindings, outputBindings].filter(Boolean).join('\n');
|
|
110
|
+
|
|
111
|
+
return `<${data.selector}\n${allBindings}>\n</${data.selector}>`;
|
|
112
|
+
}
|
|
113
|
+
|
|
114
|
+
// Helper to format component data
|
|
115
|
+
function formatComponent(name, data) {
|
|
116
|
+
const inputs = Object.entries(data.inputs || {}).map(([key, value]) => ({
|
|
117
|
+
name: key,
|
|
118
|
+
type: value.type,
|
|
119
|
+
required: value.required,
|
|
120
|
+
default: value.default ? value.default.replace(/^'|'$/g, '') : undefined // Remove quotes from defaults
|
|
121
|
+
}));
|
|
122
|
+
|
|
123
|
+
const outputs = Object.entries(data.outputs || {}).map(([key, value]) => ({
|
|
124
|
+
name: key,
|
|
125
|
+
type: value.type
|
|
126
|
+
}));
|
|
127
|
+
|
|
128
|
+
const interfaces = Object.entries(data.interfaces || {}).map(([key, value]) => ({
|
|
129
|
+
name: key,
|
|
130
|
+
definition: value
|
|
131
|
+
}));
|
|
132
|
+
|
|
133
|
+
const types = Object.entries(data.types || {}).map(([key, value]) => ({
|
|
134
|
+
name: key,
|
|
135
|
+
definition: value
|
|
136
|
+
}));
|
|
137
|
+
|
|
138
|
+
return {
|
|
139
|
+
name: formatComponentName(name),
|
|
140
|
+
selector: data.selector,
|
|
141
|
+
inputs,
|
|
142
|
+
outputs,
|
|
143
|
+
interfaces,
|
|
144
|
+
types,
|
|
145
|
+
category: categorizeComponent(name),
|
|
146
|
+
description: generateDescription(name, data),
|
|
147
|
+
usageExample: generateUsageExample(name, data)
|
|
148
|
+
};
|
|
149
|
+
}
|
|
150
|
+
|
|
151
|
+
// Build components object
|
|
152
|
+
const components = {};
|
|
153
|
+
for (const [name, data] of Object.entries(rawApiData)) {
|
|
154
|
+
components[formatComponentName(name)] = formatComponent(name, data);
|
|
155
|
+
}
|
|
156
|
+
|
|
157
|
+
module.exports = components;
|