@progress/kendo-react-mcp 1.7.1-beta.d2eee4d2.0 → 1.8.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 CHANGED
@@ -1,8 +1,8 @@
1
1
  #!/usr/bin/env node
2
- import{McpServer as Lt}from"@modelcontextprotocol/sdk/server/mcp.js";import{StdioServerTransport as Ut}from"@modelcontextprotocol/sdk/server/stdio.js";import{dirname as yt,join as bt}from"path";import{fileURLToPath as vt}from"url";import{loadLicense as it,decodeLicenseKey as at,decodeLicenseEvidence as lt}from"@progress/kendo-licensing/utils";var q=class extends Error{constructor(t){super(t),this.name="LicenseError"}};function ae(e){return e.replace(/^\uFEFF/,"")}async function le(e){let t=null,n=null;try{let o=it();if(!o.success){let s=new q(o.message);throw e&&await e("license_load_failed",{error:o.message}).catch(()=>{}),s}try{t=(await at(o.value)).licenses.find(async i=>!!(await lt(i)).userId)}catch(s){console.log(s.message),e&&await e("license_load_failed",{error:s.message||"Unknown decoding error"}).catch(()=>{})}if(!t)return[ae(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[ae(t),null]}import P from"node:fs";import $ from"node:path";var F=!1,N=process.env.DEBUG_LOG_FILE,ce=!!(N&&typeof N=="string");if(ce){let e=$.resolve(N),t=$.dirname(e);if(t!=="."&&t!==process.cwd()&&!P.existsSync(t))try{P.mkdirSync(t,{recursive:!0})}catch(n){console.error("Error creating log directory:",n)}if(!P.existsSync(e))try{P.writeFileSync(e,"")}catch(n){console.error("Error creating log file:",n)}}else F=!1;F=ce&&!!N&&P.existsSync($.resolve(N));function h(...e){if(F&&N){let o=`${new Date().toISOString()}: ${e.join(" ")}
3
- `,s=$.resolve(N);P.appendFile(s,o,i=>{i&&console.error("Error writing to log file:",i)})}}import ct from"@grpc/proto-loader";import D from"@grpc/grpc-js";import ue from"path";import de from"fs";import{fileURLToPath as dt}from"url";var pt=dt(import.meta.url),ut=ue.dirname(pt),me={version:"unknown"},pe=ue.resolve(ut,"../package.json");de.existsSync(pe)&&(me=JSON.parse(de.readFileSync(pe,"utf-8")));function mt(e){return e.replace(/\u2014/g,"--").replace(/\u2013/g,"-").replace(/[^\x20-\x7E]/g,"")}var M=class{constructor(t,n,o){this.contextApiUrl=t;this.protoPath=n;this.options=o;this.toolNameHeader="assistant";let s=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"),h("Using ContextApi URl:",this.contextApiUrl);let i=D.loadPackageDefinition(s),r=100*1024*1024,a={"grpc.max_receive_message_length":r,"grpc.max_send_message_length":r};this.client=new i.ContextQueryService(this.contextApiUrl||"contextapi.telerik.com:443",this.isDev?D.credentials.createInsecure():D.credentials.createSsl(),a)}async getMetadata({meta:t}={meta:{}}){let[n,o]=this.isDev?["fake_license",null]:await le((p,b)=>this.logEvent(p,b)),s=process.env.CONTEXTAPI_API_KEY,i=s&&typeof s=="string",r=n&&typeof n=="string";if(!r&&!i&&o)throw new Error(`Failed to authenticate with API key or License key!
2
+ import{McpServer as Kt}from"@modelcontextprotocol/sdk/server/mcp.js";import{StdioServerTransport as jt}from"@modelcontextprotocol/sdk/server/stdio.js";import{dirname as Tt,join as xt}from"path";import{fileURLToPath as It}from"url";import{loadLicense as ht,decodeLicenseKey as gt,decodeLicenseEvidence as ft}from"@progress/kendo-licensing/utils";var W=class extends Error{constructor(t){super(t),this.name="LicenseError"}};function me(e){return e.replace(/^\uFEFF/,"")}async function z(e){let t=null,n=null;try{let o=ht();if(!o.success){let s=new W(o.message);throw e&&await e("license_load_failed",{error:o.message}).catch(()=>{}),s}try{t=(await gt(o.value)).licenses.find(async i=>!!(await ft(i)).userId)}catch(s){console.log(s.message),e&&await e("license_load_failed",{error:s.message||"Unknown decoding error"}).catch(()=>{})}if(!t)return[me(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[me(t),null]}import L from"node:fs";import V from"node:path";var Y=!1,U=process.env.DEBUG_LOG_FILE,he=!!(U&&typeof U=="string");if(he){let e=V.resolve(U),t=V.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=he&&!!U&&L.existsSync(V.resolve(U));function C(...e){if(Y&&U){let o=`${new Date().toISOString()}: ${e.join(" ")}
3
+ `,s=V.resolve(U);L.appendFile(s,o,i=>{i&&console.error("Error writing to log file:",i)})}}import yt from"@grpc/proto-loader";import $ from"@grpc/grpc-js";import ye from"path";import ge from"fs";import{fileURLToPath as bt}from"url";var At=bt(import.meta.url),Ct=ye.dirname(At),be={version:"unknown"},fe=ye.resolve(Ct,"../package.json");ge.existsSync(fe)&&(be=JSON.parse(ge.readFileSync(fe,"utf-8")));function vt(e){return e.replace(/\u2014/g,"--").replace(/\u2013/g,"-").replace(/[^\x20-\x7E]/g,"")}var H=class{constructor(t,n,o){this.contextApiUrl=t;this.protoPath=n;this.options=o;this.toolNameHeader="assistant";let s=yt.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"),C("Using ContextApi URl:",this.contextApiUrl);let i=$.loadPackageDefinition(s);this.client=new i.ContextQueryService(this.contextApiUrl||"contextapi.telerik.com:443",this.isDev?$.credentials.createInsecure():$.credentials.createSsl())}buildRequestMetadata(t={}){return vt(JSON.stringify({...t,source:"npm",version:be.version,os:process.platform,node_version:process.version}))}async getMetadata({meta:t}={meta:{}}){let[n,o]=this.isDev?["fake_license",null]:await z((d,p)=>this.logEvent(d,p)),s=process.env.CONTEXTAPI_API_KEY,i=s&&typeof s=="string",a=n&&typeof n=="string";if(!a&&!i&&o)throw new Error(`Failed to authenticate with API key or License key!
4
4
 
5
- License Error: ${o}`);let a=new D.Metadata;if(r)try{a.add("x-license-key",n)}catch(p){throw h("Error adding license key to metadata:",p),new Error(`Failed to use license key: ${p.message}`)}i&&a.add("x-api-key",s),this.options?.libName&&a.add("x-library-name",this.options.libName),a.add("x-tool-name",this.toolNameHeader);let d=JSON.stringify({...t,source:"npm",version:me.version,os:process.platform,node_version:process.version});return a.add("x-request-metadata",mt(d)),a}async query(t,n){let o=await this.getMetadata({meta:n});return new Promise((s,i)=>{this.client.query(t,o,(r,a)=>{r?i(new Error(r)):s(a)})})}async getApiRefMatches(t,n){let o=await this.getMetadata({meta:n});return new Promise((s,i)=>{this.client.getApiRefMatches(t,o,(r,a)=>{r?i(new Error(r)):s(a)})})}async queryCssUtils(t,n){let o=await this.getMetadata({meta:n});return new Promise((s,i)=>{this.client.cssUtilsSearch(t,o,(r,a)=>{r?(h("Error querying CSS Utils:",r),i(new Error(r))):s(a)})})}async queryIconsSearch(t,n){let o=await this.getMetadata({meta:n});return new Promise((s,i)=>{this.client.iconsSearch(t,o,(r,a)=>{r?(h("Error querying Icons Search:",r),i(new Error(r))):s(a)})})}async queryBuildingBlocks(t,n){let o=await this.getMetadata({meta:n});return new Promise((s,i)=>{this.client.buildingBlocksSearch(t,o,(r,a)=>{r?(h("Error querying Building Blocks:",r),i(new Error(r))):s(a)})})}async validateUserLicense(){let t=await this.getMetadata();return new Promise((n,o)=>{this.client.validateUserLicense(null,t,(s,i)=>{s?(h("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,(r,a)=>{r?(h("Error querying context API/GenerateTheme:",r),i(new Error(r))):s(a)})})}async recordOrchestratorUserRequest({meta:t}){let n=await this.getMetadata({meta:t});return new Promise((o,s)=>{this.client.recordOrchestratorUserRequest(null,n,(i,r)=>{i?(h("Error recording orchestrator user request:",i),s(new Error(i))):o(r)})})}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,(r,a)=>{r?(h("Error recording tool user request:",r),i(new Error(r))):s(a)})})}async logEvent(t,n){let o=process.env.LOGGING_API_KEY;if(!o||typeof o!="string"){h("LOGGING_API_KEY not configured, skipping log event");return}let s=new D.Metadata;return s.add("x-api-key",o),new Promise((i,r)=>{this.client.logEvent({event_name:t,fields:n||{}},s,(a,d)=>{a?(h("Error logging event:",a),r(new Error(a))):i()})})}};import{z as K}from"zod";var io=K.object({user_id:K.string(),user_email:K.string().email()});import{z as k}from"zod";var ht=k.object({Product:k.object({Id:k.number().int(),Code:k.string(),Name:k.string()}),License:k.nullable(k.object({Id:k.number().int(),Name:k.string(),Type:k.string(),Active:k.boolean()})),Availability:k.array(k.object({LicenseStart:k.nullable(k.string().datetime()),LicenseEnd:k.nullable(k.string().datetime())})),IsLicenseAvailable:k.optional(k.boolean())}),co=k.array(ht);async function he(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 ge(){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 gt=1440*60*1e3;function fe(e){let{serverName:t,contextApi:n,additionalFields:o={},intervalMs:s=gt}=e,i="mcp_server_heartbeat",r=async()=>{try{let d={server_name:t,timestamp:new Date().toISOString(),...o};await n.logEvent(i,d)}catch(d){h(`Failed to send heartbeat for ${t}:`,d)}};r();let a=setInterval(r,s);return()=>{clearInterval(a),h(`Heartbeat stopped for ${t}`)}}import{z as j}from"zod";var ft=["default","bootstrap","material","fluent"];function ye(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(ft).default("default").describe("The Kendo UI theme to use. Determines which theme package is installed and imported.")}}var c="Kendo UI for React",T="react",x="kendo";var O=["ActionSheet","AIPrompt","Animation","AppBar","ArcGauge","AutoComplete","Avatar","Badge","Barcode","BottomNavigation","Breadcrumb","Button","ButtonGroup","BreadCrumb","Calendar","Card","Chart","ChartWizard","Chat","Checkbox","Chip","ChipList","ChunkProgressBar","CircularGauge","ColorGradient","ColorPalette","ColorPicker","ComboBox","ContextMenu","ConversationalUI","DataGrid","Grid","DataQuery","DateMath","DateInput","DatePicker","DateRangePicker","DateTimePicker","Dialog","Drag&Drop","Drawer","Drawing","DropDownButton","DropDownList","DropDownTree","Editor","Error","ExcelExport","ExpansionPanel","ExternalDropZone","FileSaver","FileManager","Filter","FlatColorPicker","FloatingActionButton","FloatingLabel","Form","Gantt","Gauge","General","GridLayout","Hint","Icon","InlineAIPrompt","Input","Label","LinearGauge","ListBox","ListView","Loader","Map","MaskedTextBox","Menu","MultiColumnComboBox","MultiSelect","MultiSelectTree","MultiViewCalendar","Notification","NumericTextBox","OrgChart","PageTemplates/BuildingBlocks","Pager","PanelBar","PDFProcessing","PDFViewer","PivotGrid","Popover","Popup","ProgressBar","PromptBox","QRCode","RadialGauge","RadioButton","RadioGroup","RangeSlider","Rating","Ripple","Sankey","Scheduler","ScrollView","Signature","Skeleton","Slider","Sortable","Sparkline","SpeechToTextButton","SmartPasteButton","SplitButton","Splitter","Spreadsheet","StackLayout","Stepper","StockChart","SVGIcon","Switch","TabStrip","TaskBoard","TextArea","TextBox","TileLayout","Timeline","TimePicker","Toolbar","Tooltip","TreeList","TreeView","Typography","Upload","VSCodeExtension","Window"];var kt=bt(yt(vt(import.meta.url)),"../proto/service.proto"),G=new M("test.contextapi.telerik.com:443",kt,{libName:T});var be=async()=>G.validateUserLicense();import _t from"fs";import ot from"path";import{fileURLToPath as $t}from"url";import{z as v}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 L=(e,t)=>`# ${e.suiteName} - Code Validation & Quality Assurance
5
+ License Error: ${o}`);let r=new $.Metadata;if(a)try{r.add("x-license-key",n)}catch(d){throw C("Error adding license key to metadata:",d),new Error(`Failed to use license key: ${d.message}`)}return i&&r.add("x-api-key",s),this.options?.libName&&r.add("x-library-name",this.options.libName),r.add("x-tool-name",this.toolNameHeader),r.add("x-request-metadata",this.buildRequestMetadata(t)),r}async query(t,n){let o=await this.getMetadata({meta:n});return new Promise((s,i)=>{this.client.query(t,o,(a,r)=>{a?i(new Error(a)):s(r)})})}async getApiRefMatches(t,n){let o=await this.getMetadata({meta:n});return new Promise((s,i)=>{this.client.getApiRefMatches(t,o,(a,r)=>{a?i(new Error(a)):s(r)})})}async queryCssUtils(t,n){let o=await this.getMetadata({meta:n});return new Promise((s,i)=>{this.client.cssUtilsSearch(t,o,(a,r)=>{a?(C("Error querying CSS Utils:",a),i(new Error(a))):s(r)})})}async queryIconsSearch(t,n){let o=await this.getMetadata({meta:n});return new Promise((s,i)=>{this.client.iconsSearch(t,o,(a,r)=>{a?(C("Error querying Icons Search:",a),i(new Error(a))):s(r)})})}async queryBuildingBlocks(t,n){let o=await this.getMetadata({meta:n});return new Promise((s,i)=>{this.client.buildingBlocksSearch(t,o,(a,r)=>{a?(C("Error querying Building Blocks:",a),i(new Error(a))):s(r)})})}async validateUserLicense(){let t=await this.getMetadata();return new Promise((n,o)=>{this.client.validateUserLicense(null,t,(s,i)=>{s?(C("Error validating user license:",s),o(new Error(s))):n(i)})})}async queryThemeGenerate(t,n){let o=await this.getMetadata({meta:n});return new Promise((s,i)=>{this.client.generateTheme(t,o,(a,r)=>{a?(C("Error querying context API/GenerateTheme:",a),i(new Error(a))):s(r)})})}async recordOrchestratorUserRequest({meta:t}){let n=await this.getMetadata({meta:t});return new Promise((o,s)=>{this.client.recordOrchestratorUserRequest(null,n,(i,a)=>{i?(C("Error recording orchestrator user request:",i),s(new Error(i))):o(a)})})}async recordToolUserRequest({toolName:t,meta:n}){let o=await this.getMetadata({meta:n});return new Promise((s,i)=>{this.client.recordToolUserRequest({tool_name:t},o,(a,r)=>{a?(C("Error recording tool user request:",a),i(new Error(a))):s(r)})})}async logEvent(t,n,o={}){let s="h8utJ6rk4PpIWX4JMn9beQDsjVUri6KV0XYfiVwq",{enrichWithUserData:i=!1,meta:a={}}=o,r=s&&typeof s=="string",d=null;if(i)try{let[g]=this.isDev?["fake_license",null]:await z();g&&typeof g=="string"&&(d=g)}catch{}if(!r&&!d){C("Neither LOGGING_API_KEY nor license key available, skipping log event");return}let p=new $.Metadata;return r&&p.add("x-api-key",s),d&&(p.add("x-license-key",d),p.add("x-request-metadata",this.buildRequestMetadata(a)),this.options?.libName&&p.add("x-library-name",this.options.libName)),new Promise((g,b)=>{this.client.logEvent({event_name:t,fields:n||{}},p,(l,m)=>{l?(C("Error logging event:",l),b(new Error(l))):g()})})}};import{z as Q}from"zod";var mo=Q.object({user_id:Q.string(),user_email:Q.string().email()});import{z as w}from"zod";var wt=w.object({Product:w.object({Id:w.number().int(),Code:w.string(),Name:w.string()}),License:w.nullable(w.object({Id:w.number().int(),Name:w.string(),Type:w.string(),Active:w.boolean()})),Availability:w.array(w.object({LicenseStart:w.nullable(w.string().datetime()),LicenseEnd:w.nullable(w.string().datetime())})),IsLicenseAvailable:w.optional(w.boolean())}),fo=w.array(wt);function T(e,t){let n=e.server?.server.getClientVersion?.(),o=t||{};return n&&(o.clientInfo={name:n.name,version:n.version}),o}async function Ae(e){let t=process.env.KENDO_MCP_ACCESS;if(t==="true"||t==="1"||t==="full")return"full";if(typeof t=="string"&&(t.toLowerCase()==="agent"||t.toLowerCase()==="assistant"))return t.toLowerCase();let n=await e();return n?.toLocaleLowerCase()==="agentic_ui_generator"?"agent":n?.toLocaleLowerCase()==="ai_coding_assistants"?"assistant":"none"}function Ce(){return'**Accessibility Guidelines: WCAG 2.2 Level AA Compliance**\n\n**Core Principles:**\n1. Use semantic HTML and ARIA correctly\n2. Ensure WCAG 2.2 AA compliance\n3. Follow W3C ARIA Authoring Practices\n4. Provide standards-based accessibility fixes\n\n**1. Form Control Labels** (WCAG 1.3.1, 3.3.2, 4.1.2)\nEvery input must have an associated label.\nCORRECT: `<input type="search" aria-label="Search products" placeholder="Search...">`\nCORRECT: `<label for="qty">Quantity</label><input type="number" id="qty">`\nWRONG: `<span>Email</span><input type="email">` (no association)\nWRONG: `<input type="email" placeholder="Email">` (placeholder as label)\n\n**2. Button Accessibility** (WCAG 4.1.2, 2.4.6, 2.5.3)\nAll buttons need accessible names describing their purpose.\nCORRECT: `<button type="button">Save Changes</button>`\nCORRECT: `<button aria-label="Close dialog"><svg aria-hidden="true" focusable="false">...</svg></button>`\nWRONG: `<button><svg>...</svg></button>` (no accessible name)\nWRONG: `<button>Click here</button>` (generic text)\n\n**3. Popup/Menu Triggers** (WCAG 4.1.2, 1.3.1)\nIndicate popup purpose and state using aria-haspopup, aria-expanded, aria-controls.\nCORRECT: `<button aria-expanded="false" aria-haspopup="menu" aria-controls="menu-id">Settings</button>`\n\n**4. Image Accessibility** (WCAG 1.1.1)\nInformative: `<img src="chart.png" alt="Sales increased 25% in Q4 2024">`\nFunctional: `<a href="/home"><img src="logo.png" alt="Company Name Home"></a>`\nDecorative: `<img src="border.png" alt="" role="presentation">`\nComplex: `<img src="chart.png" alt="Sales data" aria-describedby="desc-id">`\nWRONG: Missing alt, filename as alt, generic alt for decorative images\n\n**5. Link Accessibility** (WCAG 2.4.4, 2.4.6)\nLinks must be descriptive and understandable out of context.\nCORRECT: `<a href="/products">View All Products</a>`\nCORRECT: `<a href="/article" aria-label="Read more about New Product Launch">Read more</a>`\nWRONG: "Click here", "Read more", "Learn more" without context\n\n**6. Form Validation** (WCAG 3.3.1, 3.3.2, 3.3.3)\nErrors must be identified, associated with inputs, and provide suggestions. Use aria-describedby, aria-invalid="true", and role="alert".\n\n**7. Heading Structure** (WCAG 1.3.1, 2.4.6)\nEach page must have an `<h1>` that describes its content. Use hierarchical, descriptive headings with no skipped levels (h1\u2192h2\u2192h3).\nCORRECT: `<h1>Dashboard</h1> <h2>Sales</h2> <h3>By Region</h3>`\nWRONG: No `<h1>` on the page, or skipping levels (h1\u2192h3)\nIf a heading should look smaller than its semantic level, use CSS: `<h2 class="text-sm">Subtitle</h2>`\n\n**8. Page Component Landmark Rules** (WCAG 1.3.1, 4.1.2)\nPage components (route components) may be rendered inside a layout that already provides `<main>`, `<header>`, or `<footer>`. Since the layout configuration is unknown, avoid using these landmarks in page components to prevent potential duplication and nesting violations. Use `<div>`, `<section>`, or `<article>` as the top-level wrapper instead.\n- Avoid adding `<main>`, `role="main"`, `<header>`, or `<footer>` in page components \u2014 the layout typically provides them. Duplicating them can cause `landmark-no-duplicate-main` and `landmark-main-is-top-level` violations.\n- Avoid adding `role="banner"` or using a semantic `<header>` element in page components \u2014 the layout\'s `<header>` already claims the banner landmark. Adding another causes `landmark-banner-is-top-level` violations.\n- Avoid adding `role="contentinfo"` to elements inside page components \u2014 the contentinfo landmark should be a top-level landmark, not nested inside `<main>` or other landmarks. Nesting it can cause `landmark-contentinfo-is-top-level` violations.\n- When multiple `<section>` or `<nav>` elements exist on a page, give each a unique `aria-label` to avoid `landmark-unique` violations.\n\n**9. ARIA Role and Attribute Restrictions** (WCAG 4.1.2)\nOnly use ARIA roles that are valid for the given HTML element. Avoid adding `aria-label` or `aria-labelledby` to elements that do not permit naming.\n- `<article>` has an implicit `article` role. Do NOT override it with `role="listitem"`, `role="button"`, `role="link"`, or any other role \u2014 none are allowed on `<article>`. Use `<li>` for list items, `<button>` for interactive cards, or `<a>` for clickable cards instead.\n- `<button>` already has an implicit `button` role. Do NOT add `role="listitem"` or other incompatible roles.\n- `<span>` and `<div>` without roles are generic elements. Do NOT add `aria-label` to them \u2014 it is a prohibited attribute on elements with no accessible role and can cause `aria-prohibited-attr` violations. Instead, use `role="img"` + `aria-label` for visual indicators, or use visually hidden text.\n- Do NOT add `aria-label` to non-interactive `<div>` wrappers \u2014 it has no effect and triggers violations.\n- `aria-pressed` is only valid on elements with `role="button"`, `role="checkbox"`, `role="menuitemcheckbox"`, `role="option"`, `role="radio"`, or `role="switch"`. Do NOT use `aria-pressed` on elements with `role="listitem"` or other roles.\nCORRECT: `<ul role="list"><li class="product-card">...</li></ul>` (listitem inside list)\nCORRECT: `<span role="img" aria-label="Status: pending" class="status-dot"></span>` (role added before aria-label)\nCORRECT: `<span class="status-dot" aria-hidden="true"></span><span class="visually-hidden">Pending</span>` (hidden text alternative)\nWRONG: `<article role="listitem">` (listitem not allowed on article)\nWRONG: `<article role="button">` (button not allowed on article \u2014 use `<button>` or `<div role="button">`)\nWRONG: `<span aria-label="pending" class="status-dot"></span>` (aria-label prohibited on generic span)\nWRONG: `<div aria-label="Product badges" class="badges"></div>` (aria-label prohibited on generic div)\n\n**Quick Checklist:**\n- **Forms:** Associated labels, aria-required on required fields, autocomplete attributes, aria-describedby for errors, aria-invalid for invalid fields, fieldsets with legends\n- **Buttons/Links:** Accessible names, aria-label for icon buttons, aria-hidden on decorative icons, descriptive link text\n- **Popups/Dialogs:** aria-haspopup, aria-expanded, aria-controls, role="dialog", aria-modal="true", aria-labelledby, focus trap, Escape to close\n- **Images:** alt on all images, descriptive alt for informative, empty alt for decorative, aria-describedby for complex\n- **Structure:** One h1, logical heading hierarchy, avoid `<main>`, `<header>`, `<footer>`, `role="main"`, `role="contentinfo"`, `role="banner"` in page/route components (the layout may already provide them), use `<section>` or `<div>` as page-level wrappers, unique aria-labels on duplicate landmark types\n- **ARIA Rules:** Avoid adding `aria-label` to generic `<span>`/`<div>` without a role, avoid using `role="listitem"` or `role="button"` on `<article>` \u2014 use `<li>` for list items, add `role="img"` before `aria-label` on visual indicators, `aria-pressed` only on button-like roles\n- **Scrollable Regions:** Any scrollable container must have `tabindex="0"` or contain keyboard-interactive children\n- **Nested Interactive:** Do not add interactive role/tabindex to a container that already has focusable children\n- **List Roles:** `role="list"` containers must have `role="listitem"` children \u2014 prefer `<ul>/<li>` natively\n- **Dynamic Content:** role="status"/aria-live="polite" for updates, role="alert"/aria-live="assertive" for critical alerts\n- **Keyboard/Focus:** All interactive elements keyboard accessible, logical focus order, visible focus indicators, no keyboard traps (except modals)\n- **Color/Contrast:** 4.5:1 text contrast (3:1 large text), 3:1 UI component contrast, no color-only information, 3:1 focus indicator contrast'}var St=1440*60*1e3;function ve(e){let{serverName:t,contextApi:n,additionalFields:o={},intervalMs:s=St,enrichWithUserData:i=!1}=e,a="mcp_server_heartbeat",r=async()=>{try{let p={server_name:t,timestamp:new Date().toISOString(),...o};await n.logEvent(a,p,{enrichWithUserData:i})}catch(p){C(`Failed to send heartbeat for ${t}:`,p)}};r();let d=setInterval(r,s);return()=>{clearInterval(d),C(`Heartbeat stopped for ${t}`)}}import{z as X}from"zod";var kt=["default","bootstrap","material","fluent"];function we(e,t){return{projectName:X.string().default(t).describe("The name of the project. Used as the project folder name when creating a new project."),createNewProject:X.boolean().default(!0).describe(`Whether to create a new project before configuring ${e}. Set to true to scaffold a brand-new project, or false if the project already exists and you only want to add ${e} to it.`),theme:X.enum(kt).default("default").describe("The Kendo UI theme to use. Determines which theme package is installed and imported.")}}var u="Kendo UI for React",N="react",D="kendo";var _=["ActionSheet","AIPrompt","Animation","AppBar","ArcGauge","AutoComplete","Avatar","Badge","Barcode","BottomNavigation","Breadcrumb","Button","ButtonGroup","BreadCrumb","Calendar","Card","Chart","ChartWizard","Chat","Checkbox","Chip","ChipList","ChunkProgressBar","CircularGauge","ColorGradient","ColorPalette","ColorPicker","ComboBox","ContextMenu","ConversationalUI","DataGrid","Grid","DataQuery","DateMath","DateInput","DatePicker","DateRangePicker","DateTimePicker","Dialog","Drag&Drop","Drawer","Drawing","DropDownButton","DropDownList","DropDownTree","Editor","Error","ExcelExport","ExpansionPanel","ExternalDropZone","FileSaver","FileManager","Filter","FlatColorPicker","FloatingActionButton","FloatingLabel","Form","Gantt","Gauge","General","GridLayout","Hint","Icon","InlineAIPrompt","Input","Label","LinearGauge","ListBox","ListView","Loader","Map","MaskedTextBox","Menu","MultiColumnComboBox","MultiSelect","MultiSelectTree","MultiViewCalendar","Notification","NumericTextBox","OrgChart","PageTemplates/BuildingBlocks","Pager","PanelBar","PDFProcessing","PDFViewer","PivotGrid","Popover","Popup","ProgressBar","PromptBox","QRCode","RadialGauge","RadioButton","RadioGroup","RangeSlider","Rating","Ripple","Sankey","Scheduler","ScrollView","Signature","Skeleton","Slider","Sortable","Sparkline","SpeechToTextButton","SmartPasteButton","SplitButton","Splitter","Spreadsheet","StackLayout","Stepper","StockChart","SVGIcon","Switch","TabStrip","TaskBoard","TextArea","TextBox","TileLayout","Timeline","TimePicker","Toolbar","Tooltip","TreeList","TreeView","Typography","Upload","VSCodeExtension","Window"];var Nt=xt(Tt(It(import.meta.url)),"../proto/service.proto"),F=new H("contextapi.telerik.com:443",Nt,{libName:N});var Se=async()=>F.validateUserLicense();import Vt from"fs";import ut from"path";import{fileURLToPath as Ht}from"url";import{z as v}from"zod";var k=class{constructor(t,n,o){this.name=t;this.config=n;this.cb=o}register(t){this.server=t,this.server.registerTool(this.name,this.config,this.cb)}hasAccess(t){return!this.config.requiredAccess||this.config.requiredAccess.length===0?!0:t==="full"||this.config.requiredAccess.includes(t)}};var q=(e,t)=>`# ${e.suiteName} - Code Validation & Quality Assurance
6
6
 
7
7
  ## Comprehensive Code Validation Checklist
8
8
  Execute these validation steps systematically to ensure high-quality, maintainable code:
@@ -46,7 +46,7 @@ Responsive Design:
46
46
  - Graceful error handling for all user interactions
47
47
  - Meaningful error messages for users
48
48
  - Network error handling for API calls
49
- `;var V=()=>`## UX/UI Design Best Practices
49
+ `;var J=()=>`## UX/UI Design Best Practices
50
50
 
51
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
52
 
@@ -147,24 +147,7 @@ When no design token system is defined by the project, apply these minimum spaci
147
147
  - Section separators: \u2265 24px vertical gap between distinct content areas.
148
148
  - Card internal padding: 16\u201324px.
149
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 At=e=>`**Tool call example:**
151
- \`\`\`
152
- ${e.layoutAssistantName}({
153
- prompt="Provide Kendo Design System utility classes to make the following layout structure responsive across mobile, tablet, and desktop views: [LAYOUT DESCRIPTION HERE]",
154
- includeBuildingBlockExamples=false // Optional, include examples of Kendo building blocks (Grid, Flex, Stack, etc.)
155
- })
156
- \`\`\`
157
- `,Ct=`**General Responsive Design Guidance:**
158
- - Use CSS media queries to apply different styles at various breakpoints (e.g., mobile, tablet, desktop).
159
- - Consider a mobile-first approach, starting with styles for smaller screens and adding complexity for larger screens.
160
- - Ensure flexible grid layouts that can adapt to different screen sizes.
161
- - Use relative units (%, em, rem) instead of fixed units (px) for widths and spacing to allow for better scalability.
162
- - Test the design across multiple devices and screen sizes to ensure a consistent user experience.`,St=`**Tailwind CSS Responsive Design Guidance:**
163
- - Use Tailwind's responsive utility variants (e.g., sm:, md:, lg:, xl:) to apply styles at specific breakpoints.
164
- - Start with mobile styles (no prefix) and layer on additional styles for larger screens using the appropriate prefixes.
165
- - Leverage Tailwind's grid and flex utilities to create flexible layouts that adapt to different screen sizes.
166
- - Use Tailwind's spacing utilities to maintain consistent spacing across breakpoints.
167
- - Test the design across multiple devices and screen sizes to ensure a consistent user experience.`,U=(e,t)=>{let n=L({suiteName:e.suiteName,libKey:e.libKey},t.validationSteps),o=e.includeLayout&&e.layoutMode==="utils",s=e.libKey==="angular"?"- **Drag and Drop**: Consider using the DragandDrop and Sortable components when drag-and-drop functionality is needed.":"",i=e.components?e.components.join(", "):"components",r=o?`- And use the ${e.layoutAssistantName} tool to get Kendo CSS utility classes needed for responsive design.`:"",a=o?At(e):"",d=e.layoutMode==="vanilla"?Ct:"",p=e.layoutMode==="tailwind"?St:"";return`# \u{1F3AF} ${e.suiteName} - Execution Plan
150
+ - Page left/right margin: 24\u201332px minimum, even at desktop widths.`;var B=(e,t)=>{let n=q({suiteName:e.suiteName,libKey:e.libKey},t.validationSteps),o=e.libKey==="angular"?"- **Drag and Drop**: Consider using the DragandDrop and Sortable components when drag-and-drop functionality is needed.":"",s=e.components?e.components.join(", "):"components";return`# \u{1F3AF} ${e.suiteName} - Execution Plan
168
151
 
169
152
  **Current Goal:**
170
153
 
@@ -176,7 +159,7 @@ ${e.includeComponentsDocs?`- **Component Library:** ${e.suiteName}
176
159
  - Ensure to use ONLY ${e.suiteName} components for all UI elements.
177
160
  - And use the ${e.codeAssistantName} tool to get ${e.suiteName} component documentation and code snippets.
178
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}.
179
- `:""}${o?`- **Layout:** Yes
162
+ `:""}${e.includeLayout?`- **Layout:** Yes
180
163
  - And use the ${e.layoutAssistantName} tool to get Kendo CSS utility classes needed for layout structure and responsive design.
181
164
  `:""}${e.includeIcons?`- **Icons:** Yes
182
165
  - Use icons that align with the project theme and enhance usability.
@@ -188,37 +171,23 @@ ${e.includeComponentsDocs?`- **Component Library:** ${e.suiteName}
188
171
  - And use the ${e.styleAssistantName} tool to create a custom theme for your project.
189
172
  `:""}${e.includeResponsive?`- **Responsive:**
190
173
  - Ensure the layout is fully responsive across mobile, tablet, and desktop views.
191
- ${r}
174
+ - And use the ${e.layoutAssistantName} tool to get Kendo CSS utility classes needed for responsive design.
192
175
  `:""}
193
176
  - **Accessible (WCAG 2.2 Level AA):**
194
177
  - CRITICAL: You must call the ${e.accessibilityAssistantName} tool with includeGeneralGuidelines=true on your first call to get WCAG 2.2 Level AA guidelines.
195
178
  - For subsequent calls, use includeGeneralGuidelines=false to get only component-specific accessibility information.
196
179
  - Ensure all components meet WCAG 2.2 Level AA standards.
197
180
 
198
- ${o?`**STYLING AND LAYOUT REQUIREMENTS:**
199
- **LAYOUT MODE: KENDO DESIGN SYSTEM CSS UTILITIES**
181
+ ${e.includeLayout?`**STYLING AND LAYOUT REQUIREMENTS:**
200
182
  ## CRITICAL DESIGN SYSTEM CONSTRAINTS
201
183
  - **USE ONLY KENDO DESIGN SYSTEM UTILITIES** for ALL styling, layout, spacing, positioning, and responsive behavior
202
184
  - Avoid custom CSS, inline styles, or other CSS framework classes
203
185
  - The ${e.layoutAssistantName} tool will provide the specific Kendo CSS utility classes needed
204
186
  - All layout requirements must use Kendo utilities exclusively
205
- `:""}
206
- ${e.layoutMode==="vanilla"?`**STYLING AND LAYOUT REQUIREMENTS:**
207
- **LAYOUT MODE: VANILLA**
208
- - In this mode, you should use Kendo UI components and vanilla CSS for layout and styling.
209
- - Do NOT use any utility-first CSS classes (e.g., from Tailwind) for layout or styling.
210
- - Focus on leveraging the built-in capabilities of Kendo UI components and writing custom CSS as needed to achieve the desired design and layout.
211
- `:""}
212
- ${e.layoutMode==="tailwind"?`**STYLING AND LAYOUT REQUIREMENTS:**
213
- **LAYOUT MODE: TAILWIND**
214
- - In this mode, you should use Tailwind CSS utility classes for layout and styling.
215
- - Do NOT write custom CSS or use vanilla CSS for layout or styling.
216
- - Focus on leveraging Tailwind's utility-first approach to achieve the desired design and layout, while still using Kendo UI components for functionality.
217
- `:""}
218
187
 
219
- ---
188
+ `:""}---
220
189
 
221
- ${V()}
190
+ ${J()}
222
191
 
223
192
  ---
224
193
 
@@ -266,8 +235,7 @@ ${e.accessibilityAssistantName}({
266
235
  includeGeneralGuidelines=false
267
236
  })
268
237
  \`\`\`
269
-
270
- ${o?`
238
+ ${e.includeLayout?`
271
239
  ### Phase: Layout Foundation
272
240
 
273
241
  **Step 1: Create Base Layout Structure**
@@ -295,10 +263,10 @@ Based on your current goal, analyze what other ${e.suiteName} components are nee
295
263
  - **Data Entry**: Consider Form, TextBox, DatePicker, DropDownList, Upload, Validation components
296
264
  - **Content Management**: Consider Grid, Editor, TreeView, FileManager, Dialog components
297
265
  - **E-commerce**: Consider ListView, Card, Button, Rating, Badge, Carousel components
298
- ${s}
266
+ ${o}
299
267
 
300
268
  **IMPORTANT COMPONENT USAGE REQUIREMENTS:**
301
- - Make sure to identify all necessary features related to the ${i} based on the current goal.
269
+ - Make sure to identify all necessary features related to the ${s} based on the current goal.
302
270
  - Make sure to identify specific features needed for other ${e.suiteName} components based on the current goal.
303
271
  - Make sure to generate a query for ${e.codeAssistantName} tool for each component and call the tool for each specific feature or functionality.
304
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.
@@ -337,8 +305,15 @@ ${e.includeResponsive?`
337
305
  ### Phase: Layout Responsive Finalization
338
306
 
339
307
  **Step 1: Implement Responsive Behavior**
340
- ${a}${d}${p}`:""}
341
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
+ `:""}
342
317
  ${e.includeTheming?`
343
318
  **Step 2: Custom Theme Implementation**
344
319
 
@@ -402,7 +377,7 @@ ${e.includeResponsive?"- Responsive layout works across breakpoints":""}
402
377
  **Quick Fixes (if needed):**
403
378
 
404
379
  After code implementation and validation you can make quick fixes as needed:
405
- - If any build errors are found, fix them and re-run the application.
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.
406
381
  - Use ${e.codeAssistantName} for component-specific issues
407
382
  - Use ${e.layoutAssistantName} for styling adjustments
408
383
 
@@ -411,7 +386,7 @@ After code implementation and validation you can make quick fixes as needed:
411
386
  - Do NOT generate or suggest any code until all tools have been used and validated responses are incorporated.
412
387
  - Focus on planning and sequencing.
413
388
  - Summarize the components, layouts, and utilities gathered.
414
- - Confirm all required inputs from tools have been provided.`};var H=e=>`# ${e.suiteName} Assistant
389
+ - Confirm all required inputs from tools have been provided.`};var Z=e=>`# ${e.suiteName} Assistant
415
390
 
416
391
  **What you're looking for:**
417
392
 
@@ -504,6 +479,14 @@ After gathering information:
504
479
  3. Use the official ${e.suiteName} documentation for detailed implementation guides
505
480
  4. Refer to the component examples and code snippets provided
506
481
 
482
+ ### Step 4: Build and Validation
483
+
484
+ After implementing the code:
485
+ - Run \`npm run build\` to verify the implementation compiles successfully without any build errors.
486
+ - If any build errors are found, fix them and re-run the build.
487
+ - Use ${e.codeAssistantName} for component-specific issues.
488
+ - Do NOT present the implementation as complete until the build succeeds without errors.
489
+
507
490
  ---
508
491
 
509
492
  ## Getting Started
@@ -512,11 +495,12 @@ After gathering information:
512
495
  1. Start by calling ${e.codeAssistantName} for the components you need
513
496
  2. ${e.includeIcons?`Search for icons using ${e.iconAssistantName}`:"Review the component documentation"}
514
497
  3. Follow the ${e.suiteName} official documentation for implementation details
498
+ 4. Run \`npm run build\` to verify the implementation compiles successfully
515
499
 
516
500
  **Important Notes:**
517
501
  - These tools provide documentation and guidance, not code generation
518
502
  - Always refer to official ${e.suiteName} documentation for the most up-to-date information
519
- - Tool responses include usage examples and best practices`;var E=(e,t)=>({SETUP_VALIDATION:`
503
+ - Tool responses include usage examples and best practices`;var O=(e,t)=>({SETUP_VALIDATION:`
520
504
  UI Library Setup:
521
505
  - ${e} modules properly imported and configured
522
506
  - ${e} theme properly loaded and applied
@@ -534,319 +518,105 @@ After gathering information:
534
518
  - Do not use inline styles
535
519
  - Consistent ${e} theme application across all components
536
520
  - Custom theme variables properly defined and scoped
537
- - ${e} icon fonts properly loaded and optimized
538
- - Brand colors integrated with ${e} component themes`});var wt=`--kendo-color-app-surface
539
- --kendo-color-on-app-surface
540
- --kendo-color-subtle
541
- --kendo-color-surface
542
- --kendo-color-surface-alt
543
- --kendo-color-border
544
- --kendo-color-border-alt
545
- /* Base */
546
- --kendo-color-base-subtle
547
- --kendo-color-base-subtle-hover
548
- --kendo-color-base-subtle-active
549
- --kendo-color-base
550
- --kendo-color-base-hover
551
- --kendo-color-base-active
552
- --kendo-color-base-emphasis
553
- --kendo-color-base-on-subtle
554
- --kendo-color-on-base
555
- --kendo-color-base-on-surface
556
- /* Primary */
557
- --kendo-color-primary-subtle
558
- --kendo-color-primary-subtle-hover
559
- --kendo-color-primary-subtle-active
560
- --kendo-color-primary
561
- --kendo-color-primary-hover
562
- --kendo-color-primary-active
563
- --kendo-color-primary-emphasis
564
- --kendo-color-primary-on-subtle
565
- --kendo-color-on-primary
566
- --kendo-color-primary-on-surface
567
- /* Secondary */
568
- --kendo-color-secondary-subtle
569
- --kendo-color-secondary-subtle-hover
570
- --kendo-color-secondary-subtle-active
571
- --kendo-color-secondary
572
- --kendo-color-secondary-hover
573
- --kendo-color-secondary-active
574
- --kendo-color-secondary-emphasis
575
- --kendo-color-secondary-on-subtle
576
- --kendo-color-on-secondary
577
- --kendo-color-secondary-on-surface
578
- /* Tertiary */
579
- --kendo-color-tertiary-subtle
580
- --kendo-color-tertiary-subtle-hover
581
- --kendo-color-tertiary-subtle-active
582
- --kendo-color-tertiary
583
- --kendo-color-tertiary-hover
584
- --kendo-color-tertiary-active
585
- --kendo-color-tertiary-emphasis
586
- --kendo-color-tertiary-on-subtle
587
- --kendo-color-on-tertiary
588
- --kendo-color-tertiary-on-surface
589
- /* Info */
590
- --kendo-color-info-subtle
591
- --kendo-color-info-subtle-hover
592
- --kendo-color-info-subtle-active
593
- --kendo-color-info
594
- --kendo-color-info-hover
595
- --kendo-color-info-active
596
- --kendo-color-info-emphasis
597
- --kendo-color-info-on-subtle
598
- --kendo-color-on-info
599
- --kendo-color-info-on-surface
600
- /* Success */
601
- --kendo-color-success-subtle
602
- --kendo-color-success-subtle-hover
603
- --kendo-color-success-subtle-active
604
- --kendo-color-success
605
- --kendo-color-success-hover
606
- --kendo-color-success-active
607
- --kendo-color-success-emphasis
608
- --kendo-color-success-on-subtle
609
- --kendo-color-on-success
610
- --kendo-color-success-on-surface
611
- /* Warning */
612
- --kendo-color-warning-subtle
613
- --kendo-color-warning-subtle-hover
614
- --kendo-color-warning-subtle-active
615
- --kendo-color-warning
616
- --kendo-color-warning-hover
617
- --kendo-color-warning-active
618
- --kendo-color-warning-emphasis
619
- --kendo-color-warning-on-subtle
620
- --kendo-color-on-warning
621
- --kendo-color-warning-on-surface
622
- /* Error */
623
- --kendo-color-error-subtle
624
- --kendo-color-error-subtle-hover
625
- --kendo-color-error-subtle-active
626
- --kendo-color-error
627
- --kendo-color-error-hover
628
- --kendo-color-error-active
629
- --kendo-color-error-emphasis
630
- --kendo-color-error-on-subtle
631
- --kendo-color-on-error
632
- --kendo-color-error-on-surface
633
- /* Light */
634
- --kendo-color-light-subtle
635
- --kendo-color-light-subtle-hover
636
- --kendo-color-light-subtle-active
637
- --kendo-color-light
638
- --kendo-color-light-hover
639
- --kendo-color-light-active
640
- --kendo-color-light-emphasis
641
- --kendo-color-light-on-subtle
642
- --kendo-color-on-light
643
- --kendo-color-light-on-surface
644
- /* Dark */
645
- --kendo-color-dark-subtle
646
- --kendo-color-dark-subtle-hover
647
- --kendo-color-dark-subtle-active
648
- --kendo-color-dark
649
- --kendo-color-dark-hover
650
- --kendo-color-dark-active
651
- --kendo-color-dark-emphasis
652
- --kendo-color-dark-on-subtle
653
- --kendo-color-on-dark
654
- --kendo-color-dark-on-surface
655
- /* Inverse */
656
- --kendo-color-inverse-subtle
657
- --kendo-color-inverse-subtle-hover
658
- --kendo-color-inverse-subtle-active
659
- --kendo-color-inverse
660
- --kendo-color-inverse-hover
661
- --kendo-color-inverse-active
662
- --kendo-color-inverse-emphasis
663
- --kendo-color-inverse-on-subtle
664
- --kendo-color-on-inverse
665
- --kendo-color-inverse-on-surface
666
- /* Series A */
667
- --kendo-color-series-a
668
- --kendo-color-series-a-bold
669
- --kendo-color-series-a-bolder
670
- --kendo-color-series-a-subtle
671
- --kendo-color-series-a-subtler
672
- /* Series B */
673
- --kendo-color-series-b
674
- --kendo-color-series-b-bold
675
- --kendo-color-series-b-bolder
676
- --kendo-color-series-b-subtle
677
- --kendo-color-series-b-subtler
678
- /* Series C */
679
- --kendo-color-series-c
680
- --kendo-color-series-c-bold
681
- --kendo-color-series-c-bolder
682
- --kendo-color-series-c-subtle
683
- --kendo-color-series-c-subtler
684
- /* Series D */
685
- --kendo-color-series-d
686
- --kendo-color-series-d-bold
687
- --kendo-color-series-d-bolder
688
- --kendo-color-series-d-subtle
689
- --kendo-color-series-d-subtler
690
- /* Series E */
691
- --kendo-color-series-e
692
- --kendo-color-series-e-bold
693
- --kendo-color-series-e-bolder
694
- --kendo-color-series-e-subtle
695
- --kendo-color-series-e-subtler
696
- /* Series F */
697
- --kendo-color-series-f
698
- --kendo-color-series-f-bold
699
- --kendo-color-series-f-bolder
700
- --kendo-color-series-f-subtle
701
- --kendo-color-series-f-subtler
702
- /* Typography */
703
- --kendo-font-family-sans
704
- --kendo-font-family-sans-serif
705
- --kendo-font-family-monospace
706
- --kendo-font-size-xs
707
- --kendo-line-height-xs
708
- --kendo-font-size-sm
709
- --kendo-line-height-sm
710
- --kendo-font-size
711
- --kendo-line-height
712
- --kendo-font-size-lg
713
- --kendo-line-height-lg
714
- /* Border Radius */
715
- --kendo-border-radius-none
716
- --kendo-border-radius-xs
717
- --kendo-border-radius-sm
718
- --kendo-border-radius-md
719
- --kendo-border-radius-lg
720
- --kendo-border-radius-xl
721
- --kendo-border-radius-xxl
722
- --kendo-border-radius-xxxl
723
- --radius-4xl: 1.5rem
724
- --kendo-border-radius-full`,ve=`I need you to set up a system where Tailwind CSS is the single source of truth for all design tokens, and those tokens are automatically reflected as CSS custom properties so I can use them in regular CSS too.
725
- Requirements:
726
-
727
- All design tokens (colors, spacing, font families, border radius, shadows) are defined once in tailwind.config.js
728
- A Tailwind plugin emits every token as a --token-name CSS custom property on :root
729
- Colors support Tailwind's opacity modifier syntax (bg-primary/50) using the rgb(var(--color-x-rgb) / <alpha-value>) pattern
730
- Dark mode tokens are emitted under .dark so that both dark: utility variants and var(--color-x) in custom CSS update together
731
- var(--color-primary) in hand-written CSS and bg-primary in HTML resolve to the same value
732
-
733
- Use the Kendo theme tokens listed above as the design tokens.
734
-
735
- Output I need:
736
-
737
- The full tailwind.config.js with the plugin included
738
- The base CSS file importing Tailwind
739
- A short example showing a component using both bg-primary and var(--color-primary) side by side`,ke=`I need you to set up a system where Tailwind CSS v4 is the single source of truth for all design tokens, and those tokens are automatically available as CSS custom properties so I can use them in regular CSS too.
740
- Requirements:
741
-
742
- All design tokens (colors, spacing, font families, border radius, shadows) are defined once in the @theme block \u2014 no tailwind.config.js
743
- Every @theme variable is natively available as a var(--token-name) CSS custom property with no plugin needed
744
- Colors use oklch and support opacity modifier syntax (bg-primary/50) natively
745
- Dark mode tokens are re-declared under .dark so that both dark: utility variants and var(--color-x) in custom CSS update together
746
- var(--color-primary) in hand-written CSS and bg-primary in HTML resolve to the same value
747
-
748
- Use the Kendo theme tokens listed above as the design tokens.
749
-
750
- Output I need:
751
-
752
- The single CSS file with @import "tailwindcss", the @theme block, and the .dark overrides
753
- A short example showing a component using both bg-primary and var(--color-primary) side by side`,z=`## Tailwind CSS Setup Instructions
754
-
755
- Detect which version of Tailwind CSS the project uses, then follow the appropriate setup guide below.
756
-
757
- ### Kendo Theme Tokens
758
- These are the design tokens to map into Tailwind:
759
- ${wt}
760
-
761
- ### For Tailwind CSS v3 (uses tailwind.config.js)
762
-
763
- <tailwind_v3_setup>
764
- ${ve}
765
- </tailwind_v3_setup>
766
-
767
- ### For Tailwind CSS v4 (uses @theme block, no config file)
768
-
769
- <tailwind_v4_setup>
770
- ${ke}
771
- </tailwind_v4_setup>
772
-
773
- IMPORTANT: Detect which version of Tailwind CSS the project uses, then follow the matching setup guide.`;function Tt(e,t){let n;try{n=JSON.parse(e)}catch{return e}let o=n?.Item;if(!o)return e;let s=[],i=o.FullName??o.Name??"",r=o.Type??"",a=o.Summary??"",d=o.SyntaxContent??"";s.push(`## API Reference Item
521
+ - ${e} icons properly loaded and optimized
522
+ - Brand colors integrated with ${e} component themes`});var ee=()=>`
523
+ **REQUIRED ACTIONS \u2014 apply all fixes directly to the source files:**
524
+ - 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
+ - Search all .ts, .css, and .scss files for every outdated CSS class mentioned in the codemod output and update it with an appropriate replacement.
526
+ - Fix any logic errors or unintended side effects introduced by the codemods
527
+ - Update any edge cases, custom implementations, or complex code patterns that were broken or left incomplete by the automated migration
528
+ - Replace hardcoded values, dynamic expressions, or conditional logic that the codemod could not handle automatically
529
+ - Correct any TypeScript type errors or mismatches introduced by the upgrade
530
+ - Adjust any patterns that do not align with the project's existing coding standards
531
+
532
+ **OUTPUT REQUIREMENTS:**
533
+ - For each file you change, briefly describe what was wrong and what fix you applied
534
+ - 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 Et}from"child_process";import{access as Rt}from"fs/promises";import{promisify as Pt}from"util";var ke=Pt(Et);function Dt(e,t){let n;try{n=JSON.parse(e)}catch{return e}let o=n?.Item;if(!o)return e;let s=[],i=o.FullName??o.Name??"",a=o.Type??"",r=o.Summary??"",d=o.SyntaxContent??"";s.push(`## API Reference Item
774
536
  - Name: ${i}
775
- - Type: ${r}
776
- - Summary: ${a}
777
- - Syntax: ${d}`);let p=n.RelatedItemsByType?.return_type;if(p?.length){let u=p[0].Text;u&&s.push(`- Return Type: ${u}`)}let b=o.Examples??[];if(b.length>0){let u=`## Examples
778
- `,l=0;for(let y of b){let A=(y.Component??"").toLowerCase(),C=t.toLowerCase();if(A&&A!==C&&A!=="general")continue;l+=1;let w=y.Code??"";u+=`### Example ${l}
537
+ - Type: ${a}
538
+ - Summary: ${r}
539
+ - Syntax: ${d}`);let p=n.RelatedItemsByType?.return_type;if(p?.length){let m=p[0].Text;m&&s.push(`- Return Type: ${m}`)}let g=o.Examples??[];if(g.length>0){let m=`## Examples
540
+ `,h=0;for(let y of g){let c=(y.Component??"").toLowerCase(),f=t.toLowerCase();if(c&&c!==f&&c!=="general")continue;h+=1;let S=y.Code??"";m+=`### Example ${h}
779
541
  \`\`\`
780
- ${w}
542
+ ${S}
781
543
  \`\`\`
782
- `}l>0&&s.push(u)}let g=n.RelatedItemsByType??{},f=[];for(let[u,l]of Object.entries(g))if(!(u==="return_type"||u==="render_fragment"))for(let y of l??[]){let A=y.FullName??"",C=y.ShortText??"";f.push(`### ${A} (${u})
783
- ${C}`)}return f.length>0&&s.push(`## Additional Context
784
- `+f.join(`
544
+ `}h>0&&s.push(m)}let b=n.RelatedItemsByType??{},l=[];for(let[m,h]of Object.entries(b))if(!(m==="return_type"||m==="render_fragment"))for(let y of h??[]){let c=y.FullName??"",f=y.ShortText??"";l.push(`### ${c} (${m})
545
+ ${f}`)}return l.length>0&&s.push(`## Additional Context
546
+ `+l.join(`
785
547
  ---
786
548
  `)),s.join(`
787
549
 
788
- `)}var W=process.env.KENDO_UIA_LAYOUT_MODE||"utils";function Ae(e,t,n){let{name:o,title:s,description:i,layoutAssistantName:r,codeAssistantName:a,styleAssistantName:d,iconAssistantName:p,accessibilityAssistantName:b,suiteName:g,libKey:f,components:u}=e,l=new S(o,{title:s,description:i,requiredAccess:e.requiredAccess,inputSchema:{userIntent:v.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 ${g} components you want to use.`),needsComponentsDocsConfidence:v.number().min(0).max(1).default(1).describe("Confidence (0-1) to include Component Documentation assistance. Default is 1."),needsLayoutConfidence:v.number().min(0).max(1).default(0).describe("Confidence (0-1) to include Layout assistance. Default is 0."),needsStylingConfidence:v.number().min(0).max(1).default(0).describe("Confidence (0-1) to include Theming/Styling assistance. Default is 0."),needsResponsiveBehaviorConfidence:v.number().min(0).max(1).default(0).describe("Confidence (0-1) to include Responsive Behavior assistance. Default is 0."),needsIconsConfidence:v.number().min(0).max(1).default(0).describe("Confidence (0-1) to include Icons assistance. Default is 0."),componentsNeeded:v.array(v.enum(u)).optional().describe(`Optional list of specific ${g} components needed for the project.`)}},async({userIntent:y,needsComponentsDocsConfidence:A,needsLayoutConfidence:C,needsStylingConfidence:w,needsResponsiveBehaviorConfidence:I,needsIconsConfidence:se,componentsNeeded:re},{_meta:st})=>{h("UI Orchestrator called with:",{userIntent:y,needsComponentsDocsConfidence:A,needsLayoutConfidence:C,needsStylingConfidence:w,needsResponsiveBehaviorConfidence:I,needsIconsConfidence:se});try{await n.recordOrchestratorUserRequest({meta:{userIntent:y,componentsNeeded:re,_meta:st}})}catch(_){throw R(_)}let rt=l.server?.server.getClientCapabilities?.()?.elicitation,ie;if(rt&&w>.3&&w<=.6){let _=await l.server?.server.elicitInput({message:"I was unable to determine if you need custom Kendo Theme assistant. Can you please confirm?",requestedSchema:{type:"object",properties:{includeCustomTheming:{type:"boolean",description:"Whether to include Custom Theming assistance in the workflow."}},required:["includeCustomTheming"]}});_?.action==="accept"&&_.content?.includeCustomTheming&&(ie=!0)}return{content:[{type:"text",text:U({name:o,userIntent:y,includeComponentsDocs:A>.3,includeTheming:w>.6||!!ie,includeLayout:C>.5,includeIcons:se>.6,includeResponsive:C>.5&&I>.4,layoutAssistantName:r,codeAssistantName:a,styleAssistantName:d,iconAssistantName:p,accessibilityAssistantName:b,suiteName:g,libKey:f,layoutMode:W,components:re},t)}]}});return l}function Ce(e,t){let{name:n,title:o,description:s,iconAssistantName:i,codeAssistantName:r,suiteName:a,libKey:d,components:p}=e;return new S(n,{title:o,description:s,inputSchema:{userIntent:v.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 ${a}.`),needsIconsConfidence:v.number().min(0).max(1).default(.7).describe("Confidence (0-1) to include Icons assistance. Default is 0.7."),componentsNeeded:v.array(v.enum(p)).optional().describe(`Optional list of specific ${a} components you want to learn about.`)},requiredAccess:e.requiredAccess},async({userIntent:g,needsIconsConfidence:f,componentsNeeded:u},{_meta:l})=>{h("Assistant Orchestrator called with:",{userIntent:g,needsIconsConfidence:f,componentsNeeded:u});try{await t.recordOrchestratorUserRequest({meta:{userIntent:g,componentsNeeded:u,_meta:l}})}catch(A){throw R(A)}return{content:[{type:"text",text:H({name:n,userIntent:g,includeComponentsDocs:!0,includeIcons:f>.5,codeAssistantName:r,iconAssistantName:i,suiteName:a,libKey:d,components:u})}]}})}function Se(e,t){let{name:n,title:o,description:s,suiteName:i,libKey:r,getPreContent:a}=e;return new S(n,{title:o,description:s,requiredAccess:W==="utils"?e.requiredAccess:["none"],inputSchema:{prompt:v.string().describe("An enhanced prompt describing the HTML layout structure, design requirements or specific visual effects you want to achieve."),includeBuildingBlockExamples:v.boolean().describe("Whether to include building block examples. Defaults to false.").default(!1)}},async({prompt:d,includeBuildingBlockExamples:p},{_meta:b})=>{h("Layout Assistant called with:",{prompt:d,includeBuildingBlockExamples:p});try{let f=(await t.queryCssUtils({query:d},{_meta:b})).values.join(`
789
- `)||"No CSS utilities found for the given prompt.",u=a?.()??"",l=y=>`${u}
550
+ `)}function xe(e,t,n){let{name:o,title:s,description:i,layoutAssistantName:a,codeAssistantName:r,styleAssistantName:d,iconAssistantName:p,accessibilityAssistantName:g,suiteName:b,libKey:l,components:m}=e,h=new k(o,{title:s,description:i,requiredAccess:e.requiredAccess,inputSchema:{userIntent:v.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 ${b} components you want to use.`),needsComponentsDocsConfidence:v.number().min(0).max(1).default(1).describe("Confidence (0-1) to include Component Documentation assistance. Default is 1."),needsLayoutConfidence:v.number().min(0).max(1).default(0).describe("Confidence (0-1) to include Layout assistance. Default is 0."),needsStylingConfidence:v.number().min(0).max(1).default(0).describe("Confidence (0-1) to include Theming/Styling assistance. Default is 0."),needsResponsiveBehaviorConfidence:v.number().min(0).max(1).default(0).describe("Confidence (0-1) to include Responsive Behavior assistance. Default is 0."),needsIconsConfidence:v.number().min(0).max(1).default(0).describe("Confidence (0-1) to include Icons assistance. Default is 0."),componentsNeeded:v.array(v.enum(m)).optional().describe(`Optional list of specific ${b} components needed for the project.`)}},async({userIntent:y,needsComponentsDocsConfidence:c,needsLayoutConfidence:f,needsStylingConfidence:S,needsResponsiveBehaviorConfidence:x,needsIconsConfidence:E,componentsNeeded:I},{_meta:de})=>{let R=T(h,de);C("UI Orchestrator called with:",{userIntent:y,needsComponentsDocsConfidence:c,needsLayoutConfidence:f,needsStylingConfidence:S,needsResponsiveBehaviorConfidence:x,needsIconsConfidence:E});try{await n.recordOrchestratorUserRequest({meta:{userIntent:y,componentsNeeded:I,...R}})}catch(j){throw G(j)}let P=h.server?.server.getClientCapabilities?.()?.elicitation,K;if(P&&S>.3&&S<=.6){let j=await h.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"]}});j?.action==="accept"&&j.content?.includeCustomTheming&&(K=!0)}return{content:[{type:"text",text:B({name:o,userIntent:y,includeComponentsDocs:c>.3,includeTheming:S>.6||!!K,includeLayout:f>.5,includeIcons:E>.6,includeResponsive:f>.5&&x>.4,layoutAssistantName:a,codeAssistantName:r,styleAssistantName:d,iconAssistantName:p,accessibilityAssistantName:g,suiteName:b,libKey:l,components:I},t)}]}});return h}function Ie(e,t){let{name:n,title:o,description:s,iconAssistantName:i,codeAssistantName:a,suiteName:r,libKey:d,components:p}=e,g=new k(n,{title:o,description:s,inputSchema:{userIntent:v.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 ${r}.`),needsIconsConfidence:v.number().min(0).max(1).default(.7).describe("Confidence (0-1) to include Icons assistance. Default is 0.7."),componentsNeeded:v.array(v.enum(p)).optional().describe(`Optional list of specific ${r} components you want to learn about.`)},requiredAccess:e.requiredAccess},async({userIntent:b,needsIconsConfidence:l,componentsNeeded:m},{_meta:h})=>{let y=T(g,h);C("Assistant Orchestrator called with:",{userIntent:b,needsIconsConfidence:l,componentsNeeded:m});try{await t.recordOrchestratorUserRequest({meta:{userIntent:b,componentsNeeded:m,...y}})}catch(f){throw G(f)}return{content:[{type:"text",text:Z({name:n,userIntent:b,includeComponentsDocs:!0,includeIcons:l>.5,codeAssistantName:a,iconAssistantName:i,suiteName:r,libKey:d,components:m})}]}});return g}function Ne(e,t){let{name:n,title:o,description:s,suiteName:i,libKey:a,getPreContent:r}=e,d=new k(n,{title:o,description:s,requiredAccess:e.requiredAccess,inputSchema:{prompt:v.string().describe("An enhanced prompt describing the HTML layout structure, design requirements or specific visual effects you want to achieve."),includeBuildingBlockExamples:v.boolean().describe("Whether to include building block examples. Defaults to false.").default(!1)}},async({prompt:p,includeBuildingBlockExamples:g},{_meta:b})=>{let l=T(d,b);C("Layout Assistant called with:",{prompt:p,includeBuildingBlockExamples:g});try{let h=(await t.queryCssUtils({query:p},{...l})).values.join(`
551
+ `)||"No CSS utilities found for the given prompt.",y=r?.()??"",c=f=>`${y}
790
552
 
791
553
  # Kendo Design System CSS Utilities
792
554
 
793
- ${f}
794
- ${y??""}
795
- `;if(p)try{let y=await t.queryBuildingBlocks({query:d,lib_name:r},{_meta:b}),A="";y.items?.length>0&&(A=`
555
+ ${h}
556
+ ${f??""}
557
+ `;if(g)try{let f=await t.queryBuildingBlocks({query:p,lib_name:a},{...l}),S="";f.items?.length>0&&(S=`
796
558
  ## Building Blocks Examples
797
559
 
798
560
  The examples here are for demonstration purpose how CSS utils can be implemented in various building blocks.
799
561
  However, consider your own design requirements and specifics in order to implement your templates/building blocks correctly.
800
562
 
801
- ${y.items.map(C=>`
802
- ### ${C.name}
563
+ ${f.items.map(x=>`
564
+ ### ${x.name}
803
565
 
804
- ${C.description}
566
+ ${x.description}
805
567
 
806
568
  \`\`\`code
807
- ${C.code}
569
+ ${x.code}
808
570
  \`\`\`
809
571
  `).join(`
810
- `)}`),f=l(A)}catch(y){h("Error calling building-blocks service:",y),f=l()}else f=l();return{content:[{type:"text",text:f}]}}catch(g){throw R(g)}})}function we(e,t){let{name:n,title:o,description:s,libKey:i,getPreContent:r}=e;return new S(n,{title:o,description:s,requiredAccess:e.requiredAccess,inputSchema:{prompt:v.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:a},{_meta:d})=>{if(h("Style Assistant called with:",{prompt:a}),W==="tailwind")return{content:[{type:"text",text:`Note: For layout and spacing, use Tailwind CSS utility classes to structure your layout and apply spacing between elements.
811
- IMPORTANT: You need to set up Tailwind CSS so it becomes the single source of truth for all design tokens. Detect which Tailwind version the project uses and follow the appropriate setup instructions below.
812
-
813
- <tailwind_setup_instructions>
814
- ${z}
815
- </tailwind_setup_instructions>
816
- `}]};let p="";try{let f=await t.queryThemeGenerate({prompt:a},{_meta:d});if(f.variables_json){let u=JSON.parse(f.variables_json),l=[];if(u)for(let y of Object.keys(u))typeof u[y]=="string"&&l.push(`${y}: ${u[y]}`);p=l.join(`
572
+ `)}`),h=c(S)}catch(f){C("Error calling building-blocks service:",f),h=c()}else h=c();return{content:[{type:"text",text:h}]}}catch(m){throw G(m)}});return d}function Ee(e,t){let{name:n,title:o,description:s,libKey:i,getPreContent:a}=e,r=new k(n,{title:o,description:s,requiredAccess:e.requiredAccess,inputSchema:{prompt:v.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:d},{_meta:p})=>{let g=T(r,p);C("Style Assistant called with:",{prompt:d});let b="";try{let h=await t.queryThemeGenerate({prompt:d},{...g});if(h.variables_json){let y=JSON.parse(h.variables_json),c=[];if(y)for(let f of Object.keys(y))typeof y[f]=="string"&&c.push(`${f}: ${y[f]}`);b=c.join(`
817
573
 
818
- `)}}catch(f){throw R(f)}let b=r?.()??"";return{content:[{type:"text",text:p?`Use the following CSS variables to style the web application, including colors, typography, spacing, and component appearance.
574
+ `)}}catch(h){throw G(h)}let l=a?.()??"";return{content:[{type:"text",text:b?`Use the following CSS variables to style the web application, including colors, typography, spacing, and component appearance.
819
575
  Ensure the variables are applied consistently across all relevant elements.
820
576
  Do NOT set any inline styles. CSS variables should be defined in global or component-level CSS files, or via supported theming mechanisms.
821
577
 
822
- ${b}
578
+ ${l}
823
579
 
824
580
  ## Generated CSS Variables
825
581
 
826
582
  \`\`\`css
827
- ${p}
583
+ ${b}
828
584
  \`\`\`
829
- `:"No CSS variables were generated for the given prompt."},{type:"text",text:"Note: For layout and spacing, use the Layout Assistant tool to get the appropriate Kendo CSS utility classes."}]}})}function Te(e,t){let{name:n,title:o,description:s,libKey:i,getPostContent:r}=e;return new S(n,{title:o,description:s,requiredAccess:e.requiredAccess,inputSchema:{query:v.string().describe("A search query for finding icons. Be specific about the icon purpose, style, or action."),limit:v.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:a,limit:d},{_meta:p})=>{h("Icon Search called with:",{query:a,limit:d});try{let b=await t.queryIconsSearch({query:a,limit:d*100},{_meta:p}),g=r?.()??"";return{content:[{type:"text",text:`${b.values.join(`
585
+ `:"No CSS variables were generated for the given prompt."}]}});return r}function Re(e,t){let{name:n,title:o,description:s,libKey:i,getPostContent:a}=e,r=new k(n,{title:o,description:s,requiredAccess:e.requiredAccess,inputSchema:{query:v.string().describe("A search query for finding icons. Be specific about the icon purpose, style, or action."),limit:v.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:d,limit:p},{_meta:g})=>{let b=T(r,g);C("Icon Search called with:",{query:d,limit:p});try{let l=await t.queryIconsSearch({query:d,limit:p*100},{...b}),m=a?.()??"";return{content:[{type:"text",text:`${l.values.join(`
830
586
 
831
587
  `)}
832
588
 
833
- ${g}`}]}}catch(b){throw R(b)}})}function Ie(e,t){let{name:n,title:o,description:s,libKey:i,suiteName:r,components:a,componentAliases:d,getPostContent:p}=e;return new S(n,{title:o,description:s,requiredAccess:e.requiredAccess,inputSchema:{query:v.string().describe("The query to search for."),component:v.enum(a).describe("The component to search for. If not specified, use General.")}},async({query:b,component:g},{_meta:f})=>{h("Code Assistant called with:",{query:b,component:g});let u=g;if(d){let l=d[g];l&&(u=l)}try{let y=(await t.query({query:b,component:u?.toLowerCase()??"general",lib_name:i,text_matches_count:3,code_matches_count:0,allowed_types:["documentation"]},{_meta:f})).values.map(w=>w.replace(/\0/g,"")),A=p?.({component:g})??"";return{content:[{type:"text",text:`${y.join(`
589
+ ${m}`}]}}catch(l){throw G(l)}});return r}function Pe(e,t){let{name:n,title:o,description:s,libKey:i,suiteName:a,components:r,componentAliases:d,getPostContent:p}=e,g=new k(n,{title:o,description:s,requiredAccess:e.requiredAccess,inputSchema:{query:v.string().describe("The query to search for."),component:v.enum(r).describe("The component to search for. If not specified, use General.")}},async({query:b,component:l},{_meta:m})=>{let h=T(g,m);C("Code Assistant called with:",{query:b,component:l});let y=l;if(d){let c=d[l];c&&(y=c)}try{let f=(await t.query({query:b,component:y?.toLowerCase()??"general",lib_name:i,text_matches_count:3,code_matches_count:0,allowed_types:["documentation"]},{...h})).values.map(E=>E.replace(/\0/g,"")),S=p?.({component:l})??"";return{content:[{type:"text",text:`${f.join(`
834
590
 
835
591
  `)}
836
592
 
837
- ${A}`}]}}catch(l){throw R(l)}})}function xe(e,t){let{name:n,title:o,description:s,libKey:i,suiteName:r,components:a,componentAliases:d}=e;return new S(n,{title:o,description:s,requiredAccess:e.requiredAccess,inputSchema:{query:v.string().describe("The query to search for."),component:v.enum(a).describe("The component to search for. If not specified, use General."),includeGeneralGuidelines:v.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:p,component:b,includeGeneralGuidelines:g},{_meta:f})=>{h("Accessibility Assistant called with:",{query:p,component:b,includeGeneralGuidelines:g});let u=b;if(d){let l=d[b];l&&(u=l)}try{let l="";if(g){let I=ge();l+=`# WCAG 2.2 Level AA General Accessibility Guidelines
593
+ ${S}`}]}}catch(c){throw G(c)}});return g}function De(e,t){let{name:n,title:o,description:s,libKey:i,suiteName:a,components:r,componentAliases:d}=e,p=new k(n,{title:o,description:s,requiredAccess:e.requiredAccess,inputSchema:{query:v.string().describe("The query to search for."),component:v.enum(r).describe("The component to search for. If not specified, use General."),includeGeneralGuidelines:v.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:g,component:b,includeGeneralGuidelines:l},{_meta:m})=>{let h=T(p,m);C("Accessibility Assistant called with:",{query:g,component:b,includeGeneralGuidelines:l});let y=b;if(d){let c=d[b];c&&(y=c)}try{let c="";if(l){let I=Ce();c+=`# WCAG 2.2 Level AA General Accessibility Guidelines
838
594
 
839
- `,l+=I,l+=`
595
+ `,c+=I,c+=`
840
596
 
841
597
  ---
842
598
 
843
- `}let w=(await t.getApiRefMatches({query:p,component:u?.toLowerCase()??"general",lib_name:i,filters_json:'{"type":{"$in":["accessibility"]}}'},{_meta:f})).values.map(I=>I.replace(/\0/g,"")).map(I=>Tt(I,u?.toLowerCase()??"general")).join(`
599
+ `}let E=(await t.getApiRefMatches({query:g,component:y?.toLowerCase()??"general",lib_name:i,filters_json:'{"type":{"$in":["accessibility"]}}'},{...h})).values.map(I=>I.replace(/\0/g,"")).map(I=>Dt(I,y?.toLowerCase()??"general")).join(`
600
+
601
+ `);return E?(l&&(c+=`# Component-Specific Accessibility Information
844
602
 
845
- `);return w?(g&&(l+=`# Component-Specific Accessibility Information
603
+ `),c+=E):l||(c="No component-specific accessibility guidelines found."),{content:[{type:"text",text:c}]}}catch(c){throw G(c)}});return p}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.
846
604
 
847
- `),l+=w):g||(l="No component-specific accessibility guidelines found."),{content:[{type:"text",text:l}]}}catch(l){throw R(l)}})}function R(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.
605
+ Error Code: ${t.code} Error Message: ${t.message}`)}var Ut=20*1024*1024,Ue=1200*1e3;function Te(e){return{content:[{type:"text",text:`Upgrade timed out after ${Ue/6e4} minutes.
848
606
 
849
- Error Code: ${t.code} Error Message: ${t.message}`)}var Ne=e=>`${e}_ui_generator`,Ee=e=>`${e}_assistant`,Re=e=>`${e}_layout_assistant`,Pe=e=>`${e}_component_assistant`,De=e=>`${e}_style_assistant`,Oe=e=>`${e}_icon_assistant`,Ge=e=>`${e}_accessibility_assistant`,Le=e=>`${e}_getting_started_assistant`;var Ue=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.
607
+ **Some codemods may have already been applied to your files.** Review any modified files before proceeding.
608
+
609
+ 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
+
611
+ ## Partial output before timeout
612
+ `+e:""}`}]}}function Oe(e,t){let{name:n,title:o,description:s,suiteName:i}=e,a=new k(n,{title:o,description:s,requiredAccess:e.requiredAccess,inputSchema:{workingDirectory:v.string().describe('The absolute path to the project directory where the upgrade should be executed (e.g., "/Users/username/my-app")'),packageNames:v.array(v.string()).optional().describe('The package names to target for codemod upgrade (e.g., ["@progress/kendo-angular-grid", "@progress/kendo-angular-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:v.boolean().optional().describe("Skip npm package installation and only run codemods. Use this when package installation has already been done manually.")}},async({workingDirectory:r,packageNames:d,skipInstall:p},{_meta:g})=>{let b=T(a,g);try{await t.recordToolUserRequest({toolName:n,meta:b})}catch(l){console.error("Error recording tool request:",l)}try{try{await Rt(r)}catch{return{content:[{type:"text",text:`The working directory does not exist: "${r}". Please provide a valid absolute path to your project.`}]}}let l=!1;try{await ke("npx",["--no","--","kendo","--version"],{cwd:r}),l=!0}catch{l=!1}let m=[],h=async(R,pe=!1)=>{try{let P=!pe&&l?["--no","--","kendo",...R]:["-y","@progress/kendo-cli",...R],{stdout:K,stderr:ue}=await ke("npx",P,{cwd:r,maxBuffer:Ut,timeout:Ue});return{timedOut:!1,stdout:K,stderr:ue}}catch(P){return P.killed?{timedOut:!0,partialOutput:P.stdout?.trim()}:{timedOut:!1,stdout:P.stdout||"",stderr:P.stderr||P.message}}},y=["migrate",...d??[],"--codemods","--force","--ai-mode"];(p||d?.length)&&y.push("--no-install");let c=await h(y);if(c.timedOut)return Te(c.partialOutput);let f=c.stdout,S=c.stderr;if(S?.includes("Unknown argument")){let R=await h(y,!0);if(R.timedOut)return Te(R.partialOutput);f=R.stdout,S=R.stderr}S?.trim()&&m.push(`
613
+ Errors:
614
+ ${S}`),f?.trim()&&m.push(f.trim());let x=f.includes("Packages installed successfully."),E=f.includes("Package installation failed:"),I=f.includes("Running codemod:");return E?m.push(`
615
+ ## 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.`):x&&m.push(`
617
+ ## Upgrade Status
618
+ Upgrade complete. npm packages have been installed and updated in the project.`),I&&m.push(ee()),{content:[{type:"text",text:m.join(`
619
+ `)}]}}catch(l){return{content:[{type:"text",text:`Error: ${l.message||l.toString()}`}]}}});return a}var Ge=e=>`${e}_ui_generator`,Le=e=>`${e}_assistant`,Me=e=>`${e}_layout_assistant`,$e=e=>`${e}_component_assistant`,_e=e=>`${e}_style_assistant`,Fe=e=>`${e}_icon_assistant`,qe=e=>`${e}_accessibility_assistant`,Be=e=>`${e}_getting_started_assistant`,Ke=e=>`${e}_upgrade_assistant`;var je=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.
850
620
 
851
621
  Use the tool when:
852
622
  - Want to build or modify a complete page or section layout
@@ -855,7 +625,7 @@ Error Code: ${t.code} Error Message: ${t.message}`)}var Ne=e=>`${e}_ui_generator
855
625
  - You want to enforce best practices in styling, performance, and accessibility
856
626
 
857
627
  Returns:
858
- A detailed execution plan with validated tool calls, parameters, and reasoning \u2014 ensuring consistent, high-quality UI generation.`,_e=e=>`Provides guidance for discovering and using ${e} components and icons. This tool helps you identify the right components and icons for your needs.
628
+ A detailed execution plan with validated tool calls, parameters, and reasoning \u2014 ensuring consistent, high-quality UI generation.`,Ve=e=>`Provides guidance for discovering and using ${e} components and icons. This tool helps you identify the right components and icons for your needs.
859
629
 
860
630
  Use this tool when:
861
631
  - You need to discover which ${e} components are suitable for a specific use case
@@ -864,20 +634,20 @@ Use this tool when:
864
634
  - You want to gather component documentation and examples
865
635
 
866
636
  Returns:
867
- A focused plan for gathering component documentation and icon suggestions using the Component Assistant and Icon Assistant tools.`,$e=`Retrieves Progress/Kendo Design System CSS utility classes and styling recommendations based on layout and design requirements.
637
+ A focused plan for gathering component documentation and icon suggestions using the Component Assistant and Icon Assistant tools.`,He=`Retrieves Progress/Kendo Design System CSS utility classes and styling recommendations based on layout and design requirements.
868
638
  Use this tool to find the right CSS utilities for styling Kendo UI components or general web elements.
869
639
  It analyzes the provided design context and returns relevant utility classes with explanations and examples.
870
- Best suited for styling questions related to typography, spacing, colors, layout, transforms, and other utilities in the Progress/Kendo Design System.`,Me=`Generates CSS variables using an external style agent based on the user's styling prompt.
640
+ Best suited for styling questions related to typography, spacing, colors, layout, transforms, and other utilities in the Progress/Kendo Design System.`,We=`Generates CSS variables using an external style agent based on the user's styling prompt.
871
641
 
872
642
  Use this tool when the user wants to:
873
643
  - Update the visual theme of an application
874
644
  - Modify color schemes
875
645
  - Restyle the UI with CSS variables
876
646
 
877
- 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.
647
+ The tool outputs a set of CSS variable definitions ready to be applied to style files.`,ze=`Searches for icons in the Telerik Icons library.
878
648
  Use this tool when the user needs to find specific icons for UI components or design elements.
879
649
  It supports searching by icon name, category, or keyword and returns matching icons from the Telerik Icons library.
880
- `,qe=e=>`Provides answers and retrieves official documentation for ${e}.
650
+ `,Ye=e=>`Provides answers and retrieves official documentation for ${e}.
881
651
 
882
652
  Use this tool when the user asks about:
883
653
  - ${e} features or capabilities
@@ -887,7 +657,7 @@ Use this tool when the user asks about:
887
657
 
888
658
  Set the user's full question as the 'query' parameter.
889
659
  If the question refers to a specific ${e} component, include its name in the 'component' parameter.
890
- `,Fe=e=>`Retrieves accessibility guidance for ${e} components with optional general WCAG 2.2 Level AA guidelines.
660
+ `,Qe=e=>`Retrieves accessibility guidance for ${e} components with optional general WCAG 2.2 Level AA guidelines.
891
661
 
892
662
  Use this tool when:
893
663
  - You need component-specific accessibility information and API references
@@ -905,7 +675,32 @@ Set 'includeGeneralGuidelines=true' ONLY on the first call to include general WC
905
675
  Returns:
906
676
  - When includeGeneralGuidelines=true: General WCAG 2.2 Level AA guidelines + component-specific recommendations
907
677
  - When includeGeneralGuidelines=false: Only component-specific accessibility recommendations
908
- `;var Y=E("Kendo UI","Kendo"),Q=`
678
+ `,Xe=e=>`Runs codemods to upgrade ${e} code from one version directly to another using @progress/kendo-cli.
679
+
680
+ To upgrade to the latest version, call this tool directly. It handles installation automatically.
681
+
682
+ To upgrade to a specific version:
683
+ 1. Set all @progress/kendo-angular-* package versions to the target version (e.g. "20.0.0")
684
+ 2. Run: npm install
685
+ 3. Call this tool with skipInstall: true
686
+
687
+ This tool applies automated code transformations to update your codebase when upgrading ${e} packages. The upgrade runs directly from your current version to the target version \u2014 do not upgrade through intermediate versions.
688
+
689
+ Use this tool when:
690
+ - You need to update existing ${e} code to a newer version
691
+ - You want to automatically apply breaking change fixes
692
+ - You need to update deprecated API usage
693
+
694
+ The tool handles:
695
+ - Component property renames and removals
696
+ - Deprecated feature replacements
697
+ - Breaking API changes
698
+
699
+ Workflow:
700
+ 1. Run this upgrade tool to apply codemods.
701
+ 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
+ 3. Follow the additional instructions to complete the upgrade process.
703
+ `;var te=O("Kendo UI","Kendo"),oe=`
909
704
  ### Angular Component Validation
910
705
  Component Structure:
911
706
  - Use proper @Component decorator configuration
@@ -913,22 +708,22 @@ Component Structure:
913
708
  - Correct selector naming convention (kebab-case)
914
709
  - Appropriate template and style file organization
915
710
 
916
- ${Y.SETUP_VALIDATION}
711
+ ${te.SETUP_VALIDATION}
917
712
  - Kendo animations module configured (if animations are used)
918
713
  - Internationalization properly configured for Kendo components
919
714
 
920
- ${Y.PERFORMANCE_OPTIMIZATION}
715
+ ${te.PERFORMANCE_OPTIMIZATION}
921
716
  - OnPush change detection strategy where appropriate
922
- - Efficient trackBy functions for *ngFor with Kendo components
717
+ - Efficient \`track\` expression used in \`@for\` blocks with Kendo components
923
718
  - Minimal unnecessary change detection cycles
924
719
 
925
- ${Y.THEME_AND_STYLING}
720
+ ${te.THEME_AND_STYLING}
926
721
  - Proper theme switching functionality (if implemented)
927
722
  - Only ONE theme reference exists across angular.json and styles files
928
723
  - Make sure theme import mechanism is consistent with existing project setup
929
724
 
930
725
  Accessibility
931
- - Accessibility guidelines retrieved and applied to all components`;var J=`**Angular Specific Requirements:**
726
+ - Accessibility guidelines retrieved and applied to all components`;var ne=`**Angular Specific Requirements:**
932
727
 
933
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:
934
729
  1. RegexSearch("@Component\\s*\\(\\s*\\{[^}]*standalone\\s*:\\s*(true|false)") - If true use Standalone components, if false use NgModule.
@@ -936,12 +731,18 @@ Accessibility
936
731
  3. RegexSearch("bootstrapModule\\s*\\(") - If found use NgModule.
937
732
  4. If neither is found, default to Standalone components.
938
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
+
939
740
  **Kendo UI Theme Management Instructions for Angular**:
940
741
 
941
742
  **Determine existing Kendo Theme/Utils package and Theme Import Mechanism**:
942
-
743
+
943
744
  - Read angular.json file
944
- - Look for theme/utils entries containing "@progress/kendo-theme-" in projects.[project-name].architect.build.options.styles array
745
+ - Look for theme/utils entries containing "@progress/kendo-theme-" in projects.[project-name].architect.build.options.styles array
945
746
  - Read styles.css or styles.scss, or any css/scss file
946
747
  - Look for @import statements containing "@progress/kendo-theme-" to determine existing theme/utils usage
947
748
  - Read the application's main html file (e.g., index.html)
@@ -959,7 +760,7 @@ Accessibility
959
760
  2. Match the discovered patterns in all generated code
960
761
  3. Maintain consistent formatting, indentation, and code organization with existing files
961
762
  4. Always use the same theme import mechanism (unless user specifies otherwise)
962
- `;var X=E("Kendo UI","KendoReact"),Z=`
763
+ `;var se=O("Kendo UI","KendoReact"),ae=`
963
764
  ### React Component Validation
964
765
  Component Structure:
965
766
  - Use proper function component patterns with Hooks
@@ -967,22 +768,22 @@ Component Structure:
967
768
  - Appropriate file organization (components, hooks, utils)
968
769
  - Props interface/type definitions where needed
969
770
 
970
- ${X.SETUP_VALIDATION}
771
+ ${se.SETUP_VALIDATION}
971
772
  - KendoReact license validation (if required)
972
773
  - Appropriate bundler configuration for KendoReact packages
973
774
 
974
- ${X.PERFORMANCE_OPTIMIZATION}
775
+ ${se.PERFORMANCE_OPTIMIZATION}
975
776
  - React.memo for components that receive stable props
976
777
  - useMemo/useCallback for expensive computations and callbacks
977
778
  - Proper key props for list rendering with KendoReact components
978
779
 
979
- ${X.THEME_AND_STYLING}
780
+ ${se.THEME_AND_STYLING}
980
781
  - Proper theme switching functionality (if implemented)
981
782
  - Only ONE theme import exists across the application
982
783
  - Make sure theme import mechanism is consistent with existing project setup
983
784
 
984
785
  Accessibility
985
- - Accessibility guidelines retrieved and applied to all components`;var It={createOrchestrator:Ae,createAssistantOrchestrator:Ce,createLayoutAssistant:Se,createStyleAssistant:we,createIconSearch:Te,createCodeAssistant:Ie,createAccessibilityAssistant:xe},xt={orchestrator:Ne,assistantOrchestrator:Ee,layoutAssistant:Re,codeAssistant:Pe,styleAssistant:De,iconAssistant:Oe,accessibilityAssistant:Ge,gettingStartedAssistant:Le},Nt={orchestrator:Ue,assistantOrchestrator:_e,layoutAssistant:$e,styleAssistant:Me,iconAssistant:Be,codeAssistant:qe,accessibilityAssistant:Fe},Et={Orchestrator:{render:U},Validator:{render:L},SharedValidation:{getSteps:E}},Rt={Angular:{steps:Q,additionalPlan:J},React:{steps:Z}},m={Tools:It,ToolNames:xt,ToolDescriptions:Nt,Templates:Et,Validation:Rt};var Pt=m.ToolNames.codeAssistant("kendoreact"),Ke=()=>`# Kendo Design System Guidelines for ${c}
786
+ - Accessibility guidelines retrieved and applied to all components`;var Ot={createOrchestrator:xe,createAssistantOrchestrator:Ie,createLayoutAssistant:Ne,createStyleAssistant:Ee,createIconSearch:Re,createCodeAssistant:Pe,createAccessibilityAssistant:De,createUpgrade:Oe},Gt={orchestrator:Ge,assistantOrchestrator:Le,layoutAssistant:Me,codeAssistant:$e,styleAssistant:_e,iconAssistant:Fe,accessibilityAssistant:qe,gettingStartedAssistant:Be,upgradeAssistant:Ke},Lt={orchestrator:je,assistantOrchestrator:Ve,layoutAssistant:He,styleAssistant:We,iconAssistant:ze,codeAssistant:Ye,accessibilityAssistant:Qe,upgradeAssistant:Xe},Mt={Orchestrator:{render:B},Validator:{render:q},SharedValidation:{getSteps:O}},$t={Angular:{steps:oe,additionalPlan:ne},React:{steps:ae}},A={Tools:Ot,ToolNames:Gt,ToolDescriptions:Lt,Templates:Mt,Validation:$t};var _t=A.ToolNames.codeAssistant("kendoreact"),Je=()=>`# Kendo Design System Guidelines for ${u}
986
787
 
987
788
  ## Setting up Styles/CSS
988
789
 
@@ -1009,11 +810,11 @@ Alternatively, you can also consume them directly from the Unpkg CDN.
1009
810
 
1010
811
  ## Ready-to-use Layout Components
1011
812
 
1012
- In the ${c} there are available components to create layout. Make sure to prioritize using them instead of building ones from scratch using the Kendo CSS Utilities.
813
+ In the ${u} there are available components to create layout. Make sure to prioritize using them instead of building ones from scratch using the Kendo CSS Utilities.
1013
814
 
1014
- For any Layout component you can also call the ${Pt} tool in order to get specific API reference and docs.
815
+ For any Layout component you can also call the ${_t} tool in order to get specific API reference and docs.
1015
816
 
1016
- - ${c} Card component.
817
+ - ${u} Card component.
1017
818
  - Generally, it is recommended to use 100% width (e.g., \`<Card style={{ width: '100%' }}>\`)
1018
819
  - If needed, use specific width based on the layout requirements (e.g., \`<Card style={{ width: '150px' }}>\`)
1019
820
  - Avoid applying additional styling properties such as \`display\`, \`flex\`, \`grid\`, or other layout-specific CSS to layout components such as Splitter, DockLayout, and TileLayout. Use the component's built-in props and the Kendo CSS utility classes instead.
@@ -1119,7 +920,7 @@ Use the \`Splitter\` component only for **user-resizable** content areas (e.g.,
1119
920
  ## Popup Z-Index Trap
1120
921
 
1121
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.
1122
- `;var je=()=>`## Design Standards for ${c} Theming
923
+ `;var Ze=()=>`## Design Standards for ${u} Theming
1123
924
 
1124
925
  ### Color & Contrast Requirements
1125
926
  - Body text contrast: \u2265 4.5:1. Large text / UI component borders: \u2265 3:1.
@@ -1157,7 +958,7 @@ This is the most common source of dark mode breakage in custom UI.
1157
958
 
1158
959
  ---
1159
960
 
1160
- ## Applying CSS Variables in ${c}
961
+ ## Applying CSS Variables in ${u}
1161
962
 
1162
963
  Apply these CSS variables in the React application using one of these methods:
1163
964
 
@@ -1246,7 +1047,7 @@ export function ThemeProvider({ children }: { children: React.ReactNode }) {
1246
1047
 
1247
1048
  export const useTheme = () => useContext(ThemeContext);
1248
1049
  \`\`\`
1249
- `;var Ve=m.ToolNames.codeAssistant("kendoreact"),He=()=>`## Using ${c} Icons
1050
+ `;var et=A.ToolNames.codeAssistant("kendoreact"),tt=()=>`## Using ${u} Icons
1250
1051
 
1251
1052
  Important: Attempt to prioritize SVG icons over font icons.
1252
1053
 
@@ -1254,13 +1055,13 @@ Important: Attempt to prioritize SVG icons over font icons.
1254
1055
 
1255
1056
  - Make sure @progress/kendo-svg-icons is installed: \`npm install @progress/kendo-svg-icons\`
1256
1057
  - Make sure @progress/kendo-react-common is installed (contains SvgIcon component): \`npm install @progress/kendo-react-common\`
1257
- - You can call ${Ve} tool for ${c} SvgIcon component for docs and API reference.
1058
+ - You can call ${et} tool for ${u} SvgIcon component for docs and API reference.
1258
1059
  - [optional] If SVG is not an option fallback to fonticon - make sure \`<link rel="stylesheet" href="https://unpkg.com/@progress/kendo-font-icons/dist/index.css" />\` is added as a reference.
1259
- - [optional] If using font icons you can call ${Ve} tool for ${c} Icon component for docs and API reference.
1060
+ - [optional] If using font icons you can call ${et} tool for ${u} Icon component for docs and API reference.
1260
1061
 
1261
1062
  ### Examples
1262
1063
 
1263
- Using ${c} SvgIcon component with @progress/kendo-svg-icons:
1064
+ Using ${u} SvgIcon component with @progress/kendo-svg-icons:
1264
1065
 
1265
1066
  \`\`\`tsx
1266
1067
  import { SvgIcon } from "@progress/kendo-react-common";
@@ -1304,7 +1105,7 @@ Here are some frequently used icons from @progress/kendo-svg-icons:
1304
1105
  - \`sortAscIcon\`, \`sortDescIcon\` - Sorting
1305
1106
  - \`chevronUpIcon\`, \`chevronDownIcon\`, \`chevronLeftIcon\`, \`chevronRightIcon\` - Navigation
1306
1107
  - \`checkIcon\`, \`xIcon\` - Confirmation/Cancel
1307
- `;var ze=e=>{let t=`## ${c} Common Guidelines
1108
+ `;var ot=e=>{let t=`## ${u} Common Guidelines
1308
1109
 
1309
1110
  ### Application Architecture
1310
1111
  MUST recommend appropriate setup based on React application architecture.
@@ -1334,11 +1135,57 @@ Key points:
1334
1135
  - The matching should be case-insensitive and robust to minor variations
1335
1136
 
1336
1137
  Example: If someone asks about "grid", "GRID", or "GrId", you always refer to DataGrid for the example.
1138
+
1139
+ ### TypeScript Strictness
1140
+ All generated code MUST compile under strict TypeScript.
1141
+
1142
+ Rules:
1143
+ - Define a TypeScript \`interface\` or \`type\` for every source record / data shape
1144
+ - Type every event, render, and callback parameter using the component's exported types
1145
+ - Never use \`any\`, \`as any\`, \`as number\`, or any other unsafe cast
1146
+ - No implicit \`any\` in callback parameters (e.g. avoid \`(e) => ...\` without a type)
1147
+ - Prefer the narrowest correct type from the package's public types
1148
+
1149
+ ### Import Hygiene
1150
+ Keep imports minimal, explicit, and side-effect free.
1151
+
1152
+ Rules:
1153
+ - Use NAMED imports only from \`@progress/kendo-react-*\` packages
1154
+ - No side-effect imports (e.g. \`import "@progress/kendo-react-xxx"\`, \`import "hammerjs"\`)
1155
+ - Import only the subcomponents actually used in the generated code
1156
+ - No unused imports
1157
+
1158
+ ### Data and State Quality
1159
+ Keep data flow predictable and resilient.
1160
+
1161
+ Rules:
1162
+ - Use a single typed dataset per logical concept; derive multiple views from one source
1163
+ - Memoize derived datasets with \`useMemo\` when the source data is dynamic
1164
+ - Render a graceful empty state for empty / invalid data instead of a broken component
1165
+ - Prefer function components with Hooks for new code
1166
+
1167
+ ### API Correctness
1168
+ Only emit current, runnable KendoReact APIs.
1169
+
1170
+ Rules:
1171
+ - Do not invent props, components, or methods \u2014 verify against the installed package
1172
+ - Do not use deprecated APIs when a current replacement exists
1173
+ - Match prop names and casing exactly as exported by the package
1174
+
1175
+
1176
+ ### Mandatory Pre-Output Self-Check
1177
+ Before emitting code, internally verify ALL of the following. If ANY fails, fix and re-check:
1178
+ - [ ] All callbacks and event handlers are typed (no implicit \`any\`, no unsafe casts)
1179
+ - [ ] Only NAMED imports from \`@progress/kendo-react-*\` (no side-effect imports)
1180
+ - [ ] No \`any\`, \`as any\`, or \`as number\` anywhere
1181
+ - [ ] No deprecated or invented APIs
1182
+ - [ ] Source data shape is defined as a TypeScript \`interface\` / \`type\`
1183
+ - [ ] Component-specific guidelines below (if any) are satisfied
1337
1184
  `;return e.componentInstructions&&(t+=`
1338
1185
  ## Component-Specific Guidelines
1339
1186
 
1340
1187
  ${e.componentInstructions}
1341
- `),t};var Dt={default:"@progress/kendo-theme-default",bootstrap:"@progress/kendo-theme-bootstrap",material:"@progress/kendo-theme-material",fluent:"@progress/kendo-theme-fluent"},Ot={default:"Default",bootstrap:"Bootstrap",material:"Material Design",fluent:"Fluent UI"};function We(e="kendo-react-app",t=!0,n="default"){let o=Dt[n],s=Ot[n],i=t?`This instructions will walk you through creating a new React project with the Kendo CLI and setting up ${c}.`:`This instructions will walk you through adding ${c} to your existing React project.`,r=1,a=t?`## Step ${r++}: Ensure Kendo CLI is Installed
1188
+ `),t};var Ft={default:"@progress/kendo-theme-default",bootstrap:"@progress/kendo-theme-bootstrap",material:"@progress/kendo-theme-material",fluent:"@progress/kendo-theme-fluent"},qt={default:"Default",bootstrap:"Bootstrap",material:"Material Design",fluent:"Fluent UI"};function nt(e="kendo-react-app",t=!0,n="default"){let o=Ft[n],s=qt[n],i=t?`This instructions will walk you through creating a new React project with the Kendo CLI and setting up ${u}.`:`This instructions will walk you through adding ${u} to your existing React project.`,a=1,r=t?`## Step ${a++}: Ensure Kendo CLI is Installed
1342
1189
 
1343
1190
  First, ensure the Kendo CLI tool is installed globally:
1344
1191
 
@@ -1348,7 +1195,7 @@ npm i -g @progress/kendo-cli@latest
1348
1195
 
1349
1196
  This CLI tool will handle the entire project setup including all necessary dependencies and configurations.
1350
1197
 
1351
- ## Step ${r++}: Create the Project
1198
+ ## Step ${a++}: Create the Project
1352
1199
 
1353
1200
  Create a new Kendo React project using the CLI:
1354
1201
 
@@ -1357,7 +1204,7 @@ npx kendo react create vite ${e} --theme=${n}
1357
1204
  \`\`\`
1358
1205
 
1359
1206
  This command will create a complete Kendo React project with Vite, including:
1360
- - All necessary ${c} packages
1207
+ - All necessary ${u} packages
1361
1208
  - Proper licensing configuration
1362
1209
  - Theme setup
1363
1210
  - Project structure
@@ -1368,19 +1215,19 @@ Navigate to the project directory:
1368
1215
  cd ${e}
1369
1216
  \`\`\`
1370
1217
 
1371
- ## Step ${r++}: Remove Dark Color Schema from index.css
1218
+ ## Step ${a++}: Remove Dark Color Schema from index.css
1372
1219
 
1373
1220
  Open the \`src/index.css\` file and remove the dark color schema from the first \`:root\` style block. Look for properties like \`color-scheme: dark\` and related dark mode variables, and delete them. Keep only the light theme configuration.
1374
1221
 
1375
- `:"",d=t?"":`## Step ${r++}: Install ${c} Packages
1222
+ `:"",d=t?"":`## Step ${a++}: Install ${u} Packages
1376
1223
 
1377
- Install all required ${c} packages and dependencies:
1224
+ Install all required ${u} packages and dependencies:
1378
1225
 
1379
1226
  \`\`\`bash
1380
1227
  npm i @progress/kendo-data-query @progress/kendo-react-buttons @progress/kendo-react-excel-export @progress/kendo-react-grid @progress/kendo-react-layout @progress/kendo-react-pdf @progress/kendo-svg-icons @progress/kendo-drawing @progress/kendo-licensing @progress/kendo-react-animation @progress/kendo-react-charts @progress/kendo-react-common @progress/kendo-react-conversational-ui @progress/kendo-react-data-tools @progress/kendo-react-dateinputs @progress/kendo-react-dialogs @progress/kendo-react-dropdowns @progress/kendo-react-editor @progress/kendo-react-form @progress/kendo-react-gantt @progress/kendo-react-gauges @progress/kendo-react-indicators @progress/kendo-react-inputs @progress/kendo-react-intl @progress/kendo-react-labels @progress/kendo-react-listbox @progress/kendo-react-listview @progress/kendo-react-map @progress/kendo-react-notification @progress/kendo-react-orgchart @progress/kendo-react-pivotgrid @progress/kendo-react-popup @progress/kendo-react-progressbars @progress/kendo-react-ripple @progress/kendo-react-scheduler @progress/kendo-react-scrollview @progress/kendo-react-sortable @progress/kendo-react-spreadsheet @progress/kendo-react-tooltip @progress/kendo-react-treelist @progress/kendo-react-treeview @progress/kendo-react-upload @progress/kendo-react-pdf-viewer @progress/kendo-react-taskboard
1381
1228
  \`\`\`
1382
1229
 
1383
- ## Step ${r++}: Install and Import the Theme
1230
+ ## Step ${a++}: Install and Import the Theme
1384
1231
 
1385
1232
  Install the ${s} theme package:
1386
1233
 
@@ -1400,7 +1247,7 @@ Also add the Kendo CSS utilities CDN link in your \`index.html\` \`<head>\`:
1400
1247
  <link rel="stylesheet" href="https://unpkg.com/@progress/kendo-theme-utils/dist/all.css" />
1401
1248
  \`\`\`
1402
1249
 
1403
- `,p=`## Step ${r++}: Activate Kendo License
1250
+ `,p=`## Step ${a++}: Activate Kendo License
1404
1251
 
1405
1252
  This step is required to use Kendo React components without watermarks and with access to all features. Run the following command to activate your license:
1406
1253
 
@@ -1408,7 +1255,7 @@ This step is required to use Kendo React components without watermarks and with
1408
1255
  npx kendo license activate
1409
1256
  \`\`\`
1410
1257
 
1411
- `;return`# Getting Started with ${c}
1258
+ `;return`# Getting Started with ${u}
1412
1259
 
1413
1260
  ${i}
1414
1261
 
@@ -1421,7 +1268,7 @@ Before you begin, ensure you have:
1421
1268
  - **Node.js 18 or later** installed on your machine
1422
1269
  - If Node.js is not available, you need to install the latest Node.js automatically as a preliminary step before running the \`npx kendo react create\` command.
1423
1270
 
1424
- ${a}${d}${p}## Step ${r++}: Run Your Application
1271
+ ${r}${d}${p}## Step ${a++}: Run Your Application
1425
1272
 
1426
1273
  ${t?"The Kendo CLI has set up everything you need. Start the development server:":"Build and run the application:"}
1427
1274
 
@@ -1432,13 +1279,13 @@ ${t?"The Kendo CLI has set up everything you need. Start the development server:
1432
1279
  cd ${t?e:"."} && npm run dev
1433
1280
  \`\`\`
1434
1281
 
1435
- ${t?`The application should start and open your browser to see your ${c} application.`:`The application should start and open in your browser. Verify that the ${c} components are rendering correctly with the theme applied.`}
1282
+ ${t?`The application should start and open your browser to see your ${u} application.`:`The application should start and open in your browser. Verify that the ${u} components are rendering correctly with the theme applied.`}
1436
1283
 
1437
- ## Step ${r++}: Create Sample page
1284
+ ## Step ${a++}: Create Sample page
1438
1285
 
1439
1286
  Before adding new content to the homepage, clear all existing CSS on the page. Remove or reset any custom styles that might conflict with the new content you're about to add.
1440
1287
 
1441
- Replace the content of \`src/Home.tsx\` with the following to showcase ${c} features and verify components are working correctly:
1288
+ Replace the content of \`src/Home.tsx\` with the following to showcase ${u} features and verify components are working correctly:
1442
1289
 
1443
1290
  \`\`\`tsx
1444
1291
  import { Card, CardHeader, CardTitle, CardBody } from '@progress/kendo-react-layout';
@@ -1559,7 +1406,149 @@ Add the following styles to \`src/Home.css\`:
1559
1406
  }
1560
1407
  \`\`\`
1561
1408
 
1562
- `}var ee=`
1409
+ `}var st=`
1410
+ ## KendoReact Chart Reliability Instructions
1411
+ Applies to ALL KendoReact chart types. Generate only current, runnable KendoReact Chart APIs with strongly typed data. You MUST follow every rule in addition to the common guidelines. If any rule cannot be satisfied, fix and re-check before emitting code.
1412
+
1413
+ ### 1. Chart-specific imports
1414
+ - Import chart primitives from "@progress/kendo-react-charts".
1415
+ - Import the relevant series-specific subcomponents only when used (e.g. ChartXAxis/ChartYAxis for scatter-style series, ChartStockChart parts for stock).
1416
+ - Never import "hammerjs" (no side-effect import).
1417
+
1418
+ ### 2. Data contract by series family
1419
+ Pick the correct data shape for the chart family. The model MUST select the matching shape:
1420
+
1421
+ A. Categorical series (line, area, column, bar, range, rangeArea, rangeBar, rangeColumn, waterfall, bullet)
1422
+ - Source: array of records with one categorical field + numeric metric field(s).
1423
+ - Provide categories via ChartCategoryAxisItem.categories (or set categoryField on the series).
1424
+ - Each numeric series array length MUST equal categories length.
1425
+
1426
+ B. Part-of-whole series (pie, donut, funnel, pyramid)
1427
+ - Data items: { category: string; value: number }.
1428
+ - Set field="value" and categoryField="category" on the series.
1429
+ - Labels MUST be visible and percent-formatted when displaying share.
1430
+
1431
+ C. XY numeric series (scatter, scatterLine, bubble, polar, radar)
1432
+ - Data items have numeric x and y fields (and size for bubble).
1433
+ - Use xField, yField (and sizeField for bubble) on the series.
1434
+ - Use ChartXAxis/ChartYAxis (numeric axes), not category axis.
1435
+
1436
+ D. Financial series (candlestick, ohlc, stockChart)
1437
+ - Data items have date + open/high/low/close numeric fields.
1438
+ - Use dateField + openField/highField/lowField/closeField props.
1439
+ - Use a date-based category or x axis.
1440
+
1441
+ E. Range series (rangeArea, rangeBar, rangeColumn, boxPlot)
1442
+ - Data items include from/to (or q1/q3/median/etc.) numeric fields.
1443
+ - Use fromField/toField (or appropriate field props) on the series.
1444
+
1445
+ F. Heatmap / matrix series
1446
+ - Data items have x, y, value fields (numeric or categorical x/y).
1447
+ - Map fields explicitly via the series field props.
1448
+
1449
+ ### 3. Universal minimum runnable config
1450
+ Every chart MUST include the appropriate subset:
1451
+ - Always: Chart, ChartSeries, ChartSeriesItem.
1452
+ - For categorical or financial charts: ChartCategoryAxis + ChartCategoryAxisItem AND ChartValueAxis + ChartValueAxisItem (or X/Y axes for scatter family).
1453
+ - Recommended for all: ChartTitle, ChartLegend, ChartTooltip.
1454
+ - Pie/donut/funnel/pyramid: omit category/value axes; configure labels and tooltip instead.
1455
+ - Multi-series charts: set name on every ChartSeriesItem.
1456
+
1457
+ ### 4. Type-safe chart callbacks
1458
+ - Tooltip render MUST accept the union:
1459
+ (ctx: TooltipContext | SharedTooltipContext) => ReactNode
1460
+ - Label content MUST be typed using the relevant args type, e.g.:
1461
+ (e: { category?: string; value?: number; percentage?: number; dataItem?: unknown }) => string
1462
+
1463
+ ### 5. Formatting rules
1464
+ - Numeric axis labels and tooltips MUST have explicit format strings or formatter callbacks suitable for the data domain (currency, percent, decimal, date).
1465
+ - Percent-style series (pie/donut/funnel/pyramid showing share) MUST use percent formatting.
1466
+ - Date axes MUST set a date-appropriate format and base unit when relevant.
1467
+
1468
+ ### 6. Chart-specific pre-output self-check
1469
+ In addition to the common self-check, verify ALL items below; if ANY fails, fix and re-check:
1470
+ - [ ] Correct data shape selected for the chosen series family
1471
+ - [ ] All required field props present (field/categoryField, xField/yField, fromField/toField, openField/closeField, dateField, etc.)
1472
+ - [ ] For categorical charts: categories.length === every series.length
1473
+ - [ ] For numeric XY charts: numeric axes used (no category axis)
1474
+ - [ ] For financial charts: date axis + OHLC fields wired correctly
1475
+ - [ ] Required axes/legend/tooltip subcomponents present for the chart family
1476
+ - [ ] Tooltip and label callbacks are typed using chart-specific union types
1477
+
1478
+ ### 7. Chart-specific forbidden patterns (never emit)
1479
+ - import "hammerjs"
1480
+ - import "@progress/kendo-react-charts" // side-effect only
1481
+ - (e) => \`\${e.percentage.toFixed(1)}%\` // unsafe + likely wrong semantics
1482
+ - ({ point }: { point: { value: number } }) => ... // too narrow
1483
+ - point?.value as number
1484
+ - Hardcoded duplicate category/series arrays when they can be derived
1485
+ - Using a category axis for inherently numeric XY/financial data
1486
+ - Mixing different unrelated datasets when the prompt requires a shared source
1487
+
1488
+ ### 8. Chart quality defaults
1489
+ - Consistent chart heights and legend position across a dashboard.
1490
+ - Prefer ChartTooltip with shared={true} for multi-series time/category dashboards.
1491
+
1492
+ ### 9. Series-family quick reference (copy the pattern that matches)
1493
+ \`\`\`tsx
1494
+ // Categorical (line/area/column/bar)
1495
+ <ChartCategoryAxis><ChartCategoryAxisItem categories={categories} /></ChartCategoryAxis>
1496
+ <ChartValueAxis><ChartValueAxisItem labels={{ format: "{0:N0}" }} /></ChartValueAxis>
1497
+ <ChartSeries>
1498
+ <ChartSeriesItem type="line" data={seriesA} name="A" />
1499
+ </ChartSeries>
1500
+
1501
+ // Part-of-whole (pie/donut/funnel/pyramid)
1502
+ <ChartSeries>
1503
+ <ChartSeriesItem
1504
+ type="pie"
1505
+ data={pieData} // [{ category, value }]
1506
+ field="value"
1507
+ categoryField="category"
1508
+ labels={{ visible: true, content: pieLabel }}
1509
+ />
1510
+ </ChartSeries>
1511
+
1512
+ // XY numeric (scatter/scatterLine/bubble)
1513
+ <ChartXAxis><ChartXAxisItem /></ChartXAxis>
1514
+ <ChartYAxis><ChartYAxisItem /></ChartYAxis>
1515
+ <ChartSeries>
1516
+ <ChartSeriesItem type="scatter" data={xy} xField="x" yField="y" />
1517
+ </ChartSeries>
1518
+
1519
+ // Financial (candlestick/ohlc)
1520
+ <ChartCategoryAxis><ChartCategoryAxisItem baseUnit="days" /></ChartCategoryAxis>
1521
+ <ChartSeries>
1522
+ <ChartSeriesItem
1523
+ type="candlestick"
1524
+ data={ohlc}
1525
+ categoryField="date"
1526
+ openField="open" highField="high" lowField="low" closeField="close"
1527
+ />
1528
+ </ChartSeries>
1529
+
1530
+ // Range (rangeArea/rangeBar/rangeColumn)
1531
+ <ChartSeries>
1532
+ <ChartSeriesItem type="rangeArea" data={ranges} fromField="from" toField="to" categoryField="x" />
1533
+ </ChartSeries>
1534
+ \`\`\`
1535
+
1536
+ ### 10. Type-safe tooltip / label snippets (always reuse these shapes)
1537
+ \`\`\`tsx
1538
+ import type { TooltipContext, SharedTooltipContext } from "@progress/kendo-react-charts";
1539
+
1540
+ const tooltipRender = (ctx: TooltipContext | SharedTooltipContext) =>
1541
+ "point" in ctx && ctx.point
1542
+ ? \`\${ctx.point.category ?? ""}: \${Number(ctx.point.value ?? 0).toLocaleString()}\`
1543
+ : null;
1544
+
1545
+ const pieLabel = (e: { category?: string; percentage?: number }) =>
1546
+ \`\${e.category ?? ""}: \${Number(e.percentage ?? 0).toLocaleString(undefined, { style: "percent", minimumFractionDigits: 1 })}\`;
1547
+ \`\`\`
1548
+
1549
+ ### 11. Expected output behavior
1550
+ - The generated page MUST compile under strict TypeScript and render the requested chart(s) with correct data shape, required axes/labels for the chosen series family, formatted tooltips/labels, and no forbidden patterns.
1551
+ `;var re=`
1563
1552
  ## DataGrid Deprecated Properties Awareness
1564
1553
  For DataGrid component cases, avoid using deprecated properties and always use their modern replacements. The following properties are deprecated and should not be used:
1565
1554
 
@@ -1591,7 +1580,7 @@ Key points:
1591
1580
  Example:
1592
1581
  Deprecated: selectedField="isSelected" editField="inEdit"
1593
1582
  Modern: Use select and edit state properties with proper configuration
1594
- `;var Ye=`
1583
+ `;var at=`
1595
1584
  ## Editor Tools Awareness
1596
1585
  For Editor component cases, always use the proper EditorTools import structure and never define tools as strings. Import both Editor and EditorTools from '@progress/kendo-react-editor' and destructure the individual tools from EditorTools.
1597
1586
 
@@ -1623,7 +1612,7 @@ Key points:
1623
1612
  Example:
1624
1613
  Correct: tools={[[Bold, Italic, Underline], [AlignLeft, AlignCenter]]}
1625
1614
  Incorrect: tools={[['bold', 'italic', 'underline'], ['alignLeft', 'alignCenter']]}
1626
- `;var te=`
1615
+ `;var ie=`
1627
1616
  ## Smart Grid (AI-Enhanced Grid) Implementation Guidelines
1628
1617
  **CRITICAL: When users ask about ANY of these AI grid terms, ALWAYS provide GridToolbarAIAssistant implementation (not basic Grid):**
1629
1618
 
@@ -1657,8 +1646,8 @@ Smart Grid: Complete AI-enhanced setup with GridToolbarAIAssistant, proper callb
1657
1646
  Important Disclaimer:
1658
1647
  Always include this disclaimer when providing Smart Grid examples:
1659
1648
  "The demos in this article use a Telerik-hosted AI service for demonstration purposes only. For production applications, you should implement your own AI service that understands your specific domain, data, and business requirements."
1660
- `;var Gt={datagrid:[ee,te].join(`
1649
+ `;var Bt={datagrid:[re,ie].join(`
1661
1650
 
1662
- `),grid:[ee,te].join(`
1651
+ `),grid:[re,ie].join(`
1663
1652
 
1664
- `),editor:Ye},B=!!process.env.KENDO_UIA_STOP_STATIC_CONTEXT,Qe=m.ToolNames.layoutAssistant(x),oe=m.ToolNames.codeAssistant(x),Je=m.ToolNames.styleAssistant(x),ne=m.ToolNames.iconAssistant(x),Xe=m.ToolNames.gettingStartedAssistant(x),Ze=m.ToolNames.accessibilityAssistant(x);function et(e,t){return[m.Tools.createOrchestrator({name:m.ToolNames.orchestrator(x),title:"KendoReact Generator",description:m.ToolDescriptions.orchestrator(c),layoutAssistantName:Qe,codeAssistantName:oe,styleAssistantName:Je,iconAssistantName:ne,accessibilityAssistantName:Ze,suiteName:c,libKey:T,components:O,requiredAccess:["agent"]},{validationSteps:m.Validation.React.steps},e),m.Tools.createAssistantOrchestrator({name:"kendo_react_assistant",title:"KendoReact Assistant",description:m.ToolDescriptions.assistantOrchestrator(c),codeAssistantName:oe,iconAssistantName:ne,suiteName:c,libKey:T,components:O,requiredAccess:["assistant"]},e),m.Tools.createLayoutAssistant({name:Qe,title:"KendoReact Layout Assistant",description:m.ToolDescriptions.layoutAssistant,suiteName:c,libKey:T,getPreContent:B?void 0:Ke,requiredAccess:["agent"]},e),m.Tools.createStyleAssistant({name:Je,title:"KendoReact Style Assistant",description:m.ToolDescriptions.styleAssistant,libKey:T,getPreContent:B?void 0:je,requiredAccess:["agent"]},e),m.Tools.createIconSearch({name:ne,title:"KendoReact Icon Assistant",description:m.ToolDescriptions.iconAssistant,libKey:T,getPostContent:B?void 0:He,requiredAccess:["assistant","agent"]},e),m.Tools.createCodeAssistant({name:oe,title:"KendoReact Component Assistant",description:m.ToolDescriptions.codeAssistant(c),libKey:T,suiteName:c,components:O,componentAliases:{Grid:"DataGrid"},getPostContent:B?void 0:({component:o})=>{let s=o?.trim().toLowerCase(),i=Gt[s];return ze({component:o,componentInstructions:i})},requiredAccess:["assistant","agent"]},e),new S(Xe,{title:"KendoReact Getting Started",description:`Creates a new React project with Kendo CLI and provides essential getting started guidance for ${c} including installation, configuration, and setup instructions.`,requiredAccess:["agent"],inputSchema:ye(c,"kendo-react-app")},async({projectName:o,createNewProject:s,theme:i},{_meta:r})=>{try{await e.recordToolUserRequest({toolName:Xe,meta:{projectName:o,createNewProject:s,theme:i,_meta:r}})}catch(d){console.error("Error recording tool request:",d)}return{content:[{type:"text",text:We(o,s,i)}]}}),m.Tools.createAccessibilityAssistant({name:Ze,title:"KendoReact Accessibility Assistant",description:m.ToolDescriptions.accessibilityAssistant(c),libKey:T,suiteName:c,components:O,componentAliases:{Grid:"DataGrid"},requiredAccess:["agent"]},e)].filter(o=>o.hasAccess(t))}var Mt=$t(import.meta.url),Bt=ot.dirname(Mt),qt=ot.resolve(Bt,"../package.json"),nt=JSON.parse(_t.readFileSync(qt,"utf-8")),tt=new Lt({name:"kendo-mcp",title:"Kendo MCP Server",version:nt.version});async function Ft(){let e=new Ut;h("Starting server... ");let t=await he(async()=>{let o=(await be())?.entitlement;return o?.Product?.Code||o?.product?.code});t!=="none"&&(G.toolNameHeader=t==="agent"||t==="full"?"agent":"assistant",et(G,t).forEach(o=>o.register(tt)),fe({serverName:"react",contextApi:G,additionalFields:{version:nt.version,access_type:t}})),await tt.connect(e)}Ft();
1653
+ `),editor:at,chart:st},M=!!process.env.PLUGIN_MODE,rt=A.ToolNames.layoutAssistant(D),le=A.ToolNames.codeAssistant(D),it=A.ToolNames.styleAssistant(D),ce=A.ToolNames.iconAssistant(D),lt=A.ToolNames.gettingStartedAssistant(D),ct=A.ToolNames.accessibilityAssistant(D);function dt(e,t){return[...M?[]:[A.Tools.createOrchestrator({name:A.ToolNames.orchestrator(D),title:"KendoReact Generator",description:A.ToolDescriptions.orchestrator(u),layoutAssistantName:rt,codeAssistantName:le,styleAssistantName:it,iconAssistantName:ce,accessibilityAssistantName:ct,suiteName:u,libKey:N,components:_,requiredAccess:["agent"]},{validationSteps:A.Validation.React.steps},e),A.Tools.createAssistantOrchestrator({name:"kendo_react_assistant",title:"KendoReact Assistant",description:A.ToolDescriptions.assistantOrchestrator(u),codeAssistantName:le,iconAssistantName:ce,suiteName:u,libKey:N,components:_,requiredAccess:["assistant"]},e)],A.Tools.createLayoutAssistant({name:rt,title:"KendoReact Layout Assistant",description:A.ToolDescriptions.layoutAssistant,suiteName:u,libKey:N,getPreContent:M?void 0:Je,requiredAccess:["agent"]},e),A.Tools.createStyleAssistant({name:it,title:"KendoReact Style Assistant",description:A.ToolDescriptions.styleAssistant,libKey:N,getPreContent:M?void 0:Ze,requiredAccess:["agent"]},e),A.Tools.createIconSearch({name:ce,title:"KendoReact Icon Assistant",description:A.ToolDescriptions.iconAssistant,libKey:N,getPostContent:M?void 0:tt,requiredAccess:["assistant","agent"]},e),A.Tools.createCodeAssistant({name:le,title:"KendoReact Component Assistant",description:A.ToolDescriptions.codeAssistant(u),libKey:N,suiteName:u,components:_,componentAliases:{Grid:"DataGrid"},getPostContent:M?void 0:({component:o})=>{let s=o?.trim().toLowerCase(),i=Bt[s];return ot({component:o,componentInstructions:i})},requiredAccess:["assistant","agent"]},e),...M?[]:[(()=>{let o=new k(lt,{title:"KendoReact Getting Started",description:`Creates a new React project with Kendo CLI and provides essential getting started guidance for ${u} including installation, configuration, and setup instructions.`,requiredAccess:["agent"],inputSchema:we(u,"kendo-react-app")},async({projectName:s,createNewProject:i,theme:a},{_meta:r})=>{let d=T(o,r);try{await e.recordToolUserRequest({toolName:lt,meta:{projectName:s,createNewProject:i,theme:a,...d}})}catch(g){console.error("Error recording tool request:",g)}return{content:[{type:"text",text:nt(s,i,a)}]}});return o})()],A.Tools.createAccessibilityAssistant({name:ct,title:"KendoReact Accessibility Assistant",description:A.ToolDescriptions.accessibilityAssistant(u),libKey:N,suiteName:u,components:_,componentAliases:{Grid:"DataGrid"},requiredAccess:["agent"]},e)].filter(o=>o.hasAccess(t))}var Wt=Ht(import.meta.url),zt=ut.dirname(Wt),Yt=ut.resolve(zt,"../package.json"),mt=JSON.parse(Vt.readFileSync(Yt,"utf-8")),pt=new Kt({name:"kendo-mcp",title:"Kendo MCP Server",version:mt.version});async function Qt(){let e=new jt;C("Starting server... ");let t=await Ae(async()=>{let o=(await Se())?.entitlement;return o?.Product?.Code||o?.product?.code});t!=="none"&&(F.toolNameHeader=t==="agent"||t==="full"?"agent":"assistant",dt(F,t).forEach(o=>o.register(pt)),ve({serverName:"react",contextApi:F,enrichWithUserData:!0,additionalFields:{version:mt.version,access_type:t}})),await pt.connect(e)}Qt();