@box/box-ai-content-answers 0.156.2 → 0.157.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.
@@ -1,71 +1,72 @@
1
1
  import { Text as K } from "@box/blueprint-web";
2
2
  import { AlertTriangle as Q } from "@box/blueprint-web-assets/icons/Line";
3
- import { Gray65 as X, Size4 as I } from "@box/blueprint-web-assets/tokens/tokens";
4
- import S from "clsx";
5
- import { memo as Y, useState as Z, useEffect as g, useMemo as $ } from "react";
6
- import { useIntl as tt } from "react-intl";
3
+ import { Gray65 as X, Size4 as N } from "@box/blueprint-web-assets/tokens/tokens";
4
+ import g from "clsx";
5
+ import { memo as Y, useState as Z, useEffect as I, useMemo as $ } from "react";
6
+ import { useIntl as oo } from "react-intl";
7
7
  import { A as r } from "../../../../chunks/types.js";
8
- import { injectInlineCitation as ot } from "../../utils/inlineCitationsUtils.js";
9
- import { MediaContainer as R } from "../common/media-container.js";
10
- import { AnswerContent as et } from "./answer-content.js";
11
- import { CopyButton as nt } from "./copy-button.js";
12
- import { InlineError as rt } from "./inline-error.js";
13
- import { LoadingIndicator as st } from "./loading-indicator.js";
14
- import f from "./messages.js";
15
- import { References as at } from "./references.js";
16
- import { ThumbButtons as it } from "./thumb-buttons.js";
17
- import { jsxs as l, jsx as n } from "react/jsx-runtime";
18
- import '../../../../styles/answer.css';const ct = "_answer_140hd_1", lt = "_alertIcon_140hd_5", dt = "_error_140hd_8", ut = "_footer_140hd_12", ft = "_copyButtonContainer_140hd_18", mt = "_feedbackButtonsContainer_140hd_19", _t = "_shouldHaveMarginTop_140hd_23", ht = "_shouldUseAnimation_140hd_26", Et = "_shouldAnimateHeight_140hd_30", pt = "_footerButtons_140hd_34", Nt = "_iconAvatar_140hd_40", It = "_buttonsVisible_140hd_56", o = {
19
- answer: ct,
20
- alertIcon: lt,
21
- error: dt,
22
- footer: ut,
23
- copyButtonContainer: ft,
24
- feedbackButtonsContainer: mt,
25
- shouldHaveMarginTop: _t,
26
- shouldUseAnimation: ht,
27
- shouldAnimateHeight: Et,
28
- footerButtons: pt,
29
- iconAvatar: Nt,
30
- buttonsVisible: It
31
- }, St = /* @__PURE__ */ new Set([r.RATE_LIMITING, r.NO_CONTENT, r.PRECONDITION_FAILED, r.GENERAL, r.AGENT_NOT_FOUND]), xt = /* @__PURE__ */ Y(({
8
+ import { injectInlineCitation as to } from "../../utils/inlineCitationsUtils.js";
9
+ import { MediaContainer as S } from "../common/media-container.js";
10
+ import { BoxAILoadingIndicator as no } from "../thinkingBubble/boxAILoadingIndicator.js";
11
+ import { AnswerContent as eo } from "./answer-content.js";
12
+ import { CopyButton as ro } from "./copy-button.js";
13
+ import { InlineError as so } from "./inline-error.js";
14
+ import _ from "./messages.js";
15
+ import { References as ao } from "./references.js";
16
+ import { ThumbButtons as io } from "./thumb-buttons.js";
17
+ import { jsxs as c, jsx as e } from "react/jsx-runtime";
18
+ import '../../../../styles/answer.css';const lo = "_answer_dkxyx_1", co = "_loadingContainer_dkxyx_5", uo = "_alertIcon_dkxyx_11", _o = "_error_dkxyx_14", fo = "_footer_dkxyx_18", mo = "_copyButtonContainer_dkxyx_24", ho = "_feedbackButtonsContainer_dkxyx_25", xo = "_shouldHaveMarginTop_dkxyx_29", Eo = "_shouldUseAnimation_dkxyx_32", po = "_shouldAnimateHeight_dkxyx_36", No = "_footerButtons_dkxyx_40", go = "_iconAvatar_dkxyx_46", Io = "_buttonsVisible_dkxyx_62", o = {
19
+ answer: lo,
20
+ loadingContainer: co,
21
+ alertIcon: uo,
22
+ error: _o,
23
+ footer: fo,
24
+ copyButtonContainer: mo,
25
+ feedbackButtonsContainer: ho,
26
+ shouldHaveMarginTop: xo,
27
+ shouldUseAnimation: Eo,
28
+ shouldAnimateHeight: po,
29
+ footerButtons: No,
30
+ iconAvatar: go,
31
+ buttonsVisible: Io
32
+ }, So = /* @__PURE__ */ new Set([r.RATE_LIMITING, r.NO_CONTENT, r.PRECONDITION_FAILED, r.GENERAL, r.AGENT_NOT_FOUND]), Go = /* @__PURE__ */ Y(({
32
33
  answer: t,
33
- citations: T,
34
- error: e,
35
- contentType: A,
34
+ citations: y,
35
+ error: n,
36
+ contentType: R,
36
37
  hostAppName: d,
37
- feedbackValue: O,
38
- isCitationsEnabled: b = !1,
38
+ feedbackValue: T,
39
+ isCitationsEnabled: k = !1,
39
40
  isCompleted: s = !1,
40
- isFeedbackEnabled: B = !1,
41
- isFeedbackFormEnabled: P,
42
- isFeedbackTooltipOpen: m,
43
- isInlineCitationsEnabled: _ = !1,
44
- isLoading: w = !1,
45
- isMarkdownEnabled: C = !1,
41
+ isFeedbackEnabled: A = !1,
42
+ isFeedbackFormEnabled: O,
43
+ isFeedbackTooltipOpen: f,
44
+ isInlineCitationsEnabled: m = !1,
45
+ isLoading: B = !1,
46
+ isMarkdownEnabled: b = !1,
46
47
  items: a = [],
47
- onAnswerCopy: M,
48
- onCitationClick: v,
49
- onFeedbackFormSubmit: y,
50
- onFeedbackTooltipOpenChange: D,
51
- prompt: F,
52
- promptType: H,
48
+ onAnswerCopy: C,
49
+ onCitationClick: P,
50
+ onFeedbackFormSubmit: w,
51
+ onFeedbackTooltipOpenChange: M,
52
+ prompt: v,
53
+ promptType: D,
53
54
  recordAction: i,
54
- shouldFeedbackFormIncludeFeedbackText: L,
55
- shouldFeedbackIncludePromptData: U,
56
- useAnimation: x = !0,
57
- variant: c = "modal",
58
- isReactMarkdownEnabled: k,
55
+ shouldFeedbackFormIncludeFeedbackText: F,
56
+ shouldFeedbackIncludePromptData: H,
57
+ useAnimation: L = !0,
58
+ variant: l = "modal",
59
+ isReactMarkdownEnabled: U,
59
60
  setAnswerFeedback: G,
60
61
  questionId: V
61
62
  }) => {
62
- const h = St.has(e), E = w && !t && !e, [j, z] = Z(s), {
63
+ const h = So.has(n), x = B && !t && !n, [j, z] = Z(s), {
63
64
  formatMessage: u
64
- } = tt();
65
- g(() => {
65
+ } = oo();
66
+ I(() => {
66
67
  t && i && s && a.some((J) => t.includes(J.name)) && i({
67
68
  action: "programmatic",
68
- component: c,
69
+ component: l,
69
70
  feature: "answers",
70
71
  target: "links_detected",
71
72
  data: {
@@ -74,98 +75,100 @@ import '../../../../styles/answer.css';const ct = "_answer_140hd_1", lt = "_aler
74
75
  fileNameCount: a.length
75
76
  }
76
77
  });
77
- }, [t, c, d, s, i, a]), g(() => {
78
+ }, [t, l, d, s, i, a]), I(() => {
78
79
  setTimeout(() => z(s), 0);
79
80
  }, [s]);
80
- const p = () => /* @__PURE__ */ n(Q, {
81
+ const E = () => /* @__PURE__ */ e(Q, {
81
82
  className: o.alertIcon,
82
83
  color: X,
83
84
  "data-testid": "content-answers-error-alert-icon",
84
- height: I,
85
+ height: N,
85
86
  role: "presentation",
86
- width: I
87
- }), W = () => /* @__PURE__ */ l(K, {
87
+ width: N
88
+ }), W = () => /* @__PURE__ */ c(K, {
88
89
  as: "p",
89
90
  className: o.error,
90
91
  color: "textOnLightSecondary",
91
92
  "data-testid": "content-answers-error",
92
93
  variant: "caption",
93
- children: [e === r.RESPONSE_INTERRUPTED && u(f.responseInterruptedError), e === r.RESPONSE_FAILED && u(f.responseFailedError), e === r.RESPONSE_STOPPED && u(f.responseStoppedError), e !== r.RESPONSE_STOPPED && p()]
94
- }), q = () => e !== r.RESPONSE_STOPPED ? /* @__PURE__ */ l("div", {
95
- className: S(o.footerButtons, "footer-buttons-container", {
96
- [o.buttonsVisible]: m
94
+ children: [n === r.RESPONSE_INTERRUPTED && u(_.responseInterruptedError), n === r.RESPONSE_FAILED && u(_.responseFailedError), n === r.RESPONSE_STOPPED && u(_.responseStoppedError), n !== r.RESPONSE_STOPPED && E()]
95
+ }), q = () => n !== r.RESPONSE_STOPPED ? /* @__PURE__ */ c("div", {
96
+ className: g(o.footerButtons, "footer-buttons-container", {
97
+ [o.buttonsVisible]: f
97
98
  }),
98
- children: [B ? /* @__PURE__ */ n("div", {
99
+ children: [A ? /* @__PURE__ */ e("div", {
99
100
  className: o.feedbackButtonsContainer,
100
- children: /* @__PURE__ */ n(it, {
101
- feedbackValue: O,
101
+ children: /* @__PURE__ */ e(io, {
102
+ feedbackValue: T,
102
103
  hostAppName: d,
103
- isFeedbackFormEnabled: P,
104
- isFeedbackTooltipOpen: m,
104
+ isFeedbackFormEnabled: O,
105
+ isFeedbackTooltipOpen: f,
105
106
  items: a,
106
- onFeedbackFormSubmit: y,
107
- onFeedbackTooltipOpenChange: D,
108
- prompt: F,
109
- promptType: H,
107
+ onFeedbackFormSubmit: w,
108
+ onFeedbackTooltipOpenChange: M,
109
+ prompt: v,
110
+ promptType: D,
110
111
  questionId: V,
111
112
  recordAction: i,
112
- response: N,
113
+ response: p,
113
114
  setAnswerFeedback: G,
114
- shouldFeedbackFormIncludeFeedbackText: L,
115
- shouldFeedbackIncludePromptData: U,
116
- variant: c
115
+ shouldFeedbackFormIncludeFeedbackText: F,
116
+ shouldFeedbackIncludePromptData: H,
117
+ variant: l
117
118
  })
118
- }) : null, /* @__PURE__ */ n("div", {
119
+ }) : null, /* @__PURE__ */ e("div", {
119
120
  className: o.copyButtonContainer,
120
- children: /* @__PURE__ */ n(nt, {
121
+ children: /* @__PURE__ */ e(ro, {
121
122
  answer: t,
122
- onAnswerCopy: M,
123
+ onAnswerCopy: C,
123
124
  recordAction: i
124
125
  })
125
126
  })]
126
- }) : t ? null : p(), N = $(() => t && ot(t, {
127
+ }) : t ? null : E(), p = $(() => t && to(t, {
127
128
  items: a,
128
129
  isCompleted: s,
129
- isInlineCitationsEnabled: _
130
- }), [t, a, s, _]);
131
- return /* @__PURE__ */ l("div", {
130
+ isInlineCitationsEnabled: m
131
+ }), [t, a, s, m]);
132
+ return /* @__PURE__ */ c("div", {
132
133
  "aria-live": "polite",
133
134
  className: o.answer,
134
135
  "data-testid": "content-answers-answer",
135
- children: [E && /* @__PURE__ */ n(st, {}), !h && !E && /* @__PURE__ */ n(R, {
136
+ children: [x && /* @__PURE__ */ e(no, {
137
+ className: o.loadingContainer
138
+ }), !h && !x && /* @__PURE__ */ e(S, {
136
139
  className: "answer",
137
- variant: c,
138
- children: /* @__PURE__ */ l(R.Content, {
139
- isUsedInsideSidebar: c === "sidebar",
140
+ variant: l,
141
+ children: /* @__PURE__ */ c(S.Content, {
142
+ isUsedInsideSidebar: l === "sidebar",
140
143
  variant: "answer",
141
- children: [/* @__PURE__ */ n(et, {
142
- answer: N,
143
- isMarkdownEnabled: C,
144
- isReactMarkdownEnabled: k,
145
- variant: c
146
- }), s && /* @__PURE__ */ l("div", {
147
- className: S(o.footer, {
144
+ children: [/* @__PURE__ */ e(eo, {
145
+ answer: p,
146
+ isMarkdownEnabled: b,
147
+ isReactMarkdownEnabled: U,
148
+ variant: l
149
+ }), s && /* @__PURE__ */ c("div", {
150
+ className: g(o.footer, {
148
151
  [o.shouldHaveMarginTop]: t,
149
152
  [o.shouldAnimateHeight]: j,
150
- [o.shouldUseAnimation]: x
153
+ [o.shouldUseAnimation]: L
151
154
  }),
152
155
  "data-testid": "content-answers-answer-footer",
153
- children: [e && W(), b && !e && /* @__PURE__ */ n(at, {
154
- citations: T,
155
- onCitationClick: v,
156
+ children: [n && W(), k && !n && /* @__PURE__ */ e(ao, {
157
+ citations: y,
158
+ onCitationClick: P,
156
159
  recordAction: i
157
160
  }), q()]
158
161
  })]
159
162
  })
160
- }), h && /* @__PURE__ */ n(rt, {
161
- contentType: A,
162
- error: e,
163
+ }), h && /* @__PURE__ */ e(so, {
164
+ contentType: R,
165
+ error: n,
163
166
  recordAction: i,
164
- variant: c
167
+ variant: l
165
168
  })]
166
169
  });
167
170
  });
168
171
  export {
169
- xt as Answer,
170
- xt as default
172
+ Go as Answer,
173
+ Go as default
171
174
  };
@@ -1,24 +1,31 @@
1
+ import a from "clsx";
1
2
  import { jsxs as r, jsx as e } from "react/jsx-runtime";
2
- import '../../../../styles/boxAILoadingIndicator.css';const t = "_boxAILoadingIndicator_ddl80_1", l = "_ring_ddl80_1", i = "_ringTwo_ddl80_11", a = "_blueRing_ddl80_18", n = "_blueDraw_ddl80_1", s = "_blueFade_ddl80_1", p = "_blueRingTwo_ddl80_22", c = "_purpleRing_ddl80_25", d = "_purpleDraw_ddl80_1", g = "_purpleFade_ddl80_1", y = "_purpleRingTwo_ddl80_29", _ = "_magentaRing_ddl80_32", u = "_magentaDraw_ddl80_1", w = "_magentaFade_ddl80_1", m = "_magentaRingTwo_ddl80_36", x = "_bgRings_ddl80_39", o = {
3
- boxAILoadingIndicator: t,
4
- ring: l,
5
- ringTwo: i,
6
- blueRing: a,
7
- blueDraw: n,
8
- blueFade: s,
9
- blueRingTwo: p,
10
- purpleRing: c,
11
- purpleDraw: d,
12
- purpleFade: g,
13
- purpleRingTwo: y,
14
- magentaRing: _,
15
- magentaDraw: u,
16
- magentaFade: w,
17
- magentaRingTwo: m,
18
- bgRings: x
19
- }, h = () => /* @__PURE__ */ r("svg", {
20
- className: o.boxAILoadingIndicator,
3
+ import '../../../../styles/boxAILoadingIndicator.css';const n = "_boxAILoadingIndicator_ddl80_1", s = "_ring_ddl80_1", p = "_ringTwo_ddl80_11", c = "_blueRing_ddl80_18", d = "_blueDraw_ddl80_1", g = "_blueFade_ddl80_1", y = "_blueRingTwo_ddl80_22", _ = "_purpleRing_ddl80_25", m = "_purpleDraw_ddl80_1", u = "_purpleFade_ddl80_1", w = "_purpleRingTwo_ddl80_29", x = "_magentaRing_ddl80_32", f = "_magentaDraw_ddl80_1", h = "_magentaFade_ddl80_1", R = "_magentaRingTwo_ddl80_36", b = "_bgRings_ddl80_39", o = {
4
+ boxAILoadingIndicator: n,
5
+ ring: s,
6
+ ringTwo: p,
7
+ blueRing: c,
8
+ blueDraw: d,
9
+ blueFade: g,
10
+ blueRingTwo: y,
11
+ purpleRing: _,
12
+ purpleDraw: m,
13
+ purpleFade: u,
14
+ purpleRingTwo: w,
15
+ magentaRing: x,
16
+ magentaDraw: f,
17
+ magentaFade: h,
18
+ magentaRingTwo: R,
19
+ bgRings: b
20
+ }, F = ({
21
+ className: t,
22
+ height: l = 24,
23
+ width: i = 24
24
+ }) => /* @__PURE__ */ r("svg", {
25
+ className: a(o.boxAILoadingIndicator, t),
26
+ height: l,
21
27
  viewBox: "0 0 400 400",
28
+ width: i,
22
29
  xmlns: "http://www.w3.org/2000/svg",
23
30
  children: [/* @__PURE__ */ r("defs", {
24
31
  children: [/* @__PURE__ */ r("linearGradient", {
@@ -230,6 +237,6 @@ import '../../../../styles/boxAILoadingIndicator.css';const t = "_boxAILoadingIn
230
237
  })]
231
238
  });
232
239
  export {
233
- h as BoxAILoadingIndicator,
234
- h as default
240
+ F as BoxAILoadingIndicator,
241
+ F as default
235
242
  };
@@ -1,14 +1,14 @@
1
- import x from "clsx";
2
- import { useState as b, useId as C, useRef as k, useEffect as u, useCallback as _ } from "react";
3
- import { useIntl as y } from "react-intl";
4
- import { Text as M, Tooltip as j } from "@box/blueprint-web";
1
+ import C from "clsx";
2
+ import { useState as b, useId as k, useRef as B, useEffect as u, useCallback as _ } from "react";
3
+ import { useIntl as M } from "react-intl";
4
+ import { Text as w, Tooltip as j } from "@box/blueprint-web";
5
5
  import { ChevronRight as X, BoxAi as Y } from "@box/blueprint-web-assets/icons/Medium";
6
6
  import { BlackOpacity50 as G } from "@box/blueprint-web-assets/tokens/tokens";
7
7
  import U from "../common/markdown-react.js";
8
8
  import { BoxAILoadingIndicator as V } from "./boxAILoadingIndicator.js";
9
9
  import l from "./messages.js";
10
- import { jsxs as g, jsx as n } from "react/jsx-runtime";
11
- import '../../../../styles/thinkingBubble.css';const q = "_thinkingBubbleContainer_vtaw4_2", z = "_thinkingBubbleHeader_vtaw4_8", F = "_headerLeft_vtaw4_20", J = "_thinkingBubbleLogo_vtaw4_25", K = "_chevronIcon_vtaw4_29", Q = "_chevronRotated_vtaw4_34", W = "_chevronDisabled_vtaw4_37", Z = "_logoState_vtaw4_41", $ = "_headerExpanded_vtaw4_50", ee = "_thinkingBubbleContent_vtaw4_56", te = "_scrollableContainer_vtaw4_64", ne = "_contentExpanded_vtaw4_82", oe = "_sidebar_vtaw4_88", ae = "_pillState_vtaw4_106", e = {
10
+ import { jsxs as g, jsx as t } from "react/jsx-runtime";
11
+ import '../../../../styles/thinkingBubble.css';const q = "_thinkingBubbleContainer_168nh_2", z = "_thinkingBubbleHeader_168nh_8", F = "_headerLeft_168nh_20", J = "_thinkingBubbleLogo_168nh_25", K = "_chevronIcon_168nh_29", Q = "_chevronRotated_168nh_34", W = "_chevronDisabled_168nh_37", Z = "_logoState_168nh_41", $ = "_headerExpanded_168nh_54", ee = "_thinkingBubbleContent_168nh_59", ne = "_scrollableContainer_168nh_67", te = "_contentExpanded_168nh_85", oe = "_sidebar_168nh_91", re = "_pillState_168nh_109", e = {
12
12
  thinkingBubbleContainer: q,
13
13
  thinkingBubbleHeader: z,
14
14
  headerLeft: F,
@@ -19,97 +19,97 @@ import '../../../../styles/thinkingBubble.css';const q = "_thinkingBubbleContain
19
19
  logoState: Z,
20
20
  headerExpanded: $,
21
21
  thinkingBubbleContent: ee,
22
- scrollableContainer: te,
23
- contentExpanded: ne,
22
+ scrollableContainer: ne,
23
+ contentExpanded: te,
24
24
  sidebar: oe,
25
- pillState: ae
26
- }, re = 5, se = 50, ie = 300, le = 120, Ee = ({
25
+ pillState: re
26
+ }, ae = 5, se = 50, ie = 300, le = 120, xe = ({
27
27
  content: s,
28
- className: B,
28
+ className: v,
29
29
  variant: L = "modal",
30
- isThinkingComplete: t = !1,
30
+ isThinkingComplete: n = !1,
31
31
  ...I
32
32
  }) => {
33
33
  const {
34
34
  formatMessage: i
35
- } = y(), S = L === "sidebar", [c, h] = b(!1), [r, f] = b(!1), [d, w] = b(!1), p = C(), H = C(), o = k(null), v = k(!1);
35
+ } = M(), S = L === "sidebar", [c, h] = b(!1), [a, f] = b(!1), [d, H] = b(!1), p = k(), A = k(), o = B(null), m = B(!1);
36
36
  u(() => {
37
37
  if (s) {
38
- const a = [setTimeout(() => w(!0), se), setTimeout(() => h(!0), ie)];
39
- return () => a.forEach(clearTimeout);
38
+ const r = [setTimeout(() => H(!0), se), setTimeout(() => h(!0), ie)];
39
+ return () => r.forEach(clearTimeout);
40
40
  }
41
41
  }, [s]);
42
- const m = _(() => {
43
- o.current && s && c && !v.current && o.current.scrollTo({
42
+ const E = _(() => {
43
+ o.current && s && c && !m.current && o.current.scrollTo({
44
44
  top: o.current.scrollHeight,
45
45
  behavior: "smooth"
46
46
  });
47
47
  }, [s, c]);
48
48
  u(() => {
49
- m();
50
- }, [m]);
51
- const A = _(() => {
49
+ E();
50
+ }, [E]);
51
+ const D = _(() => {
52
52
  if (o.current) {
53
- const a = o.current, P = a.scrollTop + a.clientHeight >= a.scrollHeight - re;
54
- v.current = !P;
53
+ const r = o.current, y = r.scrollTop + r.clientHeight >= r.scrollHeight - ae;
54
+ m.current = !y;
55
55
  }
56
- }, []), E = _(() => o.current ? o.current.scrollHeight > le : !1, []), D = () => {
57
- const a = !r;
58
- f(a), t && h(a);
56
+ }, []), x = _(() => o.current ? o.current.scrollHeight > le : !1, []), N = () => {
57
+ const r = !a;
58
+ f(r), n && h(r);
59
59
  };
60
60
  u(() => {
61
- t && (f(!1), h(!1));
62
- }, [t]);
63
- const N = () => t ? /* @__PURE__ */ n(Y, {
61
+ n && (f(!1), h(!1));
62
+ }, [n]);
63
+ const R = () => n ? /* @__PURE__ */ t(Y, {
64
64
  color: G,
65
65
  height: 24,
66
66
  width: 24
67
- }) : /* @__PURE__ */ n(V, {}), R = !E() && !t, O = x(e.thinkingBubbleContainer, {
67
+ }) : /* @__PURE__ */ t(V, {}), O = !x() && !n, T = C(e.thinkingBubbleContainer, {
68
68
  [e.logoState]: !d,
69
69
  [e.headerExpanded]: d,
70
- [e.contentExpanded]: r,
71
- [e.pillState]: t && !r,
70
+ [e.contentExpanded]: a,
71
+ [e.pillState]: n && !a,
72
72
  [e.sidebar]: S
73
- }, B), T = !E() && !t;
73
+ }, v), P = !x() && !n;
74
74
  return /* @__PURE__ */ g("div", {
75
- className: O,
75
+ className: T,
76
76
  ...I,
77
77
  children: [/* @__PURE__ */ g("button", {
78
- "aria-controls": H,
79
- "aria-expanded": c && (!t || r),
78
+ "aria-controls": A,
79
+ "aria-expanded": c && (!n || a),
80
80
  "aria-labelledby": p,
81
81
  className: e.thinkingBubbleHeader,
82
- disabled: T,
83
- onClick: D,
82
+ disabled: P,
83
+ onClick: N,
84
84
  type: "button",
85
85
  "data-target-id": "button-thinkingCompleted|thinkingInProgress|thinkingCompleted|thinkingInProgress|collapseThinkingContent|expandThinkingContent",
86
86
  children: [/* @__PURE__ */ g("div", {
87
87
  className: e.headerLeft,
88
- children: [/* @__PURE__ */ n("div", {
88
+ children: [/* @__PURE__ */ t("div", {
89
89
  className: e.thinkingBubbleLogo,
90
- children: N()
91
- }), d && /* @__PURE__ */ n(M, {
90
+ children: R()
91
+ }), d && /* @__PURE__ */ t(w, {
92
92
  as: "h3",
93
- color: t ? "textOnLightSecondary" : "textOnLightDefault",
93
+ color: n ? "textOnLightSecondary" : "textOnLightDefault",
94
94
  id: p,
95
95
  variant: "titleMedium",
96
- children: i(t ? l.thinkingCompleted : l.thinkingInProgress)
96
+ children: i(n ? l.thinkingCompleted : l.thinkingInProgress)
97
97
  })]
98
- }), d && /* @__PURE__ */ n(j, {
99
- content: i(r ? l.collapseThinkingContent : l.expandThinkingContent),
100
- children: /* @__PURE__ */ n(X, {
98
+ }), d && /* @__PURE__ */ t(j, {
99
+ content: i(a ? l.collapseThinkingContent : l.expandThinkingContent),
100
+ children: /* @__PURE__ */ t(X, {
101
101
  "aria-hidden": "true",
102
- className: x(e.chevronIcon, r && e.chevronRotated, R && e.chevronDisabled)
102
+ className: C(e.chevronIcon, a && e.chevronRotated, O && e.chevronDisabled)
103
103
  })
104
104
  })]
105
- }), c && (!t || r) && /* @__PURE__ */ n("div", {
105
+ }), c && (!n || a) && /* @__PURE__ */ t("div", {
106
106
  className: e.thinkingBubbleContent,
107
- children: /* @__PURE__ */ n("div", {
107
+ children: /* @__PURE__ */ t("div", {
108
108
  ref: o,
109
109
  "aria-label": i(l.thinkingContentScrollableArea),
110
110
  className: e.scrollableContainer,
111
- onScroll: A,
112
- children: /* @__PURE__ */ n(U, {
111
+ onScroll: D,
112
+ children: /* @__PURE__ */ t(U, {
113
113
  children: s
114
114
  })
115
115
  })
@@ -117,6 +117,6 @@ import '../../../../styles/thinkingBubble.css';const q = "_thinkingBubbleContain
117
117
  });
118
118
  };
119
119
  export {
120
- Ee as ThinkingBubble,
121
- Ee as default
120
+ xe as ThinkingBubble,
121
+ xe as default
122
122
  };
@@ -1 +1 @@
1
- ._answer_140hd_1{white-space:pre-wrap;border:none}._answer_140hd_1 ._alertIcon_140hd_5{margin-left:.5rem}._answer_140hd_1 ._error_140hd_8{display:flex;align-items:center}._answer_140hd_1 ._footer_140hd_12{display:flex;align-items:center;justify-content:space-between;height:1.5rem}._answer_140hd_1 ._footer_140hd_12 ._copyButtonContainer_140hd_18,._answer_140hd_1 ._footer_140hd_12 ._feedbackButtonsContainer_140hd_19{opacity:0;transition:opacity .3s}._answer_140hd_1 ._footer_140hd_12._shouldHaveMarginTop_140hd_23{margin-top:.75rem}._answer_140hd_1 ._footer_140hd_12._shouldUseAnimation_140hd_26{max-height:0;overflow-y:hidden}._answer_140hd_1 ._footer_140hd_12._shouldUseAnimation_140hd_26._shouldAnimateHeight_140hd_30{max-height:200px;transition:max-height 1s ease-in}._answer_140hd_1 ._footer_140hd_12 ._footerButtons_140hd_34,._answer_140hd_1 ._footer_140hd_12 ._feedbackButtonsContainer_140hd_19{display:flex;gap:.25rem;margin-inline-start:auto}._answer_140hd_1 ._iconAvatar_140hd_40{display:flex;align-items:center;justify-content:center;width:var(--size-16);height:var(--size-16);background-color:#faf5fe;border-radius:50%}@media (max-width: 374px){._answer_140hd_1 ._iconAvatar_140hd_40{width:var(--size-6);height:var(--size-6)}}._answer_140hd_1:hover ._copyButtonContainer_140hd_18,._answer_140hd_1:hover ._feedbackButtonsContainer_140hd_19,._answer_140hd_1 ._copyButtonContainer_140hd_18:focus-within,._answer_140hd_1 ._feedbackButtonsContainer_140hd_19:focus-within,._answer_140hd_1 ._footerButtons_140hd_34._buttonsVisible_140hd_56 ._copyButtonContainer_140hd_18,._answer_140hd_1 ._footerButtons_140hd_34._buttonsVisible_140hd_56 ._feedbackButtonsContainer_140hd_19{opacity:1}._answer_140hd_1:hover ._copyButtonContainer_140hd_18>button,._answer_140hd_1:hover ._feedbackButtonsContainer_140hd_19>button,._answer_140hd_1 ._copyButtonContainer_140hd_18:focus-within>button,._answer_140hd_1 ._feedbackButtonsContainer_140hd_19:focus-within>button,._answer_140hd_1 ._footerButtons_140hd_34._buttonsVisible_140hd_56 ._copyButtonContainer_140hd_18>button,._answer_140hd_1 ._footerButtons_140hd_34._buttonsVisible_140hd_56 ._feedbackButtonsContainer_140hd_19>button{outline-offset:-2px}
1
+ ._answer_dkxyx_1{white-space:pre-wrap;border:none}._answer_dkxyx_1 ._loadingContainer_dkxyx_5{box-sizing:border-box;width:var(--size-15);height:var(--size-15);padding:18px}._answer_dkxyx_1 ._alertIcon_dkxyx_11{margin-left:.5rem}._answer_dkxyx_1 ._error_dkxyx_14{display:flex;align-items:center}._answer_dkxyx_1 ._footer_dkxyx_18{display:flex;align-items:center;justify-content:space-between;height:1.5rem}._answer_dkxyx_1 ._footer_dkxyx_18 ._copyButtonContainer_dkxyx_24,._answer_dkxyx_1 ._footer_dkxyx_18 ._feedbackButtonsContainer_dkxyx_25{opacity:0;transition:opacity .3s}._answer_dkxyx_1 ._footer_dkxyx_18._shouldHaveMarginTop_dkxyx_29{margin-top:.75rem}._answer_dkxyx_1 ._footer_dkxyx_18._shouldUseAnimation_dkxyx_32{max-height:0;overflow-y:hidden}._answer_dkxyx_1 ._footer_dkxyx_18._shouldUseAnimation_dkxyx_32._shouldAnimateHeight_dkxyx_36{max-height:200px;transition:max-height 1s ease-in}._answer_dkxyx_1 ._footer_dkxyx_18 ._footerButtons_dkxyx_40,._answer_dkxyx_1 ._footer_dkxyx_18 ._feedbackButtonsContainer_dkxyx_25{display:flex;gap:.25rem;margin-inline-start:auto}._answer_dkxyx_1 ._iconAvatar_dkxyx_46{display:flex;align-items:center;justify-content:center;width:var(--size-16);height:var(--size-16);background-color:#faf5fe;border-radius:50%}@media (max-width: 374px){._answer_dkxyx_1 ._iconAvatar_dkxyx_46{width:var(--size-6);height:var(--size-6)}}._answer_dkxyx_1:hover ._copyButtonContainer_dkxyx_24,._answer_dkxyx_1:hover ._feedbackButtonsContainer_dkxyx_25,._answer_dkxyx_1 ._copyButtonContainer_dkxyx_24:focus-within,._answer_dkxyx_1 ._feedbackButtonsContainer_dkxyx_25:focus-within,._answer_dkxyx_1 ._footerButtons_dkxyx_40._buttonsVisible_dkxyx_62 ._copyButtonContainer_dkxyx_24,._answer_dkxyx_1 ._footerButtons_dkxyx_40._buttonsVisible_dkxyx_62 ._feedbackButtonsContainer_dkxyx_25{opacity:1}._answer_dkxyx_1:hover ._copyButtonContainer_dkxyx_24>button,._answer_dkxyx_1:hover ._feedbackButtonsContainer_dkxyx_25>button,._answer_dkxyx_1 ._copyButtonContainer_dkxyx_24:focus-within>button,._answer_dkxyx_1 ._feedbackButtonsContainer_dkxyx_25:focus-within>button,._answer_dkxyx_1 ._footerButtons_dkxyx_40._buttonsVisible_dkxyx_62 ._copyButtonContainer_dkxyx_24>button,._answer_dkxyx_1 ._footerButtons_dkxyx_40._buttonsVisible_dkxyx_62 ._feedbackButtonsContainer_dkxyx_25>button{outline-offset:-2px}
@@ -1 +1 @@
1
- ._thinkingBubbleContainer_vtaw4_2{font-size:var(--body-default-font-size);border:1px solid var(--black-opacity-08);transition:width .3s ease,height .3s ease}._thinkingBubbleHeader_vtaw4_8{display:flex;align-items:center;justify-content:space-between;width:100%;padding:var(--space-3) var(--space-6);background:none;border:none}._thinkingBubbleHeader_vtaw4_8:not([disabled]){cursor:pointer}._thinkingBubbleHeader_vtaw4_8 ._headerLeft_vtaw4_20{display:flex;gap:var(--space-4);align-items:center}._thinkingBubbleHeader_vtaw4_8 ._thinkingBubbleLogo_vtaw4_25{width:var(--size-6);height:var(--size-6)}._thinkingBubbleHeader_vtaw4_8 ._chevronIcon_vtaw4_29{width:var(--size-4);height:var(--size-4);opacity:1}._thinkingBubbleHeader_vtaw4_8 ._chevronIcon_vtaw4_29._chevronRotated_vtaw4_34{transform:rotate(90deg)}._thinkingBubbleHeader_vtaw4_8 ._chevronIcon_vtaw4_29._chevronDisabled_vtaw4_37{opacity:0}._logoState_vtaw4_41{display:flex;align-items:center;justify-content:center;width:var(--size-15);height:var(--size-15);border-radius:var(--radius-half)}._headerExpanded_vtaw4_50{width:100%;height:auto;border-radius:var(--radius-8)}._thinkingBubbleContent_vtaw4_56{position:relative;max-height:140px;padding:0 var(--space-4) var(--space-2) var(--space-14);opacity:1;transition:opacity .15s ease,max-height .15s ease}._scrollableContainer_vtaw4_64{max-height:120px;padding-right:var(--space-3);overflow-y:auto;scroll-behavior:smooth;scrollbar-width:thin;scrollbar-color:transparent transparent}._scrollableContainer_vtaw4_64::-webkit-scrollbar-track,._scrollableContainer_vtaw4_64::-webkit-scrollbar-thumb{background:transparent}._scrollableContainer_vtaw4_64:hover{scrollbar-color:rgba(0,0,0,.3) transparent}._scrollableContainer_vtaw4_64:hover::-webkit-scrollbar-thumb{background:#0000004d}._contentExpanded_vtaw4_82 ._thinkingBubbleContent_vtaw4_56{max-height:420px}._contentExpanded_vtaw4_82 ._scrollableContainer_vtaw4_64{max-height:400px}._contentExpanded_vtaw4_82._sidebar_vtaw4_88 ._thinkingBubbleContent_vtaw4_56{max-height:320px}._contentExpanded_vtaw4_82._sidebar_vtaw4_88 ._scrollableContainer_vtaw4_64{max-height:300px}._thinkingBubbleContent_vtaw4_56:before{position:absolute;top:0;right:var(--space-8);bottom:0;left:var(--space-9);background:linear-gradient(to bottom,white 0%,transparent 8px,transparent calc(100% - 16px),white 100%);content:"";pointer-events:none}._pillState_vtaw4_106{max-width:fit-content;opacity:1;transition:width .3s ease,height .3s ease}._pillState_vtaw4_106 ._thinkingBubbleHeader_vtaw4_8{gap:var(--space-2)}
1
+ ._thinkingBubbleContainer_168nh_2{font-size:var(--body-default-font-size);border:1px solid var(--black-opacity-08);transition:width .3s ease,height .3s ease}._thinkingBubbleHeader_168nh_8{display:flex;align-items:center;justify-content:space-between;width:100%;padding:var(--space-4) var(--space-4);background:none;border:none}._thinkingBubbleHeader_168nh_8:not([disabled]){cursor:pointer}._thinkingBubbleHeader_168nh_8 ._headerLeft_168nh_20{display:flex;gap:var(--space-4);align-items:center}._thinkingBubbleHeader_168nh_8 ._thinkingBubbleLogo_168nh_25{width:var(--size-6);height:var(--size-6)}._thinkingBubbleHeader_168nh_8 ._chevronIcon_168nh_29{width:var(--size-4);height:var(--size-4);opacity:1}._thinkingBubbleHeader_168nh_8 ._chevronIcon_168nh_29._chevronRotated_168nh_34{transform:rotate(90deg)}._thinkingBubbleHeader_168nh_8 ._chevronIcon_168nh_29._chevronDisabled_168nh_37{opacity:0}._logoState_168nh_41{display:flex;align-items:center;justify-content:center;width:var(--size-15);height:var(--size-15);border-radius:var(--radius-half)}._logoState_168nh_41 ._thinkingBubbleHeader_168nh_8{justify-content:center;padding:0}._headerExpanded_168nh_54{width:100%;border-radius:var(--radius-8)}._thinkingBubbleContent_168nh_59{position:relative;max-height:140px;padding:0 var(--space-4) var(--space-2) var(--space-14);opacity:1;transition:opacity .15s ease,max-height .15s ease}._scrollableContainer_168nh_67{max-height:120px;padding-right:var(--space-3);overflow-y:auto;scroll-behavior:smooth;scrollbar-width:thin;scrollbar-color:transparent transparent}._scrollableContainer_168nh_67::-webkit-scrollbar-track,._scrollableContainer_168nh_67::-webkit-scrollbar-thumb{background:transparent}._scrollableContainer_168nh_67:hover{scrollbar-color:rgba(0,0,0,.3) transparent}._scrollableContainer_168nh_67:hover::-webkit-scrollbar-thumb{background:#0000004d}._contentExpanded_168nh_85 ._thinkingBubbleContent_168nh_59{max-height:420px}._contentExpanded_168nh_85 ._scrollableContainer_168nh_67{max-height:400px}._contentExpanded_168nh_85._sidebar_168nh_91 ._thinkingBubbleContent_168nh_59{max-height:320px}._contentExpanded_168nh_85._sidebar_168nh_91 ._scrollableContainer_168nh_67{max-height:300px}._thinkingBubbleContent_168nh_59:before{position:absolute;top:0;right:var(--space-8);bottom:0;left:var(--space-9);background:linear-gradient(to bottom,white 0%,transparent 8px,transparent calc(100% - 16px),white 100%);content:"";pointer-events:none}._pillState_168nh_109{max-width:fit-content;opacity:1;transition:width .3s ease,height .3s ease}._pillState_168nh_109 ._thinkingBubbleHeader_168nh_8{gap:var(--space-2)}
@@ -1,3 +1,7 @@
1
- declare const BoxAILoadingIndicator: () => import("react/jsx-runtime").JSX.Element;
1
+ declare const BoxAILoadingIndicator: ({ className, height, width, }: {
2
+ className?: string;
3
+ height?: number;
4
+ width?: number;
5
+ }) => import("react/jsx-runtime").JSX.Element;
2
6
  export { BoxAILoadingIndicator };
3
7
  export default BoxAILoadingIndicator;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@box/box-ai-content-answers",
3
- "version": "0.156.2",
3
+ "version": "0.157.0",
4
4
  "peerDependencies": {
5
5
  "@box/blueprint-web": "^7.8.0",
6
6
  "@box/blueprint-web-assets": "^4.56.1",
@@ -17,10 +17,10 @@
17
17
  },
18
18
  "devDependencies": {
19
19
  "@box/babel-plugin-target-attributes": "1.3.0",
20
- "@box/blueprint-web": "^12.77.4",
20
+ "@box/blueprint-web": "^12.78.0",
21
21
  "@box/blueprint-web-assets": "^4.69.0",
22
- "@box/box-ai-agent-selector": "^0.63.6",
23
- "@box/item-icon": "^0.27.6",
22
+ "@box/box-ai-agent-selector": "^0.63.7",
23
+ "@box/item-icon": "^0.27.7",
24
24
  "@box/storybook-utils": "^0.14.5",
25
25
  "@testing-library/react": "^15.0.6",
26
26
  "react": "^18.3.0",