@elementor/editor-canvas 4.1.0-716 → 4.1.0-718
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 +29 -16
- package/dist/index.mjs +29 -16
- package/package.json +18 -18
- package/src/mcp/resources/breakpoints-resource.ts +11 -4
- package/src/mcp/resources/document-structure-resource.ts +18 -13
package/dist/index.js
CHANGED
|
@@ -59,7 +59,7 @@ module.exports = __toCommonJS(index_exports);
|
|
|
59
59
|
var import_editor_v1_adapters = require("@elementor/editor-v1-adapters");
|
|
60
60
|
var BREAKPOINTS_SCHEMA_URI = "elementor://breakpoints/list";
|
|
61
61
|
var initBreakpointsResource = (reg) => {
|
|
62
|
-
const {
|
|
62
|
+
const { resource, sendResourceUpdated } = reg;
|
|
63
63
|
const getBreakpointsList = () => {
|
|
64
64
|
const { breakpoints } = window.elementor?.config?.responsive || {};
|
|
65
65
|
if (!breakpoints) {
|
|
@@ -83,9 +83,16 @@ var initBreakpointsResource = (reg) => {
|
|
|
83
83
|
}
|
|
84
84
|
]
|
|
85
85
|
});
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
86
|
+
resource(
|
|
87
|
+
"breakpoints ",
|
|
88
|
+
BREAKPOINTS_SCHEMA_URI,
|
|
89
|
+
{
|
|
90
|
+
description: "Breakpoints list."
|
|
91
|
+
},
|
|
92
|
+
() => {
|
|
93
|
+
return buildResourceResponse();
|
|
94
|
+
}
|
|
95
|
+
);
|
|
89
96
|
window.addEventListener((0, import_editor_v1_adapters.v1ReadyEvent)().name, () => {
|
|
90
97
|
sendResourceUpdated({
|
|
91
98
|
uri: BREAKPOINTS_SCHEMA_URI,
|
|
@@ -2964,7 +2971,7 @@ function initTabsModelExtensions() {
|
|
|
2964
2971
|
var import_editor_v1_adapters13 = require("@elementor/editor-v1-adapters");
|
|
2965
2972
|
var DOCUMENT_STRUCTURE_URI = "elementor://document/structure";
|
|
2966
2973
|
var initDocumentStructureResource = (reg) => {
|
|
2967
|
-
const {
|
|
2974
|
+
const { resource, sendResourceUpdated } = reg;
|
|
2968
2975
|
let currentDocumentStructure = null;
|
|
2969
2976
|
const updateDocumentStructure = () => {
|
|
2970
2977
|
const structure = getDocumentStructure();
|
|
@@ -2986,17 +2993,23 @@ var initDocumentStructureResource = (reg) => {
|
|
|
2986
2993
|
updateDocumentStructure
|
|
2987
2994
|
);
|
|
2988
2995
|
updateDocumentStructure();
|
|
2989
|
-
|
|
2990
|
-
|
|
2991
|
-
|
|
2992
|
-
|
|
2993
|
-
|
|
2994
|
-
|
|
2995
|
-
|
|
2996
|
-
|
|
2997
|
-
|
|
2998
|
-
|
|
2999
|
-
|
|
2996
|
+
resource(
|
|
2997
|
+
"document-structure",
|
|
2998
|
+
DOCUMENT_STRUCTURE_URI,
|
|
2999
|
+
{
|
|
3000
|
+
description: "Document structure."
|
|
3001
|
+
},
|
|
3002
|
+
async () => {
|
|
3003
|
+
return {
|
|
3004
|
+
contents: [
|
|
3005
|
+
{
|
|
3006
|
+
uri: DOCUMENT_STRUCTURE_URI,
|
|
3007
|
+
text: JSON.stringify(getDocumentStructure(), null, 2)
|
|
3008
|
+
}
|
|
3009
|
+
]
|
|
3010
|
+
};
|
|
3011
|
+
}
|
|
3012
|
+
);
|
|
3000
3013
|
};
|
|
3001
3014
|
function getDocumentStructure() {
|
|
3002
3015
|
const extendedWindow = window;
|
package/dist/index.mjs
CHANGED
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
import { v1ReadyEvent } from "@elementor/editor-v1-adapters";
|
|
3
3
|
var BREAKPOINTS_SCHEMA_URI = "elementor://breakpoints/list";
|
|
4
4
|
var initBreakpointsResource = (reg) => {
|
|
5
|
-
const {
|
|
5
|
+
const { resource, sendResourceUpdated } = reg;
|
|
6
6
|
const getBreakpointsList = () => {
|
|
7
7
|
const { breakpoints } = window.elementor?.config?.responsive || {};
|
|
8
8
|
if (!breakpoints) {
|
|
@@ -26,9 +26,16 @@ var initBreakpointsResource = (reg) => {
|
|
|
26
26
|
}
|
|
27
27
|
]
|
|
28
28
|
});
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
29
|
+
resource(
|
|
30
|
+
"breakpoints ",
|
|
31
|
+
BREAKPOINTS_SCHEMA_URI,
|
|
32
|
+
{
|
|
33
|
+
description: "Breakpoints list."
|
|
34
|
+
},
|
|
35
|
+
() => {
|
|
36
|
+
return buildResourceResponse();
|
|
37
|
+
}
|
|
38
|
+
);
|
|
32
39
|
window.addEventListener(v1ReadyEvent().name, () => {
|
|
33
40
|
sendResourceUpdated({
|
|
34
41
|
uri: BREAKPOINTS_SCHEMA_URI,
|
|
@@ -2934,7 +2941,7 @@ function initTabsModelExtensions() {
|
|
|
2934
2941
|
import { __privateListenTo as listenTo, commandEndEvent as commandEndEvent4 } from "@elementor/editor-v1-adapters";
|
|
2935
2942
|
var DOCUMENT_STRUCTURE_URI = "elementor://document/structure";
|
|
2936
2943
|
var initDocumentStructureResource = (reg) => {
|
|
2937
|
-
const {
|
|
2944
|
+
const { resource, sendResourceUpdated } = reg;
|
|
2938
2945
|
let currentDocumentStructure = null;
|
|
2939
2946
|
const updateDocumentStructure = () => {
|
|
2940
2947
|
const structure = getDocumentStructure();
|
|
@@ -2956,17 +2963,23 @@ var initDocumentStructureResource = (reg) => {
|
|
|
2956
2963
|
updateDocumentStructure
|
|
2957
2964
|
);
|
|
2958
2965
|
updateDocumentStructure();
|
|
2959
|
-
|
|
2960
|
-
|
|
2961
|
-
|
|
2962
|
-
|
|
2963
|
-
|
|
2964
|
-
|
|
2965
|
-
|
|
2966
|
-
|
|
2967
|
-
|
|
2968
|
-
|
|
2969
|
-
|
|
2966
|
+
resource(
|
|
2967
|
+
"document-structure",
|
|
2968
|
+
DOCUMENT_STRUCTURE_URI,
|
|
2969
|
+
{
|
|
2970
|
+
description: "Document structure."
|
|
2971
|
+
},
|
|
2972
|
+
async () => {
|
|
2973
|
+
return {
|
|
2974
|
+
contents: [
|
|
2975
|
+
{
|
|
2976
|
+
uri: DOCUMENT_STRUCTURE_URI,
|
|
2977
|
+
text: JSON.stringify(getDocumentStructure(), null, 2)
|
|
2978
|
+
}
|
|
2979
|
+
]
|
|
2980
|
+
};
|
|
2981
|
+
}
|
|
2982
|
+
);
|
|
2970
2983
|
};
|
|
2971
2984
|
function getDocumentStructure() {
|
|
2972
2985
|
const extendedWindow = window;
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@elementor/editor-canvas",
|
|
3
3
|
"description": "Elementor Editor Canvas",
|
|
4
|
-
"version": "4.1.0-
|
|
4
|
+
"version": "4.1.0-718",
|
|
5
5
|
"private": false,
|
|
6
6
|
"author": "Elementor Team",
|
|
7
7
|
"homepage": "https://elementor.com/",
|
|
@@ -37,24 +37,24 @@
|
|
|
37
37
|
"react-dom": "^18.3.1"
|
|
38
38
|
},
|
|
39
39
|
"dependencies": {
|
|
40
|
-
"@elementor/editor": "4.1.0-
|
|
41
|
-
"@elementor/editor-controls": "4.1.0-
|
|
42
|
-
"@elementor/editor-documents": "4.1.0-
|
|
43
|
-
"@elementor/editor-elements": "4.1.0-
|
|
44
|
-
"@elementor/editor-interactions": "4.1.0-
|
|
45
|
-
"@elementor/editor-mcp": "4.1.0-
|
|
46
|
-
"@elementor/editor-notifications": "4.1.0-
|
|
47
|
-
"@elementor/editor-props": "4.1.0-
|
|
48
|
-
"@elementor/editor-responsive": "4.1.0-
|
|
49
|
-
"@elementor/editor-styles": "4.1.0-
|
|
50
|
-
"@elementor/editor-styles-repository": "4.1.0-
|
|
51
|
-
"@elementor/editor-ui": "4.1.0-
|
|
52
|
-
"@elementor/editor-v1-adapters": "4.1.0-
|
|
53
|
-
"@elementor/schema": "4.1.0-
|
|
54
|
-
"@elementor/twing": "4.1.0-
|
|
40
|
+
"@elementor/editor": "4.1.0-718",
|
|
41
|
+
"@elementor/editor-controls": "4.1.0-718",
|
|
42
|
+
"@elementor/editor-documents": "4.1.0-718",
|
|
43
|
+
"@elementor/editor-elements": "4.1.0-718",
|
|
44
|
+
"@elementor/editor-interactions": "4.1.0-718",
|
|
45
|
+
"@elementor/editor-mcp": "4.1.0-718",
|
|
46
|
+
"@elementor/editor-notifications": "4.1.0-718",
|
|
47
|
+
"@elementor/editor-props": "4.1.0-718",
|
|
48
|
+
"@elementor/editor-responsive": "4.1.0-718",
|
|
49
|
+
"@elementor/editor-styles": "4.1.0-718",
|
|
50
|
+
"@elementor/editor-styles-repository": "4.1.0-718",
|
|
51
|
+
"@elementor/editor-ui": "4.1.0-718",
|
|
52
|
+
"@elementor/editor-v1-adapters": "4.1.0-718",
|
|
53
|
+
"@elementor/schema": "4.1.0-718",
|
|
54
|
+
"@elementor/twing": "4.1.0-718",
|
|
55
55
|
"@elementor/ui": "1.36.17",
|
|
56
|
-
"@elementor/utils": "4.1.0-
|
|
57
|
-
"@elementor/wp-media": "4.1.0-
|
|
56
|
+
"@elementor/utils": "4.1.0-718",
|
|
57
|
+
"@elementor/wp-media": "4.1.0-718",
|
|
58
58
|
"@floating-ui/react": "^0.27.5",
|
|
59
59
|
"@wordpress/i18n": "^5.13.0"
|
|
60
60
|
},
|
|
@@ -5,7 +5,7 @@ import { v1ReadyEvent } from '@elementor/editor-v1-adapters';
|
|
|
5
5
|
export const BREAKPOINTS_SCHEMA_URI = 'elementor://breakpoints/list';
|
|
6
6
|
|
|
7
7
|
export const initBreakpointsResource = ( reg: MCPRegistryEntry ) => {
|
|
8
|
-
const {
|
|
8
|
+
const { resource, sendResourceUpdated } = reg;
|
|
9
9
|
|
|
10
10
|
const getBreakpointsList = () => {
|
|
11
11
|
const { breakpoints } = ( window as unknown as ExtendedWindow ).elementor?.config?.responsive || {};
|
|
@@ -34,9 +34,16 @@ export const initBreakpointsResource = ( reg: MCPRegistryEntry ) => {
|
|
|
34
34
|
],
|
|
35
35
|
} );
|
|
36
36
|
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
37
|
+
resource(
|
|
38
|
+
'breakpoints ',
|
|
39
|
+
BREAKPOINTS_SCHEMA_URI,
|
|
40
|
+
{
|
|
41
|
+
description: 'Breakpoints list.',
|
|
42
|
+
},
|
|
43
|
+
() => {
|
|
44
|
+
return buildResourceResponse();
|
|
45
|
+
}
|
|
46
|
+
);
|
|
40
47
|
|
|
41
48
|
window.addEventListener( v1ReadyEvent().name, () => {
|
|
42
49
|
sendResourceUpdated( {
|
|
@@ -39,7 +39,7 @@ type ElementorContainer = {
|
|
|
39
39
|
export const DOCUMENT_STRUCTURE_URI = 'elementor://document/structure';
|
|
40
40
|
|
|
41
41
|
export const initDocumentStructureResource = ( reg: MCPRegistryEntry ) => {
|
|
42
|
-
const {
|
|
42
|
+
const { resource, sendResourceUpdated } = reg;
|
|
43
43
|
|
|
44
44
|
let currentDocumentStructure: string | null = null;
|
|
45
45
|
|
|
@@ -69,18 +69,23 @@ export const initDocumentStructureResource = ( reg: MCPRegistryEntry ) => {
|
|
|
69
69
|
// Initialize on load
|
|
70
70
|
updateDocumentStructure();
|
|
71
71
|
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
72
|
+
resource(
|
|
73
|
+
'document-structure',
|
|
74
|
+
DOCUMENT_STRUCTURE_URI,
|
|
75
|
+
{
|
|
76
|
+
description: 'Document structure.',
|
|
77
|
+
},
|
|
78
|
+
async () => {
|
|
79
|
+
return {
|
|
80
|
+
contents: [
|
|
81
|
+
{
|
|
82
|
+
uri: DOCUMENT_STRUCTURE_URI,
|
|
83
|
+
text: JSON.stringify( getDocumentStructure(), null, 2 ),
|
|
84
|
+
},
|
|
85
|
+
],
|
|
86
|
+
};
|
|
87
|
+
}
|
|
88
|
+
);
|
|
84
89
|
};
|
|
85
90
|
|
|
86
91
|
function getDocumentStructure() {
|