@corva/ui 3.54.0-20 → 3.54.0-21
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/mcp-server/server.mjs +58 -61
- package/package.json +1 -1
package/mcp-server/server.mjs
CHANGED
|
@@ -227,7 +227,7 @@ const validateDsn = (dsn) => {
|
|
|
227
227
|
|
|
228
228
|
const MCP_SERVER_VERSION = '1.1.0';
|
|
229
229
|
|
|
230
|
-
var version = "3.54.0-
|
|
230
|
+
var version = "3.54.0-21";
|
|
231
231
|
|
|
232
232
|
const CORVA_UI_VERSION = version;
|
|
233
233
|
|
|
@@ -94326,7 +94326,9 @@ const findSimilarComponents = (name, allComponents) => {
|
|
|
94326
94326
|
const componentDocsToolName = 'get_component_docs';
|
|
94327
94327
|
const componentDocsToolTitle = 'Get Component Docs';
|
|
94328
94328
|
const componentDocsToolDescription = `Get detailed documentation for a specific @corva/ui component.
|
|
94329
|
-
Returns props, examples, description, and links
|
|
94329
|
+
Returns props, examples, description, and links.
|
|
94330
|
+
|
|
94331
|
+
Usage: get_component_docs({ name: "Button" })`;
|
|
94330
94332
|
const componentDocsToolSchema = {
|
|
94331
94333
|
name: z.string().describe("Component name (e.g., 'Button', 'Tooltip', 'DatePicker')"),
|
|
94332
94334
|
category: z
|
|
@@ -94384,7 +94386,9 @@ const handleGetComponentDocs = (args) => {
|
|
|
94384
94386
|
|
|
94385
94387
|
**Category:** ${component.category}
|
|
94386
94388
|
**Import:** \`import { ${component.name} } from '${component.importPath}';\`
|
|
94387
|
-
${component.isExperimental
|
|
94389
|
+
${component.isExperimental
|
|
94390
|
+
? '**Experimental** - Recently added component, fully functional and safe to use.\n'
|
|
94391
|
+
: ''}${component.isDeprecated ? '❌ **Deprecated**\n' : ''}
|
|
94388
94392
|
|
|
94389
94393
|
${component.description}
|
|
94390
94394
|
|
|
@@ -94404,7 +94408,9 @@ ${examplesSection}
|
|
|
94404
94408
|
const hookDocsToolName = 'get_hook_docs';
|
|
94405
94409
|
const hookDocsToolTitle = 'Get Hook Docs';
|
|
94406
94410
|
const hookDocsToolDescription = `Get documentation for a @corva/ui hook.
|
|
94407
|
-
Returns parameters, return type, and usage examples
|
|
94411
|
+
Returns parameters, return type, and usage examples.
|
|
94412
|
+
|
|
94413
|
+
Usage: get_hook_docs({ name: "useSubscriptions" })`;
|
|
94408
94414
|
const hookDocsToolSchema = {
|
|
94409
94415
|
name: z.string().describe("Hook name (e.g., 'useSubscriptions', 'useOutsideClick')"),
|
|
94410
94416
|
};
|
|
@@ -94440,7 +94446,9 @@ Returns color palette (dark/light), CSS variables, SCSS variables,
|
|
|
94440
94446
|
SCSS functions/mixins, spacing, typography, transitions, z-index tokens, and usage examples.
|
|
94441
94447
|
|
|
94442
94448
|
Available sections: palette, css-variables, scss-variables, scss-functions,
|
|
94443
|
-
scss-mixins, spacing, typography, transition, z-index, usage, all
|
|
94449
|
+
scss-mixins, spacing, typography, transition, z-index, usage, all.
|
|
94450
|
+
|
|
94451
|
+
Usage: get_theme_docs({ section: "palette" })`;
|
|
94444
94452
|
const SECTIONS = [
|
|
94445
94453
|
'palette',
|
|
94446
94454
|
'css-variables',
|
|
@@ -94479,54 +94487,41 @@ const buildPaletteSection = (includeLight = false) => {
|
|
|
94479
94487
|
}
|
|
94480
94488
|
return text;
|
|
94481
94489
|
};
|
|
94482
|
-
const buildCssVariablesSection = () => h2('CSS Variables') +
|
|
94483
|
-
|
|
94484
|
-
|
|
94485
|
-
|
|
94486
|
-
const
|
|
94487
|
-
|
|
94488
|
-
"Import via `@import '@corva/ui/styles/common'`.\n\n" +
|
|
94489
|
-
formatScssVariables(theme.scssVariables);
|
|
94490
|
-
const buildScssFunctionsSection = () => h2('SCSS Functions') +
|
|
94491
|
-
'Available after importing `@corva/ui/styles/common`.\n\n' +
|
|
94492
|
-
formatScssFunctions(theme.scssFunctions);
|
|
94493
|
-
const buildScssMixinsSection = () => h2('SCSS Mixins') +
|
|
94494
|
-
'Available after importing `@corva/ui/styles/common`.\n\n' +
|
|
94495
|
-
formatScssMixins(theme.scssMixins);
|
|
94490
|
+
const buildCssVariablesSection = () => `${h2('CSS Variables')}All CSS custom properties available via theme data attributes ` +
|
|
94491
|
+
`(\`[data-corva-theme-dark]\` / \`[data-corva-theme-light]\`).\n\n${formatCssVariables(theme.cssVariables)}`;
|
|
94492
|
+
const buildScssVariablesSection = () => `${h2('SCSS Variables')}SCSS variables that map to CSS custom properties. ` +
|
|
94493
|
+
`Import via \`@import '@corva/ui/styles/common'\`.\n\n${formatScssVariables(theme.scssVariables)}`;
|
|
94494
|
+
const buildScssFunctionsSection = () => `${h2('SCSS Functions')}Available after importing \`@corva/ui/styles/common\`.\n\n${formatScssFunctions(theme.scssFunctions)}`;
|
|
94495
|
+
const buildScssMixinsSection = () => `${h2('SCSS Mixins')}Available after importing \`@corva/ui/styles/common\`.\n\n${formatScssMixins(theme.scssMixins)}`;
|
|
94496
94496
|
const buildSpacingSection = () => h2('Spacing') + formatSpacing(theme.spacing);
|
|
94497
94497
|
const buildTypographySection = () => h2('Typography') + formatTypography(theme.typography);
|
|
94498
94498
|
const buildZIndexSection = () => h2('Z-Index') + formatZIndex(theme.zIndex);
|
|
94499
94499
|
const buildTransitionSection = () => h2('Transitions') + formatTransition(theme.transition);
|
|
94500
94500
|
const buildUsageSection = () => {
|
|
94501
94501
|
const sections = [
|
|
94502
|
-
h2('Usage Guide')
|
|
94503
|
-
|
|
94504
|
-
|
|
94505
|
-
|
|
94506
|
-
|
|
94507
|
-
|
|
94508
|
-
|
|
94509
|
-
|
|
94510
|
-
|
|
94511
|
-
|
|
94512
|
-
|
|
94513
|
-
|
|
94514
|
-
|
|
94515
|
-
|
|
94516
|
-
|
|
94517
|
-
|
|
94518
|
-
|
|
94519
|
-
|
|
94520
|
-
|
|
94521
|
-
|
|
94522
|
-
|
|
94523
|
-
|
|
94524
|
-
|
|
94525
|
-
'### 5. SCSS Mixins\n' +
|
|
94526
|
-
codeBlock('.scrollable-container {\n' +
|
|
94527
|
-
' --corvaui-background: var(--palette-background-b-4);\n' +
|
|
94528
|
-
' @include verticalFadePseudoElements(2);\n' +
|
|
94529
|
-
'}', 'scss'),
|
|
94502
|
+
`${h2('Usage Guide')}### 1. JSS (Material-UI makeStyles)\n${codeBlock("import { theme } from '@corva/ui/config';\n\n" +
|
|
94503
|
+
"const primaryColor = theme.palette.primary.main; // '#03BCD4'\n" +
|
|
94504
|
+
'const bgColor = theme.palette.background.b4;', 'tsx')}`,
|
|
94505
|
+
`### 2. CSS Variables\n${codeBlock('.my-element {\n' +
|
|
94506
|
+
' color: var(--palette-primary-main);\n' +
|
|
94507
|
+
' background: var(--palette-background-b-4);\n' +
|
|
94508
|
+
'}', 'css')}`,
|
|
94509
|
+
`### 3. SCSS Variables\n${codeBlock("@import '@corva/ui/styles/common';\n\n" +
|
|
94510
|
+
'.my-element {\n' +
|
|
94511
|
+
' color: $palette_primary_main;\n' +
|
|
94512
|
+
' background: $palette_b4;\n' +
|
|
94513
|
+
'}', 'scss')}`,
|
|
94514
|
+
`### 4. SCSS Functions\n${codeBlock('// Alpha transparency\n' +
|
|
94515
|
+
'background: colorAlpha($palette_primary_main, 0.5);\n\n' +
|
|
94516
|
+
'// Spacing (base unit: 8px)\n' +
|
|
94517
|
+
'padding: spacing(2); // 16px\n' +
|
|
94518
|
+
'margin: spacing(1, 2); // 8px 16px\n\n' +
|
|
94519
|
+
'// Transitions\n' +
|
|
94520
|
+
'transition: transition(opacity, transform);', 'scss')}`,
|
|
94521
|
+
`### 5. SCSS Mixins\n${codeBlock('.scrollable-container {\n' +
|
|
94522
|
+
' --corvaui-background: var(--palette-background-b-4);\n' +
|
|
94523
|
+
' @include verticalFadePseudoElements(2);\n' +
|
|
94524
|
+
'}', 'scss')}`,
|
|
94530
94525
|
];
|
|
94531
94526
|
return sections.join('\n\n');
|
|
94532
94527
|
};
|
|
@@ -94542,9 +94537,7 @@ const buildAllSection = () => {
|
|
|
94542
94537
|
const availableSections = SECTIONS.filter(s => s !== 'all' && s !== 'variables')
|
|
94543
94538
|
.map(s => `\`${s}\``)
|
|
94544
94539
|
.join(', ');
|
|
94545
|
-
const tokenSummary = h2('Token Summary') +
|
|
94546
|
-
counts.map(c => `- ${c}`).join('\n') +
|
|
94547
|
-
`\n\nUse \`get_theme_docs\` with a specific section for full details: ${availableSections}`;
|
|
94540
|
+
const tokenSummary = `${h2('Token Summary') + counts.map(c => `- ${c}`).join('\n')}\n\nUse \`get_theme_docs\` with a specific section for full details: ${availableSections}`;
|
|
94548
94541
|
return join(h1('@corva/ui Theme'), buildPaletteSection(false), tokenSummary, buildSpacingSection(), buildTypographySection(), buildTransitionSection(), buildZIndexSection(), buildUsageSection());
|
|
94549
94542
|
};
|
|
94550
94543
|
const handleGetThemeDocs = (args) => {
|
|
@@ -94594,7 +94587,9 @@ const handleGetThemeDocs = (args) => {
|
|
|
94594
94587
|
const listToolName = 'list_corva_ui';
|
|
94595
94588
|
const listToolTitle = 'List @corva/ui';
|
|
94596
94589
|
const listToolDescription = `List all available items in @corva/ui by category.
|
|
94597
|
-
Useful to see what's available before searching
|
|
94590
|
+
Useful to see what's available before searching.
|
|
94591
|
+
|
|
94592
|
+
Usage: list_corva_ui({ type: "components-v2" })`;
|
|
94598
94593
|
const listToolSchema = {
|
|
94599
94594
|
type: z
|
|
94600
94595
|
.enum([
|
|
@@ -94720,15 +94715,15 @@ const handleList = (args) => {
|
|
|
94720
94715
|
const constantsDocsToolName = 'get_constants_docs';
|
|
94721
94716
|
const constantsDocsToolTitle = 'Get Constants Docs';
|
|
94722
94717
|
const constantsDocsToolDescription = `Get documentation for @corva/ui constants.
|
|
94723
|
-
Returns constant values, namespaces, and usage info
|
|
94718
|
+
Returns constant values, namespaces, and usage info.
|
|
94719
|
+
|
|
94720
|
+
Usage: get_constants_docs({ name: "ASSET_TYPES" })`;
|
|
94724
94721
|
const constantsDocsToolSchema = {
|
|
94725
|
-
|
|
94726
|
-
.string()
|
|
94727
|
-
.describe("Namespace (e.g., 'drillstring', 'alerts') or constant name (e.g., 'ASSET_TYPES')"),
|
|
94722
|
+
name: z.string().describe("Namespace or constant name (e.g., 'drillstring', 'ASSET_TYPES')"),
|
|
94728
94723
|
};
|
|
94729
94724
|
const handleGetConstantsDocs = (args) => {
|
|
94730
|
-
const {
|
|
94731
|
-
const namespaceLower =
|
|
94725
|
+
const { name } = args;
|
|
94726
|
+
const namespaceLower = name.toLowerCase();
|
|
94732
94727
|
// Find matching constants by namespace or name
|
|
94733
94728
|
const matches = constants.filter(c => c.namespace?.toLowerCase() === namespaceLower ||
|
|
94734
94729
|
c.name.toLowerCase() === namespaceLower ||
|
|
@@ -94747,7 +94742,7 @@ const handleGetConstantsDocs = (args) => {
|
|
|
94747
94742
|
'Metrics config may live in utility modules. Try search_corva_ui with type "util" and query "metrics".';
|
|
94748
94743
|
}
|
|
94749
94744
|
return {
|
|
94750
|
-
response: createToolResponse(`No constants found for "${
|
|
94745
|
+
response: createToolResponse(`No constants found for "${name}". ${suggestion}`),
|
|
94751
94746
|
found: false,
|
|
94752
94747
|
matchCount: 0,
|
|
94753
94748
|
};
|
|
@@ -94780,8 +94775,8 @@ ${c.value !== '[namespace]' ? `**Value:** \`${JSON.stringify(c.value, null, 2)}\
|
|
|
94780
94775
|
.map(c => `- **${c.name}**: ${c.description}\n Import: \`${c.importPath}\``)
|
|
94781
94776
|
.join('\n\n');
|
|
94782
94777
|
const title = exactNamespaceMatches.length > 0
|
|
94783
|
-
? `Constants in "${
|
|
94784
|
-
: `Constants matching "${
|
|
94778
|
+
? `Constants in "${name}" namespace`
|
|
94779
|
+
: `Constants matching "${name}"`;
|
|
94785
94780
|
return {
|
|
94786
94781
|
response: createToolResponse(`# ${title}\n\n${displayMatches.length} constant(s) found:\n\n${formatted}`),
|
|
94787
94782
|
found: true,
|
|
@@ -94792,7 +94787,9 @@ ${c.value !== '[namespace]' ? `**Value:** \`${JSON.stringify(c.value, null, 2)}\
|
|
|
94792
94787
|
const clientDocsToolName = 'get_client_docs';
|
|
94793
94788
|
const clientDocsToolTitle = 'Get Client Docs';
|
|
94794
94789
|
const clientDocsToolDescription = `Get documentation for @corva/ui API clients.
|
|
94795
|
-
Returns methods, parameters, and API endpoints from Swagger documentation
|
|
94790
|
+
Returns methods, parameters, and API endpoints from Swagger documentation.
|
|
94791
|
+
|
|
94792
|
+
Usage: get_client_docs({ name: "corvaAPI" })`;
|
|
94796
94793
|
const clientDocsToolSchema = {
|
|
94797
94794
|
name: z.string().describe("Client name (e.g., 'corvaAPI', 'socketClient', 'corvaDataAPI')"),
|
|
94798
94795
|
tag: z
|