@automattic/jetpack-ai-client 0.33.2 → 0.33.4
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/CHANGELOG.md +10 -0
- package/build/components/message/index.js +2 -2
- package/build/components/quota-exceeded-message/index.js +2 -1
- package/build/components/quota-exceeded-message/light-nudge.js +1 -1
- package/build/logo-generator/components/prompt.js +1 -1
- package/build/logo-generator/components/upgrade-nudge.js +1 -1
- package/build/logo-generator/components/upgrade-screen.js +1 -1
- package/build/logo-generator/components/visit-site-banner.js +1 -1
- package/build/logo-generator/hooks/use-fair-usage-notice-message.js +2 -1
- package/package.json +5 -5
- package/src/components/ai-control/style.scss +7 -7
- package/src/components/ai-feedback/style.scss +1 -1
- package/src/components/ai-image/components/ai-image-modal.scss +1 -1
- package/src/components/ai-image/components/carrousel.scss +7 -7
- package/src/components/ai-image/components/usage-counter.scss +1 -1
- package/src/components/ai-image/style.scss +2 -2
- package/src/components/ai-modal-footer/style.scss +3 -3
- package/src/components/ai-status-indicator/style.scss +3 -2
- package/src/components/message/index.tsx +3 -3
- package/src/components/message/style.scss +16 -16
- package/src/components/modal/style.scss +1 -1
- package/src/components/quota-exceeded-message/index.tsx +2 -1
- package/src/components/quota-exceeded-message/light-nudge.tsx +1 -1
- package/src/components/quota-exceeded-message/style.scss +22 -22
- package/src/logo-generator/components/generator-modal.scss +2 -2
- package/src/logo-generator/components/history-carousel.scss +1 -1
- package/src/logo-generator/components/logo-presenter.scss +1 -1
- package/src/logo-generator/components/prompt.scss +1 -1
- package/src/logo-generator/components/prompt.tsx +1 -1
- package/src/logo-generator/components/upgrade-nudge.scss +1 -1
- package/src/logo-generator/components/upgrade-nudge.tsx +1 -1
- package/src/logo-generator/components/upgrade-screen.tsx +3 -3
- package/src/logo-generator/components/visit-site-banner.scss +1 -1
- package/src/logo-generator/components/visit-site-banner.tsx +1 -1
- package/src/logo-generator/hooks/use-fair-usage-notice-message.tsx +2 -1
package/CHANGELOG.md
CHANGED
|
@@ -5,6 +5,14 @@ All notable changes to this project will be documented in this file.
|
|
|
5
5
|
The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/)
|
|
6
6
|
and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
|
|
7
7
|
|
|
8
|
+
## [0.33.4] - 2025-07-28
|
|
9
|
+
### Fixed
|
|
10
|
+
- Block Editor: Fix Jetpack AI upgrade links. [#44405]
|
|
11
|
+
|
|
12
|
+
## [0.33.3] - 2025-07-21
|
|
13
|
+
### Changed
|
|
14
|
+
- Internal updates.
|
|
15
|
+
|
|
8
16
|
## [0.33.2] - 2025-07-14
|
|
9
17
|
### Changed
|
|
10
18
|
- Update package dependencies. [#44217] [#44219]
|
|
@@ -663,6 +671,8 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
|
|
|
663
671
|
- AI Client: stop using smart document visibility handling on the fetchEventSource library, so it does not restart the completion when changing tabs. [#32004]
|
|
664
672
|
- Updated package dependencies. [#31468] [#31659] [#31785]
|
|
665
673
|
|
|
674
|
+
[0.33.4]: https://github.com/Automattic/jetpack-ai-client/compare/v0.33.3...v0.33.4
|
|
675
|
+
[0.33.3]: https://github.com/Automattic/jetpack-ai-client/compare/v0.33.2...v0.33.3
|
|
666
676
|
[0.33.2]: https://github.com/Automattic/jetpack-ai-client/compare/v0.33.1...v0.33.2
|
|
667
677
|
[0.33.1]: https://github.com/Automattic/jetpack-ai-client/compare/v0.33.0...v0.33.1
|
|
668
678
|
[0.33.0]: https://github.com/Automattic/jetpack-ai-client/compare/v0.32.1...v0.33.0
|
|
@@ -90,7 +90,7 @@ export function UpgradeMessage({ requestsRemaining, severity, onUpgradeClick, up
|
|
|
90
90
|
}
|
|
91
91
|
return (_jsxs(Message, { severity: messageSeverity, children: [_jsx("span", { children: sprintf(
|
|
92
92
|
// translators: %1$d: number of requests remaining
|
|
93
|
-
__('You have %1$d requests remaining.', 'jetpack-ai-client'), requestsRemaining) }), _jsx(Button, { variant: "link", onClick: onUpgradeClick, href: upgradeUrl, target: upgradeUrl ? '_blank' : null, children: __('Upgrade now', 'jetpack-ai-client') })] }));
|
|
93
|
+
__('You have %1$d requests remaining.', 'jetpack-ai-client'), requestsRemaining) }), _jsx(Button, { variant: "link", onClick: onUpgradeClick, href: upgradeUrl, target: upgradeUrl ? '_blank' : null, children: _jsx("span", { children: __('Upgrade now', 'jetpack-ai-client') }) })] }));
|
|
94
94
|
}
|
|
95
95
|
/**
|
|
96
96
|
* React component to render an error message
|
|
@@ -102,5 +102,5 @@ export function ErrorMessage({ error, code, onTryAgainClick, onUpgradeClick, upg
|
|
|
102
102
|
const errorMessage = error || __('Something went wrong', 'jetpack-ai-client');
|
|
103
103
|
return (_jsxs(Message, { severity: MESSAGE_SEVERITY_ERROR, children: [_jsx("span", { children: sprintf(
|
|
104
104
|
// translators: %1$d: A dynamic error message
|
|
105
|
-
__('Error: %1$s', 'jetpack-ai-client'), errorMessage) }), code === ERROR_QUOTA_EXCEEDED ? (_jsx(Button, { variant: "link", onClick: onUpgradeClick, href: upgradeUrl, target: upgradeUrl ? '_blank' : null, children: __('Upgrade now', 'jetpack-ai-client') })) : (_jsx(Button, { variant: "link", onClick: onTryAgainClick, children: __('Try again', 'jetpack-ai-client') }))] }));
|
|
105
|
+
__('Error: %1$s', 'jetpack-ai-client'), errorMessage) }), code === ERROR_QUOTA_EXCEEDED ? (_jsx(Button, { variant: "link", onClick: onUpgradeClick, href: upgradeUrl, target: upgradeUrl ? '_blank' : null, children: _jsx("span", { children: __('Upgrade now', 'jetpack-ai-client') }) })) : (_jsx(Button, { variant: "link", onClick: onTryAgainClick, children: _jsx("span", { children: __('Try again', 'jetpack-ai-client') }) }))] }));
|
|
106
106
|
}
|
|
@@ -33,7 +33,7 @@ const useFairUsageNoticeMessage = () => {
|
|
|
33
33
|
nextUsagePeriodStartDate.getDate());
|
|
34
34
|
};
|
|
35
35
|
const getFairUsageNoticeMessage = resetDateString => {
|
|
36
|
-
const fairUsageMessage = __("You've reached this month's request limit, per our <link>fair usage policy</link>.", 'jetpack-ai-client');
|
|
36
|
+
const fairUsageMessage = __("You've reached this month's request limit, per our <link><span>fair usage policy</span></link>.", 'jetpack-ai-client');
|
|
37
37
|
if (!resetDateString) {
|
|
38
38
|
return fairUsageMessage;
|
|
39
39
|
}
|
|
@@ -47,6 +47,7 @@ const useFairUsageNoticeMessage = () => {
|
|
|
47
47
|
const fairUsageNoticeMessage = getFairUsageNoticeMessage(nextUsagePeriodStartDateString);
|
|
48
48
|
const fairUsageNoticeMessageElement = createInterpolateElement(fairUsageNoticeMessage, {
|
|
49
49
|
link: (_jsx("a", { href: "https://jetpack.com/redirect/?source=ai-assistant-fair-usage-policy", target: "_blank", rel: "noreferrer" })),
|
|
50
|
+
span: _jsx("span", {}),
|
|
50
51
|
});
|
|
51
52
|
return fairUsageNoticeMessageElement;
|
|
52
53
|
};
|
|
@@ -4,5 +4,5 @@ import { __ } from '@wordpress/i18n';
|
|
|
4
4
|
import './style.scss';
|
|
5
5
|
export const LightNudge = ({ title, description, buttonText = null, checkoutUrl = null, goToCheckoutPage = null, isRedirecting = false, showButton = true, target = '_top', }) => {
|
|
6
6
|
const redirectingText = __('Redirecting…', 'jetpack-ai-client');
|
|
7
|
-
return (_jsx("div", { className: "jetpack-upgrade-plan-banner-light", children: _jsx(Notice, { status: "error", isDismissible: false, children: _jsxs("p", { children: [title && _jsx("strong", { children: title }), description, ' ', showButton && (_jsx(Button, { href: isRedirecting ? null : checkoutUrl, onClick: goToCheckoutPage, variant: "link", target: target, children: isRedirecting ? redirectingText : buttonText }))] }) }) }));
|
|
7
|
+
return (_jsx("div", { className: "jetpack-upgrade-plan-banner-light", children: _jsx(Notice, { status: "error", isDismissible: false, children: _jsxs("p", { children: [title && _jsx("strong", { children: title }), description, ' ', showButton && (_jsx(Button, { href: isRedirecting ? null : checkoutUrl, onClick: goToCheckoutPage, variant: "link", target: target, children: _jsx("span", { children: isRedirecting ? redirectingText : buttonText }) }))] }) }) }));
|
|
8
8
|
};
|
|
@@ -156,5 +156,5 @@ export const Prompt = ({ initialPrompt = '' }) => {
|
|
|
156
156
|
}, [context, setStyle, recordTracksEvent]);
|
|
157
157
|
return (_jsxs("div", { className: "jetpack-ai-logo-generator__prompt", children: [_jsxs("div", { className: "jetpack-ai-logo-generator__prompt-header", children: [_jsx("div", { className: "jetpack-ai-logo-generator__prompt-label", children: __('Describe your site:', 'jetpack-ai-client') }), _jsx("div", { className: "jetpack-ai-logo-generator__prompt-actions", children: _jsxs(Button, { variant: "link", disabled: isBusy || requireUpgrade || !hasPrompt, onClick: onEnhance, children: [_jsx(AiIcon, {}), enhanceButtonLabel] }) }), showStyleSelector && (_jsx(SelectControl, { __nextHasNoMarginBottom: true, __next40pxDefaultSize: true, value: style, options: styles, onChange: updateStyle, disabled: isBusy || requireUpgrade }))] }), _jsx(AiModalPromptInput, { prompt: prompt, setPrompt: setPrompt, generateHandler: onGenerate, disabled: isBusy || requireUpgrade, actionDisabled: isBusy || requireUpgrade || !hasPrompt, placeholder: __('Describe your site or simply ask for a logo specifying some details about it', 'jetpack-ai-client') }), _jsxs("div", { className: "jetpack-ai-logo-generator__prompt-footer", children: [!isUnlimited && !requireUpgrade && (_jsxs("div", { className: "jetpack-ai-logo-generator__prompt-requests", children: [_jsx("div", { children: sprintf(
|
|
158
158
|
// translators: %u is the number of requests
|
|
159
|
-
__('%u requests remaining.', 'jetpack-ai-client'), requestsRemaining) }), hasNextTier && (_jsxs(_Fragment, { children: ["\u00A0", _jsx(Button, { variant: "link", href: checkoutUrl, target: "_blank", onClick: onUpgradeClick, children: __('Upgrade', 'jetpack-ai-client') })] })), "\u00A0", _jsx(Tooltip, { text: __('Logo generation costs 10 requests; prompt enhancement costs 1 request each', 'jetpack-ai-client'), placement: "bottom", children: _jsx(Icon, { className: "prompt-footer__icon", icon: info }) })] })), requireUpgrade && tierPlansEnabled && _jsx(UpgradeNudge, {}), requireUpgrade && !tierPlansEnabled && _jsx(FairUsageNotice, {}), enhancePromptFetchError && (_jsx("div", { className: "jetpack-ai-logo-generator__prompt-error", children: __('Error enhancing prompt. Please try again.', 'jetpack-ai-client') })), logoFetchError && (_jsx("div", { className: "jetpack-ai-logo-generator__prompt-error", children: __('Error generating logo. Please try again.', 'jetpack-ai-client') }))] })] }));
|
|
159
|
+
__('%u requests remaining.', 'jetpack-ai-client'), requestsRemaining) }), hasNextTier && (_jsxs(_Fragment, { children: ["\u00A0", _jsx(Button, { variant: "link", href: checkoutUrl, target: "_blank", onClick: onUpgradeClick, children: _jsx("span", { children: __('Upgrade', 'jetpack-ai-client') }) })] })), "\u00A0", _jsx(Tooltip, { text: __('Logo generation costs 10 requests; prompt enhancement costs 1 request each', 'jetpack-ai-client'), placement: "bottom", children: _jsx(Icon, { className: "prompt-footer__icon", icon: info }) })] })), requireUpgrade && tierPlansEnabled && _jsx(UpgradeNudge, {}), requireUpgrade && !tierPlansEnabled && _jsx(FairUsageNotice, {}), enhancePromptFetchError && (_jsx("div", { className: "jetpack-ai-logo-generator__prompt-error", children: __('Error enhancing prompt. Please try again.', 'jetpack-ai-client') })), logoFetchError && (_jsx("div", { className: "jetpack-ai-logo-generator__prompt-error", children: __('Error generating logo. Please try again.', 'jetpack-ai-client') }))] })] }));
|
|
160
160
|
};
|
|
@@ -26,5 +26,5 @@ export const UpgradeNudge = () => {
|
|
|
26
26
|
const handleUpgradeClick = () => {
|
|
27
27
|
recordTracksEvent(EVENT_UPGRADE, { context, placement: EVENT_PLACEMENT_UPGRADE_PROMPT });
|
|
28
28
|
};
|
|
29
|
-
return (_jsx("div", { className: "jetpack-upgrade-plan-banner", children: _jsxs("div", { className: "jetpack-upgrade-plan-banner__wrapper", children: [_jsxs("div", { children: [_jsx(Icon, { className: "jetpack-upgrade-plan-banner__icon", icon: warning }), _jsx("span", { className: "jetpack-upgrade-plan-banner__banner-description", children: upgradeMessage })] }), _jsx(Button, { href: checkoutUrl, target: "_blank", className: "is-primary", onClick: handleUpgradeClick, children: buttonText })] }) }));
|
|
29
|
+
return (_jsx("div", { className: "jetpack-upgrade-plan-banner", children: _jsxs("div", { className: "jetpack-upgrade-plan-banner__wrapper", children: [_jsxs("div", { children: [_jsx(Icon, { className: "jetpack-upgrade-plan-banner__icon", icon: warning }), _jsx("span", { className: "jetpack-upgrade-plan-banner__banner-description", children: upgradeMessage })] }), _jsx(Button, { href: checkoutUrl, target: "_blank", className: "is-primary", onClick: handleUpgradeClick, children: _jsx("span", { children: buttonText }) })] }) }));
|
|
30
30
|
};
|
|
@@ -24,5 +24,5 @@ export const UpgradeScreen = ({ onCancel, upgradeURL, reason }) => {
|
|
|
24
24
|
recordTracksEvent(EVENT_UPGRADE, { context, placement: EVENT_PLACEMENT_FREE_USER_SCREEN });
|
|
25
25
|
onCancel();
|
|
26
26
|
};
|
|
27
|
-
return (_jsxs("div", { className: "jetpack-ai-logo-generator-modal__notice-message-wrapper", children: [_jsxs("div", { className: "jetpack-ai-logo-generator-modal__notice-message", children: [_jsx("span", { className: "jetpack-ai-logo-generator-modal__loading-message", children: reason === 'feature' ? upgradeMessageFeature : upgradeMessageRequests }), "\u00A0", _jsx(Button, { variant: "link", href: upgradeInfoUrl, target: "_blank", children: __('Learn more about Jetpack AI.', 'jetpack-ai-client') })] }), _jsxs("div", { className: "jetpack-ai-logo-generator-modal__notice-actions", children: [_jsx(Button, { variant: "tertiary", onClick: onCancel, children: __('Cancel', 'jetpack-ai-client') }), _jsx(Button, { variant: "primary", href: upgradeURL, target: "_blank", onClick: handleUpgradeClick, children: __('Upgrade', 'jetpack-ai-client') })] })] }));
|
|
27
|
+
return (_jsxs("div", { className: "jetpack-ai-logo-generator-modal__notice-message-wrapper", children: [_jsxs("div", { className: "jetpack-ai-logo-generator-modal__notice-message", children: [_jsx("span", { className: "jetpack-ai-logo-generator-modal__loading-message", children: reason === 'feature' ? upgradeMessageFeature : upgradeMessageRequests }), "\u00A0", _jsx(Button, { variant: "link", href: upgradeInfoUrl, target: "_blank", children: _jsx("span", { children: __('Learn more about Jetpack AI.', 'jetpack-ai-client') }) })] }), _jsxs("div", { className: "jetpack-ai-logo-generator-modal__notice-actions", children: [_jsx(Button, { variant: "tertiary", onClick: onCancel, children: _jsx("span", { children: __('Cancel', 'jetpack-ai-client') }) }), _jsx(Button, { variant: "primary", href: upgradeURL, target: "_blank", onClick: handleUpgradeClick, children: _jsx("span", { children: __('Upgrade', 'jetpack-ai-client') }) })] })] }));
|
|
28
28
|
};
|
|
@@ -12,5 +12,5 @@ import clsx from 'clsx';
|
|
|
12
12
|
import jetpackLogo from '../assets/images/jetpack-logo.svg';
|
|
13
13
|
import './visit-site-banner.scss';
|
|
14
14
|
export const VisitSiteBanner = ({ className = null, onVisitBlankTarget }) => {
|
|
15
|
-
return (_jsxs("div", { className: clsx('jetpack-ai-logo-generator-modal-visit-site-banner', className), children: [_jsx("div", { className: "jetpack-ai-logo-generator-modal-visit-site-banner__jetpack-logo", children: _jsx("img", { src: jetpackLogo, alt: "Jetpack" }) }), _jsxs("div", { className: "jetpack-ai-logo-generator-modal-visit-site-banner__content", children: [_jsx("strong", { children: __('Do you want to know all the amazing things you can do with Jetpack AI?', 'jetpack-ai-client') }), _jsx("span", { children: __('Generate and tweak content, create forms, get feedback and much more.', 'jetpack-ai-client') }), _jsx("div", { children: _jsxs(Button, { variant: "link", href: "https://jetpack.com/redirect/?source=logo_generator_learn_more_about_jetpack_ai", target: "_blank", onClick: onVisitBlankTarget ? onVisitBlankTarget : null, children: [__('Learn more about Jetpack AI', 'jetpack-ai-client'), _jsx(Icon, { icon: external, size: 20 })] }) })] })] }));
|
|
15
|
+
return (_jsxs("div", { className: clsx('jetpack-ai-logo-generator-modal-visit-site-banner', className), children: [_jsx("div", { className: "jetpack-ai-logo-generator-modal-visit-site-banner__jetpack-logo", children: _jsx("img", { src: jetpackLogo, alt: "Jetpack" }) }), _jsxs("div", { className: "jetpack-ai-logo-generator-modal-visit-site-banner__content", children: [_jsx("strong", { children: __('Do you want to know all the amazing things you can do with Jetpack AI?', 'jetpack-ai-client') }), _jsx("span", { children: __('Generate and tweak content, create forms, get feedback and much more.', 'jetpack-ai-client') }), _jsx("div", { children: _jsxs(Button, { variant: "link", href: "https://jetpack.com/redirect/?source=logo_generator_learn_more_about_jetpack_ai", target: "_blank", onClick: onVisitBlankTarget ? onVisitBlankTarget : null, children: [_jsx("span", { children: __('Learn more about Jetpack AI', 'jetpack-ai-client') }), _jsx(Icon, { icon: external, size: 20 })] }) })] })] }));
|
|
16
16
|
};
|
|
@@ -24,7 +24,7 @@ const useFairUsageNoticeMessage = () => {
|
|
|
24
24
|
nextUsagePeriodStartDate.getDate());
|
|
25
25
|
};
|
|
26
26
|
const getFairUsageNoticeMessage = resetDateString => {
|
|
27
|
-
const fairUsageMessage = __("You've reached this month's request limit, per our <link>fair usage policy</link>.", 'jetpack-ai-client');
|
|
27
|
+
const fairUsageMessage = __("You've reached this month's request limit, per our <link><span>fair usage policy</span></link>.", 'jetpack-ai-client');
|
|
28
28
|
if (!resetDateString) {
|
|
29
29
|
return fairUsageMessage;
|
|
30
30
|
}
|
|
@@ -41,6 +41,7 @@ const useFairUsageNoticeMessage = () => {
|
|
|
41
41
|
});
|
|
42
42
|
const fairUsageNoticeMessageElement = createInterpolateElement(fairUsageNoticeMessage, {
|
|
43
43
|
link: _jsx("a", { href: upgradeInfoUrl, target: "_blank", rel: "noreferrer" }),
|
|
44
|
+
span: _jsx("span", {}),
|
|
44
45
|
});
|
|
45
46
|
return fairUsageNoticeMessageElement;
|
|
46
47
|
};
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"private": false,
|
|
3
3
|
"name": "@automattic/jetpack-ai-client",
|
|
4
|
-
"version": "0.33.
|
|
4
|
+
"version": "0.33.4",
|
|
5
5
|
"description": "A JS client for consuming Jetpack AI services",
|
|
6
6
|
"homepage": "https://github.com/Automattic/jetpack/tree/HEAD/projects/js-packages/ai-client/#readme",
|
|
7
7
|
"bugs": {
|
|
@@ -44,12 +44,12 @@
|
|
|
44
44
|
"main": "./build/index.js",
|
|
45
45
|
"types": "./build/index.d.ts",
|
|
46
46
|
"dependencies": {
|
|
47
|
-
"@automattic/jetpack-base-styles": "^1.0.
|
|
48
|
-
"@automattic/jetpack-components": "^1.1.
|
|
49
|
-
"@automattic/jetpack-connection": "^1.
|
|
47
|
+
"@automattic/jetpack-base-styles": "^1.0.6",
|
|
48
|
+
"@automattic/jetpack-components": "^1.1.15",
|
|
49
|
+
"@automattic/jetpack-connection": "^1.3.1",
|
|
50
50
|
"@automattic/jetpack-explat": "workspace:*",
|
|
51
51
|
"@automattic/jetpack-script-data": "^0.5.0",
|
|
52
|
-
"@automattic/jetpack-shared-extension-utils": "^1.3.
|
|
52
|
+
"@automattic/jetpack-shared-extension-utils": "^1.3.7",
|
|
53
53
|
"@microsoft/fetch-event-source": "2.0.1",
|
|
54
54
|
"@types/jest": "30.0.0",
|
|
55
55
|
"@types/react": "18.3.23",
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
@use
|
|
1
|
+
@use "@automattic/jetpack-base-styles/root-variables";
|
|
2
2
|
|
|
3
3
|
.jetpack-components-ai-control__container-wrapper {
|
|
4
4
|
position: sticky;
|
|
@@ -6,12 +6,12 @@
|
|
|
6
6
|
}
|
|
7
7
|
|
|
8
8
|
.jetpack-components-ai-control__container {
|
|
9
|
-
color: var(
|
|
10
|
-
background-color: var(
|
|
9
|
+
color: var(--jp-gray-80);
|
|
10
|
+
background-color: var(--jp-white);
|
|
11
11
|
box-shadow: 0 12px 15px 0 rgba(0, 0, 0, 0.12), 0 3px 9px 0 rgba(0, 0, 0, 0.12), 0 1px 3px 0 rgba(0, 0, 0, 0.15);
|
|
12
12
|
font-family: "SF Pro Text", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Oxygen-Sans, Ubuntu, Cantarell, "Helvetica Neue", sans-serif;
|
|
13
13
|
border-radius: 6px;
|
|
14
|
-
border: 1px solid var(--gutenberg-gray-400, #
|
|
14
|
+
border: 1px solid var(--gutenberg-gray-400, #ccc);
|
|
15
15
|
}
|
|
16
16
|
|
|
17
17
|
.jetpack-components-ai-control__wrapper {
|
|
@@ -35,7 +35,7 @@
|
|
|
35
35
|
align-items: center;
|
|
36
36
|
|
|
37
37
|
textarea.jetpack-components-ai-control__input {
|
|
38
|
-
background-color: var(
|
|
38
|
+
background-color: var(--jp-white);
|
|
39
39
|
width: 100%;
|
|
40
40
|
min-height: 20px;
|
|
41
41
|
border-radius: 2px;
|
|
@@ -44,7 +44,7 @@
|
|
|
44
44
|
resize: none !important;
|
|
45
45
|
border: none;
|
|
46
46
|
box-shadow: none;
|
|
47
|
-
color: var(
|
|
47
|
+
color: var(--jp-gray-80);
|
|
48
48
|
|
|
49
49
|
font-size: 16px;
|
|
50
50
|
font-weight: 400;
|
|
@@ -54,7 +54,7 @@
|
|
|
54
54
|
|
|
55
55
|
&:focus {
|
|
56
56
|
box-shadow: none;
|
|
57
|
-
color: var(
|
|
57
|
+
color: var(--jp-gray-80);
|
|
58
58
|
}
|
|
59
59
|
|
|
60
60
|
@media (min-width: 600px) {
|
|
@@ -50,7 +50,7 @@ $scale-factor: 0.55;
|
|
|
50
50
|
display: flex;
|
|
51
51
|
align-items: center;
|
|
52
52
|
overflow: hidden;
|
|
53
|
-
height: calc(
|
|
53
|
+
height: calc(768px * $scale-factor);
|
|
54
54
|
|
|
55
55
|
.ai-carrousel {
|
|
56
56
|
|
|
@@ -80,7 +80,7 @@ $scale-factor: 0.55;
|
|
|
80
80
|
background: transparent;
|
|
81
81
|
|
|
82
82
|
&:hover {
|
|
83
|
-
background-color: rgba(
|
|
83
|
+
background-color: rgba(0, 0, 0, 0.3);
|
|
84
84
|
opacity: 1;
|
|
85
85
|
}
|
|
86
86
|
|
|
@@ -136,8 +136,8 @@ $scale-factor: 0.55;
|
|
|
136
136
|
}
|
|
137
137
|
|
|
138
138
|
&-image {
|
|
139
|
-
max-height: calc(
|
|
140
|
-
max-width: calc(
|
|
139
|
+
max-height: calc(768px * $scale-factor);
|
|
140
|
+
max-width: calc(1024px * $scale-factor);
|
|
141
141
|
width: auto;
|
|
142
142
|
height: auto;
|
|
143
143
|
margin: auto 0;
|
|
@@ -149,18 +149,18 @@ $scale-factor: 0.55;
|
|
|
149
149
|
height: 100%;
|
|
150
150
|
position: absolute;
|
|
151
151
|
left: 8px;
|
|
152
|
-
transform: translateX(
|
|
152
|
+
transform: translateX(100%);
|
|
153
153
|
transition: transform 0.5s;
|
|
154
154
|
flex-direction: column;
|
|
155
155
|
align-items: center;
|
|
156
156
|
|
|
157
157
|
&.is-prev {
|
|
158
|
-
transform: translateX(
|
|
158
|
+
transform: translateX(-100%);
|
|
159
159
|
left: -8px;
|
|
160
160
|
}
|
|
161
161
|
|
|
162
162
|
&.is-current {
|
|
163
|
-
transform: translateX(
|
|
163
|
+
transform: translateX(0);
|
|
164
164
|
position: static;
|
|
165
165
|
}
|
|
166
166
|
}
|
|
@@ -30,7 +30,7 @@
|
|
|
30
30
|
textarea {
|
|
31
31
|
width: 100%;
|
|
32
32
|
outline: none;
|
|
33
|
-
border: 1px solid #
|
|
33
|
+
border: 1px solid #ccc;
|
|
34
34
|
border-radius: 6px;
|
|
35
35
|
padding: 12px;
|
|
36
36
|
color: var(--studio-black);
|
|
@@ -76,7 +76,7 @@
|
|
|
76
76
|
margin-top: 32px;
|
|
77
77
|
margin-bottom: -32px;
|
|
78
78
|
padding: 8px 32px;
|
|
79
|
-
border-top: solid 1px #
|
|
79
|
+
border-top: solid 1px #dcdcde;
|
|
80
80
|
height: 60px;
|
|
81
81
|
|
|
82
82
|
&__feedback-button {
|
|
@@ -2,11 +2,11 @@
|
|
|
2
2
|
display: flex;
|
|
3
3
|
align-items: center;
|
|
4
4
|
gap: 4px;
|
|
5
|
-
color: var(
|
|
6
|
-
fill: var(
|
|
5
|
+
color: var(--jp-gray-50);
|
|
6
|
+
fill: var(--jp-gray-50);
|
|
7
7
|
|
|
8
8
|
.components-button.is-link {
|
|
9
|
-
color: var(
|
|
9
|
+
color: var(--jp-gray-50);
|
|
10
10
|
}
|
|
11
11
|
}
|
|
12
12
|
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
@use
|
|
1
|
+
@use "@automattic/jetpack-base-styles/style";
|
|
2
2
|
|
|
3
3
|
.jetpack-ai-status-indicator__icon-wrapper {
|
|
4
4
|
transition: opacity 0.25s ease-in-out, width 0.25s;
|
|
@@ -12,7 +12,8 @@
|
|
|
12
12
|
margin: 6px 0 0;
|
|
13
13
|
}
|
|
14
14
|
|
|
15
|
-
&.is-requesting,
|
|
15
|
+
&.is-requesting,
|
|
16
|
+
&.is-suggesting {
|
|
16
17
|
opacity: 1;
|
|
17
18
|
width: 24px;
|
|
18
19
|
}
|
|
@@ -209,7 +209,7 @@ export function UpgradeMessage( {
|
|
|
209
209
|
href={ upgradeUrl }
|
|
210
210
|
target={ upgradeUrl ? '_blank' : null }
|
|
211
211
|
>
|
|
212
|
-
{ __( 'Upgrade now', 'jetpack-ai-client' ) }
|
|
212
|
+
<span>{ __( 'Upgrade now', 'jetpack-ai-client' ) }</span>
|
|
213
213
|
</Button>
|
|
214
214
|
</Message>
|
|
215
215
|
);
|
|
@@ -246,11 +246,11 @@ export function ErrorMessage( {
|
|
|
246
246
|
href={ upgradeUrl }
|
|
247
247
|
target={ upgradeUrl ? '_blank' : null }
|
|
248
248
|
>
|
|
249
|
-
{ __( 'Upgrade now', 'jetpack-ai-client' ) }
|
|
249
|
+
<span>{ __( 'Upgrade now', 'jetpack-ai-client' ) }</span>
|
|
250
250
|
</Button>
|
|
251
251
|
) : (
|
|
252
252
|
<Button variant="link" onClick={ onTryAgainClick }>
|
|
253
|
-
{ __( 'Try again', 'jetpack-ai-client' ) }
|
|
253
|
+
<span>{ __( 'Try again', 'jetpack-ai-client' ) }</span>
|
|
254
254
|
</Button>
|
|
255
255
|
) }
|
|
256
256
|
</Message>
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
@use
|
|
1
|
+
@use "@automattic/jetpack-base-styles/root-variables";
|
|
2
2
|
|
|
3
3
|
.jetpack-ai-assistant__message {
|
|
4
4
|
display: flex;
|
|
@@ -11,7 +11,7 @@
|
|
|
11
11
|
min-height: 28px;
|
|
12
12
|
|
|
13
13
|
> svg {
|
|
14
|
-
fill: var(
|
|
14
|
+
fill: var(--jp-gray-40);
|
|
15
15
|
flex-shrink: 0;
|
|
16
16
|
}
|
|
17
17
|
|
|
@@ -29,11 +29,11 @@
|
|
|
29
29
|
}
|
|
30
30
|
|
|
31
31
|
.components-external-link {
|
|
32
|
-
color: var(
|
|
32
|
+
color: var(--jp-gray-50);
|
|
33
33
|
}
|
|
34
34
|
|
|
35
|
-
// Force padding 0 in link buttons, since default Gutenberg
|
|
36
|
-
// Buttons receive styles from edit-post-visual-editor.
|
|
35
|
+
// Force padding 0 in link buttons, since default Gutenberg in WordPress
|
|
36
|
+
// doesn't use iframe and Buttons receive styles from edit-post-visual-editor.
|
|
37
37
|
.components-button.is-link {
|
|
38
38
|
padding: 0;
|
|
39
39
|
}
|
|
@@ -46,30 +46,30 @@
|
|
|
46
46
|
}
|
|
47
47
|
|
|
48
48
|
.jetpack-ai-assistant__message-severity-info {
|
|
49
|
-
background-color: var(
|
|
50
|
-
color: var(
|
|
49
|
+
background-color: var(--jp-gray-0);
|
|
50
|
+
color: var(--jp-gray-50);
|
|
51
51
|
}
|
|
52
52
|
|
|
53
53
|
.jetpack-ai-assistant__message-severity-warning {
|
|
54
|
-
background-color: #
|
|
55
|
-
color: var(
|
|
54
|
+
background-color: #fef8ee;
|
|
55
|
+
color: var(--jp-gray-100);
|
|
56
56
|
}
|
|
57
57
|
|
|
58
58
|
.jetpack-ai-assistant__message-severity-error {
|
|
59
|
-
background-color: var(
|
|
60
|
-
color: var(
|
|
59
|
+
background-color: var(--jp-red-0);
|
|
60
|
+
color: var(--jp-gray-100);
|
|
61
61
|
|
|
62
62
|
> svg {
|
|
63
|
-
fill: var(
|
|
63
|
+
fill: var(--jp-red-40, #e65054);
|
|
64
64
|
}
|
|
65
65
|
}
|
|
66
66
|
|
|
67
67
|
.jetpack-ai-assistant__message-severity-success {
|
|
68
|
-
background-color: var(
|
|
69
|
-
color: var(
|
|
68
|
+
background-color: var(--jp-green-5);
|
|
69
|
+
color: var(--jp-gray-100);
|
|
70
70
|
|
|
71
71
|
> svg {
|
|
72
|
-
fill: var(
|
|
72
|
+
fill: var(--jp-green-30);
|
|
73
73
|
}
|
|
74
74
|
}
|
|
75
75
|
|
|
@@ -79,6 +79,6 @@
|
|
|
79
79
|
height: unset;
|
|
80
80
|
|
|
81
81
|
> svg {
|
|
82
|
-
fill: var(
|
|
82
|
+
fill: var(--jp-gray-50);
|
|
83
83
|
}
|
|
84
84
|
}
|
|
@@ -47,7 +47,7 @@ const useFairUsageNoticeMessage = () => {
|
|
|
47
47
|
|
|
48
48
|
const getFairUsageNoticeMessage = resetDateString => {
|
|
49
49
|
const fairUsageMessage = __(
|
|
50
|
-
"You've reached this month's request limit, per our <link>fair usage policy</link>.",
|
|
50
|
+
"You've reached this month's request limit, per our <link><span>fair usage policy</span></link>.",
|
|
51
51
|
'jetpack-ai-client'
|
|
52
52
|
);
|
|
53
53
|
|
|
@@ -75,6 +75,7 @@ const useFairUsageNoticeMessage = () => {
|
|
|
75
75
|
rel="noreferrer"
|
|
76
76
|
/>
|
|
77
77
|
),
|
|
78
|
+
span: <span />,
|
|
78
79
|
} );
|
|
79
80
|
|
|
80
81
|
return fairUsageNoticeMessageElement;
|
|
@@ -1,37 +1,37 @@
|
|
|
1
|
-
@use
|
|
1
|
+
@use "@automattic/jetpack-base-styles/style";
|
|
2
2
|
|
|
3
3
|
.jetpack-upgrade-plan-banner__wrapper {
|
|
4
|
-
|
|
4
|
+
column-gap: 32px;
|
|
5
5
|
}
|
|
6
6
|
|
|
7
7
|
.jetpack-upgrade-plan-banner.jetpack-ai-upgrade-banner {
|
|
8
8
|
|
|
9
|
-
|
|
9
|
+
.jetpack-upgrade-plan-banner__wrapper {
|
|
10
10
|
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
11
|
+
.components-button.is-primary.is-busy {
|
|
12
|
+
background: var(--jp-white);
|
|
13
|
+
color: var(--jp-black);
|
|
14
|
+
}
|
|
15
|
+
}
|
|
16
16
|
}
|
|
17
17
|
|
|
18
18
|
.jetpack-ai-fair-usage-notice-muted-variant {
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
19
|
+
line-height: 1.4;
|
|
20
|
+
margin: 0;
|
|
21
|
+
text-wrap: pretty;
|
|
22
|
+
font-size: calc(13px);
|
|
23
|
+
font-weight: 400;
|
|
24
|
+
color: #757575;
|
|
25
|
+
|
|
26
|
+
a {
|
|
27
|
+
color: #757575;
|
|
28
|
+
}
|
|
29
29
|
}
|
|
30
30
|
|
|
31
31
|
.jetpack-ai-fair-usage-notice {
|
|
32
|
-
|
|
32
|
+
color: #1e1e1e;
|
|
33
33
|
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
34
|
+
a {
|
|
35
|
+
color: #1e1e1e;
|
|
36
|
+
}
|
|
37
37
|
}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
@use
|
|
1
|
+
@use "@automattic/jetpack-base-styles/root-variables";
|
|
2
2
|
|
|
3
3
|
.jetpack-ai-logo-generator-modal {
|
|
4
4
|
|
|
@@ -50,7 +50,7 @@
|
|
|
50
50
|
}
|
|
51
51
|
|
|
52
52
|
.jetpack-ai-logo-generator-modal__notice-message {
|
|
53
|
-
font-size: var(
|
|
53
|
+
font-size: var(--font-body-small);
|
|
54
54
|
}
|
|
55
55
|
|
|
56
56
|
.jetpack-ai-logo-generator-modal__notice-actions {
|
|
@@ -307,7 +307,7 @@ export const Prompt = ( { initialPrompt = '' }: PromptProps ) => {
|
|
|
307
307
|
target="_blank"
|
|
308
308
|
onClick={ onUpgradeClick }
|
|
309
309
|
>
|
|
310
|
-
{ __( 'Upgrade', 'jetpack-ai-client' ) }
|
|
310
|
+
<span>{ __( 'Upgrade', 'jetpack-ai-client' ) }</span>
|
|
311
311
|
</Button>
|
|
312
312
|
</>
|
|
313
313
|
) }
|
|
@@ -52,12 +52,12 @@ export const UpgradeScreen: FC< {
|
|
|
52
52
|
</span>
|
|
53
53
|
|
|
54
54
|
<Button variant="link" href={ upgradeInfoUrl } target="_blank">
|
|
55
|
-
{ __( 'Learn more about Jetpack AI.', 'jetpack-ai-client' ) }
|
|
55
|
+
<span>{ __( 'Learn more about Jetpack AI.', 'jetpack-ai-client' ) }</span>
|
|
56
56
|
</Button>
|
|
57
57
|
</div>
|
|
58
58
|
<div className="jetpack-ai-logo-generator-modal__notice-actions">
|
|
59
59
|
<Button variant="tertiary" onClick={ onCancel }>
|
|
60
|
-
{ __( 'Cancel', 'jetpack-ai-client' ) }
|
|
60
|
+
<span>{ __( 'Cancel', 'jetpack-ai-client' ) }</span>
|
|
61
61
|
</Button>
|
|
62
62
|
<Button
|
|
63
63
|
variant="primary"
|
|
@@ -65,7 +65,7 @@ export const UpgradeScreen: FC< {
|
|
|
65
65
|
target="_blank"
|
|
66
66
|
onClick={ handleUpgradeClick }
|
|
67
67
|
>
|
|
68
|
-
{ __( 'Upgrade', 'jetpack-ai-client' ) }
|
|
68
|
+
<span>{ __( 'Upgrade', 'jetpack-ai-client' ) }</span>
|
|
69
69
|
</Button>
|
|
70
70
|
</div>
|
|
71
71
|
</div>
|
|
@@ -44,7 +44,7 @@ export const VisitSiteBanner: FC< {
|
|
|
44
44
|
target="_blank"
|
|
45
45
|
onClick={ onVisitBlankTarget ? onVisitBlankTarget : null }
|
|
46
46
|
>
|
|
47
|
-
{ __( 'Learn more about Jetpack AI', 'jetpack-ai-client' ) }
|
|
47
|
+
<span>{ __( 'Learn more about Jetpack AI', 'jetpack-ai-client' ) }</span>
|
|
48
48
|
<Icon icon={ external } size={ 20 } />
|
|
49
49
|
</Button>
|
|
50
50
|
</div>
|
|
@@ -33,7 +33,7 @@ const useFairUsageNoticeMessage = (): Element => {
|
|
|
33
33
|
|
|
34
34
|
const getFairUsageNoticeMessage = resetDateString => {
|
|
35
35
|
const fairUsageMessage = __(
|
|
36
|
-
"You've reached this month's request limit, per our <link>fair usage policy</link>.",
|
|
36
|
+
"You've reached this month's request limit, per our <link><span>fair usage policy</span></link>.",
|
|
37
37
|
'jetpack-ai-client'
|
|
38
38
|
);
|
|
39
39
|
|
|
@@ -59,6 +59,7 @@ const useFairUsageNoticeMessage = (): Element => {
|
|
|
59
59
|
|
|
60
60
|
const fairUsageNoticeMessageElement = createInterpolateElement( fairUsageNoticeMessage, {
|
|
61
61
|
link: <a href={ upgradeInfoUrl } target="_blank" rel="noreferrer" />,
|
|
62
|
+
span: <span />,
|
|
62
63
|
} );
|
|
63
64
|
|
|
64
65
|
return fairUsageNoticeMessageElement;
|