@elementor/editor-controls 4.4.0-1145 → 4.4.0-1146

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
@@ -5677,7 +5677,7 @@ var AspectRatioControl = createControl(({ label }) => {
5677
5677
 
5678
5678
  // src/controls/svg-media-control.tsx
5679
5679
  import * as React93 from "react";
5680
- import { useEffect as useEffect17, useRef as useRef19, useState as useState23 } from "react";
5680
+ import { useEffect as useEffect18, useRef as useRef21, useState as useState24 } from "react";
5681
5681
  import { useCurrentUserCapabilities } from "@elementor/editor-current-user";
5682
5682
  import { iconPropTypeUtil, svgSrcPropTypeUtil, urlPropTypeUtil as urlPropTypeUtil4 } from "@elementor/editor-props";
5683
5683
  import { Box as Box24, Card as Card2, CardOverlay as CardOverlay2, Popover as Popover6, Stack as Stack18, styled as styled12, usePopupState as usePopupState9 } from "@elementor/ui";
@@ -5761,7 +5761,7 @@ function measureIconLibraryAnchor(container, buttonGroup) {
5761
5761
 
5762
5762
  // src/controls/icon-library/icon-library-popover.tsx
5763
5763
  import * as React90 from "react";
5764
- import { useMemo as useMemo12, useState as useState22 } from "react";
5764
+ import { useMemo as useMemo12, useState as useState23 } from "react";
5765
5765
  import {
5766
5766
  PopoverBody as PopoverBody2,
5767
5767
  PopoverHeader as PopoverHeader4,
@@ -6022,8 +6022,74 @@ function toCatalogIcon(icon, library) {
6022
6022
 
6023
6023
  // src/controls/icon-library/font-awesome-glyph.tsx
6024
6024
  import * as React84 from "react";
6025
+ import { useEffect as useEffect17, useRef as useRef18, useState as useState20 } from "react";
6025
6026
  import { Box as Box17 } from "@elementor/ui";
6026
6027
 
6028
+ // src/controls/icon-library/icon-library-providers.ts
6029
+ import { useRef as useRef17, useState as useState19 } from "react";
6030
+ import { useQuery as useQuery2 } from "@elementor/query";
6031
+ var PROVIDER_ICON_SVG_QUERY_KEY = "icon-library-provider-svg";
6032
+ var providers = /* @__PURE__ */ new Map();
6033
+ function registerIconLibraryProvider(provider) {
6034
+ providers.set(provider.id, provider);
6035
+ }
6036
+ function unregisterIconLibraryProvider(id) {
6037
+ providers.delete(id);
6038
+ }
6039
+ function useIconLibraryProviderIcons(enabled) {
6040
+ const [snapshot] = useState19(() => [...providers.values()]);
6041
+ const states = snapshot.map((provider) => provider.useIcons(enabled));
6042
+ const data = useStableConcat(states.map((state) => state.data));
6043
+ return {
6044
+ data,
6045
+ isLoading: states.some((state) => state.isLoading)
6046
+ };
6047
+ }
6048
+ function resolveProviderIconSvg(library, iconValue, signal) {
6049
+ return resolveFromProviders((provider) => provider.resolveSvg, library, iconValue, signal);
6050
+ }
6051
+ function resolveProviderIconPreviewSvg(library, iconValue, signal) {
6052
+ return resolveFromProviders(
6053
+ (provider) => provider.resolvePreviewSvg ?? provider.resolveSvg,
6054
+ library,
6055
+ iconValue,
6056
+ signal
6057
+ );
6058
+ }
6059
+ async function resolveFromProviders(pickResolver, library, iconValue, signal) {
6060
+ for (const provider of providers.values()) {
6061
+ try {
6062
+ const markup = await pickResolver(provider)?.(library, iconValue, signal);
6063
+ if (markup) {
6064
+ return markup;
6065
+ }
6066
+ } catch (error) {
6067
+ if (signal?.aborted) {
6068
+ throw error;
6069
+ }
6070
+ }
6071
+ }
6072
+ return null;
6073
+ }
6074
+ function useStableConcat(lists) {
6075
+ const previous = useRef17(null);
6076
+ if (!previous.current || !areSameLists(previous.current.lists, lists)) {
6077
+ previous.current = { lists, merged: lists.flatMap((list) => list ?? []) };
6078
+ }
6079
+ return previous.current.merged;
6080
+ }
6081
+ function areSameLists(a, b) {
6082
+ return a.length === b.length && a.every((item, index) => item === b[index]);
6083
+ }
6084
+ function useProviderIconSvg(library, iconValue, enabled) {
6085
+ return useQuery2({
6086
+ queryKey: [PROVIDER_ICON_SVG_QUERY_KEY, library, iconValue],
6087
+ queryFn: ({ signal }) => resolveProviderIconSvg(library, iconValue, signal),
6088
+ enabled: enabled && Boolean(library && iconValue),
6089
+ staleTime: Infinity
6090
+ });
6091
+ }
6092
+
6027
6093
  // src/controls/icon-library/sanitize-icon-svg-markup.ts
6028
6094
  var ALLOWED_SVG_TAGS = /* @__PURE__ */ new Set(["svg", "g", "path", "title", "desc"]);
6029
6095
  var ALLOWED_SVG_ATTRS = /* @__PURE__ */ new Set([
@@ -6070,7 +6136,56 @@ function pruneNode(node) {
6070
6136
  }
6071
6137
 
6072
6138
  // src/controls/icon-library/font-awesome-glyph.tsx
6073
- var FontAwesomeGlyph = ({ icon, size, color, label }) => {
6139
+ var FontAwesomeGlyph = (props) => {
6140
+ const { icon } = props;
6141
+ if (icon.lazySvg && !icon.svgMarkup) {
6142
+ return /* @__PURE__ */ React84.createElement(LazyProviderGlyph, { ...props });
6143
+ }
6144
+ return /* @__PURE__ */ React84.createElement(ResolvedGlyph, { ...props });
6145
+ };
6146
+ var LazyProviderGlyph = (props) => {
6147
+ const { icon, size } = props;
6148
+ const [resolved, setResolved] = useState20(null);
6149
+ const [isVisible, setIsVisible] = useState20(typeof IntersectionObserver === "undefined");
6150
+ const placeholderRef = useRef18(null);
6151
+ const svgMarkup = resolved?.id === icon.id ? resolved.markup : null;
6152
+ useEffect17(() => {
6153
+ const element = placeholderRef.current;
6154
+ if (isVisible || !element) {
6155
+ return;
6156
+ }
6157
+ const observer = new IntersectionObserver((entries) => {
6158
+ if (entries.some((entry) => entry.isIntersecting)) {
6159
+ setIsVisible(true);
6160
+ observer.disconnect();
6161
+ }
6162
+ });
6163
+ observer.observe(element);
6164
+ return () => observer.disconnect();
6165
+ }, [isVisible]);
6166
+ useEffect17(() => {
6167
+ if (!isVisible) {
6168
+ return;
6169
+ }
6170
+ const controller = new AbortController();
6171
+ resolveProviderIconPreviewSvg(icon.library, icon.value, controller.signal).then((markup) => !controller.signal.aborted && setResolved({ id: icon.id, markup })).catch(() => {
6172
+ });
6173
+ return () => controller.abort();
6174
+ }, [isVisible, icon.id, icon.library, icon.value]);
6175
+ if (!svgMarkup) {
6176
+ return /* @__PURE__ */ React84.createElement(
6177
+ Box17,
6178
+ {
6179
+ component: "span",
6180
+ ref: placeholderRef,
6181
+ "aria-hidden": "true",
6182
+ sx: { display: "inline-block", width: size, height: size }
6183
+ }
6184
+ );
6185
+ }
6186
+ return /* @__PURE__ */ React84.createElement(ResolvedGlyph, { ...props, icon: { ...icon, svgMarkup } });
6187
+ };
6188
+ var ResolvedGlyph = ({ icon, size, color, label }) => {
6074
6189
  const svgMarkup = sanitizeIconSvgMarkup(icon.svgMarkup);
6075
6190
  if (svgMarkup) {
6076
6191
  return /* @__PURE__ */ React84.createElement(
@@ -6326,7 +6441,7 @@ function parseFilterEntry(value) {
6326
6441
 
6327
6442
  // src/controls/icon-library/icon-library-grid.tsx
6328
6443
  import * as React86 from "react";
6329
- import { useLayoutEffect as useLayoutEffect3, useRef as useRef17, useState as useState19 } from "react";
6444
+ import { useLayoutEffect as useLayoutEffect3, useRef as useRef19, useState as useState21 } from "react";
6330
6445
  import { Box as Box19, Tooltip as Tooltip9, useTheme as useTheme4 } from "@elementor/ui";
6331
6446
  import { useVirtualizer } from "@tanstack/react-virtual";
6332
6447
  import { __ as __35 } from "@wordpress/i18n";
@@ -6365,12 +6480,12 @@ var IconLibraryGrid = ({
6365
6480
  noResultsComponent
6366
6481
  }) => {
6367
6482
  const theme = useTheme4();
6368
- const containerRef = useRef17(null);
6369
- const cellRefs = useRef17(/* @__PURE__ */ new Map());
6370
- const shouldRestoreFocusRef = useRef17(false);
6483
+ const containerRef = useRef19(null);
6484
+ const cellRefs = useRef19(/* @__PURE__ */ new Map());
6485
+ const shouldRestoreFocusRef = useRef19(false);
6371
6486
  const selectedIndex = items2.findIndex((item) => item.id === selectedValue);
6372
- const [focusedIndex, setFocusedIndex] = useState19(selectedIndex >= 0 ? selectedIndex : 0);
6373
- const [{ columnCount, cellSize }, setGridMetrics] = useState19(() => getGridMetrics(0, 0, 0));
6487
+ const [focusedIndex, setFocusedIndex] = useState21(selectedIndex >= 0 ? selectedIndex : 0);
6488
+ const [{ columnCount, cellSize }, setGridMetrics] = useState21(() => getGridMetrics(0, 0, 0));
6374
6489
  const rowCount = Math.ceil(items2.length / columnCount);
6375
6490
  const cellGap = Number.parseFloat(theme.spacing(GRID_CELL_GAP));
6376
6491
  const verticalPadding = Number.parseFloat(theme.spacing(GRID_VERTICAL_PADDING));
@@ -6607,7 +6722,7 @@ var IconLibraryGrid = ({
6607
6722
  /* @__PURE__ */ React86.createElement(
6608
6723
  FontAwesomeGlyph,
6609
6724
  {
6610
- icon: item,
6725
+ icon: { ...item, value: item.iconValue ?? item.value },
6611
6726
  size: ICON_GLYPH_SIZE,
6612
6727
  color: "currentColor"
6613
6728
  }
@@ -6622,52 +6737,9 @@ var IconLibraryGrid = ({
6622
6737
  );
6623
6738
  };
6624
6739
 
6625
- // src/controls/icon-library/icon-library-providers.ts
6626
- import { useState as useState20 } from "react";
6627
- import { useQuery as useQuery2 } from "@elementor/query";
6628
- var PROVIDER_ICON_SVG_QUERY_KEY = "icon-library-provider-svg";
6629
- var providers = /* @__PURE__ */ new Map();
6630
- function registerIconLibraryProvider(provider) {
6631
- providers.set(provider.id, provider);
6632
- }
6633
- function unregisterIconLibraryProvider(id) {
6634
- providers.delete(id);
6635
- }
6636
- function useIconLibraryProviderIcons(enabled) {
6637
- const [snapshot] = useState20(() => [...providers.values()]);
6638
- const states = snapshot.map((provider) => provider.useIcons(enabled));
6639
- return {
6640
- data: states.flatMap((state) => state.data ?? []),
6641
- isLoading: states.some((state) => state.isLoading)
6642
- };
6643
- }
6644
- async function resolveProviderIconSvg(library, iconValue, signal) {
6645
- for (const provider of providers.values()) {
6646
- try {
6647
- const markup = await provider.resolveSvg?.(library, iconValue, signal);
6648
- if (markup) {
6649
- return markup;
6650
- }
6651
- } catch (error) {
6652
- if (signal?.aborted) {
6653
- throw error;
6654
- }
6655
- }
6656
- }
6657
- return null;
6658
- }
6659
- function useProviderIconSvg(library, iconValue, enabled) {
6660
- return useQuery2({
6661
- queryKey: [PROVIDER_ICON_SVG_QUERY_KEY, library, iconValue],
6662
- queryFn: ({ signal }) => resolveProviderIconSvg(library, iconValue, signal),
6663
- enabled: enabled && Boolean(library && iconValue),
6664
- staleTime: Infinity
6665
- });
6666
- }
6667
-
6668
6740
  // src/controls/icon-library/icon-library-upload-action.tsx
6669
6741
  import * as React87 from "react";
6670
- import { forwardRef as forwardRef11, useRef as useRef18, useState as useState21 } from "react";
6742
+ import { forwardRef as forwardRef11, useRef as useRef20, useState as useState22 } from "react";
6671
6743
  import { PromotionPopover, useCanvasClickHandler } from "@elementor/editor-ui";
6672
6744
  import { UploadIcon as UploadIcon2 } from "@elementor/icons";
6673
6745
  import { createReplaceableLocation as createReplaceableLocation2 } from "@elementor/locations";
@@ -6728,8 +6800,8 @@ var IconLibraryUploadPromotion = ({
6728
6800
  title = __36("Upload custom icons", "elementor"),
6729
6801
  content = __36("Add your own icon font library to use across your site.", "elementor")
6730
6802
  }) => {
6731
- const [isOpen, setIsOpen] = useState21(false);
6732
- const triggerRef = useRef18(null);
6803
+ const [isOpen, setIsOpen] = useState22(false);
6804
+ const triggerRef = useRef20(null);
6733
6805
  const canSeePromotions = !!window.elementor?.config?.v4Promotions;
6734
6806
  const close = () => {
6735
6807
  setIsOpen(false);
@@ -6813,6 +6885,21 @@ var IconLibraryViewToggle = ({ value, onChange }) => {
6813
6885
  );
6814
6886
  };
6815
6887
 
6888
+ // src/controls/icon-library/merge-icons-by-id.ts
6889
+ var getNames = (icon) => [icon.name, ...icon.aliases ?? []].filter(Boolean);
6890
+ function mergeIconsById(primary, secondary) {
6891
+ const ids = new Set(primary.map((icon) => icon.id));
6892
+ const names = new Set(
6893
+ primary.flatMap((icon) => getNames(icon).map((name) => `${icon.library}:${name}`))
6894
+ );
6895
+ return [
6896
+ ...primary,
6897
+ ...secondary.filter(
6898
+ (icon) => !ids.has(icon.id) && !getNames(icon).some((name) => names.has(`${icon.library}:${name}`))
6899
+ )
6900
+ ];
6901
+ }
6902
+
6816
6903
  // src/controls/icon-library/svg-element-icon.tsx
6817
6904
  import * as React89 from "react";
6818
6905
  import { SvgIcon } from "@elementor/ui";
@@ -6869,7 +6956,7 @@ var IconLibraryPopover = ({
6869
6956
  handleChange: handleSearchChange,
6870
6957
  setImmediateValue: setSearchValue
6871
6958
  } = useDebounceState({ delay: ICON_LIBRARY_SEARCH_DEBOUNCE_DELAY });
6872
- const [activeLibraries, setActiveLibraries] = useState22([]);
6959
+ const [activeLibraries, setActiveLibraries] = useState23([]);
6873
6960
  const [storedView, setStoredView] = useSessionStorage2(
6874
6961
  ICON_LIBRARY_VIEW_STORAGE_KEY,
6875
6962
  ICON_LIBRARY_VIEW_STORAGE_PREFIX
@@ -6877,12 +6964,15 @@ var IconLibraryPopover = ({
6877
6964
  const view = isIconLibraryView(storedView) ? storedView : DEFAULT_ICON_LIBRARY_VIEW;
6878
6965
  const { data: fontAwesomeIcons = [], isLoading: isFontAwesomeLoading } = useFontAwesome7Catalog(open);
6879
6966
  const { data: providerIcons = [], isLoading: isProviderLoading } = useIconLibraryProviderIcons(open);
6880
- const isLoading = isFontAwesomeLoading || isProviderLoading;
6881
- const icons = useMemo12(() => [...fontAwesomeIcons, ...providerIcons], [providerIcons, fontAwesomeIcons]);
6967
+ const icons = useMemo12(
6968
+ () => mergeIconsById(fontAwesomeIcons, providerIcons),
6969
+ [providerIcons, fontAwesomeIcons]
6970
+ );
6882
6971
  const items2 = useMemo12(
6883
6972
  () => createIconLibraryItems(icons, searchValue, activeLibraries),
6884
6973
  [activeLibraries, icons, searchValue]
6885
6974
  );
6975
+ const isLoading = isFontAwesomeLoading || isProviderLoading && items2.length === 0;
6886
6976
  const selectedValue = useMemo12(
6887
6977
  () => findFontAwesome7Icon(icons, selectedIconClass, selectedIconLibrary)?.id,
6888
6978
  [icons, selectedIconClass, selectedIconLibrary]
@@ -7004,7 +7094,7 @@ var IconLibraryContent = ({
7004
7094
  }
7005
7095
  );
7006
7096
  };
7007
- var IconLibraryLoadingState = () => /* @__PURE__ */ React90.createElement(Stack16, { alignItems: "center", justifyContent: "center", height: "100%" }, /* @__PURE__ */ React90.createElement(CircularProgress3, { role: "progressbar", size: 24 }));
7097
+ var IconLibraryLoadingState = () => /* @__PURE__ */ React90.createElement(Stack16, { alignItems: "center", justifyContent: "center", height: "100%" }, /* @__PURE__ */ React90.createElement(CircularProgress3, { role: "progressbar", size: 24, "aria-label": __38("Loading icons", "elementor") }));
7008
7098
  var IconLibraryEmptyState = ({
7009
7099
  searchValue,
7010
7100
  isCatalogAvailable,
@@ -7033,7 +7123,14 @@ var IconLibraryRow = (item) => {
7033
7123
  flexShrink: 0
7034
7124
  }
7035
7125
  },
7036
- /* @__PURE__ */ React90.createElement(FontAwesomeGlyph, { icon, size: ICON_GLYPH_SIZE2, color: "currentColor" })
7126
+ /* @__PURE__ */ React90.createElement(
7127
+ FontAwesomeGlyph,
7128
+ {
7129
+ icon: { ...icon, value: icon.iconValue },
7130
+ size: ICON_GLYPH_SIZE2,
7131
+ color: "currentColor"
7132
+ }
7133
+ )
7037
7134
  ), /* @__PURE__ */ React90.createElement(Typography10, { variant: "caption", color: "text.primary", noWrap: true }, icon.label));
7038
7135
  };
7039
7136
  var CatalogUnavailable = () => /* @__PURE__ */ React90.createElement(Stack16, { alignItems: "center", justifyContent: "center", height: "100%", p: 2.5, gap: 1.5 }, /* @__PURE__ */ React90.createElement(SvgElementIcon, { fontSize: "large" }), /* @__PURE__ */ React90.createElement(Typography10, { align: "center", variant: "subtitle2", color: "text.secondary" }, __38("Icons couldn't be loaded.", "elementor")));
@@ -7041,7 +7138,8 @@ var NoResults = ({ searchValue, onClear }) => /* @__PURE__ */ React90.createElem
7041
7138
  var createIconLibraryItems = (icons, searchValue, libraries) => filterFontAwesome7Icons(icons, searchValue, libraries).map((icon) => ({
7042
7139
  ...icon,
7043
7140
  type: "item",
7044
- value: icon.id
7141
+ value: icon.id,
7142
+ iconValue: icon.value
7045
7143
  }));
7046
7144
 
7047
7145
  // src/controls/open-icon-library.ts
@@ -7118,6 +7216,7 @@ var UploadControl = ({ isAdmin, onUpload }) => {
7118
7216
 
7119
7217
  // src/controls/svg-media-preview.tsx
7120
7218
  import * as React92 from "react";
7219
+ import { useMemo as useMemo13 } from "react";
7121
7220
  import { Box as Box23, CardMedia as CardMedia2, CircularProgress as CircularProgress4 } from "@elementor/ui";
7122
7221
  import { __ as __40 } from "@wordpress/i18n";
7123
7222
  var ICON_PREVIEW_SIZE = 50;
@@ -7125,21 +7224,30 @@ var ICON_PREVIEW_COLOR = "#000000";
7125
7224
  var SvgMediaPreview = ({ isFetching, src, iconClassName, iconLibrary }) => {
7126
7225
  const shouldLoadIconCatalog = Boolean(iconClassName && iconLibrary);
7127
7226
  const { data: fontAwesomeIcons = [], isLoading: isFontAwesomeLoading } = useFontAwesome7Catalog(shouldLoadIconCatalog);
7128
- const { data: providerIcons = [], isLoading: isProviderLoading } = useIconLibraryProviderIcons(shouldLoadIconCatalog);
7129
- const icons = [...fontAwesomeIcons, ...providerIcons];
7227
+ const isFontAwesomeLibrary = Boolean(iconLibrary?.startsWith("fa-"));
7228
+ const { data: providerIcons = [], isLoading: isProviderLoading } = useIconLibraryProviderIcons(
7229
+ shouldLoadIconCatalog && !isFontAwesomeLibrary
7230
+ );
7231
+ const icons = useMemo13(
7232
+ () => mergeIconsById(fontAwesomeIcons, providerIcons),
7233
+ [fontAwesomeIcons, providerIcons]
7234
+ );
7130
7235
  const selectedIcon = findFontAwesome7Icon(icons, iconClassName, iconLibrary);
7131
- const isLoadingCatalog = shouldLoadIconCatalog && (isFontAwesomeLoading || isProviderLoading);
7236
+ const isLoadingCatalog = shouldLoadIconCatalog && (isFontAwesomeLoading || !isFontAwesomeLibrary && isProviderLoading);
7132
7237
  const { data: savedIconSvg, isLoading: isSavedIconLoading } = useProviderIconSvg(
7133
7238
  iconLibrary,
7134
7239
  iconClassName,
7135
- shouldLoadIconCatalog && !isLoadingCatalog && !selectedIcon
7240
+ shouldLoadIconCatalog && !isLoadingCatalog && !selectedIcon && !isFontAwesomeLibrary
7136
7241
  );
7137
7242
  if (isFetching || isLoadingCatalog || isSavedIconLoading) {
7138
- return /* @__PURE__ */ React92.createElement(CircularProgress4, { role: "progressbar" });
7243
+ return /* @__PURE__ */ React92.createElement(CircularProgress4, { role: "progressbar", "aria-label": __40("Loading icon", "elementor") });
7139
7244
  }
7140
7245
  if (selectedIcon) {
7141
7246
  return /* @__PURE__ */ React92.createElement(IconPreview, { icon: selectedIcon });
7142
7247
  }
7248
+ if (shouldLoadIconCatalog && iconClassName && iconLibrary && isFontAwesomeLibrary) {
7249
+ return /* @__PURE__ */ React92.createElement(IconPreview, { icon: createLazyIcon(iconLibrary, iconClassName) });
7250
+ }
7143
7251
  if (savedIconSvg) {
7144
7252
  return /* @__PURE__ */ React92.createElement(IconPreview, { icon: toSvgMarkupIcon(savedIconSvg, iconLibrary, iconClassName) });
7145
7253
  }
@@ -7148,6 +7256,18 @@ var SvgMediaPreview = ({ isFetching, src, iconClassName, iconLibrary }) => {
7148
7256
  }
7149
7257
  return /* @__PURE__ */ React92.createElement(SvgPreview, { src });
7150
7258
  };
7259
+ var createLazyIcon = (library, value) => ({
7260
+ id: `${library}:${value}`,
7261
+ name: value,
7262
+ label: value,
7263
+ library,
7264
+ value,
7265
+ aliases: [],
7266
+ width: ICON_PREVIEW_SIZE,
7267
+ height: ICON_PREVIEW_SIZE,
7268
+ paths: [],
7269
+ lazySvg: true
7270
+ });
7151
7271
  var toSvgMarkupIcon = (svgMarkup, library, value) => ({
7152
7272
  id: `${library}:${value}`,
7153
7273
  label: value ?? "",
@@ -7160,7 +7280,7 @@ var toSvgMarkupIcon = (svgMarkup, library, value) => ({
7160
7280
  paths: [],
7161
7281
  svgMarkup
7162
7282
  });
7163
- var IconPreview = ({ icon }) => /* @__PURE__ */ React92.createElement(Box23, { sx: { color: ICON_PREVIEW_COLOR } }, /* @__PURE__ */ React92.createElement(
7283
+ var IconPreview = ({ icon }) => /* @__PURE__ */ React92.createElement(Box23, { sx: { color: ICON_PREVIEW_COLOR, minWidth: ICON_PREVIEW_SIZE, minHeight: ICON_PREVIEW_SIZE } }, /* @__PURE__ */ React92.createElement(
7164
7284
  FontAwesomeGlyph,
7165
7285
  {
7166
7286
  icon,
@@ -7229,11 +7349,11 @@ var SvgMediaControl = createControl(({ showIconLibrary = false, label }) => {
7229
7349
  const { data: attachment, isFetching } = useWpMediaAttachment2(previewSvgValue?.id?.value || null);
7230
7350
  const src = attachment?.url ?? previewSvgValue?.url?.value ?? null;
7231
7351
  const { data: allowSvgUpload } = useUnfilteredFilesUpload();
7232
- const [unfilteredModalOpenState, setUnfilteredModalOpenState] = useState23(false);
7352
+ const [unfilteredModalOpenState, setUnfilteredModalOpenState] = useState24(false);
7233
7353
  const iconLibraryPopoverState = usePopupState9({ variant: "popover" });
7234
- const controlContainerRef = useRef19(null);
7235
- const buttonGroupRef = useRef19(null);
7236
- const [iconLibraryAnchor, setIconLibraryAnchor] = useState23(null);
7354
+ const controlContainerRef = useRef21(null);
7355
+ const buttonGroupRef = useRef21(null);
7356
+ const [iconLibraryAnchor, setIconLibraryAnchor] = useState24(null);
7237
7357
  const { isAdmin } = useCurrentUserCapabilities();
7238
7358
  const selectedIconClass = showIconLibrary && typeof previewIconValue?.value?.value === "string" ? previewIconValue.value.value : null;
7239
7359
  const selectedIconLibrary = showIconLibrary && typeof previewIconValue?.library?.value === "string" ? previewIconValue.library.value : null;
@@ -7285,7 +7405,7 @@ var SvgMediaControl = createControl(({ showIconLibrary = false, label }) => {
7285
7405
  setIconLibraryAnchor(anchor);
7286
7406
  iconLibraryPopoverState.open(event);
7287
7407
  };
7288
- useEffect17(() => {
7408
+ useEffect18(() => {
7289
7409
  if (!iconLibraryPopoverState.isOpen) {
7290
7410
  return;
7291
7411
  }
@@ -7579,7 +7699,7 @@ var BackgroundImageOverlayAttachment = () => {
7579
7699
 
7580
7700
  // src/controls/background-control/background-overlay/background-image-overlay/background-image-overlay-position.tsx
7581
7701
  import * as React97 from "react";
7582
- import { useRef as useRef20 } from "react";
7702
+ import { useRef as useRef22 } from "react";
7583
7703
  import { backgroundImagePositionOffsetPropTypeUtil, stringPropTypeUtil as stringPropTypeUtil16 } from "@elementor/editor-props";
7584
7704
  import { MenuListItem as MenuListItem6 } from "@elementor/editor-ui";
7585
7705
  import { LetterXIcon, LetterYIcon } from "@elementor/icons";
@@ -7601,7 +7721,7 @@ var BackgroundImageOverlayPosition = () => {
7601
7721
  const backgroundImageOffsetContext = useBoundProp(backgroundImagePositionOffsetPropTypeUtil);
7602
7722
  const stringPropContext = useBoundProp(stringPropTypeUtil16);
7603
7723
  const isCustom = !!backgroundImageOffsetContext.value;
7604
- const rowRef = useRef20(null);
7724
+ const rowRef = useRef22(null);
7605
7725
  const handlePositionChange = (event) => {
7606
7726
  const value = event.target.value || null;
7607
7727
  if (value === "custom") {
@@ -7674,7 +7794,7 @@ var BackgroundImageOverlayRepeat = () => {
7674
7794
 
7675
7795
  // src/controls/background-control/background-overlay/background-image-overlay/background-image-overlay-size.tsx
7676
7796
  import * as React99 from "react";
7677
- import { useRef as useRef21 } from "react";
7797
+ import { useRef as useRef23 } from "react";
7678
7798
  import { backgroundImageSizeScalePropTypeUtil, stringPropTypeUtil as stringPropTypeUtil17 } from "@elementor/editor-props";
7679
7799
  import {
7680
7800
  ArrowBarBothIcon,
@@ -7716,7 +7836,7 @@ var BackgroundImageOverlaySize = () => {
7716
7836
  const backgroundImageScaleContext = useBoundProp(backgroundImageSizeScalePropTypeUtil);
7717
7837
  const stringPropContext = useBoundProp(stringPropTypeUtil17);
7718
7838
  const isCustom = !!backgroundImageScaleContext.value;
7719
- const rowRef = useRef21(null);
7839
+ const rowRef = useRef23(null);
7720
7840
  const handleSizeChange = (size) => {
7721
7841
  if (size === "custom") {
7722
7842
  backgroundImageScaleContext.setValue({ width: null, height: null });
@@ -7751,7 +7871,7 @@ var BackgroundImageOverlaySize = () => {
7751
7871
  };
7752
7872
 
7753
7873
  // src/controls/background-control/background-overlay/use-background-tabs-history.ts
7754
- import { useRef as useRef22 } from "react";
7874
+ import { useRef as useRef24 } from "react";
7755
7875
  import {
7756
7876
  backgroundColorOverlayPropTypeUtil,
7757
7877
  backgroundGradientOverlayPropTypeUtil as backgroundGradientOverlayPropTypeUtil2,
@@ -7776,7 +7896,7 @@ var useBackgroundTabsHistory = ({
7776
7896
  return "image";
7777
7897
  };
7778
7898
  const { getTabsProps, getTabProps, getTabPanelProps } = useTabs(getCurrentOverlayType());
7779
- const valuesHistory = useRef22({
7899
+ const valuesHistory = useRef24({
7780
7900
  image: initialBackgroundImageOverlay,
7781
7901
  color: initialBackgroundColorOverlay2,
7782
7902
  gradient: initialBackgroundGradientOverlay2
@@ -8027,7 +8147,7 @@ var BackgroundClipField = () => {
8027
8147
 
8028
8148
  // src/controls/repeatable-control.tsx
8029
8149
  import * as React102 from "react";
8030
- import { useMemo as useMemo13 } from "react";
8150
+ import { useMemo as useMemo14 } from "react";
8031
8151
  import { createArrayPropUtils as createArrayPropUtils2 } from "@elementor/editor-props";
8032
8152
  import { Box as Box26 } from "@elementor/ui";
8033
8153
  var PLACEHOLDER_REGEX = /\$\{([^}]+)\}/g;
@@ -8048,11 +8168,11 @@ var RepeatableControl = createControl(
8048
8168
  if (!childPropTypeUtil) {
8049
8169
  return null;
8050
8170
  }
8051
- const childArrayPropTypeUtil2 = useMemo13(
8171
+ const childArrayPropTypeUtil2 = useMemo14(
8052
8172
  () => createArrayPropUtils2(childPropTypeUtil.key, childPropTypeUtil.schema, propKey),
8053
8173
  [childPropTypeUtil.key, childPropTypeUtil.schema, propKey]
8054
8174
  );
8055
- const contextValue = useMemo13(
8175
+ const contextValue = useMemo14(
8056
8176
  () => ({
8057
8177
  ...childControlConfig,
8058
8178
  placeholder: placeholder || "",
@@ -8184,7 +8304,7 @@ var getAllProperties = (pattern) => {
8184
8304
 
8185
8305
  // src/controls/key-value-control.tsx
8186
8306
  import * as React103 from "react";
8187
- import { useMemo as useMemo14, useState as useState24 } from "react";
8307
+ import { useMemo as useMemo15, useState as useState25 } from "react";
8188
8308
  import {
8189
8309
  isTransformable,
8190
8310
  keyValuePropTypeUtil,
@@ -8215,9 +8335,9 @@ var getInitialFieldValue = (fieldValue) => {
8215
8335
  };
8216
8336
  var KeyValueControl = createControl((props = {}) => {
8217
8337
  const { value, setValue, ...propContext } = useBoundProp(keyValuePropTypeUtil);
8218
- const [keyError, setKeyError] = useState24("");
8219
- const [valueError, setValueError] = useState24("");
8220
- const [sessionState, setSessionState] = useState24({
8338
+ const [keyError, setKeyError] = useState25("");
8339
+ const [valueError, setValueError] = useState25("");
8340
+ const [sessionState, setSessionState] = useState25({
8221
8341
  key: getInitialFieldValue(value?.key),
8222
8342
  value: getInitialFieldValue(value?.value)
8223
8343
  });
@@ -8227,7 +8347,7 @@ var KeyValueControl = createControl((props = {}) => {
8227
8347
  keyHelper: void 0,
8228
8348
  valueHelper: void 0
8229
8349
  };
8230
- const [keyRegex, valueRegex, errMsg] = useMemo14(
8350
+ const [keyRegex, valueRegex, errMsg] = useMemo15(
8231
8351
  () => [
8232
8352
  props.regexKey ? new RegExp(props.regexKey) : void 0,
8233
8353
  props.regexValue ? new RegExp(props.regexValue) : void 0,
@@ -8359,7 +8479,7 @@ var PositionControl = () => {
8359
8479
 
8360
8480
  // src/controls/transform-control/transform-repeater-control.tsx
8361
8481
  import * as React117 from "react";
8362
- import { useRef as useRef30 } from "react";
8482
+ import { useRef as useRef32 } from "react";
8363
8483
  import { transformFunctionsPropTypeUtil, transformPropTypeUtil } from "@elementor/editor-props";
8364
8484
  import { AdjustmentsIcon as AdjustmentsIcon2, InfoCircleFilledIcon as InfoCircleFilledIcon2 } from "@elementor/icons";
8365
8485
  import { bindTrigger as bindTrigger5, Box as Box30, IconButton as IconButton10, Tooltip as Tooltip12, Typography as Typography12, usePopupState as usePopupState10 } from "@elementor/ui";
@@ -8423,7 +8543,7 @@ import { __ as __55 } from "@wordpress/i18n";
8423
8543
 
8424
8544
  // src/controls/transform-control/functions/move.tsx
8425
8545
  import * as React106 from "react";
8426
- import { useRef as useRef23 } from "react";
8546
+ import { useRef as useRef25 } from "react";
8427
8547
  import { moveTransformPropTypeUtil } from "@elementor/editor-props";
8428
8548
  import { ArrowDownLeftIcon, ArrowDownSmallIcon, ArrowRightIcon } from "@elementor/icons";
8429
8549
  import { Grid as Grid22 } from "@elementor/ui";
@@ -8470,7 +8590,7 @@ var moveAxisControls = [
8470
8590
  ];
8471
8591
  var Move = () => {
8472
8592
  const context = useBoundProp(moveTransformPropTypeUtil);
8473
- const rowRefs = [useRef23(null), useRef23(null), useRef23(null)];
8593
+ const rowRefs = [useRef25(null), useRef25(null), useRef25(null)];
8474
8594
  return /* @__PURE__ */ React106.createElement(Grid22, { container: true, spacing: 1.5 }, /* @__PURE__ */ React106.createElement(PropProvider, { ...context }, /* @__PURE__ */ React106.createElement(PropKeyProvider, { bind: TransformFunctionKeys.move }, moveAxisControls.map((control, index) => /* @__PURE__ */ React106.createElement(
8475
8595
  AxisRow,
8476
8596
  {
@@ -8485,7 +8605,7 @@ var Move = () => {
8485
8605
 
8486
8606
  // src/controls/transform-control/functions/rotate.tsx
8487
8607
  import * as React107 from "react";
8488
- import { useRef as useRef24 } from "react";
8608
+ import { useRef as useRef26 } from "react";
8489
8609
  import { rotateTransformPropTypeUtil as rotateTransformPropTypeUtil2 } from "@elementor/editor-props";
8490
8610
  import { Arrow360Icon, RotateClockwiseIcon } from "@elementor/icons";
8491
8611
  import { Grid as Grid23 } from "@elementor/ui";
@@ -8510,7 +8630,7 @@ var rotateAxisControls = [
8510
8630
  var rotateUnits = ["deg", "rad", "grad", "turn"];
8511
8631
  var Rotate = () => {
8512
8632
  const context = useBoundProp(rotateTransformPropTypeUtil2);
8513
- const rowRefs = [useRef24(null), useRef24(null), useRef24(null)];
8633
+ const rowRefs = [useRef26(null), useRef26(null), useRef26(null)];
8514
8634
  return /* @__PURE__ */ React107.createElement(Grid23, { container: true, spacing: 1.5 }, /* @__PURE__ */ React107.createElement(PropProvider, { ...context }, /* @__PURE__ */ React107.createElement(PropKeyProvider, { bind: TransformFunctionKeys.rotate }, rotateAxisControls.map((control, index) => /* @__PURE__ */ React107.createElement(
8515
8635
  AxisRow,
8516
8636
  {
@@ -8524,7 +8644,7 @@ var Rotate = () => {
8524
8644
 
8525
8645
  // src/controls/transform-control/functions/scale.tsx
8526
8646
  import * as React109 from "react";
8527
- import { useRef as useRef25 } from "react";
8647
+ import { useRef as useRef27 } from "react";
8528
8648
  import { scaleTransformPropTypeUtil as scaleTransformPropTypeUtil2 } from "@elementor/editor-props";
8529
8649
  import { ArrowDownLeftIcon as ArrowDownLeftIcon2, ArrowDownSmallIcon as ArrowDownSmallIcon2, ArrowRightIcon as ArrowRightIcon2 } from "@elementor/icons";
8530
8650
  import { Grid as Grid25 } from "@elementor/ui";
@@ -8557,13 +8677,13 @@ var scaleAxisControls = [
8557
8677
  ];
8558
8678
  var Scale = () => {
8559
8679
  const context = useBoundProp(scaleTransformPropTypeUtil2);
8560
- const rowRefs = [useRef25(null), useRef25(null), useRef25(null)];
8680
+ const rowRefs = [useRef27(null), useRef27(null), useRef27(null)];
8561
8681
  return /* @__PURE__ */ React109.createElement(Grid25, { container: true, spacing: 1.5 }, /* @__PURE__ */ React109.createElement(PropProvider, { ...context }, /* @__PURE__ */ React109.createElement(PropKeyProvider, { bind: TransformFunctionKeys.scale }, scaleAxisControls.map((control, index) => /* @__PURE__ */ React109.createElement(ScaleAxisRow, { key: control.bind, ...control, anchorRef: rowRefs[index] })))));
8562
8682
  };
8563
8683
 
8564
8684
  // src/controls/transform-control/functions/skew.tsx
8565
8685
  import * as React110 from "react";
8566
- import { useRef as useRef26 } from "react";
8686
+ import { useRef as useRef28 } from "react";
8567
8687
  import { skewTransformPropTypeUtil as skewTransformPropTypeUtil2 } from "@elementor/editor-props";
8568
8688
  import { ArrowLeftIcon, ArrowRightIcon as ArrowRightIcon3 } from "@elementor/icons";
8569
8689
  import { Grid as Grid26 } from "@elementor/ui";
@@ -8583,7 +8703,7 @@ var skewAxisControls = [
8583
8703
  var skewUnits = ["deg", "rad", "grad", "turn"];
8584
8704
  var Skew = () => {
8585
8705
  const context = useBoundProp(skewTransformPropTypeUtil2);
8586
- const rowRefs = [useRef26(null), useRef26(null), useRef26(null)];
8706
+ const rowRefs = [useRef28(null), useRef28(null), useRef28(null)];
8587
8707
  return /* @__PURE__ */ React110.createElement(Grid26, { container: true, spacing: 1.5 }, /* @__PURE__ */ React110.createElement(PropProvider, { ...context }, /* @__PURE__ */ React110.createElement(PropKeyProvider, { bind: TransformFunctionKeys.skew }, skewAxisControls.map((control, index) => /* @__PURE__ */ React110.createElement(
8588
8708
  AxisRow,
8589
8709
  {
@@ -8596,7 +8716,7 @@ var Skew = () => {
8596
8716
  };
8597
8717
 
8598
8718
  // src/controls/transform-control/use-transform-tabs-history.tsx
8599
- import { useRef as useRef27 } from "react";
8719
+ import { useRef as useRef29 } from "react";
8600
8720
  import {
8601
8721
  moveTransformPropTypeUtil as moveTransformPropTypeUtil2,
8602
8722
  rotateTransformPropTypeUtil as rotateTransformPropTypeUtil3,
@@ -8628,7 +8748,7 @@ var useTransformTabsHistory = ({
8628
8748
  }
8629
8749
  };
8630
8750
  const { getTabsProps, getTabProps, getTabPanelProps } = useTabs2(getCurrentTransformType());
8631
- const valuesHistory = useRef27({
8751
+ const valuesHistory = useRef29({
8632
8752
  move: initialMove,
8633
8753
  scale: initialScale,
8634
8754
  rotate: initialRotate,
@@ -8772,7 +8892,7 @@ import { __ as __59 } from "@wordpress/i18n";
8772
8892
 
8773
8893
  // src/controls/transform-control/transform-base-controls/children-perspective-control.tsx
8774
8894
  import * as React114 from "react";
8775
- import { useRef as useRef28 } from "react";
8895
+ import { useRef as useRef30 } from "react";
8776
8896
  import { perspectiveOriginPropTypeUtil } from "@elementor/editor-props";
8777
8897
  import { Grid as Grid27, Stack as Stack19 } from "@elementor/ui";
8778
8898
  import { __ as __57 } from "@wordpress/i18n";
@@ -8804,13 +8924,13 @@ var PerspectiveOriginControlProvider = () => {
8804
8924
  return /* @__PURE__ */ React114.createElement(PropProvider, { ...context }, CHILDREN_PERSPECTIVE_FIELDS.map((control) => /* @__PURE__ */ React114.createElement(PropKeyProvider, { bind: control.bind, key: control.bind }, /* @__PURE__ */ React114.createElement(ControlFields, { control }))));
8805
8925
  };
8806
8926
  var ControlFields = ({ control }) => {
8807
- const rowRef = useRef28(null);
8927
+ const rowRef = useRef30(null);
8808
8928
  return /* @__PURE__ */ React114.createElement(PopoverGridContainer, { ref: rowRef }, /* @__PURE__ */ React114.createElement(Grid27, { item: true, xs: 6 }, /* @__PURE__ */ React114.createElement(ControlFormLabel, null, control.label)), /* @__PURE__ */ React114.createElement(Grid27, { item: true, xs: 6 }, /* @__PURE__ */ React114.createElement(SizeControl, { variant: "length", units: control.units, anchorRef: rowRef, disableCustom: true })));
8809
8929
  };
8810
8930
 
8811
8931
  // src/controls/transform-control/transform-base-controls/transform-origin-control.tsx
8812
8932
  import * as React115 from "react";
8813
- import { useRef as useRef29 } from "react";
8933
+ import { useRef as useRef31 } from "react";
8814
8934
  import { transformOriginPropTypeUtil } from "@elementor/editor-props";
8815
8935
  import { Grid as Grid28, Stack as Stack20 } from "@elementor/ui";
8816
8936
  import { __ as __58 } from "@wordpress/i18n";
@@ -8838,7 +8958,7 @@ var TransformOriginControl = () => {
8838
8958
  };
8839
8959
  var ControlFields2 = ({ control }) => {
8840
8960
  const context = useBoundProp(transformOriginPropTypeUtil);
8841
- const rowRef = useRef29(null);
8961
+ const rowRef = useRef31(null);
8842
8962
  return /* @__PURE__ */ React115.createElement(PropProvider, { ...context }, /* @__PURE__ */ React115.createElement(PropKeyProvider, { bind: control.bind }, /* @__PURE__ */ React115.createElement(PopoverGridContainer, { ref: rowRef }, /* @__PURE__ */ React115.createElement(Grid28, { item: true, xs: 6 }, /* @__PURE__ */ React115.createElement(ControlFormLabel, null, control.label)), /* @__PURE__ */ React115.createElement(Grid28, { item: true, xs: 6 }, /* @__PURE__ */ React115.createElement(SizeControl, { variant: "length", units: control.units, anchorRef: rowRef })))));
8843
8963
  };
8844
8964
 
@@ -8886,7 +9006,7 @@ var SIZE11 = "tiny";
8886
9006
  var TransformRepeaterControl = createControl(
8887
9007
  ({ showChildrenPerspective }) => {
8888
9008
  const context = useBoundProp(transformPropTypeUtil);
8889
- const headerRef = useRef30(null);
9009
+ const headerRef = useRef32(null);
8890
9010
  const popupState = usePopupState10({ variant: "popover" });
8891
9011
  return /* @__PURE__ */ React117.createElement(PropProvider, { ...context }, /* @__PURE__ */ React117.createElement(
8892
9012
  TransformSettingsControl,
@@ -8966,7 +9086,7 @@ var TransformBasePopoverTrigger = ({
8966
9086
 
8967
9087
  // src/controls/transition-control/transition-repeater-control.tsx
8968
9088
  import * as React120 from "react";
8969
- import { useEffect as useEffect18, useMemo as useMemo17, useState as useState25 } from "react";
9089
+ import { useEffect as useEffect19, useMemo as useMemo18, useState as useState26 } from "react";
8970
9090
  import {
8971
9091
  createArrayPropUtils as createArrayPropUtils3,
8972
9092
  selectionSizePropTypeUtil as selectionSizePropTypeUtil2
@@ -8978,15 +9098,15 @@ import { __ as __63 } from "@wordpress/i18n";
8978
9098
 
8979
9099
  // src/controls/selection-size-control.tsx
8980
9100
  import * as React118 from "react";
8981
- import { useMemo as useMemo15, useRef as useRef31 } from "react";
9101
+ import { useMemo as useMemo16, useRef as useRef33 } from "react";
8982
9102
  import { selectionSizePropTypeUtil } from "@elementor/editor-props";
8983
9103
  import { Grid as Grid29 } from "@elementor/ui";
8984
9104
  var SelectionSizeControl = createControl(
8985
9105
  ({ selectionLabel, sizeLabel, selectionConfig, sizeConfigMap }) => {
8986
9106
  const { value, setValue, propType } = useBoundProp(selectionSizePropTypeUtil);
8987
- const rowRef = useRef31(null);
9107
+ const rowRef = useRef33(null);
8988
9108
  const sizeFieldId = sizeLabel.replace(/\s+/g, "-").toLowerCase();
8989
- const currentSizeConfig = useMemo15(() => {
9109
+ const currentSizeConfig = useMemo16(() => {
8990
9110
  switch (value.selection.$$type) {
8991
9111
  case "key-value":
8992
9112
  return sizeConfigMap[value?.selection?.value.value.value || ""];
@@ -9199,7 +9319,7 @@ function subscribeToTransitionEvent() {
9199
9319
 
9200
9320
  // src/controls/transition-control/transition-selector.tsx
9201
9321
  import * as React119 from "react";
9202
- import { useMemo as useMemo16, useRef as useRef32 } from "react";
9322
+ import { useMemo as useMemo17, useRef as useRef34 } from "react";
9203
9323
  import { keyValuePropTypeUtil as keyValuePropTypeUtil2 } from "@elementor/editor-props";
9204
9324
  import { PromotionAlert, PromotionChip } from "@elementor/editor-ui";
9205
9325
  import { ChevronDownIcon as ChevronDownIcon3, VariationsIcon } from "@elementor/icons";
@@ -9245,9 +9365,9 @@ var TransitionSelector = ({
9245
9365
  const {
9246
9366
  key: { value: transitionLabel }
9247
9367
  } = value;
9248
- const defaultRef = useRef32(null);
9368
+ const defaultRef = useRef34(null);
9249
9369
  const popoverState = usePopupState11({ variant: "popover" });
9250
- const disabledCategories = useMemo16(() => {
9370
+ const disabledCategories = useMemo17(() => {
9251
9371
  return new Set(
9252
9372
  transitionProperties.filter((cat) => cat.properties.some((prop) => prop.isDisabled)).map((cat) => cat.label)
9253
9373
  );
@@ -9473,14 +9593,14 @@ var TransitionRepeaterControl = createControl(
9473
9593
  currentStyleState
9474
9594
  }) => {
9475
9595
  const currentStyleIsNormal = currentStyleState === null;
9476
- const [recentlyUsedList, setRecentlyUsedList] = useState25([]);
9596
+ const [recentlyUsedList, setRecentlyUsedList] = useState26([]);
9477
9597
  const proInstalled = hasProInstalled2();
9478
9598
  const { value, setValue } = useBoundProp(childArrayPropTypeUtil);
9479
- const { allDisabled: disabledItems, proDisabled: proDisabledItems } = useMemo17(
9599
+ const { allDisabled: disabledItems, proDisabled: proDisabledItems } = useMemo18(
9480
9600
  () => getDisabledItemLabels(value),
9481
9601
  [value]
9482
9602
  );
9483
- const allowedTransitionSet = useMemo17(() => {
9603
+ const allowedTransitionSet = useMemo18(() => {
9484
9604
  const set = /* @__PURE__ */ new Set();
9485
9605
  transitionProperties.forEach((category) => {
9486
9606
  category.properties.forEach((prop) => {
@@ -9491,7 +9611,7 @@ var TransitionRepeaterControl = createControl(
9491
9611
  });
9492
9612
  return set;
9493
9613
  }, [proInstalled]);
9494
- useEffect18(() => {
9614
+ useEffect19(() => {
9495
9615
  if (!value || value.length === 0) {
9496
9616
  return;
9497
9617
  }
@@ -9503,10 +9623,10 @@ var TransitionRepeaterControl = createControl(
9503
9623
  setValue(sanitized);
9504
9624
  }
9505
9625
  }, [allowedTransitionSet]);
9506
- useEffect18(() => {
9626
+ useEffect19(() => {
9507
9627
  recentlyUsedListGetter().then(setRecentlyUsedList);
9508
9628
  }, [recentlyUsedListGetter]);
9509
- const allPropertiesUsed = useMemo17(() => areAllPropertiesUsed(value), [value]);
9629
+ const allPropertiesUsed = useMemo18(() => areAllPropertiesUsed(value), [value]);
9510
9630
  const isAddItemDisabled = !currentStyleIsNormal || allPropertiesUsed;
9511
9631
  return /* @__PURE__ */ React120.createElement(
9512
9632
  RepeatableControl,
@@ -9789,13 +9909,13 @@ var BoundTimeStringControl = ({ bind, ariaLabel }) => {
9789
9909
 
9790
9910
  // src/controls/inline-editing-control.tsx
9791
9911
  import * as React129 from "react";
9792
- import { useCallback as useCallback4, useState as useState27 } from "react";
9912
+ import { useCallback as useCallback4, useState as useState28 } from "react";
9793
9913
  import { escapedHtmlPropTypeUtil as escapedHtmlPropTypeUtil2 } from "@elementor/editor-props";
9794
9914
  import { Box as Box36, Stack as Stack24 } from "@elementor/ui";
9795
9915
 
9796
9916
  // src/components/inline-editor.tsx
9797
9917
  import * as React126 from "react";
9798
- import { useEffect as useEffect19, useRef as useRef33 } from "react";
9918
+ import { useEffect as useEffect20, useRef as useRef35 } from "react";
9799
9919
  import { Box as Box34 } from "@elementor/ui";
9800
9920
  import Bold from "@tiptap/extension-bold";
9801
9921
  import Document from "@tiptap/extension-document";
@@ -9858,8 +9978,8 @@ var InlineEditor = React126.forwardRef((props, ref) => {
9858
9978
  onSelectionEnd,
9859
9979
  mountElement = null
9860
9980
  } = props;
9861
- const containerRef = useRef33(null);
9862
- const onBlurRef = useRef33(onBlur);
9981
+ const containerRef = useRef35(null);
9982
+ const onBlurRef = useRef35(onBlur);
9863
9983
  onBlurRef.current = onBlur;
9864
9984
  const documentContentSettings = !!expectedTag ? "block+" : "inline*";
9865
9985
  const onUpdate = ({ editor: updatedEditor }) => {
@@ -9957,8 +10077,8 @@ var InlineEditor = React126.forwardRef((props, ref) => {
9957
10077
  return /* @__PURE__ */ React126.createElement(Box34, { ref: containerRef, sx, className: wrapperClassName }, /* @__PURE__ */ React126.createElement(EditorContent, { ref, editor }));
9958
10078
  });
9959
10079
  var useOnUpdate = (callback, dependencies) => {
9960
- const hasMounted = useRef33(false);
9961
- useEffect19(() => {
10080
+ const hasMounted = useRef35(false);
10081
+ useEffect20(() => {
9962
10082
  if (hasMounted.current) {
9963
10083
  callback();
9964
10084
  } else {
@@ -9969,7 +10089,7 @@ var useOnUpdate = (callback, dependencies) => {
9969
10089
 
9970
10090
  // src/components/inline-editor-toolbar.tsx
9971
10091
  import * as React128 from "react";
9972
- import { useEffect as useEffect21, useMemo as useMemo18, useRef as useRef35, useState as useState26 } from "react";
10092
+ import { useEffect as useEffect22, useMemo as useMemo19, useRef as useRef37, useState as useState27 } from "react";
9973
10093
  import { getContainer as getContainer2, getElementSetting } from "@elementor/editor-elements";
9974
10094
  import {
9975
10095
  BoldIcon,
@@ -9995,7 +10115,7 @@ import { __ as __67 } from "@wordpress/i18n";
9995
10115
 
9996
10116
  // src/components/url-popover.tsx
9997
10117
  import * as React127 from "react";
9998
- import { useEffect as useEffect20, useRef as useRef34 } from "react";
10118
+ import { useEffect as useEffect21, useRef as useRef36 } from "react";
9999
10119
  import { ExternalLinkIcon } from "@elementor/icons";
10000
10120
  import { bindPopover as bindPopover8, Popover as Popover9, Stack as Stack23, TextField as TextField11, ToggleButton as ToggleButton3, Tooltip as Tooltip13 } from "@elementor/ui";
10001
10121
  import { __ as __66 } from "@wordpress/i18n";
@@ -10008,8 +10128,8 @@ var UrlPopover = ({
10008
10128
  openInNewTab,
10009
10129
  onToggleNewTab
10010
10130
  }) => {
10011
- const inputRef = useRef34(null);
10012
- useEffect20(() => {
10131
+ const inputRef = useRef36(null);
10132
+ useEffect21(() => {
10013
10133
  if (popupState.isOpen) {
10014
10134
  requestAnimationFrame(() => inputRef.current?.focus());
10015
10135
  }
@@ -10064,16 +10184,16 @@ var InlineEditorToolbar = ({
10064
10184
  sx = {},
10065
10185
  inControlPanel = false
10066
10186
  }) => {
10067
- const [urlValue, setUrlValue] = useState26("");
10068
- const [openInNewTab, setOpenInNewTab] = useState26(false);
10069
- const toolbarRef = useRef35(null);
10187
+ const [urlValue, setUrlValue] = useState27("");
10188
+ const [openInNewTab, setOpenInNewTab] = useState27(false);
10189
+ const toolbarRef = useRef37(null);
10070
10190
  const linkPopupState = usePopupState12({ variant: "popover" });
10071
10191
  const isElementClickable = elementId ? checkIfElementIsClickable(elementId) : false;
10072
10192
  const editorState = useEditorState({
10073
10193
  editor,
10074
10194
  selector: (ctx) => possibleFormats.filter((format) => ctx.editor.isActive(format))
10075
10195
  });
10076
- const formatButtonsList = useMemo18(() => {
10196
+ const formatButtonsList = useMemo19(() => {
10077
10197
  const buttons = Object.values(formatButtons);
10078
10198
  if (isElementClickable) {
10079
10199
  return buttons.filter((button) => button.action !== "link");
@@ -10110,7 +10230,7 @@ var InlineEditorToolbar = ({
10110
10230
  }
10111
10231
  linkPopupState.close();
10112
10232
  };
10113
- useEffect21(() => {
10233
+ useEffect22(() => {
10114
10234
  if (!inControlPanel) {
10115
10235
  editor?.commands?.focus();
10116
10236
  }
@@ -10292,7 +10412,7 @@ var InlineEditingControl = createControl(
10292
10412
  const { setValue, placeholder, value } = useBoundProp(escapedHtmlPropTypeUtil2);
10293
10413
  const { value: rawValue } = usePropKeyContext();
10294
10414
  const content = value ?? extractInlineHtmlContent(rawValue);
10295
- const [editor, setEditor] = useState27(null);
10415
+ const [editor, setEditor] = useState28(null);
10296
10416
  const handleChange = useCallback4(
10297
10417
  (newValue) => {
10298
10418
  const html = newValue ?? "";
@@ -10480,7 +10600,7 @@ function useFormFieldSuggestions(options) {
10480
10600
 
10481
10601
  // src/controls/email-form-action-control/email-chips-field.tsx
10482
10602
  import * as React130 from "react";
10483
- import { useMemo as useMemo19, useState as useState28 } from "react";
10603
+ import { useMemo as useMemo20, useState as useState29 } from "react";
10484
10604
  import { stringArrayPropTypeUtil as stringArrayPropTypeUtil3, stringPropTypeUtil as stringPropTypeUtil23 } from "@elementor/editor-props";
10485
10605
  import { Autocomplete as Autocomplete4, Grid as Grid32, TextField as TextField12 } from "@elementor/ui";
10486
10606
 
@@ -10518,10 +10638,10 @@ function resolveMention(raw, suggestions) {
10518
10638
  }
10519
10639
  var EmailChipsControl = createControl(({ placeholder, suggestions = [] }) => {
10520
10640
  const { value, setValue, disabled } = useBoundProp(stringArrayPropTypeUtil3);
10521
- const [inputValue, setInputValue] = useState28("");
10641
+ const [inputValue, setInputValue] = useState29("");
10522
10642
  const items2 = value || [];
10523
10643
  const selectedValues = items2.map((item) => stringPropTypeUtil23.extract(item)).filter((val) => val !== null);
10524
- const suggestionOptions = useMemo19(
10644
+ const suggestionOptions = useMemo20(
10525
10645
  () => suggestions.map((suggestion) => `[${suggestion.value}]`),
10526
10646
  [suggestions]
10527
10647
  );
@@ -10749,14 +10869,14 @@ var GridSpanControl = createControl(
10749
10869
 
10750
10870
  // src/components/promotions/display-conditions-control.tsx
10751
10871
  import * as React137 from "react";
10752
- import { useRef as useRef36 } from "react";
10872
+ import { useRef as useRef38 } from "react";
10753
10873
  import { SitemapIcon } from "@elementor/icons";
10754
10874
  import { IconButton as IconButton12, Stack as Stack27, Tooltip as Tooltip15 } from "@elementor/ui";
10755
10875
  import { __ as __71 } from "@wordpress/i18n";
10756
10876
 
10757
10877
  // src/components/promotions/promotion-trigger.tsx
10758
10878
  import * as React136 from "react";
10759
- import { forwardRef as forwardRef14, useCallback as useCallback5, useImperativeHandle, useState as useState29 } from "react";
10879
+ import { forwardRef as forwardRef14, useCallback as useCallback5, useImperativeHandle, useState as useState30 } from "react";
10760
10880
  import { PromotionChip as PromotionChip2, PromotionInfotip } from "@elementor/editor-ui";
10761
10881
  import { Box as Box38 } from "@elementor/ui";
10762
10882
  function getV4Promotion(key) {
@@ -10764,7 +10884,7 @@ function getV4Promotion(key) {
10764
10884
  }
10765
10885
  var PromotionTrigger = forwardRef14(
10766
10886
  ({ promotionKey, children, trackingData }, ref) => {
10767
- const [isOpen, setIsOpen] = useState29(false);
10887
+ const [isOpen, setIsOpen] = useState30(false);
10768
10888
  const promotion = getV4Promotion(promotionKey);
10769
10889
  const toggle = useCallback5(() => {
10770
10890
  setIsOpen((prev) => {
@@ -10808,7 +10928,7 @@ var PromotionTrigger = forwardRef14(
10808
10928
  var ARIA_LABEL = __71("Display Conditions", "elementor");
10809
10929
  var TRACKING_DATA2 = { target_name: "display_conditions", location_l2: "general" };
10810
10930
  var DisplayConditionsControl = createControl(() => {
10811
- const triggerRef = useRef36(null);
10931
+ const triggerRef = useRef38(null);
10812
10932
  return /* @__PURE__ */ React137.createElement(
10813
10933
  Stack27,
10814
10934
  {
@@ -10840,14 +10960,14 @@ var DisplayConditionsControl = createControl(() => {
10840
10960
 
10841
10961
  // src/components/promotions/attributes-control.tsx
10842
10962
  import * as React138 from "react";
10843
- import { useRef as useRef37 } from "react";
10963
+ import { useRef as useRef39 } from "react";
10844
10964
  import { PlusIcon as PlusIcon4 } from "@elementor/icons";
10845
10965
  import { Stack as Stack28, Tooltip as Tooltip16 } from "@elementor/ui";
10846
10966
  import { __ as __72 } from "@wordpress/i18n";
10847
10967
  var ARIA_LABEL2 = __72("Attributes", "elementor");
10848
10968
  var TRACKING_DATA3 = { target_name: "attributes", location_l2: "general" };
10849
10969
  var AttributesControl = createControl(() => {
10850
- const triggerRef = useRef37(null);
10970
+ const triggerRef = useRef39(null);
10851
10971
  return /* @__PURE__ */ React138.createElement(
10852
10972
  Stack28,
10853
10973
  {
@@ -10884,7 +11004,7 @@ var ClearIconButton = ({ tooltipText, onClick, disabled, size = "tiny" }) => /*
10884
11004
 
10885
11005
  // src/components/repeater/repeater.tsx
10886
11006
  import * as React140 from "react";
10887
- import { useEffect as useEffect22, useState as useState30 } from "react";
11007
+ import { useEffect as useEffect23, useState as useState31 } from "react";
10888
11008
  import { CopyIcon as CopyIcon2, EyeIcon as EyeIcon2, EyeOffIcon as EyeOffIcon2, PlusIcon as PlusIcon5, XIcon as XIcon4 } from "@elementor/icons";
10889
11009
  import {
10890
11010
  bindPopover as bindPopover9,
@@ -10914,7 +11034,7 @@ var Repeater3 = ({
10914
11034
  isSortable = true,
10915
11035
  adornment = ControlAdornments
10916
11036
  }) => {
10917
- const [openItem, setOpenItem] = useState30(initialOpenItem);
11037
+ const [openItem, setOpenItem] = useState31(initialOpenItem);
10918
11038
  const uniqueKeys = items2.map(
10919
11039
  (item, index) => isSortable && "getId" in itemSettings ? itemSettings.getId({ item, index }) : String(index)
10920
11040
  );
@@ -11090,10 +11210,10 @@ var RepeaterItem = ({
11090
11210
  ), /* @__PURE__ */ React140.createElement(RepeaterPopover, { width: ref?.getBoundingClientRect().width, ...popoverProps, anchorEl: ref }, /* @__PURE__ */ React140.createElement(Box39, null, children({ anchorEl: ref }))));
11091
11211
  };
11092
11212
  var usePopover = (openOnMount, onOpen, onPopoverClose) => {
11093
- const [ref, setRef] = useState30(null);
11213
+ const [ref, setRef] = useState31(null);
11094
11214
  const popoverState = usePopupState13({ variant: "popover" });
11095
11215
  const popoverProps = bindPopover9(popoverState);
11096
- useEffect22(() => {
11216
+ useEffect23(() => {
11097
11217
  if (openOnMount && ref) {
11098
11218
  popoverState.open(ref);
11099
11219
  onOpen?.();
@@ -11272,7 +11392,7 @@ var hasValue = (value) => {
11272
11392
  };
11273
11393
 
11274
11394
  // src/hooks/use-font-families.ts
11275
- import { useMemo as useMemo20 } from "react";
11395
+ import { useMemo as useMemo21 } from "react";
11276
11396
  import { getElementorConfig } from "@elementor/editor-v1-adapters";
11277
11397
  var getFontControlConfig = () => {
11278
11398
  const { controls } = getElementorConfig();
@@ -11280,7 +11400,7 @@ var getFontControlConfig = () => {
11280
11400
  };
11281
11401
  var useFontFamilies = () => {
11282
11402
  const { groups, options } = getFontControlConfig();
11283
- return useMemo20(() => {
11403
+ return useMemo21(() => {
11284
11404
  if (!groups || !options) {
11285
11405
  return [];
11286
11406
  }
@@ -11390,6 +11510,7 @@ export {
11390
11510
  registerIconLibraryProvider,
11391
11511
  resetFontAwesome7IconsCache,
11392
11512
  resolveFontAwesome7Icon,
11513
+ resolveProviderIconPreviewSvg,
11393
11514
  resolveProviderIconSvg,
11394
11515
  trackUpgradePromotionClick,
11395
11516
  trackViewPromotion,