@elementor/editor-controls 3.35.0-349 → 3.35.0-350

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
@@ -948,8 +948,7 @@ var SizeControl = createControl(
948
948
  min = 0,
949
949
  enablePropTypeUnits = false,
950
950
  id,
951
- ariaLabel,
952
- isRepeaterControl = false
951
+ ariaLabel
953
952
  }) => {
954
953
  const {
955
954
  value: sizeValue,
@@ -1007,38 +1006,13 @@ var SizeControl = createControl(
1007
1006
  popupState.open(anchorRef?.current);
1008
1007
  }
1009
1008
  };
1010
- const handleLinkedSizeControlChanges = () => {
1011
- const newState = createStateFromSizeProp(
1012
- sizeValue,
1013
- state.unit === "custom" ? state.unit : actualDefaultUnit,
1014
- "",
1015
- state.custom
1016
- );
1017
- const currentUnitType = isUnitExtendedOption(state.unit) ? "custom" : "numeric";
1018
- const mergedStates = {
1019
- ...state,
1020
- unit: newState.unit ?? state.unit,
1021
- [currentUnitType]: newState[currentUnitType]
1022
- };
1023
- if (mergedStates.unit !== "auto" && areStatesEqual(state, mergedStates)) {
1024
- return;
1025
- }
1026
- if (state.unit === newState.unit) {
1027
- setState(mergedStates);
1028
- return;
1029
- }
1030
- setState(newState);
1031
- };
1032
- useEffect3(() => {
1033
- if (!isRepeaterControl) {
1034
- handleLinkedSizeControlChanges();
1009
+ const maybeClosePopup = React18.useCallback(() => {
1010
+ if (popupState && popupState.isOpen) {
1011
+ popupState.close();
1035
1012
  }
1036
- }, [sizeValue]);
1013
+ }, [popupState]);
1037
1014
  useEffect3(() => {
1038
- const newState = createStateFromSizeProp(sizeValue, actualDefaultUnit, "", state.custom);
1039
- if (activeBreakpoint && !areStatesEqual(newState, state)) {
1040
- setState(newState);
1041
- }
1015
+ maybeClosePopup();
1042
1016
  }, [activeBreakpoint]);
1043
1017
  return /* @__PURE__ */ React18.createElement(React18.Fragment, null, /* @__PURE__ */ React18.createElement(
1044
1018
  SizeInput,
@@ -1115,15 +1089,6 @@ function extractValueFromState(state, allowEmpty = false) {
1115
1089
  unit
1116
1090
  };
1117
1091
  }
1118
- function areStatesEqual(state1, state2) {
1119
- if (state1.unit !== state2.unit || state1.custom !== state2.custom) {
1120
- return false;
1121
- }
1122
- if (isUnitExtendedOption(state1.unit)) {
1123
- return state1.custom === state2.custom;
1124
- }
1125
- return state1.numeric === state2.numeric || isNaN(state1.numeric) && isNaN(state2.numeric);
1126
- }
1127
1092
 
1128
1093
  // src/controls/stroke-control.tsx
1129
1094
  import * as React21 from "react";
@@ -2727,24 +2692,15 @@ var MultiSizeValueControl = ({ item, rowRef }) => {
2727
2692
 
2728
2693
  // src/controls/linked-dimensions-control.tsx
2729
2694
  import * as React57 from "react";
2730
- import { useRef as useRef9 } from "react";
2695
+ import { useLayoutEffect, useRef as useRef9, useState as useState8 } from "react";
2731
2696
  import { dimensionsPropTypeUtil, sizePropTypeUtil as sizePropTypeUtil4 } from "@elementor/editor-props";
2697
+ import { useActiveBreakpoint as useActiveBreakpoint2 } from "@elementor/editor-responsive";
2732
2698
  import { DetachIcon, LinkIcon, SideBottomIcon, SideLeftIcon, SideRightIcon, SideTopIcon } from "@elementor/icons";
2733
2699
  import { Grid as Grid9, Stack as Stack8, Tooltip as Tooltip6 } from "@elementor/ui";
2734
2700
  import { __ as __18 } from "@wordpress/i18n";
2735
- var LinkedDimensionsControl = ({
2736
- label,
2737
- isSiteRtl = false,
2738
- extendedOptions,
2739
- min
2740
- }) => {
2741
- const {
2742
- value: sizeValue,
2743
- setValue: setSizeValue,
2744
- disabled: sizeDisabled,
2745
- placeholder: sizePlaceholder
2746
- } = useBoundProp(sizePropTypeUtil4);
2701
+ var LinkedDimensionsControl = ({ label, isSiteRtl = false, extendedOptions, min }) => {
2747
2702
  const gridRowRefs = [useRef9(null), useRef9(null)];
2703
+ const { disabled: sizeDisabled, placeholder: sizePlaceholder } = useBoundProp(sizePropTypeUtil4);
2748
2704
  const {
2749
2705
  value: dimensionsValue,
2750
2706
  setValue: setDimensionsValue,
@@ -2752,62 +2708,83 @@ var LinkedDimensionsControl = ({
2752
2708
  placeholder: dimensionsPlaceholder,
2753
2709
  disabled: dimensionsDisabled
2754
2710
  } = useBoundProp(dimensionsPropTypeUtil);
2755
- const hasUserValues = !!(dimensionsValue || sizeValue);
2711
+ const { value: masterValue, placeholder: masterPlaceholder, setValue: setMasterValue } = useBoundProp();
2756
2712
  const hasPlaceholders = !!(sizePlaceholder || dimensionsPlaceholder);
2757
- const isLinked = !hasUserValues && !hasPlaceholders || (hasPlaceholders ? !!sizePlaceholder : !!sizeValue);
2713
+ const inferIsLinked = () => {
2714
+ if (dimensionsPropTypeUtil.isValid(masterValue)) {
2715
+ return false;
2716
+ }
2717
+ if (dimensionsPropTypeUtil.isValid(masterPlaceholder)) {
2718
+ return false;
2719
+ }
2720
+ return true;
2721
+ };
2722
+ const [isLinked, setIsLinked] = useState8(() => inferIsLinked());
2723
+ const activeBreakpoint = useActiveBreakpoint2();
2724
+ useLayoutEffect(() => {
2725
+ setIsLinked(inferIsLinked);
2726
+ }, [activeBreakpoint]);
2758
2727
  const onLinkToggle = () => {
2759
- if (!isLinked) {
2760
- setSizeValue(dimensionsValue["block-start"]?.value ?? null);
2728
+ setIsLinked((prev) => !prev);
2729
+ if (!dimensionsPropTypeUtil.isValid(masterValue)) {
2730
+ const value = masterValue ? masterValue : null;
2731
+ if (!value) {
2732
+ setMasterValue(null);
2733
+ return;
2734
+ }
2735
+ setMasterValue(
2736
+ dimensionsPropTypeUtil.create({
2737
+ "block-start": value,
2738
+ "block-end": value,
2739
+ "inline-start": value,
2740
+ "inline-end": value
2741
+ })
2742
+ );
2761
2743
  return;
2762
2744
  }
2763
- const value = sizeValue ? sizePropTypeUtil4.create(sizeValue) : null;
2764
- setDimensionsValue({
2765
- "block-start": value,
2766
- "block-end": value,
2767
- "inline-start": value,
2768
- "inline-end": value
2769
- });
2745
+ const sizeValue = dimensionsValue?.["block-start"] ?? dimensionsValue?.["inline-end"] ?? dimensionsValue?.["block-end"] ?? dimensionsValue?.["inline-start"] ?? null;
2746
+ if (!sizeValue) {
2747
+ setMasterValue(null);
2748
+ return;
2749
+ }
2750
+ setMasterValue(sizeValue);
2770
2751
  };
2771
2752
  const tooltipLabel = label.toLowerCase();
2772
2753
  const LinkedIcon = isLinked ? LinkIcon : DetachIcon;
2773
2754
  const linkedLabel = __18("Link %s", "elementor").replace("%s", tooltipLabel);
2774
2755
  const unlinkedLabel = __18("Unlink %s", "elementor").replace("%s", tooltipLabel);
2775
2756
  const disabled = sizeDisabled || dimensionsDisabled;
2776
- return /* @__PURE__ */ React57.createElement(
2777
- PropProvider,
2757
+ const propProviderProps = {
2758
+ propType,
2759
+ value: dimensionsValue,
2760
+ placeholder: dimensionsPlaceholder,
2761
+ setValue: setDimensionsValue,
2762
+ isDisabled: () => dimensionsDisabled
2763
+ };
2764
+ return /* @__PURE__ */ React57.createElement(PropProvider, { ...propProviderProps }, /* @__PURE__ */ React57.createElement(Stack8, { direction: "row", gap: 2, flexWrap: "nowrap" }, /* @__PURE__ */ React57.createElement(ControlFormLabel, null, label), /* @__PURE__ */ React57.createElement(Tooltip6, { title: isLinked ? unlinkedLabel : linkedLabel, placement: "top" }, /* @__PURE__ */ React57.createElement(
2765
+ StyledToggleButton,
2778
2766
  {
2779
- propType,
2780
- value: dimensionsValue,
2781
- setValue: setDimensionsValue,
2782
- placeholder: dimensionsPlaceholder,
2783
- isDisabled: () => disabled
2767
+ "aria-label": isLinked ? unlinkedLabel : linkedLabel,
2768
+ size: "tiny",
2769
+ value: "check",
2770
+ selected: isLinked,
2771
+ sx: { marginLeft: "auto" },
2772
+ onChange: onLinkToggle,
2773
+ disabled,
2774
+ isPlaceholder: hasPlaceholders
2784
2775
  },
2785
- /* @__PURE__ */ React57.createElement(Stack8, { direction: "row", gap: 2, flexWrap: "nowrap" }, /* @__PURE__ */ React57.createElement(ControlFormLabel, null, label), /* @__PURE__ */ React57.createElement(Tooltip6, { title: isLinked ? unlinkedLabel : linkedLabel, placement: "top" }, /* @__PURE__ */ React57.createElement(
2786
- StyledToggleButton,
2787
- {
2788
- "aria-label": isLinked ? unlinkedLabel : linkedLabel,
2789
- size: "tiny",
2790
- value: "check",
2791
- selected: isLinked,
2792
- sx: { marginLeft: "auto" },
2793
- onChange: onLinkToggle,
2794
- disabled,
2795
- isPlaceholder: hasPlaceholders
2796
- },
2797
- /* @__PURE__ */ React57.createElement(LinkedIcon, { fontSize: "tiny" })
2798
- ))),
2799
- getCssDimensionProps(isSiteRtl).map((row, index) => /* @__PURE__ */ React57.createElement(Stack8, { direction: "row", gap: 2, flexWrap: "nowrap", key: index, ref: gridRowRefs[index] }, row.map(({ icon, ...props }) => /* @__PURE__ */ React57.createElement(Grid9, { container: true, gap: 0.75, alignItems: "center", key: props.bind }, /* @__PURE__ */ React57.createElement(Grid9, { item: true, xs: 12 }, /* @__PURE__ */ React57.createElement(Label, { ...props })), /* @__PURE__ */ React57.createElement(Grid9, { item: true, xs: 12 }, /* @__PURE__ */ React57.createElement(
2800
- Control3,
2801
- {
2802
- bind: props.bind,
2803
- startIcon: icon,
2804
- isLinked,
2805
- extendedOptions,
2806
- anchorRef: gridRowRefs[index],
2807
- min
2808
- }
2809
- ))))))
2810
- );
2776
+ /* @__PURE__ */ React57.createElement(LinkedIcon, { fontSize: "tiny" })
2777
+ ))), getCssDimensionProps(isSiteRtl).map((row, index) => /* @__PURE__ */ React57.createElement(Stack8, { direction: "row", gap: 2, flexWrap: "nowrap", key: index, ref: gridRowRefs[index] }, row.map(({ icon, ...props }) => /* @__PURE__ */ React57.createElement(Grid9, { container: true, gap: 0.75, alignItems: "center", key: props.bind }, /* @__PURE__ */ React57.createElement(Grid9, { item: true, xs: 12 }, /* @__PURE__ */ React57.createElement(Label, { ...props })), /* @__PURE__ */ React57.createElement(Grid9, { item: true, xs: 12 }, /* @__PURE__ */ React57.createElement(
2778
+ Control3,
2779
+ {
2780
+ bind: props.bind,
2781
+ startIcon: icon,
2782
+ isLinked,
2783
+ extendedOptions,
2784
+ anchorRef: gridRowRefs[index],
2785
+ min
2786
+ }
2787
+ )))))));
2811
2788
  };
2812
2789
  var Control3 = ({
2813
2790
  bind,
@@ -2879,7 +2856,7 @@ import { __ as __20 } from "@wordpress/i18n";
2879
2856
 
2880
2857
  // src/components/item-selector.tsx
2881
2858
  import * as React58 from "react";
2882
- import { useCallback, useEffect as useEffect6, useState as useState8 } from "react";
2859
+ import { useCallback as useCallback2, useEffect as useEffect6, useState as useState9 } from "react";
2883
2860
  import { PopoverBody, PopoverHeader as PopoverHeader2, PopoverMenuList, SearchField } from "@elementor/editor-ui";
2884
2861
  import { Box as Box7, Divider as Divider2, Link, Stack as Stack9, Typography as Typography4 } from "@elementor/ui";
2885
2862
  import { debounce } from "@elementor/utils";
@@ -2916,7 +2893,7 @@ var ItemSelector = ({
2916
2893
  disabledItems,
2917
2894
  id = "item-selector"
2918
2895
  }) => {
2919
- const [searchValue, setSearchValue] = useState8("");
2896
+ const [searchValue, setSearchValue] = useState9("");
2920
2897
  const filteredItemsList = useFilteredItemsList(itemsList, searchValue, disabledItems);
2921
2898
  const IconComponent = icon;
2922
2899
  const handleSearch = (value) => {
@@ -3013,7 +2990,7 @@ var ItemList = ({
3013
2990
  }
3014
2991
  });
3015
2992
  }, 100);
3016
- const memoizedItemStyle = useCallback((item) => itemStyle(item), [itemStyle]);
2993
+ const memoizedItemStyle = useCallback2((item) => itemStyle(item), [itemStyle]);
3017
2994
  return /* @__PURE__ */ React58.createElement(
3018
2995
  PopoverMenuList,
3019
2996
  {
@@ -3028,7 +3005,7 @@ var ItemList = ({
3028
3005
  );
3029
3006
  };
3030
3007
  var useDebounce = (fn, delay) => {
3031
- const [debouncedFn] = useState8(() => debounce(fn, delay));
3008
+ const [debouncedFn] = useState9(() => debounce(fn, delay));
3032
3009
  useEffect6(() => () => debouncedFn.cancel(), [debouncedFn]);
3033
3010
  return debouncedFn;
3034
3011
  };
@@ -3130,7 +3107,7 @@ var UrlControl = createControl(
3130
3107
 
3131
3108
  // src/controls/link-control.tsx
3132
3109
  import * as React65 from "react";
3133
- import { useState as useState10 } from "react";
3110
+ import { useState as useState11 } from "react";
3134
3111
  import { getLinkInLinkRestriction } from "@elementor/editor-elements";
3135
3112
  import { linkPropTypeUtil } from "@elementor/editor-props";
3136
3113
  import { MinusIcon, PlusIcon as PlusIcon2 } from "@elementor/icons";
@@ -3199,7 +3176,7 @@ var RestrictedLinkInfotip = ({
3199
3176
 
3200
3177
  // src/controls/query-control.tsx
3201
3178
  import * as React63 from "react";
3202
- import { useMemo as useMemo7, useState as useState9 } from "react";
3179
+ import { useMemo as useMemo7, useState as useState10 } from "react";
3203
3180
  import { numberPropTypeUtil as numberPropTypeUtil2, stringPropTypeUtil as stringPropTypeUtil6, urlPropTypeUtil as urlPropTypeUtil2 } from "@elementor/editor-props";
3204
3181
  import { httpService as httpService2 } from "@elementor/http-client";
3205
3182
  import { SearchIcon } from "@elementor/icons";
@@ -3348,7 +3325,7 @@ var QueryControl = createControl((props) => {
3348
3325
  ariaLabel
3349
3326
  } = props || {};
3350
3327
  const normalizedPlaceholder = placeholder || __22("Search", "elementor");
3351
- const [options, setOptions] = useState9(
3328
+ const [options, setOptions] = useState10(
3352
3329
  generateFirstLoadedOption(value?.value)
3353
3330
  );
3354
3331
  const onOptionChange = (newValue) => {
@@ -3470,7 +3447,7 @@ var SIZE6 = "tiny";
3470
3447
  var LinkControl = createControl((props) => {
3471
3448
  const { value, path, setValue, ...propContext } = useBoundProp(linkPropTypeUtil);
3472
3449
  const [linkSessionValue, setLinkSessionValue] = useSessionStorage(path.join("/"));
3473
- const [isActive, setIsActive] = useState10(!!value);
3450
+ const [isActive, setIsActive] = useState11(!!value);
3474
3451
  const {
3475
3452
  allowCustomValues = true,
3476
3453
  queryOptions,
@@ -3480,7 +3457,7 @@ var LinkControl = createControl((props) => {
3480
3457
  label = __23("Link", "elementor"),
3481
3458
  ariaLabel
3482
3459
  } = props || {};
3483
- const [linkInLinkRestriction, setLinkInLinkRestriction] = useState10(getLinkInLinkRestriction(elementId));
3460
+ const [linkInLinkRestriction, setLinkInLinkRestriction] = useState11(getLinkInLinkRestriction(elementId));
3484
3461
  const shouldDisableAddingLink = !isActive && linkInLinkRestriction.shouldRestrict;
3485
3462
  const onEnabledChange = () => {
3486
3463
  setLinkInLinkRestriction(getLinkInLinkRestriction(elementId));
@@ -3702,7 +3679,7 @@ var Control4 = ({
3702
3679
 
3703
3680
  // src/controls/aspect-ratio-control.tsx
3704
3681
  import * as React69 from "react";
3705
- import { useEffect as useEffect7, useState as useState11 } from "react";
3682
+ import { useEffect as useEffect7, useState as useState12 } from "react";
3706
3683
  import { stringPropTypeUtil as stringPropTypeUtil8 } from "@elementor/editor-props";
3707
3684
  import { MenuListItem as MenuListItem4 } from "@elementor/editor-ui";
3708
3685
  import { ArrowsMoveHorizontalIcon, ArrowsMoveVerticalIcon } from "@elementor/icons";
@@ -3723,10 +3700,10 @@ var AspectRatioControl = createControl(({ label }) => {
3723
3700
  const { value: aspectRatioValue, setValue: setAspectRatioValue, disabled } = useBoundProp(stringPropTypeUtil8);
3724
3701
  const isCustomSelected = aspectRatioValue && !RATIO_OPTIONS.some((option) => option.value === aspectRatioValue);
3725
3702
  const [initialWidth, initialHeight] = isCustomSelected ? aspectRatioValue.split("/") : ["", ""];
3726
- const [isCustom, setIsCustom] = useState11(isCustomSelected);
3727
- const [customWidth, setCustomWidth] = useState11(initialWidth);
3728
- const [customHeight, setCustomHeight] = useState11(initialHeight);
3729
- const [selectedValue, setSelectedValue] = useState11(
3703
+ const [isCustom, setIsCustom] = useState12(isCustomSelected);
3704
+ const [customWidth, setCustomWidth] = useState12(initialWidth);
3705
+ const [customHeight, setCustomHeight] = useState12(initialHeight);
3706
+ const [selectedValue, setSelectedValue] = useState12(
3730
3707
  isCustomSelected ? CUSTOM_RATIO : aspectRatioValue || ""
3731
3708
  );
3732
3709
  useEffect7(() => {
@@ -3813,7 +3790,7 @@ var AspectRatioControl = createControl(({ label }) => {
3813
3790
 
3814
3791
  // src/controls/svg-media-control.tsx
3815
3792
  import * as React71 from "react";
3816
- import { useState as useState13 } from "react";
3793
+ import { useState as useState14 } from "react";
3817
3794
  import { useCurrentUserCapabilities } from "@elementor/editor-current-user";
3818
3795
  import { imageSrcPropTypeUtil as imageSrcPropTypeUtil2 } from "@elementor/editor-props";
3819
3796
  import { UploadIcon as UploadIcon2 } from "@elementor/icons";
@@ -3823,7 +3800,7 @@ import { __ as __28 } from "@wordpress/i18n";
3823
3800
 
3824
3801
  // src/components/enable-unfiltered-modal.tsx
3825
3802
  import * as React70 from "react";
3826
- import { useState as useState12 } from "react";
3803
+ import { useState as useState13 } from "react";
3827
3804
  import {
3828
3805
  Button as Button3,
3829
3806
  CircularProgress as CircularProgress2,
@@ -3849,7 +3826,7 @@ var ADMIN_FAILED_CONTENT_TEXT_PT2 = __27(
3849
3826
  var WAIT_FOR_CLOSE_TIMEOUT_MS = 300;
3850
3827
  var EnableUnfilteredModal = (props) => {
3851
3828
  const { mutateAsync, isPending } = useUpdateUnfilteredFilesUpload();
3852
- const [isError, setIsError] = useState12(false);
3829
+ const [isError, setIsError] = useState13(false);
3853
3830
  const onClose = (enabled) => {
3854
3831
  props.onClose(enabled);
3855
3832
  setTimeout(() => setIsError(false), WAIT_FOR_CLOSE_TIMEOUT_MS);
@@ -3912,7 +3889,7 @@ var SvgMediaControl = createControl(() => {
3912
3889
  const { data: attachment, isFetching } = useWpMediaAttachment2(id?.value || null);
3913
3890
  const src = attachment?.url ?? url?.value ?? null;
3914
3891
  const { data: allowSvgUpload } = useUnfilteredFilesUpload();
3915
- const [unfilteredModalOpenState, setUnfilteredModalOpenState] = useState13(false);
3892
+ const [unfilteredModalOpenState, setUnfilteredModalOpenState] = useState14(false);
3916
3893
  const { canUser } = useCurrentUserCapabilities();
3917
3894
  const canManageOptions = canUser("manage_options");
3918
3895
  const { open } = useWpMediaFrame2({
@@ -4704,7 +4681,7 @@ var getAllProperties = (pattern) => {
4704
4681
 
4705
4682
  // src/controls/key-value-control.tsx
4706
4683
  import * as React80 from "react";
4707
- import { useMemo as useMemo9, useState as useState14 } from "react";
4684
+ import { useMemo as useMemo9, useState as useState15 } from "react";
4708
4685
  import {
4709
4686
  isTransformable,
4710
4687
  keyValuePropTypeUtil,
@@ -4735,9 +4712,9 @@ var getInitialFieldValue = (fieldValue) => {
4735
4712
  };
4736
4713
  var KeyValueControl = createControl((props = {}) => {
4737
4714
  const { value, setValue, ...propContext } = useBoundProp(keyValuePropTypeUtil);
4738
- const [keyError, setKeyError] = useState14("");
4739
- const [valueError, setValueError] = useState14("");
4740
- const [sessionState, setSessionState] = useState14({
4715
+ const [keyError, setKeyError] = useState15("");
4716
+ const [valueError, setValueError] = useState15("");
4717
+ const [sessionState, setSessionState] = useState15({
4741
4718
  key: getInitialFieldValue(value?.key),
4742
4719
  value: getInitialFieldValue(value?.value)
4743
4720
  });
@@ -5470,7 +5447,7 @@ var TransformBasePopoverTrigger = ({
5470
5447
 
5471
5448
  // src/controls/transition-control/transition-repeater-control.tsx
5472
5449
  import * as React97 from "react";
5473
- import { useEffect as useEffect8, useMemo as useMemo11, useState as useState15 } from "react";
5450
+ import { useEffect as useEffect8, useMemo as useMemo11, useState as useState16 } from "react";
5474
5451
  import {
5475
5452
  createArrayPropUtils as createArrayPropUtils2,
5476
5453
  selectionSizePropTypeUtil as selectionSizePropTypeUtil2
@@ -5804,7 +5781,7 @@ var TransitionRepeaterControl = createControl(
5804
5781
  currentStyleState
5805
5782
  }) => {
5806
5783
  const currentStyleIsNormal = currentStyleState === null;
5807
- const [recentlyUsedList, setRecentlyUsedList] = useState15([]);
5784
+ const [recentlyUsedList, setRecentlyUsedList] = useState16([]);
5808
5785
  const { value, setValue } = useBoundProp(childArrayPropTypeUtil);
5809
5786
  const disabledItems = useMemo11(() => getDisabledItemLabels(value), [value]);
5810
5787
  const allowedTransitionSet = useMemo11(() => {
@@ -5951,7 +5928,7 @@ import { EditorContent, useEditor } from "@tiptap/react";
5951
5928
 
5952
5929
  // src/components/inline-editor-toolbar.tsx
5953
5930
  import * as React100 from "react";
5954
- import { useMemo as useMemo12, useRef as useRef25, useState as useState16 } from "react";
5931
+ import { useMemo as useMemo12, useRef as useRef25, useState as useState17 } from "react";
5955
5932
  import {
5956
5933
  BoldIcon,
5957
5934
  ItalicIcon,
@@ -6105,8 +6082,8 @@ var toolbarButtons = {
6105
6082
  var { clear: clearButton, ...formatButtons } = toolbarButtons;
6106
6083
  var possibleFormats = Object.keys(formatButtons);
6107
6084
  var InlineEditorToolbar = ({ editor }) => {
6108
- const [urlValue, setUrlValue] = useState16("");
6109
- const [openInNewTab, setOpenInNewTab] = useState16(false);
6085
+ const [urlValue, setUrlValue] = useState17("");
6086
+ const [openInNewTab, setOpenInNewTab] = useState17(false);
6110
6087
  const toolbarRef = useRef25(null);
6111
6088
  const popupState = usePopupState8({ variant: "popover" });
6112
6089
  const editorState = useEditorState({
@@ -6309,7 +6286,7 @@ var ClearIconButton = ({ tooltipText, onClick, disabled, size = "tiny" }) => /*
6309
6286
 
6310
6287
  // src/components/repeater/repeater.tsx
6311
6288
  import * as React104 from "react";
6312
- import { useEffect as useEffect11, useState as useState17 } from "react";
6289
+ import { useEffect as useEffect11, useState as useState18 } from "react";
6313
6290
  import { CopyIcon as CopyIcon2, EyeIcon as EyeIcon2, EyeOffIcon as EyeOffIcon2, PlusIcon as PlusIcon3, XIcon as XIcon4 } from "@elementor/icons";
6314
6291
  import {
6315
6292
  bindPopover as bindPopover8,
@@ -6338,7 +6315,7 @@ var Repeater3 = ({
6338
6315
  openItem: initialOpenItem = EMPTY_OPEN_ITEM2,
6339
6316
  isSortable = true
6340
6317
  }) => {
6341
- const [openItem, setOpenItem] = useState17(initialOpenItem);
6318
+ const [openItem, setOpenItem] = useState18(initialOpenItem);
6342
6319
  const uniqueKeys = items2.map(
6343
6320
  (item, index) => isSortable && "getId" in itemSettings ? itemSettings.getId({ item, index }) : String(index)
6344
6321
  );
@@ -6494,7 +6471,7 @@ var RepeaterItem = ({
6494
6471
  ), /* @__PURE__ */ React104.createElement(RepeaterPopover, { width: ref?.getBoundingClientRect().width, ...popoverProps, anchorEl: ref }, /* @__PURE__ */ React104.createElement(Box23, null, children({ anchorEl: ref }))));
6495
6472
  };
6496
6473
  var usePopover = (openOnMount, onOpen) => {
6497
- const [ref, setRef] = useState17(null);
6474
+ const [ref, setRef] = useState18(null);
6498
6475
  const popoverState = usePopupState9({ variant: "popover" });
6499
6476
  const popoverProps = bindPopover8(popoverState);
6500
6477
  useEffect11(() => {