@elementor/editor-app-bar 4.3.0-beta2 → 4.3.0
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 +38 -8
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +43 -13
- package/dist/index.mjs.map +1 -1
- package/package.json +12 -12
- package/src/extensions/angie/angie-consts.ts +5 -2
- package/src/extensions/angie/components/angie-guide-card.tsx +32 -11
- package/src/extensions/angie/hooks/use-auto-show.ts +6 -2
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@elementor/editor-app-bar",
|
|
3
3
|
"description": "App Bar extension for @elementor/editor",
|
|
4
|
-
"version": "4.3.0
|
|
4
|
+
"version": "4.3.0",
|
|
5
5
|
"private": false,
|
|
6
6
|
"author": "Elementor Team",
|
|
7
7
|
"homepage": "https://elementor.com/",
|
|
@@ -40,18 +40,18 @@
|
|
|
40
40
|
"dev": "tsup --config=../../tsup.dev.ts"
|
|
41
41
|
},
|
|
42
42
|
"dependencies": {
|
|
43
|
-
"@elementor/editor-current-user": "4.3.0
|
|
44
|
-
"@elementor/editor-ui": "4.3.0
|
|
45
|
-
"@elementor/http-client": "4.3.0
|
|
46
|
-
"@elementor/editor": "4.3.0
|
|
47
|
-
"@elementor/editor-documents": "4.3.0
|
|
48
|
-
"@elementor/editor-mcp": "4.3.0
|
|
49
|
-
"@elementor/editor-responsive": "4.3.0
|
|
50
|
-
"@elementor/editor-v1-adapters": "4.3.0
|
|
43
|
+
"@elementor/editor-current-user": "4.3.0",
|
|
44
|
+
"@elementor/editor-ui": "4.3.0",
|
|
45
|
+
"@elementor/http-client": "4.3.0",
|
|
46
|
+
"@elementor/editor": "4.3.0",
|
|
47
|
+
"@elementor/editor-documents": "4.3.0",
|
|
48
|
+
"@elementor/editor-mcp": "4.3.0",
|
|
49
|
+
"@elementor/editor-responsive": "4.3.0",
|
|
50
|
+
"@elementor/editor-v1-adapters": "4.3.0",
|
|
51
51
|
"@elementor/icons": "~1.75.1",
|
|
52
|
-
"@elementor/locations": "4.3.0
|
|
53
|
-
"@elementor/menus": "4.3.0
|
|
54
|
-
"@elementor/events": "4.3.0
|
|
52
|
+
"@elementor/locations": "4.3.0",
|
|
53
|
+
"@elementor/menus": "4.3.0",
|
|
54
|
+
"@elementor/events": "4.3.0",
|
|
55
55
|
"@elementor/ui": "1.37.5",
|
|
56
56
|
"@wordpress/i18n": "^5.13.0"
|
|
57
57
|
},
|
|
@@ -16,5 +16,8 @@ export const ANGIE_DESCRIPTION = __(
|
|
|
16
16
|
|
|
17
17
|
export const AI_WIDGET_CTA_VIEWED_EVENT = 'ai_widget_cta_viewed' as const;
|
|
18
18
|
export const ANGIE_TOP_BAR_PROMOTION_IMAGE_URL =
|
|
19
|
-
'https://assets.elementor.com/packages/v1/images/angie-top-bar-promotion.svg';
|
|
20
|
-
export const ANGIE_TOP_BAR_DESCRIPTION = __(
|
|
19
|
+
'https://assets.elementor.com/packages/v1/images/angie-top-bar-promotion-0926.svg';
|
|
20
|
+
export const ANGIE_TOP_BAR_DESCRIPTION = __(
|
|
21
|
+
'Describe what you want to build in plain language and Angie generates it in native Elementor structure, fully editable and customizable.',
|
|
22
|
+
'elementor'
|
|
23
|
+
);
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import * as React from 'react';
|
|
2
|
-
import {
|
|
2
|
+
import { Box, Button, ClickAwayListener, CloseButton, Image, Stack, Typography } from '@elementor/ui';
|
|
3
3
|
import { __ } from '@wordpress/i18n';
|
|
4
4
|
|
|
5
5
|
type Props = {
|
|
@@ -14,23 +14,44 @@ export function AngieGuideCard( { imageUrl, description, learnMoreUrl, onInstall
|
|
|
14
14
|
return (
|
|
15
15
|
<ClickAwayListener onClickAway={ onClose }>
|
|
16
16
|
<Stack sx={ { width: 296 } } data-testid="e-angie-guide-card">
|
|
17
|
-
<
|
|
18
|
-
<
|
|
19
|
-
|
|
17
|
+
<Box sx={ { position: 'relative', p: 1.5 } }>
|
|
18
|
+
<Image
|
|
19
|
+
src={ imageUrl }
|
|
20
|
+
alt={ __( 'Angie', 'elementor' ) }
|
|
21
|
+
sx={ {
|
|
22
|
+
width: '100%',
|
|
23
|
+
maxHeight: 200,
|
|
24
|
+
objectFit: 'cover',
|
|
25
|
+
objectPosition: 'center top',
|
|
26
|
+
borderRadius: 1,
|
|
27
|
+
display: 'block',
|
|
28
|
+
} }
|
|
29
|
+
/>
|
|
20
30
|
<CloseButton
|
|
21
|
-
|
|
22
|
-
|
|
31
|
+
sx={ {
|
|
32
|
+
position: 'absolute',
|
|
33
|
+
top: 15,
|
|
34
|
+
insetInlineEnd: 15,
|
|
35
|
+
color: 'common.white',
|
|
36
|
+
filter: 'drop-shadow(0 1px 2px rgba(0,0,0,0.6))',
|
|
37
|
+
'&:hover': {
|
|
38
|
+
bgcolor: 'rgba(255,255,255,0.2)',
|
|
39
|
+
color: 'common.white',
|
|
40
|
+
},
|
|
41
|
+
} }
|
|
23
42
|
slotProps={ { icon: { fontSize: 'small' } } }
|
|
24
43
|
onClick={ onClose }
|
|
25
44
|
/>
|
|
45
|
+
</Box>
|
|
46
|
+
<Stack px={ 2 } pt={ 0.5 } pb={ 0.5 }>
|
|
47
|
+
<Typography variant="subtitle2">{ __( 'Generate full pages with AI', 'elementor' ) }</Typography>
|
|
26
48
|
</Stack>
|
|
27
|
-
<
|
|
28
|
-
<Stack px={ 2 } pt={ 1.5 } pb={ 1 }>
|
|
49
|
+
<Stack px={ 2 } pt={ 0.5 } pb={ 1.5 }>
|
|
29
50
|
<Typography variant="body2" color="secondary">
|
|
30
51
|
{ description }
|
|
31
52
|
</Typography>
|
|
32
53
|
</Stack>
|
|
33
|
-
<Stack direction="row" justifyContent="flex-end" gap={ 1 }
|
|
54
|
+
<Stack direction="row" justifyContent="flex-end" gap={ 1 } pb={ 1.5 } px={ 2 }>
|
|
34
55
|
<Button
|
|
35
56
|
variant="text"
|
|
36
57
|
size="small"
|
|
@@ -43,8 +64,8 @@ export function AngieGuideCard( { imageUrl, description, learnMoreUrl, onInstall
|
|
|
43
64
|
{ __( 'Learn More', 'elementor' ) }
|
|
44
65
|
</Button>
|
|
45
66
|
{ onInstall && (
|
|
46
|
-
<Button variant="contained" size="small" color="
|
|
47
|
-
{ __( '
|
|
67
|
+
<Button variant="contained" size="small" color="primary" onClick={ onInstall }>
|
|
68
|
+
{ __( 'Build with Angie', 'elementor' ) }
|
|
48
69
|
</Button>
|
|
49
70
|
) }
|
|
50
71
|
</Stack>
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { useEffect } from 'react';
|
|
2
2
|
|
|
3
|
-
import {
|
|
3
|
+
import { CREATE_WIDGET_EVENT } from '../angie-consts';
|
|
4
4
|
|
|
5
5
|
export function useAutoShow() {
|
|
6
6
|
useEffect( () => {
|
|
@@ -9,7 +9,11 @@ export function useAutoShow() {
|
|
|
9
9
|
}
|
|
10
10
|
|
|
11
11
|
const id = setTimeout( () => {
|
|
12
|
-
window.dispatchEvent(
|
|
12
|
+
window.dispatchEvent(
|
|
13
|
+
new CustomEvent( CREATE_WIDGET_EVENT, {
|
|
14
|
+
detail: { entry_point: 'auto_show' },
|
|
15
|
+
} )
|
|
16
|
+
);
|
|
13
17
|
}, 0 );
|
|
14
18
|
|
|
15
19
|
return () => clearTimeout( id );
|