@elementor/editor-global-classes 4.1.0-721 → 4.1.0-722
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 +18 -15
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +18 -15
- package/dist/index.mjs.map +1 -1
- package/package.json +20 -20
- package/src/init.ts +5 -1
- package/src/mcp-integration/classes-resource.ts +2 -5
- package/src/mcp-integration/index.ts +13 -6
package/dist/index.js
CHANGED
|
@@ -35,9 +35,6 @@ __export(index_exports, {
|
|
|
35
35
|
});
|
|
36
36
|
module.exports = __toCommonJS(index_exports);
|
|
37
37
|
|
|
38
|
-
// src/mcp-integration/classes-resource.ts
|
|
39
|
-
var import_editor_mcp = require("@elementor/editor-mcp");
|
|
40
|
-
|
|
41
38
|
// src/global-classes-styles-provider.ts
|
|
42
39
|
var import_editor_styles2 = require("@elementor/editor-styles");
|
|
43
40
|
var import_editor_styles_repository = require("@elementor/editor-styles-repository");
|
|
@@ -567,9 +564,7 @@ var updateLocalStorageCache = () => {
|
|
|
567
564
|
const classes = globalClassesStylesProvider.actions.all();
|
|
568
565
|
localStorage.setItem(STORAGE_KEY, JSON.stringify(classes));
|
|
569
566
|
};
|
|
570
|
-
var initClassesResource = () => {
|
|
571
|
-
const canvasMcpEntry = (0, import_editor_mcp.getMCPByDomain)("canvas");
|
|
572
|
-
const classesMcpEntry = (0, import_editor_mcp.getMCPByDomain)("classes");
|
|
567
|
+
var initClassesResource = (classesMcpEntry, canvasMcpEntry) => {
|
|
573
568
|
[canvasMcpEntry, classesMcpEntry].forEach((entry) => {
|
|
574
569
|
const { mcpServer, resource, waitForReady } = entry;
|
|
575
570
|
resource(
|
|
@@ -597,6 +592,7 @@ var initClassesResource = () => {
|
|
|
597
592
|
// src/init.ts
|
|
598
593
|
var import_editor = require("@elementor/editor");
|
|
599
594
|
var import_editor_editing_panel2 = require("@elementor/editor-editing-panel");
|
|
595
|
+
var import_editor_mcp = require("@elementor/editor-mcp");
|
|
600
596
|
var import_editor_panels2 = require("@elementor/editor-panels");
|
|
601
597
|
var import_editor_styles_repository5 = require("@elementor/editor-styles-repository");
|
|
602
598
|
var import_store28 = require("@elementor/store");
|
|
@@ -2585,9 +2581,6 @@ function PopulateStore() {
|
|
|
2585
2581
|
return null;
|
|
2586
2582
|
}
|
|
2587
2583
|
|
|
2588
|
-
// src/mcp-integration/index.ts
|
|
2589
|
-
var import_editor_mcp2 = require("@elementor/editor-mcp");
|
|
2590
|
-
|
|
2591
2584
|
// src/mcp-integration/mcp-apply-unapply-global-classes.ts
|
|
2592
2585
|
var import_editor_editing_panel = require("@elementor/editor-editing-panel");
|
|
2593
2586
|
var import_schema = require("@elementor/schema");
|
|
@@ -3016,14 +3009,21 @@ async function attemptDelete(opts) {
|
|
|
3016
3009
|
}
|
|
3017
3010
|
|
|
3018
3011
|
// src/mcp-integration/index.ts
|
|
3019
|
-
var initMcpIntegration = () => {
|
|
3020
|
-
const
|
|
3021
|
-
|
|
3022
|
-
|
|
3012
|
+
var initMcpIntegration = (reg, canvasMcpEntry) => {
|
|
3013
|
+
const { setMCPDescription } = reg;
|
|
3014
|
+
setMCPDescription(
|
|
3015
|
+
`Everything related to V4 ( Atomic ) global classes.
|
|
3016
|
+
# Global classes
|
|
3017
|
+
- Create/update/delete global classes
|
|
3018
|
+
- Get list of global classes
|
|
3019
|
+
- Get details of a global class
|
|
3020
|
+
- Get details of a global class
|
|
3021
|
+
`
|
|
3022
|
+
);
|
|
3023
3023
|
initMcpApplyUnapplyGlobalClasses(reg);
|
|
3024
3024
|
initMcpApplyGetGlobalClassUsages(reg);
|
|
3025
3025
|
initManageGlobalClasses(reg);
|
|
3026
|
-
initClassesResource();
|
|
3026
|
+
initClassesResource(reg, canvasMcpEntry);
|
|
3027
3027
|
};
|
|
3028
3028
|
|
|
3029
3029
|
// src/sync-with-document.tsx
|
|
@@ -3137,7 +3137,10 @@ function init() {
|
|
|
3137
3137
|
name: "global",
|
|
3138
3138
|
getThemeColor: (theme) => theme.palette.global.dark
|
|
3139
3139
|
});
|
|
3140
|
-
initMcpIntegration(
|
|
3140
|
+
initMcpIntegration(
|
|
3141
|
+
(0, import_editor_mcp.getMCPByDomain)("classes", { instructions: "MCP server for management of Elementor global classes" }),
|
|
3142
|
+
(0, import_editor_mcp.getMCPByDomain)("canvas")
|
|
3143
|
+
);
|
|
3141
3144
|
}
|
|
3142
3145
|
// Annotate the CommonJS export names for ESM import in node:
|
|
3143
3146
|
0 && (module.exports = {
|