@box/box-ai-content-answers 1.5.3 → 1.6.1

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.
@@ -1,6 +1,6 @@
1
1
  import { Text as $ } from "@box/blueprint-web";
2
2
  import { BoxAiLogo as w } from "@box/blueprint-web-assets/icons/Logo";
3
- import { Size10 as f } from "@box/blueprint-web-assets/tokens/tokens";
3
+ import { Size10 as b } from "@box/blueprint-web-assets/tokens/tokens";
4
4
  import L from "clsx";
5
5
  import * as P from "react";
6
6
  import { useIntl as S } from "react-intl";
@@ -8,34 +8,34 @@ import { Answer as ee } from "../answer/answer.js";
8
8
  import { MediaContainer as te } from "../common/media-container.js";
9
9
  import { Question as oe } from "../question/question.js";
10
10
  import { SuggestedQuestions as ae } from "../suggested-questions/suggested-questions.js";
11
- import { ThinkingBubble as ie } from "../thinkingBubble/thinkingBubble.js";
12
- import re from "../welcome-message/messages.js";
13
- import { WelcomeMessage as se } from "../welcome-message/welcome-message.js";
14
- import { jsx as e, jsxs as _ } from "react/jsx-runtime";
15
- import '../../../../styles/chat.css';const ne = "_chat_77vqr_1", ce = "_clearChatText_77vqr_1", le = "_landingPage_77vqr_7", me = "_askQuestionText_77vqr_15", pe = "_iconAvatar_77vqr_23", de = "_sidebar_77vqr_39", a = {
11
+ import { ThinkingBubble as se } from "../thinkingBubble/thinkingBubble.js";
12
+ import ie from "../welcome-message/messages.js";
13
+ import { WelcomeMessage as re } from "../welcome-message/welcome-message.js";
14
+ import { jsx as e, jsxs as f } from "react/jsx-runtime";
15
+ import '../../../../styles/chat.css';const ne = "_chat_azszb_1", ce = "_clearChatText_azszb_1", le = "_landingPage_azszb_7", me = "_askQuestionText_azszb_15", pe = "_iconAvatar_azszb_23", de = "_sidebar_azszb_39", a = {
16
16
  chat: ne,
17
17
  clearChatText: ce,
18
18
  landingPage: le,
19
19
  askQuestionText: me,
20
20
  iconAvatar: pe,
21
21
  sidebar: de
22
- }, Ae = ({
23
- askSuggestedQuestion: h,
22
+ }, Ie = ({
23
+ askSuggestedQuestion: _,
24
24
  contentType: n,
25
- hasCustomSuggestedQuestions: T,
26
- hasRequestInProgress: x,
27
- isCitationsEnabled: b,
28
- isFeedbackEnabled: C,
29
- isFeedbackFormEnabled: v,
25
+ hasCustomSuggestedQuestions: h,
26
+ hasRequestInProgress: T,
27
+ isCitationsEnabled: x,
28
+ isFeedbackEnabled: z,
29
+ isFeedbackFormEnabled: C,
30
30
  isInlineCitationsEnabled: g = !1,
31
31
  isMarkdownEnabled: k,
32
32
  isSessionLoading: u = !1,
33
- onCitationClick: q,
34
- onAnswerCopy: F,
35
- embedTheAnswerButtonConfig: A,
36
- onFeedbackFormSubmit: I,
37
- onDropdownOpenChange: N,
38
- onSuggestedQuestionInteraction: O,
33
+ onCitationClick: F,
34
+ onAnswerCopy: A,
35
+ embedTheAnswerButtonConfig: I,
36
+ onFeedbackFormSubmit: N,
37
+ onDropdownOpenChange: O,
38
+ onSuggestedQuestionInteraction: v,
39
39
  questions: Q,
40
40
  recordAction: c,
41
41
  setAnswerFeedback: j,
@@ -45,7 +45,7 @@ import '../../../../styles/chat.css';const ne = "_chat_77vqr_1", ce = "_clearCha
45
45
  shouldFeedbackFormIncludeFeedbackText: B,
46
46
  shouldFeedbackIncludePromptData: M,
47
47
  shouldShowLandingPage: o,
48
- useAnimation: z,
48
+ useAnimation: q,
49
49
  variant: t = "modal",
50
50
  hostAppName: R = "",
51
51
  isReactMarkdownEnabled: W,
@@ -54,13 +54,13 @@ import '../../../../styles/chat.css';const ne = "_chat_77vqr_1", ce = "_clearCha
54
54
  }) => {
55
55
  const {
56
56
  formatMessage: E
57
- } = S(), [G, H] = P.useState(null), J = (i, r) => {
58
- H(i ? r : null);
57
+ } = S(), [G, H] = P.useState(null), J = (s, i) => {
58
+ H(s ? i : null);
59
59
  };
60
60
  return /* @__PURE__ */ e("div", {
61
61
  className: a.chat,
62
62
  "data-testid": "content-answers-chat",
63
- children: /* @__PURE__ */ _("div", {
63
+ children: /* @__PURE__ */ f("div", {
64
64
  className: L({
65
65
  [a.landingPage]: o,
66
66
  [a.sidebar]: t === "sidebar"
@@ -70,21 +70,21 @@ import '../../../../styles/chat.css';const ne = "_chat_77vqr_1", ce = "_clearCha
70
70
  children: /* @__PURE__ */ e("div", {
71
71
  className: a.iconAvatar,
72
72
  children: /* @__PURE__ */ e(w, {
73
- height: f,
73
+ height: b,
74
74
  role: "presentation",
75
- width: f
75
+ width: b
76
76
  })
77
77
  })
78
- }), /* @__PURE__ */ e(se, {
78
+ }), /* @__PURE__ */ e(re, {
79
79
  contentType: "",
80
80
  shouldShowLandingPage: o,
81
81
  ...p,
82
82
  variant: t
83
83
  }), o && m !== void 0 && l !== void 0 && /* @__PURE__ */ e(ae, {
84
- askSuggestedQuestion: h,
85
- hasCustomSuggestedQuestions: T,
86
- isLoading: x,
87
- onSuggestedQuestionInteraction: O,
84
+ askSuggestedQuestion: _,
85
+ hasCustomSuggestedQuestions: h,
86
+ isLoading: T,
87
+ onSuggestedQuestionInteraction: v,
88
88
  recordAction: c,
89
89
  setAskSuggestedQuestion: l,
90
90
  suggestedQuestions: m,
@@ -93,68 +93,68 @@ import '../../../../styles/chat.css';const ne = "_chat_77vqr_1", ce = "_clearCha
93
93
  }), /* @__PURE__ */ e($, {
94
94
  as: "p",
95
95
  className: a.clearChatText,
96
- children: D || E(re.welcomeClearChatText, {
96
+ children: D || E(ie.welcomeClearChatText, {
97
97
  type: n
98
98
  })
99
99
  }), !o && /* @__PURE__ */ e("ul", {
100
100
  children: Q.map(({
101
- answer: i,
102
- thinkingAnswer: r,
101
+ answer: s,
102
+ thinkingAnswer: i,
103
103
  citations: K,
104
- id: s,
104
+ id: r,
105
105
  isCompleted: U,
106
106
  isLoading: V,
107
107
  error: X,
108
108
  prompt: d,
109
109
  promptType: Y,
110
110
  feedbackValue: Z
111
- }) => /* @__PURE__ */ _("li", {
111
+ }) => /* @__PURE__ */ f("li", {
112
112
  children: [/* @__PURE__ */ e(oe, {
113
113
  prompt: d,
114
114
  variant: t
115
- }), r && /* @__PURE__ */ e(ie, {
116
- content: r,
117
- isThinkingComplete: !!i,
118
- onDropdownOpenChange: N,
115
+ }), i && /* @__PURE__ */ e(se, {
116
+ content: i,
117
+ isThinkingComplete: !!s,
118
+ onDropdownOpenChange: O,
119
119
  variant: t
120
120
  }), /* @__PURE__ */ e(ee, {
121
- answer: i,
121
+ answer: s,
122
122
  citations: K,
123
123
  contentType: n,
124
- embedTheAnswerButtonConfig: A,
124
+ embedTheAnswerButtonConfig: I,
125
125
  error: X,
126
126
  feedbackValue: Z,
127
127
  hostAppName: R,
128
- isCitationsEnabled: b,
128
+ isCitationsEnabled: x,
129
129
  isCompleted: U,
130
- isFeedbackEnabled: C,
131
- isFeedbackFormEnabled: v,
132
- isFeedbackTooltipOpen: G === s,
130
+ isFeedbackEnabled: z,
131
+ isFeedbackFormEnabled: C,
132
+ isFeedbackTooltipOpen: G === r,
133
133
  isInlineCitationsEnabled: g,
134
134
  isLoading: V || u,
135
135
  isMarkdownEnabled: k,
136
136
  isReactMarkdownEnabled: W,
137
137
  items: p.items,
138
- onAnswerCopy: F,
139
- onCitationClick: q,
140
- onFeedbackFormSubmit: I,
138
+ onAnswerCopy: A,
139
+ onCitationClick: F,
140
+ onFeedbackFormSubmit: N,
141
141
  onFeedbackTooltipOpenChange: J,
142
142
  prompt: d,
143
143
  promptType: Y,
144
- questionId: s,
144
+ questionId: r,
145
145
  recordAction: c,
146
146
  setAnswerFeedback: j,
147
147
  shouldFeedbackFormIncludeFeedbackText: B,
148
148
  shouldFeedbackIncludePromptData: M,
149
- useAnimation: z,
149
+ useAnimation: q,
150
150
  variant: t
151
151
  })]
152
- }, s))
152
+ }, r))
153
153
  })]
154
154
  })
155
155
  });
156
156
  };
157
157
  export {
158
- Ae as Chat,
159
- Ae as default
158
+ Ie as Chat,
159
+ Ie as default
160
160
  };
@@ -1,12 +1,12 @@
1
1
  import { Text as r } from "@box/blueprint-web";
2
- import d from "clsx";
2
+ import c from "clsx";
3
3
  import { MediaContainer as i } from "../common/media-container.js";
4
4
  import { jsx as t } from "react/jsx-runtime";
5
- import '../../../../styles/question.css';const c = "_question_1qk3n_1", m = "_sidebar_1qk3n_6", l = "_text_1qk3n_9", e = {
6
- question: c,
5
+ import '../../../../styles/question.css';const d = "_question_hbq6c_1", m = "_sidebar_hbq6c_6", l = "_text_hbq6c_9", e = {
6
+ question: d,
7
7
  sidebar: m,
8
8
  text: l
9
- }, b = ({
9
+ }, h = ({
10
10
  prompt: o,
11
11
  variant: s = "modal"
12
12
  }) => {
@@ -20,7 +20,7 @@ import '../../../../styles/question.css';const c = "_question_1qk3n_1", m = "_si
20
20
  })
21
21
  });
22
22
  return /* @__PURE__ */ t("div", {
23
- className: d(e.question, n && e.sidebar),
23
+ className: c(e.question, n && e.sidebar),
24
24
  "data-testid": "content-answers-question",
25
25
  children: /* @__PURE__ */ t(i, {
26
26
  className: "question",
@@ -30,6 +30,6 @@ import '../../../../styles/question.css';const c = "_question_1qk3n_1", m = "_si
30
30
  });
31
31
  };
32
32
  export {
33
- b as Question,
34
- b as default
33
+ h as Question,
34
+ h as default
35
35
  };
@@ -1 +1 @@
1
- ._chat_77vqr_1 ._clearChatText_77vqr_1{margin:0 1rem;color:#6f6f6f;font-size:.75rem;line-height:.875rem}._chat_77vqr_1 ._landingPage_77vqr_7{display:flex;flex-direction:column;gap:2rem;align-items:center;justify-content:center;padding-top:2rem}._chat_77vqr_1 ._landingPage_77vqr_7 ._askQuestionText_77vqr_15{font-size:1.3125rem}._chat_77vqr_1 ._landingPage_77vqr_7 ._clearChatText_77vqr_1{margin:0;font-size:.9375rem;line-height:1.25rem}._chat_77vqr_1 ._landingPage_77vqr_7 ._iconAvatar_77vqr_23{display:flex;align-items:center;justify-content:center;width:var(--size-16);height:var(--size-16);background-color:#faf5fe;border-radius:50%;margin-top:2.625rem}@media (max-width: 374px){._chat_77vqr_1 ._landingPage_77vqr_7 ._iconAvatar_77vqr_23{width:var(--size-6);height:var(--size-6)}}._chat_77vqr_1 ._landingPage_77vqr_7._sidebar_77vqr_39 ._clearChatText_77vqr_1{font-size:.75rem;line-height:.875rem}._chat_77vqr_1 ._landingPage_77vqr_7._sidebar_77vqr_39 ._iconAvatar_77vqr_23{width:var(--size-12);height:var(--size-12);margin-top:.75rem}._chat_77vqr_1 ._landingPage_77vqr_7._sidebar_77vqr_39 ._iconAvatar_77vqr_23 svg{width:1.875rem;height:1.875rem}._chat_77vqr_1 ul{margin:0;padding:0;list-style:none}._chat_77vqr_1 ul li:last-of-type .footer-buttons-container>div{opacity:1}
1
+ ._chat_azszb_1 ._clearChatText_azszb_1._clearChatText_azszb_1{margin:0 1rem;color:#6f6f6f;font-size:.75rem;line-height:.875rem}._chat_azszb_1 ._landingPage_azszb_7{display:flex;flex-direction:column;gap:2rem;align-items:center;justify-content:center;padding-top:2rem}._chat_azszb_1 ._landingPage_azszb_7 ._askQuestionText_azszb_15{font-size:1.3125rem}._chat_azszb_1 ._landingPage_azszb_7 ._clearChatText_azszb_1{margin:0;font-size:.9375rem;line-height:1.25rem}._chat_azszb_1 ._landingPage_azszb_7 ._iconAvatar_azszb_23{display:flex;align-items:center;justify-content:center;width:var(--size-16);height:var(--size-16);background-color:#faf5fe;border-radius:50%;margin-top:2.625rem}@media (max-width: 374px){._chat_azszb_1 ._landingPage_azszb_7 ._iconAvatar_azszb_23{width:var(--size-6);height:var(--size-6)}}._chat_azszb_1 ._landingPage_azszb_7._sidebar_azszb_39 ._clearChatText_azszb_1{font-size:.75rem;line-height:.875rem}._chat_azszb_1 ._landingPage_azszb_7._sidebar_azszb_39 ._iconAvatar_azszb_23{width:var(--size-12);height:var(--size-12);margin-top:.75rem}._chat_azszb_1 ._landingPage_azszb_7._sidebar_azszb_39 ._iconAvatar_azszb_23 svg{width:1.875rem;height:1.875rem}._chat_azszb_1 ul{margin:0;padding:0;list-style:none}._chat_azszb_1 ul li:last-of-type .footer-buttons-container>div{opacity:1}
@@ -1 +1 @@
1
- ._question_1qk3n_1{margin-top:1rem;margin-left:8rem;white-space:pre-wrap}._question_1qk3n_1._sidebar_1qk3n_6{margin-left:4.5rem}._question_1qk3n_1 ._text_1qk3n_9{font-size:.9375rem;line-height:1.5rem}@media (max-width: 767px){._question_1qk3n_1{margin-left:4.5rem}}
1
+ ._question_hbq6c_1{margin-top:1rem;margin-left:8rem;white-space:pre-wrap}._question_hbq6c_1._sidebar_hbq6c_6{margin-left:4.5rem}._question_hbq6c_1 ._text_hbq6c_9._text_hbq6c_9{font-size:.9375rem;line-height:1.5rem}@media (max-width: 767px){._question_hbq6c_1{margin-left:4.5rem}}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@box/box-ai-content-answers",
3
- "version": "1.5.3",
3
+ "version": "1.6.1",
4
4
  "peerDependencies": {
5
5
  "@box/blueprint-web": "^7.8.0",
6
6
  "@box/blueprint-web-assets": "^4.56.1",
@@ -17,11 +17,11 @@
17
17
  },
18
18
  "devDependencies": {
19
19
  "@box/babel-plugin-target-attributes": "1.3.0",
20
- "@box/blueprint-web": "^12.88.1",
21
- "@box/blueprint-web-assets": "^4.74.0",
22
- "@box/box-ai-agent-selector": "^1.3.3",
23
- "@box/item-icon": "^1.3.3",
24
- "@box/storybook-utils": "^0.14.10",
20
+ "@box/blueprint-web": "^12.89.1",
21
+ "@box/blueprint-web-assets": "^4.75.0",
22
+ "@box/box-ai-agent-selector": "^1.3.5",
23
+ "@box/item-icon": "^1.3.5",
24
+ "@box/storybook-utils": "^0.14.11",
25
25
  "@testing-library/react": "^15.0.6",
26
26
  "react": "^18.3.0",
27
27
  "react-dom": "^18.3.0",