@elementor/editor-interactions 4.4.1 → 4.4.2

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