@progress/kendo-react-webmcp 15.0.0-develop.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (340) hide show
  1. package/LICENSE.md +11 -0
  2. package/NOTICE.txt +383 -0
  3. package/README.md +72 -0
  4. package/WebMcpProvider.d.ts +49 -0
  5. package/WebMcpProvider.js +8 -0
  6. package/WebMcpProvider.mjs +138 -0
  7. package/adapters/aiprompt.d.ts +15 -0
  8. package/adapters/aiprompt.js +8 -0
  9. package/adapters/aiprompt.mjs +63 -0
  10. package/adapters/autocomplete.d.ts +18 -0
  11. package/adapters/autocomplete.js +8 -0
  12. package/adapters/autocomplete.mjs +69 -0
  13. package/adapters/button.d.ts +18 -0
  14. package/adapters/button.js +8 -0
  15. package/adapters/button.mjs +46 -0
  16. package/adapters/calendar.d.ts +16 -0
  17. package/adapters/calendar.js +8 -0
  18. package/adapters/calendar.mjs +61 -0
  19. package/adapters/chart.d.ts +29 -0
  20. package/adapters/chart.js +8 -0
  21. package/adapters/chart.mjs +95 -0
  22. package/adapters/chat.d.ts +16 -0
  23. package/adapters/chat.js +8 -0
  24. package/adapters/chat.mjs +66 -0
  25. package/adapters/colorpicker.d.ts +16 -0
  26. package/adapters/colorpicker.js +8 -0
  27. package/adapters/colorpicker.mjs +60 -0
  28. package/adapters/combobox.d.ts +20 -0
  29. package/adapters/combobox.js +8 -0
  30. package/adapters/combobox.mjs +87 -0
  31. package/adapters/dashboard.d.ts +18 -0
  32. package/adapters/dashboard.js +8 -0
  33. package/adapters/dashboard.mjs +41 -0
  34. package/adapters/datepicker.d.ts +17 -0
  35. package/adapters/datepicker.js +8 -0
  36. package/adapters/datepicker.mjs +59 -0
  37. package/adapters/daterangepicker.d.ts +19 -0
  38. package/adapters/daterangepicker.js +8 -0
  39. package/adapters/daterangepicker.mjs +70 -0
  40. package/adapters/datetimepicker.d.ts +16 -0
  41. package/adapters/datetimepicker.js +8 -0
  42. package/adapters/datetimepicker.mjs +59 -0
  43. package/adapters/dialog.d.ts +15 -0
  44. package/adapters/dialog.js +8 -0
  45. package/adapters/dialog.mjs +58 -0
  46. package/adapters/drawer.d.ts +33 -0
  47. package/adapters/drawer.js +8 -0
  48. package/adapters/drawer.mjs +86 -0
  49. package/adapters/dropdownlist.d.ts +19 -0
  50. package/adapters/dropdownlist.js +8 -0
  51. package/adapters/dropdownlist.mjs +74 -0
  52. package/adapters/dropdowntree.d.ts +22 -0
  53. package/adapters/dropdowntree.js +8 -0
  54. package/adapters/dropdowntree.mjs +108 -0
  55. package/adapters/editor.d.ts +30 -0
  56. package/adapters/editor.js +8 -0
  57. package/adapters/editor.mjs +109 -0
  58. package/adapters/form.d.ts +20 -0
  59. package/adapters/form.js +10 -0
  60. package/adapters/form.mjs +115 -0
  61. package/adapters/gantt.d.ts +65 -0
  62. package/adapters/gantt.js +8 -0
  63. package/adapters/gantt.mjs +370 -0
  64. package/adapters/grid.d.ts +102 -0
  65. package/adapters/grid.js +8 -0
  66. package/adapters/grid.mjs +692 -0
  67. package/adapters/listbox.d.ts +18 -0
  68. package/adapters/listbox.js +8 -0
  69. package/adapters/listbox.mjs +87 -0
  70. package/adapters/listview.d.ts +22 -0
  71. package/adapters/listview.js +8 -0
  72. package/adapters/listview.mjs +80 -0
  73. package/adapters/map.d.ts +32 -0
  74. package/adapters/map.js +8 -0
  75. package/adapters/map.mjs +88 -0
  76. package/adapters/maskedtextbox.d.ts +17 -0
  77. package/adapters/maskedtextbox.js +8 -0
  78. package/adapters/maskedtextbox.mjs +57 -0
  79. package/adapters/menu.d.ts +16 -0
  80. package/adapters/menu.js +8 -0
  81. package/adapters/menu.mjs +50 -0
  82. package/adapters/multiselect.d.ts +19 -0
  83. package/adapters/multiselect.js +8 -0
  84. package/adapters/multiselect.mjs +75 -0
  85. package/adapters/notification.d.ts +17 -0
  86. package/adapters/notification.js +8 -0
  87. package/adapters/notification.mjs +57 -0
  88. package/adapters/numerictextbox.d.ts +19 -0
  89. package/adapters/numerictextbox.js +8 -0
  90. package/adapters/numerictextbox.mjs +78 -0
  91. package/adapters/panelbar.d.ts +17 -0
  92. package/adapters/panelbar.js +8 -0
  93. package/adapters/panelbar.mjs +66 -0
  94. package/adapters/pivotgrid.d.ts +16 -0
  95. package/adapters/pivotgrid.js +8 -0
  96. package/adapters/pivotgrid.mjs +126 -0
  97. package/adapters/rangeslider.d.ts +21 -0
  98. package/adapters/rangeslider.js +8 -0
  99. package/adapters/rangeslider.mjs +55 -0
  100. package/adapters/rating.d.ts +16 -0
  101. package/adapters/rating.js +8 -0
  102. package/adapters/rating.mjs +60 -0
  103. package/adapters/scheduler.d.ts +45 -0
  104. package/adapters/scheduler.js +8 -0
  105. package/adapters/scheduler.mjs +165 -0
  106. package/adapters/scrollview.d.ts +21 -0
  107. package/adapters/scrollview.js +8 -0
  108. package/adapters/scrollview.mjs +74 -0
  109. package/adapters/signature.d.ts +16 -0
  110. package/adapters/signature.js +8 -0
  111. package/adapters/signature.mjs +47 -0
  112. package/adapters/slider.d.ts +19 -0
  113. package/adapters/slider.js +8 -0
  114. package/adapters/slider.mjs +47 -0
  115. package/adapters/sortable.d.ts +17 -0
  116. package/adapters/sortable.js +8 -0
  117. package/adapters/sortable.mjs +67 -0
  118. package/adapters/spreadsheet.d.ts +32 -0
  119. package/adapters/spreadsheet.js +8 -0
  120. package/adapters/spreadsheet.mjs +256 -0
  121. package/adapters/stepper.d.ts +23 -0
  122. package/adapters/stepper.js +8 -0
  123. package/adapters/stepper.mjs +47 -0
  124. package/adapters/switch.d.ts +17 -0
  125. package/adapters/switch.js +8 -0
  126. package/adapters/switch.mjs +48 -0
  127. package/adapters/tabstrip.d.ts +19 -0
  128. package/adapters/tabstrip.js +8 -0
  129. package/adapters/tabstrip.mjs +47 -0
  130. package/adapters/taskboard.d.ts +20 -0
  131. package/adapters/taskboard.js +8 -0
  132. package/adapters/taskboard.mjs +104 -0
  133. package/adapters/textarea.d.ts +16 -0
  134. package/adapters/textarea.js +8 -0
  135. package/adapters/textarea.mjs +57 -0
  136. package/adapters/textbox.d.ts +19 -0
  137. package/adapters/textbox.js +8 -0
  138. package/adapters/textbox.mjs +61 -0
  139. package/adapters/timepicker.d.ts +16 -0
  140. package/adapters/timepicker.js +8 -0
  141. package/adapters/timepicker.mjs +59 -0
  142. package/adapters/treelist.d.ts +81 -0
  143. package/adapters/treelist.js +8 -0
  144. package/adapters/treelist.mjs +403 -0
  145. package/adapters/treeview.d.ts +25 -0
  146. package/adapters/treeview.js +9 -0
  147. package/adapters/treeview.mjs +212 -0
  148. package/adapters/upload.d.ts +15 -0
  149. package/adapters/upload.js +8 -0
  150. package/adapters/upload.mjs +52 -0
  151. package/adapters/utils.d.ts +16 -0
  152. package/adapters/utils.js +8 -0
  153. package/adapters/utils.mjs +25 -0
  154. package/adapters/window.d.ts +17 -0
  155. package/adapters/window.js +8 -0
  156. package/adapters/window.mjs +99 -0
  157. package/commands/aiprompt.d.ts +30 -0
  158. package/commands/aiprompt.js +8 -0
  159. package/commands/aiprompt.mjs +54 -0
  160. package/commands/autocomplete.d.ts +26 -0
  161. package/commands/autocomplete.js +8 -0
  162. package/commands/autocomplete.mjs +36 -0
  163. package/commands/button.d.ts +19 -0
  164. package/commands/button.js +8 -0
  165. package/commands/button.mjs +21 -0
  166. package/commands/calendar.d.ts +29 -0
  167. package/commands/calendar.js +8 -0
  168. package/commands/calendar.mjs +52 -0
  169. package/commands/chart.d.ts +27 -0
  170. package/commands/chart.js +8 -0
  171. package/commands/chart.mjs +43 -0
  172. package/commands/chat.d.ts +22 -0
  173. package/commands/chat.js +8 -0
  174. package/commands/chat.mjs +30 -0
  175. package/commands/checkbox.d.ts +26 -0
  176. package/commands/checkbox.js +8 -0
  177. package/commands/checkbox.mjs +36 -0
  178. package/commands/colorpicker.d.ts +26 -0
  179. package/commands/colorpicker.js +8 -0
  180. package/commands/colorpicker.mjs +36 -0
  181. package/commands/combobox.d.ts +34 -0
  182. package/commands/combobox.js +8 -0
  183. package/commands/combobox.mjs +48 -0
  184. package/commands/dashboard.d.ts +19 -0
  185. package/commands/dashboard.js +8 -0
  186. package/commands/dashboard.mjs +21 -0
  187. package/commands/datepicker.d.ts +26 -0
  188. package/commands/datepicker.js +8 -0
  189. package/commands/datepicker.mjs +36 -0
  190. package/commands/daterangepicker.d.ts +27 -0
  191. package/commands/daterangepicker.js +8 -0
  192. package/commands/daterangepicker.mjs +37 -0
  193. package/commands/datetimepicker.d.ts +26 -0
  194. package/commands/datetimepicker.js +8 -0
  195. package/commands/datetimepicker.mjs +36 -0
  196. package/commands/dialog.d.ts +23 -0
  197. package/commands/dialog.js +8 -0
  198. package/commands/dialog.mjs +25 -0
  199. package/commands/drawer.d.ts +30 -0
  200. package/commands/drawer.js +8 -0
  201. package/commands/drawer.mjs +38 -0
  202. package/commands/dropdownlist.d.ts +30 -0
  203. package/commands/dropdownlist.js +8 -0
  204. package/commands/dropdownlist.mjs +42 -0
  205. package/commands/dropdowntree.d.ts +34 -0
  206. package/commands/dropdowntree.js +8 -0
  207. package/commands/dropdowntree.mjs +48 -0
  208. package/commands/editor.d.ts +26 -0
  209. package/commands/editor.js +8 -0
  210. package/commands/editor.mjs +36 -0
  211. package/commands/form.d.ts +34 -0
  212. package/commands/form.js +8 -0
  213. package/commands/form.mjs +54 -0
  214. package/commands/gantt.d.ts +119 -0
  215. package/commands/gantt.js +8 -0
  216. package/commands/gantt.mjs +156 -0
  217. package/commands/grid.d.ts +209 -0
  218. package/commands/grid.js +8 -0
  219. package/commands/grid.mjs +280 -0
  220. package/commands/index.d.ts +58 -0
  221. package/commands/listbox.d.ts +31 -0
  222. package/commands/listbox.js +8 -0
  223. package/commands/listbox.mjs +69 -0
  224. package/commands/listview.d.ts +22 -0
  225. package/commands/listview.js +8 -0
  226. package/commands/listview.mjs +29 -0
  227. package/commands/map.d.ts +43 -0
  228. package/commands/map.js +8 -0
  229. package/commands/map.mjs +77 -0
  230. package/commands/maskedtextbox.d.ts +26 -0
  231. package/commands/maskedtextbox.js +8 -0
  232. package/commands/maskedtextbox.mjs +36 -0
  233. package/commands/menu.d.ts +22 -0
  234. package/commands/menu.js +8 -0
  235. package/commands/menu.mjs +30 -0
  236. package/commands/multicolumncombobox.d.ts +34 -0
  237. package/commands/multicolumncombobox.js +8 -0
  238. package/commands/multicolumncombobox.mjs +48 -0
  239. package/commands/multiselect.d.ts +41 -0
  240. package/commands/multiselect.js +8 -0
  241. package/commands/multiselect.mjs +57 -0
  242. package/commands/notification.d.ts +27 -0
  243. package/commands/notification.js +8 -0
  244. package/commands/notification.mjs +46 -0
  245. package/commands/numerictextbox.d.ts +34 -0
  246. package/commands/numerictextbox.js +8 -0
  247. package/commands/numerictextbox.mjs +48 -0
  248. package/commands/panelbar.d.ts +29 -0
  249. package/commands/panelbar.js +8 -0
  250. package/commands/panelbar.mjs +43 -0
  251. package/commands/pivotgrid.d.ts +56 -0
  252. package/commands/pivotgrid.js +8 -0
  253. package/commands/pivotgrid.mjs +87 -0
  254. package/commands/rangeslider.d.ts +23 -0
  255. package/commands/rangeslider.js +8 -0
  256. package/commands/rangeslider.mjs +25 -0
  257. package/commands/rating.d.ts +26 -0
  258. package/commands/rating.js +8 -0
  259. package/commands/rating.mjs +36 -0
  260. package/commands/scheduler.d.ts +45 -0
  261. package/commands/scheduler.js +8 -0
  262. package/commands/scheduler.mjs +59 -0
  263. package/commands/scrollview.d.ts +30 -0
  264. package/commands/scrollview.js +8 -0
  265. package/commands/scrollview.mjs +46 -0
  266. package/commands/signature.d.ts +19 -0
  267. package/commands/signature.js +8 -0
  268. package/commands/signature.mjs +21 -0
  269. package/commands/slider.d.ts +22 -0
  270. package/commands/slider.js +8 -0
  271. package/commands/slider.mjs +24 -0
  272. package/commands/sortable.d.ts +23 -0
  273. package/commands/sortable.js +8 -0
  274. package/commands/sortable.mjs +32 -0
  275. package/commands/spreadsheet.d.ts +92 -0
  276. package/commands/spreadsheet.js +8 -0
  277. package/commands/spreadsheet.mjs +181 -0
  278. package/commands/stepper.d.ts +22 -0
  279. package/commands/stepper.js +8 -0
  280. package/commands/stepper.mjs +35 -0
  281. package/commands/switch.d.ts +26 -0
  282. package/commands/switch.js +8 -0
  283. package/commands/switch.mjs +36 -0
  284. package/commands/tabstrip.d.ts +23 -0
  285. package/commands/tabstrip.js +8 -0
  286. package/commands/tabstrip.mjs +30 -0
  287. package/commands/taskboard.d.ts +48 -0
  288. package/commands/taskboard.js +8 -0
  289. package/commands/taskboard.mjs +90 -0
  290. package/commands/textarea.d.ts +26 -0
  291. package/commands/textarea.js +8 -0
  292. package/commands/textarea.mjs +36 -0
  293. package/commands/textbox.d.ts +26 -0
  294. package/commands/textbox.js +8 -0
  295. package/commands/textbox.mjs +36 -0
  296. package/commands/timepicker.d.ts +26 -0
  297. package/commands/timepicker.js +8 -0
  298. package/commands/timepicker.mjs +36 -0
  299. package/commands/treelist.d.ts +135 -0
  300. package/commands/treelist.js +8 -0
  301. package/commands/treelist.mjs +177 -0
  302. package/commands/treeview.d.ts +44 -0
  303. package/commands/treeview.js +8 -0
  304. package/commands/treeview.mjs +84 -0
  305. package/commands/upload.d.ts +19 -0
  306. package/commands/upload.js +8 -0
  307. package/commands/upload.mjs +21 -0
  308. package/commands/window.d.ts +35 -0
  309. package/commands/window.js +8 -0
  310. package/commands/window.mjs +45 -0
  311. package/dist/cdn/js/kendo-react-webmcp.js +15 -0
  312. package/grid-mcp-tools.d.ts +26 -0
  313. package/grid-mcp-tools.js +8 -0
  314. package/grid-mcp-tools.mjs +75 -0
  315. package/index.d.mts +68 -0
  316. package/index.d.ts +68 -0
  317. package/index.js +8 -0
  318. package/index.mjs +308 -0
  319. package/mcp-types.d.ts +12 -0
  320. package/package.json +64 -0
  321. package/schemas/common.d.ts +27 -0
  322. package/schemas/common.js +8 -0
  323. package/schemas/common.mjs +113 -0
  324. package/schemas/gantt.d.ts +10 -0
  325. package/schemas/gantt.js +8 -0
  326. package/schemas/gantt.mjs +51 -0
  327. package/schemas/grid.d.ts +10 -0
  328. package/schemas/grid.js +8 -0
  329. package/schemas/grid.mjs +46 -0
  330. package/schemas/index.d.ts +13 -0
  331. package/schemas/input.d.ts +19 -0
  332. package/schemas/input.js +8 -0
  333. package/schemas/input.mjs +137 -0
  334. package/schemas/scheduler.d.ts +11 -0
  335. package/schemas/scheduler.js +8 -0
  336. package/schemas/scheduler.mjs +58 -0
  337. package/schemas/table.d.ts +12 -0
  338. package/schemas/table.js +8 -0
  339. package/schemas/table.mjs +87 -0
  340. package/types.d.ts +39 -0
@@ -0,0 +1,15 @@
1
+ /**
2
+ * @license
3
+ *-------------------------------------------------------------------------------------------
4
+ * Copyright © 2026 Progress Software Corporation. All rights reserved.
5
+ * Licensed under commercial license. See LICENSE.md in the package root for more information
6
+ *-------------------------------------------------------------------------------------------
7
+ */
8
+ import { ToolAdapter } from '../types';
9
+ interface DialogAdapterProps {
10
+ onClose?: (event: Record<string, unknown>) => void;
11
+ webMcp?: unknown;
12
+ }
13
+ /** @hidden */
14
+ export declare const dialogAdapter: ToolAdapter<unknown, DialogAdapterProps>;
15
+ export {};
@@ -0,0 +1,8 @@
1
+ /**
2
+ * @license
3
+ *-------------------------------------------------------------------------------------------
4
+ * Copyright © 2026 Progress Software Corporation. All rights reserved.
5
+ * Licensed under commercial license. See LICENSE.md in the package root for more information
6
+ *-------------------------------------------------------------------------------------------
7
+ */
8
+ "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const t=require("../commands/dialog.js"),f={componentSuffix:"dialog",createTools(y,a,c,m){const i=[],d=o=>`${c.groupName}_${o}`,u=a.current,r=[{name:"confirm",description:`Click the confirm/OK button on the ${c.dataName} dialog`,commandType:t.DialogCommands.Confirm,enabled:!0},{name:"cancel",description:`Click the cancel button on the ${c.dataName} dialog`,commandType:t.DialogCommands.Cancel,enabled:!!u.onClose}],e=a.current.webMcp,l=typeof e=="object"&&e!==null&&typeof e.tools=="function"?e.tools:void 0,p=l?l(r):r,g=async(o,s)=>{switch(o){case t.DialogCommands.Confirm:return{content:[{type:"text",text:"Confirm action triggered."}]};case t.DialogCommands.Cancel:{const n=a.current;return n.onClose&&n.onClose({}),{content:[{type:"text",text:"Dialog cancelled."}]}}default:return{content:[{type:"text",text:`Unknown command: ${o}`}],isError:!0}}};for(const o of p){if(!o.enabled)continue;const s=t.getDialogToolSchema(o.commandType),n=o.commandType;try{i.push(m.registerTool({name:d(o.name),description:o.description,inputSchema:s,execute:async C=>g(n,C||{})}))}catch{}}return i}};exports.dialogAdapter=f;
@@ -0,0 +1,58 @@
1
+ /**
2
+ * @license
3
+ *-------------------------------------------------------------------------------------------
4
+ * Copyright © 2026 Progress Software Corporation. All rights reserved.
5
+ * Licensed under commercial license. See LICENSE.md in the package root for more information
6
+ *-------------------------------------------------------------------------------------------
7
+ */
8
+ import { DialogCommands as n, getDialogToolSchema as g } from "../commands/dialog.mjs";
9
+ const x = {
10
+ componentSuffix: "dialog",
11
+ createTools(y, c, a, m) {
12
+ const r = [], d = (t) => `${a.groupName}_${t}`, p = c.current, i = [
13
+ {
14
+ name: "confirm",
15
+ description: `Click the confirm/OK button on the ${a.dataName} dialog`,
16
+ commandType: n.Confirm,
17
+ enabled: !0
18
+ },
19
+ {
20
+ name: "cancel",
21
+ description: `Click the cancel button on the ${a.dataName} dialog`,
22
+ commandType: n.Cancel,
23
+ enabled: !!p.onClose
24
+ }
25
+ ], e = c.current.webMcp, l = typeof e == "object" && e !== null && typeof e.tools == "function" ? e.tools : void 0, u = l ? l(i) : i, f = async (t, s) => {
26
+ switch (t) {
27
+ case n.Confirm:
28
+ return { content: [{ type: "text", text: "Confirm action triggered." }] };
29
+ case n.Cancel: {
30
+ const o = c.current;
31
+ return o.onClose && o.onClose({}), { content: [{ type: "text", text: "Dialog cancelled." }] };
32
+ }
33
+ default:
34
+ return { content: [{ type: "text", text: `Unknown command: ${t}` }], isError: !0 };
35
+ }
36
+ };
37
+ for (const t of u) {
38
+ if (!t.enabled)
39
+ continue;
40
+ const s = g(t.commandType), o = t.commandType;
41
+ try {
42
+ r.push(
43
+ m.registerTool({
44
+ name: d(t.name),
45
+ description: t.description,
46
+ inputSchema: s,
47
+ execute: async (C) => f(o, C || {})
48
+ })
49
+ );
50
+ } catch {
51
+ }
52
+ }
53
+ return r;
54
+ }
55
+ };
56
+ export {
57
+ x as dialogAdapter
58
+ };
@@ -0,0 +1,33 @@
1
+ /**
2
+ * @license
3
+ *-------------------------------------------------------------------------------------------
4
+ * Copyright © 2026 Progress Software Corporation. All rights reserved.
5
+ * Licensed under commercial license. See LICENSE.md in the package root for more information
6
+ *-------------------------------------------------------------------------------------------
7
+ */
8
+ import { McpToolOption } from '../mcp-types';
9
+ import { ToolAdapter } from '../types';
10
+ type DrawerEventCallback = (event: Record<string, unknown>) => void;
11
+ interface DrawerWebMcpConfig {
12
+ dataName?: string;
13
+ tools?: ToolsCallback;
14
+ onOverlayClick?: DrawerEventCallback;
15
+ onExpandedChange?: DrawerEventCallback;
16
+ onSelect?: DrawerEventCallback;
17
+ }
18
+ interface DrawerAdapterProps {
19
+ expanded?: boolean;
20
+ items?: Array<{
21
+ text?: string;
22
+ id?: string | number;
23
+ selected?: boolean;
24
+ }>;
25
+ onSelect?: DrawerEventCallback;
26
+ onOverlayClick?: DrawerEventCallback;
27
+ onExpandedChange?: DrawerEventCallback;
28
+ webMcp?: boolean | DrawerWebMcpConfig;
29
+ }
30
+ type ToolsCallback = (tools: McpToolOption[]) => McpToolOption[];
31
+ /** @hidden */
32
+ export declare const drawerAdapter: ToolAdapter<unknown, DrawerAdapterProps>;
33
+ export {};
@@ -0,0 +1,8 @@
1
+ /**
2
+ * @license
3
+ *-------------------------------------------------------------------------------------------
4
+ * Copyright © 2026 Progress Software Corporation. All rights reserved.
5
+ * Licensed under commercial license. See LICENSE.md in the package root for more information
6
+ *-------------------------------------------------------------------------------------------
7
+ */
8
+ "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const a=require("../commands/drawer.js");function s(d,o){const r=d[o];if(typeof r=="function")return r;const c=d.webMcp;if(typeof c=="object"&&c!==null&&typeof c[o]=="function")return c[o]}const b={componentSuffix:"drawer",createTools(d,o,r,c){const m=[],f=n=>`${r.groupName}_${n}`,u=!!s(o.current,"onOverlayClick")||!!s(o.current,"onExpandedChange"),p=[{name:"open",description:`Open the ${r.dataName} navigation drawer.`,commandType:a.DrawerCommands.Open,enabled:u},{name:"close",description:`Close the ${r.dataName} navigation drawer.`,commandType:a.DrawerCommands.Close,enabled:u},{name:"select_item",description:`Select an item in the ${r.dataName} navigation drawer by its text.`,commandType:a.DrawerCommands.SelectItem,enabled:!!o.current.onSelect}],i=o.current.webMcp,x=typeof i=="object"&&i!==null&&typeof i.tools=="function"?i.tools:void 0,w=x?x(p):p,C=async(n,l)=>{const t=o.current;switch(n){case a.DrawerCommands.Open:{if(t.expanded)return{content:[{type:"text",text:"Drawer is already open."}]};const e=s(t,"onExpandedChange")||s(t,"onOverlayClick");return e&&e({expanded:!0}),{content:[{type:"text",text:"Drawer opened."}]}}case a.DrawerCommands.Close:{if(!t.expanded)return{content:[{type:"text",text:"Drawer is already closed."}]};const e=s(t,"onExpandedChange")||s(t,"onOverlayClick");return e&&e({expanded:!1}),{content:[{type:"text",text:"Drawer closed."}]}}case a.DrawerCommands.SelectItem:{const e=l.text;if(!e)return{content:[{type:"text",text:"Missing required argument: text"}],isError:!0};const y=(t.items||[]).find(g=>g.text===e);return y?(t.onSelect&&t.onSelect({itemTarget:{props:y}}),{content:[{type:"text",text:`Selected "${e}".`}]}):{content:[{type:"text",text:`Item "${e}" not found.`}],isError:!0}}default:return{content:[{type:"text",text:`Unknown command: ${n}`}],isError:!0}}};for(const n of w){if(!n.enabled)continue;const l=a.getDrawerToolSchema(n.commandType),t=n.commandType;try{m.push(c.registerTool({name:f(n.name),description:n.description,inputSchema:l,execute:async e=>C(t,e||{})}))}catch{}}return m}};exports.drawerAdapter=b;
@@ -0,0 +1,86 @@
1
+ /**
2
+ * @license
3
+ *-------------------------------------------------------------------------------------------
4
+ * Copyright © 2026 Progress Software Corporation. All rights reserved.
5
+ * Licensed under commercial license. See LICENSE.md in the package root for more information
6
+ *-------------------------------------------------------------------------------------------
7
+ */
8
+ import { DrawerCommands as c, getDrawerToolSchema as h } from "../commands/drawer.mjs";
9
+ function i(d, o) {
10
+ const r = d[o];
11
+ if (typeof r == "function")
12
+ return r;
13
+ const a = d.webMcp;
14
+ if (typeof a == "object" && a !== null && typeof a[o] == "function")
15
+ return a[o];
16
+ }
17
+ const S = {
18
+ componentSuffix: "drawer",
19
+ createTools(d, o, r, a) {
20
+ const p = [], f = (n) => `${r.groupName}_${n}`, m = !!i(o.current, "onOverlayClick") || !!i(o.current, "onExpandedChange"), u = [
21
+ {
22
+ name: "open",
23
+ description: `Open the ${r.dataName} navigation drawer.`,
24
+ commandType: c.Open,
25
+ enabled: m
26
+ },
27
+ {
28
+ name: "close",
29
+ description: `Close the ${r.dataName} navigation drawer.`,
30
+ commandType: c.Close,
31
+ enabled: m
32
+ },
33
+ {
34
+ name: "select_item",
35
+ description: `Select an item in the ${r.dataName} navigation drawer by its text.`,
36
+ commandType: c.SelectItem,
37
+ enabled: !!o.current.onSelect
38
+ }
39
+ ], s = o.current.webMcp, x = typeof s == "object" && s !== null && typeof s.tools == "function" ? s.tools : void 0, w = x ? x(u) : u, g = async (n, l) => {
40
+ const t = o.current;
41
+ switch (n) {
42
+ case c.Open: {
43
+ if (t.expanded)
44
+ return { content: [{ type: "text", text: "Drawer is already open." }] };
45
+ const e = i(t, "onExpandedChange") || i(t, "onOverlayClick");
46
+ return e && e({ expanded: !0 }), { content: [{ type: "text", text: "Drawer opened." }] };
47
+ }
48
+ case c.Close: {
49
+ if (!t.expanded)
50
+ return { content: [{ type: "text", text: "Drawer is already closed." }] };
51
+ const e = i(t, "onExpandedChange") || i(t, "onOverlayClick");
52
+ return e && e({ expanded: !1 }), { content: [{ type: "text", text: "Drawer closed." }] };
53
+ }
54
+ case c.SelectItem: {
55
+ const e = l.text;
56
+ if (!e)
57
+ return { content: [{ type: "text", text: "Missing required argument: text" }], isError: !0 };
58
+ const y = (t.items || []).find((C) => C.text === e);
59
+ return y ? (t.onSelect && t.onSelect({ itemTarget: { props: y } }), { content: [{ type: "text", text: `Selected "${e}".` }] }) : { content: [{ type: "text", text: `Item "${e}" not found.` }], isError: !0 };
60
+ }
61
+ default:
62
+ return { content: [{ type: "text", text: `Unknown command: ${n}` }], isError: !0 };
63
+ }
64
+ };
65
+ for (const n of w) {
66
+ if (!n.enabled)
67
+ continue;
68
+ const l = h(n.commandType), t = n.commandType;
69
+ try {
70
+ p.push(
71
+ a.registerTool({
72
+ name: f(n.name),
73
+ description: n.description,
74
+ inputSchema: l,
75
+ execute: async (e) => g(t, e || {})
76
+ })
77
+ );
78
+ } catch {
79
+ }
80
+ }
81
+ return p;
82
+ }
83
+ };
84
+ export {
85
+ S as drawerAdapter
86
+ };
@@ -0,0 +1,19 @@
1
+ /**
2
+ * @license
3
+ *-------------------------------------------------------------------------------------------
4
+ * Copyright © 2026 Progress Software Corporation. All rights reserved.
5
+ * Licensed under commercial license. See LICENSE.md in the package root for more information
6
+ *-------------------------------------------------------------------------------------------
7
+ */
8
+ import { ToolAdapter } from '../types';
9
+ interface DropDownListAdapterProps {
10
+ onChange?: (event: unknown) => void;
11
+ onOpen?: (event: unknown) => void;
12
+ onClose?: (event: unknown) => void;
13
+ data?: unknown[];
14
+ textField?: string;
15
+ webMcp?: unknown;
16
+ }
17
+ /** @hidden */
18
+ export declare const dropDownListAdapter: ToolAdapter<unknown, DropDownListAdapterProps>;
19
+ export {};
@@ -0,0 +1,8 @@
1
+ /**
2
+ * @license
3
+ *-------------------------------------------------------------------------------------------
4
+ * Copyright © 2026 Progress Software Corporation. All rights reserved.
5
+ * Licensed under commercial license. See LICENSE.md in the package root for more information
6
+ *-------------------------------------------------------------------------------------------
7
+ */
8
+ "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const n=require("../commands/dropdownlist.js"),h={componentSuffix:"dropdownlist",createTools(i,o,s,D){const u=[],x=e=>`${s.groupName}_${e}`,l=o.current,w=[{name:"open",description:`Open the ${s.dataName} dropdown list`,commandType:n.DropDownListCommands.Open,enabled:!!l.onOpen},{name:"select",description:`Select an item from the ${s.dataName} dropdown list`,commandType:n.DropDownListCommands.SetValue,enabled:!!l.onChange},{name:"close",description:`Close the ${s.dataName} dropdown list`,commandType:n.DropDownListCommands.Close,enabled:!!l.onClose}],c=o.current.webMcp,y=typeof c=="object"&&c!==null&&typeof c.tools=="function"?c.tools:void 0,f=y?y(w):w,g=async(e,p)=>{switch(e){case n.DropDownListCommands.Open:{const t=o.current;return t.onOpen&&t.onOpen({syntheticEvent:null,target:i}),{content:[{type:"text",text:"Dropdown opened."}]}}case n.DropDownListCommands.SetValue:{const t=o.current,d=t.data||[],C=t.textField,r=p.value,m=d.find(a=>C&&typeof a=="object"&&a!==null?a[C]===r:a===r);return t.onChange&&t.onChange({value:m!=null?m:r,syntheticEvent:null,target:i}),{content:[{type:"text",text:`Selected "${String(r)}".`}]}}case n.DropDownListCommands.Close:{const t=o.current;return t.onClose&&t.onClose({syntheticEvent:null,target:i}),{content:[{type:"text",text:"Dropdown closed."}]}}default:return{content:[{type:"text",text:`Unknown command: ${e}`}],isError:!0}}};for(const e of f){if(!e.enabled)continue;const p=n.getDropDownListToolSchema(e.commandType),t=e.commandType;try{u.push(D.registerTool({name:x(e.name),description:e.description,inputSchema:p,execute:async d=>g(t,d||{})}))}catch{}}return u}};exports.dropDownListAdapter=h;
@@ -0,0 +1,74 @@
1
+ /**
2
+ * @license
3
+ *-------------------------------------------------------------------------------------------
4
+ * Copyright © 2026 Progress Software Corporation. All rights reserved.
5
+ * Licensed under commercial license. See LICENSE.md in the package root for more information
6
+ *-------------------------------------------------------------------------------------------
7
+ */
8
+ import { DropDownListCommands as n, getDropDownListToolSchema as b } from "../commands/dropdownlist.mjs";
9
+ const S = {
10
+ componentSuffix: "dropdownlist",
11
+ createTools(l, o, c, C) {
12
+ const u = [], f = (e) => `${c.groupName}_${e}`, i = o.current, y = [
13
+ {
14
+ name: "open",
15
+ description: `Open the ${c.dataName} dropdown list`,
16
+ commandType: n.Open,
17
+ enabled: !!i.onOpen
18
+ },
19
+ {
20
+ name: "select",
21
+ description: `Select an item from the ${c.dataName} dropdown list`,
22
+ commandType: n.SetValue,
23
+ enabled: !!i.onChange
24
+ },
25
+ {
26
+ name: "close",
27
+ description: `Close the ${c.dataName} dropdown list`,
28
+ commandType: n.Close,
29
+ enabled: !!i.onClose
30
+ }
31
+ ], s = o.current.webMcp, x = typeof s == "object" && s !== null && typeof s.tools == "function" ? s.tools : void 0, h = x ? x(y) : y, g = async (e, p) => {
32
+ switch (e) {
33
+ case n.Open: {
34
+ const t = o.current;
35
+ return t.onOpen && t.onOpen({ syntheticEvent: null, target: l }), { content: [{ type: "text", text: "Dropdown opened." }] };
36
+ }
37
+ case n.SetValue: {
38
+ const t = o.current, d = t.data || [], w = t.textField, r = p.value, m = d.find((a) => w && typeof a == "object" && a !== null ? a[w] === r : a === r);
39
+ return t.onChange && t.onChange({
40
+ value: m != null ? m : r,
41
+ syntheticEvent: null,
42
+ target: l
43
+ }), { content: [{ type: "text", text: `Selected "${String(r)}".` }] };
44
+ }
45
+ case n.Close: {
46
+ const t = o.current;
47
+ return t.onClose && t.onClose({ syntheticEvent: null, target: l }), { content: [{ type: "text", text: "Dropdown closed." }] };
48
+ }
49
+ default:
50
+ return { content: [{ type: "text", text: `Unknown command: ${e}` }], isError: !0 };
51
+ }
52
+ };
53
+ for (const e of h) {
54
+ if (!e.enabled)
55
+ continue;
56
+ const p = b(e.commandType), t = e.commandType;
57
+ try {
58
+ u.push(
59
+ C.registerTool({
60
+ name: f(e.name),
61
+ description: e.description,
62
+ inputSchema: p,
63
+ execute: async (d) => g(t, d || {})
64
+ })
65
+ );
66
+ } catch {
67
+ }
68
+ }
69
+ return u;
70
+ }
71
+ };
72
+ export {
73
+ S as dropDownListAdapter
74
+ };
@@ -0,0 +1,22 @@
1
+ /**
2
+ * @license
3
+ *-------------------------------------------------------------------------------------------
4
+ * Copyright © 2026 Progress Software Corporation. All rights reserved.
5
+ * Licensed under commercial license. See LICENSE.md in the package root for more information
6
+ *-------------------------------------------------------------------------------------------
7
+ */
8
+ import { ToolAdapter } from '../types';
9
+ interface DropDownTreeAdapterProps {
10
+ onChange?: (event: unknown) => void;
11
+ onOpen?: (event: unknown) => void;
12
+ onClose?: (event: unknown) => void;
13
+ onExpandChange?: (event: unknown) => void;
14
+ data?: unknown[];
15
+ textField?: string;
16
+ dataItemKey?: string;
17
+ subItemsField?: string;
18
+ webMcp?: unknown;
19
+ }
20
+ /** @hidden */
21
+ export declare const dropDownTreeAdapter: ToolAdapter<unknown, DropDownTreeAdapterProps>;
22
+ export {};
@@ -0,0 +1,8 @@
1
+ /**
2
+ * @license
3
+ *-------------------------------------------------------------------------------------------
4
+ * Copyright © 2026 Progress Software Corporation. All rights reserved.
5
+ * Licensed under commercial license. See LICENSE.md in the package root for more information
6
+ *-------------------------------------------------------------------------------------------
7
+ */
8
+ "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const c=require("../commands/dropdowntree.js"),h="DropDownTreeExpand";function x(d,n,r,m){for(const a of d)if(typeof a=="object"&&a!==null){const l=a;if(String(l[n])===String(r))return a;const s=l[m];if(Array.isArray(s)){const u=x(s,n,r,m);if(u)return u}}}const S={componentSuffix:"dropdowntree",createTools(d,n,r,m){const a=[],l=o=>`${r.groupName}_${o}`,s=n.current,u=!!s.onChange,C=[{name:"open",description:`Open the ${r.dataName} dropdown tree`,commandType:c.DropDownTreeCommands.Open,enabled:!!s.onOpen},{name:"expand",description:`Expand a node in the ${r.dataName} dropdown tree`,commandType:h,enabled:!!s.onExpandChange},{name:"select",description:`Select a node in the ${r.dataName} dropdown tree`,commandType:c.DropDownTreeCommands.SetValue,enabled:u},{name:"close",description:`Close the ${r.dataName} dropdown tree`,commandType:c.DropDownTreeCommands.Close,enabled:!0}],y=n.current.webMcp,D=typeof y=="object"&&y!==null&&typeof y.tools=="function"?y.tools:void 0,f=D?D(C):C,b=async(o,t)=>{switch(o){case c.DropDownTreeCommands.Open:{const e=n.current;return e.onOpen&&e.onOpen({syntheticEvent:null,target:d}),{content:[{type:"text",text:"Dropdown tree opened."}]}}case h:{const e=n.current,p=e.dataItemKey||"id",w=e.subItemsField||"items",i=x(e.data||[],p,t.id,w);return e.onExpandChange&&i&&e.onExpandChange({item:i,syntheticEvent:null,target:d}),{content:[{type:"text",text:i?"Node expanded.":`Node with id "${String(t.id)}" not found.`}]}}case c.DropDownTreeCommands.SetValue:{const e=n.current,p=e.dataItemKey||"id",w=e.textField||"text",i=e.subItemsField||"items",T=e.data||[],g=x(T,p,t.value,i)||x(T,w,t.value,i);return e.onChange&&e.onChange({value:g||t.value,syntheticEvent:null,target:d}),{content:[{type:"text",text:`Selected "${String(t.value)}".`}]}}case c.DropDownTreeCommands.Close:{const e=n.current;return e.onClose&&e.onClose({syntheticEvent:null,target:d}),{content:[{type:"text",text:"Dropdown tree closed."}]}}default:return{content:[{type:"text",text:`Unknown command: ${o}`}],isError:!0}}};for(const o of f){if(!o.enabled)continue;const t=o.commandType,e=t===h?{type:"object",properties:{id:{type:"string",description:"The data item key of the node to expand"}},required:["id"]}:c.getDropDownTreeToolSchema(t);try{a.push(m.registerTool({name:l(o.name),description:o.description,inputSchema:e,execute:async p=>b(t,p||{})}))}catch{}}return a}};exports.dropDownTreeAdapter=S;
@@ -0,0 +1,108 @@
1
+ /**
2
+ * @license
3
+ *-------------------------------------------------------------------------------------------
4
+ * Copyright © 2026 Progress Software Corporation. All rights reserved.
5
+ * Licensed under commercial license. See LICENSE.md in the package root for more information
6
+ *-------------------------------------------------------------------------------------------
7
+ */
8
+ import { DropDownTreeCommands as s, getDropDownTreeToolSchema as E } from "../commands/dropdowntree.mjs";
9
+ const f = "DropDownTreeExpand";
10
+ function x(a, n, r, l) {
11
+ for (const c of a)
12
+ if (typeof c == "object" && c !== null) {
13
+ const u = c;
14
+ if (String(u[n]) === String(r))
15
+ return c;
16
+ const d = u[l];
17
+ if (Array.isArray(d)) {
18
+ const m = x(d, n, r, l);
19
+ if (m)
20
+ return m;
21
+ }
22
+ }
23
+ }
24
+ const v = {
25
+ componentSuffix: "dropdowntree",
26
+ createTools(a, n, r, l) {
27
+ const c = [], u = (o) => `${r.groupName}_${o}`, d = n.current, m = !!d.onChange, C = [
28
+ {
29
+ name: "open",
30
+ description: `Open the ${r.dataName} dropdown tree`,
31
+ commandType: s.Open,
32
+ enabled: !!d.onOpen
33
+ },
34
+ {
35
+ name: "expand",
36
+ description: `Expand a node in the ${r.dataName} dropdown tree`,
37
+ commandType: f,
38
+ enabled: !!d.onExpandChange
39
+ },
40
+ {
41
+ name: "select",
42
+ description: `Select a node in the ${r.dataName} dropdown tree`,
43
+ commandType: s.SetValue,
44
+ enabled: m
45
+ },
46
+ {
47
+ name: "close",
48
+ description: `Close the ${r.dataName} dropdown tree`,
49
+ commandType: s.Close,
50
+ enabled: !0
51
+ }
52
+ ], y = n.current.webMcp, w = typeof y == "object" && y !== null && typeof y.tools == "function" ? y.tools : void 0, b = w ? w(C) : C, g = async (o, t) => {
53
+ switch (o) {
54
+ case s.Open: {
55
+ const e = n.current;
56
+ return e.onOpen && e.onOpen({ syntheticEvent: null, target: a }), { content: [{ type: "text", text: "Dropdown tree opened." }] };
57
+ }
58
+ case f: {
59
+ const e = n.current, p = e.dataItemKey || "id", h = e.subItemsField || "items", i = x(e.data || [], p, t.id, h);
60
+ return e.onExpandChange && i && e.onExpandChange({ item: i, syntheticEvent: null, target: a }), {
61
+ content: [
62
+ {
63
+ type: "text",
64
+ text: i ? "Node expanded." : `Node with id "${String(t.id)}" not found.`
65
+ }
66
+ ]
67
+ };
68
+ }
69
+ case s.SetValue: {
70
+ const e = n.current, p = e.dataItemKey || "id", h = e.textField || "text", i = e.subItemsField || "items", T = e.data || [], D = x(T, p, t.value, i) || x(T, h, t.value, i);
71
+ return e.onChange && e.onChange({ value: D || t.value, syntheticEvent: null, target: a }), { content: [{ type: "text", text: `Selected "${String(t.value)}".` }] };
72
+ }
73
+ case s.Close: {
74
+ const e = n.current;
75
+ return e.onClose && e.onClose({ syntheticEvent: null, target: a }), { content: [{ type: "text", text: "Dropdown tree closed." }] };
76
+ }
77
+ default:
78
+ return { content: [{ type: "text", text: `Unknown command: ${o}` }], isError: !0 };
79
+ }
80
+ };
81
+ for (const o of b) {
82
+ if (!o.enabled)
83
+ continue;
84
+ const t = o.commandType, e = t === f ? {
85
+ type: "object",
86
+ properties: {
87
+ id: { type: "string", description: "The data item key of the node to expand" }
88
+ },
89
+ required: ["id"]
90
+ } : E(t);
91
+ try {
92
+ c.push(
93
+ l.registerTool({
94
+ name: u(o.name),
95
+ description: o.description,
96
+ inputSchema: e,
97
+ execute: async (p) => g(t, p || {})
98
+ })
99
+ );
100
+ } catch {
101
+ }
102
+ }
103
+ return c;
104
+ }
105
+ };
106
+ export {
107
+ v as dropDownTreeAdapter
108
+ };
@@ -0,0 +1,30 @@
1
+ /**
2
+ * @license
3
+ *-------------------------------------------------------------------------------------------
4
+ * Copyright © 2026 Progress Software Corporation. All rights reserved.
5
+ * Licensed under commercial license. See LICENSE.md in the package root for more information
6
+ *-------------------------------------------------------------------------------------------
7
+ */
8
+ import { ToolAdapter } from '../types';
9
+ /** Minimal structural shape of a ProseMirror EditorView used by this adapter. */
10
+ interface EditorViewLike {
11
+ state: {
12
+ schema: unknown;
13
+ doc: unknown;
14
+ [key: string]: unknown;
15
+ };
16
+ dispatch: (tr: unknown) => void;
17
+ [key: string]: unknown;
18
+ }
19
+ interface EditorAdapterHandle {
20
+ view?: EditorViewLike;
21
+ exportToPdf?: () => void;
22
+ }
23
+ interface EditorAdapterProps {
24
+ editorRef: React.RefObject<unknown>;
25
+ onChange?: (event: unknown) => void;
26
+ webMcp?: unknown;
27
+ }
28
+ /** @hidden */
29
+ export declare const editorAdapter: ToolAdapter<EditorAdapterHandle, EditorAdapterProps>;
30
+ export {};
@@ -0,0 +1,8 @@
1
+ /**
2
+ * @license
3
+ *-------------------------------------------------------------------------------------------
4
+ * Copyright © 2026 Progress Software Corporation. All rights reserved.
5
+ * Licensed under commercial license. See LICENSE.md in the package root for more information
6
+ *-------------------------------------------------------------------------------------------
7
+ */
8
+ "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const i=require("../commands/editor.js"),c=require("@progress/kendo-react-editor"),P={componentSuffix:"editor",createTools(t,p,n,l){const d=[],y=e=>`${n.groupName}_${e}`,v=p.current,u=!!(t!=null&&t.view),a=!!v.onChange,f=[{name:"get_content",description:`Get the current HTML content of the ${n.dataName} editor.`,commandType:i.EditorCommands.GetValue,enabled:!0},{name:"set_content",description:`Replace the entire content of the ${n.dataName} editor with the provided HTML.`,commandType:i.EditorCommands.SetValue,enabled:u||a},{name:"insert_html",description:`Insert HTML content at the cursor position in the ${n.dataName} editor.`,commandType:i.EditorCommands.SetValue,enabled:u||a},{name:"clear_content",description:`Clear all content from the ${n.dataName} editor.`,commandType:i.EditorCommands.GetValue,enabled:u||a},{name:"export_pdf",description:`Export the ${n.dataName} editor content to PDF.`,commandType:i.EditorCommands.GetValue,enabled:!!(t!=null&&t.exportToPdf)}],s=p.current.webMcp,x=typeof s=="object"&&s!==null&&typeof s.tools=="function"?s.tools:void 0,E=x?x(f):f,m={content:[{type:"text",text:"Editor ref or view not available."}],isError:!0};function T(){return t!=null&&t.view?{content:[{type:"text",text:c.EditorUtils.getHtml(t.view.state)||"(empty)"}]}:m}function w(e){if(!(t!=null&&t.view))return m;const o=e.value;return o==null?{content:[{type:"text",text:"Missing required argument: value"}],isError:!0}:(c.EditorUtils.setHtml(t.view,o),{content:[{type:"text",text:"Content replaced."}]})}function C(e){if(!(t!=null&&t.view))return m;const o=e.value;if(!o)return{content:[{type:"text",text:"Missing required argument: value"}],isError:!0};const r=c.EditorUtils.createDocument(t.view.state.schema,o);return r&&c.EditorUtils.insertNode(t.view,r),{content:[{type:"text",text:"HTML inserted at cursor position."}]}}function b(){return t!=null&&t.view?(c.EditorUtils.setHtml(t.view,""),{content:[{type:"text",text:"Content cleared."}]}):m}function g(){return t?(t.exportToPdf&&t.exportToPdf(),{content:[{type:"text",text:"PDF export triggered."}]}):{content:[{type:"text",text:"Editor ref not available."}],isError:!0}}const _=(e,o,r)=>{switch(o){case"get_content":return T();case"set_content":return w(r);case"insert_html":return C(r);case"clear_content":return b();case"export_pdf":return g();default:return{content:[{type:"text",text:`Unknown command: ${o}`}],isError:!0}}};for(const e of E){if(!e.enabled)continue;const o=i.getEditorToolSchema(e.commandType),r=e.commandType,M=e.name;try{d.push(l.registerTool({name:y(e.name),description:e.description,inputSchema:o,execute:H=>Promise.resolve(_(r,M,H||{}))}))}catch{}}return d}};exports.editorAdapter=P;
@@ -0,0 +1,109 @@
1
+ /**
2
+ * @license
3
+ *-------------------------------------------------------------------------------------------
4
+ * Copyright © 2026 Progress Software Corporation. All rights reserved.
5
+ * Licensed under commercial license. See LICENSE.md in the package root for more information
6
+ *-------------------------------------------------------------------------------------------
7
+ */
8
+ import { EditorCommands as c, getEditorToolSchema as $ } from "../commands/editor.mjs";
9
+ import { EditorUtils as i } from "@progress/kendo-react-editor";
10
+ const V = {
11
+ componentSuffix: "editor",
12
+ createTools(t, p, n, y) {
13
+ const f = [], v = (e) => `${n.groupName}_${e}`, l = p.current, u = !!(t != null && t.view), a = !!l.onChange, x = [
14
+ {
15
+ name: "get_content",
16
+ description: `Get the current HTML content of the ${n.dataName} editor.`,
17
+ commandType: c.GetValue,
18
+ enabled: !0
19
+ },
20
+ {
21
+ name: "set_content",
22
+ description: `Replace the entire content of the ${n.dataName} editor with the provided HTML.`,
23
+ commandType: c.SetValue,
24
+ enabled: u || a
25
+ },
26
+ {
27
+ name: "insert_html",
28
+ description: `Insert HTML content at the cursor position in the ${n.dataName} editor.`,
29
+ commandType: c.SetValue,
30
+ enabled: u || a
31
+ },
32
+ {
33
+ name: "clear_content",
34
+ description: `Clear all content from the ${n.dataName} editor.`,
35
+ commandType: c.GetValue,
36
+ enabled: u || a
37
+ },
38
+ {
39
+ name: "export_pdf",
40
+ description: `Export the ${n.dataName} editor content to PDF.`,
41
+ commandType: c.GetValue,
42
+ enabled: !!(t != null && t.exportToPdf)
43
+ }
44
+ ], s = p.current.webMcp, d = typeof s == "object" && s !== null && typeof s.tools == "function" ? s.tools : void 0, T = d ? d(x) : x, m = {
45
+ content: [{ type: "text", text: "Editor ref or view not available." }],
46
+ isError: !0
47
+ };
48
+ function w() {
49
+ return t != null && t.view ? { content: [{ type: "text", text: i.getHtml(t.view.state) || "(empty)" }] } : m;
50
+ }
51
+ function C(e) {
52
+ if (!(t != null && t.view))
53
+ return m;
54
+ const o = e.value;
55
+ return o == null ? { content: [{ type: "text", text: "Missing required argument: value" }], isError: !0 } : (i.setHtml(t.view, o), { content: [{ type: "text", text: "Content replaced." }] });
56
+ }
57
+ function b(e) {
58
+ if (!(t != null && t.view))
59
+ return m;
60
+ const o = e.value;
61
+ if (!o)
62
+ return { content: [{ type: "text", text: "Missing required argument: value" }], isError: !0 };
63
+ const r = i.createDocument(t.view.state.schema, o);
64
+ return r && i.insertNode(t.view, r), { content: [{ type: "text", text: "HTML inserted at cursor position." }] };
65
+ }
66
+ function E() {
67
+ return t != null && t.view ? (i.setHtml(t.view, ""), { content: [{ type: "text", text: "Content cleared." }] }) : m;
68
+ }
69
+ function g() {
70
+ return t ? (t.exportToPdf && t.exportToPdf(), { content: [{ type: "text", text: "PDF export triggered." }] }) : { content: [{ type: "text", text: "Editor ref not available." }], isError: !0 };
71
+ }
72
+ const _ = (e, o, r) => {
73
+ switch (o) {
74
+ case "get_content":
75
+ return w();
76
+ case "set_content":
77
+ return C(r);
78
+ case "insert_html":
79
+ return b(r);
80
+ case "clear_content":
81
+ return E();
82
+ case "export_pdf":
83
+ return g();
84
+ default:
85
+ return { content: [{ type: "text", text: `Unknown command: ${o}` }], isError: !0 };
86
+ }
87
+ };
88
+ for (const e of T) {
89
+ if (!e.enabled)
90
+ continue;
91
+ const o = $(e.commandType), r = e.commandType, H = e.name;
92
+ try {
93
+ f.push(
94
+ y.registerTool({
95
+ name: v(e.name),
96
+ description: e.description,
97
+ inputSchema: o,
98
+ execute: (M) => Promise.resolve(_(r, H, M || {}))
99
+ })
100
+ );
101
+ } catch {
102
+ }
103
+ }
104
+ return f;
105
+ }
106
+ };
107
+ export {
108
+ V as editorAdapter
109
+ };
@@ -0,0 +1,20 @@
1
+ /**
2
+ * @license
3
+ *-------------------------------------------------------------------------------------------
4
+ * Copyright © 2026 Progress Software Corporation. All rights reserved.
5
+ * Licensed under commercial license. See LICENSE.md in the package root for more information
6
+ *-------------------------------------------------------------------------------------------
7
+ */
8
+ import { ToolAdapter } from '../types';
9
+ interface FormHandle {
10
+ onChange(name: string, event: {
11
+ value: unknown;
12
+ }): void;
13
+ onSubmit(event: React.SyntheticEvent<HTMLFormElement>): void;
14
+ onReset(): void;
15
+ fields?: string[];
16
+ errors?: Record<string, unknown>;
17
+ }
18
+ /** @hidden */
19
+ export declare const formAdapter: ToolAdapter<FormHandle, Record<string, unknown>>;
20
+ export {};