@elementor/editor-interactions 4.5.0-1180 → 4.5.0-1182
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 +12 -4
- package/dist/index.d.ts +12 -4
- package/dist/index.js +17 -2
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +23 -9
- package/dist/index.mjs.map +1 -1
- package/package.json +13 -12
- package/src/components/empty-state.tsx +13 -3
- package/src/components/interactions-header-location.tsx +12 -0
- package/src/components/interactions-list.tsx +2 -0
- package/src/components/interactions-tab.tsx +1 -0
- package/src/index.ts +1 -0
package/dist/index.d.mts
CHANGED
|
@@ -1,13 +1,16 @@
|
|
|
1
1
|
import * as React from 'react';
|
|
2
2
|
import { RefObject, ComponentType } from 'react';
|
|
3
3
|
import { Unit } from '@elementor/editor-controls';
|
|
4
|
-
import { ElementInteractions, InteractionItemPropValue, AnimationPresetPropValue, BooleanPropValue, ConfigPropValue, ExcludedBreakpointsPropValue, InteractionBreakpointsPropValue, NumberPropValue, StringPropValue, TimingConfigPropValue
|
|
4
|
+
import { ElementInteractions, InteractionItemPropValue, ElementID, AnimationPresetPropValue, BooleanPropValue, ConfigPropValue, ExcludedBreakpointsPropValue, InteractionBreakpointsPropValue, NumberPropValue, StringPropValue, TimingConfigPropValue } from '@elementor/editor-elements';
|
|
5
5
|
export { InteractionItemPropValue } from '@elementor/editor-elements';
|
|
6
|
+
import * as _elementor_locations from '@elementor/locations';
|
|
6
7
|
import { PropValue, SizePropValue } from '@elementor/editor-props';
|
|
7
8
|
|
|
8
|
-
|
|
9
|
+
type EmptyStateProps = {
|
|
10
|
+
elementId: string;
|
|
9
11
|
onCreateInteraction: () => void;
|
|
10
|
-
}
|
|
12
|
+
};
|
|
13
|
+
declare const EmptyState: ({ elementId, onCreateInteraction }: EmptyStateProps) => React.JSX.Element;
|
|
11
14
|
|
|
12
15
|
declare const InteractionsTab: ({ elementId }: {
|
|
13
16
|
elementId: string;
|
|
@@ -79,6 +82,11 @@ declare const ELEMENTS_INTERACTIONS_PROVIDER_KEY_PREFIX = "document-elements-int
|
|
|
79
82
|
|
|
80
83
|
declare function init(): void;
|
|
81
84
|
|
|
85
|
+
type InteractionsHeaderProps = {
|
|
86
|
+
elementId: ElementID;
|
|
87
|
+
};
|
|
88
|
+
declare const injectIntoInteractionsHeader: (args: _elementor_locations.InjectArgs<InteractionsHeaderProps>) => void;
|
|
89
|
+
|
|
82
90
|
type InteractionsControlType = 'trigger' | 'effect' | 'effectType' | 'direction' | 'duration' | 'delay' | 'replay' | 'repeat' | 'times' | 'easing' | 'relativeTo' | 'start' | 'end' | 'customEffects';
|
|
83
91
|
type InteractionsControlPropsMap = {
|
|
84
92
|
trigger: FieldProps;
|
|
@@ -279,4 +287,4 @@ declare function extractScrollOverlayParams(interaction: InteractionItemValue, d
|
|
|
279
287
|
};
|
|
280
288
|
declare function syncGridOverlay(trigger: string, start: SizeStringValue, end: SizeStringValue, relativeTo: string): void;
|
|
281
289
|
|
|
282
|
-
export { type ActiveScrollInteraction, BASE_EASINGS, BASE_EFFECTS, BASE_REPLAY, BASE_TRIGGERS, type CreateInteractionsProviderOptions, DEFAULT_VALUES, EASING_OPTIONS, EFFECT_OPTIONS, ELEMENTS_INTERACTIONS_PROVIDER_KEY_PREFIX, EmptyState, type FieldProps, InteractionsTab, REPEAT_OPTIONS, REPEAT_TOOLTIPS, REPLAY_OPTIONS, type ReplayFieldProps, SCROLL_INTERACTION_EVENT, TRIGGER_OPTIONS, buildDisplayLabel, createAnimationPreset, createBoolean, createConfig, createDefaultInteractionItem, createDefaultInteractions, createExcludedBreakpoints, createInteractionBreakpoints, createInteractionItem, createInteractionsProvider, createNumber, createString, createTimingConfig, dispatchScrollInteraction, extractBoolean, extractExcludedBreakpoints, extractScrollOverlayParams, extractSize, extractString, formatSizeValue, generateTempInteractionId, getInteractionsConfig, init, interactionsRepository, isTempId, parseSizeValue, registerInteractionsControl, resolveDirection, syncGridOverlay, useElementInteractions };
|
|
290
|
+
export { type ActiveScrollInteraction, BASE_EASINGS, BASE_EFFECTS, BASE_REPLAY, BASE_TRIGGERS, type CreateInteractionsProviderOptions, DEFAULT_VALUES, EASING_OPTIONS, EFFECT_OPTIONS, ELEMENTS_INTERACTIONS_PROVIDER_KEY_PREFIX, EmptyState, type FieldProps, type InteractionsHeaderProps, InteractionsTab, REPEAT_OPTIONS, REPEAT_TOOLTIPS, REPLAY_OPTIONS, type ReplayFieldProps, SCROLL_INTERACTION_EVENT, TRIGGER_OPTIONS, buildDisplayLabel, createAnimationPreset, createBoolean, createConfig, createDefaultInteractionItem, createDefaultInteractions, createExcludedBreakpoints, createInteractionBreakpoints, createInteractionItem, createInteractionsProvider, createNumber, createString, createTimingConfig, dispatchScrollInteraction, extractBoolean, extractExcludedBreakpoints, extractScrollOverlayParams, extractSize, extractString, formatSizeValue, generateTempInteractionId, getInteractionsConfig, init, injectIntoInteractionsHeader, interactionsRepository, isTempId, parseSizeValue, registerInteractionsControl, resolveDirection, syncGridOverlay, useElementInteractions };
|
package/dist/index.d.ts
CHANGED
|
@@ -1,13 +1,16 @@
|
|
|
1
1
|
import * as React from 'react';
|
|
2
2
|
import { RefObject, ComponentType } from 'react';
|
|
3
3
|
import { Unit } from '@elementor/editor-controls';
|
|
4
|
-
import { ElementInteractions, InteractionItemPropValue, AnimationPresetPropValue, BooleanPropValue, ConfigPropValue, ExcludedBreakpointsPropValue, InteractionBreakpointsPropValue, NumberPropValue, StringPropValue, TimingConfigPropValue
|
|
4
|
+
import { ElementInteractions, InteractionItemPropValue, ElementID, AnimationPresetPropValue, BooleanPropValue, ConfigPropValue, ExcludedBreakpointsPropValue, InteractionBreakpointsPropValue, NumberPropValue, StringPropValue, TimingConfigPropValue } from '@elementor/editor-elements';
|
|
5
5
|
export { InteractionItemPropValue } from '@elementor/editor-elements';
|
|
6
|
+
import * as _elementor_locations from '@elementor/locations';
|
|
6
7
|
import { PropValue, SizePropValue } from '@elementor/editor-props';
|
|
7
8
|
|
|
8
|
-
|
|
9
|
+
type EmptyStateProps = {
|
|
10
|
+
elementId: string;
|
|
9
11
|
onCreateInteraction: () => void;
|
|
10
|
-
}
|
|
12
|
+
};
|
|
13
|
+
declare const EmptyState: ({ elementId, onCreateInteraction }: EmptyStateProps) => React.JSX.Element;
|
|
11
14
|
|
|
12
15
|
declare const InteractionsTab: ({ elementId }: {
|
|
13
16
|
elementId: string;
|
|
@@ -79,6 +82,11 @@ declare const ELEMENTS_INTERACTIONS_PROVIDER_KEY_PREFIX = "document-elements-int
|
|
|
79
82
|
|
|
80
83
|
declare function init(): void;
|
|
81
84
|
|
|
85
|
+
type InteractionsHeaderProps = {
|
|
86
|
+
elementId: ElementID;
|
|
87
|
+
};
|
|
88
|
+
declare const injectIntoInteractionsHeader: (args: _elementor_locations.InjectArgs<InteractionsHeaderProps>) => void;
|
|
89
|
+
|
|
82
90
|
type InteractionsControlType = 'trigger' | 'effect' | 'effectType' | 'direction' | 'duration' | 'delay' | 'replay' | 'repeat' | 'times' | 'easing' | 'relativeTo' | 'start' | 'end' | 'customEffects';
|
|
83
91
|
type InteractionsControlPropsMap = {
|
|
84
92
|
trigger: FieldProps;
|
|
@@ -279,4 +287,4 @@ declare function extractScrollOverlayParams(interaction: InteractionItemValue, d
|
|
|
279
287
|
};
|
|
280
288
|
declare function syncGridOverlay(trigger: string, start: SizeStringValue, end: SizeStringValue, relativeTo: string): void;
|
|
281
289
|
|
|
282
|
-
export { type ActiveScrollInteraction, BASE_EASINGS, BASE_EFFECTS, BASE_REPLAY, BASE_TRIGGERS, type CreateInteractionsProviderOptions, DEFAULT_VALUES, EASING_OPTIONS, EFFECT_OPTIONS, ELEMENTS_INTERACTIONS_PROVIDER_KEY_PREFIX, EmptyState, type FieldProps, InteractionsTab, REPEAT_OPTIONS, REPEAT_TOOLTIPS, REPLAY_OPTIONS, type ReplayFieldProps, SCROLL_INTERACTION_EVENT, TRIGGER_OPTIONS, buildDisplayLabel, createAnimationPreset, createBoolean, createConfig, createDefaultInteractionItem, createDefaultInteractions, createExcludedBreakpoints, createInteractionBreakpoints, createInteractionItem, createInteractionsProvider, createNumber, createString, createTimingConfig, dispatchScrollInteraction, extractBoolean, extractExcludedBreakpoints, extractScrollOverlayParams, extractSize, extractString, formatSizeValue, generateTempInteractionId, getInteractionsConfig, init, interactionsRepository, isTempId, parseSizeValue, registerInteractionsControl, resolveDirection, syncGridOverlay, useElementInteractions };
|
|
290
|
+
export { type ActiveScrollInteraction, BASE_EASINGS, BASE_EFFECTS, BASE_REPLAY, BASE_TRIGGERS, type CreateInteractionsProviderOptions, DEFAULT_VALUES, EASING_OPTIONS, EFFECT_OPTIONS, ELEMENTS_INTERACTIONS_PROVIDER_KEY_PREFIX, EmptyState, type FieldProps, type InteractionsHeaderProps, InteractionsTab, REPEAT_OPTIONS, REPEAT_TOOLTIPS, REPLAY_OPTIONS, type ReplayFieldProps, SCROLL_INTERACTION_EVENT, TRIGGER_OPTIONS, buildDisplayLabel, createAnimationPreset, createBoolean, createConfig, createDefaultInteractionItem, createDefaultInteractions, createExcludedBreakpoints, createInteractionBreakpoints, createInteractionItem, createInteractionsProvider, createNumber, createString, createTimingConfig, dispatchScrollInteraction, extractBoolean, extractExcludedBreakpoints, extractScrollOverlayParams, extractSize, extractString, formatSizeValue, generateTempInteractionId, getInteractionsConfig, init, injectIntoInteractionsHeader, interactionsRepository, isTempId, parseSizeValue, registerInteractionsControl, resolveDirection, syncGridOverlay, useElementInteractions };
|
package/dist/index.js
CHANGED
|
@@ -68,6 +68,7 @@ __export(index_exports, {
|
|
|
68
68
|
generateTempInteractionId: () => generateTempInteractionId,
|
|
69
69
|
getInteractionsConfig: () => getInteractionsConfig,
|
|
70
70
|
init: () => init,
|
|
71
|
+
injectIntoInteractionsHeader: () => injectIntoInteractionsHeader,
|
|
71
72
|
interactionsRepository: () => interactionsRepository,
|
|
72
73
|
isTempId: () => isTempId,
|
|
73
74
|
parseSizeValue: () => parseSizeValue,
|
|
@@ -83,7 +84,17 @@ var React = __toESM(require("react"));
|
|
|
83
84
|
var import_icons = require("@elementor/icons");
|
|
84
85
|
var import_ui = require("@elementor/ui");
|
|
85
86
|
var import_i18n = require("@wordpress/i18n");
|
|
86
|
-
|
|
87
|
+
|
|
88
|
+
// src/components/interactions-header-location.tsx
|
|
89
|
+
var import_locations = require("@elementor/locations");
|
|
90
|
+
var {
|
|
91
|
+
Slot: InteractionsHeaderSlot,
|
|
92
|
+
inject: injectIntoInteractionsHeader,
|
|
93
|
+
useInjections: useInteractionsHeaderInjections
|
|
94
|
+
} = (0, import_locations.createLocation)();
|
|
95
|
+
|
|
96
|
+
// src/components/empty-state.tsx
|
|
97
|
+
var EmptyState = ({ elementId, onCreateInteraction }) => {
|
|
87
98
|
return /* @__PURE__ */ React.createElement(
|
|
88
99
|
import_ui.Stack,
|
|
89
100
|
{
|
|
@@ -91,9 +102,10 @@ var EmptyState = ({ onCreateInteraction }) => {
|
|
|
91
102
|
justifyContent: "center",
|
|
92
103
|
height: "100%",
|
|
93
104
|
color: "text.secondary",
|
|
94
|
-
sx: { p: 2.5, pt: 8, pb: 5.5 },
|
|
105
|
+
sx: { position: "relative", p: 2.5, pt: 8, pb: 5.5 },
|
|
95
106
|
gap: 1.5
|
|
96
107
|
},
|
|
108
|
+
/* @__PURE__ */ React.createElement(import_ui.Box, { sx: { position: "absolute", top: 8, insetInlineEnd: 8 } }, /* @__PURE__ */ React.createElement(InteractionsHeaderSlot, { elementId })),
|
|
97
109
|
/* @__PURE__ */ React.createElement(import_icons.SwipeIcon, { fontSize: "large" }),
|
|
98
110
|
/* @__PURE__ */ React.createElement(import_ui.Typography, { align: "center", variant: "subtitle2" }, (0, import_i18n.__)("Animate elements with Interactions", "elementor")),
|
|
99
111
|
/* @__PURE__ */ React.createElement(import_ui.Typography, { align: "center", variant: "caption", maxWidth: "170px" }, (0, import_i18n.__)(
|
|
@@ -1189,6 +1201,7 @@ function InteractionsList(props) {
|
|
|
1189
1201
|
openOnAdd: true,
|
|
1190
1202
|
openItem: triggerCreateOnShowEmpty ? 0 : void 0,
|
|
1191
1203
|
label: (0, import_i18n6.__)("Interactions", "elementor"),
|
|
1204
|
+
headerActions: /* @__PURE__ */ React10.createElement(InteractionsHeaderSlot, { elementId }),
|
|
1192
1205
|
values: interactions.items,
|
|
1193
1206
|
setValues: handleRepeaterChange,
|
|
1194
1207
|
showDuplicate: false,
|
|
@@ -1241,6 +1254,7 @@ function InteractionsTabContent({ elementId }) {
|
|
|
1241
1254
|
return /* @__PURE__ */ React11.createElement(import_session.SessionStorageProvider, { prefix: elementId }, hasInteractions ? /* @__PURE__ */ React11.createElement(InteractionsProvider, { elementId }, /* @__PURE__ */ React11.createElement(InteractionsContent, { firstInteractionState })) : /* @__PURE__ */ React11.createElement(
|
|
1242
1255
|
EmptyState,
|
|
1243
1256
|
{
|
|
1257
|
+
elementId,
|
|
1244
1258
|
onCreateInteraction: () => {
|
|
1245
1259
|
firstInteractionState[1](true);
|
|
1246
1260
|
}
|
|
@@ -2365,6 +2379,7 @@ function init() {
|
|
|
2365
2379
|
generateTempInteractionId,
|
|
2366
2380
|
getInteractionsConfig,
|
|
2367
2381
|
init,
|
|
2382
|
+
injectIntoInteractionsHeader,
|
|
2368
2383
|
interactionsRepository,
|
|
2369
2384
|
isTempId,
|
|
2370
2385
|
parseSizeValue,
|