@elementor/editor-interactions 4.1.0 → 4.2.0-840

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
@@ -1862,10 +1862,14 @@ import { getAllDescendants, getContainer as getContainer2 } from "@elementor/edi
1862
1862
  import { registerDataHook } from "@elementor/editor-v1-adapters";
1863
1863
  function initCleanInteractionIdsOnDuplicate() {
1864
1864
  registerDataHook("after", "document/elements/duplicate", (_args, result) => {
1865
+ if (!result || typeof result === "boolean" && result === false) {
1866
+ return;
1867
+ }
1865
1868
  const containers = Array.isArray(result) ? result : [result];
1866
1869
  containers.forEach((container) => {
1867
1870
  cleanInteractionIdsRecursive(container.id);
1868
1871
  });
1872
+ window.dispatchEvent(new CustomEvent("elementor/element/update_interactions"));
1869
1873
  });
1870
1874
  }
1871
1875
  function cleanInteractionIdsRecursive(elementId) {
@@ -1909,7 +1913,7 @@ var baseSchema = {
1909
1913
  ),
1910
1914
  duration: z.number().min(0).max(1e4).optional().describe("Animation duration in milliseconds"),
1911
1915
  delay: z.number().min(0).max(1e4).optional().describe("Animation delay in milliseconds"),
1912
- easing: z.string().optional().describe("Easing function. See interactions schema for options."),
1916
+ easing: z.enum(["easeIn"]).optional().describe('Easing function for the animation. Use "easeIn" for free tier.'),
1913
1917
  excludedBreakpoints: z.array(z.string()).optional().describe(
1914
1918
  'Breakpoint IDs on which this interaction is disabled (e.g. ["mobile", "tablet"]). Omit to enable on all breakpoints.'
1915
1919
  )
@@ -1917,6 +1921,7 @@ var baseSchema = {
1917
1921
  var proSchema = {
1918
1922
  trigger: z.enum(["load", "scrollIn", "scrollOut", "scrollOn", "hover", "click"]).optional().describe("Event that triggers the animation"),
1919
1923
  effect: z.enum(["fade", "slide", "scale", "custom"]).optional().describe("Animation effect type"),
1924
+ easing: z.enum(["easeIn", "easeInOut", "easeOut", "backIn", "backInOut", "backOut", "linear"]).optional().describe("Easing function for the animation."),
1920
1925
  customEffects: z.object({
1921
1926
  keyframes: z.array(
1922
1927
  z.object({