@progress/kendo-angular-mcp 1.6.0 → 1.6.1-beta.d2eee4d2.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/index.js +341 -75
- package/package.json +1 -1
- package/proto/service.proto +4 -0
package/dist/index.js
CHANGED
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
#!/usr/bin/env node
|
|
2
|
-
import{McpServer as
|
|
3
|
-
`,n
|
|
2
|
+
import{McpServer as Vt}from"@modelcontextprotocol/sdk/server/mcp.js";import{StdioServerTransport as Wt}from"@modelcontextprotocol/sdk/server/stdio.js";import{dirname as Ct,join as Tt}from"path";import{fileURLToPath as xt}from"url";import{loadLicense as mt,decodeLicenseKey as gt,decodeLicenseEvidence as ht}from"@progress/kendo-licensing/utils";var F=class extends Error{constructor(t){super(t),this.name="LicenseError"}};function ae(e){return e.replace(/^\uFEFF/,"")}async function ie(e){let t=null,s=null;try{let o=mt();if(!o.success){let n=new F(o.message);throw e&&await e("license_load_failed",{error:o.message}).catch(()=>{}),n}try{t=(await gt(o.value)).licenses.find(async a=>!!(await ht(a)).userId)}catch(n){console.log(n.message),e&&await e("license_load_failed",{error:n.message||"Unknown decoding error"}).catch(()=>{})}if(!t)return[ae(o.value),null]}catch(o){return s=o.message||"Unknown error loading license.",e&&await e("license_load_failed",{error:s}).catch(()=>{}),[null,s]}return[ae(t),null]}import D from"node:fs";import $ from"node:path";var q=!1,N=process.env.DEBUG_LOG_FILE,le=!!(N&&typeof N=="string");if(le){let e=$.resolve(N),t=$.dirname(e);if(t!=="."&&t!==process.cwd()&&!D.existsSync(t))try{D.mkdirSync(t,{recursive:!0})}catch(s){console.error("Error creating log directory:",s)}if(!D.existsSync(e))try{D.writeFileSync(e,"")}catch(s){console.error("Error creating log file:",s)}}else q=!1;q=le&&!!N&&D.existsSync($.resolve(N));function g(...e){if(q&&N){let o=`${new Date().toISOString()}: ${e.join(" ")}
|
|
3
|
+
`,n=$.resolve(N);D.appendFile(n,o,a=>{a&&console.error("Error writing to log file:",a)})}}import ft from"@grpc/proto-loader";import P from"@grpc/grpc-js";import pe from"path";import ce from"fs";import{fileURLToPath as yt}from"url";var bt=yt(import.meta.url),kt=pe.dirname(bt),ue={version:"unknown"},de=pe.resolve(kt,"../package.json");ce.existsSync(de)&&(ue=JSON.parse(ce.readFileSync(de,"utf-8")));function vt(e){return e.replace(/\u2014/g,"--").replace(/\u2013/g,"-").replace(/[^\x20-\x7E]/g,"")}var M=class{constructor(t,s,o){this.contextApiUrl=t;this.protoPath=s;this.options=o;this.toolNameHeader="assistant";let n=ft.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"),g("Using ContextApi URl:",this.contextApiUrl);let a=P.loadPackageDefinition(n),r=100*1024*1024,i={"grpc.max_receive_message_length":r,"grpc.max_send_message_length":r};this.client=new a.ContextQueryService(this.contextApiUrl||"contextapi.telerik.com:443",this.isDev?P.credentials.createInsecure():P.credentials.createSsl(),i)}async getMetadata({meta:t}={meta:{}}){let[s,o]=this.isDev?["fake_license",null]:await ie((p,b)=>this.logEvent(p,b)),n=process.env.CONTEXTAPI_API_KEY,a=n&&typeof n=="string",r=s&&typeof s=="string";if(!r&&!a&&o)throw new Error(`Failed to authenticate with API key or License key!
|
|
4
4
|
|
|
5
|
-
License Error: ${o}`);let i=new D.Metadata;if(a)try{i.add("x-license-key",s)}catch(g){throw m("Error adding license key to metadata:",g),new Error(`Failed to use license key: ${g.message}`)}r&&i.add("x-api-key",n),this.options?.libName&&i.add("x-library-name",this.options.libName),i.add("x-tool-name",this.toolNameHeader);let d=JSON.stringify({...t,source:"npm",version:le.version,os:process.platform,node_version:process.version});return i.add("x-request-metadata",ht(d)),i}async query(t,s){let o=await this.getMetadata({meta:s});return new Promise((n,r)=>{this.client.query(t,o,(a,i)=>{a?r(new Error(a)):n(i)})})}async getApiRefMatches(t,s){let o=await this.getMetadata({meta:s});return new Promise((n,r)=>{this.client.getApiRefMatches(t,o,(a,i)=>{a?r(new Error(a)):n(i)})})}async queryCssUtils(t,s){let o=await this.getMetadata({meta:s});return new Promise((n,r)=>{this.client.cssUtilsSearch(t,o,(a,i)=>{a?(m("Error querying CSS Utils:",a),r(new Error(a))):n(i)})})}async queryIconsSearch(t,s){let o=await this.getMetadata({meta:s});return new Promise((n,r)=>{this.client.iconsSearch(t,o,(a,i)=>{a?(m("Error querying Icons Search:",a),r(new Error(a))):n(i)})})}async queryBuildingBlocks(t,s){let o=await this.getMetadata({meta:s});return new Promise((n,r)=>{this.client.buildingBlocksSearch(t,o,(a,i)=>{a?(m("Error querying Building Blocks:",a),r(new Error(a))):n(i)})})}async validateUserLicense(){let t=await this.getMetadata();return new Promise((s,o)=>{this.client.validateUserLicense(null,t,(n,r)=>{n?(m("Error validating user license:",n),o(new Error(n))):s(r)})})}async queryThemeGenerate(t,s){let o=await this.getMetadata({meta:s});return new Promise((n,r)=>{this.client.generateTheme(t,o,(a,i)=>{a?(m("Error querying context API/GenerateTheme:",a),r(new Error(a))):n(i)})})}async recordOrchestratorUserRequest({meta:t}){let s=await this.getMetadata({meta:t});return new Promise((o,n)=>{this.client.recordOrchestratorUserRequest(null,s,(r,a)=>{r?(m("Error recording orchestrator user request:",r),n(new Error(r))):o(a)})})}async recordToolUserRequest({toolName:t,meta:s}){let o=await this.getMetadata({meta:s});return new Promise((n,r)=>{this.client.recordToolUserRequest({tool_name:t},o,(a,i)=>{a?(m("Error recording tool user request:",a),r(new Error(a))):n(i)})})}async logEvent(t,s){let o="h8utJ6rk4PpIWX4JMn9beQDsjVUri6KV0XYfiVwq";if(!o||typeof o!="string"){m("LOGGING_API_KEY not configured, skipping log event");return}let n=new D.Metadata;return n.add("x-api-key",o),new Promise((r,a)=>{this.client.logEvent({event_name:t,fields:s||{}},n,(i,d)=>{i?(m("Error logging event:",i),a(new Error(i))):r()})})}};import{z as q}from"zod";var io=q.object({user_id:q.string(),user_email:q.string().email()});import{z as k}from"zod";var ft=k.object({Product:k.object({Id:k.number().int(),Code:k.string(),Name:k.string()}),License:k.nullable(k.object({Id:k.number().int(),Name:k.string(),Type:k.string(),Active:k.boolean()})),Availability:k.array(k.object({LicenseStart:k.nullable(k.string().datetime()),LicenseEnd:k.nullable(k.string().datetime())})),IsLicenseAvailable:k.optional(k.boolean())}),po=k.array(ft);async function ce(e){let t=process.env.KENDO_MCP_ACCESS;if(t==="true"||t==="1"||t==="full")return"full";if(typeof t=="string"&&(t.toLowerCase()==="agent"||t.toLowerCase()==="assistant"))return t.toLowerCase();let s=await e();return s.toLocaleLowerCase()==="agentic_ui_generator"?"agent":s.toLocaleLowerCase()==="ai_coding_assistants"?"assistant":"none"}function de(){return'**Accessibility Guidelines: WCAG 2.2 Level AA Compliance**\n\n**Core Principles:**\n1. Use semantic HTML and ARIA correctly\n2. Ensure WCAG 2.2 AA compliance\n3. Follow W3C ARIA Authoring Practices\n4. Provide standards-based accessibility fixes\n\n**1. Form Control Labels** (WCAG 1.3.1, 3.3.2, 4.1.2)\nEvery input must have an associated label.\nCORRECT: `<input type="search" aria-label="Search products" placeholder="Search...">`\nCORRECT: `<label for="qty">Quantity</label><input type="number" id="qty">`\nWRONG: `<span>Email</span><input type="email">` (no association)\nWRONG: `<input type="email" placeholder="Email">` (placeholder as label)\n\n**2. Button Accessibility** (WCAG 4.1.2, 2.4.6, 2.5.3)\nAll buttons need accessible names describing their purpose.\nCORRECT: `<button type="button">Save Changes</button>`\nCORRECT: `<button aria-label="Close dialog"><svg aria-hidden="true" focusable="false">...</svg></button>`\nWRONG: `<button><svg>...</svg></button>` (no accessible name)\nWRONG: `<button>Click here</button>` (generic text)\n\n**3. Popup/Menu Triggers** (WCAG 4.1.2, 1.3.1)\nIndicate popup purpose and state using aria-haspopup, aria-expanded, aria-controls.\nCORRECT: `<button aria-expanded="false" aria-haspopup="menu" aria-controls="menu-id">Settings</button>`\n\n**4. Image Accessibility** (WCAG 1.1.1)\nInformative: `<img src="chart.png" alt="Sales increased 25% in Q4 2024">`\nFunctional: `<a href="/home"><img src="logo.png" alt="Company Name Home"></a>`\nDecorative: `<img src="border.png" alt="" role="presentation">`\nComplex: `<img src="chart.png" alt="Sales data" aria-describedby="desc-id">`\nWRONG: Missing alt, filename as alt, generic alt for decorative images\n\n**5. Link Accessibility** (WCAG 2.4.4, 2.4.6)\nLinks must be descriptive and understandable out of context.\nCORRECT: `<a href="/products">View All Products</a>`\nCORRECT: `<a href="/article" aria-label="Read more about New Product Launch">Read more</a>`\nWRONG: "Click here", "Read more", "Learn more" without context\n\n**6. Form Validation** (WCAG 3.3.1, 3.3.2, 3.3.3)\nErrors must be identified, associated with inputs, and provide suggestions. Use aria-describedby, aria-invalid="true", and role="alert".\n\n**7. Heading Structure** (WCAG 1.3.1, 2.4.6)\nEach page must have an `<h1>` that describes its content. Use hierarchical, descriptive headings with no skipped levels (h1\u2192h2\u2192h3).\nCORRECT: `<h1>Dashboard</h1> <h2>Sales</h2> <h3>By Region</h3>`\nWRONG: No `<h1>` on the page, or skipping levels (h1\u2192h3)\nIf a heading should look smaller than its semantic level, use CSS: `<h2 class="text-sm">Subtitle</h2>`\n\n**8. Page Component Landmark Rules** (WCAG 1.3.1, 4.1.2)\nPage components (route components) may be rendered inside a layout that already provides `<main>`, `<header>`, or `<footer>`. Since the layout configuration is unknown, avoid using these landmarks in page components to prevent potential duplication and nesting violations. Use `<div>`, `<section>`, or `<article>` as the top-level wrapper instead.\n- Avoid adding `<main>`, `role="main"`, `<header>`, or `<footer>` in page components \u2014 the layout typically provides them. Duplicating them can cause `landmark-no-duplicate-main` and `landmark-main-is-top-level` violations.\n- Avoid adding `role="banner"` or using a semantic `<header>` element in page components \u2014 the layout\'s `<header>` already claims the banner landmark. Adding another causes `landmark-banner-is-top-level` violations.\n- Avoid adding `role="contentinfo"` to elements inside page components \u2014 the contentinfo landmark should be a top-level landmark, not nested inside `<main>` or other landmarks. Nesting it can cause `landmark-contentinfo-is-top-level` violations.\n- When multiple `<section>` or `<nav>` elements exist on a page, give each a unique `aria-label` to avoid `landmark-unique` violations.\n\n**9. ARIA Role and Attribute Restrictions** (WCAG 4.1.2)\nOnly use ARIA roles that are valid for the given HTML element. Avoid adding `aria-label` or `aria-labelledby` to elements that do not permit naming.\n- `<article>` has an implicit `article` role. Do NOT override it with `role="listitem"`, `role="button"`, `role="link"`, or any other role \u2014 none are allowed on `<article>`. Use `<li>` for list items, `<button>` for interactive cards, or `<a>` for clickable cards instead.\n- `<button>` already has an implicit `button` role. Do NOT add `role="listitem"` or other incompatible roles.\n- `<span>` and `<div>` without roles are generic elements. Do NOT add `aria-label` to them \u2014 it is a prohibited attribute on elements with no accessible role and can cause `aria-prohibited-attr` violations. Instead, use `role="img"` + `aria-label` for visual indicators, or use visually hidden text.\n- Do NOT add `aria-label` to non-interactive `<div>` wrappers \u2014 it has no effect and triggers violations.\n- `aria-pressed` is only valid on elements with `role="button"`, `role="checkbox"`, `role="menuitemcheckbox"`, `role="option"`, `role="radio"`, or `role="switch"`. Do NOT use `aria-pressed` on elements with `role="listitem"` or other roles.\nCORRECT: `<ul role="list"><li class="product-card">...</li></ul>` (listitem inside list)\nCORRECT: `<span role="img" aria-label="Status: pending" class="status-dot"></span>` (role added before aria-label)\nCORRECT: `<span class="status-dot" aria-hidden="true"></span><span class="visually-hidden">Pending</span>` (hidden text alternative)\nWRONG: `<article role="listitem">` (listitem not allowed on article)\nWRONG: `<article role="button">` (button not allowed on article \u2014 use `<button>` or `<div role="button">`)\nWRONG: `<span aria-label="pending" class="status-dot"></span>` (aria-label prohibited on generic span)\nWRONG: `<div aria-label="Product badges" class="badges"></div>` (aria-label prohibited on generic div)\n\n**Quick Checklist:**\n- **Forms:** Associated labels, aria-required on required fields, autocomplete attributes, aria-describedby for errors, aria-invalid for invalid fields, fieldsets with legends\n- **Buttons/Links:** Accessible names, aria-label for icon buttons, aria-hidden on decorative icons, descriptive link text\n- **Popups/Dialogs:** aria-haspopup, aria-expanded, aria-controls, role="dialog", aria-modal="true", aria-labelledby, focus trap, Escape to close\n- **Images:** alt on all images, descriptive alt for informative, empty alt for decorative, aria-describedby for complex\n- **Structure:** One h1, logical heading hierarchy, avoid `<main>`, `<header>`, `<footer>`, `role="main"`, `role="contentinfo"`, `role="banner"` in page/route components (the layout may already provide them), use `<section>` or `<div>` as page-level wrappers, unique aria-labels on duplicate landmark types\n- **ARIA Rules:** Avoid adding `aria-label` to generic `<span>`/`<div>` without a role, avoid using `role="listitem"` or `role="button"` on `<article>` \u2014 use `<li>` for list items, add `role="img"` before `aria-label` on visual indicators, `aria-pressed` only on button-like roles\n- **Scrollable Regions:** Any scrollable container must have `tabindex="0"` or contain keyboard-interactive children\n- **Nested Interactive:** Do not add interactive role/tabindex to a container that already has focusable children\n- **List Roles:** `role="list"` containers must have `role="listitem"` children \u2014 prefer `<ul>/<li>` natively\n- **Dynamic Content:** role="status"/aria-live="polite" for updates, role="alert"/aria-live="assertive" for critical alerts\n- **Keyboard/Focus:** All interactive elements keyboard accessible, logical focus order, visible focus indicators, no keyboard traps (except modals)\n- **Color/Contrast:** 4.5:1 text contrast (3:1 large text), 3:1 UI component contrast, no color-only information, 3:1 focus indicator contrast'}var yt=1440*60*1e3;function pe(e){let{serverName:t,contextApi:s,additionalFields:o={},intervalMs:n=yt}=e,r="mcp_server_heartbeat",a=async()=>{try{let d={server_name:t,timestamp:new Date().toISOString(),...o};await s.logEvent(r,d)}catch(d){m(`Failed to send heartbeat for ${t}:`,d)}};a();let i=setInterval(a,n);return()=>{clearInterval(i),m(`Heartbeat stopped for ${t}`)}}import{z as K}from"zod";var bt=["default","bootstrap","material","fluent"];function ue(e,t){return{projectName:K.string().default(t).describe("The name of the project. Used as the project folder name when creating a new project."),createNewProject:K.boolean().default(!0).describe(`Whether to create a new project before configuring ${e}. Set to true to scaffold a brand-new project, or false if the project already exists and you only want to add ${e} to it.`),theme:K.enum(bt).default("default").describe("The Kendo UI theme to use. Determines which theme package is installed and imported.")}}var l="Kendo UI for Angular",T="angular",I="kendo",O=["AIPrompt","ActionSheet","AppBar","ArcGauge","AutoComplete","Avatar","Badge","Barcode","BottomNavigation","BreadCrumb","Button","ButtonGroup","Calendar","Card","ChartWizard","Charts","CheckBox","Chip","ChipList","ChunkProgressBar","CircularGauge","CircularProgressBar","ColorGradient","ColorPalette","ColorPicker","ComboBox","ContextMenu","ConversationalUI","DataQuery","DateInput","DateMath","DatePicker","DateRange","DateTimePicker","Diagram","Dialog","DragandDrop","Drawer","Drawing","DropDownButton","DropDownList","DropDownTree","Editor","ExcelExport","ExpansionPanel","FileSaver","FileSelect","Filter","FlatColorPicker","FloatingActionButton","FloatingLabel","Forms","FormField","Gantt","Gauges","General","Grid","GridLayout","Icon","InlineAIPrompt","Label","LinearGauge","ListBox","ListView","Loader","Map","MaskedTextBox","Menu","MultiColumnComboBox","MultiSelect","MultiSelectTree","MultiViewCalendar","Notification","NumericTextBox","OTPInput","Pager","PanelBar","PDFExport","PDFViewer","PivotGrid","Popover","Popup","ProgressBar","PromptBox","QRCode","RadialGauge","RadioButton","RangeSlider","Rating","Ripple","Sankey","Scheduler","ScrollView","Signature","Skeleton","Slider","SmartPasteButton","Sortable","StockChart","Sparkline","SpeechToTextButton","SplitButton","Splitter","Spreadsheet","StackLayout","Stepper","SVGIcon","Switch","TabStrip","TextArea","TextBox","TileLayout","Timeline","TimePicker","ToolBar","Tooltip","TreeList","TreeView","Typography","Upload","Window"],me=new Map([["actionsheet","@progress/kendo-angular-navigation"],["aiprompt","@progress/kendo-angular-conversational-ui"],["appbar","@progress/kendo-angular-navigation"],["arcgauge","@progress/kendo-angular-gauges"],["autocomplete","@progress/kendo-angular-dropdowns"],["avatar","@progress/kendo-angular-layout"],["badge","@progress/kendo-angular-indicators"],["barcode","@progress/kendo-angular-barcodes"],["bottomnavigation","@progress/kendo-angular-navigation"],["breadcrumb","@progress/kendo-angular-navigation"],["button","@progress/kendo-angular-buttons"],["buttongroup","@progress/kendo-angular-buttons"],["calendar","@progress/kendo-angular-dateinputs"],["card","@progress/kendo-angular-layout"],["chartwizard","@progress/kendo-angular-chart-wizard"],["checkbox","@progress/kendo-angular-inputs"],["chip","@progress/kendo-angular-buttons"],["chiplist","@progress/kendo-angular-buttons"],["chunkprogressbar","@progress/kendo-angular-progressbar"],["circulargauge","@progress/kendo-angular-gauges"],["circularprogressbar","@progress/kendo-angular-progressbar"],["colorgradient","@progress/kendo-angular-inputs"],["colorpalette","@progress/kendo-angular-inputs"],["colorpicker","@progress/kendo-angular-inputs"],["combobox","@progress/kendo-angular-dropdowns"],["contextmenu","@progress/kendo-angular-menu"],["dataquery","@progress/kendo-data-query"],["dateinput","@progress/kendo-angular-dateinputs"],["datemath","@progress/kendo-date-math"],["datepicker","@progress/kendo-angular-dateinputs"],["daterangepicker","@progress/kendo-angular-dateinputs"],["datetimepicker","@progress/kendo-angular-dateinputs"],["diagram","@progress/kendo-angular-diagrams"],["dialog","@progress/kendo-angular-dialog"],["drawer","@progress/kendo-angular-layout"],["drawing","@progress/kendo-drawing"],["dropdownbutton","@progress/kendo-angular-buttons"],["dropdownlist","@progress/kendo-angular-dropdowns"],["dropdowntree","@progress/kendo-angular-dropdowns"],["editor","@progress/kendo-angular-editor"],["excelexport","@progress/kendo-angular-excel-export"],["expansionpanel","@progress/kendo-angular-layout"],["filesaver","@progress/kendo-file-saver"],["fileselect","@progress/kendo-angular-upload"],["filter","@progress/kendo-angular-filter"],["flatcolorpicker","@progress/kendo-angular-inputs"],["floatingactionbutton","@progress/kendo-angular-buttons"],["floatinglabel","@progress/kendo-angular-label"],["formfield","@progress/kendo-angular-inputs"],["forms","@progress/kendo-angular-inputs"],["gantt","@progress/kendo-angular-gantt"],["grid","@progress/kendo-angular-grid"],["gridlayout","@progress/kendo-angular-layout"],["icon","@progress/kendo-angular-icons"],["inlineaiprompt","@progress/kendo-angular-conversational-ui"],["label","@progress/kendo-angular-label"],["lineargauge","@progress/kendo-angular-gauges"],["listbox","@progress/kendo-angular-listbox"],["listview","@progress/kendo-angular-listview"],["loader","@progress/kendo-angular-indicators"],["map","@progress/kendo-angular-map"],["maskedtextbox","@progress/kendo-angular-inputs"],["menu","@progress/kendo-angular-menu"],["multicolumncombobox","@progress/kendo-angular-dropdowns"],["multiselect","@progress/kendo-angular-dropdowns"],["multiselecttree","@progress/kendo-angular-dropdowns"],["multiviewcalendar","@progress/kendo-angular-dateinputs"],["notification","@progress/kendo-angular-notification"],["numerictextbox","@progress/kendo-angular-inputs"],["otpinput","@progress/kendo-angular-inputs"],["pager","@progress/kendo-angular-pager"],["panelbar","@progress/kendo-angular-layout"],["pdfexport","@progress/kendo-angular-pdf-export"],["pdfviewer","@progress/kendo-angular-pdfviewer"],["pivotgrid","@progress/kendo-angular-pivotgrid"],["popover","@progress/kendo-angular-tooltip"],["popup","@progress/kendo-angular-popup"],["progressbar","@progress/kendo-angular-progressbar"],["promptbox","@progress/kendo-angular-conversational-ui"],["qrcode","@progress/kendo-angular-barcodes"],["radialgauge","@progress/kendo-angular-gauges"],["radiobutton","@progress/kendo-angular-inputs"],["rangeslider","@progress/kendo-angular-inputs"],["rating","@progress/kendo-angular-inputs"],["ripple","@progress/kendo-angular-ripple"],["sankey","@progress/kendo-angular-charts"],["scheduler","@progress/kendo-angular-scheduler"],["scrollview","@progress/kendo-angular-scrollview"],["signature","@progress/kendo-angular-inputs"],["skeleton","@progress/kendo-angular-indicators"],["slider","@progress/kendo-angular-inputs"],["smartpastebutton","@progress/kendo-angular-buttons"],["sortable","@progress/kendo-angular-sortable"],["sparkline","@progress/kendo-angular-charts"],["speechtotextbutton","@progress/kendo-angular-buttons"],["splitbutton","@progress/kendo-angular-buttons"],["splitter","@progress/kendo-angular-layout"],["spreadsheet","@progress/kendo-angular-spreadsheet"],["stacklayout","@progress/kendo-angular-layout"],["stepper","@progress/kendo-angular-layout"],["stockchart","@progress/kendo-angular-charts"],["svgicon","@progress/kendo-angular-icons"],["switch","@progress/kendo-angular-inputs"],["tabstrip","@progress/kendo-angular-layout"],["textarea","@progress/kendo-angular-inputs"],["textbox","@progress/kendo-angular-inputs"],["tilelayout","@progress/kendo-angular-layout"],["timeline","@progress/kendo-angular-layout"],["timepicker","@progress/kendo-angular-dateinputs"],["toolbar","@progress/kendo-angular-toolbar"],["treelist","@progress/kendo-angular-treelist"],["treeview","@progress/kendo-angular-treeview"],["typography","@progress/kendo-angular-typography"],["upload","@progress/kendo-angular-upload"],["window","@progress/kendo-angular-dialog"],["charts","@progress/kendo-angular-charts"],["conversationalui","@progress/kendo-angular-conversational-ui"],["tooltip","@progress/kendo-angular-tooltip"]]);var wt=kt(vt(At(import.meta.url)),"../proto/service.proto"),G=new M("contextapi.telerik.com:443",wt,{libName:T});var ge=async()=>G.validateUserLicense();import _t from"fs";import st from"path";import{fileURLToPath as Mt}from"url";import{z as v}from"zod";var C=class{constructor(t,s,o){this.name=t;this.config=s;this.cb=o}register(t){this.server=t,this.server.registerTool(this.name,this.config,this.cb)}hasAccess(t){return!this.config.requiredAccess||this.config.requiredAccess.length===0?!0:t==="full"||this.config.requiredAccess.includes(t)}};var L=(e,t)=>`# ${e.suiteName} - Code Validation & Quality Assurance
|
|
5
|
+
License Error: ${o}`);let i=new 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
|
|
6
6
|
|
|
7
7
|
## Comprehensive Code Validation Checklist
|
|
8
8
|
Execute these validation steps systematically to ensure high-quality, maintainable code:
|
|
@@ -147,7 +147,24 @@ When no design token system is defined by the project, apply these minimum spaci
|
|
|
147
147
|
- Section separators: \u2265 24px vertical gap between distinct content areas.
|
|
148
148
|
- Card internal padding: 16\u201324px.
|
|
149
149
|
- Form field vertical gap: \u2265 16px between fields (24px for multi-column groups).
|
|
150
|
-
- Page left/right margin: 24\u201332px minimum, even at desktop widths.`;var
|
|
150
|
+
- Page left/right margin: 24\u201332px minimum, even at desktop widths.`;var Nt=e=>`**Tool call example:**
|
|
151
|
+
\`\`\`
|
|
152
|
+
${e.layoutAssistantName}({
|
|
153
|
+
prompt="Provide Kendo Design System utility classes to make the following layout structure responsive across mobile, tablet, and desktop views: [LAYOUT DESCRIPTION HERE]",
|
|
154
|
+
includeBuildingBlockExamples=false // Optional, include examples of Kendo building blocks (Grid, Flex, Stack, etc.)
|
|
155
|
+
})
|
|
156
|
+
\`\`\`
|
|
157
|
+
`,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
|
|
151
168
|
|
|
152
169
|
**Current Goal:**
|
|
153
170
|
|
|
@@ -159,7 +176,7 @@ ${e.includeComponentsDocs?`- **Component Library:** ${e.suiteName}
|
|
|
159
176
|
- Ensure to use ONLY ${e.suiteName} components for all UI elements.
|
|
160
177
|
- And use the ${e.codeAssistantName} tool to get ${e.suiteName} component documentation and code snippets.
|
|
161
178
|
- Ensure that after you read the plan you use exactly the ${e.codeAssistantName} no matter if there is another tool that can provide code snippets, documentation or other resources related to ${e.suiteName}.
|
|
162
|
-
`:""}${
|
|
179
|
+
`:""}${o?`- **Layout:** Yes
|
|
163
180
|
- And use the ${e.layoutAssistantName} tool to get Kendo CSS utility classes needed for layout structure and responsive design.
|
|
164
181
|
`:""}${e.includeIcons?`- **Icons:** Yes
|
|
165
182
|
- Use icons that align with the project theme and enhance usability.
|
|
@@ -171,21 +188,35 @@ ${e.includeComponentsDocs?`- **Component Library:** ${e.suiteName}
|
|
|
171
188
|
- And use the ${e.styleAssistantName} tool to create a custom theme for your project.
|
|
172
189
|
`:""}${e.includeResponsive?`- **Responsive:**
|
|
173
190
|
- Ensure the layout is fully responsive across mobile, tablet, and desktop views.
|
|
174
|
-
|
|
191
|
+
${r}
|
|
175
192
|
`:""}
|
|
176
193
|
- **Accessible (WCAG 2.2 Level AA):**
|
|
177
194
|
- CRITICAL: You must call the ${e.accessibilityAssistantName} tool with includeGeneralGuidelines=true on your first call to get WCAG 2.2 Level AA guidelines.
|
|
178
195
|
- For subsequent calls, use includeGeneralGuidelines=false to get only component-specific accessibility information.
|
|
179
196
|
- Ensure all components meet WCAG 2.2 Level AA standards.
|
|
180
197
|
|
|
181
|
-
${
|
|
198
|
+
${o?`**STYLING AND LAYOUT REQUIREMENTS:**
|
|
199
|
+
**LAYOUT MODE: KENDO DESIGN SYSTEM CSS UTILITIES**
|
|
182
200
|
## CRITICAL DESIGN SYSTEM CONSTRAINTS
|
|
183
201
|
- **USE ONLY KENDO DESIGN SYSTEM UTILITIES** for ALL styling, layout, spacing, positioning, and responsive behavior
|
|
184
202
|
- Avoid custom CSS, inline styles, or other CSS framework classes
|
|
185
203
|
- The ${e.layoutAssistantName} tool will provide the specific Kendo CSS utility classes needed
|
|
186
204
|
- 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
|
+
`:""}
|
|
187
218
|
|
|
188
|
-
|
|
219
|
+
---
|
|
189
220
|
|
|
190
221
|
${V()}
|
|
191
222
|
|
|
@@ -235,7 +266,8 @@ ${e.accessibilityAssistantName}({
|
|
|
235
266
|
includeGeneralGuidelines=false
|
|
236
267
|
})
|
|
237
268
|
\`\`\`
|
|
238
|
-
|
|
269
|
+
|
|
270
|
+
${o?`
|
|
239
271
|
### Phase: Layout Foundation
|
|
240
272
|
|
|
241
273
|
**Step 1: Create Base Layout Structure**
|
|
@@ -263,10 +295,10 @@ Based on your current goal, analyze what other ${e.suiteName} components are nee
|
|
|
263
295
|
- **Data Entry**: Consider Form, TextBox, DatePicker, DropDownList, Upload, Validation components
|
|
264
296
|
- **Content Management**: Consider Grid, Editor, TreeView, FileManager, Dialog components
|
|
265
297
|
- **E-commerce**: Consider ListView, Card, Button, Rating, Badge, Carousel components
|
|
266
|
-
${
|
|
298
|
+
${n}
|
|
267
299
|
|
|
268
300
|
**IMPORTANT COMPONENT USAGE REQUIREMENTS:**
|
|
269
|
-
- Make sure to identify all necessary features related to the ${
|
|
301
|
+
- Make sure to identify all necessary features related to the ${a} based on the current goal.
|
|
270
302
|
- Make sure to identify specific features needed for other ${e.suiteName} components based on the current goal.
|
|
271
303
|
- Make sure to generate a query for ${e.codeAssistantName} tool for each component and call the tool for each specific feature or functionality.
|
|
272
304
|
- 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.
|
|
@@ -305,15 +337,8 @@ ${e.includeResponsive?`
|
|
|
305
337
|
### Phase: Layout Responsive Finalization
|
|
306
338
|
|
|
307
339
|
**Step 1: Implement Responsive Behavior**
|
|
340
|
+
${i}${d}${p}`:""}
|
|
308
341
|
|
|
309
|
-
**Tool call example:**
|
|
310
|
-
\`\`\`
|
|
311
|
-
${e.layoutAssistantName}({
|
|
312
|
-
prompt="Provide Kendo Design System utility classes to make the following layout structure responsive across mobile, tablet, and desktop views: [LAYOUT DESCRIPTION HERE]",
|
|
313
|
-
includeBuildingBlockExamples=false // Optional, include examples of Kendo building blocks (Grid, Flex, Stack, etc.)
|
|
314
|
-
})
|
|
315
|
-
\`\`\`
|
|
316
|
-
`:""}
|
|
317
342
|
${e.includeTheming?`
|
|
318
343
|
**Step 2: Custom Theme Implementation**
|
|
319
344
|
|
|
@@ -386,7 +411,7 @@ After code implementation and validation you can make quick fixes as needed:
|
|
|
386
411
|
- Do NOT generate or suggest any code until all tools have been used and validated responses are incorporated.
|
|
387
412
|
- Focus on planning and sequencing.
|
|
388
413
|
- Summarize the components, layouts, and utilities gathered.
|
|
389
|
-
- Confirm all required inputs from tools have been provided.`};var
|
|
414
|
+
- Confirm all required inputs from tools have been provided.`};var W=e=>`# ${e.suiteName} Assistant
|
|
390
415
|
|
|
391
416
|
**What you're looking for:**
|
|
392
417
|
|
|
@@ -510,29 +535,264 @@ After gathering information:
|
|
|
510
535
|
- Consistent ${e} theme application across all components
|
|
511
536
|
- Custom theme variables properly defined and scoped
|
|
512
537
|
- ${e} icon fonts properly loaded and optimized
|
|
513
|
-
- Brand colors integrated with ${e} component themes`});
|
|
514
|
-
-
|
|
515
|
-
-
|
|
538
|
+
- Brand colors integrated with ${e} component themes`});var Dt=`--kendo-color-app-surface
|
|
539
|
+
--kendo-color-on-app-surface
|
|
540
|
+
--kendo-color-subtle
|
|
541
|
+
--kendo-color-surface
|
|
542
|
+
--kendo-color-surface-alt
|
|
543
|
+
--kendo-color-border
|
|
544
|
+
--kendo-color-border-alt
|
|
545
|
+
/* Base */
|
|
546
|
+
--kendo-color-base-subtle
|
|
547
|
+
--kendo-color-base-subtle-hover
|
|
548
|
+
--kendo-color-base-subtle-active
|
|
549
|
+
--kendo-color-base
|
|
550
|
+
--kendo-color-base-hover
|
|
551
|
+
--kendo-color-base-active
|
|
552
|
+
--kendo-color-base-emphasis
|
|
553
|
+
--kendo-color-base-on-subtle
|
|
554
|
+
--kendo-color-on-base
|
|
555
|
+
--kendo-color-base-on-surface
|
|
556
|
+
/* Primary */
|
|
557
|
+
--kendo-color-primary-subtle
|
|
558
|
+
--kendo-color-primary-subtle-hover
|
|
559
|
+
--kendo-color-primary-subtle-active
|
|
560
|
+
--kendo-color-primary
|
|
561
|
+
--kendo-color-primary-hover
|
|
562
|
+
--kendo-color-primary-active
|
|
563
|
+
--kendo-color-primary-emphasis
|
|
564
|
+
--kendo-color-primary-on-subtle
|
|
565
|
+
--kendo-color-on-primary
|
|
566
|
+
--kendo-color-primary-on-surface
|
|
567
|
+
/* Secondary */
|
|
568
|
+
--kendo-color-secondary-subtle
|
|
569
|
+
--kendo-color-secondary-subtle-hover
|
|
570
|
+
--kendo-color-secondary-subtle-active
|
|
571
|
+
--kendo-color-secondary
|
|
572
|
+
--kendo-color-secondary-hover
|
|
573
|
+
--kendo-color-secondary-active
|
|
574
|
+
--kendo-color-secondary-emphasis
|
|
575
|
+
--kendo-color-secondary-on-subtle
|
|
576
|
+
--kendo-color-on-secondary
|
|
577
|
+
--kendo-color-secondary-on-surface
|
|
578
|
+
/* Tertiary */
|
|
579
|
+
--kendo-color-tertiary-subtle
|
|
580
|
+
--kendo-color-tertiary-subtle-hover
|
|
581
|
+
--kendo-color-tertiary-subtle-active
|
|
582
|
+
--kendo-color-tertiary
|
|
583
|
+
--kendo-color-tertiary-hover
|
|
584
|
+
--kendo-color-tertiary-active
|
|
585
|
+
--kendo-color-tertiary-emphasis
|
|
586
|
+
--kendo-color-tertiary-on-subtle
|
|
587
|
+
--kendo-color-on-tertiary
|
|
588
|
+
--kendo-color-tertiary-on-surface
|
|
589
|
+
/* Info */
|
|
590
|
+
--kendo-color-info-subtle
|
|
591
|
+
--kendo-color-info-subtle-hover
|
|
592
|
+
--kendo-color-info-subtle-active
|
|
593
|
+
--kendo-color-info
|
|
594
|
+
--kendo-color-info-hover
|
|
595
|
+
--kendo-color-info-active
|
|
596
|
+
--kendo-color-info-emphasis
|
|
597
|
+
--kendo-color-info-on-subtle
|
|
598
|
+
--kendo-color-on-info
|
|
599
|
+
--kendo-color-info-on-surface
|
|
600
|
+
/* Success */
|
|
601
|
+
--kendo-color-success-subtle
|
|
602
|
+
--kendo-color-success-subtle-hover
|
|
603
|
+
--kendo-color-success-subtle-active
|
|
604
|
+
--kendo-color-success
|
|
605
|
+
--kendo-color-success-hover
|
|
606
|
+
--kendo-color-success-active
|
|
607
|
+
--kendo-color-success-emphasis
|
|
608
|
+
--kendo-color-success-on-subtle
|
|
609
|
+
--kendo-color-on-success
|
|
610
|
+
--kendo-color-success-on-surface
|
|
611
|
+
/* Warning */
|
|
612
|
+
--kendo-color-warning-subtle
|
|
613
|
+
--kendo-color-warning-subtle-hover
|
|
614
|
+
--kendo-color-warning-subtle-active
|
|
615
|
+
--kendo-color-warning
|
|
616
|
+
--kendo-color-warning-hover
|
|
617
|
+
--kendo-color-warning-active
|
|
618
|
+
--kendo-color-warning-emphasis
|
|
619
|
+
--kendo-color-warning-on-subtle
|
|
620
|
+
--kendo-color-on-warning
|
|
621
|
+
--kendo-color-warning-on-surface
|
|
622
|
+
/* Error */
|
|
623
|
+
--kendo-color-error-subtle
|
|
624
|
+
--kendo-color-error-subtle-hover
|
|
625
|
+
--kendo-color-error-subtle-active
|
|
626
|
+
--kendo-color-error
|
|
627
|
+
--kendo-color-error-hover
|
|
628
|
+
--kendo-color-error-active
|
|
629
|
+
--kendo-color-error-emphasis
|
|
630
|
+
--kendo-color-error-on-subtle
|
|
631
|
+
--kendo-color-on-error
|
|
632
|
+
--kendo-color-error-on-surface
|
|
633
|
+
/* Light */
|
|
634
|
+
--kendo-color-light-subtle
|
|
635
|
+
--kendo-color-light-subtle-hover
|
|
636
|
+
--kendo-color-light-subtle-active
|
|
637
|
+
--kendo-color-light
|
|
638
|
+
--kendo-color-light-hover
|
|
639
|
+
--kendo-color-light-active
|
|
640
|
+
--kendo-color-light-emphasis
|
|
641
|
+
--kendo-color-light-on-subtle
|
|
642
|
+
--kendo-color-on-light
|
|
643
|
+
--kendo-color-light-on-surface
|
|
644
|
+
/* Dark */
|
|
645
|
+
--kendo-color-dark-subtle
|
|
646
|
+
--kendo-color-dark-subtle-hover
|
|
647
|
+
--kendo-color-dark-subtle-active
|
|
648
|
+
--kendo-color-dark
|
|
649
|
+
--kendo-color-dark-hover
|
|
650
|
+
--kendo-color-dark-active
|
|
651
|
+
--kendo-color-dark-emphasis
|
|
652
|
+
--kendo-color-dark-on-subtle
|
|
653
|
+
--kendo-color-on-dark
|
|
654
|
+
--kendo-color-dark-on-surface
|
|
655
|
+
/* Inverse */
|
|
656
|
+
--kendo-color-inverse-subtle
|
|
657
|
+
--kendo-color-inverse-subtle-hover
|
|
658
|
+
--kendo-color-inverse-subtle-active
|
|
659
|
+
--kendo-color-inverse
|
|
660
|
+
--kendo-color-inverse-hover
|
|
661
|
+
--kendo-color-inverse-active
|
|
662
|
+
--kendo-color-inverse-emphasis
|
|
663
|
+
--kendo-color-inverse-on-subtle
|
|
664
|
+
--kendo-color-on-inverse
|
|
665
|
+
--kendo-color-inverse-on-surface
|
|
666
|
+
/* Series A */
|
|
667
|
+
--kendo-color-series-a
|
|
668
|
+
--kendo-color-series-a-bold
|
|
669
|
+
--kendo-color-series-a-bolder
|
|
670
|
+
--kendo-color-series-a-subtle
|
|
671
|
+
--kendo-color-series-a-subtler
|
|
672
|
+
/* Series B */
|
|
673
|
+
--kendo-color-series-b
|
|
674
|
+
--kendo-color-series-b-bold
|
|
675
|
+
--kendo-color-series-b-bolder
|
|
676
|
+
--kendo-color-series-b-subtle
|
|
677
|
+
--kendo-color-series-b-subtler
|
|
678
|
+
/* Series C */
|
|
679
|
+
--kendo-color-series-c
|
|
680
|
+
--kendo-color-series-c-bold
|
|
681
|
+
--kendo-color-series-c-bolder
|
|
682
|
+
--kendo-color-series-c-subtle
|
|
683
|
+
--kendo-color-series-c-subtler
|
|
684
|
+
/* Series D */
|
|
685
|
+
--kendo-color-series-d
|
|
686
|
+
--kendo-color-series-d-bold
|
|
687
|
+
--kendo-color-series-d-bolder
|
|
688
|
+
--kendo-color-series-d-subtle
|
|
689
|
+
--kendo-color-series-d-subtler
|
|
690
|
+
/* Series E */
|
|
691
|
+
--kendo-color-series-e
|
|
692
|
+
--kendo-color-series-e-bold
|
|
693
|
+
--kendo-color-series-e-bolder
|
|
694
|
+
--kendo-color-series-e-subtle
|
|
695
|
+
--kendo-color-series-e-subtler
|
|
696
|
+
/* Series F */
|
|
697
|
+
--kendo-color-series-f
|
|
698
|
+
--kendo-color-series-f-bold
|
|
699
|
+
--kendo-color-series-f-bolder
|
|
700
|
+
--kendo-color-series-f-subtle
|
|
701
|
+
--kendo-color-series-f-subtler
|
|
702
|
+
/* Typography */
|
|
703
|
+
--kendo-font-family-sans
|
|
704
|
+
--kendo-font-family-sans-serif
|
|
705
|
+
--kendo-font-family-monospace
|
|
706
|
+
--kendo-font-size-xs
|
|
707
|
+
--kendo-line-height-xs
|
|
708
|
+
--kendo-font-size-sm
|
|
709
|
+
--kendo-line-height-sm
|
|
710
|
+
--kendo-font-size
|
|
711
|
+
--kendo-line-height
|
|
712
|
+
--kendo-font-size-lg
|
|
713
|
+
--kendo-line-height-lg
|
|
714
|
+
/* Border Radius */
|
|
715
|
+
--kendo-border-radius-none
|
|
716
|
+
--kendo-border-radius-xs
|
|
717
|
+
--kendo-border-radius-sm
|
|
718
|
+
--kendo-border-radius-md
|
|
719
|
+
--kendo-border-radius-lg
|
|
720
|
+
--kendo-border-radius-xl
|
|
721
|
+
--kendo-border-radius-xxl
|
|
722
|
+
--kendo-border-radius-xxxl
|
|
723
|
+
--radius-4xl: 1.5rem
|
|
724
|
+
--kendo-border-radius-full`,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}
|
|
516
776
|
- Summary: ${i}
|
|
517
|
-
- Syntax: ${d}`);let
|
|
518
|
-
`,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
|
|
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}
|
|
519
779
|
\`\`\`
|
|
520
|
-
${
|
|
780
|
+
${C}
|
|
521
781
|
\`\`\`
|
|
522
|
-
`}c>0&&n.push(
|
|
782
|
+
`}c>0&&n.push(u)}let h=s.RelatedItemsByType??{},f=[];for(let[u,c]of Object.entries(h))if(!(u==="return_type"||u==="render_fragment"))for(let y of c??[]){let A=y.FullName??"",w=y.ShortText??"";f.push(`### ${A} (${u})
|
|
523
783
|
${w}`)}return f.length>0&&n.push(`## Additional Context
|
|
524
784
|
`+f.join(`
|
|
525
785
|
---
|
|
526
786
|
`)),n.join(`
|
|
527
787
|
|
|
528
|
-
`)}function
|
|
529
|
-
`)||"No CSS utilities found for the given prompt.",
|
|
788
|
+
`)}var Y=process.env.KENDO_UIA_LAYOUT_MODE||"utils";function Ae(e,t,s){let{name:o,title:n,description:a,layoutAssistantName:r,codeAssistantName:i,styleAssistantName:d,iconAssistantName:p,accessibilityAssistantName:b,suiteName:h,libKey:f,components:u}=e,c=new S(o,{title:n,description:a,requiredAccess:e.requiredAccess,inputSchema:{userIntent:k.string().describe(`Detailed description and intent of what the user wants to build. Include the type of page/component, main functionality, visual requirements, and any specific ${h} components you want to use.`),needsComponentsDocsConfidence:k.number().min(0).max(1).default(1).describe("Confidence (0-1) to include Component Documentation assistance. Default is 1."),needsLayoutConfidence:k.number().min(0).max(1).default(0).describe("Confidence (0-1) to include Layout assistance. Default is 0."),needsStylingConfidence:k.number().min(0).max(1).default(0).describe("Confidence (0-1) to include Theming/Styling assistance. Default is 0."),needsResponsiveBehaviorConfidence:k.number().min(0).max(1).default(0).describe("Confidence (0-1) to include Responsive Behavior assistance. Default is 0."),needsIconsConfidence:k.number().min(0).max(1).default(0).describe("Confidence (0-1) to include Icons assistance. Default is 0."),componentsNeeded:k.array(k.enum(u)).optional().describe(`Optional list of specific ${h} components needed for the project.`)}},async({userIntent:y,needsComponentsDocsConfidence:A,needsLayoutConfidence:w,needsStylingConfidence:C,needsResponsiveBehaviorConfidence:x,needsIconsConfidence:ne,componentsNeeded:se},{_meta:pt})=>{g("UI Orchestrator called with:",{userIntent:y,needsComponentsDocsConfidence:A,needsLayoutConfidence:w,needsStylingConfidence:C,needsResponsiveBehaviorConfidence:x,needsIconsConfidence:ne});try{await s.recordOrchestratorUserRequest({meta:{userIntent:y,componentsNeeded:se,_meta:pt}})}catch(_){throw R(_)}let ut=c.server?.server.getClientCapabilities?.()?.elicitation,re;if(ut&&C>.3&&C<=.6){let _=await c.server?.server.elicitInput({message:"I was unable to determine if you need custom Kendo Theme assistant. Can you please confirm?",requestedSchema:{type:"object",properties:{includeCustomTheming:{type:"boolean",description:"Whether to include Custom Theming assistance in the workflow."}},required:["includeCustomTheming"]}});_?.action==="accept"&&_.content?.includeCustomTheming&&(re=!0)}return{content:[{type:"text",text:G({name:o,userIntent:y,includeComponentsDocs:A>.3,includeTheming:C>.6||!!re,includeLayout:w>.5,includeIcons:ne>.6,includeResponsive:w>.5&&x>.4,layoutAssistantName:r,codeAssistantName:i,styleAssistantName:d,iconAssistantName:p,accessibilityAssistantName:b,suiteName:h,libKey:f,layoutMode:Y,components:se},t)}]}});return c}function we(e,t){let{name:s,title:o,description:n,iconAssistantName:a,codeAssistantName:r,suiteName:i,libKey:d,components:p}=e;return new S(s,{title:o,description:n,inputSchema:{userIntent:k.string().describe(`Describe what you want to build or what components you're looking for. Include the type of functionality, features, or UI elements you need from ${i}.`),needsIconsConfidence:k.number().min(0).max(1).default(.7).describe("Confidence (0-1) to include Icons assistance. Default is 0.7."),componentsNeeded:k.array(k.enum(p)).optional().describe(`Optional list of specific ${i} components you want to learn about.`)},requiredAccess:e.requiredAccess},async({userIntent:h,needsIconsConfidence:f,componentsNeeded:u},{_meta:c})=>{g("Assistant Orchestrator called with:",{userIntent:h,needsIconsConfidence:f,componentsNeeded:u});try{await t.recordOrchestratorUserRequest({meta:{userIntent:h,componentsNeeded:u,_meta:c}})}catch(A){throw R(A)}return{content:[{type:"text",text:W({name:s,userIntent:h,includeComponentsDocs:!0,includeIcons:f>.5,codeAssistantName:r,iconAssistantName:a,suiteName:i,libKey:d,components:u})}]}})}function Se(e,t){let{name:s,title:o,description:n,suiteName:a,libKey:r,getPreContent:i}=e;return new S(s,{title:o,description:n,requiredAccess:Y==="utils"?e.requiredAccess:["none"],inputSchema:{prompt:k.string().describe("An enhanced prompt describing the HTML layout structure, design requirements or specific visual effects you want to achieve."),includeBuildingBlockExamples:k.boolean().describe("Whether to include building block examples. Defaults to false.").default(!1)}},async({prompt:d,includeBuildingBlockExamples:p},{_meta:b})=>{g("Layout Assistant called with:",{prompt:d,includeBuildingBlockExamples:p});try{let f=(await t.queryCssUtils({query:d},{_meta:b})).values.join(`
|
|
789
|
+
`)||"No CSS utilities found for the given prompt.",u=i?.()??"",c=y=>`${u}
|
|
530
790
|
|
|
531
791
|
# Kendo Design System CSS Utilities
|
|
532
792
|
|
|
533
793
|
${f}
|
|
534
794
|
${y??""}
|
|
535
|
-
`;if(
|
|
795
|
+
`;if(p)try{let y=await t.queryBuildingBlocks({query:d,lib_name:r},{_meta:b}),A="";y.items?.length>0&&(A=`
|
|
536
796
|
## Building Blocks Examples
|
|
537
797
|
|
|
538
798
|
The examples here are for demonstration purpose how CSS utils can be implemented in various building blocks.
|
|
@@ -547,9 +807,15 @@ ${w.description}
|
|
|
547
807
|
${w.code}
|
|
548
808
|
\`\`\`
|
|
549
809
|
`).join(`
|
|
550
|
-
`)}`),f=c(A)}catch(y){
|
|
810
|
+
`)}`),f=c(A)}catch(y){g("Error calling building-blocks service:",y),f=c()}else f=c();return{content:[{type:"text",text:f}]}}catch(h){throw R(h)}})}function Ce(e,t){let{name:s,title:o,description:n,libKey:a,getPreContent:r}=e;return new S(s,{title:o,description:n,requiredAccess:e.requiredAccess,inputSchema:{prompt:k.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:i},{_meta:d})=>{if(g("Style Assistant called with:",{prompt:i}),Y==="tailwind")return{content:[{type:"text",text:`Note: For layout and spacing, use Tailwind CSS utility classes to structure your layout and apply spacing between elements.
|
|
811
|
+
IMPORTANT: You need to set up Tailwind CSS so it becomes the single source of truth for all design tokens. Detect which Tailwind version the project uses and follow the appropriate setup instructions below.
|
|
812
|
+
|
|
813
|
+
<tailwind_setup_instructions>
|
|
814
|
+
${z}
|
|
815
|
+
</tailwind_setup_instructions>
|
|
816
|
+
`}]};let p="";try{let f=await t.queryThemeGenerate({prompt: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(`
|
|
551
817
|
|
|
552
|
-
`)}}catch(f){throw
|
|
818
|
+
`)}}catch(f){throw R(f)}let b=r?.()??"";return{content:[{type:"text",text:p?`Use the following CSS variables to style the web application, including colors, typography, spacing, and component appearance.
|
|
553
819
|
Ensure the variables are applied consistently across all relevant elements.
|
|
554
820
|
Do NOT set any inline styles. CSS variables should be defined in global or component-level CSS files, or via supported theming mechanisms.
|
|
555
821
|
|
|
@@ -558,29 +824,29 @@ ${b}
|
|
|
558
824
|
## Generated CSS Variables
|
|
559
825
|
|
|
560
826
|
\`\`\`css
|
|
561
|
-
${
|
|
827
|
+
${p}
|
|
562
828
|
\`\`\`
|
|
563
|
-
`:"No CSS variables were generated for the given prompt."}]}})}function
|
|
829
|
+
`:"No CSS variables were generated for the given prompt."},{type:"text",text:"Note: For layout and spacing, use the Layout Assistant tool to get the appropriate Kendo CSS utility classes."}]}})}function Te(e,t){let{name:s,title:o,description:n,libKey:a,getPostContent:r}=e;return new S(s,{title:o,description:n,requiredAccess:e.requiredAccess,inputSchema:{query:k.string().describe("A search query for finding icons. Be specific about the icon purpose, style, or action."),limit:k.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:i,limit:d},{_meta:p})=>{g("Icon Search called with:",{query:i,limit:d});try{let b=await t.queryIconsSearch({query:i,limit:d*100},{_meta:p}),h=r?.()??"";return{content:[{type:"text",text:`${b.values.join(`
|
|
564
830
|
|
|
565
831
|
`)}
|
|
566
832
|
|
|
567
|
-
${h}`}]}}catch(b){throw
|
|
833
|
+
${h}`}]}}catch(b){throw R(b)}})}function xe(e,t){let{name:s,title:o,description:n,libKey:a,suiteName:r,components:i,componentAliases:d,getPostContent:p}=e;return new S(s,{title:o,description:n,requiredAccess:e.requiredAccess,inputSchema:{query:k.string().describe("The query to search for."),component:k.enum(i).describe("The component to search for. If not specified, use General.")}},async({query:b,component:h},{_meta:f})=>{g("Code Assistant called with:",{query:b,component:h});let u=h;if(d){let c=d[h];c&&(u=c)}try{let y=(await t.query({query:b,component:u?.toLowerCase()??"general",lib_name:a,text_matches_count:3,code_matches_count:0,allowed_types:["documentation"]},{_meta:f})).values.map(C=>C.replace(/\0/g,"")),A=p?.({component:h})??"";return{content:[{type:"text",text:`${y.join(`
|
|
568
834
|
|
|
569
835
|
`)}
|
|
570
836
|
|
|
571
|
-
${A}`}]}}catch(c){throw
|
|
837
|
+
${A}`}]}}catch(c){throw R(c)}})}function Ie(e,t){let{name:s,title:o,description:n,libKey:a,suiteName:r,components:i,componentAliases:d}=e;return new S(s,{title:o,description:n,requiredAccess:e.requiredAccess,inputSchema:{query:k.string().describe("The query to search for."),component:k.enum(i).describe("The component to search for. If not specified, use General."),includeGeneralGuidelines:k.boolean().default(!1).describe("Set to true only on the first call to include comprehensive WCAG 2.2 Level AA general guidelines. After the first call, set to false to get only component-specific accessibility information. Default is false.")}},async({query:p,component:b,includeGeneralGuidelines:h},{_meta:f})=>{g("Accessibility Assistant called with:",{query:p,component:b,includeGeneralGuidelines:h});let u=b;if(d){let c=d[b];c&&(u=c)}try{let c="";if(h){let x=ge();c+=`# WCAG 2.2 Level AA General Accessibility Guidelines
|
|
572
838
|
|
|
573
839
|
`,c+=x,c+=`
|
|
574
840
|
|
|
575
841
|
---
|
|
576
842
|
|
|
577
|
-
`}let
|
|
843
|
+
`}let C=(await t.getApiRefMatches({query:p,component:u?.toLowerCase()??"general",lib_name:a,filters_json:'{"type":{"$in":["accessibility"]}}'},{_meta:f})).values.map(x=>x.replace(/\0/g,"")).map(x=>Pt(x,u?.toLowerCase()??"general")).join(`
|
|
578
844
|
|
|
579
|
-
`);return
|
|
845
|
+
`);return C?(h&&(c+=`# Component-Specific Accessibility Information
|
|
580
846
|
|
|
581
|
-
`),c+=
|
|
847
|
+
`),c+=C):h||(c="No component-specific accessibility guidelines found."),{content:[{type:"text",text:c}]}}catch(c){throw R(c)}})}function R(e){let t=e;return t.code===16?new Error("Error: You are not authenticated. Please verify the Telerik License Key provided is valid."):t.code===8?new Error(`Error: You have exceeded the extension quota. Upgrade to subscription licensing to unlock full access. Message: ${t.message}.`):t.code===7?new Error("Error: You do not have permission to access this resource. Please verify that you have a valid license."):new Error(`Error: An error occurred while calling the service. Please try again later.
|
|
582
848
|
|
|
583
|
-
Error Code: ${t.code} Error Message: ${t.message}`)}var
|
|
849
|
+
Error Code: ${t.code} Error Message: ${t.message}`)}var Ne=e=>`${e}_ui_generator`,Ee=e=>`${e}_assistant`,Re=e=>`${e}_layout_assistant`,De=e=>`${e}_component_assistant`,Pe=e=>`${e}_style_assistant`,Oe=e=>`${e}_icon_assistant`,Le=e=>`${e}_accessibility_assistant`,Ue=e=>`${e}_getting_started_assistant`;var Ge=e=>`This is the single entry point for all UI-related tasks. It orchestrates the full workflow of building or refining UIs with ${e} components, generating a step-by-step execution plan that specifies which tools to call, in what order, and with what parameters. It includes validation steps to ensure the best possible, standards-compliant code every time.
|
|
584
850
|
|
|
585
851
|
Use the tool when:
|
|
586
852
|
- Want to build or modify a complete page or section layout
|
|
@@ -589,7 +855,7 @@ Error Code: ${t.code} Error Message: ${t.message}`)}var we=e=>`${e}_ui_generator
|
|
|
589
855
|
- You want to enforce best practices in styling, performance, and accessibility
|
|
590
856
|
|
|
591
857
|
Returns:
|
|
592
|
-
A detailed execution plan with validated tool calls, parameters, and reasoning \u2014 ensuring consistent, high-quality UI generation.`,
|
|
858
|
+
A detailed execution plan with validated tool calls, parameters, and reasoning \u2014 ensuring consistent, high-quality UI generation.`,_e=e=>`Provides guidance for discovering and using ${e} components and icons. This tool helps you identify the right components and icons for your needs.
|
|
593
859
|
|
|
594
860
|
Use this tool when:
|
|
595
861
|
- You need to discover which ${e} components are suitable for a specific use case
|
|
@@ -598,20 +864,20 @@ Use this tool when:
|
|
|
598
864
|
- You want to gather component documentation and examples
|
|
599
865
|
|
|
600
866
|
Returns:
|
|
601
|
-
A focused plan for gathering component documentation and icon suggestions using the Component Assistant and Icon Assistant tools
|
|
867
|
+
A focused plan for gathering component documentation and icon suggestions using the Component Assistant and Icon Assistant tools.`,$e=`Retrieves Progress/Kendo Design System CSS utility classes and styling recommendations based on layout and design requirements.
|
|
602
868
|
Use this tool to find the right CSS utilities for styling Kendo UI components or general web elements.
|
|
603
869
|
It analyzes the provided design context and returns relevant utility classes with explanations and examples.
|
|
604
|
-
Best suited for styling questions related to typography, spacing, colors, layout, transforms, and other utilities in the Progress/Kendo Design System.`,
|
|
870
|
+
Best suited for styling questions related to typography, spacing, colors, layout, transforms, and other utilities in the Progress/Kendo Design System.`,Me=`Generates CSS variables using an external style agent based on the user's styling prompt.
|
|
605
871
|
|
|
606
872
|
Use this tool when the user wants to:
|
|
607
873
|
- Update the visual theme of an application
|
|
608
874
|
- Modify color schemes
|
|
609
875
|
- Restyle the UI with CSS variables
|
|
610
876
|
|
|
611
|
-
The tool outputs a set of CSS variable definitions ready to be applied to style files.`,
|
|
877
|
+
The tool outputs a set of CSS variable definitions ready to be applied to style files.`,Be=`Searches for icons in the Telerik Icons library.
|
|
612
878
|
Use this tool when the user needs to find specific icons for UI components or design elements.
|
|
613
879
|
It supports searching by icon name, category, or keyword and returns matching icons from the Telerik Icons library.
|
|
614
|
-
`,
|
|
880
|
+
`,Fe=e=>`Provides answers and retrieves official documentation for ${e}.
|
|
615
881
|
|
|
616
882
|
Use this tool when the user asks about:
|
|
617
883
|
- ${e} features or capabilities
|
|
@@ -621,7 +887,7 @@ Use this tool when the user asks about:
|
|
|
621
887
|
|
|
622
888
|
Set the user's full question as the 'query' parameter.
|
|
623
889
|
If the question refers to a specific ${e} component, include its name in the 'component' parameter.
|
|
624
|
-
`,
|
|
890
|
+
`,qe=e=>`Retrieves accessibility guidance for ${e} components with optional general WCAG 2.2 Level AA guidelines.
|
|
625
891
|
|
|
626
892
|
Use this tool when:
|
|
627
893
|
- You need component-specific accessibility information and API references
|
|
@@ -639,7 +905,7 @@ Set 'includeGeneralGuidelines=true' ONLY on the first call to include general WC
|
|
|
639
905
|
Returns:
|
|
640
906
|
- When includeGeneralGuidelines=true: General WCAG 2.2 Level AA guidelines + component-specific recommendations
|
|
641
907
|
- When includeGeneralGuidelines=false: Only component-specific accessibility recommendations
|
|
642
|
-
`;var
|
|
908
|
+
`;var H=E("Kendo UI","Kendo"),Q=`
|
|
643
909
|
### Angular Component Validation
|
|
644
910
|
Component Structure:
|
|
645
911
|
- Use proper @Component decorator configuration
|
|
@@ -647,22 +913,22 @@ Component Structure:
|
|
|
647
913
|
- Correct selector naming convention (kebab-case)
|
|
648
914
|
- Appropriate template and style file organization
|
|
649
915
|
|
|
650
|
-
${
|
|
916
|
+
${H.SETUP_VALIDATION}
|
|
651
917
|
- Kendo animations module configured (if animations are used)
|
|
652
918
|
- Internationalization properly configured for Kendo components
|
|
653
919
|
|
|
654
|
-
${
|
|
920
|
+
${H.PERFORMANCE_OPTIMIZATION}
|
|
655
921
|
- OnPush change detection strategy where appropriate
|
|
656
922
|
- Efficient trackBy functions for *ngFor with Kendo components
|
|
657
923
|
- Minimal unnecessary change detection cycles
|
|
658
924
|
|
|
659
|
-
${
|
|
925
|
+
${H.THEME_AND_STYLING}
|
|
660
926
|
- Proper theme switching functionality (if implemented)
|
|
661
927
|
- Only ONE theme reference exists across angular.json and styles files
|
|
662
928
|
- Make sure theme import mechanism is consistent with existing project setup
|
|
663
929
|
|
|
664
930
|
Accessibility
|
|
665
|
-
- Accessibility guidelines retrieved and applied to all components`;var
|
|
931
|
+
- Accessibility guidelines retrieved and applied to all components`;var J=`**Angular Specific Requirements:**
|
|
666
932
|
|
|
667
933
|
**NgModule vs Standalone setup**: Search and detect the current project setup to determine whether to use NgModule or Standalone components based on the following rules:
|
|
668
934
|
1. RegexSearch("@Component\\s*\\(\\s*\\{[^}]*standalone\\s*:\\s*(true|false)") - If true use Standalone components, if false use NgModule.
|
|
@@ -693,7 +959,7 @@ Accessibility
|
|
|
693
959
|
2. Match the discovered patterns in all generated code
|
|
694
960
|
3. Maintain consistent formatting, indentation, and code organization with existing files
|
|
695
961
|
4. Always use the same theme import mechanism (unless user specifies otherwise)
|
|
696
|
-
`;var
|
|
962
|
+
`;var X=E("Kendo UI","KendoReact"),Z=`
|
|
697
963
|
### React Component Validation
|
|
698
964
|
Component Structure:
|
|
699
965
|
- Use proper function component patterns with Hooks
|
|
@@ -701,22 +967,22 @@ Component Structure:
|
|
|
701
967
|
- Appropriate file organization (components, hooks, utils)
|
|
702
968
|
- Props interface/type definitions where needed
|
|
703
969
|
|
|
704
|
-
${
|
|
970
|
+
${X.SETUP_VALIDATION}
|
|
705
971
|
- KendoReact license validation (if required)
|
|
706
972
|
- Appropriate bundler configuration for KendoReact packages
|
|
707
973
|
|
|
708
|
-
${
|
|
974
|
+
${X.PERFORMANCE_OPTIMIZATION}
|
|
709
975
|
- React.memo for components that receive stable props
|
|
710
976
|
- useMemo/useCallback for expensive computations and callbacks
|
|
711
977
|
- Proper key props for list rendering with KendoReact components
|
|
712
978
|
|
|
713
|
-
${
|
|
979
|
+
${X.THEME_AND_STYLING}
|
|
714
980
|
- Proper theme switching functionality (if implemented)
|
|
715
981
|
- Only ONE theme import exists across the application
|
|
716
982
|
- Make sure theme import mechanism is consistent with existing project setup
|
|
717
983
|
|
|
718
984
|
Accessibility
|
|
719
|
-
- Accessibility guidelines retrieved and applied to all components`;var
|
|
985
|
+
- Accessibility guidelines retrieved and applied to all components`;var Ot={createOrchestrator:Ae,createAssistantOrchestrator:we,createLayoutAssistant:Se,createStyleAssistant:Ce,createIconSearch:Te,createCodeAssistant:xe,createAccessibilityAssistant:Ie},Lt={orchestrator:Ne,assistantOrchestrator:Ee,layoutAssistant:Re,codeAssistant:De,styleAssistant:Pe,iconAssistant:Oe,accessibilityAssistant:Le,gettingStartedAssistant:Ue},Ut={orchestrator:Ge,assistantOrchestrator:_e,layoutAssistant:$e,styleAssistant:Me,iconAssistant:Be,codeAssistant:Fe,accessibilityAssistant:qe},Gt={Orchestrator:{render:G},Validator:{render:U},SharedValidation:{getSteps:E}},_t={Angular:{steps:Q,additionalPlan:J},React:{steps:Z}},m={Tools:Ot,ToolNames:Lt,ToolDescriptions:Ut,Templates:Gt,Validation:_t};var $t=m.ToolNames.codeAssistant("kendo"),Ke=()=>`# Kendo Design System Guidelines for ${l}
|
|
720
986
|
|
|
721
987
|
## Setting up Styles/CSS
|
|
722
988
|
|
|
@@ -745,7 +1011,7 @@ Alternatively, you can also consume them directly from the Unpkg CDN.
|
|
|
745
1011
|
|
|
746
1012
|
In the ${l} there are available components to create layout. Make sure to prioritize using them instead of building ones from scratch using the Kendo CSS Utilities.
|
|
747
1013
|
|
|
748
|
-
For any Layout component you can also call the ${
|
|
1014
|
+
For any Layout component you can also call the ${$t} tool in order to get specific API reference and docs.
|
|
749
1015
|
|
|
750
1016
|
- ${l} Card component.
|
|
751
1017
|
- Generally, it is recommended to use 100% width (e.g., \`<kendo-card width="100%">\`)
|
|
@@ -853,7 +1119,7 @@ Use the \`kendo-splitter\` component only for **user-resizable** content areas (
|
|
|
853
1119
|
## Popup Z-Index Trap
|
|
854
1120
|
|
|
855
1121
|
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.
|
|
856
|
-
`;var
|
|
1122
|
+
`;var je=()=>`## Design Standards for ${l} Theming
|
|
857
1123
|
|
|
858
1124
|
### Color & Contrast Requirements
|
|
859
1125
|
- Body text contrast: \u2265 4.5:1. Large text / UI component borders: \u2265 3:1.
|
|
@@ -953,7 +1219,7 @@ export class ThemeService {
|
|
|
953
1219
|
}
|
|
954
1220
|
}
|
|
955
1221
|
\`\`\`
|
|
956
|
-
`;var
|
|
1222
|
+
`;var Ve=m.ToolNames.codeAssistant("kendo"),We=()=>`## Using ${l} Icons
|
|
957
1223
|
|
|
958
1224
|
Important: Attempt to prioritize SVG icons over font icons.
|
|
959
1225
|
|
|
@@ -961,9 +1227,9 @@ Important: Attempt to prioritize SVG icons over font icons.
|
|
|
961
1227
|
|
|
962
1228
|
- Make sure @progress/kendo-svg-icons is installed.
|
|
963
1229
|
- Make sure @progress/kendo-angular-icons is installed.
|
|
964
|
-
- You can call ${
|
|
1230
|
+
- You can call ${Ve} tool for ${l} SVGIcon component for docs and API reference.
|
|
965
1231
|
- [optional] If SVG is not an option fallback to fonticon - make sure \`<link rel="stylesheet" href="https://unpkg.com/@progress/kendo-font-icons/dist/index.css" />\` is added as a reference.
|
|
966
|
-
- [optional] If using font icons you can call ${
|
|
1232
|
+
- [optional] If using font icons you can call ${Ve} tool for ${l} Icon component for docs and API reference.
|
|
967
1233
|
|
|
968
1234
|
### Examples
|
|
969
1235
|
|
|
@@ -1004,7 +1270,7 @@ import { KENDO_ICONS } from "@progress/kendo-angular-icons";
|
|
|
1004
1270
|
})
|
|
1005
1271
|
export class AppComponent {}
|
|
1006
1272
|
\`\`\`
|
|
1007
|
-
`;var
|
|
1273
|
+
`;var ze=e=>{let t=e.component?.trim().toLowerCase(),s=ye.get(t),o=`## ${l} Common Guidelines
|
|
1008
1274
|
|
|
1009
1275
|
`;return s&&(o+=`### Package Installation
|
|
1010
1276
|
Always use minimal, targeted package installation.
|
|
@@ -1026,7 +1292,7 @@ ${e.componentInstructions}
|
|
|
1026
1292
|
Always use the correct ${l} types for component inputs, outputs, and event handler parameters.
|
|
1027
1293
|
Do not substitute plain strings, plain objects, or \`any\` for a typed union, enum, or interface provided by the library.
|
|
1028
1294
|
Import all required types from the appropriate ${l} package.
|
|
1029
|
-
`,o};function
|
|
1295
|
+
`,o};function Ye(e="kendo-angular-app",t=!0,s="default"){let o=t?`These instructions will walk you through creating a new Angular project and setting up ${l}.`:`These instructions will walk you through adding ${l} to your existing Angular project.`,n=1,a=t?`## Step ${n++}: Install Angular CLI
|
|
1030
1296
|
|
|
1031
1297
|
First, ensure the Angular CLI is installed globally:
|
|
1032
1298
|
|
|
@@ -1063,7 +1329,7 @@ Before you begin, ensure you have:
|
|
|
1063
1329
|
- **Node.js 18 or later** installed on your machine
|
|
1064
1330
|
- 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.
|
|
1065
1331
|
|
|
1066
|
-
${
|
|
1332
|
+
${a}## Step ${n++}: Configure animations
|
|
1067
1333
|
|
|
1068
1334
|
This ensures animations that ${l} components rely on are configurated correctly.
|
|
1069
1335
|
|
|
@@ -1262,7 +1528,7 @@ export class App {}
|
|
|
1262
1528
|
cd ${e} && ng serve
|
|
1263
1529
|
\`\`\`
|
|
1264
1530
|
|
|
1265
|
-
`}var
|
|
1531
|
+
`}var He=`
|
|
1266
1532
|
## Grid Data Binding
|
|
1267
1533
|
|
|
1268
1534
|
MUST use kendoGridBinding directive for basic Grid operations
|
|
@@ -1313,7 +1579,7 @@ Affected directives:
|
|
|
1313
1579
|
|
|
1314
1580
|
WRONG: <button kendoGridExcelCommand kendoButton>Export to Excel</button>
|
|
1315
1581
|
CORRECT: <button kendoGridExcelCommand>Export to Excel</button>
|
|
1316
|
-
`;var
|
|
1582
|
+
`;var Qe=`
|
|
1317
1583
|
## kendoButton Must Not Be Combined with Command Directives
|
|
1318
1584
|
|
|
1319
1585
|
Never apply kendoButton to the same element as any of these TreeList command directives - they render their own button internally.
|
|
@@ -1325,7 +1591,7 @@ Affected directives:
|
|
|
1325
1591
|
|
|
1326
1592
|
WRONG: <button kendoTreeListExcelCommand kendoButton>Export to Excel</button>
|
|
1327
1593
|
CORRECT: <button kendoTreeListExcelCommand>Export to Excel</button>
|
|
1328
|
-
`;var
|
|
1594
|
+
`;var Je=`
|
|
1329
1595
|
## kendoButton Must Not Be Combined with Command Directives
|
|
1330
1596
|
|
|
1331
1597
|
Never apply kendoButton to the same element as any of these ListView command directives - they render their own button internally.
|
|
@@ -1340,7 +1606,7 @@ Affected directives:
|
|
|
1340
1606
|
|
|
1341
1607
|
WRONG: <button kendoListViewAddCommand kendoButton>Add</button>
|
|
1342
1608
|
CORRECT: <button kendoListViewAddCommand>Add</button>
|
|
1343
|
-
`;var
|
|
1609
|
+
`;var Xe=`
|
|
1344
1610
|
## kendoButton Must Not Be Combined with Command Directives
|
|
1345
1611
|
|
|
1346
1612
|
Never apply kendoButton to the same element as the Scheduler PDF command directive - it renders its own button internally.
|
|
@@ -1351,7 +1617,7 @@ Affected directives:
|
|
|
1351
1617
|
|
|
1352
1618
|
WRONG: <button kendoSchedulerPDFCommand kendoButton>Export to PDF</button>
|
|
1353
1619
|
CORRECT: <button kendoSchedulerPDFCommand>Export to PDF</button>
|
|
1354
|
-
`;var
|
|
1620
|
+
`;var Ze=`
|
|
1355
1621
|
## kendoButton Must Not Be Combined with Action Directives
|
|
1356
1622
|
|
|
1357
1623
|
Never apply kendoButton to the same element as any of these Window action directives - they render their own button internally.
|
|
@@ -1365,7 +1631,7 @@ Affected directives:
|
|
|
1365
1631
|
|
|
1366
1632
|
WRONG: <button kendoWindowCloseAction kendoButton></button>
|
|
1367
1633
|
CORRECT: <button kendoWindowCloseAction></button>
|
|
1368
|
-
`;var
|
|
1634
|
+
`;var et=`
|
|
1369
1635
|
## Charts Data Binding
|
|
1370
1636
|
|
|
1371
1637
|
Never bind the Chart's data to a getter property. Using a getter causes the chart to rerender on every Angular change detection cycle.
|
|
@@ -1373,7 +1639,7 @@ Never bind the Chart's data to a getter property. Using a getter causes the char
|
|
|
1373
1639
|
BAD: get chartData() { return [ /* data items */ ] }
|
|
1374
1640
|
GOOD: public chartData = [ /* data items */ ];
|
|
1375
1641
|
GOOD: public chartData = this.data.map(...)
|
|
1376
|
-
`;var
|
|
1642
|
+
`;var tt=["combobox","dropdownlist","dropdowntree","multicolumncombobox","multiselect","multiselecttree","autocomplete"],ot=e=>e==="autocomplete"?Bt:e==="dropdowntree"?Ft:e==="multiselecttree"?qt:e==="multicolumncombobox"?Kt:Mt(e),Mt=e=>`
|
|
1377
1643
|
## ${e}
|
|
1378
1644
|
When implementing or updating the ${e} component, always follow these rules for \`textField\` and \`valueField\`:
|
|
1379
1645
|
|
|
@@ -1423,7 +1689,7 @@ If \`valuePrimitive\` is false, which is the default, the value must be an objec
|
|
|
1423
1689
|
\`\`\`typescript
|
|
1424
1690
|
public selectedValue = { id: 2, name: 'B' };
|
|
1425
1691
|
\`\`\`
|
|
1426
|
-
`,
|
|
1692
|
+
`,Bt=`
|
|
1427
1693
|
## AutoComplete
|
|
1428
1694
|
|
|
1429
1695
|
### Primitive Data
|
|
@@ -1431,7 +1697,7 @@ If the data is an array of primitives (e.g., [data]="['A', 'B']"), never set \`v
|
|
|
1431
1697
|
|
|
1432
1698
|
### Complex Data
|
|
1433
1699
|
If the data is an array of objects (e.g., [data]="[{ id, name }]"), always set \`valueField\` to a string property for value binding (e.g., "id").
|
|
1434
|
-
`,
|
|
1700
|
+
`,Ft='\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',qt='\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',Kt='\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 nt=`
|
|
1435
1701
|
|
|
1436
1702
|
## Smart Grid (AI-Enhanced) Instructions
|
|
1437
1703
|
|
|
@@ -1450,6 +1716,6 @@ Suggestion Examples by Domain:
|
|
|
1450
1716
|
|
|
1451
1717
|
Required Disclaimer:
|
|
1452
1718
|
"The examples use a Telerik-hosted AI service for demonstration purposes only. For production applications, use an AI service that understands your specific domain, data, and business requirements."
|
|
1453
|
-
`;function
|
|
1719
|
+
`;function jt(e){let t=e?.trim().toLowerCase();if(t==="grid")return[He,nt].join(`
|
|
1454
1720
|
|
|
1455
|
-
`);if(t==="treelist")return
|
|
1721
|
+
`);if(t==="treelist")return Qe;if(t==="listview")return Je;if(t==="scheduler")return Xe;if(t==="window")return Ze;if(t==="charts")return et;if(tt.includes(t))return ot(t)}var B=!!process.env.KENDO_UIA_STOP_STATIC_CONTEXT,st=m.ToolNames.layoutAssistant(I),ee=m.ToolNames.codeAssistant(I),rt=m.ToolNames.styleAssistant(I),te=m.ToolNames.iconAssistant(I),at=m.ToolNames.gettingStartedAssistant(I),it=m.ToolNames.accessibilityAssistant(I);function lt(e,t,s){return[m.Tools.createOrchestrator({name:m.ToolNames.orchestrator(I),title:"Kendo UI Generator",description:m.ToolDescriptions.orchestrator(l),layoutAssistantName:st,codeAssistantName:ee,styleAssistantName:rt,iconAssistantName:te,accessibilityAssistantName:it,suiteName:l,libKey:T,components:O,requiredAccess:["agent"]},{validationSteps:m.Validation.Angular.steps,injectedPlan:m.Validation.Angular.additionalPlan},e),m.Tools.createAssistantOrchestrator({name:"kendo_angular_assistant",title:"Kendo UI Assistant",description:m.ToolDescriptions.assistantOrchestrator(l),codeAssistantName:ee,iconAssistantName:te,suiteName:l,libKey:T,components:O,requiredAccess:["assistant"]},e),m.Tools.createLayoutAssistant({name:st,title:"Kendo UI Layout Assistant",description:m.ToolDescriptions.layoutAssistant,suiteName:l,libKey:T,getPreContent:B?void 0:Ke,requiredAccess:["agent"]},e),m.Tools.createStyleAssistant({name:rt,title:"Kendo UI Style Assistant",description:m.ToolDescriptions.styleAssistant,libKey:T,getPreContent:B?void 0:je,requiredAccess:["agent"]},e),m.Tools.createIconSearch({name:te,title:"Kendo UI Icon Assistant",description:m.ToolDescriptions.iconAssistant,libKey:T,getPostContent:B?void 0:We,requiredAccess:["assistant","agent"]},e),m.Tools.createCodeAssistant({name:ee,title:"Kendo UI Component Assistant",description:m.ToolDescriptions.codeAssistant(l),libKey:T,suiteName:l,components:O,getPostContent:B?void 0:({component:n})=>{let a=jt(n);return ze({component:n,componentInstructions:a})},requiredAccess:["assistant","agent"]},e),new S(at,{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:fe(l,"kendo-angular-app")},async({projectName:n,createNewProject:a,theme:r},{_meta:i})=>{try{await e.recordToolUserRequest({toolName:at,meta:{projectName:n,createNewProject:a,theme:r,_meta:i}})}catch(p){console.error("Error recording tool request:",p)}return{content:[{type:"text",text:Ye(n,a,r)}]}}),m.Tools.createAccessibilityAssistant({name:it,title:"Kendo UI Accessibility Assistant",description:m.ToolDescriptions.accessibilityAssistant(l),libKey:T,suiteName:l,components:O,requiredAccess:["agent"]},e)].filter(n=>n.hasAccess(t))}var Ht=Yt(import.meta.url),Qt=ct.dirname(Ht),Jt=ct.resolve(Qt,"../package.json"),dt=JSON.parse(zt.readFileSync(Jt,"utf-8")),oe=new Vt({name:"kendo-mcp",title:"Kendo MCP Server",version:dt.version});async function Xt(){let e=new Wt;g("Starting server...");let t=await me(async()=>{let o=(await be())?.entitlement;return o?.Product?.Code||o?.product?.code});t!=="none"&&(L.toolNameHeader=t==="agent"||t==="full"?"agent":"assistant",lt(L,t,oe).forEach(o=>o.register(oe)),he({serverName:"angular",contextApi:L,additionalFields:{version:dt.version,access_type:t}})),await oe.connect(e)}Xt();
|
package/package.json
CHANGED
package/proto/service.proto
CHANGED
|
@@ -116,6 +116,10 @@ message ValidateUserLicenseResponse {
|
|
|
116
116
|
bool has_exceeded_rate_limit = 3;
|
|
117
117
|
}
|
|
118
118
|
|
|
119
|
+
// ============================================================================
|
|
120
|
+
// Service Definition
|
|
121
|
+
// ============================================================================
|
|
122
|
+
|
|
119
123
|
service ContextQueryService {
|
|
120
124
|
rpc Query(ContextQueryRequest) returns (StringArray);
|
|
121
125
|
rpc GetApiRefMatches(ContextQueryRequest) returns (StringArray);
|