@elementor/editor-editing-panel 4.0.0-520 → 4.0.0-522

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/index.d.mts CHANGED
@@ -1318,6 +1318,13 @@ declare const registerEditingPanelReplacement: ({ id, priority, ...props }: Omit
1318
1318
  priority?: number;
1319
1319
  }) => void;
1320
1320
 
1321
+ type V4PromotionData = {
1322
+ title: string;
1323
+ content: string;
1324
+ image: string;
1325
+ ctaUrl: string;
1326
+ };
1327
+
1321
1328
  declare function doGetAppliedClasses(elementId: string, classesPropType?: string): string[];
1322
1329
  declare function doApplyClasses(elementId: string, classIds: StyleDefinitionID[], classesPropType?: string): void;
1323
1330
  declare function doUnapplyClass(elementId: string, classId: StyleDefinitionID, classesPropType?: string): boolean;
@@ -1361,4 +1368,4 @@ type TagInstance = {
1361
1368
 
1362
1369
  declare const isDynamicPropValue: (prop: PropValue) => prop is DynamicPropValue;
1363
1370
 
1364
- export { Control as BaseControl, type ControlType, CustomCssIndicator, type DynamicTag, type DynamicTags, type DynamicTagsManager, ElementProvider, FIELD_TYPE, HISTORY_DEBOUNCE_WAIT, SectionContent, SettingsControl, SettingsField, StyleIndicator, StyleTabSection, StylesProviderCannotUpdatePropsError, type ValidationEvent, type ValidationResult, controlsRegistry, createTopLevelObjectType, doApplyClasses, doGetAppliedClasses, doUnapplyClass, getFieldIndicators, getSubtitle, getTitle, init, injectIntoClassSelectorActions, injectIntoCssClassConvert, injectIntoPanelHeaderTop, injectIntoStyleTab, isDynamicPropValue, registerEditingPanelReplacement, registerFieldIndicator, registerStyleProviderToColors, setLicenseConfig, useClassesProp, useCustomCss, useElement, usePanelActions, usePanelStatus, useStateByElement, useStyle, useStylesRerender };
1371
+ export { Control as BaseControl, type ControlType, CustomCssIndicator, type DynamicTag, type DynamicTags, type DynamicTagsManager, ElementProvider, FIELD_TYPE, HISTORY_DEBOUNCE_WAIT, SectionContent, SettingsControl, SettingsField, StyleIndicator, StyleTabSection, StylesProviderCannotUpdatePropsError, type V4PromotionData, type ValidationEvent, type ValidationResult, controlsRegistry, createTopLevelObjectType, doApplyClasses, doGetAppliedClasses, doUnapplyClass, getFieldIndicators, getSubtitle, getTitle, init, injectIntoClassSelectorActions, injectIntoCssClassConvert, injectIntoPanelHeaderTop, injectIntoStyleTab, isDynamicPropValue, registerEditingPanelReplacement, registerFieldIndicator, registerStyleProviderToColors, setLicenseConfig, useClassesProp, useCustomCss, useElement, usePanelActions, usePanelStatus, useStateByElement, useStyle, useStylesRerender };
package/dist/index.d.ts CHANGED
@@ -1318,6 +1318,13 @@ declare const registerEditingPanelReplacement: ({ id, priority, ...props }: Omit
1318
1318
  priority?: number;
1319
1319
  }) => void;
1320
1320
 
1321
+ type V4PromotionData = {
1322
+ title: string;
1323
+ content: string;
1324
+ image: string;
1325
+ ctaUrl: string;
1326
+ };
1327
+
1321
1328
  declare function doGetAppliedClasses(elementId: string, classesPropType?: string): string[];
1322
1329
  declare function doApplyClasses(elementId: string, classIds: StyleDefinitionID[], classesPropType?: string): void;
1323
1330
  declare function doUnapplyClass(elementId: string, classId: StyleDefinitionID, classesPropType?: string): boolean;
@@ -1361,4 +1368,4 @@ type TagInstance = {
1361
1368
 
1362
1369
  declare const isDynamicPropValue: (prop: PropValue) => prop is DynamicPropValue;
1363
1370
 
1364
- export { Control as BaseControl, type ControlType, CustomCssIndicator, type DynamicTag, type DynamicTags, type DynamicTagsManager, ElementProvider, FIELD_TYPE, HISTORY_DEBOUNCE_WAIT, SectionContent, SettingsControl, SettingsField, StyleIndicator, StyleTabSection, StylesProviderCannotUpdatePropsError, type ValidationEvent, type ValidationResult, controlsRegistry, createTopLevelObjectType, doApplyClasses, doGetAppliedClasses, doUnapplyClass, getFieldIndicators, getSubtitle, getTitle, init, injectIntoClassSelectorActions, injectIntoCssClassConvert, injectIntoPanelHeaderTop, injectIntoStyleTab, isDynamicPropValue, registerEditingPanelReplacement, registerFieldIndicator, registerStyleProviderToColors, setLicenseConfig, useClassesProp, useCustomCss, useElement, usePanelActions, usePanelStatus, useStateByElement, useStyle, useStylesRerender };
1371
+ export { Control as BaseControl, type ControlType, CustomCssIndicator, type DynamicTag, type DynamicTags, type DynamicTagsManager, ElementProvider, FIELD_TYPE, HISTORY_DEBOUNCE_WAIT, SectionContent, SettingsControl, SettingsField, StyleIndicator, StyleTabSection, StylesProviderCannotUpdatePropsError, type V4PromotionData, type ValidationEvent, type ValidationResult, controlsRegistry, createTopLevelObjectType, doApplyClasses, doGetAppliedClasses, doUnapplyClass, getFieldIndicators, getSubtitle, getTitle, init, injectIntoClassSelectorActions, injectIntoCssClassConvert, injectIntoPanelHeaderTop, injectIntoStyleTab, isDynamicPropValue, registerEditingPanelReplacement, registerFieldIndicator, registerStyleProviderToColors, setLicenseConfig, useClassesProp, useCustomCss, useElement, usePanelActions, usePanelStatus, useStateByElement, useStyle, useStylesRerender };
package/dist/index.js CHANGED
@@ -2419,6 +2419,7 @@ var import_editor_props8 = require("@elementor/editor-props");
2419
2419
 
2420
2420
  // src/styles-inheritance/create-snapshots-manager.ts
2421
2421
  var import_editor_props7 = require("@elementor/editor-props");
2422
+ var import_editor_variables = require("@elementor/editor-variables");
2422
2423
 
2423
2424
  // src/styles-inheritance/utils.ts
2424
2425
  var DEFAULT_STATE = "normal";
@@ -2451,11 +2452,11 @@ function createSnapshotsManager(getStylesByMeta, breakpointsRoot) {
2451
2452
  )
2452
2453
  };
2453
2454
  }
2454
- if (state && !allBreakpointStatesSnapshots[currentBreakpointKey][stateKey]) {
2455
+ if (state && !allBreakpointStatesSnapshots[currentBreakpointKey]?.[stateKey]) {
2455
2456
  allBreakpointStatesSnapshots[currentBreakpointKey][stateKey] = buildStateSnapshotSlot(
2456
2457
  getStylesByMeta({ breakpoint: currentBreakpointId, state }),
2457
2458
  parentBreakpoint,
2458
- allBreakpointStatesSnapshots[currentBreakpointKey],
2459
+ allBreakpointStatesSnapshots[currentBreakpointKey] ?? {},
2459
2460
  state
2460
2461
  );
2461
2462
  }
@@ -2465,7 +2466,7 @@ function createSnapshotsManager(getStylesByMeta, breakpointsRoot) {
2465
2466
  const stateKey = getStateKey(state);
2466
2467
  const breakpointKey = getBreakpointKey(breakpoint);
2467
2468
  if (allBreakpointStatesSnapshots[breakpointKey]?.[stateKey]) {
2468
- return allBreakpointStatesSnapshots[breakpointKey][stateKey].snapshot;
2469
+ return allBreakpointStatesSnapshots[breakpointKey]?.[stateKey]?.snapshot;
2469
2470
  }
2470
2471
  const breakpointsChain = [...breakpointsInheritancePaths[breakpointKey], breakpoint];
2471
2472
  breakpointsChain.forEach((breakpointId, index) => {
@@ -2519,7 +2520,8 @@ function buildInitialSnapshotFromStyles(styles) {
2519
2520
  } = styleData;
2520
2521
  Object.entries(props).forEach(([key, value]) => {
2521
2522
  const filteredValue = (0, import_editor_props7.filterEmptyValues)(value);
2522
- if (filteredValue === null) {
2523
+ const filteredVariableValue = filteredValue?.$$type?.includes("variable") && !(0, import_editor_variables.hasVariable)(filteredValue?.value) ? null : filteredValue;
2524
+ if (filteredVariableValue === null) {
2523
2525
  return;
2524
2526
  }
2525
2527
  if (!snapshot[key]) {
@@ -2527,7 +2529,7 @@ function buildInitialSnapshotFromStyles(styles) {
2527
2529
  }
2528
2530
  const snapshotPropValue = {
2529
2531
  ...styleData,
2530
- value: filteredValue
2532
+ value: filteredVariableValue
2531
2533
  };
2532
2534
  snapshot[key].push(snapshotPropValue);
2533
2535
  });
@@ -4783,14 +4785,16 @@ var EditingPanelHooks = () => {
4783
4785
  return null;
4784
4786
  };
4785
4787
 
4788
+ // src/components/promotions/init.tsx
4789
+ var import_editor_controls50 = require("@elementor/editor-controls");
4790
+
4786
4791
  // src/components/promotions/custom-css.tsx
4787
4792
  var React83 = __toESM(require("react"));
4788
4793
  var import_react36 = require("react");
4789
4794
  var import_editor_ui8 = require("@elementor/editor-ui");
4790
4795
  var import_i18n57 = require("@wordpress/i18n");
4791
4796
  function getCustomCssPromotion() {
4792
- const extendedWindow = window;
4793
- return extendedWindow.elementor?.config?.v4Promotions?.customCss;
4797
+ return window.elementor?.config?.v4Promotions?.customCss;
4794
4798
  }
4795
4799
  var CustomCssSection = () => {
4796
4800
  const [showInfoTip, setShowInfoTip] = (0, import_react36.useState)(false);
@@ -4835,12 +4839,13 @@ var init = () => {
4835
4839
  component: CustomCssSection,
4836
4840
  options: { overwrite: true }
4837
4841
  });
4842
+ controlsRegistry.register("display-conditions", import_editor_controls50.DisplayConditionsControl, "two-columns");
4838
4843
  }
4839
4844
  };
4840
4845
 
4841
4846
  // src/controls-registry/element-controls/tabs-control/tabs-control.tsx
4842
4847
  var React84 = __toESM(require("react"));
4843
- var import_editor_controls51 = require("@elementor/editor-controls");
4848
+ var import_editor_controls52 = require("@elementor/editor-controls");
4844
4849
  var import_editor_elements17 = require("@elementor/editor-elements");
4845
4850
  var import_editor_props16 = require("@elementor/editor-props");
4846
4851
  var import_icons22 = require("@elementor/icons");
@@ -4865,14 +4870,14 @@ var getElementByType = (elementId, type) => {
4865
4870
  };
4866
4871
 
4867
4872
  // src/controls-registry/element-controls/tabs-control/use-actions.ts
4868
- var import_editor_controls50 = require("@elementor/editor-controls");
4873
+ var import_editor_controls51 = require("@elementor/editor-controls");
4869
4874
  var import_editor_elements16 = require("@elementor/editor-elements");
4870
4875
  var import_editor_props15 = require("@elementor/editor-props");
4871
4876
  var import_i18n58 = require("@wordpress/i18n");
4872
4877
  var TAB_ELEMENT_TYPE = "e-tab";
4873
4878
  var TAB_CONTENT_ELEMENT_TYPE = "e-tab-content";
4874
4879
  var useActions = () => {
4875
- const { value, setValue: setDefaultActiveTab } = (0, import_editor_controls50.useBoundProp)(import_editor_props15.numberPropTypeUtil);
4880
+ const { value, setValue: setDefaultActiveTab } = (0, import_editor_controls51.useBoundProp)(import_editor_props15.numberPropTypeUtil);
4876
4881
  const defaultActiveTab = value ?? 0;
4877
4882
  const duplicateItem = ({
4878
4883
  items: items3,
@@ -5102,7 +5107,7 @@ var TabsControlContent = ({ label }) => {
5102
5107
  }
5103
5108
  };
5104
5109
  return /* @__PURE__ */ React84.createElement(
5105
- import_editor_controls51.Repeater,
5110
+ import_editor_controls52.Repeater,
5106
5111
  {
5107
5112
  showToggle: false,
5108
5113
  values: repeaterValues,
@@ -5126,7 +5131,7 @@ var ItemLabel = ({ value, index }) => {
5126
5131
  return /* @__PURE__ */ React84.createElement(import_ui38.Stack, { sx: { minHeight: 20 }, direction: "row", alignItems: "center", gap: 1.5 }, /* @__PURE__ */ React84.createElement("span", null, elementTitle), /* @__PURE__ */ React84.createElement(ItemDefaultTab, { index }));
5127
5132
  };
5128
5133
  var ItemDefaultTab = ({ index }) => {
5129
- const { value: defaultItem } = (0, import_editor_controls51.useBoundProp)(import_editor_props16.numberPropTypeUtil);
5134
+ const { value: defaultItem } = (0, import_editor_controls52.useBoundProp)(import_editor_props16.numberPropTypeUtil);
5130
5135
  const isDefault = defaultItem === index;
5131
5136
  if (!isDefault) {
5132
5137
  return null;
@@ -5140,9 +5145,9 @@ var ItemContent = ({ value, index }) => {
5140
5145
  return /* @__PURE__ */ React84.createElement(import_ui38.Stack, { p: 2, gap: 1.5 }, /* @__PURE__ */ React84.createElement(TabLabelControl, { elementId: value.id }), /* @__PURE__ */ React84.createElement(SettingsField, { bind: "default-active-tab", propDisplayName: (0, import_i18n59.__)("Tabs", "elementor") }, /* @__PURE__ */ React84.createElement(DefaultTabControl, { tabIndex: index })));
5141
5146
  };
5142
5147
  var DefaultTabControl = ({ tabIndex }) => {
5143
- const { value, setValue } = (0, import_editor_controls51.useBoundProp)(import_editor_props16.numberPropTypeUtil);
5148
+ const { value, setValue } = (0, import_editor_controls52.useBoundProp)(import_editor_props16.numberPropTypeUtil);
5144
5149
  const isDefault = value === tabIndex;
5145
- return /* @__PURE__ */ React84.createElement(import_ui38.Stack, { direction: "row", alignItems: "center", justifyContent: "space-between", gap: 2 }, /* @__PURE__ */ React84.createElement(import_editor_controls51.ControlFormLabel, null, (0, import_i18n59.__)("Set as default tab", "elementor")), /* @__PURE__ */ React84.createElement(ConditionalTooltip, { showTooltip: isDefault, placement: "right" }, /* @__PURE__ */ React84.createElement(
5150
+ return /* @__PURE__ */ React84.createElement(import_ui38.Stack, { direction: "row", alignItems: "center", justifyContent: "space-between", gap: 2 }, /* @__PURE__ */ React84.createElement(import_editor_controls52.ControlFormLabel, null, (0, import_i18n59.__)("Set as default tab", "elementor")), /* @__PURE__ */ React84.createElement(ConditionalTooltip, { showTooltip: isDefault, placement: "right" }, /* @__PURE__ */ React84.createElement(
5146
5151
  import_ui38.Switch,
5147
5152
  {
5148
5153
  size: "small",
@@ -5160,7 +5165,7 @@ var DefaultTabControl = ({ tabIndex }) => {
5160
5165
  var TabLabelControl = ({ elementId }) => {
5161
5166
  const editorSettings = (0, import_editor_elements17.useElementEditorSettings)(elementId);
5162
5167
  const label = editorSettings?.title ?? "";
5163
- return /* @__PURE__ */ React84.createElement(import_ui38.Stack, { gap: 1 }, /* @__PURE__ */ React84.createElement(import_editor_controls51.ControlFormLabel, null, (0, import_i18n59.__)("Tab name", "elementor")), /* @__PURE__ */ React84.createElement(
5168
+ return /* @__PURE__ */ React84.createElement(import_ui38.Stack, { gap: 1 }, /* @__PURE__ */ React84.createElement(import_editor_controls52.ControlFormLabel, null, (0, import_i18n59.__)("Tab name", "elementor")), /* @__PURE__ */ React84.createElement(
5164
5169
  import_ui38.TextField,
5165
5170
  {
5166
5171
  size: "tiny",
@@ -5214,12 +5219,12 @@ var registerElementControls = () => {
5214
5219
 
5215
5220
  // src/dynamics/init.ts
5216
5221
  var import_editor_canvas3 = require("@elementor/editor-canvas");
5217
- var import_editor_controls58 = require("@elementor/editor-controls");
5222
+ var import_editor_controls59 = require("@elementor/editor-controls");
5218
5223
  var import_menus2 = require("@elementor/menus");
5219
5224
 
5220
5225
  // src/dynamics/components/background-control-dynamic-tag.tsx
5221
5226
  var React85 = __toESM(require("react"));
5222
- var import_editor_controls53 = require("@elementor/editor-controls");
5227
+ var import_editor_controls54 = require("@elementor/editor-controls");
5223
5228
  var import_editor_props18 = require("@elementor/editor-props");
5224
5229
  var import_icons23 = require("@elementor/icons");
5225
5230
 
@@ -5228,7 +5233,7 @@ var import_react39 = require("react");
5228
5233
 
5229
5234
  // src/dynamics/hooks/use-prop-dynamic-tags.ts
5230
5235
  var import_react38 = require("react");
5231
- var import_editor_controls52 = require("@elementor/editor-controls");
5236
+ var import_editor_controls53 = require("@elementor/editor-controls");
5232
5237
 
5233
5238
  // src/dynamics/sync/get-atomic-dynamic-tags.ts
5234
5239
  var import_editor_v1_adapters9 = require("@elementor/editor-v1-adapters");
@@ -5312,7 +5317,7 @@ var useAllPropDynamicTags = () => {
5312
5317
  };
5313
5318
  var usePropDynamicTagsInternal = (filterByLicense2) => {
5314
5319
  let categories = [];
5315
- const { propType } = (0, import_editor_controls52.useBoundProp)();
5320
+ const { propType } = (0, import_editor_controls53.useBoundProp)();
5316
5321
  if (propType) {
5317
5322
  const propDynamicType = getDynamicPropType(propType);
5318
5323
  categories = propDynamicType?.settings.categories || [];
@@ -5358,13 +5363,13 @@ var useDynamicTag = (tagName) => {
5358
5363
  // src/dynamics/components/background-control-dynamic-tag.tsx
5359
5364
  var BackgroundControlDynamicTagIcon = () => /* @__PURE__ */ React85.createElement(import_icons23.DatabaseIcon, { fontSize: "tiny" });
5360
5365
  var BackgroundControlDynamicTagLabel = ({ value }) => {
5361
- const context = (0, import_editor_controls53.useBoundProp)(import_editor_props18.backgroundImageOverlayPropTypeUtil);
5362
- return /* @__PURE__ */ React85.createElement(import_editor_controls53.PropProvider, { ...context, value: value.value }, /* @__PURE__ */ React85.createElement(import_editor_controls53.PropKeyProvider, { bind: "image" }, /* @__PURE__ */ React85.createElement(Wrapper2, { rawValue: value.value })));
5366
+ const context = (0, import_editor_controls54.useBoundProp)(import_editor_props18.backgroundImageOverlayPropTypeUtil);
5367
+ return /* @__PURE__ */ React85.createElement(import_editor_controls54.PropProvider, { ...context, value: value.value }, /* @__PURE__ */ React85.createElement(import_editor_controls54.PropKeyProvider, { bind: "image" }, /* @__PURE__ */ React85.createElement(Wrapper2, { rawValue: value.value })));
5363
5368
  };
5364
5369
  var Wrapper2 = ({ rawValue }) => {
5365
- const { propType } = (0, import_editor_controls53.useBoundProp)();
5370
+ const { propType } = (0, import_editor_controls54.useBoundProp)();
5366
5371
  const imageOverlayPropType = propType.prop_types["background-image-overlay"];
5367
- return /* @__PURE__ */ React85.createElement(import_editor_controls53.PropProvider, { propType: imageOverlayPropType.shape.image, value: rawValue, setValue: () => void 0 }, /* @__PURE__ */ React85.createElement(import_editor_controls53.PropKeyProvider, { bind: "src" }, /* @__PURE__ */ React85.createElement(Content, { rawValue: rawValue.image })));
5372
+ return /* @__PURE__ */ React85.createElement(import_editor_controls54.PropProvider, { propType: imageOverlayPropType.shape.image, value: rawValue, setValue: () => void 0 }, /* @__PURE__ */ React85.createElement(import_editor_controls54.PropKeyProvider, { bind: "src" }, /* @__PURE__ */ React85.createElement(Content, { rawValue: rawValue.image })));
5368
5373
  };
5369
5374
  var Content = ({ rawValue }) => {
5370
5375
  const src = rawValue.value.src;
@@ -5374,7 +5379,7 @@ var Content = ({ rawValue }) => {
5374
5379
 
5375
5380
  // src/dynamics/components/dynamic-selection-control.tsx
5376
5381
  var React89 = __toESM(require("react"));
5377
- var import_editor_controls56 = require("@elementor/editor-controls");
5382
+ var import_editor_controls57 = require("@elementor/editor-controls");
5378
5383
  var import_editor_ui10 = require("@elementor/editor-ui");
5379
5384
  var import_icons25 = require("@elementor/icons");
5380
5385
  var import_ui40 = require("@elementor/ui");
@@ -5390,7 +5395,7 @@ var usePersistDynamicValue = (propKey) => {
5390
5395
 
5391
5396
  // src/dynamics/dynamic-control.tsx
5392
5397
  var React87 = __toESM(require("react"));
5393
- var import_editor_controls54 = require("@elementor/editor-controls");
5398
+ var import_editor_controls55 = require("@elementor/editor-controls");
5394
5399
 
5395
5400
  // src/dynamics/components/dynamic-conditional-control.tsx
5396
5401
  var React86 = __toESM(require("react"));
@@ -5442,7 +5447,7 @@ var DynamicConditionalControl = ({
5442
5447
 
5443
5448
  // src/dynamics/dynamic-control.tsx
5444
5449
  var DynamicControl = ({ bind, children }) => {
5445
- const { value, setValue } = (0, import_editor_controls54.useBoundProp)(dynamicPropTypeUtil);
5450
+ const { value, setValue } = (0, import_editor_controls55.useBoundProp)(dynamicPropTypeUtil);
5446
5451
  const { name = "", group = "", settings } = value ?? {};
5447
5452
  const dynamicTag = useDynamicTag(name);
5448
5453
  if (!dynamicTag) {
@@ -5462,7 +5467,7 @@ var DynamicControl = ({ bind, children }) => {
5462
5467
  });
5463
5468
  };
5464
5469
  const propType = createTopLevelObjectType({ schema: dynamicTag.props_schema });
5465
- return /* @__PURE__ */ React87.createElement(import_editor_controls54.PropProvider, { propType, setValue: setDynamicValue, value: { [bind]: dynamicValue } }, /* @__PURE__ */ React87.createElement(import_editor_controls54.PropKeyProvider, { bind }, /* @__PURE__ */ React87.createElement(
5470
+ return /* @__PURE__ */ React87.createElement(import_editor_controls55.PropProvider, { propType, setValue: setDynamicValue, value: { [bind]: dynamicValue } }, /* @__PURE__ */ React87.createElement(import_editor_controls55.PropKeyProvider, { bind }, /* @__PURE__ */ React87.createElement(
5466
5471
  DynamicConditionalControl,
5467
5472
  {
5468
5473
  propType: dynamicPropType,
@@ -5476,7 +5481,7 @@ var DynamicControl = ({ bind, children }) => {
5476
5481
  // src/dynamics/components/dynamic-selection.tsx
5477
5482
  var import_react40 = require("react");
5478
5483
  var React88 = __toESM(require("react"));
5479
- var import_editor_controls55 = require("@elementor/editor-controls");
5484
+ var import_editor_controls56 = require("@elementor/editor-controls");
5480
5485
  var import_editor_ui9 = require("@elementor/editor-ui");
5481
5486
  var import_icons24 = require("@elementor/icons");
5482
5487
  var import_ui39 = require("@elementor/ui");
@@ -5489,8 +5494,8 @@ var DynamicSelection = ({ close: closePopover, expired = false }) => {
5489
5494
  const [searchValue, setSearchValue] = (0, import_react40.useState)("");
5490
5495
  const { groups: dynamicGroups } = getAtomicDynamicTags() || {};
5491
5496
  const theme = (0, import_ui39.useTheme)();
5492
- const { value: anyValue } = (0, import_editor_controls55.useBoundProp)();
5493
- const { bind, value: dynamicValue, setValue } = (0, import_editor_controls55.useBoundProp)(dynamicPropTypeUtil);
5497
+ const { value: anyValue } = (0, import_editor_controls56.useBoundProp)();
5498
+ const { bind, value: dynamicValue, setValue } = (0, import_editor_controls56.useBoundProp)(dynamicPropTypeUtil);
5494
5499
  const [, updatePropValueHistory] = usePersistDynamicValue(bind);
5495
5500
  const isCurrentValueDynamic = !!dynamicValue;
5496
5501
  const options12 = useFilteredOptions(searchValue);
@@ -5620,8 +5625,8 @@ var useFilteredOptions = (searchValue) => {
5620
5625
  var SIZE3 = "tiny";
5621
5626
  var tagsWithoutTabs = ["popup"];
5622
5627
  var DynamicSelectionControl = ({ OriginalControl, ...props }) => {
5623
- const { setValue: setAnyValue, propType } = (0, import_editor_controls56.useBoundProp)();
5624
- const { bind, value } = (0, import_editor_controls56.useBoundProp)(dynamicPropTypeUtil);
5628
+ const { setValue: setAnyValue, propType } = (0, import_editor_controls57.useBoundProp)();
5629
+ const { bind, value } = (0, import_editor_controls57.useBoundProp)(dynamicPropTypeUtil);
5625
5630
  const { expired: readonly } = useLicenseConfig();
5626
5631
  const originalPropType = createTopLevelObjectType({
5627
5632
  schema: {
@@ -5633,7 +5638,7 @@ var DynamicSelectionControl = ({ OriginalControl, ...props }) => {
5633
5638
  const { name: tagName = "" } = value;
5634
5639
  const dynamicTag = useDynamicTag(tagName);
5635
5640
  if (!isDynamicTagSupported(tagName) && OriginalControl) {
5636
- return /* @__PURE__ */ React89.createElement(import_editor_controls56.PropProvider, { propType: originalPropType, value: { [bind]: null }, setValue: setAnyValue }, /* @__PURE__ */ React89.createElement(import_editor_controls56.PropKeyProvider, { bind }, /* @__PURE__ */ React89.createElement(OriginalControl, { ...props })));
5641
+ return /* @__PURE__ */ React89.createElement(import_editor_controls57.PropProvider, { propType: originalPropType, value: { [bind]: null }, setValue: setAnyValue }, /* @__PURE__ */ React89.createElement(import_editor_controls57.PropKeyProvider, { bind }, /* @__PURE__ */ React89.createElement(OriginalControl, { ...props })));
5637
5642
  }
5638
5643
  const removeDynamicTag = () => {
5639
5644
  setAnyValue(propValueFromHistory ?? null);
@@ -5782,7 +5787,7 @@ var Control2 = ({ control }) => {
5782
5787
  display: "grid",
5783
5788
  gridTemplateColumns: isSwitchControl ? "minmax(0, 1fr) max-content" : "1fr 1fr"
5784
5789
  } : {};
5785
- return /* @__PURE__ */ React89.createElement(DynamicControl, { bind: control.bind }, /* @__PURE__ */ React89.createElement(import_ui40.Grid, { container: true, gap: 0.75, sx: layoutStyleProps }, control.label ? /* @__PURE__ */ React89.createElement(import_ui40.Grid, { item: true, xs: 12 }, /* @__PURE__ */ React89.createElement(import_editor_controls56.ControlFormLabel, null, control.label)) : null, /* @__PURE__ */ React89.createElement(import_ui40.Grid, { item: true, xs: 12 }, /* @__PURE__ */ React89.createElement(Control, { type: control.type, props: controlProps }))));
5790
+ return /* @__PURE__ */ React89.createElement(DynamicControl, { bind: control.bind }, /* @__PURE__ */ React89.createElement(import_ui40.Grid, { container: true, gap: 0.75, sx: layoutStyleProps }, control.label ? /* @__PURE__ */ React89.createElement(import_ui40.Grid, { item: true, xs: 12 }, /* @__PURE__ */ React89.createElement(import_editor_controls57.ControlFormLabel, null, control.label)) : null, /* @__PURE__ */ React89.createElement(import_ui40.Grid, { item: true, xs: 12 }, /* @__PURE__ */ React89.createElement(Control, { type: control.type, props: controlProps }))));
5786
5791
  };
5787
5792
  function ControlsItemsStack({ items: items3 }) {
5788
5793
  return /* @__PURE__ */ React89.createElement(import_ui40.Stack, { p: 2, gap: 2, sx: { overflowY: "auto" } }, items3.map(
@@ -5840,11 +5845,11 @@ function getDynamicValue(name, settings) {
5840
5845
 
5841
5846
  // src/dynamics/hooks/use-prop-dynamic-action.tsx
5842
5847
  var React90 = __toESM(require("react"));
5843
- var import_editor_controls57 = require("@elementor/editor-controls");
5848
+ var import_editor_controls58 = require("@elementor/editor-controls");
5844
5849
  var import_icons26 = require("@elementor/icons");
5845
5850
  var import_i18n62 = require("@wordpress/i18n");
5846
5851
  var usePropDynamicAction = () => {
5847
- const { propType } = (0, import_editor_controls57.useBoundProp)();
5852
+ const { propType } = (0, import_editor_controls58.useBoundProp)();
5848
5853
  const visible = !!propType && supportsDynamic(propType);
5849
5854
  return {
5850
5855
  visible,
@@ -5857,16 +5862,16 @@ var usePropDynamicAction = () => {
5857
5862
  // src/dynamics/init.ts
5858
5863
  var { registerPopoverAction } = import_menus2.controlActionsMenu;
5859
5864
  var init2 = () => {
5860
- (0, import_editor_controls58.registerControlReplacement)({
5865
+ (0, import_editor_controls59.registerControlReplacement)({
5861
5866
  component: DynamicSelectionControl,
5862
5867
  condition: ({ value }) => isDynamicPropValue(value)
5863
5868
  });
5864
- (0, import_editor_controls58.injectIntoRepeaterItemLabel)({
5869
+ (0, import_editor_controls59.injectIntoRepeaterItemLabel)({
5865
5870
  id: "dynamic-background-image",
5866
5871
  condition: ({ value }) => isDynamicPropValue(value.value?.image?.value?.src),
5867
5872
  component: BackgroundControlDynamicTagLabel
5868
5873
  });
5869
- (0, import_editor_controls58.injectIntoRepeaterItemIcon)({
5874
+ (0, import_editor_controls59.injectIntoRepeaterItemIcon)({
5870
5875
  id: "dynamic-background-image",
5871
5876
  condition: ({ value }) => isDynamicPropValue(value.value?.image?.value?.src),
5872
5877
  component: BackgroundControlDynamicTagIcon
@@ -5880,7 +5885,8 @@ var init2 = () => {
5880
5885
  };
5881
5886
 
5882
5887
  // src/reset-style-props.tsx
5883
- var import_editor_controls59 = require("@elementor/editor-controls");
5888
+ var import_editor_controls60 = require("@elementor/editor-controls");
5889
+ var import_editor_variables2 = require("@elementor/editor-variables");
5884
5890
  var import_icons27 = require("@elementor/icons");
5885
5891
  var import_menus3 = require("@elementor/menus");
5886
5892
  var import_i18n63 = require("@wordpress/i18n");
@@ -5938,13 +5944,16 @@ function initResetStyleProps() {
5938
5944
  }
5939
5945
  function useResetStyleValueProps() {
5940
5946
  const isStyle = useIsStyle();
5941
- const { value, resetValue, propType } = (0, import_editor_controls59.useBoundProp)();
5947
+ const { value, resetValue, propType } = (0, import_editor_controls60.useBoundProp)();
5942
5948
  const hasValue = value !== null && value !== void 0;
5943
5949
  const hasInitial = propType.initial_value !== void 0 && propType.initial_value !== null;
5944
5950
  const isRequired = !!propType.settings?.required;
5945
5951
  const shouldHide = !!propType.settings?.hide_reset;
5952
+ const isPropTypeValue = value;
5953
+ const isVariable = isPropTypeValue?.$$type?.includes("variable");
5954
+ const variableExists = isVariable && (0, import_editor_variables2.hasVariable)(isPropTypeValue?.value);
5946
5955
  function calculateVisibility() {
5947
- if (!isStyle || !hasValue || shouldHide) {
5956
+ if (!isStyle || !hasValue || shouldHide || isVariable && !variableExists) {
5948
5957
  return false;
5949
5958
  }
5950
5959
  if (hasInitial) {
@@ -5963,7 +5972,7 @@ function useResetStyleValueProps() {
5963
5972
 
5964
5973
  // src/styles-inheritance/components/styles-inheritance-indicator.tsx
5965
5974
  var React96 = __toESM(require("react"));
5966
- var import_editor_controls60 = require("@elementor/editor-controls");
5975
+ var import_editor_controls61 = require("@elementor/editor-controls");
5967
5976
  var import_editor_props21 = require("@elementor/editor-props");
5968
5977
  var import_editor_styles_repository16 = require("@elementor/editor-styles-repository");
5969
5978
  var import_i18n67 = require("@wordpress/i18n");
@@ -6335,7 +6344,7 @@ function TooltipOrInfotip({
6335
6344
  var StylesInheritanceIndicator = ({
6336
6345
  customContext
6337
6346
  }) => {
6338
- const context = (0, import_editor_controls60.useBoundProp)();
6347
+ const context = (0, import_editor_controls61.useBoundProp)();
6339
6348
  const { path, propType } = customContext || context;
6340
6349
  const inheritanceChain = useStylesInheritanceChain(path);
6341
6350
  if (!path || !inheritanceChain.length) {