@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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@elementor/editor-variables",
3
- "version": "3.35.0-490",
3
+ "version": "3.35.0-491",
4
4
  "private": false,
5
5
  "author": "Elementor Team",
6
6
  "homepage": "https://elementor.com/",
@@ -39,22 +39,22 @@
39
39
  "dev": "tsup --config=../../tsup.dev.ts"
40
40
  },
41
41
  "dependencies": {
42
- "@elementor/editor": "3.35.0-490",
43
- "@elementor/editor-canvas": "3.35.0-490",
44
- "@elementor/editor-controls": "3.35.0-490",
45
- "@elementor/editor-current-user": "3.35.0-490",
46
- "@elementor/editor-editing-panel": "3.35.0-490",
47
- "@elementor/editor-mcp": "3.35.0-490",
48
- "@elementor/editor-panels": "3.35.0-490",
49
- "@elementor/editor-props": "3.35.0-490",
50
- "@elementor/editor-ui": "3.35.0-490",
51
- "@elementor/editor-v1-adapters": "3.35.0-490",
52
- "@elementor/http-client": "3.35.0-490",
42
+ "@elementor/editor": "3.35.0-491",
43
+ "@elementor/editor-canvas": "3.35.0-491",
44
+ "@elementor/editor-controls": "3.35.0-491",
45
+ "@elementor/editor-current-user": "3.35.0-491",
46
+ "@elementor/editor-editing-panel": "3.35.0-491",
47
+ "@elementor/editor-mcp": "3.35.0-491",
48
+ "@elementor/editor-panels": "3.35.0-491",
49
+ "@elementor/editor-props": "3.35.0-491",
50
+ "@elementor/editor-ui": "3.35.0-491",
51
+ "@elementor/editor-v1-adapters": "3.35.0-491",
52
+ "@elementor/http-client": "3.35.0-491",
53
53
  "@elementor/icons": "^1.63.0",
54
- "@elementor/mixpanel": "3.35.0-490",
55
- "@elementor/schema": "3.35.0-490",
54
+ "@elementor/mixpanel": "3.35.0-491",
55
+ "@elementor/schema": "3.35.0-491",
56
56
  "@elementor/ui": "1.36.17",
57
- "@elementor/utils": "3.35.0-490",
57
+ "@elementor/utils": "3.35.0-491",
58
58
  "@wordpress/i18n": "^5.13.0"
59
59
  },
60
60
  "peerDependencies": {
@@ -35,6 +35,7 @@ export function registerVariableTypes() {
35
35
  } );
36
36
 
37
37
  const sizePromotions = {
38
+ isActive: false,
38
39
  icon: ExpandDiagonalIcon,
39
40
  propTypeUtil: sizeVariablePropTypeUtil,
40
41
  fallbackPropTypeUtil: sizePropTypeUtil,
@@ -41,6 +41,7 @@ type VariableTypeOptions = {
41
41
  valueTransformer?: ( value: string, type?: string ) => PropValue;
42
42
  isCompatible?: ( propType: PropType, variable: Variable ) => boolean;
43
43
  emptyState?: JSX.Element;
44
+ isActive?: boolean;
44
45
  };
45
46
 
46
47
  export type VariableTypesMap = Record< string, Omit< VariableTypeOptions, 'key' > >;
@@ -62,6 +63,7 @@ export function createVariableTypeRegistry() {
62
63
  fallbackPropTypeUtil,
63
64
  isCompatible,
64
65
  emptyState,
66
+ isActive = true,
65
67
  }: VariableTypeOptions ) => {
66
68
  const variableTypeKey = key ?? propTypeUtil.key;
67
69
 
@@ -88,6 +90,7 @@ export function createVariableTypeRegistry() {
88
90
  fallbackPropTypeUtil,
89
91
  isCompatible,
90
92
  emptyState,
93
+ isActive,
91
94
  };
92
95
 
93
96
  registerTransformer( propTypeUtil.key, styleTransformer );
@@ -111,7 +114,7 @@ export function createVariableTypeRegistry() {
111
114
  };
112
115
 
113
116
  const hasVariableType = ( key: string ) => {
114
- return key in variableTypes;
117
+ return key in variableTypes && !! variableTypes[ key ].isActive;
115
118
  };
116
119
 
117
120
  return {