@elementor/editor-variables 3.35.0-490 → 3.35.0-491

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
@@ -107,7 +107,7 @@ type ValueFieldProps = {
107
107
  onKeyDown?: (event: KeyboardEvent<HTMLElement>) => void;
108
108
  };
109
109
 
110
- declare const registerVariableType: ({ key, icon, startIcon, valueField, propTypeUtil, variableType, defaultValue, selectionFilter, valueTransformer, styleTransformer, fallbackPropTypeUtil, isCompatible, emptyState, }: {
110
+ declare const registerVariableType: ({ key, icon, startIcon, valueField, propTypeUtil, variableType, defaultValue, selectionFilter, valueTransformer, styleTransformer, fallbackPropTypeUtil, isCompatible, emptyState, isActive, }: {
111
111
  icon: react.ForwardRefExoticComponent<Omit<_mui_material.SvgIconProps, "ref"> & react.RefAttributes<SVGSVGElement>>;
112
112
  startIcon?: ({ value }: {
113
113
  value: string;
@@ -123,6 +123,7 @@ declare const registerVariableType: ({ key, icon, startIcon, valueField, propTyp
123
123
  valueTransformer?: (value: string, type?: string) => _elementor_editor_props.PropValue;
124
124
  isCompatible?: (propType: _elementor_editor_props.PropType, variable: Variable) => boolean;
125
125
  emptyState?: react.JSX.Element;
126
+ isActive?: boolean;
126
127
  }) => void;
127
128
 
128
129
  declare const Utils: {
package/dist/index.d.ts CHANGED
@@ -107,7 +107,7 @@ type ValueFieldProps = {
107
107
  onKeyDown?: (event: KeyboardEvent<HTMLElement>) => void;
108
108
  };
109
109
 
110
- declare const registerVariableType: ({ key, icon, startIcon, valueField, propTypeUtil, variableType, defaultValue, selectionFilter, valueTransformer, styleTransformer, fallbackPropTypeUtil, isCompatible, emptyState, }: {
110
+ declare const registerVariableType: ({ key, icon, startIcon, valueField, propTypeUtil, variableType, defaultValue, selectionFilter, valueTransformer, styleTransformer, fallbackPropTypeUtil, isCompatible, emptyState, isActive, }: {
111
111
  icon: react.ForwardRefExoticComponent<Omit<_mui_material.SvgIconProps, "ref"> & react.RefAttributes<SVGSVGElement>>;
112
112
  startIcon?: ({ value }: {
113
113
  value: string;
@@ -123,6 +123,7 @@ declare const registerVariableType: ({ key, icon, startIcon, valueField, propTyp
123
123
  valueTransformer?: (value: string, type?: string) => _elementor_editor_props.PropValue;
124
124
  isCompatible?: (propType: _elementor_editor_props.PropType, variable: Variable) => boolean;
125
125
  emptyState?: react.JSX.Element;
126
+ isActive?: boolean;
126
127
  }) => void;
127
128
 
128
129
  declare const Utils: {
package/dist/index.js CHANGED
@@ -688,7 +688,8 @@ function createVariableTypeRegistry() {
688
688
  styleTransformer,
689
689
  fallbackPropTypeUtil,
690
690
  isCompatible,
691
- emptyState
691
+ emptyState,
692
+ isActive = true
692
693
  }) => {
693
694
  const variableTypeKey = key ?? propTypeUtil.key;
694
695
  if (!isCompatible) {
@@ -712,7 +713,8 @@ function createVariableTypeRegistry() {
712
713
  valueTransformer,
713
714
  fallbackPropTypeUtil,
714
715
  isCompatible,
715
- emptyState
716
+ emptyState,
717
+ isActive
716
718
  };
717
719
  registerTransformer(propTypeUtil.key, styleTransformer);
718
720
  registerInheritanceTransformer(propTypeUtil.key);
@@ -730,7 +732,7 @@ function createVariableTypeRegistry() {
730
732
  return variableTypes;
731
733
  };
732
734
  const hasVariableType2 = (key) => {
733
- return key in variableTypes;
735
+ return key in variableTypes && !!variableTypes[key].isActive;
734
736
  };
735
737
  return {
736
738
  registerVariableType: registerVariableType2,
@@ -3689,6 +3691,7 @@ function registerVariableTypes() {
3689
3691
  defaultValue: "Roboto"
3690
3692
  });
3691
3693
  const sizePromotions = {
3694
+ isActive: false,
3692
3695
  icon: import_icons16.ExpandDiagonalIcon,
3693
3696
  propTypeUtil: sizeVariablePropTypeUtil,
3694
3697
  fallbackPropTypeUtil: import_editor_props5.sizePropTypeUtil,