@progress/kendo-angular-mcp 1.9.0 → 1.10.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 +174 -311
- package/package.json +3 -3
package/dist/index.js
CHANGED
|
@@ -1,37 +1,43 @@
|
|
|
1
1
|
#!/usr/bin/env node
|
|
2
|
-
import{McpServer as
|
|
3
|
-
`,r=
|
|
2
|
+
import{McpServer as ho}from"@modelcontextprotocol/sdk/server/mcp.js";import{StdioServerTransport as fo}from"@modelcontextprotocol/sdk/server/stdio.js";import{dirname as Vt,join as zt}from"path";import{fileURLToPath as Ht}from"url";import{loadLicense as Dt,decodeLicenseKey as Ot,decodeLicenseEvidence as Gt}from"@progress/kendo-licensing/utils";var Y=class extends Error{constructor(t){super(t),this.name="LicenseError"}};function de(e){return e.replace(/^\uFEFF/,"")}async function Q(e){let t=null,o=null;try{let n=Dt();if(!n.success){let r=new Y(n.message);throw e&&await e("license_load_failed",{error:n.message}).catch(()=>{}),r}try{t=(await Ot(n.value)).licenses.find(async s=>!!(await Gt(s)).userId)}catch(r){console.log(r.message),e&&await e("license_load_failed",{error:r.message||"Unknown decoding error"}).catch(()=>{})}if(!t)return[de(n.value),null]}catch(n){return o=n.message||"Unknown error loading license.",e&&await e("license_load_failed",{error:o}).catch(()=>{}),[null,o]}return[de(t),null]}import L from"node:fs";import V from"node:path";var X=!1,D=process.env.DEBUG_LOG_FILE,pe=!!(D&&typeof D=="string");if(pe){let e=V.resolve(D),t=V.dirname(e);if(t!=="."&&t!==process.cwd()&&!L.existsSync(t))try{L.mkdirSync(t,{recursive:!0})}catch(o){console.error("Error creating log directory:",o)}if(!L.existsSync(e))try{L.writeFileSync(e,"")}catch(o){console.error("Error creating log file:",o)}}else X=!1;X=pe&&!!D&&L.existsSync(V.resolve(D));function v(...e){if(X&&D){let n=`${new Date().toISOString()}: ${e.join(" ")}
|
|
3
|
+
`,r=V.resolve(D);L.appendFile(r,n,s=>{s&&console.error("Error writing to log file:",s)})}}import Lt from"@grpc/proto-loader";import q from"@grpc/grpc-js";import ge from"path";import ue from"fs";import{fileURLToPath as Mt}from"url";var $t=Mt(import.meta.url),Bt=ge.dirname($t),he={version:"unknown"},me=ge.resolve(Bt,"../package.json");ue.existsSync(me)&&(he=JSON.parse(ue.readFileSync(me,"utf-8")));function J(e){return typeof e=="string"&&e.length>0&&e.length<200&&/^[\x20-\x7e]+$/.test(e)}function qt(e){return e==="semantic"||e==="fallback"}function Ft(e){return e.replace(/\u2014/g,"--").replace(/\u2013/g,"-").replace(/[^\x20-\x7E]/g,"")}var z=class{constructor(t,o,n){this.contextApiUrl=t;this.protoPath=o;this.options=n;this.toolNameHeader="assistant";let r=Lt.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"),v("Using ContextApi URl:",this.contextApiUrl);let s=q.loadPackageDefinition(r);this.client=new s.ContextQueryService(this.contextApiUrl||"contextapi.telerik.com:443",this.isDev?q.credentials.createInsecure():q.credentials.createSsl())}buildRequestMetadata(t={}){return Ft(JSON.stringify({...t,source:"npm",version:he.version,os:process.platform,node_version:process.version,plugin_mode:!!process.env.PLUGIN_MODE,install_source:process.env.INSTALL_SOURCE?.toLowerCase()}))}async getMetadata({meta:t}={meta:{}}){let o=t??{},{langfuseSessionId:n,toolInvocationId:r,mcpToolName:s,workflowSessionSource:a,workflowSessionExplicitIdRejected:l,...g}=o;delete g["progress.com/kendo-ui-workflow-session-id"];let[p,h]=this.isDev?["fake_license",null]:await Q((y,f)=>this.logEvent(y,f)),k=process.env.CONTEXTAPI_API_KEY,m=k&&typeof k=="string",i=p&&typeof p=="string";if(!i&&!m&&h)throw new Error(`Failed to authenticate with API key or License key!
|
|
4
4
|
|
|
5
|
-
License Error: ${o}`);let i=new q.Metadata;if(a)try{i.add("x-license-key",n)}catch(c){throw k("Error adding license key to metadata:",c),new Error(`Failed to use license key: ${c.message}`)}return s&&i.add("x-api-key",r),this.options?.libName&&i.add("x-library-name",this.options.libName),i.add("x-tool-name",this.toolNameHeader),i.add("x-request-metadata",this.buildRequestMetadata(t)),i}async query(t,n){let o=await this.getMetadata({meta:n});return new Promise((r,s)=>{this.client.query(t,o,(a,i)=>{a?s(a):r(i)})})}async getApiRefMatches(t,n){let o=await this.getMetadata({meta:n});return new Promise((r,s)=>{this.client.getApiRefMatches(t,o,(a,i)=>{a?s(a):r(i)})})}async queryCssUtils(t,n){let o=await this.getMetadata({meta:n});return new Promise((r,s)=>{this.client.cssUtilsSearch(t,o,(a,i)=>{a?(k("Error querying CSS Utils:",a),s(a)):r(i)})})}async queryIconsSearch(t,n){let o=await this.getMetadata({meta:n});return new Promise((r,s)=>{this.client.iconsSearch(t,o,(a,i)=>{a?(k("Error querying Icons Search:",a),s(a)):r(i)})})}async queryBuildingBlocks(t,n){let o=await this.getMetadata({meta:n});return new Promise((r,s)=>{this.client.buildingBlocksSearch(t,o,(a,i)=>{a?(k("Error querying Building Blocks:",a),s(a)):r(i)})})}async validateUserLicense(){let t=await this.getMetadata();return new Promise((n,o)=>{this.client.validateUserLicense({},t,(r,s)=>{r?(k("Error validating user license:",r),o(r)):n(s)})})}async queryThemeGenerate(t,n){let o=await this.getMetadata({meta:n});return new Promise((r,s)=>{this.client.generateTheme(t,o,(a,i)=>{a?(k("Error querying context API/GenerateTheme:",a),s(a)):r(i)})})}async recordOrchestratorUserRequest({meta:t}){let n=await this.getMetadata({meta:t});return new Promise((o,r)=>{this.client.recordOrchestratorUserRequest({},n,(s,a)=>{s?(k("Error recording orchestrator user request:",s),r(s)):o(a)})})}async recordToolUserRequest({toolName:t,meta:n}){let o=await this.getMetadata({meta:n});return new Promise(r=>{this.client.recordToolUserRequest({tool_name:t},o,(s,a)=>{s?(s.code===7?k("recordToolUserRequest: license does not cover Kendo AI Tools, skipping telemetry."):k("Error recording tool user request:",s),r(null)):r(a)})})}async logEvent(t,n,o={}){let r="h8utJ6rk4PpIWX4JMn9beQDsjVUri6KV0XYfiVwq",{enrichWithUserData:s=!1,meta:a={}}=o,i=r&&typeof r=="string",c=null;if(s)try{let[h]=this.isDev?["fake_license",null]:await H();h&&typeof h=="string"&&(c=h)}catch{}if(!i&&!c){k("Neither LOGGING_API_KEY nor license key available, skipping log event");return}let u=new q.Metadata;return i&&u.add("x-api-key",r),c&&(u.add("x-license-key",c),u.add("x-request-metadata",this.buildRequestMetadata(a)),this.options?.libName&&u.add("x-library-name",this.options.libName)),new Promise((h,v)=>{this.client.logEvent({event_name:t,fields:n||{}},u,(g,p)=>{g?(k("Error logging event:",g),v(g)):h()})})}};import{z as Q}from"zod";var So=Q.object({user_id:Q.string(),user_email:Q.string().email()});import{z as A}from"zod";var Rt=A.object({Product:A.object({Id:A.number().int(),Code:A.string(),Name:A.string()}),License:A.nullable(A.object({Id:A.number().int(),Name:A.string(),Type:A.string(),Active:A.boolean()})),Availability:A.array(A.object({LicenseStart:A.nullable(A.string().datetime()),LicenseEnd:A.nullable(A.string().datetime())})),IsLicenseAvailable:A.optional(A.boolean())}),No=A.array(Rt);function I(e,t){let n=e.server?.server.getClientVersion?.(),o=t||{};return n&&(o.clientInfo={name:n.name,version:n.version}),o}async function le(e){let t=process.env.KENDO_MCP_ACCESS;if(t==="true"||t==="1"||t==="full")return"full";if(typeof t=="string"&&(t.toLowerCase()==="agent"||t.toLowerCase()==="assistant"))return t.toLowerCase();let n=await e();return n?.toLocaleLowerCase()==="agentic_ui_generator"?"agent":n?.toLocaleLowerCase()==="ai_coding_assistants"?"assistant":"none"}function ce(){return'**Accessibility Guidelines: WCAG 2.2 Level AA Compliance**\n\n**Core Principles:**\n1. Use semantic HTML and ARIA correctly\n2. Ensure WCAG 2.2 AA compliance\n3. Follow W3C ARIA Authoring Practices\n4. Provide standards-based accessibility fixes\n\n**1. Form Control Labels** (WCAG 1.3.1, 3.3.2, 4.1.2)\nEvery input must have an associated label.\nCORRECT: `<input type="search" aria-label="Search products" placeholder="Search...">`\nCORRECT: `<label for="qty">Quantity</label><input type="number" id="qty">`\nWRONG: `<span>Email</span><input type="email">` (no association)\nWRONG: `<input type="email" placeholder="Email">` (placeholder as label)\n\n**2. Button Accessibility** (WCAG 4.1.2, 2.4.6, 2.5.3)\nAll buttons need accessible names describing their purpose.\nCORRECT: `<button type="button">Save Changes</button>`\nCORRECT: `<button aria-label="Close dialog"><svg aria-hidden="true" focusable="false">...</svg></button>`\nWRONG: `<button><svg>...</svg></button>` (no accessible name)\nWRONG: `<button>Click here</button>` (generic text)\n\n**3. Popup/Menu Triggers** (WCAG 4.1.2, 1.3.1)\nIndicate popup purpose and state using aria-haspopup, aria-expanded, aria-controls.\nCORRECT: `<button aria-expanded="false" aria-haspopup="menu" aria-controls="menu-id">Settings</button>`\n\n**4. Image Accessibility** (WCAG 1.1.1)\nInformative: `<img src="chart.png" alt="Sales increased 25% in Q4 2024">`\nFunctional: `<a href="/home"><img src="logo.png" alt="Company Name Home"></a>`\nDecorative: `<img src="border.png" alt="" role="presentation">`\nComplex: `<img src="chart.png" alt="Sales data" aria-describedby="desc-id">`\nWRONG: Missing alt, filename as alt, generic alt for decorative images\n\n**5. Link Accessibility** (WCAG 2.4.4, 2.4.6)\nLinks must be descriptive and understandable out of context.\nCORRECT: `<a href="/products">View All Products</a>`\nCORRECT: `<a href="/article" aria-label="Read more about New Product Launch">Read more</a>`\nWRONG: "Click here", "Read more", "Learn more" without context\n\n**6. Form Validation** (WCAG 3.3.1, 3.3.2, 3.3.3)\nErrors must be identified, associated with inputs, and provide suggestions. Use aria-describedby, aria-invalid="true", and role="alert".\n\n**7. Heading Structure** (WCAG 1.3.1, 2.4.6)\nEach page must have an `<h1>` that describes its content. Use hierarchical, descriptive headings with no skipped levels (h1\u2192h2\u2192h3).\nCORRECT: `<h1>Dashboard</h1> <h2>Sales</h2> <h3>By Region</h3>`\nWRONG: No `<h1>` on the page, or skipping levels (h1\u2192h3)\nIf a heading should look smaller than its semantic level, use CSS: `<h2 class="text-sm">Subtitle</h2>`\n\n**8. Page Component Landmark Rules** (WCAG 1.3.1, 4.1.2)\nPage components (route components) may be rendered inside a layout that already provides `<main>`, `<header>`, or `<footer>`. Since the layout configuration is unknown, avoid using these landmarks in page components to prevent potential duplication and nesting violations. Use `<div>`, `<section>`, or `<article>` as the top-level wrapper instead.\n- Avoid adding `<main>`, `role="main"`, `<header>`, or `<footer>` in page components \u2014 the layout typically provides them. Duplicating them can cause `landmark-no-duplicate-main` and `landmark-main-is-top-level` violations.\n- Avoid adding `role="banner"` or using a semantic `<header>` element in page components \u2014 the layout\'s `<header>` already claims the banner landmark. Adding another causes `landmark-banner-is-top-level` violations.\n- Avoid adding `role="contentinfo"` to elements inside page components \u2014 the contentinfo landmark should be a top-level landmark, not nested inside `<main>` or other landmarks. Nesting it can cause `landmark-contentinfo-is-top-level` violations.\n- When multiple `<section>` or `<nav>` elements exist on a page, give each a unique `aria-label` to avoid `landmark-unique` violations.\n\n**9. ARIA Role and Attribute Restrictions** (WCAG 4.1.2)\nOnly use ARIA roles that are valid for the given HTML element. Avoid adding `aria-label` or `aria-labelledby` to elements that do not permit naming.\n- `<article>` has an implicit `article` role. Do NOT override it with `role="listitem"`, `role="button"`, `role="link"`, or any other role \u2014 none are allowed on `<article>`. Use `<li>` for list items, `<button>` for interactive cards, or `<a>` for clickable cards instead.\n- `<button>` already has an implicit `button` role. Do NOT add `role="listitem"` or other incompatible roles.\n- `<span>` and `<div>` without roles are generic elements. Do NOT add `aria-label` to them \u2014 it is a prohibited attribute on elements with no accessible role and can cause `aria-prohibited-attr` violations. Instead, use `role="img"` + `aria-label` for visual indicators, or use visually hidden text.\n- Do NOT add `aria-label` to non-interactive `<div>` wrappers \u2014 it has no effect and triggers violations.\n- `aria-pressed` is only valid on elements with `role="button"`, `role="checkbox"`, `role="menuitemcheckbox"`, `role="option"`, `role="radio"`, or `role="switch"`. Do NOT use `aria-pressed` on elements with `role="listitem"` or other roles.\nCORRECT: `<ul role="list"><li class="product-card">...</li></ul>` (listitem inside list)\nCORRECT: `<span role="img" aria-label="Status: pending" class="status-dot"></span>` (role added before aria-label)\nCORRECT: `<span class="status-dot" aria-hidden="true"></span><span class="visually-hidden">Pending</span>` (hidden text alternative)\nWRONG: `<article role="listitem">` (listitem not allowed on article)\nWRONG: `<article role="button">` (button not allowed on article \u2014 use `<button>` or `<div role="button">`)\nWRONG: `<span aria-label="pending" class="status-dot"></span>` (aria-label prohibited on generic span)\nWRONG: `<div aria-label="Product badges" class="badges"></div>` (aria-label prohibited on generic div)\n\n**Quick Checklist:**\n- **Forms:** Associated labels, aria-required on required fields, autocomplete attributes, aria-describedby for errors, aria-invalid for invalid fields, fieldsets with legends\n- **Buttons/Links:** Accessible names, aria-label for icon buttons, aria-hidden on decorative icons, descriptive link text\n- **Popups/Dialogs:** aria-haspopup, aria-expanded, aria-controls, role="dialog", aria-modal="true", aria-labelledby, focus trap, Escape to close\n- **Images:** alt on all images, descriptive alt for informative, empty alt for decorative, aria-describedby for complex\n- **Structure:** One h1, logical heading hierarchy, avoid `<main>`, `<header>`, `<footer>`, `role="main"`, `role="contentinfo"`, `role="banner"` in page/route components (the layout may already provide them), use `<section>` or `<div>` as page-level wrappers, unique aria-labels on duplicate landmark types\n- **ARIA Rules:** Avoid adding `aria-label` to generic `<span>`/`<div>` without a role, avoid using `role="listitem"` or `role="button"` on `<article>` \u2014 use `<li>` for list items, add `role="img"` before `aria-label` on visual indicators, `aria-pressed` only on button-like roles\n- **Scrollable Regions:** Any scrollable container must have `tabindex="0"` or contain keyboard-interactive children\n- **Nested Interactive:** Do not add interactive role/tabindex to a container that already has focusable children\n- **List Roles:** `role="list"` containers must have `role="listitem"` children \u2014 prefer `<ul>/<li>` natively\n- **Dynamic Content:** role="status"/aria-live="polite" for updates, role="alert"/aria-live="assertive" for critical alerts\n- **Keyboard/Focus:** All interactive elements keyboard accessible, logical focus order, visible focus indicators, no keyboard traps (except modals)\n- **Color/Contrast:** 4.5:1 text contrast (3:1 large text), 3:1 UI component contrast, no color-only information, 3:1 focus indicator contrast'}var Ut=1440*60*1e3;function de(e){let{serverName:t,contextApi:n,additionalFields:o={},intervalMs:r=Ut,enrichWithUserData:s=!1}=e,a="mcp_server_heartbeat",i=async()=>{try{let u={server_name:t,timestamp:new Date().toISOString(),...o};await n.logEvent(a,u,{enrichWithUserData:s})}catch(u){k(`Failed to send heartbeat for ${t}:`,u)}};i();let c=setInterval(i,r);return()=>{clearInterval(c),k(`Heartbeat stopped for ${t}`)}}import{z as J}from"zod";var Dt=["meridian","default","bootstrap","material","fluent"];function pe(e,t){return{projectName:J.string().default(t).describe("The name of the project. Used as the project folder name when creating a new project."),createNewProject:J.boolean().default(!0).describe(`Whether to create a new project before configuring ${e}. Set to true to scaffold a brand-new project, or false if the project already exists and you only want to add ${e} to it.`),theme:J.enum(Dt).default("meridian").describe("The Kendo UI theme to use. Determines which theme package is installed and imported. Available themes: meridian (default), default, bootstrap, material, fluent.")}}var d="Kendo UI for Angular",T="angular",D="kendo",$=["AIPrompt","ActionSheet","AppBar","ArcGauge","AutoComplete","Avatar","Badge","Barcode","BottomNavigation","BreadCrumb","Button","ButtonGroup","Calendar","Card","ChartWizard","Charts","CheckBox","Chip","ChipList","ChunkProgressBar","CircularGauge","CircularProgressBar","ColorGradient","ColorPalette","ColorPicker","ComboBox","ContextMenu","ConversationalUI","DataQuery","DateInput","DateMath","DatePicker","DateRange","DateTimePicker","Diagram","Dialog","DragandDrop","Drawer","Drawing","DropDownButton","DropDownList","DropDownTree","Editor","ExcelExport","ExpansionPanel","FileSaver","FileSelect","Filter","FlatColorPicker","FloatingActionButton","FloatingLabel","Forms","FormField","Gantt","Gauges","General","Grid","GridLayout","Icon","InlineAIPrompt","Label","LinearGauge","ListBox","ListView","Loader","Map","MaskedTextBox","Menu","MultiColumnComboBox","MultiSelect","MultiSelectTree","MultiViewCalendar","Notification","NumericTextBox","OTPInput","Pager","PanelBar","PDFExport","PDFViewer","PivotGrid","Popover","Popup","ProgressBar","PromptBox","QRCode","RadialGauge","RadioButton","RangeSlider","Rating","Ripple","Sankey","SegmentedControl","Scheduler","ScrollView","Signature","Skeleton","Slider","SmartPasteButton","Sortable","StockChart","Sparkline","SpeechToTextButton","SplitButton","Splitter","Spreadsheet","StackLayout","Stepper","SVGIcon","Switch","TabStrip","TextArea","TextBox","TileLayout","Timeline","TimePicker","ToolBar","Tooltip","TreeList","TreeView","Typography","Upload","Window"],ue=new Map([["actionsheet","@progress/kendo-angular-navigation"],["aiprompt","@progress/kendo-angular-conversational-ui"],["appbar","@progress/kendo-angular-navigation"],["arcgauge","@progress/kendo-angular-gauges"],["autocomplete","@progress/kendo-angular-dropdowns"],["avatar","@progress/kendo-angular-layout"],["badge","@progress/kendo-angular-indicators"],["barcode","@progress/kendo-angular-barcodes"],["bottomnavigation","@progress/kendo-angular-navigation"],["breadcrumb","@progress/kendo-angular-navigation"],["button","@progress/kendo-angular-buttons"],["buttongroup","@progress/kendo-angular-buttons"],["calendar","@progress/kendo-angular-dateinputs"],["card","@progress/kendo-angular-layout"],["chartwizard","@progress/kendo-angular-chart-wizard"],["checkbox","@progress/kendo-angular-inputs"],["chip","@progress/kendo-angular-buttons"],["chiplist","@progress/kendo-angular-buttons"],["chunkprogressbar","@progress/kendo-angular-progressbar"],["circulargauge","@progress/kendo-angular-gauges"],["circularprogressbar","@progress/kendo-angular-progressbar"],["colorgradient","@progress/kendo-angular-inputs"],["colorpalette","@progress/kendo-angular-inputs"],["colorpicker","@progress/kendo-angular-inputs"],["combobox","@progress/kendo-angular-dropdowns"],["contextmenu","@progress/kendo-angular-menu"],["dataquery","@progress/kendo-data-query"],["dateinput","@progress/kendo-angular-dateinputs"],["datemath","@progress/kendo-date-math"],["datepicker","@progress/kendo-angular-dateinputs"],["daterangepicker","@progress/kendo-angular-dateinputs"],["datetimepicker","@progress/kendo-angular-dateinputs"],["diagram","@progress/kendo-angular-diagrams"],["dialog","@progress/kendo-angular-dialog"],["drawer","@progress/kendo-angular-layout"],["drawing","@progress/kendo-drawing"],["dropdownbutton","@progress/kendo-angular-buttons"],["dropdownlist","@progress/kendo-angular-dropdowns"],["dropdowntree","@progress/kendo-angular-dropdowns"],["editor","@progress/kendo-angular-editor"],["excelexport","@progress/kendo-angular-excel-export"],["expansionpanel","@progress/kendo-angular-layout"],["filesaver","@progress/kendo-file-saver"],["fileselect","@progress/kendo-angular-upload"],["filter","@progress/kendo-angular-filter"],["flatcolorpicker","@progress/kendo-angular-inputs"],["floatingactionbutton","@progress/kendo-angular-buttons"],["floatinglabel","@progress/kendo-angular-label"],["formfield","@progress/kendo-angular-inputs"],["forms","@progress/kendo-angular-inputs"],["gantt","@progress/kendo-angular-gantt"],["grid","@progress/kendo-angular-grid"],["gridlayout","@progress/kendo-angular-layout"],["icon","@progress/kendo-angular-icons"],["inlineaiprompt","@progress/kendo-angular-conversational-ui"],["label","@progress/kendo-angular-label"],["lineargauge","@progress/kendo-angular-gauges"],["listbox","@progress/kendo-angular-listbox"],["listview","@progress/kendo-angular-listview"],["loader","@progress/kendo-angular-indicators"],["map","@progress/kendo-angular-map"],["maskedtextbox","@progress/kendo-angular-inputs"],["menu","@progress/kendo-angular-menu"],["multicolumncombobox","@progress/kendo-angular-dropdowns"],["multiselect","@progress/kendo-angular-dropdowns"],["multiselecttree","@progress/kendo-angular-dropdowns"],["multiviewcalendar","@progress/kendo-angular-dateinputs"],["notification","@progress/kendo-angular-notification"],["numerictextbox","@progress/kendo-angular-inputs"],["otpinput","@progress/kendo-angular-inputs"],["pager","@progress/kendo-angular-pager"],["panelbar","@progress/kendo-angular-layout"],["pdfexport","@progress/kendo-angular-pdf-export"],["pdfviewer","@progress/kendo-angular-pdfviewer"],["pivotgrid","@progress/kendo-angular-pivotgrid"],["popover","@progress/kendo-angular-tooltip"],["popup","@progress/kendo-angular-popup"],["progressbar","@progress/kendo-angular-progressbar"],["promptbox","@progress/kendo-angular-conversational-ui"],["qrcode","@progress/kendo-angular-barcodes"],["radialgauge","@progress/kendo-angular-gauges"],["radiobutton","@progress/kendo-angular-inputs"],["rangeslider","@progress/kendo-angular-inputs"],["rating","@progress/kendo-angular-inputs"],["ripple","@progress/kendo-angular-ripple"],["sankey","@progress/kendo-angular-charts"],["segmentedcontrol","@progress/kendo-angular-buttons"],["scheduler","@progress/kendo-angular-scheduler"],["scrollview","@progress/kendo-angular-scrollview"],["signature","@progress/kendo-angular-inputs"],["skeleton","@progress/kendo-angular-indicators"],["slider","@progress/kendo-angular-inputs"],["smartpastebutton","@progress/kendo-angular-buttons"],["sortable","@progress/kendo-angular-sortable"],["sparkline","@progress/kendo-angular-charts"],["speechtotextbutton","@progress/kendo-angular-buttons"],["splitbutton","@progress/kendo-angular-buttons"],["splitter","@progress/kendo-angular-layout"],["spreadsheet","@progress/kendo-angular-spreadsheet"],["stacklayout","@progress/kendo-angular-layout"],["stepper","@progress/kendo-angular-layout"],["stockchart","@progress/kendo-angular-charts"],["svgicon","@progress/kendo-angular-icons"],["switch","@progress/kendo-angular-inputs"],["tabstrip","@progress/kendo-angular-layout"],["textarea","@progress/kendo-angular-inputs"],["textbox","@progress/kendo-angular-inputs"],["tilelayout","@progress/kendo-angular-layout"],["timeline","@progress/kendo-angular-layout"],["timepicker","@progress/kendo-angular-dateinputs"],["toolbar","@progress/kendo-angular-toolbar"],["treelist","@progress/kendo-angular-treelist"],["treeview","@progress/kendo-angular-treeview"],["typography","@progress/kendo-angular-typography"],["upload","@progress/kendo-angular-upload"],["window","@progress/kendo-angular-dialog"],["charts","@progress/kendo-angular-charts"],["conversationalui","@progress/kendo-angular-conversational-ui"],["tooltip","@progress/kendo-angular-tooltip"]]);var Ot=Et(Pt(Gt(import.meta.url)),"../proto/service.proto"),M=new j("contextapi.telerik.com:443",Ot,{libName:T});var me=async()=>M.validateUserLicense();import oo from"fs";import ft from"path";import{fileURLToPath as no}from"url";import{z as w}from"zod";var C=class{constructor(t,n,o){this.name=t;this.config=n;this.cb=o}register(t){this.server=t,this.server.registerTool(this.name,this.config,this.cb)}hasAccess(t){return!this.config.requiredAccess||this.config.requiredAccess.length===0?!0:t==="full"||this.config.requiredAccess.includes(t)}};var F=e=>{let t=[`1. \`${e.accessibilityAssistantName}\`: Call first with \`includeGeneralGuidelines=true\`; use \`false\` for component-specific follow-ups.`];if(e.includeLayout){let r=e.includeResponsive?"structure, responsive behavior, and UX policy":"structure and UX policy";t.push(`${t.length+1}. \`${e.layoutAssistantName}\`: Get Kendo Design System utilities for the requested ${r}. Use only those utilities for styling and layout.`)}if(e.includeTheming&&t.push(`${t.length+1}. \`${e.styleAssistantName}\`: Generate the requested Kendo theme variables.`),e.includeIcons&&t.push(`${t.length+1}. \`${e.iconAssistantName}\`: Find icons only for the required actions and states.`),e.includeComponentsDocs){let r=e.components?.length?e.components.join(", "):"each Kendo component selected for the implementation";t.push(`${t.length+1}. \`${e.codeAssistantName}\`: Call once per component (${r}) with a concise, feature-specific query before writing Kendo markup.`)}t.push(`${t.length+1}. Implement the requested UI using ${e.suiteName} components and the gathered guidance.`),t.push(`${t.length+1}. Run \`npm run build\`, resolve failures, and repeat until it succeeds.`);let n=e.libKey==="angular"?"- Before editing, inspect the project for Standalone or NgModule setup, built-in or structural template syntax, and the existing Kendo theme import mechanism. Match those conventions; default to Standalone and built-in control flow for Angular 17+ only when no existing pattern is found.":"- Use React function components, Hooks, typed props where needed, stable list keys, and the project's existing KendoReact theme and package setup.",o=e.libKey==="angular"?`
|
|
5
|
+
License Error: ${h}`);let c=new q.Metadata;if(i)try{c.add("x-license-key",p)}catch(y){throw v("Error adding license key to metadata:",y),new Error(`Failed to use license key: ${y.message}`)}return m&&c.add("x-api-key",k),this.options?.libName&&c.add("x-library-name",this.options.libName),c.add("x-tool-name",this.toolNameHeader),J(n)&&c.add("x-langfuse-session-id",n),J(r)&&c.add("x-tool-invocation-id",r),J(s)&&c.add("x-mcp-tool-name",s),qt(a)&&c.add("x-workflow-session-source",a),typeof l=="boolean"&&c.add("x-workflow-session-explicit-id-rejected",String(l)),c.add("x-request-metadata",this.buildRequestMetadata(g)),c}async query(t,o){let n=await this.getMetadata({meta:o});return new Promise((r,s)=>{this.client.query(t,n,(a,l)=>{a?s(a):r(l)})})}async getApiRefMatches(t,o){let n=await this.getMetadata({meta:o});return new Promise((r,s)=>{this.client.getApiRefMatches(t,n,(a,l)=>{a?s(a):r(l)})})}async queryCssUtils(t,o){let n=await this.getMetadata({meta:o});return new Promise((r,s)=>{this.client.cssUtilsSearch(t,n,(a,l)=>{a?(v("Error querying CSS Utils:",a),s(a)):r(l)})})}async queryIconsSearch(t,o){let n=await this.getMetadata({meta:o});return new Promise((r,s)=>{this.client.iconsSearch(t,n,(a,l)=>{a?(v("Error querying Icons Search:",a),s(a)):r(l)})})}async queryBuildingBlocks(t,o){let n=await this.getMetadata({meta:o});return new Promise((r,s)=>{this.client.buildingBlocksSearch(t,n,(a,l)=>{a?(v("Error querying Building Blocks:",a),s(a)):r(l)})})}async validateUserLicense(){let t=await this.getMetadata();return new Promise((o,n)=>{this.client.validateUserLicense({},t,(r,s)=>{r?(v("Error validating user license:",r),n(r)):o(s)})})}async queryThemeGenerate(t,o){let n=await this.getMetadata({meta:o});return new Promise((r,s)=>{this.client.generateTheme(t,n,(a,l)=>{a?(v("Error querying context API/GenerateTheme:",a),s(a)):r(l)})})}async recordOrchestratorUserRequest({meta:t}){let o=await this.getMetadata({meta:t});return new Promise((n,r)=>{this.client.recordOrchestratorUserRequest({},o,(s,a)=>{s?(v("Error recording orchestrator user request:",s),r(s)):n(a)})})}async recordToolUserRequest({toolName:t,meta:o}){let n=await this.getMetadata({meta:o});return new Promise(r=>{this.client.recordToolUserRequest({tool_name:t},n,(s,a)=>{s?(s.code===7?v("recordToolUserRequest: license does not cover Kendo AI Tools, skipping telemetry."):v("Error recording tool user request:",s),r(null)):r(a)})})}async logEvent(t,o,n={}){let r="h8utJ6rk4PpIWX4JMn9beQDsjVUri6KV0XYfiVwq",{enrichWithUserData:s=!1,meta:a={}}=n,l=r&&typeof r=="string",g=null;if(s)try{let[h]=this.isDev?["fake_license",null]:await Q();h&&typeof h=="string"&&(g=h)}catch{}if(!l&&!g){v("Neither LOGGING_API_KEY nor license key available, skipping log event");return}let p=new q.Metadata;return l&&p.add("x-api-key",r),g&&(p.add("x-license-key",g),p.add("x-request-metadata",this.buildRequestMetadata(a)),this.options?.libName&&p.add("x-library-name",this.options.libName)),new Promise((h,k)=>{this.client.logEvent({event_name:t,fields:o||{}},p,(m,i)=>{m?(v("Error logging event:",m),k(m)):h()})})}};import{z as Z}from"zod";var $o=Z.object({user_id:Z.string(),user_email:Z.string().email()});import{z as x}from"zod";var Wt=x.object({Product:x.object({Id:x.number().int(),Code:x.string(),Name:x.string()}),License:x.nullable(x.object({Id:x.number().int(),Name:x.string(),Type:x.string(),Active:x.boolean()})),Availability:x.array(x.object({LicenseStart:x.nullable(x.string().datetime()),LicenseEnd:x.nullable(x.string().datetime())})),IsLicenseAvailable:x.optional(x.boolean())}),Fo=x.array(Wt);function S(e,t){let o=e.server?.server.getClientVersion?.(),n=t||{};return o&&(n.clientInfo={name:o.name,version:o.version}),n}async function fe(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 o=await e();return o?.toLocaleLowerCase()==="agentic_ui_generator"?"agent":o?.toLocaleLowerCase()==="ai_coding_assistants"?"assistant":"none"}function ye(){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 Kt=1440*60*1e3;function be(e){let{serverName:t,contextApi:o,additionalFields:n={},intervalMs:r=Kt,enrichWithUserData:s=!1}=e,a="mcp_server_heartbeat",l=async()=>{try{let p={server_name:t,timestamp:new Date().toISOString(),...n};await o.logEvent(a,p,{enrichWithUserData:s})}catch(p){v(`Failed to send heartbeat for ${t}:`,p)}};l();let g=setInterval(l,r);return()=>{clearInterval(g),v(`Heartbeat stopped for ${t}`)}}import{z as ee}from"zod";var jt=["meridian","default","bootstrap","material","fluent"];function ke(e,t){return{projectName:ee.string().default(t).describe("The name of the project. Used as the project folder name when creating a new project."),createNewProject:ee.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:ee.enum(jt).default("meridian").describe("The Kendo UI theme to use. Determines which theme package is installed and imported. Available themes: meridian (default), default, bootstrap, material, fluent.")}}var u="Kendo UI for Angular",U="angular",P="kendo",F=["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","LLMKit","Loader","Map","MaskedTextBox","Menu","MultiColumnComboBox","MultiSelect","MultiSelectTree","MultiViewCalendar","Notification","NumericTextBox","OTPInput","Pager","PanelBar","PDFExport","PDFViewer","PivotGrid","Popover","Popup","ProgressBar","PromptBox","QRCode","RadialGauge","RadioButton","RangeSlider","Rating","Ripple","Sankey","SegmentedControl","Scheduler","ScrollView","Signature","Skeleton","Slider","SmartPasteButton","Sortable","StockChart","Sparkline","SpeechToTextButton","SplitButton","Splitter","Spreadsheet","StackLayout","Stepper","SVGIcon","Switch","TabStrip","TextArea","TextBox","TileLayout","Timeline","TimePicker","ToolBar","Tooltip","TreeList","TreeView","Typography","Upload","Window"],ve=new Map([["actionsheet","@progress/kendo-angular-navigation"],["aiprompt","@progress/kendo-angular-conversational-ui"],["appbar","@progress/kendo-angular-navigation"],["arcgauge","@progress/kendo-angular-gauges"],["autocomplete","@progress/kendo-angular-dropdowns"],["avatar","@progress/kendo-angular-layout"],["badge","@progress/kendo-angular-indicators"],["barcode","@progress/kendo-angular-barcodes"],["bottomnavigation","@progress/kendo-angular-navigation"],["breadcrumb","@progress/kendo-angular-navigation"],["button","@progress/kendo-angular-buttons"],["buttongroup","@progress/kendo-angular-buttons"],["calendar","@progress/kendo-angular-dateinputs"],["card","@progress/kendo-angular-layout"],["chartwizard","@progress/kendo-angular-chart-wizard"],["checkbox","@progress/kendo-angular-inputs"],["chip","@progress/kendo-angular-buttons"],["chiplist","@progress/kendo-angular-buttons"],["chunkprogressbar","@progress/kendo-angular-progressbar"],["circulargauge","@progress/kendo-angular-gauges"],["circularprogressbar","@progress/kendo-angular-progressbar"],["colorgradient","@progress/kendo-angular-inputs"],["colorpalette","@progress/kendo-angular-inputs"],["colorpicker","@progress/kendo-angular-inputs"],["combobox","@progress/kendo-angular-dropdowns"],["contextmenu","@progress/kendo-angular-menu"],["dataquery","@progress/kendo-data-query"],["dateinput","@progress/kendo-angular-dateinputs"],["datemath","@progress/kendo-date-math"],["datepicker","@progress/kendo-angular-dateinputs"],["daterangepicker","@progress/kendo-angular-dateinputs"],["datetimepicker","@progress/kendo-angular-dateinputs"],["diagram","@progress/kendo-angular-diagrams"],["dialog","@progress/kendo-angular-dialog"],["drawer","@progress/kendo-angular-layout"],["drawing","@progress/kendo-drawing"],["dropdownbutton","@progress/kendo-angular-buttons"],["dropdownlist","@progress/kendo-angular-dropdowns"],["dropdowntree","@progress/kendo-angular-dropdowns"],["editor","@progress/kendo-angular-editor"],["excelexport","@progress/kendo-angular-excel-export"],["expansionpanel","@progress/kendo-angular-layout"],["filesaver","@progress/kendo-file-saver"],["fileselect","@progress/kendo-angular-upload"],["filter","@progress/kendo-angular-filter"],["flatcolorpicker","@progress/kendo-angular-inputs"],["floatingactionbutton","@progress/kendo-angular-buttons"],["floatinglabel","@progress/kendo-angular-label"],["formfield","@progress/kendo-angular-inputs"],["forms","@progress/kendo-angular-inputs"],["gantt","@progress/kendo-angular-gantt"],["grid","@progress/kendo-angular-grid"],["gridlayout","@progress/kendo-angular-layout"],["icon","@progress/kendo-angular-icons"],["inlineaiprompt","@progress/kendo-angular-conversational-ui"],["label","@progress/kendo-angular-label"],["lineargauge","@progress/kendo-angular-gauges"],["listbox","@progress/kendo-angular-listbox"],["listview","@progress/kendo-angular-listview"],["loader","@progress/kendo-angular-indicators"],["map","@progress/kendo-angular-map"],["maskedtextbox","@progress/kendo-angular-inputs"],["menu","@progress/kendo-angular-menu"],["multicolumncombobox","@progress/kendo-angular-dropdowns"],["multiselect","@progress/kendo-angular-dropdowns"],["multiselecttree","@progress/kendo-angular-dropdowns"],["multiviewcalendar","@progress/kendo-angular-dateinputs"],["notification","@progress/kendo-angular-notification"],["numerictextbox","@progress/kendo-angular-inputs"],["otpinput","@progress/kendo-angular-inputs"],["pager","@progress/kendo-angular-pager"],["panelbar","@progress/kendo-angular-layout"],["pdfexport","@progress/kendo-angular-pdf-export"],["pdfviewer","@progress/kendo-angular-pdfviewer"],["pivotgrid","@progress/kendo-angular-pivotgrid"],["popover","@progress/kendo-angular-tooltip"],["popup","@progress/kendo-angular-popup"],["progressbar","@progress/kendo-angular-progressbar"],["promptbox","@progress/kendo-angular-conversational-ui"],["qrcode","@progress/kendo-angular-barcodes"],["radialgauge","@progress/kendo-angular-gauges"],["radiobutton","@progress/kendo-angular-inputs"],["rangeslider","@progress/kendo-angular-inputs"],["rating","@progress/kendo-angular-inputs"],["ripple","@progress/kendo-angular-ripple"],["sankey","@progress/kendo-angular-charts"],["segmentedcontrol","@progress/kendo-angular-buttons"],["scheduler","@progress/kendo-angular-scheduler"],["scrollview","@progress/kendo-angular-scrollview"],["signature","@progress/kendo-angular-inputs"],["skeleton","@progress/kendo-angular-indicators"],["slider","@progress/kendo-angular-inputs"],["smartpastebutton","@progress/kendo-angular-buttons"],["sortable","@progress/kendo-angular-sortable"],["sparkline","@progress/kendo-angular-charts"],["speechtotextbutton","@progress/kendo-angular-buttons"],["splitbutton","@progress/kendo-angular-buttons"],["splitter","@progress/kendo-angular-layout"],["spreadsheet","@progress/kendo-angular-spreadsheet"],["stacklayout","@progress/kendo-angular-layout"],["stepper","@progress/kendo-angular-layout"],["stockchart","@progress/kendo-angular-charts"],["svgicon","@progress/kendo-angular-icons"],["switch","@progress/kendo-angular-inputs"],["tabstrip","@progress/kendo-angular-layout"],["textarea","@progress/kendo-angular-inputs"],["textbox","@progress/kendo-angular-inputs"],["tilelayout","@progress/kendo-angular-layout"],["timeline","@progress/kendo-angular-layout"],["timepicker","@progress/kendo-angular-dateinputs"],["toolbar","@progress/kendo-angular-toolbar"],["treelist","@progress/kendo-angular-treelist"],["treeview","@progress/kendo-angular-treeview"],["typography","@progress/kendo-angular-typography"],["upload","@progress/kendo-angular-upload"],["window","@progress/kendo-angular-dialog"],["charts","@progress/kendo-angular-charts"],["conversationalui","@progress/kendo-angular-conversational-ui"],["tooltip","@progress/kendo-angular-tooltip"]]);var Yt=zt(Vt(Ht(import.meta.url)),"../proto/service.proto"),W=new z(process.env.CONTEXTAPI_URL,Yt,{libName:U});var we=async()=>W.validateUserLicense();import yo from"fs";import Ut from"path";import{fileURLToPath as bo}from"url";import{z as b}from"zod";var I=class{constructor(t,o,n){this.name=t;this.config=o;this.cb=n}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 K=e=>{let t=[`1. \`${e.accessibilityAssistantName}\`: Call first with \`includeGeneralGuidelines=true\`; use \`false\` for component-specific follow-ups.`];if(e.includeLayout){let r=e.includeResponsive?"structure, responsive behavior, and UX policy":"structure and UX policy";t.push(`${t.length+1}. \`${e.layoutAssistantName}\`: Get Kendo Design System utilities for the requested ${r}. Use only those utilities for styling and layout.`)}if(e.includeTheming&&t.push(`${t.length+1}. \`${e.styleAssistantName}\`: Generate the requested Kendo theme variables.`),e.includeIcons&&t.push(`${t.length+1}. \`${e.iconAssistantName}\`: Find icons only for the required actions and states.`),e.includeComponentsDocs){let r=e.components?.length?e.components.join(", "):"each Kendo component selected for the implementation";t.push(`${t.length+1}. \`${e.codeAssistantName}\`: Call once per component (${r}) with a concise, feature-specific query before writing Kendo markup.`)}t.push(`${t.length+1}. After each assistant call, use the output to decide how to incorporate the guidance into the feature where applicable.`),t.push(`${t.length+1}. Implement the requested UI using ${e.suiteName} components and the gathered guidance.`),t.push(`${t.length+1}. Run \`npm run build\`, resolve failures, and repeat until it succeeds.`);let o=e.libKey==="angular"?"- Before editing, inspect the project for Standalone or NgModule setup, built-in or structural template syntax, and the existing Kendo theme import mechanism. Match those conventions; default to Standalone and built-in control flow for Angular 17+ only when no existing pattern is found.":"- Use React function components, Hooks, typed props where needed, stable list keys, and the project's existing KendoReact theme and package setup.",n=e.libKey==="angular"?`
|
|
6
6
|
- When drag-and-drop is required, consider the DragAndDrop and Sortable components.`:"";return`# ${e.suiteName} Execution Plan
|
|
7
7
|
|
|
8
8
|
<orchestrator-plan>
|
|
9
|
+
<workflow-id>${e.workflowId}</workflow-id>
|
|
9
10
|
<goal>${e.userIntent}</goal>
|
|
10
11
|
<execution-order>
|
|
11
12
|
${t.map(r=>` ${r}`).join(`
|
|
12
13
|
`)}
|
|
13
14
|
</execution-order>
|
|
14
15
|
<required-invariants>
|
|
16
|
+
- Pass \`workflowId="${e.workflowId}"\` unchanged to every assistant tool call in this plan.
|
|
15
17
|
- Accessibility guidance is retrieved before implementation; meet WCAG 2.2 Level AA.
|
|
16
18
|
- Do not generate code until the required tool calls above are complete and their guidance is incorporated.
|
|
19
|
+
- Generate code using tool guidance. Do not inspect \`node_modules\` unless the tools are insufficient and there is conflicting information or runtime errors.
|
|
17
20
|
- Use focused component queries; do not batch unrelated components.
|
|
18
21
|
- Build failures block completion and must be fixed before reporting success.
|
|
19
|
-
${
|
|
22
|
+
${o}${n}
|
|
20
23
|
</required-invariants>
|
|
21
24
|
<completion>
|
|
22
25
|
- \`npm run build\` succeeds without errors.
|
|
26
|
+
- Every assistant response is reviewed and relevant guidance is applied.
|
|
23
27
|
- Required Kendo component, accessibility, layout, and framework-specific requirements are implemented.
|
|
24
28
|
- Do not report completion while either condition is unresolved.
|
|
25
29
|
</completion>
|
|
26
|
-
</orchestrator-plan>`};var
|
|
30
|
+
</orchestrator-plan>`};var te=e=>{let t=e.components?.length?e.components.join(", "):"each Kendo component selected for the implementation",o=[`1. \`${e.codeAssistantName}\`: Call once per component (${t}) with a concise, feature-specific query before writing Kendo markup.`];return e.includeIcons&&o.push(`${o.length+1}. \`${e.iconAssistantName}\`: Find icons only for the required actions and states.`),o.push(`${o.length+1}. Implement using the gathered ${e.suiteName} documentation.`),o.push(`${o.length+1}. Run \`npm run build\`, resolve failures, and repeat until it succeeds.`),`# ${e.suiteName} Execution Plan
|
|
27
31
|
|
|
28
32
|
<assistant-plan>
|
|
33
|
+
<workflow-id>${e.workflowId}</workflow-id>
|
|
29
34
|
<goal>${e.userIntent}</goal>
|
|
30
35
|
<execution-order>
|
|
31
|
-
${
|
|
36
|
+
${o.map(n=>` ${n}`).join(`
|
|
32
37
|
`)}
|
|
33
38
|
</execution-order>
|
|
34
39
|
<required-invariants>
|
|
40
|
+
- Pass \`workflowId="${e.workflowId}"\` unchanged to every assistant tool call in this plan.
|
|
35
41
|
- Build failures block completion and must be fixed before reporting success.
|
|
36
42
|
- Use the selected components and gathered guidance rather than generic substitutions.
|
|
37
43
|
</required-invariants>
|
|
@@ -39,108 +45,65 @@ ${n.map(o=>` ${o}`).join(`
|
|
|
39
45
|
- \`npm run build\` succeeds without errors.
|
|
40
46
|
- Do not report completion while the build is failing.
|
|
41
47
|
</completion>
|
|
42
|
-
</assistant-plan>`};var
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
-
|
|
50
|
-
-
|
|
51
|
-
-
|
|
52
|
-
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
-
|
|
56
|
-
-
|
|
57
|
-
-
|
|
58
|
-
- Never
|
|
59
|
-
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
-
|
|
63
|
-
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
-
|
|
67
|
-
-
|
|
68
|
-
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
-
|
|
72
|
-
-
|
|
73
|
-
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
-
|
|
79
|
-
-
|
|
80
|
-
-
|
|
81
|
-
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
-
|
|
85
|
-
-
|
|
86
|
-
-
|
|
87
|
-
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
-
|
|
92
|
-
-
|
|
93
|
-
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
-
|
|
100
|
-
-
|
|
101
|
-
- **Avoid**: 3D charts, dual-axis charts (misleading), charts with > 7 series in the same view.
|
|
102
|
-
- Chart legend placement: below the chart.
|
|
103
|
-
|
|
104
|
-
### Dialog vs Window Decisions
|
|
105
|
-
- **Dialog (modal)**: use when the user must respond before continuing. Title should be action-oriented: "Delete this record?" not "Confirmation".
|
|
106
|
-
- **Window (non-modal)**: use when content can exist alongside the background (resizable/draggable panels, editors).
|
|
107
|
-
- Destructive dialog actions (delete, overwrite) must use the error theme color.
|
|
108
|
-
- Every dialog must be closable via Escape key and have a clearly labeled close control.
|
|
109
|
-
|
|
110
|
-
### Form Validation Display Rules
|
|
111
|
-
- Show field-level validation errors **after the first blur** (not on initial render, not on every keystroke).
|
|
112
|
-
- Display error text inline, directly below the field \u2014 never in a toast or far from the field.
|
|
113
|
-
- On form-level submit failure, focus the first invalid field automatically.
|
|
114
|
-
- Required fields: mark with an asterisk (*) and include a legend. Do not mark optional fields \u2014 label them "(optional)" only if most fields are required.
|
|
115
|
-
|
|
116
|
-
### Grid Data Volume & Scrolling Strategy
|
|
117
|
-
- Never render more than 200 rows without pagination or virtual scrolling.
|
|
118
|
-
- Use **pagination** when users need to navigate by page number, see total row count, or perform export/select-all operations.
|
|
119
|
-
- Use **virtual scrolling** when the dataset is very large (thousands of rows) and users scroll continuously rather than jumping to pages.
|
|
120
|
-
- Default page size: 25 rows. Offer page size options (10, 25, 50) as defaults unless the project specifies otherwise.
|
|
121
|
-
|
|
122
|
-
### Grid Feature Selection
|
|
123
|
-
Enable only the Grid features genuinely required for the workflow. Each enabled feature adds UI chrome, event listeners, and DOM nodes. Start with the minimum set and add only when user stories require it:
|
|
124
|
-
- \`sortable\` \u2014 when users need to find specific rows in non-obvious order
|
|
125
|
-
- \`filterable\` \u2014 for datasets > 50 rows with varied values; skip for small fixed lists
|
|
126
|
-
- \`groupable\` \u2014 only when hierarchical analysis is a core workflow
|
|
127
|
-
- \`reorderable\` / \`resizable\` \u2014 when user customization of the view is a stated requirement
|
|
128
|
-
- \`selectable\` \u2014 only when batch actions exist
|
|
129
|
-
- \`editable\` \u2014 only when inline data entry is the primary workflow, not for read-only display
|
|
130
|
-
|
|
131
|
-
### Form Layout Defaults
|
|
132
|
-
These are defaults \u2014 respect the project's existing form conventions if established:
|
|
133
|
-
- Prefer single-column form layout \u2014 easier to read and complete than multi-column.
|
|
134
|
-
- Use two-column layout only for tightly related field pairs (First Name / Last Name, Start Date / End Date).
|
|
135
|
-
- Align labels above their fields for complex forms; inline labels work only for very short forms (2\u20133 fields).
|
|
136
|
-
- Place the primary action (Save / Submit) at the bottom left; Cancel or secondary actions to its right.
|
|
137
|
-
|
|
138
|
-
### Whitespace Defaults
|
|
139
|
-
When no design token system is defined by the project, apply these minimum spacing values:
|
|
140
|
-
- Section separators: \u2265 24px vertical gap between distinct content areas.
|
|
141
|
-
- Card internal padding: 16\u201324px.
|
|
142
|
-
- Form field vertical gap: \u2265 16px between fields (24px for multi-column groups).
|
|
143
|
-
- Page left/right margin: 24\u201332px minimum, even at desktop widths.`;var Z=()=>`
|
|
48
|
+
</assistant-plan>`};var M=()=>`## UX/UI Design Best Practices
|
|
49
|
+
|
|
50
|
+
Follow the constraints and conventions unless the prompt or project defines a stronger convention. Accessibility and WCAG rules always override other guidance.
|
|
51
|
+
|
|
52
|
+
### Core Constraints
|
|
53
|
+
- Headings: use a strict hierarchy - h1 \u2192 h2 \u2192 h3; never skip levels
|
|
54
|
+
- Use at most 2 typefaces
|
|
55
|
+
- Body text line length: 60-80 characters maximum
|
|
56
|
+
- Contrast: body text \u2265 4.5:1 against its background
|
|
57
|
+
- Large text (\u2265 18pt / 14pt bold) and UI boundaries \u2265 3:1
|
|
58
|
+
- Use only semantic colors: primary, success, warning, error, info
|
|
59
|
+
- Never use color alone to convey status or meaning; pair it with text or an icon
|
|
60
|
+
- Pick one size per form or toolbar: \`"small"\` (24px, data-dense), \`"medium"\` (32px, default), or \`"large"\` (40px, comfortable)
|
|
61
|
+
- Animate transform and opacity, not reflow properties such as width, height, margin, or padding
|
|
62
|
+
- Never set \`outline: none\` globally
|
|
63
|
+
- Icon-only buttons require a visible tooltip and an \`aria-label\`
|
|
64
|
+
- Never show tooltips on disabled elements
|
|
65
|
+
- Do not use placeholder text as a label
|
|
66
|
+
- Button labels must use specific action verbs
|
|
67
|
+
- Error messages must be specific and actionable
|
|
68
|
+
- Grid headers use Title Case, not ALL CAPS
|
|
69
|
+
- Empty states must explain why they are empty and offer a next action
|
|
70
|
+
- Right-align numeric and currency grid columns
|
|
71
|
+
- Format dates for the locale; never show raw ISO 8601 strings
|
|
72
|
+
- Give every grid column an explicit width
|
|
73
|
+
- Dialogs must support Escape to close and include a clearly labeled close control
|
|
74
|
+
- Destructive dialog actions use the error theme color
|
|
75
|
+
- Show field validation after first blur, not on initial render or every keystroke
|
|
76
|
+
- Display field error text directly below the field
|
|
77
|
+
- Required fields use an asterisk (*) plus a legend. Mark optional fields only when most fields are required
|
|
78
|
+
- Do not render more than 200 grid rows without pagination or virtual scrolling
|
|
79
|
+
- Support \`prefers-reduced-motion: reduce\` \u2014 set transition durations to \u2264 0.01ms in that media query
|
|
80
|
+
|
|
81
|
+
### Default Conventions
|
|
82
|
+
- Breakpoints: Mobile < 640px | Tablet 640-1024px | Desktop 1024-1440px | Wide > 1440px
|
|
83
|
+
- Wide layouts: max width 1440px and centered
|
|
84
|
+
- On screens under 480px, grids switch to stacked or card layout
|
|
85
|
+
- Loading: Skeleton for content areas, overlay + ProgressBar for blocking operations, disabled button + inline spinner for async submission
|
|
86
|
+
- Error recovery: inline for form fields, toast/notification for API or system errors
|
|
87
|
+
- Virtual scrolling fits very large datasets where users scroll continuously rather than jump between pages
|
|
88
|
+
- Paging defaults: 25 rows with options 10, 25, 50
|
|
89
|
+
- Prefer single-column forms. Use two columns only for tightly related field pairs
|
|
90
|
+
- For complex forms, place labels above fields. Inline labels fit only very short forms
|
|
91
|
+
- Place the primary action at the bottom left and secondary actions to its right
|
|
92
|
+
- Minimum spacing when no token system exists: section gap between distinct content areas \u2265 24px, card padding 16-24px, form field gap \u2265 16px (24px in multi-column groups), page margins 24-32px
|
|
93
|
+
- Animations on micro-interactions (button press, tooltip): 150-250ms. Panel transitions (drawer, sidebar): 300-400ms
|
|
94
|
+
|
|
95
|
+
### Chart Selection
|
|
96
|
+
- Line or Area: continuous quantitative data over time (trends, rates)
|
|
97
|
+
- Bar (vertical): discrete time periods or ordered categories
|
|
98
|
+
- Bar (horizontal): comparing named categories (rankings, survey results)
|
|
99
|
+
- Donut (not Pie): part-to-whole proportions with \u2264 6 segments. Prefer Donut over Pie charts
|
|
100
|
+
|
|
101
|
+
### Avoid
|
|
102
|
+
- 3D charts, dual-axis charts, and charts with more than 7 series
|
|
103
|
+
|
|
104
|
+
### Dialog vs Window
|
|
105
|
+
- Dialog: blocking choice or confirmation; title should be action-oriented
|
|
106
|
+
- Window: non-modal content that can stay alongside the background(resizable/draggable panels, editors)`;var oe=()=>`
|
|
144
107
|
**REQUIRED ACTIONS \u2014 apply all fixes directly to the source files:**
|
|
145
108
|
- Search all .ts files for every outdated API mentioned in the codemod output \u2014 this includes renamed or removed properties, method names, and enum values.
|
|
146
109
|
- Search all .ts, .css, and .scss files for every outdated CSS class mentioned in the codemod output and update it with an appropriate replacement.
|
|
@@ -153,91 +116,75 @@ When no design token system is defined by the project, apply these minimum spaci
|
|
|
153
116
|
**OUTPUT REQUIREMENTS:**
|
|
154
117
|
- For each file you change, briefly describe what was wrong and what fix you applied
|
|
155
118
|
- If a problem requires a decision from the developer that you cannot make automatically, call it out explicitly with the file path
|
|
156
|
-
- If all automated changes look correct and no further fixes are needed, explicitly confirm this`;import{execFile as
|
|
119
|
+
- If all automated changes look correct and no further fixes are needed, explicitly confirm this`;import{execFile as Xt}from"child_process";import{access as Jt}from"fs/promises";import{promisify as Zt}from"util";import{randomUUID as ne}from"node:crypto";var xe="progress.com/kendo-ui-workflow-session-id";function Ae(e){return typeof e=="string"&&e.length>0&&e.length<200&&/^[\x20-\x7e]+$/.test(e)}var Ce=900*1e3;function Ie(){return{sessionId:ne(),expiresAt:Date.now()+Ce}}var H=Ie();function Qt(){return Date.now()>=H.expiresAt&&(H=Ie()),H}function Se(e){let t=e._meta?.[xe],n=t!==void 0&&!Ae(t);return Ae(t)?{sessionId:t,sessionSource:"semantic",explicitSessionIdRejected:!1}:{sessionId:Qt().sessionId,sessionSource:"fallback",explicitSessionIdRejected:n}}function Te(e,t){return{langfuseSessionId:e.sessionId,toolInvocationId:ne(),mcpToolName:t,workflowSessionSource:e.sessionSource,workflowSessionExplicitIdRejected:e.explicitSessionIdRejected}}function $(e,t,o){let n=o?{...e,_meta:{...e._meta,[xe]:o}}:e;return Te(Se(n),t)}function re(e,t){let o=Se(e),n=o.sessionSource==="semantic"?o:{sessionId:ne(),sessionSource:"fallback",explicitSessionIdRejected:o.explicitSessionIdRejected};return n.sessionSource==="fallback"&&(H={sessionId:n.sessionId,expiresAt:Date.now()+Ce}),{metadata:Te(n,t)}}var Re=Zt(Xt);function eo(e,t){let o;try{o=JSON.parse(e)}catch{return e}let n=o?.Item;if(!n)return e;let r=[],s=n.FullName??n.Name??"",a=n.Type??"",l=n.Summary??"",g=n.SyntaxContent??"";r.push(`## API Reference Item
|
|
157
120
|
- Name: ${s}
|
|
158
121
|
- Type: ${a}
|
|
159
|
-
- Summary: ${
|
|
160
|
-
- Syntax: ${
|
|
161
|
-
`,
|
|
122
|
+
- Summary: ${l}
|
|
123
|
+
- Syntax: ${g}`);let p=o.RelatedItemsByType?.return_type;if(p?.length){let i=p[0].Text;i&&r.push(`- Return Type: ${i}`)}let h=n.Examples??[];if(h.length>0){let i=`## Examples
|
|
124
|
+
`,c=0;for(let y of h){let f=(y.Component??"").toLowerCase(),d=t.toLowerCase();if(f&&f!==d&&f!=="general")continue;c+=1;let A=y.Code??"";i+=`### Example ${c}
|
|
162
125
|
\`\`\`
|
|
163
|
-
${
|
|
126
|
+
${A}
|
|
164
127
|
\`\`\`
|
|
165
|
-
`}
|
|
166
|
-
${
|
|
167
|
-
`+
|
|
128
|
+
`}c>0&&r.push(i)}let k=o.RelatedItemsByType??{},m=[];for(let[i,c]of Object.entries(k))if(!(i==="return_type"||i==="render_fragment"))for(let y of c??[]){let f=y.FullName??"",d=y.ShortText??"";m.push(`### ${f} (${i})
|
|
129
|
+
${d}`)}return m.length>0&&r.push(`## Additional Context
|
|
130
|
+
`+m.join(`
|
|
168
131
|
---
|
|
169
132
|
`)),r.join(`
|
|
170
133
|
|
|
171
|
-
`)}function
|
|
172
|
-
`)||"No CSS utilities found for the given prompt."
|
|
134
|
+
`)}function Ee(e,t){let{name:o,title:n,description:r,layoutAssistantName:s,codeAssistantName:a,styleAssistantName:l,iconAssistantName:g,accessibilityAssistantName:p,suiteName:h,libKey:k,components:m}=e,i=new I(o,{title:n,description:r,requiredAccess:e.requiredAccess,inputSchema:{userIntent:b.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:b.number().min(0).max(1).default(1).describe("Confidence (0-1) to include Component Documentation assistance. Default is 1."),needsLayoutConfidence:b.number().min(0).max(1).default(0).describe("Confidence (0-1) to include Layout assistance. Default is 0."),needsStylingConfidence:b.number().min(0).max(1).default(0).describe("Confidence (0-1) to include Theming/Styling assistance. Default is 0."),needsResponsiveBehaviorConfidence:b.number().min(0).max(1).default(0).describe("Confidence (0-1) to include Responsive Behavior assistance. Default is 0."),needsIconsConfidence:b.number().min(0).max(1).default(0).describe("Confidence (0-1) to include Icons assistance. Default is 0."),componentsNeeded:b.array(b.enum(m)).optional().describe(`Optional list of specific ${h} components needed for the project.`)}},async({userIntent:c,needsComponentsDocsConfidence:y,needsLayoutConfidence:f,needsStylingConfidence:d,needsResponsiveBehaviorConfidence:A,needsIconsConfidence:C,componentsNeeded:G},R)=>{let T=re(R,o),ie={...S(i,R._meta),...T.metadata};v("UI Orchestrator called with:",{userIntent:c,needsComponentsDocsConfidence:y,needsLayoutConfidence:f,needsStylingConfidence:d,needsResponsiveBehaviorConfidence:A,needsIconsConfidence:C});let N={componentsDocs:y>.3,layout:f>.5,theming:d>.6,responsive:f>.5&&A>.4,icons:C>.6};try{await t.recordOrchestratorUserRequest({meta:{...ie,userIntent:c,componentsNeeded:G,confidence:{componentsDocs:y,layout:f,styling:d,responsive:A,icons:C},routing:N}})}catch(_){if(!Le(_))throw O(_);v("Unable to record UI orchestrator trace metadata:",_)}let E=i.server?.server.getClientCapabilities?.()?.elicitation,j;if(E&&d>.3&&d<=.6){let _=await i.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&&(j=!0)}return{content:[{type:"text",text:K({name:o,workflowId:T.metadata.langfuseSessionId,userIntent:c,includeComponentsDocs:y>.3,includeTheming:d>.6||!!j,includeLayout:f>.5,includeIcons:C>.6,includeResponsive:f>.5&&A>.4,layoutAssistantName:s,codeAssistantName:a,styleAssistantName:l,iconAssistantName:g,accessibilityAssistantName:p,suiteName:h,libKey:k,components:G})}]}});return i}function Ue(e,t){let{name:o,title:n,description:r,iconAssistantName:s,codeAssistantName:a,suiteName:l,libKey:g,components:p}=e,h=new I(o,{title:n,description:r,inputSchema:{userIntent:b.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 ${l}.`),needsIconsConfidence:b.number().min(0).max(1).default(.7).describe("Confidence (0-1) to include Icons assistance. Default is 0.7."),componentsNeeded:b.array(b.enum(p)).optional().describe(`Optional list of specific ${l} components you want to learn about.`)},requiredAccess:e.requiredAccess},async({userIntent:k,needsIconsConfidence:m,componentsNeeded:i},c)=>{let y=re(c,o),f={...S(h,c._meta),...y.metadata};v("Assistant Orchestrator called with:",{userIntent:k,needsIconsConfidence:m,componentsNeeded:i});let d={componentsDocs:!0,icons:m>.5};try{await t.recordOrchestratorUserRequest({meta:{...f,userIntent:k,componentsNeeded:i,confidence:{icons:m},routing:d}})}catch(C){if(!Le(C))throw O(C);v("Unable to record assistant orchestrator trace metadata:",C)}return{content:[{type:"text",text:te({name:o,workflowId:y.metadata.langfuseSessionId,userIntent:k,includeComponentsDocs:!0,includeIcons:m>.5,codeAssistantName:a,iconAssistantName:s,suiteName:l,libKey:g,components:i})}]}});return h}function Pe(e,t){let{name:o,title:n,description:r,getPreContent:s}=e,a=new I(o,{title:n,description:r,requiredAccess:e.requiredAccess,inputSchema:{workflowId:b.string().optional().describe("Workflow ID returned by the UI orchestrator. Pass it unchanged to associate this call with that orchestrator."),prompt:b.string().describe("An enhanced prompt describing the HTML layout structure, design requirements or specific visual effects you want to achieve.")}},async({workflowId:l,prompt:g},p)=>{let h={...S(a,p._meta),...$(p,o,l)};v("Layout Assistant called with:",{prompt:g});try{let m=(await t.queryCssUtils({query:g},{...h})).values.join(`
|
|
135
|
+
`)||"No CSS utilities found for the given prompt.";return m=`${s?.()??""}
|
|
173
136
|
|
|
174
137
|
# Kendo Design System CSS Utilities
|
|
175
138
|
|
|
176
139
|
${m}
|
|
177
|
-
|
|
178
|
-
`;if(h)try{let f=await t.queryBuildingBlocks({query:u,lib_name:a},{...g}),x="";f.items?.length>0&&(x=`
|
|
179
|
-
## Building Blocks Examples
|
|
140
|
+
`,{content:[{type:"text",text:m}]}}catch(k){throw O(k)}});return a}function De(e,t){let{name:o,title:n,description:r,libKey:s,getPreContent:a}=e,l=new I(o,{title:n,description:r,requiredAccess:e.requiredAccess,inputSchema:{workflowId:b.string().optional().describe("Workflow ID returned by the UI orchestrator. Pass it unchanged to associate this call with that orchestrator."),prompt:b.string().describe("A natural language description of the desired visual style or theme. For example: 'Create a modern dark theme with high contrast'.")}},async({workflowId:g,prompt:p},h)=>{let k={...S(l,h._meta),...$(h,o,g)};v("Style Assistant called with:",{prompt:p});let m="";try{let y=await t.queryThemeGenerate({prompt:p},{...k});if(y.variables_json){let f=JSON.parse(y.variables_json),d=[];if(f)for(let A of Object.keys(f))typeof f[A]=="string"&&d.push(`${A}: ${f[A]}`);m=d.join(`
|
|
180
141
|
|
|
181
|
-
|
|
182
|
-
However, consider your own design requirements and specifics in order to implement your templates/building blocks correctly.
|
|
183
|
-
|
|
184
|
-
${f.items.map(S=>`
|
|
185
|
-
### ${S.name}
|
|
186
|
-
|
|
187
|
-
${S.description}
|
|
188
|
-
|
|
189
|
-
\`\`\`code
|
|
190
|
-
${S.code}
|
|
191
|
-
\`\`\`
|
|
192
|
-
`).join(`
|
|
193
|
-
`)}`),m=l(x)}catch(f){k("Error calling building-blocks service:",f),m=l()}else m=l();return{content:[{type:"text",text:m}]}}catch(p){throw G(p)}});return c}function ke(e,t){let{name:n,title:o,description:r,libKey:s,getPreContent:a}=e,i=new C(n,{title:o,description:r,requiredAccess:e.requiredAccess,inputSchema:{prompt:w.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:c},{_meta:u})=>{let h=I(i,u);k("Style Assistant called with:",{prompt:c});let v="";try{let m=await t.queryThemeGenerate({prompt:c},{...h});if(m.variables_json){let b=JSON.parse(m.variables_json),l=[];if(b)for(let f of Object.keys(b))typeof b[f]=="string"&&l.push(`${f}: ${b[f]}`);v=l.join(`
|
|
194
|
-
|
|
195
|
-
`)}}catch(m){throw G(m)}let g=a?.()??"";return{content:[{type:"text",text:v?`Use the following CSS variables to style the web application, including colors, typography, spacing, and component appearance.
|
|
142
|
+
`)}}catch(y){throw O(y)}let i=a?.()??"";return{content:[{type:"text",text:m?`Use the following CSS variables to style the web application, including colors, typography, spacing, and component appearance.
|
|
196
143
|
Ensure the variables are applied consistently across all relevant elements.
|
|
197
144
|
Do NOT set any inline styles. CSS variables should be defined in global or component-level CSS files, or via supported theming mechanisms.
|
|
198
145
|
|
|
199
|
-
${
|
|
146
|
+
${i}
|
|
200
147
|
|
|
201
148
|
## Generated CSS Variables
|
|
202
149
|
|
|
203
150
|
\`\`\`css
|
|
204
|
-
${
|
|
151
|
+
${m}
|
|
205
152
|
\`\`\`
|
|
206
|
-
`:"No CSS variables were generated for the given prompt."}]}});return
|
|
153
|
+
`:"No CSS variables were generated for the given prompt."}]}});return l}function Oe(e,t){let{name:o,title:n,description:r,libKey:s,getPostContent:a}=e,l=new I(o,{title:n,description:r,requiredAccess:e.requiredAccess,inputSchema:{workflowId:b.string().optional().describe("Workflow ID returned by the UI orchestrator. Pass it unchanged to associate this call with that orchestrator."),query:b.string().describe("A search query for finding icons. Be specific about the icon purpose, style, or action."),limit:b.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({workflowId:g,query:p,limit:h},k)=>{let m={...S(l,k._meta),...$(k,o,g)};v("Icon Search called with:",{query:p,limit:h});try{let i=await t.queryIconsSearch({query:p,limit:h*100},{...m}),c=a?.()??"";return{content:[{type:"text",text:`${i.values.join(`
|
|
207
154
|
|
|
208
155
|
`)}
|
|
209
156
|
|
|
210
|
-
${
|
|
157
|
+
${c}`}]}}catch(i){throw O(i)}});return l}function Ge(e,t){let{name:o,title:n,description:r,libKey:s,suiteName:a,components:l,componentAliases:g,getPostContent:p}=e,h=new I(o,{title:n,description:r,requiredAccess:e.requiredAccess,inputSchema:{workflowId:b.string().optional().describe("Workflow ID returned by the UI orchestrator. Pass it unchanged to associate this call with that orchestrator."),query:b.string().describe("The query to search for."),component:b.enum(l).describe("The component to search for. If not specified, use General.")}},async({workflowId:k,query:m,component:i},c)=>{let y={...S(h,c._meta),...$(c,o,k)};v("Code Assistant called with:",{query:m,component:i});let f=i;if(g){let d=g[i];d&&(f=d)}try{let A=(await t.query({query:m,component:f?.toLowerCase()??"general",lib_name:s,text_matches_count:3,code_matches_count:0,allowed_types:["documentation"]},{...y})).values.map(R=>R.replace(/\0/g,"")),C=p?.({component:i})??"";return{content:[{type:"text",text:`${A.join(`
|
|
211
158
|
|
|
212
159
|
`)}
|
|
213
160
|
|
|
214
|
-
${
|
|
161
|
+
${C}`}]}}catch(d){throw O(d)}});return h}function _e(e,t){let{name:o,title:n,description:r,libKey:s,suiteName:a,components:l,componentAliases:g}=e,p=new I(o,{title:n,description:r,requiredAccess:e.requiredAccess,inputSchema:{workflowId:b.string().optional().describe("Workflow ID returned by the UI orchestrator. Pass it unchanged to associate this call with that orchestrator."),query:b.string().describe("The query to search for."),component:b.enum(l).describe("The component to search for. If not specified, use General."),includeGeneralGuidelines:b.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({workflowId:h,query:k,component:m,includeGeneralGuidelines:i},c)=>{let y={...S(p,c._meta),...$(c,o,h)};v("Accessibility Assistant called with:",{query:k,component:m,includeGeneralGuidelines:i});let f=m;if(g){let d=g[m];d&&(f=d)}try{let d="";if(i){let T=ye();d+=`# WCAG 2.2 Level AA General Accessibility Guidelines
|
|
215
162
|
|
|
216
|
-
`,
|
|
163
|
+
`,d+=T,d+=`
|
|
217
164
|
|
|
218
165
|
---
|
|
219
166
|
|
|
220
|
-
`}let
|
|
167
|
+
`}let R=(await t.getApiRefMatches({query:k,component:f?.toLowerCase()??"general",lib_name:s,filters_json:'{"type":{"$in":["accessibility"]}}'},{...y})).values.map(T=>T.replace(/\0/g,"")).map(T=>eo(T,f?.toLowerCase()??"general")).join(`
|
|
221
168
|
|
|
222
|
-
`);return
|
|
169
|
+
`);return R?(i&&(d+=`# Component-Specific Accessibility Information
|
|
223
170
|
|
|
224
|
-
`),
|
|
171
|
+
`),d+=R):i||(d="No component-specific accessibility guidelines found."),{content:[{type:"text",text:d}]}}catch(d){throw O(d)}});return p}function Le(e){let t=e?.code;return typeof t=="number"&&t!==16&&t!==7&&t!==8}function O(e){let t=e;return t.code===16?new Error("Error: You are not authenticated. Please verify the Telerik License Key provided is valid."):t.code===8?new Error(`Error: You have exceeded the extension quota. Upgrade to subscription licensing to unlock full access. Message: ${t.message}.`):t.code===7?new Error("Error: You do not have permission to access this resource. Please verify that you have a valid license."):new Error(`Error: An error occurred while calling the service. Please try again later.
|
|
225
172
|
|
|
226
|
-
Error Code: ${t.code} Error Message: ${t.message}`)}var
|
|
173
|
+
Error Code: ${t.code} Error Message: ${t.message}`)}var to=20*1024*1024,Me=1200*1e3;function Ne(e){return{content:[{type:"text",text:`Upgrade timed out after ${Me/6e4} minutes.
|
|
227
174
|
|
|
228
175
|
**Some codemods may have already been applied to your files.** Review any modified files before proceeding.
|
|
229
176
|
|
|
230
177
|
To complete the upgrade, run this tool again with specific package names via the \`packageNames\` parameter to upgrade one package at a time.${e?`
|
|
231
178
|
|
|
232
179
|
## Partial output before timeout
|
|
233
|
-
`+e:""}`}]}}function
|
|
180
|
+
`+e:""}`}]}}function $e(e,t){let{name:o,title:n,description:r,suiteName:s,packagePrefix:a}=e,l=new I(o,{title:n,description:r,requiredAccess:e.requiredAccess,inputSchema:{workingDirectory:b.string().describe('The absolute path to the project directory where the upgrade should be executed (e.g., "/Users/username/my-app")'),packageNames:b.array(b.string()).optional().describe(`The package names to target for codemod upgrade (e.g., ["${a}grid", "${a}buttons"]). Defaults to upgrading all installed @progress packages if not specified. When specified, skips package installation and only runs codemods \u2014 the packages must already be installed at the target version before calling this tool.`),skipInstall:b.boolean().optional().describe("Skip npm package installation and only run codemods. Use this when package installation has already been done manually.")}},async({workingDirectory:g,packageNames:p,skipInstall:h},{_meta:k})=>{let m=S(l,k);try{await t.recordToolUserRequest({toolName:o,meta:m})}catch(i){console.error("Error recording tool request:",i)}try{try{await Jt(g)}catch{return{content:[{type:"text",text:`The working directory does not exist: "${g}". Please provide a valid absolute path to your project.`}]}}let i=!1;try{await Re("npx",["--no","--","kendo","--version"],{cwd:g}),i=!0}catch{i=!1}let c=[],y=async(N,le=!1)=>{try{let E=!le&&i?["--no","--","kendo",...N]:["-y","@progress/kendo-cli",...N],{stdout:j,stderr:ce}=await Re("npx",E,{cwd:g,maxBuffer:to,timeout:Me});return{timedOut:!1,stdout:j,stderr:ce}}catch(E){return E.killed?{timedOut:!0,partialOutput:E.stdout?.trim()}:{timedOut:!1,stdout:E.stdout||"",stderr:E.stderr||E.message}}},f=["migrate",...p??[],"--codemods","--force","--ai-mode"];(h||p?.length)&&f.push("--no-install");let d=await y(f);if(d.timedOut)return Ne(d.partialOutput);let A=d.stdout,C=d.stderr;if(C?.includes("Unknown argument")){let N=await y(f,!0);if(N.timedOut)return Ne(N.partialOutput);A=N.stdout,C=N.stderr}C?.trim()&&c.push(`
|
|
234
181
|
Errors:
|
|
235
|
-
${
|
|
182
|
+
${C}`),A?.trim()&&c.push(A.trim());let G=A.includes("Packages installed successfully."),R=A.includes("Package installation failed:"),T=A.includes("Running codemod:");return R?c.push(`
|
|
236
183
|
## Upgrade Status
|
|
237
|
-
Package installation failed. The npm packages were not updated. Inform the user of the error and update the package versions in package.json manually to the target version. Once done, call this tool again with skipInstall set to true.`):
|
|
184
|
+
Package installation failed. The npm packages were not updated. Inform the user of the error and update the package versions in package.json manually to the target version. Once done, call this tool again with skipInstall set to true.`):G&&c.push(`
|
|
238
185
|
## Upgrade Status
|
|
239
|
-
Upgrade complete. npm packages have been installed and updated in the project.`),
|
|
240
|
-
`)}]}}catch(
|
|
186
|
+
Upgrade complete. npm packages have been installed and updated in the project.`),T&&c.push(oe()),{content:[{type:"text",text:c.join(`
|
|
187
|
+
`)}]}}catch(i){return{content:[{type:"text",text:`Error: ${i.message||i.toString()}`}]}}});return l}var Be=e=>`${e}_ui_generator`,qe=e=>`${e}_assistant`,Fe=e=>`${e}_layout_assistant`,We=e=>`${e}_component_assistant`,Ke=e=>`${e}_style_assistant`,je=e=>`${e}_icon_assistant`,Ve=e=>`${e}_accessibility_assistant`,ze=e=>`${e}_getting_started_assistant`,He=e=>`${e}_upgrade_assistant`;var Ye=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.
|
|
241
188
|
|
|
242
189
|
Use the tool when:
|
|
243
190
|
- Want to build or modify a complete page or section layout
|
|
@@ -246,7 +193,7 @@ Upgrade complete. npm packages have been installed and updated in the project.`)
|
|
|
246
193
|
- You want to enforce best practices in styling, performance, and accessibility
|
|
247
194
|
|
|
248
195
|
Returns:
|
|
249
|
-
A detailed execution plan with validated tool calls, parameters, and reasoning \u2014 ensuring consistent, high-quality UI generation.`,
|
|
196
|
+
A detailed execution plan with validated tool calls, parameters, and reasoning \u2014 ensuring consistent, high-quality UI generation.`,Qe=e=>`Provides guidance for discovering and using ${e} components and icons. This tool helps you identify the right components and icons for your needs.
|
|
250
197
|
|
|
251
198
|
Use this tool when:
|
|
252
199
|
- You need to discover which ${e} components are suitable for a specific use case
|
|
@@ -255,20 +202,20 @@ Use this tool when:
|
|
|
255
202
|
- You want to gather component documentation and examples
|
|
256
203
|
|
|
257
204
|
Returns:
|
|
258
|
-
A focused plan for gathering component documentation and icon suggestions using the Component Assistant and Icon Assistant tools.`,
|
|
205
|
+
A focused plan for gathering component documentation and icon suggestions using the Component Assistant and Icon Assistant tools.`,Xe=`Retrieves Progress/Kendo Design System CSS utility classes and styling recommendations based on layout and design requirements.
|
|
259
206
|
Use this tool to find the right CSS utilities for styling Kendo UI components or general web elements.
|
|
260
207
|
It analyzes the provided design context and returns relevant utility classes with explanations and examples.
|
|
261
|
-
Best suited for styling questions related to typography, spacing, colors, layout, transforms, and other utilities in the Progress/Kendo Design System.`,
|
|
208
|
+
Best suited for styling questions related to typography, spacing, colors, layout, transforms, and other utilities in the Progress/Kendo Design System.`,Je=`Generates CSS variables using an external style agent based on the user's styling prompt.
|
|
262
209
|
|
|
263
210
|
Use this tool when the user wants to:
|
|
264
211
|
- Update the visual theme of an application
|
|
265
212
|
- Modify color schemes
|
|
266
213
|
- Restyle the UI with CSS variables
|
|
267
214
|
|
|
268
|
-
The tool outputs a set of CSS variable definitions ready to be applied to style files.`,
|
|
215
|
+
The tool outputs a set of CSS variable definitions ready to be applied to style files.`,Ze=`Searches for icons in the Telerik Icons library.
|
|
269
216
|
Use this tool when the user needs to find specific icons for UI components or design elements.
|
|
270
217
|
It supports searching by icon name, category, or keyword and returns matching icons from the Telerik Icons library.
|
|
271
|
-
`,
|
|
218
|
+
`,et=e=>`Provides answers and retrieves official documentation for ${e}.
|
|
272
219
|
|
|
273
220
|
Use this tool when the user asks about:
|
|
274
221
|
- ${e} features or capabilities
|
|
@@ -278,7 +225,7 @@ Use this tool when the user asks about:
|
|
|
278
225
|
|
|
279
226
|
Set the user's full question as the 'query' parameter.
|
|
280
227
|
If the question refers to a specific ${e} component, include its name in the 'component' parameter.
|
|
281
|
-
|
|
228
|
+
`,tt=e=>`Retrieves accessibility guidance for ${e} components with optional general WCAG 2.2 Level AA guidelines.
|
|
282
229
|
|
|
283
230
|
Use this tool when:
|
|
284
231
|
- You need component-specific accessibility information and API references
|
|
@@ -296,7 +243,7 @@ Set 'includeGeneralGuidelines=true' ONLY on the first call to include general WC
|
|
|
296
243
|
Returns:
|
|
297
244
|
- When includeGeneralGuidelines=true: General WCAG 2.2 Level AA guidelines + component-specific recommendations
|
|
298
245
|
- When includeGeneralGuidelines=false: Only component-specific accessibility recommendations
|
|
299
|
-
`,
|
|
246
|
+
`,ot=(e,t)=>`Runs codemods to upgrade ${e} code from one version directly to another using @progress/kendo-cli.
|
|
300
247
|
|
|
301
248
|
To upgrade to the latest version, call this tool directly. It handles installation automatically.
|
|
302
249
|
|
|
@@ -321,111 +268,34 @@ Workflow:
|
|
|
321
268
|
1. Run this upgrade tool to apply codemods.
|
|
322
269
|
2. After the codemods complete, grep the project source files for every outdated value mentioned in the codemod output (e.g. old property names, renamed enum values) to find any remaining occurrences the codemod doesn't handle automatically, and fix them all.
|
|
323
270
|
3. Follow the additional instructions to complete the upgrade process.
|
|
324
|
-
`;var
|
|
271
|
+
`;var oo={createOrchestrator:Ee,createAssistantOrchestrator:Ue,createLayoutAssistant:Pe,createStyleAssistant:De,createIconSearch:Oe,createCodeAssistant:Ge,createAccessibilityAssistant:_e,createUpgrade:$e},no={orchestrator:Be,assistantOrchestrator:qe,layoutAssistant:Fe,codeAssistant:We,styleAssistant:Ke,iconAssistant:je,accessibilityAssistant:Ve,gettingStartedAssistant:ze,upgradeAssistant:He},ro={orchestrator:Ye,assistantOrchestrator:Qe,layoutAssistant:Xe,styleAssistant:Je,iconAssistant:Ze,codeAssistant:et,accessibilityAssistant:tt,upgradeAssistant:ot},so={Orchestrator:{render:K},UX:{getInstructions:M}},w={Tools:oo,ToolNames:no,ToolDescriptions:ro,Templates:so};var nt=()=>`# Kendo Design System Guidelines for ${u}
|
|
325
272
|
|
|
326
273
|
## Setting up Styles/CSS
|
|
327
|
-
|
|
328
|
-
|
|
329
|
-
|
|
330
|
-
**Important**: Include the kendo-theme-utils only once and use the same import mechanism as the existing Kendo theme.
|
|
331
|
-
|
|
332
|
-
### Using NPM
|
|
333
|
-
|
|
334
|
-
The CSS Utilities are available as an NPM module that you can install - \`@progress/kendo-theme-utils\`
|
|
335
|
-
|
|
274
|
+
Include a reference to the kendo-theme-utils CSS package and use the same import mechanism as the existing Kendo theme.
|
|
275
|
+
Add \`@progress/kendo-theme-utils/dist/all.css\` to \`angular.json\` styles, or use the existing global stylesheet import path already used by the app.
|
|
336
276
|
To install: \`npm install --save @progress/kendo-theme-utils\`
|
|
277
|
+
Also available as SCSS - \`@use '@progress/kendo-theme-utils/scss/all.scss' as *;\`
|
|
278
|
+
Alternatively, use CDN: \`<link rel="stylesheet" href="https://unpkg.com/@progress/kendo-theme-utils/dist/all.css" />\`
|
|
337
279
|
|
|
338
|
-
|
|
339
|
-
|
|
340
|
-
|
|
341
|
-
|
|
342
|
-
|
|
343
|
-
|
|
344
|
-
Alternatively, you can also consume them directly from the Unpkg CDN.
|
|
345
|
-
|
|
346
|
-
\`<link rel="stylesheet" href="https://unpkg.com/@progress/kendo-theme-utils/dist/all.css" />\`
|
|
347
|
-
|
|
348
|
-
## Ready-to-use Layout Components
|
|
349
|
-
|
|
350
|
-
In the ${d} there are available components to create layout. Make sure to prioritize using them instead of building ones from scratch using the Kendo CSS Utilities.
|
|
351
|
-
|
|
352
|
-
For any Layout component you can also call the ${jt} tool in order to get specific API reference and docs.
|
|
353
|
-
|
|
354
|
-
- ${d} Card component.
|
|
355
|
-
- Generally, it is recommended to use 100% width (e.g., \`<kendo-card width="100%">\`)
|
|
356
|
-
- If needed, use specific width based on the layout requirements (e.g., \`<kendo-card width="150px">\`)
|
|
357
|
-
- Avoid applying additional styling properties such as \`display\`, \`flex\`, \`grid\`, or other layout-specific CSS to layout components such as GridLayout, Splitter, StackLayout and TileLayout. Use the component's built-in parameters and the Kendo CSS utility classes instead.
|
|
358
|
-
|
|
359
|
-
## Page Shell Patterns
|
|
360
|
-
|
|
361
|
-
Choose the pattern that matches the page structure:
|
|
362
|
-
|
|
363
|
-
**Pattern A \u2014 Sidebar + Main Content**
|
|
364
|
-
\`\`\`css
|
|
365
|
-
.app-shell {
|
|
366
|
-
display: flex;
|
|
367
|
-
height: 100vh;
|
|
368
|
-
}
|
|
369
|
-
.sidebar {
|
|
370
|
-
width: 240px;
|
|
371
|
-
flex-shrink: 0;
|
|
372
|
-
}
|
|
373
|
-
.main-content {
|
|
374
|
-
flex: 1;
|
|
375
|
-
min-width: 0; /* Critical: prevents flex children from overflowing */
|
|
376
|
-
overflow: auto;
|
|
377
|
-
}
|
|
378
|
-
\`\`\`
|
|
379
|
-
|
|
380
|
-
**Pattern B \u2014 Centered Single-Column (forms, detail pages)**
|
|
381
|
-
\`\`\`css
|
|
382
|
-
.page-container {
|
|
383
|
-
max-width: 960px;
|
|
384
|
-
margin: 0 auto;
|
|
385
|
-
padding: 0 1rem;
|
|
386
|
-
}
|
|
387
|
-
\`\`\`
|
|
388
|
-
|
|
389
|
-
**Pattern C \u2014 Master-Detail Split**
|
|
390
|
-
\`\`\`css
|
|
391
|
-
.split-container {
|
|
392
|
-
display: grid;
|
|
393
|
-
grid-template-columns: 420px 1fr;
|
|
394
|
-
height: 100%;
|
|
395
|
-
}
|
|
396
|
-
\`\`\`
|
|
397
|
-
|
|
398
|
-
## Dashboard Layout
|
|
399
|
-
|
|
400
|
-
**KPI metric row** (auto-responsive, min 180px per card):
|
|
401
|
-
\`\`\`css
|
|
402
|
-
.kpi-row {
|
|
403
|
-
display: grid;
|
|
404
|
-
grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
|
|
405
|
-
gap: 1rem;
|
|
406
|
-
}
|
|
407
|
-
\`\`\`
|
|
408
|
-
|
|
409
|
-
**Side-by-side charts** (equal width, no overflow):
|
|
410
|
-
\`\`\`css
|
|
411
|
-
.chart-row {
|
|
412
|
-
display: grid;
|
|
413
|
-
grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
|
|
414
|
-
gap: 1rem;
|
|
415
|
-
}
|
|
416
|
-
\`\`\`
|
|
280
|
+
### Default Behavior
|
|
281
|
+
- Use the Kendo Design System utilities for layout.
|
|
282
|
+
- Use theme utility classes instead of custom CSS whenever a utility exists. Write custom CSS only for properties without a utility equivalent.
|
|
283
|
+
- Do not use \`::ng-deep\` or \`/deep/\` overrides for Kendo internals when a utility or component configuration can express the rule.
|
|
284
|
+
- Prioritize using ${u} components instead of building ones from scratch.
|
|
417
285
|
|
|
418
|
-
|
|
286
|
+
- ${u} Card component.
|
|
287
|
+
- Generally use 100% width (e.g., \`<kendo-card width="100%">\`)
|
|
288
|
+
- Or set width based on the layout requirements (e.g., \`<kendo-card width="150px">\`)
|
|
419
289
|
|
|
420
|
-
- **\`min-width: 0\`** on every flex/grid child that contains a Kendo component
|
|
421
|
-
-
|
|
422
|
-
-
|
|
423
|
-
-
|
|
424
|
-
-
|
|
290
|
+
- **\`min-width: 0\`** on every flex/grid child that contains a Kendo component.
|
|
291
|
+
- Grid and Chart require an explicit height.
|
|
292
|
+
- Grid columns require an explicit width.
|
|
293
|
+
- Custom cards and containers must use \`var(--kendo-component-bg)\` for their background.
|
|
294
|
+
- Dropdowns, DateInputs, Inputs are \`display: inline-block\` by default. Apply \`style="width: 100%"\` or wrap in a layout container to ensure consistent sizing in forms.
|
|
295
|
+
- Avoid \`transform\` on layout ancestors that contain Kendo overlay components.
|
|
296
|
+
- By default constrain page content to \`max-width: 1440px\` with \`margin: 0 auto\` to prevent unbounded wide-screen stretching.
|
|
425
297
|
|
|
426
|
-
|
|
427
|
-
|
|
428
|
-
Kendo themes style \`.k-*\` component selectors only. Always add these two lines to \`styles.scss\` or the global CSS file after any theme import:
|
|
298
|
+
Always add to \`styles.scss\` or the global CSS file:
|
|
429
299
|
|
|
430
300
|
\`\`\`scss
|
|
431
301
|
html, body {
|
|
@@ -434,30 +304,14 @@ html, body {
|
|
|
434
304
|
}
|
|
435
305
|
\`\`\`
|
|
436
306
|
|
|
437
|
-
Without this, dark-themed components render on a white page.
|
|
438
|
-
|
|
439
307
|
## Surface Hierarchy
|
|
440
308
|
|
|
441
|
-
|
|
442
|
-
1.
|
|
443
|
-
2.
|
|
444
|
-
3.
|
|
445
|
-
4.
|
|
446
|
-
|
|
447
|
-
Custom cards and containers must use \`var(--kendo-component-bg)\` for their background \u2014 never \`#fff\` or other hardcoded values. Hardcoded light colors in custom templates (Grid cell templates, custom component content) break dark mode.
|
|
448
|
-
|
|
449
|
-
## Splitter Usage Boundary
|
|
450
|
-
|
|
451
|
-
Use the \`kendo-splitter\` component only for **user-resizable** content areas (e.g., master-detail panels, side-by-side editors). Do **not** use it for static page layout \u2014 CSS Grid and Flexbox handle that with zero JavaScript overhead.
|
|
452
|
-
|
|
453
|
-
## Inline Input Width
|
|
454
|
-
|
|
455
|
-
\`kendo-dropdownlist\`, \`kendo-datepicker\`, \`kendo-textbox\`, and similar inline inputs are \`display: inline-block\` by default and will **not** fill their container automatically. Apply \`style="width: 100%"\` or wrap in a layout container to ensure consistent sizing in forms.
|
|
456
|
-
|
|
457
|
-
## Popup Z-Index Trap
|
|
458
|
-
|
|
459
|
-
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.
|
|
460
|
-
`;var Ke=()=>`## Design Standards for ${d} Theming
|
|
309
|
+
Use only the four surface levels defined by the Kendo themes
|
|
310
|
+
1. Page background (\`var(--kendo-body-bg)\`) \u2014 applied to \`html, body\`
|
|
311
|
+
2. Component background (\`var(--kendo-component-bg)\`) \u2014 cards, panels, Grid body
|
|
312
|
+
3. Header / hover surface (\`var(--kendo-grid-header-bg)\`) \u2014 Grid headers, highlighted rows
|
|
313
|
+
4. Active / selected surface \u2014 managed by the theme automatically
|
|
314
|
+
`;var rt=()=>`## Design Standards for ${u} Theming
|
|
461
315
|
|
|
462
316
|
### Color & Contrast Requirements
|
|
463
317
|
- Body text contrast: \u2265 4.5:1. Large text / UI component borders: \u2265 3:1.
|
|
@@ -495,7 +349,7 @@ This is the most common source of dark mode breakage in custom UI.
|
|
|
495
349
|
|
|
496
350
|
---
|
|
497
351
|
|
|
498
|
-
## Applying CSS Variables in ${
|
|
352
|
+
## Applying CSS Variables in ${u}
|
|
499
353
|
|
|
500
354
|
Apply these CSS variables in the Angular application using one of these methods:
|
|
501
355
|
|
|
@@ -557,7 +411,16 @@ export class ThemeService {
|
|
|
557
411
|
}
|
|
558
412
|
}
|
|
559
413
|
\`\`\`
|
|
560
|
-
`;var
|
|
414
|
+
`;var st=w.ToolNames.codeAssistant("kendo"),at=()=>`### SVG Icon Export Names
|
|
415
|
+
|
|
416
|
+
For an icon listed above, map its listed value to the SVG export from \`@progress/kendo-svg-icons\` as follows:
|
|
417
|
+
1. Append \`-icon\` to the listed value.
|
|
418
|
+
2. Convert the result from kebab case to camel case.
|
|
419
|
+
|
|
420
|
+
### Font Icon Class Names
|
|
421
|
+
Prepend \`k-i-\` to the listed value to form the font icon CSS class name. Keep the value in kebab case.
|
|
422
|
+
|
|
423
|
+
## Using ${u} Icons
|
|
561
424
|
|
|
562
425
|
Important: Always prefer SVG icons over font icons. Only fall back to font icons if SVG is explicitly not an option.
|
|
563
426
|
|
|
@@ -565,13 +428,13 @@ Important: Always prefer SVG icons over font icons. Only fall back to font icons
|
|
|
565
428
|
|
|
566
429
|
- Make sure @progress/kendo-svg-icons is installed.
|
|
567
430
|
- Make sure @progress/kendo-angular-icons is installed.
|
|
568
|
-
- You can call ${
|
|
431
|
+
- You can call ${st} tool for ${u} SVGIcon component for docs and API reference.
|
|
569
432
|
- [optional] If SVG is not an option fallback to font icon - make sure \`<link rel="stylesheet" href="https://unpkg.com/@progress/kendo-font-icons/dist/index.css" />\` is added as a reference.
|
|
570
|
-
- [optional] If using font icons you can call ${
|
|
433
|
+
- [optional] If using font icons you can call ${st} tool for ${u} Icon component for docs and API reference.
|
|
571
434
|
|
|
572
435
|
### Examples
|
|
573
436
|
|
|
574
|
-
Using ${
|
|
437
|
+
Using ${u} SVGIcon component:
|
|
575
438
|
|
|
576
439
|
\`\`\`ts
|
|
577
440
|
import { Component } from "@angular/core";
|
|
@@ -592,7 +455,7 @@ export class AppComponent {
|
|
|
592
455
|
|
|
593
456
|
\`\`\`
|
|
594
457
|
|
|
595
|
-
Using ${
|
|
458
|
+
Using ${u} Icon component:
|
|
596
459
|
|
|
597
460
|
\`\`\`ts
|
|
598
461
|
import { Component } from "@angular/core";
|
|
@@ -608,16 +471,16 @@ import { KENDO_ICONS } from "@progress/kendo-angular-icons";
|
|
|
608
471
|
})
|
|
609
472
|
export class AppComponent {}
|
|
610
473
|
\`\`\`
|
|
611
|
-
`;var
|
|
474
|
+
`;var it=e=>{let t=e.component?.trim().toLowerCase(),o=ve.get(t),n=`## ${u} Implementation Rules
|
|
612
475
|
|
|
613
476
|
- Follow the project's existing Angular setup, including Standalone or NgModule conventions.
|
|
614
|
-
`;return
|
|
615
|
-
- Before using ${e.component}, confirm that \`${
|
|
616
|
-
`),e.componentInstructions&&(
|
|
477
|
+
`;return o&&(n+=`
|
|
478
|
+
- Before using ${e.component}, confirm that \`${o}\` is already declared in the project. Install it only when missing, using the project's approved dependency workflow; do not reinstall existing dependencies.
|
|
479
|
+
`),e.componentInstructions&&(n+=`
|
|
617
480
|
## Component-Specific Guidelines
|
|
618
481
|
|
|
619
482
|
${e.componentInstructions}
|
|
620
|
-
`),
|
|
483
|
+
`),n};function lt(e="kendo-angular-app",t=!0,o="meridian"){let n=t?`These instructions will walk you through creating a new Angular project and setting up ${u}.`:`These instructions will walk you through adding ${u} to your existing Angular project.`,r=1,s=t?`## Step ${r++}: Install Angular CLI
|
|
621
484
|
|
|
622
485
|
First, ensure the Angular CLI is installed globally:
|
|
623
486
|
|
|
@@ -639,9 +502,9 @@ Navigate to the project directory:
|
|
|
639
502
|
cd ${e}
|
|
640
503
|
\`\`\`
|
|
641
504
|
|
|
642
|
-
`:"";return`# Getting Started with ${
|
|
505
|
+
`:"";return`# Getting Started with ${u}
|
|
643
506
|
|
|
644
|
-
${
|
|
507
|
+
${n}
|
|
645
508
|
|
|
646
509
|
Execute the following steps in order.
|
|
647
510
|
|
|
@@ -656,7 +519,7 @@ Before you begin, ensure you have:
|
|
|
656
519
|
|
|
657
520
|
${s}## Step ${r++}: Configure animations
|
|
658
521
|
|
|
659
|
-
This ensures animations that ${
|
|
522
|
+
This ensures animations that ${u} components rely on are configurated correctly.
|
|
660
523
|
|
|
661
524
|
1. Open the \`src/app/app.config.ts\` file and add animations like this.
|
|
662
525
|
\`\`\`typescript
|
|
@@ -672,15 +535,15 @@ export const appConfig: ApplicationConfig = {
|
|
|
672
535
|
};
|
|
673
536
|
\`\`\`
|
|
674
537
|
|
|
675
|
-
## Step ${r++}: Install ${
|
|
538
|
+
## Step ${r++}: Install ${u} Packages
|
|
676
539
|
|
|
677
540
|
Use angular CLI to install grid package. While installing, confirm that you also want to install the underlying npm package with the suggested version from the ng tool.
|
|
678
541
|
|
|
679
542
|
\`\`\`bash
|
|
680
|
-
ng add @progress/kendo-angular-grid@latest --skip-confirmation --theme=${
|
|
543
|
+
ng add @progress/kendo-angular-grid@latest --skip-confirmation --theme=${o}
|
|
681
544
|
\`\`\`
|
|
682
545
|
|
|
683
|
-
Use npm to install additional required ${
|
|
546
|
+
Use npm to install additional required ${u} packages:
|
|
684
547
|
|
|
685
548
|
\`\`\`bash
|
|
686
549
|
npm install @progress/kendo-angular-barcodes @progress/kendo-angular-chart-wizard @progress/kendo-angular-charts @progress/kendo-angular-dateinputs @progress/kendo-angular-diagrams @progress/kendo-angular-editor @progress/kendo-angular-filter @progress/kendo-angular-gantt @progress/kendo-angular-gauges @progress/kendo-angular-icons @progress/kendo-angular-listbox @progress/kendo-angular-listview @progress/kendo-angular-map @progress/kendo-angular-pdfviewer @progress/kendo-angular-pivotgrid @progress/kendo-angular-ripple @progress/kendo-angular-scheduler @progress/kendo-angular-scrollview @progress/kendo-angular-sortable @progress/kendo-angular-spreadsheet @progress/kendo-angular-tooltip @progress/kendo-angular-treelist @progress/kendo-angular-typography @progress/kendo-file-saver
|
|
@@ -709,7 +572,7 @@ Add the following script to index.html to include the Kendo theme utils, which a
|
|
|
709
572
|
<link rel="stylesheet" href="https://unpkg.com/@progress/kendo-theme-utils/dist/all.css" />
|
|
710
573
|
\`\`\`
|
|
711
574
|
|
|
712
|
-
${t?`The application should start and open your browser to see your ${
|
|
575
|
+
${t?`The application should start and open your browser to see your ${u} application.`:`The application should start and open in your browser. Verify that the ${u} components are rendering correctly with the theme applied.`}
|
|
713
576
|
|
|
714
577
|
## Step ${r++}: Create Sample Page
|
|
715
578
|
|
|
@@ -738,7 +601,7 @@ export class App {}
|
|
|
738
601
|
\`\`\`html
|
|
739
602
|
<div class="k-d-flex k-flex-col k-gap-5 k-p-6">
|
|
740
603
|
<div class="k-d-flex k-flex-col k-align-items-center k-gap-3 k-py-4">
|
|
741
|
-
<h1 class="k-h2 k-text-center">${
|
|
604
|
+
<h1 class="k-h2 k-text-center">${u}</h1>
|
|
742
605
|
<p class="k-h5 k-text-center k-color-subtle k-font-weight-normal k-max-w-3xl">
|
|
743
606
|
Create sophisticated Angular UIs with AI-powered agents using natural language prompts
|
|
744
607
|
</p>
|
|
@@ -853,7 +716,7 @@ export class App {}
|
|
|
853
716
|
cd ${e} && ng serve
|
|
854
717
|
\`\`\`
|
|
855
718
|
|
|
856
|
-
`}var
|
|
719
|
+
`}var ct=`
|
|
857
720
|
## Grid Data Binding
|
|
858
721
|
|
|
859
722
|
MUST use kendoGridBinding directive for basic Grid operations
|
|
@@ -912,7 +775,7 @@ CORRECT: <button kendoGridExcelCommand>Export to Excel</button>
|
|
|
912
775
|
Column width Property: The width property for columns should be set as a number for pixel values, not a string.
|
|
913
776
|
CORRECT: <kendo-grid-column [width]="120">
|
|
914
777
|
WRONG: <kendo-grid-column width="120px">
|
|
915
|
-
`;var
|
|
778
|
+
`;var dt=`
|
|
916
779
|
## kendoButton Must Not Be Combined with Command Directives
|
|
917
780
|
|
|
918
781
|
Never apply kendoButton to the same element as any of these TreeList command directives - they render their own button internally.
|
|
@@ -926,7 +789,7 @@ Affected directives:
|
|
|
926
789
|
|
|
927
790
|
WRONG: <button kendoTreeListExcelCommand kendoButton>Export to Excel</button>
|
|
928
791
|
CORRECT: <button kendoTreeListExcelCommand>Export to Excel</button>
|
|
929
|
-
`;var
|
|
792
|
+
`;var pt=`
|
|
930
793
|
## kendoButton Must Not Be Combined with Command Directives
|
|
931
794
|
|
|
932
795
|
Never apply kendoButton to the same element as any of these ListView command directives - they render their own button internally.
|
|
@@ -943,7 +806,7 @@ Affected directives:
|
|
|
943
806
|
|
|
944
807
|
WRONG: <button kendoListViewAddCommand kendoButton>Add</button>
|
|
945
808
|
CORRECT: <button kendoListViewAddCommand>Add</button>
|
|
946
|
-
`;var
|
|
809
|
+
`;var ut=`
|
|
947
810
|
## kendoButton Must Not Be Combined with Command Directives
|
|
948
811
|
|
|
949
812
|
Never apply kendoButton to the same element as the Scheduler PDF command directive - it renders its own button internally.
|
|
@@ -956,7 +819,7 @@ Affected directives:
|
|
|
956
819
|
|
|
957
820
|
WRONG: <button kendoSchedulerPDFCommand kendoButton>Export to PDF</button>
|
|
958
821
|
CORRECT: <button kendoSchedulerPDFCommand>Export to PDF</button>
|
|
959
|
-
`;var
|
|
822
|
+
`;var mt=`
|
|
960
823
|
## kendoButton Must Not Be Combined with Action Directives
|
|
961
824
|
|
|
962
825
|
Never apply kendoButton to the same element as any of these Window action directives - they render their own button internally.
|
|
@@ -972,7 +835,7 @@ Affected directives:
|
|
|
972
835
|
|
|
973
836
|
WRONG: <button kendoWindowCloseAction kendoButton></button>
|
|
974
837
|
CORRECT: <button kendoWindowCloseAction></button>
|
|
975
|
-
`;var
|
|
838
|
+
`;var gt=`
|
|
976
839
|
## Charts Data Binding
|
|
977
840
|
|
|
978
841
|
Never bind the Chart's data to a getter property. Using a getter causes the chart to rerender on every Angular change detection cycle.
|
|
@@ -980,7 +843,7 @@ Never bind the Chart's data to a getter property. Using a getter causes the char
|
|
|
980
843
|
BAD: get chartData() { return [ /* data items */ ] }
|
|
981
844
|
GOOD: public chartData = [ /* data items */ ];
|
|
982
845
|
GOOD: public chartData = this.data.map(...)
|
|
983
|
-
`;var
|
|
846
|
+
`;var ht=["combobox","dropdownlist","dropdowntree","multicolumncombobox","multiselect","multiselecttree","autocomplete"],ft=e=>e==="autocomplete"?io:e==="dropdowntree"?lo:e==="multiselecttree"?co:e==="multicolumncombobox"?po:ao(e),ao=e=>`
|
|
984
847
|
## ${e}
|
|
985
848
|
When implementing or updating the ${e} component, always follow these rules for \`textField\` and \`valueField\`:
|
|
986
849
|
|
|
@@ -1030,7 +893,7 @@ If \`valuePrimitive\` is false, which is the default, the value must be an objec
|
|
|
1030
893
|
\`\`\`typescript
|
|
1031
894
|
public selectedValue = { id: 2, name: 'B' };
|
|
1032
895
|
\`\`\`
|
|
1033
|
-
`,
|
|
896
|
+
`,io=`
|
|
1034
897
|
## AutoComplete
|
|
1035
898
|
|
|
1036
899
|
### Primitive Data
|
|
@@ -1038,7 +901,7 @@ If the data is an array of primitives (e.g., [data]="['A', 'B']"), never set \`v
|
|
|
1038
901
|
|
|
1039
902
|
### Complex Data
|
|
1040
903
|
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").
|
|
1041
|
-
`,
|
|
904
|
+
`,lo='\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',co='\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',po='\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 yt=`
|
|
1042
905
|
|
|
1043
906
|
## Smart Grid (AI-Enhanced) Instructions
|
|
1044
907
|
|
|
@@ -1057,7 +920,7 @@ Suggestion Examples by Domain:
|
|
|
1057
920
|
|
|
1058
921
|
Required Disclaimer:
|
|
1059
922
|
"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."
|
|
1060
|
-
`;var
|
|
923
|
+
`;var bt=["button","buttongroup","splitbutton","dropdownbutton","chip","chiplist","floatingactionbutton","smartpastebutton","speechtotextbutton"],kt=e=>e==="button"||e==="buttongroup"||e==="splitbutton"||e==="dropdownbutton"||e==="chip"?uo:"",uo='\n## Deprecated Properties & Modern Replacements\n\nButton `look` property: The `look` property is deprecated. Use `fillMode` instead.\n Type: `ButtonFillMode = "solid" | "flat" | "outline" | "link" | "clear"`\n CORRECT: <button kendoButton fillMode="flat">Button</button>\n WRONG: <button kendoButton look="flat">Button</button>\n\nButton `primary` property: The `primary` property is deprecated. Use `themeColor="primary"` instead.\n CORRECT: <button kendoButton themeColor="primary">Button</button>\n WRONG: <button kendoButton [primary]="true">Button</button>\n';var vt=`
|
|
1061
924
|
## Badge container usage
|
|
1062
925
|
|
|
1063
926
|
Use a <kendo-badge> without <kendo-badge-container> only when the host can host content, overflow is enabled, and its CSS \`position\` is not "static".
|
|
@@ -1077,7 +940,7 @@ Example without container:
|
|
|
1077
940
|
Inbox
|
|
1078
941
|
<kendo-badge themeColor="error">5</kendo-badge>
|
|
1079
942
|
</button>
|
|
1080
|
-
\`\`\``;var
|
|
943
|
+
\`\`\``;var wt='\n## Expanded State\n\nTo ensure a specific hierarchy level in the PivotGrid is expanded by default, set the `expand: true` property on the relevant item within the arrays bound to the `rowAxes`, `columnAxes`, or `measureAxes` input properties of the `kendoPivotLocalBinding` or `kendoPivotOLAPBinding` directive.\nThe expand property is part of the `PivotGridAxis` interface and controls whether that axis member appears expanded when the PivotGrid first renders, rather than requiring user interaction.\n\nExample:\npublic rowAxes: PivotGridAxis[] = [\n { name: ["Region"], expand: true },\n { name: ["Country"] }\n];\npublic columnAxes: PivotGridAxis[] = [\n { name: ["Category"], expand: true },\n { name: ["Product"] }\n];';var At='\n## Usage\n- Prefer `kendo-label` over plain HTML labels\n- Use either wrapping or `[for]` with a template reference variable\n\n```\n<kendo-label [for]="country" text="Country"></kendo-label>\n<kendo-dropdownlist #country [data]="countries"></kendo-dropdownlist>\n```\n\nAlso valid:\n\n```\n<kendo-label text="Country">\n <kendo-dropdownlist [data]="countries"></kendo-dropdownlist>\n</kendo-label>\n```\n\n## Association by control type\n- Kendo components: use wrapping or `[for]` plus a template reference variable\n- Native HTML inputs: use wrapping, `[for]` with `id`, or `[for]` with a template reference variable';var xt='\n## Usage\n- Prefer `kendo-floatinglabel` over plain HTML labels\n- Use either wrapping or `[for]` with a template reference variable\n\n```\n<kendo-floatinglabel [for]="country" text="Country"></kendo-floatinglabel>\n<kendo-dropdownlist #country [data]="countries"></kendo-dropdownlist>\n```\n\nAlso valid:\n\n```\n<kendo-floatinglabel text="Country">\n <kendo-dropdownlist [data]="countries"></kendo-dropdownlist>\n</kendo-floatinglabel>\n```\n\n## Association by control type\n- Kendo components: use wrapping or `[for]` plus a template reference variable\n- Native HTML inputs: use wrapping, `[for]` with `id`, or `[for]` with a template reference variable\n\n### Usage with other Kendo Angular components\n- `MaskedTextBox`: set `maskOnFocus="true"`\n- `DateInput`, `DatePicker`, `DateTimePicker`: set `placeholder=""`\n- native HTML inputs: apply the `kendoTextBox` directive';var Ct=`
|
|
1081
944
|
## Setup
|
|
1082
945
|
- Use the \`kendoForm\` directive on a \`<form>\` element.
|
|
1083
946
|
- Use one \`kendo-formfield\` per control.
|
|
@@ -1119,8 +982,8 @@ Extended example:
|
|
|
1119
982
|
|
|
1120
983
|
#### Composition
|
|
1121
984
|
- Keep the label, control, hint and error for one field inside the same \`kendo-formfield\`.
|
|
1122
|
-
- If using radio buttons, group all related options within a single \`kendo-formfield\`.`;function
|
|
985
|
+
- If using radio buttons, group all related options within a single \`kendo-formfield\`.`;function mo(e){let t=e?.trim().toLowerCase();if(t==="grid")return[ct,yt].join(`
|
|
1123
986
|
|
|
1124
|
-
`);if(t==="treelist")return
|
|
987
|
+
`);if(t==="treelist")return dt;if(t==="listview")return pt;if(t==="scheduler")return ut;if(t==="window")return mt;if(t==="charts")return gt;if(t==="forms")return Ct;if(t==="badge")return vt;if(t==="pivotgrid")return wt;if(t==="label")return At;if(t==="floatinglabel")return xt;if(ht.includes(t))return ft(t);if(bt.includes(t))return kt(t)}var B=!!process.env.PLUGIN_MODE,It=w.ToolNames.layoutAssistant(P),se=w.ToolNames.codeAssistant(P),St=w.ToolNames.styleAssistant(P),ae=w.ToolNames.iconAssistant(P),Tt=w.ToolNames.gettingStartedAssistant(P),Rt=w.ToolNames.accessibilityAssistant(P),go=w.ToolNames.upgradeAssistant(P);function Nt(e,t){return[...B?[]:[w.Tools.createOrchestrator({name:w.ToolNames.orchestrator(P),title:"Kendo UI Generator",description:w.ToolDescriptions.orchestrator(u),layoutAssistantName:It,codeAssistantName:se,styleAssistantName:St,iconAssistantName:ae,accessibilityAssistantName:Rt,suiteName:u,libKey:U,components:F,requiredAccess:["agent"]},e),w.Tools.createAssistantOrchestrator({name:"kendo_angular_assistant",title:"Kendo UI Assistant",description:w.ToolDescriptions.assistantOrchestrator(u),codeAssistantName:se,iconAssistantName:ae,suiteName:u,libKey:U,components:F,requiredAccess:["assistant"]},e)],w.Tools.createLayoutAssistant({name:It,title:"Kendo UI Layout Assistant",description:w.ToolDescriptions.layoutAssistant,getPreContent:B?void 0:()=>`${nt()}
|
|
1125
988
|
|
|
1126
|
-
${
|
|
989
|
+
${M()}`,requiredAccess:["agent"]},e),w.Tools.createStyleAssistant({name:St,title:"Kendo UI Style Assistant",description:w.ToolDescriptions.styleAssistant,libKey:U,getPreContent:B?void 0:rt,requiredAccess:["agent"]},e),w.Tools.createIconSearch({name:ae,title:"Kendo UI Icon Assistant",description:w.ToolDescriptions.iconAssistant,libKey:U,getPostContent:B?void 0:at,requiredAccess:["assistant","agent"]},e),w.Tools.createCodeAssistant({name:se,title:"Kendo UI Component Assistant",description:w.ToolDescriptions.codeAssistant(u),libKey:U,suiteName:u,components:F,getPostContent:B?void 0:({component:n})=>{let r=mo(n);return it({component:n,componentInstructions:r})},requiredAccess:["assistant","agent"]},e),...B?[]:[(()=>{let n=new I(Tt,{title:"Kendo UI Getting Started",description:`Creates a new Angular project with Angular CLI and provides essential getting started guidance for ${u} including installation, configuration, and setup instructions.`,requiredAccess:["agent"],inputSchema:ke(u,"kendo-angular-app")},async({projectName:r,createNewProject:s,theme:a},{_meta:l})=>{let g=S(n,l);try{await e.recordToolUserRequest({toolName:Tt,meta:{projectName:r,createNewProject:s,theme:a,...g}})}catch(h){console.error("Error recording tool request:",h)}return{content:[{type:"text",text:lt(r,s,a)}]}});return n})()],w.Tools.createAccessibilityAssistant({name:Rt,title:"Kendo UI Accessibility Assistant",description:w.ToolDescriptions.accessibilityAssistant(u),libKey:U,suiteName:u,components:F,requiredAccess:["agent"]},e),w.Tools.createUpgrade({name:go,title:"Kendo UI Upgrade Assistant",description:w.ToolDescriptions.upgradeAssistant(u,"@progress/kendo-angular-"),suiteName:u,packagePrefix:"@progress/kendo-angular-",requiredAccess:["agent"]},e)].filter(n=>n.hasAccess(t))}var ko=bo(import.meta.url),vo=Ut.dirname(ko),wo=Ut.resolve(vo,"../package.json"),Pt=JSON.parse(yo.readFileSync(wo,"utf-8")),Et=new ho({name:"kendo-mcp",title:"Kendo MCP Server",version:Pt.version});async function Ao(){let e=new fo;v("Starting server...");let t=await fe(async()=>{let n=(await we())?.entitlement;return n?.Product?.Code||n?.product?.code});t!=="none"&&(W.toolNameHeader=t==="agent"||t==="full"?"agent":"assistant",Nt(W,t).forEach(n=>n.register(Et)),be({serverName:"angular",contextApi:W,enrichWithUserData:!0,additionalFields:{version:Pt.version,access_type:t}})),await Et.connect(e)}Ao();
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@progress/kendo-angular-mcp",
|
|
3
|
-
"version": "1.
|
|
3
|
+
"version": "1.10.0",
|
|
4
4
|
"type": "module",
|
|
5
5
|
"bin": "./dist/index.js",
|
|
6
6
|
"license": "See LICENSE.md",
|
|
@@ -23,10 +23,10 @@
|
|
|
23
23
|
"!**/*.tsbuildinfo"
|
|
24
24
|
],
|
|
25
25
|
"dependencies": {
|
|
26
|
-
"@grpc/grpc-js": "^1.14.
|
|
26
|
+
"@grpc/grpc-js": "^1.14.5",
|
|
27
27
|
"@grpc/proto-loader": "^0.8.1",
|
|
28
28
|
"@modelcontextprotocol/sdk": "^1.30.0",
|
|
29
|
-
"@progress/kendo-licensing": "^1.11.
|
|
29
|
+
"@progress/kendo-licensing": "^1.11.3",
|
|
30
30
|
"tslib": "^2.3.0"
|
|
31
31
|
},
|
|
32
32
|
"devDependencies": {
|