@elementor/editor-interactions 4.1.0 → 4.2.0-840
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 +6 -1
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +6 -1
- package/dist/index.mjs.map +1 -1
- package/package.json +13 -13
- package/src/hooks/on-duplicate.ts +7 -1
- package/src/mcp/tools/schema.ts +8 -1
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@elementor/editor-interactions",
|
|
3
|
-
"version": "4.
|
|
3
|
+
"version": "4.2.0-840",
|
|
4
4
|
"private": false,
|
|
5
5
|
"author": "Elementor Team",
|
|
6
6
|
"homepage": "https://elementor.com/",
|
|
@@ -39,19 +39,19 @@
|
|
|
39
39
|
"dev": "tsup --config=../../tsup.dev.ts"
|
|
40
40
|
},
|
|
41
41
|
"dependencies": {
|
|
42
|
-
"@elementor/editor-controls": "4.
|
|
43
|
-
"@elementor/editor-elements": "4.
|
|
44
|
-
"@elementor/editor-mcp": "4.
|
|
45
|
-
"@elementor/editor-props": "4.
|
|
46
|
-
"@elementor/editor-responsive": "4.
|
|
47
|
-
"@elementor/editor-ui": "4.
|
|
48
|
-
"@elementor/editor-v1-adapters": "4.
|
|
49
|
-
"@elementor/icons": "
|
|
50
|
-
"@elementor/schema": "4.
|
|
51
|
-
"@elementor/session": "4.
|
|
42
|
+
"@elementor/editor-controls": "4.2.0-840",
|
|
43
|
+
"@elementor/editor-elements": "4.2.0-840",
|
|
44
|
+
"@elementor/editor-mcp": "4.2.0-840",
|
|
45
|
+
"@elementor/editor-props": "4.2.0-840",
|
|
46
|
+
"@elementor/editor-responsive": "4.2.0-840",
|
|
47
|
+
"@elementor/editor-ui": "4.2.0-840",
|
|
48
|
+
"@elementor/editor-v1-adapters": "4.2.0-840",
|
|
49
|
+
"@elementor/icons": "~1.75.1",
|
|
50
|
+
"@elementor/schema": "4.2.0-840",
|
|
51
|
+
"@elementor/session": "4.2.0-840",
|
|
52
52
|
"@elementor/ui": "1.37.5",
|
|
53
|
-
"@elementor/utils": "4.
|
|
54
|
-
"@elementor/events": "4.
|
|
53
|
+
"@elementor/utils": "4.2.0-840",
|
|
54
|
+
"@elementor/events": "4.2.0-840",
|
|
55
55
|
"@wordpress/i18n": "^5.13.0"
|
|
56
56
|
},
|
|
57
57
|
"peerDependencies": {
|
|
@@ -6,12 +6,18 @@ import { createString } from '../utils/prop-value-utils';
|
|
|
6
6
|
import { generateTempInteractionId } from '../utils/temp-id-utils';
|
|
7
7
|
|
|
8
8
|
export function initCleanInteractionIdsOnDuplicate() {
|
|
9
|
-
registerDataHook( 'after', 'document/elements/duplicate', ( _args, result: V1Element | V1Element[] ) => {
|
|
9
|
+
registerDataHook( 'after', 'document/elements/duplicate', ( _args, result: V1Element | V1Element[] | false ) => {
|
|
10
|
+
if ( ! result || ( typeof result === 'boolean' && result === false ) ) {
|
|
11
|
+
return;
|
|
12
|
+
}
|
|
13
|
+
|
|
10
14
|
const containers = Array.isArray( result ) ? result : [ result ];
|
|
11
15
|
|
|
12
16
|
containers.forEach( ( container ) => {
|
|
13
17
|
cleanInteractionIdsRecursive( container.id );
|
|
14
18
|
} );
|
|
19
|
+
|
|
20
|
+
window.dispatchEvent( new CustomEvent( 'elementor/element/update_interactions' ) );
|
|
15
21
|
} );
|
|
16
22
|
}
|
|
17
23
|
|
package/src/mcp/tools/schema.ts
CHANGED
|
@@ -12,7 +12,10 @@ export const baseSchema = {
|
|
|
12
12
|
),
|
|
13
13
|
duration: z.number().min( 0 ).max( 10000 ).optional().describe( 'Animation duration in milliseconds' ),
|
|
14
14
|
delay: z.number().min( 0 ).max( 10000 ).optional().describe( 'Animation delay in milliseconds' ),
|
|
15
|
-
easing: z
|
|
15
|
+
easing: z
|
|
16
|
+
.enum( [ 'easeIn' ] )
|
|
17
|
+
.optional()
|
|
18
|
+
.describe( 'Easing function for the animation. Use "easeIn" for free tier.' ),
|
|
16
19
|
excludedBreakpoints: z
|
|
17
20
|
.array( z.string() )
|
|
18
21
|
.optional()
|
|
@@ -27,6 +30,10 @@ export const proSchema = {
|
|
|
27
30
|
.optional()
|
|
28
31
|
.describe( 'Event that triggers the animation' ),
|
|
29
32
|
effect: z.enum( [ 'fade', 'slide', 'scale', 'custom' ] ).optional().describe( 'Animation effect type' ),
|
|
33
|
+
easing: z
|
|
34
|
+
.enum( [ 'easeIn', 'easeInOut', 'easeOut', 'backIn', 'backInOut', 'backOut', 'linear' ] )
|
|
35
|
+
.optional()
|
|
36
|
+
.describe( 'Easing function for the animation.' ),
|
|
30
37
|
customEffects: z
|
|
31
38
|
.object( {
|
|
32
39
|
keyframes: z
|