@progress/kendo-react-mcp 1.6.1-beta.8b4a77bb.0 → 1.6.2-beta.a42c596b.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/dist/index.js +147 -4
- package/package.json +2 -2
package/dist/index.js
CHANGED
|
@@ -492,6 +492,7 @@ function getAccessibilityGuidelines() {
|
|
|
492
492
|
**1. Form Control Labels** (WCAG 1.3.1, 3.3.2, 4.1.2)
|
|
493
493
|
Every input must have an associated label.
|
|
494
494
|
CORRECT: \`<input type="search" aria-label="Search products" placeholder="Search...">\`
|
|
495
|
+
CORRECT: \`<label for="qty">Quantity</label><input type="number" id="qty">\`
|
|
495
496
|
WRONG: \`<span>Email</span><input type="email">\` (no association)
|
|
496
497
|
WRONG: \`<input type="email" placeholder="Email">\` (placeholder as label)
|
|
497
498
|
|
|
@@ -523,20 +524,43 @@ WRONG: "Click here", "Read more", "Learn more" without context
|
|
|
523
524
|
Errors must be identified, associated with inputs, and provide suggestions. Use aria-describedby, aria-invalid="true", and role="alert".
|
|
524
525
|
|
|
525
526
|
**7. Heading Structure** (WCAG 1.3.1, 2.4.6)
|
|
526
|
-
Each page
|
|
527
|
+
Each page must have an \`<h1>\` that describes its content. Use hierarchical, descriptive headings with no skipped levels (h1\u2192h2\u2192h3).
|
|
527
528
|
CORRECT: \`<h1>Dashboard</h1> <h2>Sales</h2> <h3>By Region</h3>\`
|
|
528
529
|
WRONG: No \`<h1>\` on the page, or skipping levels (h1\u2192h3)
|
|
529
530
|
If a heading should look smaller than its semantic level, use CSS: \`<h2 class="text-sm">Subtitle</h2>\`
|
|
530
531
|
|
|
531
532
|
**8. Page Component Landmark Rules** (WCAG 1.3.1, 4.1.2)
|
|
532
533
|
Page components (route components) may be rendered inside a layout that already provides \`<main>\`, \`<header>\`, or \`<footer>\`. Since the layout configuration is unknown, avoid using these landmarks in page components to prevent potential duplication and nesting violations. Use \`<div>\`, \`<section>\`, or \`<article>\` as the top-level wrapper instead.
|
|
534
|
+
- Avoid adding \`<main>\`, \`role="main"\`, \`<header>\`, or \`<footer>\` in page components \u2014 the layout typically provides them. Duplicating them can cause \`landmark-no-duplicate-main\` and \`landmark-main-is-top-level\` violations.
|
|
535
|
+
- Avoid adding \`role="banner"\` or using a semantic \`<header>\` element in page components \u2014 the layout's \`<header>\` already claims the banner landmark. Adding another causes \`landmark-banner-is-top-level\` violations.
|
|
536
|
+
- Avoid adding \`role="contentinfo"\` to elements inside page components \u2014 the contentinfo landmark should be a top-level landmark, not nested inside \`<main>\` or other landmarks. Nesting it can cause \`landmark-contentinfo-is-top-level\` violations.
|
|
537
|
+
- When multiple \`<section>\` or \`<nav>\` elements exist on a page, give each a unique \`aria-label\` to avoid \`landmark-unique\` violations.
|
|
538
|
+
|
|
539
|
+
**9. ARIA Role and Attribute Restrictions** (WCAG 4.1.2)
|
|
540
|
+
Only use ARIA roles that are valid for the given HTML element. Avoid adding \`aria-label\` or \`aria-labelledby\` to elements that do not permit naming.
|
|
541
|
+
- \`<article>\` has an implicit \`article\` role. Do NOT override it with \`role="listitem"\`, \`role="button"\`, \`role="link"\`, or any other role \u2014 none are allowed on \`<article>\`. Use \`<li>\` for list items, \`<button>\` for interactive cards, or \`<a>\` for clickable cards instead.
|
|
542
|
+
- \`<button>\` already has an implicit \`button\` role. Do NOT add \`role="listitem"\` or other incompatible roles.
|
|
543
|
+
- \`<span>\` and \`<div>\` without roles are generic elements. Do NOT add \`aria-label\` to them \u2014 it is a prohibited attribute on elements with no accessible role and can cause \`aria-prohibited-attr\` violations. Instead, use \`role="img"\` + \`aria-label\` for visual indicators, or use visually hidden text.
|
|
544
|
+
- Do NOT add \`aria-label\` to non-interactive \`<div>\` wrappers \u2014 it has no effect and triggers violations.
|
|
545
|
+
- \`aria-pressed\` is only valid on elements with \`role="button"\`, \`role="checkbox"\`, \`role="menuitemcheckbox"\`, \`role="option"\`, \`role="radio"\`, or \`role="switch"\`. Do NOT use \`aria-pressed\` on elements with \`role="listitem"\` or other roles.
|
|
546
|
+
CORRECT: \`<ul role="list"><li class="product-card">...</li></ul>\` (listitem inside list)
|
|
547
|
+
CORRECT: \`<span role="img" aria-label="Status: pending" class="status-dot"></span>\` (role added before aria-label)
|
|
548
|
+
CORRECT: \`<span class="status-dot" aria-hidden="true"></span><span class="visually-hidden">Pending</span>\` (hidden text alternative)
|
|
549
|
+
WRONG: \`<article role="listitem">\` (listitem not allowed on article)
|
|
550
|
+
WRONG: \`<article role="button">\` (button not allowed on article \u2014 use \`<button>\` or \`<div role="button">\`)
|
|
551
|
+
WRONG: \`<span aria-label="pending" class="status-dot"></span>\` (aria-label prohibited on generic span)
|
|
552
|
+
WRONG: \`<div aria-label="Product badges" class="badges"></div>\` (aria-label prohibited on generic div)
|
|
533
553
|
|
|
534
554
|
**Quick Checklist:**
|
|
535
555
|
- **Forms:** Associated labels, aria-required on required fields, autocomplete attributes, aria-describedby for errors, aria-invalid for invalid fields, fieldsets with legends
|
|
536
556
|
- **Buttons/Links:** Accessible names, aria-label for icon buttons, aria-hidden on decorative icons, descriptive link text
|
|
537
557
|
- **Popups/Dialogs:** aria-haspopup, aria-expanded, aria-controls, role="dialog", aria-modal="true", aria-labelledby, focus trap, Escape to close
|
|
538
558
|
- **Images:** alt on all images, descriptive alt for informative, empty alt for decorative, aria-describedby for complex
|
|
539
|
-
- **Structure:** One h1, logical heading hierarchy, avoid \`<main>\`, \`<header>\`,
|
|
559
|
+
- **Structure:** One h1, logical heading hierarchy, avoid \`<main>\`, \`<header>\`, \`<footer>\`, \`role="main"\`, \`role="contentinfo"\`, \`role="banner"\` in page/route components (the layout may already provide them), use \`<section>\` or \`<div>\` as page-level wrappers, unique aria-labels on duplicate landmark types
|
|
560
|
+
- **ARIA Rules:** Avoid adding \`aria-label\` to generic \`<span>\`/\`<div>\` without a role, avoid using \`role="listitem"\` or \`role="button"\` on \`<article>\` \u2014 use \`<li>\` for list items, add \`role="img"\` before \`aria-label\` on visual indicators, \`aria-pressed\` only on button-like roles
|
|
561
|
+
- **Scrollable Regions:** Any scrollable container must have \`tabindex="0"\` or contain keyboard-interactive children
|
|
562
|
+
- **Nested Interactive:** Do not add interactive role/tabindex to a container that already has focusable children
|
|
563
|
+
- **List Roles:** \`role="list"\` containers must have \`role="listitem"\` children \u2014 prefer \`<ul>/<li>\` natively
|
|
540
564
|
- **Dynamic Content:** role="status"/aria-live="polite" for updates, role="alert"/aria-live="assertive" for critical alerts
|
|
541
565
|
- **Keyboard/Focus:** All interactive elements keyboard accessible, logical focus order, visible focus indicators, no keyboard traps (except modals)
|
|
542
566
|
- **Color/Contrast:** 4.5:1 text contrast (3:1 large text), 3:1 UI component contrast, no color-only information, 3:1 focus indicator contrast`;
|
|
@@ -1968,6 +1992,9 @@ IMPORTANT: In order to use the Kendo Theme CSS variables to work in a Tailwind C
|
|
|
1968
1992
|
${tailwindBridgeExample}
|
|
1969
1993
|
</taiwind_bridge_example>
|
|
1970
1994
|
`
|
|
1995
|
+
} : LAYOUT_MODE === "vanilla" ? {
|
|
1996
|
+
type: "text",
|
|
1997
|
+
text: "Note: For layout and spacing, use vanilla CSS with custom styles including flexbox, grid, media queries, and relative units. Do NOT use any CSS utility framework classes."
|
|
1971
1998
|
} : {
|
|
1972
1999
|
type: "text",
|
|
1973
2000
|
text: "Note: For layout and spacing, use the Layout Assistant tool to get the appropriate Kendo CSS utility classes."
|
|
@@ -3259,7 +3286,7 @@ Also add the Kendo CSS utilities CDN link in your \`index.html\` \`<head>\`:
|
|
|
3259
3286
|
`;
|
|
3260
3287
|
const licenseSection = `## Step ${stepCounter++}: Activate Kendo License
|
|
3261
3288
|
|
|
3262
|
-
This step is required to use Kendo
|
|
3289
|
+
This step is required to use Kendo React components without watermarks and with access to all features. Run the following command to activate your license:
|
|
3263
3290
|
|
|
3264
3291
|
\`\`\`bash
|
|
3265
3292
|
npx kendo license activate
|
|
@@ -3420,7 +3447,119 @@ Add the following styles to \`src/Home.css\`:
|
|
|
3420
3447
|
`;
|
|
3421
3448
|
}
|
|
3422
3449
|
|
|
3450
|
+
// packages/react/src/lib/instructions/datagrid.ts
|
|
3451
|
+
var datagridInstructions = `
|
|
3452
|
+
## DataGrid Deprecated Properties Awareness
|
|
3453
|
+
For DataGrid component cases, avoid using deprecated properties and always use their modern replacements. The following properties are deprecated and should not be used:
|
|
3454
|
+
|
|
3455
|
+
Deprecated properties and their modern replacements:
|
|
3456
|
+
- selectedField \u2192 use the select state property
|
|
3457
|
+
- editField \u2192 use the edit state property
|
|
3458
|
+
- expandedField \u2192 use the detailExpand state property
|
|
3459
|
+
- onExpandChange \u2192 use onDetailExpandChange for detail-row expansion or onGroupExpandChange for group expansion
|
|
3460
|
+
- cellRender \u2192 use the cells={{ data: CustomCell }} prop
|
|
3461
|
+
- rowRender \u2192 use the rows={{ data: CustomRow }} prop
|
|
3462
|
+
- filterCellRender \u2192 use the cells={{ filterCell: CustomCell }} prop
|
|
3463
|
+
- headerCellRender \u2192 use the cells={{ headerCell: CustomHeaderCell }} prop
|
|
3464
|
+
- column.cell \u2192 use the column.cells={{ data: CustomCell }} prop
|
|
3465
|
+
- column.headerCell \u2192 use the column.cells={{ headerCell: CustomHeaderCell }} prop
|
|
3466
|
+
- column.filterCell \u2192 use the column.cells={{ filterCell: CustomCell }} prop
|
|
3467
|
+
- column.footerCell \u2192 use the column.cells={{ footerCell: CustomFooterCell }} prop
|
|
3468
|
+
|
|
3469
|
+
Additional modern updates:
|
|
3470
|
+
- Input component in Column Menu Filter has been replaced with Textbox
|
|
3471
|
+
- scrollable prop now defaults to virtual
|
|
3472
|
+
- Virtual scrolling no longer applies height by default
|
|
3473
|
+
|
|
3474
|
+
Key points:
|
|
3475
|
+
- Never suggest or use these deprecated properties in DataGrid examples
|
|
3476
|
+
- Always provide modern alternatives when users ask about these properties
|
|
3477
|
+
- Explain that these properties are deprecated and provide the specific modern replacement
|
|
3478
|
+
- Focus on current DataGrid API patterns using state properties and cells/rows props
|
|
3479
|
+
|
|
3480
|
+
Example:
|
|
3481
|
+
Deprecated: selectedField="isSelected" editField="inEdit"
|
|
3482
|
+
Modern: Use select and edit state properties with proper configuration
|
|
3483
|
+
`;
|
|
3484
|
+
|
|
3485
|
+
// packages/react/src/lib/instructions/editor.ts
|
|
3486
|
+
var editorInstructions = `
|
|
3487
|
+
## Editor Tools Awareness
|
|
3488
|
+
For Editor component cases, always use the proper EditorTools import structure and never define tools as strings. Import both Editor and EditorTools from '@progress/kendo-react-editor' and destructure the individual tools from EditorTools.
|
|
3489
|
+
|
|
3490
|
+
Required pattern:
|
|
3491
|
+
\`\`\`jsx
|
|
3492
|
+
import { Editor, EditorTools } from '@progress/kendo-react-editor';
|
|
3493
|
+
|
|
3494
|
+
const {
|
|
3495
|
+
Bold, Italic, Underline, Strikethrough,
|
|
3496
|
+
Subscript, Superscript, ForeColor, BackColor,
|
|
3497
|
+
CleanFormatting, AlignLeft, AlignCenter, AlignRight, AlignJustify,
|
|
3498
|
+
Indent, Outdent, OrderedList, UnorderedList,
|
|
3499
|
+
NumberedList, BulletedList, Undo, Redo,
|
|
3500
|
+
FontSize, FontName, FormatBlock, Link, Unlink,
|
|
3501
|
+
InsertImage, ViewHtml, InsertTable, InsertFile,
|
|
3502
|
+
SelectAll, Print, Pdf, TableProperties, TableCellProperties,
|
|
3503
|
+
AddRowBefore, AddRowAfter, AddColumnBefore, AddColumnAfter,
|
|
3504
|
+
DeleteRow, DeleteColumn, DeleteTable, MergeCells, SplitCell
|
|
3505
|
+
} = EditorTools;
|
|
3506
|
+
\`\`\`
|
|
3507
|
+
|
|
3508
|
+
Key points:
|
|
3509
|
+
- Always import both Editor and EditorTools from '@progress/kendo-react-editor'
|
|
3510
|
+
- Destructure individual tools from EditorTools object
|
|
3511
|
+
- Use the destructured tool references directly in the tools array
|
|
3512
|
+
- Never define tools as strings (e.g., 'bold', 'italic')
|
|
3513
|
+
- Group related tools in sub-arrays for better organization
|
|
3514
|
+
|
|
3515
|
+
Example:
|
|
3516
|
+
Correct: tools={[[Bold, Italic, Underline], [AlignLeft, AlignCenter]]}
|
|
3517
|
+
Incorrect: tools={[['bold', 'italic', 'underline'], ['alignLeft', 'alignCenter']]}
|
|
3518
|
+
`;
|
|
3519
|
+
|
|
3520
|
+
// packages/react/src/lib/instructions/smart-grid.ts
|
|
3521
|
+
var smartGridInstructions = `
|
|
3522
|
+
## Smart Grid (AI-Enhanced Grid) Implementation Guidelines
|
|
3523
|
+
**CRITICAL: When users ask about ANY of these AI grid terms, ALWAYS provide GridToolbarAIAssistant implementation (not basic Grid):**
|
|
3524
|
+
|
|
3525
|
+
**Primary AI Grid Trigger Terms (case-insensitive):**
|
|
3526
|
+
- smart grid, smartgrid, smart-grid, smart_grid, SMART GRID, SmArt GrId
|
|
3527
|
+
- ai grid, aigrid, ai-grid, ai_grid, AI GRID, aI-griD, AIGrid
|
|
3528
|
+
- ai enhanced grid, ai-enhanced-grid, ai_enhanced_grid, AI Enhanced Grid
|
|
3529
|
+
- ai powered grid, ai-powered-grid, ai_powered_grid, AI Powered Grid
|
|
3530
|
+
- intelligent grid, intelligent-grid, intelligent_grid, Intelligent Grid
|
|
3531
|
+
- grid with ai, grid-with-ai, grid_with_ai, Grid with AI
|
|
3532
|
+
- grid ai assistant, gridaiassistant, grid-ai-assistant, Grid AI Assistant
|
|
3533
|
+
- grid toolbar ai assistant, gridtoolbaraiassistant, GridToolbarAIAssistant
|
|
3534
|
+
- grid assistant, gridassistant, grid-assistant, Grid Assistant
|
|
3535
|
+
|
|
3536
|
+
**Additional variations that should trigger AI Grid:**
|
|
3537
|
+
- ai enhanced, ai powered, smart, intelligent + grid (any spacing/casing)
|
|
3538
|
+
- grid + ai, grid + smart, grid + intelligent (any spacing/casing)
|
|
3539
|
+
- Any mention of GridToolbarAIAssistant component specifically
|
|
3540
|
+
|
|
3541
|
+
**Recognition Rule: If query contains ANY combination of AI/Smart/Intelligent + Grid terms, respond with complete GridToolbarAIAssistant setup.**
|
|
3542
|
+
|
|
3543
|
+
Example Smart Grid suggestions by domain:
|
|
3544
|
+
- Financial: 'Sort by Amount descending', 'Show only failed transactions', 'Filter where currency is USD'
|
|
3545
|
+
- Sales: 'Group by region', 'Show top performing products', 'Filter by date range'
|
|
3546
|
+
- Inventory: 'Sort by stock level', 'Show out of stock items', 'Group by category'
|
|
3547
|
+
- Always include: 'Clear sorting', 'Clear filtering', 'Clear grouping'
|
|
3548
|
+
|
|
3549
|
+
Basic Grid: <Grid data={data}><GridColumn field="name" /></Grid>
|
|
3550
|
+
Smart Grid: Complete AI-enhanced setup with GridToolbarAIAssistant, proper callbacks, reset functionality, and contextual suggestions
|
|
3551
|
+
|
|
3552
|
+
Important Disclaimer:
|
|
3553
|
+
Always include this disclaimer when providing Smart Grid examples:
|
|
3554
|
+
"The demos in this article use a Telerik-hosted AI service for demonstration purposes only. For production applications, you should implement your own AI service that understands your specific domain, data, and business requirements."
|
|
3555
|
+
`;
|
|
3556
|
+
|
|
3423
3557
|
// packages/react/src/lib/tools/index.ts
|
|
3558
|
+
var COMPONENT_INSTRUCTIONS_MAP = {
|
|
3559
|
+
"datagrid": [datagridInstructions, smartGridInstructions].join("\n\n"),
|
|
3560
|
+
"grid": [datagridInstructions, smartGridInstructions].join("\n\n"),
|
|
3561
|
+
"editor": editorInstructions
|
|
3562
|
+
};
|
|
3424
3563
|
var LAYOUT_ASSISTANT_NAME = UIAgent.ToolNames.layoutAssistant(PRODUCT_LINE);
|
|
3425
3564
|
var CODE_ASSISTANT_NAME3 = UIAgent.ToolNames.codeAssistant(PRODUCT_LINE);
|
|
3426
3565
|
var STYLE_ASSISTANT_NAME = UIAgent.ToolNames.styleAssistant(PRODUCT_LINE);
|
|
@@ -3514,7 +3653,11 @@ function createReactTools(contextApi2, accessType) {
|
|
|
3514
3653
|
suiteName: REACT_SUITE_NAME,
|
|
3515
3654
|
components: ReactComponents,
|
|
3516
3655
|
componentAliases: { "Grid": "DataGrid" },
|
|
3517
|
-
getPostContent: ({ component }) =>
|
|
3656
|
+
getPostContent: ({ component }) => {
|
|
3657
|
+
const normComponent = component?.trim().toLowerCase();
|
|
3658
|
+
const componentInstructions = COMPONENT_INSTRUCTIONS_MAP[normComponent];
|
|
3659
|
+
return getComponentsCommonInstructions({ component, componentInstructions });
|
|
3660
|
+
},
|
|
3518
3661
|
requiredAccess: ["assistant", "agent"]
|
|
3519
3662
|
},
|
|
3520
3663
|
contextApi2
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@progress/kendo-react-mcp",
|
|
3
|
-
"version": "1.6.
|
|
3
|
+
"version": "1.6.2-beta.a42c596b.0",
|
|
4
4
|
"type": "module",
|
|
5
5
|
"bin": "./dist/index.js",
|
|
6
6
|
"license": "See LICENSE.md",
|
|
@@ -26,7 +26,7 @@
|
|
|
26
26
|
"dependencies": {
|
|
27
27
|
"@grpc/grpc-js": "^1.14.3",
|
|
28
28
|
"@grpc/proto-loader": "^0.8.0",
|
|
29
|
-
"@modelcontextprotocol/sdk": "^1.
|
|
29
|
+
"@modelcontextprotocol/sdk": "^1.29.0",
|
|
30
30
|
"@progress/kendo-licensing": "^1.10.1",
|
|
31
31
|
"tslib": "^2.3.0"
|
|
32
32
|
},
|