@automattic/jetpack-ai-client 0.27.6 → 0.27.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.
Files changed (187) hide show
  1. package/CHANGELOG.md +17 -0
  2. package/build/api-fetch/index.d.ts +3 -1
  3. package/build/ask-question/index.d.ts +2 -2
  4. package/build/ask-question/index.js +1 -1
  5. package/build/ask-question/sync.d.ts +2 -2
  6. package/build/ask-question/sync.js +1 -1
  7. package/build/audio-transcription/index.js +1 -1
  8. package/build/chrome-ai/factory.d.ts +2 -2
  9. package/build/chrome-ai/factory.js +2 -2
  10. package/build/chrome-ai/index.d.ts +2 -2
  11. package/build/chrome-ai/index.js +2 -2
  12. package/build/chrome-ai/suggestions.d.ts +1 -1
  13. package/build/chrome-ai/suggestions.js +4 -4
  14. package/build/components/ai-control/ai-control.d.ts +6 -2
  15. package/build/components/ai-control/ai-control.js +1 -1
  16. package/build/components/ai-control/block-ai-control.d.ts +1 -1
  17. package/build/components/ai-control/block-ai-control.js +2 -2
  18. package/build/components/ai-control/extension-ai-control.d.ts +1 -1
  19. package/build/components/ai-control/extension-ai-control.js +2 -2
  20. package/build/components/ai-control/index.d.ts +3 -3
  21. package/build/components/ai-control/index.js +3 -3
  22. package/build/components/ai-image/components/ai-image-modal.d.ts +2 -3
  23. package/build/components/ai-image/components/ai-image-modal.js +7 -7
  24. package/build/components/ai-image/components/carrousel.d.ts +0 -1
  25. package/build/components/ai-image/components/carrousel.js +2 -2
  26. package/build/components/ai-image/featured-image.js +8 -8
  27. package/build/components/ai-image/general-purpose-image.js +7 -7
  28. package/build/components/ai-image/hooks/use-ai-image.d.ts +3 -3
  29. package/build/components/ai-image/hooks/use-ai-image.js +7 -7
  30. package/build/components/ai-image/index.d.ts +3 -3
  31. package/build/components/ai-image/index.js +3 -3
  32. package/build/components/ai-status-indicator/index.d.ts +1 -1
  33. package/build/components/audio-duration-display/index.js +1 -1
  34. package/build/components/index.d.ts +10 -10
  35. package/build/components/index.js +10 -10
  36. package/build/components/message/index.d.ts +1 -1
  37. package/build/components/message/index.js +3 -3
  38. package/build/components/modal/index.d.ts +1 -2
  39. package/build/components/modal/index.js +1 -1
  40. package/build/components/quota-exceeded-message/index.js +3 -3
  41. package/build/data-flow/context.d.ts +4 -4
  42. package/build/data-flow/index.d.ts +3 -3
  43. package/build/data-flow/index.js +3 -3
  44. package/build/data-flow/use-ai-context.d.ts +3 -3
  45. package/build/data-flow/use-ai-context.js +2 -2
  46. package/build/data-flow/with-ai-assistant-data.js +2 -2
  47. package/build/hooks/use-ai-checkout/index.js +1 -1
  48. package/build/hooks/use-ai-feature/index.d.ts +1 -1
  49. package/build/hooks/use-ai-feature/index.js +1 -1
  50. package/build/hooks/use-ai-suggestions/index.d.ts +3 -3
  51. package/build/hooks/use-ai-suggestions/index.js +3 -3
  52. package/build/hooks/use-audio-transcription/index.js +1 -1
  53. package/build/hooks/use-image-generator/index.d.ts +2 -2
  54. package/build/hooks/use-image-generator/index.js +3 -3
  55. package/build/hooks/use-post-content.js +1 -1
  56. package/build/hooks/use-transcription-post-processing/index.js +1 -1
  57. package/build/icons/index.d.ts +7 -7
  58. package/build/icons/index.js +7 -7
  59. package/build/index.d.ts +23 -23
  60. package/build/index.js +23 -23
  61. package/build/jwt/index.js +1 -1
  62. package/build/libs/get-all-blocks.d.ts +1 -1
  63. package/build/libs/index.d.ts +7 -7
  64. package/build/libs/index.js +6 -6
  65. package/build/libs/map-action-to-human-text.js +1 -1
  66. package/build/libs/markdown/index.d.ts +3 -3
  67. package/build/libs/markdown/index.js +2 -2
  68. package/build/logo-generator/components/fair-usage-notice.js +1 -1
  69. package/build/logo-generator/components/first-load-screen.js +1 -1
  70. package/build/logo-generator/components/generator-modal.d.ts +1 -1
  71. package/build/logo-generator/components/generator-modal.js +14 -14
  72. package/build/logo-generator/components/history-carousel.js +2 -2
  73. package/build/logo-generator/components/logo-presenter.d.ts +1 -1
  74. package/build/logo-generator/components/logo-presenter.js +10 -10
  75. package/build/logo-generator/components/prompt.js +8 -8
  76. package/build/logo-generator/components/upgrade-nudge.js +3 -3
  77. package/build/logo-generator/components/upgrade-screen.js +2 -2
  78. package/build/logo-generator/hooks/use-checkout.js +1 -1
  79. package/build/logo-generator/hooks/use-fair-usage-notice-message.js +1 -1
  80. package/build/logo-generator/hooks/use-logo-generator.d.ts +3 -3
  81. package/build/logo-generator/hooks/use-logo-generator.js +8 -8
  82. package/build/logo-generator/hooks/use-request-errors.d.ts +6 -6
  83. package/build/logo-generator/hooks/use-request-errors.js +1 -1
  84. package/build/logo-generator/index.d.ts +2 -2
  85. package/build/logo-generator/index.js +2 -2
  86. package/build/logo-generator/lib/logo-storage.d.ts +2 -2
  87. package/build/logo-generator/lib/logo-storage.js +1 -1
  88. package/build/logo-generator/lib/media-exists.d.ts +1 -1
  89. package/build/logo-generator/lib/media-exists.js +1 -1
  90. package/build/logo-generator/lib/set-site-logo.d.ts +1 -1
  91. package/build/logo-generator/lib/set-site-logo.js +1 -1
  92. package/build/logo-generator/lib/wpcom-limited-request.js +1 -1
  93. package/build/logo-generator/store/actions.d.ts +2 -2
  94. package/build/logo-generator/store/actions.js +3 -3
  95. package/build/logo-generator/store/index.js +3 -3
  96. package/build/logo-generator/store/initial-state.d.ts +1 -1
  97. package/build/logo-generator/store/initial-state.js +1 -1
  98. package/build/logo-generator/store/reducer.d.ts +26 -26
  99. package/build/logo-generator/store/reducer.js +4 -4
  100. package/build/logo-generator/store/selectors.d.ts +2 -2
  101. package/build/logo-generator/store/selectors.js +1 -1
  102. package/build/logo-generator/store/types.d.ts +2 -2
  103. package/build/logo-generator/types.d.ts +1 -1
  104. package/build/suggestions-event-source/index.d.ts +1 -1
  105. package/build/suggestions-event-source/index.js +3 -3
  106. package/build/types.d.ts +8 -8
  107. package/build/types.js +1 -1
  108. package/package.json +21 -20
  109. package/src/ask-question/index.ts +2 -2
  110. package/src/ask-question/sync.ts +3 -3
  111. package/src/audio-transcription/index.ts +1 -1
  112. package/src/chrome-ai/factory.ts +3 -3
  113. package/src/chrome-ai/index.ts +2 -2
  114. package/src/chrome-ai/suggestions.ts +4 -4
  115. package/src/components/ai-control/ai-control.tsx +3 -3
  116. package/src/components/ai-control/block-ai-control.tsx +3 -3
  117. package/src/components/ai-control/extension-ai-control.tsx +3 -3
  118. package/src/components/ai-control/index.tsx +3 -3
  119. package/src/components/ai-control/style.scss +1 -0
  120. package/src/components/ai-feedback/style.scss +1 -0
  121. package/src/components/ai-image/components/ai-image-modal.scss +2 -0
  122. package/src/components/ai-image/components/ai-image-modal.tsx +7 -7
  123. package/src/components/ai-image/components/carrousel.scss +10 -4
  124. package/src/components/ai-image/components/carrousel.tsx +2 -2
  125. package/src/components/ai-image/components/usage-counter.scss +1 -1
  126. package/src/components/ai-image/featured-image.tsx +11 -11
  127. package/src/components/ai-image/general-purpose-image.tsx +7 -7
  128. package/src/components/ai-image/hooks/use-ai-image.ts +8 -8
  129. package/src/components/ai-image/index.ts +3 -3
  130. package/src/components/ai-image/style.scss +2 -0
  131. package/src/components/ai-status-indicator/index.tsx +1 -1
  132. package/src/components/audio-duration-display/index.tsx +1 -1
  133. package/src/components/index.ts +10 -10
  134. package/src/components/message/index.tsx +4 -4
  135. package/src/components/modal/index.tsx +2 -2
  136. package/src/components/modal/style.scss +2 -0
  137. package/src/components/quota-exceeded-message/index.tsx +3 -3
  138. package/src/components/quota-exceeded-message/style.scss +3 -1
  139. package/src/data-flow/context.tsx +4 -4
  140. package/src/data-flow/index.ts +3 -3
  141. package/src/data-flow/use-ai-context.ts +4 -4
  142. package/src/data-flow/with-ai-assistant-data.tsx +2 -2
  143. package/src/hooks/use-ai-checkout/index.ts +1 -1
  144. package/src/hooks/use-ai-suggestions/index.ts +6 -6
  145. package/src/hooks/use-audio-transcription/index.ts +1 -1
  146. package/src/hooks/use-image-generator/index.ts +3 -3
  147. package/src/hooks/use-post-content.ts +1 -1
  148. package/src/hooks/use-save-to-media-library/index.ts +1 -1
  149. package/src/hooks/use-save-to-media-library.ts +1 -1
  150. package/src/hooks/use-transcription-post-processing/index.ts +2 -2
  151. package/src/icons/index.ts +7 -7
  152. package/src/index.ts +23 -23
  153. package/src/jwt/index.ts +1 -1
  154. package/src/libs/get-all-blocks.ts +1 -1
  155. package/src/libs/index.ts +7 -7
  156. package/src/libs/map-action-to-human-text.ts +1 -1
  157. package/src/libs/markdown/index.ts +3 -3
  158. package/src/logo-generator/assets/icons/icons.scss +1 -0
  159. package/src/logo-generator/components/fair-usage-notice.tsx +1 -1
  160. package/src/logo-generator/components/first-load-screen.tsx +1 -1
  161. package/src/logo-generator/components/generator-modal.scss +1 -0
  162. package/src/logo-generator/components/generator-modal.tsx +15 -15
  163. package/src/logo-generator/components/history-carousel.tsx +2 -2
  164. package/src/logo-generator/components/logo-presenter.scss +1 -0
  165. package/src/logo-generator/components/logo-presenter.tsx +12 -12
  166. package/src/logo-generator/components/prompt.scss +1 -0
  167. package/src/logo-generator/components/prompt.tsx +9 -9
  168. package/src/logo-generator/components/upgrade-nudge.tsx +3 -3
  169. package/src/logo-generator/components/upgrade-screen.tsx +2 -2
  170. package/src/logo-generator/hooks/use-checkout.ts +2 -2
  171. package/src/logo-generator/hooks/use-fair-usage-notice-message.tsx +2 -2
  172. package/src/logo-generator/hooks/use-logo-generator.ts +11 -11
  173. package/src/logo-generator/hooks/use-request-errors.ts +2 -2
  174. package/src/logo-generator/index.ts +2 -2
  175. package/src/logo-generator/lib/logo-storage.ts +3 -3
  176. package/src/logo-generator/lib/media-exists.ts +2 -2
  177. package/src/logo-generator/lib/set-site-logo.ts +2 -2
  178. package/src/logo-generator/lib/wpcom-limited-request.ts +1 -1
  179. package/src/logo-generator/store/actions.ts +5 -5
  180. package/src/logo-generator/store/index.ts +3 -3
  181. package/src/logo-generator/store/initial-state.ts +2 -2
  182. package/src/logo-generator/store/reducer.ts +5 -5
  183. package/src/logo-generator/store/selectors.ts +3 -3
  184. package/src/logo-generator/store/types.ts +2 -2
  185. package/src/logo-generator/types.ts +1 -1
  186. package/src/suggestions-event-source/index.ts +4 -4
  187. package/src/types.ts +8 -8
@@ -7,12 +7,12 @@ import React from 'react';
7
7
  /**
8
8
  * Internal dependencies
9
9
  */
10
- import AiStatusIndicator from '../ai-status-indicator/index.js';
10
+ import AiStatusIndicator from '../ai-status-indicator/index.tsx';
11
11
  import './style.scss';
12
12
  /**
13
13
  * Types
14
14
  */
15
- import type { RequestingStateProp } from '../../types.js';
15
+ import type { RequestingStateProp } from '../../types.ts';
16
16
  import type { ReactElement } from 'react';
17
17
 
18
18
  type AIControlProps = {
@@ -27,7 +27,7 @@ type AIControlProps = {
27
27
  error?: ReactElement;
28
28
  actions?: ReactElement;
29
29
  message?: ReactElement;
30
- promptUserInputRef?: React.MutableRefObject< HTMLInputElement >;
30
+ promptUserInputRef?: PlainText.Props[ 'ref' ];
31
31
  wrapperRef?: React.MutableRefObject< HTMLDivElement | null >;
32
32
  };
33
33
 
@@ -18,13 +18,13 @@ import React, { forwardRef } from 'react';
18
18
  /**
19
19
  * Internal dependencies
20
20
  */
21
- import { GuidelineMessage } from '../message/index.js';
22
- import AIControl from './ai-control.js';
21
+ import { GuidelineMessage } from '../message/index.tsx';
22
+ import AIControl from './ai-control.tsx';
23
23
  import './style.scss';
24
24
  /**
25
25
  * Types
26
26
  */
27
- import type { RequestingStateProp } from '../../types.js';
27
+ import type { RequestingStateProp } from '../../types.ts';
28
28
  import type { ReactElement } from 'react';
29
29
 
30
30
  type BlockAIControlProps = {
@@ -15,13 +15,13 @@ import {
15
15
  ErrorMessage,
16
16
  UpgradeMessage,
17
17
  FairUsageLimitMessage,
18
- } from '../message/index.js';
19
- import AIControl from './ai-control.js';
18
+ } from '../message/index.tsx';
19
+ import AIControl from './ai-control.tsx';
20
20
  import './style.scss';
21
21
  /**
22
22
  * Types
23
23
  */
24
- import type { RequestingErrorProps, RequestingStateProp } from '../../types.js';
24
+ import type { RequestingErrorProps, RequestingStateProp } from '../../types.ts';
25
25
  import type { ReactElement, MouseEvent } from 'react';
26
26
 
27
27
  type ExtensionAIControlProps = {
@@ -1,3 +1,3 @@
1
- export { default as AIControl } from './ai-control.js';
2
- export { default as BlockAIControl } from './block-ai-control.js';
3
- export { default as ExtensionAIControl } from './extension-ai-control.js';
1
+ export { default as AIControl } from './ai-control.tsx';
2
+ export { default as BlockAIControl } from './block-ai-control.tsx';
3
+ export { default as ExtensionAIControl } from './extension-ai-control.tsx';
@@ -89,6 +89,7 @@
89
89
  }
90
90
 
91
91
  .jetpack-components-ai-control__controls-prompt_button {
92
+
92
93
  &:disabled {
93
94
  opacity: 0.6;
94
95
  cursor: not-allowed;
@@ -1,6 +1,7 @@
1
1
  @import "@wordpress/base-styles/colors";
2
2
 
3
3
  .ai-assistant-feedback {
4
+
4
5
  &__selection {
5
6
  display: flex;
6
7
 
@@ -1,4 +1,5 @@
1
1
  .ai-image-modal {
2
+
2
3
  &__content {
3
4
  display: flex;
4
5
  margin-top: 32px;
@@ -68,6 +69,7 @@
68
69
  &__image-canvas {
69
70
  width: 100%;
70
71
  margin-top: 24px;
72
+
71
73
  & > .jetpack-ai-upgrade-banner {
72
74
  margin-bottom: 8px;
73
75
  }
@@ -14,13 +14,13 @@ import {
14
14
  IMAGE_STYLE_AUTO,
15
15
  ImageStyleObject,
16
16
  ImageStyle,
17
- } from '../../../hooks/use-image-generator/constants.js';
18
- import { AiModalPromptInput } from '../../../logo-generator/index.js';
19
- import AiModalFooter from '../../ai-modal-footer/index.js';
20
- import AiAssistantModal from '../../modal/index.js';
21
- import QuotaExceededMessage from '../../quota-exceeded-message/index.js';
22
- import Carrousel, { CarrouselImages } from './carrousel.js';
23
- import UsageCounter from './usage-counter.js';
17
+ } from '../../../hooks/use-image-generator/constants.ts';
18
+ import { AiModalPromptInput } from '../../../logo-generator/index.ts';
19
+ import AiModalFooter from '../../ai-modal-footer/index.tsx';
20
+ import AiAssistantModal from '../../modal/index.tsx';
21
+ import QuotaExceededMessage from '../../quota-exceeded-message/index.tsx';
22
+ import Carrousel, { CarrouselImages } from './carrousel.tsx';
23
+ import UsageCounter from './usage-counter.tsx';
24
24
  import './ai-image-modal.scss';
25
25
 
26
26
  type AiImageModalProps = {
@@ -1,6 +1,7 @@
1
1
  $scale-factor: 0.55;
2
2
 
3
3
  .ai-assistant-image {
4
+
4
5
  &__blank {
5
6
  display: flex;
6
7
  justify-content: center;
@@ -36,7 +37,7 @@ $scale-factor: 0.55;
36
37
 
37
38
  &-message {
38
39
  font-size: 10px;
39
- color: red;
40
+ color: #f00;
40
41
  }
41
42
  }
42
43
 
@@ -52,6 +53,7 @@ $scale-factor: 0.55;
52
53
  height: calc( 768px * $scale-factor );
53
54
 
54
55
  .ai-carrousel {
56
+
55
57
  &__prev {
56
58
  left: 0;
57
59
  }
@@ -62,15 +64,17 @@ $scale-factor: 0.55;
62
64
 
63
65
  &__prev,
64
66
  &__next {
67
+
65
68
  &:hover {
66
69
  background-color: rgba( 0, 0, 0, 0.3 );
67
70
  opacity: 1;
68
71
  }
69
72
 
70
73
  &-icon {
71
- fill: white;
74
+ fill: #fff;
75
+
72
76
  &.is-disabled {
73
- fill: gray;
77
+ fill: #808080;
74
78
  }
75
79
  }
76
80
 
@@ -111,6 +115,7 @@ $scale-factor: 0.55;
111
115
  padding: 6px 0;
112
116
 
113
117
  .ai-carrousel {
118
+
114
119
  &__prev,
115
120
  &__next {
116
121
  display: flex;
@@ -122,8 +127,9 @@ $scale-factor: 0.55;
122
127
  padding: 0;
123
128
 
124
129
  &-icon {
130
+
125
131
  &.is-disabled {
126
- fill: gray;
132
+ fill: #808080;
127
133
  }
128
134
  }
129
135
  }
@@ -9,8 +9,8 @@ import clsx from 'clsx';
9
9
  /**
10
10
  * Internal dependencies
11
11
  */
12
- import AiFeedbackThumbs from '../../ai-feedback/index.js';
13
- import AiIcon from '../../ai-icon/index.js';
12
+ import AiFeedbackThumbs from '../../ai-feedback/index.tsx';
13
+ import AiIcon from '../../ai-icon/index.tsx';
14
14
  import './carrousel.scss';
15
15
 
16
16
  export type CarrouselImageData = {
@@ -14,6 +14,6 @@
14
14
  }
15
15
 
16
16
  &-no-limit {
17
- color: red;
17
+ color: #f00;
18
18
  }
19
19
  }
@@ -16,22 +16,22 @@ import debugFactory from 'debug';
16
16
  * Internal dependencies
17
17
  */
18
18
  import './style.scss';
19
- import { PLACEMENT_JETPACK_SIDEBAR, PLACEMENT_DOCUMENT_SETTINGS } from '../../constants.js';
20
- import useAiFeature from '../../hooks/use-ai-feature/index.js';
21
- import { ImageStyle } from '../../hooks/use-image-generator/constants.js';
22
- import usePostContent from '../../hooks/use-post-content.js';
23
- import useSaveToMediaLibrary from '../../hooks/use-save-to-media-library.js';
24
- import AiImageModal from './components/ai-image-modal.js';
25
- import useAiImage from './hooks/use-ai-image.js';
26
- import useSiteType from './hooks/use-site-type.js';
19
+ import { PLACEMENT_JETPACK_SIDEBAR, PLACEMENT_DOCUMENT_SETTINGS } from '../../constants.ts';
20
+ import useAiFeature from '../../hooks/use-ai-feature/index.ts';
21
+ import { ImageStyle } from '../../hooks/use-image-generator/constants.ts';
22
+ import usePostContent from '../../hooks/use-post-content.ts';
23
+ import useSaveToMediaLibrary from '../../hooks/use-save-to-media-library.ts';
24
+ import AiImageModal from './components/ai-image-modal.tsx';
25
+ import useAiImage from './hooks/use-ai-image.ts';
26
+ import useSiteType from './hooks/use-site-type.ts';
27
27
  import {
28
28
  FEATURED_IMAGE_FEATURE_NAME,
29
29
  IMAGE_GENERATION_MODEL_STABLE_DIFFUSION,
30
30
  IMAGE_GENERATION_MODEL_DALL_E_3,
31
31
  PLACEMENT_MEDIA_SOURCE_DROPDOWN,
32
- } from './types.js';
33
- import type { ImageResponse } from './hooks/use-ai-image.js';
34
- import type { EditorSelectors } from './types.js';
32
+ } from './types.ts';
33
+ import type { ImageResponse } from './hooks/use-ai-image.ts';
34
+ import type { EditorSelectors } from './types.ts';
35
35
 
36
36
  const debug = debugFactory( 'jetpack-ai-client:featured-image' );
37
37
 
@@ -14,17 +14,17 @@ import debugFactory from 'debug';
14
14
  * Internal dependencies
15
15
  */
16
16
  import './style.scss';
17
- import useAiFeature from '../../hooks/use-ai-feature/index.js';
18
- import usePostContent from '../../hooks/use-post-content.js';
19
- import useSaveToMediaLibrary from '../../hooks/use-save-to-media-library.js';
20
- import AiImageModal from './components/ai-image-modal.js';
21
- import useAiImage from './hooks/use-ai-image.js';
22
- import useSiteType from './hooks/use-site-type.js';
17
+ import useAiFeature from '../../hooks/use-ai-feature/index.ts';
18
+ import usePostContent from '../../hooks/use-post-content.ts';
19
+ import useSaveToMediaLibrary from '../../hooks/use-save-to-media-library.ts';
20
+ import AiImageModal from './components/ai-image-modal.tsx';
21
+ import useAiImage from './hooks/use-ai-image.ts';
22
+ import useSiteType from './hooks/use-site-type.ts';
23
23
  import {
24
24
  IMAGE_GENERATION_MODEL_STABLE_DIFFUSION,
25
25
  IMAGE_GENERATION_MODEL_DALL_E_3,
26
26
  GENERAL_IMAGE_FEATURE_NAME,
27
- } from './types.js';
27
+ } from './types.ts';
28
28
 
29
29
  /**
30
30
  * The type for the callback function that is called when the user selects an image.
@@ -9,11 +9,11 @@ import React from 'react';
9
9
  /**
10
10
  * Internal dependencies
11
11
  */
12
- import askQuestionSync from '../../../ask-question/sync.js';
13
- import useAiFeature from '../../../hooks/use-ai-feature/index.js';
14
- import { ImageStyleObject, ImageStyle } from '../../../hooks/use-image-generator/constants.js';
15
- import useImageGenerator from '../../../hooks/use-image-generator/index.js';
16
- import useSaveToMediaLibrary from '../../../hooks/use-save-to-media-library.js';
12
+ import askQuestionSync from '../../../ask-question/sync.ts';
13
+ import useAiFeature from '../../../hooks/use-ai-feature/index.ts';
14
+ import { ImageStyleObject, ImageStyle } from '../../../hooks/use-image-generator/constants.ts';
15
+ import useImageGenerator from '../../../hooks/use-image-generator/index.ts';
16
+ import useSaveToMediaLibrary from '../../../hooks/use-save-to-media-library.ts';
17
17
  /**
18
18
  * Types
19
19
  */
@@ -21,9 +21,9 @@ import {
21
21
  CoreSelectors,
22
22
  FEATURED_IMAGE_FEATURE_NAME,
23
23
  GENERAL_IMAGE_FEATURE_NAME,
24
- } from '../types.js';
25
- import type { RoleType } from '../../../types.js';
26
- import type { CarrouselImageData, CarrouselImages } from '../components/carrousel.js';
24
+ } from '../types.ts';
25
+ import type { RoleType } from '../../../types.ts';
26
+ import type { CarrouselImageData, CarrouselImages } from '../components/carrousel.tsx';
27
27
  import type { FeatureControl } from '@automattic/jetpack-shared-extension-utils/store/wordpress-com/types';
28
28
 
29
29
  type ImageFeatureControl = FeatureControl & {
@@ -1,6 +1,6 @@
1
- import FeaturedImage from './featured-image.js';
2
- import GeneralPurposeImage from './general-purpose-image.js';
3
- import { PLACEMENT_MEDIA_SOURCE_DROPDOWN, PLACEMENT_BLOCK_PLACEHOLDER_BUTTON } from './types.js';
1
+ import FeaturedImage from './featured-image.tsx';
2
+ import GeneralPurposeImage from './general-purpose-image.tsx';
3
+ import { PLACEMENT_MEDIA_SOURCE_DROPDOWN, PLACEMENT_BLOCK_PLACEHOLDER_BUTTON } from './types.ts';
4
4
 
5
5
  export {
6
6
  FeaturedImage,
@@ -1,4 +1,5 @@
1
1
  .ai-assistant-featured-image {
2
+
2
3
  &__content {
3
4
  display: flex;
4
5
  margin-top: 32px;
@@ -61,6 +62,7 @@
61
62
  &__image-canvas {
62
63
  width: 100%;
63
64
  margin-top: 24px;
65
+
64
66
  & > .jetpack-ai-upgrade-banner {
65
67
  margin-bottom: 8px;
66
68
  }
@@ -6,7 +6,7 @@ import clsx from 'clsx';
6
6
  /*
7
7
  * Types
8
8
  */
9
- import type { RequestingStateProp } from '../../types.js';
9
+ import type { RequestingStateProp } from '../../types.ts';
10
10
  export type AiStatusIndicatorIconSize = 24 | 32 | 48 | 64;
11
11
  import type React from 'react';
12
12
 
@@ -1,7 +1,7 @@
1
1
  /*
2
2
  * Internal dependencies
3
3
  */
4
- import { formatTime } from './lib/media.js';
4
+ import { formatTime } from './lib/media.ts';
5
5
  /*
6
6
  * Types
7
7
  */
@@ -1,23 +1,23 @@
1
- export { AIControl, BlockAIControl, ExtensionAIControl } from './ai-control/index.js';
2
- export { default as AiFeedbackThumbs } from './ai-feedback/index.js';
3
- export { default as AiIcon, AiSVG } from './ai-icon/index.js';
1
+ export { AIControl, BlockAIControl, ExtensionAIControl } from './ai-control/index.tsx';
2
+ export { default as AiFeedbackThumbs } from './ai-feedback/index.tsx';
3
+ export { default as AiIcon, AiSVG } from './ai-icon/index.tsx';
4
4
  export {
5
5
  FeaturedImage,
6
6
  GeneralPurposeImage,
7
7
  PLACEMENT_MEDIA_SOURCE_DROPDOWN,
8
8
  PLACEMENT_BLOCK_PLACEHOLDER_BUTTON,
9
- } from './ai-image/index.js';
10
- export { default as AiStatusIndicator } from './ai-status-indicator/index.js';
11
- export { default as AudioDurationDisplay } from './audio-duration-display/index.js';
12
- export { default as AiModalFooter } from './ai-modal-footer/index.js';
9
+ } from './ai-image/index.ts';
10
+ export { default as AiStatusIndicator } from './ai-status-indicator/index.tsx';
11
+ export { default as AudioDurationDisplay } from './audio-duration-display/index.tsx';
12
+ export { default as AiModalFooter } from './ai-modal-footer/index.tsx';
13
13
  export {
14
14
  GuidelineMessage,
15
15
  UpgradeMessage,
16
16
  ErrorMessage,
17
17
  default as FooterMessage,
18
- } from './message/index.js';
19
- export { default as AiAssistantModal } from './modal/index.js';
18
+ } from './message/index.tsx';
19
+ export { default as AiAssistantModal } from './modal/index.tsx';
20
20
  export {
21
21
  default as QuotaExceededMessage,
22
22
  FairUsageNotice,
23
- } from './quota-exceeded-message/index.js';
23
+ } from './quota-exceeded-message/index.tsx';
@@ -10,13 +10,13 @@ import clsx from 'clsx';
10
10
  * Internal dependencies
11
11
  */
12
12
  import './style.scss';
13
- import errorExclamation from '../../icons/error-exclamation.js';
14
- import { ERROR_QUOTA_EXCEEDED } from '../../types.js';
15
- import AiFeedbackThumbs from '../ai-feedback/index.js';
13
+ import errorExclamation from '../../icons/error-exclamation.tsx';
14
+ import { ERROR_QUOTA_EXCEEDED } from '../../types.ts';
15
+ import AiFeedbackThumbs from '../ai-feedback/index.tsx';
16
16
  /**
17
17
  * Types
18
18
  */
19
- import type { SuggestionErrorCode } from '../../types.js';
19
+ import type { SuggestionErrorCode } from '../../types.ts';
20
20
  import type React from 'react';
21
21
 
22
22
  export const MESSAGE_SEVERITY_WARNING = 'warning';
@@ -7,8 +7,8 @@ import { close } from '@wordpress/icons';
7
7
  /**
8
8
  * Internal dependencies
9
9
  */
10
- import AiStatusIndicator from '../ai-status-indicator/index.js';
11
- import type { RequestingStateProp } from '../../types.js';
10
+ import AiStatusIndicator from '../ai-status-indicator/index.tsx';
11
+ import type { RequestingStateProp } from '../../types.ts';
12
12
  import './style.scss';
13
13
 
14
14
  const ModalHeader = ( {
@@ -1,4 +1,5 @@
1
1
  .ai-assistant-modal {
2
+
2
3
  @media (min-width: 960px) {
3
4
  max-height: 95%;
4
5
  }
@@ -6,6 +7,7 @@
6
7
  &__content {
7
8
  display: flex;
8
9
  flex-direction: column;
10
+
9
11
  @media screen and (min-width: 960px) {
10
12
  width: 100vw;
11
13
  }
@@ -11,9 +11,9 @@ import debugFactory from 'debug';
11
11
  /*
12
12
  * Internal dependencies
13
13
  */
14
- import useAICheckout from '../../hooks/use-ai-checkout/index.js';
15
- import useAiFeature from '../../hooks/use-ai-feature/index.js';
16
- import { LightNudge } from './light-nudge.js';
14
+ import useAICheckout from '../../hooks/use-ai-checkout/index.ts';
15
+ import useAiFeature from '../../hooks/use-ai-feature/index.ts';
16
+ import { LightNudge } from './light-nudge.tsx';
17
17
  import type { ReactElement } from 'react';
18
18
  import './style.scss';
19
19
 
@@ -5,7 +5,9 @@
5
5
  }
6
6
 
7
7
  .jetpack-upgrade-plan-banner.jetpack-ai-upgrade-banner {
8
+
8
9
  .jetpack-upgrade-plan-banner__wrapper {
10
+
9
11
  .components-button.is-primary.is-busy {
10
12
  background: var( --jp-white );
11
13
  color: var( --jp-black );
@@ -18,7 +20,7 @@
18
20
  margin: 0px;
19
21
  text-wrap: pretty;
20
22
  font-size: calc(13px);
21
- font-weight: normal;
23
+ font-weight: 400;
22
24
  color: #757575;
23
25
 
24
26
  a {
@@ -5,10 +5,10 @@ import React, { createContext } from 'react';
5
5
  /**
6
6
  * Types & Constants
7
7
  */
8
- import SuggestionsEventSource from '../suggestions-event-source/index.js';
9
- import type { AskQuestionOptionsArgProps } from '../ask-question/index.js';
10
- import type { RequestingErrorProps } from '../hooks/use-ai-suggestions/index.js';
11
- import type { PromptProp, RequestingStateProp } from '../types.js';
8
+ import SuggestionsEventSource from '../suggestions-event-source/index.ts';
9
+ import type { AskQuestionOptionsArgProps } from '../ask-question/index.ts';
10
+ import type { RequestingErrorProps } from '../hooks/use-ai-suggestions/index.ts';
11
+ import type { PromptProp, RequestingStateProp } from '../types.ts';
12
12
 
13
13
  export type AiDataContextProps = {
14
14
  /*
@@ -1,3 +1,3 @@
1
- export { AiDataContext, AiDataContextProvider } from './context.js';
2
- export { default as withAiDataProvider } from './with-ai-assistant-data.js';
3
- export { default as useAiContext } from './use-ai-context.js';
1
+ export { AiDataContext, AiDataContextProvider } from './context.tsx';
2
+ export { default as withAiDataProvider } from './with-ai-assistant-data.tsx';
3
+ export { default as useAiContext } from './use-ai-context.ts';
@@ -5,13 +5,13 @@ import { useCallback, useContext, useEffect } from 'react';
5
5
  /**
6
6
  * Internal dependencies
7
7
  */
8
- import { ERROR_RESPONSE, RequestingErrorProps } from '../types.js';
9
- import { AiDataContext } from './index.js';
8
+ import { ERROR_RESPONSE, RequestingErrorProps } from '../types.ts';
9
+ import { AiDataContext } from './index.ts';
10
10
  /**
11
11
  * Types & constants
12
12
  */
13
- import type { AiDataContextProps } from './context.js';
14
- import type { AskQuestionOptionsArgProps } from '../ask-question/index.js';
13
+ import type { AiDataContextProps } from './context.tsx';
14
+ import type { AskQuestionOptionsArgProps } from '../ask-question/index.ts';
15
15
 
16
16
  export type UseAiContextOptions = {
17
17
  /*
@@ -7,8 +7,8 @@ import React from 'react';
7
7
  /**
8
8
  * Internal Dependencies
9
9
  */
10
- import useAiSuggestions from '../hooks/use-ai-suggestions/index.js';
11
- import { AiDataContextProvider } from './index.js';
10
+ import useAiSuggestions from '../hooks/use-ai-suggestions/index.ts';
11
+ import { AiDataContextProvider } from './index.ts';
12
12
 
13
13
  /**
14
14
  * High Order Component that provides the
@@ -8,7 +8,7 @@ import {
8
8
  getSiteFragment,
9
9
  useAutosaveAndRedirect,
10
10
  } from '@automattic/jetpack-shared-extension-utils';
11
- import useAiFeature from '../use-ai-feature/index.js';
11
+ import useAiFeature from '../use-ai-feature/index.ts';
12
12
  /*
13
13
  * Types
14
14
  */
@@ -6,8 +6,8 @@ import { __ } from '@wordpress/i18n';
6
6
  /**
7
7
  * Internal dependencies
8
8
  */
9
- import askQuestion from '../../ask-question/index.js';
10
- import ChromeAIFactory from '../../chrome-ai/factory.js';
9
+ import askQuestion from '../../ask-question/index.ts';
10
+ import ChromeAIFactory from '../../chrome-ai/factory.ts';
11
11
  import {
12
12
  ERROR_CONTEXT_TOO_LARGE,
13
13
  ERROR_MODERATION,
@@ -16,13 +16,13 @@ import {
16
16
  ERROR_SERVICE_UNAVAILABLE,
17
17
  ERROR_UNCLEAR_PROMPT,
18
18
  ERROR_RESPONSE,
19
- } from '../../types.js';
19
+ } from '../../types.ts';
20
20
  /**
21
21
  * Types & constants
22
22
  */
23
- import type { AskQuestionOptionsArgProps } from '../../ask-question/index.js';
24
- import type SuggestionsEventSource from '../../suggestions-event-source/index.js';
25
- import type { PromptProp, SuggestionErrorCode, RequestingStateProp } from '../../types.js';
23
+ import type { AskQuestionOptionsArgProps } from '../../ask-question/index.ts';
24
+ import type SuggestionsEventSource from '../../suggestions-event-source/index.ts';
25
+ import type { PromptProp, SuggestionErrorCode, RequestingStateProp } from '../../types.ts';
26
26
 
27
27
  export type RequestingErrorProps = {
28
28
  /*
@@ -7,7 +7,7 @@ import debugFactory from 'debug';
7
7
  /**
8
8
  * Internal dependencies
9
9
  */
10
- import transcribeAudio from '../../audio-transcription/index.js';
10
+ import transcribeAudio from '../../audio-transcription/index.ts';
11
11
 
12
12
  const debug = debugFactory( 'jetpack-ai-client:use-audio-transcription' );
13
13
 
@@ -5,8 +5,8 @@ import debugFactory from 'debug';
5
5
  /**
6
6
  * Internal dependencies
7
7
  */
8
- import askQuestionSync from '../../ask-question/sync.js';
9
- import requestJwt from '../../jwt/index.js';
8
+ import askQuestionSync from '../../ask-question/sync.ts';
9
+ import requestJwt from '../../jwt/index.ts';
10
10
 
11
11
  const debug = debugFactory( 'ai-client:use-image-generator' );
12
12
 
@@ -263,4 +263,4 @@ const useImageGenerator = () => {
263
263
  };
264
264
 
265
265
  export default useImageGenerator;
266
- export * from './constants.js';
266
+ export * from './constants.ts';
@@ -8,7 +8,7 @@ import { useCallback } from '@wordpress/element';
8
8
  /**
9
9
  * Internal dependencies
10
10
  */
11
- import { renderMarkdownFromHTML } from '../libs/markdown/index.js';
11
+ import { renderMarkdownFromHTML } from '../libs/markdown/index.ts';
12
12
  /**
13
13
  * Types
14
14
  */
@@ -8,7 +8,7 @@ import debugFactory from 'debug';
8
8
  /**
9
9
  * Types
10
10
  */
11
- import type { BlockEditorStore } from '../../types.js';
11
+ import type { BlockEditorStore } from '../../types.ts';
12
12
 
13
13
  const debug = debugFactory( 'ai-client:save-to-media-library' );
14
14
 
@@ -8,7 +8,7 @@ import debugFactory from 'debug';
8
8
  /**
9
9
  * Types
10
10
  */
11
- import type { BlockEditorStore } from '../types.js';
11
+ import type { BlockEditorStore } from '../types.ts';
12
12
 
13
13
  const debug = debugFactory( 'jetpack-ai-client:save-to-media-library' );
14
14
 
@@ -6,8 +6,8 @@ import debugFactory from 'debug';
6
6
  /**
7
7
  * Internal dependencies
8
8
  */
9
- import useAiSuggestions, { RequestingErrorProps } from '../use-ai-suggestions/index.js';
10
- import type { PromptProp } from '../../types.js';
9
+ import useAiSuggestions, { RequestingErrorProps } from '../use-ai-suggestions/index.ts';
10
+ import type { PromptProp } from '../../types.ts';
11
11
 
12
12
  const debug = debugFactory( 'jetpack-ai-client:use-transcription-post-processing' );
13
13