@elementor/editor-interactions 4.0.0-601 → 4.0.0-606
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 +9 -1
- package/dist/index.d.ts +9 -1
- package/dist/index.js +60 -50
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +56 -48
- package/dist/index.mjs.map +1 -1
- package/package.json +9 -9
- package/src/components/controls/easing.tsx +0 -1
- package/src/components/controls/effect.tsx +30 -24
- package/src/index.ts +1 -0
- package/src/ui/promotion-select.tsx +3 -2
package/dist/index.d.mts
CHANGED
|
@@ -124,4 +124,12 @@ declare const REPLAY_OPTIONS: {
|
|
|
124
124
|
};
|
|
125
125
|
declare const BASE_REPLAY: string[];
|
|
126
126
|
|
|
127
|
-
|
|
127
|
+
declare const EFFECT_OPTIONS: {
|
|
128
|
+
fade: string;
|
|
129
|
+
slide: string;
|
|
130
|
+
scale: string;
|
|
131
|
+
custom: string;
|
|
132
|
+
};
|
|
133
|
+
declare const BASE_EFFECTS: string[];
|
|
134
|
+
|
|
135
|
+
export { BASE_EASINGS, BASE_EFFECTS, BASE_REPLAY, BASE_TRIGGERS, type CreateInteractionsProviderOptions, EASING_OPTIONS, EFFECT_OPTIONS, ELEMENTS_INTERACTIONS_PROVIDER_KEY_PREFIX, EmptyState, type FieldProps, InteractionsTab, REPLAY_OPTIONS, type ReplayFieldProps, TRIGGER_OPTIONS, createInteractionsProvider, getInteractionsConfig, init, interactionsRepository, registerInteractionsControl };
|
package/dist/index.d.ts
CHANGED
|
@@ -124,4 +124,12 @@ declare const REPLAY_OPTIONS: {
|
|
|
124
124
|
};
|
|
125
125
|
declare const BASE_REPLAY: string[];
|
|
126
126
|
|
|
127
|
-
|
|
127
|
+
declare const EFFECT_OPTIONS: {
|
|
128
|
+
fade: string;
|
|
129
|
+
slide: string;
|
|
130
|
+
scale: string;
|
|
131
|
+
custom: string;
|
|
132
|
+
};
|
|
133
|
+
declare const BASE_EFFECTS: string[];
|
|
134
|
+
|
|
135
|
+
export { BASE_EASINGS, BASE_EFFECTS, BASE_REPLAY, BASE_TRIGGERS, type CreateInteractionsProviderOptions, EASING_OPTIONS, EFFECT_OPTIONS, ELEMENTS_INTERACTIONS_PROVIDER_KEY_PREFIX, EmptyState, type FieldProps, InteractionsTab, REPLAY_OPTIONS, type ReplayFieldProps, TRIGGER_OPTIONS, createInteractionsProvider, getInteractionsConfig, init, interactionsRepository, registerInteractionsControl };
|
package/dist/index.js
CHANGED
|
@@ -31,9 +31,11 @@ var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: tru
|
|
|
31
31
|
var index_exports = {};
|
|
32
32
|
__export(index_exports, {
|
|
33
33
|
BASE_EASINGS: () => BASE_EASINGS,
|
|
34
|
+
BASE_EFFECTS: () => BASE_EFFECTS,
|
|
34
35
|
BASE_REPLAY: () => BASE_REPLAY,
|
|
35
36
|
BASE_TRIGGERS: () => BASE_TRIGGERS,
|
|
36
37
|
EASING_OPTIONS: () => EASING_OPTIONS,
|
|
38
|
+
EFFECT_OPTIONS: () => EFFECT_OPTIONS,
|
|
37
39
|
ELEMENTS_INTERACTIONS_PROVIDER_KEY_PREFIX: () => ELEMENTS_INTERACTIONS_PROVIDER_KEY_PREFIX,
|
|
38
40
|
EmptyState: () => EmptyState,
|
|
39
41
|
InteractionsTab: () => InteractionsTab,
|
|
@@ -1081,13 +1083,14 @@ function Direction({ value, onChange, interactionType }) {
|
|
|
1081
1083
|
|
|
1082
1084
|
// src/components/controls/easing.tsx
|
|
1083
1085
|
var React15 = __toESM(require("react"));
|
|
1084
|
-
var
|
|
1086
|
+
var import_i18n9 = require("@wordpress/i18n");
|
|
1085
1087
|
|
|
1086
1088
|
// src/ui/promotion-select.tsx
|
|
1087
1089
|
var React14 = __toESM(require("react"));
|
|
1088
1090
|
var import_react12 = require("react");
|
|
1089
1091
|
var import_editor_ui2 = require("@elementor/editor-ui");
|
|
1090
1092
|
var import_ui9 = require("@elementor/ui");
|
|
1093
|
+
var import_i18n8 = require("@wordpress/i18n");
|
|
1091
1094
|
|
|
1092
1095
|
// src/ui/interactions-promotion-chip.tsx
|
|
1093
1096
|
var React13 = __toESM(require("react"));
|
|
@@ -1173,7 +1176,7 @@ function PromotionSelect({
|
|
|
1173
1176
|
promotionRef.current?.toggle();
|
|
1174
1177
|
}
|
|
1175
1178
|
},
|
|
1176
|
-
promotionLabel,
|
|
1179
|
+
promotionLabel ?? (0, import_i18n8.__)("PRO features", "elementor"),
|
|
1177
1180
|
/* @__PURE__ */ React14.createElement(
|
|
1178
1181
|
InteractionsPromotionChip,
|
|
1179
1182
|
{
|
|
@@ -1190,13 +1193,13 @@ function PromotionSelect({
|
|
|
1190
1193
|
|
|
1191
1194
|
// src/components/controls/easing.tsx
|
|
1192
1195
|
var EASING_OPTIONS = {
|
|
1193
|
-
easeIn: (0,
|
|
1194
|
-
easeInOut: (0,
|
|
1195
|
-
easeOut: (0,
|
|
1196
|
-
backIn: (0,
|
|
1197
|
-
backInOut: (0,
|
|
1198
|
-
backOut: (0,
|
|
1199
|
-
linear: (0,
|
|
1196
|
+
easeIn: (0, import_i18n9.__)("Ease In", "elementor"),
|
|
1197
|
+
easeInOut: (0, import_i18n9.__)("Ease In Out", "elementor"),
|
|
1198
|
+
easeOut: (0, import_i18n9.__)("Ease Out", "elementor"),
|
|
1199
|
+
backIn: (0, import_i18n9.__)("Back In", "elementor"),
|
|
1200
|
+
backInOut: (0, import_i18n9.__)("Back In Out", "elementor"),
|
|
1201
|
+
backOut: (0, import_i18n9.__)("Back Out", "elementor"),
|
|
1202
|
+
linear: (0, import_i18n9.__)("Linear", "elementor")
|
|
1200
1203
|
};
|
|
1201
1204
|
var BASE_EASINGS = ["easeIn"];
|
|
1202
1205
|
function Easing({}) {
|
|
@@ -1212,8 +1215,7 @@ function Easing({}) {
|
|
|
1212
1215
|
value: DEFAULT_VALUES.easing,
|
|
1213
1216
|
baseOptions,
|
|
1214
1217
|
disabledOptions,
|
|
1215
|
-
|
|
1216
|
-
promotionContent: (0, import_i18n8.__)("Upgrade to control the smoothness of the interaction.", "elementor"),
|
|
1218
|
+
promotionContent: (0, import_i18n9.__)("Upgrade to control the smoothness of the interaction.", "elementor"),
|
|
1217
1219
|
upgradeUrl: "https://go.elementor.com/go-pro-interactions-easing-modal/"
|
|
1218
1220
|
}
|
|
1219
1221
|
);
|
|
@@ -1221,48 +1223,54 @@ function Easing({}) {
|
|
|
1221
1223
|
|
|
1222
1224
|
// src/components/controls/effect.tsx
|
|
1223
1225
|
var React16 = __toESM(require("react"));
|
|
1224
|
-
var
|
|
1225
|
-
var
|
|
1226
|
-
|
|
1226
|
+
var import_i18n10 = require("@wordpress/i18n");
|
|
1227
|
+
var EFFECT_OPTIONS = {
|
|
1228
|
+
fade: (0, import_i18n10.__)("Fade", "elementor"),
|
|
1229
|
+
slide: (0, import_i18n10.__)("Slide", "elementor"),
|
|
1230
|
+
scale: (0, import_i18n10.__)("Scale", "elementor"),
|
|
1231
|
+
custom: (0, import_i18n10.__)("Custom", "elementor")
|
|
1232
|
+
};
|
|
1233
|
+
var BASE_EFFECTS = ["fade", "slide", "scale"];
|
|
1227
1234
|
function Effect({ value, onChange }) {
|
|
1228
|
-
const
|
|
1229
|
-
|
|
1230
|
-
|
|
1231
|
-
|
|
1232
|
-
|
|
1233
|
-
|
|
1235
|
+
const baseOptions = Object.fromEntries(
|
|
1236
|
+
Object.entries(EFFECT_OPTIONS).filter(([key]) => BASE_EFFECTS.includes(key))
|
|
1237
|
+
);
|
|
1238
|
+
const disabledOptions = Object.fromEntries(
|
|
1239
|
+
Object.entries(EFFECT_OPTIONS).filter(([key]) => !BASE_EFFECTS.includes(key))
|
|
1240
|
+
);
|
|
1234
1241
|
return /* @__PURE__ */ React16.createElement(
|
|
1235
|
-
|
|
1242
|
+
PromotionSelect,
|
|
1236
1243
|
{
|
|
1237
|
-
|
|
1238
|
-
|
|
1239
|
-
|
|
1240
|
-
|
|
1241
|
-
|
|
1242
|
-
|
|
1243
|
-
|
|
1244
|
-
|
|
1245
|
-
|
|
1246
|
-
|
|
1244
|
+
value: value in baseOptions ? value : DEFAULT_VALUES.effect,
|
|
1245
|
+
onChange,
|
|
1246
|
+
baseOptions,
|
|
1247
|
+
disabledOptions,
|
|
1248
|
+
promotionLabel: (0, import_i18n10.__)("PRO effects", "elementor"),
|
|
1249
|
+
promotionContent: (0, import_i18n10.__)(
|
|
1250
|
+
"Upgrade to further customize your animation with opacity, scale, move, rotate and more.",
|
|
1251
|
+
"elementor"
|
|
1252
|
+
),
|
|
1253
|
+
upgradeUrl: "https://go.elementor.com/go-pro-interactions-custom-effect-modal/"
|
|
1254
|
+
}
|
|
1247
1255
|
);
|
|
1248
1256
|
}
|
|
1249
1257
|
|
|
1250
1258
|
// src/components/controls/effect-type.tsx
|
|
1251
1259
|
var React17 = __toESM(require("react"));
|
|
1252
1260
|
var import_editor_controls7 = require("@elementor/editor-controls");
|
|
1253
|
-
var
|
|
1261
|
+
var import_i18n11 = require("@wordpress/i18n");
|
|
1254
1262
|
function EffectType({ value, onChange }) {
|
|
1255
1263
|
const options = [
|
|
1256
1264
|
{
|
|
1257
1265
|
value: "in",
|
|
1258
|
-
label: (0,
|
|
1259
|
-
renderContent: () => (0,
|
|
1266
|
+
label: (0, import_i18n11.__)("In", "elementor"),
|
|
1267
|
+
renderContent: () => (0, import_i18n11.__)("In", "elementor"),
|
|
1260
1268
|
showTooltip: true
|
|
1261
1269
|
},
|
|
1262
1270
|
{
|
|
1263
1271
|
value: "out",
|
|
1264
|
-
label: (0,
|
|
1265
|
-
renderContent: () => (0,
|
|
1272
|
+
label: (0, import_i18n11.__)("Out", "elementor"),
|
|
1273
|
+
renderContent: () => (0, import_i18n11.__)("Out", "elementor"),
|
|
1266
1274
|
showTooltip: true
|
|
1267
1275
|
}
|
|
1268
1276
|
];
|
|
@@ -1273,11 +1281,11 @@ function EffectType({ value, onChange }) {
|
|
|
1273
1281
|
var React18 = __toESM(require("react"));
|
|
1274
1282
|
var import_editor_controls8 = require("@elementor/editor-controls");
|
|
1275
1283
|
var import_icons4 = require("@elementor/icons");
|
|
1276
|
-
var
|
|
1277
|
-
var
|
|
1284
|
+
var import_ui10 = require("@elementor/ui");
|
|
1285
|
+
var import_i18n12 = require("@wordpress/i18n");
|
|
1278
1286
|
var REPLAY_OPTIONS = {
|
|
1279
|
-
no: (0,
|
|
1280
|
-
yes: (0,
|
|
1287
|
+
no: (0, import_i18n12.__)("No", "elementor"),
|
|
1288
|
+
yes: (0, import_i18n12.__)("Yes", "elementor")
|
|
1281
1289
|
};
|
|
1282
1290
|
var BASE_REPLAY = ["no"];
|
|
1283
1291
|
var OVERLAY_GRID = "1 / 1";
|
|
@@ -1299,10 +1307,10 @@ function Replay({ onChange, anchorRef }) {
|
|
|
1299
1307
|
showTooltip: true
|
|
1300
1308
|
}
|
|
1301
1309
|
];
|
|
1302
|
-
return /* @__PURE__ */ React18.createElement(
|
|
1310
|
+
return /* @__PURE__ */ React18.createElement(import_ui10.Box, { sx: { display: "grid", alignItems: "center" } }, /* @__PURE__ */ React18.createElement(import_ui10.Box, { sx: { gridArea: OVERLAY_GRID } }, /* @__PURE__ */ React18.createElement(import_editor_controls8.ToggleButtonGroupUi, { items: options, exclusive: true, onChange, value: false })), /* @__PURE__ */ React18.createElement(import_ui10.Box, { sx: { gridArea: OVERLAY_GRID, marginInlineEnd: CHIP_OFFSET, justifySelf: "end" } }, /* @__PURE__ */ React18.createElement(
|
|
1303
1311
|
InteractionsPromotionChip,
|
|
1304
1312
|
{
|
|
1305
|
-
content: (0,
|
|
1313
|
+
content: (0, import_i18n12.__)("Upgrade to run the animation every time its trigger occurs.", "elementor"),
|
|
1306
1314
|
upgradeUrl: "https://go.elementor.com/go-pro-interactions-replay-modal/",
|
|
1307
1315
|
anchorRef
|
|
1308
1316
|
}
|
|
@@ -1311,13 +1319,13 @@ function Replay({ onChange, anchorRef }) {
|
|
|
1311
1319
|
|
|
1312
1320
|
// src/components/controls/trigger.tsx
|
|
1313
1321
|
var React19 = __toESM(require("react"));
|
|
1314
|
-
var
|
|
1322
|
+
var import_i18n13 = require("@wordpress/i18n");
|
|
1315
1323
|
var TRIGGER_OPTIONS = {
|
|
1316
|
-
load: (0,
|
|
1317
|
-
scrollIn: (0,
|
|
1318
|
-
scrollOn: (0,
|
|
1319
|
-
hover: (0,
|
|
1320
|
-
click: (0,
|
|
1324
|
+
load: (0, import_i18n13.__)("Page load", "elementor"),
|
|
1325
|
+
scrollIn: (0, import_i18n13.__)("Scroll into view", "elementor"),
|
|
1326
|
+
scrollOn: (0, import_i18n13.__)("While scrolling", "elementor"),
|
|
1327
|
+
hover: (0, import_i18n13.__)("On hover", "elementor"),
|
|
1328
|
+
click: (0, import_i18n13.__)("On click", "elementor")
|
|
1321
1329
|
};
|
|
1322
1330
|
var BASE_TRIGGERS = ["load", "scrollIn"];
|
|
1323
1331
|
function Trigger({ value, onChange }) {
|
|
@@ -1334,8 +1342,8 @@ function Trigger({ value, onChange }) {
|
|
|
1334
1342
|
onChange,
|
|
1335
1343
|
baseOptions,
|
|
1336
1344
|
disabledOptions,
|
|
1337
|
-
promotionLabel: (0,
|
|
1338
|
-
promotionContent: (0,
|
|
1345
|
+
promotionLabel: (0, import_i18n13.__)("PRO triggers", "elementor"),
|
|
1346
|
+
promotionContent: (0, import_i18n13.__)("Upgrade to unlock more interactions triggers.", "elementor"),
|
|
1339
1347
|
upgradeUrl: "https://go.elementor.com/go-pro-interactions-triggers-modal/"
|
|
1340
1348
|
}
|
|
1341
1349
|
);
|
|
@@ -1421,9 +1429,11 @@ function init() {
|
|
|
1421
1429
|
// Annotate the CommonJS export names for ESM import in node:
|
|
1422
1430
|
0 && (module.exports = {
|
|
1423
1431
|
BASE_EASINGS,
|
|
1432
|
+
BASE_EFFECTS,
|
|
1424
1433
|
BASE_REPLAY,
|
|
1425
1434
|
BASE_TRIGGERS,
|
|
1426
1435
|
EASING_OPTIONS,
|
|
1436
|
+
EFFECT_OPTIONS,
|
|
1427
1437
|
ELEMENTS_INTERACTIONS_PROVIDER_KEY_PREFIX,
|
|
1428
1438
|
EmptyState,
|
|
1429
1439
|
InteractionsTab,
|