@elementor/editor-editing-panel 4.2.0-905 → 4.2.0-906

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
@@ -1968,7 +1968,6 @@ function useScrollDirection() {
1968
1968
  }
1969
1969
 
1970
1970
  // src/hooks/use-default-panel-settings.ts
1971
- import { createContext as createContext6, useContext as useContext6 } from "react";
1972
1971
  var fallbackEditorSettings = {
1973
1972
  defaultSectionsExpanded: {
1974
1973
  settings: ["Content", "Settings"],
@@ -1976,7 +1975,7 @@ var fallbackEditorSettings = {
1976
1975
  },
1977
1976
  defaultTab: "settings"
1978
1977
  };
1979
- var defaultPanelSettingsContext = createContext6({
1978
+ var elementPanelDefaults = {
1980
1979
  "e-div-block": {
1981
1980
  defaultSectionsExpanded: fallbackEditorSettings.defaultSectionsExpanded,
1982
1981
  defaultTab: "style"
@@ -1993,11 +1992,13 @@ var defaultPanelSettingsContext = createContext6({
1993
1992
  defaultSectionsExpanded: fallbackEditorSettings.defaultSectionsExpanded,
1994
1993
  defaultTab: "style"
1995
1994
  }
1996
- });
1995
+ };
1996
+ function registerElementPanelDefaults(type, defaults) {
1997
+ elementPanelDefaults[type] = defaults;
1998
+ }
1997
1999
  var useDefaultPanelSettings = () => {
1998
2000
  const { element } = useElement();
1999
- const defaults = useContext6(defaultPanelSettingsContext)[element.type];
2000
- return defaults || fallbackEditorSettings;
2001
+ return elementPanelDefaults[element.type] ?? fallbackEditorSettings;
2001
2002
  };
2002
2003
 
2003
2004
  // src/hooks/use-state-by-element.ts
@@ -2710,7 +2711,7 @@ import { __ as __62 } from "@wordpress/i18n";
2710
2711
 
2711
2712
  // src/contexts/styles-inheritance-context.tsx
2712
2713
  import * as React25 from "react";
2713
- import { createContext as createContext7, useContext as useContext7, useMemo as useMemo8 } from "react";
2714
+ import { createContext as createContext6, useContext as useContext6, useMemo as useMemo8 } from "react";
2714
2715
  import { getWidgetsCache } from "@elementor/editor-elements";
2715
2716
  import { classesPropTypeUtil as classesPropTypeUtil3 } from "@elementor/editor-props";
2716
2717
  import { getBreakpointsTree as getBreakpointsTree2 } from "@elementor/editor-responsive";
@@ -2945,7 +2946,7 @@ var getFilterPropType = (propType, path) => {
2945
2946
  };
2946
2947
 
2947
2948
  // src/contexts/styles-inheritance-context.tsx
2948
- var Context4 = createContext7(null);
2949
+ var Context4 = createContext6(null);
2949
2950
  function StyleInheritanceProvider({ children }) {
2950
2951
  const styleDefs = useAppliedStyles();
2951
2952
  const breakpointsTree = getBreakpointsTree2();
@@ -2953,7 +2954,7 @@ function StyleInheritanceProvider({ children }) {
2953
2954
  return /* @__PURE__ */ React25.createElement(Context4.Provider, { value: { getSnapshot, getInheritanceChain } }, children);
2954
2955
  }
2955
2956
  function useStylesInheritanceSnapshot() {
2956
- const context = useContext7(Context4);
2957
+ const context = useContext6(Context4);
2957
2958
  const { meta } = useStyle();
2958
2959
  if (!context) {
2959
2960
  throw new Error("useStylesInheritanceSnapshot must be used within a StyleInheritanceProvider");
@@ -2964,7 +2965,7 @@ function useStylesInheritanceSnapshot() {
2964
2965
  return context.getSnapshot(meta) ?? null;
2965
2966
  }
2966
2967
  function useStylesInheritanceChain(path) {
2967
- const context = useContext7(Context4);
2968
+ const context = useContext6(Context4);
2968
2969
  if (!context) {
2969
2970
  throw new Error("useStylesInheritanceChain must be used within a StyleInheritanceProvider");
2970
2971
  }
@@ -7647,6 +7648,7 @@ export {
7647
7648
  injectIntoStyleTab,
7648
7649
  isDynamicPropValue,
7649
7650
  registerEditingPanelReplacement,
7651
+ registerElementPanelDefaults,
7650
7652
  registerFieldIndicator,
7651
7653
  registerStyleProviderToColors,
7652
7654
  setLicenseConfig,