@elementor/editor-interactions 3.35.0-471 → 3.35.0-473

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.mjs CHANGED
@@ -206,8 +206,8 @@ var buildDisplayLabel = (item) => {
206
206
  // src/components/interaction-details.tsx
207
207
  import * as React8 from "react";
208
208
  import { useMemo as useMemo2 } from "react";
209
- import { ControlFormLabel as ControlFormLabel5, PopoverContent, PopoverGridContainer as PopoverGridContainer5 } from "@elementor/editor-controls";
210
- import { Divider, Grid as Grid5 } from "@elementor/ui";
209
+ import { ControlFormLabel, PopoverContent, PopoverGridContainer } from "@elementor/editor-controls";
210
+ import { Divider, Grid } from "@elementor/ui";
211
211
  import { __ as __6 } from "@wordpress/i18n";
212
212
 
213
213
  // src/interactions-controls-registry.ts
@@ -226,13 +226,8 @@ function getInteractionsControl(type) {
226
226
  // src/components/controls/direction.tsx
227
227
  import * as React4 from "react";
228
228
  import { useMemo } from "react";
229
- import {
230
- ControlFormLabel,
231
- PopoverGridContainer,
232
- ToggleButtonGroupUi
233
- } from "@elementor/editor-controls";
229
+ import { ToggleButtonGroupUi } from "@elementor/editor-controls";
234
230
  import { ArrowDownSmallIcon, ArrowLeftIcon, ArrowRightIcon, ArrowUpSmallIcon } from "@elementor/icons";
235
- import { Grid } from "@elementor/ui";
236
231
  import { __ as __2 } from "@wordpress/i18n";
237
232
  function Direction({ value, onChange, interactionType }) {
238
233
  const options = useMemo(() => {
@@ -264,14 +259,13 @@ function Direction({ value, onChange, interactionType }) {
264
259
  }
265
260
  ];
266
261
  }, [interactionType]);
267
- return /* @__PURE__ */ React4.createElement(Grid, { item: true, xs: 12 }, /* @__PURE__ */ React4.createElement(PopoverGridContainer, null, /* @__PURE__ */ React4.createElement(Grid, { item: true, xs: 6 }, /* @__PURE__ */ React4.createElement(ControlFormLabel, null, " ", __2("Direction", "elementor"))), /* @__PURE__ */ React4.createElement(Grid, { item: true, xs: 6 }, /* @__PURE__ */ React4.createElement(ToggleButtonGroupUi, { items: options, exclusive: true, onChange, value }))));
262
+ return /* @__PURE__ */ React4.createElement(ToggleButtonGroupUi, { items: options, exclusive: true, onChange, value });
268
263
  }
269
264
 
270
265
  // src/components/controls/effect.tsx
271
266
  import * as React5 from "react";
272
- import { ControlFormLabel as ControlFormLabel2, PopoverGridContainer as PopoverGridContainer2 } from "@elementor/editor-controls";
273
267
  import { MenuListItem } from "@elementor/editor-ui";
274
- import { Grid as Grid2, Select } from "@elementor/ui";
268
+ import { Select } from "@elementor/ui";
275
269
  import { __ as __3 } from "@wordpress/i18n";
276
270
  function Effect({ value, onChange }) {
277
271
  const availableEffects = [
@@ -279,7 +273,7 @@ function Effect({ value, onChange }) {
279
273
  { key: "slide", label: __3("Slide", "elementor") },
280
274
  { key: "scale", label: __3("Scale", "elementor") }
281
275
  ];
282
- return /* @__PURE__ */ React5.createElement(Grid2, { item: true, xs: 12 }, /* @__PURE__ */ React5.createElement(PopoverGridContainer2, null, /* @__PURE__ */ React5.createElement(Grid2, { item: true, xs: 6 }, /* @__PURE__ */ React5.createElement(ControlFormLabel2, null, __3("Effect", "elementor"))), /* @__PURE__ */ React5.createElement(Grid2, { item: true, xs: 6 }, /* @__PURE__ */ React5.createElement(
276
+ return /* @__PURE__ */ React5.createElement(
283
277
  Select,
284
278
  {
285
279
  fullWidth: true,
@@ -291,17 +285,12 @@ function Effect({ value, onChange }) {
291
285
  availableEffects.map((effect) => {
292
286
  return /* @__PURE__ */ React5.createElement(MenuListItem, { key: effect.key, value: effect.key }, effect.label);
293
287
  })
294
- ))));
288
+ );
295
289
  }
296
290
 
297
291
  // src/components/controls/effect-type.tsx
298
292
  import * as React6 from "react";
299
- import {
300
- ControlFormLabel as ControlFormLabel3,
301
- PopoverGridContainer as PopoverGridContainer3,
302
- ToggleButtonGroupUi as ToggleButtonGroupUi2
303
- } from "@elementor/editor-controls";
304
- import { Grid as Grid3 } from "@elementor/ui";
293
+ import { ToggleButtonGroupUi as ToggleButtonGroupUi2 } from "@elementor/editor-controls";
305
294
  import { __ as __4 } from "@wordpress/i18n";
306
295
  function EffectType({ value, onChange }) {
307
296
  const options = [
@@ -318,16 +307,15 @@ function EffectType({ value, onChange }) {
318
307
  showTooltip: true
319
308
  }
320
309
  ];
321
- return /* @__PURE__ */ React6.createElement(React6.Fragment, null, /* @__PURE__ */ React6.createElement(Grid3, { item: true, xs: 12 }, /* @__PURE__ */ React6.createElement(PopoverGridContainer3, null, /* @__PURE__ */ React6.createElement(Grid3, { item: true, xs: 6 }, /* @__PURE__ */ React6.createElement(ControlFormLabel3, null, __4("Type", "elementor"))), /* @__PURE__ */ React6.createElement(Grid3, { item: true, xs: 6 }, /* @__PURE__ */ React6.createElement(ToggleButtonGroupUi2, { items: options, exclusive: true, onChange, value })))));
310
+ return /* @__PURE__ */ React6.createElement(ToggleButtonGroupUi2, { items: options, exclusive: true, onChange, value });
322
311
  }
323
312
 
324
313
  // src/components/controls/time-frame-indicator.tsx
325
314
  import * as React7 from "react";
326
- import { ControlFormLabel as ControlFormLabel4, PopoverGridContainer as PopoverGridContainer4 } from "@elementor/editor-controls";
327
315
  import { MenuListItem as MenuListItem2 } from "@elementor/editor-ui";
328
- import { Grid as Grid4, Select as Select2 } from "@elementor/ui";
316
+ import { Select as Select2 } from "@elementor/ui";
329
317
  import { __ as __5 } from "@wordpress/i18n";
330
- function TimeFrameIndicator({ value, onChange, label }) {
318
+ function TimeFrameIndicator({ value, onChange }) {
331
319
  const availableTimeFrames = ["0", "100", "200", "300", "400", "500", "750", "1000", "1250", "1500"].map(
332
320
  (key) => ({
333
321
  key,
@@ -335,7 +323,7 @@ function TimeFrameIndicator({ value, onChange, label }) {
335
323
  label: __5("%s MS", "elementor").replace("%s", key)
336
324
  })
337
325
  );
338
- return /* @__PURE__ */ React7.createElement(Grid4, { item: true, xs: 12 }, /* @__PURE__ */ React7.createElement(PopoverGridContainer4, null, /* @__PURE__ */ React7.createElement(Grid4, { item: true, xs: 6 }, /* @__PURE__ */ React7.createElement(ControlFormLabel4, null, label)), /* @__PURE__ */ React7.createElement(Grid4, { item: true, xs: 6 }, /* @__PURE__ */ React7.createElement(
326
+ return /* @__PURE__ */ React7.createElement(
339
327
  Select2,
340
328
  {
341
329
  fullWidth: true,
@@ -347,7 +335,7 @@ function TimeFrameIndicator({ value, onChange, label }) {
347
335
  availableTimeFrames.map((timeFrame) => {
348
336
  return /* @__PURE__ */ React7.createElement(MenuListItem2, { key: timeFrame.key, value: timeFrame.key }, timeFrame.label);
349
337
  })
350
- ))));
338
+ );
351
339
  }
352
340
 
353
341
  // src/components/interaction-details.tsx
@@ -410,36 +398,37 @@ var InteractionDetails = ({ interaction, onChange, onPlayInteraction }) => {
410
398
  onPlayInteraction(interactionId);
411
399
  }, 0);
412
400
  };
413
- return /* @__PURE__ */ React8.createElement(PopoverContent, { p: 1.5 }, /* @__PURE__ */ React8.createElement(Grid5, { container: true, spacing: 1.5 }, TriggerControl && /* @__PURE__ */ React8.createElement(TriggerControl, { value: trigger, onChange: (v) => updateInteraction({ trigger: v }) }), ReplayControl && /* @__PURE__ */ React8.createElement(React8.Fragment, null, /* @__PURE__ */ React8.createElement(Grid5, { item: true, xs: 12 }, /* @__PURE__ */ React8.createElement(PopoverGridContainer5, null, /* @__PURE__ */ React8.createElement(Grid5, { item: true, xs: 6 }, /* @__PURE__ */ React8.createElement(ControlFormLabel5, null, __6("Replay", "elementor"))), /* @__PURE__ */ React8.createElement(Grid5, { item: true, xs: 6 }, /* @__PURE__ */ React8.createElement(
401
+ return /* @__PURE__ */ React8.createElement(PopoverContent, { p: 1.5 }, /* @__PURE__ */ React8.createElement(Grid, { container: true, spacing: 1.5 }, TriggerControl && /* @__PURE__ */ React8.createElement(Field, { label: __6("Trigger", "elementor") }, /* @__PURE__ */ React8.createElement(TriggerControl, { value: trigger, onChange: (v) => updateInteraction({ trigger: v }) })), ReplayControl && /* @__PURE__ */ React8.createElement(Field, { label: __6("Replay", "elementor") }, /* @__PURE__ */ React8.createElement(
414
402
  ReplayControl,
415
403
  {
416
404
  value: replay,
417
405
  onChange: (v) => updateInteraction({ replay: v }),
418
406
  disabled: true
419
407
  }
420
- )))))), /* @__PURE__ */ React8.createElement(Divider, null), /* @__PURE__ */ React8.createElement(Grid5, { container: true, spacing: 1.5 }, /* @__PURE__ */ React8.createElement(Effect, { value: effect, onChange: (v) => updateInteraction({ effect: v }) }), /* @__PURE__ */ React8.createElement(EffectType, { value: type, onChange: (v) => updateInteraction({ type: v }) }), /* @__PURE__ */ React8.createElement(
408
+ ))), /* @__PURE__ */ React8.createElement(Divider, null), /* @__PURE__ */ React8.createElement(Grid, { container: true, spacing: 1.5 }, /* @__PURE__ */ React8.createElement(Field, { label: __6("Effect", "elementor") }, /* @__PURE__ */ React8.createElement(Effect, { value: effect, onChange: (v) => updateInteraction({ effect: v }) })), /* @__PURE__ */ React8.createElement(Field, { label: __6("Type", "elementor") }, /* @__PURE__ */ React8.createElement(EffectType, { value: type, onChange: (v) => updateInteraction({ type: v }) })), /* @__PURE__ */ React8.createElement(Field, { label: __6("Direction", "elementor") }, /* @__PURE__ */ React8.createElement(
421
409
  Direction,
422
410
  {
423
411
  value: direction,
424
412
  onChange: (v) => updateInteraction({ direction: v }),
425
413
  interactionType: type
426
414
  }
427
- ), /* @__PURE__ */ React8.createElement(
415
+ )), /* @__PURE__ */ React8.createElement(Field, { label: __6("Duration", "elementor") }, /* @__PURE__ */ React8.createElement(
428
416
  TimeFrameIndicator,
429
417
  {
430
418
  value: String(duration),
431
- onChange: (v) => updateInteraction({ duration: parseInt(v, 10) }),
432
- label: __6("Duration", "elementor")
419
+ onChange: (v) => updateInteraction({ duration: parseInt(v, 10) })
433
420
  }
434
- ), /* @__PURE__ */ React8.createElement(
421
+ )), /* @__PURE__ */ React8.createElement(Field, { label: __6("Delay", "elementor") }, /* @__PURE__ */ React8.createElement(
435
422
  TimeFrameIndicator,
436
423
  {
437
424
  value: String(delay),
438
- onChange: (v) => updateInteraction({ delay: parseInt(v, 10) }),
439
- label: __6("Delay", "elementor")
425
+ onChange: (v) => updateInteraction({ delay: parseInt(v, 10) })
440
426
  }
441
- )));
427
+ ))));
442
428
  };
429
+ function Field({ label, children }) {
430
+ return /* @__PURE__ */ React8.createElement(Grid, { item: true, xs: 12 }, /* @__PURE__ */ React8.createElement(PopoverGridContainer, null, /* @__PURE__ */ React8.createElement(Grid, { item: true, xs: 6 }, /* @__PURE__ */ React8.createElement(ControlFormLabel, null, label)), /* @__PURE__ */ React8.createElement(Grid, { item: true, xs: 6 }, children)));
431
+ }
443
432
 
444
433
  // src/components/interactions-list.tsx
445
434
  var MAX_NUMBER_OF_INTERACTIONS = 5;
@@ -693,9 +682,8 @@ var documentElementsInteractionsProvider = createInteractionsProvider({
693
682
 
694
683
  // src/components/controls/trigger.tsx
695
684
  import * as React11 from "react";
696
- import { ControlFormLabel as ControlFormLabel6, PopoverGridContainer as PopoverGridContainer6 } from "@elementor/editor-controls";
697
685
  import { MenuListItem as MenuListItem3 } from "@elementor/editor-ui";
698
- import { Grid as Grid6, Select as Select3 } from "@elementor/ui";
686
+ import { Select as Select3 } from "@elementor/ui";
699
687
  import { __ as __8 } from "@wordpress/i18n";
700
688
  function Trigger({ value, onChange }) {
701
689
  const availableTriggers = Object.entries({
@@ -705,7 +693,7 @@ function Trigger({ value, onChange }) {
705
693
  key,
706
694
  label
707
695
  }));
708
- return /* @__PURE__ */ React11.createElement(Grid6, { item: true, xs: 12 }, /* @__PURE__ */ React11.createElement(PopoverGridContainer6, null, /* @__PURE__ */ React11.createElement(Grid6, { item: true, xs: 6 }, /* @__PURE__ */ React11.createElement(ControlFormLabel6, null, __8("Trigger", "elementor"))), /* @__PURE__ */ React11.createElement(Grid6, { item: true, xs: 6 }, /* @__PURE__ */ React11.createElement(
696
+ return /* @__PURE__ */ React11.createElement(
709
697
  Select3,
710
698
  {
711
699
  fullWidth: true,
@@ -717,7 +705,7 @@ function Trigger({ value, onChange }) {
717
705
  availableTriggers.map((trigger) => {
718
706
  return /* @__PURE__ */ React11.createElement(MenuListItem3, { key: trigger.key, value: trigger.key }, trigger.label);
719
707
  })
720
- ))));
708
+ );
721
709
  }
722
710
 
723
711
  // src/hooks/on-duplicate.ts
@@ -1 +1 @@
1
- {"version":3,"sources":["../src/components/empty-state.tsx","../src/components/interactions-tab.tsx","../src/contexts/interactions-context.tsx","../src/contexts/popup-state-context.tsx","../src/components/interactions-list.tsx","../src/utils/temp-id-utils.ts","../src/utils/prop-value-utils.ts","../src/components/interaction-details.tsx","../src/interactions-controls-registry.ts","../src/components/controls/direction.tsx","../src/components/controls/effect.tsx","../src/components/controls/effect-type.tsx","../src/components/controls/time-frame-indicator.tsx","../src/utils/get-interactions-config.ts","../src/utils/create-interactions-repository.ts","../src/interactions-repository.ts","../src/utils/create-interactions-provider.ts","../src/providers/document-elements-interactions-provider.ts","../src/components/controls/trigger.tsx","../src/hooks/on-duplicate.ts","../src/init.ts"],"sourcesContent":["import * as React from 'react';\nimport { SwipeIcon } from '@elementor/icons';\nimport { Button, Stack, Typography } from '@elementor/ui';\nimport { __ } from '@wordpress/i18n';\n\nexport const EmptyState = ( { onCreateInteraction }: { onCreateInteraction: () => void } ) => {\n\treturn (\n\t\t<Stack\n\t\t\talignItems=\"center\"\n\t\t\tjustifyContent=\"center\"\n\t\t\theight=\"100%\"\n\t\t\tcolor=\"text.secondary\"\n\t\t\tsx={ { p: 2.5, pt: 8, pb: 5.5 } }\n\t\t\tgap={ 1.5 }\n\t\t>\n\t\t\t<SwipeIcon fontSize=\"large\" />\n\n\t\t\t<Typography align=\"center\" variant=\"subtitle2\">\n\t\t\t\t{ __( 'Animate elements with Interactions', 'elementor' ) }\n\t\t\t</Typography>\n\n\t\t\t<Typography align=\"center\" variant=\"caption\" maxWidth=\"170px\">\n\t\t\t\t{ __(\n\t\t\t\t\t'Add entrance animations and effects triggered by user interactions such as page load or scroll.',\n\t\t\t\t\t'elementor'\n\t\t\t\t) }\n\t\t\t</Typography>\n\n\t\t\t<Button variant=\"outlined\" color=\"secondary\" size=\"small\" sx={ { mt: 1 } } onClick={ onCreateInteraction }>\n\t\t\t\t{ __( 'Create an interaction', 'elementor' ) }\n\t\t\t</Button>\n\t\t</Stack>\n\t);\n};\n","import * as React from 'react';\nimport { useCallback, useState } from 'react';\nimport { useElementInteractions } from '@elementor/editor-elements';\nimport { SessionStorageProvider } from '@elementor/session';\nimport { Stack } from '@elementor/ui';\n\nimport { InteractionsProvider, useInteractionsContext } from '../contexts/interactions-context';\nimport { PopupStateProvider } from '../contexts/popup-state-context';\nimport type { ElementInteractions } from '../types';\nimport { EmptyState } from './empty-state';\nimport { InteractionsList } from './interactions-list';\n\nexport const InteractionsTab = ( { elementId }: { elementId: string } ) => {\n\treturn (\n\t\t<PopupStateProvider>\n\t\t\t<InteractionsTabContent elementId={ elementId } />\n\t\t</PopupStateProvider>\n\t);\n};\n\nfunction InteractionsTabContent( { elementId }: { elementId: string } ) {\n\tconst existingInteractions = useElementInteractions( elementId ) as unknown as ElementInteractions | undefined;\n\tconst firstInteractionState = useState< boolean >( false );\n\tconst hasInteractions = existingInteractions?.items?.length || firstInteractionState[ 0 ];\n\n\treturn (\n\t\t<SessionStorageProvider prefix={ elementId }>\n\t\t\t{ hasInteractions ? (\n\t\t\t\t<InteractionsProvider elementId={ elementId }>\n\t\t\t\t\t<InteractionsContent firstInteractionState={ firstInteractionState } />\n\t\t\t\t</InteractionsProvider>\n\t\t\t) : (\n\t\t\t\t<EmptyState\n\t\t\t\t\tonCreateInteraction={ () => {\n\t\t\t\t\t\tfirstInteractionState[ 1 ]( true );\n\t\t\t\t\t} }\n\t\t\t\t/>\n\t\t\t) }\n\t\t</SessionStorageProvider>\n\t);\n}\n\nfunction InteractionsContent( {\n\tfirstInteractionState,\n}: {\n\tfirstInteractionState: [ boolean, ( value: boolean ) => void ];\n} ) {\n\tconst { interactions, setInteractions, playInteractions } = useInteractionsContext();\n\n\tconst applyInteraction = useCallback(\n\t\t( newInteractions: ElementInteractions ) => {\n\t\t\tfirstInteractionState[ 1 ]( false );\n\t\t\tif ( ! newInteractions ) {\n\t\t\t\tsetInteractions( undefined );\n\t\t\t\treturn;\n\t\t\t}\n\n\t\t\tsetInteractions( newInteractions );\n\t\t},\n\t\t[ setInteractions, firstInteractionState ]\n\t);\n\n\treturn (\n\t\t<Stack sx={ { m: 1, p: 1.5 } } gap={ 2 }>\n\t\t\t<InteractionsList\n\t\t\t\ttriggerCreateOnShowEmpty={ firstInteractionState[ 0 ] }\n\t\t\t\tinteractions={ interactions }\n\t\t\t\tonSelectInteractions={ applyInteraction }\n\t\t\t\tonPlayInteraction={ playInteractions }\n\t\t\t/>\n\t\t</Stack>\n\t);\n}\n","import * as React from 'react';\nimport { createContext, type ReactNode, useContext, useEffect } from 'react';\nimport {\n\ttype ElementInteractions,\n\tplayElementInteractions,\n\tupdateElementInteractions,\n\tuseElementInteractions,\n} from '@elementor/editor-elements';\n\ntype InteractionsContextValue = {\n\tinteractions: ElementInteractions;\n\tsetInteractions: ( value: ElementInteractions | undefined ) => void;\n\tplayInteractions: ( interactionId: string ) => void;\n};\n\nconst InteractionsContext = createContext< InteractionsContextValue | null >( null );\n\nconst DEFAULT_INTERACTIONS: ElementInteractions = {\n\tversion: 1,\n\titems: [],\n};\n\nexport const InteractionsProvider = ( { children, elementId }: { children: ReactNode; elementId: string } ) => {\n\tconst rawInteractions = useElementInteractions( elementId );\n\n\tuseEffect( () => {\n\t\twindow.dispatchEvent( new CustomEvent( 'elementor/element/update_interactions' ) );\n\t}, [] );\n\n\tconst interactions: ElementInteractions =\n\t\t( rawInteractions as unknown as ElementInteractions ) ?? DEFAULT_INTERACTIONS;\n\n\tconst setInteractions = ( value: ElementInteractions | undefined ) => {\n\t\tconst normalizedValue = value && value.items?.length === 0 ? undefined : value;\n\n\t\tupdateElementInteractions( {\n\t\t\telementId,\n\t\t\tinteractions: normalizedValue,\n\t\t} );\n\t};\n\n\tconst playInteractions = ( interactionId: string ) => {\n\t\tplayElementInteractions( elementId, interactionId );\n\t};\n\n\tconst contextValue: InteractionsContextValue = {\n\t\tinteractions,\n\t\tsetInteractions,\n\t\tplayInteractions,\n\t};\n\n\treturn <InteractionsContext.Provider value={ contextValue }>{ children }</InteractionsContext.Provider>;\n};\n\nexport const useInteractionsContext = () => {\n\tconst context = useContext( InteractionsContext );\n\tif ( ! context ) {\n\t\tthrow new Error( 'useInteractionsContext must be used within InteractionsProvider' );\n\t}\n\treturn context;\n};\n","import * as React from 'react';\nimport { createContext, useCallback, useContext, useState } from 'react';\n\ntype PopupStateContextType = {\n\topenByDefault: boolean;\n\ttriggerDefaultOpen: () => void;\n\tresetDefaultOpen: () => void;\n};\n\nconst PopupStateContext = createContext< PopupStateContextType | undefined >( undefined );\n\nexport const PopupStateProvider = ( { children }: { children: React.ReactNode } ) => {\n\tconst [ openByDefault, setOpenByDefault ] = useState( false );\n\n\tconst triggerDefaultOpen = useCallback( () => {\n\t\tsetOpenByDefault( true );\n\t}, [] );\n\n\tconst resetDefaultOpen = useCallback( () => {\n\t\tsetOpenByDefault( false );\n\t}, [] );\n\n\treturn (\n\t\t<PopupStateContext.Provider value={ { openByDefault, triggerDefaultOpen, resetDefaultOpen } }>\n\t\t\t{ children }\n\t\t</PopupStateContext.Provider>\n\t);\n};\n\nexport const usePopupStateContext = () => {\n\tconst context = useContext( PopupStateContext );\n\tif ( ! context ) {\n\t\tthrow new Error( 'usePopupStateContext must be used within PopupStateProvider' );\n\t}\n\treturn context;\n};\n","import * as React from 'react';\nimport { useCallback, useEffect, useMemo, useRef } from 'react';\nimport { Repeater } from '@elementor/editor-controls';\nimport { InfoCircleFilledIcon, PlayerPlayIcon } from '@elementor/icons';\nimport { Alert, AlertTitle, Box, IconButton, Tooltip } from '@elementor/ui';\nimport { __ } from '@wordpress/i18n';\n\nimport type { ElementInteractions, InteractionItemPropValue, InteractionItemValue } from '../types';\nimport { buildDisplayLabel, createDefaultInteractionItem, extractString } from '../utils/prop-value-utils';\nimport { InteractionDetails } from './interaction-details';\nexport const MAX_NUMBER_OF_INTERACTIONS = 5;\n\nexport type InteractionListProps = {\n\tonSelectInteractions: ( interactions: ElementInteractions ) => void;\n\tinteractions: ElementInteractions;\n\tonPlayInteraction: ( interactionId: string ) => void;\n\ttriggerCreateOnShowEmpty?: boolean;\n};\n\nexport function InteractionsList( props: InteractionListProps ) {\n\tconst { interactions, onSelectInteractions, onPlayInteraction, triggerCreateOnShowEmpty } = props;\n\n\tconst hasInitializedRef = useRef( false );\n\n\tconst handleUpdateInteractions = useCallback(\n\t\t( newInteractions: ElementInteractions ) => {\n\t\t\tonSelectInteractions( newInteractions );\n\t\t},\n\t\t[ onSelectInteractions ]\n\t);\n\n\tuseEffect( () => {\n\t\tif (\n\t\t\ttriggerCreateOnShowEmpty &&\n\t\t\t! hasInitializedRef.current &&\n\t\t\t( ! interactions.items || interactions.items?.length === 0 )\n\t\t) {\n\t\t\thasInitializedRef.current = true;\n\t\t\tconst newState: ElementInteractions = {\n\t\t\t\tversion: 1,\n\t\t\t\titems: [ createDefaultInteractionItem() ],\n\t\t\t};\n\t\t\thandleUpdateInteractions( newState );\n\t\t}\n\t}, [ triggerCreateOnShowEmpty, interactions.items, handleUpdateInteractions ] );\n\n\tconst isMaxNumberOfInteractionsReached = useMemo( () => {\n\t\treturn interactions.items?.length >= MAX_NUMBER_OF_INTERACTIONS;\n\t}, [ interactions.items?.length ] );\n\n\tconst infotipContent = isMaxNumberOfInteractionsReached ? (\n\t\t<Alert color=\"secondary\" icon={ <InfoCircleFilledIcon /> } size=\"small\">\n\t\t\t<AlertTitle>{ __( 'Interactions', 'elementor' ) }</AlertTitle>\n\t\t\t<Box component=\"span\">\n\t\t\t\t{ __(\n\t\t\t\t\t\"You've reached the limit of 5 interactions for this element. Please remove an interaction before creating a new one.\",\n\t\t\t\t\t'elementor'\n\t\t\t\t) }\n\t\t\t</Box>\n\t\t</Alert>\n\t) : undefined;\n\n\tconst handleRepeaterChange = useCallback(\n\t\t( newItems: ElementInteractions[ 'items' ] ) => {\n\t\t\thandleUpdateInteractions( {\n\t\t\t\t...interactions,\n\t\t\t\titems: newItems,\n\t\t\t} );\n\t\t},\n\t\t[ interactions, handleUpdateInteractions ]\n\t);\n\n\tconst handleInteractionChange = useCallback(\n\t\t( index: number, newInteractionValue: InteractionItemValue ) => {\n\t\t\tconst newItems = structuredClone( interactions.items );\n\t\t\tnewItems[ index ] = {\n\t\t\t\t$$type: 'interaction-item',\n\t\t\t\tvalue: newInteractionValue,\n\t\t\t};\n\t\t\thandleUpdateInteractions( {\n\t\t\t\t...interactions,\n\t\t\t\titems: newItems,\n\t\t\t} );\n\t\t},\n\t\t[ interactions, handleUpdateInteractions ]\n\t);\n\n\treturn (\n\t\t<Repeater\n\t\t\topenOnAdd\n\t\t\topenItem={ triggerCreateOnShowEmpty ? 0 : undefined }\n\t\t\tlabel={ __( 'Interactions', 'elementor' ) }\n\t\t\tvalues={ interactions.items }\n\t\t\tsetValues={ handleRepeaterChange }\n\t\t\tshowDuplicate={ false }\n\t\t\tshowToggle={ false }\n\t\t\tisSortable={ false }\n\t\t\tdisableAddItemButton={ isMaxNumberOfInteractionsReached }\n\t\t\taddButtonInfotipContent={ infotipContent }\n\t\t\titemSettings={ {\n\t\t\t\tinitialValues: createDefaultInteractionItem(),\n\t\t\t\tLabel: ( { value }: { value: InteractionItemPropValue } ) => buildDisplayLabel( value.value ),\n\t\t\t\tIcon: () => null,\n\t\t\t\tContent: ( { index, value }: { index: number; value: InteractionItemPropValue } ) => (\n\t\t\t\t\t<InteractionDetails\n\t\t\t\t\t\tkey={ index }\n\t\t\t\t\t\tinteraction={ value.value }\n\t\t\t\t\t\tonChange={ ( newInteractionValue: InteractionItemValue ) => {\n\t\t\t\t\t\t\thandleInteractionChange( index, newInteractionValue );\n\t\t\t\t\t\t} }\n\t\t\t\t\t\tonPlayInteraction={ onPlayInteraction }\n\t\t\t\t\t/>\n\t\t\t\t),\n\t\t\t\tactions: ( value: InteractionItemPropValue ) => (\n\t\t\t\t\t<Tooltip key=\"preview\" placement=\"top\" title={ __( 'Preview', 'elementor' ) }>\n\t\t\t\t\t\t<IconButton\n\t\t\t\t\t\t\taria-label={ __( 'Play interaction', 'elementor' ) }\n\t\t\t\t\t\t\tsize=\"tiny\"\n\t\t\t\t\t\t\tonClick={ () => onPlayInteraction( extractString( value.value.interaction_id ) ) }\n\t\t\t\t\t\t>\n\t\t\t\t\t\t\t<PlayerPlayIcon fontSize=\"tiny\" />\n\t\t\t\t\t\t</IconButton>\n\t\t\t\t\t</Tooltip>\n\t\t\t\t),\n\t\t\t} }\n\t\t/>\n\t);\n}\n","const TEMP_ID_PREFIX = 'temp-';\nconst TEMP_ID_REGEX = /^temp-[a-z0-9]+$/i;\n\nexport function generateTempInteractionId(): string {\n\treturn `${ TEMP_ID_PREFIX }${ Math.random().toString( 36 ).substring( 2, 11 ) }`;\n}\n\nexport function isTempId( id: string | undefined ): boolean {\n\treturn !! id && TEMP_ID_REGEX.test( id );\n}\n","import type {\n\tAnimationPresetPropValue,\n\tBooleanPropValue,\n\tConfigPropValue,\n\tElementInteractions,\n\tInteractionItemPropValue,\n\tInteractionItemValue,\n\tNumberPropValue,\n\tStringPropValue,\n\tTimingConfigPropValue,\n} from '../types';\nimport { generateTempInteractionId } from './temp-id-utils';\n\nexport const createString = ( value: string ): StringPropValue => ( {\n\t$$type: 'string',\n\tvalue,\n} );\n\nexport const createNumber = ( value: number ): NumberPropValue => ( {\n\t$$type: 'number',\n\tvalue,\n} );\n\nexport const createTimingConfig = ( duration: number, delay: number ): TimingConfigPropValue => ( {\n\t$$type: 'timing-config',\n\tvalue: {\n\t\tduration: createNumber( duration ),\n\t\tdelay: createNumber( delay ),\n\t},\n} );\n\nexport const createBoolean = ( value: boolean ): BooleanPropValue => ( {\n\t$$type: 'boolean',\n\tvalue,\n} );\n\nexport const createConfig = ( replay: boolean ): ConfigPropValue => ( {\n\t$$type: 'config',\n\tvalue: {\n\t\treplay: createBoolean( replay ),\n\t},\n} );\n\nexport const extractBoolean = ( prop: BooleanPropValue | undefined, fallback = false ): boolean => {\n\treturn prop?.value ?? fallback;\n};\n\nexport const createAnimationPreset = ( {\n\teffect,\n\ttype,\n\tdirection,\n\tduration,\n\tdelay,\n\treplay = false,\n}: {\n\teffect: string;\n\ttype: string;\n\tdirection?: string;\n\tduration: number;\n\tdelay: number;\n\treplay: boolean;\n} ): AnimationPresetPropValue => ( {\n\t$$type: 'animation-preset-props',\n\tvalue: {\n\t\teffect: createString( effect ),\n\t\ttype: createString( type ),\n\t\tdirection: createString( direction ?? '' ),\n\t\ttiming_config: createTimingConfig( duration, delay ),\n\t\tconfig: createConfig( replay ),\n\t},\n} );\n\nexport const createInteractionItem = ( {\n\ttrigger,\n\teffect,\n\ttype,\n\tdirection,\n\tduration,\n\tdelay,\n\tinteractionId,\n\treplay = false,\n}: {\n\ttrigger: string;\n\teffect: string;\n\ttype: string;\n\tdirection?: string;\n\tduration: number;\n\tdelay: number;\n\tinteractionId?: string;\n\treplay: boolean;\n} ): InteractionItemPropValue => ( {\n\t$$type: 'interaction-item',\n\tvalue: {\n\t\t...( interactionId && { interaction_id: createString( interactionId ) } ),\n\t\ttrigger: createString( trigger ),\n\t\tanimation: createAnimationPreset( { effect, type, direction, duration, delay, replay } ),\n\t},\n} );\n\nexport const createDefaultInteractionItem = (): InteractionItemPropValue => {\n\treturn createInteractionItem( {\n\t\ttrigger: 'load',\n\t\teffect: 'fade',\n\t\ttype: 'in',\n\t\tduration: 300,\n\t\tdelay: 0,\n\t\treplay: false,\n\t\tinteractionId: generateTempInteractionId(),\n\t} );\n};\n\nexport const createDefaultInteractions = (): ElementInteractions => ( {\n\tversion: 1,\n\titems: [ createDefaultInteractionItem() ],\n} );\n\nexport const extractString = ( prop: StringPropValue | undefined, fallback = '' ): string => {\n\treturn prop?.value ?? fallback;\n};\n\nexport const extractNumber = ( prop: NumberPropValue | undefined, fallback = 0 ): number => {\n\treturn prop?.value ?? fallback;\n};\n\nexport const buildAnimationIdString = ( item: InteractionItemValue ): string => {\n\tconst trigger = extractString( item.trigger );\n\tconst effect = extractString( item.animation.value.effect );\n\tconst type = extractString( item.animation.value.type );\n\tconst direction = extractString( item.animation.value.direction );\n\tconst duration = extractNumber( item.animation.value.timing_config.value.duration );\n\tconst delay = extractNumber( item.animation.value.timing_config.value.delay );\n\n\treturn [ trigger, effect, type, direction, duration, delay ].join( '-' );\n};\n\nconst TRIGGER_LABELS: Record< string, string > = {\n\tload: 'On page load',\n\tscrollIn: 'Scroll into view',\n\tscrollOut: 'Scroll out of view',\n\tscrollOn: 'While scrolling',\n};\n\nconst capitalize = ( str: string ): string => {\n\treturn str.charAt( 0 ).toUpperCase() + str.slice( 1 );\n};\n\nexport const buildDisplayLabel = ( item: InteractionItemValue ): string => {\n\tconst trigger = extractString( item.trigger );\n\tconst effect = extractString( item.animation.value.effect );\n\tconst type = extractString( item.animation.value.type );\n\n\tconst triggerLabel = TRIGGER_LABELS[ trigger ] || capitalize( trigger );\n\tconst effectLabel = capitalize( effect );\n\tconst typeLabel = capitalize( type );\n\n\treturn `${ triggerLabel }: ${ effectLabel } ${ typeLabel }`;\n};\n","import * as React from 'react';\nimport { useMemo } from 'react';\nimport { ControlFormLabel, PopoverContent, PopoverGridContainer } from '@elementor/editor-controls';\nimport { Divider, Grid } from '@elementor/ui';\nimport { __ } from '@wordpress/i18n';\n\nimport { getInteractionsControl } from '../interactions-controls-registry';\nimport type { InteractionItemValue } from '../types';\nimport {\n\tcreateAnimationPreset,\n\tcreateString,\n\textractBoolean,\n\textractNumber,\n\textractString,\n} from '../utils/prop-value-utils';\nimport { Direction } from './controls/direction';\nimport { Effect } from './controls/effect';\nimport { EffectType } from './controls/effect-type';\nimport { TimeFrameIndicator } from './controls/time-frame-indicator';\n\ntype InteractionDetailsProps = {\n\tinteraction: InteractionItemValue;\n\tonChange: ( interaction: InteractionItemValue ) => void;\n\tonPlayInteraction: ( interactionId: string ) => void;\n};\n\nconst DEFAULT_VALUES = {\n\ttrigger: 'load',\n\teffect: 'fade',\n\ttype: 'in',\n\tdirection: '',\n\tduration: 300,\n\tdelay: 0,\n\treplay: false,\n};\n\nconst TRIGGERS_WITH_REPLAY = [ 'scrollIn', 'scrollOut' ];\n\nexport const InteractionDetails = ( { interaction, onChange, onPlayInteraction }: InteractionDetailsProps ) => {\n\tconst trigger = extractString( interaction.trigger, DEFAULT_VALUES.trigger );\n\tconst effect = extractString( interaction.animation.value.effect, DEFAULT_VALUES.effect );\n\tconst type = extractString( interaction.animation.value.type, DEFAULT_VALUES.type );\n\tconst direction = extractString( interaction.animation.value.direction, DEFAULT_VALUES.direction );\n\tconst duration = extractNumber( interaction.animation.value.timing_config.value.duration, DEFAULT_VALUES.duration );\n\tconst delay = extractNumber( interaction.animation.value.timing_config.value.delay, DEFAULT_VALUES.delay );\n\tconst replay = extractBoolean( interaction.animation.value.config?.value.replay, DEFAULT_VALUES.replay );\n\tconst shouldShowReplay = TRIGGERS_WITH_REPLAY.includes( trigger );\n\tconst TriggerControl = useMemo( () => {\n\t\treturn getInteractionsControl( 'trigger' )?.component ?? null;\n\t}, [] );\n\tconst ReplayControl = useMemo( () => {\n\t\tif ( ! shouldShowReplay ) {\n\t\t\treturn null;\n\t\t}\n\t\treturn getInteractionsControl( 'replay' )?.component ?? null;\n\t}, [ shouldShowReplay ] );\n\n\tconst resolveDirection = ( hasDirection: boolean, newEffect?: string, newDirection?: string ) => {\n\t\tif ( newEffect === 'slide' && ! newDirection ) {\n\t\t\treturn 'top';\n\t\t}\n\t\t// Why? - New direction can be undefined when the effect is not slide, so if the updates object includes direction, we take it always!\n\t\tif ( hasDirection ) {\n\t\t\treturn newDirection;\n\t\t}\n\t\treturn direction;\n\t};\n\n\tconst updateInteraction = (\n\t\tupdates: Partial< {\n\t\t\ttrigger: string;\n\t\t\teffect: string;\n\t\t\ttype: string;\n\t\t\tdirection: string;\n\t\t\tduration: number;\n\t\t\tdelay: number;\n\t\t\treplay: boolean;\n\t\t} >\n\t): void => {\n\t\tconst resolvedDirectionValue = resolveDirection( 'direction' in updates, updates.effect, updates.direction );\n\t\tconst newReplay = updates.replay !== undefined ? updates.replay : replay;\n\n\t\tconst updatedInteraction = {\n\t\t\t...interaction,\n\t\t\tinteraction_id: interaction.interaction_id,\n\t\t\ttrigger: createString( updates.trigger ?? trigger ),\n\t\t\tanimation: createAnimationPreset( {\n\t\t\t\teffect: updates.effect ?? effect,\n\t\t\t\ttype: updates.type ?? type,\n\t\t\t\tdirection: resolvedDirectionValue,\n\t\t\t\tduration: updates.duration ?? duration,\n\t\t\t\tdelay: updates.delay ?? delay,\n\t\t\t\treplay: newReplay,\n\t\t\t} ),\n\t\t};\n\n\t\tonChange( updatedInteraction );\n\n\t\tconst interactionId = extractString( updatedInteraction.interaction_id );\n\t\tsetTimeout( () => {\n\t\t\tonPlayInteraction( interactionId );\n\t\t}, 0 );\n\t};\n\n\treturn (\n\t\t<PopoverContent p={ 1.5 }>\n\t\t\t<Grid container spacing={ 1.5 }>\n\t\t\t\t{ TriggerControl && (\n\t\t\t\t\t<TriggerControl value={ trigger } onChange={ ( v ) => updateInteraction( { trigger: v } ) } />\n\t\t\t\t) }\n\t\t\t\t{ ReplayControl && (\n\t\t\t\t\t<>\n\t\t\t\t\t\t<Grid item xs={ 12 }>\n\t\t\t\t\t\t\t<PopoverGridContainer>\n\t\t\t\t\t\t\t\t<Grid item xs={ 6 }>\n\t\t\t\t\t\t\t\t\t<ControlFormLabel>{ __( 'Replay', 'elementor' ) }</ControlFormLabel>\n\t\t\t\t\t\t\t\t</Grid>\n\t\t\t\t\t\t\t\t<Grid item xs={ 6 }>\n\t\t\t\t\t\t\t\t\t<ReplayControl\n\t\t\t\t\t\t\t\t\t\tvalue={ replay }\n\t\t\t\t\t\t\t\t\t\tonChange={ ( v ) => updateInteraction( { replay: v } ) }\n\t\t\t\t\t\t\t\t\t\tdisabled={ true }\n\t\t\t\t\t\t\t\t\t/>\n\t\t\t\t\t\t\t\t</Grid>\n\t\t\t\t\t\t\t</PopoverGridContainer>\n\t\t\t\t\t\t</Grid>\n\t\t\t\t\t</>\n\t\t\t\t) }\n\t\t\t</Grid>\n\t\t\t<Divider />\n\t\t\t<Grid container spacing={ 1.5 }>\n\t\t\t\t<Effect value={ effect } onChange={ ( v ) => updateInteraction( { effect: v } ) } />\n\t\t\t\t<EffectType value={ type } onChange={ ( v ) => updateInteraction( { type: v } ) } />\n\t\t\t\t<Direction\n\t\t\t\t\tvalue={ direction }\n\t\t\t\t\tonChange={ ( v ) => updateInteraction( { direction: v } ) }\n\t\t\t\t\tinteractionType={ type }\n\t\t\t\t/>\n\t\t\t\t<TimeFrameIndicator\n\t\t\t\t\tvalue={ String( duration ) }\n\t\t\t\t\tonChange={ ( v ) => updateInteraction( { duration: parseInt( v, 10 ) } ) }\n\t\t\t\t\tlabel={ __( 'Duration', 'elementor' ) }\n\t\t\t\t/>\n\t\t\t\t<TimeFrameIndicator\n\t\t\t\t\tvalue={ String( delay ) }\n\t\t\t\t\tonChange={ ( v ) => updateInteraction( { delay: parseInt( v, 10 ) } ) }\n\t\t\t\t\tlabel={ __( 'Delay', 'elementor' ) }\n\t\t\t\t/>\n\t\t\t</Grid>\n\t\t</PopoverContent>\n\t);\n};\n","import { type ComponentType } from 'react';\n\nimport { type DirectionFieldProps, type FieldProps, type ReplayFieldProps } from './types';\n\ntype InteractionsControlType = 'trigger' | 'effect' | 'effectType' | 'direction' | 'duration' | 'delay' | 'replay';\n\ntype InteractionsControlPropsMap = {\n\ttrigger: FieldProps;\n\teffect: FieldProps;\n\teffectType: FieldProps;\n\tdirection: DirectionFieldProps;\n\tduration: FieldProps;\n\tdelay: FieldProps;\n\treplay: ReplayFieldProps;\n};\n\ntype ControlOptions< T extends InteractionsControlType > = {\n\ttype: T;\n\tcomponent: ComponentType< InteractionsControlPropsMap[ T ] >;\n\toptions?: string[];\n};\n\ntype StoredControlOptions = {\n\ttype: InteractionsControlType;\n\tcomponent: ComponentType< FieldProps | DirectionFieldProps | ReplayFieldProps >;\n\toptions?: string[];\n};\n\nconst controlsRegistry = new Map< InteractionsControlType, StoredControlOptions >();\n\nexport function registerInteractionsControl< T extends InteractionsControlType >( {\n\ttype,\n\tcomponent,\n\toptions,\n}: ControlOptions< T > ) {\n\tcontrolsRegistry.set( type, { type, component: component as StoredControlOptions[ 'component' ], options } );\n}\n\nexport function getInteractionsControl( type: InteractionsControlType ) {\n\treturn controlsRegistry.get( type );\n}\n\nexport function getInteractionsControlOptions( type: InteractionsControlType ) {\n\treturn controlsRegistry.get( type )?.options ?? [];\n}\n","import * as React from 'react';\nimport { useMemo } from 'react';\nimport {\n\tControlFormLabel,\n\tPopoverGridContainer,\n\ttype ToggleButtonGroupItem,\n\tToggleButtonGroupUi,\n} from '@elementor/editor-controls';\nimport { ArrowDownSmallIcon, ArrowLeftIcon, ArrowRightIcon, ArrowUpSmallIcon } from '@elementor/icons';\nimport { Grid } from '@elementor/ui';\nimport { __ } from '@wordpress/i18n';\n\nimport { type DirectionFieldProps } from '../../types';\n\ntype Direction = 'top' | 'bottom' | 'left' | 'right';\n\nexport function Direction( { value, onChange, interactionType }: DirectionFieldProps ) {\n\tconst options: ToggleButtonGroupItem< Direction >[] = useMemo( () => {\n\t\tconst isIn = interactionType === 'in';\n\n\t\treturn [\n\t\t\t{\n\t\t\t\tvalue: 'top',\n\t\t\t\tlabel: isIn ? __( 'From top', 'elementor' ) : __( 'To top', 'elementor' ),\n\t\t\t\trenderContent: ( { size } ) =>\n\t\t\t\t\tisIn ? <ArrowDownSmallIcon fontSize={ size } /> : <ArrowUpSmallIcon fontSize={ size } />,\n\t\t\t\tshowTooltip: true,\n\t\t\t},\n\t\t\t{\n\t\t\t\tvalue: 'bottom',\n\t\t\t\tlabel: interactionType === 'in' ? __( 'From bottom', 'elementor' ) : __( 'To bottom', 'elementor' ),\n\t\t\t\trenderContent: ( { size } ) =>\n\t\t\t\t\tisIn ? <ArrowUpSmallIcon fontSize={ size } /> : <ArrowDownSmallIcon fontSize={ size } />,\n\t\t\t\tshowTooltip: true,\n\t\t\t},\n\t\t\t{\n\t\t\t\tvalue: 'left',\n\t\t\t\tlabel: interactionType === 'in' ? __( 'From left', 'elementor' ) : __( 'To left', 'elementor' ),\n\t\t\t\trenderContent: ( { size } ) =>\n\t\t\t\t\tisIn ? <ArrowRightIcon fontSize={ size } /> : <ArrowLeftIcon fontSize={ size } />,\n\t\t\t\tshowTooltip: true,\n\t\t\t},\n\t\t\t{\n\t\t\t\tvalue: 'right',\n\t\t\t\tlabel: interactionType === 'in' ? __( 'From right', 'elementor' ) : __( 'To right', 'elementor' ),\n\t\t\t\trenderContent: ( { size } ) =>\n\t\t\t\t\tisIn ? <ArrowLeftIcon fontSize={ size } /> : <ArrowRightIcon fontSize={ size } />,\n\t\t\t\tshowTooltip: true,\n\t\t\t},\n\t\t];\n\t}, [ interactionType ] );\n\n\treturn (\n\t\t<Grid item xs={ 12 }>\n\t\t\t<PopoverGridContainer>\n\t\t\t\t<Grid item xs={ 6 }>\n\t\t\t\t\t<ControlFormLabel> { __( 'Direction', 'elementor' ) }</ControlFormLabel>\n\t\t\t\t</Grid>\n\t\t\t\t<Grid item xs={ 6 }>\n\t\t\t\t\t<ToggleButtonGroupUi items={ options } exclusive onChange={ onChange } value={ value } />\n\t\t\t\t</Grid>\n\t\t\t</PopoverGridContainer>\n\t\t</Grid>\n\t);\n}\n","import * as React from 'react';\nimport { ControlFormLabel, PopoverGridContainer } from '@elementor/editor-controls';\nimport { MenuListItem } from '@elementor/editor-ui';\nimport { Grid, Select, type SelectChangeEvent } from '@elementor/ui';\nimport { __ } from '@wordpress/i18n';\n\nimport { type FieldProps } from '../../types';\nexport function Effect( { value, onChange }: FieldProps ) {\n\tconst availableEffects = [\n\t\t{ key: 'fade', label: __( 'Fade', 'elementor' ) },\n\t\t{ key: 'slide', label: __( 'Slide', 'elementor' ) },\n\t\t{ key: 'scale', label: __( 'Scale', 'elementor' ) },\n\t];\n\n\treturn (\n\t\t<Grid item xs={ 12 }>\n\t\t\t<PopoverGridContainer>\n\t\t\t\t<Grid item xs={ 6 }>\n\t\t\t\t\t<ControlFormLabel>{ __( 'Effect', 'elementor' ) }</ControlFormLabel>\n\t\t\t\t</Grid>\n\t\t\t\t<Grid item xs={ 6 }>\n\t\t\t\t\t<Select\n\t\t\t\t\t\tfullWidth\n\t\t\t\t\t\tdisplayEmpty\n\t\t\t\t\t\tsize=\"tiny\"\n\t\t\t\t\t\tvalue={ value }\n\t\t\t\t\t\tonChange={ ( event: SelectChangeEvent< string > ) => onChange( event.target.value ) }\n\t\t\t\t\t>\n\t\t\t\t\t\t{ availableEffects.map( ( effect ) => {\n\t\t\t\t\t\t\treturn (\n\t\t\t\t\t\t\t\t<MenuListItem key={ effect.key } value={ effect.key }>\n\t\t\t\t\t\t\t\t\t{ effect.label }\n\t\t\t\t\t\t\t\t</MenuListItem>\n\t\t\t\t\t\t\t);\n\t\t\t\t\t\t} ) }\n\t\t\t\t\t</Select>\n\t\t\t\t</Grid>\n\t\t\t</PopoverGridContainer>\n\t\t</Grid>\n\t);\n}\n","import * as React from 'react';\nimport {\n\tControlFormLabel,\n\tPopoverGridContainer,\n\ttype ToggleButtonGroupItem,\n\tToggleButtonGroupUi,\n} from '@elementor/editor-controls';\nimport { Grid } from '@elementor/ui';\nimport { __ } from '@wordpress/i18n';\n\nimport { type FieldProps } from '../../types';\n\ntype EffectType = 'in' | 'out';\nexport function EffectType( { value, onChange }: FieldProps ) {\n\tconst options: ToggleButtonGroupItem< EffectType >[] = [\n\t\t{\n\t\t\tvalue: 'in',\n\t\t\tlabel: __( 'In', 'elementor' ),\n\t\t\trenderContent: () => __( 'In', 'elementor' ),\n\t\t\tshowTooltip: true,\n\t\t},\n\t\t{\n\t\t\tvalue: 'out',\n\t\t\tlabel: __( 'Out', 'elementor' ),\n\t\t\trenderContent: () => __( 'Out', 'elementor' ),\n\t\t\tshowTooltip: true,\n\t\t},\n\t];\n\n\treturn (\n\t\t<>\n\t\t\t<Grid item xs={ 12 }>\n\t\t\t\t<PopoverGridContainer>\n\t\t\t\t\t<Grid item xs={ 6 }>\n\t\t\t\t\t\t<ControlFormLabel>{ __( 'Type', 'elementor' ) }</ControlFormLabel>\n\t\t\t\t\t</Grid>\n\t\t\t\t\t<Grid item xs={ 6 }>\n\t\t\t\t\t\t<ToggleButtonGroupUi items={ options } exclusive onChange={ onChange } value={ value } />\n\t\t\t\t\t</Grid>\n\t\t\t\t</PopoverGridContainer>\n\t\t\t</Grid>\n\t\t</>\n\t);\n}\n","import * as React from 'react';\nimport { ControlFormLabel, PopoverGridContainer } from '@elementor/editor-controls';\nimport { MenuListItem } from '@elementor/editor-ui';\nimport { Grid, Select, type SelectChangeEvent } from '@elementor/ui';\nimport { __ } from '@wordpress/i18n';\n\nimport { type FieldProps } from '../../types';\n\nexport function TimeFrameIndicator( { value, onChange, label }: FieldProps ) {\n\tconst availableTimeFrames = [ '0', '100', '200', '300', '400', '500', '750', '1000', '1250', '1500' ].map(\n\t\t( key ) => ( {\n\t\t\tkey,\n\t\t\t// translators: %s: time in milliseconds\n\t\t\tlabel: __( '%s MS', 'elementor' ).replace( '%s', key ),\n\t\t} )\n\t);\n\n\treturn (\n\t\t<Grid item xs={ 12 }>\n\t\t\t<PopoverGridContainer>\n\t\t\t\t<Grid item xs={ 6 }>\n\t\t\t\t\t<ControlFormLabel>{ label }</ControlFormLabel>\n\t\t\t\t</Grid>\n\t\t\t\t<Grid item xs={ 6 }>\n\t\t\t\t\t<Select\n\t\t\t\t\t\tfullWidth\n\t\t\t\t\t\tdisplayEmpty\n\t\t\t\t\t\tsize=\"tiny\"\n\t\t\t\t\t\tvalue={ value }\n\t\t\t\t\t\tonChange={ ( event: SelectChangeEvent< string > ) => onChange( event.target.value ) }\n\t\t\t\t\t>\n\t\t\t\t\t\t{ availableTimeFrames.map( ( timeFrame ) => {\n\t\t\t\t\t\t\treturn (\n\t\t\t\t\t\t\t\t<MenuListItem key={ timeFrame.key } value={ timeFrame.key }>\n\t\t\t\t\t\t\t\t\t{ timeFrame.label }\n\t\t\t\t\t\t\t\t</MenuListItem>\n\t\t\t\t\t\t\t);\n\t\t\t\t\t\t} ) }\n\t\t\t\t\t</Select>\n\t\t\t\t</Grid>\n\t\t\t</PopoverGridContainer>\n\t\t</Grid>\n\t);\n}\n","import { type InteractionsConfig } from '../types';\n\nconst DEFAULT_CONFIG: InteractionsConfig = {\n\tconstants: {\n\t\tdefaultDuration: 300,\n\t\tdefaultDelay: 0,\n\t\tslideDistance: 100,\n\t\tscaleStart: 0.5,\n\t\teasing: 'linear',\n\t},\n\tanimationOptions: [],\n};\n\nexport function getInteractionsConfig(): InteractionsConfig {\n\treturn window.ElementorInteractionsConfig || DEFAULT_CONFIG;\n}\n","import { type InteractionsProvider } from '../types';\n\nexport const createInteractionsRepository = () => {\n\tconst providers: InteractionsProvider[] = [];\n\n\tconst getProviders = () => {\n\t\tconst sorted = providers.slice( 0 ).sort( ( a, b ) => ( a.priority > b.priority ? -1 : 1 ) );\n\t\treturn sorted;\n\t};\n\n\tconst register = ( provider: InteractionsProvider ) => {\n\t\tproviders.push( provider );\n\t};\n\n\tconst all = () => {\n\t\treturn getProviders().flatMap( ( provider ) => provider.actions.all() );\n\t};\n\n\tconst subscribe = ( cb: () => void ) => {\n\t\tconst unsubscribes = providers.map( ( provider ) => provider.subscribe( cb ) );\n\n\t\treturn () => {\n\t\t\tunsubscribes.forEach( ( unsubscribe ) => unsubscribe() );\n\t\t};\n\t};\n\n\tconst getProviderByKey = ( key: string ) => {\n\t\treturn providers.find( ( provider ) => {\n\t\t\ttry {\n\t\t\t\treturn provider.getKey() === key;\n\t\t\t} catch {\n\t\t\t\t// Provider might not be ready yet (e.g., no document loaded)\n\t\t\t\treturn false;\n\t\t\t}\n\t\t} );\n\t};\n\n\treturn {\n\t\tall,\n\t\tregister,\n\t\tsubscribe,\n\t\tgetProviders,\n\t\tgetProviderByKey,\n\t};\n};\n","import { createInteractionsRepository } from './utils/create-interactions-repository';\n\nexport const interactionsRepository = createInteractionsRepository();\n","import { type InteractionsProvider } from '../types';\n\nexport type CreateInteractionsProviderOptions = {\n\tkey: string | ( () => string );\n\tpriority?: number;\n\tsubscribe?: ( callback: () => void ) => () => void;\n\tactions: {\n\t\tall: InteractionsProvider[ 'actions' ][ 'all' ];\n\t};\n};\n\nconst DEFAULT_PRIORITY = 10;\n\nexport function createInteractionsProvider( {\n\tkey,\n\tpriority = DEFAULT_PRIORITY,\n\tsubscribe = () => () => {},\n\tactions,\n}: CreateInteractionsProviderOptions ): InteractionsProvider {\n\treturn {\n\t\tgetKey: typeof key === 'string' ? () => key : key,\n\t\tpriority,\n\t\tsubscribe,\n\t\tactions: {\n\t\t\tall: actions.all,\n\t\t},\n\t};\n}\n","import { getCurrentDocumentId, getElementInteractions, getElements } from '@elementor/editor-elements';\nimport { __privateListenTo as listenTo, windowEvent } from '@elementor/editor-v1-adapters';\n\nimport { createInteractionsProvider } from '../utils/create-interactions-provider';\n\nexport const ELEMENTS_INTERACTIONS_PROVIDER_KEY_PREFIX = 'document-elements-interactions-';\n\nexport const documentElementsInteractionsProvider = createInteractionsProvider( {\n\tkey: () => {\n\t\tconst documentId = getCurrentDocumentId();\n\n\t\tif ( ! documentId ) {\n\t\t\tconst pendingKey = `${ ELEMENTS_INTERACTIONS_PROVIDER_KEY_PREFIX }pending`;\n\t\t\treturn pendingKey;\n\t\t}\n\n\t\tconst key = `${ ELEMENTS_INTERACTIONS_PROVIDER_KEY_PREFIX }${ documentId }`;\n\t\treturn key;\n\t},\n\tpriority: 50,\n\tsubscribe: ( cb ) => {\n\t\treturn listenTo( [ windowEvent( 'elementor/element/update_interactions' ) ], () => cb() );\n\t},\n\tactions: {\n\t\tall: () => {\n\t\t\tconst elements = getElements();\n\n\t\t\tconst filtered = elements.filter( ( element ) => {\n\t\t\t\tconst interactions = getElementInteractions( element.id );\n\t\t\t\tif ( ! interactions ) {\n\t\t\t\t\treturn false;\n\t\t\t\t}\n\t\t\t\treturn interactions?.items?.length > 0;\n\t\t\t} );\n\n\t\t\treturn filtered.map( ( element ) => {\n\t\t\t\tconst interactions = getElementInteractions( element.id );\n\t\t\t\treturn {\n\t\t\t\t\telementId: element.id,\n\t\t\t\t\tdataId: element.id,\n\t\t\t\t\tinteractions: interactions || { version: 1, items: [] },\n\t\t\t\t};\n\t\t\t} );\n\t\t},\n\t},\n} );\n","import * as React from 'react';\nimport { ControlFormLabel, PopoverGridContainer } from '@elementor/editor-controls';\nimport { MenuListItem } from '@elementor/editor-ui';\nimport { Grid, Select, type SelectChangeEvent } from '@elementor/ui';\nimport { __ } from '@wordpress/i18n';\n\nimport { type FieldProps } from '../../types';\n\nexport function Trigger( { value, onChange }: FieldProps ) {\n\tconst availableTriggers = Object.entries( {\n\t\tload: __( 'Page load', 'elementor' ),\n\t\tscrollIn: __( 'Scroll into view', 'elementor' ),\n\t} ).map( ( [ key, label ] ) => ( {\n\t\tkey,\n\t\tlabel,\n\t} ) );\n\n\treturn (\n\t\t<Grid item xs={ 12 }>\n\t\t\t<PopoverGridContainer>\n\t\t\t\t<Grid item xs={ 6 }>\n\t\t\t\t\t<ControlFormLabel>{ __( 'Trigger', 'elementor' ) }</ControlFormLabel>\n\t\t\t\t</Grid>\n\t\t\t\t<Grid item xs={ 6 }>\n\t\t\t\t\t<Select\n\t\t\t\t\t\tfullWidth\n\t\t\t\t\t\tdisplayEmpty\n\t\t\t\t\t\tsize=\"tiny\"\n\t\t\t\t\t\tonChange={ ( event: SelectChangeEvent< string > ) => onChange( event.target.value ) }\n\t\t\t\t\t\tvalue={ value }\n\t\t\t\t\t>\n\t\t\t\t\t\t{ availableTriggers.map( ( trigger ) => {\n\t\t\t\t\t\t\treturn (\n\t\t\t\t\t\t\t\t<MenuListItem key={ trigger.key } value={ trigger.key }>\n\t\t\t\t\t\t\t\t\t{ trigger.label }\n\t\t\t\t\t\t\t\t</MenuListItem>\n\t\t\t\t\t\t\t);\n\t\t\t\t\t\t} ) }\n\t\t\t\t\t</Select>\n\t\t\t\t</Grid>\n\t\t\t</PopoverGridContainer>\n\t\t</Grid>\n\t);\n}\n","import { type ElementID, getAllDescendants, getContainer, type V1Element } from '@elementor/editor-elements';\nimport { registerDataHook } from '@elementor/editor-v1-adapters';\n\nimport type { ElementInteractions } from '../types';\nimport { createString } from '../utils/prop-value-utils';\nimport { generateTempInteractionId } from '../utils/temp-id-utils';\n\nexport function initCleanInteractionIdsOnDuplicate() {\n\tregisterDataHook( 'after', 'document/elements/duplicate', ( _args, result: V1Element | V1Element[] ) => {\n\t\tconst containers = Array.isArray( result ) ? result : [ result ];\n\n\t\tcontainers.forEach( ( container ) => {\n\t\t\tcleanInteractionIdsRecursive( container.id );\n\t\t} );\n\t} );\n}\n\nfunction cleanInteractionIdsRecursive( elementId: ElementID ) {\n\tconst container = getContainer( elementId );\n\n\tif ( ! container ) {\n\t\treturn;\n\t}\n\n\tgetAllDescendants( container ).forEach( ( element: V1Element ) => {\n\t\tcleanInteractionIds( element.id as ElementID );\n\t} );\n}\n\nfunction cleanInteractionIds( elementId: ElementID ) {\n\tconst container = getContainer( elementId );\n\n\tif ( ! container ) {\n\t\treturn;\n\t}\n\n\tconst interactions = container.model.get( 'interactions' ) as ElementInteractions;\n\n\tif ( ! interactions || ! interactions.items ) {\n\t\treturn;\n\t}\n\n\tconst updatedInteractions = structuredClone( interactions ) as ElementInteractions;\n\n\tupdatedInteractions?.items?.forEach( ( interaction ) => {\n\t\tif ( interaction.$$type === 'interaction-item' && interaction.value ) {\n\t\t\tinteraction.value.interaction_id = createString( generateTempInteractionId() );\n\t\t}\n\t} );\n\n\tcontainer.model.set( 'interactions', updatedInteractions );\n}\n","import { Trigger } from './components/controls/trigger';\nimport { initCleanInteractionIdsOnDuplicate } from './hooks/on-duplicate';\nimport { registerInteractionsControl } from './interactions-controls-registry';\nimport { interactionsRepository } from './interactions-repository';\nimport { documentElementsInteractionsProvider } from './providers/document-elements-interactions-provider';\n\nexport function init() {\n\ttry {\n\t\tinteractionsRepository.register( documentElementsInteractionsProvider );\n\t\tinitCleanInteractionIdsOnDuplicate();\n\t\tregisterInteractionsControl( {\n\t\t\ttype: 'trigger',\n\t\t\tcomponent: Trigger,\n\t\t\toptions: [ 'load', 'scrollIn' ],\n\t\t} );\n\t} catch ( error ) {\n\t\tthrow error;\n\t}\n}\n"],"mappings":";AAAA,YAAY,WAAW;AACvB,SAAS,iBAAiB;AAC1B,SAAS,QAAQ,OAAO,kBAAkB;AAC1C,SAAS,UAAU;AAEZ,IAAM,aAAa,CAAE,EAAE,oBAAoB,MAA4C;AAC7F,SACC;AAAA,IAAC;AAAA;AAAA,MACA,YAAW;AAAA,MACX,gBAAe;AAAA,MACf,QAAO;AAAA,MACP,OAAM;AAAA,MACN,IAAK,EAAE,GAAG,KAAK,IAAI,GAAG,IAAI,IAAI;AAAA,MAC9B,KAAM;AAAA;AAAA,IAEN,oCAAC,aAAU,UAAS,SAAQ;AAAA,IAE5B,oCAAC,cAAW,OAAM,UAAS,SAAQ,eAChC,GAAI,sCAAsC,WAAY,CACzD;AAAA,IAEA,oCAAC,cAAW,OAAM,UAAS,SAAQ,WAAU,UAAS,WACnD;AAAA,MACD;AAAA,MACA;AAAA,IACD,CACD;AAAA,IAEA,oCAAC,UAAO,SAAQ,YAAW,OAAM,aAAY,MAAK,SAAQ,IAAK,EAAE,IAAI,EAAE,GAAI,SAAU,uBAClF,GAAI,yBAAyB,WAAY,CAC5C;AAAA,EACD;AAEF;;;ACjCA,YAAYA,aAAW;AACvB,SAAS,eAAAC,cAAa,YAAAC,iBAAgB;AACtC,SAAS,0BAAAC,+BAA8B;AACvC,SAAS,8BAA8B;AACvC,SAAS,SAAAC,cAAa;;;ACJtB,YAAYC,YAAW;AACvB,SAAS,eAA+B,YAAY,iBAAiB;AACrE;AAAA,EAEC;AAAA,EACA;AAAA,EACA;AAAA,OACM;AAQP,IAAM,sBAAsB,cAAkD,IAAK;AAEnF,IAAM,uBAA4C;AAAA,EACjD,SAAS;AAAA,EACT,OAAO,CAAC;AACT;AAEO,IAAM,uBA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,CAAE,YAAwB;AACjE,wBAAqB,QAAQ,EAAgB;AAAA,EAC9C,CAAE;AACH;AAEA,SAAS,oBAAqB,WAAuB;AACpD,QAAM,YAAY,aAAc,SAAU;AAE1C,MAAK,CAAE,WAAY;AAClB;AAAA,EACD;AAEA,QAAM,eAAe,UAAU,MAAM,IAAK,cAAe;AAEzD,MAAK,CAAE,gBAAgB,CAAE,aAAa,OAAQ;AAC7C;AAAA,EACD;AAEA,QAAM,sBAAsB,gBAAiB,YAAa;AAE1D,uBAAqB,OAAO,QAAS,CAAE,gBAAiB;AACvD,QAAK,YAAY,WAAW,sBAAsB,YAAY,OAAQ;AACrE,kBAAY,MAAM,iBAAiB,aAAc,0BAA0B,CAAE;AAAA,IAC9E;AAAA,EACD,CAAE;AAEF,YAAU,MAAM,IAAK,gBAAgB,mBAAoB;AAC1D;;;AC7CO,SAAS,OAAO;AACtB,MAAI;AACH,2BAAuB,SAAU,oCAAqC;AACtE,uCAAmC;AACnC,gCAA6B;AAAA,MAC5B,MAAM;AAAA,MACN,WAAW;AAAA,MACX,SAAS,CAAE,QAAQ,UAAW;AAAA,IAC/B,CAAE;AAAA,EACH,SAAU,OAAQ;AACjB,UAAM;AAAA,EACP;AACD;","names":["React","useCallback","useState","useElementInteractions","Stack","React","React","createContext","useContext","React","useCallback","useEffect","useMemo","__","React","useMemo","ControlFormLabel","PopoverGridContainer","Grid","__","React","__","React","ControlFormLabel","PopoverGridContainer","Grid","__","React","ControlFormLabel","PopoverGridContainer","ToggleButtonGroupUi","Grid","__","React","ControlFormLabel","PopoverGridContainer","MenuListItem","Grid","Select","__","useMemo","Grid","PopoverGridContainer","ControlFormLabel","__","useCallback","useEffect","useMemo","__","useElementInteractions","useState","useCallback","Stack","React","ControlFormLabel","PopoverGridContainer","MenuListItem","Grid","Select","__"]}
1
+ {"version":3,"sources":["../src/components/empty-state.tsx","../src/components/interactions-tab.tsx","../src/contexts/interactions-context.tsx","../src/contexts/popup-state-context.tsx","../src/components/interactions-list.tsx","../src/utils/temp-id-utils.ts","../src/utils/prop-value-utils.ts","../src/components/interaction-details.tsx","../src/interactions-controls-registry.ts","../src/components/controls/direction.tsx","../src/components/controls/effect.tsx","../src/components/controls/effect-type.tsx","../src/components/controls/time-frame-indicator.tsx","../src/utils/get-interactions-config.ts","../src/utils/create-interactions-repository.ts","../src/interactions-repository.ts","../src/utils/create-interactions-provider.ts","../src/providers/document-elements-interactions-provider.ts","../src/components/controls/trigger.tsx","../src/hooks/on-duplicate.ts","../src/init.ts"],"sourcesContent":["import * as React from 'react';\nimport { SwipeIcon } from '@elementor/icons';\nimport { Button, Stack, Typography } from '@elementor/ui';\nimport { __ } from '@wordpress/i18n';\n\nexport const EmptyState = ( { onCreateInteraction }: { onCreateInteraction: () => void } ) => {\n\treturn (\n\t\t<Stack\n\t\t\talignItems=\"center\"\n\t\t\tjustifyContent=\"center\"\n\t\t\theight=\"100%\"\n\t\t\tcolor=\"text.secondary\"\n\t\t\tsx={ { p: 2.5, pt: 8, pb: 5.5 } }\n\t\t\tgap={ 1.5 }\n\t\t>\n\t\t\t<SwipeIcon fontSize=\"large\" />\n\n\t\t\t<Typography align=\"center\" variant=\"subtitle2\">\n\t\t\t\t{ __( 'Animate elements with Interactions', 'elementor' ) }\n\t\t\t</Typography>\n\n\t\t\t<Typography align=\"center\" variant=\"caption\" maxWidth=\"170px\">\n\t\t\t\t{ __(\n\t\t\t\t\t'Add entrance animations and effects triggered by user interactions such as page load or scroll.',\n\t\t\t\t\t'elementor'\n\t\t\t\t) }\n\t\t\t</Typography>\n\n\t\t\t<Button variant=\"outlined\" color=\"secondary\" size=\"small\" sx={ { mt: 1 } } onClick={ onCreateInteraction }>\n\t\t\t\t{ __( 'Create an interaction', 'elementor' ) }\n\t\t\t</Button>\n\t\t</Stack>\n\t);\n};\n","import * as React from 'react';\nimport { useCallback, useState } from 'react';\nimport { useElementInteractions } from '@elementor/editor-elements';\nimport { SessionStorageProvider } from '@elementor/session';\nimport { Stack } from '@elementor/ui';\n\nimport { InteractionsProvider, useInteractionsContext } from '../contexts/interactions-context';\nimport { PopupStateProvider } from '../contexts/popup-state-context';\nimport type { ElementInteractions } from '../types';\nimport { EmptyState } from './empty-state';\nimport { InteractionsList } from './interactions-list';\n\nexport const InteractionsTab = ( { elementId }: { elementId: string } ) => {\n\treturn (\n\t\t<PopupStateProvider>\n\t\t\t<InteractionsTabContent elementId={ elementId } />\n\t\t</PopupStateProvider>\n\t);\n};\n\nfunction InteractionsTabContent( { elementId }: { elementId: string } ) {\n\tconst existingInteractions = useElementInteractions( elementId ) as unknown as ElementInteractions | undefined;\n\tconst firstInteractionState = useState< boolean >( false );\n\tconst hasInteractions = existingInteractions?.items?.length || firstInteractionState[ 0 ];\n\n\treturn (\n\t\t<SessionStorageProvider prefix={ elementId }>\n\t\t\t{ hasInteractions ? (\n\t\t\t\t<InteractionsProvider elementId={ elementId }>\n\t\t\t\t\t<InteractionsContent firstInteractionState={ firstInteractionState } />\n\t\t\t\t</InteractionsProvider>\n\t\t\t) : (\n\t\t\t\t<EmptyState\n\t\t\t\t\tonCreateInteraction={ () => {\n\t\t\t\t\t\tfirstInteractionState[ 1 ]( true );\n\t\t\t\t\t} }\n\t\t\t\t/>\n\t\t\t) }\n\t\t</SessionStorageProvider>\n\t);\n}\n\nfunction InteractionsContent( {\n\tfirstInteractionState,\n}: {\n\tfirstInteractionState: [ boolean, ( value: boolean ) => void ];\n} ) {\n\tconst { interactions, setInteractions, playInteractions } = useInteractionsContext();\n\n\tconst applyInteraction = useCallback(\n\t\t( newInteractions: ElementInteractions ) => {\n\t\t\tfirstInteractionState[ 1 ]( false );\n\t\t\tif ( ! newInteractions ) {\n\t\t\t\tsetInteractions( undefined );\n\t\t\t\treturn;\n\t\t\t}\n\n\t\t\tsetInteractions( newInteractions );\n\t\t},\n\t\t[ setInteractions, firstInteractionState ]\n\t);\n\n\treturn (\n\t\t<Stack sx={ { m: 1, p: 1.5 } } gap={ 2 }>\n\t\t\t<InteractionsList\n\t\t\t\ttriggerCreateOnShowEmpty={ firstInteractionState[ 0 ] }\n\t\t\t\tinteractions={ interactions }\n\t\t\t\tonSelectInteractions={ applyInteraction }\n\t\t\t\tonPlayInteraction={ playInteractions }\n\t\t\t/>\n\t\t</Stack>\n\t);\n}\n","import * as React from 'react';\nimport { createContext, type ReactNode, useContext, useEffect } from 'react';\nimport {\n\ttype ElementInteractions,\n\tplayElementInteractions,\n\tupdateElementInteractions,\n\tuseElementInteractions,\n} from '@elementor/editor-elements';\n\ntype InteractionsContextValue = {\n\tinteractions: ElementInteractions;\n\tsetInteractions: ( value: ElementInteractions | undefined ) => void;\n\tplayInteractions: ( interactionId: string ) => void;\n};\n\nconst InteractionsContext = createContext< InteractionsContextValue | null >( null );\n\nconst DEFAULT_INTERACTIONS: ElementInteractions = {\n\tversion: 1,\n\titems: [],\n};\n\nexport const InteractionsProvider = ( { children, elementId }: { children: ReactNode; elementId: string } ) => {\n\tconst rawInteractions = useElementInteractions( elementId );\n\n\tuseEffect( () => {\n\t\twindow.dispatchEvent( new CustomEvent( 'elementor/element/update_interactions' ) );\n\t}, [] );\n\n\tconst interactions: ElementInteractions =\n\t\t( rawInteractions as unknown as ElementInteractions ) ?? DEFAULT_INTERACTIONS;\n\n\tconst setInteractions = ( value: ElementInteractions | undefined ) => {\n\t\tconst normalizedValue = value && value.items?.length === 0 ? undefined : value;\n\n\t\tupdateElementInteractions( {\n\t\t\telementId,\n\t\t\tinteractions: normalizedValue,\n\t\t} );\n\t};\n\n\tconst playInteractions = ( interactionId: string ) => {\n\t\tplayElementInteractions( elementId, interactionId );\n\t};\n\n\tconst contextValue: InteractionsContextValue = {\n\t\tinteractions,\n\t\tsetInteractions,\n\t\tplayInteractions,\n\t};\n\n\treturn <InteractionsContext.Provider value={ contextValue }>{ children }</InteractionsContext.Provider>;\n};\n\nexport const useInteractionsContext = () => {\n\tconst context = useContext( InteractionsContext );\n\tif ( ! context ) {\n\t\tthrow new Error( 'useInteractionsContext must be used within InteractionsProvider' );\n\t}\n\treturn context;\n};\n","import * as React from 'react';\nimport { createContext, useCallback, useContext, useState } from 'react';\n\ntype PopupStateContextType = {\n\topenByDefault: boolean;\n\ttriggerDefaultOpen: () => void;\n\tresetDefaultOpen: () => void;\n};\n\nconst PopupStateContext = createContext< PopupStateContextType | undefined >( undefined );\n\nexport const PopupStateProvider = ( { children }: { children: React.ReactNode } ) => {\n\tconst [ openByDefault, setOpenByDefault ] = useState( false );\n\n\tconst triggerDefaultOpen = useCallback( () => {\n\t\tsetOpenByDefault( true );\n\t}, [] );\n\n\tconst resetDefaultOpen = useCallback( () => {\n\t\tsetOpenByDefault( false );\n\t}, [] );\n\n\treturn (\n\t\t<PopupStateContext.Provider value={ { openByDefault, triggerDefaultOpen, resetDefaultOpen } }>\n\t\t\t{ children }\n\t\t</PopupStateContext.Provider>\n\t);\n};\n\nexport const usePopupStateContext = () => {\n\tconst context = useContext( PopupStateContext );\n\tif ( ! context ) {\n\t\tthrow new Error( 'usePopupStateContext must be used within PopupStateProvider' );\n\t}\n\treturn context;\n};\n","import * as React from 'react';\nimport { useCallback, useEffect, useMemo, useRef } from 'react';\nimport { Repeater } from '@elementor/editor-controls';\nimport { InfoCircleFilledIcon, PlayerPlayIcon } from '@elementor/icons';\nimport { Alert, AlertTitle, Box, IconButton, Tooltip } from '@elementor/ui';\nimport { __ } from '@wordpress/i18n';\n\nimport type { ElementInteractions, InteractionItemPropValue, InteractionItemValue } from '../types';\nimport { buildDisplayLabel, createDefaultInteractionItem, extractString } from '../utils/prop-value-utils';\nimport { InteractionDetails } from './interaction-details';\nexport const MAX_NUMBER_OF_INTERACTIONS = 5;\n\nexport type InteractionListProps = {\n\tonSelectInteractions: ( interactions: ElementInteractions ) => void;\n\tinteractions: ElementInteractions;\n\tonPlayInteraction: ( interactionId: string ) => void;\n\ttriggerCreateOnShowEmpty?: boolean;\n};\n\nexport function InteractionsList( props: InteractionListProps ) {\n\tconst { interactions, onSelectInteractions, onPlayInteraction, triggerCreateOnShowEmpty } = props;\n\n\tconst hasInitializedRef = useRef( false );\n\n\tconst handleUpdateInteractions = useCallback(\n\t\t( newInteractions: ElementInteractions ) => {\n\t\t\tonSelectInteractions( newInteractions );\n\t\t},\n\t\t[ onSelectInteractions ]\n\t);\n\n\tuseEffect( () => {\n\t\tif (\n\t\t\ttriggerCreateOnShowEmpty &&\n\t\t\t! hasInitializedRef.current &&\n\t\t\t( ! interactions.items || interactions.items?.length === 0 )\n\t\t) {\n\t\t\thasInitializedRef.current = true;\n\t\t\tconst newState: ElementInteractions = {\n\t\t\t\tversion: 1,\n\t\t\t\titems: [ createDefaultInteractionItem() ],\n\t\t\t};\n\t\t\thandleUpdateInteractions( newState );\n\t\t}\n\t}, [ triggerCreateOnShowEmpty, interactions.items, handleUpdateInteractions ] );\n\n\tconst isMaxNumberOfInteractionsReached = useMemo( () => {\n\t\treturn interactions.items?.length >= MAX_NUMBER_OF_INTERACTIONS;\n\t}, [ interactions.items?.length ] );\n\n\tconst infotipContent = isMaxNumberOfInteractionsReached ? (\n\t\t<Alert color=\"secondary\" icon={ <InfoCircleFilledIcon /> } size=\"small\">\n\t\t\t<AlertTitle>{ __( 'Interactions', 'elementor' ) }</AlertTitle>\n\t\t\t<Box component=\"span\">\n\t\t\t\t{ __(\n\t\t\t\t\t\"You've reached the limit of 5 interactions for this element. Please remove an interaction before creating a new one.\",\n\t\t\t\t\t'elementor'\n\t\t\t\t) }\n\t\t\t</Box>\n\t\t</Alert>\n\t) : undefined;\n\n\tconst handleRepeaterChange = useCallback(\n\t\t( newItems: ElementInteractions[ 'items' ] ) => {\n\t\t\thandleUpdateInteractions( {\n\t\t\t\t...interactions,\n\t\t\t\titems: newItems,\n\t\t\t} );\n\t\t},\n\t\t[ interactions, handleUpdateInteractions ]\n\t);\n\n\tconst handleInteractionChange = useCallback(\n\t\t( index: number, newInteractionValue: InteractionItemValue ) => {\n\t\t\tconst newItems = structuredClone( interactions.items );\n\t\t\tnewItems[ index ] = {\n\t\t\t\t$$type: 'interaction-item',\n\t\t\t\tvalue: newInteractionValue,\n\t\t\t};\n\t\t\thandleUpdateInteractions( {\n\t\t\t\t...interactions,\n\t\t\t\titems: newItems,\n\t\t\t} );\n\t\t},\n\t\t[ interactions, handleUpdateInteractions ]\n\t);\n\n\treturn (\n\t\t<Repeater\n\t\t\topenOnAdd\n\t\t\topenItem={ triggerCreateOnShowEmpty ? 0 : undefined }\n\t\t\tlabel={ __( 'Interactions', 'elementor' ) }\n\t\t\tvalues={ interactions.items }\n\t\t\tsetValues={ handleRepeaterChange }\n\t\t\tshowDuplicate={ false }\n\t\t\tshowToggle={ false }\n\t\t\tisSortable={ false }\n\t\t\tdisableAddItemButton={ isMaxNumberOfInteractionsReached }\n\t\t\taddButtonInfotipContent={ infotipContent }\n\t\t\titemSettings={ {\n\t\t\t\tinitialValues: createDefaultInteractionItem(),\n\t\t\t\tLabel: ( { value }: { value: InteractionItemPropValue } ) => buildDisplayLabel( value.value ),\n\t\t\t\tIcon: () => null,\n\t\t\t\tContent: ( { index, value }: { index: number; value: InteractionItemPropValue } ) => (\n\t\t\t\t\t<InteractionDetails\n\t\t\t\t\t\tkey={ index }\n\t\t\t\t\t\tinteraction={ value.value }\n\t\t\t\t\t\tonChange={ ( newInteractionValue: InteractionItemValue ) => {\n\t\t\t\t\t\t\thandleInteractionChange( index, newInteractionValue );\n\t\t\t\t\t\t} }\n\t\t\t\t\t\tonPlayInteraction={ onPlayInteraction }\n\t\t\t\t\t/>\n\t\t\t\t),\n\t\t\t\tactions: ( value: InteractionItemPropValue ) => (\n\t\t\t\t\t<Tooltip key=\"preview\" placement=\"top\" title={ __( 'Preview', 'elementor' ) }>\n\t\t\t\t\t\t<IconButton\n\t\t\t\t\t\t\taria-label={ __( 'Play interaction', 'elementor' ) }\n\t\t\t\t\t\t\tsize=\"tiny\"\n\t\t\t\t\t\t\tonClick={ () => onPlayInteraction( extractString( value.value.interaction_id ) ) }\n\t\t\t\t\t\t>\n\t\t\t\t\t\t\t<PlayerPlayIcon fontSize=\"tiny\" />\n\t\t\t\t\t\t</IconButton>\n\t\t\t\t\t</Tooltip>\n\t\t\t\t),\n\t\t\t} }\n\t\t/>\n\t);\n}\n","const TEMP_ID_PREFIX = 'temp-';\nconst TEMP_ID_REGEX = /^temp-[a-z0-9]+$/i;\n\nexport function generateTempInteractionId(): string {\n\treturn `${ TEMP_ID_PREFIX }${ Math.random().toString( 36 ).substring( 2, 11 ) }`;\n}\n\nexport function isTempId( id: string | undefined ): boolean {\n\treturn !! id && TEMP_ID_REGEX.test( id );\n}\n","import type {\n\tAnimationPresetPropValue,\n\tBooleanPropValue,\n\tConfigPropValue,\n\tElementInteractions,\n\tInteractionItemPropValue,\n\tInteractionItemValue,\n\tNumberPropValue,\n\tStringPropValue,\n\tTimingConfigPropValue,\n} from '../types';\nimport { generateTempInteractionId } from './temp-id-utils';\n\nexport const createString = ( value: string ): StringPropValue => ( {\n\t$$type: 'string',\n\tvalue,\n} );\n\nexport const createNumber = ( value: number ): NumberPropValue => ( {\n\t$$type: 'number',\n\tvalue,\n} );\n\nexport const createTimingConfig = ( duration: number, delay: number ): TimingConfigPropValue => ( {\n\t$$type: 'timing-config',\n\tvalue: {\n\t\tduration: createNumber( duration ),\n\t\tdelay: createNumber( delay ),\n\t},\n} );\n\nexport const createBoolean = ( value: boolean ): BooleanPropValue => ( {\n\t$$type: 'boolean',\n\tvalue,\n} );\n\nexport const createConfig = ( replay: boolean ): ConfigPropValue => ( {\n\t$$type: 'config',\n\tvalue: {\n\t\treplay: createBoolean( replay ),\n\t},\n} );\n\nexport const extractBoolean = ( prop: BooleanPropValue | undefined, fallback = false ): boolean => {\n\treturn prop?.value ?? fallback;\n};\n\nexport const createAnimationPreset = ( {\n\teffect,\n\ttype,\n\tdirection,\n\tduration,\n\tdelay,\n\treplay = false,\n}: {\n\teffect: string;\n\ttype: string;\n\tdirection?: string;\n\tduration: number;\n\tdelay: number;\n\treplay: boolean;\n} ): AnimationPresetPropValue => ( {\n\t$$type: 'animation-preset-props',\n\tvalue: {\n\t\teffect: createString( effect ),\n\t\ttype: createString( type ),\n\t\tdirection: createString( direction ?? '' ),\n\t\ttiming_config: createTimingConfig( duration, delay ),\n\t\tconfig: createConfig( replay ),\n\t},\n} );\n\nexport const createInteractionItem = ( {\n\ttrigger,\n\teffect,\n\ttype,\n\tdirection,\n\tduration,\n\tdelay,\n\tinteractionId,\n\treplay = false,\n}: {\n\ttrigger: string;\n\teffect: string;\n\ttype: string;\n\tdirection?: string;\n\tduration: number;\n\tdelay: number;\n\tinteractionId?: string;\n\treplay: boolean;\n} ): InteractionItemPropValue => ( {\n\t$$type: 'interaction-item',\n\tvalue: {\n\t\t...( interactionId && { interaction_id: createString( interactionId ) } ),\n\t\ttrigger: createString( trigger ),\n\t\tanimation: createAnimationPreset( { effect, type, direction, duration, delay, replay } ),\n\t},\n} );\n\nexport const createDefaultInteractionItem = (): InteractionItemPropValue => {\n\treturn createInteractionItem( {\n\t\ttrigger: 'load',\n\t\teffect: 'fade',\n\t\ttype: 'in',\n\t\tduration: 300,\n\t\tdelay: 0,\n\t\treplay: false,\n\t\tinteractionId: generateTempInteractionId(),\n\t} );\n};\n\nexport const createDefaultInteractions = (): ElementInteractions => ( {\n\tversion: 1,\n\titems: [ createDefaultInteractionItem() ],\n} );\n\nexport const extractString = ( prop: StringPropValue | undefined, fallback = '' ): string => {\n\treturn prop?.value ?? fallback;\n};\n\nexport const extractNumber = ( prop: NumberPropValue | undefined, fallback = 0 ): number => {\n\treturn prop?.value ?? fallback;\n};\n\nexport const buildAnimationIdString = ( item: InteractionItemValue ): string => {\n\tconst trigger = extractString( item.trigger );\n\tconst effect = extractString( item.animation.value.effect );\n\tconst type = extractString( item.animation.value.type );\n\tconst direction = extractString( item.animation.value.direction );\n\tconst duration = extractNumber( item.animation.value.timing_config.value.duration );\n\tconst delay = extractNumber( item.animation.value.timing_config.value.delay );\n\n\treturn [ trigger, effect, type, direction, duration, delay ].join( '-' );\n};\n\nconst TRIGGER_LABELS: Record< string, string > = {\n\tload: 'On page load',\n\tscrollIn: 'Scroll into view',\n\tscrollOut: 'Scroll out of view',\n\tscrollOn: 'While scrolling',\n};\n\nconst capitalize = ( str: string ): string => {\n\treturn str.charAt( 0 ).toUpperCase() + str.slice( 1 );\n};\n\nexport const buildDisplayLabel = ( item: InteractionItemValue ): string => {\n\tconst trigger = extractString( item.trigger );\n\tconst effect = extractString( item.animation.value.effect );\n\tconst type = extractString( item.animation.value.type );\n\n\tconst triggerLabel = TRIGGER_LABELS[ trigger ] || capitalize( trigger );\n\tconst effectLabel = capitalize( effect );\n\tconst typeLabel = capitalize( type );\n\n\treturn `${ triggerLabel }: ${ effectLabel } ${ typeLabel }`;\n};\n","import * as React from 'react';\nimport { type PropsWithChildren, useMemo } from 'react';\nimport { ControlFormLabel, PopoverContent, PopoverGridContainer } from '@elementor/editor-controls';\nimport { Divider, Grid } from '@elementor/ui';\nimport { __ } from '@wordpress/i18n';\n\nimport { getInteractionsControl } from '../interactions-controls-registry';\nimport type { InteractionItemValue } from '../types';\nimport {\n\tcreateAnimationPreset,\n\tcreateString,\n\textractBoolean,\n\textractNumber,\n\textractString,\n} from '../utils/prop-value-utils';\nimport { Direction } from './controls/direction';\nimport { Effect } from './controls/effect';\nimport { EffectType } from './controls/effect-type';\nimport { TimeFrameIndicator } from './controls/time-frame-indicator';\n\ntype InteractionDetailsProps = {\n\tinteraction: InteractionItemValue;\n\tonChange: ( interaction: InteractionItemValue ) => void;\n\tonPlayInteraction: ( interactionId: string ) => void;\n};\n\nconst DEFAULT_VALUES = {\n\ttrigger: 'load',\n\teffect: 'fade',\n\ttype: 'in',\n\tdirection: '',\n\tduration: 300,\n\tdelay: 0,\n\treplay: false,\n};\n\nconst TRIGGERS_WITH_REPLAY = [ 'scrollIn', 'scrollOut' ];\n\nexport const InteractionDetails = ( { interaction, onChange, onPlayInteraction }: InteractionDetailsProps ) => {\n\tconst trigger = extractString( interaction.trigger, DEFAULT_VALUES.trigger );\n\tconst effect = extractString( interaction.animation.value.effect, DEFAULT_VALUES.effect );\n\tconst type = extractString( interaction.animation.value.type, DEFAULT_VALUES.type );\n\tconst direction = extractString( interaction.animation.value.direction, DEFAULT_VALUES.direction );\n\tconst duration = extractNumber( interaction.animation.value.timing_config.value.duration, DEFAULT_VALUES.duration );\n\tconst delay = extractNumber( interaction.animation.value.timing_config.value.delay, DEFAULT_VALUES.delay );\n\tconst replay = extractBoolean( interaction.animation.value.config?.value.replay, DEFAULT_VALUES.replay );\n\n\tconst shouldShowReplay = TRIGGERS_WITH_REPLAY.includes( trigger );\n\n\tconst TriggerControl = useMemo( () => {\n\t\treturn getInteractionsControl( 'trigger' )?.component ?? null;\n\t}, [] );\n\n\tconst ReplayControl = useMemo( () => {\n\t\tif ( ! shouldShowReplay ) {\n\t\t\treturn null;\n\t\t}\n\t\treturn getInteractionsControl( 'replay' )?.component ?? null;\n\t}, [ shouldShowReplay ] );\n\n\tconst resolveDirection = ( hasDirection: boolean, newEffect?: string, newDirection?: string ) => {\n\t\tif ( newEffect === 'slide' && ! newDirection ) {\n\t\t\treturn 'top';\n\t\t}\n\t\t// Why? - New direction can be undefined when the effect is not slide, so if the updates object includes direction, we take it always!\n\t\tif ( hasDirection ) {\n\t\t\treturn newDirection;\n\t\t}\n\t\treturn direction;\n\t};\n\n\tconst updateInteraction = (\n\t\tupdates: Partial< {\n\t\t\ttrigger: string;\n\t\t\teffect: string;\n\t\t\ttype: string;\n\t\t\tdirection: string;\n\t\t\tduration: number;\n\t\t\tdelay: number;\n\t\t\treplay: boolean;\n\t\t} >\n\t): void => {\n\t\tconst resolvedDirectionValue = resolveDirection( 'direction' in updates, updates.effect, updates.direction );\n\t\tconst newReplay = updates.replay !== undefined ? updates.replay : replay;\n\n\t\tconst updatedInteraction = {\n\t\t\t...interaction,\n\t\t\tinteraction_id: interaction.interaction_id,\n\t\t\ttrigger: createString( updates.trigger ?? trigger ),\n\t\t\tanimation: createAnimationPreset( {\n\t\t\t\teffect: updates.effect ?? effect,\n\t\t\t\ttype: updates.type ?? type,\n\t\t\t\tdirection: resolvedDirectionValue,\n\t\t\t\tduration: updates.duration ?? duration,\n\t\t\t\tdelay: updates.delay ?? delay,\n\t\t\t\treplay: newReplay,\n\t\t\t} ),\n\t\t};\n\n\t\tonChange( updatedInteraction );\n\n\t\tconst interactionId = extractString( updatedInteraction.interaction_id );\n\n\t\tsetTimeout( () => {\n\t\t\tonPlayInteraction( interactionId );\n\t\t}, 0 );\n\t};\n\n\treturn (\n\t\t<PopoverContent p={ 1.5 }>\n\t\t\t<Grid container spacing={ 1.5 }>\n\t\t\t\t{ TriggerControl && (\n\t\t\t\t\t<Field label={ __( 'Trigger', 'elementor' ) }>\n\t\t\t\t\t\t<TriggerControl value={ trigger } onChange={ ( v ) => updateInteraction( { trigger: v } ) } />\n\t\t\t\t\t</Field>\n\t\t\t\t) }\n\n\t\t\t\t{ ReplayControl && (\n\t\t\t\t\t<Field label={ __( 'Replay', 'elementor' ) }>\n\t\t\t\t\t\t<ReplayControl\n\t\t\t\t\t\t\tvalue={ replay }\n\t\t\t\t\t\t\tonChange={ ( v ) => updateInteraction( { replay: v } ) }\n\t\t\t\t\t\t\tdisabled={ true }\n\t\t\t\t\t\t/>\n\t\t\t\t\t</Field>\n\t\t\t\t) }\n\t\t\t</Grid>\n\n\t\t\t<Divider />\n\n\t\t\t<Grid container spacing={ 1.5 }>\n\t\t\t\t<Field label={ __( 'Effect', 'elementor' ) }>\n\t\t\t\t\t<Effect value={ effect } onChange={ ( v ) => updateInteraction( { effect: v } ) } />\n\t\t\t\t</Field>\n\n\t\t\t\t<Field label={ __( 'Type', 'elementor' ) }>\n\t\t\t\t\t<EffectType value={ type } onChange={ ( v ) => updateInteraction( { type: v } ) } />\n\t\t\t\t</Field>\n\n\t\t\t\t<Field label={ __( 'Direction', 'elementor' ) }>\n\t\t\t\t\t<Direction\n\t\t\t\t\t\tvalue={ direction }\n\t\t\t\t\t\tonChange={ ( v ) => updateInteraction( { direction: v } ) }\n\t\t\t\t\t\tinteractionType={ type }\n\t\t\t\t\t/>\n\t\t\t\t</Field>\n\n\t\t\t\t<Field label={ __( 'Duration', 'elementor' ) }>\n\t\t\t\t\t<TimeFrameIndicator\n\t\t\t\t\t\tvalue={ String( duration ) }\n\t\t\t\t\t\tonChange={ ( v ) => updateInteraction( { duration: parseInt( v, 10 ) } ) }\n\t\t\t\t\t/>\n\t\t\t\t</Field>\n\n\t\t\t\t<Field label={ __( 'Delay', 'elementor' ) }>\n\t\t\t\t\t<TimeFrameIndicator\n\t\t\t\t\t\tvalue={ String( delay ) }\n\t\t\t\t\t\tonChange={ ( v ) => updateInteraction( { delay: parseInt( v, 10 ) } ) }\n\t\t\t\t\t/>\n\t\t\t\t</Field>\n\t\t\t</Grid>\n\t\t</PopoverContent>\n\t);\n};\n\ntype FieldProps = {\n\tlabel: string;\n} & PropsWithChildren;\n\nfunction Field( { label, children }: FieldProps ) {\n\treturn (\n\t\t<Grid item xs={ 12 }>\n\t\t\t<PopoverGridContainer>\n\t\t\t\t<Grid item xs={ 6 }>\n\t\t\t\t\t<ControlFormLabel>{ label }</ControlFormLabel>\n\t\t\t\t</Grid>\n\t\t\t\t<Grid item xs={ 6 }>\n\t\t\t\t\t{ children }\n\t\t\t\t</Grid>\n\t\t\t</PopoverGridContainer>\n\t\t</Grid>\n\t);\n}\n","import { type ComponentType } from 'react';\n\nimport { type DirectionFieldProps, type FieldProps, type ReplayFieldProps } from './types';\n\ntype InteractionsControlType = 'trigger' | 'effect' | 'effectType' | 'direction' | 'duration' | 'delay' | 'replay';\n\ntype InteractionsControlPropsMap = {\n\ttrigger: FieldProps;\n\teffect: FieldProps;\n\teffectType: FieldProps;\n\tdirection: DirectionFieldProps;\n\tduration: FieldProps;\n\tdelay: FieldProps;\n\treplay: ReplayFieldProps;\n};\n\ntype ControlOptions< T extends InteractionsControlType > = {\n\ttype: T;\n\tcomponent: ComponentType< InteractionsControlPropsMap[ T ] >;\n\toptions?: string[];\n};\n\ntype StoredControlOptions = {\n\ttype: InteractionsControlType;\n\tcomponent: ComponentType< FieldProps | DirectionFieldProps | ReplayFieldProps >;\n\toptions?: string[];\n};\n\nconst controlsRegistry = new Map< InteractionsControlType, StoredControlOptions >();\n\nexport function registerInteractionsControl< T extends InteractionsControlType >( {\n\ttype,\n\tcomponent,\n\toptions,\n}: ControlOptions< T > ) {\n\tcontrolsRegistry.set( type, { type, component: component as StoredControlOptions[ 'component' ], options } );\n}\n\nexport function getInteractionsControl( type: InteractionsControlType ) {\n\treturn controlsRegistry.get( type );\n}\n\nexport function getInteractionsControlOptions( type: InteractionsControlType ) {\n\treturn controlsRegistry.get( type )?.options ?? [];\n}\n","import * as React from 'react';\nimport { useMemo } from 'react';\nimport { type ToggleButtonGroupItem, ToggleButtonGroupUi } from '@elementor/editor-controls';\nimport { ArrowDownSmallIcon, ArrowLeftIcon, ArrowRightIcon, ArrowUpSmallIcon } from '@elementor/icons';\nimport { __ } from '@wordpress/i18n';\n\nimport { type DirectionFieldProps } from '../../types';\n\ntype Direction = 'top' | 'bottom' | 'left' | 'right';\n\nexport function Direction( { value, onChange, interactionType }: DirectionFieldProps ) {\n\tconst options: ToggleButtonGroupItem< Direction >[] = useMemo( () => {\n\t\tconst isIn = interactionType === 'in';\n\n\t\treturn [\n\t\t\t{\n\t\t\t\tvalue: 'top',\n\t\t\t\tlabel: isIn ? __( 'From top', 'elementor' ) : __( 'To top', 'elementor' ),\n\t\t\t\trenderContent: ( { size } ) =>\n\t\t\t\t\tisIn ? <ArrowDownSmallIcon fontSize={ size } /> : <ArrowUpSmallIcon fontSize={ size } />,\n\t\t\t\tshowTooltip: true,\n\t\t\t},\n\t\t\t{\n\t\t\t\tvalue: 'bottom',\n\t\t\t\tlabel: interactionType === 'in' ? __( 'From bottom', 'elementor' ) : __( 'To bottom', 'elementor' ),\n\t\t\t\trenderContent: ( { size } ) =>\n\t\t\t\t\tisIn ? <ArrowUpSmallIcon fontSize={ size } /> : <ArrowDownSmallIcon fontSize={ size } />,\n\t\t\t\tshowTooltip: true,\n\t\t\t},\n\t\t\t{\n\t\t\t\tvalue: 'left',\n\t\t\t\tlabel: interactionType === 'in' ? __( 'From left', 'elementor' ) : __( 'To left', 'elementor' ),\n\t\t\t\trenderContent: ( { size } ) =>\n\t\t\t\t\tisIn ? <ArrowRightIcon fontSize={ size } /> : <ArrowLeftIcon fontSize={ size } />,\n\t\t\t\tshowTooltip: true,\n\t\t\t},\n\t\t\t{\n\t\t\t\tvalue: 'right',\n\t\t\t\tlabel: interactionType === 'in' ? __( 'From right', 'elementor' ) : __( 'To right', 'elementor' ),\n\t\t\t\trenderContent: ( { size } ) =>\n\t\t\t\t\tisIn ? <ArrowLeftIcon fontSize={ size } /> : <ArrowRightIcon fontSize={ size } />,\n\t\t\t\tshowTooltip: true,\n\t\t\t},\n\t\t];\n\t}, [ interactionType ] );\n\n\treturn <ToggleButtonGroupUi items={ options } exclusive onChange={ onChange } value={ value } />;\n}\n","import * as React from 'react';\nimport { MenuListItem } from '@elementor/editor-ui';\nimport { Select, type SelectChangeEvent } from '@elementor/ui';\nimport { __ } from '@wordpress/i18n';\n\nimport { type FieldProps } from '../../types';\n\nexport function Effect( { value, onChange }: FieldProps ) {\n\tconst availableEffects = [\n\t\t{ key: 'fade', label: __( 'Fade', 'elementor' ) },\n\t\t{ key: 'slide', label: __( 'Slide', 'elementor' ) },\n\t\t{ key: 'scale', label: __( 'Scale', 'elementor' ) },\n\t];\n\n\treturn (\n\t\t<Select\n\t\t\tfullWidth\n\t\t\tdisplayEmpty\n\t\t\tsize=\"tiny\"\n\t\t\tvalue={ value }\n\t\t\tonChange={ ( event: SelectChangeEvent< string > ) => onChange( event.target.value ) }\n\t\t>\n\t\t\t{ availableEffects.map( ( effect ) => {\n\t\t\t\treturn (\n\t\t\t\t\t<MenuListItem key={ effect.key } value={ effect.key }>\n\t\t\t\t\t\t{ effect.label }\n\t\t\t\t\t</MenuListItem>\n\t\t\t\t);\n\t\t\t} ) }\n\t\t</Select>\n\t);\n}\n","import * as React from 'react';\nimport { type ToggleButtonGroupItem, ToggleButtonGroupUi } from '@elementor/editor-controls';\nimport { __ } from '@wordpress/i18n';\n\nimport { type FieldProps } from '../../types';\n\ntype EffectType = 'in' | 'out';\n\nexport function EffectType( { value, onChange }: FieldProps ) {\n\tconst options: ToggleButtonGroupItem< EffectType >[] = [\n\t\t{\n\t\t\tvalue: 'in',\n\t\t\tlabel: __( 'In', 'elementor' ),\n\t\t\trenderContent: () => __( 'In', 'elementor' ),\n\t\t\tshowTooltip: true,\n\t\t},\n\t\t{\n\t\t\tvalue: 'out',\n\t\t\tlabel: __( 'Out', 'elementor' ),\n\t\t\trenderContent: () => __( 'Out', 'elementor' ),\n\t\t\tshowTooltip: true,\n\t\t},\n\t];\n\n\treturn <ToggleButtonGroupUi items={ options } exclusive onChange={ onChange } value={ value } />;\n}\n","import * as React from 'react';\nimport { MenuListItem } from '@elementor/editor-ui';\nimport { Select, type SelectChangeEvent } from '@elementor/ui';\nimport { __ } from '@wordpress/i18n';\n\nimport { type FieldProps } from '../../types';\n\nexport function TimeFrameIndicator( { value, onChange }: FieldProps ) {\n\tconst availableTimeFrames = [ '0', '100', '200', '300', '400', '500', '750', '1000', '1250', '1500' ].map(\n\t\t( key ) => ( {\n\t\t\tkey,\n\t\t\t// translators: %s: time in milliseconds\n\t\t\tlabel: __( '%s MS', 'elementor' ).replace( '%s', key ),\n\t\t} )\n\t);\n\n\treturn (\n\t\t<Select\n\t\t\tfullWidth\n\t\t\tdisplayEmpty\n\t\t\tsize=\"tiny\"\n\t\t\tvalue={ value }\n\t\t\tonChange={ ( event: SelectChangeEvent< string > ) => onChange( event.target.value ) }\n\t\t>\n\t\t\t{ availableTimeFrames.map( ( timeFrame ) => {\n\t\t\t\treturn (\n\t\t\t\t\t<MenuListItem key={ timeFrame.key } value={ timeFrame.key }>\n\t\t\t\t\t\t{ timeFrame.label }\n\t\t\t\t\t</MenuListItem>\n\t\t\t\t);\n\t\t\t} ) }\n\t\t</Select>\n\t);\n}\n","import { type InteractionsConfig } from '../types';\n\nconst DEFAULT_CONFIG: InteractionsConfig = {\n\tconstants: {\n\t\tdefaultDuration: 300,\n\t\tdefaultDelay: 0,\n\t\tslideDistance: 100,\n\t\tscaleStart: 0.5,\n\t\teasing: 'linear',\n\t},\n\tanimationOptions: [],\n};\n\nexport function getInteractionsConfig(): InteractionsConfig {\n\treturn window.ElementorInteractionsConfig || DEFAULT_CONFIG;\n}\n","import { type InteractionsProvider } from '../types';\n\nexport const createInteractionsRepository = () => {\n\tconst providers: InteractionsProvider[] = [];\n\n\tconst getProviders = () => {\n\t\tconst sorted = providers.slice( 0 ).sort( ( a, b ) => ( a.priority > b.priority ? -1 : 1 ) );\n\t\treturn sorted;\n\t};\n\n\tconst register = ( provider: InteractionsProvider ) => {\n\t\tproviders.push( provider );\n\t};\n\n\tconst all = () => {\n\t\treturn getProviders().flatMap( ( provider ) => provider.actions.all() );\n\t};\n\n\tconst subscribe = ( cb: () => void ) => {\n\t\tconst unsubscribes = providers.map( ( provider ) => provider.subscribe( cb ) );\n\n\t\treturn () => {\n\t\t\tunsubscribes.forEach( ( unsubscribe ) => unsubscribe() );\n\t\t};\n\t};\n\n\tconst getProviderByKey = ( key: string ) => {\n\t\treturn providers.find( ( provider ) => {\n\t\t\ttry {\n\t\t\t\treturn provider.getKey() === key;\n\t\t\t} catch {\n\t\t\t\t// Provider might not be ready yet (e.g., no document loaded)\n\t\t\t\treturn false;\n\t\t\t}\n\t\t} );\n\t};\n\n\treturn {\n\t\tall,\n\t\tregister,\n\t\tsubscribe,\n\t\tgetProviders,\n\t\tgetProviderByKey,\n\t};\n};\n","import { createInteractionsRepository } from './utils/create-interactions-repository';\n\nexport const interactionsRepository = createInteractionsRepository();\n","import { type InteractionsProvider } from '../types';\n\nexport type CreateInteractionsProviderOptions = {\n\tkey: string | ( () => string );\n\tpriority?: number;\n\tsubscribe?: ( callback: () => void ) => () => void;\n\tactions: {\n\t\tall: InteractionsProvider[ 'actions' ][ 'all' ];\n\t};\n};\n\nconst DEFAULT_PRIORITY = 10;\n\nexport function createInteractionsProvider( {\n\tkey,\n\tpriority = DEFAULT_PRIORITY,\n\tsubscribe = () => () => {},\n\tactions,\n}: CreateInteractionsProviderOptions ): InteractionsProvider {\n\treturn {\n\t\tgetKey: typeof key === 'string' ? () => key : key,\n\t\tpriority,\n\t\tsubscribe,\n\t\tactions: {\n\t\t\tall: actions.all,\n\t\t},\n\t};\n}\n","import { getCurrentDocumentId, getElementInteractions, getElements } from '@elementor/editor-elements';\nimport { __privateListenTo as listenTo, windowEvent } from '@elementor/editor-v1-adapters';\n\nimport { createInteractionsProvider } from '../utils/create-interactions-provider';\n\nexport const ELEMENTS_INTERACTIONS_PROVIDER_KEY_PREFIX = 'document-elements-interactions-';\n\nexport const documentElementsInteractionsProvider = createInteractionsProvider( {\n\tkey: () => {\n\t\tconst documentId = getCurrentDocumentId();\n\n\t\tif ( ! documentId ) {\n\t\t\tconst pendingKey = `${ ELEMENTS_INTERACTIONS_PROVIDER_KEY_PREFIX }pending`;\n\t\t\treturn pendingKey;\n\t\t}\n\n\t\tconst key = `${ ELEMENTS_INTERACTIONS_PROVIDER_KEY_PREFIX }${ documentId }`;\n\t\treturn key;\n\t},\n\tpriority: 50,\n\tsubscribe: ( cb ) => {\n\t\treturn listenTo( [ windowEvent( 'elementor/element/update_interactions' ) ], () => cb() );\n\t},\n\tactions: {\n\t\tall: () => {\n\t\t\tconst elements = getElements();\n\n\t\t\tconst filtered = elements.filter( ( element ) => {\n\t\t\t\tconst interactions = getElementInteractions( element.id );\n\t\t\t\tif ( ! interactions ) {\n\t\t\t\t\treturn false;\n\t\t\t\t}\n\t\t\t\treturn interactions?.items?.length > 0;\n\t\t\t} );\n\n\t\t\treturn filtered.map( ( element ) => {\n\t\t\t\tconst interactions = getElementInteractions( element.id );\n\t\t\t\treturn {\n\t\t\t\t\telementId: element.id,\n\t\t\t\t\tdataId: element.id,\n\t\t\t\t\tinteractions: interactions || { version: 1, items: [] },\n\t\t\t\t};\n\t\t\t} );\n\t\t},\n\t},\n} );\n","import * as React from 'react';\nimport { MenuListItem } from '@elementor/editor-ui';\nimport { Select, type SelectChangeEvent } from '@elementor/ui';\nimport { __ } from '@wordpress/i18n';\n\nimport { type FieldProps } from '../../types';\n\nexport function Trigger( { value, onChange }: FieldProps ) {\n\tconst availableTriggers = Object.entries( {\n\t\tload: __( 'Page load', 'elementor' ),\n\t\tscrollIn: __( 'Scroll into view', 'elementor' ),\n\t} ).map( ( [ key, label ] ) => ( {\n\t\tkey,\n\t\tlabel,\n\t} ) );\n\n\treturn (\n\t\t<Select\n\t\t\tfullWidth\n\t\t\tdisplayEmpty\n\t\t\tsize=\"tiny\"\n\t\t\tonChange={ ( event: SelectChangeEvent< string > ) => onChange( event.target.value ) }\n\t\t\tvalue={ value }\n\t\t>\n\t\t\t{ availableTriggers.map( ( trigger ) => {\n\t\t\t\treturn (\n\t\t\t\t\t<MenuListItem key={ trigger.key } value={ trigger.key }>\n\t\t\t\t\t\t{ trigger.label }\n\t\t\t\t\t</MenuListItem>\n\t\t\t\t);\n\t\t\t} ) }\n\t\t</Select>\n\t);\n}\n","import { type ElementID, getAllDescendants, getContainer, type V1Element } from '@elementor/editor-elements';\nimport { registerDataHook } from '@elementor/editor-v1-adapters';\n\nimport type { ElementInteractions } from '../types';\nimport { createString } from '../utils/prop-value-utils';\nimport { generateTempInteractionId } from '../utils/temp-id-utils';\n\nexport function initCleanInteractionIdsOnDuplicate() {\n\tregisterDataHook( 'after', 'document/elements/duplicate', ( _args, result: V1Element | V1Element[] ) => {\n\t\tconst containers = Array.isArray( result ) ? result : [ result ];\n\n\t\tcontainers.forEach( ( container ) => {\n\t\t\tcleanInteractionIdsRecursive( container.id );\n\t\t} );\n\t} );\n}\n\nfunction cleanInteractionIdsRecursive( elementId: ElementID ) {\n\tconst container = getContainer( elementId );\n\n\tif ( ! container ) {\n\t\treturn;\n\t}\n\n\tgetAllDescendants( container ).forEach( ( element: V1Element ) => {\n\t\tcleanInteractionIds( element.id as ElementID );\n\t} );\n}\n\nfunction cleanInteractionIds( elementId: ElementID ) {\n\tconst container = getContainer( elementId );\n\n\tif ( ! container ) {\n\t\treturn;\n\t}\n\n\tconst interactions = container.model.get( 'interactions' ) as ElementInteractions;\n\n\tif ( ! interactions || ! interactions.items ) {\n\t\treturn;\n\t}\n\n\tconst updatedInteractions = structuredClone( interactions ) as ElementInteractions;\n\n\tupdatedInteractions?.items?.forEach( ( interaction ) => {\n\t\tif ( interaction.$$type === 'interaction-item' && interaction.value ) {\n\t\t\tinteraction.value.interaction_id = createString( generateTempInteractionId() );\n\t\t}\n\t} );\n\n\tcontainer.model.set( 'interactions', updatedInteractions );\n}\n","import { Trigger } from './components/controls/trigger';\nimport { initCleanInteractionIdsOnDuplicate } from './hooks/on-duplicate';\nimport { registerInteractionsControl } from './interactions-controls-registry';\nimport { interactionsRepository } from './interactions-repository';\nimport { documentElementsInteractionsProvider } from './providers/document-elements-interactions-provider';\n\nexport function init() {\n\ttry {\n\t\tinteractionsRepository.register( documentElementsInteractionsProvider );\n\t\tinitCleanInteractionIdsOnDuplicate();\n\t\tregisterInteractionsControl( {\n\t\t\ttype: 'trigger',\n\t\t\tcomponent: Trigger,\n\t\t\toptions: [ 'load', 'scrollIn' ],\n\t\t} );\n\t} catch ( error ) {\n\t\tthrow error;\n\t}\n}\n"],"mappings":";AAAA,YAAY,WAAW;AACvB,SAAS,iBAAiB;AAC1B,SAAS,QAAQ,OAAO,kBAAkB;AAC1C,SAAS,UAAU;AAEZ,IAAM,aAAa,CAAE,EAAE,oBAAoB,MAA4C;AAC7F,SACC;AAAA,IAAC;AAAA;AAAA,MACA,YAAW;AAAA,MACX,gBAAe;AAAA,MACf,QAAO;AAAA,MACP,OAAM;AAAA,MACN,IAAK,EAAE,GAAG,KAAK,IAAI,GAAG,IAAI,IAAI;AAAA,MAC9B,KAAM;AAAA;AAAA,IAEN,oCAAC,aAAU,UAAS,SAAQ;AAAA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AM,iBAAiB,aAAc,0BAA0B,CAAE;AAAA,IAC9E;AAAA,EACD,CAAE;AAEF,YAAU,MAAM,IAAK,gBAAgB,mBAAoB;AAC1D;;;AC7CO,SAAS,OAAO;AACtB,MAAI;AACH,2BAAuB,SAAU,oCAAqC;AACtE,uCAAmC;AACnC,gCAA6B;AAAA,MAC5B,MAAM;AAAA,MACN,WAAW;AAAA,MACX,SAAS,CAAE,QAAQ,UAAW;AAAA,IAC/B,CAAE;AAAA,EACH,SAAU,OAAQ;AACjB,UAAM;AAAA,EACP;AACD;","names":["React","useCallback","useState","useElementInteractions","Stack","React","React","createContext","useContext","React","useCallback","useEffect","useMemo","__","React","useMemo","__","React","__","React","__","React","ToggleButtonGroupUi","__","React","MenuListItem","Select","__","useMemo","__","useCallback","useEffect","useMemo","__","useElementInteractions","useState","useCallback","Stack","React","MenuListItem","Select","__"]}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@elementor/editor-interactions",
3
- "version": "3.35.0-471",
3
+ "version": "3.35.0-473",
4
4
  "private": false,
5
5
  "author": "Elementor Team",
6
6
  "homepage": "https://elementor.com/",
@@ -39,13 +39,13 @@
39
39
  "dev": "tsup --config=../../tsup.dev.ts"
40
40
  },
41
41
  "dependencies": {
42
- "@elementor/editor-controls": "3.35.0-471",
43
- "@elementor/editor-elements": "3.35.0-471",
44
- "@elementor/editor-ui": "3.35.0-471",
42
+ "@elementor/editor-controls": "3.35.0-473",
43
+ "@elementor/editor-elements": "3.35.0-473",
44
+ "@elementor/editor-ui": "3.35.0-473",
45
45
  "@elementor/icons": "^1.63.0",
46
- "@elementor/editor-v1-adapters": "3.35.0-471",
47
- "@elementor/utils": "3.35.0-471",
48
- "@elementor/session": "3.35.0-471",
46
+ "@elementor/editor-v1-adapters": "3.35.0-473",
47
+ "@elementor/utils": "3.35.0-473",
48
+ "@elementor/session": "3.35.0-473",
49
49
  "@elementor/ui": "1.36.17",
50
50
  "@wordpress/i18n": "^5.13.0"
51
51
  },
@@ -1,13 +1,7 @@
1
1
  import * as React from 'react';
2
2
  import { useMemo } from 'react';
3
- import {
4
- ControlFormLabel,
5
- PopoverGridContainer,
6
- type ToggleButtonGroupItem,
7
- ToggleButtonGroupUi,
8
- } from '@elementor/editor-controls';
3
+ import { type ToggleButtonGroupItem, ToggleButtonGroupUi } from '@elementor/editor-controls';
9
4
  import { ArrowDownSmallIcon, ArrowLeftIcon, ArrowRightIcon, ArrowUpSmallIcon } from '@elementor/icons';
10
- import { Grid } from '@elementor/ui';
11
5
  import { __ } from '@wordpress/i18n';
12
6
 
13
7
  import { type DirectionFieldProps } from '../../types';
@@ -50,16 +44,5 @@ export function Direction( { value, onChange, interactionType }: DirectionFieldP
50
44
  ];
51
45
  }, [ interactionType ] );
52
46
 
53
- return (
54
- <Grid item xs={ 12 }>
55
- <PopoverGridContainer>
56
- <Grid item xs={ 6 }>
57
- <ControlFormLabel> { __( 'Direction', 'elementor' ) }</ControlFormLabel>
58
- </Grid>
59
- <Grid item xs={ 6 }>
60
- <ToggleButtonGroupUi items={ options } exclusive onChange={ onChange } value={ value } />
61
- </Grid>
62
- </PopoverGridContainer>
63
- </Grid>
64
- );
47
+ return <ToggleButtonGroupUi items={ options } exclusive onChange={ onChange } value={ value } />;
65
48
  }
@@ -1,16 +1,11 @@
1
1
  import * as React from 'react';
2
- import {
3
- ControlFormLabel,
4
- PopoverGridContainer,
5
- type ToggleButtonGroupItem,
6
- ToggleButtonGroupUi,
7
- } from '@elementor/editor-controls';
8
- import { Grid } from '@elementor/ui';
2
+ import { type ToggleButtonGroupItem, ToggleButtonGroupUi } from '@elementor/editor-controls';
9
3
  import { __ } from '@wordpress/i18n';
10
4
 
11
5
  import { type FieldProps } from '../../types';
12
6
 
13
7
  type EffectType = 'in' | 'out';
8
+
14
9
  export function EffectType( { value, onChange }: FieldProps ) {
15
10
  const options: ToggleButtonGroupItem< EffectType >[] = [
16
11
  {
@@ -27,18 +22,5 @@ export function EffectType( { value, onChange }: FieldProps ) {
27
22
  },
28
23
  ];
29
24
 
30
- return (
31
- <>
32
- <Grid item xs={ 12 }>
33
- <PopoverGridContainer>
34
- <Grid item xs={ 6 }>
35
- <ControlFormLabel>{ __( 'Type', 'elementor' ) }</ControlFormLabel>
36
- </Grid>
37
- <Grid item xs={ 6 }>
38
- <ToggleButtonGroupUi items={ options } exclusive onChange={ onChange } value={ value } />
39
- </Grid>
40
- </PopoverGridContainer>
41
- </Grid>
42
- </>
43
- );
25
+ return <ToggleButtonGroupUi items={ options } exclusive onChange={ onChange } value={ value } />;
44
26
  }