@progress/kendo-angular-mcp 1.6.0 → 1.7.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/index.js +112 -76
- package/package.json +2 -2
package/dist/index.js
CHANGED
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
#!/usr/bin/env node
|
|
2
|
-
import{McpServer as
|
|
3
|
-
`,n=
|
|
2
|
+
import{McpServer as qt}from"@modelcontextprotocol/sdk/server/mcp.js";import{StdioServerTransport as Ft}from"@modelcontextprotocol/sdk/server/stdio.js";import{dirname as Ct,join as St}from"path";import{fileURLToPath as xt}from"url";import{loadLicense as ut,decodeLicenseKey as mt,decodeLicenseEvidence as gt}from"@progress/kendo-licensing/utils";var K=class extends Error{constructor(t){super(t),this.name="LicenseError"}};function se(e){return e.replace(/^\uFEFF/,"")}async function W(e){let t=null,s=null;try{let o=ut();if(!o.success){let n=new K(o.message);throw e&&await e("license_load_failed",{error:o.message}).catch(()=>{}),n}try{t=(await mt(o.value)).licenses.find(async r=>!!(await gt(r)).userId)}catch(n){console.log(n.message),e&&await e("license_load_failed",{error:n.message||"Unknown decoding error"}).catch(()=>{})}if(!t)return[se(o.value),null]}catch(o){return s=o.message||"Unknown error loading license.",e&&await e("license_load_failed",{error:s}).catch(()=>{}),[null,s]}return[se(t),null]}import G from"node:fs";import q from"node:path";var V=!1,P=process.env.DEBUG_LOG_FILE,ae=!!(P&&typeof P=="string");if(ae){let e=q.resolve(P),t=q.dirname(e);if(t!=="."&&t!==process.cwd()&&!G.existsSync(t))try{G.mkdirSync(t,{recursive:!0})}catch(s){console.error("Error creating log directory:",s)}if(!G.existsSync(e))try{G.writeFileSync(e,"")}catch(s){console.error("Error creating log file:",s)}}else V=!1;V=ae&&!!P&&G.existsSync(q.resolve(P));function b(...e){if(V&&P){let o=`${new Date().toISOString()}: ${e.join(" ")}
|
|
3
|
+
`,n=q.resolve(P);G.appendFile(n,o,r=>{r&&console.error("Error writing to log file:",r)})}}import ht from"@grpc/proto-loader";import U from"@grpc/grpc-js";import le from"path";import re from"fs";import{fileURLToPath as ft}from"url";var yt=ft(import.meta.url),bt=le.dirname(yt),ce={version:"unknown"},ie=le.resolve(bt,"../package.json");re.existsSync(ie)&&(ce=JSON.parse(re.readFileSync(ie,"utf-8")));function vt(e){return e.replace(/\u2014/g,"--").replace(/\u2013/g,"-").replace(/[^\x20-\x7E]/g,"")}var F=class{constructor(t,s,o){this.contextApiUrl=t;this.protoPath=s;this.options=o;this.toolNameHeader="assistant";let n=ht.loadSync(this.protoPath,{keepCase:!0,longs:String,enums:String,defaults:!0,oneofs:!0});this.isDev=this.contextApiUrl?.includes("localhost")||this.contextApiUrl?.includes("127.0.0.1"),b("Using ContextApi URl:",this.contextApiUrl);let r=U.loadPackageDefinition(n);this.client=new r.ContextQueryService(this.contextApiUrl||"contextapi.telerik.com:443",this.isDev?U.credentials.createInsecure():U.credentials.createSsl())}buildRequestMetadata(t={}){return vt(JSON.stringify({...t,source:"npm",version:ce.version,os:process.platform,node_version:process.version}))}async getMetadata({meta:t}={meta:{}}){let[s,o]=this.isDev?["fake_license",null]:await W((d,p)=>this.logEvent(d,p)),n=process.env.CONTEXTAPI_API_KEY,r=n&&typeof n=="string",a=s&&typeof s=="string";if(!a&&!r&&o)throw new Error(`Failed to authenticate with API key or License key!
|
|
4
4
|
|
|
5
|
-
License Error: ${o}`);let i=new D.Metadata;if(a)try{i.add("x-license-key",s)}catch(g){throw m("Error adding license key to metadata:",g),new Error(`Failed to use license key: ${g.message}`)}r&&i.add("x-api-key",n),this.options?.libName&&i.add("x-library-name",this.options.libName),i.add("x-tool-name",this.toolNameHeader);let d=JSON.stringify({...t,source:"npm",version:le.version,os:process.platform,node_version:process.version});return i.add("x-request-metadata",ht(d)),i}async query(t,s){let o=await this.getMetadata({meta:s});return new Promise((n,r)=>{this.client.query(t,o,(a,i)=>{a?r(new Error(a)):n(i)})})}async getApiRefMatches(t,s){let o=await this.getMetadata({meta:s});return new Promise((n,r)=>{this.client.getApiRefMatches(t,o,(a,i)=>{a?r(new Error(a)):n(i)})})}async queryCssUtils(t,s){let o=await this.getMetadata({meta:s});return new Promise((n,r)=>{this.client.cssUtilsSearch(t,o,(a,i)=>{a?(m("Error querying CSS Utils:",a),r(new Error(a))):n(i)})})}async queryIconsSearch(t,s){let o=await this.getMetadata({meta:s});return new Promise((n,r)=>{this.client.iconsSearch(t,o,(a,i)=>{a?(m("Error querying Icons Search:",a),r(new Error(a))):n(i)})})}async queryBuildingBlocks(t,s){let o=await this.getMetadata({meta:s});return new Promise((n,r)=>{this.client.buildingBlocksSearch(t,o,(a,i)=>{a?(m("Error querying Building Blocks:",a),r(new Error(a))):n(i)})})}async validateUserLicense(){let t=await this.getMetadata();return new Promise((s,o)=>{this.client.validateUserLicense(null,t,(n,r)=>{n?(m("Error validating user license:",n),o(new Error(n))):s(r)})})}async queryThemeGenerate(t,s){let o=await this.getMetadata({meta:s});return new Promise((n,r)=>{this.client.generateTheme(t,o,(a,i)=>{a?(m("Error querying context API/GenerateTheme:",a),r(new Error(a))):n(i)})})}async recordOrchestratorUserRequest({meta:t}){let s=await this.getMetadata({meta:t});return new Promise((o,n)=>{this.client.recordOrchestratorUserRequest(null,s,(r,a)=>{r?(m("Error recording orchestrator user request:",r),n(new Error(r))):o(a)})})}async recordToolUserRequest({toolName:t,meta:s}){let o=await this.getMetadata({meta:s});return new Promise((n,r)=>{this.client.recordToolUserRequest({tool_name:t},o,(a,i)=>{a?(m("Error recording tool user request:",a),r(new Error(a))):n(i)})})}async logEvent(t,s){let o="h8utJ6rk4PpIWX4JMn9beQDsjVUri6KV0XYfiVwq";if(!o||typeof o!="string"){m("LOGGING_API_KEY not configured, skipping log event");return}let n=new D.Metadata;return n.add("x-api-key",o),new Promise((r,a)=>{this.client.logEvent({event_name:t,fields:s||{}},n,(i,d)=>{i?(m("Error logging event:",i),a(new Error(i))):r()})})}};import{z as q}from"zod";var io=q.object({user_id:q.string(),user_email:q.string().email()});import{z as k}from"zod";var ft=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())}),po=k.array(ft);async function ce(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 s=await e();return s.toLocaleLowerCase()==="agentic_ui_generator"?"agent":s.toLocaleLowerCase()==="ai_coding_assistants"?"assistant":"none"}function de(){return'**Accessibility Guidelines: WCAG 2.2 Level AA Compliance**\n\n**Core Principles:**\n1. Use semantic HTML and ARIA correctly\n2. Ensure WCAG 2.2 AA compliance\n3. Follow W3C ARIA Authoring Practices\n4. Provide standards-based accessibility fixes\n\n**1. Form Control Labels** (WCAG 1.3.1, 3.3.2, 4.1.2)\nEvery input must have an associated label.\nCORRECT: `<input type="search" aria-label="Search products" placeholder="Search...">`\nCORRECT: `<label for="qty">Quantity</label><input type="number" id="qty">`\nWRONG: `<span>Email</span><input type="email">` (no association)\nWRONG: `<input type="email" placeholder="Email">` (placeholder as label)\n\n**2. Button Accessibility** (WCAG 4.1.2, 2.4.6, 2.5.3)\nAll buttons need accessible names describing their purpose.\nCORRECT: `<button type="button">Save Changes</button>`\nCORRECT: `<button aria-label="Close dialog"><svg aria-hidden="true" focusable="false">...</svg></button>`\nWRONG: `<button><svg>...</svg></button>` (no accessible name)\nWRONG: `<button>Click here</button>` (generic text)\n\n**3. Popup/Menu Triggers** (WCAG 4.1.2, 1.3.1)\nIndicate popup purpose and state using aria-haspopup, aria-expanded, aria-controls.\nCORRECT: `<button aria-expanded="false" aria-haspopup="menu" aria-controls="menu-id">Settings</button>`\n\n**4. Image Accessibility** (WCAG 1.1.1)\nInformative: `<img src="chart.png" alt="Sales increased 25% in Q4 2024">`\nFunctional: `<a href="/home"><img src="logo.png" alt="Company Name Home"></a>`\nDecorative: `<img src="border.png" alt="" role="presentation">`\nComplex: `<img src="chart.png" alt="Sales data" aria-describedby="desc-id">`\nWRONG: Missing alt, filename as alt, generic alt for decorative images\n\n**5. Link Accessibility** (WCAG 2.4.4, 2.4.6)\nLinks must be descriptive and understandable out of context.\nCORRECT: `<a href="/products">View All Products</a>`\nCORRECT: `<a href="/article" aria-label="Read more about New Product Launch">Read more</a>`\nWRONG: "Click here", "Read more", "Learn more" without context\n\n**6. Form Validation** (WCAG 3.3.1, 3.3.2, 3.3.3)\nErrors must be identified, associated with inputs, and provide suggestions. Use aria-describedby, aria-invalid="true", and role="alert".\n\n**7. Heading Structure** (WCAG 1.3.1, 2.4.6)\nEach page must have an `<h1>` that describes its content. Use hierarchical, descriptive headings with no skipped levels (h1\u2192h2\u2192h3).\nCORRECT: `<h1>Dashboard</h1> <h2>Sales</h2> <h3>By Region</h3>`\nWRONG: No `<h1>` on the page, or skipping levels (h1\u2192h3)\nIf a heading should look smaller than its semantic level, use CSS: `<h2 class="text-sm">Subtitle</h2>`\n\n**8. Page Component Landmark Rules** (WCAG 1.3.1, 4.1.2)\nPage components (route components) may be rendered inside a layout that already provides `<main>`, `<header>`, or `<footer>`. Since the layout configuration is unknown, avoid using these landmarks in page components to prevent potential duplication and nesting violations. Use `<div>`, `<section>`, or `<article>` as the top-level wrapper instead.\n- Avoid adding `<main>`, `role="main"`, `<header>`, or `<footer>` in page components \u2014 the layout typically provides them. Duplicating them can cause `landmark-no-duplicate-main` and `landmark-main-is-top-level` violations.\n- Avoid adding `role="banner"` or using a semantic `<header>` element in page components \u2014 the layout\'s `<header>` already claims the banner landmark. Adding another causes `landmark-banner-is-top-level` violations.\n- Avoid adding `role="contentinfo"` to elements inside page components \u2014 the contentinfo landmark should be a top-level landmark, not nested inside `<main>` or other landmarks. Nesting it can cause `landmark-contentinfo-is-top-level` violations.\n- When multiple `<section>` or `<nav>` elements exist on a page, give each a unique `aria-label` to avoid `landmark-unique` violations.\n\n**9. ARIA Role and Attribute Restrictions** (WCAG 4.1.2)\nOnly use ARIA roles that are valid for the given HTML element. Avoid adding `aria-label` or `aria-labelledby` to elements that do not permit naming.\n- `<article>` has an implicit `article` role. Do NOT override it with `role="listitem"`, `role="button"`, `role="link"`, or any other role \u2014 none are allowed on `<article>`. Use `<li>` for list items, `<button>` for interactive cards, or `<a>` for clickable cards instead.\n- `<button>` already has an implicit `button` role. Do NOT add `role="listitem"` or other incompatible roles.\n- `<span>` and `<div>` without roles are generic elements. Do NOT add `aria-label` to them \u2014 it is a prohibited attribute on elements with no accessible role and can cause `aria-prohibited-attr` violations. Instead, use `role="img"` + `aria-label` for visual indicators, or use visually hidden text.\n- Do NOT add `aria-label` to non-interactive `<div>` wrappers \u2014 it has no effect and triggers violations.\n- `aria-pressed` is only valid on elements with `role="button"`, `role="checkbox"`, `role="menuitemcheckbox"`, `role="option"`, `role="radio"`, or `role="switch"`. Do NOT use `aria-pressed` on elements with `role="listitem"` or other roles.\nCORRECT: `<ul role="list"><li class="product-card">...</li></ul>` (listitem inside list)\nCORRECT: `<span role="img" aria-label="Status: pending" class="status-dot"></span>` (role added before aria-label)\nCORRECT: `<span class="status-dot" aria-hidden="true"></span><span class="visually-hidden">Pending</span>` (hidden text alternative)\nWRONG: `<article role="listitem">` (listitem not allowed on article)\nWRONG: `<article role="button">` (button not allowed on article \u2014 use `<button>` or `<div role="button">`)\nWRONG: `<span aria-label="pending" class="status-dot"></span>` (aria-label prohibited on generic span)\nWRONG: `<div aria-label="Product badges" class="badges"></div>` (aria-label prohibited on generic div)\n\n**Quick Checklist:**\n- **Forms:** Associated labels, aria-required on required fields, autocomplete attributes, aria-describedby for errors, aria-invalid for invalid fields, fieldsets with legends\n- **Buttons/Links:** Accessible names, aria-label for icon buttons, aria-hidden on decorative icons, descriptive link text\n- **Popups/Dialogs:** aria-haspopup, aria-expanded, aria-controls, role="dialog", aria-modal="true", aria-labelledby, focus trap, Escape to close\n- **Images:** alt on all images, descriptive alt for informative, empty alt for decorative, aria-describedby for complex\n- **Structure:** One h1, logical heading hierarchy, avoid `<main>`, `<header>`, `<footer>`, `role="main"`, `role="contentinfo"`, `role="banner"` in page/route components (the layout may already provide them), use `<section>` or `<div>` as page-level wrappers, unique aria-labels on duplicate landmark types\n- **ARIA Rules:** Avoid adding `aria-label` to generic `<span>`/`<div>` without a role, avoid using `role="listitem"` or `role="button"` on `<article>` \u2014 use `<li>` for list items, add `role="img"` before `aria-label` on visual indicators, `aria-pressed` only on button-like roles\n- **Scrollable Regions:** Any scrollable container must have `tabindex="0"` or contain keyboard-interactive children\n- **Nested Interactive:** Do not add interactive role/tabindex to a container that already has focusable children\n- **List Roles:** `role="list"` containers must have `role="listitem"` children \u2014 prefer `<ul>/<li>` natively\n- **Dynamic Content:** role="status"/aria-live="polite" for updates, role="alert"/aria-live="assertive" for critical alerts\n- **Keyboard/Focus:** All interactive elements keyboard accessible, logical focus order, visible focus indicators, no keyboard traps (except modals)\n- **Color/Contrast:** 4.5:1 text contrast (3:1 large text), 3:1 UI component contrast, no color-only information, 3:1 focus indicator contrast'}var yt=1440*60*1e3;function pe(e){let{serverName:t,contextApi:s,additionalFields:o={},intervalMs:n=yt}=e,r="mcp_server_heartbeat",a=async()=>{try{let d={server_name:t,timestamp:new Date().toISOString(),...o};await s.logEvent(r,d)}catch(d){m(`Failed to send heartbeat for ${t}:`,d)}};a();let i=setInterval(a,n);return()=>{clearInterval(i),m(`Heartbeat stopped for ${t}`)}}import{z as K}from"zod";var bt=["default","bootstrap","material","fluent"];function ue(e,t){return{projectName:K.string().default(t).describe("The name of the project. Used as the project folder name when creating a new project."),createNewProject:K.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:K.enum(bt).default("default").describe("The Kendo UI theme to use. Determines which theme package is installed and imported.")}}var l="Kendo UI for Angular",T="angular",I="kendo",O=["AIPrompt","ActionSheet","AppBar","ArcGauge","AutoComplete","Avatar","Badge","Barcode","BottomNavigation","BreadCrumb","Button","ButtonGroup","Calendar","Card","ChartWizard","Charts","CheckBox","Chip","ChipList","ChunkProgressBar","CircularGauge","CircularProgressBar","ColorGradient","ColorPalette","ColorPicker","ComboBox","ContextMenu","ConversationalUI","DataQuery","DateInput","DateMath","DatePicker","DateRange","DateTimePicker","Diagram","Dialog","DragandDrop","Drawer","Drawing","DropDownButton","DropDownList","DropDownTree","Editor","ExcelExport","ExpansionPanel","FileSaver","FileSelect","Filter","FlatColorPicker","FloatingActionButton","FloatingLabel","Forms","FormField","Gantt","Gauges","General","Grid","GridLayout","Icon","InlineAIPrompt","Label","LinearGauge","ListBox","ListView","Loader","Map","MaskedTextBox","Menu","MultiColumnComboBox","MultiSelect","MultiSelectTree","MultiViewCalendar","Notification","NumericTextBox","OTPInput","Pager","PanelBar","PDFExport","PDFViewer","PivotGrid","Popover","Popup","ProgressBar","PromptBox","QRCode","RadialGauge","RadioButton","RangeSlider","Rating","Ripple","Sankey","Scheduler","ScrollView","Signature","Skeleton","Slider","SmartPasteButton","Sortable","StockChart","Sparkline","SpeechToTextButton","SplitButton","Splitter","Spreadsheet","StackLayout","Stepper","SVGIcon","Switch","TabStrip","TextArea","TextBox","TileLayout","Timeline","TimePicker","ToolBar","Tooltip","TreeList","TreeView","Typography","Upload","Window"],me=new Map([["actionsheet","@progress/kendo-angular-navigation"],["aiprompt","@progress/kendo-angular-conversational-ui"],["appbar","@progress/kendo-angular-navigation"],["arcgauge","@progress/kendo-angular-gauges"],["autocomplete","@progress/kendo-angular-dropdowns"],["avatar","@progress/kendo-angular-layout"],["badge","@progress/kendo-angular-indicators"],["barcode","@progress/kendo-angular-barcodes"],["bottomnavigation","@progress/kendo-angular-navigation"],["breadcrumb","@progress/kendo-angular-navigation"],["button","@progress/kendo-angular-buttons"],["buttongroup","@progress/kendo-angular-buttons"],["calendar","@progress/kendo-angular-dateinputs"],["card","@progress/kendo-angular-layout"],["chartwizard","@progress/kendo-angular-chart-wizard"],["checkbox","@progress/kendo-angular-inputs"],["chip","@progress/kendo-angular-buttons"],["chiplist","@progress/kendo-angular-buttons"],["chunkprogressbar","@progress/kendo-angular-progressbar"],["circulargauge","@progress/kendo-angular-gauges"],["circularprogressbar","@progress/kendo-angular-progressbar"],["colorgradient","@progress/kendo-angular-inputs"],["colorpalette","@progress/kendo-angular-inputs"],["colorpicker","@progress/kendo-angular-inputs"],["combobox","@progress/kendo-angular-dropdowns"],["contextmenu","@progress/kendo-angular-menu"],["dataquery","@progress/kendo-data-query"],["dateinput","@progress/kendo-angular-dateinputs"],["datemath","@progress/kendo-date-math"],["datepicker","@progress/kendo-angular-dateinputs"],["daterangepicker","@progress/kendo-angular-dateinputs"],["datetimepicker","@progress/kendo-angular-dateinputs"],["diagram","@progress/kendo-angular-diagrams"],["dialog","@progress/kendo-angular-dialog"],["drawer","@progress/kendo-angular-layout"],["drawing","@progress/kendo-drawing"],["dropdownbutton","@progress/kendo-angular-buttons"],["dropdownlist","@progress/kendo-angular-dropdowns"],["dropdowntree","@progress/kendo-angular-dropdowns"],["editor","@progress/kendo-angular-editor"],["excelexport","@progress/kendo-angular-excel-export"],["expansionpanel","@progress/kendo-angular-layout"],["filesaver","@progress/kendo-file-saver"],["fileselect","@progress/kendo-angular-upload"],["filter","@progress/kendo-angular-filter"],["flatcolorpicker","@progress/kendo-angular-inputs"],["floatingactionbutton","@progress/kendo-angular-buttons"],["floatinglabel","@progress/kendo-angular-label"],["formfield","@progress/kendo-angular-inputs"],["forms","@progress/kendo-angular-inputs"],["gantt","@progress/kendo-angular-gantt"],["grid","@progress/kendo-angular-grid"],["gridlayout","@progress/kendo-angular-layout"],["icon","@progress/kendo-angular-icons"],["inlineaiprompt","@progress/kendo-angular-conversational-ui"],["label","@progress/kendo-angular-label"],["lineargauge","@progress/kendo-angular-gauges"],["listbox","@progress/kendo-angular-listbox"],["listview","@progress/kendo-angular-listview"],["loader","@progress/kendo-angular-indicators"],["map","@progress/kendo-angular-map"],["maskedtextbox","@progress/kendo-angular-inputs"],["menu","@progress/kendo-angular-menu"],["multicolumncombobox","@progress/kendo-angular-dropdowns"],["multiselect","@progress/kendo-angular-dropdowns"],["multiselecttree","@progress/kendo-angular-dropdowns"],["multiviewcalendar","@progress/kendo-angular-dateinputs"],["notification","@progress/kendo-angular-notification"],["numerictextbox","@progress/kendo-angular-inputs"],["otpinput","@progress/kendo-angular-inputs"],["pager","@progress/kendo-angular-pager"],["panelbar","@progress/kendo-angular-layout"],["pdfexport","@progress/kendo-angular-pdf-export"],["pdfviewer","@progress/kendo-angular-pdfviewer"],["pivotgrid","@progress/kendo-angular-pivotgrid"],["popover","@progress/kendo-angular-tooltip"],["popup","@progress/kendo-angular-popup"],["progressbar","@progress/kendo-angular-progressbar"],["promptbox","@progress/kendo-angular-conversational-ui"],["qrcode","@progress/kendo-angular-barcodes"],["radialgauge","@progress/kendo-angular-gauges"],["radiobutton","@progress/kendo-angular-inputs"],["rangeslider","@progress/kendo-angular-inputs"],["rating","@progress/kendo-angular-inputs"],["ripple","@progress/kendo-angular-ripple"],["sankey","@progress/kendo-angular-charts"],["scheduler","@progress/kendo-angular-scheduler"],["scrollview","@progress/kendo-angular-scrollview"],["signature","@progress/kendo-angular-inputs"],["skeleton","@progress/kendo-angular-indicators"],["slider","@progress/kendo-angular-inputs"],["smartpastebutton","@progress/kendo-angular-buttons"],["sortable","@progress/kendo-angular-sortable"],["sparkline","@progress/kendo-angular-charts"],["speechtotextbutton","@progress/kendo-angular-buttons"],["splitbutton","@progress/kendo-angular-buttons"],["splitter","@progress/kendo-angular-layout"],["spreadsheet","@progress/kendo-angular-spreadsheet"],["stacklayout","@progress/kendo-angular-layout"],["stepper","@progress/kendo-angular-layout"],["stockchart","@progress/kendo-angular-charts"],["svgicon","@progress/kendo-angular-icons"],["switch","@progress/kendo-angular-inputs"],["tabstrip","@progress/kendo-angular-layout"],["textarea","@progress/kendo-angular-inputs"],["textbox","@progress/kendo-angular-inputs"],["tilelayout","@progress/kendo-angular-layout"],["timeline","@progress/kendo-angular-layout"],["timepicker","@progress/kendo-angular-dateinputs"],["toolbar","@progress/kendo-angular-toolbar"],["treelist","@progress/kendo-angular-treelist"],["treeview","@progress/kendo-angular-treeview"],["typography","@progress/kendo-angular-typography"],["upload","@progress/kendo-angular-upload"],["window","@progress/kendo-angular-dialog"],["charts","@progress/kendo-angular-charts"],["conversationalui","@progress/kendo-angular-conversational-ui"],["tooltip","@progress/kendo-angular-tooltip"]]);var wt=kt(vt(At(import.meta.url)),"../proto/service.proto"),G=new M("contextapi.telerik.com:443",wt,{libName:T});var ge=async()=>G.validateUserLicense();import _t from"fs";import st from"path";import{fileURLToPath as Mt}from"url";import{z as v}from"zod";var C=class{constructor(t,s,o){this.name=t;this.config=s;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 i=new U.Metadata;if(a)try{i.add("x-license-key",s)}catch(d){throw b("Error adding license key to metadata:",d),new Error(`Failed to use license key: ${d.message}`)}return r&&i.add("x-api-key",n),this.options?.libName&&i.add("x-library-name",this.options.libName),i.add("x-tool-name",this.toolNameHeader),i.add("x-request-metadata",this.buildRequestMetadata(t)),i}async query(t,s){let o=await this.getMetadata({meta:s});return new Promise((n,r)=>{this.client.query(t,o,(a,i)=>{a?r(new Error(a)):n(i)})})}async getApiRefMatches(t,s){let o=await this.getMetadata({meta:s});return new Promise((n,r)=>{this.client.getApiRefMatches(t,o,(a,i)=>{a?r(new Error(a)):n(i)})})}async queryCssUtils(t,s){let o=await this.getMetadata({meta:s});return new Promise((n,r)=>{this.client.cssUtilsSearch(t,o,(a,i)=>{a?(b("Error querying CSS Utils:",a),r(new Error(a))):n(i)})})}async queryIconsSearch(t,s){let o=await this.getMetadata({meta:s});return new Promise((n,r)=>{this.client.iconsSearch(t,o,(a,i)=>{a?(b("Error querying Icons Search:",a),r(new Error(a))):n(i)})})}async queryBuildingBlocks(t,s){let o=await this.getMetadata({meta:s});return new Promise((n,r)=>{this.client.buildingBlocksSearch(t,o,(a,i)=>{a?(b("Error querying Building Blocks:",a),r(new Error(a))):n(i)})})}async validateUserLicense(){let t=await this.getMetadata();return new Promise((s,o)=>{this.client.validateUserLicense(null,t,(n,r)=>{n?(b("Error validating user license:",n),o(new Error(n))):s(r)})})}async queryThemeGenerate(t,s){let o=await this.getMetadata({meta:s});return new Promise((n,r)=>{this.client.generateTheme(t,o,(a,i)=>{a?(b("Error querying context API/GenerateTheme:",a),r(new Error(a))):n(i)})})}async recordOrchestratorUserRequest({meta:t}){let s=await this.getMetadata({meta:t});return new Promise((o,n)=>{this.client.recordOrchestratorUserRequest(null,s,(r,a)=>{r?(b("Error recording orchestrator user request:",r),n(new Error(r))):o(a)})})}async recordToolUserRequest({toolName:t,meta:s}){let o=await this.getMetadata({meta:s});return new Promise((n,r)=>{this.client.recordToolUserRequest({tool_name:t},o,(a,i)=>{a?(b("Error recording tool user request:",a),r(new Error(a))):n(i)})})}async logEvent(t,s,o={}){let n="h8utJ6rk4PpIWX4JMn9beQDsjVUri6KV0XYfiVwq",{enrichWithUserData:r=!1,meta:a={}}=o,i=n&&typeof n=="string",d=null;if(r)try{let[m]=this.isDev?["fake_license",null]:await W();m&&typeof m=="string"&&(d=m)}catch{}if(!i&&!d){b("Neither LOGGING_API_KEY nor license key available, skipping log event");return}let p=new U.Metadata;return i&&p.add("x-api-key",n),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((m,f)=>{this.client.logEvent({event_name:t,fields:s||{}},p,(u,y)=>{u?(b("Error logging event:",u),f(new Error(u))):m()})})}};import{z as j}from"zod";var mo=j.object({user_id:j.string(),user_email:j.string().email()});import{z as w}from"zod";var kt=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(kt);function x(e,t){let s=e.server?.server.getClientVersion?.(),o=t||{};return s&&(o.clientInfo={name:s.name,version:s.version}),o}async function de(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 s=await e();return s?.toLocaleLowerCase()==="agentic_ui_generator"?"agent":s?.toLocaleLowerCase()==="ai_coding_assistants"?"assistant":"none"}function pe(){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 At=1440*60*1e3;function ue(e){let{serverName:t,contextApi:s,additionalFields:o={},intervalMs:n=At,enrichWithUserData:r=!1}=e,a="mcp_server_heartbeat",i=async()=>{try{let p={server_name:t,timestamp:new Date().toISOString(),...o};await s.logEvent(a,p,{enrichWithUserData:r})}catch(p){b(`Failed to send heartbeat for ${t}:`,p)}};i();let d=setInterval(i,n);return()=>{clearInterval(d),b(`Heartbeat stopped for ${t}`)}}import{z}from"zod";var wt=["default","bootstrap","material","fluent"];function me(e,t){return{projectName:z.string().default(t).describe("The name of the project. Used as the project folder name when creating a new project."),createNewProject:z.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:z.enum(wt).default("default").describe("The Kendo UI theme to use. Determines which theme package is installed and imported.")}}var l="Kendo UI for Angular",T="angular",E="kendo",L=["AIPrompt","ActionSheet","AppBar","ArcGauge","AutoComplete","Avatar","Badge","Barcode","BottomNavigation","BreadCrumb","Button","ButtonGroup","Calendar","Card","ChartWizard","Charts","CheckBox","Chip","ChipList","ChunkProgressBar","CircularGauge","CircularProgressBar","ColorGradient","ColorPalette","ColorPicker","ComboBox","ContextMenu","ConversationalUI","DataQuery","DateInput","DateMath","DatePicker","DateRange","DateTimePicker","Diagram","Dialog","DragandDrop","Drawer","Drawing","DropDownButton","DropDownList","DropDownTree","Editor","ExcelExport","ExpansionPanel","FileSaver","FileSelect","Filter","FlatColorPicker","FloatingActionButton","FloatingLabel","Forms","FormField","Gantt","Gauges","General","Grid","GridLayout","Icon","InlineAIPrompt","Label","LinearGauge","ListBox","ListView","Loader","Map","MaskedTextBox","Menu","MultiColumnComboBox","MultiSelect","MultiSelectTree","MultiViewCalendar","Notification","NumericTextBox","OTPInput","Pager","PanelBar","PDFExport","PDFViewer","PivotGrid","Popover","Popup","ProgressBar","PromptBox","QRCode","RadialGauge","RadioButton","RangeSlider","Rating","Ripple","Sankey","Scheduler","ScrollView","Signature","Skeleton","Slider","SmartPasteButton","Sortable","StockChart","Sparkline","SpeechToTextButton","SplitButton","Splitter","Spreadsheet","StackLayout","Stepper","SVGIcon","Switch","TabStrip","TextArea","TextBox","TileLayout","Timeline","TimePicker","ToolBar","Tooltip","TreeList","TreeView","Typography","Upload","Window"],ge=new Map([["actionsheet","@progress/kendo-angular-navigation"],["aiprompt","@progress/kendo-angular-conversational-ui"],["appbar","@progress/kendo-angular-navigation"],["arcgauge","@progress/kendo-angular-gauges"],["autocomplete","@progress/kendo-angular-dropdowns"],["avatar","@progress/kendo-angular-layout"],["badge","@progress/kendo-angular-indicators"],["barcode","@progress/kendo-angular-barcodes"],["bottomnavigation","@progress/kendo-angular-navigation"],["breadcrumb","@progress/kendo-angular-navigation"],["button","@progress/kendo-angular-buttons"],["buttongroup","@progress/kendo-angular-buttons"],["calendar","@progress/kendo-angular-dateinputs"],["card","@progress/kendo-angular-layout"],["chartwizard","@progress/kendo-angular-chart-wizard"],["checkbox","@progress/kendo-angular-inputs"],["chip","@progress/kendo-angular-buttons"],["chiplist","@progress/kendo-angular-buttons"],["chunkprogressbar","@progress/kendo-angular-progressbar"],["circulargauge","@progress/kendo-angular-gauges"],["circularprogressbar","@progress/kendo-angular-progressbar"],["colorgradient","@progress/kendo-angular-inputs"],["colorpalette","@progress/kendo-angular-inputs"],["colorpicker","@progress/kendo-angular-inputs"],["combobox","@progress/kendo-angular-dropdowns"],["contextmenu","@progress/kendo-angular-menu"],["dataquery","@progress/kendo-data-query"],["dateinput","@progress/kendo-angular-dateinputs"],["datemath","@progress/kendo-date-math"],["datepicker","@progress/kendo-angular-dateinputs"],["daterangepicker","@progress/kendo-angular-dateinputs"],["datetimepicker","@progress/kendo-angular-dateinputs"],["diagram","@progress/kendo-angular-diagrams"],["dialog","@progress/kendo-angular-dialog"],["drawer","@progress/kendo-angular-layout"],["drawing","@progress/kendo-drawing"],["dropdownbutton","@progress/kendo-angular-buttons"],["dropdownlist","@progress/kendo-angular-dropdowns"],["dropdowntree","@progress/kendo-angular-dropdowns"],["editor","@progress/kendo-angular-editor"],["excelexport","@progress/kendo-angular-excel-export"],["expansionpanel","@progress/kendo-angular-layout"],["filesaver","@progress/kendo-file-saver"],["fileselect","@progress/kendo-angular-upload"],["filter","@progress/kendo-angular-filter"],["flatcolorpicker","@progress/kendo-angular-inputs"],["floatingactionbutton","@progress/kendo-angular-buttons"],["floatinglabel","@progress/kendo-angular-label"],["formfield","@progress/kendo-angular-inputs"],["forms","@progress/kendo-angular-inputs"],["gantt","@progress/kendo-angular-gantt"],["grid","@progress/kendo-angular-grid"],["gridlayout","@progress/kendo-angular-layout"],["icon","@progress/kendo-angular-icons"],["inlineaiprompt","@progress/kendo-angular-conversational-ui"],["label","@progress/kendo-angular-label"],["lineargauge","@progress/kendo-angular-gauges"],["listbox","@progress/kendo-angular-listbox"],["listview","@progress/kendo-angular-listview"],["loader","@progress/kendo-angular-indicators"],["map","@progress/kendo-angular-map"],["maskedtextbox","@progress/kendo-angular-inputs"],["menu","@progress/kendo-angular-menu"],["multicolumncombobox","@progress/kendo-angular-dropdowns"],["multiselect","@progress/kendo-angular-dropdowns"],["multiselecttree","@progress/kendo-angular-dropdowns"],["multiviewcalendar","@progress/kendo-angular-dateinputs"],["notification","@progress/kendo-angular-notification"],["numerictextbox","@progress/kendo-angular-inputs"],["otpinput","@progress/kendo-angular-inputs"],["pager","@progress/kendo-angular-pager"],["panelbar","@progress/kendo-angular-layout"],["pdfexport","@progress/kendo-angular-pdf-export"],["pdfviewer","@progress/kendo-angular-pdfviewer"],["pivotgrid","@progress/kendo-angular-pivotgrid"],["popover","@progress/kendo-angular-tooltip"],["popup","@progress/kendo-angular-popup"],["progressbar","@progress/kendo-angular-progressbar"],["promptbox","@progress/kendo-angular-conversational-ui"],["qrcode","@progress/kendo-angular-barcodes"],["radialgauge","@progress/kendo-angular-gauges"],["radiobutton","@progress/kendo-angular-inputs"],["rangeslider","@progress/kendo-angular-inputs"],["rating","@progress/kendo-angular-inputs"],["ripple","@progress/kendo-angular-ripple"],["sankey","@progress/kendo-angular-charts"],["scheduler","@progress/kendo-angular-scheduler"],["scrollview","@progress/kendo-angular-scrollview"],["signature","@progress/kendo-angular-inputs"],["skeleton","@progress/kendo-angular-indicators"],["slider","@progress/kendo-angular-inputs"],["smartpastebutton","@progress/kendo-angular-buttons"],["sortable","@progress/kendo-angular-sortable"],["sparkline","@progress/kendo-angular-charts"],["speechtotextbutton","@progress/kendo-angular-buttons"],["splitbutton","@progress/kendo-angular-buttons"],["splitter","@progress/kendo-angular-layout"],["spreadsheet","@progress/kendo-angular-spreadsheet"],["stacklayout","@progress/kendo-angular-layout"],["stepper","@progress/kendo-angular-layout"],["stockchart","@progress/kendo-angular-charts"],["svgicon","@progress/kendo-angular-icons"],["switch","@progress/kendo-angular-inputs"],["tabstrip","@progress/kendo-angular-layout"],["textarea","@progress/kendo-angular-inputs"],["textbox","@progress/kendo-angular-inputs"],["tilelayout","@progress/kendo-angular-layout"],["timeline","@progress/kendo-angular-layout"],["timepicker","@progress/kendo-angular-dateinputs"],["toolbar","@progress/kendo-angular-toolbar"],["treelist","@progress/kendo-angular-treelist"],["treeview","@progress/kendo-angular-treeview"],["typography","@progress/kendo-angular-typography"],["upload","@progress/kendo-angular-upload"],["window","@progress/kendo-angular-dialog"],["charts","@progress/kendo-angular-charts"],["conversationalui","@progress/kendo-angular-conversational-ui"],["tooltip","@progress/kendo-angular-tooltip"]]);var Tt=St(Ct(xt(import.meta.url)),"../proto/service.proto"),M=new F("contextapi.telerik.com:443",Tt,{libName:T});var he=async()=>M.validateUserLicense();import Kt from"fs";import it from"path";import{fileURLToPath as Wt}from"url";import{z as A}from"zod";var C=class{constructor(t,s,o){this.name=t;this.config=s;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 $=(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
|
|
49
|
+
`;var H=()=>`## 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,7 +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
|
|
150
|
+
- Page left/right margin: 24\u201332px minimum, even at desktop widths.`;var _=(e,t)=>{let s=$({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.":"",n=e.components?e.components.join(", "):"components";return`# \u{1F3AF} ${e.suiteName} - Execution Plan
|
|
151
151
|
|
|
152
152
|
**Current Goal:**
|
|
153
153
|
|
|
@@ -187,7 +187,7 @@ ${e.includeLayout?`**STYLING AND LAYOUT REQUIREMENTS:**
|
|
|
187
187
|
|
|
188
188
|
`:""}---
|
|
189
189
|
|
|
190
|
-
${
|
|
190
|
+
${H()}
|
|
191
191
|
|
|
192
192
|
---
|
|
193
193
|
|
|
@@ -377,7 +377,7 @@ ${e.includeResponsive?"- Responsive layout works across breakpoints":""}
|
|
|
377
377
|
**Quick Fixes (if needed):**
|
|
378
378
|
|
|
379
379
|
After code implementation and validation you can make quick fixes as needed:
|
|
380
|
-
- If any build errors are found, fix them and re-run the application.
|
|
380
|
+
- If any build errors are found, fix them and re-run the application. Do NOT present the implementation as complete until the build succeeds without errors.
|
|
381
381
|
- Use ${e.codeAssistantName} for component-specific issues
|
|
382
382
|
- Use ${e.layoutAssistantName} for styling adjustments
|
|
383
383
|
|
|
@@ -386,7 +386,7 @@ After code implementation and validation you can make quick fixes as needed:
|
|
|
386
386
|
- Do NOT generate or suggest any code until all tools have been used and validated responses are incorporated.
|
|
387
387
|
- Focus on planning and sequencing.
|
|
388
388
|
- Summarize the components, layouts, and utilities gathered.
|
|
389
|
-
- Confirm all required inputs from tools have been provided.`};var
|
|
389
|
+
- Confirm all required inputs from tools have been provided.`};var Y=e=>`# ${e.suiteName} Assistant
|
|
390
390
|
|
|
391
391
|
**What you're looking for:**
|
|
392
392
|
|
|
@@ -479,6 +479,14 @@ After gathering information:
|
|
|
479
479
|
3. Use the official ${e.suiteName} documentation for detailed implementation guides
|
|
480
480
|
4. Refer to the component examples and code snippets provided
|
|
481
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
|
+
|
|
482
490
|
---
|
|
483
491
|
|
|
484
492
|
## Getting Started
|
|
@@ -487,11 +495,12 @@ After gathering information:
|
|
|
487
495
|
1. Start by calling ${e.codeAssistantName} for the components you need
|
|
488
496
|
2. ${e.includeIcons?`Search for icons using ${e.iconAssistantName}`:"Review the component documentation"}
|
|
489
497
|
3. Follow the ${e.suiteName} official documentation for implementation details
|
|
498
|
+
4. Run \`npm run build\` to verify the implementation compiles successfully
|
|
490
499
|
|
|
491
500
|
**Important Notes:**
|
|
492
501
|
- These tools provide documentation and guidance, not code generation
|
|
493
502
|
- Always refer to official ${e.suiteName} documentation for the most up-to-date information
|
|
494
|
-
- Tool responses include usage examples and best practices`;var
|
|
503
|
+
- Tool responses include usage examples and best practices`;var D=(e,t)=>({SETUP_VALIDATION:`
|
|
495
504
|
UI Library Setup:
|
|
496
505
|
- ${e} modules properly imported and configured
|
|
497
506
|
- ${e} theme properly loaded and applied
|
|
@@ -509,78 +518,78 @@ After gathering information:
|
|
|
509
518
|
- Do not use inline styles
|
|
510
519
|
- Consistent ${e} theme application across all components
|
|
511
520
|
- Custom theme variables properly defined and scoped
|
|
512
|
-
- ${e}
|
|
513
|
-
- Brand colors integrated with ${e} component themes`});function
|
|
521
|
+
- ${e} icons properly loaded and optimized
|
|
522
|
+
- Brand colors integrated with ${e} component themes`});function It(e,t){let s;try{s=JSON.parse(e)}catch{return e}let o=s?.Item;if(!o)return e;let n=[],r=o.FullName??o.Name??"",a=o.Type??"",i=o.Summary??"",d=o.SyntaxContent??"";n.push(`## API Reference Item
|
|
514
523
|
- Name: ${r}
|
|
515
524
|
- Type: ${a}
|
|
516
525
|
- Summary: ${i}
|
|
517
|
-
- Syntax: ${d}`);let
|
|
518
|
-
`,
|
|
526
|
+
- Syntax: ${d}`);let p=s.RelatedItemsByType?.return_type;if(p?.length){let y=p[0].Text;y&&n.push(`- Return Type: ${y}`)}let m=o.Examples??[];if(m.length>0){let y=`## Examples
|
|
527
|
+
`,g=0;for(let v of m){let c=(v.Component??"").toLowerCase(),k=t.toLowerCase();if(c&&c!==k&&c!=="general")continue;g+=1;let S=v.Code??"";y+=`### Example ${g}
|
|
519
528
|
\`\`\`
|
|
520
529
|
${S}
|
|
521
530
|
\`\`\`
|
|
522
|
-
`}
|
|
523
|
-
${
|
|
524
|
-
`+
|
|
531
|
+
`}g>0&&n.push(y)}let f=s.RelatedItemsByType??{},u=[];for(let[y,g]of Object.entries(f))if(!(y==="return_type"||y==="render_fragment"))for(let v of g??[]){let c=v.FullName??"",k=v.ShortText??"";u.push(`### ${c} (${y})
|
|
532
|
+
${k}`)}return u.length>0&&n.push(`## Additional Context
|
|
533
|
+
`+u.join(`
|
|
525
534
|
---
|
|
526
535
|
`)),n.join(`
|
|
527
536
|
|
|
528
|
-
`)}function
|
|
529
|
-
`)||"No CSS utilities found for the given prompt.",
|
|
537
|
+
`)}function fe(e,t,s){let{name:o,title:n,description:r,layoutAssistantName:a,codeAssistantName:i,styleAssistantName:d,iconAssistantName:p,accessibilityAssistantName:m,suiteName:f,libKey:u,components:y}=e,g=new C(o,{title:n,description:r,requiredAccess:e.requiredAccess,inputSchema:{userIntent:A.string().describe(`Detailed description and intent of what the user wants to build. Include the type of page/component, main functionality, visual requirements, and any specific ${f} components you want to use.`),needsComponentsDocsConfidence:A.number().min(0).max(1).default(1).describe("Confidence (0-1) to include Component Documentation assistance. Default is 1."),needsLayoutConfidence:A.number().min(0).max(1).default(0).describe("Confidence (0-1) to include Layout assistance. Default is 0."),needsStylingConfidence:A.number().min(0).max(1).default(0).describe("Confidence (0-1) to include Theming/Styling assistance. Default is 0."),needsResponsiveBehaviorConfidence:A.number().min(0).max(1).default(0).describe("Confidence (0-1) to include Responsive Behavior assistance. Default is 0."),needsIconsConfidence:A.number().min(0).max(1).default(0).describe("Confidence (0-1) to include Icons assistance. Default is 0."),componentsNeeded:A.array(A.enum(y)).optional().describe(`Optional list of specific ${f} components needed for the project.`)}},async({userIntent:v,needsComponentsDocsConfidence:c,needsLayoutConfidence:k,needsStylingConfidence:S,needsResponsiveBehaviorConfidence:I,needsIconsConfidence:R,componentsNeeded:N},{_meta:ct})=>{let dt=x(g,ct);b("UI Orchestrator called with:",{userIntent:v,needsComponentsDocsConfidence:c,needsLayoutConfidence:k,needsStylingConfidence:S,needsResponsiveBehaviorConfidence:I,needsIconsConfidence:R});try{await s.recordOrchestratorUserRequest({meta:{userIntent:v,componentsNeeded:N,...dt}})}catch(B){throw O(B)}let pt=g.server?.server.getClientCapabilities?.()?.elicitation,ne;if(pt&&S>.3&&S<=.6){let B=await g.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"]}});B?.action==="accept"&&B.content?.includeCustomTheming&&(ne=!0)}return{content:[{type:"text",text:_({name:o,userIntent:v,includeComponentsDocs:c>.3,includeTheming:S>.6||!!ne,includeLayout:k>.5,includeIcons:R>.6,includeResponsive:k>.5&&I>.4,layoutAssistantName:a,codeAssistantName:i,styleAssistantName:d,iconAssistantName:p,accessibilityAssistantName:m,suiteName:f,libKey:u,components:N},t)}]}});return g}function ye(e,t){let{name:s,title:o,description:n,iconAssistantName:r,codeAssistantName:a,suiteName:i,libKey:d,components:p}=e,m=new C(s,{title:o,description:n,inputSchema:{userIntent:A.string().describe(`Describe what you want to build or what components you're looking for. Include the type of functionality, features, or UI elements you need from ${i}.`),needsIconsConfidence:A.number().min(0).max(1).default(.7).describe("Confidence (0-1) to include Icons assistance. Default is 0.7."),componentsNeeded:A.array(A.enum(p)).optional().describe(`Optional list of specific ${i} components you want to learn about.`)},requiredAccess:e.requiredAccess},async({userIntent:f,needsIconsConfidence:u,componentsNeeded:y},{_meta:g})=>{let v=x(m,g);b("Assistant Orchestrator called with:",{userIntent:f,needsIconsConfidence:u,componentsNeeded:y});try{await t.recordOrchestratorUserRequest({meta:{userIntent:f,componentsNeeded:y,...v}})}catch(k){throw O(k)}return{content:[{type:"text",text:Y({name:s,userIntent:f,includeComponentsDocs:!0,includeIcons:u>.5,codeAssistantName:a,iconAssistantName:r,suiteName:i,libKey:d,components:y})}]}});return m}function be(e,t){let{name:s,title:o,description:n,suiteName:r,libKey:a,getPreContent:i}=e,d=new C(s,{title:o,description:n,requiredAccess:e.requiredAccess,inputSchema:{prompt:A.string().describe("An enhanced prompt describing the HTML layout structure, design requirements or specific visual effects you want to achieve."),includeBuildingBlockExamples:A.boolean().describe("Whether to include building block examples. Defaults to false.").default(!1)}},async({prompt:p,includeBuildingBlockExamples:m},{_meta:f})=>{let u=x(d,f);b("Layout Assistant called with:",{prompt:p,includeBuildingBlockExamples:m});try{let g=(await t.queryCssUtils({query:p},{...u})).values.join(`
|
|
538
|
+
`)||"No CSS utilities found for the given prompt.",v=i?.()??"",c=k=>`${v}
|
|
530
539
|
|
|
531
540
|
# Kendo Design System CSS Utilities
|
|
532
541
|
|
|
533
|
-
${
|
|
534
|
-
${
|
|
535
|
-
`;if(
|
|
542
|
+
${g}
|
|
543
|
+
${k??""}
|
|
544
|
+
`;if(m)try{let k=await t.queryBuildingBlocks({query:p,lib_name:a},{...u}),S="";k.items?.length>0&&(S=`
|
|
536
545
|
## Building Blocks Examples
|
|
537
546
|
|
|
538
547
|
The examples here are for demonstration purpose how CSS utils can be implemented in various building blocks.
|
|
539
548
|
However, consider your own design requirements and specifics in order to implement your templates/building blocks correctly.
|
|
540
549
|
|
|
541
|
-
${
|
|
542
|
-
### ${
|
|
550
|
+
${k.items.map(I=>`
|
|
551
|
+
### ${I.name}
|
|
543
552
|
|
|
544
|
-
${
|
|
553
|
+
${I.description}
|
|
545
554
|
|
|
546
555
|
\`\`\`code
|
|
547
|
-
${
|
|
556
|
+
${I.code}
|
|
548
557
|
\`\`\`
|
|
549
558
|
`).join(`
|
|
550
|
-
`)}`),
|
|
559
|
+
`)}`),g=c(S)}catch(k){b("Error calling building-blocks service:",k),g=c()}else g=c();return{content:[{type:"text",text:g}]}}catch(y){throw O(y)}});return d}function ve(e,t){let{name:s,title:o,description:n,libKey:r,getPreContent:a}=e,i=new C(s,{title:o,description:n,requiredAccess:e.requiredAccess,inputSchema:{prompt:A.string().describe("A natural language description of the desired visual style or theme. For example: 'Create a modern dark theme with high contrast'.")}},async({prompt:d},{_meta:p})=>{let m=x(i,p);b("Style Assistant called with:",{prompt:d});let f="";try{let g=await t.queryThemeGenerate({prompt:d},{...m});if(g.variables_json){let v=JSON.parse(g.variables_json),c=[];if(v)for(let k of Object.keys(v))typeof v[k]=="string"&&c.push(`${k}: ${v[k]}`);f=c.join(`
|
|
551
560
|
|
|
552
|
-
`)}}catch(
|
|
561
|
+
`)}}catch(g){throw O(g)}let u=a?.()??"";return{content:[{type:"text",text:f?`Use the following CSS variables to style the web application, including colors, typography, spacing, and component appearance.
|
|
553
562
|
Ensure the variables are applied consistently across all relevant elements.
|
|
554
563
|
Do NOT set any inline styles. CSS variables should be defined in global or component-level CSS files, or via supported theming mechanisms.
|
|
555
564
|
|
|
556
|
-
${
|
|
565
|
+
${u}
|
|
557
566
|
|
|
558
567
|
## Generated CSS Variables
|
|
559
568
|
|
|
560
569
|
\`\`\`css
|
|
561
|
-
${
|
|
570
|
+
${f}
|
|
562
571
|
\`\`\`
|
|
563
|
-
`:"No CSS variables were generated for the given prompt."}]}})}function
|
|
572
|
+
`:"No CSS variables were generated for the given prompt."}]}});return i}function ke(e,t){let{name:s,title:o,description:n,libKey:r,getPostContent:a}=e,i=new C(s,{title:o,description:n,requiredAccess:e.requiredAccess,inputSchema:{query:A.string().describe("A search query for finding icons. Be specific about the icon purpose, style, or action."),limit:A.number().min(.1).max(1).default(.1).describe("The proportion of matching icons to return (0.1 = 1 icon, 0.5 = 5 icons, 1.0 = many icons). Default is 0.1.")}},async({query:d,limit:p},{_meta:m})=>{let f=x(i,m);b("Icon Search called with:",{query:d,limit:p});try{let u=await t.queryIconsSearch({query:d,limit:p*100},{...f}),y=a?.()??"";return{content:[{type:"text",text:`${u.values.join(`
|
|
564
573
|
|
|
565
574
|
`)}
|
|
566
575
|
|
|
567
|
-
${
|
|
576
|
+
${y}`}]}}catch(u){throw O(u)}});return i}function Ae(e,t){let{name:s,title:o,description:n,libKey:r,suiteName:a,components:i,componentAliases:d,getPostContent:p}=e,m=new C(s,{title:o,description:n,requiredAccess:e.requiredAccess,inputSchema:{query:A.string().describe("The query to search for."),component:A.enum(i).describe("The component to search for. If not specified, use General.")}},async({query:f,component:u},{_meta:y})=>{let g=x(m,y);b("Code Assistant called with:",{query:f,component:u});let v=u;if(d){let c=d[u];c&&(v=c)}try{let k=(await t.query({query:f,component:v?.toLowerCase()??"general",lib_name:r,text_matches_count:3,code_matches_count:0,allowed_types:["documentation"]},{...g})).values.map(R=>R.replace(/\0/g,"")),S=p?.({component:u})??"";return{content:[{type:"text",text:`${k.join(`
|
|
568
577
|
|
|
569
578
|
`)}
|
|
570
579
|
|
|
571
|
-
${
|
|
580
|
+
${S}`}]}}catch(c){throw O(c)}});return m}function we(e,t){let{name:s,title:o,description:n,libKey:r,suiteName:a,components:i,componentAliases:d}=e,p=new C(s,{title:o,description:n,requiredAccess:e.requiredAccess,inputSchema:{query:A.string().describe("The query to search for."),component:A.enum(i).describe("The component to search for. If not specified, use General."),includeGeneralGuidelines:A.boolean().default(!1).describe("Set to true only on the first call to include comprehensive WCAG 2.2 Level AA general guidelines. After the first call, set to false to get only component-specific accessibility information. Default is false.")}},async({query:m,component:f,includeGeneralGuidelines:u},{_meta:y})=>{let g=x(p,y);b("Accessibility Assistant called with:",{query:m,component:f,includeGeneralGuidelines:u});let v=f;if(d){let c=d[f];c&&(v=c)}try{let c="";if(u){let N=pe();c+=`# WCAG 2.2 Level AA General Accessibility Guidelines
|
|
572
581
|
|
|
573
|
-
`,c+=
|
|
582
|
+
`,c+=N,c+=`
|
|
574
583
|
|
|
575
584
|
---
|
|
576
585
|
|
|
577
|
-
`}let
|
|
586
|
+
`}let R=(await t.getApiRefMatches({query:m,component:v?.toLowerCase()??"general",lib_name:r,filters_json:'{"type":{"$in":["accessibility"]}}'},{...g})).values.map(N=>N.replace(/\0/g,"")).map(N=>It(N,v?.toLowerCase()??"general")).join(`
|
|
578
587
|
|
|
579
|
-
`);return
|
|
588
|
+
`);return R?(u&&(c+=`# Component-Specific Accessibility Information
|
|
580
589
|
|
|
581
|
-
`),c+=
|
|
590
|
+
`),c+=R):u||(c="No component-specific accessibility guidelines found."),{content:[{type:"text",text:c}]}}catch(c){throw O(c)}});return p}function O(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.
|
|
582
591
|
|
|
583
|
-
Error Code: ${t.code} Error Message: ${t.message}`)}var
|
|
592
|
+
Error Code: ${t.code} Error Message: ${t.message}`)}var Ce=e=>`${e}_ui_generator`,Se=e=>`${e}_assistant`,xe=e=>`${e}_layout_assistant`,Te=e=>`${e}_component_assistant`,Ie=e=>`${e}_style_assistant`,Ne=e=>`${e}_icon_assistant`,Ee=e=>`${e}_accessibility_assistant`,Re=e=>`${e}_getting_started_assistant`;var Pe=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.
|
|
584
593
|
|
|
585
594
|
Use the tool when:
|
|
586
595
|
- Want to build or modify a complete page or section layout
|
|
@@ -589,7 +598,7 @@ Error Code: ${t.code} Error Message: ${t.message}`)}var we=e=>`${e}_ui_generator
|
|
|
589
598
|
- You want to enforce best practices in styling, performance, and accessibility
|
|
590
599
|
|
|
591
600
|
Returns:
|
|
592
|
-
A detailed execution plan with validated tool calls, parameters, and reasoning \u2014 ensuring consistent, high-quality UI generation.`,
|
|
601
|
+
A detailed execution plan with validated tool calls, parameters, and reasoning \u2014 ensuring consistent, high-quality UI generation.`,De=e=>`Provides guidance for discovering and using ${e} components and icons. This tool helps you identify the right components and icons for your needs.
|
|
593
602
|
|
|
594
603
|
Use this tool when:
|
|
595
604
|
- You need to discover which ${e} components are suitable for a specific use case
|
|
@@ -598,17 +607,17 @@ Use this tool when:
|
|
|
598
607
|
- You want to gather component documentation and examples
|
|
599
608
|
|
|
600
609
|
Returns:
|
|
601
|
-
A focused plan for gathering component documentation and icon suggestions using the Component Assistant and Icon Assistant tools.`,
|
|
610
|
+
A focused plan for gathering component documentation and icon suggestions using the Component Assistant and Icon Assistant tools.`,Oe=`Retrieves Progress/Kendo Design System CSS utility classes and styling recommendations based on layout and design requirements.
|
|
602
611
|
Use this tool to find the right CSS utilities for styling Kendo UI components or general web elements.
|
|
603
612
|
It analyzes the provided design context and returns relevant utility classes with explanations and examples.
|
|
604
|
-
Best suited for styling questions related to typography, spacing, colors, layout, transforms, and other utilities in the Progress/Kendo Design System.`,
|
|
613
|
+
Best suited for styling questions related to typography, spacing, colors, layout, transforms, and other utilities in the Progress/Kendo Design System.`,Ge=`Generates CSS variables using an external style agent based on the user's styling prompt.
|
|
605
614
|
|
|
606
615
|
Use this tool when the user wants to:
|
|
607
616
|
- Update the visual theme of an application
|
|
608
617
|
- Modify color schemes
|
|
609
618
|
- Restyle the UI with CSS variables
|
|
610
619
|
|
|
611
|
-
The tool outputs a set of CSS variable definitions ready to be applied to style files.`,
|
|
620
|
+
The tool outputs a set of CSS variable definitions ready to be applied to style files.`,Ue=`Searches for icons in the Telerik Icons library.
|
|
612
621
|
Use this tool when the user needs to find specific icons for UI components or design elements.
|
|
613
622
|
It supports searching by icon name, category, or keyword and returns matching icons from the Telerik Icons library.
|
|
614
623
|
`,Le=e=>`Provides answers and retrieves official documentation for ${e}.
|
|
@@ -621,7 +630,7 @@ Use this tool when the user asks about:
|
|
|
621
630
|
|
|
622
631
|
Set the user's full question as the 'query' parameter.
|
|
623
632
|
If the question refers to a specific ${e} component, include its name in the 'component' parameter.
|
|
624
|
-
`,
|
|
633
|
+
`,Me=e=>`Retrieves accessibility guidance for ${e} components with optional general WCAG 2.2 Level AA guidelines.
|
|
625
634
|
|
|
626
635
|
Use this tool when:
|
|
627
636
|
- You need component-specific accessibility information and API references
|
|
@@ -639,7 +648,7 @@ Set 'includeGeneralGuidelines=true' ONLY on the first call to include general WC
|
|
|
639
648
|
Returns:
|
|
640
649
|
- When includeGeneralGuidelines=true: General WCAG 2.2 Level AA guidelines + component-specific recommendations
|
|
641
650
|
- When includeGeneralGuidelines=false: Only component-specific accessibility recommendations
|
|
642
|
-
`;var
|
|
651
|
+
`;var Q=D("Kendo UI","Kendo"),J=`
|
|
643
652
|
### Angular Component Validation
|
|
644
653
|
Component Structure:
|
|
645
654
|
- Use proper @Component decorator configuration
|
|
@@ -647,22 +656,22 @@ Component Structure:
|
|
|
647
656
|
- Correct selector naming convention (kebab-case)
|
|
648
657
|
- Appropriate template and style file organization
|
|
649
658
|
|
|
650
|
-
${
|
|
659
|
+
${Q.SETUP_VALIDATION}
|
|
651
660
|
- Kendo animations module configured (if animations are used)
|
|
652
661
|
- Internationalization properly configured for Kendo components
|
|
653
662
|
|
|
654
|
-
${
|
|
663
|
+
${Q.PERFORMANCE_OPTIMIZATION}
|
|
655
664
|
- OnPush change detection strategy where appropriate
|
|
656
665
|
- Efficient trackBy functions for *ngFor with Kendo components
|
|
657
666
|
- Minimal unnecessary change detection cycles
|
|
658
667
|
|
|
659
|
-
${
|
|
668
|
+
${Q.THEME_AND_STYLING}
|
|
660
669
|
- Proper theme switching functionality (if implemented)
|
|
661
670
|
- Only ONE theme reference exists across angular.json and styles files
|
|
662
671
|
- Make sure theme import mechanism is consistent with existing project setup
|
|
663
672
|
|
|
664
673
|
Accessibility
|
|
665
|
-
- Accessibility guidelines retrieved and applied to all components`;var
|
|
674
|
+
- Accessibility guidelines retrieved and applied to all components`;var X=`**Angular Specific Requirements:**
|
|
666
675
|
|
|
667
676
|
**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:
|
|
668
677
|
1. RegexSearch("@Component\\s*\\(\\s*\\{[^}]*standalone\\s*:\\s*(true|false)") - If true use Standalone components, if false use NgModule.
|
|
@@ -670,12 +679,18 @@ Accessibility
|
|
|
670
679
|
3. RegexSearch("bootstrapModule\\s*\\(") - If found use NgModule.
|
|
671
680
|
4. If neither is found, default to Standalone components.
|
|
672
681
|
|
|
682
|
+
**Template Syntax**: Detect which Angular template syntax the project uses and apply it consistently:
|
|
683
|
+
1. RegexSearch("@if\\s*\\(|@for\\s*\\(|@switch\\s*\\(") - If found, use built-in control flow syntax (\`@if\`, \`@for\`, \`@switch\`) in all templates.
|
|
684
|
+
2. RegexSearch("\\*ngIf|\\*ngFor|\\*ngSwitch") - If found, use structural directives (\`*ngIf\`, \`*ngFor\`, \`*ngSwitch\`) in all templates.
|
|
685
|
+
3. Do NOT mix both syntaxes in the same project.
|
|
686
|
+
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.
|
|
687
|
+
|
|
673
688
|
**Kendo UI Theme Management Instructions for Angular**:
|
|
674
689
|
|
|
675
690
|
**Determine existing Kendo Theme/Utils package and Theme Import Mechanism**:
|
|
676
|
-
|
|
691
|
+
|
|
677
692
|
- Read angular.json file
|
|
678
|
-
- Look for theme/utils entries containing "@progress/kendo-theme-" in projects.[project-name].architect.build.options.styles array
|
|
693
|
+
- Look for theme/utils entries containing "@progress/kendo-theme-" in projects.[project-name].architect.build.options.styles array
|
|
679
694
|
- Read styles.css or styles.scss, or any css/scss file
|
|
680
695
|
- Look for @import statements containing "@progress/kendo-theme-" to determine existing theme/utils usage
|
|
681
696
|
- Read the application's main html file (e.g., index.html)
|
|
@@ -693,7 +708,7 @@ Accessibility
|
|
|
693
708
|
2. Match the discovered patterns in all generated code
|
|
694
709
|
3. Maintain consistent formatting, indentation, and code organization with existing files
|
|
695
710
|
4. Always use the same theme import mechanism (unless user specifies otherwise)
|
|
696
|
-
`;var
|
|
711
|
+
`;var Z=D("Kendo UI","KendoReact"),ee=`
|
|
697
712
|
### React Component Validation
|
|
698
713
|
Component Structure:
|
|
699
714
|
- Use proper function component patterns with Hooks
|
|
@@ -701,22 +716,22 @@ Component Structure:
|
|
|
701
716
|
- Appropriate file organization (components, hooks, utils)
|
|
702
717
|
- Props interface/type definitions where needed
|
|
703
718
|
|
|
704
|
-
${
|
|
719
|
+
${Z.SETUP_VALIDATION}
|
|
705
720
|
- KendoReact license validation (if required)
|
|
706
721
|
- Appropriate bundler configuration for KendoReact packages
|
|
707
722
|
|
|
708
|
-
${
|
|
723
|
+
${Z.PERFORMANCE_OPTIMIZATION}
|
|
709
724
|
- React.memo for components that receive stable props
|
|
710
725
|
- useMemo/useCallback for expensive computations and callbacks
|
|
711
726
|
- Proper key props for list rendering with KendoReact components
|
|
712
727
|
|
|
713
|
-
${
|
|
728
|
+
${Z.THEME_AND_STYLING}
|
|
714
729
|
- Proper theme switching functionality (if implemented)
|
|
715
730
|
- Only ONE theme import exists across the application
|
|
716
731
|
- Make sure theme import mechanism is consistent with existing project setup
|
|
717
732
|
|
|
718
733
|
Accessibility
|
|
719
|
-
- Accessibility guidelines retrieved and applied to all components`;var
|
|
734
|
+
- Accessibility guidelines retrieved and applied to all components`;var Nt={createOrchestrator:fe,createAssistantOrchestrator:ye,createLayoutAssistant:be,createStyleAssistant:ve,createIconSearch:ke,createCodeAssistant:Ae,createAccessibilityAssistant:we},Et={orchestrator:Ce,assistantOrchestrator:Se,layoutAssistant:xe,codeAssistant:Te,styleAssistant:Ie,iconAssistant:Ne,accessibilityAssistant:Ee,gettingStartedAssistant:Re},Rt={orchestrator:Pe,assistantOrchestrator:De,layoutAssistant:Oe,styleAssistant:Ge,iconAssistant:Ue,codeAssistant:Le,accessibilityAssistant:Me},Pt={Orchestrator:{render:_},Validator:{render:$},SharedValidation:{getSteps:D}},Dt={Angular:{steps:J,additionalPlan:X},React:{steps:ee}},h={Tools:Nt,ToolNames:Et,ToolDescriptions:Rt,Templates:Pt,Validation:Dt};var Ot=h.ToolNames.codeAssistant("kendo"),$e=()=>`# Kendo Design System Guidelines for ${l}
|
|
720
735
|
|
|
721
736
|
## Setting up Styles/CSS
|
|
722
737
|
|
|
@@ -745,7 +760,7 @@ Alternatively, you can also consume them directly from the Unpkg CDN.
|
|
|
745
760
|
|
|
746
761
|
In the ${l} there are available components to create layout. Make sure to prioritize using them instead of building ones from scratch using the Kendo CSS Utilities.
|
|
747
762
|
|
|
748
|
-
For any Layout component you can also call the ${
|
|
763
|
+
For any Layout component you can also call the ${Ot} tool in order to get specific API reference and docs.
|
|
749
764
|
|
|
750
765
|
- ${l} Card component.
|
|
751
766
|
- Generally, it is recommended to use 100% width (e.g., \`<kendo-card width="100%">\`)
|
|
@@ -953,17 +968,17 @@ export class ThemeService {
|
|
|
953
968
|
}
|
|
954
969
|
}
|
|
955
970
|
\`\`\`
|
|
956
|
-
`;var
|
|
971
|
+
`;var Be=h.ToolNames.codeAssistant("kendo"),qe=()=>`## Using ${l} Icons
|
|
957
972
|
|
|
958
|
-
Important:
|
|
973
|
+
Important: Always prefer SVG icons over font icons. Only fall back to font icons if SVG is explicitly not an option.
|
|
959
974
|
|
|
960
975
|
### Guidelines
|
|
961
976
|
|
|
962
977
|
- Make sure @progress/kendo-svg-icons is installed.
|
|
963
978
|
- Make sure @progress/kendo-angular-icons is installed.
|
|
964
|
-
- You can call ${
|
|
965
|
-
- [optional] If SVG is not an option fallback to
|
|
966
|
-
- [optional] If using font icons you can call ${
|
|
979
|
+
- You can call ${Be} tool for ${l} SVGIcon component for docs and API reference.
|
|
980
|
+
- [optional] If SVG is not an option fallback to font icon - make sure \`<link rel="stylesheet" href="https://unpkg.com/@progress/kendo-font-icons/dist/index.css" />\` is added as a reference.
|
|
981
|
+
- [optional] If using font icons you can call ${Be} tool for ${l} Icon component for docs and API reference.
|
|
967
982
|
|
|
968
983
|
### Examples
|
|
969
984
|
|
|
@@ -1004,7 +1019,7 @@ import { KENDO_ICONS } from "@progress/kendo-angular-icons";
|
|
|
1004
1019
|
})
|
|
1005
1020
|
export class AppComponent {}
|
|
1006
1021
|
\`\`\`
|
|
1007
|
-
`;var Fe=e=>{let t=e.component?.trim().toLowerCase(),s=
|
|
1022
|
+
`;var Fe=e=>{let t=e.component?.trim().toLowerCase(),s=ge.get(t),o=`## ${l} Common Guidelines
|
|
1008
1023
|
|
|
1009
1024
|
`;return s&&(o+=`### Package Installation
|
|
1010
1025
|
Always use minimal, targeted package installation.
|
|
@@ -1021,12 +1036,17 @@ For ${e.component} component: \`ng add ${s}\`
|
|
|
1021
1036
|
|
|
1022
1037
|
${e.componentInstructions}
|
|
1023
1038
|
`),o+=`
|
|
1039
|
+
## Icons
|
|
1040
|
+
|
|
1041
|
+
When icons are needed, always prefer SVG icons over font icons.
|
|
1042
|
+
Only fall back to font icons if SVG icons are explicitly not an option.
|
|
1043
|
+
`,o+=`
|
|
1024
1044
|
## Types and Interfaces
|
|
1025
1045
|
|
|
1026
|
-
|
|
1027
|
-
|
|
1028
|
-
|
|
1029
|
-
`,o};function
|
|
1046
|
+
Always use the correct ${l} types for component inputs, outputs, and event handler parameters.
|
|
1047
|
+
Do not substitute plain strings, plain objects, or \`any\` for a typed union, enum, or interface provided by the library.
|
|
1048
|
+
Import all required types from the appropriate ${l} package.
|
|
1049
|
+
`,o};function Ke(e="kendo-angular-app",t=!0,s="default"){let o=t?`These instructions will walk you through creating a new Angular project and setting up ${l}.`:`These instructions will walk you through adding ${l} to your existing Angular project.`,n=1,r=t?`## Step ${n++}: Install Angular CLI
|
|
1030
1050
|
|
|
1031
1051
|
First, ensure the Angular CLI is installed globally:
|
|
1032
1052
|
|
|
@@ -1262,7 +1282,7 @@ export class App {}
|
|
|
1262
1282
|
cd ${e} && ng serve
|
|
1263
1283
|
\`\`\`
|
|
1264
1284
|
|
|
1265
|
-
`}var
|
|
1285
|
+
`}var We=`
|
|
1266
1286
|
## Grid Data Binding
|
|
1267
1287
|
|
|
1268
1288
|
MUST use kendoGridBinding directive for basic Grid operations
|
|
@@ -1297,10 +1317,12 @@ onFilterChange(filter: CompositeFilterDescriptor): void {
|
|
|
1297
1317
|
|
|
1298
1318
|
## kendoButton Must Not Be Combined with Command Directives
|
|
1299
1319
|
|
|
1300
|
-
Never apply kendoButton to the same element as any of these Grid command directives - they render their own button internally.
|
|
1320
|
+
Never apply kendoButton to the same element as any of these Grid command directives - they render their own button internally.
|
|
1301
1321
|
Instead, apply only the command directive to the button element.
|
|
1302
1322
|
Placing kendoButton on the same host element introduces a second component on the same node, which Angular does not allow and causes a runtime error.
|
|
1303
1323
|
|
|
1324
|
+
Grid command directives must be nested within the <kendo-grid> component to function correctly - they depend on the Grid context to operate. Using them outside of <kendo-grid> will cause a runtime error.
|
|
1325
|
+
|
|
1304
1326
|
Affected directives:
|
|
1305
1327
|
- kendoGridExcelCommand
|
|
1306
1328
|
- kendoGridCSVCommand
|
|
@@ -1313,12 +1335,20 @@ Affected directives:
|
|
|
1313
1335
|
|
|
1314
1336
|
WRONG: <button kendoGridExcelCommand kendoButton>Export to Excel</button>
|
|
1315
1337
|
CORRECT: <button kendoGridExcelCommand>Export to Excel</button>
|
|
1338
|
+
|
|
1339
|
+
## Deprecated Properties & Modern Replacement
|
|
1340
|
+
|
|
1341
|
+
Column width Property: The width property for columns should be set as a number for pixel values, not a string.
|
|
1342
|
+
CORRECT: <kendo-grid-column [width]="120">
|
|
1343
|
+
WRONG: <kendo-grid-column width="120px">
|
|
1316
1344
|
`;var Ve=`
|
|
1317
1345
|
## kendoButton Must Not Be Combined with Command Directives
|
|
1318
1346
|
|
|
1319
|
-
Never apply kendoButton to the same element as any of these TreeList command directives - they render their own button internally.
|
|
1347
|
+
Never apply kendoButton to the same element as any of these TreeList command directives - they render their own button internally.
|
|
1320
1348
|
Placing kendoButton on the same host element introduces a second component on the same node, which Angular does not allow and causes a runtime error.
|
|
1321
1349
|
|
|
1350
|
+
TreeList command directives must be nested within the <kendo-treelist> component to function correctly - they depend on the TreeList context to operate. Using them outside of <kendo-treelist> will cause a runtime error.
|
|
1351
|
+
|
|
1322
1352
|
Affected directives:
|
|
1323
1353
|
- kendoTreeListExcelCommand
|
|
1324
1354
|
- kendoTreeListPDFCommand
|
|
@@ -1331,6 +1361,8 @@ CORRECT: <button kendoTreeListExcelCommand>Export to Excel</button>
|
|
|
1331
1361
|
Never apply kendoButton to the same element as any of these ListView command directives - they render their own button internally.
|
|
1332
1362
|
Placing kendoButton on the same host element introduces a second component on the same node, which Angular does not allow and causes a runtime error.
|
|
1333
1363
|
|
|
1364
|
+
ListView command directives must be nested within the <kendo-listview> component to function correctly \u2014 they depend on the ListView context to operate. Using them outside of <kendo-listview> will cause a runtime error.
|
|
1365
|
+
|
|
1334
1366
|
Affected directives:
|
|
1335
1367
|
- kendoListViewAddCommand
|
|
1336
1368
|
- kendoListViewEditCommand
|
|
@@ -1340,23 +1372,27 @@ Affected directives:
|
|
|
1340
1372
|
|
|
1341
1373
|
WRONG: <button kendoListViewAddCommand kendoButton>Add</button>
|
|
1342
1374
|
CORRECT: <button kendoListViewAddCommand>Add</button>
|
|
1343
|
-
`;var
|
|
1375
|
+
`;var ze=`
|
|
1344
1376
|
## kendoButton Must Not Be Combined with Command Directives
|
|
1345
1377
|
|
|
1346
1378
|
Never apply kendoButton to the same element as the Scheduler PDF command directive - it renders its own button internally.
|
|
1347
1379
|
Placing kendoButton on the same host element introduces a second component on the same node, which Angular does not allow and causes a runtime error.
|
|
1348
1380
|
|
|
1381
|
+
Scheduler command directives must be nested within the <kendo-scheduler> component to function correctly \u2014 they depend on the Scheduler context to operate. Using them outside of <kendo-scheduler> will cause a runtime error.
|
|
1382
|
+
|
|
1349
1383
|
Affected directives:
|
|
1350
1384
|
- kendoSchedulerPDFCommand
|
|
1351
1385
|
|
|
1352
1386
|
WRONG: <button kendoSchedulerPDFCommand kendoButton>Export to PDF</button>
|
|
1353
1387
|
CORRECT: <button kendoSchedulerPDFCommand>Export to PDF</button>
|
|
1354
|
-
`;var
|
|
1388
|
+
`;var He=`
|
|
1355
1389
|
## kendoButton Must Not Be Combined with Action Directives
|
|
1356
1390
|
|
|
1357
1391
|
Never apply kendoButton to the same element as any of these Window action directives - they render their own button internally.
|
|
1358
1392
|
Placing kendoButton on the same host element introduces a second component on the same node, which Angular does not allow and causes a runtime error.
|
|
1359
1393
|
|
|
1394
|
+
Window action directives must be nested within the <kendo-window> component to function correctly \u2014 they depend on the Window context to operate. Using them outside of <kendo-window> will cause a runtime error.
|
|
1395
|
+
|
|
1360
1396
|
Affected directives:
|
|
1361
1397
|
- kendoWindowCloseAction
|
|
1362
1398
|
- kendoWindowMaximizeAction
|
|
@@ -1365,7 +1401,7 @@ Affected directives:
|
|
|
1365
1401
|
|
|
1366
1402
|
WRONG: <button kendoWindowCloseAction kendoButton></button>
|
|
1367
1403
|
CORRECT: <button kendoWindowCloseAction></button>
|
|
1368
|
-
`;var
|
|
1404
|
+
`;var Ye=`
|
|
1369
1405
|
## Charts Data Binding
|
|
1370
1406
|
|
|
1371
1407
|
Never bind the Chart's data to a getter property. Using a getter causes the chart to rerender on every Angular change detection cycle.
|
|
@@ -1373,7 +1409,7 @@ Never bind the Chart's data to a getter property. Using a getter causes the char
|
|
|
1373
1409
|
BAD: get chartData() { return [ /* data items */ ] }
|
|
1374
1410
|
GOOD: public chartData = [ /* data items */ ];
|
|
1375
1411
|
GOOD: public chartData = this.data.map(...)
|
|
1376
|
-
`;var
|
|
1412
|
+
`;var Qe=["combobox","dropdownlist","dropdowntree","multicolumncombobox","multiselect","multiselecttree","autocomplete"],Je=e=>e==="autocomplete"?Ut:e==="dropdowntree"?Lt:e==="multiselecttree"?Mt:e==="multicolumncombobox"?$t:Gt(e),Gt=e=>`
|
|
1377
1413
|
## ${e}
|
|
1378
1414
|
When implementing or updating the ${e} component, always follow these rules for \`textField\` and \`valueField\`:
|
|
1379
1415
|
|
|
@@ -1423,7 +1459,7 @@ If \`valuePrimitive\` is false, which is the default, the value must be an objec
|
|
|
1423
1459
|
\`\`\`typescript
|
|
1424
1460
|
public selectedValue = { id: 2, name: 'B' };
|
|
1425
1461
|
\`\`\`
|
|
1426
|
-
`,
|
|
1462
|
+
`,Ut=`
|
|
1427
1463
|
## AutoComplete
|
|
1428
1464
|
|
|
1429
1465
|
### Primitive Data
|
|
@@ -1431,7 +1467,7 @@ If the data is an array of primitives (e.g., [data]="['A', 'B']"), never set \`v
|
|
|
1431
1467
|
|
|
1432
1468
|
### Complex Data
|
|
1433
1469
|
If the data is an array of objects (e.g., [data]="[{ id, name }]"), always set \`valueField\` to a string property for value binding (e.g., "id").
|
|
1434
|
-
`,
|
|
1470
|
+
`,Lt='\n## DropDownTree\nWhen implementing or updating the DropDownTree component, always follow these rules:\n\nAlways set both `textField` and `valueField`:\n- `textField` is the property to display (e.g., "name")\n- `valueField` is the property for value binding (e.g., "id")\nWhen `valueField` and `textField` are string[], always specify `valueDepth`.\n\n### Primitive `value`\nIf the `value` is of a primitive type, `valuePrimitive` must be true and `dataItem` is required.\nThe `value` property of the `dataItem` will be associated with the `valueField`.\n',Mt='\n## MultiSelectTree\nWhen implementing or updating the MultiSelectTree component, always follow these rules:\n\nAlways set both `textField` and `valueField`:\n- `textField` is the property to display (e.g., "name")\n- `valueField` is the property for value binding (e.g., "id")\nWhen `valueField` and `textField` are string[], always specify `valueDepth`.\n\n### Primitive `value`\nIf the `value` is of a primitive type, `valuePrimitive` must be true and `dataItems` is required.\nThe `value` property of the `dataItems` will be associated with the `valueField`.\n',$t='\n## MultiColumnComboBox\nWhen implementing or updating the MultiColumnComboBox component, always follow these rules:\n\nAlways set both `textField` and `valueField`:\n- `textField` is the property to display (e.g., "name")\n- `valueField` is the property for value binding (e.g., "id")\n\n### Primitive `value`\nIf the `value` is of a primitive type, `valuePrimitive` must be true.\n';var Xe=`
|
|
1435
1471
|
|
|
1436
1472
|
## Smart Grid (AI-Enhanced) Instructions
|
|
1437
1473
|
|
|
@@ -1450,6 +1486,6 @@ Suggestion Examples by Domain:
|
|
|
1450
1486
|
|
|
1451
1487
|
Required Disclaimer:
|
|
1452
1488
|
"The examples use a Telerik-hosted AI service for demonstration purposes only. For production applications, use an AI service that understands your specific domain, data, and business requirements."
|
|
1453
|
-
`;function
|
|
1489
|
+
`;var Ze=["button","buttongroup","splitbutton","dropdownbutton","chip","chiplist","floatingactionbutton","smartpastebutton","speechtotextbutton"],et=e=>e==="button"||e==="buttongroup"||e==="splitbutton"||e==="dropdownbutton"||e==="chip"?_t:"",_t='\n## Deprecated Properties & Modern Replacements\n\nButton `look` property: The `look` property is deprecated. Use `fillMode` instead.\n Type: `ButtonFillMode = "solid" | "flat" | "outline" | "link" | "clear"`\n CORRECT: <button kendoButton fillMode="flat">Button</button>\n WRONG: <button kendoButton look="flat">Button</button>\n\nButton `primary` property: The `primary` property is deprecated. Use `themeColor="primary"` instead.\n CORRECT: <button kendoButton themeColor="primary">Button</button>\n WRONG: <button kendoButton [primary]="true">Button</button>\n';function Bt(e){let t=e?.trim().toLowerCase();if(t==="grid")return[We,Xe].join(`
|
|
1454
1490
|
|
|
1455
|
-
`);if(t==="treelist")return Ve;if(t==="listview")return je;if(t==="scheduler")return
|
|
1491
|
+
`);if(t==="treelist")return Ve;if(t==="listview")return je;if(t==="scheduler")return ze;if(t==="window")return He;if(t==="charts")return Ye;if(Qe.includes(t))return Je(t);if(Ze.includes(t))return et(t)}var tt=h.ToolNames.layoutAssistant(E),te=h.ToolNames.codeAssistant(E),ot=h.ToolNames.styleAssistant(E),oe=h.ToolNames.iconAssistant(E),nt=h.ToolNames.gettingStartedAssistant(E),st=h.ToolNames.accessibilityAssistant(E);function at(e,t){return[h.Tools.createOrchestrator({name:h.ToolNames.orchestrator(E),title:"Kendo UI Generator",description:h.ToolDescriptions.orchestrator(l),layoutAssistantName:tt,codeAssistantName:te,styleAssistantName:ot,iconAssistantName:oe,accessibilityAssistantName:st,suiteName:l,libKey:T,components:L,requiredAccess:["agent"]},{validationSteps:h.Validation.Angular.steps,injectedPlan:h.Validation.Angular.additionalPlan},e),h.Tools.createAssistantOrchestrator({name:"kendo_angular_assistant",title:"Kendo UI Assistant",description:h.ToolDescriptions.assistantOrchestrator(l),codeAssistantName:te,iconAssistantName:oe,suiteName:l,libKey:T,components:L,requiredAccess:["assistant"]},e),h.Tools.createLayoutAssistant({name:tt,title:"Kendo UI Layout Assistant",description:h.ToolDescriptions.layoutAssistant,suiteName:l,libKey:T,getPreContent:$e,requiredAccess:["agent"]},e),h.Tools.createStyleAssistant({name:ot,title:"Kendo UI Style Assistant",description:h.ToolDescriptions.styleAssistant,libKey:T,getPreContent:_e,requiredAccess:["agent"]},e),h.Tools.createIconSearch({name:oe,title:"Kendo UI Icon Assistant",description:h.ToolDescriptions.iconAssistant,libKey:T,getPostContent:qe,requiredAccess:["assistant","agent"]},e),h.Tools.createCodeAssistant({name:te,title:"Kendo UI Component Assistant",description:h.ToolDescriptions.codeAssistant(l),libKey:T,suiteName:l,components:L,getPostContent:({component:o})=>{let n=Bt(o);return Fe({component:o,componentInstructions:n})},requiredAccess:["assistant","agent"]},e),(()=>{let o=new C(nt,{title:"Kendo UI Getting Started",description:`Creates a new Angular project with Angular CLI and provides essential getting started guidance for ${l} including installation, configuration, and setup instructions.`,requiredAccess:["agent"],inputSchema:me(l,"kendo-angular-app")},async({projectName:n,createNewProject:r,theme:a},{_meta:i})=>{let d=x(o,i);try{await e.recordToolUserRequest({toolName:nt,meta:{projectName:n,createNewProject:r,theme:a,...d}})}catch(m){console.error("Error recording tool request:",m)}return{content:[{type:"text",text:Ke(n,r,a)}]}});return o})(),h.Tools.createAccessibilityAssistant({name:st,title:"Kendo UI Accessibility Assistant",description:h.ToolDescriptions.accessibilityAssistant(l),libKey:T,suiteName:l,components:L,requiredAccess:["agent"]},e)].filter(o=>o.hasAccess(t))}var Vt=Wt(import.meta.url),jt=it.dirname(Vt),zt=it.resolve(jt,"../package.json"),lt=JSON.parse(Kt.readFileSync(zt,"utf-8")),rt=new qt({name:"kendo-mcp",title:"Kendo MCP Server",version:lt.version});async function Ht(){let e=new Ft;b("Starting server...");let t=await de(async()=>{let o=(await he())?.entitlement;return o?.Product?.Code||o?.product?.code});t!=="none"&&(M.toolNameHeader=t==="agent"||t==="full"?"agent":"assistant",at(M,t).forEach(o=>o.register(rt)),ue({serverName:"angular",contextApi:M,enrichWithUserData:!0,additionalFields:{version:lt.version,access_type:t}})),await rt.connect(e)}Ht();
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@progress/kendo-angular-mcp",
|
|
3
|
-
"version": "1.
|
|
3
|
+
"version": "1.7.0",
|
|
4
4
|
"type": "module",
|
|
5
5
|
"bin": "./dist/index.js",
|
|
6
6
|
"license": "See LICENSE.md",
|
|
@@ -26,7 +26,7 @@
|
|
|
26
26
|
"@grpc/grpc-js": "^1.14.3",
|
|
27
27
|
"@grpc/proto-loader": "^0.8.0",
|
|
28
28
|
"@modelcontextprotocol/sdk": "^1.29.0",
|
|
29
|
-
"@progress/kendo-licensing": "^1.
|
|
29
|
+
"@progress/kendo-licensing": "^1.11.1",
|
|
30
30
|
"tslib": "^2.3.0"
|
|
31
31
|
},
|
|
32
32
|
"devDependencies": {
|