@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.mjs CHANGED
@@ -250,6 +250,7 @@ function isTempId(id) {
250
250
  }
251
251
 
252
252
  // src/utils/prop-value-utils.ts
253
+ var CODE_EFFECT = "code";
253
254
  var createString = (value) => ({
254
255
  $$type: "string",
255
256
  value
@@ -324,7 +325,8 @@ var createAnimationPreset = ({
324
325
  times,
325
326
  start,
326
327
  end,
327
- customEffects
328
+ customEffects,
329
+ codeEffect
328
330
  }) => {
329
331
  const customEffectProp = toCustomEffectPropValue(customEffects);
330
332
  return {
@@ -332,6 +334,7 @@ var createAnimationPreset = ({
332
334
  value: {
333
335
  effect: createString(effect),
334
336
  ...customEffectProp !== void 0 && { custom_effect: customEffectProp },
337
+ ...effect === CODE_EFFECT && codeEffect !== void 0 && { code_effect: codeEffect },
335
338
  type: createString(type),
336
339
  direction: createString(direction ?? ""),
337
340
  timing_config: createTimingConfig(duration, delay),
@@ -363,7 +366,8 @@ var createInteractionItem = ({
363
366
  start,
364
367
  end,
365
368
  excludedBreakpoints,
366
- customEffects
369
+ customEffects,
370
+ codeEffect
367
371
  }) => ({
368
372
  $$type: "interaction-item",
369
373
  value: {
@@ -382,7 +386,8 @@ var createInteractionItem = ({
382
386
  times,
383
387
  start,
384
388
  end,
385
- customEffects
389
+ customEffects,
390
+ codeEffect
386
391
  }),
387
392
  ...excludedBreakpoints && excludedBreakpoints.length > 0 && {
388
393
  breakpoints: createInteractionBreakpoints(excludedBreakpoints)
@@ -772,6 +777,7 @@ var InteractionDetails = ({ interaction, onChange, onPlayInteraction }) => {
772
777
  const trigger = extractString(interaction.trigger, DEFAULT_VALUES.trigger);
773
778
  const effect = extractString(interaction.animation.value.effect, DEFAULT_VALUES.effect);
774
779
  const customEffects = interaction.animation.value.custom_effect;
780
+ const codeEffect = interaction.animation.value.code_effect;
775
781
  const type = extractString(interaction.animation.value.type, DEFAULT_VALUES.type);
776
782
  const direction = extractString(interaction.animation.value.direction, DEFAULT_VALUES.direction);
777
783
  const duration = extractSize(interaction.animation.value.timing_config.value.duration);
@@ -852,7 +858,8 @@ var InteractionDetails = ({ interaction, onChange, onPlayInteraction }) => {
852
858
  times: updates.times ?? times,
853
859
  start: updates.start ?? start,
854
860
  end: updates.end ?? end,
855
- customEffects: updates.customEffects ?? customEffects
861
+ customEffects: updates.customEffects ?? customEffects,
862
+ codeEffect
856
863
  })
857
864
  };
858
865
  onChange(updatedInteraction);