@elementor/editor-interactions 4.5.0-1269 → 4.5.0-1271
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 +4 -2
- package/dist/index.d.ts +4 -2
- package/dist/index.js +11 -4
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +11 -4
- package/dist/index.mjs.map +1 -1
- package/package.json +13 -13
- package/src/components/interaction-details.tsx +2 -0
- package/src/utils/prop-value-utils.ts +8 -0
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@elementor/editor-interactions",
|
|
3
|
-
"version": "4.5.0-
|
|
3
|
+
"version": "4.5.0-1271",
|
|
4
4
|
"private": false,
|
|
5
5
|
"author": "Elementor Team",
|
|
6
6
|
"homepage": "https://elementor.com/",
|
|
@@ -39,20 +39,20 @@
|
|
|
39
39
|
"dev": "tsup --config=../../tsup.dev.ts"
|
|
40
40
|
},
|
|
41
41
|
"dependencies": {
|
|
42
|
-
"@elementor/editor-controls": "4.5.0-
|
|
43
|
-
"@elementor/editor-elements": "4.5.0-
|
|
44
|
-
"@elementor/editor-mcp": "4.5.0-
|
|
45
|
-
"@elementor/editor-props": "4.5.0-
|
|
46
|
-
"@elementor/editor-responsive": "4.5.0-
|
|
47
|
-
"@elementor/editor-ui": "4.5.0-
|
|
48
|
-
"@elementor/editor-v1-adapters": "4.5.0-
|
|
49
|
-
"@elementor/locations": "4.5.0-
|
|
42
|
+
"@elementor/editor-controls": "4.5.0-1271",
|
|
43
|
+
"@elementor/editor-elements": "4.5.0-1271",
|
|
44
|
+
"@elementor/editor-mcp": "4.5.0-1271",
|
|
45
|
+
"@elementor/editor-props": "4.5.0-1271",
|
|
46
|
+
"@elementor/editor-responsive": "4.5.0-1271",
|
|
47
|
+
"@elementor/editor-ui": "4.5.0-1271",
|
|
48
|
+
"@elementor/editor-v1-adapters": "4.5.0-1271",
|
|
49
|
+
"@elementor/locations": "4.5.0-1271",
|
|
50
50
|
"@elementor/icons": "~1.79.0",
|
|
51
|
-
"@elementor/schema": "4.5.0-
|
|
52
|
-
"@elementor/session": "4.5.0-
|
|
51
|
+
"@elementor/schema": "4.5.0-1271",
|
|
52
|
+
"@elementor/session": "4.5.0-1271",
|
|
53
53
|
"@elementor/ui": "1.41.4",
|
|
54
|
-
"@elementor/utils": "4.5.0-
|
|
55
|
-
"@elementor/events": "4.5.0-
|
|
54
|
+
"@elementor/utils": "4.5.0-1271",
|
|
55
|
+
"@elementor/events": "4.5.0-1271",
|
|
56
56
|
"@wordpress/i18n": "^5.13.0"
|
|
57
57
|
},
|
|
58
58
|
"peerDependencies": {
|
|
@@ -123,6 +123,7 @@ export const InteractionDetails = ( { interaction, onChange, onPlayInteraction }
|
|
|
123
123
|
const trigger = extractString( interaction.trigger, DEFAULT_VALUES.trigger );
|
|
124
124
|
const effect = extractString( interaction.animation.value.effect, DEFAULT_VALUES.effect );
|
|
125
125
|
const customEffects = interaction.animation.value.custom_effect;
|
|
126
|
+
const codeEffect = interaction.animation.value.code_effect;
|
|
126
127
|
const type = extractString( interaction.animation.value.type, DEFAULT_VALUES.type );
|
|
127
128
|
const direction = extractString( interaction.animation.value.direction, DEFAULT_VALUES.direction );
|
|
128
129
|
const duration = extractSize( interaction.animation.value.timing_config.value.duration );
|
|
@@ -227,6 +228,7 @@ export const InteractionDetails = ( { interaction, onChange, onPlayInteraction }
|
|
|
227
228
|
start: updates.start ?? start,
|
|
228
229
|
end: updates.end ?? end,
|
|
229
230
|
customEffects: updates.customEffects ?? customEffects,
|
|
231
|
+
codeEffect,
|
|
230
232
|
} ),
|
|
231
233
|
};
|
|
232
234
|
|
|
@@ -21,6 +21,8 @@ import { type PlainCustomEffect, toCustomEffectPropValue } from './custom-effect
|
|
|
21
21
|
import { getInteractionsConfig } from './get-interactions-config';
|
|
22
22
|
import { generateTempInteractionId } from './temp-id-utils';
|
|
23
23
|
|
|
24
|
+
const CODE_EFFECT = 'code';
|
|
25
|
+
|
|
24
26
|
export const createString = ( value: string ): StringPropValue => ( {
|
|
25
27
|
$$type: 'string',
|
|
26
28
|
value,
|
|
@@ -116,6 +118,7 @@ export const createAnimationPreset = ( {
|
|
|
116
118
|
start,
|
|
117
119
|
end,
|
|
118
120
|
customEffects,
|
|
121
|
+
codeEffect,
|
|
119
122
|
}: {
|
|
120
123
|
effect: string;
|
|
121
124
|
type: string;
|
|
@@ -130,6 +133,7 @@ export const createAnimationPreset = ( {
|
|
|
130
133
|
start?: SizeStringValue;
|
|
131
134
|
end?: SizeStringValue;
|
|
132
135
|
customEffects?: PropValue | PlainCustomEffect;
|
|
136
|
+
codeEffect?: PropValue;
|
|
133
137
|
} ): AnimationPresetPropValue => {
|
|
134
138
|
const customEffectProp = toCustomEffectPropValue( customEffects );
|
|
135
139
|
return {
|
|
@@ -137,6 +141,7 @@ export const createAnimationPreset = ( {
|
|
|
137
141
|
value: {
|
|
138
142
|
effect: createString( effect ),
|
|
139
143
|
...( customEffectProp !== undefined && { custom_effect: customEffectProp } ),
|
|
144
|
+
...( effect === CODE_EFFECT && codeEffect !== undefined && { code_effect: codeEffect } ),
|
|
140
145
|
type: createString( type ),
|
|
141
146
|
direction: createString( direction ?? '' ),
|
|
142
147
|
timing_config: createTimingConfig( duration, delay ),
|
|
@@ -170,6 +175,7 @@ export const createInteractionItem = ( {
|
|
|
170
175
|
end,
|
|
171
176
|
excludedBreakpoints,
|
|
172
177
|
customEffects,
|
|
178
|
+
codeEffect,
|
|
173
179
|
}: {
|
|
174
180
|
trigger?: string;
|
|
175
181
|
effect?: string;
|
|
@@ -187,6 +193,7 @@ export const createInteractionItem = ( {
|
|
|
187
193
|
end?: number;
|
|
188
194
|
excludedBreakpoints?: string[];
|
|
189
195
|
customEffects?: PropValue | PlainCustomEffect;
|
|
196
|
+
codeEffect?: PropValue;
|
|
190
197
|
} ): InteractionItemPropValue => ( {
|
|
191
198
|
$$type: 'interaction-item',
|
|
192
199
|
value: {
|
|
@@ -206,6 +213,7 @@ export const createInteractionItem = ( {
|
|
|
206
213
|
start,
|
|
207
214
|
end,
|
|
208
215
|
customEffects,
|
|
216
|
+
codeEffect,
|
|
209
217
|
} ),
|
|
210
218
|
...( excludedBreakpoints &&
|
|
211
219
|
excludedBreakpoints.length > 0 && {
|