@elementor/editor-interactions 4.5.0-1271 → 4.5.0-1273
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 +9 -5
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +10 -6
- package/dist/index.mjs.map +1 -1
- package/package.json +13 -13
- package/src/components/interactions-list.tsx +9 -5
- package/src/mcp/constants.ts +1 -1
package/dist/index.mjs
CHANGED
|
@@ -581,7 +581,7 @@ import { useCallback as useCallback5, useEffect as useEffect2, useMemo as useMem
|
|
|
581
581
|
import { Repeater } from "@elementor/editor-controls";
|
|
582
582
|
import { InfoCircleFilledIcon, PlayerPlayIcon } from "@elementor/icons";
|
|
583
583
|
import { Alert, AlertTitle, Box as Box2, IconButton, Tooltip } from "@elementor/ui";
|
|
584
|
-
import { __ as __6 } from "@wordpress/i18n";
|
|
584
|
+
import { __ as __6, sprintf } from "@wordpress/i18n";
|
|
585
585
|
|
|
586
586
|
// src/contexts/interactions-item-context.tsx
|
|
587
587
|
import * as React4 from "react";
|
|
@@ -1059,7 +1059,7 @@ var InteractionsListItem = ({
|
|
|
1059
1059
|
};
|
|
1060
1060
|
|
|
1061
1061
|
// src/components/interactions-list.tsx
|
|
1062
|
-
var MAX_NUMBER_OF_INTERACTIONS =
|
|
1062
|
+
var MAX_NUMBER_OF_INTERACTIONS = 10;
|
|
1063
1063
|
function InteractionsList(props) {
|
|
1064
1064
|
const { interactions, onSelectInteractions, onPlayInteraction, triggerCreateOnShowEmpty } = props;
|
|
1065
1065
|
const { elementId } = useInteractionsContext();
|
|
@@ -1086,9 +1086,13 @@ function InteractionsList(props) {
|
|
|
1086
1086
|
const isMaxNumberOfInteractionsReached = useMemo4(() => {
|
|
1087
1087
|
return interactions.items?.length >= MAX_NUMBER_OF_INTERACTIONS;
|
|
1088
1088
|
}, [interactions.items?.length]);
|
|
1089
|
-
const infotipContent = isMaxNumberOfInteractionsReached ? /* @__PURE__ */ React10.createElement(Alert, { color: "secondary", icon: /* @__PURE__ */ React10.createElement(InfoCircleFilledIcon, null), size: "small" }, /* @__PURE__ */ React10.createElement(AlertTitle, null, __6("Interactions", "elementor")), /* @__PURE__ */ React10.createElement(Box2, { component: "span" },
|
|
1090
|
-
|
|
1091
|
-
|
|
1089
|
+
const infotipContent = isMaxNumberOfInteractionsReached ? /* @__PURE__ */ React10.createElement(Alert, { color: "secondary", icon: /* @__PURE__ */ React10.createElement(InfoCircleFilledIcon, null), size: "small" }, /* @__PURE__ */ React10.createElement(AlertTitle, null, __6("Interactions", "elementor")), /* @__PURE__ */ React10.createElement(Box2, { component: "span" }, sprintf(
|
|
1090
|
+
/* translators: %d: maximum number of interactions per element */
|
|
1091
|
+
__6(
|
|
1092
|
+
"You've reached the limit of %d interactions for this element. Please remove an interaction before creating a new one.",
|
|
1093
|
+
"elementor"
|
|
1094
|
+
),
|
|
1095
|
+
MAX_NUMBER_OF_INTERACTIONS
|
|
1092
1096
|
))) : void 0;
|
|
1093
1097
|
const handleRepeaterChange = useCallback5(
|
|
1094
1098
|
(newItems, _, meta) => {
|
|
@@ -2002,7 +2006,7 @@ import { z as z2 } from "@elementor/schema";
|
|
|
2002
2006
|
import { isProActive as isProActive2 } from "@elementor/utils";
|
|
2003
2007
|
|
|
2004
2008
|
// src/mcp/constants.ts
|
|
2005
|
-
var MAX_INTERACTIONS_PER_ELEMENT =
|
|
2009
|
+
var MAX_INTERACTIONS_PER_ELEMENT = 10;
|
|
2006
2010
|
var EDITOR_INTERACTIONS_MCP_SHORT_DESCRIPTION = `Everything related to V4 ( Atomic ) interactions.
|
|
2007
2011
|
# Interactions
|
|
2008
2012
|
- Create/update/delete interactions
|