PluginProbe
Elementor Website Builder – more than just a page builder / trunk
Elementor Website Builder – more than just a page builder vtrunk
4.3.4 4.3.3 4.3.2 4.3.1 4.3.0 4.3.0-beta3 4.3.0-beta2 4.3.0-beta1 4.2.4 4.2.3 4.2.2 4.2.1 4.2.0 4.1.5 4.2.0-beta2 4.2.0-dev2 4.2.0-beta1 4.1.4 4.1.3 4.1.2 4.1.1 4.1.0 4.1.0-beta3 4.1.0-dev3 4.0.9 All 457 releases
← All changes | assets/js/packages/elementor-kit-mcp/elementor-kit-mcp.js +279 -2 4.1.0-dev3 → trunk View file →
@@ -1,3 +1,280 @@
1 -/*! For license information please see elementor-kit-mcp.js.LICENSE.txt */
2 -!function(){"use strict";var e={"./packages/packages/core/elementor-kit-mcp/src/elementor-kit-mcp-server.ts":function(e,t,n){n.r(t),n.d(t,{createElementorKitServer:function(){return createElementorKitServer}});var i=n("@elementor/editor-mcp"),o=n("@elementor/elementor-mcp-common"),r=n("@elementor/schema"),a=n("./packages/packages/core/elementor-kit-mcp/src/mcp-description-resource.ts");const s="elementor-kit-fonts",c="elementor://kit/fonts",l="elementor-kit-schema",p="elementor://kit/schema/{tab}",m="elementor-kit-settings",u="elementor://kit/settings",d="2.0.0";async function fetchKitFonts(){return(0,o.callWpApi)("/angie/v1/elementor-kit/fonts","GET")}async function fetchKitSchema(){return(0,o.callWpApi)("/angie/v1/elementor-kit/schema","GET")}function sanitizeMediaFields(e){const t=["site_logo","site_icon"],n={...e};for(const e of t)e in n&&""===n[e]&&(n[e]=0);return n}const g=r.z.object({title:r.z.string(),color:r.z.string()}),f=r.z.object({title:r.z.string(),typography_typography:r.z.string(),typography_font_family:r.z.string().describe("Font family name that must be from the available Elementor fonts list. Use the get-fonts endpoint (/angie/v1/elementor-kit/fonts) to get the complete list of available fonts. Only use fonts that exist in this list to avoid validation errors."),typography_font_weight:r.z.string(),typography_font_size:r.z.object({unit:r.z.string(),size:r.z.number()}).optional(),typography_font_size_tablet:r.z.object({unit:r.z.string(),size:r.z.number()}).optional(),typography_font_size_mobile:r.z.object({unit:r.z.string(),size:r.z.number()}).optional(),typography_line_height:r.z.object({unit:r.z.string(),size:r.z.number()}).optional()}).passthrough(),y=g.extend({_id:r.z.enum(["primary","secondary","text","accent"])}),h=f.extend({_id:r.z.enum(["primary","secondary","text","accent"])}),b=g.extend({_id:r.z.string()}),_=f.extend({_id:r.z.string()}),w=r.z.array(y).length(4),k=r.z.array(h).length(4),v=r.z.array(b),S=r.z.array(_),E=r.z.record(r.z.unknown()).describe("General patch object for any other Elementor kit settings like spacing, buttons, forms, layout settings, etc.");async function createElementorKitServer(){await(0,o.waitForElementorEditor)();const e=new i.McpServer({name:"elementor-kit-server",version:d,title:"Elementor Kit"},{instructions:"Manages Elementor global design system: colors, typography, and site identity.",capabilities:{resources:{subscribe:!0}}});(0,a.addKitDescriptionResource)(e);e.registerResource(s,c,{title:"Elementor Kit Available Fonts",description:"Complete list of all available font families that can be used in Elementor, including system fonts, Google fonts, and custom uploaded fonts"},async e=>{const t=await fetchKitFonts();return{contents:[{uri:e.href,mimeType:"application/json",text:JSON.stringify(t,null,2)}]}}),e.registerResource(m,u,{title:"Elementor Kit Current Settings",description:"Complete current Elementor global kit configuration including all system and custom colors, typography settings, spacing, buttons, forms, and other site-wide design settings"},async e=>{const t=await async function fetchKitSettings(){return(0,o.callWpApi)("/angie/v1/elementor-kit","GET")}();return{contents:[{uri:e.href,mimeType:"application/json",text:JSON.stringify(t,null,2)}]}});const t=await(async()=>{const e=await fetchKitSchema();return Object.keys(e.data||{})})();e.registerResource(l,new i.ResourceTemplate(p,{list:async()=>({resources:t.map(e=>({uri:`elementor://kit/schema/${e}`,name:`${l}-${e}`,title:`Elementor Kit Schema - ${e}`,description:`Schema definition for Elementor kit ${e} settings tab`,mimeType:"application/json"}))})}),{title:"Elementor Kit Schema",description:"Complete schema definition for a specific Elementor kit settings tab, showing all available fields, their types, valid values, and configuration options"},async(e,t)=>{const n=Array.isArray(t.tab)?t.tab[0]:t.tab;if(!n)throw new Error("Tab parameter is required");const i=await fetchKitSchema(),o=i.data?.[n];if(!o)throw new Error(`No schema found for tab '${n}'. Available tabs: ${Object.keys(i.data).join(", ")}`);return{contents:[{uri:e.toString(),mimeType:"application/json",text:JSON.stringify(o,null,2)}]}}),e.registerTool("update-elementor-kit-settings-colors-and-fonts",{description:"This tool applies configuration changes to Elementor global kit settings that control site-wide design elements. Use this when you need to modify global colors, typography, spacing, buttons, form fields, or other theme-wide settings that affect the entire website appearance.\n\nThe tool will permanently update the site's global design settings and return a success confirmation with the updated configuration data.",inputSchema:{systemColors:w.optional().nullable().describe("System colors array with exactly 4 items having IDs: primary, secondary, text, accent"),systemTypography:k.optional().nullable().describe("System typography array with exactly 4 items having IDs: primary, secondary, text, accent"),customColors:v.optional().nullable().describe("Custom colors array - flexible structure for additional color definitions"),customTypography:S.optional().nullable().describe("Custom typography array - flexible structure for additional font definitions (no color field needed)"),patchObject:E.optional().nullable().describe("General patch object for any other Elementor kit settings like spacing, buttons, forms, layout settings, etc."),confirmationMessage:r.z.string().describe('REQUIRED: Provide a clear explanation in **markdown format** of what Elementor kit settings will be changed and their potential impact on the site\'s global design. This message will be shown to the user before proceeding. Be specific about which design elements are being modified (colors, typography, spacing, etc.) and how they will affect the entire website. Examples: "You\'re about to update the global **primary color** from `blue` to `green`. This will change **buttons**, **links**, and **accent colors** throughout your entire site." or "You\'re about to change the **primary font** from `Roboto` to `Open Sans`. This will affect **headings** across all pages."')},annotations:{title:"Update Elementor Kit Settings",destructiveHint:!0},_meta:{"angie/requiredResources":[{uri:a.KIT_DESCRIPTION_URI,whenToUse:"Read first for kit capabilities and limitations"}]}},async({systemColors:e,systemTypography:t,customColors:n,customTypography:i,patchObject:r,confirmationMessage:a})=>{(0,o.requireConfirmationMessage)(a,"Elementor kit settings");const s=await async function validateFonts(e,t){const n=await fetchKitFonts(),i=Object.keys(n.data.fonts||{}),o=[];return[e,t].forEach(e=>{e&&e.forEach(e=>{e.typography_font_family&&!i.includes(e.typography_font_family)&&o.push(e.typography_font_family)})}),o.length>0?`Please use available fonts only. Invalid fonts: ${o.join(", ")}. Available fonts: ${i.join(", ")}`:""}(t,i);if(s)throw new Error(s);const c={...e&&{system_colors:e},...t&&{system_typography:t},...n&&{custom_colors:n},...i&&{custom_typography:i},...sanitizeMediaFields(r||{})};if(0===Object.keys(c).length)throw new Error("At least one update must be provided (systemColors, systemTypography, customColors, customTypography, or patchObject)");const l=await(0,o.callWpApi)("/angie/v1/elementor-kit","POST",c);return{content:[{type:"text",text:JSON.stringify({success:!0,message:"Settings updated successfully",data:l,appliedSettings:c},null,2)}]}});const n=(0,i.getAngieSdk)();return await n.waitForReady(),n.registerLocalServer({server:e,version:d,description:a.KIT_DESCRIPTION,name:"elementor-kit-server"}),e}},"./packages/packages/core/elementor-kit-mcp/src/init.ts":function(e,t,n){n.r(t),n.d(t,{init:function(){return init}});var i=n("./packages/packages/core/elementor-kit-mcp/src/elementor-kit-mcp-server.ts");function init(){(0,i.createElementorKitServer)()}},"./packages/packages/core/elementor-kit-mcp/src/mcp-description-resource.ts":function(e,t,n){n.r(t),n.d(t,{KIT_DESCRIPTION:function(){return o},KIT_DESCRIPTION_URI:function(){return i},addKitDescriptionResource:function(){return addKitDescriptionResource}});const i="elementor://kit/server-description",o="## Elementor Kit Settings Management\n\n### Capabilities:\n**Global Design System:**\n- Create, update, name, and delete global colors (both system and custom)\n- Create, update, name, and delete global fonts (both system and custom)\n\n**Site Identity:**\n- Insert site logo\n- Set site favicon\n- Update site name\n- Modify site description\n\n### Limitations:\n**Theme Style Settings:**\n- Cannot set or update Elementor Theme Style settings including typography, buttons, images, form fields, Hello Theme header, or Hello Theme footer that affect the entire website appearance\n\n**Site-Wide Settings:**\n- Cannot set site-wide background (color or image)\n- Cannot configure mobile browser background\n- Cannot modify global layout settings such as content width, container padding, and widget gaps (the default space between widgets)\n\n**Note**: Angie can adjust all of these layout properties at the container or page level - just not site-wide.";function addKitDescriptionResource(e){e.registerResource("elementor-kit-server-description",i,{title:"Elementor Kit Server Description",description:"Elementor Kit capabilities and limitations",mimeType:"text/plain"},async e=>({contents:[{uri:e.href,mimeType:"text/plain",text:o}]}))}},"@elementor/editor-mcp":function(e){e.exports=window.elementorV2.editorMcp},"@elementor/elementor-mcp-common":function(e){e.exports=window.elementorV2.elementorMcpCommon},"@elementor/schema":function(e){e.exports=window.elementorV2.schema}},t={};function __webpack_require__(n){var i=t[n];if(void 0!==i)return i.exports;var o=t[n]={exports:{}};return e[n](o,o.exports,__webpack_require__),o.exports}__webpack_require__.n=function(e){var t=e&&e.__esModule?function(){return e.default}:function(){return e};return __webpack_require__.d(t,{a:t}),t},__webpack_require__.d=function(e,t){for(var n in t)__webpack_require__.o(t,n)&&!__webpack_require__.o(e,n)&&Object.defineProperty(e,n,{enumerable:!0,get:t[n]})},__webpack_require__.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},__webpack_require__.r=function(e){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})};var n={};!function(){__webpack_require__.r(n),__webpack_require__.d(n,{createElementorKitServer:function(){return e.createElementorKitServer},init:function(){return t.init}});var e=__webpack_require__("./packages/packages/core/elementor-kit-mcp/src/elementor-kit-mcp-server.ts"),t=__webpack_require__("./packages/packages/core/elementor-kit-mcp/src/init.ts")}(),(window.elementorV2=window.elementorV2||{}).elementorKitMcp=n}(),window.elementorV2.elementorKitMcp?.init?.();
1 +(function(_elementor_editor_mcp, _elementor_elementor_mcp_common, _elementor_schema) {
2 +
3 +//#region \0rolldown/runtime.js
4 + var __defProp = Object.defineProperty;
5 + var __name = (target, value) => __defProp(target, "name", {
6 + value,
7 + configurable: true
8 + });
9 + var __exportAll = (all, no_symbols) => {
10 + let target = {};
11 + for (var name in all) {
12 + __defProp(target, name, {
13 + get: all[name],
14 + enumerable: true
15 + });
16 + }
17 + if (!no_symbols) {
18 + __defProp(target, Symbol.toStringTag, { value: "Module" });
19 + }
20 + return target;
21 + };
22 +
23 +//#endregion
24 +
25 +//#region packages/packages/core/elementor-kit-mcp/src/mcp-description-resource.ts
26 + var KIT_DESCRIPTION_URI = "elementor://kit/server-description";
27 + var KIT_DESCRIPTION = `## Elementor Kit Settings Management
28 +
29 +### Capabilities:
30 +**Global Design System:**
31 +- Create, update, name, and delete global colors (both system and custom)
32 +- Create, update, name, and delete global fonts (both system and custom)
33 +
34 +**Site Identity:**
35 +- Insert site logo
36 +- Set site favicon
37 +- Update site name
38 +- Modify site description
39 +
40 +### Limitations:
41 +**Theme Style Settings:**
42 +- Cannot set or update Elementor Theme Style settings including typography, buttons, images, form fields, Hello Theme header, or Hello Theme footer that affect the entire website appearance
43 +
44 +**Site-Wide Settings:**
45 +- Cannot set site-wide background (color or image)
46 +- Cannot configure mobile browser background
47 +- Cannot modify global layout settings such as content width, container padding, and widget gaps (the default space between widgets)
48 +
49 +**Note**: Angie can adjust all of these layout properties at the container or page level - just not site-wide.`;
50 + function addKitDescriptionResource(server) {
51 + server.registerResource("elementor-kit-server-description", KIT_DESCRIPTION_URI, {
52 + title: "Elementor Kit Server Description",
53 + description: "Elementor Kit capabilities and limitations",
54 + mimeType: "text/plain"
55 + }, async (uri) => ({ contents: [{
56 + uri: uri.href,
57 + mimeType: "text/plain",
58 + text: KIT_DESCRIPTION
59 + }] }));
60 + }
61 +
62 +//#endregion
63 +//#region packages/packages/core/elementor-kit-mcp/src/elementor-kit-mcp-server.ts
64 + var RESOURCE_NAME_KIT_FONTS = "elementor-kit-fonts";
65 + var RESOURCE_URI_KIT_FONTS = "elementor://kit/fonts";
66 + var RESOURCE_NAME_KIT_SCHEMA = "elementor-kit-schema";
67 + var RESOURCE_URI_KIT_SCHEMA_TEMPLATE = "elementor://kit/schema/{tab}";
68 + var RESOURCE_NAME_KIT_SETTINGS = "elementor-kit-settings";
69 + var RESOURCE_URI_KIT_SETTINGS = "elementor://kit/settings";
70 + var VERSION = "2.0.0";
71 + async function fetchKitFonts() {
72 + return (0, _elementor_elementor_mcp_common.callWpApi)(`/angie/v1/elementor-kit/fonts`, "GET");
73 + }
74 + async function fetchKitSchema() {
75 + return (0, _elementor_elementor_mcp_common.callWpApi)(`/angie/v1/elementor-kit/schema`, "GET");
76 + }
77 + async function fetchKitSettings() {
78 + return (0, _elementor_elementor_mcp_common.callWpApi)(`/angie/v1/elementor-kit`, "GET");
79 + }
80 + async function validateFonts(systemTypography, customTypography) {
81 + const fontsResponse = await fetchKitFonts();
82 + const availableFonts = Object.keys(fontsResponse.data.fonts || {});
83 + const invalidFonts = [];
84 + [systemTypography, customTypography].forEach((typography) => {
85 + if (typography) typography.forEach((item) => {
86 + if (item.typography_font_family && !availableFonts.includes(item.typography_font_family)) invalidFonts.push(item.typography_font_family);
87 + });
88 + });
89 + if (invalidFonts.length > 0) return `Please use available fonts only. Invalid fonts: ${invalidFonts.join(", ")}. Available fonts: ${availableFonts.join(", ")}`;
90 + return "";
91 + }
92 + function sanitizeMediaFields(obj) {
93 + const mediaFields = ["site_logo", "site_icon"];
94 + const sanitized = { ...obj };
95 + for (const field of mediaFields) if (field in sanitized && sanitized[field] === "") sanitized[field] = 0;
96 + return sanitized;
97 + }
98 + var baseColorSchema = _elementor_schema.z.object({
99 + title: _elementor_schema.z.string(),
100 + color: _elementor_schema.z.string()
101 + });
102 + var baseTypographySchema = _elementor_schema.z.object({
103 + title: _elementor_schema.z.string(),
104 + typography_typography: _elementor_schema.z.string(),
105 + typography_font_family: _elementor_schema.z.string().describe("Font family name that must be from the available Elementor fonts list. Use the get-fonts endpoint (/angie/v1/elementor-kit/fonts) to get the complete list of available fonts. Only use fonts that exist in this list to avoid validation errors."),
106 + typography_font_weight: _elementor_schema.z.string(),
107 + typography_font_size: _elementor_schema.z.object({
108 + unit: _elementor_schema.z.string(),
109 + size: _elementor_schema.z.number()
110 + }).optional(),
111 + typography_font_size_tablet: _elementor_schema.z.object({
112 + unit: _elementor_schema.z.string(),
113 + size: _elementor_schema.z.number()
114 + }).optional(),
115 + typography_font_size_mobile: _elementor_schema.z.object({
116 + unit: _elementor_schema.z.string(),
117 + size: _elementor_schema.z.number()
118 + }).optional(),
119 + typography_line_height: _elementor_schema.z.object({
120 + unit: _elementor_schema.z.string(),
121 + size: _elementor_schema.z.number()
122 + }).optional()
123 + }).passthrough();
124 + var systemColorItemSchema = baseColorSchema.extend({ _id: _elementor_schema.z.enum([
125 + "primary",
126 + "secondary",
127 + "text",
128 + "accent"
129 + ]) });
130 + var systemTypographyItemSchema = baseTypographySchema.extend({ _id: _elementor_schema.z.enum([
131 + "primary",
132 + "secondary",
133 + "text",
134 + "accent"
135 + ]) });
136 + var customColorItemSchema = baseColorSchema.extend({ _id: _elementor_schema.z.string() });
137 + var customTypographyItemSchema = baseTypographySchema.extend({ _id: _elementor_schema.z.string() });
138 + var systemColorsSchema = _elementor_schema.z.array(systemColorItemSchema).length(4);
139 + var systemTypographySchema = _elementor_schema.z.array(systemTypographyItemSchema).length(4);
140 + var customColorsSchema = _elementor_schema.z.array(customColorItemSchema);
141 + var customTypographySchema = _elementor_schema.z.array(customTypographyItemSchema);
142 + var generalPatchSchema = _elementor_schema.z.record(_elementor_schema.z.unknown()).describe("General patch object for any other Elementor kit settings like spacing, buttons, forms, layout settings, etc.");
143 + var SERVER_INSTRUCTIONS = "Manages Elementor global design system: colors, typography, and site identity.";
144 + async function createElementorKitServer() {
145 + await (0, _elementor_elementor_mcp_common.waitForElementorEditor)();
146 + const server = new _elementor_editor_mcp.McpServer({
147 + name: "elementor-kit-server",
148 + version: VERSION,
149 + title: "Elementor Kit"
150 + }, {
151 + instructions: SERVER_INSTRUCTIONS,
152 + capabilities: { resources: { subscribe: true } }
153 + });
154 + addKitDescriptionResource(server);
155 + const getAvailableTabs = async () => {
156 + const kitSchema = await fetchKitSchema();
157 + return Object.keys(kitSchema.data || {});
158 + };
159 + server.registerResource(RESOURCE_NAME_KIT_FONTS, RESOURCE_URI_KIT_FONTS, {
160 + title: "Elementor Kit Available Fonts",
161 + description: "Complete list of all available font families that can be used in Elementor, including system fonts, Google fonts, and custom uploaded fonts"
162 + }, async (uri) => {
163 + const fontsResponse = await fetchKitFonts();
164 + return { contents: [{
165 + uri: uri.href,
166 + mimeType: "application/json",
167 + text: JSON.stringify(fontsResponse, null, 2)
168 + }] };
169 + });
170 + server.registerResource(RESOURCE_NAME_KIT_SETTINGS, RESOURCE_URI_KIT_SETTINGS, {
171 + title: "Elementor Kit Current Settings",
172 + description: "Complete current Elementor global kit configuration including all system and custom colors, typography settings, spacing, buttons, forms, and other site-wide design settings"
173 + }, async (uri) => {
174 + const currentSettings = await fetchKitSettings();
175 + return { contents: [{
176 + uri: uri.href,
177 + mimeType: "application/json",
178 + text: JSON.stringify(currentSettings, null, 2)
179 + }] };
180 + });
181 + server.registerResource(RESOURCE_NAME_KIT_SCHEMA, new _elementor_editor_mcp.ResourceTemplate(RESOURCE_URI_KIT_SCHEMA_TEMPLATE, { list: async () => {
182 + return { resources: (await getAvailableTabs()).map((tab) => {
183 + return {
184 + uri: `elementor://kit/schema/${tab}`,
185 + name: `${RESOURCE_NAME_KIT_SCHEMA}-${tab}`,
186 + title: `Elementor Kit Schema - ${tab}`,
187 + description: `Schema definition for Elementor kit ${tab} settings tab`,
188 + mimeType: "application/json"
189 + };
190 + }) };
191 + } }), {
192 + title: "Elementor Kit Schema",
193 + description: "Complete schema definition for a specific Elementor kit settings tab, showing all available fields, their types, valid values, and configuration options"
194 + }, async (uri, variables) => {
195 + const tab = Array.isArray(variables.tab) ? variables.tab[0] : variables.tab;
196 + if (!tab) throw new Error("Tab parameter is required");
197 + const kitSchema = await fetchKitSchema();
198 + const tabSchema = kitSchema.data?.[tab];
199 + if (!tabSchema) throw new Error(`No schema found for tab '${tab}'. Available tabs: ${Object.keys(kitSchema.data).join(", ")}`);
200 + return { contents: [{
201 + uri: uri.toString(),
202 + mimeType: "application/json",
203 + text: JSON.stringify(tabSchema, null, 2)
204 + }] };
205 + });
206 + server.registerTool("update-elementor-kit-settings-colors-and-fonts", {
207 + description: `This tool applies configuration changes to Elementor global kit settings that control site-wide design elements. Use this when you need to modify global colors, typography, spacing, buttons, form fields, or other theme-wide settings that affect the entire website appearance.
208 +
209 +The tool will permanently update the site's global design settings and return a success confirmation with the updated configuration data.`,
210 + inputSchema: {
211 + systemColors: systemColorsSchema.optional().nullable().describe("System colors array with exactly 4 items having IDs: primary, secondary, text, accent"),
212 + systemTypography: systemTypographySchema.optional().nullable().describe("System typography array with exactly 4 items having IDs: primary, secondary, text, accent"),
213 + customColors: customColorsSchema.optional().nullable().describe("Custom colors array - flexible structure for additional color definitions"),
214 + customTypography: customTypographySchema.optional().nullable().describe("Custom typography array - flexible structure for additional font definitions (no color field needed)"),
215 + patchObject: generalPatchSchema.optional().nullable().describe("General patch object for any other Elementor kit settings like spacing, buttons, forms, layout settings, etc."),
216 + confirmationMessage: _elementor_schema.z.string().describe("REQUIRED: Provide a clear explanation in **markdown format** of what Elementor kit settings will be changed and their potential impact on the site's global design. This message will be shown to the user before proceeding. Be specific about which design elements are being modified (colors, typography, spacing, etc.) and how they will affect the entire website. Examples: \"You're about to update the global **primary color** from `blue` to `green`. This will change **buttons**, **links**, and **accent colors** throughout your entire site.\" or \"You're about to change the **primary font** from `Roboto` to `Open Sans`. This will affect **headings** across all pages.\"")
217 + },
218 + annotations: {
219 + title: "Update Elementor Kit Settings",
220 + destructiveHint: true
221 + },
222 + _meta: { "angie/requiredResources": [{
223 + uri: KIT_DESCRIPTION_URI,
224 + whenToUse: "Read first for kit capabilities and limitations"
225 + }] }
226 + }, async ({ systemColors, systemTypography, customColors, customTypography, patchObject, confirmationMessage }) => {
227 + (0, _elementor_elementor_mcp_common.requireConfirmationMessage)(confirmationMessage, "Elementor kit settings");
228 + const invalidFonts = await validateFonts(systemTypography, customTypography);
229 + if (invalidFonts) throw new Error(invalidFonts);
230 + const completePatchObject = {
231 + ...systemColors && { system_colors: systemColors },
232 + ...systemTypography && { system_typography: systemTypography },
233 + ...customColors && { custom_colors: customColors },
234 + ...customTypography && { custom_typography: customTypography },
235 + ...sanitizeMediaFields(patchObject || {})
236 + };
237 + if (Object.keys(completePatchObject).length === 0) throw new Error("At least one update must be provided (systemColors, systemTypography, customColors, customTypography, or patchObject)");
238 + const response = await (0, _elementor_elementor_mcp_common.callWpApi)(`/angie/v1/elementor-kit`, "POST", completePatchObject);
239 + return { content: [{
240 + type: "text",
241 + text: JSON.stringify({
242 + success: true,
243 + message: "Settings updated successfully",
244 + data: response,
245 + appliedSettings: completePatchObject
246 + }, null, 2)
247 + }] };
248 + });
249 + const sdk = (0, _elementor_editor_mcp.getAngieSdk)();
250 + await sdk.waitForReady();
251 + sdk.registerLocalServer({
252 + server,
253 + version: VERSION,
254 + description: SERVER_INSTRUCTIONS,
255 + name: "elementor-kit-server"
256 + });
257 + return server;
258 + }
259 +
260 +//#endregion
261 +//#region packages/packages/core/elementor-kit-mcp/src/init.ts
262 + function init() {
263 + createElementorKitServer();
264 + }
265 +
266 +//#endregion
267 +//#region packages/packages/core/elementor-kit-mcp/src/index.ts
268 + var src_exports = /* @__PURE__ */ __exportAll({
269 + createElementorKitServer: () => createElementorKitServer,
270 + init: () => init
271 + });
272 +
273 +//#endregion
274 +//#region \0elementor-package-library-entry
275 + (window.elementorV2 = window.elementorV2 || {}).elementorKitMcp = src_exports;
276 +
277 +//#endregion
278 +})(elementorV2.editorMcp, elementorV2.elementorMcpCommon, elementorV2.schema);
279 +window.elementorV2.elementorKitMcp?.init?.();
3 280 //# sourceMappingURL=elementor-kit-mcp.js.map