@elementor/editor-components 3.35.0-428 → 3.35.0-430
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 +12 -17
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +12 -17
- package/dist/index.mjs.map +1 -1
- package/package.json +22 -22
- package/src/components/edit-component/component-modal.tsx +11 -17
- package/src/create-component-type.ts +3 -0
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@elementor/editor-components",
|
|
3
3
|
"description": "Elementor editor components",
|
|
4
|
-
"version": "3.35.0-
|
|
4
|
+
"version": "3.35.0-430",
|
|
5
5
|
"private": false,
|
|
6
6
|
"author": "Elementor Team",
|
|
7
7
|
"homepage": "https://elementor.com/",
|
|
@@ -40,30 +40,30 @@
|
|
|
40
40
|
"dev": "tsup --config=../../tsup.dev.ts"
|
|
41
41
|
},
|
|
42
42
|
"dependencies": {
|
|
43
|
-
"@elementor/editor": "3.35.0-
|
|
44
|
-
"@elementor/editor-canvas": "3.35.0-
|
|
45
|
-
"@elementor/editor-controls": "3.35.0-
|
|
46
|
-
"@elementor/editor-documents": "3.35.0-
|
|
47
|
-
"@elementor/editor-editing-panel": "3.35.0-
|
|
48
|
-
"@elementor/editor-elements": "3.35.0-
|
|
49
|
-
"@elementor/editor-elements-panel": "3.35.0-
|
|
50
|
-
"@elementor/editor-mcp": "3.35.0-
|
|
51
|
-
"@elementor/editor-panels": "3.35.0-
|
|
52
|
-
"@elementor/editor-props": "3.35.0-
|
|
53
|
-
"@elementor/editor-styles-repository": "3.35.0-
|
|
54
|
-
"@elementor/editor-ui": "3.35.0-
|
|
55
|
-
"@elementor/editor-v1-adapters": "3.35.0-
|
|
56
|
-
"@elementor/http-client": "3.35.0-
|
|
43
|
+
"@elementor/editor": "3.35.0-430",
|
|
44
|
+
"@elementor/editor-canvas": "3.35.0-430",
|
|
45
|
+
"@elementor/editor-controls": "3.35.0-430",
|
|
46
|
+
"@elementor/editor-documents": "3.35.0-430",
|
|
47
|
+
"@elementor/editor-editing-panel": "3.35.0-430",
|
|
48
|
+
"@elementor/editor-elements": "3.35.0-430",
|
|
49
|
+
"@elementor/editor-elements-panel": "3.35.0-430",
|
|
50
|
+
"@elementor/editor-mcp": "3.35.0-430",
|
|
51
|
+
"@elementor/editor-panels": "3.35.0-430",
|
|
52
|
+
"@elementor/editor-props": "3.35.0-430",
|
|
53
|
+
"@elementor/editor-styles-repository": "3.35.0-430",
|
|
54
|
+
"@elementor/editor-ui": "3.35.0-430",
|
|
55
|
+
"@elementor/editor-v1-adapters": "3.35.0-430",
|
|
56
|
+
"@elementor/http-client": "3.35.0-430",
|
|
57
57
|
"@elementor/icons": "^1.63.0",
|
|
58
|
-
"@elementor/mixpanel": "3.35.0-
|
|
59
|
-
"@elementor/query": "3.35.0-
|
|
60
|
-
"@elementor/schema": "3.35.0-
|
|
61
|
-
"@elementor/store": "3.35.0-
|
|
58
|
+
"@elementor/mixpanel": "3.35.0-430",
|
|
59
|
+
"@elementor/query": "3.35.0-430",
|
|
60
|
+
"@elementor/schema": "3.35.0-430",
|
|
61
|
+
"@elementor/store": "3.35.0-430",
|
|
62
62
|
"@elementor/ui": "1.36.17",
|
|
63
|
-
"@elementor/utils": "3.35.0-
|
|
63
|
+
"@elementor/utils": "3.35.0-430",
|
|
64
64
|
"@wordpress/i18n": "^5.13.0",
|
|
65
|
-
"@elementor/editor-notifications": "3.35.0-
|
|
66
|
-
"@elementor/editor-current-user": "3.35.0-
|
|
65
|
+
"@elementor/editor-notifications": "3.35.0-430",
|
|
66
|
+
"@elementor/editor-current-user": "3.35.0-430"
|
|
67
67
|
},
|
|
68
68
|
"peerDependencies": {
|
|
69
69
|
"react": "^18.3.1",
|
|
@@ -53,7 +53,7 @@ function Backdrop( { canvas, element, onClose }: { canvas: HTMLDocument; element
|
|
|
53
53
|
zIndex: 999,
|
|
54
54
|
pointerEvents: 'painted',
|
|
55
55
|
cursor: 'pointer',
|
|
56
|
-
clipPath:
|
|
56
|
+
clipPath: getRectPath( rect, canvas.defaultView as Window ),
|
|
57
57
|
};
|
|
58
58
|
|
|
59
59
|
const handleKeyDown = ( event: React.KeyboardEvent ) => {
|
|
@@ -75,14 +75,12 @@ function Backdrop( { canvas, element, onClose }: { canvas: HTMLDocument; element
|
|
|
75
75
|
);
|
|
76
76
|
}
|
|
77
77
|
|
|
78
|
-
function
|
|
79
|
-
const padding = borderRadius / 2;
|
|
78
|
+
function getRectPath( rect: DOMRect, viewport: Window ) {
|
|
80
79
|
const { x: originalX, y: originalY, width: originalWidth, height: originalHeight } = rect;
|
|
81
|
-
const x = originalX
|
|
82
|
-
const y = originalY
|
|
83
|
-
const width = originalWidth
|
|
84
|
-
const height = originalHeight
|
|
85
|
-
const radius = Math.min( borderRadius, width / 2, height / 2 );
|
|
80
|
+
const x = originalX;
|
|
81
|
+
const y = originalY;
|
|
82
|
+
const width = originalWidth;
|
|
83
|
+
const height = originalHeight;
|
|
86
84
|
|
|
87
85
|
const { innerWidth: vw, innerHeight: vh } = viewport;
|
|
88
86
|
|
|
@@ -91,15 +89,11 @@ function getRoundedRectPath( rect: DOMRect, viewport: Window, borderRadius: numb
|
|
|
91
89
|
L ${ vw } ${ vh }
|
|
92
90
|
L 0 ${ vh }
|
|
93
91
|
Z
|
|
94
|
-
M ${ x
|
|
95
|
-
L ${ x + width
|
|
96
|
-
|
|
97
|
-
L ${ x
|
|
98
|
-
|
|
99
|
-
L ${ x + radius } ${ y + height }
|
|
100
|
-
A ${ radius } ${ radius } 0 0 1 ${ x } ${ y + height - radius }
|
|
101
|
-
L ${ x } ${ y + radius }
|
|
102
|
-
A ${ radius } ${ radius } 0 0 1 ${ x + radius } ${ y }
|
|
92
|
+
M ${ x } ${ y }
|
|
93
|
+
L ${ x + width } ${ y }
|
|
94
|
+
L ${ x + width } ${ y + height }
|
|
95
|
+
L ${ x } ${ y + height }
|
|
96
|
+
L ${ x } ${ y }
|
|
103
97
|
Z'
|
|
104
98
|
)`;
|
|
105
99
|
|
|
@@ -43,6 +43,7 @@ type ContextMenuGroup = {
|
|
|
43
43
|
|
|
44
44
|
type ComponentModel = ElementModel & {
|
|
45
45
|
componentId?: number | string;
|
|
46
|
+
isGlobal: boolean;
|
|
46
47
|
};
|
|
47
48
|
|
|
48
49
|
type ComponentModelInstance = BackboneModel< ComponentModel > & {
|
|
@@ -332,6 +333,8 @@ function createComponentModel(): BackboneModelConstructor< ComponentModel > {
|
|
|
332
333
|
this.set( 'componentId', componentId );
|
|
333
334
|
}
|
|
334
335
|
}
|
|
336
|
+
|
|
337
|
+
this.set( 'isGlobal', true );
|
|
335
338
|
},
|
|
336
339
|
|
|
337
340
|
getTitle( this: ComponentModelInstance ): string {
|