@automattic/jetpack-ai-client 0.33.6 → 0.33.8

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 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.8] - 2025-08-18
9
+ ### Changed
10
+ - Update dependencies. [#44615]
11
+
12
+ ## [0.33.7] - 2025-08-14
13
+ ### Changed
14
+ - Update package dependencies. [#44701]
15
+
8
16
  ## [0.33.6] - 2025-08-11
9
17
  ### Changed
10
18
  - Update package dependencies. [#44677]
@@ -682,6 +690,8 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
682
690
  - AI Client: stop using smart document visibility handling on the fetchEventSource library, so it does not restart the completion when changing tabs. [#32004]
683
691
  - Updated package dependencies. [#31468] [#31659] [#31785]
684
692
 
693
+ [0.33.8]: https://github.com/Automattic/jetpack-ai-client/compare/v0.33.7...v0.33.8
694
+ [0.33.7]: https://github.com/Automattic/jetpack-ai-client/compare/v0.33.6...v0.33.7
685
695
  [0.33.6]: https://github.com/Automattic/jetpack-ai-client/compare/v0.33.5...v0.33.6
686
696
  [0.33.5]: https://github.com/Automattic/jetpack-ai-client/compare/v0.33.4...v0.33.5
687
697
  [0.33.4]: https://github.com/Automattic/jetpack-ai-client/compare/v0.33.3...v0.33.4
@@ -1,80 +1,80 @@
1
1
  export declare const LANGUAGE_MAP: {
2
2
  en: {
3
- label: import("@wordpress/i18n/build-types/types.js").TranslatableText<"English">;
3
+ label: import("@wordpress/i18n").TranslatableText<"English">;
4
4
  };
5
5
  es: {
6
- label: import("@wordpress/i18n/build-types/types.js").TranslatableText<"Spanish">;
6
+ label: import("@wordpress/i18n").TranslatableText<"Spanish">;
7
7
  };
8
8
  fr: {
9
- label: import("@wordpress/i18n/build-types/types.js").TranslatableText<"French">;
9
+ label: import("@wordpress/i18n").TranslatableText<"French">;
10
10
  };
11
11
  de: {
12
- label: import("@wordpress/i18n/build-types/types.js").TranslatableText<"German">;
12
+ label: import("@wordpress/i18n").TranslatableText<"German">;
13
13
  };
14
14
  it: {
15
- label: import("@wordpress/i18n/build-types/types.js").TranslatableText<"Italian">;
15
+ label: import("@wordpress/i18n").TranslatableText<"Italian">;
16
16
  };
17
17
  pt: {
18
- label: import("@wordpress/i18n/build-types/types.js").TranslatableText<"Portuguese">;
18
+ label: import("@wordpress/i18n").TranslatableText<"Portuguese">;
19
19
  };
20
20
  ru: {
21
- label: import("@wordpress/i18n/build-types/types.js").TranslatableText<"Russian">;
21
+ label: import("@wordpress/i18n").TranslatableText<"Russian">;
22
22
  };
23
23
  zh: {
24
- label: import("@wordpress/i18n/build-types/types.js").TranslatableText<"Chinese">;
24
+ label: import("@wordpress/i18n").TranslatableText<"Chinese">;
25
25
  };
26
26
  ja: {
27
- label: import("@wordpress/i18n/build-types/types.js").TranslatableText<"Japanese">;
27
+ label: import("@wordpress/i18n").TranslatableText<"Japanese">;
28
28
  };
29
29
  ar: {
30
- label: import("@wordpress/i18n/build-types/types.js").TranslatableText<"Arabic">;
30
+ label: import("@wordpress/i18n").TranslatableText<"Arabic">;
31
31
  };
32
32
  hi: {
33
- label: import("@wordpress/i18n/build-types/types.js").TranslatableText<"Hindi">;
33
+ label: import("@wordpress/i18n").TranslatableText<"Hindi">;
34
34
  };
35
35
  ko: {
36
- label: import("@wordpress/i18n/build-types/types.js").TranslatableText<"Korean">;
36
+ label: import("@wordpress/i18n").TranslatableText<"Korean">;
37
37
  };
38
38
  };
39
39
  export declare const PROMPT_TONES_MAP: {
40
40
  formal: {
41
- label: import("@wordpress/i18n/build-types/types.js").TranslatableText<"Formal">;
41
+ label: import("@wordpress/i18n").TranslatableText<"Formal">;
42
42
  emoji: string;
43
43
  };
44
44
  informal: {
45
- label: import("@wordpress/i18n/build-types/types.js").TranslatableText<"Informal">;
45
+ label: import("@wordpress/i18n").TranslatableText<"Informal">;
46
46
  emoji: string;
47
47
  };
48
48
  optimistic: {
49
- label: import("@wordpress/i18n/build-types/types.js").TranslatableText<"Optimistic">;
49
+ label: import("@wordpress/i18n").TranslatableText<"Optimistic">;
50
50
  emoji: string;
51
51
  };
52
52
  humorous: {
53
- label: import("@wordpress/i18n/build-types/types.js").TranslatableText<"Humorous">;
53
+ label: import("@wordpress/i18n").TranslatableText<"Humorous">;
54
54
  emoji: string;
55
55
  };
56
56
  serious: {
57
- label: import("@wordpress/i18n/build-types/types.js").TranslatableText<"Serious">;
57
+ label: import("@wordpress/i18n").TranslatableText<"Serious">;
58
58
  emoji: string;
59
59
  };
60
60
  skeptical: {
61
- label: import("@wordpress/i18n/build-types/types.js").TranslatableText<"Skeptical">;
61
+ label: import("@wordpress/i18n").TranslatableText<"Skeptical">;
62
62
  emoji: string;
63
63
  };
64
64
  empathetic: {
65
- label: import("@wordpress/i18n/build-types/types.js").TranslatableText<"Empathetic">;
65
+ label: import("@wordpress/i18n").TranslatableText<"Empathetic">;
66
66
  emoji: string;
67
67
  };
68
68
  confident: {
69
- label: import("@wordpress/i18n/build-types/types.js").TranslatableText<"Confident">;
69
+ label: import("@wordpress/i18n").TranslatableText<"Confident">;
70
70
  emoji: string;
71
71
  };
72
72
  passionate: {
73
- label: import("@wordpress/i18n/build-types/types.js").TranslatableText<"Passionate">;
73
+ label: import("@wordpress/i18n").TranslatableText<"Passionate">;
74
74
  emoji: string;
75
75
  };
76
76
  provocative: {
77
- label: import("@wordpress/i18n/build-types/types.js").TranslatableText<"Provocative">;
77
+ label: import("@wordpress/i18n").TranslatableText<"Provocative">;
78
78
  emoji: string;
79
79
  };
80
80
  };
@@ -92,18 +92,18 @@ export declare const PROMPT_TYPE_USER_PROMPT: "userPrompt";
92
92
  export declare const PROMPT_TYPE_JETPACK_FORM_CUSTOM_PROMPT: "jetpackFormCustomPrompt";
93
93
  export declare const PROMPT_TYPE_TRANSFORM_LIST_TO_TABLE: "transformListToTable";
94
94
  export declare const PROMPT_TYPE_WRITE_POST_FROM_LIST: "writePostFromList";
95
- export declare const TRANSLATE_LABEL: import("@wordpress/i18n/build-types/types.js").TranslatableText<"Translate">;
96
- export declare const TONE_LABEL: import("@wordpress/i18n/build-types/types.js").TranslatableText<"Change tone">;
97
- export declare const CORRECT_SPELLING_LABEL: import("@wordpress/i18n/build-types/types.js").TranslatableText<"Correct spelling and grammar">;
98
- export declare const SIMPLIFY_LABEL: import("@wordpress/i18n/build-types/types.js").TranslatableText<"Simplify">;
99
- export declare const SUMMARIZE_LABEL: import("@wordpress/i18n/build-types/types.js").TranslatableText<"Summarize">;
100
- export declare const MAKE_SHORTER_LABEL: import("@wordpress/i18n/build-types/types.js").TranslatableText<"Make shorter">;
101
- export declare const MAKE_LONGER_LABEL: import("@wordpress/i18n/build-types/types.js").TranslatableText<"Expand">;
102
- export declare const TURN_LIST_INTO_TABLE_LABEL: import("@wordpress/i18n/build-types/types.js").TranslatableText<"Turn list into a table">;
103
- export declare const WRITE_POST_FROM_LIST_LABEL: import("@wordpress/i18n/build-types/types.js").TranslatableText<"Write a post from this list">;
104
- export declare const GENERATE_TITLE_LABEL: import("@wordpress/i18n/build-types/types.js").TranslatableText<"Generate a post title">;
105
- export declare const SUMMARY_BASED_ON_TITLE_LABEL: import("@wordpress/i18n/build-types/types.js").TranslatableText<"Summary based on title">;
106
- export declare const CONTINUE_LABEL: import("@wordpress/i18n/build-types/types.js").TranslatableText<"Continue writing">;
95
+ export declare const TRANSLATE_LABEL: import("@wordpress/i18n").TranslatableText<"Translate">;
96
+ export declare const TONE_LABEL: import("@wordpress/i18n").TranslatableText<"Change tone">;
97
+ export declare const CORRECT_SPELLING_LABEL: import("@wordpress/i18n").TranslatableText<"Correct spelling and grammar">;
98
+ export declare const SIMPLIFY_LABEL: import("@wordpress/i18n").TranslatableText<"Simplify">;
99
+ export declare const SUMMARIZE_LABEL: import("@wordpress/i18n").TranslatableText<"Summarize">;
100
+ export declare const MAKE_SHORTER_LABEL: import("@wordpress/i18n").TranslatableText<"Make shorter">;
101
+ export declare const MAKE_LONGER_LABEL: import("@wordpress/i18n").TranslatableText<"Expand">;
102
+ export declare const TURN_LIST_INTO_TABLE_LABEL: import("@wordpress/i18n").TranslatableText<"Turn list into a table">;
103
+ export declare const WRITE_POST_FROM_LIST_LABEL: import("@wordpress/i18n").TranslatableText<"Write a post from this list">;
104
+ export declare const GENERATE_TITLE_LABEL: import("@wordpress/i18n").TranslatableText<"Generate a post title">;
105
+ export declare const SUMMARY_BASED_ON_TITLE_LABEL: import("@wordpress/i18n").TranslatableText<"Summary based on title">;
106
+ export declare const CONTINUE_LABEL: import("@wordpress/i18n").TranslatableText<"Continue writing">;
107
107
  export declare const PLACEMENT_JETPACK_SIDEBAR: "jetpack-sidebar";
108
108
  export declare const PLACEMENT_DOCUMENT_SETTINGS: "document-settings";
109
109
  export declare const PLACEMENT_PRE_PUBLISH: "pre-publish";
@@ -155,6 +155,6 @@ export const Prompt = ({ initialPrompt = '' }) => {
155
155
  recordTracksEvent(EVENT_SWITCH_STYLE, { context, style: imageStyle });
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
- // 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: _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') }))] })] }));
158
+ // translators: %d is the number of requests
159
+ __('%d 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
  };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@automattic/jetpack-ai-client",
3
- "version": "0.33.6",
3
+ "version": "0.33.8",
4
4
  "private": false,
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",
@@ -33,30 +33,30 @@
33
33
  "watch": "tsc --watch --pretty"
34
34
  },
35
35
  "dependencies": {
36
- "@automattic/jetpack-base-styles": "^1.0.7",
37
- "@automattic/jetpack-components": "^1.1.18",
38
- "@automattic/jetpack-connection": "^1.4.1",
36
+ "@automattic/jetpack-base-styles": "^1.0.8",
37
+ "@automattic/jetpack-components": "^1.2.1",
38
+ "@automattic/jetpack-connection": "^1.4.4",
39
39
  "@automattic/jetpack-explat": "workspace:*",
40
- "@automattic/jetpack-script-data": "^0.5.1",
41
- "@automattic/jetpack-shared-extension-utils": "^1.3.10",
40
+ "@automattic/jetpack-script-data": "^0.5.2",
41
+ "@automattic/jetpack-shared-extension-utils": "^1.3.12",
42
42
  "@microsoft/fetch-event-source": "2.0.1",
43
43
  "@types/jest": "30.0.0",
44
44
  "@types/react": "18.3.23",
45
45
  "@types/wordpress__block-editor": "11.5.16",
46
- "@wordpress/api-fetch": "7.27.0",
47
- "@wordpress/base-styles": "6.3.0",
48
- "@wordpress/blob": "4.27.0",
49
- "@wordpress/block-editor": "15.0.0",
50
- "@wordpress/blocks": "15.0.0",
51
- "@wordpress/components": "30.0.0",
52
- "@wordpress/compose": "7.27.0",
53
- "@wordpress/data": "10.27.0",
54
- "@wordpress/editor": "14.27.0",
55
- "@wordpress/element": "6.27.0",
56
- "@wordpress/i18n": "6.0.0",
57
- "@wordpress/icons": "10.27.0",
58
- "@wordpress/primitives": "4.27.0",
59
- "@wordpress/url": "4.27.0",
46
+ "@wordpress/api-fetch": "7.28.0",
47
+ "@wordpress/base-styles": "6.4.0",
48
+ "@wordpress/blob": "4.28.0",
49
+ "@wordpress/block-editor": "15.1.0",
50
+ "@wordpress/blocks": "15.1.0",
51
+ "@wordpress/components": "30.1.0",
52
+ "@wordpress/compose": "7.28.0",
53
+ "@wordpress/data": "10.28.0",
54
+ "@wordpress/editor": "14.28.0",
55
+ "@wordpress/element": "6.28.0",
56
+ "@wordpress/i18n": "6.1.0",
57
+ "@wordpress/icons": "10.28.0",
58
+ "@wordpress/primitives": "4.28.0",
59
+ "@wordpress/url": "4.28.0",
60
60
  "clsx": "2.1.1",
61
61
  "debug": "4.4.1",
62
62
  "markdown-it": "14.1.0",
@@ -293,8 +293,8 @@ export const Prompt = ( { initialPrompt = '' }: PromptProps ) => {
293
293
  <div className="jetpack-ai-logo-generator__prompt-requests">
294
294
  <div>
295
295
  { sprintf(
296
- // translators: %u is the number of requests
297
- __( '%u requests remaining.', 'jetpack-ai-client' ),
296
+ // translators: %d is the number of requests
297
+ __( '%d requests remaining.', 'jetpack-ai-client' ),
298
298
  requestsRemaining
299
299
  ) }
300
300
  </div>