@progress/kendo-react-mcp 1.8.1 → 1.9.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (2) hide show
  1. package/dist/index.js +3 -3
  2. package/package.json +3 -3
package/dist/index.js CHANGED
@@ -2,7 +2,7 @@
2
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
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 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
5
+ License Error: ${o}`);let r=new $.Metadata;if(a)try{r.add("x-license-key",n)}catch(d){throw C("Error adding license key to metadata:",d),new Error(`Failed to use license key: ${d.message}`)}return i&&r.add("x-api-key",s),this.options?.libName&&r.add("x-library-name",this.options.libName),r.add("x-tool-name",this.toolNameHeader),r.add("x-request-metadata",this.buildRequestMetadata(t)),r}async query(t,n){let o=await this.getMetadata({meta:n});return new Promise((s,i)=>{this.client.query(t,o,(a,r)=>{a?i(new Error(a)):s(r)})})}async getApiRefMatches(t,n){let o=await this.getMetadata({meta:n});return new Promise((s,i)=>{this.client.getApiRefMatches(t,o,(a,r)=>{a?i(new Error(a)):s(r)})})}async queryCssUtils(t,n){let o=await this.getMetadata({meta:n});return new Promise((s,i)=>{this.client.cssUtilsSearch(t,o,(a,r)=>{a?(C("Error querying CSS Utils:",a),i(new Error(a))):s(r)})})}async queryIconsSearch(t,n){let o=await this.getMetadata({meta:n});return new Promise((s,i)=>{this.client.iconsSearch(t,o,(a,r)=>{a?(C("Error querying Icons Search:",a),i(new Error(a))):s(r)})})}async queryBuildingBlocks(t,n){let o=await this.getMetadata({meta:n});return new Promise((s,i)=>{this.client.buildingBlocksSearch(t,o,(a,r)=>{a?(C("Error querying Building Blocks:",a),i(new Error(a))):s(r)})})}async validateUserLicense(){let t=await this.getMetadata();return new Promise((n,o)=>{this.client.validateUserLicense({},t,(s,i)=>{s?(C("Error validating user license:",s),o(new Error(s))):n(i)})})}async queryThemeGenerate(t,n){let o=await this.getMetadata({meta:n});return new Promise((s,i)=>{this.client.generateTheme(t,o,(a,r)=>{a?(C("Error querying context API/GenerateTheme:",a),i(new Error(a))):s(r)})})}async recordOrchestratorUserRequest({meta:t}){let n=await this.getMetadata({meta:t});return new Promise((o,s)=>{this.client.recordOrchestratorUserRequest({},n,(i,a)=>{i?(C("Error recording orchestrator user request:",i),s(new Error(i))):o(a)})})}async recordToolUserRequest({toolName:t,meta:n}){let o=await this.getMetadata({meta:n});return new Promise((s,i)=>{this.client.recordToolUserRequest({tool_name:t},o,(a,r)=>{a?(C("Error recording tool user request:",a),i(new Error(a))):s(r)})})}async logEvent(t,n,o={}){let s="h8utJ6rk4PpIWX4JMn9beQDsjVUri6KV0XYfiVwq",{enrichWithUserData:i=!1,meta:a={}}=o,r=s&&typeof s=="string",d=null;if(i)try{let[g]=this.isDev?["fake_license",null]:await z();g&&typeof g=="string"&&(d=g)}catch{}if(!r&&!d){C("Neither LOGGING_API_KEY nor license key available, skipping log event");return}let p=new $.Metadata;return r&&p.add("x-api-key",s),d&&(p.add("x-license-key",d),p.add("x-request-metadata",this.buildRequestMetadata(a)),this.options?.libName&&p.add("x-library-name",this.options.libName)),new Promise((g,b)=>{this.client.logEvent({event_name:t,fields:n||{}},p,(l,m)=>{l?(C("Error logging event:",l),b(new Error(l))):g()})})}};import{z as Q}from"zod";var mo=Q.object({user_id:Q.string(),user_email:Q.string().email()});import{z as w}from"zod";var wt=w.object({Product:w.object({Id:w.number().int(),Code:w.string(),Name:w.string()}),License:w.nullable(w.object({Id:w.number().int(),Name:w.string(),Type:w.string(),Active:w.boolean()})),Availability:w.array(w.object({LicenseStart:w.nullable(w.string().datetime()),LicenseEnd:w.nullable(w.string().datetime())})),IsLicenseAvailable:w.optional(w.boolean())}),fo=w.array(wt);function T(e,t){let n=e.server?.server.getClientVersion?.(),o=t||{};return n&&(o.clientInfo={name:n.name,version:n.version}),o}async function Ae(e){let t=process.env.KENDO_MCP_ACCESS;if(t==="true"||t==="1"||t==="full")return"full";if(typeof t=="string"&&(t.toLowerCase()==="agent"||t.toLowerCase()==="assistant"))return t.toLowerCase();let n=await e();return n?.toLocaleLowerCase()==="agentic_ui_generator"?"agent":n?.toLocaleLowerCase()==="ai_coding_assistants"?"assistant":"none"}function Ce(){return'**Accessibility Guidelines: WCAG 2.2 Level AA Compliance**\n\n**Core Principles:**\n1. Use semantic HTML and ARIA correctly\n2. Ensure WCAG 2.2 AA compliance\n3. Follow W3C ARIA Authoring Practices\n4. Provide standards-based accessibility fixes\n\n**1. Form Control Labels** (WCAG 1.3.1, 3.3.2, 4.1.2)\nEvery input must have an associated label.\nCORRECT: `<input type="search" aria-label="Search products" placeholder="Search...">`\nCORRECT: `<label for="qty">Quantity</label><input type="number" id="qty">`\nWRONG: `<span>Email</span><input type="email">` (no association)\nWRONG: `<input type="email" placeholder="Email">` (placeholder as label)\n\n**2. Button Accessibility** (WCAG 4.1.2, 2.4.6, 2.5.3)\nAll buttons need accessible names describing their purpose.\nCORRECT: `<button type="button">Save Changes</button>`\nCORRECT: `<button aria-label="Close dialog"><svg aria-hidden="true" focusable="false">...</svg></button>`\nWRONG: `<button><svg>...</svg></button>` (no accessible name)\nWRONG: `<button>Click here</button>` (generic text)\n\n**3. Popup/Menu Triggers** (WCAG 4.1.2, 1.3.1)\nIndicate popup purpose and state using aria-haspopup, aria-expanded, aria-controls.\nCORRECT: `<button aria-expanded="false" aria-haspopup="menu" aria-controls="menu-id">Settings</button>`\n\n**4. Image Accessibility** (WCAG 1.1.1)\nInformative: `<img src="chart.png" alt="Sales increased 25% in Q4 2024">`\nFunctional: `<a href="/home"><img src="logo.png" alt="Company Name Home"></a>`\nDecorative: `<img src="border.png" alt="" role="presentation">`\nComplex: `<img src="chart.png" alt="Sales data" aria-describedby="desc-id">`\nWRONG: Missing alt, filename as alt, generic alt for decorative images\n\n**5. Link Accessibility** (WCAG 2.4.4, 2.4.6)\nLinks must be descriptive and understandable out of context.\nCORRECT: `<a href="/products">View All Products</a>`\nCORRECT: `<a href="/article" aria-label="Read more about New Product Launch">Read more</a>`\nWRONG: "Click here", "Read more", "Learn more" without context\n\n**6. Form Validation** (WCAG 3.3.1, 3.3.2, 3.3.3)\nErrors must be identified, associated with inputs, and provide suggestions. Use aria-describedby, aria-invalid="true", and role="alert".\n\n**7. Heading Structure** (WCAG 1.3.1, 2.4.6)\nEach page must have an `<h1>` that describes its content. Use hierarchical, descriptive headings with no skipped levels (h1\u2192h2\u2192h3).\nCORRECT: `<h1>Dashboard</h1> <h2>Sales</h2> <h3>By Region</h3>`\nWRONG: No `<h1>` on the page, or skipping levels (h1\u2192h3)\nIf a heading should look smaller than its semantic level, use CSS: `<h2 class="text-sm">Subtitle</h2>`\n\n**8. Page Component Landmark Rules** (WCAG 1.3.1, 4.1.2)\nPage components (route components) may be rendered inside a layout that already provides `<main>`, `<header>`, or `<footer>`. Since the layout configuration is unknown, avoid using these landmarks in page components to prevent potential duplication and nesting violations. Use `<div>`, `<section>`, or `<article>` as the top-level wrapper instead.\n- Avoid adding `<main>`, `role="main"`, `<header>`, or `<footer>` in page components \u2014 the layout typically provides them. Duplicating them can cause `landmark-no-duplicate-main` and `landmark-main-is-top-level` violations.\n- Avoid adding `role="banner"` or using a semantic `<header>` element in page components \u2014 the layout\'s `<header>` already claims the banner landmark. Adding another causes `landmark-banner-is-top-level` violations.\n- Avoid adding `role="contentinfo"` to elements inside page components \u2014 the contentinfo landmark should be a top-level landmark, not nested inside `<main>` or other landmarks. Nesting it can cause `landmark-contentinfo-is-top-level` violations.\n- When multiple `<section>` or `<nav>` elements exist on a page, give each a unique `aria-label` to avoid `landmark-unique` violations.\n\n**9. ARIA Role and Attribute Restrictions** (WCAG 4.1.2)\nOnly use ARIA roles that are valid for the given HTML element. Avoid adding `aria-label` or `aria-labelledby` to elements that do not permit naming.\n- `<article>` has an implicit `article` role. Do NOT override it with `role="listitem"`, `role="button"`, `role="link"`, or any other role \u2014 none are allowed on `<article>`. Use `<li>` for list items, `<button>` for interactive cards, or `<a>` for clickable cards instead.\n- `<button>` already has an implicit `button` role. Do NOT add `role="listitem"` or other incompatible roles.\n- `<span>` and `<div>` without roles are generic elements. Do NOT add `aria-label` to them \u2014 it is a prohibited attribute on elements with no accessible role and can cause `aria-prohibited-attr` violations. Instead, use `role="img"` + `aria-label` for visual indicators, or use visually hidden text.\n- Do NOT add `aria-label` to non-interactive `<div>` wrappers \u2014 it has no effect and triggers violations.\n- `aria-pressed` is only valid on elements with `role="button"`, `role="checkbox"`, `role="menuitemcheckbox"`, `role="option"`, `role="radio"`, or `role="switch"`. Do NOT use `aria-pressed` on elements with `role="listitem"` or other roles.\nCORRECT: `<ul role="list"><li class="product-card">...</li></ul>` (listitem inside list)\nCORRECT: `<span role="img" aria-label="Status: pending" class="status-dot"></span>` (role added before aria-label)\nCORRECT: `<span class="status-dot" aria-hidden="true"></span><span class="visually-hidden">Pending</span>` (hidden text alternative)\nWRONG: `<article role="listitem">` (listitem not allowed on article)\nWRONG: `<article role="button">` (button not allowed on article \u2014 use `<button>` or `<div role="button">`)\nWRONG: `<span aria-label="pending" class="status-dot"></span>` (aria-label prohibited on generic span)\nWRONG: `<div aria-label="Product badges" class="badges"></div>` (aria-label prohibited on generic div)\n\n**Quick Checklist:**\n- **Forms:** Associated labels, aria-required on required fields, autocomplete attributes, aria-describedby for errors, aria-invalid for invalid fields, fieldsets with legends\n- **Buttons/Links:** Accessible names, aria-label for icon buttons, aria-hidden on decorative icons, descriptive link text\n- **Popups/Dialogs:** aria-haspopup, aria-expanded, aria-controls, role="dialog", aria-modal="true", aria-labelledby, focus trap, Escape to close\n- **Images:** alt on all images, descriptive alt for informative, empty alt for decorative, aria-describedby for complex\n- **Structure:** One h1, logical heading hierarchy, avoid `<main>`, `<header>`, `<footer>`, `role="main"`, `role="contentinfo"`, `role="banner"` in page/route components (the layout may already provide them), use `<section>` or `<div>` as page-level wrappers, unique aria-labels on duplicate landmark types\n- **ARIA Rules:** Avoid adding `aria-label` to generic `<span>`/`<div>` without a role, avoid using `role="listitem"` or `role="button"` on `<article>` \u2014 use `<li>` for list items, add `role="img"` before `aria-label` on visual indicators, `aria-pressed` only on button-like roles\n- **Scrollable Regions:** Any scrollable container must have `tabindex="0"` or contain keyboard-interactive children\n- **Nested Interactive:** Do not add interactive role/tabindex to a container that already has focusable children\n- **List Roles:** `role="list"` containers must have `role="listitem"` children \u2014 prefer `<ul>/<li>` natively\n- **Dynamic Content:** role="status"/aria-live="polite" for updates, role="alert"/aria-live="assertive" for critical alerts\n- **Keyboard/Focus:** All interactive elements keyboard accessible, logical focus order, visible focus indicators, no keyboard traps (except modals)\n- **Color/Contrast:** 4.5:1 text contrast (3:1 large text), 3:1 UI component contrast, no color-only information, 3:1 focus indicator contrast'}var St=1440*60*1e3;function ve(e){let{serverName:t,contextApi:n,additionalFields:o={},intervalMs:s=St,enrichWithUserData:i=!1}=e,a="mcp_server_heartbeat",r=async()=>{try{let p={server_name:t,timestamp:new Date().toISOString(),...o};await n.logEvent(a,p,{enrichWithUserData:i})}catch(p){C(`Failed to send heartbeat for ${t}:`,p)}};r();let d=setInterval(r,s);return()=>{clearInterval(d),C(`Heartbeat stopped for ${t}`)}}import{z as X}from"zod";var kt=["meridian","default","bootstrap","material","fluent"];function we(e,t){return{projectName:X.string().default(t).describe("The name of the project. Used as the project folder name when creating a new project."),createNewProject:X.boolean().default(!0).describe(`Whether to create a new project before configuring ${e}. Set to true to scaffold a brand-new project, or false if the project already exists and you only want to add ${e} to it.`),theme:X.enum(kt).default("meridian").describe("The Kendo UI theme to use. Determines which theme package is installed and imported. Available themes: meridian (default), default, bootstrap, material, fluent.")}}var u="Kendo UI for React",N="react",D="kendo";var _=["ActionSheet","AIPrompt","Animation","AppBar","ArcGauge","AutoComplete","Avatar","Badge","Barcode","BottomNavigation","Breadcrumb","Button","ButtonGroup","BreadCrumb","Calendar","Card","Chart","ChartWizard","Chat","Checkbox","Chip","ChipList","ChunkProgressBar","CircularGauge","ColorGradient","ColorPalette","ColorPicker","ComboBox","ContextMenu","ConversationalUI","DataGrid","Grid","DataQuery","DateMath","DateInput","DatePicker","DateRangePicker","DateTimePicker","Dialog","Drag&Drop","Drawer","Drawing","DropDownButton","DropDownList","DropDownTree","Editor","Error","ExcelExport","ExpansionPanel","ExternalDropZone","FileSaver","FileManager","Filter","FlatColorPicker","FloatingActionButton","FloatingLabel","Form","Gantt","Gauge","General","GridLayout","Hint","Icon","InlineAIPrompt","Input","Label","LinearGauge","ListBox","ListView","Loader","Map","MaskedTextBox","Menu","MultiColumnComboBox","MultiSelect","MultiSelectTree","MultiViewCalendar","Notification","NumericTextBox","OrgChart","PageTemplates/BuildingBlocks","Pager","PanelBar","PDFProcessing","PDFViewer","PivotGrid","Popover","Popup","ProgressBar","PromptBox","QRCode","RadialGauge","RadioButton","RadioGroup","RangeSlider","Rating","Ripple","Sankey","Scheduler","ScrollView","Signature","Skeleton","Slider","Sortable","Sparkline","SpeechToTextButton","SmartPasteButton","SplitButton","Splitter","Spreadsheet","StackLayout","Stepper","StockChart","SVGIcon","Switch","TabStrip","TaskBoard","TextArea","TextBox","TileLayout","Timeline","TimePicker","Toolbar","Tooltip","TreeList","TreeView","Typography","Upload","VSCodeExtension","Window"];var Nt=xt(Tt(It(import.meta.url)),"../proto/service.proto"),F=new H("contextapi.telerik.com:443",Nt,{libName:N});var Se=async()=>F.validateUserLicense();import Vt from"fs";import ut from"path";import{fileURLToPath as Ht}from"url";import{z as v}from"zod";var k=class{constructor(t,n,o){this.name=t;this.config=n;this.cb=o}register(t){this.server=t,this.server.registerTool(this.name,this.config,this.cb)}hasAccess(t){return!this.config.requiredAccess||this.config.requiredAccess.length===0?!0:t==="full"||this.config.requiredAccess.includes(t)}};var q=(e,t)=>`# ${e.suiteName} - Code Validation & Quality Assurance
6
6
 
7
7
  ## Comprehensive Code Validation Checklist
8
8
  Execute these validation steps systematically to ensure high-quality, maintainable code:
@@ -747,7 +747,7 @@ Accessibility
747
747
  - Look for @import statements containing "@progress/kendo-theme-" to determine existing theme/utils usage
748
748
  - Read the application's main html file (e.g., index.html)
749
749
  - Look for link tags containing "@progress/kendo-theme-" referencing Kendo theme/util CSS files
750
- - Note which theme is found (default, material, bootstrap, or fluent)
750
+ - Note which theme is found (meridian, default, material, bootstrap, or fluent)
751
751
  - Note whether the kendo-theme-utils package is already used
752
752
  - Note the mechanism used to include the theme (angular.json or styles file)
753
753
 
@@ -1185,7 +1185,7 @@ Before emitting code, internally verify ALL of the following. If ANY fails, fix
1185
1185
  ## Component-Specific Guidelines
1186
1186
 
1187
1187
  ${e.componentInstructions}
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
1188
+ `),t};var Ft={meridian:"@progress/kendo-theme-meridian",default:"@progress/kendo-theme-default",bootstrap:"@progress/kendo-theme-bootstrap",material:"@progress/kendo-theme-material",fluent:"@progress/kendo-theme-fluent"},qt={meridian:"Meridian",default:"Default",bootstrap:"Bootstrap",material:"Material Design",fluent:"Fluent UI"};function nt(e="kendo-react-app",t=!0,n="meridian"){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
1189
1189
 
1190
1190
  First, ensure the Kendo CLI tool is installed globally:
1191
1191
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@progress/kendo-react-mcp",
3
- "version": "1.8.1",
3
+ "version": "1.9.0",
4
4
  "type": "module",
5
5
  "bin": "./dist/index.js",
6
6
  "license": "See LICENSE.md",
@@ -24,10 +24,10 @@
24
24
  "!**/*.tsbuildinfo"
25
25
  ],
26
26
  "dependencies": {
27
- "@grpc/grpc-js": "^1.14.3",
27
+ "@grpc/grpc-js": "^1.14.4",
28
28
  "@grpc/proto-loader": "^0.8.1",
29
29
  "@modelcontextprotocol/sdk": "^1.29.0",
30
- "@progress/kendo-licensing": "^1.11.1",
30
+ "@progress/kendo-licensing": "^1.11.2",
31
31
  "tslib": "^2.3.0"
32
32
  },
33
33
  "devDependencies": {