@elementor/editor-canvas 3.35.0-383 → 3.35.0-384
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
CHANGED
|
@@ -2603,7 +2603,7 @@ var inputSchema = {
|
|
|
2603
2603
|
stylesConfig: import_schema.z.record(
|
|
2604
2604
|
import_schema.z.string().describe("The configuration id"),
|
|
2605
2605
|
import_schema.z.record(
|
|
2606
|
-
import_schema.z.string().describe("StyleSchema property name"),
|
|
2606
|
+
import_schema.z.string().describe("StyleSchema property name. Last priority is custom_css!"),
|
|
2607
2607
|
import_schema.z.any().describe(`The PropValue for the style property. MANDATORY, refer to [${STYLE_SCHEMA_URI}]`)
|
|
2608
2608
|
)
|
|
2609
2609
|
).describe(
|
|
@@ -2612,8 +2612,10 @@ var inputSchema = {
|
|
|
2612
2612
|
};
|
|
2613
2613
|
var outputSchema = {
|
|
2614
2614
|
errors: import_schema.z.string().describe("Error message if the composition building failed").optional(),
|
|
2615
|
-
xmlStructure: import_schema.z.string().describe(
|
|
2616
|
-
|
|
2615
|
+
xmlStructure: import_schema.z.string().describe(
|
|
2616
|
+
"The built XML structure as a string. Must use this XML after completion of building the composition, it contains real IDs."
|
|
2617
|
+
).optional(),
|
|
2618
|
+
llmInstructions: import_schema.z.string().describe("Instructions for what to do next, Important to follow these instructions!")
|
|
2617
2619
|
};
|
|
2618
2620
|
|
|
2619
2621
|
// src/mcp/tools/build-composition/tool.ts
|
|
@@ -2632,7 +2634,7 @@ var initBuildCompositionsTool = (reg) => {
|
|
|
2632
2634
|
],
|
|
2633
2635
|
outputSchema,
|
|
2634
2636
|
modelPreferences: {
|
|
2635
|
-
hints: [{ name: "claude-sonnet" }],
|
|
2637
|
+
hints: [{ name: "claude-sonnet-4-5" }],
|
|
2636
2638
|
intelligencePriority: 0.95,
|
|
2637
2639
|
speedPriority: 0.5
|
|
2638
2640
|
},
|
|
@@ -2743,10 +2745,31 @@ var initBuildCompositionsTool = (reg) => {
|
|
|
2743
2745
|
options: { useHistory: false }
|
|
2744
2746
|
});
|
|
2745
2747
|
});
|
|
2748
|
+
const errorMessages = errors.map((e) => {
|
|
2749
|
+
if (typeof e === "string") {
|
|
2750
|
+
return e;
|
|
2751
|
+
}
|
|
2752
|
+
if (e instanceof Error) {
|
|
2753
|
+
return e.message || String(e);
|
|
2754
|
+
}
|
|
2755
|
+
if (typeof e === "object" && e !== null) {
|
|
2756
|
+
return JSON.stringify(e);
|
|
2757
|
+
}
|
|
2758
|
+
return String(e);
|
|
2759
|
+
}).filter(
|
|
2760
|
+
(msg) => msg && msg.trim() !== "" && msg !== "{}" && msg !== "null" && msg !== "undefined"
|
|
2761
|
+
);
|
|
2762
|
+
if (errorMessages.length === 0) {
|
|
2763
|
+
throw new Error(
|
|
2764
|
+
"Failed to build composition: Unknown error occurred. No error details available."
|
|
2765
|
+
);
|
|
2766
|
+
}
|
|
2746
2767
|
const errorText = `Failed to build composition with the following errors:
|
|
2747
2768
|
|
|
2769
|
+
${errorMessages.join(
|
|
2770
|
+
"\n\n"
|
|
2771
|
+
)}
|
|
2748
2772
|
|
|
2749
|
-
${errors.map((e) => typeof e === "string" ? e : e.message).join("\n\n")}
|
|
2750
2773
|
"Missing $$type" errors indicate that the configuration objects are invalid. Try again and apply **ALL** object entries with correct $$type.
|
|
2751
2774
|
Now that you have these errors, fix them and try again. Errors regarding configuration objects, please check against the PropType schemas`;
|
|
2752
2775
|
throw new Error(errorText);
|
|
@@ -2756,11 +2779,12 @@ Now that you have these errors, fix them and try again. Errors regarding configu
|
|
|
2756
2779
|
}
|
|
2757
2780
|
return {
|
|
2758
2781
|
xmlStructure: new XMLSerializer().serializeToString(xml),
|
|
2782
|
+
errors: errors?.length ? errors.map((e) => typeof e === "string" ? e : e.message).join("\n\n") : void 0,
|
|
2759
2783
|
llmInstructions: (softErrors.length ? `The composition was built successfully, but there were some issues with the provided configurations:
|
|
2760
2784
|
|
|
2761
2785
|
${softErrors.map((e) => `- ${e.message}`).join("\n")}
|
|
2762
2786
|
|
|
2763
|
-
Please use
|
|
2787
|
+
Please use configure-element tool to fix these issues. Now that you have information about these issues, use the configure-element tool to fix them!` : "") + `
|
|
2764
2788
|
Next Steps:
|
|
2765
2789
|
- Use "apply-global-class" tool as there may be global styles ready to be applied to elements.
|
|
2766
2790
|
- Use "configure-element" tool to further configure elements as needed, including styles.
|
|
@@ -2903,7 +2927,7 @@ var initConfigureElementTool = (reg) => {
|
|
|
2903
2927
|
{ description: "Styles schema", uri: STYLE_SCHEMA_URI }
|
|
2904
2928
|
],
|
|
2905
2929
|
modelPreferences: {
|
|
2906
|
-
hints: [{ name: "claude-sonnet" }],
|
|
2930
|
+
hints: [{ name: "claude-sonnet-4-5" }],
|
|
2907
2931
|
intelligencePriority: 0.8,
|
|
2908
2932
|
speedPriority: 0.7
|
|
2909
2933
|
},
|
package/dist/index.mjs
CHANGED
|
@@ -2577,7 +2577,7 @@ var inputSchema = {
|
|
|
2577
2577
|
stylesConfig: z.record(
|
|
2578
2578
|
z.string().describe("The configuration id"),
|
|
2579
2579
|
z.record(
|
|
2580
|
-
z.string().describe("StyleSchema property name"),
|
|
2580
|
+
z.string().describe("StyleSchema property name. Last priority is custom_css!"),
|
|
2581
2581
|
z.any().describe(`The PropValue for the style property. MANDATORY, refer to [${STYLE_SCHEMA_URI}]`)
|
|
2582
2582
|
)
|
|
2583
2583
|
).describe(
|
|
@@ -2586,8 +2586,10 @@ var inputSchema = {
|
|
|
2586
2586
|
};
|
|
2587
2587
|
var outputSchema = {
|
|
2588
2588
|
errors: z.string().describe("Error message if the composition building failed").optional(),
|
|
2589
|
-
xmlStructure: z.string().describe(
|
|
2590
|
-
|
|
2589
|
+
xmlStructure: z.string().describe(
|
|
2590
|
+
"The built XML structure as a string. Must use this XML after completion of building the composition, it contains real IDs."
|
|
2591
|
+
).optional(),
|
|
2592
|
+
llmInstructions: z.string().describe("Instructions for what to do next, Important to follow these instructions!")
|
|
2591
2593
|
};
|
|
2592
2594
|
|
|
2593
2595
|
// src/mcp/tools/build-composition/tool.ts
|
|
@@ -2606,7 +2608,7 @@ var initBuildCompositionsTool = (reg) => {
|
|
|
2606
2608
|
],
|
|
2607
2609
|
outputSchema,
|
|
2608
2610
|
modelPreferences: {
|
|
2609
|
-
hints: [{ name: "claude-sonnet" }],
|
|
2611
|
+
hints: [{ name: "claude-sonnet-4-5" }],
|
|
2610
2612
|
intelligencePriority: 0.95,
|
|
2611
2613
|
speedPriority: 0.5
|
|
2612
2614
|
},
|
|
@@ -2717,10 +2719,31 @@ var initBuildCompositionsTool = (reg) => {
|
|
|
2717
2719
|
options: { useHistory: false }
|
|
2718
2720
|
});
|
|
2719
2721
|
});
|
|
2722
|
+
const errorMessages = errors.map((e) => {
|
|
2723
|
+
if (typeof e === "string") {
|
|
2724
|
+
return e;
|
|
2725
|
+
}
|
|
2726
|
+
if (e instanceof Error) {
|
|
2727
|
+
return e.message || String(e);
|
|
2728
|
+
}
|
|
2729
|
+
if (typeof e === "object" && e !== null) {
|
|
2730
|
+
return JSON.stringify(e);
|
|
2731
|
+
}
|
|
2732
|
+
return String(e);
|
|
2733
|
+
}).filter(
|
|
2734
|
+
(msg) => msg && msg.trim() !== "" && msg !== "{}" && msg !== "null" && msg !== "undefined"
|
|
2735
|
+
);
|
|
2736
|
+
if (errorMessages.length === 0) {
|
|
2737
|
+
throw new Error(
|
|
2738
|
+
"Failed to build composition: Unknown error occurred. No error details available."
|
|
2739
|
+
);
|
|
2740
|
+
}
|
|
2720
2741
|
const errorText = `Failed to build composition with the following errors:
|
|
2721
2742
|
|
|
2743
|
+
${errorMessages.join(
|
|
2744
|
+
"\n\n"
|
|
2745
|
+
)}
|
|
2722
2746
|
|
|
2723
|
-
${errors.map((e) => typeof e === "string" ? e : e.message).join("\n\n")}
|
|
2724
2747
|
"Missing $$type" errors indicate that the configuration objects are invalid. Try again and apply **ALL** object entries with correct $$type.
|
|
2725
2748
|
Now that you have these errors, fix them and try again. Errors regarding configuration objects, please check against the PropType schemas`;
|
|
2726
2749
|
throw new Error(errorText);
|
|
@@ -2730,11 +2753,12 @@ Now that you have these errors, fix them and try again. Errors regarding configu
|
|
|
2730
2753
|
}
|
|
2731
2754
|
return {
|
|
2732
2755
|
xmlStructure: new XMLSerializer().serializeToString(xml),
|
|
2756
|
+
errors: errors?.length ? errors.map((e) => typeof e === "string" ? e : e.message).join("\n\n") : void 0,
|
|
2733
2757
|
llmInstructions: (softErrors.length ? `The composition was built successfully, but there were some issues with the provided configurations:
|
|
2734
2758
|
|
|
2735
2759
|
${softErrors.map((e) => `- ${e.message}`).join("\n")}
|
|
2736
2760
|
|
|
2737
|
-
Please use
|
|
2761
|
+
Please use configure-element tool to fix these issues. Now that you have information about these issues, use the configure-element tool to fix them!` : "") + `
|
|
2738
2762
|
Next Steps:
|
|
2739
2763
|
- Use "apply-global-class" tool as there may be global styles ready to be applied to elements.
|
|
2740
2764
|
- Use "configure-element" tool to further configure elements as needed, including styles.
|
|
@@ -2877,7 +2901,7 @@ var initConfigureElementTool = (reg) => {
|
|
|
2877
2901
|
{ description: "Styles schema", uri: STYLE_SCHEMA_URI }
|
|
2878
2902
|
],
|
|
2879
2903
|
modelPreferences: {
|
|
2880
|
-
hints: [{ name: "claude-sonnet" }],
|
|
2904
|
+
hints: [{ name: "claude-sonnet-4-5" }],
|
|
2881
2905
|
intelligencePriority: 0.8,
|
|
2882
2906
|
speedPriority: 0.7
|
|
2883
2907
|
},
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@elementor/editor-canvas",
|
|
3
3
|
"description": "Elementor Editor Canvas",
|
|
4
|
-
"version": "3.35.0-
|
|
4
|
+
"version": "3.35.0-384",
|
|
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": "3.35.0-
|
|
41
|
-
"@elementor/editor-controls": "3.35.0-
|
|
42
|
-
"@elementor/editor-documents": "3.35.0-
|
|
43
|
-
"@elementor/editor-elements": "3.35.0-
|
|
44
|
-
"@elementor/editor-interactions": "3.35.0-
|
|
45
|
-
"@elementor/editor-mcp": "3.35.0-
|
|
46
|
-
"@elementor/editor-notifications": "3.35.0-
|
|
47
|
-
"@elementor/editor-props": "3.35.0-
|
|
48
|
-
"@elementor/editor-responsive": "3.35.0-
|
|
49
|
-
"@elementor/editor-styles": "3.35.0-
|
|
50
|
-
"@elementor/editor-styles-repository": "3.35.0-
|
|
51
|
-
"@elementor/editor-ui": "3.35.0-
|
|
52
|
-
"@elementor/editor-v1-adapters": "3.35.0-
|
|
53
|
-
"@elementor/schema": "3.35.0-
|
|
54
|
-
"@elementor/twing": "3.35.0-
|
|
40
|
+
"@elementor/editor": "3.35.0-384",
|
|
41
|
+
"@elementor/editor-controls": "3.35.0-384",
|
|
42
|
+
"@elementor/editor-documents": "3.35.0-384",
|
|
43
|
+
"@elementor/editor-elements": "3.35.0-384",
|
|
44
|
+
"@elementor/editor-interactions": "3.35.0-384",
|
|
45
|
+
"@elementor/editor-mcp": "3.35.0-384",
|
|
46
|
+
"@elementor/editor-notifications": "3.35.0-384",
|
|
47
|
+
"@elementor/editor-props": "3.35.0-384",
|
|
48
|
+
"@elementor/editor-responsive": "3.35.0-384",
|
|
49
|
+
"@elementor/editor-styles": "3.35.0-384",
|
|
50
|
+
"@elementor/editor-styles-repository": "3.35.0-384",
|
|
51
|
+
"@elementor/editor-ui": "3.35.0-384",
|
|
52
|
+
"@elementor/editor-v1-adapters": "3.35.0-384",
|
|
53
|
+
"@elementor/schema": "3.35.0-384",
|
|
54
|
+
"@elementor/twing": "3.35.0-384",
|
|
55
55
|
"@elementor/ui": "1.36.17",
|
|
56
|
-
"@elementor/utils": "3.35.0-
|
|
57
|
-
"@elementor/wp-media": "3.35.0-
|
|
56
|
+
"@elementor/utils": "3.35.0-384",
|
|
57
|
+
"@elementor/wp-media": "3.35.0-384",
|
|
58
58
|
"@floating-ui/react": "^0.27.5",
|
|
59
59
|
"@wordpress/i18n": "^5.13.0"
|
|
60
60
|
},
|
|
@@ -17,7 +17,7 @@ export const inputSchema = {
|
|
|
17
17
|
.record(
|
|
18
18
|
z.string().describe( 'The configuration id' ),
|
|
19
19
|
z.record(
|
|
20
|
-
z.string().describe( 'StyleSchema property name' ),
|
|
20
|
+
z.string().describe( 'StyleSchema property name. Last priority is custom_css!' ),
|
|
21
21
|
z.any().describe( `The PropValue for the style property. MANDATORY, refer to [${ STYLE_SCHEMA_URI }]` )
|
|
22
22
|
)
|
|
23
23
|
)
|
|
@@ -29,6 +29,11 @@ export const inputSchema = {
|
|
|
29
29
|
|
|
30
30
|
export const outputSchema = {
|
|
31
31
|
errors: z.string().describe( 'Error message if the composition building failed' ).optional(),
|
|
32
|
-
xmlStructure: z
|
|
33
|
-
|
|
32
|
+
xmlStructure: z
|
|
33
|
+
.string()
|
|
34
|
+
.describe(
|
|
35
|
+
'The built XML structure as a string. Must use this XML after completion of building the composition, it contains real IDs.'
|
|
36
|
+
)
|
|
37
|
+
.optional(),
|
|
38
|
+
llmInstructions: z.string().describe( 'Instructions for what to do next, Important to follow these instructions!' ),
|
|
34
39
|
};
|
|
@@ -30,7 +30,7 @@ export const initBuildCompositionsTool = ( reg: MCPRegistryEntry ) => {
|
|
|
30
30
|
],
|
|
31
31
|
outputSchema,
|
|
32
32
|
modelPreferences: {
|
|
33
|
-
hints: [ { name: 'claude-sonnet' } ],
|
|
33
|
+
hints: [ { name: 'claude-sonnet-4-5' } ],
|
|
34
34
|
intelligencePriority: 0.95,
|
|
35
35
|
speedPriority: 0.5,
|
|
36
36
|
},
|
|
@@ -157,10 +157,34 @@ export const initBuildCompositionsTool = ( reg: MCPRegistryEntry ) => {
|
|
|
157
157
|
options: { useHistory: false },
|
|
158
158
|
} );
|
|
159
159
|
} );
|
|
160
|
-
|
|
161
|
-
|
|
162
|
-
|
|
163
|
-
|
|
160
|
+
|
|
161
|
+
const errorMessages = errors
|
|
162
|
+
.map( ( e ) => {
|
|
163
|
+
if ( typeof e === 'string' ) {
|
|
164
|
+
return e;
|
|
165
|
+
}
|
|
166
|
+
if ( e instanceof Error ) {
|
|
167
|
+
return e.message || String( e );
|
|
168
|
+
}
|
|
169
|
+
|
|
170
|
+
if ( typeof e === 'object' && e !== null ) {
|
|
171
|
+
return JSON.stringify( e );
|
|
172
|
+
}
|
|
173
|
+
return String( e );
|
|
174
|
+
} )
|
|
175
|
+
.filter(
|
|
176
|
+
( msg ) => msg && msg.trim() !== '' && msg !== '{}' && msg !== 'null' && msg !== 'undefined'
|
|
177
|
+
);
|
|
178
|
+
|
|
179
|
+
if ( errorMessages.length === 0 ) {
|
|
180
|
+
throw new Error(
|
|
181
|
+
'Failed to build composition: Unknown error occurred. No error details available.'
|
|
182
|
+
);
|
|
183
|
+
}
|
|
184
|
+
|
|
185
|
+
const errorText = `Failed to build composition with the following errors:\n\n${ errorMessages.join(
|
|
186
|
+
'\n\n'
|
|
187
|
+
) }\n\n"Missing $$type" errors indicate that the configuration objects are invalid. Try again and apply **ALL** object entries with correct $$type.\nNow that you have these errors, fix them and try again. Errors regarding configuration objects, please check against the PropType schemas`;
|
|
164
188
|
throw new Error( errorText );
|
|
165
189
|
}
|
|
166
190
|
if ( ! xml ) {
|
|
@@ -168,13 +192,16 @@ Now that you have these errors, fix them and try again. Errors regarding configu
|
|
|
168
192
|
}
|
|
169
193
|
return {
|
|
170
194
|
xmlStructure: new XMLSerializer().serializeToString( xml ),
|
|
195
|
+
errors: errors?.length
|
|
196
|
+
? errors.map( ( e ) => ( typeof e === 'string' ? e : e.message ) ).join( '\n\n' )
|
|
197
|
+
: undefined,
|
|
171
198
|
llmInstructions:
|
|
172
199
|
( softErrors.length
|
|
173
200
|
? `The composition was built successfully, but there were some issues with the provided configurations:
|
|
174
201
|
|
|
175
202
|
${ softErrors.map( ( e ) => `- ${ e.message }` ).join( '\n' ) }
|
|
176
203
|
|
|
177
|
-
Please use
|
|
204
|
+
Please use configure-element tool to fix these issues. Now that you have information about these issues, use the configure-element tool to fix them!`
|
|
178
205
|
: '' ) +
|
|
179
206
|
`
|
|
180
207
|
Next Steps:
|
|
@@ -19,7 +19,7 @@ export const initConfigureElementTool = ( reg: MCPRegistryEntry ) => {
|
|
|
19
19
|
{ description: 'Styles schema', uri: STYLE_SCHEMA_URI },
|
|
20
20
|
],
|
|
21
21
|
modelPreferences: {
|
|
22
|
-
hints: [ { name: 'claude-sonnet' } ],
|
|
22
|
+
hints: [ { name: 'claude-sonnet-4-5' } ],
|
|
23
23
|
intelligencePriority: 0.8,
|
|
24
24
|
speedPriority: 0.7,
|
|
25
25
|
},
|