@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/dist/index.d.mts
CHANGED
|
@@ -216,7 +216,7 @@ declare const extractBoolean: (prop: BooleanPropValue | undefined, fallback?: bo
|
|
|
216
216
|
declare const createExcludedBreakpoints: (breakpoints: string[]) => ExcludedBreakpointsPropValue;
|
|
217
217
|
declare const createInteractionBreakpoints: (excluded: string[]) => InteractionBreakpointsPropValue;
|
|
218
218
|
declare const extractExcludedBreakpoints: (breakpoints: InteractionBreakpointsPropValue | undefined) => string[];
|
|
219
|
-
declare const createAnimationPreset: ({ effect, type, direction, duration, delay, replay, easing, relativeTo, repeat, times, start, end, customEffects, }: {
|
|
219
|
+
declare const createAnimationPreset: ({ effect, type, direction, duration, delay, replay, easing, relativeTo, repeat, times, start, end, customEffects, codeEffect, }: {
|
|
220
220
|
effect: string;
|
|
221
221
|
type: string;
|
|
222
222
|
direction?: string;
|
|
@@ -230,8 +230,9 @@ declare const createAnimationPreset: ({ effect, type, direction, duration, delay
|
|
|
230
230
|
start?: SizeStringValue;
|
|
231
231
|
end?: SizeStringValue;
|
|
232
232
|
customEffects?: PropValue | PlainCustomEffect;
|
|
233
|
+
codeEffect?: PropValue;
|
|
233
234
|
}) => AnimationPresetPropValue;
|
|
234
|
-
declare const createInteractionItem: ({ trigger, effect, type, direction, duration, delay, interactionId, replay, easing, relativeTo, repeat, times, start, end, excludedBreakpoints, customEffects, }: {
|
|
235
|
+
declare const createInteractionItem: ({ trigger, effect, type, direction, duration, delay, interactionId, replay, easing, relativeTo, repeat, times, start, end, excludedBreakpoints, customEffects, codeEffect, }: {
|
|
235
236
|
trigger?: string;
|
|
236
237
|
effect?: string;
|
|
237
238
|
type?: string;
|
|
@@ -248,6 +249,7 @@ declare const createInteractionItem: ({ trigger, effect, type, direction, durati
|
|
|
248
249
|
end?: number;
|
|
249
250
|
excludedBreakpoints?: string[];
|
|
250
251
|
customEffects?: PropValue | PlainCustomEffect;
|
|
252
|
+
codeEffect?: PropValue;
|
|
251
253
|
}) => InteractionItemPropValue;
|
|
252
254
|
declare const createDefaultInteractionItem: () => InteractionItemPropValue;
|
|
253
255
|
declare const createDefaultInteractions: () => ElementInteractions;
|
package/dist/index.d.ts
CHANGED
|
@@ -216,7 +216,7 @@ declare const extractBoolean: (prop: BooleanPropValue | undefined, fallback?: bo
|
|
|
216
216
|
declare const createExcludedBreakpoints: (breakpoints: string[]) => ExcludedBreakpointsPropValue;
|
|
217
217
|
declare const createInteractionBreakpoints: (excluded: string[]) => InteractionBreakpointsPropValue;
|
|
218
218
|
declare const extractExcludedBreakpoints: (breakpoints: InteractionBreakpointsPropValue | undefined) => string[];
|
|
219
|
-
declare const createAnimationPreset: ({ effect, type, direction, duration, delay, replay, easing, relativeTo, repeat, times, start, end, customEffects, }: {
|
|
219
|
+
declare const createAnimationPreset: ({ effect, type, direction, duration, delay, replay, easing, relativeTo, repeat, times, start, end, customEffects, codeEffect, }: {
|
|
220
220
|
effect: string;
|
|
221
221
|
type: string;
|
|
222
222
|
direction?: string;
|
|
@@ -230,8 +230,9 @@ declare const createAnimationPreset: ({ effect, type, direction, duration, delay
|
|
|
230
230
|
start?: SizeStringValue;
|
|
231
231
|
end?: SizeStringValue;
|
|
232
232
|
customEffects?: PropValue | PlainCustomEffect;
|
|
233
|
+
codeEffect?: PropValue;
|
|
233
234
|
}) => AnimationPresetPropValue;
|
|
234
|
-
declare const createInteractionItem: ({ trigger, effect, type, direction, duration, delay, interactionId, replay, easing, relativeTo, repeat, times, start, end, excludedBreakpoints, customEffects, }: {
|
|
235
|
+
declare const createInteractionItem: ({ trigger, effect, type, direction, duration, delay, interactionId, replay, easing, relativeTo, repeat, times, start, end, excludedBreakpoints, customEffects, codeEffect, }: {
|
|
235
236
|
trigger?: string;
|
|
236
237
|
effect?: string;
|
|
237
238
|
type?: string;
|
|
@@ -248,6 +249,7 @@ declare const createInteractionItem: ({ trigger, effect, type, direction, durati
|
|
|
248
249
|
end?: number;
|
|
249
250
|
excludedBreakpoints?: string[];
|
|
250
251
|
customEffects?: PropValue | PlainCustomEffect;
|
|
252
|
+
codeEffect?: PropValue;
|
|
251
253
|
}) => InteractionItemPropValue;
|
|
252
254
|
declare const createDefaultInteractionItem: () => InteractionItemPropValue;
|
|
253
255
|
declare const createDefaultInteractions: () => ElementInteractions;
|
package/dist/index.js
CHANGED
|
@@ -326,6 +326,7 @@ function isTempId(id) {
|
|
|
326
326
|
}
|
|
327
327
|
|
|
328
328
|
// src/utils/prop-value-utils.ts
|
|
329
|
+
var CODE_EFFECT = "code";
|
|
329
330
|
var createString = (value) => ({
|
|
330
331
|
$$type: "string",
|
|
331
332
|
value
|
|
@@ -400,7 +401,8 @@ var createAnimationPreset = ({
|
|
|
400
401
|
times,
|
|
401
402
|
start,
|
|
402
403
|
end,
|
|
403
|
-
customEffects
|
|
404
|
+
customEffects,
|
|
405
|
+
codeEffect
|
|
404
406
|
}) => {
|
|
405
407
|
const customEffectProp = toCustomEffectPropValue(customEffects);
|
|
406
408
|
return {
|
|
@@ -408,6 +410,7 @@ var createAnimationPreset = ({
|
|
|
408
410
|
value: {
|
|
409
411
|
effect: createString(effect),
|
|
410
412
|
...customEffectProp !== void 0 && { custom_effect: customEffectProp },
|
|
413
|
+
...effect === CODE_EFFECT && codeEffect !== void 0 && { code_effect: codeEffect },
|
|
411
414
|
type: createString(type),
|
|
412
415
|
direction: createString(direction ?? ""),
|
|
413
416
|
timing_config: createTimingConfig(duration, delay),
|
|
@@ -439,7 +442,8 @@ var createInteractionItem = ({
|
|
|
439
442
|
start,
|
|
440
443
|
end,
|
|
441
444
|
excludedBreakpoints,
|
|
442
|
-
customEffects
|
|
445
|
+
customEffects,
|
|
446
|
+
codeEffect
|
|
443
447
|
}) => ({
|
|
444
448
|
$$type: "interaction-item",
|
|
445
449
|
value: {
|
|
@@ -458,7 +462,8 @@ var createInteractionItem = ({
|
|
|
458
462
|
times,
|
|
459
463
|
start,
|
|
460
464
|
end,
|
|
461
|
-
customEffects
|
|
465
|
+
customEffects,
|
|
466
|
+
codeEffect
|
|
462
467
|
}),
|
|
463
468
|
...excludedBreakpoints && excludedBreakpoints.length > 0 && {
|
|
464
469
|
breakpoints: createInteractionBreakpoints(excludedBreakpoints)
|
|
@@ -848,6 +853,7 @@ var InteractionDetails = ({ interaction, onChange, onPlayInteraction }) => {
|
|
|
848
853
|
const trigger = extractString(interaction.trigger, DEFAULT_VALUES.trigger);
|
|
849
854
|
const effect = extractString(interaction.animation.value.effect, DEFAULT_VALUES.effect);
|
|
850
855
|
const customEffects = interaction.animation.value.custom_effect;
|
|
856
|
+
const codeEffect = interaction.animation.value.code_effect;
|
|
851
857
|
const type = extractString(interaction.animation.value.type, DEFAULT_VALUES.type);
|
|
852
858
|
const direction = extractString(interaction.animation.value.direction, DEFAULT_VALUES.direction);
|
|
853
859
|
const duration = extractSize(interaction.animation.value.timing_config.value.duration);
|
|
@@ -928,7 +934,8 @@ var InteractionDetails = ({ interaction, onChange, onPlayInteraction }) => {
|
|
|
928
934
|
times: updates.times ?? times,
|
|
929
935
|
start: updates.start ?? start,
|
|
930
936
|
end: updates.end ?? end,
|
|
931
|
-
customEffects: updates.customEffects ?? customEffects
|
|
937
|
+
customEffects: updates.customEffects ?? customEffects,
|
|
938
|
+
codeEffect
|
|
932
939
|
})
|
|
933
940
|
};
|
|
934
941
|
onChange(updatedInteraction);
|