@elementor/editor-interactions 4.0.0-619 → 4.0.0-manual
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.d.mts +3 -3
- package/dist/index.d.ts +3 -3
- package/dist/index.js +189 -172
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +189 -172
- package/dist/index.mjs.map +1 -1
- package/package.json +11 -11
- package/src/components/interaction-details.tsx +34 -42
- package/src/interactions-controls-registry.ts +4 -4
- package/src/mcp/index.ts +65 -4
- package/src/mcp/resources/interactions-schema-resource.ts +6 -39
- package/src/mcp/tools/manage-element-interaction-tool.ts +44 -111
- package/src/mcp/tools/schema.ts +73 -0
- package/src/utils/prop-value-utils.ts +29 -29
|
@@ -46,22 +46,22 @@ export const createConfig = ( {
|
|
|
46
46
|
replay,
|
|
47
47
|
easing = 'easeIn',
|
|
48
48
|
relativeTo = '',
|
|
49
|
-
|
|
50
|
-
|
|
49
|
+
start = 85,
|
|
50
|
+
end = 15,
|
|
51
51
|
}: {
|
|
52
52
|
replay: boolean;
|
|
53
53
|
easing?: string;
|
|
54
54
|
relativeTo?: string;
|
|
55
|
-
|
|
56
|
-
|
|
55
|
+
start?: SizeStringValue;
|
|
56
|
+
end?: SizeStringValue;
|
|
57
57
|
} ): ConfigPropValue => ( {
|
|
58
58
|
$$type: 'config',
|
|
59
59
|
value: {
|
|
60
60
|
replay: createBoolean( replay ),
|
|
61
61
|
easing: createString( easing ),
|
|
62
62
|
relativeTo: createString( relativeTo ),
|
|
63
|
-
|
|
64
|
-
|
|
63
|
+
start: createSize( start, '%' ),
|
|
64
|
+
end: createSize( end, '%' ),
|
|
65
65
|
},
|
|
66
66
|
} );
|
|
67
67
|
|
|
@@ -102,8 +102,8 @@ export const createAnimationPreset = ( {
|
|
|
102
102
|
replay = false,
|
|
103
103
|
easing = 'easeIn',
|
|
104
104
|
relativeTo,
|
|
105
|
-
|
|
106
|
-
|
|
105
|
+
start,
|
|
106
|
+
end,
|
|
107
107
|
customEffects,
|
|
108
108
|
}: {
|
|
109
109
|
effect: string;
|
|
@@ -114,8 +114,8 @@ export const createAnimationPreset = ( {
|
|
|
114
114
|
replay: boolean;
|
|
115
115
|
easing?: string;
|
|
116
116
|
relativeTo?: string;
|
|
117
|
-
|
|
118
|
-
|
|
117
|
+
start?: SizeStringValue;
|
|
118
|
+
end?: SizeStringValue;
|
|
119
119
|
customEffects?: PropValue;
|
|
120
120
|
} ): AnimationPresetPropValue => ( {
|
|
121
121
|
$$type: 'animation-preset-props',
|
|
@@ -129,8 +129,8 @@ export const createAnimationPreset = ( {
|
|
|
129
129
|
replay,
|
|
130
130
|
easing,
|
|
131
131
|
relativeTo,
|
|
132
|
-
|
|
133
|
-
|
|
132
|
+
start,
|
|
133
|
+
end,
|
|
134
134
|
} ),
|
|
135
135
|
},
|
|
136
136
|
} );
|
|
@@ -146,41 +146,41 @@ export const createInteractionItem = ( {
|
|
|
146
146
|
replay = false,
|
|
147
147
|
easing = 'easeIn',
|
|
148
148
|
relativeTo,
|
|
149
|
-
|
|
150
|
-
|
|
149
|
+
start,
|
|
150
|
+
end,
|
|
151
151
|
excludedBreakpoints,
|
|
152
152
|
customEffects,
|
|
153
153
|
}: {
|
|
154
|
-
trigger
|
|
155
|
-
effect
|
|
156
|
-
type
|
|
154
|
+
trigger?: string;
|
|
155
|
+
effect?: string;
|
|
156
|
+
type?: string;
|
|
157
157
|
direction?: string;
|
|
158
|
-
duration
|
|
159
|
-
delay
|
|
158
|
+
duration?: SizeStringValue;
|
|
159
|
+
delay?: SizeStringValue;
|
|
160
160
|
interactionId?: string;
|
|
161
|
-
replay
|
|
161
|
+
replay?: boolean;
|
|
162
162
|
easing?: string;
|
|
163
163
|
relativeTo?: string;
|
|
164
|
-
|
|
165
|
-
|
|
164
|
+
start?: number;
|
|
165
|
+
end?: number;
|
|
166
166
|
excludedBreakpoints?: string[];
|
|
167
167
|
customEffects?: PropValue;
|
|
168
168
|
} ): InteractionItemPropValue => ( {
|
|
169
169
|
$$type: 'interaction-item',
|
|
170
170
|
value: {
|
|
171
171
|
...( interactionId && { interaction_id: createString( interactionId ) } ),
|
|
172
|
-
trigger: createString( trigger ),
|
|
172
|
+
trigger: createString( trigger ?? '' ),
|
|
173
173
|
animation: createAnimationPreset( {
|
|
174
|
-
effect,
|
|
175
|
-
type,
|
|
174
|
+
effect: effect ?? '',
|
|
175
|
+
type: type ?? '',
|
|
176
176
|
direction,
|
|
177
|
-
duration,
|
|
178
|
-
delay,
|
|
177
|
+
duration: duration ?? 0,
|
|
178
|
+
delay: delay ?? 0,
|
|
179
179
|
replay,
|
|
180
180
|
easing,
|
|
181
181
|
relativeTo,
|
|
182
|
-
|
|
183
|
-
|
|
182
|
+
start,
|
|
183
|
+
end,
|
|
184
184
|
customEffects,
|
|
185
185
|
} ),
|
|
186
186
|
...( excludedBreakpoints &&
|