@progress/kendo-angular-mcp 1.8.0 → 1.9.1
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 +276 -818
- 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(p){throw k("Error adding license key to metadata:",p),new Error(`Failed to use license key: ${p.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?(k("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?(k("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?(k("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?(k("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?(k("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?(k("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?(k("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",p=null;if(i)try{let[f]=this.isDev?["fake_license",null]:await Y();f&&typeof f=="string"&&(p=f)}catch{}if(!r&&!p){k("Neither LOGGING_API_KEY nor license key available, skipping log event");return}let u=new $.Metadata;return r&&u.add("x-api-key",s),p&&(u.add("x-license-key",p),u.add("x-request-metadata",this.buildRequestMetadata(a)),this.options?.libName&&u.add("x-library-name",this.options.libName)),new Promise((f,v)=>{this.client.logEvent({event_name:t,fields:n||{}},u,(c,m)=>{c?(k("Error logging event:",c),v(new Error(c))):f()})})}};import{z as Q}from"zod";var To=Q.object({user_id:Q.string(),user_email:Q.string().email()});import{z as w}from"zod";var Rt=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())}),Eo=w.array(Rt);function x(e,t){let n=e.server?.server.getClientVersion?.(),o=t||{};return n&&(o.clientInfo={name:n.name,version:n.version}),o}async function ye(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 be(){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 Pt=1440*60*1e3;function ve(e){let{serverName:t,contextApi:n,additionalFields:o={},intervalMs:s=Pt,enrichWithUserData:i=!1}=e,a="mcp_server_heartbeat",r=async()=>{try{let u={server_name:t,timestamp:new Date().toISOString(),...o};await n.logEvent(a,u,{enrichWithUserData:i})}catch(u){k(`Failed to send heartbeat for ${t}:`,u)}};r();let p=setInterval(r,s);return()=>{clearInterval(p),k(`Heartbeat stopped for ${t}`)}}import{z as J}from"zod";var Dt=["meridian","default","bootstrap","material","fluent"];function ke(e,t){return{projectName:J.string().default(t).describe("The name of the project. Used as the project folder name when creating a new project."),createNewProject:J.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:J.enum(Dt).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 l="Kendo UI for Angular",N="angular",D="kendo",_=["AIPrompt","ActionSheet","AppBar","ArcGauge","AutoComplete","Avatar","Badge","Barcode","BottomNavigation","BreadCrumb","Button","ButtonGroup","Calendar","Card","ChartWizard","Charts","CheckBox","Chip","ChipList","ChunkProgressBar","CircularGauge","CircularProgressBar","ColorGradient","ColorPalette","ColorPicker","ComboBox","ContextMenu","ConversationalUI","DataQuery","DateInput","DateMath","DatePicker","DateRange","DateTimePicker","Diagram","Dialog","DragandDrop","Drawer","Drawing","DropDownButton","DropDownList","DropDownTree","Editor","ExcelExport","ExpansionPanel","FileSaver","FileSelect","Filter","FlatColorPicker","FloatingActionButton","FloatingLabel","Forms","FormField","Gantt","Gauges","General","Grid","GridLayout","Icon","InlineAIPrompt","Label","LinearGauge","ListBox","ListView","Loader","Map","MaskedTextBox","Menu","MultiColumnComboBox","MultiSelect","MultiSelectTree","MultiViewCalendar","Notification","NumericTextBox","OTPInput","Pager","PanelBar","PDFExport","PDFViewer","PivotGrid","Popover","Popup","ProgressBar","PromptBox","QRCode","RadialGauge","RadioButton","RangeSlider","Rating","Ripple","Sankey","SegmentedControl","Scheduler","ScrollView","Signature","Skeleton","Slider","SmartPasteButton","Sortable","StockChart","Sparkline","SpeechToTextButton","SplitButton","Splitter","Spreadsheet","StackLayout","Stepper","SVGIcon","Switch","TabStrip","TextArea","TextBox","TileLayout","Timeline","TimePicker","ToolBar","Tooltip","TreeList","TreeView","Typography","Upload","Window"],Ae=new Map([["actionsheet","@progress/kendo-angular-navigation"],["aiprompt","@progress/kendo-angular-conversational-ui"],["appbar","@progress/kendo-angular-navigation"],["arcgauge","@progress/kendo-angular-gauges"],["autocomplete","@progress/kendo-angular-dropdowns"],["avatar","@progress/kendo-angular-layout"],["badge","@progress/kendo-angular-indicators"],["barcode","@progress/kendo-angular-barcodes"],["bottomnavigation","@progress/kendo-angular-navigation"],["breadcrumb","@progress/kendo-angular-navigation"],["button","@progress/kendo-angular-buttons"],["buttongroup","@progress/kendo-angular-buttons"],["calendar","@progress/kendo-angular-dateinputs"],["card","@progress/kendo-angular-layout"],["chartwizard","@progress/kendo-angular-chart-wizard"],["checkbox","@progress/kendo-angular-inputs"],["chip","@progress/kendo-angular-buttons"],["chiplist","@progress/kendo-angular-buttons"],["chunkprogressbar","@progress/kendo-angular-progressbar"],["circulargauge","@progress/kendo-angular-gauges"],["circularprogressbar","@progress/kendo-angular-progressbar"],["colorgradient","@progress/kendo-angular-inputs"],["colorpalette","@progress/kendo-angular-inputs"],["colorpicker","@progress/kendo-angular-inputs"],["combobox","@progress/kendo-angular-dropdowns"],["contextmenu","@progress/kendo-angular-menu"],["dataquery","@progress/kendo-data-query"],["dateinput","@progress/kendo-angular-dateinputs"],["datemath","@progress/kendo-date-math"],["datepicker","@progress/kendo-angular-dateinputs"],["daterangepicker","@progress/kendo-angular-dateinputs"],["datetimepicker","@progress/kendo-angular-dateinputs"],["diagram","@progress/kendo-angular-diagrams"],["dialog","@progress/kendo-angular-dialog"],["drawer","@progress/kendo-angular-layout"],["drawing","@progress/kendo-drawing"],["dropdownbutton","@progress/kendo-angular-buttons"],["dropdownlist","@progress/kendo-angular-dropdowns"],["dropdowntree","@progress/kendo-angular-dropdowns"],["editor","@progress/kendo-angular-editor"],["excelexport","@progress/kendo-angular-excel-export"],["expansionpanel","@progress/kendo-angular-layout"],["filesaver","@progress/kendo-file-saver"],["fileselect","@progress/kendo-angular-upload"],["filter","@progress/kendo-angular-filter"],["flatcolorpicker","@progress/kendo-angular-inputs"],["floatingactionbutton","@progress/kendo-angular-buttons"],["floatinglabel","@progress/kendo-angular-label"],["formfield","@progress/kendo-angular-inputs"],["forms","@progress/kendo-angular-inputs"],["gantt","@progress/kendo-angular-gantt"],["grid","@progress/kendo-angular-grid"],["gridlayout","@progress/kendo-angular-layout"],["icon","@progress/kendo-angular-icons"],["inlineaiprompt","@progress/kendo-angular-conversational-ui"],["label","@progress/kendo-angular-label"],["lineargauge","@progress/kendo-angular-gauges"],["listbox","@progress/kendo-angular-listbox"],["listview","@progress/kendo-angular-listview"],["loader","@progress/kendo-angular-indicators"],["map","@progress/kendo-angular-map"],["maskedtextbox","@progress/kendo-angular-inputs"],["menu","@progress/kendo-angular-menu"],["multicolumncombobox","@progress/kendo-angular-dropdowns"],["multiselect","@progress/kendo-angular-dropdowns"],["multiselecttree","@progress/kendo-angular-dropdowns"],["multiviewcalendar","@progress/kendo-angular-dateinputs"],["notification","@progress/kendo-angular-notification"],["numerictextbox","@progress/kendo-angular-inputs"],["otpinput","@progress/kendo-angular-inputs"],["pager","@progress/kendo-angular-pager"],["panelbar","@progress/kendo-angular-layout"],["pdfexport","@progress/kendo-angular-pdf-export"],["pdfviewer","@progress/kendo-angular-pdfviewer"],["pivotgrid","@progress/kendo-angular-pivotgrid"],["popover","@progress/kendo-angular-tooltip"],["popup","@progress/kendo-angular-popup"],["progressbar","@progress/kendo-angular-progressbar"],["promptbox","@progress/kendo-angular-conversational-ui"],["qrcode","@progress/kendo-angular-barcodes"],["radialgauge","@progress/kendo-angular-gauges"],["radiobutton","@progress/kendo-angular-inputs"],["rangeslider","@progress/kendo-angular-inputs"],["rating","@progress/kendo-angular-inputs"],["ripple","@progress/kendo-angular-ripple"],["sankey","@progress/kendo-angular-charts"],["segmentedcontrol","@progress/kendo-angular-buttons"],["scheduler","@progress/kendo-angular-scheduler"],["scrollview","@progress/kendo-angular-scrollview"],["signature","@progress/kendo-angular-inputs"],["skeleton","@progress/kendo-angular-indicators"],["slider","@progress/kendo-angular-inputs"],["smartpastebutton","@progress/kendo-angular-buttons"],["sortable","@progress/kendo-angular-sortable"],["sparkline","@progress/kendo-angular-charts"],["speechtotextbutton","@progress/kendo-angular-buttons"],["splitbutton","@progress/kendo-angular-buttons"],["splitter","@progress/kendo-angular-layout"],["spreadsheet","@progress/kendo-angular-spreadsheet"],["stacklayout","@progress/kendo-angular-layout"],["stepper","@progress/kendo-angular-layout"],["stockchart","@progress/kendo-angular-charts"],["svgicon","@progress/kendo-angular-icons"],["switch","@progress/kendo-angular-inputs"],["tabstrip","@progress/kendo-angular-layout"],["textarea","@progress/kendo-angular-inputs"],["textbox","@progress/kendo-angular-inputs"],["tilelayout","@progress/kendo-angular-layout"],["timeline","@progress/kendo-angular-layout"],["timepicker","@progress/kendo-angular-dateinputs"],["toolbar","@progress/kendo-angular-toolbar"],["treelist","@progress/kendo-angular-treelist"],["treeview","@progress/kendo-angular-treeview"],["typography","@progress/kendo-angular-typography"],["upload","@progress/kendo-angular-upload"],["window","@progress/kendo-angular-dialog"],["charts","@progress/kendo-angular-charts"],["conversationalui","@progress/kendo-angular-conversational-ui"],["tooltip","@progress/kendo-angular-tooltip"]]);var Lt=Ut(Ot(Gt(import.meta.url)),"../proto/service.proto"),B=new V("contextapi.telerik.com:443",Lt,{libName:N});var we=async()=>B.validateUserLicense();import so from"fs";import kt from"path";import{fileURLToPath as ao}from"url";import{z as A}from"zod";var S=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 F=(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 X=()=>`## 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 q=(e,t)=>{let n=F({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
|
-
${X()}
|
|
2
|
+
import{McpServer as Zt}from"@modelcontextprotocol/sdk/server/mcp.js";import{StdioServerTransport as eo}from"@modelcontextprotocol/sdk/server/stdio.js";import{dirname as Et,join as Dt}from"path";import{fileURLToPath as Gt}from"url";import{loadLicense as vt,decodeLicenseKey as wt,decodeLicenseEvidence as At}from"@progress/kendo-licensing/utils";var z=class extends Error{constructor(t){super(t),this.name="LicenseError"}};function oe(e){return e.replace(/^\uFEFF/,"")}async function H(e){let t=null,n=null;try{let o=vt();if(!o.success){let r=new z(o.message);throw e&&await e("license_load_failed",{error:o.message}).catch(()=>{}),r}try{t=(await wt(o.value)).licenses.find(async s=>!!(await At(s)).userId)}catch(r){console.log(r.message),e&&await e("license_load_failed",{error:r.message||"Unknown decoding error"}).catch(()=>{})}if(!t)return[oe(o.value),null]}catch(o){return n=o.message||"Unknown error loading license.",e&&await e("license_load_failed",{error:n}).catch(()=>{}),[null,n]}return[oe(t),null]}import L from"node:fs";import W from"node:path";var Y=!1,D=process.env.DEBUG_LOG_FILE,ne=!!(D&&typeof D=="string");if(ne){let e=W.resolve(D),t=W.dirname(e);if(t!=="."&&t!==process.cwd()&&!L.existsSync(t))try{L.mkdirSync(t,{recursive:!0})}catch(n){console.error("Error creating log directory:",n)}if(!L.existsSync(e))try{L.writeFileSync(e,"")}catch(n){console.error("Error creating log file:",n)}}else Y=!1;Y=ne&&!!D&&L.existsSync(W.resolve(D));function b(...e){if(Y&&D){let o=`${new Date().toISOString()}: ${e.join(" ")}
|
|
3
|
+
`,r=W.resolve(D);L.appendFile(r,o,s=>{s&&console.error("Error writing to log file:",s)})}}import Ct from"@grpc/proto-loader";import $ from"@grpc/grpc-js";import ae from"path";import re from"fs";import{fileURLToPath as St}from"url";var It=St(import.meta.url),Tt=ae.dirname(It),ie={version:"unknown"},se=ae.resolve(Tt,"../package.json");re.existsSync(se)&&(ie=JSON.parse(re.readFileSync(se,"utf-8")));function Nt(e){return e.replace(/\u2014/g,"--").replace(/\u2013/g,"-").replace(/[^\x20-\x7E]/g,"")}var j=class{constructor(t,n,o){this.contextApiUrl=t;this.protoPath=n;this.options=o;this.toolNameHeader="assistant";let r=Ct.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 s=$.loadPackageDefinition(r);this.client=new s.ContextQueryService(this.contextApiUrl||"contextapi.telerik.com:443",this.isDev?$.credentials.createInsecure():$.credentials.createSsl())}buildRequestMetadata(t={}){return Nt(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[n,o]=this.isDev?["fake_license",null]:await H((c,u)=>this.logEvent(c,u)),r=process.env.CONTEXTAPI_API_KEY,s=r&&typeof r=="string",a=n&&typeof n=="string";if(!a&&!s&&o)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: ${o}`);let i=new $.Metadata;if(a)try{i.add("x-license-key",n)}catch(c){throw b("Error adding license key to metadata:",c),new Error(`Failed to use license key: ${c.message}`)}return s&&i.add("x-api-key",r),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,n){let o=await this.getMetadata({meta:n});return new Promise((r,s)=>{this.client.query(t,o,(a,i)=>{a?s(a):r(i)})})}async getApiRefMatches(t,n){let o=await this.getMetadata({meta:n});return new Promise((r,s)=>{this.client.getApiRefMatches(t,o,(a,i)=>{a?s(a):r(i)})})}async queryCssUtils(t,n){let o=await this.getMetadata({meta:n});return new Promise((r,s)=>{this.client.cssUtilsSearch(t,o,(a,i)=>{a?(b("Error querying CSS Utils:",a),s(a)):r(i)})})}async queryIconsSearch(t,n){let o=await this.getMetadata({meta:n});return new Promise((r,s)=>{this.client.iconsSearch(t,o,(a,i)=>{a?(b("Error querying Icons Search:",a),s(a)):r(i)})})}async queryBuildingBlocks(t,n){let o=await this.getMetadata({meta:n});return new Promise((r,s)=>{this.client.buildingBlocksSearch(t,o,(a,i)=>{a?(b("Error querying Building Blocks:",a),s(a)):r(i)})})}async validateUserLicense(){let t=await this.getMetadata();return new Promise((n,o)=>{this.client.validateUserLicense({},t,(r,s)=>{r?(b("Error validating user license:",r),o(r)):n(s)})})}async queryThemeGenerate(t,n){let o=await this.getMetadata({meta:n});return new Promise((r,s)=>{this.client.generateTheme(t,o,(a,i)=>{a?(b("Error querying context API/GenerateTheme:",a),s(a)):r(i)})})}async recordOrchestratorUserRequest({meta:t}){let n=await this.getMetadata({meta:t});return new Promise((o,r)=>{this.client.recordOrchestratorUserRequest({},n,(s,a)=>{s?(b("Error recording orchestrator user request:",s),r(s)):o(a)})})}async recordToolUserRequest({toolName:t,meta:n}){let o=await this.getMetadata({meta:n});return new Promise(r=>{this.client.recordToolUserRequest({tool_name:t},o,(s,a)=>{s?(s.code===7?b("recordToolUserRequest: license does not cover Kendo AI Tools, skipping telemetry."):b("Error recording tool user request:",s),r(null)):r(a)})})}async logEvent(t,n,o={}){let r="h8utJ6rk4PpIWX4JMn9beQDsjVUri6KV0XYfiVwq",{enrichWithUserData:s=!1,meta:a={}}=o,i=r&&typeof r=="string",c=null;if(s)try{let[h]=this.isDev?["fake_license",null]:await H();h&&typeof h=="string"&&(c=h)}catch{}if(!i&&!c){b("Neither LOGGING_API_KEY nor license key available, skipping log event");return}let u=new $.Metadata;return i&&u.add("x-api-key",r),c&&(u.add("x-license-key",c),u.add("x-request-metadata",this.buildRequestMetadata(a)),this.options?.libName&&u.add("x-library-name",this.options.libName)),new Promise((h,v)=>{this.client.logEvent({event_name:t,fields:n||{}},u,(g,p)=>{g?(b("Error logging event:",g),v(g)):h()})})}};import{z as Q}from"zod";var Co=Q.object({user_id:Q.string(),user_email:Q.string().email()});import{z as A}from"zod";var Rt=A.object({Product:A.object({Id:A.number().int(),Code:A.string(),Name:A.string()}),License:A.nullable(A.object({Id:A.number().int(),Name:A.string(),Type:A.string(),Active:A.boolean()})),Availability:A.array(A.object({LicenseStart:A.nullable(A.string().datetime()),LicenseEnd:A.nullable(A.string().datetime())})),IsLicenseAvailable:A.optional(A.boolean())}),To=A.array(Rt);function I(e,t){let n=e.server?.server.getClientVersion?.(),o=t||{};return n&&(o.clientInfo={name:n.name,version:n.version}),o}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 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 Pt=1440*60*1e3;function de(e){let{serverName:t,contextApi:n,additionalFields:o={},intervalMs:r=Pt,enrichWithUserData:s=!1}=e,a="mcp_server_heartbeat",i=async()=>{try{let u={server_name:t,timestamp:new Date().toISOString(),...o};await n.logEvent(a,u,{enrichWithUserData:s})}catch(u){b(`Failed to send heartbeat for ${t}:`,u)}};i();let c=setInterval(i,r);return()=>{clearInterval(c),b(`Heartbeat stopped for ${t}`)}}import{z as X}from"zod";var Ut=["meridian","default","bootstrap","material","fluent"];function pe(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(Ut).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 Angular",T="angular",U="kendo",q=["AIPrompt","ActionSheet","AppBar","ArcGauge","AutoComplete","Avatar","Badge","Barcode","BottomNavigation","BreadCrumb","Button","ButtonGroup","Calendar","Card","ChartWizard","Charts","CheckBox","Chip","ChipList","ChunkProgressBar","CircularGauge","CircularProgressBar","ColorGradient","ColorPalette","ColorPicker","ComboBox","ContextMenu","ConversationalUI","DataQuery","DateInput","DateMath","DatePicker","DateRange","DateTimePicker","Diagram","Dialog","DragandDrop","Drawer","Drawing","DropDownButton","DropDownList","DropDownTree","Editor","ExcelExport","ExpansionPanel","FileSaver","FileSelect","Filter","FlatColorPicker","FloatingActionButton","FloatingLabel","Forms","FormField","Gantt","Gauges","General","Grid","GridLayout","Icon","InlineAIPrompt","Label","LinearGauge","ListBox","ListView","LLMKit","Loader","Map","MaskedTextBox","Menu","MultiColumnComboBox","MultiSelect","MultiSelectTree","MultiViewCalendar","Notification","NumericTextBox","OTPInput","Pager","PanelBar","PDFExport","PDFViewer","PivotGrid","Popover","Popup","ProgressBar","PromptBox","QRCode","RadialGauge","RadioButton","RangeSlider","Rating","Ripple","Sankey","SegmentedControl","Scheduler","ScrollView","Signature","Skeleton","Slider","SmartPasteButton","Sortable","StockChart","Sparkline","SpeechToTextButton","SplitButton","Splitter","Spreadsheet","StackLayout","Stepper","SVGIcon","Switch","TabStrip","TextArea","TextBox","TileLayout","Timeline","TimePicker","ToolBar","Tooltip","TreeList","TreeView","Typography","Upload","Window"],ue=new Map([["actionsheet","@progress/kendo-angular-navigation"],["aiprompt","@progress/kendo-angular-conversational-ui"],["appbar","@progress/kendo-angular-navigation"],["arcgauge","@progress/kendo-angular-gauges"],["autocomplete","@progress/kendo-angular-dropdowns"],["avatar","@progress/kendo-angular-layout"],["badge","@progress/kendo-angular-indicators"],["barcode","@progress/kendo-angular-barcodes"],["bottomnavigation","@progress/kendo-angular-navigation"],["breadcrumb","@progress/kendo-angular-navigation"],["button","@progress/kendo-angular-buttons"],["buttongroup","@progress/kendo-angular-buttons"],["calendar","@progress/kendo-angular-dateinputs"],["card","@progress/kendo-angular-layout"],["chartwizard","@progress/kendo-angular-chart-wizard"],["checkbox","@progress/kendo-angular-inputs"],["chip","@progress/kendo-angular-buttons"],["chiplist","@progress/kendo-angular-buttons"],["chunkprogressbar","@progress/kendo-angular-progressbar"],["circulargauge","@progress/kendo-angular-gauges"],["circularprogressbar","@progress/kendo-angular-progressbar"],["colorgradient","@progress/kendo-angular-inputs"],["colorpalette","@progress/kendo-angular-inputs"],["colorpicker","@progress/kendo-angular-inputs"],["combobox","@progress/kendo-angular-dropdowns"],["contextmenu","@progress/kendo-angular-menu"],["dataquery","@progress/kendo-data-query"],["dateinput","@progress/kendo-angular-dateinputs"],["datemath","@progress/kendo-date-math"],["datepicker","@progress/kendo-angular-dateinputs"],["daterangepicker","@progress/kendo-angular-dateinputs"],["datetimepicker","@progress/kendo-angular-dateinputs"],["diagram","@progress/kendo-angular-diagrams"],["dialog","@progress/kendo-angular-dialog"],["drawer","@progress/kendo-angular-layout"],["drawing","@progress/kendo-drawing"],["dropdownbutton","@progress/kendo-angular-buttons"],["dropdownlist","@progress/kendo-angular-dropdowns"],["dropdowntree","@progress/kendo-angular-dropdowns"],["editor","@progress/kendo-angular-editor"],["excelexport","@progress/kendo-angular-excel-export"],["expansionpanel","@progress/kendo-angular-layout"],["filesaver","@progress/kendo-file-saver"],["fileselect","@progress/kendo-angular-upload"],["filter","@progress/kendo-angular-filter"],["flatcolorpicker","@progress/kendo-angular-inputs"],["floatingactionbutton","@progress/kendo-angular-buttons"],["floatinglabel","@progress/kendo-angular-label"],["formfield","@progress/kendo-angular-inputs"],["forms","@progress/kendo-angular-inputs"],["gantt","@progress/kendo-angular-gantt"],["grid","@progress/kendo-angular-grid"],["gridlayout","@progress/kendo-angular-layout"],["icon","@progress/kendo-angular-icons"],["inlineaiprompt","@progress/kendo-angular-conversational-ui"],["label","@progress/kendo-angular-label"],["lineargauge","@progress/kendo-angular-gauges"],["listbox","@progress/kendo-angular-listbox"],["listview","@progress/kendo-angular-listview"],["loader","@progress/kendo-angular-indicators"],["map","@progress/kendo-angular-map"],["maskedtextbox","@progress/kendo-angular-inputs"],["menu","@progress/kendo-angular-menu"],["multicolumncombobox","@progress/kendo-angular-dropdowns"],["multiselect","@progress/kendo-angular-dropdowns"],["multiselecttree","@progress/kendo-angular-dropdowns"],["multiviewcalendar","@progress/kendo-angular-dateinputs"],["notification","@progress/kendo-angular-notification"],["numerictextbox","@progress/kendo-angular-inputs"],["otpinput","@progress/kendo-angular-inputs"],["pager","@progress/kendo-angular-pager"],["panelbar","@progress/kendo-angular-layout"],["pdfexport","@progress/kendo-angular-pdf-export"],["pdfviewer","@progress/kendo-angular-pdfviewer"],["pivotgrid","@progress/kendo-angular-pivotgrid"],["popover","@progress/kendo-angular-tooltip"],["popup","@progress/kendo-angular-popup"],["progressbar","@progress/kendo-angular-progressbar"],["promptbox","@progress/kendo-angular-conversational-ui"],["qrcode","@progress/kendo-angular-barcodes"],["radialgauge","@progress/kendo-angular-gauges"],["radiobutton","@progress/kendo-angular-inputs"],["rangeslider","@progress/kendo-angular-inputs"],["rating","@progress/kendo-angular-inputs"],["ripple","@progress/kendo-angular-ripple"],["sankey","@progress/kendo-angular-charts"],["segmentedcontrol","@progress/kendo-angular-buttons"],["scheduler","@progress/kendo-angular-scheduler"],["scrollview","@progress/kendo-angular-scrollview"],["signature","@progress/kendo-angular-inputs"],["skeleton","@progress/kendo-angular-indicators"],["slider","@progress/kendo-angular-inputs"],["smartpastebutton","@progress/kendo-angular-buttons"],["sortable","@progress/kendo-angular-sortable"],["sparkline","@progress/kendo-angular-charts"],["speechtotextbutton","@progress/kendo-angular-buttons"],["splitbutton","@progress/kendo-angular-buttons"],["splitter","@progress/kendo-angular-layout"],["spreadsheet","@progress/kendo-angular-spreadsheet"],["stacklayout","@progress/kendo-angular-layout"],["stepper","@progress/kendo-angular-layout"],["stockchart","@progress/kendo-angular-charts"],["svgicon","@progress/kendo-angular-icons"],["switch","@progress/kendo-angular-inputs"],["tabstrip","@progress/kendo-angular-layout"],["textarea","@progress/kendo-angular-inputs"],["textbox","@progress/kendo-angular-inputs"],["tilelayout","@progress/kendo-angular-layout"],["timeline","@progress/kendo-angular-layout"],["timepicker","@progress/kendo-angular-dateinputs"],["toolbar","@progress/kendo-angular-toolbar"],["treelist","@progress/kendo-angular-treelist"],["treeview","@progress/kendo-angular-treeview"],["typography","@progress/kendo-angular-typography"],["upload","@progress/kendo-angular-upload"],["window","@progress/kendo-angular-dialog"],["charts","@progress/kendo-angular-charts"],["conversationalui","@progress/kendo-angular-conversational-ui"],["tooltip","@progress/kendo-angular-tooltip"]]);var Ot=Dt(Et(Gt(import.meta.url)),"../proto/service.proto"),M=new j("contextapi.telerik.com:443",Ot,{libName:T});var me=async()=>M.validateUserLicense();import to from"fs";import ft from"path";import{fileURLToPath as oo}from"url";import{z as w}from"zod";var C=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 F=e=>{let t=[`1. \`${e.accessibilityAssistantName}\`: Call first with \`includeGeneralGuidelines=true\`; use \`false\` for component-specific follow-ups.`];if(e.includeLayout){let r=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 ${r}. 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 r=e.components?.length?e.components.join(", "):"each Kendo component selected for the implementation";t.push(`${t.length+1}. \`${e.codeAssistantName}\`: Call once per component (${r}) 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 n=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.",o=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(r=>` ${r}`).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
|
+
${n}${o}
|
|
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",n=[`1. \`${e.codeAssistantName}\`: Call once per component (${t}) with a concise, feature-specific query before writing Kendo markup.`];return e.includeIcons&&n.push(`${n.length+1}. \`${e.iconAssistantName}\`: Find icons only for the required actions and states.`),n.push(`${n.length+1}. Implement using the gathered ${e.suiteName} documentation.`),n.push(`${n.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
|
+
${n.map(o=>` ${o}`).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: ${
|
|
115
|
+
- If all automated changes look correct and no further fixes are needed, explicitly confirm this`;import{execFile as Lt}from"child_process";import{access as _t}from"fs/promises";import{promisify as Bt}from"util";var ge=Bt(Lt);function $t(e,t){let n;try{n=JSON.parse(e)}catch{return e}let o=n?.Item;if(!o)return e;let r=[],s=o.FullName??o.Name??"",a=o.Type??"",i=o.Summary??"",c=o.SyntaxContent??"";r.push(`## API Reference Item
|
|
116
|
+
- Name: ${s}
|
|
537
117
|
- Type: ${a}
|
|
538
|
-
- Summary: ${
|
|
539
|
-
- Syntax: ${
|
|
540
|
-
`,
|
|
118
|
+
- Summary: ${i}
|
|
119
|
+
- Syntax: ${c}`);let u=n.RelatedItemsByType?.return_type;if(u?.length){let p=u[0].Text;p&&r.push(`- Return Type: ${p}`)}let h=o.Examples??[];if(h.length>0){let p=`## Examples
|
|
120
|
+
`,m=0;for(let y of h){let l=(y.Component??"").toLowerCase(),f=t.toLowerCase();if(l&&l!==f&&l!=="general")continue;m+=1;let x=y.Code??"";p+=`### Example ${m}
|
|
541
121
|
\`\`\`
|
|
542
|
-
${
|
|
122
|
+
${x}
|
|
543
123
|
\`\`\`
|
|
544
|
-
`}
|
|
545
|
-
${
|
|
546
|
-
`+
|
|
124
|
+
`}m>0&&r.push(p)}let v=n.RelatedItemsByType??{},g=[];for(let[p,m]of Object.entries(v))if(!(p==="return_type"||p==="render_fragment"))for(let y of m??[]){let l=y.FullName??"",f=y.ShortText??"";g.push(`### ${l} (${p})
|
|
125
|
+
${f}`)}return g.length>0&&r.push(`## Additional Context
|
|
126
|
+
`+g.join(`
|
|
547
127
|
---
|
|
548
|
-
`)),
|
|
128
|
+
`)),r.join(`
|
|
549
129
|
|
|
550
|
-
`)}function
|
|
551
|
-
`)||"No CSS utilities found for the given prompt.",
|
|
130
|
+
`)}function fe(e,t){let{name:n,title:o,description:r,layoutAssistantName:s,codeAssistantName:a,styleAssistantName:i,iconAssistantName:c,accessibilityAssistantName:u,suiteName:h,libKey:v,components:g}=e,p=new C(n,{title:o,description:r,requiredAccess:e.requiredAccess,inputSchema:{userIntent:w.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:w.number().min(0).max(1).default(1).describe("Confidence (0-1) to include Component Documentation assistance. Default is 1."),needsLayoutConfidence:w.number().min(0).max(1).default(0).describe("Confidence (0-1) to include Layout assistance. Default is 0."),needsStylingConfidence:w.number().min(0).max(1).default(0).describe("Confidence (0-1) to include Theming/Styling assistance. Default is 0."),needsResponsiveBehaviorConfidence:w.number().min(0).max(1).default(0).describe("Confidence (0-1) to include Responsive Behavior assistance. Default is 0."),needsIconsConfidence:w.number().min(0).max(1).default(0).describe("Confidence (0-1) to include Icons assistance. Default is 0."),componentsNeeded:w.array(w.enum(g)).optional().describe(`Optional list of specific ${h} components needed for the project.`)}},async({userIntent:m,needsComponentsDocsConfidence:y,needsLayoutConfidence:l,needsStylingConfidence:f,needsResponsiveBehaviorConfidence:x,needsIconsConfidence:S,componentsNeeded:N},{_meta:R})=>{let V=I(p,R);b("UI Orchestrator called with:",{userIntent:m,needsComponentsDocsConfidence:y,needsLayoutConfidence:l,needsStylingConfidence:f,needsResponsiveBehaviorConfidence:x,needsIconsConfidence:S});try{await t.recordOrchestratorUserRequest({meta:{userIntent:m,componentsNeeded:N,...V}})}catch(O){throw G(O)}let P=p.server?.server.getClientCapabilities?.()?.elicitation,K;if(P&&f>.3&&f<=.6){let O=await p.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"]}});O?.action==="accept"&&O.content?.includeCustomTheming&&(K=!0)}return{content:[{type:"text",text:F({name:n,userIntent:m,includeComponentsDocs:y>.3,includeTheming:f>.6||!!K,includeLayout:l>.5,includeIcons:S>.6,includeResponsive:l>.5&&x>.4,layoutAssistantName:s,codeAssistantName:a,styleAssistantName:i,iconAssistantName:c,accessibilityAssistantName:u,suiteName:h,libKey:v,components:N})}]}});return p}function ye(e,t){let{name:n,title:o,description:r,iconAssistantName:s,codeAssistantName:a,suiteName:i,libKey:c,components:u}=e,h=new C(n,{title:o,description:r,inputSchema:{userIntent:w.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:w.number().min(0).max(1).default(.7).describe("Confidence (0-1) to include Icons assistance. Default is 0.7."),componentsNeeded:w.array(w.enum(u)).optional().describe(`Optional list of specific ${i} components you want to learn about.`)},requiredAccess:e.requiredAccess},async({userIntent:v,needsIconsConfidence:g,componentsNeeded:p},{_meta:m})=>{let y=I(h,m);b("Assistant Orchestrator called with:",{userIntent:v,needsIconsConfidence:g,componentsNeeded:p});try{await t.recordOrchestratorUserRequest({meta:{userIntent:v,componentsNeeded:p,...y}})}catch(f){throw G(f)}return{content:[{type:"text",text:J({name:n,userIntent:v,includeComponentsDocs:!0,includeIcons:g>.5,codeAssistantName:a,iconAssistantName:s,suiteName:i,libKey:c,components:p})}]}});return h}function be(e,t){let{name:n,title:o,description:r,suiteName:s,libKey:a,getPreContent:i}=e,c=new C(n,{title:o,description:r,requiredAccess:e.requiredAccess,inputSchema:{prompt:w.string().describe("An enhanced prompt describing the HTML layout structure, design requirements or specific visual effects you want to achieve."),includeBuildingBlockExamples:w.boolean().describe("Whether to include building block examples. Defaults to false.").default(!1)}},async({prompt:u,includeBuildingBlockExamples:h},{_meta:v})=>{let g=I(c,v);b("Layout Assistant called with:",{prompt:u,includeBuildingBlockExamples:h});try{let m=(await t.queryCssUtils({query:u},{...g})).values.join(`
|
|
131
|
+
`)||"No CSS utilities found for the given prompt.",y=i?.()??"",l=f=>`${y}
|
|
552
132
|
|
|
553
133
|
# Kendo Design System CSS Utilities
|
|
554
134
|
|
|
555
|
-
${
|
|
556
|
-
${
|
|
557
|
-
`;if(
|
|
135
|
+
${m}
|
|
136
|
+
${f??""}
|
|
137
|
+
`;if(h)try{let f=await t.queryBuildingBlocks({query:u,lib_name:a},{...g}),x="";f.items?.length>0&&(x=`
|
|
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
|
-
${
|
|
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=l(x)}catch(f){b("Error calling building-blocks service:",f),m=l()}else m=l();return{content:[{type:"text",text:m}]}}catch(p){throw G(p)}});return c}function ke(e,t){let{name:n,title:o,description:r,libKey:s,getPreContent:a}=e,i=new C(n,{title:o,description:r,requiredAccess:e.requiredAccess,inputSchema:{prompt:w.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:c},{_meta:u})=>{let h=I(i,u);b("Style Assistant called with:",{prompt:c});let v="";try{let m=await t.queryThemeGenerate({prompt:c},{...h});if(m.variables_json){let y=JSON.parse(m.variables_json),l=[];if(y)for(let f of Object.keys(y))typeof y[f]=="string"&&l.push(`${f}: ${y[f]}`);v=l.join(`
|
|
573
153
|
|
|
574
|
-
`)}}catch(
|
|
154
|
+
`)}}catch(m){throw G(m)}let g=a?.()??"";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 ve(e,t){let{name:n,title:o,description:r,libKey:s,getPostContent:a}=e,i=new C(n,{title:o,description:r,requiredAccess:e.requiredAccess,inputSchema:{query:w.string().describe("A search query for finding icons. Be specific about the icon purpose, style, or action."),limit:w.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:c,limit:u},{_meta:h})=>{let v=I(i,h);b("Icon Search called with:",{query:c,limit:u});try{let g=await t.queryIconsSearch({query:c,limit:u*100},{...v}),p=a?.()??"";return{content:[{type:"text",text:`${g.values.join(`
|
|
586
166
|
|
|
587
167
|
`)}
|
|
588
168
|
|
|
589
|
-
${
|
|
169
|
+
${p}`}]}}catch(g){throw G(g)}});return i}function we(e,t){let{name:n,title:o,description:r,libKey:s,suiteName:a,components:i,componentAliases:c,getPostContent:u}=e,h=new C(n,{title:o,description:r,requiredAccess:e.requiredAccess,inputSchema:{query:w.string().describe("The query to search for."),component:w.enum(i).describe("The component to search for. If not specified, use General.")}},async({query:v,component:g},{_meta:p})=>{let m=I(h,p);b("Code Assistant called with:",{query:v,component:g});let y=g;if(c){let l=c[g];l&&(y=l)}try{let f=(await t.query({query:v,component:y?.toLowerCase()??"general",lib_name:s,text_matches_count:3,code_matches_count:0,allowed_types:["documentation"]},{...m})).values.map(N=>N.replace(/\0/g,"")),x=u?.({component:g})??"";return{content:[{type:"text",text:`${f.join(`
|
|
590
170
|
|
|
591
171
|
`)}
|
|
592
172
|
|
|
593
|
-
${
|
|
173
|
+
${x}`}]}}catch(l){throw G(l)}});return h}function Ae(e,t){let{name:n,title:o,description:r,libKey:s,suiteName:a,components:i,componentAliases:c}=e,u=new C(n,{title:o,description:r,requiredAccess:e.requiredAccess,inputSchema:{query:w.string().describe("The query to search for."),component:w.enum(i).describe("The component to search for. If not specified, use General."),includeGeneralGuidelines:w.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:p})=>{let m=I(u,p);b("Accessibility Assistant called with:",{query:h,component:v,includeGeneralGuidelines:g});let y=v;if(c){let l=c[v];l&&(y=l)}try{let l="";if(g){let R=ce();l+=`# WCAG 2.2 Level AA General Accessibility Guidelines
|
|
594
174
|
|
|
595
|
-
`,
|
|
175
|
+
`,l+=R,l+=`
|
|
596
176
|
|
|
597
177
|
---
|
|
598
178
|
|
|
599
|
-
`}let
|
|
179
|
+
`}let N=(await t.getApiRefMatches({query:h,component:y?.toLowerCase()??"general",lib_name:s,filters_json:'{"type":{"$in":["accessibility"]}}'},{...m})).values.map(R=>R.replace(/\0/g,"")).map(R=>$t(R,y?.toLowerCase()??"general")).join(`
|
|
600
180
|
|
|
601
|
-
`);return
|
|
181
|
+
`);return N?(g&&(l+=`# Component-Specific Accessibility Information
|
|
602
182
|
|
|
603
|
-
`),
|
|
183
|
+
`),l+=N):g||(l="No component-specific accessibility guidelines found."),{content:[{type:"text",text:l}]}}catch(l){throw G(l)}});return u}function G(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 qt=20*1024*1024,xe=1200*1e3;function he(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 Ce(e,t){let{name:n,title:o,description:r,suiteName:s,packagePrefix:a}=e,i=new C(n,{title:o,description:r,requiredAccess:e.requiredAccess,inputSchema:{workingDirectory:w.string().describe('The absolute path to the project directory where the upgrade should be executed (e.g., "/Users/username/my-app")'),packageNames:w.array(w.string()).optional().describe(`The package names to target for codemod upgrade (e.g., ["${a}grid", "${a}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:w.boolean().optional().describe("Skip npm package installation and only run codemods. Use this when package installation has already been done manually.")}},async({workingDirectory:c,packageNames:u,skipInstall:h},{_meta:v})=>{let g=I(i,v);try{await t.recordToolUserRequest({toolName:n,meta:g})}catch(p){console.error("Error recording tool request:",p)}try{try{await _t(c)}catch{return{content:[{type:"text",text:`The working directory does not exist: "${c}". Please provide a valid absolute path to your project.`}]}}let p=!1;try{await ge("npx",["--no","--","kendo","--version"],{cwd:c}),p=!0}catch{p=!1}let m=[],y=async(P,K=!1)=>{try{let E=!K&&p?["--no","--","kendo",...P]:["-y","@progress/kendo-cli",...P],{stdout:O,stderr:kt}=await ge("npx",E,{cwd:c,maxBuffer:qt,timeout:xe});return{timedOut:!1,stdout:O,stderr:kt}}catch(E){return E.killed?{timedOut:!0,partialOutput:E.stdout?.trim()}:{timedOut:!1,stdout:E.stdout||"",stderr:E.stderr||E.message}}},l=["migrate",...u??[],"--codemods","--force","--ai-mode"];(h||u?.length)&&l.push("--no-install");let f=await y(l);if(f.timedOut)return he(f.partialOutput);let x=f.stdout,S=f.stderr;if(S?.includes("Unknown argument")){let P=await y(l,!0);if(P.timedOut)return he(P.partialOutput);x=P.stdout,S=P.stderr}S?.trim()&&m.push(`
|
|
613
193
|
Errors:
|
|
614
|
-
${
|
|
194
|
+
${S}`),x?.trim()&&m.push(x.trim());let N=x.includes("Packages installed successfully."),R=x.includes("Package installation failed:"),V=x.includes("Running codemod:");return R?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.`):N&&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.`),V&&m.push(Z()),{content:[{type:"text",text:m.join(`
|
|
199
|
+
`)}]}}catch(p){return{content:[{type:"text",text:`Error: ${p.message||p.toString()}`}]}}});return i}var Se=e=>`${e}_ui_generator`,Ie=e=>`${e}_assistant`,Te=e=>`${e}_layout_assistant`,Ne=e=>`${e}_component_assistant`,Re=e=>`${e}_style_assistant`,Pe=e=>`${e}_icon_assistant`,Ue=e=>`${e}_accessibility_assistant`,Ee=e=>`${e}_getting_started_assistant`,De=e=>`${e}_upgrade_assistant`;var Ge=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.`,Oe=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.`,Le=`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.`,_e=`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.`,Be=`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
|
+
`,$e=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,34 @@ 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=U("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 qt={createOrchestrator:xe,createAssistantOrchestrator:Te,createLayoutAssistant:Ie,createStyleAssistant:Ne,createIconSearch:Ee,createCodeAssistant:Re,createAccessibilityAssistant:Pe,createUpgrade:Oe},Kt={orchestrator:Ue,assistantOrchestrator:Ge,layoutAssistant:Le,codeAssistant:Me,styleAssistant:$e,iconAssistant:_e,accessibilityAssistant:Be,gettingStartedAssistant:Fe,upgradeAssistant:qe},Wt={orchestrator:Ke,assistantOrchestrator:We,layoutAssistant:je,styleAssistant:Ve,iconAssistant:ze,codeAssistant:Ye,accessibilityAssistant:He,upgradeAssistant:Qe},jt={Orchestrator:{render:q},Validator:{render:F},SharedValidation:{getSteps:U}},Vt={Angular:{steps:oe,additionalPlan:ne},React:{steps:ae}},h={Tools:qt,ToolNames:Kt,ToolDescriptions:Wt,Templates:jt,Validation:Vt};var zt=h.ToolNames.codeAssistant("kendo"),Je=()=>`# Kendo Design System Guidelines for ${l}
|
|
283
|
+
`;var Mt={createOrchestrator:fe,createAssistantOrchestrator:ye,createLayoutAssistant:be,createStyleAssistant:ke,createIconSearch:ve,createCodeAssistant:we,createAccessibilityAssistant:Ae,createUpgrade:Ce},Ft={orchestrator:Se,assistantOrchestrator:Ie,layoutAssistant:Te,codeAssistant:Ne,styleAssistant:Re,iconAssistant:Pe,accessibilityAssistant:Ue,gettingStartedAssistant:Ee,upgradeAssistant:De},Kt={orchestrator:Ge,assistantOrchestrator:Oe,layoutAssistant:Le,styleAssistant:_e,iconAssistant:Be,codeAssistant:$e,accessibilityAssistant:qe,upgradeAssistant:Me},Wt={Orchestrator:{render:F},UX:{getInstructions:_}},k={Tools:Mt,ToolNames:Ft,ToolDescriptions:Kt,Templates:Wt};var Fe=()=>`# Kendo Design System Guidelines for ${d}
|
|
787
284
|
|
|
788
285
|
## Setting up Styles/CSS
|
|
789
|
-
|
|
790
|
-
|
|
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.
|
|
794
|
-
|
|
795
|
-
### Using NPM
|
|
796
|
-
|
|
797
|
-
The CSS Utilities are available as an NPM module that you can install - \`@progress/kendo-theme-utils\`
|
|
798
|
-
|
|
286
|
+
Include a reference to the kendo-theme-utils CSS package and use the same import mechanism as the existing Kendo theme.
|
|
287
|
+
Add \`@progress/kendo-theme-utils/dist/all.css\` to \`angular.json\` styles, or use the existing global stylesheet import path already used by the app.
|
|
799
288
|
To install: \`npm install --save @progress/kendo-theme-utils\`
|
|
289
|
+
Also available as SCSS - \`@use '@progress/kendo-theme-utils/scss/all.scss' as *;\`
|
|
290
|
+
Alternatively, use CDN: \`<link rel="stylesheet" href="https://unpkg.com/@progress/kendo-theme-utils/dist/all.css" />\`
|
|
800
291
|
|
|
801
|
-
|
|
802
|
-
|
|
803
|
-
|
|
804
|
-
|
|
805
|
-
|
|
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 ${l} 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 ${zt} tool in order to get specific API reference and docs.
|
|
816
|
-
|
|
817
|
-
- ${l} Card component.
|
|
818
|
-
- Generally, it is recommended to use 100% width (e.g., \`<kendo-card width="100%">\`)
|
|
819
|
-
- If needed, use specific width based on the layout requirements (e.g., \`<kendo-card width="150px">\`)
|
|
820
|
-
- Avoid applying additional styling properties such as \`display\`, \`flex\`, \`grid\`, or other layout-specific CSS to layout components such as GridLayout, Splitter, StackLayout and TileLayout. Use the component's built-in parameters 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
|
-
\`\`\`
|
|
880
|
-
|
|
881
|
-
## Critical Sizing Rules
|
|
292
|
+
### Default Behavior
|
|
293
|
+
- Use the Kendo Design System utilities for layout.
|
|
294
|
+
- Use theme utility classes instead of custom CSS whenever a utility exists. Write custom CSS only for properties without a utility equivalent.
|
|
295
|
+
- Do not use \`::ng-deep\` or \`/deep/\` overrides for Kendo internals when a utility or component configuration can express the rule.
|
|
296
|
+
- Prioritize using ${d} components instead of building ones from scratch.
|
|
882
297
|
|
|
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.
|
|
298
|
+
- ${d} Card component.
|
|
299
|
+
- Generally use 100% width (e.g., \`<kendo-card width="100%">\`)
|
|
300
|
+
- Or set width based on the layout requirements (e.g., \`<kendo-card width="150px">\`)
|
|
888
301
|
|
|
889
|
-
|
|
302
|
+
- **\`min-width: 0\`** on every flex/grid child that contains a Kendo component.
|
|
303
|
+
- Grid and Chart require an explicit height.
|
|
304
|
+
- Grid columns require an explicit width.
|
|
305
|
+
- Custom cards and containers must use \`var(--kendo-component-bg)\` for their background.
|
|
306
|
+
- 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.
|
|
307
|
+
- Avoid \`transform\` on layout ancestors that contain Kendo overlay components.
|
|
308
|
+
- By default constrain page content to \`max-width: 1440px\` with \`margin: 0 auto\` to prevent unbounded wide-screen stretching.
|
|
890
309
|
|
|
891
|
-
|
|
310
|
+
Always add to \`styles.scss\` or the global CSS file:
|
|
892
311
|
|
|
893
312
|
\`\`\`scss
|
|
894
313
|
html, body {
|
|
@@ -897,30 +316,14 @@ html, body {
|
|
|
897
316
|
}
|
|
898
317
|
\`\`\`
|
|
899
318
|
|
|
900
|
-
Without this, dark-themed components render on a white page.
|
|
901
|
-
|
|
902
319
|
## Surface Hierarchy
|
|
903
320
|
|
|
904
|
-
|
|
905
|
-
1.
|
|
906
|
-
2.
|
|
907
|
-
3.
|
|
908
|
-
4.
|
|
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 templates (Grid cell templates, custom component content) break dark mode.
|
|
911
|
-
|
|
912
|
-
## Splitter Usage Boundary
|
|
913
|
-
|
|
914
|
-
Use the \`kendo-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
|
-
\`kendo-dropdownlist\`, \`kendo-datepicker\`, \`kendo-textbox\`, 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 Xe=()=>`## Design Standards for ${l} Theming
|
|
321
|
+
Use only the four surface levels defined by the Kendo themes
|
|
322
|
+
1. Page background (\`var(--kendo-body-bg)\`) \u2014 applied to \`html, body\`
|
|
323
|
+
2. Component background (\`var(--kendo-component-bg)\`) \u2014 cards, panels, Grid body
|
|
324
|
+
3. Header / hover surface (\`var(--kendo-grid-header-bg)\`) \u2014 Grid headers, highlighted rows
|
|
325
|
+
4. Active / selected surface \u2014 managed by the theme automatically
|
|
326
|
+
`;var Ke=()=>`## Design Standards for ${d} Theming
|
|
924
327
|
|
|
925
328
|
### Color & Contrast Requirements
|
|
926
329
|
- Body text contrast: \u2265 4.5:1. Large text / UI component borders: \u2265 3:1.
|
|
@@ -958,7 +361,7 @@ This is the most common source of dark mode breakage in custom UI.
|
|
|
958
361
|
|
|
959
362
|
---
|
|
960
363
|
|
|
961
|
-
## Applying CSS Variables in ${
|
|
364
|
+
## Applying CSS Variables in ${d}
|
|
962
365
|
|
|
963
366
|
Apply these CSS variables in the Angular application using one of these methods:
|
|
964
367
|
|
|
@@ -1020,7 +423,16 @@ export class ThemeService {
|
|
|
1020
423
|
}
|
|
1021
424
|
}
|
|
1022
425
|
\`\`\`
|
|
1023
|
-
`;var
|
|
426
|
+
`;var We=k.ToolNames.codeAssistant("kendo"),je=()=>`### SVG Icon Export Names
|
|
427
|
+
|
|
428
|
+
For an icon listed above, map its listed value to the SVG export from \`@progress/kendo-svg-icons\` as follows:
|
|
429
|
+
1. Append \`-icon\` to the listed value.
|
|
430
|
+
2. Convert the result from kebab case to camel case.
|
|
431
|
+
|
|
432
|
+
### Font Icon Class Names
|
|
433
|
+
Prepend \`k-i-\` to the listed value to form the font icon CSS class name. Keep the value in kebab case.
|
|
434
|
+
|
|
435
|
+
## Using ${d} Icons
|
|
1024
436
|
|
|
1025
437
|
Important: Always prefer SVG icons over font icons. Only fall back to font icons if SVG is explicitly not an option.
|
|
1026
438
|
|
|
@@ -1028,13 +440,13 @@ Important: Always prefer SVG icons over font icons. Only fall back to font icons
|
|
|
1028
440
|
|
|
1029
441
|
- Make sure @progress/kendo-svg-icons is installed.
|
|
1030
442
|
- Make sure @progress/kendo-angular-icons is installed.
|
|
1031
|
-
- You can call ${
|
|
443
|
+
- You can call ${We} tool for ${d} SVGIcon component for docs and API reference.
|
|
1032
444
|
- [optional] If SVG is not an option fallback to font icon - make sure \`<link rel="stylesheet" href="https://unpkg.com/@progress/kendo-font-icons/dist/index.css" />\` is added as a reference.
|
|
1033
|
-
- [optional] If using font icons you can call ${
|
|
445
|
+
- [optional] If using font icons you can call ${We} tool for ${d} Icon component for docs and API reference.
|
|
1034
446
|
|
|
1035
447
|
### Examples
|
|
1036
448
|
|
|
1037
|
-
Using ${
|
|
449
|
+
Using ${d} SVGIcon component:
|
|
1038
450
|
|
|
1039
451
|
\`\`\`ts
|
|
1040
452
|
import { Component } from "@angular/core";
|
|
@@ -1055,7 +467,7 @@ export class AppComponent {
|
|
|
1055
467
|
|
|
1056
468
|
\`\`\`
|
|
1057
469
|
|
|
1058
|
-
Using ${
|
|
470
|
+
Using ${d} Icon component:
|
|
1059
471
|
|
|
1060
472
|
\`\`\`ts
|
|
1061
473
|
import { Component } from "@angular/core";
|
|
@@ -1071,34 +483,16 @@ import { KENDO_ICONS } from "@progress/kendo-angular-icons";
|
|
|
1071
483
|
})
|
|
1072
484
|
export class AppComponent {}
|
|
1073
485
|
\`\`\`
|
|
1074
|
-
`;var
|
|
1075
|
-
|
|
1076
|
-
`;return n&&(o+=`### Package Installation
|
|
1077
|
-
Always use minimal, targeted package installation.
|
|
1078
|
-
Ensure all necessary Angular packages are installed, including @angular/localize.
|
|
1079
|
-
|
|
1080
|
-
Process:
|
|
1081
|
-
1. Identify the required components
|
|
1082
|
-
2. Determine the specific Kendo Angular packages needed
|
|
1083
|
-
3. Use the "ng add ${n}" command
|
|
486
|
+
`;var Ve=e=>{let t=e.component?.trim().toLowerCase(),n=ue.get(t),o=`## ${d} Implementation Rules
|
|
1084
487
|
|
|
1085
|
-
|
|
488
|
+
- Follow the project's existing Angular setup, including Standalone or NgModule conventions.
|
|
489
|
+
`;return n&&(o+=`
|
|
490
|
+
- Before using ${e.component}, confirm that \`${n}\` is already declared in the project. Install it only when missing, using the project's approved dependency workflow; do not reinstall existing dependencies.
|
|
1086
491
|
`),e.componentInstructions&&(o+=`
|
|
1087
492
|
## Component-Specific Guidelines
|
|
1088
493
|
|
|
1089
494
|
${e.componentInstructions}
|
|
1090
|
-
`),o
|
|
1091
|
-
## Icons
|
|
1092
|
-
|
|
1093
|
-
When icons are needed, always prefer SVG icons over font icons.
|
|
1094
|
-
Only fall back to font icons if SVG icons are explicitly not an option.
|
|
1095
|
-
`,o+=`
|
|
1096
|
-
## Types and Interfaces
|
|
1097
|
-
|
|
1098
|
-
Always use the correct ${l} types for component inputs, outputs, and event handler parameters.
|
|
1099
|
-
Do not substitute plain strings, plain objects, or \`any\` for a typed union, enum, or interface provided by the library.
|
|
1100
|
-
Import all required types from the appropriate ${l} package.
|
|
1101
|
-
`,o};function ot(e="kendo-angular-app",t=!0,n="meridian"){let o=t?`These instructions will walk you through creating a new Angular project and setting up ${l}.`:`These instructions will walk you through adding ${l} to your existing Angular project.`,s=1,i=t?`## Step ${s++}: Install Angular CLI
|
|
495
|
+
`),o};function ze(e="kendo-angular-app",t=!0,n="meridian"){let o=t?`These instructions will walk you through creating a new Angular project and setting up ${d}.`:`These instructions will walk you through adding ${d} to your existing Angular project.`,r=1,s=t?`## Step ${r++}: Install Angular CLI
|
|
1102
496
|
|
|
1103
497
|
First, ensure the Angular CLI is installed globally:
|
|
1104
498
|
|
|
@@ -1106,7 +500,7 @@ First, ensure the Angular CLI is installed globally:
|
|
|
1106
500
|
npm install -g @angular/cli@latest
|
|
1107
501
|
\`\`\`
|
|
1108
502
|
|
|
1109
|
-
## Step ${
|
|
503
|
+
## Step ${r++}: Create the Project
|
|
1110
504
|
|
|
1111
505
|
Create a new Angular project using the Angular CLI:
|
|
1112
506
|
|
|
@@ -1120,7 +514,7 @@ Navigate to the project directory:
|
|
|
1120
514
|
cd ${e}
|
|
1121
515
|
\`\`\`
|
|
1122
516
|
|
|
1123
|
-
`:"";return`# Getting Started with ${
|
|
517
|
+
`:"";return`# Getting Started with ${d}
|
|
1124
518
|
|
|
1125
519
|
${o}
|
|
1126
520
|
|
|
@@ -1135,9 +529,9 @@ Before you begin, ensure you have:
|
|
|
1135
529
|
- **Node.js 18 or later** installed on your machine
|
|
1136
530
|
- If Node.js is not available, you need to install the latest Node.js automatically as a preliminary step before installing the Angular CLI tool.
|
|
1137
531
|
|
|
1138
|
-
${
|
|
532
|
+
${s}## Step ${r++}: Configure animations
|
|
1139
533
|
|
|
1140
|
-
This ensures animations that ${
|
|
534
|
+
This ensures animations that ${d} components rely on are configurated correctly.
|
|
1141
535
|
|
|
1142
536
|
1. Open the \`src/app/app.config.ts\` file and add animations like this.
|
|
1143
537
|
\`\`\`typescript
|
|
@@ -1153,7 +547,7 @@ export const appConfig: ApplicationConfig = {
|
|
|
1153
547
|
};
|
|
1154
548
|
\`\`\`
|
|
1155
549
|
|
|
1156
|
-
## Step ${
|
|
550
|
+
## Step ${r++}: Install ${d} Packages
|
|
1157
551
|
|
|
1158
552
|
Use angular CLI to install grid package. While installing, confirm that you also want to install the underlying npm package with the suggested version from the ng tool.
|
|
1159
553
|
|
|
@@ -1161,13 +555,13 @@ Use angular CLI to install grid package. While installing, confirm that you also
|
|
|
1161
555
|
ng add @progress/kendo-angular-grid@latest --skip-confirmation --theme=${n}
|
|
1162
556
|
\`\`\`
|
|
1163
557
|
|
|
1164
|
-
Use npm to install additional required ${
|
|
558
|
+
Use npm to install additional required ${d} packages:
|
|
1165
559
|
|
|
1166
560
|
\`\`\`bash
|
|
1167
561
|
npm install @progress/kendo-angular-barcodes @progress/kendo-angular-chart-wizard @progress/kendo-angular-charts @progress/kendo-angular-dateinputs @progress/kendo-angular-diagrams @progress/kendo-angular-editor @progress/kendo-angular-filter @progress/kendo-angular-gantt @progress/kendo-angular-gauges @progress/kendo-angular-icons @progress/kendo-angular-listbox @progress/kendo-angular-listview @progress/kendo-angular-map @progress/kendo-angular-pdfviewer @progress/kendo-angular-pivotgrid @progress/kendo-angular-ripple @progress/kendo-angular-scheduler @progress/kendo-angular-scrollview @progress/kendo-angular-sortable @progress/kendo-angular-spreadsheet @progress/kendo-angular-tooltip @progress/kendo-angular-treelist @progress/kendo-angular-typography @progress/kendo-file-saver
|
|
1168
562
|
\`\`\`
|
|
1169
563
|
|
|
1170
|
-
## Step ${
|
|
564
|
+
## Step ${r++}: Activate Kendo license
|
|
1171
565
|
|
|
1172
566
|
This step is required to use Kendo UI for Angular components without watermarks and with access to all features. At this point, the customer have the correct license file, and the command should be run to activate the component in this specific project. Run the following command to activate your license:
|
|
1173
567
|
|
|
@@ -1182,7 +576,7 @@ ng cache clean
|
|
|
1182
576
|
\`\`\`
|
|
1183
577
|
|
|
1184
578
|
|
|
1185
|
-
## Step ${
|
|
579
|
+
## Step ${r++}: Install the Kendo utils package
|
|
1186
580
|
|
|
1187
581
|
Add the following script to index.html to include the Kendo theme utils, which are required for the themes to work correctly:
|
|
1188
582
|
|
|
@@ -1190,9 +584,9 @@ Add the following script to index.html to include the Kendo theme utils, which a
|
|
|
1190
584
|
<link rel="stylesheet" href="https://unpkg.com/@progress/kendo-theme-utils/dist/all.css" />
|
|
1191
585
|
\`\`\`
|
|
1192
586
|
|
|
1193
|
-
${t?`The application should start and open your browser to see your ${
|
|
587
|
+
${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.`}
|
|
1194
588
|
|
|
1195
|
-
## Step ${
|
|
589
|
+
## Step ${r++}: Create Sample Page
|
|
1196
590
|
|
|
1197
591
|
Add the sample page below to your application to verify that everything is working correctly.
|
|
1198
592
|
|
|
@@ -1219,7 +613,7 @@ export class App {}
|
|
|
1219
613
|
\`\`\`html
|
|
1220
614
|
<div class="k-d-flex k-flex-col k-gap-5 k-p-6">
|
|
1221
615
|
<div class="k-d-flex k-flex-col k-align-items-center k-gap-3 k-py-4">
|
|
1222
|
-
<h1 class="k-h2 k-text-center">${
|
|
616
|
+
<h1 class="k-h2 k-text-center">${d}</h1>
|
|
1223
617
|
<p class="k-h5 k-text-center k-color-subtle k-font-weight-normal k-max-w-3xl">
|
|
1224
618
|
Create sophisticated Angular UIs with AI-powered agents using natural language prompts
|
|
1225
619
|
</p>
|
|
@@ -1326,7 +720,7 @@ export class App {}
|
|
|
1326
720
|
}
|
|
1327
721
|
\`\`\`
|
|
1328
722
|
|
|
1329
|
-
## Step ${
|
|
723
|
+
## Step ${r++}: Run Your Application
|
|
1330
724
|
|
|
1331
725
|
**Verification:** Automatically run the application. Do not just inform the user\u2014execute the following command and keep the application running:
|
|
1332
726
|
|
|
@@ -1334,7 +728,7 @@ export class App {}
|
|
|
1334
728
|
cd ${e} && ng serve
|
|
1335
729
|
\`\`\`
|
|
1336
730
|
|
|
1337
|
-
`}var
|
|
731
|
+
`}var He=`
|
|
1338
732
|
## Grid Data Binding
|
|
1339
733
|
|
|
1340
734
|
MUST use kendoGridBinding directive for basic Grid operations
|
|
@@ -1393,7 +787,7 @@ CORRECT: <button kendoGridExcelCommand>Export to Excel</button>
|
|
|
1393
787
|
Column width Property: The width property for columns should be set as a number for pixel values, not a string.
|
|
1394
788
|
CORRECT: <kendo-grid-column [width]="120">
|
|
1395
789
|
WRONG: <kendo-grid-column width="120px">
|
|
1396
|
-
`;var
|
|
790
|
+
`;var Ye=`
|
|
1397
791
|
## kendoButton Must Not Be Combined with Command Directives
|
|
1398
792
|
|
|
1399
793
|
Never apply kendoButton to the same element as any of these TreeList command directives - they render their own button internally.
|
|
@@ -1407,7 +801,7 @@ Affected directives:
|
|
|
1407
801
|
|
|
1408
802
|
WRONG: <button kendoTreeListExcelCommand kendoButton>Export to Excel</button>
|
|
1409
803
|
CORRECT: <button kendoTreeListExcelCommand>Export to Excel</button>
|
|
1410
|
-
`;var
|
|
804
|
+
`;var Qe=`
|
|
1411
805
|
## kendoButton Must Not Be Combined with Command Directives
|
|
1412
806
|
|
|
1413
807
|
Never apply kendoButton to the same element as any of these ListView command directives - they render their own button internally.
|
|
@@ -1424,7 +818,7 @@ Affected directives:
|
|
|
1424
818
|
|
|
1425
819
|
WRONG: <button kendoListViewAddCommand kendoButton>Add</button>
|
|
1426
820
|
CORRECT: <button kendoListViewAddCommand>Add</button>
|
|
1427
|
-
`;var
|
|
821
|
+
`;var Xe=`
|
|
1428
822
|
## kendoButton Must Not Be Combined with Command Directives
|
|
1429
823
|
|
|
1430
824
|
Never apply kendoButton to the same element as the Scheduler PDF command directive - it renders its own button internally.
|
|
@@ -1437,7 +831,7 @@ Affected directives:
|
|
|
1437
831
|
|
|
1438
832
|
WRONG: <button kendoSchedulerPDFCommand kendoButton>Export to PDF</button>
|
|
1439
833
|
CORRECT: <button kendoSchedulerPDFCommand>Export to PDF</button>
|
|
1440
|
-
`;var
|
|
834
|
+
`;var Je=`
|
|
1441
835
|
## kendoButton Must Not Be Combined with Action Directives
|
|
1442
836
|
|
|
1443
837
|
Never apply kendoButton to the same element as any of these Window action directives - they render their own button internally.
|
|
@@ -1453,7 +847,7 @@ Affected directives:
|
|
|
1453
847
|
|
|
1454
848
|
WRONG: <button kendoWindowCloseAction kendoButton></button>
|
|
1455
849
|
CORRECT: <button kendoWindowCloseAction></button>
|
|
1456
|
-
`;var
|
|
850
|
+
`;var Ze=`
|
|
1457
851
|
## Charts Data Binding
|
|
1458
852
|
|
|
1459
853
|
Never bind the Chart's data to a getter property. Using a getter causes the chart to rerender on every Angular change detection cycle.
|
|
@@ -1461,7 +855,7 @@ Never bind the Chart's data to a getter property. Using a getter causes the char
|
|
|
1461
855
|
BAD: get chartData() { return [ /* data items */ ] }
|
|
1462
856
|
GOOD: public chartData = [ /* data items */ ];
|
|
1463
857
|
GOOD: public chartData = this.data.map(...)
|
|
1464
|
-
`;var
|
|
858
|
+
`;var et=["combobox","dropdownlist","dropdowntree","multicolumncombobox","multiselect","multiselecttree","autocomplete"],tt=e=>e==="autocomplete"?Vt:e==="dropdowntree"?zt:e==="multiselecttree"?Ht:e==="multicolumncombobox"?Yt:jt(e),jt=e=>`
|
|
1465
859
|
## ${e}
|
|
1466
860
|
When implementing or updating the ${e} component, always follow these rules for \`textField\` and \`valueField\`:
|
|
1467
861
|
|
|
@@ -1511,7 +905,7 @@ If \`valuePrimitive\` is false, which is the default, the value must be an objec
|
|
|
1511
905
|
\`\`\`typescript
|
|
1512
906
|
public selectedValue = { id: 2, name: 'B' };
|
|
1513
907
|
\`\`\`
|
|
1514
|
-
`,
|
|
908
|
+
`,Vt=`
|
|
1515
909
|
## AutoComplete
|
|
1516
910
|
|
|
1517
911
|
### Primitive Data
|
|
@@ -1519,7 +913,7 @@ If the data is an array of primitives (e.g., [data]="['A', 'B']"), never set \`v
|
|
|
1519
913
|
|
|
1520
914
|
### Complex Data
|
|
1521
915
|
If the data is an array of objects (e.g., [data]="[{ id, name }]"), always set \`valueField\` to a string property for value binding (e.g., "id").
|
|
1522
|
-
`,
|
|
916
|
+
`,zt='\n## DropDownTree\nWhen implementing or updating the DropDownTree component, always follow these rules:\n\nAlways set both `textField` and `valueField`:\n- `textField` is the property to display (e.g., "name")\n- `valueField` is the property for value binding (e.g., "id")\nWhen `valueField` and `textField` are string[], always specify `valueDepth`.\n\n### Primitive `value`\nIf the `value` is of a primitive type, `valuePrimitive` must be true and `dataItem` is required.\nThe `value` property of the `dataItem` will be associated with the `valueField`.\n',Ht='\n## MultiSelectTree\nWhen implementing or updating the MultiSelectTree component, always follow these rules:\n\nAlways set both `textField` and `valueField`:\n- `textField` is the property to display (e.g., "name")\n- `valueField` is the property for value binding (e.g., "id")\nWhen `valueField` and `textField` are string[], always specify `valueDepth`.\n\n### Primitive `value`\nIf the `value` is of a primitive type, `valuePrimitive` must be true and `dataItems` is required.\nThe `value` property of the `dataItems` will be associated with the `valueField`.\n',Yt='\n## MultiColumnComboBox\nWhen implementing or updating the MultiColumnComboBox component, always follow these rules:\n\nAlways set both `textField` and `valueField`:\n- `textField` is the property to display (e.g., "name")\n- `valueField` is the property for value binding (e.g., "id")\n\n### Primitive `value`\nIf the `value` is of a primitive type, `valuePrimitive` must be true.\n';var ot=`
|
|
1523
917
|
|
|
1524
918
|
## Smart Grid (AI-Enhanced) Instructions
|
|
1525
919
|
|
|
@@ -1538,6 +932,70 @@ Suggestion Examples by Domain:
|
|
|
1538
932
|
|
|
1539
933
|
Required Disclaimer:
|
|
1540
934
|
"The examples use a Telerik-hosted AI service for demonstration purposes only. For production applications, use an AI service that understands your specific domain, data, and business requirements."
|
|
1541
|
-
`;var
|
|
935
|
+
`;var nt=["button","buttongroup","splitbutton","dropdownbutton","chip","chiplist","floatingactionbutton","smartpastebutton","speechtotextbutton"],rt=e=>e==="button"||e==="buttongroup"||e==="splitbutton"||e==="dropdownbutton"||e==="chip"?Qt:"",Qt='\n## Deprecated Properties & Modern Replacements\n\nButton `look` property: The `look` property is deprecated. Use `fillMode` instead.\n Type: `ButtonFillMode = "solid" | "flat" | "outline" | "link" | "clear"`\n CORRECT: <button kendoButton fillMode="flat">Button</button>\n WRONG: <button kendoButton look="flat">Button</button>\n\nButton `primary` property: The `primary` property is deprecated. Use `themeColor="primary"` instead.\n CORRECT: <button kendoButton themeColor="primary">Button</button>\n WRONG: <button kendoButton [primary]="true">Button</button>\n';var st=`
|
|
936
|
+
## Badge container usage
|
|
937
|
+
|
|
938
|
+
Use a <kendo-badge> without <kendo-badge-container> only when the host can host content, overflow is enabled, and its CSS \`position\` is not "static".
|
|
939
|
+
If the host element cannot host content, or if its CSS \`position\` or overflow are unknown, use kendo-badge-container to wrap both the target and the badge.
|
|
940
|
+
|
|
941
|
+
Example with container:
|
|
942
|
+
\`\`\`html
|
|
943
|
+
<kendo-badge-container>
|
|
944
|
+
<button kendoButton>Inbox</button>
|
|
945
|
+
<kendo-badge themeColor="error">5</kendo-badge>
|
|
946
|
+
</kendo-badge-container>
|
|
947
|
+
\`\`\`
|
|
948
|
+
|
|
949
|
+
Example without container:
|
|
950
|
+
\`\`\`html
|
|
951
|
+
<button kendoButton style="position: relative; overflow: visible;">
|
|
952
|
+
Inbox
|
|
953
|
+
<kendo-badge themeColor="error">5</kendo-badge>
|
|
954
|
+
</button>
|
|
955
|
+
\`\`\``;var at='\n## Expanded State\n\nTo ensure a specific hierarchy level in the PivotGrid is expanded by default, set the `expand: true` property on the relevant item within the arrays bound to the `rowAxes`, `columnAxes`, or `measureAxes` input properties of the `kendoPivotLocalBinding` or `kendoPivotOLAPBinding` directive.\nThe expand property is part of the `PivotGridAxis` interface and controls whether that axis member appears expanded when the PivotGrid first renders, rather than requiring user interaction.\n\nExample:\npublic rowAxes: PivotGridAxis[] = [\n { name: ["Region"], expand: true },\n { name: ["Country"] }\n];\npublic columnAxes: PivotGridAxis[] = [\n { name: ["Category"], expand: true },\n { name: ["Product"] }\n];';var it='\n## Usage\n- Prefer `kendo-label` over plain HTML labels\n- Use either wrapping or `[for]` with a template reference variable\n\n```\n<kendo-label [for]="country" text="Country"></kendo-label>\n<kendo-dropdownlist #country [data]="countries"></kendo-dropdownlist>\n```\n\nAlso valid:\n\n```\n<kendo-label text="Country">\n <kendo-dropdownlist [data]="countries"></kendo-dropdownlist>\n</kendo-label>\n```\n\n## Association by control type\n- Kendo components: use wrapping or `[for]` plus a template reference variable\n- Native HTML inputs: use wrapping, `[for]` with `id`, or `[for]` with a template reference variable';var lt='\n## Usage\n- Prefer `kendo-floatinglabel` over plain HTML labels\n- Use either wrapping or `[for]` with a template reference variable\n\n```\n<kendo-floatinglabel [for]="country" text="Country"></kendo-floatinglabel>\n<kendo-dropdownlist #country [data]="countries"></kendo-dropdownlist>\n```\n\nAlso valid:\n\n```\n<kendo-floatinglabel text="Country">\n <kendo-dropdownlist [data]="countries"></kendo-dropdownlist>\n</kendo-floatinglabel>\n```\n\n## Association by control type\n- Kendo components: use wrapping or `[for]` plus a template reference variable\n- Native HTML inputs: use wrapping, `[for]` with `id`, or `[for]` with a template reference variable\n\n### Usage with other Kendo Angular components\n- `MaskedTextBox`: set `maskOnFocus="true"`\n- `DateInput`, `DatePicker`, `DateTimePicker`: set `placeholder=""`\n- native HTML inputs: apply the `kendoTextBox` directive';var ct=`
|
|
956
|
+
## Setup
|
|
957
|
+
- Use the \`kendoForm\` directive on a \`<form>\` element.
|
|
958
|
+
- Use one \`kendo-formfield\` per control.
|
|
959
|
+
- Never use a \`kendo-formfield\` for an element which isn't a form control.
|
|
960
|
+
- Use \`kendo-label\` or \`kendo-floatinglabel\` to associate each control with a label. Do not use plain HTML labels.
|
|
961
|
+
|
|
962
|
+
\`\`\`
|
|
963
|
+
<form kendoForm [formGroup]="form">
|
|
964
|
+
<kendo-formfield>
|
|
965
|
+
<kendo-label [for]="name" text="Name"></kendo-label>
|
|
966
|
+
<kendo-textbox #name formControlName="name"></kendo-textbox>
|
|
967
|
+
</kendo-formfield>
|
|
968
|
+
</form>
|
|
969
|
+
\`\`\`
|
|
970
|
+
|
|
971
|
+
### Hints, errors, fieldsets
|
|
972
|
+
|
|
973
|
+
- Use the \`kendoFormFieldSet\` directive only when fields form a real conceptual section. Provide a \`legend\`.
|
|
974
|
+
- Use \`kendo-formhint\` only when helper text adds value.
|
|
975
|
+
- Use \`kendo-formerror\` only when validation feedback needs to be shown.
|
|
976
|
+
|
|
977
|
+
Extended example:
|
|
978
|
+
|
|
979
|
+
\`\`\`
|
|
980
|
+
<form kendoForm [formGroup]="form">
|
|
981
|
+
<fieldset kendoFormFieldSet legend="Section title">
|
|
982
|
+
<kendo-formfield>
|
|
983
|
+
<kendo-label [for]="name" text="Name"></kendo-label>
|
|
984
|
+
<kendo-textbox #name formControlName="name"></kendo-textbox>
|
|
985
|
+
<kendo-formhint>Helpful guidance.</kendo-formhint>
|
|
986
|
+
@if (form.get('name')?.errors?.['required'] &&
|
|
987
|
+
form.get('name')?.touched) {
|
|
988
|
+
<kendo-formerror> Name is required</kendo-formerror>
|
|
989
|
+
}
|
|
990
|
+
</kendo-formfield>
|
|
991
|
+
</fieldset>
|
|
992
|
+
</form>
|
|
993
|
+
\`\`\`
|
|
994
|
+
|
|
995
|
+
#### Composition
|
|
996
|
+
- Keep the label, control, hint and error for one field inside the same \`kendo-formfield\`.
|
|
997
|
+
- If using radio buttons, group all related options within a single \`kendo-formfield\`.`;function Xt(e){let t=e?.trim().toLowerCase();if(t==="grid")return[He,ot].join(`
|
|
998
|
+
|
|
999
|
+
`);if(t==="treelist")return Ye;if(t==="listview")return Qe;if(t==="scheduler")return Xe;if(t==="window")return Je;if(t==="charts")return Ze;if(t==="forms")return ct;if(t==="badge")return st;if(t==="pivotgrid")return at;if(t==="label")return it;if(t==="floatinglabel")return lt;if(et.includes(t))return tt(t);if(nt.includes(t))return rt(t)}var B=!!process.env.PLUGIN_MODE,dt=k.ToolNames.layoutAssistant(U),ee=k.ToolNames.codeAssistant(U),pt=k.ToolNames.styleAssistant(U),te=k.ToolNames.iconAssistant(U),ut=k.ToolNames.gettingStartedAssistant(U),mt=k.ToolNames.accessibilityAssistant(U),Jt=k.ToolNames.upgradeAssistant(U);function gt(e,t){return[...B?[]:[k.Tools.createOrchestrator({name:k.ToolNames.orchestrator(U),title:"Kendo UI Generator",description:k.ToolDescriptions.orchestrator(d),layoutAssistantName:dt,codeAssistantName:ee,styleAssistantName:pt,iconAssistantName:te,accessibilityAssistantName:mt,suiteName:d,libKey:T,components:q,requiredAccess:["agent"]},e),k.Tools.createAssistantOrchestrator({name:"kendo_angular_assistant",title:"Kendo UI Assistant",description:k.ToolDescriptions.assistantOrchestrator(d),codeAssistantName:ee,iconAssistantName:te,suiteName:d,libKey:T,components:q,requiredAccess:["assistant"]},e)],k.Tools.createLayoutAssistant({name:dt,title:"Kendo UI Layout Assistant",description:k.ToolDescriptions.layoutAssistant,suiteName:d,libKey:T,getPreContent:B?void 0:()=>`${Fe()}
|
|
1542
1000
|
|
|
1543
|
-
|
|
1001
|
+
${_()}`,requiredAccess:["agent"]},e),k.Tools.createStyleAssistant({name:pt,title:"Kendo UI Style Assistant",description:k.ToolDescriptions.styleAssistant,libKey:T,getPreContent:B?void 0:Ke,requiredAccess:["agent"]},e),k.Tools.createIconSearch({name:te,title:"Kendo UI Icon Assistant",description:k.ToolDescriptions.iconAssistant,libKey:T,getPostContent:B?void 0:je,requiredAccess:["assistant","agent"]},e),k.Tools.createCodeAssistant({name:ee,title:"Kendo UI Component Assistant",description:k.ToolDescriptions.codeAssistant(d),libKey:T,suiteName:d,components:q,getPostContent:B?void 0:({component:o})=>{let r=Xt(o);return Ve({component:o,componentInstructions:r})},requiredAccess:["assistant","agent"]},e),...B?[]:[(()=>{let o=new C(ut,{title:"Kendo UI Getting Started",description:`Creates a new Angular project with Angular CLI and provides essential getting started guidance for ${d} including installation, configuration, and setup instructions.`,requiredAccess:["agent"],inputSchema:pe(d,"kendo-angular-app")},async({projectName:r,createNewProject:s,theme:a},{_meta:i})=>{let c=I(o,i);try{await e.recordToolUserRequest({toolName:ut,meta:{projectName:r,createNewProject:s,theme:a,...c}})}catch(h){console.error("Error recording tool request:",h)}return{content:[{type:"text",text:ze(r,s,a)}]}});return o})()],k.Tools.createAccessibilityAssistant({name:mt,title:"Kendo UI Accessibility Assistant",description:k.ToolDescriptions.accessibilityAssistant(d),libKey:T,suiteName:d,components:q,requiredAccess:["agent"]},e),k.Tools.createUpgrade({name:Jt,title:"Kendo UI Upgrade Assistant",description:k.ToolDescriptions.upgradeAssistant(d,"@progress/kendo-angular-"),suiteName:d,packagePrefix:"@progress/kendo-angular-",requiredAccess:["agent"]},e)].filter(o=>o.hasAccess(t))}var no=oo(import.meta.url),ro=ft.dirname(no),so=ft.resolve(ro,"../package.json"),yt=JSON.parse(to.readFileSync(so,"utf-8")),ht=new Zt({name:"kendo-mcp",title:"Kendo MCP Server",version:yt.version});async function ao(){let e=new eo;b("Starting server...");let t=await le(async()=>{let o=(await me())?.entitlement;return o?.Product?.Code||o?.product?.code});t!=="none"&&(M.toolNameHeader=t==="agent"||t==="full"?"agent":"assistant",gt(M,t).forEach(o=>o.register(ht)),de({serverName:"angular",contextApi:M,enrichWithUserData:!0,additionalFields:{version:yt.version,access_type:t}})),await ht.connect(e)}ao();
|