@elementor/editor-interactions 4.1.0-741 → 4.1.0-743

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 CHANGED
@@ -115,6 +115,8 @@ var import_ui7 = require("@elementor/ui");
115
115
  var React2 = __toESM(require("react"));
116
116
  var import_react2 = require("react");
117
117
  var import_editor_elements2 = require("@elementor/editor-elements");
118
+ var import_editor_v1_adapters2 = require("@elementor/editor-v1-adapters");
119
+ var import_i18n2 = require("@wordpress/i18n");
118
120
 
119
121
  // src/hooks/use-element-interactions.ts
120
122
  var import_react = require("react");
@@ -565,12 +567,39 @@ var InteractionsProvider = ({ children, elementId }) => {
565
567
  window.dispatchEvent(new CustomEvent("elementor/element/update_interactions"));
566
568
  }, []);
567
569
  const interactions = rawInteractions ?? DEFAULT_INTERACTIONS;
570
+ const undoableSetInteractions = (0, import_react2.useMemo)(
571
+ () => (0, import_editor_v1_adapters2.undoable)(
572
+ {
573
+ do: ({ interactions: newInteractions }) => {
574
+ const previous = (0, import_editor_elements2.getElementInteractions)(elementId);
575
+ (0, import_editor_elements2.updateElementInteractions)({ elementId, interactions: newInteractions });
576
+ return previous;
577
+ },
578
+ undo: (_, previous) => {
579
+ (0, import_editor_elements2.updateElementInteractions)({
580
+ elementId,
581
+ interactions: previous?.items?.length ? previous : void 0
582
+ });
583
+ }
584
+ },
585
+ {
586
+ title: (0, import_editor_elements2.getElementLabel)(elementId),
587
+ subtitle: ({ operationType }) => operationType === "apply" ? (0, import_i18n2.__)("Interaction Applied", "elementor") : (0, import_i18n2.__)("Interaction Deleted", "elementor")
588
+ }
589
+ ),
590
+ [elementId]
591
+ );
568
592
  const setInteractions = (value) => {
569
593
  const normalizedValue = value && value.items?.length === 0 ? void 0 : value;
570
- (0, import_editor_elements2.updateElementInteractions)({
571
- elementId,
572
- interactions: normalizedValue
573
- });
594
+ const prevItemCount = interactions.items?.length ?? 0;
595
+ const newItemCount = normalizedValue?.items?.length ?? 0;
596
+ if (newItemCount > prevItemCount) {
597
+ undoableSetInteractions({ interactions: normalizedValue, operationType: "apply" });
598
+ } else if (newItemCount < prevItemCount) {
599
+ undoableSetInteractions({ interactions: normalizedValue, operationType: "delete" });
600
+ } else {
601
+ (0, import_editor_elements2.updateElementInteractions)({ elementId, interactions: normalizedValue });
602
+ }
574
603
  };
575
604
  const playInteractions = (interactionId) => {
576
605
  (0, import_editor_elements2.playElementInteractions)(elementId, interactionId);
@@ -647,7 +676,7 @@ var import_react9 = require("react");
647
676
  var import_editor_controls5 = require("@elementor/editor-controls");
648
677
  var import_icons2 = require("@elementor/icons");
649
678
  var import_ui6 = require("@elementor/ui");
650
- var import_i18n5 = require("@wordpress/i18n");
679
+ var import_i18n6 = require("@wordpress/i18n");
651
680
 
652
681
  // src/contexts/interactions-item-context.tsx
653
682
  var React4 = __toESM(require("react"));
@@ -693,7 +722,7 @@ var React7 = __toESM(require("react"));
693
722
  var import_react6 = require("react");
694
723
  var import_editor_controls3 = require("@elementor/editor-controls");
695
724
  var import_ui3 = require("@elementor/ui");
696
- var import_i18n2 = require("@wordpress/i18n");
725
+ var import_i18n3 = require("@wordpress/i18n");
697
726
 
698
727
  // src/utils/resolve-direction.ts
699
728
  var resolveDirection = (hasDirection, newEffect, newDirection, currentDirection, currentEffect) => {
@@ -926,27 +955,27 @@ var InteractionDetails = ({ interaction, onChange, onPlayInteraction }) => {
926
955
  onPlayInteraction(interactionId);
927
956
  }, 0);
928
957
  };
929
- return /* @__PURE__ */ React7.createElement(import_editor_controls3.PopoverContent, { p: 1.5 }, /* @__PURE__ */ React7.createElement(import_ui3.Grid, { container: true, spacing: 1.5 }, TriggerControl && /* @__PURE__ */ React7.createElement(Field, { label: (0, import_i18n2.__)("Trigger", "elementor") }, /* @__PURE__ */ React7.createElement(TriggerControl, { value: trigger, onChange: (v) => updateInteraction({ trigger: v }) })), ReplayControl && /* @__PURE__ */ React7.createElement(Field, { label: (0, import_i18n2.__)("Replay", "elementor") }, /* @__PURE__ */ React7.createElement(
958
+ return /* @__PURE__ */ React7.createElement(import_editor_controls3.PopoverContent, { p: 1.5 }, /* @__PURE__ */ React7.createElement(import_ui3.Grid, { container: true, spacing: 1.5 }, TriggerControl && /* @__PURE__ */ React7.createElement(Field, { label: (0, import_i18n3.__)("Trigger", "elementor") }, /* @__PURE__ */ React7.createElement(TriggerControl, { value: trigger, onChange: (v) => updateInteraction({ trigger: v }) })), ReplayControl && /* @__PURE__ */ React7.createElement(Field, { label: (0, import_i18n3.__)("Replay", "elementor") }, /* @__PURE__ */ React7.createElement(
930
959
  ReplayControl,
931
960
  {
932
961
  value: replay,
933
962
  onChange: (v) => updateInteraction({ replay: v }),
934
963
  disabled: true
935
964
  }
936
- ))), /* @__PURE__ */ React7.createElement(import_ui3.Divider, null), /* @__PURE__ */ React7.createElement(import_ui3.Grid, { container: true, spacing: 1.5 }, EffectControl && /* @__PURE__ */ React7.createElement(Field, { label: (0, import_i18n2.__)("Effect", "elementor") }, /* @__PURE__ */ React7.createElement(EffectControl, { value: effect, onChange: (v) => updateInteraction({ effect: v }) })), CustomEffectControl && /* @__PURE__ */ React7.createElement(Field, { label: (0, import_i18n2.__)("Custom Effect", "elementor") }, /* @__PURE__ */ React7.createElement(
965
+ ))), /* @__PURE__ */ React7.createElement(import_ui3.Divider, null), /* @__PURE__ */ React7.createElement(import_ui3.Grid, { container: true, spacing: 1.5 }, EffectControl && /* @__PURE__ */ React7.createElement(Field, { label: (0, import_i18n3.__)("Effect", "elementor") }, /* @__PURE__ */ React7.createElement(EffectControl, { value: effect, onChange: (v) => updateInteraction({ effect: v }) })), CustomEffectControl && /* @__PURE__ */ React7.createElement(Field, { label: (0, import_i18n3.__)("Custom Effect", "elementor") }, /* @__PURE__ */ React7.createElement(
937
966
  CustomEffectControl,
938
967
  {
939
968
  value: customEffects,
940
969
  onChange: (v) => updateInteraction({ customEffects: v })
941
970
  }
942
- )), EffectTypeControl && /* @__PURE__ */ React7.createElement(Field, { label: (0, import_i18n2.__)("Type", "elementor") }, /* @__PURE__ */ React7.createElement(EffectTypeControl, { value: type, onChange: (v) => updateInteraction({ type: v }) })), DirectionControl && /* @__PURE__ */ React7.createElement(Field, { label: (0, import_i18n2.__)("Direction", "elementor") }, /* @__PURE__ */ React7.createElement(
971
+ )), EffectTypeControl && /* @__PURE__ */ React7.createElement(Field, { label: (0, import_i18n3.__)("Type", "elementor") }, /* @__PURE__ */ React7.createElement(EffectTypeControl, { value: type, onChange: (v) => updateInteraction({ type: v }) })), DirectionControl && /* @__PURE__ */ React7.createElement(Field, { label: (0, import_i18n3.__)("Direction", "elementor") }, /* @__PURE__ */ React7.createElement(
943
972
  DirectionControl,
944
973
  {
945
974
  value: direction,
946
975
  onChange: (v) => updateInteraction({ direction: v }),
947
976
  interactionType: type
948
977
  }
949
- )), RepeatControl && /* @__PURE__ */ React7.createElement(Field, { label: (0, import_i18n2.__)("Repeat", "elementor") }, /* @__PURE__ */ React7.createElement(RepeatControl, { value: repeat, onChange: (v) => updateInteraction({ repeat: v }) })), TimesControl && /* @__PURE__ */ React7.createElement(Field, { label: (0, import_i18n2.__)("Times", "elementor") }, /* @__PURE__ */ React7.createElement(
978
+ )), RepeatControl && /* @__PURE__ */ React7.createElement(Field, { label: (0, import_i18n3.__)("Repeat", "elementor") }, /* @__PURE__ */ React7.createElement(RepeatControl, { value: repeat, onChange: (v) => updateInteraction({ repeat: v }) })), TimesControl && /* @__PURE__ */ React7.createElement(Field, { label: (0, import_i18n3.__)("Times", "elementor") }, /* @__PURE__ */ React7.createElement(
950
979
  TimesControl,
951
980
  {
952
981
  value: times,
@@ -954,39 +983,39 @@ var InteractionDetails = ({ interaction, onChange, onPlayInteraction }) => {
954
983
  times: normalizeTimesValue(v, DEFAULT_VALUES.times)
955
984
  })
956
985
  }
957
- )), controlVisibilityConfig.duration(interactionValues) && /* @__PURE__ */ React7.createElement(Field, { label: (0, import_i18n2.__)("Duration", "elementor") }, /* @__PURE__ */ React7.createElement(
986
+ )), controlVisibilityConfig.duration(interactionValues) && /* @__PURE__ */ React7.createElement(Field, { label: (0, import_i18n3.__)("Duration", "elementor") }, /* @__PURE__ */ React7.createElement(
958
987
  TimeFrameIndicator,
959
988
  {
960
989
  value: String(duration),
961
990
  onChange: (v) => updateInteraction({ duration: v }),
962
991
  defaultValue: DEFAULT_VALUES.duration
963
992
  }
964
- )), controlVisibilityConfig.delay(interactionValues) && /* @__PURE__ */ React7.createElement(Field, { label: (0, import_i18n2.__)("Delay", "elementor") }, /* @__PURE__ */ React7.createElement(
993
+ )), controlVisibilityConfig.delay(interactionValues) && /* @__PURE__ */ React7.createElement(Field, { label: (0, import_i18n3.__)("Delay", "elementor") }, /* @__PURE__ */ React7.createElement(
965
994
  TimeFrameIndicator,
966
995
  {
967
996
  value: String(delay),
968
997
  onChange: (v) => updateInteraction({ delay: v }),
969
998
  defaultValue: DEFAULT_VALUES.delay
970
999
  }
971
- ))), controlVisibilityConfig.relativeTo(interactionValues) && RelativeToControl && /* @__PURE__ */ React7.createElement(React7.Fragment, null, /* @__PURE__ */ React7.createElement(import_ui3.Divider, null), /* @__PURE__ */ React7.createElement(import_ui3.Grid, { container: true, spacing: 1.5 }, StartControl && /* @__PURE__ */ React7.createElement(Field, { label: (0, import_i18n2.__)("Start", "elementor") }, /* @__PURE__ */ React7.createElement(
1000
+ ))), controlVisibilityConfig.relativeTo(interactionValues) && RelativeToControl && /* @__PURE__ */ React7.createElement(React7.Fragment, null, /* @__PURE__ */ React7.createElement(import_ui3.Divider, null), /* @__PURE__ */ React7.createElement(import_ui3.Grid, { container: true, spacing: 1.5 }, StartControl && /* @__PURE__ */ React7.createElement(Field, { label: (0, import_i18n3.__)("Start", "elementor") }, /* @__PURE__ */ React7.createElement(
972
1001
  StartControl,
973
1002
  {
974
1003
  value: parseSizeValue(start, ["%"]).size?.toString() ?? "",
975
1004
  onChange: (v) => updateInteraction({ start: v })
976
1005
  }
977
- )), EndControl && /* @__PURE__ */ React7.createElement(Field, { label: (0, import_i18n2.__)("End", "elementor") }, /* @__PURE__ */ React7.createElement(
1006
+ )), EndControl && /* @__PURE__ */ React7.createElement(Field, { label: (0, import_i18n3.__)("End", "elementor") }, /* @__PURE__ */ React7.createElement(
978
1007
  EndControl,
979
1008
  {
980
1009
  value: parseSizeValue(end, ["%"]).size?.toString() ?? "",
981
1010
  onChange: (v) => updateInteraction({ end: v })
982
1011
  }
983
- )), /* @__PURE__ */ React7.createElement(Field, { label: (0, import_i18n2.__)("Relative To", "elementor") }, /* @__PURE__ */ React7.createElement(
1012
+ )), /* @__PURE__ */ React7.createElement(Field, { label: (0, import_i18n3.__)("Relative To", "elementor") }, /* @__PURE__ */ React7.createElement(
984
1013
  RelativeToControl,
985
1014
  {
986
1015
  value: relativeTo,
987
1016
  onChange: (v) => updateInteraction({ relativeTo: v })
988
1017
  }
989
- ))), /* @__PURE__ */ React7.createElement(import_ui3.Divider, null)), EasingControl && /* @__PURE__ */ React7.createElement(import_ui3.Grid, { container: true, spacing: 1.5 }, /* @__PURE__ */ React7.createElement(Field, { label: (0, import_i18n2.__)("Easing", "elementor") }, /* @__PURE__ */ React7.createElement(
1018
+ ))), /* @__PURE__ */ React7.createElement(import_ui3.Divider, null)), EasingControl && /* @__PURE__ */ React7.createElement(import_ui3.Grid, { container: true, spacing: 1.5 }, /* @__PURE__ */ React7.createElement(Field, { label: (0, import_i18n3.__)("Easing", "elementor") }, /* @__PURE__ */ React7.createElement(
990
1019
  EasingControl,
991
1020
  {
992
1021
  value: easing,
@@ -1001,7 +1030,7 @@ var InteractionDetails = ({ interaction, onChange, onPlayInteraction }) => {
1001
1030
  var React9 = __toESM(require("react"));
1002
1031
  var import_react8 = require("react");
1003
1032
  var import_ui5 = require("@elementor/ui");
1004
- var import_i18n4 = require("@wordpress/i18n");
1033
+ var import_i18n5 = require("@wordpress/i18n");
1005
1034
 
1006
1035
  // src/components/interaction-settings.tsx
1007
1036
  var React8 = __toESM(require("react"));
@@ -1009,7 +1038,7 @@ var import_react7 = require("react");
1009
1038
  var import_editor_controls4 = require("@elementor/editor-controls");
1010
1039
  var import_editor_responsive = require("@elementor/editor-responsive");
1011
1040
  var import_ui4 = require("@elementor/ui");
1012
- var import_i18n3 = require("@wordpress/i18n");
1041
+ var import_i18n4 = require("@wordpress/i18n");
1013
1042
  var SIZE = "tiny";
1014
1043
  var InteractionSettings = ({ interaction, onChange }) => {
1015
1044
  const breakpoints = (0, import_editor_responsive.useBreakpoints)();
@@ -1043,7 +1072,7 @@ var InteractionSettings = ({ interaction, onChange }) => {
1043
1072
  },
1044
1073
  [interaction, availableBreakpoints, onChange]
1045
1074
  );
1046
- return /* @__PURE__ */ React8.createElement(import_editor_controls4.PopoverContent, { p: 1.5 }, /* @__PURE__ */ React8.createElement(import_ui4.Grid, { container: true, spacing: 1.5 }, /* @__PURE__ */ React8.createElement(import_ui4.Grid, { item: true, xs: 12 }, /* @__PURE__ */ React8.createElement(import_ui4.Stack, { direction: "column", gap: 1 }, /* @__PURE__ */ React8.createElement(import_editor_controls4.ControlFormLabel, { sx: { width: "100%" } }, (0, import_i18n3.__)("Trigger on", "elementor")), /* @__PURE__ */ React8.createElement(
1075
+ return /* @__PURE__ */ React8.createElement(import_editor_controls4.PopoverContent, { p: 1.5 }, /* @__PURE__ */ React8.createElement(import_ui4.Grid, { container: true, spacing: 1.5 }, /* @__PURE__ */ React8.createElement(import_ui4.Grid, { item: true, xs: 12 }, /* @__PURE__ */ React8.createElement(import_ui4.Stack, { direction: "column", gap: 1 }, /* @__PURE__ */ React8.createElement(import_editor_controls4.ControlFormLabel, { sx: { width: "100%" } }, (0, import_i18n4.__)("Trigger on", "elementor")), /* @__PURE__ */ React8.createElement(
1047
1076
  import_ui4.Autocomplete,
1048
1077
  {
1049
1078
  fullWidth: true,
@@ -1087,11 +1116,11 @@ var InteractionsListItem = ({
1087
1116
  {
1088
1117
  size: "small",
1089
1118
  variant: "fullWidth",
1090
- "aria-label": (0, import_i18n4.__)("Interaction", "elementor"),
1119
+ "aria-label": (0, import_i18n5.__)("Interaction", "elementor"),
1091
1120
  ...getTabsProps()
1092
1121
  },
1093
- /* @__PURE__ */ React9.createElement(import_ui5.Tab, { label: (0, import_i18n4.__)("Details", "elementor"), ...getTabProps("details") }),
1094
- /* @__PURE__ */ React9.createElement(import_ui5.Tab, { label: (0, import_i18n4.__)("Settings", "elementor"), ...getTabProps("settings") })
1122
+ /* @__PURE__ */ React9.createElement(import_ui5.Tab, { label: (0, import_i18n5.__)("Details", "elementor"), ...getTabProps("details") }),
1123
+ /* @__PURE__ */ React9.createElement(import_ui5.Tab, { label: (0, import_i18n5.__)("Settings", "elementor"), ...getTabProps("settings") })
1095
1124
  ), /* @__PURE__ */ React9.createElement(import_ui5.Divider, null), /* @__PURE__ */ React9.createElement(import_ui5.TabPanel, { sx: { p: 0 }, ...getTabPanelProps("details") }, /* @__PURE__ */ React9.createElement(
1096
1125
  InteractionDetails,
1097
1126
  {
@@ -1135,7 +1164,7 @@ function InteractionsList(props) {
1135
1164
  const isMaxNumberOfInteractionsReached = (0, import_react9.useMemo)(() => {
1136
1165
  return interactions.items?.length >= MAX_NUMBER_OF_INTERACTIONS;
1137
1166
  }, [interactions.items?.length]);
1138
- const infotipContent = isMaxNumberOfInteractionsReached ? /* @__PURE__ */ React10.createElement(import_ui6.Alert, { color: "secondary", icon: /* @__PURE__ */ React10.createElement(import_icons2.InfoCircleFilledIcon, null), size: "small" }, /* @__PURE__ */ React10.createElement(import_ui6.AlertTitle, null, (0, import_i18n5.__)("Interactions", "elementor")), /* @__PURE__ */ React10.createElement(import_ui6.Box, { component: "span" }, (0, import_i18n5.__)(
1167
+ const infotipContent = isMaxNumberOfInteractionsReached ? /* @__PURE__ */ React10.createElement(import_ui6.Alert, { color: "secondary", icon: /* @__PURE__ */ React10.createElement(import_icons2.InfoCircleFilledIcon, null), size: "small" }, /* @__PURE__ */ React10.createElement(import_ui6.AlertTitle, null, (0, import_i18n6.__)("Interactions", "elementor")), /* @__PURE__ */ React10.createElement(import_ui6.Box, { component: "span" }, (0, import_i18n6.__)(
1139
1168
  "You've reached the limit of 5 interactions for this element. Please remove an interaction before creating a new one.",
1140
1169
  "elementor"
1141
1170
  ))) : void 0;
@@ -1180,7 +1209,7 @@ function InteractionsList(props) {
1180
1209
  {
1181
1210
  openOnAdd: true,
1182
1211
  openItem: triggerCreateOnShowEmpty ? 0 : void 0,
1183
- label: (0, import_i18n5.__)("Interactions", "elementor"),
1212
+ label: (0, import_i18n6.__)("Interactions", "elementor"),
1184
1213
  values: interactions.items,
1185
1214
  setValues: handleRepeaterChange,
1186
1215
  showDuplicate: false,
@@ -1201,10 +1230,10 @@ function InteractionsList(props) {
1201
1230
  syncGridOverlay(trigger, start, end, relativeTo);
1202
1231
  },
1203
1232
  onPopoverClose: () => dispatchScrollInteraction(null),
1204
- actions: (value) => /* @__PURE__ */ React10.createElement(import_ui6.Tooltip, { key: "preview", placement: "top", title: (0, import_i18n5.__)("Preview", "elementor") }, /* @__PURE__ */ React10.createElement(
1233
+ actions: (value) => /* @__PURE__ */ React10.createElement(import_ui6.Tooltip, { key: "preview", placement: "top", title: (0, import_i18n6.__)("Preview", "elementor") }, /* @__PURE__ */ React10.createElement(
1205
1234
  import_ui6.IconButton,
1206
1235
  {
1207
- "aria-label": (0, import_i18n5.__)("Play interaction", "elementor"),
1236
+ "aria-label": (0, import_i18n6.__)("Play interaction", "elementor"),
1208
1237
  size: "tiny",
1209
1238
  onClick: () => onPlayInteraction(extractString(value.value.interaction_id))
1210
1239
  },
@@ -1320,7 +1349,7 @@ function createInteractionsProvider({
1320
1349
 
1321
1350
  // src/providers/document-elements-interactions-provider.ts
1322
1351
  var import_editor_elements4 = require("@elementor/editor-elements");
1323
- var import_editor_v1_adapters2 = require("@elementor/editor-v1-adapters");
1352
+ var import_editor_v1_adapters3 = require("@elementor/editor-v1-adapters");
1324
1353
  var ELEMENTS_INTERACTIONS_PROVIDER_KEY_PREFIX = "document-elements-interactions-";
1325
1354
  var documentElementsInteractionsProvider = createInteractionsProvider({
1326
1355
  key: () => {
@@ -1334,7 +1363,7 @@ var documentElementsInteractionsProvider = createInteractionsProvider({
1334
1363
  },
1335
1364
  priority: 50,
1336
1365
  subscribe: (cb) => {
1337
- return (0, import_editor_v1_adapters2.__privateListenTo)([(0, import_editor_v1_adapters2.windowEvent)("elementor/element/update_interactions")], () => cb());
1366
+ return (0, import_editor_v1_adapters3.__privateListenTo)([(0, import_editor_v1_adapters3.windowEvent)("elementor/element/update_interactions")], () => cb());
1338
1367
  },
1339
1368
  actions: {
1340
1369
  all: () => {
@@ -1363,8 +1392,8 @@ var import_editor_mcp = require("@elementor/editor-mcp");
1363
1392
 
1364
1393
  // src/commands/paste-interactions.ts
1365
1394
  var import_editor_elements5 = require("@elementor/editor-elements");
1366
- var import_editor_v1_adapters3 = require("@elementor/editor-v1-adapters");
1367
- var import_i18n6 = require("@wordpress/i18n");
1395
+ var import_editor_v1_adapters4 = require("@elementor/editor-v1-adapters");
1396
+ var import_i18n7 = require("@wordpress/i18n");
1368
1397
 
1369
1398
  // src/commands/get-clipboard-elements.ts
1370
1399
  function getClipboardElements(storageKey = "clipboard") {
@@ -1384,7 +1413,7 @@ function isAtomicContainer(container) {
1384
1413
  return Boolean(elementConfig?.atomic_props_schema);
1385
1414
  }
1386
1415
  function getTitleForContainers(containers) {
1387
- return containers.length > 1 ? (0, import_i18n6.__)("Elements", "elementor") : (0, import_editor_elements5.getElementLabel)(containers[0].id);
1416
+ return containers.length > 1 ? (0, import_i18n7.__)("Elements", "elementor") : (0, import_editor_elements5.getElementLabel)(containers[0].id);
1388
1417
  }
1389
1418
  function normalizeClipboardInteractions(raw) {
1390
1419
  if (!raw) {
@@ -1410,7 +1439,7 @@ function regenerateInteractionIds(interactions) {
1410
1439
  return cloned;
1411
1440
  }
1412
1441
  function initPasteInteractionsCommand() {
1413
- const undoablePasteInteractions = (0, import_editor_v1_adapters3.undoable)(
1442
+ const undoablePasteInteractions = (0, import_editor_v1_adapters4.undoable)(
1414
1443
  {
1415
1444
  do: ({ containers, newInteractions }) => {
1416
1445
  const pasted = regenerateInteractionIds(newInteractions);
@@ -1435,10 +1464,10 @@ function initPasteInteractionsCommand() {
1435
1464
  },
1436
1465
  {
1437
1466
  title: ({ containers }) => getTitleForContainers(containers),
1438
- subtitle: (0, import_i18n6.__)("Interactions Pasted", "elementor")
1467
+ subtitle: (0, import_i18n7.__)("Interactions Pasted", "elementor")
1439
1468
  }
1440
1469
  );
1441
- (0, import_editor_v1_adapters3.__privateListenTo)((0, import_editor_v1_adapters3.commandStartEvent)("document/elements/paste-interactions"), (e) => {
1470
+ (0, import_editor_v1_adapters4.__privateListenTo)((0, import_editor_v1_adapters4.commandStartEvent)("document/elements/paste-interactions"), (e) => {
1442
1471
  const args = e.args;
1443
1472
  const containers = args.containers ?? (args.container ? [args.container] : []);
1444
1473
  const storageKey = args.storageKey ?? "clipboard";
@@ -1469,7 +1498,7 @@ var import_react11 = require("react");
1469
1498
  var import_editor_controls6 = require("@elementor/editor-controls");
1470
1499
  var import_icons3 = require("@elementor/icons");
1471
1500
  var import_ui8 = require("@elementor/ui");
1472
- var import_i18n7 = require("@wordpress/i18n");
1501
+ var import_i18n8 = require("@wordpress/i18n");
1473
1502
  var AXIS = {
1474
1503
  top: "vertical",
1475
1504
  bottom: "vertical",
@@ -1500,22 +1529,22 @@ function Direction({ value, onChange, interactionType }) {
1500
1529
  () => [
1501
1530
  {
1502
1531
  dir: "top",
1503
- label: isIn ? (0, import_i18n7.__)("From top", "elementor") : (0, import_i18n7.__)("To top", "elementor"),
1532
+ label: isIn ? (0, import_i18n8.__)("From top", "elementor") : (0, import_i18n8.__)("To top", "elementor"),
1504
1533
  Icon: isIn ? import_icons3.ArrowDownSmallIcon : import_icons3.ArrowUpSmallIcon
1505
1534
  },
1506
1535
  {
1507
1536
  dir: "bottom",
1508
- label: isIn ? (0, import_i18n7.__)("From bottom", "elementor") : (0, import_i18n7.__)("To bottom", "elementor"),
1537
+ label: isIn ? (0, import_i18n8.__)("From bottom", "elementor") : (0, import_i18n8.__)("To bottom", "elementor"),
1509
1538
  Icon: isIn ? import_icons3.ArrowUpSmallIcon : import_icons3.ArrowDownSmallIcon
1510
1539
  },
1511
1540
  {
1512
1541
  dir: "left",
1513
- label: isIn ? (0, import_i18n7.__)("From left", "elementor") : (0, import_i18n7.__)("To left", "elementor"),
1542
+ label: isIn ? (0, import_i18n8.__)("From left", "elementor") : (0, import_i18n8.__)("To left", "elementor"),
1514
1543
  Icon: isIn ? import_icons3.ArrowRightIcon : import_icons3.ArrowLeftIcon
1515
1544
  },
1516
1545
  {
1517
1546
  dir: "right",
1518
- label: isIn ? (0, import_i18n7.__)("From right", "elementor") : (0, import_i18n7.__)("To right", "elementor"),
1547
+ label: isIn ? (0, import_i18n8.__)("From right", "elementor") : (0, import_i18n8.__)("To right", "elementor"),
1519
1548
  Icon: isIn ? import_icons3.ArrowLeftIcon : import_icons3.ArrowRightIcon
1520
1549
  }
1521
1550
  ],
@@ -1553,14 +1582,14 @@ function Direction({ value, onChange, interactionType }) {
1553
1582
 
1554
1583
  // src/components/controls/easing.tsx
1555
1584
  var React15 = __toESM(require("react"));
1556
- var import_i18n10 = require("@wordpress/i18n");
1585
+ var import_i18n11 = require("@wordpress/i18n");
1557
1586
 
1558
1587
  // src/ui/promotion-select.tsx
1559
1588
  var React14 = __toESM(require("react"));
1560
1589
  var import_react13 = require("react");
1561
1590
  var import_editor_ui2 = require("@elementor/editor-ui");
1562
1591
  var import_ui10 = require("@elementor/ui");
1563
- var import_i18n9 = require("@wordpress/i18n");
1592
+ var import_i18n10 = require("@wordpress/i18n");
1564
1593
 
1565
1594
  // src/ui/interactions-promotion-chip.tsx
1566
1595
  var React13 = __toESM(require("react"));
@@ -1568,7 +1597,7 @@ var import_react12 = require("react");
1568
1597
  var import_editor_controls7 = require("@elementor/editor-controls");
1569
1598
  var import_editor_ui = require("@elementor/editor-ui");
1570
1599
  var import_ui9 = require("@elementor/ui");
1571
- var import_i18n8 = require("@wordpress/i18n");
1600
+ var import_i18n9 = require("@wordpress/i18n");
1572
1601
  var InteractionsPromotionChip = (0, import_react12.forwardRef)(
1573
1602
  ({ content, upgradeUrl, anchorRef, trackingData }, ref) => {
1574
1603
  const [isOpen, setIsOpen] = (0, import_react12.useState)(false);
@@ -1590,9 +1619,9 @@ var InteractionsPromotionChip = (0, import_react12.forwardRef)(
1590
1619
  import_editor_ui.PromotionPopover,
1591
1620
  {
1592
1621
  open: isOpen,
1593
- title: (0, import_i18n8.__)("Interactions", "elementor"),
1622
+ title: (0, import_i18n9.__)("Interactions", "elementor"),
1594
1623
  content,
1595
- ctaText: (0, import_i18n8.__)("Upgrade now", "elementor"),
1624
+ ctaText: (0, import_i18n9.__)("Upgrade now", "elementor"),
1596
1625
  ctaUrl: upgradeUrl,
1597
1626
  anchorRef,
1598
1627
  placement: anchorRef ? "right-start" : void 0,
@@ -1655,7 +1684,7 @@ function PromotionSelect({
1655
1684
  promotionRef.current?.toggle();
1656
1685
  }
1657
1686
  },
1658
- promotionLabel ?? (0, import_i18n9.__)("PRO features", "elementor"),
1687
+ promotionLabel ?? (0, import_i18n10.__)("PRO features", "elementor"),
1659
1688
  /* @__PURE__ */ React14.createElement(
1660
1689
  InteractionsPromotionChip,
1661
1690
  {
@@ -1674,13 +1703,13 @@ function PromotionSelect({
1674
1703
  // src/components/controls/easing.tsx
1675
1704
  var TRACKING_DATA = { target_name: "interactions_easing", location_l2: "interactions" };
1676
1705
  var EASING_OPTIONS = {
1677
- easeIn: (0, import_i18n10.__)("Ease In", "elementor"),
1678
- easeInOut: (0, import_i18n10.__)("Ease In Out", "elementor"),
1679
- easeOut: (0, import_i18n10.__)("Ease Out", "elementor"),
1680
- backIn: (0, import_i18n10.__)("Back In", "elementor"),
1681
- backInOut: (0, import_i18n10.__)("Back In Out", "elementor"),
1682
- backOut: (0, import_i18n10.__)("Back Out", "elementor"),
1683
- linear: (0, import_i18n10.__)("Linear", "elementor")
1706
+ easeIn: (0, import_i18n11.__)("Ease In", "elementor"),
1707
+ easeInOut: (0, import_i18n11.__)("Ease In Out", "elementor"),
1708
+ easeOut: (0, import_i18n11.__)("Ease Out", "elementor"),
1709
+ backIn: (0, import_i18n11.__)("Back In", "elementor"),
1710
+ backInOut: (0, import_i18n11.__)("Back In Out", "elementor"),
1711
+ backOut: (0, import_i18n11.__)("Back Out", "elementor"),
1712
+ linear: (0, import_i18n11.__)("Linear", "elementor")
1684
1713
  };
1685
1714
  var BASE_EASINGS = ["easeIn"];
1686
1715
  function Easing({}) {
@@ -1696,7 +1725,7 @@ function Easing({}) {
1696
1725
  value: DEFAULT_VALUES.easing,
1697
1726
  baseOptions,
1698
1727
  disabledOptions,
1699
- promotionContent: (0, import_i18n10.__)("Upgrade to control the smoothness of the interaction.", "elementor"),
1728
+ promotionContent: (0, import_i18n11.__)("Upgrade to control the smoothness of the interaction.", "elementor"),
1700
1729
  upgradeUrl: "https://go.elementor.com/go-pro-interactions-easing-modal/",
1701
1730
  trackingData: TRACKING_DATA
1702
1731
  }
@@ -1705,13 +1734,13 @@ function Easing({}) {
1705
1734
 
1706
1735
  // src/components/controls/effect.tsx
1707
1736
  var React16 = __toESM(require("react"));
1708
- var import_i18n11 = require("@wordpress/i18n");
1737
+ var import_i18n12 = require("@wordpress/i18n");
1709
1738
  var TRACKING_DATA2 = { target_name: "interactions_effect", location_l2: "interactions" };
1710
1739
  var EFFECT_OPTIONS = {
1711
- fade: (0, import_i18n11.__)("Fade", "elementor"),
1712
- slide: (0, import_i18n11.__)("Slide", "elementor"),
1713
- scale: (0, import_i18n11.__)("Scale", "elementor"),
1714
- custom: (0, import_i18n11.__)("Custom", "elementor")
1740
+ fade: (0, import_i18n12.__)("Fade", "elementor"),
1741
+ slide: (0, import_i18n12.__)("Slide", "elementor"),
1742
+ scale: (0, import_i18n12.__)("Scale", "elementor"),
1743
+ custom: (0, import_i18n12.__)("Custom", "elementor")
1715
1744
  };
1716
1745
  var BASE_EFFECTS = ["fade", "slide", "scale"];
1717
1746
  function Effect({ value, onChange }) {
@@ -1728,8 +1757,8 @@ function Effect({ value, onChange }) {
1728
1757
  onChange,
1729
1758
  baseOptions,
1730
1759
  disabledOptions,
1731
- promotionLabel: (0, import_i18n11.__)("PRO effects", "elementor"),
1732
- promotionContent: (0, import_i18n11.__)(
1760
+ promotionLabel: (0, import_i18n12.__)("PRO effects", "elementor"),
1761
+ promotionContent: (0, import_i18n12.__)(
1733
1762
  "Upgrade to further customize your animation with opacity, scale, move, rotate and more.",
1734
1763
  "elementor"
1735
1764
  ),
@@ -1742,19 +1771,19 @@ function Effect({ value, onChange }) {
1742
1771
  // src/components/controls/effect-type.tsx
1743
1772
  var React17 = __toESM(require("react"));
1744
1773
  var import_editor_controls8 = require("@elementor/editor-controls");
1745
- var import_i18n12 = require("@wordpress/i18n");
1774
+ var import_i18n13 = require("@wordpress/i18n");
1746
1775
  function EffectType({ value, onChange }) {
1747
1776
  const options = [
1748
1777
  {
1749
1778
  value: "in",
1750
- label: (0, import_i18n12.__)("In", "elementor"),
1751
- renderContent: () => (0, import_i18n12.__)("In", "elementor"),
1779
+ label: (0, import_i18n13.__)("In", "elementor"),
1780
+ renderContent: () => (0, import_i18n13.__)("In", "elementor"),
1752
1781
  showTooltip: true
1753
1782
  },
1754
1783
  {
1755
1784
  value: "out",
1756
- label: (0, import_i18n12.__)("Out", "elementor"),
1757
- renderContent: () => (0, import_i18n12.__)("Out", "elementor"),
1785
+ label: (0, import_i18n13.__)("Out", "elementor"),
1786
+ renderContent: () => (0, import_i18n13.__)("Out", "elementor"),
1758
1787
  showTooltip: true
1759
1788
  }
1760
1789
  ];
@@ -1766,7 +1795,7 @@ var React19 = __toESM(require("react"));
1766
1795
  var import_react15 = require("react");
1767
1796
  var import_editor_controls9 = require("@elementor/editor-controls");
1768
1797
  var import_icons4 = require("@elementor/icons");
1769
- var import_i18n13 = require("@wordpress/i18n");
1798
+ var import_i18n14 = require("@wordpress/i18n");
1770
1799
 
1771
1800
  // src/ui/promotion-overlay-layout.tsx
1772
1801
  var React18 = __toESM(require("react"));
@@ -1781,12 +1810,12 @@ var PromotionOverlayLayout = (0, import_react14.forwardRef)(
1781
1810
  // src/components/controls/repeat.tsx
1782
1811
  var TRACKING_DATA3 = { target_name: "interactions_repeat", location_l2: "interactions" };
1783
1812
  var REPEAT_OPTIONS = {
1784
- times: (0, import_i18n13.__)("times", "elementor"),
1785
- loop: (0, import_i18n13.__)("loop", "elementor")
1813
+ times: (0, import_i18n14.__)("times", "elementor"),
1814
+ loop: (0, import_i18n14.__)("loop", "elementor")
1786
1815
  };
1787
1816
  var REPEAT_TOOLTIPS = {
1788
- times: (0, import_i18n13.__)("Enable number", "elementor"),
1789
- loop: (0, import_i18n13.__)("Infinite repeat", "elementor")
1817
+ times: (0, import_i18n14.__)("Enable number", "elementor"),
1818
+ loop: (0, import_i18n14.__)("Infinite repeat", "elementor")
1790
1819
  };
1791
1820
  function Repeat() {
1792
1821
  const repeatContainerRef = (0, import_react15.useRef)(null);
@@ -1813,7 +1842,7 @@ function Repeat() {
1813
1842
  promotionChip: /* @__PURE__ */ React19.createElement(
1814
1843
  InteractionsPromotionChip,
1815
1844
  {
1816
- content: (0, import_i18n13.__)("Upgrade to control how many times the animation repeats.", "elementor"),
1845
+ content: (0, import_i18n14.__)("Upgrade to control how many times the animation repeats.", "elementor"),
1817
1846
  upgradeUrl: "https://go.elementor.com/go-pro-interactions-repeat-modal/",
1818
1847
  anchorRef: repeatContainerRef,
1819
1848
  trackingData: TRACKING_DATA3
@@ -1830,11 +1859,11 @@ var React20 = __toESM(require("react"));
1830
1859
  var import_react16 = require("react");
1831
1860
  var import_editor_controls10 = require("@elementor/editor-controls");
1832
1861
  var import_icons5 = require("@elementor/icons");
1833
- var import_i18n14 = require("@wordpress/i18n");
1862
+ var import_i18n15 = require("@wordpress/i18n");
1834
1863
  var TRACKING_DATA4 = { target_name: "interactions_replay", location_l2: "interactions" };
1835
1864
  var REPLAY_OPTIONS = {
1836
- no: (0, import_i18n14.__)("No", "elementor"),
1837
- yes: (0, import_i18n14.__)("Yes", "elementor")
1865
+ no: (0, import_i18n15.__)("No", "elementor"),
1866
+ yes: (0, import_i18n15.__)("Yes", "elementor")
1838
1867
  };
1839
1868
  var BASE_REPLAY = ["no"];
1840
1869
  function Replay({ onChange }) {
@@ -1862,7 +1891,7 @@ function Replay({ onChange }) {
1862
1891
  promotionChip: /* @__PURE__ */ React20.createElement(
1863
1892
  InteractionsPromotionChip,
1864
1893
  {
1865
- content: (0, import_i18n14.__)("Upgrade to run the animation every time its trigger occurs.", "elementor"),
1894
+ content: (0, import_i18n15.__)("Upgrade to run the animation every time its trigger occurs.", "elementor"),
1866
1895
  upgradeUrl: "https://go.elementor.com/go-pro-interactions-replay-modal/",
1867
1896
  anchorRef: replayContainerRef,
1868
1897
  trackingData: TRACKING_DATA4
@@ -1875,14 +1904,14 @@ function Replay({ onChange }) {
1875
1904
 
1876
1905
  // src/components/controls/trigger.tsx
1877
1906
  var React21 = __toESM(require("react"));
1878
- var import_i18n15 = require("@wordpress/i18n");
1907
+ var import_i18n16 = require("@wordpress/i18n");
1879
1908
  var TRACKING_DATA5 = { target_name: "interactions_trigger", location_l2: "interactions" };
1880
1909
  var TRIGGER_OPTIONS = {
1881
- load: (0, import_i18n15.__)("Page load", "elementor"),
1882
- scrollIn: (0, import_i18n15.__)("Scroll into view", "elementor"),
1883
- scrollOn: (0, import_i18n15.__)("While scrolling", "elementor"),
1884
- hover: (0, import_i18n15.__)("On hover", "elementor"),
1885
- click: (0, import_i18n15.__)("On click", "elementor")
1910
+ load: (0, import_i18n16.__)("Page load", "elementor"),
1911
+ scrollIn: (0, import_i18n16.__)("Scroll into view", "elementor"),
1912
+ scrollOn: (0, import_i18n16.__)("While scrolling", "elementor"),
1913
+ hover: (0, import_i18n16.__)("On hover", "elementor"),
1914
+ click: (0, import_i18n16.__)("On click", "elementor")
1886
1915
  };
1887
1916
  var BASE_TRIGGERS = ["load", "scrollIn"];
1888
1917
  function Trigger({ value, onChange }) {
@@ -1899,8 +1928,8 @@ function Trigger({ value, onChange }) {
1899
1928
  onChange,
1900
1929
  baseOptions,
1901
1930
  disabledOptions,
1902
- promotionLabel: (0, import_i18n15.__)("PRO triggers", "elementor"),
1903
- promotionContent: (0, import_i18n15.__)("Upgrade to unlock more interactions triggers.", "elementor"),
1931
+ promotionLabel: (0, import_i18n16.__)("PRO triggers", "elementor"),
1932
+ promotionContent: (0, import_i18n16.__)("Upgrade to unlock more interactions triggers.", "elementor"),
1904
1933
  upgradeUrl: "https://go.elementor.com/go-pro-interactions-triggers-modal/",
1905
1934
  trackingData: TRACKING_DATA5
1906
1935
  }
@@ -1909,9 +1938,9 @@ function Trigger({ value, onChange }) {
1909
1938
 
1910
1939
  // src/hooks/on-duplicate.ts
1911
1940
  var import_editor_elements6 = require("@elementor/editor-elements");
1912
- var import_editor_v1_adapters4 = require("@elementor/editor-v1-adapters");
1941
+ var import_editor_v1_adapters5 = require("@elementor/editor-v1-adapters");
1913
1942
  function initCleanInteractionIdsOnDuplicate() {
1914
- (0, import_editor_v1_adapters4.registerDataHook)("after", "document/elements/duplicate", (_args, result) => {
1943
+ (0, import_editor_v1_adapters5.registerDataHook)("after", "document/elements/duplicate", (_args, result) => {
1915
1944
  const containers = Array.isArray(result) ? result : [result];
1916
1945
  containers.forEach((container) => {
1917
1946
  cleanInteractionIdsRecursive(container.id);