@elementor/editor-editing-panel 1.33.0 → 1.34.0

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
@@ -1583,10 +1583,24 @@ import { ELEMENTS_BASE_STYLES_PROVIDER_KEY, isElementsStylesProvider as isElemen
1583
1583
  import { IconButton as IconButton2, Infotip } from "@elementor/ui";
1584
1584
  import { __ as __5 } from "@wordpress/i18n";
1585
1585
 
1586
- // src/sync/get-experiments-config.ts
1587
- var getExperimentsConfig = () => {
1586
+ // src/sync/get-elementor-globals.ts
1587
+ var getElementorConfig = () => {
1588
+ const extendedWindow = window;
1589
+ return extendedWindow.elementor?.config ?? {};
1590
+ };
1591
+ var getElementorFrontendConfig = () => {
1588
1592
  const extendedWindow = window;
1589
- return extendedWindow.elementorCommon?.config?.experimentalFeatures ?? {};
1593
+ return extendedWindow.elementorFrontend?.config ?? {};
1594
+ };
1595
+ var getElementorCommonConfig = () => {
1596
+ const extendedWindow = window;
1597
+ return extendedWindow.elementorCommon?.config ?? {};
1598
+ };
1599
+
1600
+ // src/sync/is-experiment-active.ts
1601
+ var isExperimentActive = (experiment) => {
1602
+ const allFeatures = getElementorCommonConfig()?.experimentalFeatures ?? {};
1603
+ return !!allFeatures?.[experiment];
1590
1604
  };
1591
1605
 
1592
1606
  // src/styles-inheritance/styles-inheritance-infotip.tsx
@@ -1673,7 +1687,7 @@ var StylesInheritanceIndicator = () => {
1673
1687
  const hasValue = value !== null && value !== void 0;
1674
1688
  const label = getLabel({ isFinalValue, hasValue });
1675
1689
  const variantType = getVariant({ isFinalValue, hasValue, currentStyleProvider });
1676
- const { e_indications_popover: eIndicationsPopover } = getExperimentsConfig();
1690
+ const eIndicationsPopover = isExperimentActive("e_indications_popover");
1677
1691
  if (!eIndicationsPopover) {
1678
1692
  return /* @__PURE__ */ React19.createElement(StyleIndicator, { variant: variantType, "aria-label": label });
1679
1693
  }
@@ -1839,8 +1853,8 @@ import { __ as __8 } from "@wordpress/i18n";
1839
1853
  // src/hooks/use-direction.ts
1840
1854
  import { useTheme } from "@elementor/ui";
1841
1855
  function useDirection() {
1842
- const theme = useTheme(), extendedWindow = window;
1843
- const isUiRtl = "rtl" === theme.direction, isSiteRtl = !!extendedWindow.elementorFrontend?.config?.is_rtl;
1856
+ const theme = useTheme();
1857
+ const isUiRtl = "rtl" === theme.direction, isSiteRtl = !!getElementorFrontendConfig()?.is_rtl;
1844
1858
  return { isSiteRtl, isUiRtl };
1845
1859
  }
1846
1860
 
@@ -2260,7 +2274,7 @@ import * as React37 from "react";
2260
2274
  import { ToggleControl as ToggleControl4 } from "@elementor/editor-controls";
2261
2275
  import { Stack as Stack10 } from "@elementor/ui";
2262
2276
  import { __ as __14 } from "@wordpress/i18n";
2263
- var displayFieldOptions = [
2277
+ var displayFieldItems = [
2264
2278
  {
2265
2279
  value: "block",
2266
2280
  renderContent: () => __14("Block", "elementor"),
@@ -2278,17 +2292,27 @@ var displayFieldOptions = [
2278
2292
  renderContent: () => __14("In-blk", "elementor"),
2279
2293
  label: __14("Inline-block", "elementor"),
2280
2294
  showTooltip: true
2281
- },
2282
- {
2295
+ }
2296
+ ];
2297
+ var DisplayField = () => {
2298
+ const isDisplayNoneFeatureActive = isExperimentActive("e_v_3_30");
2299
+ const items3 = [...displayFieldItems];
2300
+ if (isDisplayNoneFeatureActive) {
2301
+ items3.push({
2302
+ value: "none",
2303
+ renderContent: () => __14("None", "elementor"),
2304
+ label: __14("None", "elementor"),
2305
+ showTooltip: true
2306
+ });
2307
+ }
2308
+ items3.push({
2283
2309
  value: "inline-flex",
2284
2310
  renderContent: () => __14("In-flx", "elementor"),
2285
2311
  label: __14("Inline-flex", "elementor"),
2286
2312
  showTooltip: true
2287
- }
2288
- ];
2289
- var DisplayField = () => {
2313
+ });
2290
2314
  const placeholder = useDisplayPlaceholderValue();
2291
- return /* @__PURE__ */ React37.createElement(StylesField, { bind: "display", placeholder }, /* @__PURE__ */ React37.createElement(Stack10, { gap: 0.75 }, /* @__PURE__ */ React37.createElement(ControlLabel, null, __14("Display", "elementor")), /* @__PURE__ */ React37.createElement(ToggleControl4, { options: displayFieldOptions, fullWidth: true })));
2315
+ return /* @__PURE__ */ React37.createElement(StylesField, { bind: "display", placeholder }, /* @__PURE__ */ React37.createElement(Stack10, { gap: 0.75 }, /* @__PURE__ */ React37.createElement(ControlLabel, null, __14("Display", "elementor")), /* @__PURE__ */ React37.createElement(ToggleControl4, { options: items3, maxItems: 4, fullWidth: true })));
2292
2316
  };
2293
2317
  var useDisplayPlaceholderValue = () => useStylesInheritanceField("display")[0]?.value ?? void 0;
2294
2318
 
@@ -2702,6 +2726,7 @@ var PositionSection = () => {
2702
2726
  "inset-inline-end"
2703
2727
  ]);
2704
2728
  const [dimensionsValuesFromHistory, updateDimensionsHistory, clearDimensionsHistory] = usePersistDimensions();
2729
+ const isCssIdFeatureActive = isExperimentActive("e_v_3_30");
2705
2730
  const onPositionChange = (newPosition, previousPosition) => {
2706
2731
  if (newPosition === "static") {
2707
2732
  if (dimensionsValues) {
@@ -2721,7 +2746,7 @@ var PositionSection = () => {
2721
2746
  }
2722
2747
  };
2723
2748
  const isNotStatic = positionValue && positionValue?.value !== "static";
2724
- return /* @__PURE__ */ React49.createElement(SectionContent, null, /* @__PURE__ */ React49.createElement(PositionField, { onChange: onPositionChange }), isNotStatic ? /* @__PURE__ */ React49.createElement(React49.Fragment, null, /* @__PURE__ */ React49.createElement(DimensionsField, null), /* @__PURE__ */ React49.createElement(ZIndexField, null)) : null, /* @__PURE__ */ React49.createElement(PanelDivider, null), /* @__PURE__ */ React49.createElement(OffsetField, null));
2749
+ return /* @__PURE__ */ React49.createElement(SectionContent, null, /* @__PURE__ */ React49.createElement(PositionField, { onChange: onPositionChange }), isNotStatic ? /* @__PURE__ */ React49.createElement(React49.Fragment, null, /* @__PURE__ */ React49.createElement(DimensionsField, null), /* @__PURE__ */ React49.createElement(ZIndexField, null)) : null, isCssIdFeatureActive && /* @__PURE__ */ React49.createElement(React49.Fragment, null, /* @__PURE__ */ React49.createElement(PanelDivider, null), /* @__PURE__ */ React49.createElement(OffsetField, null)));
2725
2750
  };
2726
2751
  var usePersistDimensions = () => {
2727
2752
  const { id: styleDefID, meta } = useStyle();
@@ -2841,14 +2866,6 @@ import { __ as __31 } from "@wordpress/i18n";
2841
2866
  // src/components/style-sections/typography-section/hooks/use-font-families.ts
2842
2867
  import { useMemo as useMemo5 } from "react";
2843
2868
  import { __ as __30 } from "@wordpress/i18n";
2844
-
2845
- // src/sync/get-elementor-config.ts
2846
- var getElementorConfig = () => {
2847
- const extendedWindow = window;
2848
- return extendedWindow.elementor?.config ?? {};
2849
- };
2850
-
2851
- // src/components/style-sections/typography-section/hooks/use-font-families.ts
2852
2869
  var supportedCategories = {
2853
2870
  system: __30("System", "elementor"),
2854
2871
  custom: __30("Custom Fonts", "elementor"),
@@ -2889,7 +2906,7 @@ var FontFamilyField = () => {
2889
2906
  if (fontFamilies.length === 0) {
2890
2907
  return null;
2891
2908
  }
2892
- return /* @__PURE__ */ React54.createElement(StylesField, { bind: "font-family" }, /* @__PURE__ */ React54.createElement(Grid15, { container: true, gap: 2, alignItems: "center", flexWrap: "nowrap" }, /* @__PURE__ */ React54.createElement(Grid15, { item: true, xs: 6 }, /* @__PURE__ */ React54.createElement(ControlLabel, null, __31("Font family", "elementor"))), /* @__PURE__ */ React54.createElement(Grid15, { item: true, xs: 6, sx: { overflow: "hidden" } }, /* @__PURE__ */ React54.createElement(FontFamilyControl, { fontFamilies }))));
2909
+ return /* @__PURE__ */ React54.createElement(StylesField, { bind: "font-family" }, /* @__PURE__ */ React54.createElement(Grid15, { container: true, gap: 2, alignItems: "center", flexWrap: "nowrap" }, /* @__PURE__ */ React54.createElement(Grid15, { item: true, xs: 6 }, /* @__PURE__ */ React54.createElement(ControlLabel, null, __31("Font family", "elementor"))), /* @__PURE__ */ React54.createElement(Grid15, { item: true, xs: 6, sx: { minWidth: 0 } }, /* @__PURE__ */ React54.createElement(FontFamilyControl, { fontFamilies }))));
2893
2910
  };
2894
2911
 
2895
2912
  // src/components/style-sections/typography-section/font-size-field.tsx