@elementor/editor-global-classes 4.1.0-721 → 4.1.0-723

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.mjs CHANGED
@@ -1,6 +1,3 @@
1
- // src/mcp-integration/classes-resource.ts
2
- import { getMCPByDomain } from "@elementor/editor-mcp";
3
-
4
1
  // src/global-classes-styles-provider.ts
5
2
  import { generateId } from "@elementor/editor-styles";
6
3
  import { createStylesProvider } from "@elementor/editor-styles-repository";
@@ -539,9 +536,7 @@ var updateLocalStorageCache = () => {
539
536
  const classes = globalClassesStylesProvider.actions.all();
540
537
  localStorage.setItem(STORAGE_KEY, JSON.stringify(classes));
541
538
  };
542
- var initClassesResource = () => {
543
- const canvasMcpEntry = getMCPByDomain("canvas");
544
- const classesMcpEntry = getMCPByDomain("classes");
539
+ var initClassesResource = (classesMcpEntry, canvasMcpEntry) => {
545
540
  [canvasMcpEntry, classesMcpEntry].forEach((entry) => {
546
541
  const { mcpServer, resource, waitForReady } = entry;
547
542
  resource(
@@ -573,6 +568,7 @@ import {
573
568
  injectIntoCssClassConvert,
574
569
  registerStyleProviderToColors
575
570
  } from "@elementor/editor-editing-panel";
571
+ import { getMCPByDomain } from "@elementor/editor-mcp";
576
572
  import { __registerPanel as registerPanel } from "@elementor/editor-panels";
577
573
  import { stylesRepository } from "@elementor/editor-styles-repository";
578
574
  import { __registerSlice as registerSlice } from "@elementor/store";
@@ -2641,9 +2637,6 @@ function PopulateStore() {
2641
2637
  return null;
2642
2638
  }
2643
2639
 
2644
- // src/mcp-integration/index.ts
2645
- import { getMCPByDomain as getMCPByDomain2 } from "@elementor/editor-mcp";
2646
-
2647
2640
  // src/mcp-integration/mcp-apply-unapply-global-classes.ts
2648
2641
  import { doApplyClasses, doGetAppliedClasses, doUnapplyClass } from "@elementor/editor-editing-panel";
2649
2642
  import { z } from "@elementor/schema";
@@ -3072,14 +3065,21 @@ async function attemptDelete(opts) {
3072
3065
  }
3073
3066
 
3074
3067
  // src/mcp-integration/index.ts
3075
- var initMcpIntegration = () => {
3076
- const reg = getMCPByDomain2("classes", {
3077
- instructions: "MCP server for management of Elementor global classes"
3078
- });
3068
+ var initMcpIntegration = (reg, canvasMcpEntry) => {
3069
+ const { setMCPDescription } = reg;
3070
+ setMCPDescription(
3071
+ `Everything related to V4 ( Atomic ) global classes.
3072
+ # Global classes
3073
+ - Create/update/delete global classes
3074
+ - Get list of global classes
3075
+ - Get details of a global class
3076
+ - Get details of a global class
3077
+ `
3078
+ );
3079
3079
  initMcpApplyUnapplyGlobalClasses(reg);
3080
3080
  initMcpApplyGetGlobalClassUsages(reg);
3081
3081
  initManageGlobalClasses(reg);
3082
- initClassesResource();
3082
+ initClassesResource(reg, canvasMcpEntry);
3083
3083
  };
3084
3084
 
3085
3085
  // src/sync-with-document.tsx
@@ -3193,7 +3193,10 @@ function init() {
3193
3193
  name: "global",
3194
3194
  getThemeColor: (theme) => theme.palette.global.dark
3195
3195
  });
3196
- initMcpIntegration();
3196
+ initMcpIntegration(
3197
+ getMCPByDomain("classes", { instructions: "MCP server for management of Elementor global classes" }),
3198
+ getMCPByDomain("canvas")
3199
+ );
3197
3200
  }
3198
3201
  export {
3199
3202
  GLOBAL_CLASSES_URI,