@elementor/editor-controls 4.3.0-1012 → 4.3.0-1013
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.js +5 -3
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +5 -3
- package/dist/index.mjs.map +1 -1
- package/package.json +16 -16
- package/src/controls/background-control/background-gradient-color-control.tsx +2 -2
- package/src/controls/background-control/background-overlay/background-overlay-repeater-control.tsx +3 -1
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@elementor/editor-controls",
|
|
3
3
|
"description": "This package contains the controls model and utils for the Elementor editor",
|
|
4
|
-
"version": "4.3.0-
|
|
4
|
+
"version": "4.3.0-1013",
|
|
5
5
|
"private": false,
|
|
6
6
|
"author": "Elementor Team",
|
|
7
7
|
"homepage": "https://elementor.com/",
|
|
@@ -40,23 +40,23 @@
|
|
|
40
40
|
"dev": "tsup --config=../../tsup.dev.ts"
|
|
41
41
|
},
|
|
42
42
|
"dependencies": {
|
|
43
|
-
"@elementor/editor-current-user": "4.3.0-
|
|
44
|
-
"@elementor/editor-elements": "4.3.0-
|
|
45
|
-
"@elementor/editor-props": "4.3.0-
|
|
46
|
-
"@elementor/editor-responsive": "4.3.0-
|
|
47
|
-
"@elementor/editor-ui": "4.3.0-
|
|
48
|
-
"@elementor/editor-v1-adapters": "4.3.0-
|
|
49
|
-
"@elementor/env": "4.3.0-
|
|
50
|
-
"@elementor/events": "4.3.0-
|
|
51
|
-
"@elementor/http-client": "4.3.0-
|
|
43
|
+
"@elementor/editor-current-user": "4.3.0-1013",
|
|
44
|
+
"@elementor/editor-elements": "4.3.0-1013",
|
|
45
|
+
"@elementor/editor-props": "4.3.0-1013",
|
|
46
|
+
"@elementor/editor-responsive": "4.3.0-1013",
|
|
47
|
+
"@elementor/editor-ui": "4.3.0-1013",
|
|
48
|
+
"@elementor/editor-v1-adapters": "4.3.0-1013",
|
|
49
|
+
"@elementor/env": "4.3.0-1013",
|
|
50
|
+
"@elementor/events": "4.3.0-1013",
|
|
51
|
+
"@elementor/http-client": "4.3.0-1013",
|
|
52
52
|
"@elementor/icons": "~1.75.1",
|
|
53
|
-
"@elementor/locations": "4.3.0-
|
|
54
|
-
"@elementor/query": "4.3.0-
|
|
55
|
-
"@elementor/schema": "4.3.0-
|
|
56
|
-
"@elementor/session": "4.3.0-
|
|
53
|
+
"@elementor/locations": "4.3.0-1013",
|
|
54
|
+
"@elementor/query": "4.3.0-1013",
|
|
55
|
+
"@elementor/schema": "4.3.0-1013",
|
|
56
|
+
"@elementor/session": "4.3.0-1013",
|
|
57
57
|
"@elementor/ui": "1.37.5",
|
|
58
|
-
"@elementor/utils": "4.3.0-
|
|
59
|
-
"@elementor/wp-media": "4.3.0-
|
|
58
|
+
"@elementor/utils": "4.3.0-1013",
|
|
59
|
+
"@elementor/wp-media": "4.3.0-1013",
|
|
60
60
|
"@monaco-editor/react": "^4.7.0",
|
|
61
61
|
"@tiptap/extension-bold": "^3.11.1",
|
|
62
62
|
"@tiptap/extension-document": "^3.11.1",
|
|
@@ -64,9 +64,9 @@ export const BackgroundGradientColorControl = createControl( () => {
|
|
|
64
64
|
return {
|
|
65
65
|
type: type.value,
|
|
66
66
|
angle: angle?.value || 0,
|
|
67
|
-
stops: stops.value.map( ( { value: { color, offset } }: ColorStop ) => ( {
|
|
67
|
+
stops: stops.value.map( ( { value: { color, offset } }: ColorStop, index: number, arr: ColorStop[] ) => ( {
|
|
68
68
|
color: color.value,
|
|
69
|
-
offset: offset.
|
|
69
|
+
offset: offset?.value ?? ( arr.length > 1 ? ( index / ( arr.length - 1 ) ) * 100 : 0 ),
|
|
70
70
|
} ) ),
|
|
71
71
|
positions: positions?.value.split( ' ' ),
|
|
72
72
|
};
|
package/src/controls/background-control/background-overlay/background-overlay-repeater-control.tsx
CHANGED
|
@@ -305,7 +305,9 @@ const getGradientValue = ( value: BackgroundOverlayItemPropValue ) => {
|
|
|
305
305
|
const gradient = value.value;
|
|
306
306
|
|
|
307
307
|
const stops = gradient.stops.value
|
|
308
|
-
?.map( ( { value: { color, offset } }: ColorStop ) =>
|
|
308
|
+
?.map( ( { value: { color, offset } }: ColorStop ) =>
|
|
309
|
+
offset ? `${ color.value } ${ offset.value ?? 0 }%` : `${ color.value }`
|
|
310
|
+
)
|
|
309
311
|
?.join( ',' );
|
|
310
312
|
|
|
311
313
|
if ( gradient.type.value === 'linear' ) {
|