@progress/kendo-react-mcp 1.9.0 → 1.10.2
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 +221 -877
- package/package.json +2 -2
package/dist/index.js
CHANGED
|
@@ -1,525 +1,105 @@
|
|
|
1
1
|
#!/usr/bin/env node
|
|
2
|
-
import{McpServer as
|
|
3
|
-
`,
|
|
4
|
-
|
|
5
|
-
License Error: ${o}`);let r=new $.Metadata;if(a)try{r.add("x-license-key",n)}catch(d){throw C("Error adding license key to metadata:",d),new Error(`Failed to use license key: ${d.message}`)}return i&&r.add("x-api-key",s),this.options?.libName&&r.add("x-library-name",this.options.libName),r.add("x-tool-name",this.toolNameHeader),r.add("x-request-metadata",this.buildRequestMetadata(t)),r}async query(t,n){let o=await this.getMetadata({meta:n});return new Promise((s,i)=>{this.client.query(t,o,(a,r)=>{a?i(new Error(a)):s(r)})})}async getApiRefMatches(t,n){let o=await this.getMetadata({meta:n});return new Promise((s,i)=>{this.client.getApiRefMatches(t,o,(a,r)=>{a?i(new Error(a)):s(r)})})}async queryCssUtils(t,n){let o=await this.getMetadata({meta:n});return new Promise((s,i)=>{this.client.cssUtilsSearch(t,o,(a,r)=>{a?(C("Error querying CSS Utils:",a),i(new Error(a))):s(r)})})}async queryIconsSearch(t,n){let o=await this.getMetadata({meta:n});return new Promise((s,i)=>{this.client.iconsSearch(t,o,(a,r)=>{a?(C("Error querying Icons Search:",a),i(new Error(a))):s(r)})})}async queryBuildingBlocks(t,n){let o=await this.getMetadata({meta:n});return new Promise((s,i)=>{this.client.buildingBlocksSearch(t,o,(a,r)=>{a?(C("Error querying Building Blocks:",a),i(new Error(a))):s(r)})})}async validateUserLicense(){let t=await this.getMetadata();return new Promise((n,o)=>{this.client.validateUserLicense({},t,(s,i)=>{s?(C("Error validating user license:",s),o(new Error(s))):n(i)})})}async queryThemeGenerate(t,n){let o=await this.getMetadata({meta:n});return new Promise((s,i)=>{this.client.generateTheme(t,o,(a,r)=>{a?(C("Error querying context API/GenerateTheme:",a),i(new Error(a))):s(r)})})}async recordOrchestratorUserRequest({meta:t}){let n=await this.getMetadata({meta:t});return new Promise((o,s)=>{this.client.recordOrchestratorUserRequest({},n,(i,a)=>{i?(C("Error recording orchestrator user request:",i),s(new Error(i))):o(a)})})}async recordToolUserRequest({toolName:t,meta:n}){let o=await this.getMetadata({meta:n});return new Promise((s,i)=>{this.client.recordToolUserRequest({tool_name:t},o,(a,r)=>{a?(C("Error recording tool user request:",a),i(new Error(a))):s(r)})})}async logEvent(t,n,o={}){let s="h8utJ6rk4PpIWX4JMn9beQDsjVUri6KV0XYfiVwq",{enrichWithUserData:i=!1,meta:a={}}=o,r=s&&typeof s=="string",d=null;if(i)try{let[g]=this.isDev?["fake_license",null]:await z();g&&typeof g=="string"&&(d=g)}catch{}if(!r&&!d){C("Neither LOGGING_API_KEY nor license key available, skipping log event");return}let p=new $.Metadata;return r&&p.add("x-api-key",s),d&&(p.add("x-license-key",d),p.add("x-request-metadata",this.buildRequestMetadata(a)),this.options?.libName&&p.add("x-library-name",this.options.libName)),new Promise((g,b)=>{this.client.logEvent({event_name:t,fields:n||{}},p,(l,m)=>{l?(C("Error logging event:",l),b(new Error(l))):g()})})}};import{z as Q}from"zod";var mo=Q.object({user_id:Q.string(),user_email:Q.string().email()});import{z as w}from"zod";var wt=w.object({Product:w.object({Id:w.number().int(),Code:w.string(),Name:w.string()}),License:w.nullable(w.object({Id:w.number().int(),Name:w.string(),Type:w.string(),Active:w.boolean()})),Availability:w.array(w.object({LicenseStart:w.nullable(w.string().datetime()),LicenseEnd:w.nullable(w.string().datetime())})),IsLicenseAvailable:w.optional(w.boolean())}),fo=w.array(wt);function T(e,t){let n=e.server?.server.getClientVersion?.(),o=t||{};return n&&(o.clientInfo={name:n.name,version:n.version}),o}async function Ae(e){let t=process.env.KENDO_MCP_ACCESS;if(t==="true"||t==="1"||t==="full")return"full";if(typeof t=="string"&&(t.toLowerCase()==="agent"||t.toLowerCase()==="assistant"))return t.toLowerCase();let n=await e();return n?.toLocaleLowerCase()==="agentic_ui_generator"?"agent":n?.toLocaleLowerCase()==="ai_coding_assistants"?"assistant":"none"}function Ce(){return'**Accessibility Guidelines: WCAG 2.2 Level AA Compliance**\n\n**Core Principles:**\n1. Use semantic HTML and ARIA correctly\n2. Ensure WCAG 2.2 AA compliance\n3. Follow W3C ARIA Authoring Practices\n4. Provide standards-based accessibility fixes\n\n**1. Form Control Labels** (WCAG 1.3.1, 3.3.2, 4.1.2)\nEvery input must have an associated label.\nCORRECT: `<input type="search" aria-label="Search products" placeholder="Search...">`\nCORRECT: `<label for="qty">Quantity</label><input type="number" id="qty">`\nWRONG: `<span>Email</span><input type="email">` (no association)\nWRONG: `<input type="email" placeholder="Email">` (placeholder as label)\n\n**2. Button Accessibility** (WCAG 4.1.2, 2.4.6, 2.5.3)\nAll buttons need accessible names describing their purpose.\nCORRECT: `<button type="button">Save Changes</button>`\nCORRECT: `<button aria-label="Close dialog"><svg aria-hidden="true" focusable="false">...</svg></button>`\nWRONG: `<button><svg>...</svg></button>` (no accessible name)\nWRONG: `<button>Click here</button>` (generic text)\n\n**3. Popup/Menu Triggers** (WCAG 4.1.2, 1.3.1)\nIndicate popup purpose and state using aria-haspopup, aria-expanded, aria-controls.\nCORRECT: `<button aria-expanded="false" aria-haspopup="menu" aria-controls="menu-id">Settings</button>`\n\n**4. Image Accessibility** (WCAG 1.1.1)\nInformative: `<img src="chart.png" alt="Sales increased 25% in Q4 2024">`\nFunctional: `<a href="/home"><img src="logo.png" alt="Company Name Home"></a>`\nDecorative: `<img src="border.png" alt="" role="presentation">`\nComplex: `<img src="chart.png" alt="Sales data" aria-describedby="desc-id">`\nWRONG: Missing alt, filename as alt, generic alt for decorative images\n\n**5. Link Accessibility** (WCAG 2.4.4, 2.4.6)\nLinks must be descriptive and understandable out of context.\nCORRECT: `<a href="/products">View All Products</a>`\nCORRECT: `<a href="/article" aria-label="Read more about New Product Launch">Read more</a>`\nWRONG: "Click here", "Read more", "Learn more" without context\n\n**6. Form Validation** (WCAG 3.3.1, 3.3.2, 3.3.3)\nErrors must be identified, associated with inputs, and provide suggestions. Use aria-describedby, aria-invalid="true", and role="alert".\n\n**7. Heading Structure** (WCAG 1.3.1, 2.4.6)\nEach page must have an `<h1>` that describes its content. Use hierarchical, descriptive headings with no skipped levels (h1\u2192h2\u2192h3).\nCORRECT: `<h1>Dashboard</h1> <h2>Sales</h2> <h3>By Region</h3>`\nWRONG: No `<h1>` on the page, or skipping levels (h1\u2192h3)\nIf a heading should look smaller than its semantic level, use CSS: `<h2 class="text-sm">Subtitle</h2>`\n\n**8. Page Component Landmark Rules** (WCAG 1.3.1, 4.1.2)\nPage 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.\n- 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.\n- 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.\n- 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.\n- When multiple `<section>` or `<nav>` elements exist on a page, give each a unique `aria-label` to avoid `landmark-unique` violations.\n\n**9. ARIA Role and Attribute Restrictions** (WCAG 4.1.2)\nOnly 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.\n- `<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.\n- `<button>` already has an implicit `button` role. Do NOT add `role="listitem"` or other incompatible roles.\n- `<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.\n- Do NOT add `aria-label` to non-interactive `<div>` wrappers \u2014 it has no effect and triggers violations.\n- `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.\nCORRECT: `<ul role="list"><li class="product-card">...</li></ul>` (listitem inside list)\nCORRECT: `<span role="img" aria-label="Status: pending" class="status-dot"></span>` (role added before aria-label)\nCORRECT: `<span class="status-dot" aria-hidden="true"></span><span class="visually-hidden">Pending</span>` (hidden text alternative)\nWRONG: `<article role="listitem">` (listitem not allowed on article)\nWRONG: `<article role="button">` (button not allowed on article \u2014 use `<button>` or `<div role="button">`)\nWRONG: `<span aria-label="pending" class="status-dot"></span>` (aria-label prohibited on generic span)\nWRONG: `<div aria-label="Product badges" class="badges"></div>` (aria-label prohibited on generic div)\n\n**Quick Checklist:**\n- **Forms:** Associated labels, aria-required on required fields, autocomplete attributes, aria-describedby for errors, aria-invalid for invalid fields, fieldsets with legends\n- **Buttons/Links:** Accessible names, aria-label for icon buttons, aria-hidden on decorative icons, descriptive link text\n- **Popups/Dialogs:** aria-haspopup, aria-expanded, aria-controls, role="dialog", aria-modal="true", aria-labelledby, focus trap, Escape to close\n- **Images:** alt on all images, descriptive alt for informative, empty alt for decorative, aria-describedby for complex\n- **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\n- **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\n- **Scrollable Regions:** Any scrollable container must have `tabindex="0"` or contain keyboard-interactive children\n- **Nested Interactive:** Do not add interactive role/tabindex to a container that already has focusable children\n- **List Roles:** `role="list"` containers must have `role="listitem"` children \u2014 prefer `<ul>/<li>` natively\n- **Dynamic Content:** role="status"/aria-live="polite" for updates, role="alert"/aria-live="assertive" for critical alerts\n- **Keyboard/Focus:** All interactive elements keyboard accessible, logical focus order, visible focus indicators, no keyboard traps (except modals)\n- **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'}var St=1440*60*1e3;function ve(e){let{serverName:t,contextApi:n,additionalFields:o={},intervalMs:s=St,enrichWithUserData:i=!1}=e,a="mcp_server_heartbeat",r=async()=>{try{let p={server_name:t,timestamp:new Date().toISOString(),...o};await n.logEvent(a,p,{enrichWithUserData:i})}catch(p){C(`Failed to send heartbeat for ${t}:`,p)}};r();let d=setInterval(r,s);return()=>{clearInterval(d),C(`Heartbeat stopped for ${t}`)}}import{z as X}from"zod";var kt=["meridian","default","bootstrap","material","fluent"];function we(e,t){return{projectName:X.string().default(t).describe("The name of the project. Used as the project folder name when creating a new project."),createNewProject:X.boolean().default(!0).describe(`Whether to create a new project before configuring ${e}. Set to true to scaffold a brand-new project, or false if the project already exists and you only want to add ${e} to it.`),theme:X.enum(kt).default("meridian").describe("The Kendo UI theme to use. Determines which theme package is installed and imported. Available themes: meridian (default), default, bootstrap, material, fluent.")}}var u="Kendo UI for React",N="react",D="kendo";var _=["ActionSheet","AIPrompt","Animation","AppBar","ArcGauge","AutoComplete","Avatar","Badge","Barcode","BottomNavigation","Breadcrumb","Button","ButtonGroup","BreadCrumb","Calendar","Card","Chart","ChartWizard","Chat","Checkbox","Chip","ChipList","ChunkProgressBar","CircularGauge","ColorGradient","ColorPalette","ColorPicker","ComboBox","ContextMenu","ConversationalUI","DataGrid","Grid","DataQuery","DateMath","DateInput","DatePicker","DateRangePicker","DateTimePicker","Dialog","Drag&Drop","Drawer","Drawing","DropDownButton","DropDownList","DropDownTree","Editor","Error","ExcelExport","ExpansionPanel","ExternalDropZone","FileSaver","FileManager","Filter","FlatColorPicker","FloatingActionButton","FloatingLabel","Form","Gantt","Gauge","General","GridLayout","Hint","Icon","InlineAIPrompt","Input","Label","LinearGauge","ListBox","ListView","Loader","Map","MaskedTextBox","Menu","MultiColumnComboBox","MultiSelect","MultiSelectTree","MultiViewCalendar","Notification","NumericTextBox","OrgChart","PageTemplates/BuildingBlocks","Pager","PanelBar","PDFProcessing","PDFViewer","PivotGrid","Popover","Popup","ProgressBar","PromptBox","QRCode","RadialGauge","RadioButton","RadioGroup","RangeSlider","Rating","Ripple","Sankey","Scheduler","ScrollView","Signature","Skeleton","Slider","Sortable","Sparkline","SpeechToTextButton","SmartPasteButton","SplitButton","Splitter","Spreadsheet","StackLayout","Stepper","StockChart","SVGIcon","Switch","TabStrip","TaskBoard","TextArea","TextBox","TileLayout","Timeline","TimePicker","Toolbar","Tooltip","TreeList","TreeView","Typography","Upload","VSCodeExtension","Window"];var Nt=xt(Tt(It(import.meta.url)),"../proto/service.proto"),F=new H("contextapi.telerik.com:443",Nt,{libName:N});var Se=async()=>F.validateUserLicense();import Vt from"fs";import ut from"path";import{fileURLToPath as Ht}from"url";import{z as v}from"zod";var k=class{constructor(t,n,o){this.name=t;this.config=n;this.cb=o}register(t){this.server=t,this.server.registerTool(this.name,this.config,this.cb)}hasAccess(t){return!this.config.requiredAccess||this.config.requiredAccess.length===0?!0:t==="full"||this.config.requiredAccess.includes(t)}};var q=(e,t)=>`# ${e.suiteName} - Code Validation & Quality Assurance
|
|
6
|
-
|
|
7
|
-
## Comprehensive Code Validation Checklist
|
|
8
|
-
Execute these validation steps systematically to ensure high-quality, maintainable code:
|
|
9
|
-
|
|
10
|
-
### Validation Phase: Framework-Specific Validation
|
|
11
|
-
|
|
12
|
-
${t}
|
|
13
|
-
|
|
14
|
-
### Validation Phase: General Code Quality & Best Practices
|
|
15
|
-
|
|
16
|
-
File Organization:
|
|
17
|
-
- Files are properly named using appropriate conventions
|
|
18
|
-
- Components are logically grouped in appropriate directories
|
|
19
|
-
- File sizes are reasonable
|
|
20
|
-
- Clear separation of concerns between files
|
|
21
|
-
|
|
22
|
-
Performance Best Practices:
|
|
23
|
-
- Optimized rendering patterns
|
|
24
|
-
- Minimal unnecessary re-renders/change detection cycles
|
|
25
|
-
- Efficient data handling and caching
|
|
26
|
-
- Proper component lifecycle management
|
|
27
|
-
|
|
28
|
-
### Validation Phase: Security & Accessibility Validation
|
|
29
|
-
|
|
30
|
-
Security Measures:
|
|
31
|
-
- Input validation and sanitization
|
|
32
|
-
- XSS protection measures
|
|
33
|
-
- CSRF protection where applicable
|
|
34
|
-
- Secure data handling practices
|
|
35
|
-
|
|
36
|
-
### Validation Phase: UI/UX & Design System Compliance
|
|
37
|
-
|
|
38
|
-
Responsive Design:
|
|
39
|
-
- Proper breakpoint handling
|
|
40
|
-
- Flexible layouts that adapt to different screen sizes
|
|
41
|
-
- Touch-friendly interface elements
|
|
42
|
-
|
|
43
|
-
### Validation Phase: Error Handling & Edge Cases
|
|
44
|
-
|
|
45
|
-
Error Handling:
|
|
46
|
-
- Graceful error handling for all user interactions
|
|
47
|
-
- Meaningful error messages for users
|
|
48
|
-
- Network error handling for API calls
|
|
49
|
-
`;var J=()=>`## UX/UI Design Best Practices
|
|
50
|
-
|
|
51
|
-
> **These are default guidelines \u2014 follow them when the user has not stated otherwise.** If the user explicitly requests different behavior (e.g., a specific component size, a custom row limit, alternate breakpoints, a different layout pattern), defer to the user's stated preference and disregard the conflicting default below. Only accessibility and WCAG requirements (contrast ratios, focus indicators, semantic HTML, ARIA) apply regardless of user preference.
|
|
52
|
-
|
|
53
|
-
Follow these principles when building or reviewing any UI. They apply regardless of the visual style requested.
|
|
54
|
-
|
|
55
|
-
### Visual Hierarchy & Typography
|
|
56
|
-
- Use a strict 3-level heading hierarchy: page title (h1) \u2192 section heading (h2) \u2192 component label (h3). Never skip levels.
|
|
57
|
-
- Body text line length: 60\u201380 characters maximum. Wider lines reduce readability.
|
|
58
|
-
- Numeric and currency columns must use \`font-variant-numeric: tabular-nums\` to keep digits column-aligned.
|
|
59
|
-
- Never use more than 2 typefaces in a single interface.
|
|
60
|
-
|
|
61
|
-
### Color & Contrast
|
|
62
|
-
- Body text contrast ratio: \u2265 4.5:1 against its background.
|
|
63
|
-
- Large text (\u2265 18pt / 14pt bold) and UI component boundaries: \u2265 3:1.
|
|
64
|
-
- Use only the 5 semantic color slots \u2014 primary, success, warning, error, info \u2014 for meaning. Do not invent new semantic colors.
|
|
65
|
-
- Never use color alone to convey status or meaning (8% of men have color vision deficiency). Always pair color with an icon or text label.
|
|
66
|
-
- Never use red and green as the sole distinguishing colors.
|
|
67
|
-
|
|
68
|
-
### Component Sizing & Density
|
|
69
|
-
- Never mix size variants within the same form or toolbar. Pick one: \`"small"\`, \`"medium"\`, or \`"large"\` and apply it consistently.
|
|
70
|
-
- \`"small"\` (24px) = data-dense tools. \`"medium"\` (32px) = default. \`"large"\` (40px) = comfortable/consumer-facing.
|
|
71
|
-
|
|
72
|
-
### Motion & Animation
|
|
73
|
-
- Always support \`prefers-reduced-motion: reduce\` \u2014 set transition durations to \u2264 0.01ms in that media query.
|
|
74
|
-
- Micro-interactions (button press, tooltip): 150\u2013250ms. Panel transitions (drawer, sidebar): 300\u2013400ms.
|
|
75
|
-
- Never animate layout properties that cause reflow (width, height, margin, padding). Animate transform and opacity instead.
|
|
76
|
-
|
|
77
|
-
### Interaction Patterns
|
|
78
|
-
- Never set \`outline: none\` globally. Keyboard focus indicators are required (WCAG 2.4.7).
|
|
79
|
-
- Loading states: prefer Skeleton loader for content areas, overlay + ProgressBar for blocking operations, disabled button + inline spinner for async submission.
|
|
80
|
-
- Error recovery: inline validation near the field for form errors; notification/toast for API/system errors.
|
|
81
|
-
- Every icon-only button must have a visible tooltip and an \`aria-label\`.
|
|
82
|
-
- Never show tooltips on disabled elements \u2014 disabled elements cannot receive focus.
|
|
83
|
-
|
|
84
|
-
### Responsive Design
|
|
85
|
-
- Breakpoints (defaults \u2014 use the project's breakpoint system if one is already established): Mobile < 640px | Tablet 640\u20131024px | Desktop 1024\u20131440px | Wide > 1440px.
|
|
86
|
-
- Constrain max content width to 1440px with \`margin: 0 auto\` on wide viewports, unless a different maximum is already defined by the project.
|
|
87
|
-
- On mobile (< 480px), data grids must switch to stacked/card layout \u2014 tabular layout is unusable at that width.
|
|
88
|
-
- Schedulers/complex data views are not viable on mobile; provide a simplified alternative or a clear message.
|
|
89
|
-
|
|
90
|
-
### UX Writing
|
|
91
|
-
- Input labels describe *what* the field is. Placeholder text hints at *format or example* \u2014 never use placeholder as a substitute for a label.
|
|
92
|
-
- Button labels must be specific action verbs: "Save Changes", "Delete Record", "Export CSV" \u2014 not "Submit", "OK", or "Yes".
|
|
93
|
-
- Error messages must be specific and actionable: "Email address is already registered" not "Error 409".
|
|
94
|
-
- Table/grid column headers: Title Case. Never ALL CAPS.
|
|
95
|
-
- Empty states must explain why it's empty and offer a next action (e.g., "No records found. Add your first item.").
|
|
96
|
-
|
|
97
|
-
### Data Presentation
|
|
98
|
-
- Numeric and currency values must be right-aligned in table/grid columns.
|
|
99
|
-
- Never display raw ISO 8601 date strings (e.g., \`2024-01-15T09:30:00Z\`) \u2014 always format for the locale (e.g., "15 Jan 2024").
|
|
100
|
-
- Never render more than 200 rows in a fully-loaded table. Use pagination or virtual scrolling for larger datasets.
|
|
101
|
-
- Never leave grid columns without explicit widths \u2014 causes layout jank on load and sort operations.
|
|
102
|
-
|
|
103
|
-
### Chart Type Selection
|
|
104
|
-
- **Line / Area**: continuous quantitative data over time (trends, rates).
|
|
105
|
-
- **Bar (vertical)**: discrete time periods or ordered categories.
|
|
106
|
-
- **Horizontal Bar**: comparing named categories (rankings, survey results).
|
|
107
|
-
- **Donut (not Pie)**: part-to-whole proportions with \u2264 6 segments. Avoid Pie charts \u2014 the center hole of a Donut makes area estimation easier.
|
|
108
|
-
- **Avoid**: 3D charts, dual-axis charts (misleading), charts with > 7 series in the same view.
|
|
109
|
-
- Chart legend placement: below the chart.
|
|
110
|
-
|
|
111
|
-
### Dialog vs Window Decisions
|
|
112
|
-
- **Dialog (modal)**: use when the user must respond before continuing. Title should be action-oriented: "Delete this record?" not "Confirmation".
|
|
113
|
-
- **Window (non-modal)**: use when content can exist alongside the background (resizable/draggable panels, editors).
|
|
114
|
-
- Destructive dialog actions (delete, overwrite) must use the error theme color.
|
|
115
|
-
- Every dialog must be closable via Escape key and have a clearly labeled close control.
|
|
116
|
-
|
|
117
|
-
### Form Validation Display Rules
|
|
118
|
-
- Show field-level validation errors **after the first blur** (not on initial render, not on every keystroke).
|
|
119
|
-
- Display error text inline, directly below the field \u2014 never in a toast or far from the field.
|
|
120
|
-
- On form-level submit failure, focus the first invalid field automatically.
|
|
121
|
-
- Required fields: mark with an asterisk (*) and include a legend. Do not mark optional fields \u2014 label them "(optional)" only if most fields are required.
|
|
122
|
-
|
|
123
|
-
### Grid Data Volume & Scrolling Strategy
|
|
124
|
-
- Never render more than 200 rows without pagination or virtual scrolling.
|
|
125
|
-
- Use **pagination** when users need to navigate by page number, see total row count, or perform export/select-all operations.
|
|
126
|
-
- Use **virtual scrolling** when the dataset is very large (thousands of rows) and users scroll continuously rather than jumping to pages.
|
|
127
|
-
- Default page size: 25 rows. Offer page size options (10, 25, 50) as defaults unless the project specifies otherwise.
|
|
128
|
-
|
|
129
|
-
### Grid Feature Selection
|
|
130
|
-
Enable only the Grid features genuinely required for the workflow. Each enabled feature adds UI chrome, event listeners, and DOM nodes. Start with the minimum set and add only when user stories require it:
|
|
131
|
-
- \`sortable\` \u2014 when users need to find specific rows in non-obvious order
|
|
132
|
-
- \`filterable\` \u2014 for datasets > 50 rows with varied values; skip for small fixed lists
|
|
133
|
-
- \`groupable\` \u2014 only when hierarchical analysis is a core workflow
|
|
134
|
-
- \`reorderable\` / \`resizable\` \u2014 when user customization of the view is a stated requirement
|
|
135
|
-
- \`selectable\` \u2014 only when batch actions exist
|
|
136
|
-
- \`editable\` \u2014 only when inline data entry is the primary workflow, not for read-only display
|
|
137
|
-
|
|
138
|
-
### Form Layout Defaults
|
|
139
|
-
These are defaults \u2014 respect the project's existing form conventions if established:
|
|
140
|
-
- Prefer single-column form layout \u2014 easier to read and complete than multi-column.
|
|
141
|
-
- Use two-column layout only for tightly related field pairs (First Name / Last Name, Start Date / End Date).
|
|
142
|
-
- Align labels above their fields for complex forms; inline labels work only for very short forms (2\u20133 fields).
|
|
143
|
-
- Place the primary action (Save / Submit) at the bottom left; Cancel or secondary actions to its right.
|
|
144
|
-
|
|
145
|
-
### Whitespace Defaults
|
|
146
|
-
When no design token system is defined by the project, apply these minimum spacing values:
|
|
147
|
-
- Section separators: \u2265 24px vertical gap between distinct content areas.
|
|
148
|
-
- Card internal padding: 16\u201324px.
|
|
149
|
-
- Form field vertical gap: \u2265 16px between fields (24px for multi-column groups).
|
|
150
|
-
- Page left/right margin: 24\u201332px minimum, even at desktop widths.`;var B=(e,t)=>{let n=q({suiteName:e.suiteName,libKey:e.libKey},t.validationSteps),o=e.libKey==="angular"?"- **Drag and Drop**: Consider using the DragandDrop and Sortable components when drag-and-drop functionality is needed.":"",s=e.components?e.components.join(", "):"components";return`# \u{1F3AF} ${e.suiteName} - Execution Plan
|
|
151
|
-
|
|
152
|
-
**Current Goal:**
|
|
153
|
-
|
|
154
|
-
${e.userIntent}
|
|
155
|
-
|
|
156
|
-
**Requirements Summary:**
|
|
157
|
-
- **Framework:** ${e.libKey}
|
|
158
|
-
${e.includeComponentsDocs?`- **Component Library:** ${e.suiteName}
|
|
159
|
-
- Ensure to use ONLY ${e.suiteName} components for all UI elements.
|
|
160
|
-
- And use the ${e.codeAssistantName} tool to get ${e.suiteName} component documentation and code snippets.
|
|
161
|
-
- Ensure that after you read the plan you use exactly the ${e.codeAssistantName} no matter if there is another tool that can provide code snippets, documentation or other resources related to ${e.suiteName}.
|
|
162
|
-
`:""}${e.includeLayout?`- **Layout:** Yes
|
|
163
|
-
- And use the ${e.layoutAssistantName} tool to get Kendo CSS utility classes needed for layout structure and responsive design.
|
|
164
|
-
`:""}${e.includeIcons?`- **Icons:** Yes
|
|
165
|
-
- Use icons that align with the project theme and enhance usability.
|
|
166
|
-
- Use the ${e.iconAssistantName} tool to search for icons that fit the theme and purpose of your project.
|
|
167
|
-
`:""}${e.includeTheming?`- **Custom Theming:**
|
|
168
|
-
- Create a custom theme that aligns with the current goal and branding needs.
|
|
169
|
-
- Use Kendo Themes and Design System guidelines.
|
|
170
|
-
- Make sure to include strict CSS variables or theme requirements from the current goal.
|
|
171
|
-
- And use the ${e.styleAssistantName} tool to create a custom theme for your project.
|
|
172
|
-
`:""}${e.includeResponsive?`- **Responsive:**
|
|
173
|
-
- Ensure the layout is fully responsive across mobile, tablet, and desktop views.
|
|
174
|
-
- And use the ${e.layoutAssistantName} tool to get Kendo CSS utility classes needed for responsive design.
|
|
175
|
-
`:""}
|
|
176
|
-
- **Accessible (WCAG 2.2 Level AA):**
|
|
177
|
-
- CRITICAL: You must call the ${e.accessibilityAssistantName} tool with includeGeneralGuidelines=true on your first call to get WCAG 2.2 Level AA guidelines.
|
|
178
|
-
- For subsequent calls, use includeGeneralGuidelines=false to get only component-specific accessibility information.
|
|
179
|
-
- Ensure all components meet WCAG 2.2 Level AA standards.
|
|
180
|
-
|
|
181
|
-
${e.includeLayout?`**STYLING AND LAYOUT REQUIREMENTS:**
|
|
182
|
-
## CRITICAL DESIGN SYSTEM CONSTRAINTS
|
|
183
|
-
- **USE ONLY KENDO DESIGN SYSTEM UTILITIES** for ALL styling, layout, spacing, positioning, and responsive behavior
|
|
184
|
-
- Avoid custom CSS, inline styles, or other CSS framework classes
|
|
185
|
-
- The ${e.layoutAssistantName} tool will provide the specific Kendo CSS utility classes needed
|
|
186
|
-
- All layout requirements must use Kendo utilities exclusively
|
|
187
|
-
|
|
188
|
-
`:""}---
|
|
189
|
-
|
|
190
|
-
${J()}
|
|
2
|
+
import{McpServer as Gt}from"@modelcontextprotocol/sdk/server/mcp.js";import{StdioServerTransport as $t}from"@modelcontextprotocol/sdk/server/stdio.js";import{dirname as Ct,join as vt}from"path";import{fileURLToPath as At}from"url";import{loadLicense as it,decodeLicenseKey as lt,decodeLicenseEvidence as ct}from"@progress/kendo-licensing/utils";var Y=class extends Error{constructor(t){super(t),this.name="LicenseError"}};function oe(e){return e.replace(/^\uFEFF/,"")}async function z(e){let t=null,o=null;try{let s=it();if(!s.success){let n=new Y(s.message);throw e&&await e("license_load_failed",{error:s.message}).catch(()=>{}),n}try{t=(await lt(s.value)).licenses.find(async a=>!!(await ct(a)).userId)}catch(n){console.log(n.message),e&&await e("license_load_failed",{error:n.message||"Unknown decoding error"}).catch(()=>{})}if(!t)return[oe(s.value),null]}catch(s){return o=s.message||"Unknown error loading license.",e&&await e("license_load_failed",{error:o}).catch(()=>{}),[null,o]}return[oe(t),null]}import G from"node:fs";import j from"node:path";var V=!1,D=process.env.DEBUG_LOG_FILE,se=!!(D&&typeof D=="string");if(se){let e=j.resolve(D),t=j.dirname(e);if(t!=="."&&t!==process.cwd()&&!G.existsSync(t))try{G.mkdirSync(t,{recursive:!0})}catch(o){console.error("Error creating log directory:",o)}if(!G.existsSync(e))try{G.writeFileSync(e,"")}catch(o){console.error("Error creating log file:",o)}}else V=!1;V=se&&!!D&&G.existsSync(j.resolve(D));function b(...e){if(V&&D){let s=`${new Date().toISOString()}: ${e.join(" ")}
|
|
3
|
+
`,n=j.resolve(D);G.appendFile(n,s,a=>{a&&console.error("Error writing to log file:",a)})}}import pt from"@grpc/proto-loader";import q from"@grpc/grpc-js";import ae from"path";import ne from"fs";import{fileURLToPath as ut}from"url";var mt=ut(import.meta.url),gt=ae.dirname(mt),ie={version:"unknown"},re=ae.resolve(gt,"../package.json");ne.existsSync(re)&&(ie=JSON.parse(ne.readFileSync(re,"utf-8")));function ht(e){return e.replace(/\u2014/g,"--").replace(/\u2013/g,"-").replace(/[^\x20-\x7E]/g,"")}var W=class{constructor(t,o,s){this.contextApiUrl=t;this.protoPath=o;this.options=s;this.toolNameHeader="assistant";let n=pt.loadSync(this.protoPath,{keepCase:!0,longs:String,enums:String,defaults:!0,oneofs:!0});this.isDev=this.contextApiUrl?.includes("localhost")||this.contextApiUrl?.includes("127.0.0.1"),b("Using ContextApi URl:",this.contextApiUrl);let a=q.loadPackageDefinition(n);this.client=new a.ContextQueryService(this.contextApiUrl||"contextapi.telerik.com:443",this.isDev?q.credentials.createInsecure():q.credentials.createSsl())}buildRequestMetadata(t={}){return ht(JSON.stringify({...t,source:"npm",version:ie.version,os:process.platform,node_version:process.version,plugin_mode:!!process.env.PLUGIN_MODE,install_source:process.env.INSTALL_SOURCE?.toLowerCase()}))}async getMetadata({meta:t}={meta:{}}){let[o,s]=this.isDev?["fake_license",null]:await z((l,p)=>this.logEvent(l,p)),n=process.env.CONTEXTAPI_API_KEY,a=n&&typeof n=="string",r=o&&typeof o=="string";if(!r&&!a&&s)throw new Error(`Failed to authenticate with API key or License key!
|
|
191
4
|
|
|
192
|
-
---
|
|
193
|
-
|
|
194
|
-
## Detailed Execution Plan
|
|
195
|
-
Follow these steps strictly in order to achieve a complete and polished implementation of the current goal:
|
|
196
|
-
|
|
197
|
-
### Phase: Accessibility Foundation
|
|
198
|
-
|
|
199
|
-
**Step 1: Retrieve WCAG 2.2 Level AA Guidelines**
|
|
200
|
-
|
|
201
|
-
**MANDATORY REQUIREMENT:**
|
|
202
|
-
|
|
203
|
-
- Before implementing any UI components or features, you must call the accessibility assistant with general guidelines
|
|
204
|
-
- On your first call to "${e.accessibilityAssistantName}", set "includeGeneralGuidelines=true" to get foundational WCAG 2.2 Level AA best practices
|
|
205
|
-
- These general guidelines apply to all components and must be considered throughout implementation
|
|
206
|
-
- For all subsequent calls, set "includeGeneralGuidelines=false" to get only component-specific information
|
|
207
|
-
|
|
208
|
-
**First tool call (includes general WCAG guidelines):**
|
|
209
|
-
\`\`\`
|
|
210
|
-
${e.accessibilityAssistantName}({
|
|
211
|
-
query="What are the accessibility requirements for [COMPONENT_NAME]?",
|
|
212
|
-
component="[COMPONENT_NAME]",
|
|
213
|
-
includeGeneralGuidelines=true // ONLY true on first call
|
|
214
|
-
})
|
|
215
|
-
\`\`\`
|
|
216
|
-
|
|
217
|
-
**Step 2: Get Component-Specific Accessibility Information**
|
|
218
|
-
|
|
219
|
-
For each additional ${e.suiteName} component you plan to use, call the tool with "includeGeneralGuidelines=false":
|
|
220
|
-
|
|
221
|
-
**Tool call example:**
|
|
222
|
-
\`\`\`
|
|
223
|
-
${e.accessibilityAssistantName}({
|
|
224
|
-
query="What are the accessibility features and requirements for [COMPONENT_NAME]? Include ARIA attributes, keyboard navigation, and screen reader support.",
|
|
225
|
-
component="[COMPONENT_NAME]",
|
|
226
|
-
includeGeneralGuidelines=false // false for all calls after the first
|
|
227
|
-
})
|
|
228
|
-
\`\`\`
|
|
229
|
-
|
|
230
|
-
**Example:**
|
|
231
|
-
\`\`\`
|
|
232
|
-
${e.accessibilityAssistantName}({
|
|
233
|
-
query="How to associate the label with another component or HTML input?",
|
|
234
|
-
component="Label",
|
|
235
|
-
includeGeneralGuidelines=false
|
|
236
|
-
})
|
|
237
|
-
\`\`\`
|
|
238
|
-
${e.includeLayout?`
|
|
239
|
-
### Phase: Layout Foundation
|
|
240
|
-
|
|
241
|
-
**Step 1: Create Base Layout Structure**
|
|
242
|
-
**IMPORTANT LAYOUT REQUIREMENTS:**
|
|
243
|
-
- Consider the hierarchy and nesting of layout elements (page \u2192 sections \u2192 components)
|
|
244
|
-
- Each layout level should have appropriate wrapper containers with proper Kendo utilities
|
|
245
|
-
- Sections should be wrapped in containers that provide the necessary layout structure
|
|
246
|
-
|
|
247
|
-
**Tool call example:**
|
|
248
|
-
\`\`\`
|
|
249
|
-
${e.layoutAssistantName}({
|
|
250
|
-
prompt="Provide Kendo Design System utility classes for the following layout structure: [LAYOUT DESCRIPTION HERE]",
|
|
251
|
-
includeBuildingBlockExamples=true // Optional, include examples of Kendo building blocks (Grid, Flex, Stack, etc.)
|
|
252
|
-
})
|
|
253
|
-
\`\`\`
|
|
254
|
-
`:""}
|
|
255
|
-
${e.includeComponentsDocs?`
|
|
256
|
-
### Phase: Component Integration
|
|
257
|
-
**Step 1: Identify and Implement Core Components**
|
|
258
|
-
Based on your current goal, analyze what other ${e.suiteName} components are needed and implement them one by one. Here you are some appropriate components based on the different project type:
|
|
259
|
-
|
|
260
|
-
**Component Selection Guidelines:**
|
|
261
|
-
- **Landing Pages**: Consider Button, Card, Form components, Layout containers, Navigation elements
|
|
262
|
-
- **Dashboards**: Consider Grid, Chart, TileLayout, Drawer, Notification, ToolBar components
|
|
263
|
-
- **Data Entry**: Consider Form, TextBox, DatePicker, DropDownList, Upload, Validation components
|
|
264
|
-
- **Content Management**: Consider Grid, Editor, TreeView, FileManager, Dialog components
|
|
265
|
-
- **E-commerce**: Consider ListView, Card, Button, Rating, Badge, Carousel components
|
|
266
|
-
${o}
|
|
267
|
-
|
|
268
|
-
**IMPORTANT COMPONENT USAGE REQUIREMENTS:**
|
|
269
|
-
- Make sure to identify all necessary features related to the ${s} based on the current goal.
|
|
270
|
-
- Make sure to identify specific features needed for other ${e.suiteName} components based on the current goal.
|
|
271
|
-
- Make sure to generate a query for ${e.codeAssistantName} tool for each component and call the tool for each specific feature or functionality.
|
|
272
|
-
- Always specify the exact features you want for each component. Describe only the needed functionality, and behavior you need. Be concise and don't include any information about the use case.
|
|
273
|
-
|
|
274
|
-
**Tool call examples:**
|
|
275
|
-
\`\`\`
|
|
276
|
-
${e.codeAssistantName}({
|
|
277
|
-
query="Give me information about [COMPONENT_NAME] with [SPECIFIC_FEATURES]." <!-- For example: 'Grid with paging' or 'Button with click events' or 'Chart with multiple series' -->
|
|
278
|
-
component="[COMPONENT_NAME]" <!-- For example: 'Grid', 'Button', 'Chart', etc. -->
|
|
279
|
-
})
|
|
280
|
-
\`\`\`
|
|
281
|
-
|
|
282
|
-
For broad queries, break them down into specific features (e.g., paging, sorting, filtering for Grid) and call the tool separately for each feature:
|
|
283
|
-
\`\`\`
|
|
284
|
-
${e.codeAssistantName}({
|
|
285
|
-
query="How to implement [SPECIFIC_FEATURE] in [COMPONENT_NAME]?" <!-- For example: 'paging in Grid' -->
|
|
286
|
-
component="[COMPONENT_NAME]" <!-- For example: 'Grid', 'Button', etc. -->
|
|
287
|
-
})
|
|
288
|
-
\`\`\`
|
|
289
|
-
|
|
290
|
-
\`\`\`
|
|
291
|
-
${e.codeAssistantName}({
|
|
292
|
-
query="How to implement [SPECIFIC_FEATURE] in [COMPONENT_NAME]?" <!-- For example: 'sorting in Grid' -->
|
|
293
|
-
component="[COMPONENT_NAME]" <!-- For example: 'Grid', 'Button', etc. -->
|
|
294
|
-
})
|
|
295
|
-
\`\`\`
|
|
296
|
-
|
|
297
|
-
\`\`\`
|
|
298
|
-
${e.codeAssistantName}({
|
|
299
|
-
query="How to implement [SPECIFIC_FEATURE] in [COMPONENT_NAME]?" <!-- For example: 'filtering in Grid' -->
|
|
300
|
-
component="[COMPONENT_NAME]" <!-- For example: 'Grid', 'Button', etc. -->
|
|
301
|
-
})
|
|
302
|
-
\`\`\`
|
|
303
|
-
`:""}
|
|
304
|
-
${e.includeResponsive?`
|
|
305
|
-
### Phase: Layout Responsive Finalization
|
|
306
|
-
|
|
307
|
-
**Step 1: Implement Responsive Behavior**
|
|
308
|
-
|
|
309
|
-
**Tool call example:**
|
|
310
|
-
\`\`\`
|
|
311
|
-
${e.layoutAssistantName}({
|
|
312
|
-
prompt="Provide Kendo Design System utility classes to make the following layout structure responsive across mobile, tablet, and desktop views: [LAYOUT DESCRIPTION HERE]",
|
|
313
|
-
includeBuildingBlockExamples=false // Optional, include examples of Kendo building blocks (Grid, Flex, Stack, etc.)
|
|
314
|
-
})
|
|
315
|
-
\`\`\`
|
|
316
|
-
`:""}
|
|
317
|
-
${e.includeTheming?`
|
|
318
|
-
**Step 2: Custom Theme Implementation**
|
|
319
|
-
|
|
320
|
-
**CUSTOM THEME REQUIREMENTS:**
|
|
321
|
-
- Create a custom theme that aligns with the current goal and branding needs.
|
|
322
|
-
- Use Kendo Themes and Design System guidelines.
|
|
323
|
-
- Make sure to include strict CSS variables or theme requirements from the current goal.
|
|
324
|
-
|
|
325
|
-
**Tool call example:**
|
|
326
|
-
\`\`\`
|
|
327
|
-
${e.styleAssistantName}({
|
|
328
|
-
query="Create a custom Kendo UI theme that aligns with the following current goal and branding needs: [CURRENT GOAL HERE]. Include strict CSS variables or theme requirements as needed.",
|
|
329
|
-
includeThemeVariables=true // Optional, include specific CSS variables for colors, typography, spacing, etc.
|
|
330
|
-
})
|
|
331
|
-
\`\`\`
|
|
332
|
-
`:""}
|
|
333
|
-
${e.includeIcons?`
|
|
334
|
-
**Step 3: Iconography and Visual Enhancements**
|
|
335
|
-
|
|
336
|
-
**ICONOGRAPHY GUIDELINES:**
|
|
337
|
-
- Select icons that align with the project theme and enhance usability.
|
|
338
|
-
- Ensure icons are consistent in style and size.
|
|
339
|
-
- Use icons to improve navigation and highlight key actions.
|
|
340
|
-
|
|
341
|
-
**Tool call example:**
|
|
342
|
-
\`\`\`
|
|
343
|
-
${e.iconAssistantName}({
|
|
344
|
-
query="Suggest icons that fit the theme and purpose of the following current goal: [CURRENT GOAL HERE]. Provide icon names and usage context.",
|
|
345
|
-
})
|
|
346
|
-
\`\`\`
|
|
347
|
-
`:""}
|
|
348
|
-
### Phase: Code Generation
|
|
349
|
-
**IMPORTANT:** Do NOT generate ANY code or create files until ALL information gathering phases (1-3) are complete.
|
|
350
|
-
**Step 1: Generate Complete Implementation**
|
|
351
|
-
After completing all information gathering phases above, generate the complete ${e.libKey} component/page implementation:
|
|
352
|
-
**Code Generation Requirements:**
|
|
353
|
-
- Create complete, functional ${e.libKey} components/pages
|
|
354
|
-
- Include all identified ${e.suiteName} components with their configurations
|
|
355
|
-
- Apply ALL Kendo Design System utility classes gathered from layout assistant
|
|
356
|
-
- Implement proper component event handling and data binding
|
|
357
|
-
- Ensure responsive behavior using Kendo utility classes
|
|
358
|
-
- Include necessary import statements and dependencies
|
|
359
|
-
|
|
360
|
-
${t.injectedPlan??""}
|
|
361
|
-
|
|
362
|
-
### Phase: Validation and Finalization
|
|
363
|
-
|
|
364
|
-
**Step 1: Code Validation**
|
|
365
|
-
** CRITICAL REQUIREMENT: You MUST validate the generated UI code using this comprehensive checklist to ensure code quality and compliance:**
|
|
366
|
-
|
|
367
|
-
${n}
|
|
368
|
-
|
|
369
|
-
**Step 2: Final Review and Testing**
|
|
370
|
-
** Implementation Validation:**
|
|
371
|
-
${e.includeComponentsDocs?` - Components render correctly without errors
|
|
372
|
-
- Running \`npm run build\` compiles the application successfully without any build errors or crashes.
|
|
373
|
-
- All ${e.suiteName} component features function as expected
|
|
374
|
-
- Event handling and data binding operate correctly`:""}
|
|
375
|
-
${e.includeResponsive?"- Responsive layout works across breakpoints":""}
|
|
376
|
-
|
|
377
|
-
**Quick Fixes (if needed):**
|
|
378
|
-
|
|
379
|
-
After code implementation and validation you can make quick fixes as needed:
|
|
380
|
-
- If any build errors are found, fix them and re-run the application. Do NOT present the implementation as complete until the build succeeds without errors.
|
|
381
|
-
- Use ${e.codeAssistantName} for component-specific issues
|
|
382
|
-
- Use ${e.layoutAssistantName} for styling adjustments
|
|
383
|
-
|
|
384
|
-
+### Before You Begin
|
|
385
|
-
- When following/executing the plan call tools are defined from the same function_ecosystem/MCP_server which ${e.name} was called.
|
|
386
|
-
- Do NOT generate or suggest any code until all tools have been used and validated responses are incorporated.
|
|
387
|
-
- Focus on planning and sequencing.
|
|
388
|
-
- Summarize the components, layouts, and utilities gathered.
|
|
389
|
-
- Confirm all required inputs from tools have been provided.`};var Z=e=>`# ${e.suiteName} Assistant
|
|
390
|
-
|
|
391
|
-
**What you're looking for:**
|
|
392
|
-
|
|
393
|
-
${e.userIntent}
|
|
394
|
-
|
|
395
|
-
**Available Tools:**
|
|
396
|
-
- **${e.codeAssistantName}** - Get component documentation, features, and usage examples
|
|
397
|
-
- **${e.iconAssistantName}** - Search for icons from the Kendo icon library
|
|
398
|
-
|
|
399
|
-
---
|
|
400
|
-
|
|
401
|
-
## Discovery Plan
|
|
402
|
-
|
|
403
|
-
Follow these steps to find the right components and resources:
|
|
404
|
-
|
|
405
|
-
### Step 1: Identify Components
|
|
406
|
-
|
|
407
|
-
Based on your needs, consider these ${e.suiteName} component categories:
|
|
408
|
-
|
|
409
|
-
**Common Use Cases:**
|
|
410
|
-
- **Data Display**: Grid, ListView, TreeView, Card, TileLayout
|
|
411
|
-
- **Forms & Input**: Form, TextBox, DatePicker, DropDownList, ComboBox, MultiSelect, Upload
|
|
412
|
-
- **Navigation**: Menu, Drawer, Breadcrumb, TabStrip, Stepper
|
|
413
|
-
- **Data Visualization**: Chart, Gauge, Sparkline
|
|
414
|
-
- **Editing**: Editor (Rich Text)
|
|
415
|
-
- **Notifications**: Dialog, Notification, Tooltip
|
|
416
|
-
- **Layout**: Splitter, PanelBar, ExpansionPanel
|
|
417
|
-
|
|
418
|
-
**How to explore components:**
|
|
419
|
-
|
|
420
|
-
Use the ${e.codeAssistantName} tool to learn about specific components:
|
|
421
|
-
|
|
422
|
-
\`\`\`
|
|
423
|
-
${e.codeAssistantName}({
|
|
424
|
-
query: "What are the main features of [COMPONENT_NAME]?",
|
|
425
|
-
component: "[COMPONENT_NAME]"
|
|
426
|
-
})
|
|
427
|
-
\`\`\`
|
|
428
|
-
|
|
429
|
-
**Examples:**
|
|
430
|
-
\`\`\`
|
|
431
|
-
${e.codeAssistantName}({
|
|
432
|
-
query: "How to use Grid with paging and sorting?",
|
|
433
|
-
component: "Grid"
|
|
434
|
-
})
|
|
435
|
-
\`\`\`
|
|
436
|
-
|
|
437
|
-
\`\`\`
|
|
438
|
-
${e.codeAssistantName}({
|
|
439
|
-
query: "What features does DatePicker have?",
|
|
440
|
-
component: "DatePicker"
|
|
441
|
-
})
|
|
442
|
-
\`\`\`
|
|
443
|
-
|
|
444
|
-
**Pro Tips:**
|
|
445
|
-
- Ask about specific features (e.g., "Grid with filtering" instead of just "Grid")
|
|
446
|
-
- Break complex queries into multiple calls focusing on one feature at a time
|
|
447
|
-
- Specify the exact component name in the component parameter
|
|
448
|
-
|
|
449
|
-
${e.includeIcons?`
|
|
450
|
-
### Step 2: Find Icons
|
|
451
|
-
|
|
452
|
-
Use the ${e.iconAssistantName} tool to search for icons:
|
|
453
|
-
|
|
454
|
-
\`\`\`
|
|
455
|
-
${e.iconAssistantName}({
|
|
456
|
-
query: "Search for icons related to [YOUR THEME/PURPOSE]"
|
|
457
|
-
})
|
|
458
|
-
\`\`\`
|
|
459
|
-
|
|
460
|
-
**Examples:**
|
|
461
|
-
\`\`\`
|
|
462
|
-
${e.iconAssistantName}({
|
|
463
|
-
query: "icons for navigation menu"
|
|
464
|
-
})
|
|
465
|
-
\`\`\`
|
|
466
|
-
|
|
467
|
-
\`\`\`
|
|
468
|
-
${e.iconAssistantName}({
|
|
469
|
-
query: "icons for user actions like edit, delete, save"
|
|
470
|
-
})
|
|
471
|
-
\`\`\`
|
|
472
|
-
`:""}
|
|
473
|
-
|
|
474
|
-
### Step 3: Review and Implement
|
|
475
|
-
|
|
476
|
-
After gathering information:
|
|
477
|
-
1. Review the component documentation provided by ${e.codeAssistantName}
|
|
478
|
-
2. Check which icons are available from ${e.iconAssistantName}
|
|
479
|
-
3. Use the official ${e.suiteName} documentation for detailed implementation guides
|
|
480
|
-
4. Refer to the component examples and code snippets provided
|
|
481
|
-
|
|
482
|
-
### Step 4: Build and Validation
|
|
5
|
+
License Error: ${s}`);let i=new q.Metadata;if(r)try{i.add("x-license-key",o)}catch(l){throw b("Error adding license key to metadata:",l),new Error(`Failed to use license key: ${l.message}`)}return a&&i.add("x-api-key",n),this.options?.libName&&i.add("x-library-name",this.options.libName),i.add("x-tool-name",this.toolNameHeader),i.add("x-request-metadata",this.buildRequestMetadata(t)),i}async query(t,o){let s=await this.getMetadata({meta:o});return new Promise((n,a)=>{this.client.query(t,s,(r,i)=>{r?a(r):n(i)})})}async getApiRefMatches(t,o){let s=await this.getMetadata({meta:o});return new Promise((n,a)=>{this.client.getApiRefMatches(t,s,(r,i)=>{r?a(r):n(i)})})}async queryCssUtils(t,o){let s=await this.getMetadata({meta:o});return new Promise((n,a)=>{this.client.cssUtilsSearch(t,s,(r,i)=>{r?(b("Error querying CSS Utils:",r),a(r)):n(i)})})}async queryIconsSearch(t,o){let s=await this.getMetadata({meta:o});return new Promise((n,a)=>{this.client.iconsSearch(t,s,(r,i)=>{r?(b("Error querying Icons Search:",r),a(r)):n(i)})})}async queryBuildingBlocks(t,o){let s=await this.getMetadata({meta:o});return new Promise((n,a)=>{this.client.buildingBlocksSearch(t,s,(r,i)=>{r?(b("Error querying Building Blocks:",r),a(r)):n(i)})})}async validateUserLicense(){let t=await this.getMetadata();return new Promise((o,s)=>{this.client.validateUserLicense({},t,(n,a)=>{n?(b("Error validating user license:",n),s(n)):o(a)})})}async queryThemeGenerate(t,o){let s=await this.getMetadata({meta:o});return new Promise((n,a)=>{this.client.generateTheme(t,s,(r,i)=>{r?(b("Error querying context API/GenerateTheme:",r),a(r)):n(i)})})}async recordOrchestratorUserRequest({meta:t}){let o=await this.getMetadata({meta:t});return new Promise((s,n)=>{this.client.recordOrchestratorUserRequest({},o,(a,r)=>{a?(b("Error recording orchestrator user request:",a),n(a)):s(r)})})}async recordToolUserRequest({toolName:t,meta:o}){let s=await this.getMetadata({meta:o});return new Promise(n=>{this.client.recordToolUserRequest({tool_name:t},s,(a,r)=>{a?(a.code===7?b("recordToolUserRequest: license does not cover Kendo AI Tools, skipping telemetry."):b("Error recording tool user request:",a),n(null)):n(r)})})}async logEvent(t,o,s={}){let n="h8utJ6rk4PpIWX4JMn9beQDsjVUri6KV0XYfiVwq",{enrichWithUserData:a=!1,meta:r={}}=s,i=n&&typeof n=="string",l=null;if(a)try{let[h]=this.isDev?["fake_license",null]:await z();h&&typeof h=="string"&&(l=h)}catch{}if(!i&&!l){b("Neither LOGGING_API_KEY nor license key available, skipping log event");return}let p=new q.Metadata;return i&&p.add("x-api-key",n),l&&(p.add("x-license-key",l),p.add("x-request-metadata",this.buildRequestMetadata(r)),this.options?.libName&&p.add("x-library-name",this.options.libName)),new Promise((h,v)=>{this.client.logEvent({event_name:t,fields:o||{}},p,(g,u)=>{g?(b("Error logging event:",g),v(g)):h()})})}};import{z as X}from"zod";var ao=X.object({user_id:X.string(),user_email:X.string().email()});import{z as x}from"zod";var ft=x.object({Product:x.object({Id:x.number().int(),Code:x.string(),Name:x.string()}),License:x.nullable(x.object({Id:x.number().int(),Name:x.string(),Type:x.string(),Active:x.boolean()})),Availability:x.array(x.object({LicenseStart:x.nullable(x.string().datetime()),LicenseEnd:x.nullable(x.string().datetime())})),IsLicenseAvailable:x.optional(x.boolean())}),co=x.array(ft);function T(e,t){let o=e.server?.server.getClientVersion?.(),s=t||{};return o&&(s.clientInfo={name:o.name,version:o.version}),s}async function le(e){let t=process.env.KENDO_MCP_ACCESS;if(t==="true"||t==="1"||t==="full")return"full";if(typeof t=="string"&&(t.toLowerCase()==="agent"||t.toLowerCase()==="assistant"))return t.toLowerCase();let o=await e();return o?.toLocaleLowerCase()==="agentic_ui_generator"?"agent":o?.toLocaleLowerCase()==="ai_coding_assistants"?"assistant":"none"}function ce(){return'**Accessibility Guidelines: WCAG 2.2 Level AA Compliance**\n\n**Core Principles:**\n1. Use semantic HTML and ARIA correctly\n2. Ensure WCAG 2.2 AA compliance\n3. Follow W3C ARIA Authoring Practices\n4. Provide standards-based accessibility fixes\n\n**1. Form Control Labels** (WCAG 1.3.1, 3.3.2, 4.1.2)\nEvery input must have an associated label.\nCORRECT: `<input type="search" aria-label="Search products" placeholder="Search...">`\nCORRECT: `<label for="qty">Quantity</label><input type="number" id="qty">`\nWRONG: `<span>Email</span><input type="email">` (no association)\nWRONG: `<input type="email" placeholder="Email">` (placeholder as label)\n\n**2. Button Accessibility** (WCAG 4.1.2, 2.4.6, 2.5.3)\nAll buttons need accessible names describing their purpose.\nCORRECT: `<button type="button">Save Changes</button>`\nCORRECT: `<button aria-label="Close dialog"><svg aria-hidden="true" focusable="false">...</svg></button>`\nWRONG: `<button><svg>...</svg></button>` (no accessible name)\nWRONG: `<button>Click here</button>` (generic text)\n\n**3. Popup/Menu Triggers** (WCAG 4.1.2, 1.3.1)\nIndicate popup purpose and state using aria-haspopup, aria-expanded, aria-controls.\nCORRECT: `<button aria-expanded="false" aria-haspopup="menu" aria-controls="menu-id">Settings</button>`\n\n**4. Image Accessibility** (WCAG 1.1.1)\nInformative: `<img src="chart.png" alt="Sales increased 25% in Q4 2024">`\nFunctional: `<a href="/home"><img src="logo.png" alt="Company Name Home"></a>`\nDecorative: `<img src="border.png" alt="" role="presentation">`\nComplex: `<img src="chart.png" alt="Sales data" aria-describedby="desc-id">`\nWRONG: Missing alt, filename as alt, generic alt for decorative images\n\n**5. Link Accessibility** (WCAG 2.4.4, 2.4.6)\nLinks must be descriptive and understandable out of context.\nCORRECT: `<a href="/products">View All Products</a>`\nCORRECT: `<a href="/article" aria-label="Read more about New Product Launch">Read more</a>`\nWRONG: "Click here", "Read more", "Learn more" without context\n\n**6. Form Validation** (WCAG 3.3.1, 3.3.2, 3.3.3)\nErrors must be identified, associated with inputs, and provide suggestions. Use aria-describedby, aria-invalid="true", and role="alert".\n\n**7. Heading Structure** (WCAG 1.3.1, 2.4.6)\nEach page must have an `<h1>` that describes its content. Use hierarchical, descriptive headings with no skipped levels (h1\u2192h2\u2192h3).\nCORRECT: `<h1>Dashboard</h1> <h2>Sales</h2> <h3>By Region</h3>`\nWRONG: No `<h1>` on the page, or skipping levels (h1\u2192h3)\nIf a heading should look smaller than its semantic level, use CSS: `<h2 class="text-sm">Subtitle</h2>`\n\n**8. Page Component Landmark Rules** (WCAG 1.3.1, 4.1.2)\nPage 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.\n- 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.\n- 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.\n- 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.\n- When multiple `<section>` or `<nav>` elements exist on a page, give each a unique `aria-label` to avoid `landmark-unique` violations.\n\n**9. ARIA Role and Attribute Restrictions** (WCAG 4.1.2)\nOnly 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.\n- `<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.\n- `<button>` already has an implicit `button` role. Do NOT add `role="listitem"` or other incompatible roles.\n- `<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.\n- Do NOT add `aria-label` to non-interactive `<div>` wrappers \u2014 it has no effect and triggers violations.\n- `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.\nCORRECT: `<ul role="list"><li class="product-card">...</li></ul>` (listitem inside list)\nCORRECT: `<span role="img" aria-label="Status: pending" class="status-dot"></span>` (role added before aria-label)\nCORRECT: `<span class="status-dot" aria-hidden="true"></span><span class="visually-hidden">Pending</span>` (hidden text alternative)\nWRONG: `<article role="listitem">` (listitem not allowed on article)\nWRONG: `<article role="button">` (button not allowed on article \u2014 use `<button>` or `<div role="button">`)\nWRONG: `<span aria-label="pending" class="status-dot"></span>` (aria-label prohibited on generic span)\nWRONG: `<div aria-label="Product badges" class="badges"></div>` (aria-label prohibited on generic div)\n\n**Quick Checklist:**\n- **Forms:** Associated labels, aria-required on required fields, autocomplete attributes, aria-describedby for errors, aria-invalid for invalid fields, fieldsets with legends\n- **Buttons/Links:** Accessible names, aria-label for icon buttons, aria-hidden on decorative icons, descriptive link text\n- **Popups/Dialogs:** aria-haspopup, aria-expanded, aria-controls, role="dialog", aria-modal="true", aria-labelledby, focus trap, Escape to close\n- **Images:** alt on all images, descriptive alt for informative, empty alt for decorative, aria-describedby for complex\n- **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\n- **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\n- **Scrollable Regions:** Any scrollable container must have `tabindex="0"` or contain keyboard-interactive children\n- **Nested Interactive:** Do not add interactive role/tabindex to a container that already has focusable children\n- **List Roles:** `role="list"` containers must have `role="listitem"` children \u2014 prefer `<ul>/<li>` natively\n- **Dynamic Content:** role="status"/aria-live="polite" for updates, role="alert"/aria-live="assertive" for critical alerts\n- **Keyboard/Focus:** All interactive elements keyboard accessible, logical focus order, visible focus indicators, no keyboard traps (except modals)\n- **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'}var yt=1440*60*1e3;function de(e){let{serverName:t,contextApi:o,additionalFields:s={},intervalMs:n=yt,enrichWithUserData:a=!1}=e,r="mcp_server_heartbeat",i=async()=>{try{let p={server_name:t,timestamp:new Date().toISOString(),...s};await o.logEvent(r,p,{enrichWithUserData:a})}catch(p){b(`Failed to send heartbeat for ${t}:`,p)}};i();let l=setInterval(i,n);return()=>{clearInterval(l),b(`Heartbeat stopped for ${t}`)}}import{z as Q}from"zod";var bt=["meridian","default","bootstrap","material","fluent"];function pe(e,t){return{projectName:Q.string().default(t).describe("The name of the project. Used as the project folder name when creating a new project."),createNewProject:Q.boolean().default(!0).describe(`Whether to create a new project before configuring ${e}. Set to true to scaffold a brand-new project, or false if the project already exists and you only want to add ${e} to it.`),theme:Q.enum(bt).default("meridian").describe("The Kendo UI theme to use. Determines which theme package is installed and imported. Available themes: meridian (default), default, bootstrap, material, fluent.")}}var d="Kendo UI for React",I="react",U="kendo";var M=["ActionSheet","AIPrompt","Animation","AppBar","ArcGauge","AutoComplete","Avatar","Badge","Barcode","BottomNavigation","Breadcrumb","Button","ButtonGroup","BreadCrumb","Calendar","Card","Chart","ChartWizard","Chat","Checkbox","Chip","ChipList","ChunkProgressBar","CircularGauge","ColorGradient","ColorPalette","ColorPicker","ComboBox","ContextMenu","ConversationalUI","Grid","DataQuery","DateMath","DateInput","DatePicker","DateRangePicker","DateTimePicker","Dialog","Drag&Drop","Drawer","Drawing","DropDownButton","DropDownList","DropDownTree","Editor","Error","ExcelExport","ExpansionPanel","ExternalDropZone","FileSaver","FileManager","Filter","FlatColorPicker","FloatingActionButton","FloatingLabel","Form","Gantt","Gauge","General","GridLayout","Hint","Icon","InlineAIPrompt","Input","Label","LinearGauge","ListBox","ListView","LLMKit","Loader","Map","MaskedTextBox","Menu","MultiColumnComboBox","MultiSelect","MultiSelectTree","MultiViewCalendar","Notification","NumericTextBox","OrgChart","OTPInput","PageTemplates/BuildingBlocks","Pager","PanelBar","PDFProcessing","PDFViewer","PivotGrid","Popover","Popup","ProgressBar","PromptBox","QRCode","RadialGauge","RadioButton","RadioGroup","RangeSlider","Rating","Ripple","Sankey","SegmentedControl","Scheduler","ScrollView","Signature","Skeleton","Slider","Sortable","Sparkline","SpeechToTextButton","SmartPasteButton","SplitButton","Splitter","Spreadsheet","StackLayout","Stepper","StockChart","SVGIcon","Switch","TabStrip","TaskBoard","TextArea","TextBox","TileLayout","Timeline","TimePicker","Toolbar","Tooltip","TreeList","TreeView","Typography","Upload","VSCodeExtension","Window"];var xt=vt(Ct(At(import.meta.url)),"../proto/service.proto"),F=new W("contextapi.telerik.com:443",xt,{libName:I});var ue=async()=>F.validateUserLicense();import Ot from"fs";import st from"path";import{fileURLToPath as qt}from"url";import{z as A}from"zod";var w=class{constructor(t,o,s){this.name=t;this.config=o;this.cb=s}register(t){this.server=t,this.server.registerTool(this.name,this.config,this.cb)}hasAccess(t){return!this.config.requiredAccess||this.config.requiredAccess.length===0?!0:t==="full"||this.config.requiredAccess.includes(t)}};var B=e=>{let t=[`1. \`${e.accessibilityAssistantName}\`: Call first with \`includeGeneralGuidelines=true\`; use \`false\` for component-specific follow-ups.`];if(e.includeLayout){let n=e.includeResponsive?"structure, responsive behavior, and UX policy":"structure and UX policy";t.push(`${t.length+1}. \`${e.layoutAssistantName}\`: Get Kendo Design System utilities for the requested ${n}. Use only those utilities for styling and layout.`)}if(e.includeTheming&&t.push(`${t.length+1}. \`${e.styleAssistantName}\`: Generate the requested Kendo theme variables.`),e.includeIcons&&t.push(`${t.length+1}. \`${e.iconAssistantName}\`: Find icons only for the required actions and states.`),e.includeComponentsDocs){let n=e.components?.length?e.components.join(", "):"each Kendo component selected for the implementation";t.push(`${t.length+1}. \`${e.codeAssistantName}\`: Call once per component (${n}) with a concise, feature-specific query before writing Kendo markup.`)}t.push(`${t.length+1}. After each assistant call, use the output to decide how to incorporate the guidance into the feature where applicable.`),t.push(`${t.length+1}. Implement the requested UI using ${e.suiteName} components and the gathered guidance.`),t.push(`${t.length+1}. Run \`npm run build\`, resolve failures, and repeat until it succeeds.`);let o=e.libKey==="angular"?"- Before editing, inspect the project for Standalone or NgModule setup, built-in or structural template syntax, and the existing Kendo theme import mechanism. Match those conventions; default to Standalone and built-in control flow for Angular 17+ only when no existing pattern is found.":"- Use React function components, Hooks, typed props where needed, stable list keys, and the project's existing KendoReact theme and package setup.",s=e.libKey==="angular"?`
|
|
6
|
+
- When drag-and-drop is required, consider the DragAndDrop and Sortable components.`:"";return`# ${e.suiteName} Execution Plan
|
|
483
7
|
|
|
484
|
-
|
|
485
|
-
|
|
486
|
-
-
|
|
487
|
-
|
|
488
|
-
|
|
489
|
-
|
|
490
|
-
|
|
491
|
-
|
|
492
|
-
|
|
493
|
-
|
|
494
|
-
|
|
495
|
-
|
|
496
|
-
|
|
497
|
-
|
|
498
|
-
|
|
499
|
-
|
|
500
|
-
|
|
501
|
-
-
|
|
502
|
-
-
|
|
503
|
-
|
|
504
|
-
|
|
505
|
-
|
|
506
|
-
-
|
|
507
|
-
|
|
508
|
-
-
|
|
509
|
-
|
|
510
|
-
|
|
511
|
-
-
|
|
512
|
-
-
|
|
513
|
-
-
|
|
514
|
-
-
|
|
515
|
-
|
|
516
|
-
|
|
517
|
-
-
|
|
518
|
-
- Do not
|
|
519
|
-
|
|
520
|
-
-
|
|
521
|
-
|
|
522
|
-
|
|
8
|
+
<orchestrator-plan>
|
|
9
|
+
<goal>${e.userIntent}</goal>
|
|
10
|
+
<execution-order>
|
|
11
|
+
${t.map(n=>` ${n}`).join(`
|
|
12
|
+
`)}
|
|
13
|
+
</execution-order>
|
|
14
|
+
<required-invariants>
|
|
15
|
+
- Accessibility guidance is retrieved before implementation; meet WCAG 2.2 Level AA.
|
|
16
|
+
- Do not generate code until the required tool calls above are complete and their guidance is incorporated.
|
|
17
|
+
- Generate code using tool guidance. Do not inspect \`node_modules\` unless the tools are insufficient and there is conflicting information or runtime errors.
|
|
18
|
+
- Use focused component queries; do not batch unrelated components.
|
|
19
|
+
- Build failures block completion and must be fixed before reporting success.
|
|
20
|
+
${o}${s}
|
|
21
|
+
</required-invariants>
|
|
22
|
+
<completion>
|
|
23
|
+
- \`npm run build\` succeeds without errors.
|
|
24
|
+
- Every assistant response is reviewed and relevant guidance is applied.
|
|
25
|
+
- Required Kendo component, accessibility, layout, and framework-specific requirements are implemented.
|
|
26
|
+
- Do not report completion while either condition is unresolved.
|
|
27
|
+
</completion>
|
|
28
|
+
</orchestrator-plan>`};var J=e=>{let t=e.components?.length?e.components.join(", "):"each Kendo component selected for the implementation",o=[`1. \`${e.codeAssistantName}\`: Call once per component (${t}) with a concise, feature-specific query before writing Kendo markup.`];return e.includeIcons&&o.push(`${o.length+1}. \`${e.iconAssistantName}\`: Find icons only for the required actions and states.`),o.push(`${o.length+1}. Implement using the gathered ${e.suiteName} documentation.`),o.push(`${o.length+1}. Run \`npm run build\`, resolve failures, and repeat until it succeeds.`),`# ${e.suiteName} Execution Plan
|
|
29
|
+
|
|
30
|
+
<assistant-plan>
|
|
31
|
+
<goal>${e.userIntent}</goal>
|
|
32
|
+
<execution-order>
|
|
33
|
+
${o.map(s=>` ${s}`).join(`
|
|
34
|
+
`)}
|
|
35
|
+
</execution-order>
|
|
36
|
+
<required-invariants>
|
|
37
|
+
- Build failures block completion and must be fixed before reporting success.
|
|
38
|
+
- Use the selected components and gathered guidance rather than generic substitutions.
|
|
39
|
+
</required-invariants>
|
|
40
|
+
<completion>
|
|
41
|
+
- \`npm run build\` succeeds without errors.
|
|
42
|
+
- Do not report completion while the build is failing.
|
|
43
|
+
</completion>
|
|
44
|
+
</assistant-plan>`};var $=()=>`## UX/UI Design Best Practices
|
|
45
|
+
|
|
46
|
+
Follow the constraints and conventions unless the prompt or project defines a stronger convention. Accessibility and WCAG rules always override other guidance.
|
|
47
|
+
|
|
48
|
+
### Core Constraints
|
|
49
|
+
- Headings: use a strict hierarchy - h1 \u2192 h2 \u2192 h3; never skip levels
|
|
50
|
+
- Use at most 2 typefaces
|
|
51
|
+
- Body text line length: 60-80 characters maximum
|
|
52
|
+
- Contrast: body text \u2265 4.5:1 against its background
|
|
53
|
+
- Large text (\u2265 18pt / 14pt bold) and UI boundaries \u2265 3:1
|
|
54
|
+
- Use only semantic colors: primary, success, warning, error, info
|
|
55
|
+
- Never use color alone to convey status or meaning; pair it with text or an icon
|
|
56
|
+
- Pick one size per form or toolbar: \`"small"\` (24px, data-dense), \`"medium"\` (32px, default), or \`"large"\` (40px, comfortable)
|
|
57
|
+
- Animate transform and opacity, not reflow properties such as width, height, margin, or padding
|
|
58
|
+
- Never set \`outline: none\` globally
|
|
59
|
+
- Icon-only buttons require a visible tooltip and an \`aria-label\`
|
|
60
|
+
- Never show tooltips on disabled elements
|
|
61
|
+
- Do not use placeholder text as a label
|
|
62
|
+
- Button labels must use specific action verbs
|
|
63
|
+
- Error messages must be specific and actionable
|
|
64
|
+
- Grid headers use Title Case, not ALL CAPS
|
|
65
|
+
- Empty states must explain why they are empty and offer a next action
|
|
66
|
+
- Right-align numeric and currency grid columns
|
|
67
|
+
- Format dates for the locale; never show raw ISO 8601 strings
|
|
68
|
+
- Give every grid column an explicit width
|
|
69
|
+
- Dialogs must support Escape to close and include a clearly labeled close control
|
|
70
|
+
- Destructive dialog actions use the error theme color
|
|
71
|
+
- Show field validation after first blur, not on initial render or every keystroke
|
|
72
|
+
- Display field error text directly below the field
|
|
73
|
+
- Required fields use an asterisk (*) plus a legend. Mark optional fields only when most fields are required
|
|
74
|
+
- Do not render more than 200 grid rows without pagination or virtual scrolling
|
|
75
|
+
- Support \`prefers-reduced-motion: reduce\` \u2014 set transition durations to \u2264 0.01ms in that media query
|
|
76
|
+
|
|
77
|
+
### Default Conventions
|
|
78
|
+
- Breakpoints: Mobile < 640px | Tablet 640-1024px | Desktop 1024-1440px | Wide > 1440px
|
|
79
|
+
- Wide layouts: max width 1440px and centered
|
|
80
|
+
- On screens under 480px, grids switch to stacked or card layout
|
|
81
|
+
- Loading: Skeleton for content areas, overlay + ProgressBar for blocking operations, disabled button + inline spinner for async submission
|
|
82
|
+
- Error recovery: inline for form fields, toast/notification for API or system errors
|
|
83
|
+
- Virtual scrolling fits very large datasets where users scroll continuously rather than jump between pages
|
|
84
|
+
- Paging defaults: 25 rows with options 10, 25, 50
|
|
85
|
+
- Prefer single-column forms. Use two columns only for tightly related field pairs
|
|
86
|
+
- For complex forms, place labels above fields. Inline labels fit only very short forms
|
|
87
|
+
- Place the primary action at the bottom left and secondary actions to its right
|
|
88
|
+
- Minimum spacing when no token system exists: section gap between distinct content areas \u2265 24px, card padding 16-24px, form field gap \u2265 16px (24px in multi-column groups), page margins 24-32px
|
|
89
|
+
- Animations on micro-interactions (button press, tooltip): 150-250ms. Panel transitions (drawer, sidebar): 300-400ms
|
|
90
|
+
|
|
91
|
+
### Chart Selection
|
|
92
|
+
- Line or Area: continuous quantitative data over time (trends, rates)
|
|
93
|
+
- Bar (vertical): discrete time periods or ordered categories
|
|
94
|
+
- Bar (horizontal): comparing named categories (rankings, survey results)
|
|
95
|
+
- Donut (not Pie): part-to-whole proportions with \u2264 6 segments. Prefer Donut over Pie charts
|
|
96
|
+
|
|
97
|
+
### Avoid
|
|
98
|
+
- 3D charts, dual-axis charts, and charts with more than 7 series
|
|
99
|
+
|
|
100
|
+
### Dialog vs Window
|
|
101
|
+
- Dialog: blocking choice or confirmation; title should be action-oriented
|
|
102
|
+
- Window: non-modal content that can stay alongside the background(resizable/draggable panels, editors)`;var Z=()=>`
|
|
523
103
|
**REQUIRED ACTIONS \u2014 apply all fixes directly to the source files:**
|
|
524
104
|
- Search all .ts files for every outdated API mentioned in the codemod output \u2014 this includes renamed or removed properties, method names, and enum values.
|
|
525
105
|
- Search all .ts, .css, and .scss files for every outdated CSS class mentioned in the codemod output and update it with an appropriate replacement.
|
|
@@ -532,91 +112,91 @@ After implementing the code:
|
|
|
532
112
|
**OUTPUT REQUIREMENTS:**
|
|
533
113
|
- For each file you change, briefly describe what was wrong and what fix you applied
|
|
534
114
|
- If a problem requires a decision from the developer that you cannot make automatically, call it out explicitly with the file path
|
|
535
|
-
- If all automated changes look correct and no further fixes are needed, explicitly confirm this`;import{execFile as
|
|
536
|
-
- Name: ${
|
|
537
|
-
- Type: ${
|
|
538
|
-
- Summary: ${
|
|
539
|
-
- Syntax: ${
|
|
540
|
-
`,
|
|
541
|
-
\`\`\`
|
|
542
|
-
${
|
|
543
|
-
\`\`\`
|
|
544
|
-
`}
|
|
545
|
-
${f}`)}return
|
|
546
|
-
`+
|
|
115
|
+
- If all automated changes look correct and no further fixes are needed, explicitly confirm this`;import{execFile as kt}from"child_process";import{access as wt}from"fs/promises";import{promisify as St}from"util";var me=St(kt);function Tt(e,t){let o;try{o=JSON.parse(e)}catch{return e}let s=o?.Item;if(!s)return e;let n=[],a=s.FullName??s.Name??"",r=s.Type??"",i=s.Summary??"",l=s.SyntaxContent??"";n.push(`## API Reference Item
|
|
116
|
+
- Name: ${a}
|
|
117
|
+
- Type: ${r}
|
|
118
|
+
- Summary: ${i}
|
|
119
|
+
- Syntax: ${l}`);let p=o.RelatedItemsByType?.return_type;if(p?.length){let u=p[0].Text;u&&n.push(`- Return Type: ${u}`)}let h=s.Examples??[];if(h.length>0){let u=`## Examples
|
|
120
|
+
`,m=0;for(let y of h){let c=(y.Component??"").toLowerCase(),f=t.toLowerCase();if(c&&c!==f&&c!=="general")continue;m+=1;let k=y.Code??"";u+=`### Example ${m}
|
|
121
|
+
\`\`\`
|
|
122
|
+
${k}
|
|
123
|
+
\`\`\`
|
|
124
|
+
`}m>0&&n.push(u)}let v=o.RelatedItemsByType??{},g=[];for(let[u,m]of Object.entries(v))if(!(u==="return_type"||u==="render_fragment"))for(let y of m??[]){let c=y.FullName??"",f=y.ShortText??"";g.push(`### ${c} (${u})
|
|
125
|
+
${f}`)}return g.length>0&&n.push(`## Additional Context
|
|
126
|
+
`+g.join(`
|
|
547
127
|
---
|
|
548
|
-
`)),
|
|
128
|
+
`)),n.join(`
|
|
549
129
|
|
|
550
|
-
`)}function
|
|
551
|
-
`)||"No CSS utilities found for the given prompt.",y=
|
|
130
|
+
`)}function he(e,t){let{name:o,title:s,description:n,layoutAssistantName:a,codeAssistantName:r,styleAssistantName:i,iconAssistantName:l,accessibilityAssistantName:p,suiteName:h,libKey:v,components:g}=e,u=new w(o,{title:s,description:n,requiredAccess:e.requiredAccess,inputSchema:{userIntent:A.string().describe(`Detailed description and intent of what the user wants to build. Include the type of page/component, main functionality, visual requirements, and any specific ${h} components you want to use.`),needsComponentsDocsConfidence:A.number().min(0).max(1).default(1).describe("Confidence (0-1) to include Component Documentation assistance. Default is 1."),needsLayoutConfidence:A.number().min(0).max(1).default(0).describe("Confidence (0-1) to include Layout assistance. Default is 0."),needsStylingConfidence:A.number().min(0).max(1).default(0).describe("Confidence (0-1) to include Theming/Styling assistance. Default is 0."),needsResponsiveBehaviorConfidence:A.number().min(0).max(1).default(0).describe("Confidence (0-1) to include Responsive Behavior assistance. Default is 0."),needsIconsConfidence:A.number().min(0).max(1).default(0).describe("Confidence (0-1) to include Icons assistance. Default is 0."),componentsNeeded:A.array(A.enum(g)).optional().describe(`Optional list of specific ${h} components needed for the project.`)}},async({userIntent:m,needsComponentsDocsConfidence:y,needsLayoutConfidence:c,needsStylingConfidence:f,needsResponsiveBehaviorConfidence:k,needsIconsConfidence:S,componentsNeeded:R},{_meta:N})=>{let H=T(u,N);b("UI Orchestrator called with:",{userIntent:m,needsComponentsDocsConfidence:y,needsLayoutConfidence:c,needsStylingConfidence:f,needsResponsiveBehaviorConfidence:k,needsIconsConfidence:S});try{await t.recordOrchestratorUserRequest({meta:{userIntent:m,componentsNeeded:R,...H}})}catch(_){throw L(_)}let E=u.server?.server.getClientCapabilities?.()?.elicitation,K;if(E&&f>.3&&f<=.6){let _=await u.server?.server.elicitInput({message:"I was unable to determine if you need custom Kendo Theme assistant. Can you please confirm?",requestedSchema:{type:"object",properties:{includeCustomTheming:{type:"boolean",description:"Whether to include Custom Theming assistance in the workflow."}},required:["includeCustomTheming"]}});_?.action==="accept"&&_.content?.includeCustomTheming&&(K=!0)}return{content:[{type:"text",text:B({name:o,userIntent:m,includeComponentsDocs:y>.3,includeTheming:f>.6||!!K,includeLayout:c>.5,includeIcons:S>.6,includeResponsive:c>.5&&k>.4,layoutAssistantName:a,codeAssistantName:r,styleAssistantName:i,iconAssistantName:l,accessibilityAssistantName:p,suiteName:h,libKey:v,components:R})}]}});return u}function fe(e,t){let{name:o,title:s,description:n,iconAssistantName:a,codeAssistantName:r,suiteName:i,libKey:l,components:p}=e,h=new w(o,{title:s,description:n,inputSchema:{userIntent:A.string().describe(`Describe what you want to build or what components you're looking for. Include the type of functionality, features, or UI elements you need from ${i}.`),needsIconsConfidence:A.number().min(0).max(1).default(.7).describe("Confidence (0-1) to include Icons assistance. Default is 0.7."),componentsNeeded:A.array(A.enum(p)).optional().describe(`Optional list of specific ${i} components you want to learn about.`)},requiredAccess:e.requiredAccess},async({userIntent:v,needsIconsConfidence:g,componentsNeeded:u},{_meta:m})=>{let y=T(h,m);b("Assistant Orchestrator called with:",{userIntent:v,needsIconsConfidence:g,componentsNeeded:u});try{await t.recordOrchestratorUserRequest({meta:{userIntent:v,componentsNeeded:u,...y}})}catch(f){throw L(f)}return{content:[{type:"text",text:J({name:o,userIntent:v,includeComponentsDocs:!0,includeIcons:g>.5,codeAssistantName:r,iconAssistantName:a,suiteName:i,libKey:l,components:u})}]}});return h}function ye(e,t){let{name:o,title:s,description:n,suiteName:a,libKey:r,getPreContent:i}=e,l=new w(o,{title:s,description:n,requiredAccess:e.requiredAccess,inputSchema:{prompt:A.string().describe("An enhanced prompt describing the HTML layout structure, design requirements or specific visual effects you want to achieve."),includeBuildingBlockExamples:A.boolean().describe("Whether to include building block examples. Defaults to false.").default(!1)}},async({prompt:p,includeBuildingBlockExamples:h},{_meta:v})=>{let g=T(l,v);b("Layout Assistant called with:",{prompt:p,includeBuildingBlockExamples:h});try{let m=(await t.queryCssUtils({query:p},{...g})).values.join(`
|
|
131
|
+
`)||"No CSS utilities found for the given prompt.",y=i?.()??"",c=f=>`${y}
|
|
552
132
|
|
|
553
133
|
# Kendo Design System CSS Utilities
|
|
554
134
|
|
|
555
|
-
${
|
|
135
|
+
${m}
|
|
556
136
|
${f??""}
|
|
557
|
-
`;if(
|
|
137
|
+
`;if(h)try{let f=await t.queryBuildingBlocks({query:p,lib_name:r},{...g}),k="";f.items?.length>0&&(k=`
|
|
558
138
|
## Building Blocks Examples
|
|
559
139
|
|
|
560
140
|
The examples here are for demonstration purpose how CSS utils can be implemented in various building blocks.
|
|
561
141
|
However, consider your own design requirements and specifics in order to implement your templates/building blocks correctly.
|
|
562
142
|
|
|
563
|
-
${f.items.map(
|
|
564
|
-
### ${
|
|
143
|
+
${f.items.map(S=>`
|
|
144
|
+
### ${S.name}
|
|
565
145
|
|
|
566
|
-
${
|
|
146
|
+
${S.description}
|
|
567
147
|
|
|
568
148
|
\`\`\`code
|
|
569
|
-
${
|
|
149
|
+
${S.code}
|
|
570
150
|
\`\`\`
|
|
571
151
|
`).join(`
|
|
572
|
-
`)}`),
|
|
152
|
+
`)}`),m=c(k)}catch(f){b("Error calling building-blocks service:",f),m=c()}else m=c();return{content:[{type:"text",text:m}]}}catch(u){throw L(u)}});return l}function be(e,t){let{name:o,title:s,description:n,libKey:a,getPreContent:r}=e,i=new w(o,{title:s,description:n,requiredAccess:e.requiredAccess,inputSchema:{prompt:A.string().describe("A natural language description of the desired visual style or theme. For example: 'Create a modern dark theme with high contrast'.")}},async({prompt:l},{_meta:p})=>{let h=T(i,p);b("Style Assistant called with:",{prompt:l});let v="";try{let m=await t.queryThemeGenerate({prompt:l},{...h});if(m.variables_json){let y=JSON.parse(m.variables_json),c=[];if(y)for(let f of Object.keys(y))typeof y[f]=="string"&&c.push(`${f}: ${y[f]}`);v=c.join(`
|
|
573
153
|
|
|
574
|
-
`)}}catch(
|
|
154
|
+
`)}}catch(m){throw L(m)}let g=r?.()??"";return{content:[{type:"text",text:v?`Use the following CSS variables to style the web application, including colors, typography, spacing, and component appearance.
|
|
575
155
|
Ensure the variables are applied consistently across all relevant elements.
|
|
576
156
|
Do NOT set any inline styles. CSS variables should be defined in global or component-level CSS files, or via supported theming mechanisms.
|
|
577
157
|
|
|
578
|
-
${
|
|
158
|
+
${g}
|
|
579
159
|
|
|
580
160
|
## Generated CSS Variables
|
|
581
161
|
|
|
582
162
|
\`\`\`css
|
|
583
|
-
${
|
|
163
|
+
${v}
|
|
584
164
|
\`\`\`
|
|
585
|
-
`:"No CSS variables were generated for the given prompt."}]}});return
|
|
165
|
+
`:"No CSS variables were generated for the given prompt."}]}});return i}function Ce(e,t){let{name:o,title:s,description:n,libKey:a,getPostContent:r}=e,i=new w(o,{title:s,description:n,requiredAccess:e.requiredAccess,inputSchema:{query:A.string().describe("A search query for finding icons. Be specific about the icon purpose, style, or action."),limit:A.number().min(.1).max(1).default(.1).describe("The proportion of matching icons to return (0.1 = 1 icon, 0.5 = 5 icons, 1.0 = many icons). Default is 0.1.")}},async({query:l,limit:p},{_meta:h})=>{let v=T(i,h);b("Icon Search called with:",{query:l,limit:p});try{let g=await t.queryIconsSearch({query:l,limit:p*100},{...v}),u=r?.()??"";return{content:[{type:"text",text:`${g.values.join(`
|
|
586
166
|
|
|
587
167
|
`)}
|
|
588
168
|
|
|
589
|
-
${
|
|
169
|
+
${u}`}]}}catch(g){throw L(g)}});return i}function ve(e,t){let{name:o,title:s,description:n,libKey:a,suiteName:r,components:i,componentAliases:l,getPostContent:p}=e,h=new w(o,{title:s,description:n,requiredAccess:e.requiredAccess,inputSchema:{query:A.string().describe("The query to search for."),component:A.enum(i).describe("The component to search for. If not specified, use General.")}},async({query:v,component:g},{_meta:u})=>{let m=T(h,u);b("Code Assistant called with:",{query:v,component:g});let y=g;if(l){let c=l[g];c&&(y=c)}try{let f=(await t.query({query:v,component:y?.toLowerCase()??"general",lib_name:a,text_matches_count:3,code_matches_count:0,allowed_types:["documentation"]},{...m})).values.map(R=>R.replace(/\0/g,"")),k=p?.({component:g})??"";return{content:[{type:"text",text:`${f.join(`
|
|
590
170
|
|
|
591
171
|
`)}
|
|
592
172
|
|
|
593
|
-
${
|
|
173
|
+
${k}`}]}}catch(c){throw L(c)}});return h}function Ae(e,t){let{name:o,title:s,description:n,libKey:a,suiteName:r,components:i,componentAliases:l}=e,p=new w(o,{title:s,description:n,requiredAccess:e.requiredAccess,inputSchema:{query:A.string().describe("The query to search for."),component:A.enum(i).describe("The component to search for. If not specified, use General."),includeGeneralGuidelines:A.boolean().default(!1).describe("Set to true only on the first call to include comprehensive WCAG 2.2 Level AA general guidelines. After the first call, set to false to get only component-specific accessibility information. Default is false.")}},async({query:h,component:v,includeGeneralGuidelines:g},{_meta:u})=>{let m=T(p,u);b("Accessibility Assistant called with:",{query:h,component:v,includeGeneralGuidelines:g});let y=v;if(l){let c=l[v];c&&(y=c)}try{let c="";if(g){let N=ce();c+=`# WCAG 2.2 Level AA General Accessibility Guidelines
|
|
594
174
|
|
|
595
|
-
`,c+=
|
|
175
|
+
`,c+=N,c+=`
|
|
596
176
|
|
|
597
177
|
---
|
|
598
178
|
|
|
599
|
-
`}let
|
|
179
|
+
`}let R=(await t.getApiRefMatches({query:h,component:y?.toLowerCase()??"general",lib_name:a,filters_json:'{"type":{"$in":["accessibility"]}}'},{...m})).values.map(N=>N.replace(/\0/g,"")).map(N=>Tt(N,y?.toLowerCase()??"general")).join(`
|
|
600
180
|
|
|
601
|
-
`);return
|
|
181
|
+
`);return R?(g&&(c+=`# Component-Specific Accessibility Information
|
|
602
182
|
|
|
603
|
-
`),c+=
|
|
183
|
+
`),c+=R):g||(c="No component-specific accessibility guidelines found."),{content:[{type:"text",text:c}]}}catch(c){throw L(c)}});return p}function L(e){let t=e;return t.code===16?new Error("Error: You are not authenticated. Please verify the Telerik License Key provided is valid."):t.code===8?new Error(`Error: You have exceeded the extension quota. Upgrade to subscription licensing to unlock full access. Message: ${t.message}.`):t.code===7?new Error("Error: You do not have permission to access this resource. Please verify that you have a valid license."):new Error(`Error: An error occurred while calling the service. Please try again later.
|
|
604
184
|
|
|
605
|
-
Error Code: ${t.code} Error Message: ${t.message}`)}var
|
|
185
|
+
Error Code: ${t.code} Error Message: ${t.message}`)}var It=20*1024*1024,xe=1200*1e3;function ge(e){return{content:[{type:"text",text:`Upgrade timed out after ${xe/6e4} minutes.
|
|
606
186
|
|
|
607
187
|
**Some codemods may have already been applied to your files.** Review any modified files before proceeding.
|
|
608
188
|
|
|
609
189
|
To complete the upgrade, run this tool again with specific package names via the \`packageNames\` parameter to upgrade one package at a time.${e?`
|
|
610
190
|
|
|
611
191
|
## Partial output before timeout
|
|
612
|
-
`+e:""}`}]}}function
|
|
192
|
+
`+e:""}`}]}}function ke(e,t){let{name:o,title:s,description:n,suiteName:a,packagePrefix:r}=e,i=new w(o,{title:s,description:n,requiredAccess:e.requiredAccess,inputSchema:{workingDirectory:A.string().describe('The absolute path to the project directory where the upgrade should be executed (e.g., "/Users/username/my-app")'),packageNames:A.array(A.string()).optional().describe(`The package names to target for codemod upgrade (e.g., ["${r}grid", "${r}buttons"]). Defaults to upgrading all installed @progress packages if not specified. When specified, skips package installation and only runs codemods \u2014 the packages must already be installed at the target version before calling this tool.`),skipInstall:A.boolean().optional().describe("Skip npm package installation and only run codemods. Use this when package installation has already been done manually.")}},async({workingDirectory:l,packageNames:p,skipInstall:h},{_meta:v})=>{let g=T(i,v);try{await t.recordToolUserRequest({toolName:o,meta:g})}catch(u){console.error("Error recording tool request:",u)}try{try{await wt(l)}catch{return{content:[{type:"text",text:`The working directory does not exist: "${l}". Please provide a valid absolute path to your project.`}]}}let u=!1;try{await me("npx",["--no","--","kendo","--version"],{cwd:l}),u=!0}catch{u=!1}let m=[],y=async(E,K=!1)=>{try{let P=!K&&u?["--no","--","kendo",...E]:["-y","@progress/kendo-cli",...E],{stdout:_,stderr:at}=await me("npx",P,{cwd:l,maxBuffer:It,timeout:xe});return{timedOut:!1,stdout:_,stderr:at}}catch(P){return P.killed?{timedOut:!0,partialOutput:P.stdout?.trim()}:{timedOut:!1,stdout:P.stdout||"",stderr:P.stderr||P.message}}},c=["migrate",...p??[],"--codemods","--force","--ai-mode"];(h||p?.length)&&c.push("--no-install");let f=await y(c);if(f.timedOut)return ge(f.partialOutput);let k=f.stdout,S=f.stderr;if(S?.includes("Unknown argument")){let E=await y(c,!0);if(E.timedOut)return ge(E.partialOutput);k=E.stdout,S=E.stderr}S?.trim()&&m.push(`
|
|
613
193
|
Errors:
|
|
614
|
-
${S}`),
|
|
194
|
+
${S}`),k?.trim()&&m.push(k.trim());let R=k.includes("Packages installed successfully."),N=k.includes("Package installation failed:"),H=k.includes("Running codemod:");return N?m.push(`
|
|
615
195
|
## Upgrade Status
|
|
616
|
-
Package installation failed. The npm packages were not updated. Inform the user of the error and update the package versions in package.json manually to the target version. Once done, call this tool again with skipInstall set to true.`):
|
|
196
|
+
Package installation failed. The npm packages were not updated. Inform the user of the error and update the package versions in package.json manually to the target version. Once done, call this tool again with skipInstall set to true.`):R&&m.push(`
|
|
617
197
|
## Upgrade Status
|
|
618
|
-
Upgrade complete. npm packages have been installed and updated in the project.`),
|
|
619
|
-
`)}]}}catch(
|
|
198
|
+
Upgrade complete. npm packages have been installed and updated in the project.`),H&&m.push(Z()),{content:[{type:"text",text:m.join(`
|
|
199
|
+
`)}]}}catch(u){return{content:[{type:"text",text:`Error: ${u.message||u.toString()}`}]}}});return i}var we=e=>`${e}_ui_generator`,Se=e=>`${e}_assistant`,Te=e=>`${e}_layout_assistant`,Ie=e=>`${e}_component_assistant`,Re=e=>`${e}_style_assistant`,Ne=e=>`${e}_icon_assistant`,Ee=e=>`${e}_accessibility_assistant`,Ue=e=>`${e}_getting_started_assistant`,Pe=e=>`${e}_upgrade_assistant`;var De=e=>`This is the single entry point for all UI-related tasks. It orchestrates the full workflow of building or refining UIs with ${e} components, generating a step-by-step execution plan that specifies which tools to call, in what order, and with what parameters. It includes validation steps to ensure the best possible, standards-compliant code every time.
|
|
620
200
|
|
|
621
201
|
Use the tool when:
|
|
622
202
|
- Want to build or modify a complete page or section layout
|
|
@@ -625,7 +205,7 @@ Upgrade complete. npm packages have been installed and updated in the project.`)
|
|
|
625
205
|
- You want to enforce best practices in styling, performance, and accessibility
|
|
626
206
|
|
|
627
207
|
Returns:
|
|
628
|
-
A detailed execution plan with validated tool calls, parameters, and reasoning \u2014 ensuring consistent, high-quality UI generation.`,
|
|
208
|
+
A detailed execution plan with validated tool calls, parameters, and reasoning \u2014 ensuring consistent, high-quality UI generation.`,Le=e=>`Provides guidance for discovering and using ${e} components and icons. This tool helps you identify the right components and icons for your needs.
|
|
629
209
|
|
|
630
210
|
Use this tool when:
|
|
631
211
|
- You need to discover which ${e} components are suitable for a specific use case
|
|
@@ -634,20 +214,20 @@ Use this tool when:
|
|
|
634
214
|
- You want to gather component documentation and examples
|
|
635
215
|
|
|
636
216
|
Returns:
|
|
637
|
-
A focused plan for gathering component documentation and icon suggestions using the Component Assistant and Icon Assistant tools.`,
|
|
217
|
+
A focused plan for gathering component documentation and icon suggestions using the Component Assistant and Icon Assistant tools.`,_e=`Retrieves Progress/Kendo Design System CSS utility classes and styling recommendations based on layout and design requirements.
|
|
638
218
|
Use this tool to find the right CSS utilities for styling Kendo UI components or general web elements.
|
|
639
219
|
It analyzes the provided design context and returns relevant utility classes with explanations and examples.
|
|
640
|
-
Best suited for styling questions related to typography, spacing, colors, layout, transforms, and other utilities in the Progress/Kendo Design System.`,
|
|
220
|
+
Best suited for styling questions related to typography, spacing, colors, layout, transforms, and other utilities in the Progress/Kendo Design System.`,Ge=`Generates CSS variables using an external style agent based on the user's styling prompt.
|
|
641
221
|
|
|
642
222
|
Use this tool when the user wants to:
|
|
643
223
|
- Update the visual theme of an application
|
|
644
224
|
- Modify color schemes
|
|
645
225
|
- Restyle the UI with CSS variables
|
|
646
226
|
|
|
647
|
-
The tool outputs a set of CSS variable definitions ready to be applied to style files
|
|
227
|
+
The tool outputs a set of CSS variable definitions ready to be applied to style files.`,$e=`Searches for icons in the Telerik Icons library.
|
|
648
228
|
Use this tool when the user needs to find specific icons for UI components or design elements.
|
|
649
229
|
It supports searching by icon name, category, or keyword and returns matching icons from the Telerik Icons library.
|
|
650
|
-
`,
|
|
230
|
+
`,Oe=e=>`Provides answers and retrieves official documentation for ${e}.
|
|
651
231
|
|
|
652
232
|
Use this tool when the user asks about:
|
|
653
233
|
- ${e} features or capabilities
|
|
@@ -657,7 +237,7 @@ Use this tool when the user asks about:
|
|
|
657
237
|
|
|
658
238
|
Set the user's full question as the 'query' parameter.
|
|
659
239
|
If the question refers to a specific ${e} component, include its name in the 'component' parameter.
|
|
660
|
-
`,
|
|
240
|
+
`,qe=e=>`Retrieves accessibility guidance for ${e} components with optional general WCAG 2.2 Level AA guidelines.
|
|
661
241
|
|
|
662
242
|
Use this tool when:
|
|
663
243
|
- You need component-specific accessibility information and API references
|
|
@@ -675,12 +255,12 @@ Set 'includeGeneralGuidelines=true' ONLY on the first call to include general WC
|
|
|
675
255
|
Returns:
|
|
676
256
|
- When includeGeneralGuidelines=true: General WCAG 2.2 Level AA guidelines + component-specific recommendations
|
|
677
257
|
- When includeGeneralGuidelines=false: Only component-specific accessibility recommendations
|
|
678
|
-
`,
|
|
258
|
+
`,Me=(e,t)=>`Runs codemods to upgrade ${e} code from one version directly to another using @progress/kendo-cli.
|
|
679
259
|
|
|
680
260
|
To upgrade to the latest version, call this tool directly. It handles installation automatically.
|
|
681
261
|
|
|
682
262
|
To upgrade to a specific version:
|
|
683
|
-
1. Set all
|
|
263
|
+
1. Set all ${t}* package versions to the target version (e.g. "20.0.0")
|
|
684
264
|
2. Run: npm install
|
|
685
265
|
3. Call this tool with skipInstall: true
|
|
686
266
|
|
|
@@ -700,195 +280,36 @@ Workflow:
|
|
|
700
280
|
1. Run this upgrade tool to apply codemods.
|
|
701
281
|
2. After the codemods complete, grep the project source files for every outdated value mentioned in the codemod output (e.g. old property names, renamed enum values) to find any remaining occurrences the codemod doesn't handle automatically, and fix them all.
|
|
702
282
|
3. Follow the additional instructions to complete the upgrade process.
|
|
703
|
-
`;var
|
|
704
|
-
### Angular Component Validation
|
|
705
|
-
Component Structure:
|
|
706
|
-
- Use proper @Component decorator configuration
|
|
707
|
-
- If using NgModule setup use @Component decorator with \`standalone: false\` and declare component in NgModule declarations array
|
|
708
|
-
- Correct selector naming convention (kebab-case)
|
|
709
|
-
- Appropriate template and style file organization
|
|
710
|
-
|
|
711
|
-
${te.SETUP_VALIDATION}
|
|
712
|
-
- Kendo animations module configured (if animations are used)
|
|
713
|
-
- Internationalization properly configured for Kendo components
|
|
714
|
-
|
|
715
|
-
${te.PERFORMANCE_OPTIMIZATION}
|
|
716
|
-
- OnPush change detection strategy where appropriate
|
|
717
|
-
- Efficient \`track\` expression used in \`@for\` blocks with Kendo components
|
|
718
|
-
- Minimal unnecessary change detection cycles
|
|
719
|
-
|
|
720
|
-
${te.THEME_AND_STYLING}
|
|
721
|
-
- Proper theme switching functionality (if implemented)
|
|
722
|
-
- Only ONE theme reference exists across angular.json and styles files
|
|
723
|
-
- Make sure theme import mechanism is consistent with existing project setup
|
|
724
|
-
|
|
725
|
-
Accessibility
|
|
726
|
-
- Accessibility guidelines retrieved and applied to all components`;var ne=`**Angular Specific Requirements:**
|
|
727
|
-
|
|
728
|
-
**NgModule vs Standalone setup**: Search and detect the current project setup to determine whether to use NgModule or Standalone components based on the following rules:
|
|
729
|
-
1. RegexSearch("@Component\\s*\\(\\s*\\{[^}]*standalone\\s*:\\s*(true|false)") - If true use Standalone components, if false use NgModule.
|
|
730
|
-
2. RegexSearch("bootstrapApplication\\s*\\(") - If found use Standalone components.
|
|
731
|
-
3. RegexSearch("bootstrapModule\\s*\\(") - If found use NgModule.
|
|
732
|
-
4. If neither is found, default to Standalone components.
|
|
733
|
-
|
|
734
|
-
**Template Syntax**: Detect which Angular template syntax the project uses and apply it consistently:
|
|
735
|
-
1. RegexSearch("@if\\s*\\(|@for\\s*\\(|@switch\\s*\\(") - If found, use built-in control flow syntax (\`@if\`, \`@for\`, \`@switch\`) in all templates.
|
|
736
|
-
2. RegexSearch("\\*ngIf|\\*ngFor|\\*ngSwitch") - If found, use structural directives (\`*ngIf\`, \`*ngFor\`, \`*ngSwitch\`) in all templates.
|
|
737
|
-
3. Do NOT mix both syntaxes in the same project.
|
|
738
|
-
4. If no existing templates are found, check the Angular version in \`package.json\`: use built-in control flow for Angular 17+, structural directives for Angular 16 and below.
|
|
739
|
-
|
|
740
|
-
**Kendo UI Theme Management Instructions for Angular**:
|
|
741
|
-
|
|
742
|
-
**Determine existing Kendo Theme/Utils package and Theme Import Mechanism**:
|
|
743
|
-
|
|
744
|
-
- Read angular.json file
|
|
745
|
-
- Look for theme/utils entries containing "@progress/kendo-theme-" in projects.[project-name].architect.build.options.styles array
|
|
746
|
-
- Read styles.css or styles.scss, or any css/scss file
|
|
747
|
-
- Look for @import statements containing "@progress/kendo-theme-" to determine existing theme/utils usage
|
|
748
|
-
- Read the application's main html file (e.g., index.html)
|
|
749
|
-
- Look for link tags containing "@progress/kendo-theme-" referencing Kendo theme/util CSS files
|
|
750
|
-
- Note which theme is found (meridian, default, material, bootstrap, or fluent)
|
|
751
|
-
- Note whether the kendo-theme-utils package is already used
|
|
752
|
-
- Note the mechanism used to include the theme (angular.json or styles file)
|
|
753
|
-
|
|
754
|
-
**Project Consistency**: Before generating or modifying any code:
|
|
755
|
-
1. Use RegexSearch to identify existing patterns in the project:
|
|
756
|
-
- Component naming conventions (e.g., "export class \\w+Component")
|
|
757
|
-
- File naming patterns (e.g., "*.component.ts", "*.service.ts")
|
|
758
|
-
- Import statement styles
|
|
759
|
-
- TypeScript configuration (strict mode, decorators, etc.)
|
|
760
|
-
2. Match the discovered patterns in all generated code
|
|
761
|
-
3. Maintain consistent formatting, indentation, and code organization with existing files
|
|
762
|
-
4. Always use the same theme import mechanism (unless user specifies otherwise)
|
|
763
|
-
`;var se=O("Kendo UI","KendoReact"),ae=`
|
|
764
|
-
### React Component Validation
|
|
765
|
-
Component Structure:
|
|
766
|
-
- Use proper function component patterns with Hooks
|
|
767
|
-
- Correct component naming convention (PascalCase)
|
|
768
|
-
- Appropriate file organization (components, hooks, utils)
|
|
769
|
-
- Props interface/type definitions where needed
|
|
770
|
-
|
|
771
|
-
${se.SETUP_VALIDATION}
|
|
772
|
-
- KendoReact license validation (if required)
|
|
773
|
-
- Appropriate bundler configuration for KendoReact packages
|
|
774
|
-
|
|
775
|
-
${se.PERFORMANCE_OPTIMIZATION}
|
|
776
|
-
- React.memo for components that receive stable props
|
|
777
|
-
- useMemo/useCallback for expensive computations and callbacks
|
|
778
|
-
- Proper key props for list rendering with KendoReact components
|
|
779
|
-
|
|
780
|
-
${se.THEME_AND_STYLING}
|
|
781
|
-
- Proper theme switching functionality (if implemented)
|
|
782
|
-
- Only ONE theme import exists across the application
|
|
783
|
-
- Make sure theme import mechanism is consistent with existing project setup
|
|
784
|
-
|
|
785
|
-
Accessibility
|
|
786
|
-
- Accessibility guidelines retrieved and applied to all components`;var Ot={createOrchestrator:xe,createAssistantOrchestrator:Ie,createLayoutAssistant:Ne,createStyleAssistant:Ee,createIconSearch:Re,createCodeAssistant:Pe,createAccessibilityAssistant:De,createUpgrade:Oe},Gt={orchestrator:Ge,assistantOrchestrator:Le,layoutAssistant:Me,codeAssistant:$e,styleAssistant:_e,iconAssistant:Fe,accessibilityAssistant:qe,gettingStartedAssistant:Be,upgradeAssistant:Ke},Lt={orchestrator:je,assistantOrchestrator:Ve,layoutAssistant:He,styleAssistant:We,iconAssistant:ze,codeAssistant:Ye,accessibilityAssistant:Qe,upgradeAssistant:Xe},Mt={Orchestrator:{render:B},Validator:{render:q},SharedValidation:{getSteps:O}},$t={Angular:{steps:oe,additionalPlan:ne},React:{steps:ae}},A={Tools:Ot,ToolNames:Gt,ToolDescriptions:Lt,Templates:Mt,Validation:$t};var _t=A.ToolNames.codeAssistant("kendoreact"),Je=()=>`# Kendo Design System Guidelines for ${u}
|
|
787
|
-
|
|
283
|
+
`;var Rt={createOrchestrator:he,createAssistantOrchestrator:fe,createLayoutAssistant:ye,createStyleAssistant:be,createIconSearch:Ce,createCodeAssistant:ve,createAccessibilityAssistant:Ae,createUpgrade:ke},Nt={orchestrator:we,assistantOrchestrator:Se,layoutAssistant:Te,codeAssistant:Ie,styleAssistant:Re,iconAssistant:Ne,accessibilityAssistant:Ee,gettingStartedAssistant:Ue,upgradeAssistant:Pe},Et={orchestrator:De,assistantOrchestrator:Le,layoutAssistant:_e,styleAssistant:Ge,iconAssistant:$e,codeAssistant:Oe,accessibilityAssistant:qe,upgradeAssistant:Me},Ut={Orchestrator:{render:B},UX:{getInstructions:$}},C={Tools:Rt,ToolNames:Nt,ToolDescriptions:Et,Templates:Ut};var Fe=()=>`# Kendo Design System Guidelines for ${d}
|
|
788
284
|
## Setting up Styles/CSS
|
|
789
|
-
|
|
790
|
-
In order to use any of the utility classes from the Kendo Design System, make sure to include a reference to the kendo-theme-utils CSS package.
|
|
791
|
-
|
|
792
|
-
**Important**: To include the kendo-theme-utils always use the same theme import mechanism (noted during the plan phase) as the rest of the Kendo themes in your project.
|
|
793
|
-
**Important**: Include the kendo-theme-utils only once in your project. Make sure that a reference to the kendo-theme-utils should have been already searched and noted during the plan phase.
|
|
285
|
+
Include a reference to the kendo-theme-utils CSS package and use the same import mechanism as the existing Kendo theme.
|
|
794
286
|
|
|
795
287
|
### Using NPM
|
|
796
|
-
|
|
797
|
-
The CSS Utilities are available as an NPM module that you can install - \`@progress/kendo-theme-utils\`
|
|
798
|
-
|
|
799
288
|
To install: \`npm install --save @progress/kendo-theme-utils\`
|
|
800
289
|
|
|
801
|
-
|
|
802
|
-
|
|
803
|
-
Also, available as SCSS and you can include it on your SCSS file - \`@use '@progress/kendo-theme-utils/scss/all.scss' as *;\`
|
|
804
|
-
|
|
805
|
-
### Using CDN
|
|
806
|
-
|
|
807
|
-
Alternatively, you can also consume them directly from the Unpkg CDN.
|
|
808
|
-
|
|
809
|
-
\`<link rel="stylesheet" href="https://unpkg.com/@progress/kendo-theme-utils/dist/all.css" />\`
|
|
810
|
-
|
|
811
|
-
## Ready-to-use Layout Components
|
|
812
|
-
|
|
813
|
-
In the ${u} there are available components to create layout. Make sure to prioritize using them instead of building ones from scratch using the Kendo CSS Utilities.
|
|
814
|
-
|
|
815
|
-
For any Layout component you can also call the ${_t} tool in order to get specific API reference and docs.
|
|
816
|
-
|
|
817
|
-
- ${u} Card component.
|
|
818
|
-
- Generally, it is recommended to use 100% width (e.g., \`<Card style={{ width: '100%' }}>\`)
|
|
819
|
-
- If needed, use specific width based on the layout requirements (e.g., \`<Card style={{ width: '150px' }}>\`)
|
|
820
|
-
- Avoid applying additional styling properties such as \`display\`, \`flex\`, \`grid\`, or other layout-specific CSS to layout components such as Splitter, DockLayout, and TileLayout. Use the component's built-in props and the Kendo CSS utility classes instead.
|
|
821
|
-
|
|
822
|
-
## Page Shell Patterns
|
|
823
|
-
|
|
824
|
-
Choose the pattern that matches the page structure:
|
|
825
|
-
|
|
826
|
-
**Pattern A \u2014 Sidebar + Main Content**
|
|
827
|
-
\`\`\`css
|
|
828
|
-
.app-shell {
|
|
829
|
-
display: flex;
|
|
830
|
-
height: 100vh;
|
|
831
|
-
}
|
|
832
|
-
.sidebar {
|
|
833
|
-
width: 240px;
|
|
834
|
-
flex-shrink: 0;
|
|
835
|
-
}
|
|
836
|
-
.main-content {
|
|
837
|
-
flex: 1;
|
|
838
|
-
min-width: 0; /* Critical: prevents flex children from overflowing */
|
|
839
|
-
overflow: auto;
|
|
840
|
-
}
|
|
841
|
-
\`\`\`
|
|
842
|
-
|
|
843
|
-
**Pattern B \u2014 Centered Single-Column (forms, detail pages)**
|
|
844
|
-
\`\`\`css
|
|
845
|
-
.page-container {
|
|
846
|
-
max-width: 960px;
|
|
847
|
-
margin: 0 auto;
|
|
848
|
-
padding: 0 1rem;
|
|
849
|
-
}
|
|
850
|
-
\`\`\`
|
|
851
|
-
|
|
852
|
-
**Pattern C \u2014 Master-Detail Split**
|
|
853
|
-
\`\`\`css
|
|
854
|
-
.split-container {
|
|
855
|
-
display: grid;
|
|
856
|
-
grid-template-columns: 420px 1fr;
|
|
857
|
-
height: 100%;
|
|
858
|
-
}
|
|
859
|
-
\`\`\`
|
|
860
|
-
|
|
861
|
-
## Dashboard Layout
|
|
862
|
-
|
|
863
|
-
**KPI metric row** (auto-responsive, min 180px per card):
|
|
864
|
-
\`\`\`css
|
|
865
|
-
.kpi-row {
|
|
866
|
-
display: grid;
|
|
867
|
-
grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
|
|
868
|
-
gap: 1rem;
|
|
869
|
-
}
|
|
870
|
-
\`\`\`
|
|
871
|
-
|
|
872
|
-
**Side-by-side charts** (equal width, no overflow):
|
|
873
|
-
\`\`\`css
|
|
874
|
-
.chart-row {
|
|
875
|
-
display: grid;
|
|
876
|
-
grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
|
|
877
|
-
gap: 1rem;
|
|
878
|
-
}
|
|
879
|
-
\`\`\`
|
|
290
|
+
Also available as SCSS - \`@use '@progress/kendo-theme-utils/scss/all.scss' as *;\`
|
|
291
|
+
Alternatively, use CDN: \`<link rel="stylesheet" href="https://unpkg.com/@progress/kendo-theme-utils/dist/all.css" />\`
|
|
880
292
|
|
|
881
|
-
|
|
293
|
+
### Default Behavior
|
|
294
|
+
- Use the Kendo Design System utilities for layout.
|
|
295
|
+
- Use theme utility classes instead of custom CSS whenever a utility exists. Write custom CSS only for properties without a utility equivalent.
|
|
296
|
+
- Do not use overrides for Kendo internals when a utility or component configuration can express the rule.
|
|
297
|
+
- Prioritize using ${d} components instead of building ones from scratch.
|
|
882
298
|
|
|
883
|
-
-
|
|
884
|
-
-
|
|
885
|
-
-
|
|
886
|
-
- Never leave Grid column widths unset \u2014 without a height, Grid renders all rows and expands the page indefinitely..
|
|
887
|
-
- Constrain page content to \`max-width: 1440px\` with \`margin: 0 auto\` to prevent unbounded wide-screen stretching, unless the project defines a different maximum content width.
|
|
299
|
+
- ${d} Card component.
|
|
300
|
+
- Generally use 100% width (e.g., \`<Card style={{ width: '100%' }}>\`)
|
|
301
|
+
- Or set width based on the layout requirements (e.g., \`<Card style={{ width: '150px' }}>\`)
|
|
888
302
|
|
|
889
|
-
|
|
303
|
+
- **\`min-width: 0\`** on every flex/grid child that contains a Kendo component.
|
|
304
|
+
- Grid and Chart require an explicit height.
|
|
305
|
+
- Grid columns require an explicit width.
|
|
306
|
+
- Custom cards and containers must use \`var(--kendo-component-bg)\` for their background.
|
|
307
|
+
- Dropdowns, DateInputs, Inputs are \`display: inline-block\` by default. Apply \`style="width: 100%"\` or wrap in a layout container to ensure consistent sizing in forms.
|
|
308
|
+
- Avoid \`transform\` on layout ancestors that contain Kendo overlay components.
|
|
309
|
+
- Avoid applying additional styling properties such as \`display\`, \`flex\`, \`grid\`, or other layout-specific CSS to layout components such as Splitter, DockLayout, and TileLayout. Use the component's built-in props and the Kendo CSS utility classes.
|
|
310
|
+
- By default constrain page content to \`max-width: 1440px\` with \`margin: 0 auto\` to prevent unbounded wide-screen stretching.
|
|
890
311
|
|
|
891
|
-
|
|
312
|
+
Always add to the global CSS file after any theme import:
|
|
892
313
|
|
|
893
314
|
\`\`\`css
|
|
894
315
|
html, body {
|
|
@@ -897,30 +318,13 @@ html, body {
|
|
|
897
318
|
}
|
|
898
319
|
\`\`\`
|
|
899
320
|
|
|
900
|
-
Without this, dark-themed components render on a white page.
|
|
901
|
-
|
|
902
321
|
## Surface Hierarchy
|
|
903
|
-
|
|
904
|
-
|
|
905
|
-
|
|
906
|
-
|
|
907
|
-
|
|
908
|
-
|
|
909
|
-
|
|
910
|
-
Custom cards and containers must use \`var(--kendo-component-bg)\` for their background \u2014 never \`#fff\` or other hardcoded values. Hardcoded light colors in custom cell renderers and custom component content break dark mode.
|
|
911
|
-
|
|
912
|
-
## Splitter Usage Boundary
|
|
913
|
-
|
|
914
|
-
Use the \`Splitter\` component only for **user-resizable** content areas (e.g., master-detail panels, side-by-side editors). Do **not** use it for static page layout \u2014 CSS Grid and Flexbox handle that with zero JavaScript overhead.
|
|
915
|
-
|
|
916
|
-
## Inline Input Width
|
|
917
|
-
|
|
918
|
-
\`DropDownList\`, \`DatePicker\`, \`Input\`, and similar inline inputs are \`display: inline-block\` by default and will **not** fill their container automatically. Apply \`style={{ width: '100%' }}\` or wrap in a layout container to ensure consistent sizing in forms.
|
|
919
|
-
|
|
920
|
-
## Popup Z-Index Trap
|
|
921
|
-
|
|
922
|
-
CSS \`transform\` (including \`translate3d(0,0,0)\` GPU-compositing tricks) on any ancestor element creates a new stacking context. This clips Kendo popups (which use \`z-index ~10000\`), causing DropDownList, DatePicker, and ComboBox popups to appear behind other elements. Avoid \`transform\` on layout ancestors that contain Kendo overlay components.
|
|
923
|
-
`;var Ze=()=>`## Design Standards for ${u} Theming
|
|
322
|
+
Use only the four surface levels defined by the Kendo themes
|
|
323
|
+
1. Page background (\`var(--kendo-body-bg)\`) \u2014 applied to \`html, body\`
|
|
324
|
+
2. Component background (\`var(--kendo-component-bg)\`) \u2014 cards, panels, Grid body
|
|
325
|
+
3. Header / hover surface (\`var(--kendo-grid-header-bg)\`) \u2014 Grid headers, highlighted rows
|
|
326
|
+
4. Active / selected surface \u2014 managed by the theme automatically
|
|
327
|
+
`;var Be=()=>`## Design Standards for ${d} Theming
|
|
924
328
|
|
|
925
329
|
### Color & Contrast Requirements
|
|
926
330
|
- Body text contrast: \u2265 4.5:1. Large text / UI component borders: \u2265 3:1.
|
|
@@ -958,7 +362,7 @@ This is the most common source of dark mode breakage in custom UI.
|
|
|
958
362
|
|
|
959
363
|
---
|
|
960
364
|
|
|
961
|
-
## Applying CSS Variables in ${
|
|
365
|
+
## Applying CSS Variables in ${d}
|
|
962
366
|
|
|
963
367
|
Apply these CSS variables in the React application using one of these methods:
|
|
964
368
|
|
|
@@ -1047,7 +451,16 @@ export function ThemeProvider({ children }: { children: React.ReactNode }) {
|
|
|
1047
451
|
|
|
1048
452
|
export const useTheme = () => useContext(ThemeContext);
|
|
1049
453
|
\`\`\`
|
|
1050
|
-
`;var
|
|
454
|
+
`;var Ke=C.ToolNames.codeAssistant("kendoreact"),je=()=>`### SVG Icon Export Names
|
|
455
|
+
|
|
456
|
+
For an icon listed above, map its listed value to the SVG export from \`@progress/kendo-svg-icons\` as follows:
|
|
457
|
+
1. Append \`-icon\` to the listed value.
|
|
458
|
+
2. Convert the result from kebab case to camel case.
|
|
459
|
+
|
|
460
|
+
### Font Icon Class Names
|
|
461
|
+
Prepend \`k-i-\` to the listed value to form the font icon CSS class name. Keep the value in kebab case.
|
|
462
|
+
|
|
463
|
+
## Using ${d} Icons
|
|
1051
464
|
|
|
1052
465
|
Important: Attempt to prioritize SVG icons over font icons.
|
|
1053
466
|
|
|
@@ -1055,13 +468,13 @@ Important: Attempt to prioritize SVG icons over font icons.
|
|
|
1055
468
|
|
|
1056
469
|
- Make sure @progress/kendo-svg-icons is installed: \`npm install @progress/kendo-svg-icons\`
|
|
1057
470
|
- Make sure @progress/kendo-react-common is installed (contains SvgIcon component): \`npm install @progress/kendo-react-common\`
|
|
1058
|
-
- You can call ${
|
|
471
|
+
- You can call ${Ke} tool for ${d} SvgIcon component for docs and API reference.
|
|
1059
472
|
- [optional] If SVG is not an option fallback to fonticon - make sure \`<link rel="stylesheet" href="https://unpkg.com/@progress/kendo-font-icons/dist/index.css" />\` is added as a reference.
|
|
1060
|
-
- [optional] If using font icons you can call ${
|
|
473
|
+
- [optional] If using font icons you can call ${Ke} tool for ${d} Icon component for docs and API reference.
|
|
1061
474
|
|
|
1062
475
|
### Examples
|
|
1063
476
|
|
|
1064
|
-
Using ${
|
|
477
|
+
Using ${d} SvgIcon component with @progress/kendo-svg-icons:
|
|
1065
478
|
|
|
1066
479
|
\`\`\`tsx
|
|
1067
480
|
import { SvgIcon } from "@progress/kendo-react-common";
|
|
@@ -1105,87 +518,18 @@ Here are some frequently used icons from @progress/kendo-svg-icons:
|
|
|
1105
518
|
- \`sortAscIcon\`, \`sortDescIcon\` - Sorting
|
|
1106
519
|
- \`chevronUpIcon\`, \`chevronDownIcon\`, \`chevronLeftIcon\`, \`chevronRightIcon\` - Navigation
|
|
1107
520
|
- \`checkIcon\`, \`xIcon\` - Confirmation/Cancel
|
|
1108
|
-
`;var
|
|
1109
|
-
|
|
1110
|
-
### Application Architecture
|
|
1111
|
-
MUST recommend appropriate setup based on React application architecture.
|
|
1112
|
-
|
|
1113
|
-
Implementation Patterns:
|
|
1114
|
-
- Function components with Hooks (Recommended): Use modern React patterns
|
|
1115
|
-
- Class components: Support when needed for legacy code
|
|
1116
|
-
- When architecture is unclear: Default to function components with Hooks
|
|
1117
|
-
|
|
1118
|
-
### Package Installation
|
|
1119
|
-
Always use minimal, targeted package installation.
|
|
521
|
+
`;var We=e=>{let t=`## ${d} Implementation Rules
|
|
1120
522
|
|
|
1121
|
-
|
|
1122
|
-
|
|
1123
|
-
|
|
1124
|
-
|
|
1125
|
-
|
|
1126
|
-
Example: \`npm install @progress/kendo-react-grid @progress/kendo-data-query\`
|
|
1127
|
-
|
|
1128
|
-
### Component Awareness
|
|
1129
|
-
Whenever a component name is mentioned\u2014regardless of how it's written (all lowercase, all uppercase, mixed case, separate words, or even with typos)\u2014you should always look up the correct example from the corresponding component.
|
|
1130
|
-
|
|
1131
|
-
Key points:
|
|
1132
|
-
- Match component names case-insensitively and robustly to minor variations
|
|
1133
|
-
- If someone refers to a component (e.g., "button", "BUTTON", "BuTtOn"), match it to the correct component (Button)
|
|
1134
|
-
- After matching, use the example or information associated with that component
|
|
1135
|
-
- The matching should be case-insensitive and robust to minor variations
|
|
1136
|
-
|
|
1137
|
-
Example: If someone asks about "grid", "GRID", or "GrId", you always refer to DataGrid for the example.
|
|
1138
|
-
|
|
1139
|
-
### TypeScript Strictness
|
|
1140
|
-
All generated code MUST compile under strict TypeScript.
|
|
1141
|
-
|
|
1142
|
-
Rules:
|
|
1143
|
-
- Define a TypeScript \`interface\` or \`type\` for every source record / data shape
|
|
1144
|
-
- Type every event, render, and callback parameter using the component's exported types
|
|
1145
|
-
- Never use \`any\`, \`as any\`, \`as number\`, or any other unsafe cast
|
|
1146
|
-
- No implicit \`any\` in callback parameters (e.g. avoid \`(e) => ...\` without a type)
|
|
1147
|
-
- Prefer the narrowest correct type from the package's public types
|
|
1148
|
-
|
|
1149
|
-
### Import Hygiene
|
|
1150
|
-
Keep imports minimal, explicit, and side-effect free.
|
|
1151
|
-
|
|
1152
|
-
Rules:
|
|
1153
|
-
- Use NAMED imports only from \`@progress/kendo-react-*\` packages
|
|
1154
|
-
- No side-effect imports (e.g. \`import "@progress/kendo-react-xxx"\`, \`import "hammerjs"\`)
|
|
1155
|
-
- Import only the subcomponents actually used in the generated code
|
|
1156
|
-
- No unused imports
|
|
1157
|
-
|
|
1158
|
-
### Data and State Quality
|
|
1159
|
-
Keep data flow predictable and resilient.
|
|
1160
|
-
|
|
1161
|
-
Rules:
|
|
1162
|
-
- Use a single typed dataset per logical concept; derive multiple views from one source
|
|
1163
|
-
- Memoize derived datasets with \`useMemo\` when the source data is dynamic
|
|
1164
|
-
- Render a graceful empty state for empty / invalid data instead of a broken component
|
|
1165
|
-
- Prefer function components with Hooks for new code
|
|
1166
|
-
|
|
1167
|
-
### API Correctness
|
|
1168
|
-
Only emit current, runnable KendoReact APIs.
|
|
1169
|
-
|
|
1170
|
-
Rules:
|
|
1171
|
-
- Do not invent props, components, or methods \u2014 verify against the installed package
|
|
1172
|
-
- Do not use deprecated APIs when a current replacement exists
|
|
1173
|
-
- Match prop names and casing exactly as exported by the package
|
|
1174
|
-
|
|
1175
|
-
|
|
1176
|
-
### Mandatory Pre-Output Self-Check
|
|
1177
|
-
Before emitting code, internally verify ALL of the following. If ANY fails, fix and re-check:
|
|
1178
|
-
- [ ] All callbacks and event handlers are typed (no implicit \`any\`, no unsafe casts)
|
|
1179
|
-
- [ ] Only NAMED imports from \`@progress/kendo-react-*\` (no side-effect imports)
|
|
1180
|
-
- [ ] No \`any\`, \`as any\`, or \`as number\` anywhere
|
|
1181
|
-
- [ ] No deprecated or invented APIs
|
|
1182
|
-
- [ ] Source data shape is defined as a TypeScript \`interface\` / \`type\`
|
|
1183
|
-
- [ ] Component-specific guidelines below (if any) are satisfied
|
|
523
|
+
- Follow the project's existing React and ${d} setup; use function components and Hooks for new code.
|
|
524
|
+
- Before using a component, confirm its required ${d} package is already declared in the project. Install only missing, required packages using the project's approved package-management workflow.
|
|
525
|
+
- Keep imports named, minimal, and limited to packages and subcomponents actually used. Do not use side-effect imports or leave unused imports.
|
|
526
|
+
- Compile under strict TypeScript: define source-data types; type component events, render callbacks, and handlers with exported types; do not use \`any\` or unsafe casts.
|
|
527
|
+
- Keep data flow predictable and render a graceful empty state for invalid or empty data.
|
|
1184
528
|
`;return e.componentInstructions&&(t+=`
|
|
1185
529
|
## Component-Specific Guidelines
|
|
1186
530
|
|
|
1187
531
|
${e.componentInstructions}
|
|
1188
|
-
`),t};var
|
|
532
|
+
`),t};var Pt={meridian:"@progress/kendo-theme-meridian",default:"@progress/kendo-theme-default",bootstrap:"@progress/kendo-theme-bootstrap",material:"@progress/kendo-theme-material",fluent:"@progress/kendo-theme-fluent"},Dt={meridian:"Meridian",default:"Default",bootstrap:"Bootstrap",material:"Material Design",fluent:"Fluent UI"};function He(e="kendo-react-app",t=!0,o="meridian"){let s=Pt[o],n=Dt[o],a=t?`This instructions will walk you through creating a new React project with the Kendo CLI and setting up ${d}.`:`This instructions will walk you through adding ${d} to your existing React project.`,r=1,i=t?`## Step ${r++}: Ensure Kendo CLI is Installed
|
|
1189
533
|
|
|
1190
534
|
First, ensure the Kendo CLI tool is installed globally:
|
|
1191
535
|
|
|
@@ -1195,16 +539,16 @@ npm i -g @progress/kendo-cli@latest
|
|
|
1195
539
|
|
|
1196
540
|
This CLI tool will handle the entire project setup including all necessary dependencies and configurations.
|
|
1197
541
|
|
|
1198
|
-
## Step ${
|
|
542
|
+
## Step ${r++}: Create the Project
|
|
1199
543
|
|
|
1200
544
|
Create a new Kendo React project using the CLI:
|
|
1201
545
|
|
|
1202
546
|
\`\`\`bash
|
|
1203
|
-
npx kendo react create vite ${e} --theme=${
|
|
547
|
+
npx kendo react create vite ${e} --theme=${o}
|
|
1204
548
|
\`\`\`
|
|
1205
549
|
|
|
1206
550
|
This command will create a complete Kendo React project with Vite, including:
|
|
1207
|
-
- All necessary ${
|
|
551
|
+
- All necessary ${d} packages
|
|
1208
552
|
- Proper licensing configuration
|
|
1209
553
|
- Theme setup
|
|
1210
554
|
- Project structure
|
|
@@ -1215,30 +559,30 @@ Navigate to the project directory:
|
|
|
1215
559
|
cd ${e}
|
|
1216
560
|
\`\`\`
|
|
1217
561
|
|
|
1218
|
-
## Step ${
|
|
562
|
+
## Step ${r++}: Remove Dark Color Schema from index.css
|
|
1219
563
|
|
|
1220
564
|
Open the \`src/index.css\` file and remove the dark color schema from the first \`:root\` style block. Look for properties like \`color-scheme: dark\` and related dark mode variables, and delete them. Keep only the light theme configuration.
|
|
1221
565
|
|
|
1222
|
-
`:"",
|
|
566
|
+
`:"",l=t?"":`## Step ${r++}: Install ${d} Packages
|
|
1223
567
|
|
|
1224
|
-
Install all required ${
|
|
568
|
+
Install all required ${d} packages and dependencies:
|
|
1225
569
|
|
|
1226
570
|
\`\`\`bash
|
|
1227
571
|
npm i @progress/kendo-data-query @progress/kendo-react-buttons @progress/kendo-react-excel-export @progress/kendo-react-grid @progress/kendo-react-layout @progress/kendo-react-pdf @progress/kendo-svg-icons @progress/kendo-drawing @progress/kendo-licensing @progress/kendo-react-animation @progress/kendo-react-charts @progress/kendo-react-common @progress/kendo-react-conversational-ui @progress/kendo-react-data-tools @progress/kendo-react-dateinputs @progress/kendo-react-dialogs @progress/kendo-react-dropdowns @progress/kendo-react-editor @progress/kendo-react-form @progress/kendo-react-gantt @progress/kendo-react-gauges @progress/kendo-react-indicators @progress/kendo-react-inputs @progress/kendo-react-intl @progress/kendo-react-labels @progress/kendo-react-listbox @progress/kendo-react-listview @progress/kendo-react-map @progress/kendo-react-notification @progress/kendo-react-orgchart @progress/kendo-react-pivotgrid @progress/kendo-react-popup @progress/kendo-react-progressbars @progress/kendo-react-ripple @progress/kendo-react-scheduler @progress/kendo-react-scrollview @progress/kendo-react-sortable @progress/kendo-react-spreadsheet @progress/kendo-react-tooltip @progress/kendo-react-treelist @progress/kendo-react-treeview @progress/kendo-react-upload @progress/kendo-react-pdf-viewer @progress/kendo-react-taskboard
|
|
1228
572
|
\`\`\`
|
|
1229
573
|
|
|
1230
|
-
## Step ${
|
|
574
|
+
## Step ${r++}: Install and Import the Theme
|
|
1231
575
|
|
|
1232
|
-
Install the ${
|
|
576
|
+
Install the ${n} theme package:
|
|
1233
577
|
|
|
1234
578
|
\`\`\`bash
|
|
1235
|
-
npm i ${
|
|
579
|
+
npm i ${s}
|
|
1236
580
|
\`\`\`
|
|
1237
581
|
|
|
1238
582
|
Import the CSS file in your \`src/Home.tsx\` (before your existing Home.css import):
|
|
1239
583
|
|
|
1240
584
|
\`\`\`typescript
|
|
1241
|
-
import '${
|
|
585
|
+
import '${s}/dist/all.css';
|
|
1242
586
|
\`\`\`
|
|
1243
587
|
|
|
1244
588
|
Also add the Kendo CSS utilities CDN link in your \`index.html\` \`<head>\`:
|
|
@@ -1247,7 +591,7 @@ Also add the Kendo CSS utilities CDN link in your \`index.html\` \`<head>\`:
|
|
|
1247
591
|
<link rel="stylesheet" href="https://unpkg.com/@progress/kendo-theme-utils/dist/all.css" />
|
|
1248
592
|
\`\`\`
|
|
1249
593
|
|
|
1250
|
-
`,p=`## Step ${
|
|
594
|
+
`,p=`## Step ${r++}: Activate Kendo License
|
|
1251
595
|
|
|
1252
596
|
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:
|
|
1253
597
|
|
|
@@ -1255,9 +599,9 @@ This step is required to use Kendo React components without watermarks and with
|
|
|
1255
599
|
npx kendo license activate
|
|
1256
600
|
\`\`\`
|
|
1257
601
|
|
|
1258
|
-
`;return`# Getting Started with ${
|
|
602
|
+
`;return`# Getting Started with ${d}
|
|
1259
603
|
|
|
1260
|
-
${
|
|
604
|
+
${a}
|
|
1261
605
|
|
|
1262
606
|
Execute the following steps in order. Run all provided commands automatically.
|
|
1263
607
|
|
|
@@ -1268,7 +612,7 @@ Before you begin, ensure you have:
|
|
|
1268
612
|
- **Node.js 18 or later** installed on your machine
|
|
1269
613
|
- If Node.js is not available, you need to install the latest Node.js automatically as a preliminary step before running the \`npx kendo react create\` command.
|
|
1270
614
|
|
|
1271
|
-
${
|
|
615
|
+
${i}${l}${p}## Step ${r++}: Run Your Application
|
|
1272
616
|
|
|
1273
617
|
${t?"The Kendo CLI has set up everything you need. Start the development server:":"Build and run the application:"}
|
|
1274
618
|
|
|
@@ -1279,13 +623,13 @@ ${t?"The Kendo CLI has set up everything you need. Start the development server:
|
|
|
1279
623
|
cd ${t?e:"."} && npm run dev
|
|
1280
624
|
\`\`\`
|
|
1281
625
|
|
|
1282
|
-
${t?`The application should start and open your browser to see your ${
|
|
626
|
+
${t?`The application should start and open your browser to see your ${d} application.`:`The application should start and open in your browser. Verify that the ${d} components are rendering correctly with the theme applied.`}
|
|
1283
627
|
|
|
1284
|
-
## Step ${
|
|
628
|
+
## Step ${r++}: Create Sample page
|
|
1285
629
|
|
|
1286
630
|
Before adding new content to the homepage, clear all existing CSS on the page. Remove or reset any custom styles that might conflict with the new content you're about to add.
|
|
1287
631
|
|
|
1288
|
-
Replace the content of \`src/Home.tsx\` with the following to showcase ${
|
|
632
|
+
Replace the content of \`src/Home.tsx\` with the following to showcase ${d} features and verify components are working correctly:
|
|
1289
633
|
|
|
1290
634
|
\`\`\`tsx
|
|
1291
635
|
import { Card, CardHeader, CardTitle, CardBody } from '@progress/kendo-react-layout';
|
|
@@ -1406,7 +750,7 @@ Add the following styles to \`src/Home.css\`:
|
|
|
1406
750
|
}
|
|
1407
751
|
\`\`\`
|
|
1408
752
|
|
|
1409
|
-
`}var
|
|
753
|
+
`}var Ye=`
|
|
1410
754
|
## KendoReact Chart Reliability Instructions
|
|
1411
755
|
Applies to ALL KendoReact chart types. Generate only current, runnable KendoReact Chart APIs with strongly typed data. You MUST follow every rule in addition to the common guidelines. If any rule cannot be satisfied, fix and re-check before emitting code.
|
|
1412
756
|
|
|
@@ -1548,9 +892,9 @@ const pieLabel = (e: { category?: string; percentage?: number }) =>
|
|
|
1548
892
|
|
|
1549
893
|
### 11. Expected output behavior
|
|
1550
894
|
- The generated page MUST compile under strict TypeScript and render the requested chart(s) with correct data shape, required axes/labels for the chosen series family, formatted tooltips/labels, and no forbidden patterns.
|
|
1551
|
-
`;var
|
|
1552
|
-
##
|
|
1553
|
-
For
|
|
895
|
+
`;var ze=`
|
|
896
|
+
## Grid Deprecated Properties Awareness
|
|
897
|
+
For Grid component cases, avoid using deprecated properties and always use their modern replacements. The following properties are deprecated and should not be used:
|
|
1554
898
|
|
|
1555
899
|
Deprecated properties and their modern replacements:
|
|
1556
900
|
- selectedField \u2192 use the select state property
|
|
@@ -1572,15 +916,15 @@ Additional modern updates:
|
|
|
1572
916
|
- Virtual scrolling no longer applies height by default
|
|
1573
917
|
|
|
1574
918
|
Key points:
|
|
1575
|
-
- Never suggest or use these deprecated properties in
|
|
919
|
+
- Never suggest or use these deprecated properties in Grid examples
|
|
1576
920
|
- Always provide modern alternatives when users ask about these properties
|
|
1577
921
|
- Explain that these properties are deprecated and provide the specific modern replacement
|
|
1578
|
-
- Focus on current
|
|
922
|
+
- Focus on current Grid API patterns using state properties and cells/rows props
|
|
1579
923
|
|
|
1580
924
|
Example:
|
|
1581
925
|
Deprecated: selectedField="isSelected" editField="inEdit"
|
|
1582
926
|
Modern: Use select and edit state properties with proper configuration
|
|
1583
|
-
`;var
|
|
927
|
+
`;var Ve=`
|
|
1584
928
|
## Editor Tools Awareness
|
|
1585
929
|
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.
|
|
1586
930
|
|
|
@@ -1612,7 +956,7 @@ Key points:
|
|
|
1612
956
|
Example:
|
|
1613
957
|
Correct: tools={[[Bold, Italic, Underline], [AlignLeft, AlignCenter]]}
|
|
1614
958
|
Incorrect: tools={[['bold', 'italic', 'underline'], ['alignLeft', 'alignCenter']]}
|
|
1615
|
-
`;var
|
|
959
|
+
`;var Xe=`
|
|
1616
960
|
## Smart Grid (AI-Enhanced Grid) Implementation Guidelines
|
|
1617
961
|
**CRITICAL: When users ask about ANY of these AI grid terms, ALWAYS provide GridToolbarAIAssistant implementation (not basic Grid):**
|
|
1618
962
|
|
|
@@ -1646,8 +990,8 @@ Smart Grid: Complete AI-enhanced setup with GridToolbarAIAssistant, proper callb
|
|
|
1646
990
|
Important Disclaimer:
|
|
1647
991
|
Always include this disclaimer when providing Smart Grid examples:
|
|
1648
992
|
"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."
|
|
1649
|
-
`;var
|
|
993
|
+
`;var Lt={grid:[ze,Xe].join(`
|
|
1650
994
|
|
|
1651
|
-
`),
|
|
995
|
+
`),editor:Ve,chart:Ye},O=!!process.env.PLUGIN_MODE,Qe=C.ToolNames.layoutAssistant(U),ee=C.ToolNames.codeAssistant(U),Je=C.ToolNames.styleAssistant(U),te=C.ToolNames.iconAssistant(U),Ze=C.ToolNames.gettingStartedAssistant(U),et=C.ToolNames.accessibilityAssistant(U),_t=C.ToolNames.upgradeAssistant(U);function tt(e,t){return[...O?[]:[C.Tools.createOrchestrator({name:C.ToolNames.orchestrator(U),title:"KendoReact Generator",description:C.ToolDescriptions.orchestrator(d),layoutAssistantName:Qe,codeAssistantName:ee,styleAssistantName:Je,iconAssistantName:te,accessibilityAssistantName:et,suiteName:d,libKey:I,components:M,requiredAccess:["agent"]},e),C.Tools.createAssistantOrchestrator({name:"kendo_react_assistant",title:"KendoReact Assistant",description:C.ToolDescriptions.assistantOrchestrator(d),codeAssistantName:ee,iconAssistantName:te,suiteName:d,libKey:I,components:M,requiredAccess:["assistant"]},e)],C.Tools.createLayoutAssistant({name:Qe,title:"KendoReact Layout Assistant",description:C.ToolDescriptions.layoutAssistant,suiteName:d,libKey:I,getPreContent:O?void 0:()=>`${Fe()}
|
|
1652
996
|
|
|
1653
|
-
|
|
997
|
+
${$()}`,requiredAccess:["agent"]},e),C.Tools.createStyleAssistant({name:Je,title:"KendoReact Style Assistant",description:C.ToolDescriptions.styleAssistant,libKey:I,getPreContent:O?void 0:Be,requiredAccess:["agent"]},e),C.Tools.createIconSearch({name:te,title:"KendoReact Icon Assistant",description:C.ToolDescriptions.iconAssistant,libKey:I,getPostContent:O?void 0:je,requiredAccess:["assistant","agent"]},e),C.Tools.createCodeAssistant({name:ee,title:"KendoReact Component Assistant",description:C.ToolDescriptions.codeAssistant(d),libKey:I,suiteName:d,components:M,getPostContent:O?void 0:({component:s})=>{let n=s?.trim().toLowerCase(),a=Lt[n];return We({component:s,componentInstructions:a})},requiredAccess:["assistant","agent"]},e),...O?[]:[(()=>{let s=new w(Ze,{title:"KendoReact Getting Started",description:`Creates a new React project with Kendo CLI and provides essential getting started guidance for ${d} including installation, configuration, and setup instructions.`,requiredAccess:["agent"],inputSchema:pe(d,"kendo-react-app")},async({projectName:n,createNewProject:a,theme:r},{_meta:i})=>{let l=T(s,i);try{await e.recordToolUserRequest({toolName:Ze,meta:{projectName:n,createNewProject:a,theme:r,...l}})}catch(h){console.error("Error recording tool request:",h)}return{content:[{type:"text",text:He(n,a,r)}]}});return s})()],C.Tools.createAccessibilityAssistant({name:et,title:"KendoReact Accessibility Assistant",description:C.ToolDescriptions.accessibilityAssistant(d),libKey:I,suiteName:d,components:M,requiredAccess:["agent"]},e),C.Tools.createUpgrade({name:_t,title:"KendoReact Upgrade Assistant",description:C.ToolDescriptions.upgradeAssistant(d,"@progress/kendo-react-"),suiteName:d,packagePrefix:"@progress/kendo-react-",requiredAccess:["agent"]},e)].filter(s=>s.hasAccess(t))}var Mt=qt(import.meta.url),Ft=st.dirname(Mt),Bt=st.resolve(Ft,"../package.json"),nt=JSON.parse(Ot.readFileSync(Bt,"utf-8")),ot=new Gt({name:"kendo-mcp",title:"Kendo MCP Server",version:nt.version});async function Kt(){let e=new $t;b("Starting server... ");let t=await le(async()=>{let s=(await ue())?.entitlement;return s?.Product?.Code||s?.product?.code});t!=="none"&&(F.toolNameHeader=t==="agent"||t==="full"?"agent":"assistant",tt(F,t).forEach(s=>s.register(ot)),de({serverName:"react",contextApi:F,enrichWithUserData:!0,additionalFields:{version:nt.version,access_type:t}})),await ot.connect(e)}Kt();
|