@progress/kendo-angular-mcp 1.6.1-beta.d2eee4d2.0 → 1.7.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/index.js +199 -377
- package/package.json +3 -3
- package/proto/service.proto +0 -4
package/dist/index.js
CHANGED
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
#!/usr/bin/env node
|
|
2
|
-
import{McpServer as
|
|
3
|
-
`,
|
|
2
|
+
import{McpServer as oo}from"@modelcontextprotocol/sdk/server/mcp.js";import{StdioServerTransport as no}from"@modelcontextprotocol/sdk/server/stdio.js";import{dirname as Ot,join as Ut}from"path";import{fileURLToPath as Gt}from"url";import{loadLicense as wt,decodeLicenseKey as Ct,decodeLicenseEvidence as St}from"@progress/kendo-licensing/utils";var z=class extends Error{constructor(t){super(t),this.name="LicenseError"}};function pe(e){return e.replace(/^\uFEFF/,"")}async function Y(e){let t=null,n=null;try{let o=wt();if(!o.success){let s=new z(o.message);throw e&&await e("license_load_failed",{error:o.message}).catch(()=>{}),s}try{t=(await Ct(o.value)).licenses.find(async i=>!!(await St(i)).userId)}catch(s){console.log(s.message),e&&await e("license_load_failed",{error:s.message||"Unknown decoding error"}).catch(()=>{})}if(!t)return[pe(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[pe(t),null]}import L from"node:fs";import j from"node:path";var H=!1,O=process.env.DEBUG_LOG_FILE,ue=!!(O&&typeof O=="string");if(ue){let e=j.resolve(O),t=j.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 H=!1;H=ue&&!!O&&L.existsSync(j.resolve(O));function k(...e){if(H&&O){let o=`${new Date().toISOString()}: ${e.join(" ")}
|
|
3
|
+
`,s=j.resolve(O);L.appendFile(s,o,i=>{i&&console.error("Error writing to log file:",i)})}}import xt from"@grpc/proto-loader";import $ from"@grpc/grpc-js";import he from"path";import me from"fs";import{fileURLToPath as Tt}from"url";var It=Tt(import.meta.url),Nt=he.dirname(It),fe={version:"unknown"},ge=he.resolve(Nt,"../package.json");me.existsSync(ge)&&(fe=JSON.parse(me.readFileSync(ge,"utf-8")));function Et(e){return e.replace(/\u2014/g,"--").replace(/\u2013/g,"-").replace(/[^\x20-\x7E]/g,"")}var V=class{constructor(t,n,o){this.contextApiUrl=t;this.protoPath=n;this.options=o;this.toolNameHeader="assistant";let s=xt.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"),k("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 Et(JSON.stringify({...t,source:"npm",version:fe.version,os:process.platform,node_version:process.version}))}async getMetadata({meta:t}={meta:{}}){let[n,o]=this.isDev?["fake_license",null]:await Y((p,u)=>this.logEvent(p,u)),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 i=new P.Metadata;if(r)try{i.add("x-license-key",s)}catch(p){throw g("Error adding license key to metadata:",p),new Error(`Failed to use license key: ${p.message}`)}a&&i.add("x-api-key",n),this.options?.libName&&i.add("x-library-name",this.options.libName),i.add("x-tool-name",this.toolNameHeader);let d=JSON.stringify({...t,source:"npm",version:ue.version,os:process.platform,node_version:process.version});return i.add("x-request-metadata",vt(d)),i}async query(t,s){let o=await this.getMetadata({meta:s});return new Promise((n,a)=>{this.client.query(t,o,(r,i)=>{r?a(new Error(r)):n(i)})})}async getApiRefMatches(t,s){let o=await this.getMetadata({meta:s});return new Promise((n,a)=>{this.client.getApiRefMatches(t,o,(r,i)=>{r?a(new Error(r)):n(i)})})}async queryCssUtils(t,s){let o=await this.getMetadata({meta:s});return new Promise((n,a)=>{this.client.cssUtilsSearch(t,o,(r,i)=>{r?(g("Error querying CSS Utils:",r),a(new Error(r))):n(i)})})}async queryIconsSearch(t,s){let o=await this.getMetadata({meta:s});return new Promise((n,a)=>{this.client.iconsSearch(t,o,(r,i)=>{r?(g("Error querying Icons Search:",r),a(new Error(r))):n(i)})})}async queryBuildingBlocks(t,s){let o=await this.getMetadata({meta:s});return new Promise((n,a)=>{this.client.buildingBlocksSearch(t,o,(r,i)=>{r?(g("Error querying Building Blocks:",r),a(new Error(r))):n(i)})})}async validateUserLicense(){let t=await this.getMetadata();return new Promise((s,o)=>{this.client.validateUserLicense(null,t,(n,a)=>{n?(g("Error validating user license:",n),o(new Error(n))):s(a)})})}async queryThemeGenerate(t,s){let o=await this.getMetadata({meta:s});return new Promise((n,a)=>{this.client.generateTheme(t,o,(r,i)=>{r?(g("Error querying context API/GenerateTheme:",r),a(new Error(r))):n(i)})})}async recordOrchestratorUserRequest({meta:t}){let s=await this.getMetadata({meta:t});return new Promise((o,n)=>{this.client.recordOrchestratorUserRequest(null,s,(a,r)=>{a?(g("Error recording orchestrator user request:",a),n(new Error(a))):o(r)})})}async recordToolUserRequest({toolName:t,meta:s}){let o=await this.getMetadata({meta:s});return new Promise((n,a)=>{this.client.recordToolUserRequest({tool_name:t},o,(r,i)=>{r?(g("Error recording tool user request:",r),a(new Error(r))):n(i)})})}async logEvent(t,s){let o=process.env.LOGGING_API_KEY;if(!o||typeof o!="string"){g("LOGGING_API_KEY not configured, skipping log event");return}let n=new P.Metadata;return n.add("x-api-key",o),new Promise((a,r)=>{this.client.logEvent({event_name:t,fields:s||{}},n,(i,d)=>{i?(g("Error logging event:",i),r(new Error(i))):a()})})}};import{z as K}from"zod";var yo=K.object({user_id:K.string(),user_email:K.string().email()});import{z as v}from"zod";var At=v.object({Product:v.object({Id:v.number().int(),Code:v.string(),Name:v.string()}),License:v.nullable(v.object({Id:v.number().int(),Name:v.string(),Type:v.string(),Active:v.boolean()})),Availability:v.array(v.object({LicenseStart:v.nullable(v.string().datetime()),LicenseEnd:v.nullable(v.string().datetime())})),IsLicenseAvailable:v.optional(v.boolean())}),vo=v.array(At);async function me(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 ge(){return'**Accessibility Guidelines: WCAG 2.2 Level AA Compliance**\n\n**Core Principles:**\n1. Use semantic HTML and ARIA correctly\n2. Ensure WCAG 2.2 AA compliance\n3. Follow W3C ARIA Authoring Practices\n4. Provide standards-based accessibility fixes\n\n**1. Form Control Labels** (WCAG 1.3.1, 3.3.2, 4.1.2)\nEvery input must have an associated label.\nCORRECT: `<input type="search" aria-label="Search products" placeholder="Search...">`\nCORRECT: `<label for="qty">Quantity</label><input type="number" id="qty">`\nWRONG: `<span>Email</span><input type="email">` (no association)\nWRONG: `<input type="email" placeholder="Email">` (placeholder as label)\n\n**2. Button Accessibility** (WCAG 4.1.2, 2.4.6, 2.5.3)\nAll buttons need accessible names describing their purpose.\nCORRECT: `<button type="button">Save Changes</button>`\nCORRECT: `<button aria-label="Close dialog"><svg aria-hidden="true" focusable="false">...</svg></button>`\nWRONG: `<button><svg>...</svg></button>` (no accessible name)\nWRONG: `<button>Click here</button>` (generic text)\n\n**3. Popup/Menu Triggers** (WCAG 4.1.2, 1.3.1)\nIndicate popup purpose and state using aria-haspopup, aria-expanded, aria-controls.\nCORRECT: `<button aria-expanded="false" aria-haspopup="menu" aria-controls="menu-id">Settings</button>`\n\n**4. Image Accessibility** (WCAG 1.1.1)\nInformative: `<img src="chart.png" alt="Sales increased 25% in Q4 2024">`\nFunctional: `<a href="/home"><img src="logo.png" alt="Company Name Home"></a>`\nDecorative: `<img src="border.png" alt="" role="presentation">`\nComplex: `<img src="chart.png" alt="Sales data" aria-describedby="desc-id">`\nWRONG: Missing alt, filename as alt, generic alt for decorative images\n\n**5. Link Accessibility** (WCAG 2.4.4, 2.4.6)\nLinks must be descriptive and understandable out of context.\nCORRECT: `<a href="/products">View All Products</a>`\nCORRECT: `<a href="/article" aria-label="Read more about New Product Launch">Read more</a>`\nWRONG: "Click here", "Read more", "Learn more" without context\n\n**6. Form Validation** (WCAG 3.3.1, 3.3.2, 3.3.3)\nErrors must be identified, associated with inputs, and provide suggestions. Use aria-describedby, aria-invalid="true", and role="alert".\n\n**7. Heading Structure** (WCAG 1.3.1, 2.4.6)\nEach page must have an `<h1>` that describes its content. Use hierarchical, descriptive headings with no skipped levels (h1\u2192h2\u2192h3).\nCORRECT: `<h1>Dashboard</h1> <h2>Sales</h2> <h3>By Region</h3>`\nWRONG: No `<h1>` on the page, or skipping levels (h1\u2192h3)\nIf a heading should look smaller than its semantic level, use CSS: `<h2 class="text-sm">Subtitle</h2>`\n\n**8. Page Component Landmark Rules** (WCAG 1.3.1, 4.1.2)\nPage components (route components) may be rendered inside a layout that already provides `<main>`, `<header>`, or `<footer>`. Since the layout configuration is unknown, avoid using these landmarks in page components to prevent potential duplication and nesting violations. Use `<div>`, `<section>`, or `<article>` as the top-level wrapper instead.\n- Avoid adding `<main>`, `role="main"`, `<header>`, or `<footer>` in page components \u2014 the layout typically provides them. Duplicating them can cause `landmark-no-duplicate-main` and `landmark-main-is-top-level` violations.\n- Avoid adding `role="banner"` or using a semantic `<header>` element in page components \u2014 the layout\'s `<header>` already claims the banner landmark. Adding another causes `landmark-banner-is-top-level` violations.\n- Avoid adding `role="contentinfo"` to elements inside page components \u2014 the contentinfo landmark should be a top-level landmark, not nested inside `<main>` or other landmarks. Nesting it can cause `landmark-contentinfo-is-top-level` violations.\n- When multiple `<section>` or `<nav>` elements exist on a page, give each a unique `aria-label` to avoid `landmark-unique` violations.\n\n**9. ARIA Role and Attribute Restrictions** (WCAG 4.1.2)\nOnly use ARIA roles that are valid for the given HTML element. Avoid adding `aria-label` or `aria-labelledby` to elements that do not permit naming.\n- `<article>` has an implicit `article` role. Do NOT override it with `role="listitem"`, `role="button"`, `role="link"`, or any other role \u2014 none are allowed on `<article>`. Use `<li>` for list items, `<button>` for interactive cards, or `<a>` for clickable cards instead.\n- `<button>` already has an implicit `button` role. Do NOT add `role="listitem"` or other incompatible roles.\n- `<span>` and `<div>` without roles are generic elements. Do NOT add `aria-label` to them \u2014 it is a prohibited attribute on elements with no accessible role and can cause `aria-prohibited-attr` violations. Instead, use `role="img"` + `aria-label` for visual indicators, or use visually hidden text.\n- Do NOT add `aria-label` to non-interactive `<div>` wrappers \u2014 it has no effect and triggers violations.\n- `aria-pressed` is only valid on elements with `role="button"`, `role="checkbox"`, `role="menuitemcheckbox"`, `role="option"`, `role="radio"`, or `role="switch"`. Do NOT use `aria-pressed` on elements with `role="listitem"` or other roles.\nCORRECT: `<ul role="list"><li class="product-card">...</li></ul>` (listitem inside list)\nCORRECT: `<span role="img" aria-label="Status: pending" class="status-dot"></span>` (role added before aria-label)\nCORRECT: `<span class="status-dot" aria-hidden="true"></span><span class="visually-hidden">Pending</span>` (hidden text alternative)\nWRONG: `<article role="listitem">` (listitem not allowed on article)\nWRONG: `<article role="button">` (button not allowed on article \u2014 use `<button>` or `<div role="button">`)\nWRONG: `<span aria-label="pending" class="status-dot"></span>` (aria-label prohibited on generic span)\nWRONG: `<div aria-label="Product badges" class="badges"></div>` (aria-label prohibited on generic div)\n\n**Quick Checklist:**\n- **Forms:** Associated labels, aria-required on required fields, autocomplete attributes, aria-describedby for errors, aria-invalid for invalid fields, fieldsets with legends\n- **Buttons/Links:** Accessible names, aria-label for icon buttons, aria-hidden on decorative icons, descriptive link text\n- **Popups/Dialogs:** aria-haspopup, aria-expanded, aria-controls, role="dialog", aria-modal="true", aria-labelledby, focus trap, Escape to close\n- **Images:** alt on all images, descriptive alt for informative, empty alt for decorative, aria-describedby for complex\n- **Structure:** One h1, logical heading hierarchy, avoid `<main>`, `<header>`, `<footer>`, `role="main"`, `role="contentinfo"`, `role="banner"` in page/route components (the layout may already provide them), use `<section>` or `<div>` as page-level wrappers, unique aria-labels on duplicate landmark types\n- **ARIA Rules:** Avoid adding `aria-label` to generic `<span>`/`<div>` without a role, avoid using `role="listitem"` or `role="button"` on `<article>` \u2014 use `<li>` for list items, add `role="img"` before `aria-label` on visual indicators, `aria-pressed` only on button-like roles\n- **Scrollable Regions:** Any scrollable container must have `tabindex="0"` or contain keyboard-interactive children\n- **Nested Interactive:** Do not add interactive role/tabindex to a container that already has focusable children\n- **List Roles:** `role="list"` containers must have `role="listitem"` children \u2014 prefer `<ul>/<li>` natively\n- **Dynamic Content:** role="status"/aria-live="polite" for updates, role="alert"/aria-live="assertive" for critical alerts\n- **Keyboard/Focus:** All interactive elements keyboard accessible, logical focus order, visible focus indicators, no keyboard traps (except modals)\n- **Color/Contrast:** 4.5:1 text contrast (3:1 large text), 3:1 UI component contrast, no color-only information, 3:1 focus indicator contrast'}var wt=1440*60*1e3;function he(e){let{serverName:t,contextApi:s,additionalFields:o={},intervalMs:n=wt}=e,a="mcp_server_heartbeat",r=async()=>{try{let d={server_name:t,timestamp:new Date().toISOString(),...o};await s.logEvent(a,d)}catch(d){g(`Failed to send heartbeat for ${t}:`,d)}};r();let i=setInterval(r,n);return()=>{clearInterval(i),g(`Heartbeat stopped for ${t}`)}}import{z as j}from"zod";var St=["default","bootstrap","material","fluent"];function fe(e,t){return{projectName:j.string().default(t).describe("The name of the project. Used as the project folder name when creating a new project."),createNewProject:j.boolean().default(!0).describe(`Whether to create a new project before configuring ${e}. Set to true to scaffold a brand-new project, or false if the project already exists and you only want to add ${e} to it.`),theme:j.enum(St).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"],ye=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 It=Tt(Ct(xt(import.meta.url)),"../proto/service.proto"),L=new M("test.contextapi.telerik.com:443",It,{libName:T});var be=async()=>L.validateUserLicense();import zt from"fs";import ct from"path";import{fileURLToPath as Yt}from"url";import{z as k}from"zod";var S=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 U=(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(p){throw k("Error adding license key to metadata:",p),new Error(`Failed to use license key: ${p.message}`)}return i&&r.add("x-api-key",s),this.options?.libName&&r.add("x-library-name",this.options.libName),r.add("x-tool-name",this.toolNameHeader),r.add("x-request-metadata",this.buildRequestMetadata(t)),r}async query(t,n){let o=await this.getMetadata({meta:n});return new Promise((s,i)=>{this.client.query(t,o,(a,r)=>{a?i(new Error(a)):s(r)})})}async getApiRefMatches(t,n){let o=await this.getMetadata({meta:n});return new Promise((s,i)=>{this.client.getApiRefMatches(t,o,(a,r)=>{a?i(new Error(a)):s(r)})})}async queryCssUtils(t,n){let o=await this.getMetadata({meta:n});return new Promise((s,i)=>{this.client.cssUtilsSearch(t,o,(a,r)=>{a?(k("Error querying CSS Utils:",a),i(new Error(a))):s(r)})})}async queryIconsSearch(t,n){let o=await this.getMetadata({meta:n});return new Promise((s,i)=>{this.client.iconsSearch(t,o,(a,r)=>{a?(k("Error querying Icons Search:",a),i(new Error(a))):s(r)})})}async queryBuildingBlocks(t,n){let o=await this.getMetadata({meta:n});return new Promise((s,i)=>{this.client.buildingBlocksSearch(t,o,(a,r)=>{a?(k("Error querying Building Blocks:",a),i(new Error(a))):s(r)})})}async validateUserLicense(){let t=await this.getMetadata();return new Promise((n,o)=>{this.client.validateUserLicense(null,t,(s,i)=>{s?(k("Error validating user license:",s),o(new Error(s))):n(i)})})}async queryThemeGenerate(t,n){let o=await this.getMetadata({meta:n});return new Promise((s,i)=>{this.client.generateTheme(t,o,(a,r)=>{a?(k("Error querying context API/GenerateTheme:",a),i(new Error(a))):s(r)})})}async recordOrchestratorUserRequest({meta:t}){let n=await this.getMetadata({meta:t});return new Promise((o,s)=>{this.client.recordOrchestratorUserRequest(null,n,(i,a)=>{i?(k("Error recording orchestrator user request:",i),s(new Error(i))):o(a)})})}async recordToolUserRequest({toolName:t,meta:n}){let o=await this.getMetadata({meta:n});return new Promise((s,i)=>{this.client.recordToolUserRequest({tool_name:t},o,(a,r)=>{a?(k("Error recording tool user request:",a),i(new Error(a))):s(r)})})}async logEvent(t,n,o={}){let s="h8utJ6rk4PpIWX4JMn9beQDsjVUri6KV0XYfiVwq",{enrichWithUserData:i=!1,meta:a={}}=o,r=s&&typeof s=="string",p=null;if(i)try{let[f]=this.isDev?["fake_license",null]:await Y();f&&typeof f=="string"&&(p=f)}catch{}if(!r&&!p){k("Neither LOGGING_API_KEY nor license key available, skipping log event");return}let u=new $.Metadata;return r&&u.add("x-api-key",s),p&&(u.add("x-license-key",p),u.add("x-request-metadata",this.buildRequestMetadata(a)),this.options?.libName&&u.add("x-library-name",this.options.libName)),new Promise((f,v)=>{this.client.logEvent({event_name:t,fields:n||{}},u,(c,m)=>{c?(k("Error logging event:",c),v(new Error(c))):f()})})}};import{z as Q}from"zod";var To=Q.object({user_id:Q.string(),user_email:Q.string().email()});import{z as w}from"zod";var Rt=w.object({Product:w.object({Id:w.number().int(),Code:w.string(),Name:w.string()}),License:w.nullable(w.object({Id:w.number().int(),Name:w.string(),Type:w.string(),Active:w.boolean()})),Availability:w.array(w.object({LicenseStart:w.nullable(w.string().datetime()),LicenseEnd:w.nullable(w.string().datetime())})),IsLicenseAvailable:w.optional(w.boolean())}),Eo=w.array(Rt);function x(e,t){let n=e.server?.server.getClientVersion?.(),o=t||{};return n&&(o.clientInfo={name:n.name,version:n.version}),o}async function ye(e){let t=process.env.KENDO_MCP_ACCESS;if(t==="true"||t==="1"||t==="full")return"full";if(typeof t=="string"&&(t.toLowerCase()==="agent"||t.toLowerCase()==="assistant"))return t.toLowerCase();let n=await e();return n?.toLocaleLowerCase()==="agentic_ui_generator"?"agent":n?.toLocaleLowerCase()==="ai_coding_assistants"?"assistant":"none"}function be(){return'**Accessibility Guidelines: WCAG 2.2 Level AA Compliance**\n\n**Core Principles:**\n1. Use semantic HTML and ARIA correctly\n2. Ensure WCAG 2.2 AA compliance\n3. Follow W3C ARIA Authoring Practices\n4. Provide standards-based accessibility fixes\n\n**1. Form Control Labels** (WCAG 1.3.1, 3.3.2, 4.1.2)\nEvery input must have an associated label.\nCORRECT: `<input type="search" aria-label="Search products" placeholder="Search...">`\nCORRECT: `<label for="qty">Quantity</label><input type="number" id="qty">`\nWRONG: `<span>Email</span><input type="email">` (no association)\nWRONG: `<input type="email" placeholder="Email">` (placeholder as label)\n\n**2. Button Accessibility** (WCAG 4.1.2, 2.4.6, 2.5.3)\nAll buttons need accessible names describing their purpose.\nCORRECT: `<button type="button">Save Changes</button>`\nCORRECT: `<button aria-label="Close dialog"><svg aria-hidden="true" focusable="false">...</svg></button>`\nWRONG: `<button><svg>...</svg></button>` (no accessible name)\nWRONG: `<button>Click here</button>` (generic text)\n\n**3. Popup/Menu Triggers** (WCAG 4.1.2, 1.3.1)\nIndicate popup purpose and state using aria-haspopup, aria-expanded, aria-controls.\nCORRECT: `<button aria-expanded="false" aria-haspopup="menu" aria-controls="menu-id">Settings</button>`\n\n**4. Image Accessibility** (WCAG 1.1.1)\nInformative: `<img src="chart.png" alt="Sales increased 25% in Q4 2024">`\nFunctional: `<a href="/home"><img src="logo.png" alt="Company Name Home"></a>`\nDecorative: `<img src="border.png" alt="" role="presentation">`\nComplex: `<img src="chart.png" alt="Sales data" aria-describedby="desc-id">`\nWRONG: Missing alt, filename as alt, generic alt for decorative images\n\n**5. Link Accessibility** (WCAG 2.4.4, 2.4.6)\nLinks must be descriptive and understandable out of context.\nCORRECT: `<a href="/products">View All Products</a>`\nCORRECT: `<a href="/article" aria-label="Read more about New Product Launch">Read more</a>`\nWRONG: "Click here", "Read more", "Learn more" without context\n\n**6. Form Validation** (WCAG 3.3.1, 3.3.2, 3.3.3)\nErrors must be identified, associated with inputs, and provide suggestions. Use aria-describedby, aria-invalid="true", and role="alert".\n\n**7. Heading Structure** (WCAG 1.3.1, 2.4.6)\nEach page must have an `<h1>` that describes its content. Use hierarchical, descriptive headings with no skipped levels (h1\u2192h2\u2192h3).\nCORRECT: `<h1>Dashboard</h1> <h2>Sales</h2> <h3>By Region</h3>`\nWRONG: No `<h1>` on the page, or skipping levels (h1\u2192h3)\nIf a heading should look smaller than its semantic level, use CSS: `<h2 class="text-sm">Subtitle</h2>`\n\n**8. Page Component Landmark Rules** (WCAG 1.3.1, 4.1.2)\nPage components (route components) may be rendered inside a layout that already provides `<main>`, `<header>`, or `<footer>`. Since the layout configuration is unknown, avoid using these landmarks in page components to prevent potential duplication and nesting violations. Use `<div>`, `<section>`, or `<article>` as the top-level wrapper instead.\n- Avoid adding `<main>`, `role="main"`, `<header>`, or `<footer>` in page components \u2014 the layout typically provides them. Duplicating them can cause `landmark-no-duplicate-main` and `landmark-main-is-top-level` violations.\n- Avoid adding `role="banner"` or using a semantic `<header>` element in page components \u2014 the layout\'s `<header>` already claims the banner landmark. Adding another causes `landmark-banner-is-top-level` violations.\n- Avoid adding `role="contentinfo"` to elements inside page components \u2014 the contentinfo landmark should be a top-level landmark, not nested inside `<main>` or other landmarks. Nesting it can cause `landmark-contentinfo-is-top-level` violations.\n- When multiple `<section>` or `<nav>` elements exist on a page, give each a unique `aria-label` to avoid `landmark-unique` violations.\n\n**9. ARIA Role and Attribute Restrictions** (WCAG 4.1.2)\nOnly use ARIA roles that are valid for the given HTML element. Avoid adding `aria-label` or `aria-labelledby` to elements that do not permit naming.\n- `<article>` has an implicit `article` role. Do NOT override it with `role="listitem"`, `role="button"`, `role="link"`, or any other role \u2014 none are allowed on `<article>`. Use `<li>` for list items, `<button>` for interactive cards, or `<a>` for clickable cards instead.\n- `<button>` already has an implicit `button` role. Do NOT add `role="listitem"` or other incompatible roles.\n- `<span>` and `<div>` without roles are generic elements. Do NOT add `aria-label` to them \u2014 it is a prohibited attribute on elements with no accessible role and can cause `aria-prohibited-attr` violations. Instead, use `role="img"` + `aria-label` for visual indicators, or use visually hidden text.\n- Do NOT add `aria-label` to non-interactive `<div>` wrappers \u2014 it has no effect and triggers violations.\n- `aria-pressed` is only valid on elements with `role="button"`, `role="checkbox"`, `role="menuitemcheckbox"`, `role="option"`, `role="radio"`, or `role="switch"`. Do NOT use `aria-pressed` on elements with `role="listitem"` or other roles.\nCORRECT: `<ul role="list"><li class="product-card">...</li></ul>` (listitem inside list)\nCORRECT: `<span role="img" aria-label="Status: pending" class="status-dot"></span>` (role added before aria-label)\nCORRECT: `<span class="status-dot" aria-hidden="true"></span><span class="visually-hidden">Pending</span>` (hidden text alternative)\nWRONG: `<article role="listitem">` (listitem not allowed on article)\nWRONG: `<article role="button">` (button not allowed on article \u2014 use `<button>` or `<div role="button">`)\nWRONG: `<span aria-label="pending" class="status-dot"></span>` (aria-label prohibited on generic span)\nWRONG: `<div aria-label="Product badges" class="badges"></div>` (aria-label prohibited on generic div)\n\n**Quick Checklist:**\n- **Forms:** Associated labels, aria-required on required fields, autocomplete attributes, aria-describedby for errors, aria-invalid for invalid fields, fieldsets with legends\n- **Buttons/Links:** Accessible names, aria-label for icon buttons, aria-hidden on decorative icons, descriptive link text\n- **Popups/Dialogs:** aria-haspopup, aria-expanded, aria-controls, role="dialog", aria-modal="true", aria-labelledby, focus trap, Escape to close\n- **Images:** alt on all images, descriptive alt for informative, empty alt for decorative, aria-describedby for complex\n- **Structure:** One h1, logical heading hierarchy, avoid `<main>`, `<header>`, `<footer>`, `role="main"`, `role="contentinfo"`, `role="banner"` in page/route components (the layout may already provide them), use `<section>` or `<div>` as page-level wrappers, unique aria-labels on duplicate landmark types\n- **ARIA Rules:** Avoid adding `aria-label` to generic `<span>`/`<div>` without a role, avoid using `role="listitem"` or `role="button"` on `<article>` \u2014 use `<li>` for list items, add `role="img"` before `aria-label` on visual indicators, `aria-pressed` only on button-like roles\n- **Scrollable Regions:** Any scrollable container must have `tabindex="0"` or contain keyboard-interactive children\n- **Nested Interactive:** Do not add interactive role/tabindex to a container that already has focusable children\n- **List Roles:** `role="list"` containers must have `role="listitem"` children \u2014 prefer `<ul>/<li>` natively\n- **Dynamic Content:** role="status"/aria-live="polite" for updates, role="alert"/aria-live="assertive" for critical alerts\n- **Keyboard/Focus:** All interactive elements keyboard accessible, logical focus order, visible focus indicators, no keyboard traps (except modals)\n- **Color/Contrast:** 4.5:1 text contrast (3:1 large text), 3:1 UI component contrast, no color-only information, 3:1 focus indicator contrast'}var Pt=1440*60*1e3;function ve(e){let{serverName:t,contextApi:n,additionalFields:o={},intervalMs:s=Pt,enrichWithUserData:i=!1}=e,a="mcp_server_heartbeat",r=async()=>{try{let u={server_name:t,timestamp:new Date().toISOString(),...o};await n.logEvent(a,u,{enrichWithUserData:i})}catch(u){k(`Failed to send heartbeat for ${t}:`,u)}};r();let p=setInterval(r,s);return()=>{clearInterval(p),k(`Heartbeat stopped for ${t}`)}}import{z as J}from"zod";var Dt=["default","bootstrap","material","fluent"];function ke(e,t){return{projectName:J.string().default(t).describe("The name of the project. Used as the project folder name when creating a new project."),createNewProject:J.boolean().default(!0).describe(`Whether to create a new project before configuring ${e}. Set to true to scaffold a brand-new project, or false if the project already exists and you only want to add ${e} to it.`),theme:J.enum(Dt).default("default").describe("The Kendo UI theme to use. Determines which theme package is installed and imported.")}}var l="Kendo UI for Angular",N="angular",D="kendo",_=["AIPrompt","ActionSheet","AppBar","ArcGauge","AutoComplete","Avatar","Badge","Barcode","BottomNavigation","BreadCrumb","Button","ButtonGroup","Calendar","Card","ChartWizard","Charts","CheckBox","Chip","ChipList","ChunkProgressBar","CircularGauge","CircularProgressBar","ColorGradient","ColorPalette","ColorPicker","ComboBox","ContextMenu","ConversationalUI","DataQuery","DateInput","DateMath","DatePicker","DateRange","DateTimePicker","Diagram","Dialog","DragandDrop","Drawer","Drawing","DropDownButton","DropDownList","DropDownTree","Editor","ExcelExport","ExpansionPanel","FileSaver","FileSelect","Filter","FlatColorPicker","FloatingActionButton","FloatingLabel","Forms","FormField","Gantt","Gauges","General","Grid","GridLayout","Icon","InlineAIPrompt","Label","LinearGauge","ListBox","ListView","Loader","Map","MaskedTextBox","Menu","MultiColumnComboBox","MultiSelect","MultiSelectTree","MultiViewCalendar","Notification","NumericTextBox","OTPInput","Pager","PanelBar","PDFExport","PDFViewer","PivotGrid","Popover","Popup","ProgressBar","PromptBox","QRCode","RadialGauge","RadioButton","RangeSlider","Rating","Ripple","Sankey","SegmentedControl","Scheduler","ScrollView","Signature","Skeleton","Slider","SmartPasteButton","Sortable","StockChart","Sparkline","SpeechToTextButton","SplitButton","Splitter","Spreadsheet","StackLayout","Stepper","SVGIcon","Switch","TabStrip","TextArea","TextBox","TileLayout","Timeline","TimePicker","ToolBar","Tooltip","TreeList","TreeView","Typography","Upload","Window"],Ae=new Map([["actionsheet","@progress/kendo-angular-navigation"],["aiprompt","@progress/kendo-angular-conversational-ui"],["appbar","@progress/kendo-angular-navigation"],["arcgauge","@progress/kendo-angular-gauges"],["autocomplete","@progress/kendo-angular-dropdowns"],["avatar","@progress/kendo-angular-layout"],["badge","@progress/kendo-angular-indicators"],["barcode","@progress/kendo-angular-barcodes"],["bottomnavigation","@progress/kendo-angular-navigation"],["breadcrumb","@progress/kendo-angular-navigation"],["button","@progress/kendo-angular-buttons"],["buttongroup","@progress/kendo-angular-buttons"],["calendar","@progress/kendo-angular-dateinputs"],["card","@progress/kendo-angular-layout"],["chartwizard","@progress/kendo-angular-chart-wizard"],["checkbox","@progress/kendo-angular-inputs"],["chip","@progress/kendo-angular-buttons"],["chiplist","@progress/kendo-angular-buttons"],["chunkprogressbar","@progress/kendo-angular-progressbar"],["circulargauge","@progress/kendo-angular-gauges"],["circularprogressbar","@progress/kendo-angular-progressbar"],["colorgradient","@progress/kendo-angular-inputs"],["colorpalette","@progress/kendo-angular-inputs"],["colorpicker","@progress/kendo-angular-inputs"],["combobox","@progress/kendo-angular-dropdowns"],["contextmenu","@progress/kendo-angular-menu"],["dataquery","@progress/kendo-data-query"],["dateinput","@progress/kendo-angular-dateinputs"],["datemath","@progress/kendo-date-math"],["datepicker","@progress/kendo-angular-dateinputs"],["daterangepicker","@progress/kendo-angular-dateinputs"],["datetimepicker","@progress/kendo-angular-dateinputs"],["diagram","@progress/kendo-angular-diagrams"],["dialog","@progress/kendo-angular-dialog"],["drawer","@progress/kendo-angular-layout"],["drawing","@progress/kendo-drawing"],["dropdownbutton","@progress/kendo-angular-buttons"],["dropdownlist","@progress/kendo-angular-dropdowns"],["dropdowntree","@progress/kendo-angular-dropdowns"],["editor","@progress/kendo-angular-editor"],["excelexport","@progress/kendo-angular-excel-export"],["expansionpanel","@progress/kendo-angular-layout"],["filesaver","@progress/kendo-file-saver"],["fileselect","@progress/kendo-angular-upload"],["filter","@progress/kendo-angular-filter"],["flatcolorpicker","@progress/kendo-angular-inputs"],["floatingactionbutton","@progress/kendo-angular-buttons"],["floatinglabel","@progress/kendo-angular-label"],["formfield","@progress/kendo-angular-inputs"],["forms","@progress/kendo-angular-inputs"],["gantt","@progress/kendo-angular-gantt"],["grid","@progress/kendo-angular-grid"],["gridlayout","@progress/kendo-angular-layout"],["icon","@progress/kendo-angular-icons"],["inlineaiprompt","@progress/kendo-angular-conversational-ui"],["label","@progress/kendo-angular-label"],["lineargauge","@progress/kendo-angular-gauges"],["listbox","@progress/kendo-angular-listbox"],["listview","@progress/kendo-angular-listview"],["loader","@progress/kendo-angular-indicators"],["map","@progress/kendo-angular-map"],["maskedtextbox","@progress/kendo-angular-inputs"],["menu","@progress/kendo-angular-menu"],["multicolumncombobox","@progress/kendo-angular-dropdowns"],["multiselect","@progress/kendo-angular-dropdowns"],["multiselecttree","@progress/kendo-angular-dropdowns"],["multiviewcalendar","@progress/kendo-angular-dateinputs"],["notification","@progress/kendo-angular-notification"],["numerictextbox","@progress/kendo-angular-inputs"],["otpinput","@progress/kendo-angular-inputs"],["pager","@progress/kendo-angular-pager"],["panelbar","@progress/kendo-angular-layout"],["pdfexport","@progress/kendo-angular-pdf-export"],["pdfviewer","@progress/kendo-angular-pdfviewer"],["pivotgrid","@progress/kendo-angular-pivotgrid"],["popover","@progress/kendo-angular-tooltip"],["popup","@progress/kendo-angular-popup"],["progressbar","@progress/kendo-angular-progressbar"],["promptbox","@progress/kendo-angular-conversational-ui"],["qrcode","@progress/kendo-angular-barcodes"],["radialgauge","@progress/kendo-angular-gauges"],["radiobutton","@progress/kendo-angular-inputs"],["rangeslider","@progress/kendo-angular-inputs"],["rating","@progress/kendo-angular-inputs"],["ripple","@progress/kendo-angular-ripple"],["sankey","@progress/kendo-angular-charts"],["segmentedcontrol","@progress/kendo-angular-buttons"],["scheduler","@progress/kendo-angular-scheduler"],["scrollview","@progress/kendo-angular-scrollview"],["signature","@progress/kendo-angular-inputs"],["skeleton","@progress/kendo-angular-indicators"],["slider","@progress/kendo-angular-inputs"],["smartpastebutton","@progress/kendo-angular-buttons"],["sortable","@progress/kendo-angular-sortable"],["sparkline","@progress/kendo-angular-charts"],["speechtotextbutton","@progress/kendo-angular-buttons"],["splitbutton","@progress/kendo-angular-buttons"],["splitter","@progress/kendo-angular-layout"],["spreadsheet","@progress/kendo-angular-spreadsheet"],["stacklayout","@progress/kendo-angular-layout"],["stepper","@progress/kendo-angular-layout"],["stockchart","@progress/kendo-angular-charts"],["svgicon","@progress/kendo-angular-icons"],["switch","@progress/kendo-angular-inputs"],["tabstrip","@progress/kendo-angular-layout"],["textarea","@progress/kendo-angular-inputs"],["textbox","@progress/kendo-angular-inputs"],["tilelayout","@progress/kendo-angular-layout"],["timeline","@progress/kendo-angular-layout"],["timepicker","@progress/kendo-angular-dateinputs"],["toolbar","@progress/kendo-angular-toolbar"],["treelist","@progress/kendo-angular-treelist"],["treeview","@progress/kendo-angular-treeview"],["typography","@progress/kendo-angular-typography"],["upload","@progress/kendo-angular-upload"],["window","@progress/kendo-angular-dialog"],["charts","@progress/kendo-angular-charts"],["conversationalui","@progress/kendo-angular-conversational-ui"],["tooltip","@progress/kendo-angular-tooltip"]]);var Lt=Ut(Ot(Gt(import.meta.url)),"../proto/service.proto"),B=new V("contextapi.telerik.com:443",Lt,{libName:N});var we=async()=>B.validateUserLicense();import so from"fs";import kt from"path";import{fileURLToPath as ao}from"url";import{z as A}from"zod";var S=class{constructor(t,n,o){this.name=t;this.config=n;this.cb=o}register(t){this.server=t,this.server.registerTool(this.name,this.config,this.cb)}hasAccess(t){return!this.config.requiredAccess||this.config.requiredAccess.length===0?!0:t==="full"||this.config.requiredAccess.includes(t)}};var F=(e,t)=>`# ${e.suiteName} - Code Validation & Quality Assurance
|
|
6
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 X=()=>`## UX/UI Design Best Practices
|
|
50
50
|
|
|
51
51
|
> **These are default guidelines \u2014 follow them when the user has not stated otherwise.** If the user explicitly requests different behavior (e.g., a specific component size, a custom row limit, alternate breakpoints, a different layout pattern), defer to the user's stated preference and disregard the conflicting default below. Only accessibility and WCAG requirements (contrast ratios, focus indicators, semantic HTML, ARIA) apply regardless of user preference.
|
|
52
52
|
|
|
@@ -147,24 +147,7 @@ When no design token system is defined by the project, apply these minimum spaci
|
|
|
147
147
|
- Section separators: \u2265 24px vertical gap between distinct content areas.
|
|
148
148
|
- Card internal padding: 16\u201324px.
|
|
149
149
|
- Form field vertical gap: \u2265 16px between fields (24px for multi-column groups).
|
|
150
|
-
- Page left/right margin: 24\u201332px minimum, even at desktop widths.`;var
|
|
151
|
-
\`\`\`
|
|
152
|
-
${e.layoutAssistantName}({
|
|
153
|
-
prompt="Provide Kendo Design System utility classes to make the following layout structure responsive across mobile, tablet, and desktop views: [LAYOUT DESCRIPTION HERE]",
|
|
154
|
-
includeBuildingBlockExamples=false // Optional, include examples of Kendo building blocks (Grid, Flex, Stack, etc.)
|
|
155
|
-
})
|
|
156
|
-
\`\`\`
|
|
157
|
-
`,Et=`**General Responsive Design Guidance:**
|
|
158
|
-
- Use CSS media queries to apply different styles at various breakpoints (e.g., mobile, tablet, desktop).
|
|
159
|
-
- Consider a mobile-first approach, starting with styles for smaller screens and adding complexity for larger screens.
|
|
160
|
-
- Ensure flexible grid layouts that can adapt to different screen sizes.
|
|
161
|
-
- Use relative units (%, em, rem) instead of fixed units (px) for widths and spacing to allow for better scalability.
|
|
162
|
-
- Test the design across multiple devices and screen sizes to ensure a consistent user experience.`,Rt=`**Tailwind CSS Responsive Design Guidance:**
|
|
163
|
-
- Use Tailwind's responsive utility variants (e.g., sm:, md:, lg:, xl:) to apply styles at specific breakpoints.
|
|
164
|
-
- Start with mobile styles (no prefix) and layer on additional styles for larger screens using the appropriate prefixes.
|
|
165
|
-
- Leverage Tailwind's grid and flex utilities to create flexible layouts that adapt to different screen sizes.
|
|
166
|
-
- Use Tailwind's spacing utilities to maintain consistent spacing across breakpoints.
|
|
167
|
-
- Test the design across multiple devices and screen sizes to ensure a consistent user experience.`,G=(e,t)=>{let s=U({suiteName:e.suiteName,libKey:e.libKey},t.validationSteps),o=e.includeLayout&&e.layoutMode==="utils",n=e.libKey==="angular"?"- **Drag and Drop**: Consider using the DragandDrop and Sortable components when drag-and-drop functionality is needed.":"",a=e.components?e.components.join(", "):"components",r=o?`- And use the ${e.layoutAssistantName} tool to get Kendo CSS utility classes needed for responsive design.`:"",i=o?Nt(e):"",d=e.layoutMode==="vanilla"?Et:"",p=e.layoutMode==="tailwind"?Rt:"";return`# \u{1F3AF} ${e.suiteName} - Execution Plan
|
|
150
|
+
- Page left/right margin: 24\u201332px minimum, even at desktop widths.`;var q=(e,t)=>{let n=F({suiteName:e.suiteName,libKey:e.libKey},t.validationSteps),o=e.libKey==="angular"?"- **Drag and Drop**: Consider using the DragandDrop and Sortable components when drag-and-drop functionality is needed.":"",s=e.components?e.components.join(", "):"components";return`# \u{1F3AF} ${e.suiteName} - Execution Plan
|
|
168
151
|
|
|
169
152
|
**Current Goal:**
|
|
170
153
|
|
|
@@ -176,7 +159,7 @@ ${e.includeComponentsDocs?`- **Component Library:** ${e.suiteName}
|
|
|
176
159
|
- Ensure to use ONLY ${e.suiteName} components for all UI elements.
|
|
177
160
|
- And use the ${e.codeAssistantName} tool to get ${e.suiteName} component documentation and code snippets.
|
|
178
161
|
- Ensure that after you read the plan you use exactly the ${e.codeAssistantName} no matter if there is another tool that can provide code snippets, documentation or other resources related to ${e.suiteName}.
|
|
179
|
-
`:""}${
|
|
162
|
+
`:""}${e.includeLayout?`- **Layout:** Yes
|
|
180
163
|
- And use the ${e.layoutAssistantName} tool to get Kendo CSS utility classes needed for layout structure and responsive design.
|
|
181
164
|
`:""}${e.includeIcons?`- **Icons:** Yes
|
|
182
165
|
- Use icons that align with the project theme and enhance usability.
|
|
@@ -188,37 +171,23 @@ ${e.includeComponentsDocs?`- **Component Library:** ${e.suiteName}
|
|
|
188
171
|
- And use the ${e.styleAssistantName} tool to create a custom theme for your project.
|
|
189
172
|
`:""}${e.includeResponsive?`- **Responsive:**
|
|
190
173
|
- Ensure the layout is fully responsive across mobile, tablet, and desktop views.
|
|
191
|
-
${
|
|
174
|
+
- And use the ${e.layoutAssistantName} tool to get Kendo CSS utility classes needed for responsive design.
|
|
192
175
|
`:""}
|
|
193
176
|
- **Accessible (WCAG 2.2 Level AA):**
|
|
194
177
|
- CRITICAL: You must call the ${e.accessibilityAssistantName} tool with includeGeneralGuidelines=true on your first call to get WCAG 2.2 Level AA guidelines.
|
|
195
178
|
- For subsequent calls, use includeGeneralGuidelines=false to get only component-specific accessibility information.
|
|
196
179
|
- Ensure all components meet WCAG 2.2 Level AA standards.
|
|
197
180
|
|
|
198
|
-
${
|
|
199
|
-
**LAYOUT MODE: KENDO DESIGN SYSTEM CSS UTILITIES**
|
|
181
|
+
${e.includeLayout?`**STYLING AND LAYOUT REQUIREMENTS:**
|
|
200
182
|
## CRITICAL DESIGN SYSTEM CONSTRAINTS
|
|
201
183
|
- **USE ONLY KENDO DESIGN SYSTEM UTILITIES** for ALL styling, layout, spacing, positioning, and responsive behavior
|
|
202
184
|
- Avoid custom CSS, inline styles, or other CSS framework classes
|
|
203
185
|
- The ${e.layoutAssistantName} tool will provide the specific Kendo CSS utility classes needed
|
|
204
186
|
- All layout requirements must use Kendo utilities exclusively
|
|
205
|
-
`:""}
|
|
206
|
-
${e.layoutMode==="vanilla"?`**STYLING AND LAYOUT REQUIREMENTS:**
|
|
207
|
-
**LAYOUT MODE: VANILLA**
|
|
208
|
-
- In this mode, you should use Kendo UI components and vanilla CSS for layout and styling.
|
|
209
|
-
- Do NOT use any utility-first CSS classes (e.g., from Tailwind) for layout or styling.
|
|
210
|
-
- Focus on leveraging the built-in capabilities of Kendo UI components and writing custom CSS as needed to achieve the desired design and layout.
|
|
211
|
-
`:""}
|
|
212
|
-
${e.layoutMode==="tailwind"?`**STYLING AND LAYOUT REQUIREMENTS:**
|
|
213
|
-
**LAYOUT MODE: TAILWIND**
|
|
214
|
-
- In this mode, you should use Tailwind CSS utility classes for layout and styling.
|
|
215
|
-
- Do NOT write custom CSS or use vanilla CSS for layout or styling.
|
|
216
|
-
- Focus on leveraging Tailwind's utility-first approach to achieve the desired design and layout, while still using Kendo UI components for functionality.
|
|
217
|
-
`:""}
|
|
218
187
|
|
|
219
|
-
---
|
|
188
|
+
`:""}---
|
|
220
189
|
|
|
221
|
-
${
|
|
190
|
+
${X()}
|
|
222
191
|
|
|
223
192
|
---
|
|
224
193
|
|
|
@@ -266,8 +235,7 @@ ${e.accessibilityAssistantName}({
|
|
|
266
235
|
includeGeneralGuidelines=false
|
|
267
236
|
})
|
|
268
237
|
\`\`\`
|
|
269
|
-
|
|
270
|
-
${o?`
|
|
238
|
+
${e.includeLayout?`
|
|
271
239
|
### Phase: Layout Foundation
|
|
272
240
|
|
|
273
241
|
**Step 1: Create Base Layout Structure**
|
|
@@ -295,10 +263,10 @@ Based on your current goal, analyze what other ${e.suiteName} components are nee
|
|
|
295
263
|
- **Data Entry**: Consider Form, TextBox, DatePicker, DropDownList, Upload, Validation components
|
|
296
264
|
- **Content Management**: Consider Grid, Editor, TreeView, FileManager, Dialog components
|
|
297
265
|
- **E-commerce**: Consider ListView, Card, Button, Rating, Badge, Carousel components
|
|
298
|
-
${
|
|
266
|
+
${o}
|
|
299
267
|
|
|
300
268
|
**IMPORTANT COMPONENT USAGE REQUIREMENTS:**
|
|
301
|
-
- Make sure to identify all necessary features related to the ${
|
|
269
|
+
- Make sure to identify all necessary features related to the ${s} based on the current goal.
|
|
302
270
|
- Make sure to identify specific features needed for other ${e.suiteName} components based on the current goal.
|
|
303
271
|
- Make sure to generate a query for ${e.codeAssistantName} tool for each component and call the tool for each specific feature or functionality.
|
|
304
272
|
- Always specify the exact features you want for each component. Describe only the needed functionality, and behavior you need. Be concise and don't include any information about the use case.
|
|
@@ -337,8 +305,15 @@ ${e.includeResponsive?`
|
|
|
337
305
|
### Phase: Layout Responsive Finalization
|
|
338
306
|
|
|
339
307
|
**Step 1: Implement Responsive Behavior**
|
|
340
|
-
${i}${d}${p}`:""}
|
|
341
308
|
|
|
309
|
+
**Tool call example:**
|
|
310
|
+
\`\`\`
|
|
311
|
+
${e.layoutAssistantName}({
|
|
312
|
+
prompt="Provide Kendo Design System utility classes to make the following layout structure responsive across mobile, tablet, and desktop views: [LAYOUT DESCRIPTION HERE]",
|
|
313
|
+
includeBuildingBlockExamples=false // Optional, include examples of Kendo building blocks (Grid, Flex, Stack, etc.)
|
|
314
|
+
})
|
|
315
|
+
\`\`\`
|
|
316
|
+
`:""}
|
|
342
317
|
${e.includeTheming?`
|
|
343
318
|
**Step 2: Custom Theme Implementation**
|
|
344
319
|
|
|
@@ -389,7 +364,7 @@ ${t.injectedPlan??""}
|
|
|
389
364
|
**Step 1: Code Validation**
|
|
390
365
|
** CRITICAL REQUIREMENT: You MUST validate the generated UI code using this comprehensive checklist to ensure code quality and compliance:**
|
|
391
366
|
|
|
392
|
-
${
|
|
367
|
+
${n}
|
|
393
368
|
|
|
394
369
|
**Step 2: Final Review and Testing**
|
|
395
370
|
** Implementation Validation:**
|
|
@@ -402,7 +377,7 @@ ${e.includeResponsive?"- Responsive layout works across breakpoints":""}
|
|
|
402
377
|
**Quick Fixes (if needed):**
|
|
403
378
|
|
|
404
379
|
After code implementation and validation you can make quick fixes as needed:
|
|
405
|
-
- If any build errors are found, fix them and re-run the application.
|
|
380
|
+
- If any build errors are found, fix them and re-run the application. Do NOT present the implementation as complete until the build succeeds without errors.
|
|
406
381
|
- Use ${e.codeAssistantName} for component-specific issues
|
|
407
382
|
- Use ${e.layoutAssistantName} for styling adjustments
|
|
408
383
|
|
|
@@ -411,7 +386,7 @@ After code implementation and validation you can make quick fixes as needed:
|
|
|
411
386
|
- Do NOT generate or suggest any code until all tools have been used and validated responses are incorporated.
|
|
412
387
|
- Focus on planning and sequencing.
|
|
413
388
|
- Summarize the components, layouts, and utilities gathered.
|
|
414
|
-
- Confirm all required inputs from tools have been provided.`};var
|
|
389
|
+
- Confirm all required inputs from tools have been provided.`};var Z=e=>`# ${e.suiteName} Assistant
|
|
415
390
|
|
|
416
391
|
**What you're looking for:**
|
|
417
392
|
|
|
@@ -504,6 +479,14 @@ After gathering information:
|
|
|
504
479
|
3. Use the official ${e.suiteName} documentation for detailed implementation guides
|
|
505
480
|
4. Refer to the component examples and code snippets provided
|
|
506
481
|
|
|
482
|
+
### Step 4: Build and Validation
|
|
483
|
+
|
|
484
|
+
After implementing the code:
|
|
485
|
+
- Run \`npm run build\` to verify the implementation compiles successfully without any build errors.
|
|
486
|
+
- If any build errors are found, fix them and re-run the build.
|
|
487
|
+
- Use ${e.codeAssistantName} for component-specific issues.
|
|
488
|
+
- Do NOT present the implementation as complete until the build succeeds without errors.
|
|
489
|
+
|
|
507
490
|
---
|
|
508
491
|
|
|
509
492
|
## Getting Started
|
|
@@ -512,11 +495,12 @@ After gathering information:
|
|
|
512
495
|
1. Start by calling ${e.codeAssistantName} for the components you need
|
|
513
496
|
2. ${e.includeIcons?`Search for icons using ${e.iconAssistantName}`:"Review the component documentation"}
|
|
514
497
|
3. Follow the ${e.suiteName} official documentation for implementation details
|
|
498
|
+
4. Run \`npm run build\` to verify the implementation compiles successfully
|
|
515
499
|
|
|
516
500
|
**Important Notes:**
|
|
517
501
|
- These tools provide documentation and guidance, not code generation
|
|
518
502
|
- Always refer to official ${e.suiteName} documentation for the most up-to-date information
|
|
519
|
-
- Tool responses include usage examples and best practices`;var
|
|
503
|
+
- Tool responses include usage examples and best practices`;var U=(e,t)=>({SETUP_VALIDATION:`
|
|
520
504
|
UI Library Setup:
|
|
521
505
|
- ${e} modules properly imported and configured
|
|
522
506
|
- ${e} theme properly loaded and applied
|
|
@@ -534,319 +518,105 @@ After gathering information:
|
|
|
534
518
|
- Do not use inline styles
|
|
535
519
|
- Consistent ${e} theme application across all components
|
|
536
520
|
- Custom theme variables properly defined and scoped
|
|
537
|
-
- ${e}
|
|
538
|
-
- Brand colors integrated with ${e} component themes`});var
|
|
539
|
-
|
|
540
|
-
|
|
541
|
-
|
|
542
|
-
|
|
543
|
-
|
|
544
|
-
|
|
545
|
-
|
|
546
|
-
|
|
547
|
-
|
|
548
|
-
|
|
549
|
-
|
|
550
|
-
|
|
551
|
-
|
|
552
|
-
|
|
553
|
-
|
|
554
|
-
|
|
555
|
-
|
|
556
|
-
|
|
557
|
-
--kendo-color-primary-subtle
|
|
558
|
-
--kendo-color-primary-subtle-hover
|
|
559
|
-
--kendo-color-primary-subtle-active
|
|
560
|
-
--kendo-color-primary
|
|
561
|
-
--kendo-color-primary-hover
|
|
562
|
-
--kendo-color-primary-active
|
|
563
|
-
--kendo-color-primary-emphasis
|
|
564
|
-
--kendo-color-primary-on-subtle
|
|
565
|
-
--kendo-color-on-primary
|
|
566
|
-
--kendo-color-primary-on-surface
|
|
567
|
-
/* Secondary */
|
|
568
|
-
--kendo-color-secondary-subtle
|
|
569
|
-
--kendo-color-secondary-subtle-hover
|
|
570
|
-
--kendo-color-secondary-subtle-active
|
|
571
|
-
--kendo-color-secondary
|
|
572
|
-
--kendo-color-secondary-hover
|
|
573
|
-
--kendo-color-secondary-active
|
|
574
|
-
--kendo-color-secondary-emphasis
|
|
575
|
-
--kendo-color-secondary-on-subtle
|
|
576
|
-
--kendo-color-on-secondary
|
|
577
|
-
--kendo-color-secondary-on-surface
|
|
578
|
-
/* Tertiary */
|
|
579
|
-
--kendo-color-tertiary-subtle
|
|
580
|
-
--kendo-color-tertiary-subtle-hover
|
|
581
|
-
--kendo-color-tertiary-subtle-active
|
|
582
|
-
--kendo-color-tertiary
|
|
583
|
-
--kendo-color-tertiary-hover
|
|
584
|
-
--kendo-color-tertiary-active
|
|
585
|
-
--kendo-color-tertiary-emphasis
|
|
586
|
-
--kendo-color-tertiary-on-subtle
|
|
587
|
-
--kendo-color-on-tertiary
|
|
588
|
-
--kendo-color-tertiary-on-surface
|
|
589
|
-
/* Info */
|
|
590
|
-
--kendo-color-info-subtle
|
|
591
|
-
--kendo-color-info-subtle-hover
|
|
592
|
-
--kendo-color-info-subtle-active
|
|
593
|
-
--kendo-color-info
|
|
594
|
-
--kendo-color-info-hover
|
|
595
|
-
--kendo-color-info-active
|
|
596
|
-
--kendo-color-info-emphasis
|
|
597
|
-
--kendo-color-info-on-subtle
|
|
598
|
-
--kendo-color-on-info
|
|
599
|
-
--kendo-color-info-on-surface
|
|
600
|
-
/* Success */
|
|
601
|
-
--kendo-color-success-subtle
|
|
602
|
-
--kendo-color-success-subtle-hover
|
|
603
|
-
--kendo-color-success-subtle-active
|
|
604
|
-
--kendo-color-success
|
|
605
|
-
--kendo-color-success-hover
|
|
606
|
-
--kendo-color-success-active
|
|
607
|
-
--kendo-color-success-emphasis
|
|
608
|
-
--kendo-color-success-on-subtle
|
|
609
|
-
--kendo-color-on-success
|
|
610
|
-
--kendo-color-success-on-surface
|
|
611
|
-
/* Warning */
|
|
612
|
-
--kendo-color-warning-subtle
|
|
613
|
-
--kendo-color-warning-subtle-hover
|
|
614
|
-
--kendo-color-warning-subtle-active
|
|
615
|
-
--kendo-color-warning
|
|
616
|
-
--kendo-color-warning-hover
|
|
617
|
-
--kendo-color-warning-active
|
|
618
|
-
--kendo-color-warning-emphasis
|
|
619
|
-
--kendo-color-warning-on-subtle
|
|
620
|
-
--kendo-color-on-warning
|
|
621
|
-
--kendo-color-warning-on-surface
|
|
622
|
-
/* Error */
|
|
623
|
-
--kendo-color-error-subtle
|
|
624
|
-
--kendo-color-error-subtle-hover
|
|
625
|
-
--kendo-color-error-subtle-active
|
|
626
|
-
--kendo-color-error
|
|
627
|
-
--kendo-color-error-hover
|
|
628
|
-
--kendo-color-error-active
|
|
629
|
-
--kendo-color-error-emphasis
|
|
630
|
-
--kendo-color-error-on-subtle
|
|
631
|
-
--kendo-color-on-error
|
|
632
|
-
--kendo-color-error-on-surface
|
|
633
|
-
/* Light */
|
|
634
|
-
--kendo-color-light-subtle
|
|
635
|
-
--kendo-color-light-subtle-hover
|
|
636
|
-
--kendo-color-light-subtle-active
|
|
637
|
-
--kendo-color-light
|
|
638
|
-
--kendo-color-light-hover
|
|
639
|
-
--kendo-color-light-active
|
|
640
|
-
--kendo-color-light-emphasis
|
|
641
|
-
--kendo-color-light-on-subtle
|
|
642
|
-
--kendo-color-on-light
|
|
643
|
-
--kendo-color-light-on-surface
|
|
644
|
-
/* Dark */
|
|
645
|
-
--kendo-color-dark-subtle
|
|
646
|
-
--kendo-color-dark-subtle-hover
|
|
647
|
-
--kendo-color-dark-subtle-active
|
|
648
|
-
--kendo-color-dark
|
|
649
|
-
--kendo-color-dark-hover
|
|
650
|
-
--kendo-color-dark-active
|
|
651
|
-
--kendo-color-dark-emphasis
|
|
652
|
-
--kendo-color-dark-on-subtle
|
|
653
|
-
--kendo-color-on-dark
|
|
654
|
-
--kendo-color-dark-on-surface
|
|
655
|
-
/* Inverse */
|
|
656
|
-
--kendo-color-inverse-subtle
|
|
657
|
-
--kendo-color-inverse-subtle-hover
|
|
658
|
-
--kendo-color-inverse-subtle-active
|
|
659
|
-
--kendo-color-inverse
|
|
660
|
-
--kendo-color-inverse-hover
|
|
661
|
-
--kendo-color-inverse-active
|
|
662
|
-
--kendo-color-inverse-emphasis
|
|
663
|
-
--kendo-color-inverse-on-subtle
|
|
664
|
-
--kendo-color-on-inverse
|
|
665
|
-
--kendo-color-inverse-on-surface
|
|
666
|
-
/* Series A */
|
|
667
|
-
--kendo-color-series-a
|
|
668
|
-
--kendo-color-series-a-bold
|
|
669
|
-
--kendo-color-series-a-bolder
|
|
670
|
-
--kendo-color-series-a-subtle
|
|
671
|
-
--kendo-color-series-a-subtler
|
|
672
|
-
/* Series B */
|
|
673
|
-
--kendo-color-series-b
|
|
674
|
-
--kendo-color-series-b-bold
|
|
675
|
-
--kendo-color-series-b-bolder
|
|
676
|
-
--kendo-color-series-b-subtle
|
|
677
|
-
--kendo-color-series-b-subtler
|
|
678
|
-
/* Series C */
|
|
679
|
-
--kendo-color-series-c
|
|
680
|
-
--kendo-color-series-c-bold
|
|
681
|
-
--kendo-color-series-c-bolder
|
|
682
|
-
--kendo-color-series-c-subtle
|
|
683
|
-
--kendo-color-series-c-subtler
|
|
684
|
-
/* Series D */
|
|
685
|
-
--kendo-color-series-d
|
|
686
|
-
--kendo-color-series-d-bold
|
|
687
|
-
--kendo-color-series-d-bolder
|
|
688
|
-
--kendo-color-series-d-subtle
|
|
689
|
-
--kendo-color-series-d-subtler
|
|
690
|
-
/* Series E */
|
|
691
|
-
--kendo-color-series-e
|
|
692
|
-
--kendo-color-series-e-bold
|
|
693
|
-
--kendo-color-series-e-bolder
|
|
694
|
-
--kendo-color-series-e-subtle
|
|
695
|
-
--kendo-color-series-e-subtler
|
|
696
|
-
/* Series F */
|
|
697
|
-
--kendo-color-series-f
|
|
698
|
-
--kendo-color-series-f-bold
|
|
699
|
-
--kendo-color-series-f-bolder
|
|
700
|
-
--kendo-color-series-f-subtle
|
|
701
|
-
--kendo-color-series-f-subtler
|
|
702
|
-
/* Typography */
|
|
703
|
-
--kendo-font-family-sans
|
|
704
|
-
--kendo-font-family-sans-serif
|
|
705
|
-
--kendo-font-family-monospace
|
|
706
|
-
--kendo-font-size-xs
|
|
707
|
-
--kendo-line-height-xs
|
|
708
|
-
--kendo-font-size-sm
|
|
709
|
-
--kendo-line-height-sm
|
|
710
|
-
--kendo-font-size
|
|
711
|
-
--kendo-line-height
|
|
712
|
-
--kendo-font-size-lg
|
|
713
|
-
--kendo-line-height-lg
|
|
714
|
-
/* Border Radius */
|
|
715
|
-
--kendo-border-radius-none
|
|
716
|
-
--kendo-border-radius-xs
|
|
717
|
-
--kendo-border-radius-sm
|
|
718
|
-
--kendo-border-radius-md
|
|
719
|
-
--kendo-border-radius-lg
|
|
720
|
-
--kendo-border-radius-xl
|
|
721
|
-
--kendo-border-radius-xxl
|
|
722
|
-
--kendo-border-radius-xxxl
|
|
723
|
-
--radius-4xl: 1.5rem
|
|
724
|
-
--kendo-border-radius-full`,ke=`I need you to set up a system where Tailwind CSS is the single source of truth for all design tokens, and those tokens are automatically reflected as CSS custom properties so I can use them in regular CSS too.
|
|
725
|
-
Requirements:
|
|
726
|
-
|
|
727
|
-
All design tokens (colors, spacing, font families, border radius, shadows) are defined once in tailwind.config.js
|
|
728
|
-
A Tailwind plugin emits every token as a --token-name CSS custom property on :root
|
|
729
|
-
Colors support Tailwind's opacity modifier syntax (bg-primary/50) using the rgb(var(--color-x-rgb) / <alpha-value>) pattern
|
|
730
|
-
Dark mode tokens are emitted under .dark so that both dark: utility variants and var(--color-x) in custom CSS update together
|
|
731
|
-
var(--color-primary) in hand-written CSS and bg-primary in HTML resolve to the same value
|
|
732
|
-
|
|
733
|
-
Use the Kendo theme tokens listed above as the design tokens.
|
|
734
|
-
|
|
735
|
-
Output I need:
|
|
736
|
-
|
|
737
|
-
The full tailwind.config.js with the plugin included
|
|
738
|
-
The base CSS file importing Tailwind
|
|
739
|
-
A short example showing a component using both bg-primary and var(--color-primary) side by side`,ve=`I need you to set up a system where Tailwind CSS v4 is the single source of truth for all design tokens, and those tokens are automatically available as CSS custom properties so I can use them in regular CSS too.
|
|
740
|
-
Requirements:
|
|
741
|
-
|
|
742
|
-
All design tokens (colors, spacing, font families, border radius, shadows) are defined once in the @theme block \u2014 no tailwind.config.js
|
|
743
|
-
Every @theme variable is natively available as a var(--token-name) CSS custom property with no plugin needed
|
|
744
|
-
Colors use oklch and support opacity modifier syntax (bg-primary/50) natively
|
|
745
|
-
Dark mode tokens are re-declared under .dark so that both dark: utility variants and var(--color-x) in custom CSS update together
|
|
746
|
-
var(--color-primary) in hand-written CSS and bg-primary in HTML resolve to the same value
|
|
747
|
-
|
|
748
|
-
Use the Kendo theme tokens listed above as the design tokens.
|
|
749
|
-
|
|
750
|
-
Output I need:
|
|
751
|
-
|
|
752
|
-
The single CSS file with @import "tailwindcss", the @theme block, and the .dark overrides
|
|
753
|
-
A short example showing a component using both bg-primary and var(--color-primary) side by side`,z=`## Tailwind CSS Setup Instructions
|
|
754
|
-
|
|
755
|
-
Detect which version of Tailwind CSS the project uses, then follow the appropriate setup guide below.
|
|
756
|
-
|
|
757
|
-
### Kendo Theme Tokens
|
|
758
|
-
These are the design tokens to map into Tailwind:
|
|
759
|
-
${Dt}
|
|
760
|
-
|
|
761
|
-
### For Tailwind CSS v3 (uses tailwind.config.js)
|
|
762
|
-
|
|
763
|
-
<tailwind_v3_setup>
|
|
764
|
-
${ke}
|
|
765
|
-
</tailwind_v3_setup>
|
|
766
|
-
|
|
767
|
-
### For Tailwind CSS v4 (uses @theme block, no config file)
|
|
768
|
-
|
|
769
|
-
<tailwind_v4_setup>
|
|
770
|
-
${ve}
|
|
771
|
-
</tailwind_v4_setup>
|
|
772
|
-
|
|
773
|
-
IMPORTANT: Detect which version of Tailwind CSS the project uses, then follow the matching setup guide.`;function Pt(e,t){let s;try{s=JSON.parse(e)}catch{return e}let o=s?.Item;if(!o)return e;let n=[],a=o.FullName??o.Name??"",r=o.Type??"",i=o.Summary??"",d=o.SyntaxContent??"";n.push(`## API Reference Item
|
|
774
|
-
- Name: ${a}
|
|
775
|
-
- Type: ${r}
|
|
776
|
-
- Summary: ${i}
|
|
777
|
-
- Syntax: ${d}`);let p=s.RelatedItemsByType?.return_type;if(p?.length){let u=p[0].Text;u&&n.push(`- Return Type: ${u}`)}let b=o.Examples??[];if(b.length>0){let u=`## Examples
|
|
778
|
-
`,c=0;for(let y of b){let A=(y.Component??"").toLowerCase(),w=t.toLowerCase();if(A&&A!==w&&A!=="general")continue;c+=1;let C=y.Code??"";u+=`### Example ${c}
|
|
521
|
+
- ${e} icons properly loaded and optimized
|
|
522
|
+
- Brand colors integrated with ${e} component themes`});var ee=()=>`
|
|
523
|
+
**REQUIRED ACTIONS \u2014 apply all fixes directly to the source files:**
|
|
524
|
+
- Search all .ts files for every outdated API mentioned in the codemod output \u2014 this includes renamed or removed properties, method names, and enum values.
|
|
525
|
+
- Search all .ts, .css, and .scss files for every outdated CSS class mentioned in the codemod output and update it with an appropriate replacement.
|
|
526
|
+
- Fix any logic errors or unintended side effects introduced by the codemods
|
|
527
|
+
- Update any edge cases, custom implementations, or complex code patterns that were broken or left incomplete by the automated migration
|
|
528
|
+
- Replace hardcoded values, dynamic expressions, or conditional logic that the codemod could not handle automatically
|
|
529
|
+
- Correct any TypeScript type errors or mismatches introduced by the upgrade
|
|
530
|
+
- Adjust any patterns that do not align with the project's existing coding standards
|
|
531
|
+
|
|
532
|
+
**OUTPUT REQUIREMENTS:**
|
|
533
|
+
- For each file you change, briefly describe what was wrong and what fix you applied
|
|
534
|
+
- If a problem requires a decision from the developer that you cannot make automatically, call it out explicitly with the file path
|
|
535
|
+
- If all automated changes look correct and no further fixes are needed, explicitly confirm this`;import{execFile as Mt}from"child_process";import{access as $t}from"fs/promises";import{promisify as _t}from"util";var Ce=_t(Mt);function Bt(e,t){let n;try{n=JSON.parse(e)}catch{return e}let o=n?.Item;if(!o)return e;let s=[],i=o.FullName??o.Name??"",a=o.Type??"",r=o.Summary??"",p=o.SyntaxContent??"";s.push(`## API Reference Item
|
|
536
|
+
- Name: ${i}
|
|
537
|
+
- Type: ${a}
|
|
538
|
+
- Summary: ${r}
|
|
539
|
+
- Syntax: ${p}`);let u=n.RelatedItemsByType?.return_type;if(u?.length){let m=u[0].Text;m&&s.push(`- Return Type: ${m}`)}let f=o.Examples??[];if(f.length>0){let m=`## Examples
|
|
540
|
+
`,g=0;for(let b of f){let d=(b.Component??"").toLowerCase(),y=t.toLowerCase();if(d&&d!==y&&d!=="general")continue;g+=1;let C=b.Code??"";m+=`### Example ${g}
|
|
779
541
|
\`\`\`
|
|
780
542
|
${C}
|
|
781
543
|
\`\`\`
|
|
782
|
-
`}
|
|
783
|
-
${
|
|
784
|
-
`+
|
|
544
|
+
`}g>0&&s.push(m)}let v=n.RelatedItemsByType??{},c=[];for(let[m,g]of Object.entries(v))if(!(m==="return_type"||m==="render_fragment"))for(let b of g??[]){let d=b.FullName??"",y=b.ShortText??"";c.push(`### ${d} (${m})
|
|
545
|
+
${y}`)}return c.length>0&&s.push(`## Additional Context
|
|
546
|
+
`+c.join(`
|
|
785
547
|
---
|
|
786
|
-
`)),
|
|
548
|
+
`)),s.join(`
|
|
787
549
|
|
|
788
|
-
`)}
|
|
789
|
-
`)||"No CSS utilities found for the given prompt.",
|
|
550
|
+
`)}function xe(e,t,n){let{name:o,title:s,description:i,layoutAssistantName:a,codeAssistantName:r,styleAssistantName:p,iconAssistantName:u,accessibilityAssistantName:f,suiteName:v,libKey:c,components:m}=e,g=new S(o,{title:s,description:i,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 ${v} 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(m)).optional().describe(`Optional list of specific ${v} components needed for the project.`)}},async({userIntent:b,needsComponentsDocsConfidence:d,needsLayoutConfidence:y,needsStylingConfidence:C,needsResponsiveBehaviorConfidence:T,needsIconsConfidence:E,componentsNeeded:I},{_meta:le})=>{let R=x(g,le);k("UI Orchestrator called with:",{userIntent:b,needsComponentsDocsConfidence:d,needsLayoutConfidence:y,needsStylingConfidence:C,needsResponsiveBehaviorConfidence:T,needsIconsConfidence:E});try{await n.recordOrchestratorUserRequest({meta:{userIntent:b,componentsNeeded:I,...R}})}catch(W){throw G(W)}let P=g.server?.server.getClientCapabilities?.()?.elicitation,K;if(P&&C>.3&&C<=.6){let W=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"]}});W?.action==="accept"&&W.content?.includeCustomTheming&&(K=!0)}return{content:[{type:"text",text:q({name:o,userIntent:b,includeComponentsDocs:d>.3,includeTheming:C>.6||!!K,includeLayout:y>.5,includeIcons:E>.6,includeResponsive:y>.5&&T>.4,layoutAssistantName:a,codeAssistantName:r,styleAssistantName:p,iconAssistantName:u,accessibilityAssistantName:f,suiteName:v,libKey:c,components:I},t)}]}});return g}function Te(e,t){let{name:n,title:o,description:s,iconAssistantName:i,codeAssistantName:a,suiteName:r,libKey:p,components:u}=e,f=new S(n,{title:o,description:s,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 ${r}.`),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(u)).optional().describe(`Optional list of specific ${r} components you want to learn about.`)},requiredAccess:e.requiredAccess},async({userIntent:v,needsIconsConfidence:c,componentsNeeded:m},{_meta:g})=>{let b=x(f,g);k("Assistant Orchestrator called with:",{userIntent:v,needsIconsConfidence:c,componentsNeeded:m});try{await t.recordOrchestratorUserRequest({meta:{userIntent:v,componentsNeeded:m,...b}})}catch(y){throw G(y)}return{content:[{type:"text",text:Z({name:n,userIntent:v,includeComponentsDocs:!0,includeIcons:c>.5,codeAssistantName:a,iconAssistantName:i,suiteName:r,libKey:p,components:m})}]}});return f}function Ie(e,t){let{name:n,title:o,description:s,suiteName:i,libKey:a,getPreContent:r}=e,p=new S(n,{title:o,description:s,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:u,includeBuildingBlockExamples:f},{_meta:v})=>{let c=x(p,v);k("Layout Assistant called with:",{prompt:u,includeBuildingBlockExamples:f});try{let g=(await t.queryCssUtils({query:u},{...c})).values.join(`
|
|
551
|
+
`)||"No CSS utilities found for the given prompt.",b=r?.()??"",d=y=>`${b}
|
|
790
552
|
|
|
791
553
|
# Kendo Design System CSS Utilities
|
|
792
554
|
|
|
793
|
-
${
|
|
555
|
+
${g}
|
|
794
556
|
${y??""}
|
|
795
|
-
`;if(
|
|
557
|
+
`;if(f)try{let y=await t.queryBuildingBlocks({query:u,lib_name:a},{...c}),C="";y.items?.length>0&&(C=`
|
|
796
558
|
## Building Blocks Examples
|
|
797
559
|
|
|
798
560
|
The examples here are for demonstration purpose how CSS utils can be implemented in various building blocks.
|
|
799
561
|
However, consider your own design requirements and specifics in order to implement your templates/building blocks correctly.
|
|
800
562
|
|
|
801
|
-
${y.items.map(
|
|
802
|
-
### ${
|
|
563
|
+
${y.items.map(T=>`
|
|
564
|
+
### ${T.name}
|
|
803
565
|
|
|
804
|
-
${
|
|
566
|
+
${T.description}
|
|
805
567
|
|
|
806
568
|
\`\`\`code
|
|
807
|
-
${
|
|
569
|
+
${T.code}
|
|
808
570
|
\`\`\`
|
|
809
571
|
`).join(`
|
|
810
|
-
`)}`),
|
|
811
|
-
IMPORTANT: You need to set up Tailwind CSS so it becomes the single source of truth for all design tokens. Detect which Tailwind version the project uses and follow the appropriate setup instructions below.
|
|
812
|
-
|
|
813
|
-
<tailwind_setup_instructions>
|
|
814
|
-
${z}
|
|
815
|
-
</tailwind_setup_instructions>
|
|
816
|
-
`}]};let p="";try{let f=await t.queryThemeGenerate({prompt:i},{_meta:d});if(f.variables_json){let u=JSON.parse(f.variables_json),c=[];if(u)for(let y of Object.keys(u))typeof u[y]=="string"&&c.push(`${y}: ${u[y]}`);p=c.join(`
|
|
572
|
+
`)}`),g=d(C)}catch(y){k("Error calling building-blocks service:",y),g=d()}else g=d();return{content:[{type:"text",text:g}]}}catch(m){throw G(m)}});return p}function Ne(e,t){let{name:n,title:o,description:s,libKey:i,getPreContent:a}=e,r=new S(n,{title:o,description:s,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:p},{_meta:u})=>{let f=x(r,u);k("Style Assistant called with:",{prompt:p});let v="";try{let g=await t.queryThemeGenerate({prompt:p},{...f});if(g.variables_json){let b=JSON.parse(g.variables_json),d=[];if(b)for(let y of Object.keys(b))typeof b[y]=="string"&&d.push(`${y}: ${b[y]}`);v=d.join(`
|
|
817
573
|
|
|
818
|
-
`)}}catch(
|
|
574
|
+
`)}}catch(g){throw G(g)}let c=a?.()??"";return{content:[{type:"text",text:v?`Use the following CSS variables to style the web application, including colors, typography, spacing, and component appearance.
|
|
819
575
|
Ensure the variables are applied consistently across all relevant elements.
|
|
820
576
|
Do NOT set any inline styles. CSS variables should be defined in global or component-level CSS files, or via supported theming mechanisms.
|
|
821
577
|
|
|
822
|
-
${
|
|
578
|
+
${c}
|
|
823
579
|
|
|
824
580
|
## Generated CSS Variables
|
|
825
581
|
|
|
826
582
|
\`\`\`css
|
|
827
|
-
${
|
|
583
|
+
${v}
|
|
828
584
|
\`\`\`
|
|
829
|
-
`:"No CSS variables were generated for the given prompt."}
|
|
585
|
+
`:"No CSS variables were generated for the given prompt."}]}});return r}function Ee(e,t){let{name:n,title:o,description:s,libKey:i,getPostContent:a}=e,r=new S(n,{title:o,description:s,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:p,limit:u},{_meta:f})=>{let v=x(r,f);k("Icon Search called with:",{query:p,limit:u});try{let c=await t.queryIconsSearch({query:p,limit:u*100},{...v}),m=a?.()??"";return{content:[{type:"text",text:`${c.values.join(`
|
|
830
586
|
|
|
831
587
|
`)}
|
|
832
588
|
|
|
833
|
-
${
|
|
589
|
+
${m}`}]}}catch(c){throw G(c)}});return r}function Re(e,t){let{name:n,title:o,description:s,libKey:i,suiteName:a,components:r,componentAliases:p,getPostContent:u}=e,f=new S(n,{title:o,description:s,requiredAccess:e.requiredAccess,inputSchema:{query:A.string().describe("The query to search for."),component:A.enum(r).describe("The component to search for. If not specified, use General.")}},async({query:v,component:c},{_meta:m})=>{let g=x(f,m);k("Code Assistant called with:",{query:v,component:c});let b=c;if(p){let d=p[c];d&&(b=d)}try{let y=(await t.query({query:v,component:b?.toLowerCase()??"general",lib_name:i,text_matches_count:3,code_matches_count:0,allowed_types:["documentation"]},{...g})).values.map(E=>E.replace(/\0/g,"")),C=u?.({component:c})??"";return{content:[{type:"text",text:`${y.join(`
|
|
834
590
|
|
|
835
591
|
`)}
|
|
836
592
|
|
|
837
|
-
${
|
|
593
|
+
${C}`}]}}catch(d){throw G(d)}});return f}function Pe(e,t){let{name:n,title:o,description:s,libKey:i,suiteName:a,components:r,componentAliases:p}=e,u=new S(n,{title:o,description:s,requiredAccess:e.requiredAccess,inputSchema:{query:A.string().describe("The query to search for."),component:A.enum(r).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:f,component:v,includeGeneralGuidelines:c},{_meta:m})=>{let g=x(u,m);k("Accessibility Assistant called with:",{query:f,component:v,includeGeneralGuidelines:c});let b=v;if(p){let d=p[v];d&&(b=d)}try{let d="";if(c){let I=be();d+=`# WCAG 2.2 Level AA General Accessibility Guidelines
|
|
838
594
|
|
|
839
|
-
`,
|
|
595
|
+
`,d+=I,d+=`
|
|
840
596
|
|
|
841
597
|
---
|
|
842
598
|
|
|
843
|
-
`}let
|
|
599
|
+
`}let E=(await t.getApiRefMatches({query:f,component:b?.toLowerCase()??"general",lib_name:i,filters_json:'{"type":{"$in":["accessibility"]}}'},{...g})).values.map(I=>I.replace(/\0/g,"")).map(I=>Bt(I,b?.toLowerCase()??"general")).join(`
|
|
600
|
+
|
|
601
|
+
`);return E?(c&&(d+=`# Component-Specific Accessibility Information
|
|
602
|
+
|
|
603
|
+
`),d+=E):c||(d="No component-specific accessibility guidelines found."),{content:[{type:"text",text:d}]}}catch(d){throw G(d)}});return u}function G(e){let t=e;return t.code===16?new Error("Error: You are not authenticated. Please verify the Telerik License Key provided is valid."):t.code===8?new Error(`Error: You have exceeded the extension quota. Upgrade to subscription licensing to unlock full access. Message: ${t.message}.`):t.code===7?new Error("Error: You do not have permission to access this resource. Please verify that you have a valid license."):new Error(`Error: An error occurred while calling the service. Please try again later.
|
|
604
|
+
|
|
605
|
+
Error Code: ${t.code} Error Message: ${t.message}`)}var Ft=20*1024*1024,De=1200*1e3;function Se(e){return{content:[{type:"text",text:`Upgrade timed out after ${De/6e4} minutes.
|
|
844
606
|
|
|
845
|
-
|
|
607
|
+
**Some codemods may have already been applied to your files.** Review any modified files before proceeding.
|
|
846
608
|
|
|
847
|
-
|
|
609
|
+
To complete the upgrade, run this tool again with specific package names via the \`packageNames\` parameter to upgrade one package at a time.${e?`
|
|
848
610
|
|
|
849
|
-
|
|
611
|
+
## Partial output before timeout
|
|
612
|
+
`+e:""}`}]}}function Oe(e,t){let{name:n,title:o,description:s,suiteName:i}=e,a=new S(n,{title:o,description:s,requiredAccess:e.requiredAccess,inputSchema:{workingDirectory:A.string().describe('The absolute path to the project directory where the upgrade should be executed (e.g., "/Users/username/my-app")'),packageNames:A.array(A.string()).optional().describe('The package names to target for codemod upgrade (e.g., ["@progress/kendo-angular-grid", "@progress/kendo-angular-buttons"]). Defaults to upgrading all installed @progress packages if not specified. When specified, skips package installation and only runs codemods \u2014 the packages must already be installed at the target version before calling this tool.'),skipInstall:A.boolean().optional().describe("Skip npm package installation and only run codemods. Use this when package installation has already been done manually.")}},async({workingDirectory:r,packageNames:p,skipInstall:u},{_meta:f})=>{let v=x(a,f);try{await t.recordToolUserRequest({toolName:n,meta:v})}catch(c){console.error("Error recording tool request:",c)}try{try{await $t(r)}catch{return{content:[{type:"text",text:`The working directory does not exist: "${r}". Please provide a valid absolute path to your project.`}]}}let c=!1;try{await Ce("npx",["--no","--","kendo","--version"],{cwd:r}),c=!0}catch{c=!1}let m=[],g=async(R,ce=!1)=>{try{let P=!ce&&c?["--no","--","kendo",...R]:["-y","@progress/kendo-cli",...R],{stdout:K,stderr:de}=await Ce("npx",P,{cwd:r,maxBuffer:Ft,timeout:De});return{timedOut:!1,stdout:K,stderr:de}}catch(P){return P.killed?{timedOut:!0,partialOutput:P.stdout?.trim()}:{timedOut:!1,stdout:P.stdout||"",stderr:P.stderr||P.message}}},b=["migrate",...p??[],"--codemods","--force","--ai-mode"];(u||p?.length)&&b.push("--no-install");let d=await g(b);if(d.timedOut)return Se(d.partialOutput);let y=d.stdout,C=d.stderr;if(C?.includes("Unknown argument")){let R=await g(b,!0);if(R.timedOut)return Se(R.partialOutput);y=R.stdout,C=R.stderr}C?.trim()&&m.push(`
|
|
613
|
+
Errors:
|
|
614
|
+
${C}`),y?.trim()&&m.push(y.trim());let T=y.includes("Packages installed successfully."),E=y.includes("Package installation failed:"),I=y.includes("Running codemod:");return E?m.push(`
|
|
615
|
+
## Upgrade Status
|
|
616
|
+
Package installation failed. The npm packages were not updated. Inform the user of the error and update the package versions in package.json manually to the target version. Once done, call this tool again with skipInstall set to true.`):T&&m.push(`
|
|
617
|
+
## Upgrade Status
|
|
618
|
+
Upgrade complete. npm packages have been installed and updated in the project.`),I&&m.push(ee()),{content:[{type:"text",text:m.join(`
|
|
619
|
+
`)}]}}catch(c){return{content:[{type:"text",text:`Error: ${c.message||c.toString()}`}]}}});return a}var Ue=e=>`${e}_ui_generator`,Ge=e=>`${e}_assistant`,Le=e=>`${e}_layout_assistant`,Me=e=>`${e}_component_assistant`,$e=e=>`${e}_style_assistant`,_e=e=>`${e}_icon_assistant`,Be=e=>`${e}_accessibility_assistant`,Fe=e=>`${e}_getting_started_assistant`,qe=e=>`${e}_upgrade_assistant`;var Ke=e=>`This is the single entry point for all UI-related tasks. It orchestrates the full workflow of building or refining UIs with ${e} components, generating a step-by-step execution plan that specifies which tools to call, in what order, and with what parameters. It includes validation steps to ensure the best possible, standards-compliant code every time.
|
|
850
620
|
|
|
851
621
|
Use the tool when:
|
|
852
622
|
- Want to build or modify a complete page or section layout
|
|
@@ -855,7 +625,7 @@ Error Code: ${t.code} Error Message: ${t.message}`)}var Ne=e=>`${e}_ui_generator
|
|
|
855
625
|
- You want to enforce best practices in styling, performance, and accessibility
|
|
856
626
|
|
|
857
627
|
Returns:
|
|
858
|
-
A detailed execution plan with validated tool calls, parameters, and reasoning \u2014 ensuring consistent, high-quality UI generation.`,
|
|
628
|
+
A detailed execution plan with validated tool calls, parameters, and reasoning \u2014 ensuring consistent, high-quality UI generation.`,We=e=>`Provides guidance for discovering and using ${e} components and icons. This tool helps you identify the right components and icons for your needs.
|
|
859
629
|
|
|
860
630
|
Use this tool when:
|
|
861
631
|
- You need to discover which ${e} components are suitable for a specific use case
|
|
@@ -864,20 +634,20 @@ Use this tool when:
|
|
|
864
634
|
- You want to gather component documentation and examples
|
|
865
635
|
|
|
866
636
|
Returns:
|
|
867
|
-
A focused plan for gathering component documentation and icon suggestions using the Component Assistant and Icon Assistant tools
|
|
637
|
+
A focused plan for gathering component documentation and icon suggestions using the Component Assistant and Icon Assistant tools.`,je=`Retrieves Progress/Kendo Design System CSS utility classes and styling recommendations based on layout and design requirements.
|
|
868
638
|
Use this tool to find the right CSS utilities for styling Kendo UI components or general web elements.
|
|
869
639
|
It analyzes the provided design context and returns relevant utility classes with explanations and examples.
|
|
870
|
-
Best suited for styling questions related to typography, spacing, colors, layout, transforms, and other utilities in the Progress/Kendo Design System.`,
|
|
640
|
+
Best suited for styling questions related to typography, spacing, colors, layout, transforms, and other utilities in the Progress/Kendo Design System.`,Ve=`Generates CSS variables using an external style agent based on the user's styling prompt.
|
|
871
641
|
|
|
872
642
|
Use this tool when the user wants to:
|
|
873
643
|
- Update the visual theme of an application
|
|
874
644
|
- Modify color schemes
|
|
875
645
|
- Restyle the UI with CSS variables
|
|
876
646
|
|
|
877
|
-
The tool outputs a set of CSS variable definitions ready to be applied to style files.`,
|
|
647
|
+
The tool outputs a set of CSS variable definitions ready to be applied to style files.`,ze=`Searches for icons in the Telerik Icons library.
|
|
878
648
|
Use this tool when the user needs to find specific icons for UI components or design elements.
|
|
879
649
|
It supports searching by icon name, category, or keyword and returns matching icons from the Telerik Icons library.
|
|
880
|
-
`,
|
|
650
|
+
`,Ye=e=>`Provides answers and retrieves official documentation for ${e}.
|
|
881
651
|
|
|
882
652
|
Use this tool when the user asks about:
|
|
883
653
|
- ${e} features or capabilities
|
|
@@ -887,7 +657,7 @@ Use this tool when the user asks about:
|
|
|
887
657
|
|
|
888
658
|
Set the user's full question as the 'query' parameter.
|
|
889
659
|
If the question refers to a specific ${e} component, include its name in the 'component' parameter.
|
|
890
|
-
`,
|
|
660
|
+
`,He=e=>`Retrieves accessibility guidance for ${e} components with optional general WCAG 2.2 Level AA guidelines.
|
|
891
661
|
|
|
892
662
|
Use this tool when:
|
|
893
663
|
- You need component-specific accessibility information and API references
|
|
@@ -905,7 +675,32 @@ Set 'includeGeneralGuidelines=true' ONLY on the first call to include general WC
|
|
|
905
675
|
Returns:
|
|
906
676
|
- When includeGeneralGuidelines=true: General WCAG 2.2 Level AA guidelines + component-specific recommendations
|
|
907
677
|
- When includeGeneralGuidelines=false: Only component-specific accessibility recommendations
|
|
908
|
-
|
|
678
|
+
`,Qe=e=>`Runs codemods to upgrade ${e} code from one version directly to another using @progress/kendo-cli.
|
|
679
|
+
|
|
680
|
+
To upgrade to the latest version, call this tool directly. It handles installation automatically.
|
|
681
|
+
|
|
682
|
+
To upgrade to a specific version:
|
|
683
|
+
1. Set all @progress/kendo-angular-* package versions to the target version (e.g. "20.0.0")
|
|
684
|
+
2. Run: npm install
|
|
685
|
+
3. Call this tool with skipInstall: true
|
|
686
|
+
|
|
687
|
+
This tool applies automated code transformations to update your codebase when upgrading ${e} packages. The upgrade runs directly from your current version to the target version \u2014 do not upgrade through intermediate versions.
|
|
688
|
+
|
|
689
|
+
Use this tool when:
|
|
690
|
+
- You need to update existing ${e} code to a newer version
|
|
691
|
+
- You want to automatically apply breaking change fixes
|
|
692
|
+
- You need to update deprecated API usage
|
|
693
|
+
|
|
694
|
+
The tool handles:
|
|
695
|
+
- Component property renames and removals
|
|
696
|
+
- Deprecated feature replacements
|
|
697
|
+
- Breaking API changes
|
|
698
|
+
|
|
699
|
+
Workflow:
|
|
700
|
+
1. Run this upgrade tool to apply codemods.
|
|
701
|
+
2. After the codemods complete, grep the project source files for every outdated value mentioned in the codemod output (e.g. old property names, renamed enum values) to find any remaining occurrences the codemod doesn't handle automatically, and fix them all.
|
|
702
|
+
3. Follow the additional instructions to complete the upgrade process.
|
|
703
|
+
`;var te=U("Kendo UI","Kendo"),oe=`
|
|
909
704
|
### Angular Component Validation
|
|
910
705
|
Component Structure:
|
|
911
706
|
- Use proper @Component decorator configuration
|
|
@@ -913,22 +708,22 @@ Component Structure:
|
|
|
913
708
|
- Correct selector naming convention (kebab-case)
|
|
914
709
|
- Appropriate template and style file organization
|
|
915
710
|
|
|
916
|
-
${
|
|
711
|
+
${te.SETUP_VALIDATION}
|
|
917
712
|
- Kendo animations module configured (if animations are used)
|
|
918
713
|
- Internationalization properly configured for Kendo components
|
|
919
714
|
|
|
920
|
-
${
|
|
715
|
+
${te.PERFORMANCE_OPTIMIZATION}
|
|
921
716
|
- OnPush change detection strategy where appropriate
|
|
922
|
-
- Efficient
|
|
717
|
+
- Efficient \`track\` expression used in \`@for\` blocks with Kendo components
|
|
923
718
|
- Minimal unnecessary change detection cycles
|
|
924
719
|
|
|
925
|
-
${
|
|
720
|
+
${te.THEME_AND_STYLING}
|
|
926
721
|
- Proper theme switching functionality (if implemented)
|
|
927
722
|
- Only ONE theme reference exists across angular.json and styles files
|
|
928
723
|
- Make sure theme import mechanism is consistent with existing project setup
|
|
929
724
|
|
|
930
725
|
Accessibility
|
|
931
|
-
- Accessibility guidelines retrieved and applied to all components`;var
|
|
726
|
+
- Accessibility guidelines retrieved and applied to all components`;var ne=`**Angular Specific Requirements:**
|
|
932
727
|
|
|
933
728
|
**NgModule vs Standalone setup**: Search and detect the current project setup to determine whether to use NgModule or Standalone components based on the following rules:
|
|
934
729
|
1. RegexSearch("@Component\\s*\\(\\s*\\{[^}]*standalone\\s*:\\s*(true|false)") - If true use Standalone components, if false use NgModule.
|
|
@@ -936,12 +731,18 @@ Accessibility
|
|
|
936
731
|
3. RegexSearch("bootstrapModule\\s*\\(") - If found use NgModule.
|
|
937
732
|
4. If neither is found, default to Standalone components.
|
|
938
733
|
|
|
734
|
+
**Template Syntax**: Detect which Angular template syntax the project uses and apply it consistently:
|
|
735
|
+
1. RegexSearch("@if\\s*\\(|@for\\s*\\(|@switch\\s*\\(") - If found, use built-in control flow syntax (\`@if\`, \`@for\`, \`@switch\`) in all templates.
|
|
736
|
+
2. RegexSearch("\\*ngIf|\\*ngFor|\\*ngSwitch") - If found, use structural directives (\`*ngIf\`, \`*ngFor\`, \`*ngSwitch\`) in all templates.
|
|
737
|
+
3. Do NOT mix both syntaxes in the same project.
|
|
738
|
+
4. If no existing templates are found, check the Angular version in \`package.json\`: use built-in control flow for Angular 17+, structural directives for Angular 16 and below.
|
|
739
|
+
|
|
939
740
|
**Kendo UI Theme Management Instructions for Angular**:
|
|
940
741
|
|
|
941
742
|
**Determine existing Kendo Theme/Utils package and Theme Import Mechanism**:
|
|
942
|
-
|
|
743
|
+
|
|
943
744
|
- Read angular.json file
|
|
944
|
-
- Look for theme/utils entries containing "@progress/kendo-theme-" in projects.[project-name].architect.build.options.styles array
|
|
745
|
+
- Look for theme/utils entries containing "@progress/kendo-theme-" in projects.[project-name].architect.build.options.styles array
|
|
945
746
|
- Read styles.css or styles.scss, or any css/scss file
|
|
946
747
|
- Look for @import statements containing "@progress/kendo-theme-" to determine existing theme/utils usage
|
|
947
748
|
- Read the application's main html file (e.g., index.html)
|
|
@@ -959,7 +760,7 @@ Accessibility
|
|
|
959
760
|
2. Match the discovered patterns in all generated code
|
|
960
761
|
3. Maintain consistent formatting, indentation, and code organization with existing files
|
|
961
762
|
4. Always use the same theme import mechanism (unless user specifies otherwise)
|
|
962
|
-
`;var
|
|
763
|
+
`;var se=U("Kendo UI","KendoReact"),ae=`
|
|
963
764
|
### React Component Validation
|
|
964
765
|
Component Structure:
|
|
965
766
|
- Use proper function component patterns with Hooks
|
|
@@ -967,22 +768,22 @@ Component Structure:
|
|
|
967
768
|
- Appropriate file organization (components, hooks, utils)
|
|
968
769
|
- Props interface/type definitions where needed
|
|
969
770
|
|
|
970
|
-
${
|
|
771
|
+
${se.SETUP_VALIDATION}
|
|
971
772
|
- KendoReact license validation (if required)
|
|
972
773
|
- Appropriate bundler configuration for KendoReact packages
|
|
973
774
|
|
|
974
|
-
${
|
|
775
|
+
${se.PERFORMANCE_OPTIMIZATION}
|
|
975
776
|
- React.memo for components that receive stable props
|
|
976
777
|
- useMemo/useCallback for expensive computations and callbacks
|
|
977
778
|
- Proper key props for list rendering with KendoReact components
|
|
978
779
|
|
|
979
|
-
${
|
|
780
|
+
${se.THEME_AND_STYLING}
|
|
980
781
|
- Proper theme switching functionality (if implemented)
|
|
981
782
|
- Only ONE theme import exists across the application
|
|
982
783
|
- Make sure theme import mechanism is consistent with existing project setup
|
|
983
784
|
|
|
984
785
|
Accessibility
|
|
985
|
-
- Accessibility guidelines retrieved and applied to all components`;var
|
|
786
|
+
- Accessibility guidelines retrieved and applied to all components`;var qt={createOrchestrator:xe,createAssistantOrchestrator:Te,createLayoutAssistant:Ie,createStyleAssistant:Ne,createIconSearch:Ee,createCodeAssistant:Re,createAccessibilityAssistant:Pe,createUpgrade:Oe},Kt={orchestrator:Ue,assistantOrchestrator:Ge,layoutAssistant:Le,codeAssistant:Me,styleAssistant:$e,iconAssistant:_e,accessibilityAssistant:Be,gettingStartedAssistant:Fe,upgradeAssistant:qe},Wt={orchestrator:Ke,assistantOrchestrator:We,layoutAssistant:je,styleAssistant:Ve,iconAssistant:ze,codeAssistant:Ye,accessibilityAssistant:He,upgradeAssistant:Qe},jt={Orchestrator:{render:q},Validator:{render:F},SharedValidation:{getSteps:U}},Vt={Angular:{steps:oe,additionalPlan:ne},React:{steps:ae}},h={Tools:qt,ToolNames:Kt,ToolDescriptions:Wt,Templates:jt,Validation:Vt};var zt=h.ToolNames.codeAssistant("kendo"),Je=()=>`# Kendo Design System Guidelines for ${l}
|
|
986
787
|
|
|
987
788
|
## Setting up Styles/CSS
|
|
988
789
|
|
|
@@ -1011,7 +812,7 @@ Alternatively, you can also consume them directly from the Unpkg CDN.
|
|
|
1011
812
|
|
|
1012
813
|
In the ${l} there are available components to create layout. Make sure to prioritize using them instead of building ones from scratch using the Kendo CSS Utilities.
|
|
1013
814
|
|
|
1014
|
-
For any Layout component you can also call the ${
|
|
815
|
+
For any Layout component you can also call the ${zt} tool in order to get specific API reference and docs.
|
|
1015
816
|
|
|
1016
817
|
- ${l} Card component.
|
|
1017
818
|
- Generally, it is recommended to use 100% width (e.g., \`<kendo-card width="100%">\`)
|
|
@@ -1119,7 +920,7 @@ Use the \`kendo-splitter\` component only for **user-resizable** content areas (
|
|
|
1119
920
|
## Popup Z-Index Trap
|
|
1120
921
|
|
|
1121
922
|
CSS \`transform\` (including \`translate3d(0,0,0)\` GPU-compositing tricks) on any ancestor element creates a new stacking context. This clips Kendo popups (which use \`z-index ~10000\`), causing DropDownList, DatePicker, and ComboBox popups to appear behind other elements. Avoid \`transform\` on layout ancestors that contain Kendo overlay components.
|
|
1122
|
-
`;var
|
|
923
|
+
`;var Xe=()=>`## Design Standards for ${l} Theming
|
|
1123
924
|
|
|
1124
925
|
### Color & Contrast Requirements
|
|
1125
926
|
- Body text contrast: \u2265 4.5:1. Large text / UI component borders: \u2265 3:1.
|
|
@@ -1219,17 +1020,17 @@ export class ThemeService {
|
|
|
1219
1020
|
}
|
|
1220
1021
|
}
|
|
1221
1022
|
\`\`\`
|
|
1222
|
-
`;var
|
|
1023
|
+
`;var Ze=h.ToolNames.codeAssistant("kendo"),et=()=>`## Using ${l} Icons
|
|
1223
1024
|
|
|
1224
|
-
Important:
|
|
1025
|
+
Important: Always prefer SVG icons over font icons. Only fall back to font icons if SVG is explicitly not an option.
|
|
1225
1026
|
|
|
1226
1027
|
### Guidelines
|
|
1227
1028
|
|
|
1228
1029
|
- Make sure @progress/kendo-svg-icons is installed.
|
|
1229
1030
|
- Make sure @progress/kendo-angular-icons is installed.
|
|
1230
|
-
- You can call ${
|
|
1231
|
-
- [optional] If SVG is not an option fallback to
|
|
1232
|
-
- [optional] If using font icons you can call ${
|
|
1031
|
+
- You can call ${Ze} tool for ${l} SVGIcon component for docs and API reference.
|
|
1032
|
+
- [optional] If SVG is not an option fallback to font icon - make sure \`<link rel="stylesheet" href="https://unpkg.com/@progress/kendo-font-icons/dist/index.css" />\` is added as a reference.
|
|
1033
|
+
- [optional] If using font icons you can call ${Ze} tool for ${l} Icon component for docs and API reference.
|
|
1233
1034
|
|
|
1234
1035
|
### Examples
|
|
1235
1036
|
|
|
@@ -1270,29 +1071,34 @@ import { KENDO_ICONS } from "@progress/kendo-angular-icons";
|
|
|
1270
1071
|
})
|
|
1271
1072
|
export class AppComponent {}
|
|
1272
1073
|
\`\`\`
|
|
1273
|
-
`;var
|
|
1074
|
+
`;var tt=e=>{let t=e.component?.trim().toLowerCase(),n=Ae.get(t),o=`## ${l} Common Guidelines
|
|
1274
1075
|
|
|
1275
|
-
`;return
|
|
1076
|
+
`;return n&&(o+=`### Package Installation
|
|
1276
1077
|
Always use minimal, targeted package installation.
|
|
1277
1078
|
Ensure all necessary Angular packages are installed, including @angular/localize.
|
|
1278
1079
|
|
|
1279
1080
|
Process:
|
|
1280
1081
|
1. Identify the required components
|
|
1281
1082
|
2. Determine the specific Kendo Angular packages needed
|
|
1282
|
-
3. Use the "ng add ${
|
|
1083
|
+
3. Use the "ng add ${n}" command
|
|
1283
1084
|
|
|
1284
|
-
For ${e.component} component: \`ng add ${
|
|
1085
|
+
For ${e.component} component: \`ng add ${n}\`
|
|
1285
1086
|
`),e.componentInstructions&&(o+=`
|
|
1286
1087
|
## Component-Specific Guidelines
|
|
1287
1088
|
|
|
1288
1089
|
${e.componentInstructions}
|
|
1289
1090
|
`),o+=`
|
|
1091
|
+
## Icons
|
|
1092
|
+
|
|
1093
|
+
When icons are needed, always prefer SVG icons over font icons.
|
|
1094
|
+
Only fall back to font icons if SVG icons are explicitly not an option.
|
|
1095
|
+
`,o+=`
|
|
1290
1096
|
## Types and Interfaces
|
|
1291
1097
|
|
|
1292
|
-
|
|
1293
|
-
|
|
1294
|
-
|
|
1295
|
-
`,o};function
|
|
1098
|
+
Always use the correct ${l} types for component inputs, outputs, and event handler parameters.
|
|
1099
|
+
Do not substitute plain strings, plain objects, or \`any\` for a typed union, enum, or interface provided by the library.
|
|
1100
|
+
Import all required types from the appropriate ${l} package.
|
|
1101
|
+
`,o};function ot(e="kendo-angular-app",t=!0,n="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.`,s=1,i=t?`## Step ${s++}: Install Angular CLI
|
|
1296
1102
|
|
|
1297
1103
|
First, ensure the Angular CLI is installed globally:
|
|
1298
1104
|
|
|
@@ -1300,7 +1106,7 @@ First, ensure the Angular CLI is installed globally:
|
|
|
1300
1106
|
npm install -g @angular/cli@latest
|
|
1301
1107
|
\`\`\`
|
|
1302
1108
|
|
|
1303
|
-
## Step ${
|
|
1109
|
+
## Step ${s++}: Create the Project
|
|
1304
1110
|
|
|
1305
1111
|
Create a new Angular project using the Angular CLI:
|
|
1306
1112
|
|
|
@@ -1329,7 +1135,7 @@ Before you begin, ensure you have:
|
|
|
1329
1135
|
- **Node.js 18 or later** installed on your machine
|
|
1330
1136
|
- If Node.js is not available, you need to install the latest Node.js automatically as a preliminary step before installing the Angular CLI tool.
|
|
1331
1137
|
|
|
1332
|
-
${
|
|
1138
|
+
${i}## Step ${s++}: Configure animations
|
|
1333
1139
|
|
|
1334
1140
|
This ensures animations that ${l} components rely on are configurated correctly.
|
|
1335
1141
|
|
|
@@ -1347,12 +1153,12 @@ export const appConfig: ApplicationConfig = {
|
|
|
1347
1153
|
};
|
|
1348
1154
|
\`\`\`
|
|
1349
1155
|
|
|
1350
|
-
## Step ${
|
|
1156
|
+
## Step ${s++}: Install ${l} Packages
|
|
1351
1157
|
|
|
1352
1158
|
Use angular CLI to install grid package. While installing, confirm that you also want to install the underlying npm package with the suggested version from the ng tool.
|
|
1353
1159
|
|
|
1354
1160
|
\`\`\`bash
|
|
1355
|
-
ng add @progress/kendo-angular-grid@latest --skip-confirmation --theme=${
|
|
1161
|
+
ng add @progress/kendo-angular-grid@latest --skip-confirmation --theme=${n}
|
|
1356
1162
|
\`\`\`
|
|
1357
1163
|
|
|
1358
1164
|
Use npm to install additional required ${l} packages:
|
|
@@ -1361,7 +1167,7 @@ Use npm to install additional required ${l} packages:
|
|
|
1361
1167
|
npm install @progress/kendo-angular-barcodes @progress/kendo-angular-chart-wizard @progress/kendo-angular-charts @progress/kendo-angular-dateinputs @progress/kendo-angular-diagrams @progress/kendo-angular-editor @progress/kendo-angular-filter @progress/kendo-angular-gantt @progress/kendo-angular-gauges @progress/kendo-angular-icons @progress/kendo-angular-listbox @progress/kendo-angular-listview @progress/kendo-angular-map @progress/kendo-angular-pdfviewer @progress/kendo-angular-pivotgrid @progress/kendo-angular-ripple @progress/kendo-angular-scheduler @progress/kendo-angular-scrollview @progress/kendo-angular-sortable @progress/kendo-angular-spreadsheet @progress/kendo-angular-tooltip @progress/kendo-angular-treelist @progress/kendo-angular-typography @progress/kendo-file-saver
|
|
1362
1168
|
\`\`\`
|
|
1363
1169
|
|
|
1364
|
-
## Step ${
|
|
1170
|
+
## Step ${s++}: Activate Kendo license
|
|
1365
1171
|
|
|
1366
1172
|
This step is required to use Kendo UI for Angular components without watermarks and with access to all features. At this point, the customer have the correct license file, and the command should be run to activate the component in this specific project. Run the following command to activate your license:
|
|
1367
1173
|
|
|
@@ -1376,7 +1182,7 @@ ng cache clean
|
|
|
1376
1182
|
\`\`\`
|
|
1377
1183
|
|
|
1378
1184
|
|
|
1379
|
-
## Step ${
|
|
1185
|
+
## Step ${s++}: Install the Kendo utils package
|
|
1380
1186
|
|
|
1381
1187
|
Add the following script to index.html to include the Kendo theme utils, which are required for the themes to work correctly:
|
|
1382
1188
|
|
|
@@ -1386,7 +1192,7 @@ Add the following script to index.html to include the Kendo theme utils, which a
|
|
|
1386
1192
|
|
|
1387
1193
|
${t?`The application should start and open your browser to see your ${l} application.`:`The application should start and open in your browser. Verify that the ${l} components are rendering correctly with the theme applied.`}
|
|
1388
1194
|
|
|
1389
|
-
## Step ${
|
|
1195
|
+
## Step ${s++}: Create Sample Page
|
|
1390
1196
|
|
|
1391
1197
|
Add the sample page below to your application to verify that everything is working correctly.
|
|
1392
1198
|
|
|
@@ -1520,7 +1326,7 @@ export class App {}
|
|
|
1520
1326
|
}
|
|
1521
1327
|
\`\`\`
|
|
1522
1328
|
|
|
1523
|
-
## Step ${
|
|
1329
|
+
## Step ${s++}: Run Your Application
|
|
1524
1330
|
|
|
1525
1331
|
**Verification:** Automatically run the application. Do not just inform the user\u2014execute the following command and keep the application running:
|
|
1526
1332
|
|
|
@@ -1528,7 +1334,7 @@ export class App {}
|
|
|
1528
1334
|
cd ${e} && ng serve
|
|
1529
1335
|
\`\`\`
|
|
1530
1336
|
|
|
1531
|
-
`}var
|
|
1337
|
+
`}var nt=`
|
|
1532
1338
|
## Grid Data Binding
|
|
1533
1339
|
|
|
1534
1340
|
MUST use kendoGridBinding directive for basic Grid operations
|
|
@@ -1563,10 +1369,12 @@ onFilterChange(filter: CompositeFilterDescriptor): void {
|
|
|
1563
1369
|
|
|
1564
1370
|
## kendoButton Must Not Be Combined with Command Directives
|
|
1565
1371
|
|
|
1566
|
-
Never apply kendoButton to the same element as any of these Grid command directives - they render their own button internally.
|
|
1372
|
+
Never apply kendoButton to the same element as any of these Grid command directives - they render their own button internally.
|
|
1567
1373
|
Instead, apply only the command directive to the button element.
|
|
1568
1374
|
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.
|
|
1569
1375
|
|
|
1376
|
+
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.
|
|
1377
|
+
|
|
1570
1378
|
Affected directives:
|
|
1571
1379
|
- kendoGridExcelCommand
|
|
1572
1380
|
- kendoGridCSVCommand
|
|
@@ -1579,24 +1387,34 @@ Affected directives:
|
|
|
1579
1387
|
|
|
1580
1388
|
WRONG: <button kendoGridExcelCommand kendoButton>Export to Excel</button>
|
|
1581
1389
|
CORRECT: <button kendoGridExcelCommand>Export to Excel</button>
|
|
1582
|
-
|
|
1390
|
+
|
|
1391
|
+
## Deprecated Properties & Modern Replacement
|
|
1392
|
+
|
|
1393
|
+
Column width Property: The width property for columns should be set as a number for pixel values, not a string.
|
|
1394
|
+
CORRECT: <kendo-grid-column [width]="120">
|
|
1395
|
+
WRONG: <kendo-grid-column width="120px">
|
|
1396
|
+
`;var st=`
|
|
1583
1397
|
## kendoButton Must Not Be Combined with Command Directives
|
|
1584
1398
|
|
|
1585
|
-
Never apply kendoButton to the same element as any of these TreeList command directives - they render their own button internally.
|
|
1399
|
+
Never apply kendoButton to the same element as any of these TreeList command directives - they render their own button internally.
|
|
1586
1400
|
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.
|
|
1587
1401
|
|
|
1402
|
+
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.
|
|
1403
|
+
|
|
1588
1404
|
Affected directives:
|
|
1589
1405
|
- kendoTreeListExcelCommand
|
|
1590
1406
|
- kendoTreeListPDFCommand
|
|
1591
1407
|
|
|
1592
1408
|
WRONG: <button kendoTreeListExcelCommand kendoButton>Export to Excel</button>
|
|
1593
1409
|
CORRECT: <button kendoTreeListExcelCommand>Export to Excel</button>
|
|
1594
|
-
`;var
|
|
1410
|
+
`;var at=`
|
|
1595
1411
|
## kendoButton Must Not Be Combined with Command Directives
|
|
1596
1412
|
|
|
1597
1413
|
Never apply kendoButton to the same element as any of these ListView command directives - they render their own button internally.
|
|
1598
1414
|
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.
|
|
1599
1415
|
|
|
1416
|
+
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.
|
|
1417
|
+
|
|
1600
1418
|
Affected directives:
|
|
1601
1419
|
- kendoListViewAddCommand
|
|
1602
1420
|
- kendoListViewEditCommand
|
|
@@ -1606,23 +1424,27 @@ Affected directives:
|
|
|
1606
1424
|
|
|
1607
1425
|
WRONG: <button kendoListViewAddCommand kendoButton>Add</button>
|
|
1608
1426
|
CORRECT: <button kendoListViewAddCommand>Add</button>
|
|
1609
|
-
`;var
|
|
1427
|
+
`;var rt=`
|
|
1610
1428
|
## kendoButton Must Not Be Combined with Command Directives
|
|
1611
1429
|
|
|
1612
1430
|
Never apply kendoButton to the same element as the Scheduler PDF command directive - it renders its own button internally.
|
|
1613
1431
|
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.
|
|
1614
1432
|
|
|
1433
|
+
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.
|
|
1434
|
+
|
|
1615
1435
|
Affected directives:
|
|
1616
1436
|
- kendoSchedulerPDFCommand
|
|
1617
1437
|
|
|
1618
1438
|
WRONG: <button kendoSchedulerPDFCommand kendoButton>Export to PDF</button>
|
|
1619
1439
|
CORRECT: <button kendoSchedulerPDFCommand>Export to PDF</button>
|
|
1620
|
-
`;var
|
|
1440
|
+
`;var it=`
|
|
1621
1441
|
## kendoButton Must Not Be Combined with Action Directives
|
|
1622
1442
|
|
|
1623
1443
|
Never apply kendoButton to the same element as any of these Window action directives - they render their own button internally.
|
|
1624
1444
|
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.
|
|
1625
1445
|
|
|
1446
|
+
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.
|
|
1447
|
+
|
|
1626
1448
|
Affected directives:
|
|
1627
1449
|
- kendoWindowCloseAction
|
|
1628
1450
|
- kendoWindowMaximizeAction
|
|
@@ -1631,7 +1453,7 @@ Affected directives:
|
|
|
1631
1453
|
|
|
1632
1454
|
WRONG: <button kendoWindowCloseAction kendoButton></button>
|
|
1633
1455
|
CORRECT: <button kendoWindowCloseAction></button>
|
|
1634
|
-
`;var
|
|
1456
|
+
`;var lt=`
|
|
1635
1457
|
## Charts Data Binding
|
|
1636
1458
|
|
|
1637
1459
|
Never bind the Chart's data to a getter property. Using a getter causes the chart to rerender on every Angular change detection cycle.
|
|
@@ -1639,7 +1461,7 @@ Never bind the Chart's data to a getter property. Using a getter causes the char
|
|
|
1639
1461
|
BAD: get chartData() { return [ /* data items */ ] }
|
|
1640
1462
|
GOOD: public chartData = [ /* data items */ ];
|
|
1641
1463
|
GOOD: public chartData = this.data.map(...)
|
|
1642
|
-
`;var
|
|
1464
|
+
`;var ct=["combobox","dropdownlist","dropdowntree","multicolumncombobox","multiselect","multiselecttree","autocomplete"],dt=e=>e==="autocomplete"?Ht:e==="dropdowntree"?Qt:e==="multiselecttree"?Jt:e==="multicolumncombobox"?Xt:Yt(e),Yt=e=>`
|
|
1643
1465
|
## ${e}
|
|
1644
1466
|
When implementing or updating the ${e} component, always follow these rules for \`textField\` and \`valueField\`:
|
|
1645
1467
|
|
|
@@ -1689,7 +1511,7 @@ If \`valuePrimitive\` is false, which is the default, the value must be an objec
|
|
|
1689
1511
|
\`\`\`typescript
|
|
1690
1512
|
public selectedValue = { id: 2, name: 'B' };
|
|
1691
1513
|
\`\`\`
|
|
1692
|
-
`,
|
|
1514
|
+
`,Ht=`
|
|
1693
1515
|
## AutoComplete
|
|
1694
1516
|
|
|
1695
1517
|
### Primitive Data
|
|
@@ -1697,7 +1519,7 @@ If the data is an array of primitives (e.g., [data]="['A', 'B']"), never set \`v
|
|
|
1697
1519
|
|
|
1698
1520
|
### Complex Data
|
|
1699
1521
|
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").
|
|
1700
|
-
`,
|
|
1522
|
+
`,Qt='\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',Jt='\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',Xt='\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 pt=`
|
|
1701
1523
|
|
|
1702
1524
|
## Smart Grid (AI-Enhanced) Instructions
|
|
1703
1525
|
|
|
@@ -1716,6 +1538,6 @@ Suggestion Examples by Domain:
|
|
|
1716
1538
|
|
|
1717
1539
|
Required Disclaimer:
|
|
1718
1540
|
"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."
|
|
1719
|
-
`;function
|
|
1541
|
+
`;var ut=["button","buttongroup","splitbutton","dropdownbutton","chip","chiplist","floatingactionbutton","smartpastebutton","speechtotextbutton"],mt=e=>e==="button"||e==="buttongroup"||e==="splitbutton"||e==="dropdownbutton"||e==="chip"?Zt:"",Zt='\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 eo(e){let t=e?.trim().toLowerCase();if(t==="grid")return[nt,pt].join(`
|
|
1720
1542
|
|
|
1721
|
-
`);if(t==="treelist")return
|
|
1543
|
+
`);if(t==="treelist")return st;if(t==="listview")return at;if(t==="scheduler")return rt;if(t==="window")return it;if(t==="charts")return lt;if(ct.includes(t))return dt(t);if(ut.includes(t))return mt(t)}var M=!!process.env.PLUGIN_MODE,gt=h.ToolNames.layoutAssistant(D),re=h.ToolNames.codeAssistant(D),ht=h.ToolNames.styleAssistant(D),ie=h.ToolNames.iconAssistant(D),ft=h.ToolNames.gettingStartedAssistant(D),yt=h.ToolNames.accessibilityAssistant(D),to=h.ToolNames.upgradeAssistant(D);function bt(e,t){return[...M?[]:[h.Tools.createOrchestrator({name:h.ToolNames.orchestrator(D),title:"Kendo UI Generator",description:h.ToolDescriptions.orchestrator(l),layoutAssistantName:gt,codeAssistantName:re,styleAssistantName:ht,iconAssistantName:ie,accessibilityAssistantName:yt,suiteName:l,libKey:N,components:_,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:re,iconAssistantName:ie,suiteName:l,libKey:N,components:_,requiredAccess:["assistant"]},e)],h.Tools.createLayoutAssistant({name:gt,title:"Kendo UI Layout Assistant",description:h.ToolDescriptions.layoutAssistant,suiteName:l,libKey:N,getPreContent:M?void 0:Je,requiredAccess:["agent"]},e),h.Tools.createStyleAssistant({name:ht,title:"Kendo UI Style Assistant",description:h.ToolDescriptions.styleAssistant,libKey:N,getPreContent:M?void 0:Xe,requiredAccess:["agent"]},e),h.Tools.createIconSearch({name:ie,title:"Kendo UI Icon Assistant",description:h.ToolDescriptions.iconAssistant,libKey:N,getPostContent:M?void 0:et,requiredAccess:["assistant","agent"]},e),h.Tools.createCodeAssistant({name:re,title:"Kendo UI Component Assistant",description:h.ToolDescriptions.codeAssistant(l),libKey:N,suiteName:l,components:_,getPostContent:M?void 0:({component:o})=>{let s=eo(o);return tt({component:o,componentInstructions:s})},requiredAccess:["assistant","agent"]},e),...M?[]:[(()=>{let o=new S(ft,{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:ke(l,"kendo-angular-app")},async({projectName:s,createNewProject:i,theme:a},{_meta:r})=>{let p=x(o,r);try{await e.recordToolUserRequest({toolName:ft,meta:{projectName:s,createNewProject:i,theme:a,...p}})}catch(f){console.error("Error recording tool request:",f)}return{content:[{type:"text",text:ot(s,i,a)}]}});return o})()],h.Tools.createAccessibilityAssistant({name:yt,title:"Kendo UI Accessibility Assistant",description:h.ToolDescriptions.accessibilityAssistant(l),libKey:N,suiteName:l,components:_,requiredAccess:["agent"]},e),h.Tools.createUpgrade({name:to,title:"Kendo UI Upgrade Assistant",description:h.ToolDescriptions.upgradeAssistant(l),suiteName:l,requiredAccess:["agent"]},e)].filter(o=>o.hasAccess(t))}var ro=ao(import.meta.url),io=kt.dirname(ro),lo=kt.resolve(io,"../package.json"),At=JSON.parse(so.readFileSync(lo,"utf-8")),vt=new oo({name:"kendo-mcp",title:"Kendo MCP Server",version:At.version});async function co(){let e=new no;k("Starting server...");let t=await ye(async()=>{let o=(await we())?.entitlement;return o?.Product?.Code||o?.product?.code});t!=="none"&&(B.toolNameHeader=t==="agent"||t==="full"?"agent":"assistant",bt(B,t).forEach(o=>o.register(vt)),ve({serverName:"angular",contextApi:B,enrichWithUserData:!0,additionalFields:{version:At.version,access_type:t}})),await vt.connect(e)}co();
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@progress/kendo-angular-mcp",
|
|
3
|
-
"version": "1.
|
|
3
|
+
"version": "1.7.1",
|
|
4
4
|
"type": "module",
|
|
5
5
|
"bin": "./dist/index.js",
|
|
6
6
|
"license": "See LICENSE.md",
|
|
@@ -24,9 +24,9 @@
|
|
|
24
24
|
],
|
|
25
25
|
"dependencies": {
|
|
26
26
|
"@grpc/grpc-js": "^1.14.3",
|
|
27
|
-
"@grpc/proto-loader": "^0.8.
|
|
27
|
+
"@grpc/proto-loader": "^0.8.1",
|
|
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": {
|
package/proto/service.proto
CHANGED
|
@@ -116,10 +116,6 @@ message ValidateUserLicenseResponse {
|
|
|
116
116
|
bool has_exceeded_rate_limit = 3;
|
|
117
117
|
}
|
|
118
118
|
|
|
119
|
-
// ============================================================================
|
|
120
|
-
// Service Definition
|
|
121
|
-
// ============================================================================
|
|
122
|
-
|
|
123
119
|
service ContextQueryService {
|
|
124
120
|
rpc Query(ContextQueryRequest) returns (StringArray);
|
|
125
121
|
rpc GetApiRefMatches(ContextQueryRequest) returns (StringArray);
|