@automattic/jetpack-ai-client 0.25.1 → 0.25.2
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 +12 -4
- package/build/ai-client/src/logo-generator/components/fair-usage-notice.d.ts +1 -1
- package/build/ai-client/src/logo-generator/components/fair-usage-notice.js +1 -1
- package/build/ai-client/src/logo-generator/hooks/use-fair-usage-notice-message.d.ts +2 -2
- package/build/ai-client/src/logo-generator/store/reducer.d.ts +2 -2
- package/package.json +13 -13
- package/src/logo-generator/components/fair-usage-notice.tsx +1 -5
- package/src/logo-generator/hooks/use-fair-usage-notice-message.tsx +2 -2
- package/src/logo-generator/store/reducer.ts +1 -6
package/CHANGELOG.md
CHANGED
|
@@ -5,22 +5,29 @@ 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.25.2] - 2024-12-16
|
|
9
|
+
### Changed
|
|
10
|
+
- Updated package dependencies. [#40564]
|
|
11
|
+
|
|
12
|
+
### Fixed
|
|
13
|
+
- Fixed lints following ESLint rule changes for TS. [#40584]
|
|
14
|
+
|
|
8
15
|
## [0.25.1] - 2024-12-09
|
|
9
16
|
### Changed
|
|
10
|
-
- AI Assistant: Add disclaimer to image generation modals [#40397]
|
|
17
|
+
- AI Assistant: Add disclaimer to image generation modals. [#40397]
|
|
11
18
|
- Updated package dependencies. [#40363]
|
|
12
19
|
|
|
13
20
|
## [0.25.0] - 2024-11-25
|
|
14
21
|
### Added
|
|
15
|
-
- AI Client: split disabled prop to allow disabling input and action button separately [#40210]
|
|
22
|
+
- AI Client: split disabled prop to allow disabling input and action button separately. [#40210]
|
|
16
23
|
|
|
17
24
|
### Changed
|
|
18
|
-
- AI Client: fix prompt cursor to text when editable [#40247]
|
|
25
|
+
- AI Client: fix prompt cursor to text when editable. [#40247]
|
|
19
26
|
- Updated package dependencies. [#40288]
|
|
20
27
|
|
|
21
28
|
## [0.24.3] - 2024-11-18
|
|
22
29
|
### Changed
|
|
23
|
-
- AI Client: add effect on AiModalInputPrompt to update/set prompt on prop update [#40113]
|
|
30
|
+
- AI Client: add effect on AiModalInputPrompt to update/set prompt on prop update. [#40113]
|
|
24
31
|
|
|
25
32
|
## [0.24.2] - 2024-11-11
|
|
26
33
|
### Changed
|
|
@@ -476,6 +483,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
|
|
|
476
483
|
- AI Client: stop using smart document visibility handling on the fetchEventSource library, so it does not restart the completion when changing tabs. [#32004]
|
|
477
484
|
- Updated package dependencies. [#31468] [#31659] [#31785]
|
|
478
485
|
|
|
486
|
+
[0.25.2]: https://github.com/Automattic/jetpack-ai-client/compare/v0.25.1...v0.25.2
|
|
479
487
|
[0.25.1]: https://github.com/Automattic/jetpack-ai-client/compare/v0.25.0...v0.25.1
|
|
480
488
|
[0.25.0]: https://github.com/Automattic/jetpack-ai-client/compare/v0.24.3...v0.25.0
|
|
481
489
|
[0.24.3]: https://github.com/Automattic/jetpack-ai-client/compare/v0.24.2...v0.24.3
|
|
@@ -5,7 +5,7 @@ type FairUsageNoticeProps = {
|
|
|
5
5
|
* The fair usage notice component.
|
|
6
6
|
* @param {FairUsageNoticeProps} props - Fair usage notice component props.
|
|
7
7
|
* @param {FairUsageNoticeProps.variant} props.variant - The variant of the notice to render.
|
|
8
|
-
* @return
|
|
8
|
+
* @return the Notice component with the fair usage message.
|
|
9
9
|
*/
|
|
10
10
|
export declare const FairUsageNotice: ({ variant }: FairUsageNoticeProps) => import("react/jsx-runtime").JSX.Element;
|
|
11
11
|
export {};
|
|
@@ -5,7 +5,7 @@ import useFairUsageNoticeMessage from '../hooks/use-fair-usage-notice-message.js
|
|
|
5
5
|
* The fair usage notice component.
|
|
6
6
|
* @param {FairUsageNoticeProps} props - Fair usage notice component props.
|
|
7
7
|
* @param {FairUsageNoticeProps.variant} props.variant - The variant of the notice to render.
|
|
8
|
-
* @return
|
|
8
|
+
* @return the Notice component with the fair usage message.
|
|
9
9
|
*/
|
|
10
10
|
export const FairUsageNotice = ({ variant = 'error' }) => {
|
|
11
11
|
const useFairUsageNoticeMessageElement = useFairUsageNoticeMessage();
|
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
|
|
2
|
-
declare const useFairUsageNoticeMessage: () =>
|
|
1
|
+
import { type Element } from '@wordpress/element';
|
|
2
|
+
declare const useFairUsageNoticeMessage: () => Element;
|
|
3
3
|
export default useFairUsageNoticeMessage;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import type { AiFeatureStateProps,
|
|
1
|
+
import type { AiFeatureStateProps, RequestError } from './types.js';
|
|
2
2
|
import type { SiteDetails } from '../types.js';
|
|
3
3
|
/**
|
|
4
4
|
* Reducer for the Logo Generator store.
|
|
@@ -27,7 +27,7 @@ import type { SiteDetails } from '../types.js';
|
|
|
27
27
|
* @param {boolean} action.isLoadingHistory - Whether the history is being loaded
|
|
28
28
|
* @return {LogoGeneratorStateProp} The new state
|
|
29
29
|
*/
|
|
30
|
-
export default function reducer(state: LogoGeneratorStateProp, action: {
|
|
30
|
+
export default function reducer(state: import("./types.js").LogoGeneratorStateProp, action: {
|
|
31
31
|
type: string;
|
|
32
32
|
feature?: AiFeatureStateProps;
|
|
33
33
|
count?: number;
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"private": false,
|
|
3
3
|
"name": "@automattic/jetpack-ai-client",
|
|
4
|
-
"version": "0.25.
|
|
4
|
+
"version": "0.25.2",
|
|
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,21 +44,21 @@
|
|
|
44
44
|
"main": "./build/index.js",
|
|
45
45
|
"types": "./build/index.d.ts",
|
|
46
46
|
"dependencies": {
|
|
47
|
-
"@automattic/jetpack-base-styles": "^0.6.
|
|
48
|
-
"@automattic/jetpack-connection": "^0.36.
|
|
49
|
-
"@automattic/jetpack-shared-extension-utils": "^0.16.
|
|
47
|
+
"@automattic/jetpack-base-styles": "^0.6.39",
|
|
48
|
+
"@automattic/jetpack-connection": "^0.36.2",
|
|
49
|
+
"@automattic/jetpack-shared-extension-utils": "^0.16.2",
|
|
50
50
|
"@microsoft/fetch-event-source": "2.0.1",
|
|
51
51
|
"@types/react": "18.3.12",
|
|
52
52
|
"@types/wordpress__block-editor": "11.5.15",
|
|
53
|
-
"@wordpress/api-fetch": "7.
|
|
54
|
-
"@wordpress/blob": "4.
|
|
55
|
-
"@wordpress/block-editor": "14.
|
|
56
|
-
"@wordpress/components": "
|
|
57
|
-
"@wordpress/compose": "7.
|
|
58
|
-
"@wordpress/data": "10.
|
|
59
|
-
"@wordpress/element": "6.
|
|
60
|
-
"@wordpress/i18n": "5.
|
|
61
|
-
"@wordpress/icons": "10.
|
|
53
|
+
"@wordpress/api-fetch": "7.14.0",
|
|
54
|
+
"@wordpress/blob": "4.14.0",
|
|
55
|
+
"@wordpress/block-editor": "14.9.0",
|
|
56
|
+
"@wordpress/components": "29.0.0",
|
|
57
|
+
"@wordpress/compose": "7.14.0",
|
|
58
|
+
"@wordpress/data": "10.14.0",
|
|
59
|
+
"@wordpress/element": "6.14.0",
|
|
60
|
+
"@wordpress/i18n": "5.14.0",
|
|
61
|
+
"@wordpress/icons": "10.14.0",
|
|
62
62
|
"clsx": "2.1.1",
|
|
63
63
|
"debug": "4.3.4",
|
|
64
64
|
"markdown-it": "14.0.0",
|
|
@@ -1,9 +1,5 @@
|
|
|
1
1
|
import { Notice } from '@wordpress/components';
|
|
2
2
|
import useFairUsageNoticeMessage from '../hooks/use-fair-usage-notice-message.js';
|
|
3
|
-
/**
|
|
4
|
-
* Types
|
|
5
|
-
*/
|
|
6
|
-
import type { ReactElement } from 'react';
|
|
7
3
|
|
|
8
4
|
type FairUsageNoticeProps = {
|
|
9
5
|
variant?: 'error' | 'muted';
|
|
@@ -13,7 +9,7 @@ type FairUsageNoticeProps = {
|
|
|
13
9
|
* The fair usage notice component.
|
|
14
10
|
* @param {FairUsageNoticeProps} props - Fair usage notice component props.
|
|
15
11
|
* @param {FairUsageNoticeProps.variant} props.variant - The variant of the notice to render.
|
|
16
|
-
* @return
|
|
12
|
+
* @return the Notice component with the fair usage message.
|
|
17
13
|
*/
|
|
18
14
|
export const FairUsageNotice = ( { variant = 'error' }: FairUsageNoticeProps ) => {
|
|
19
15
|
const useFairUsageNoticeMessageElement = useFairUsageNoticeMessage();
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { useSelect } from '@wordpress/data';
|
|
2
|
-
import { createInterpolateElement } from '@wordpress/element';
|
|
2
|
+
import { createInterpolateElement, type Element } from '@wordpress/element';
|
|
3
3
|
import { __, sprintf } from '@wordpress/i18n';
|
|
4
4
|
import getRedirectUrl from '../../../../components/tools/jp-redirect/index.js';
|
|
5
5
|
/**
|
|
@@ -11,7 +11,7 @@ import { STORE_NAME } from '../store/index.js';
|
|
|
11
11
|
*/
|
|
12
12
|
import type { Selectors } from '../store/types.js';
|
|
13
13
|
|
|
14
|
-
const useFairUsageNoticeMessage = () => {
|
|
14
|
+
const useFairUsageNoticeMessage = (): Element => {
|
|
15
15
|
const { usagePeriod } = useSelect( select => {
|
|
16
16
|
const selectors: Selectors = select( STORE_NAME );
|
|
17
17
|
return {
|
|
@@ -30,12 +30,7 @@ import {
|
|
|
30
30
|
ACTION_SET_IS_LOADING_HISTORY,
|
|
31
31
|
} from './constants.js';
|
|
32
32
|
import INITIAL_STATE from './initial-state.js';
|
|
33
|
-
import type {
|
|
34
|
-
AiFeatureStateProps,
|
|
35
|
-
LogoGeneratorStateProp,
|
|
36
|
-
RequestError,
|
|
37
|
-
TierLimitProp,
|
|
38
|
-
} from './types.js';
|
|
33
|
+
import type { AiFeatureStateProps, RequestError, TierLimitProp } from './types.js';
|
|
39
34
|
import type { SiteDetails } from '../types.js';
|
|
40
35
|
|
|
41
36
|
/**
|