avada-components-seoon 1.0.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/README.md +71 -0
- package/dist/commands/autoTranslate.cjs +240 -0
- package/dist/commands/autoTranslate.cjs.map +1 -0
- package/dist/commands/autoTranslate.d.cts +2 -0
- package/dist/commands/autoTranslate.d.cts.map +1 -0
- package/dist/components/CrossAppBanner/index.d.ts +5 -0
- package/dist/components/CrossAppBanner/index.d.ts.map +1 -0
- package/dist/components/CrossAppBanner/index.js +192 -0
- package/dist/components/CrossAppBanner/index.js.map +1 -0
- package/dist/components/CrossAppBanner/index.scss +47 -0
- package/dist/components/CrossAppBanner/types.d.ts +81 -0
- package/dist/components/CrossAppBanner/types.d.ts.map +1 -0
- package/dist/components/CrossAppBanner/types.js +14 -0
- package/dist/components/CrossAppBanner/types.js.map +1 -0
- package/dist/components/PageSpeed/index.d.ts +81 -0
- package/dist/components/PageSpeed/index.d.ts.map +1 -0
- package/dist/components/PageSpeed/index.js +152 -0
- package/dist/components/PageSpeed/index.js.map +1 -0
- package/dist/components/PageSpeed/index.scss +233 -0
- package/dist/config/constants.d.ts +24 -0
- package/dist/config/constants.d.ts.map +1 -0
- package/dist/config/constants.js +50 -0
- package/dist/config/constants.js.map +1 -0
- package/dist/helpers/api.d.ts +6 -0
- package/dist/helpers/api.d.ts.map +1 -0
- package/dist/helpers/api.js +22 -0
- package/dist/helpers/api.js.map +1 -0
- package/dist/helpers/formatFullTime.d.ts +8 -0
- package/dist/helpers/formatFullTime.d.ts.map +1 -0
- package/dist/helpers/formatFullTime.js +45 -0
- package/dist/helpers/formatFullTime.js.map +1 -0
- package/dist/helpers/getProxyEndPoint.d.ts +7 -0
- package/dist/helpers/getProxyEndPoint.d.ts.map +1 -0
- package/dist/helpers/getProxyEndPoint.js +66 -0
- package/dist/helpers/getProxyEndPoint.js.map +1 -0
- package/dist/hooks/api/useFetchApi.d.ts +38 -0
- package/dist/hooks/api/useFetchApi.d.ts.map +1 -0
- package/dist/hooks/api/useFetchApi.js +74 -0
- package/dist/hooks/api/useFetchApi.js.map +1 -0
- package/dist/hooks/useI18n.d.ts +2 -0
- package/dist/hooks/useI18n.d.ts.map +1 -0
- package/dist/hooks/useI18n.js +35 -0
- package/dist/hooks/useI18n.js.map +1 -0
- package/dist/index.d.ts +9 -0
- package/dist/index.d.ts.map +1 -0
- package/dist/index.js +7 -0
- package/dist/index.js.map +1 -0
- package/dist/locales/da.json +38 -0
- package/dist/locales/de.json +38 -0
- package/dist/locales/en.json +38 -0
- package/dist/locales/es.json +38 -0
- package/dist/locales/fr.json +38 -0
- package/dist/locales/index.d.ts +383 -0
- package/dist/locales/index.d.ts.map +1 -0
- package/dist/locales/index.js +23 -0
- package/dist/locales/index.js.map +1 -0
- package/dist/locales/nl.json +38 -0
- package/dist/locales/pt.json +38 -0
- package/dist/locales/sv.json +38 -0
- package/dist/locales/vi.json +38 -0
- package/dist/locales/zh-CN.json +38 -0
- package/dist/types/shop.d.ts +188 -0
- package/dist/types/shop.d.ts.map +1 -0
- package/dist/types/shop.js +5 -0
- package/dist/types/shop.js.map +1 -0
- package/package.json +91 -0
|
@@ -0,0 +1,81 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* App ID keys for cross-app banner
|
|
3
|
+
* @example
|
|
4
|
+
* ```ts
|
|
5
|
+
* const appId: AppIdKeys = 'avada-seo-suite';
|
|
6
|
+
* ```
|
|
7
|
+
*/
|
|
8
|
+
export type AppIdKeys = 'avada-seo-suite' | 'seoon-blog' | 'ai-product-copy' | 'ap-speed-optimizer';
|
|
9
|
+
/**
|
|
10
|
+
* App ID values mapped to internal keys
|
|
11
|
+
* @example
|
|
12
|
+
* ```ts
|
|
13
|
+
* const appValue: AppIdValues = 'seo';
|
|
14
|
+
* ```
|
|
15
|
+
*/
|
|
16
|
+
export type AppIdValues = 'seo' | 'blog' | 'aiCopy' | 'plaza';
|
|
17
|
+
/**
|
|
18
|
+
* Mapping of app IDs to internal keys
|
|
19
|
+
* @example
|
|
20
|
+
* ```ts
|
|
21
|
+
* const appKey = APP_IDS['avada-seo-suite']; // 'seo'
|
|
22
|
+
* ```
|
|
23
|
+
*/
|
|
24
|
+
export declare const APP_IDS: Record<AppIdKeys, AppIdValues>;
|
|
25
|
+
/**
|
|
26
|
+
* Response type for checking if an app is installed
|
|
27
|
+
* @property {boolean} [isInstalled] - Whether the app is installed
|
|
28
|
+
* @property {string} [userType] - Type of user (e.g. 'user', 'admin')
|
|
29
|
+
* @property {AppIdKeys} [appId] - The app ID that was checked
|
|
30
|
+
*/
|
|
31
|
+
export interface CheckInstalledResponse {
|
|
32
|
+
isInstalled?: boolean;
|
|
33
|
+
userType?: string;
|
|
34
|
+
appId?: AppIdKeys;
|
|
35
|
+
}
|
|
36
|
+
/**
|
|
37
|
+
* Props for the CrossAppBanner component
|
|
38
|
+
* @interface CrossAppBannerProps
|
|
39
|
+
* @property {string} shopDomain - The shop domain to check app installation status
|
|
40
|
+
* @property {() => void} [clickInstallCallback] - Callback function when user clicks install button
|
|
41
|
+
* @property {string} [buttonContent] - Custom content for the install button
|
|
42
|
+
* @property {AppIdKeys[]} [appIds] - List of app IDs to check in priority order
|
|
43
|
+
*/
|
|
44
|
+
export interface CrossAppBannerProps {
|
|
45
|
+
/** The shop domain to check app installation status */
|
|
46
|
+
shopDomain: string;
|
|
47
|
+
/** Callback function when user clicks install button */
|
|
48
|
+
clickInstallCallback?: () => void;
|
|
49
|
+
/** Custom content for the install button */
|
|
50
|
+
buttonContent?: string;
|
|
51
|
+
/** List of app IDs to check in priority order */
|
|
52
|
+
appIds?: AppIdKeys[];
|
|
53
|
+
}
|
|
54
|
+
/**
|
|
55
|
+
* CrossAppBanner Component Type
|
|
56
|
+
*
|
|
57
|
+
* A banner component that displays promotional content for other Avada apps.
|
|
58
|
+
* It checks the installation status of specified apps and shows the first non-installed app.
|
|
59
|
+
*
|
|
60
|
+
* @example
|
|
61
|
+
* ```tsx
|
|
62
|
+
* // Basic usage
|
|
63
|
+
* <CrossAppBanner
|
|
64
|
+
* shopDomain="your-store.myshopify.com"
|
|
65
|
+
* />
|
|
66
|
+
*
|
|
67
|
+
* // With custom callbacks
|
|
68
|
+
* <CrossAppBanner
|
|
69
|
+
* shopDomain="your-store.myshopify.com"
|
|
70
|
+
* clickInstallCallback={() => console.log('Install clicked')}
|
|
71
|
+
* />
|
|
72
|
+
*
|
|
73
|
+
* // With specific apps to check
|
|
74
|
+
* <CrossAppBanner
|
|
75
|
+
* shopDomain="your-store.myshopify.com"
|
|
76
|
+
* appIds={['avada-seo-suite', 'ai-product-copy']}
|
|
77
|
+
* />
|
|
78
|
+
* ```
|
|
79
|
+
*/
|
|
80
|
+
export type CrossAppBannerComponent = React.FC<CrossAppBannerProps>;
|
|
81
|
+
//# sourceMappingURL=types.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../../src/components/CrossAppBanner/types.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;AACH,MAAM,MAAM,SAAS,GAAG,iBAAiB,GAAG,YAAY,GAAG,iBAAiB,GAAG,oBAAoB,CAAC;AAEpG;;;;;;GAMG;AACH,MAAM,MAAM,WAAW,GAAG,KAAK,GAAG,MAAM,GAAG,QAAQ,GAAG,OAAO,CAAC;AAE9D;;;;;;GAMG;AACH,eAAO,MAAM,OAAO,EAAE,MAAM,CAAC,SAAS,EAAE,WAAW,CAKlD,CAAC;AAEF;;;;;GAKG;AACH,MAAM,WAAW,sBAAsB;IACrC,WAAW,CAAC,EAAE,OAAO,CAAC;IACtB,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB,KAAK,CAAC,EAAE,SAAS,CAAC;CACnB;AAED;;;;;;;GAOG;AACH,MAAM,WAAW,mBAAmB;IAClC,uDAAuD;IACvD,UAAU,EAAE,MAAM,CAAC;IACnB,wDAAwD;IACxD,oBAAoB,CAAC,EAAE,MAAM,IAAI,CAAC;IAClC,4CAA4C;IAC5C,aAAa,CAAC,EAAE,MAAM,CAAC;IACvB,iDAAiD;IACjD,MAAM,CAAC,EAAE,SAAS,EAAE,CAAC;CACtB;AAED;;;;;;;;;;;;;;;;;;;;;;;;;GAyBG;AACH,MAAM,MAAM,uBAAuB,GAAG,KAAK,CAAC,EAAE,CAAC,mBAAmB,CAAC,CAAC"}
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Mapping of app IDs to internal keys
|
|
3
|
+
* @example
|
|
4
|
+
* ```ts
|
|
5
|
+
* const appKey = APP_IDS['avada-seo-suite']; // 'seo'
|
|
6
|
+
* ```
|
|
7
|
+
*/
|
|
8
|
+
export const APP_IDS = {
|
|
9
|
+
'avada-seo-suite': 'seo',
|
|
10
|
+
'seoon-blog': 'blog',
|
|
11
|
+
'ai-product-copy': 'aiCopy',
|
|
12
|
+
'ap-speed-optimizer': 'plaza',
|
|
13
|
+
};
|
|
14
|
+
//# sourceMappingURL=types.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"types.js","sourceRoot":"","sources":["../../../src/components/CrossAppBanner/types.ts"],"names":[],"mappings":"AAkBA;;;;;;GAMG;AACH,MAAM,CAAC,MAAM,OAAO,GAAmC;IACrD,iBAAiB,EAAE,KAAK;IACxB,YAAY,EAAE,MAAM;IACpB,iBAAiB,EAAE,QAAQ;IAC3B,oBAAoB,EAAE,OAAO;CAC9B,CAAC"}
|
|
@@ -0,0 +1,81 @@
|
|
|
1
|
+
import './index.scss';
|
|
2
|
+
import { Shop } from '../../types/shop';
|
|
3
|
+
/**
|
|
4
|
+
* Interface representing an SEO issue with title and description
|
|
5
|
+
* @interface Issue
|
|
6
|
+
*/
|
|
7
|
+
export interface Issue {
|
|
8
|
+
/** Unique identifier for the issue */
|
|
9
|
+
id: string;
|
|
10
|
+
/** Title of the issue */
|
|
11
|
+
title: string;
|
|
12
|
+
/** Detailed description of the issue */
|
|
13
|
+
description: string;
|
|
14
|
+
}
|
|
15
|
+
/**
|
|
16
|
+
* Interface representing the response from speed score API
|
|
17
|
+
* @interface SpeedScoreResponse
|
|
18
|
+
*/
|
|
19
|
+
export interface SpeedScoreResponse {
|
|
20
|
+
/** Whether the speed scan is in progress */
|
|
21
|
+
scanning: boolean;
|
|
22
|
+
/** Home page speed metrics */
|
|
23
|
+
homePage: {
|
|
24
|
+
/** Desktop performance score (0-100) */
|
|
25
|
+
desktopScore: number;
|
|
26
|
+
/** Detailed audit results for desktop */
|
|
27
|
+
desktopAudits: Record<string, {
|
|
28
|
+
id: string;
|
|
29
|
+
score: number;
|
|
30
|
+
}>;
|
|
31
|
+
};
|
|
32
|
+
/** Last update timestamp */
|
|
33
|
+
updatedAt: string;
|
|
34
|
+
/** Overall SEO score */
|
|
35
|
+
score: number;
|
|
36
|
+
/** Last scan timestamp */
|
|
37
|
+
lastScan: string;
|
|
38
|
+
/** Array of SEO issues found */
|
|
39
|
+
issues: Issue[];
|
|
40
|
+
}
|
|
41
|
+
/**
|
|
42
|
+
* Props for the PageSpeed component
|
|
43
|
+
* @interface PageSpeedProps
|
|
44
|
+
*/
|
|
45
|
+
export interface PageSpeedProps {
|
|
46
|
+
/** Display type of the SEO score component
|
|
47
|
+
* @default 'widget'
|
|
48
|
+
*/
|
|
49
|
+
type?: 'widget' | 'banner';
|
|
50
|
+
/** Shop information object containing domain and other details.
|
|
51
|
+
* If not provided, it will be retrieved from Redux store.
|
|
52
|
+
* @see Shop
|
|
53
|
+
* @optional
|
|
54
|
+
*/
|
|
55
|
+
shop?: Shop;
|
|
56
|
+
/** Access token Avada SEO Suite for API authentication
|
|
57
|
+
* Required for making API requests to the SEO service
|
|
58
|
+
*/
|
|
59
|
+
accessToken: string;
|
|
60
|
+
/** URL of the app where the speed score is displayed */
|
|
61
|
+
appUrl?: string;
|
|
62
|
+
}
|
|
63
|
+
/**
|
|
64
|
+
* PageSpeed component displays SEO performance metrics and issues for a Shopify store.
|
|
65
|
+
*
|
|
66
|
+
* @component
|
|
67
|
+
* @example
|
|
68
|
+
* ```tsx
|
|
69
|
+
* <PageSpeed
|
|
70
|
+
* type="widget"
|
|
71
|
+
* shop={{
|
|
72
|
+
* shopifyDomain: 'my-store.myshopify.com',
|
|
73
|
+
* domain: 'my-store.com'
|
|
74
|
+
* }}
|
|
75
|
+
* accessToken="your-access-token"
|
|
76
|
+
* />
|
|
77
|
+
* ```
|
|
78
|
+
*/
|
|
79
|
+
export declare function PageSpeed({ type, shop, accessToken, appUrl }: PageSpeedProps): import("react/jsx-runtime").JSX.Element | null;
|
|
80
|
+
export default PageSpeed;
|
|
81
|
+
//# sourceMappingURL=index.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/components/PageSpeed/index.tsx"],"names":[],"mappings":"AAeA,OAAO,cAAc,CAAC;AAQtB,OAAO,EAAE,IAAI,EAAE,MAAM,kBAAkB,CAAC;AAGxC;;;GAGG;AACH,MAAM,WAAW,KAAK;IACpB,sCAAsC;IACtC,EAAE,EAAE,MAAM,CAAC;IACX,yBAAyB;IACzB,KAAK,EAAE,MAAM,CAAC;IACd,wCAAwC;IACxC,WAAW,EAAE,MAAM,CAAC;CACrB;AAED;;;GAGG;AACH,MAAM,WAAW,kBAAkB;IACjC,4CAA4C;IAC5C,QAAQ,EAAE,OAAO,CAAC;IAClB,8BAA8B;IAC9B,QAAQ,EAAE;QACR,wCAAwC;QACxC,YAAY,EAAE,MAAM,CAAC;QACrB,yCAAyC;QACzC,aAAa,EAAE,MAAM,CAAC,MAAM,EAAE;YAAE,EAAE,EAAE,MAAM,CAAC;YAAC,KAAK,EAAE,MAAM,CAAA;SAAE,CAAC,CAAC;KAC9D,CAAC;IACF,4BAA4B;IAC5B,SAAS,EAAE,MAAM,CAAC;IAClB,wBAAwB;IACxB,KAAK,EAAE,MAAM,CAAC;IACd,0BAA0B;IAC1B,QAAQ,EAAE,MAAM,CAAC;IACjB,gCAAgC;IAChC,MAAM,EAAE,KAAK,EAAE,CAAC;CACjB;AAED;;;GAGG;AACH,MAAM,WAAW,cAAc;IAC7B;;OAEG;IACH,IAAI,CAAC,EAAE,QAAQ,GAAG,QAAQ,CAAC;IAC3B;;;;OAIG;IACH,IAAI,CAAC,EAAE,IAAI,CAAC;IACZ;;OAEG;IACH,WAAW,EAAE,MAAM,CAAC;IACpB,wDAAwD;IACxD,MAAM,CAAC,EAAE,MAAM,CAAC;CACjB;AAED;;;;;;;;;;;;;;;GAeG;AACH,wBAAgB,SAAS,CAAC,EAAE,IAAe,EAAE,IAAI,EAAE,WAAW,EAAE,MAAM,EAAE,EAAE,cAAc,kDAwQvF;AAED,eAAe,SAAS,CAAC"}
|
|
@@ -0,0 +1,152 @@
|
|
|
1
|
+
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
2
|
+
import { AppProvider, Banner, BlockStack, Box, Button, Grid, Icon, InlineStack, LegacyCard, Link, Page, Text, } from '@shopify/polaris';
|
|
3
|
+
import { useEffect, useState } from 'react';
|
|
4
|
+
import './index.scss';
|
|
5
|
+
import { buildStyles, CircularProgressbarWithChildren } from 'react-circular-progressbar';
|
|
6
|
+
import { formatBothDateTime } from '../../helpers/formatFullTime';
|
|
7
|
+
import useFetchApi from '../../hooks/api/useFetchApi';
|
|
8
|
+
import { ExternalIcon } from '@shopify/polaris-icons';
|
|
9
|
+
import { useI18n } from '../../hooks/useI18n';
|
|
10
|
+
import { SEO_API_PROXY_ENDPOINT } from '../../config/constants';
|
|
11
|
+
/**
|
|
12
|
+
* PageSpeed component displays SEO performance metrics and issues for a Shopify store.
|
|
13
|
+
*
|
|
14
|
+
* @component
|
|
15
|
+
* @example
|
|
16
|
+
* ```tsx
|
|
17
|
+
* <PageSpeed
|
|
18
|
+
* type="widget"
|
|
19
|
+
* shop={{
|
|
20
|
+
* shopifyDomain: 'my-store.myshopify.com',
|
|
21
|
+
* domain: 'my-store.com'
|
|
22
|
+
* }}
|
|
23
|
+
* accessToken="your-access-token"
|
|
24
|
+
* />
|
|
25
|
+
* ```
|
|
26
|
+
*/
|
|
27
|
+
export function PageSpeed({ type = 'widget', shop, accessToken, appUrl }) {
|
|
28
|
+
const i18n = useI18n();
|
|
29
|
+
const [isCollapsed, setIsCollapsed] = useState(false);
|
|
30
|
+
const [isExpandedPage, setIsExpandedPage] = useState(false);
|
|
31
|
+
const issueData = [
|
|
32
|
+
{
|
|
33
|
+
id: 'bootup-time',
|
|
34
|
+
title: i18n.t('PageSpeed.issues.bootupTime.title'),
|
|
35
|
+
description: i18n.t('PageSpeed.issues.bootupTime.description'),
|
|
36
|
+
},
|
|
37
|
+
{
|
|
38
|
+
id: 'largest-contentful-paint',
|
|
39
|
+
title: i18n.t('PageSpeed.issues.largestContentfulPaint.title'),
|
|
40
|
+
description: i18n.t('PageSpeed.issues.largestContentfulPaint.description'),
|
|
41
|
+
},
|
|
42
|
+
{
|
|
43
|
+
id: 'largest-contentful-paint-element',
|
|
44
|
+
title: i18n.t('PageSpeed.issues.largestContentfulPaintElement.title'),
|
|
45
|
+
description: i18n.t('PageSpeed.issues.largestContentfulPaintElement.description'),
|
|
46
|
+
},
|
|
47
|
+
{
|
|
48
|
+
id: 'lcp-lazy-loaded',
|
|
49
|
+
title: i18n.t('PageSpeed.issues.lcpLazyLoaded.title'),
|
|
50
|
+
description: i18n.t('PageSpeed.issues.lcpLazyLoaded.description'),
|
|
51
|
+
},
|
|
52
|
+
];
|
|
53
|
+
useEffect(() => {
|
|
54
|
+
if (isExpandedPage) {
|
|
55
|
+
document.body.style.overflow = 'hidden';
|
|
56
|
+
}
|
|
57
|
+
else {
|
|
58
|
+
document.body.style.overflow = 'auto';
|
|
59
|
+
}
|
|
60
|
+
return () => {
|
|
61
|
+
document.body.style.overflow = 'auto';
|
|
62
|
+
};
|
|
63
|
+
}, [isExpandedPage]);
|
|
64
|
+
const { data, loading } = useFetchApi({
|
|
65
|
+
url: (appUrl || SEO_API_PROXY_ENDPOINT) + '/proxy/speed-score',
|
|
66
|
+
headers: {
|
|
67
|
+
'X-SEO-Access-Token': accessToken,
|
|
68
|
+
'X-SEO-Shop-Domain': shop?.shopifyDomain || shop?.domain || '',
|
|
69
|
+
},
|
|
70
|
+
defaultData: {
|
|
71
|
+
homePage: {
|
|
72
|
+
desktopAudits: {},
|
|
73
|
+
desktopScore: 0,
|
|
74
|
+
},
|
|
75
|
+
scanning: false,
|
|
76
|
+
updatedAt: new Date().toISOString(),
|
|
77
|
+
issues: [],
|
|
78
|
+
score: 0,
|
|
79
|
+
lastScan: new Date().toISOString(),
|
|
80
|
+
},
|
|
81
|
+
});
|
|
82
|
+
const score = Number(shop?.customSpeedScore?.mobileScore) || data.homePage.desktopScore;
|
|
83
|
+
const lowScoreAuditIds = Object.values(data.homePage.desktopAudits)
|
|
84
|
+
.filter(item => (typeof item.score === 'number' && item.score < 1) || !item.score)
|
|
85
|
+
.map(item => item.id);
|
|
86
|
+
const issues = issueData.filter(issue => lowScoreAuditIds.includes(issue.id));
|
|
87
|
+
const getStatus = () => {
|
|
88
|
+
if (score >= 50)
|
|
89
|
+
return {
|
|
90
|
+
title: i18n.t('PageSpeed.medium'),
|
|
91
|
+
color: '#B28400',
|
|
92
|
+
backgroundColor: '#FFF3E3',
|
|
93
|
+
};
|
|
94
|
+
return {
|
|
95
|
+
title: i18n.t('PageSpeed.poor'),
|
|
96
|
+
color: '#8E1F0B',
|
|
97
|
+
backgroundColor: '#FFECEC',
|
|
98
|
+
};
|
|
99
|
+
};
|
|
100
|
+
if (score >= 90)
|
|
101
|
+
return null;
|
|
102
|
+
const { color, title, backgroundColor } = getStatus();
|
|
103
|
+
let ScoreComponent;
|
|
104
|
+
switch (type) {
|
|
105
|
+
case 'widget':
|
|
106
|
+
ScoreComponent = (_jsxs("div", { className: `AC-PageSpeed-Widget__Container ${isCollapsed ? 'collapsed' : ''}`, children: [_jsx("div", { className: "AC-PageSpeed-Widget__Item", children: _jsx(Text, { as: 'span', children: i18n.t('PageSpeed.webPerformanceIs', {
|
|
107
|
+
PERFORMANCE: _jsx("span", { style: { color }, children: title }),
|
|
108
|
+
}) }) }), _jsx("div", { className: "AC-PageSpeed-Widget__Item", children: i18n.t('PageSpeed.checkCritical', {
|
|
109
|
+
LINK: _jsx(Link, { onClick: () => setIsExpandedPage(true), children: i18n.t('PageSpeed.here') }),
|
|
110
|
+
}) }), _jsx("div", { className: "AC-PageSpeed__CircularProgressBar", onClick: () => setIsCollapsed(!isCollapsed), children: _jsx(CircularProgressbarWithChildren, { value: score, background: true, backgroundPadding: 0, styles: buildStyles({
|
|
111
|
+
backgroundColor: 'white',
|
|
112
|
+
pathColor: color,
|
|
113
|
+
trailColor: 'transparent',
|
|
114
|
+
}), children: _jsx("p", { className: "AC-CircularProgressBar__Score--score", style: { color }, children: score }) }) })] }));
|
|
115
|
+
break;
|
|
116
|
+
case 'banner':
|
|
117
|
+
default:
|
|
118
|
+
ScoreComponent = (_jsx(Banner, { title: '', tone: 'critical', children: _jsx(Text, { as: 'span', children: i18n.t('PageSpeed.checkCriticalWebPerformance', {
|
|
119
|
+
PERFORMANCE: title,
|
|
120
|
+
LINK: _jsx(Link, { onClick: () => setIsExpandedPage(true), children: i18n.t('PageSpeed.here') }),
|
|
121
|
+
}) }) }));
|
|
122
|
+
break;
|
|
123
|
+
}
|
|
124
|
+
console.log('loading || !data || data.scanning || !data.homePage', loading || !data || data.scanning || !data.homePage);
|
|
125
|
+
if (loading || !data || data.scanning || !data.homePage)
|
|
126
|
+
return null;
|
|
127
|
+
return (_jsxs(AppProvider, { i18n: {}, children: [ScoreComponent, isExpandedPage && (_jsx("div", { className: "AC-PageSpeed__DetailReport", children: _jsx(Page, { title: i18n.t('PageSpeed.title'), subtitle: i18n.t('PageSpeed.subtitle'), backAction: {
|
|
128
|
+
onAction: () => {
|
|
129
|
+
setIsExpandedPage(false);
|
|
130
|
+
},
|
|
131
|
+
}, children: _jsxs(Grid, { columns: { sm: 3 }, children: [_jsx(Grid.Cell, { columnSpan: { xs: 6, sm: 6, md: 6, lg: 4, xl: 4 }, children: _jsx(LegacyCard, { title: i18n.t('PageSpeed.performanceScore'), sectioned: true, children: _jsxs(BlockStack, { gap: '400', children: [_jsxs(BlockStack, { gap: '200', inlineAlign: 'center', children: [_jsx("div", { className: `AC-PageSpeed__PerformanceScore`, children: _jsx(CircularProgressbarWithChildren, { value: score, background: true, backgroundPadding: 0, styles: buildStyles({
|
|
132
|
+
backgroundColor,
|
|
133
|
+
pathColor: color,
|
|
134
|
+
trailColor: 'transparent',
|
|
135
|
+
}), children: _jsx("div", { className: "AC-PageSpeed__PerformanceScore-wrapper", children: _jsx("p", { className: "AC-PageSpeed__PerformanceScore--score", style: {
|
|
136
|
+
color: color,
|
|
137
|
+
fontSize: '40px',
|
|
138
|
+
fontWeight: '650',
|
|
139
|
+
}, children: score }) }) }) }), _jsx(Text, { as: 'span', children: i18n.t('PageSpeed.yourScore', { SCORE: title }) }), _jsx(Text, { as: 'span', tone: 'subdued', variant: 'bodySm', children: i18n.t('PageSpeed.lastScanTime', {
|
|
140
|
+
TIME: formatBothDateTime(data?.updatedAt || new Date()),
|
|
141
|
+
}) })] }), _jsxs(BlockStack, { gap: '200', inlineAlign: 'center', children: [_jsx(Button, { variant: 'primary', size: 'large', onClick: () => {
|
|
142
|
+
window.open(`https://admin.shopify.com/store/${shop?.shopifyDomain.replace(/\.myshopify\.com$/, '')}/apps/avada-seo-suite/embed/speed-up`, '_blank');
|
|
143
|
+
}, children: i18n.t('PageSpeed.optimizeNow') }), _jsxs(InlineStack, { gap: '100', children: [_jsx(Link, { url: `https://pagespeed.web.dev/analysis?url=${shop?.shopifyDomain}`, monochrome: true, removeUnderline: true, external: true, children: _jsx(Text, { as: 'span', tone: 'subdued', variant: 'bodyMd', children: i18n.t('PageSpeed.resultFrom') }) }), _jsx(Box, { children: _jsx(Icon, { tone: 'subdued', source: ExternalIcon }) })] })] })] }) }) }), _jsx(Grid.Cell, { columnSpan: { xs: 6, sm: 6, md: 6, lg: 8, xl: 8 }, children: _jsx(LegacyCard, { title: i18n.t('PageSpeed.criticalIssue'), sectioned: true, children: _jsx(BlockStack, { gap: '400', children: issues.map((issue, index) => {
|
|
144
|
+
return (_jsx("div", { style: {
|
|
145
|
+
borderRadius: '8px',
|
|
146
|
+
padding: '16px',
|
|
147
|
+
outline: 'solid 2px #E3E3E3',
|
|
148
|
+
}, children: _jsxs(BlockStack, { gap: '300', children: [_jsx(Text, { as: 'span', variant: 'headingMd', tone: 'critical', children: issue.title }), _jsx(Text, { as: 'span', children: issue.description })] }) }, index));
|
|
149
|
+
}) }) }) })] }) }) }))] }));
|
|
150
|
+
}
|
|
151
|
+
export default PageSpeed;
|
|
152
|
+
//# sourceMappingURL=index.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/components/PageSpeed/index.tsx"],"names":[],"mappings":";AAAA,OAAO,EACL,WAAW,EACX,MAAM,EACN,UAAU,EACV,GAAG,EACH,MAAM,EACN,IAAI,EACJ,IAAI,EACJ,WAAW,EACX,UAAU,EACV,IAAI,EACJ,IAAI,EACJ,IAAI,GACL,MAAM,kBAAkB,CAAC;AAC1B,OAAc,EAAE,SAAS,EAAE,QAAQ,EAAE,MAAM,OAAO,CAAC;AACnD,OAAO,cAAc,CAAC;AACtB,OAAO,EAAE,WAAW,EAAE,+BAA+B,EAAE,MAAM,4BAA4B,CAAC;AAC1F,OAAO,EAAE,kBAAkB,EAAE,MAAM,8BAA8B,CAAC;AAClE,OAAO,WAAW,MAAM,6BAA6B,CAAC;AAEtD,OAAO,EAAE,YAAY,EAAE,MAAM,wBAAwB,CAAC;AAEtD,OAAO,EAAE,OAAO,EAAE,MAAM,qBAAqB,CAAC;AAE9C,OAAO,EAAE,sBAAsB,EAAE,MAAM,wBAAwB,CAAC;AA8DhE;;;;;;;;;;;;;;;GAeG;AACH,MAAM,UAAU,SAAS,CAAC,EAAE,IAAI,GAAG,QAAQ,EAAE,IAAI,EA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AAK;oDACnB,OAAO,EAAE,MAAM;oDACf,OAAO,EAAE,mBAAmB;iDAC7B,YAGD,MAAC,UAAU,IAAC,GAAG,EAAE,KAAK,aACpB,KAAC,IAAI,IAAC,EAAE,EAAE,MAAM,EAAE,OAAO,EAAE,WAAW,EAAE,IAAI,EAAE,UAAU,YACrD,KAAK,CAAC,KAAK,GACP,EAEP,KAAC,IAAI,IAAC,EAAE,EAAE,MAAM,YAAG,KAAK,CAAC,WAAW,GAAQ,IACjC,IARR,KAAK,CASN,CACP,CAAC;wCACJ,CAAC,CAAC,GACS,GACF,GACH,IACP,GACF,GACH,CACP,IACW,CACf,CAAC;AACJ,CAAC;AAED,eAAe,SAAS,CAAC"}
|
|
@@ -0,0 +1,233 @@
|
|
|
1
|
+
.AC-PageSpeed-Widget__Container {
|
|
2
|
+
position: fixed;
|
|
3
|
+
bottom: 20px;
|
|
4
|
+
left: 20px;
|
|
5
|
+
gap: 16px;
|
|
6
|
+
display: flex;
|
|
7
|
+
flex-direction: column;
|
|
8
|
+
align-items: flex-start;
|
|
9
|
+
z-index: 1000;
|
|
10
|
+
|
|
11
|
+
.AC-PageSpeed__CircularProgressBar {
|
|
12
|
+
box-shadow: 0 8px 12px rgba(0, 0, 0, 0.2);
|
|
13
|
+
border-radius: 50%;
|
|
14
|
+
width: 50px;
|
|
15
|
+
height: 50px;
|
|
16
|
+
opacity: 0;
|
|
17
|
+
transform: scale(0.7);
|
|
18
|
+
animation: bubbleUp 0.4s cubic-bezier(0.2, 0.8, 0.2, 1) forwards;
|
|
19
|
+
animation-delay: 0s;
|
|
20
|
+
cursor: pointer;
|
|
21
|
+
transition: all 0.3s cubic-bezier(0.2, 0.8, 0.2, 1);
|
|
22
|
+
margin: 0;
|
|
23
|
+
|
|
24
|
+
&:hover {
|
|
25
|
+
transform: scale(1.1) !important;
|
|
26
|
+
}
|
|
27
|
+
|
|
28
|
+
.AC-CircularProgressBar__Score--score {
|
|
29
|
+
font-size: 18px;
|
|
30
|
+
font-weight: 650;
|
|
31
|
+
}
|
|
32
|
+
}
|
|
33
|
+
}
|
|
34
|
+
|
|
35
|
+
.AC-PageSpeed__DetailReport {
|
|
36
|
+
position: fixed;
|
|
37
|
+
top: 0;
|
|
38
|
+
left: 0;
|
|
39
|
+
width: 100vw;
|
|
40
|
+
height: 100vh;
|
|
41
|
+
background-color: #f6f6f7;
|
|
42
|
+
z-index: 9999;
|
|
43
|
+
padding: 24px;
|
|
44
|
+
box-sizing: border-box;
|
|
45
|
+
overflow: auto;
|
|
46
|
+
display: flex;
|
|
47
|
+
flex-direction: column;
|
|
48
|
+
|
|
49
|
+
.Polaris-Page {
|
|
50
|
+
width: 100% !important;
|
|
51
|
+
}
|
|
52
|
+
|
|
53
|
+
.AC-PageSpeed__PerformanceScore {
|
|
54
|
+
width: 150px;
|
|
55
|
+
max-width: 150px;
|
|
56
|
+
margin: 0;
|
|
57
|
+
|
|
58
|
+
.AC-PageSpeed__PerformanceScore-wrapper {
|
|
59
|
+
display: flex;
|
|
60
|
+
flex-direction: column;
|
|
61
|
+
gap: 10px;
|
|
62
|
+
text-align: center;
|
|
63
|
+
}
|
|
64
|
+
|
|
65
|
+
.AC-PageSpeed__PerformanceScore--score {
|
|
66
|
+
font-size: 13px;
|
|
67
|
+
font-weight: 450;
|
|
68
|
+
text-transform: capitalize;
|
|
69
|
+
}
|
|
70
|
+
|
|
71
|
+
.AC-PageSpeed__PerformanceScore__ScoreWrapper:hover {
|
|
72
|
+
.AC-CircularProgressBar__Score {
|
|
73
|
+
filter: blur(3px);
|
|
74
|
+
}
|
|
75
|
+
|
|
76
|
+
.AC-CircularProgressBar__Button {
|
|
77
|
+
opacity: 1;
|
|
78
|
+
z-index: 40;
|
|
79
|
+
transition:
|
|
80
|
+
opacity 0.5s,
|
|
81
|
+
transform 0.5s;
|
|
82
|
+
transform: translate(-50%, -50%) scale(1.05);
|
|
83
|
+
}
|
|
84
|
+
|
|
85
|
+
.AC-CircularProgressBar__Loading--text {
|
|
86
|
+
display: block;
|
|
87
|
+
}
|
|
88
|
+
|
|
89
|
+
.AC-CircularProgressBar__Loading .Polaris-Spinner {
|
|
90
|
+
display: none;
|
|
91
|
+
}
|
|
92
|
+
}
|
|
93
|
+
}
|
|
94
|
+
|
|
95
|
+
.AC-PageSpeed__CircularProgressBar {
|
|
96
|
+
width: 150px;
|
|
97
|
+
margin: 0;
|
|
98
|
+
|
|
99
|
+
.AC-CircularProgressBar__Button {
|
|
100
|
+
position: absolute;
|
|
101
|
+
z-index: -10;
|
|
102
|
+
left: 50%;
|
|
103
|
+
transform: translate(-50%, -50%);
|
|
104
|
+
top: 50%;
|
|
105
|
+
opacity: 0;
|
|
106
|
+
}
|
|
107
|
+
|
|
108
|
+
.AC-CircularProgressBar__Loading--text {
|
|
109
|
+
display: none;
|
|
110
|
+
}
|
|
111
|
+
}
|
|
112
|
+
|
|
113
|
+
.AC-PageSpeed__DetailedReport {
|
|
114
|
+
> .Polaris-LegacyCard__Section {
|
|
115
|
+
padding-bottom: 0;
|
|
116
|
+
}
|
|
117
|
+
.Polaris-ShadowBevel {
|
|
118
|
+
box-shadow: none;
|
|
119
|
+
}
|
|
120
|
+
}
|
|
121
|
+
}
|
|
122
|
+
|
|
123
|
+
@keyframes bubbleUp {
|
|
124
|
+
0% {
|
|
125
|
+
opacity: 0;
|
|
126
|
+
transform: translateY(30px) scale(0.8);
|
|
127
|
+
}
|
|
128
|
+
50% {
|
|
129
|
+
transform: translateY(-5px) scale(1.05);
|
|
130
|
+
}
|
|
131
|
+
100% {
|
|
132
|
+
opacity: 1;
|
|
133
|
+
transform: translateY(0) scale(1);
|
|
134
|
+
}
|
|
135
|
+
}
|
|
136
|
+
|
|
137
|
+
@keyframes collapseItem {
|
|
138
|
+
0% {
|
|
139
|
+
opacity: 1;
|
|
140
|
+
transform: translateY(0) scale(1);
|
|
141
|
+
}
|
|
142
|
+
100% {
|
|
143
|
+
opacity: 0;
|
|
144
|
+
transform: translateY(15px) scale(0.8);
|
|
145
|
+
}
|
|
146
|
+
}
|
|
147
|
+
|
|
148
|
+
.AC-PageSpeed-Widget__Item {
|
|
149
|
+
align-self: flex-start;
|
|
150
|
+
font-size: 14px;
|
|
151
|
+
padding: 8px 16px;
|
|
152
|
+
background-color: white;
|
|
153
|
+
border-radius: 16px;
|
|
154
|
+
box-shadow: 0 8px 12px rgba(0, 0, 0, 0.2);
|
|
155
|
+
opacity: 0;
|
|
156
|
+
transform: translateY(30px) scale(0.8);
|
|
157
|
+
animation: bubbleUp 0.4s cubic-bezier(0.2, 0.8, 0.2, 1) forwards;
|
|
158
|
+
transition: all 0.3s cubic-bezier(0.2, 0.8, 0.2, 1);
|
|
159
|
+
transform-origin: left center;
|
|
160
|
+
margin-right: auto;
|
|
161
|
+
}
|
|
162
|
+
|
|
163
|
+
.AC-PageSpeed-Widget__Item:nth-child(1) {
|
|
164
|
+
animation-delay: 0.4s;
|
|
165
|
+
}
|
|
166
|
+
|
|
167
|
+
.AC-PageSpeed-Widget__Item:nth-child(2) {
|
|
168
|
+
animation-delay: 0.2s;
|
|
169
|
+
}
|
|
170
|
+
|
|
171
|
+
.AC-PageSpeed-Widget__Container.collapsed {
|
|
172
|
+
.AC-PageSpeed-Widget__Item {
|
|
173
|
+
animation: collapseItem 0.3s cubic-bezier(0.2, 0.8, 0.2, 1) forwards;
|
|
174
|
+
pointer-events: none !important;
|
|
175
|
+
}
|
|
176
|
+
}
|
|
177
|
+
|
|
178
|
+
// Scoped styles for CircularProgressbarWithChildren
|
|
179
|
+
.AC-PageSpeed__CircularProgressBar {
|
|
180
|
+
.CircularProgressbar {
|
|
181
|
+
width: 100%;
|
|
182
|
+
vertical-align: middle;
|
|
183
|
+
}
|
|
184
|
+
|
|
185
|
+
.CircularProgressbar .CircularProgressbar-path {
|
|
186
|
+
stroke-linecap: round;
|
|
187
|
+
transition: stroke-dashoffset 0.5s ease 0s;
|
|
188
|
+
}
|
|
189
|
+
|
|
190
|
+
.CircularProgressbar .CircularProgressbar-trail {
|
|
191
|
+
stroke: #d6d6d6;
|
|
192
|
+
stroke-linecap: round;
|
|
193
|
+
}
|
|
194
|
+
|
|
195
|
+
.CircularProgressbar .CircularProgressbar-text {
|
|
196
|
+
fill: #3e98c7;
|
|
197
|
+
font-size: 20px;
|
|
198
|
+
dominant-baseline: middle;
|
|
199
|
+
text-anchor: middle;
|
|
200
|
+
}
|
|
201
|
+
|
|
202
|
+
.CircularProgressbar .CircularProgressbar-background {
|
|
203
|
+
fill: #d6d6d6;
|
|
204
|
+
}
|
|
205
|
+
}
|
|
206
|
+
|
|
207
|
+
.AC-PageSpeed__PerformanceScore {
|
|
208
|
+
.CircularProgressbar {
|
|
209
|
+
width: 100%;
|
|
210
|
+
vertical-align: middle;
|
|
211
|
+
}
|
|
212
|
+
|
|
213
|
+
.CircularProgressbar .CircularProgressbar-path {
|
|
214
|
+
stroke-linecap: round;
|
|
215
|
+
transition: stroke-dashoffset 0.5s ease 0s;
|
|
216
|
+
}
|
|
217
|
+
|
|
218
|
+
.CircularProgressbar .CircularProgressbar-trail {
|
|
219
|
+
stroke: #d6d6d6;
|
|
220
|
+
stroke-linecap: round;
|
|
221
|
+
}
|
|
222
|
+
|
|
223
|
+
.CircularProgressbar .CircularProgressbar-text {
|
|
224
|
+
fill: #3e98c7;
|
|
225
|
+
font-size: 20px;
|
|
226
|
+
dominant-baseline: middle;
|
|
227
|
+
text-anchor: middle;
|
|
228
|
+
}
|
|
229
|
+
|
|
230
|
+
.CircularProgressbar .CircularProgressbar-background {
|
|
231
|
+
fill: #d6d6d6;
|
|
232
|
+
}
|
|
233
|
+
}
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* API endpoints configuration
|
|
3
|
+
*/
|
|
4
|
+
export declare const SEO_API_PROXY_ENDPOINT = "https://seo.apps.avada.io/proxy";
|
|
5
|
+
export declare const BLOG_API_PROXY_ENDPOINT = "https://blogapp.seoon.io/proxy";
|
|
6
|
+
export declare const IMAGE_API_PROXY_ENDPOINT = "https://app-plaza-image-optimizer.firebaseapp.com/proxy";
|
|
7
|
+
export declare const AI_PRODUCT_API_PROXY_ENDPOINT = "https://ai-product-copy.firebaseapp.com/proxy";
|
|
8
|
+
export declare const SEO_API_ENDPOINT = "https://seo.apps.avada.io";
|
|
9
|
+
export declare const BLOG_API_ENDPOINT = "https://blogapp.seoon.io";
|
|
10
|
+
export declare const IMAGE_API_ENDPOINT = "https://app-plaza-image-optimizer.firebaseapp.com";
|
|
11
|
+
export declare const AI_PRODUCT_API_ENDPOINT = "https://ai-product-copy.firebaseapp.com";
|
|
12
|
+
export declare const SEO_PROXY_ACCESS_TOKEN = "8fdf4cab401bb8c55f006b210f905c99";
|
|
13
|
+
export declare const BLOG_PROXY_ACCESS_TOKEN = "11b2fc581e5abab63e012721bcaed12a";
|
|
14
|
+
export declare const IMAGE_PROXY_ACCESS_TOKEN = "e2fea4bf882eab44d34d4396099c78fe";
|
|
15
|
+
export declare const AI_PROXY_ACCESS_TOKEN = "293dfe9d8e908fdb401af1d8dda5145c";
|
|
16
|
+
export declare const listCrossApps: {
|
|
17
|
+
title: string;
|
|
18
|
+
description: string;
|
|
19
|
+
image: string;
|
|
20
|
+
url: string;
|
|
21
|
+
actionLabel: string;
|
|
22
|
+
key: string;
|
|
23
|
+
}[];
|
|
24
|
+
//# sourceMappingURL=constants.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"constants.d.ts","sourceRoot":"","sources":["../../src/config/constants.ts"],"names":[],"mappings":"AAAA;;GAEG;AACH,eAAO,MAAM,sBAAsB,oCAAoC,CAAC;AACxE,eAAO,MAAM,uBAAuB,mCAAmC,CAAC;AACxE,eAAO,MAAM,wBAAwB,4DAA4D,CAAC;AAClG,eAAO,MAAM,6BAA6B,kDAAkD,CAAC;AAE7F,eAAO,MAAM,gBAAgB,8BAA8B,CAAC;AAC5D,eAAO,MAAM,iBAAiB,6BAA6B,CAAC;AAC5D,eAAO,MAAM,kBAAkB,sDAAsD,CAAC;AACtF,eAAO,MAAM,uBAAuB,4CAA4C,CAAC;AAEjF,eAAO,MAAM,sBAAsB,qCAAqC,CAAC;AACzE,eAAO,MAAM,uBAAuB,qCAAqC,CAAC;AAC1E,eAAO,MAAM,wBAAwB,qCAAqC,CAAC;AAC3E,eAAO,MAAM,qBAAqB,qCAAqC,CAAC;AAExE,eAAO,MAAM,aAAa;;;;;;;GAuCzB,CAAC"}
|
|
@@ -0,0 +1,50 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* API endpoints configuration
|
|
3
|
+
*/
|
|
4
|
+
export const SEO_API_PROXY_ENDPOINT = 'https://seo.apps.avada.io/proxy';
|
|
5
|
+
export const BLOG_API_PROXY_ENDPOINT = 'https://blogapp.seoon.io/proxy';
|
|
6
|
+
export const IMAGE_API_PROXY_ENDPOINT = 'https://app-plaza-image-optimizer.firebaseapp.com/proxy';
|
|
7
|
+
export const AI_PRODUCT_API_PROXY_ENDPOINT = 'https://ai-product-copy.firebaseapp.com/proxy';
|
|
8
|
+
export const SEO_API_ENDPOINT = 'https://seo.apps.avada.io';
|
|
9
|
+
export const BLOG_API_ENDPOINT = 'https://blogapp.seoon.io';
|
|
10
|
+
export const IMAGE_API_ENDPOINT = 'https://app-plaza-image-optimizer.firebaseapp.com';
|
|
11
|
+
export const AI_PRODUCT_API_ENDPOINT = 'https://ai-product-copy.firebaseapp.com';
|
|
12
|
+
export const SEO_PROXY_ACCESS_TOKEN = '8fdf4cab401bb8c55f006b210f905c99';
|
|
13
|
+
export const BLOG_PROXY_ACCESS_TOKEN = '11b2fc581e5abab63e012721bcaed12a';
|
|
14
|
+
export const IMAGE_PROXY_ACCESS_TOKEN = 'e2fea4bf882eab44d34d4396099c78fe';
|
|
15
|
+
export const AI_PROXY_ACCESS_TOKEN = '293dfe9d8e908fdb401af1d8dda5145c';
|
|
16
|
+
export const listCrossApps = [
|
|
17
|
+
{
|
|
18
|
+
title: 'How to write blog posts that rank on Google and show up in AI search?',
|
|
19
|
+
description: 'Use our AI-powered SEO blog builder to create high-quality content that answers real customer queries. Optimized for Google, Search Generative Experience and voice search',
|
|
20
|
+
image: 'https://cdn.shopify.com/s/files/1/0622/8439/8665/files/SEOon.jpg?v=1745392523&width=40',
|
|
21
|
+
url: 'https://apps.shopify.com/seoon-blog',
|
|
22
|
+
actionLabel: 'Free to install',
|
|
23
|
+
key: 'blog',
|
|
24
|
+
},
|
|
25
|
+
{
|
|
26
|
+
title: 'Write better product descriptions, faster — with AI',
|
|
27
|
+
description: 'Generate SEO-optimized, high-converting product copy in bulk or one by one. Stay on-brand, support multiple languages, and get ready for AI-first search like ChatGPT',
|
|
28
|
+
image: 'https://cdn.shopify.com/app-store/listing_images/94a39d7591aada58e5a9774f23f933c0/icon/CLvM7tmkkI0DEAE=.jpeg?width=40',
|
|
29
|
+
url: 'https://apps.shopify.com/ai-product-copy',
|
|
30
|
+
actionLabel: 'Free to install',
|
|
31
|
+
key: 'aiCopy',
|
|
32
|
+
},
|
|
33
|
+
{
|
|
34
|
+
title: 'Slow site hurting your SEO? Fix all images with one free click!',
|
|
35
|
+
description: 'Speed up your store and boost your SEO instantly with our 100% free, one-click image optimizer. No setup, no hassle just install the app and let it do the work for you.',
|
|
36
|
+
image: 'https://cdnapps.avada.io/ag-blog/LogoBannerCrossAppImage.png',
|
|
37
|
+
url: 'https://apps.shopify.com/ap-speed-optimizer',
|
|
38
|
+
actionLabel: 'Optimize images now',
|
|
39
|
+
key: 'plaza',
|
|
40
|
+
},
|
|
41
|
+
{
|
|
42
|
+
title: 'Boost Your SEO Health!',
|
|
43
|
+
description: 'Resolve issues that hold your site back—404 errors, image problems, slow loading speed, and poor metadata. Keep your store fast, optimized, and ranking higher.',
|
|
44
|
+
image: 'https://cdn.shopify.com/app-store/listing_images/12c5f7113c40f4e4e5a57cad4ff6464f/icon/CMnGhqeTsPwCEAE=.jpeg?width=40',
|
|
45
|
+
url: 'https://apps.shopify.com/avada-seo-suite',
|
|
46
|
+
actionLabel: 'Fix SEO Issues',
|
|
47
|
+
key: 'seo',
|
|
48
|
+
},
|
|
49
|
+
];
|
|
50
|
+
//# sourceMappingURL=constants.js.map
|