@elementor/editor-interactions 4.0.0-644 → 4.0.0-646
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 +8 -2
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +8 -2
- package/dist/index.mjs.map +1 -1
- package/package.json +11 -11
- package/src/mcp/tools/manage-element-interaction-tool.ts +13 -2
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@elementor/editor-interactions",
|
|
3
|
-
"version": "4.0.0-
|
|
3
|
+
"version": "4.0.0-646",
|
|
4
4
|
"private": false,
|
|
5
5
|
"author": "Elementor Team",
|
|
6
6
|
"homepage": "https://elementor.com/",
|
|
@@ -39,18 +39,18 @@
|
|
|
39
39
|
"dev": "tsup --config=../../tsup.dev.ts"
|
|
40
40
|
},
|
|
41
41
|
"dependencies": {
|
|
42
|
-
"@elementor/editor-controls": "4.0.0-
|
|
43
|
-
"@elementor/editor-elements": "4.0.0-
|
|
44
|
-
"@elementor/editor-mcp": "4.0.0-
|
|
45
|
-
"@elementor/editor-props": "4.0.0-
|
|
46
|
-
"@elementor/editor-responsive": "4.0.0-
|
|
47
|
-
"@elementor/editor-ui": "4.0.0-
|
|
48
|
-
"@elementor/editor-v1-adapters": "4.0.0-
|
|
42
|
+
"@elementor/editor-controls": "4.0.0-646",
|
|
43
|
+
"@elementor/editor-elements": "4.0.0-646",
|
|
44
|
+
"@elementor/editor-mcp": "4.0.0-646",
|
|
45
|
+
"@elementor/editor-props": "4.0.0-646",
|
|
46
|
+
"@elementor/editor-responsive": "4.0.0-646",
|
|
47
|
+
"@elementor/editor-ui": "4.0.0-646",
|
|
48
|
+
"@elementor/editor-v1-adapters": "4.0.0-646",
|
|
49
49
|
"@elementor/icons": "^1.68.0",
|
|
50
|
-
"@elementor/schema": "4.0.0-
|
|
51
|
-
"@elementor/session": "4.0.0-
|
|
50
|
+
"@elementor/schema": "4.0.0-646",
|
|
51
|
+
"@elementor/session": "4.0.0-646",
|
|
52
52
|
"@elementor/ui": "1.36.17",
|
|
53
|
-
"@elementor/utils": "4.0.0-
|
|
53
|
+
"@elementor/utils": "4.0.0-646",
|
|
54
54
|
"@wordpress/i18n": "^5.13.0"
|
|
55
55
|
},
|
|
56
56
|
"peerDependencies": {
|
|
@@ -21,6 +21,8 @@ const EMPTY_INTERACTIONS: ElementInteractions = {
|
|
|
21
21
|
items: [],
|
|
22
22
|
};
|
|
23
23
|
|
|
24
|
+
const EFFECTS_WITHOUT_TYPE = [ 'custom' ];
|
|
25
|
+
|
|
24
26
|
export const initManageElementInteractionTool = ( reg: MCPRegistryEntry ) => {
|
|
25
27
|
const { addTool } = reg;
|
|
26
28
|
const extendedSchema = isProActive() ? { ...baseSchema, ...proSchema } : baseSchema;
|
|
@@ -60,6 +62,13 @@ export const initManageElementInteractionTool = ( reg: MCPRegistryEntry ) => {
|
|
|
60
62
|
[ key: string ]: unknown;
|
|
61
63
|
} ) => {
|
|
62
64
|
const { elementId, action, interactionId, ...animationData } = input;
|
|
65
|
+
const { effectType, ...restAnimationData } = animationData as {
|
|
66
|
+
effectType?: string;
|
|
67
|
+
[ key: string ]: unknown;
|
|
68
|
+
};
|
|
69
|
+
const effect = restAnimationData.effect as string | undefined;
|
|
70
|
+
const resolvedType =
|
|
71
|
+
effectType ?? ( effect && ! EFFECTS_WITHOUT_TYPE.includes( effect ) ? 'in' : undefined );
|
|
63
72
|
|
|
64
73
|
const allInteractions = interactionsRepository.all();
|
|
65
74
|
const elementData = allInteractions.find( ( data ) => data.elementId === elementId );
|
|
@@ -106,7 +115,8 @@ export const initManageElementInteractionTool = ( reg: MCPRegistryEntry ) => {
|
|
|
106
115
|
|
|
107
116
|
const newItem = createInteractionItem( {
|
|
108
117
|
interactionId: generateTempInteractionId(),
|
|
109
|
-
...
|
|
118
|
+
...restAnimationData,
|
|
119
|
+
type: resolvedType,
|
|
110
120
|
} );
|
|
111
121
|
|
|
112
122
|
updatedItems = [ ...updatedItems, newItem ];
|
|
@@ -130,7 +140,8 @@ export const initManageElementInteractionTool = ( reg: MCPRegistryEntry ) => {
|
|
|
130
140
|
|
|
131
141
|
const updatedItem = createInteractionItem( {
|
|
132
142
|
interactionId,
|
|
133
|
-
...
|
|
143
|
+
...restAnimationData,
|
|
144
|
+
type: resolvedType,
|
|
134
145
|
} );
|
|
135
146
|
|
|
136
147
|
updatedItems = [
|