@box/box-ai-content-answers 0.154.4 → 0.156.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (50) hide show
  1. package/dist/esm/lib/components/answer/constants.js +3 -3
  2. package/dist/esm/lib/components/answer/feedback-tooltip.js +87 -84
  3. package/dist/esm/lib/components/answer/messages.js +1 -1
  4. package/dist/esm/lib/components/api-wrapper/hooks/useContentAnswers.js +113 -109
  5. package/dist/esm/lib/components/api-wrapper/records.js +10 -8
  6. package/dist/esm/lib/components/api-wrapper/utils/stream.js +27 -27
  7. package/dist/esm/lib/components/chat/chat.js +90 -84
  8. package/dist/esm/lib/components/thinkingBubble/boxAILoadingIndicator.js +235 -0
  9. package/dist/esm/lib/components/thinkingBubble/messages.js +26 -0
  10. package/dist/esm/lib/components/thinkingBubble/thinkingBubble.js +122 -0
  11. package/dist/i18n/bn-IN.js +5 -0
  12. package/dist/i18n/da-DK.js +5 -0
  13. package/dist/i18n/de-DE.js +5 -0
  14. package/dist/i18n/en-AU.js +5 -0
  15. package/dist/i18n/en-CA.js +5 -0
  16. package/dist/i18n/en-GB.js +5 -0
  17. package/dist/i18n/en-US.js +6 -1
  18. package/dist/i18n/en-US.properties +12 -2
  19. package/dist/i18n/en-x-pseudo.js +5 -0
  20. package/dist/i18n/es-419.js +5 -0
  21. package/dist/i18n/es-ES.js +5 -0
  22. package/dist/i18n/fi-FI.js +5 -0
  23. package/dist/i18n/fr-CA.js +5 -0
  24. package/dist/i18n/fr-FR.js +5 -0
  25. package/dist/i18n/hi-IN.js +5 -0
  26. package/dist/i18n/it-IT.js +5 -0
  27. package/dist/i18n/ja-JP.js +5 -0
  28. package/dist/i18n/json/src/lib/components/answer/messages.json +1 -1
  29. package/dist/i18n/json/src/lib/components/thinkingBubble/messages.json +1 -0
  30. package/dist/i18n/ko-KR.js +5 -0
  31. package/dist/i18n/nb-NO.js +5 -0
  32. package/dist/i18n/nl-NL.js +5 -0
  33. package/dist/i18n/pl-PL.js +5 -0
  34. package/dist/i18n/pt-BR.js +5 -0
  35. package/dist/i18n/ru-RU.js +5 -0
  36. package/dist/i18n/sv-SE.js +5 -0
  37. package/dist/i18n/tr-TR.js +5 -0
  38. package/dist/i18n/zh-CN.js +5 -0
  39. package/dist/i18n/zh-TW.js +5 -0
  40. package/dist/styles/boxAILoadingIndicator.css +1 -0
  41. package/dist/styles/feedback-tooltip.css +1 -1
  42. package/dist/styles/thinkingBubble.css +1 -0
  43. package/dist/types/lib/components/answer/constants.d.ts +1 -1
  44. package/dist/types/lib/components/api-wrapper/records.d.ts +1 -0
  45. package/dist/types/lib/components/api-wrapper/types.d.ts +1 -0
  46. package/dist/types/lib/components/thinkingBubble/boxAILoadingIndicator.d.ts +3 -0
  47. package/dist/types/lib/components/thinkingBubble/messages.d.ts +28 -0
  48. package/dist/types/lib/components/thinkingBubble/thinkingBubble.d.ts +26 -0
  49. package/dist/types/lib/types.d.ts +1 -0
  50. package/package.json +1 -1
@@ -28,6 +28,7 @@ export type StreamResponseProps = {
28
28
  answer?: string;
29
29
  citations?: Array<CitationResponse> | null;
30
30
  code?: string;
31
+ thinkingAnswer?: string;
31
32
  completionReason: string | null;
32
33
  contextSession?: string | null;
33
34
  encodedSession?: string | null;
@@ -0,0 +1,3 @@
1
+ declare const BoxAILoadingIndicator: () => import("react/jsx-runtime").JSX.Element;
2
+ export { BoxAILoadingIndicator };
3
+ export default BoxAILoadingIndicator;
@@ -0,0 +1,28 @@
1
+ declare const messages: {
2
+ thinkingInProgress: {
3
+ defaultMessage: string;
4
+ description: string;
5
+ id: string;
6
+ };
7
+ thinkingCompleted: {
8
+ defaultMessage: string;
9
+ description: string;
10
+ id: string;
11
+ };
12
+ thinkingContentScrollableArea: {
13
+ defaultMessage: string;
14
+ description: string;
15
+ id: string;
16
+ };
17
+ expandThinkingContent: {
18
+ defaultMessage: string;
19
+ description: string;
20
+ id: string;
21
+ };
22
+ collapseThinkingContent: {
23
+ defaultMessage: string;
24
+ description: string;
25
+ id: string;
26
+ };
27
+ };
28
+ export default messages;
@@ -0,0 +1,26 @@
1
+ import { StyleVariant } from '../../types';
2
+ import * as React from 'react';
3
+ export interface ThinkingBubbleProps extends React.HTMLAttributes<HTMLDivElement> {
4
+ content: string;
5
+ isThinkingComplete?: boolean;
6
+ variant?: StyleVariant;
7
+ }
8
+ /**
9
+ * ThinkingBubble Component
10
+ *
11
+ * A dynamic UI component that displays AI thinking processes with smooth animations and intelligent scroll behavior.
12
+ *
13
+ * Component States (in order of appearance):
14
+ * 1. Logo State: Circular loading indicator
15
+ * 2. Header Expanded: Full-width pill with title and chevron
16
+ * 3. Content Open: Header + scrollable content area (collapsed height)
17
+ * 4. Content Expanded: Full expanded view with maximum height
18
+ * 5. Pill State: Compact pill when thinking is complete
19
+ *
20
+ * Key Features:
21
+ * - Smooth animation sequence when content first appears
22
+ * - Auto-scroll to bottom with user scroll detection
23
+ * - Responsive sizing for modal vs sidebar variants
24
+ */
25
+ export declare const ThinkingBubble: React.FC<ThinkingBubbleProps>;
26
+ export default ThinkingBubble;
@@ -208,6 +208,7 @@ export type QuestionType = {
208
208
  error?: ANSWER_ERROR;
209
209
  id?: string;
210
210
  isCompleted?: boolean;
211
+ thinkingAnswer?: string;
211
212
  isLoading?: boolean;
212
213
  prompt: string;
213
214
  citations?: CitationType[];
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@box/box-ai-content-answers",
3
- "version": "0.154.4",
3
+ "version": "0.156.0",
4
4
  "peerDependencies": {
5
5
  "@box/blueprint-web": "^7.8.0",
6
6
  "@box/blueprint-web-assets": "^4.56.1",