@box/box-ai-content-answers 1.8.1 → 1.8.3

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,25 +1,25 @@
1
- import { Text as $ } from "@box/blueprint-web";
2
- import { BoxAiLogo as w } from "@box/blueprint-web-assets/icons/Logo";
1
+ import { Text as w } from "@box/blueprint-web";
2
+ import { BoxAiLogo as L } from "@box/blueprint-web-assets/icons/Logo";
3
3
  import { Size10 as b } from "@box/blueprint-web-assets/tokens/tokens";
4
- import L from "clsx";
5
- import * as P from "react";
6
- import { useIntl as S } from "react-intl";
7
- import { Answer as ee } from "../answer/answer.js";
8
- import { MediaContainer as te } from "../common/media-container.js";
9
- import { Question as oe } from "../question/question.js";
10
- import { SuggestedQuestions as ae } from "../suggested-questions/suggested-questions.js";
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";
4
+ import P from "clsx";
5
+ import * as S from "react";
6
+ import { useIntl as ee } from "react-intl";
7
+ import { Answer as te } from "../answer/answer.js";
8
+ import { MediaContainer as oe } from "../common/media-container.js";
9
+ import { Question as ae } from "../question/question.js";
10
+ import { SuggestedQuestions as se } 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 ne } from "../welcome-message/welcome-message.js";
14
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
- chat: ne,
17
- clearChatText: ce,
18
- landingPage: le,
19
- askQuestionText: me,
20
- iconAvatar: pe,
21
- sidebar: de
22
- }, Ie = ({
15
+ import '../../../../styles/chat.css';const ce = "_chat_azszb_1", le = "_clearChatText_azszb_1", me = "_landingPage_azszb_7", pe = "_askQuestionText_azszb_15", de = "_iconAvatar_azszb_23", be = "_sidebar_azszb_39", a = {
16
+ chat: ce,
17
+ clearChatText: le,
18
+ landingPage: me,
19
+ askQuestionText: pe,
20
+ iconAvatar: de,
21
+ sidebar: be
22
+ }, Ne = ({
23
23
  askSuggestedQuestion: _,
24
24
  contentType: n,
25
25
  hasCustomSuggestedQuestions: h,
@@ -28,125 +28,127 @@ import '../../../../styles/chat.css';const ne = "_chat_azszb_1", ce = "_clearCha
28
28
  isFeedbackEnabled: z,
29
29
  isFeedbackFormEnabled: C,
30
30
  isInlineCitationsEnabled: g = !1,
31
- isMarkdownEnabled: k,
32
- isSessionLoading: u = !1,
33
- onCitationClick: F,
34
- onAnswerCopy: A,
35
- embedTheAnswerButtonConfig: I,
36
- onFeedbackFormSubmit: N,
37
- onDropdownOpenChange: O,
38
- onSuggestedQuestionInteraction: v,
39
- questions: Q,
31
+ isInlineCitationV2Enabled: k,
32
+ isMarkdownEnabled: u,
33
+ isSessionLoading: F = !1,
34
+ onCitationClick: A,
35
+ onAnswerCopy: I,
36
+ embedTheAnswerButtonConfig: N,
37
+ onFeedbackFormSubmit: O,
38
+ onDropdownOpenChange: v,
39
+ onSuggestedQuestionInteraction: Q,
40
+ questions: j,
40
41
  recordAction: c,
41
- setAnswerFeedback: j,
42
+ setAnswerFeedback: y,
42
43
  setAskSuggestedQuestion: l,
43
44
  suggestedQuestions: m,
44
- suggestedQuestionsRequestState: y,
45
- shouldFeedbackFormIncludeFeedbackText: B,
46
- shouldFeedbackIncludePromptData: M,
45
+ suggestedQuestionsRequestState: B,
46
+ shouldFeedbackFormIncludeFeedbackText: M,
47
+ shouldFeedbackIncludePromptData: q,
47
48
  shouldShowLandingPage: o,
48
- useAnimation: q,
49
+ useAnimation: R,
49
50
  variant: t = "modal",
50
- hostAppName: R = "",
51
- isReactMarkdownEnabled: W,
52
- welcomeMessageClearText: D,
51
+ hostAppName: W = "",
52
+ isReactMarkdownEnabled: D,
53
+ welcomeMessageClearText: E,
53
54
  ...p
54
55
  }) => {
55
56
  const {
56
- formatMessage: E
57
- } = S(), [G, H] = P.useState(null), J = (s, i) => {
58
- H(s ? i : null);
57
+ formatMessage: G
58
+ } = ee(), [H, J] = S.useState(null), K = (s, i) => {
59
+ J(s ? i : null);
59
60
  };
60
61
  return /* @__PURE__ */ e("div", {
61
62
  className: a.chat,
62
63
  "data-testid": "content-answers-chat",
63
64
  children: /* @__PURE__ */ f("div", {
64
- className: L({
65
+ className: P({
65
66
  [a.landingPage]: o,
66
67
  [a.sidebar]: t === "sidebar"
67
68
  }),
68
- children: [o && /* @__PURE__ */ e(te.Figure, {
69
+ children: [o && /* @__PURE__ */ e(oe.Figure, {
69
70
  variant: t,
70
71
  children: /* @__PURE__ */ e("div", {
71
72
  className: a.iconAvatar,
72
- children: /* @__PURE__ */ e(w, {
73
+ children: /* @__PURE__ */ e(L, {
73
74
  height: b,
74
75
  role: "presentation",
75
76
  width: b
76
77
  })
77
78
  })
78
- }), /* @__PURE__ */ e(re, {
79
+ }), /* @__PURE__ */ e(ne, {
79
80
  contentType: "",
80
81
  shouldShowLandingPage: o,
81
82
  ...p,
82
83
  variant: t
83
- }), o && m !== void 0 && l !== void 0 && /* @__PURE__ */ e(ae, {
84
+ }), o && m !== void 0 && l !== void 0 && /* @__PURE__ */ e(se, {
84
85
  askSuggestedQuestion: _,
85
86
  hasCustomSuggestedQuestions: h,
86
87
  isLoading: T,
87
- onSuggestedQuestionInteraction: v,
88
+ onSuggestedQuestionInteraction: Q,
88
89
  recordAction: c,
89
90
  setAskSuggestedQuestion: l,
90
91
  suggestedQuestions: m,
91
- suggestedQuestionsRequestState: y,
92
+ suggestedQuestionsRequestState: B,
92
93
  variant: t
93
- }), /* @__PURE__ */ e($, {
94
+ }), /* @__PURE__ */ e(w, {
94
95
  as: "p",
95
96
  className: a.clearChatText,
96
- children: D || E(ie.welcomeClearChatText, {
97
+ children: E || G(re.welcomeClearChatText, {
97
98
  type: n
98
99
  })
99
100
  }), !o && /* @__PURE__ */ e("ul", {
100
- children: Q.map(({
101
+ children: j.map(({
101
102
  answer: s,
102
103
  thinkingAnswer: i,
103
- citations: K,
104
+ citations: U,
104
105
  id: r,
105
- isCompleted: U,
106
- isLoading: V,
107
- error: X,
106
+ isCompleted: V,
107
+ isLoading: X,
108
+ error: Y,
108
109
  prompt: d,
109
- promptType: Y,
110
- feedbackValue: Z
110
+ promptType: Z,
111
+ feedbackValue: $
111
112
  }) => /* @__PURE__ */ f("li", {
112
- children: [/* @__PURE__ */ e(oe, {
113
+ children: [/* @__PURE__ */ e(ae, {
113
114
  prompt: d,
114
115
  variant: t
115
- }), i && /* @__PURE__ */ e(se, {
116
+ }), i && /* @__PURE__ */ e(ie, {
116
117
  content: i,
117
118
  isThinkingComplete: !!s,
118
- onDropdownOpenChange: O,
119
+ onDropdownOpenChange: v,
119
120
  variant: t
120
- }), /* @__PURE__ */ e(ee, {
121
+ }), /* @__PURE__ */ e(te, {
121
122
  answer: s,
122
- citations: K,
123
+ citations: U,
123
124
  contentType: n,
124
- embedTheAnswerButtonConfig: I,
125
- error: X,
126
- feedbackValue: Z,
127
- hostAppName: R,
125
+ embedTheAnswerButtonConfig: N,
126
+ error: Y,
127
+ feedbackValue: $,
128
+ hostAppName: W,
128
129
  isCitationsEnabled: x,
129
- isCompleted: U,
130
+ isCompleted: V,
130
131
  isFeedbackEnabled: z,
131
132
  isFeedbackFormEnabled: C,
132
- isFeedbackTooltipOpen: G === r,
133
+ isFeedbackTooltipOpen: H === r,
133
134
  isInlineCitationsEnabled: g,
134
- isLoading: V || u,
135
- isMarkdownEnabled: k,
136
- isReactMarkdownEnabled: W,
135
+ isInlineCitationV2Enabled: k,
136
+ isLoading: X || F,
137
+ isMarkdownEnabled: u,
138
+ isReactMarkdownEnabled: D,
137
139
  items: p.items,
138
- onAnswerCopy: A,
139
- onCitationClick: F,
140
- onFeedbackFormSubmit: N,
141
- onFeedbackTooltipOpenChange: J,
140
+ onAnswerCopy: I,
141
+ onCitationClick: A,
142
+ onFeedbackFormSubmit: O,
143
+ onFeedbackTooltipOpenChange: K,
142
144
  prompt: d,
143
- promptType: Y,
145
+ promptType: Z,
144
146
  questionId: r,
145
147
  recordAction: c,
146
- setAnswerFeedback: j,
147
- shouldFeedbackFormIncludeFeedbackText: B,
148
- shouldFeedbackIncludePromptData: M,
149
- useAnimation: q,
148
+ setAnswerFeedback: y,
149
+ shouldFeedbackFormIncludeFeedbackText: M,
150
+ shouldFeedbackIncludePromptData: q,
151
+ useAnimation: R,
150
152
  variant: t
151
153
  })]
152
154
  }, r))
@@ -155,6 +157,6 @@ import '../../../../styles/chat.css';const ne = "_chat_azszb_1", ce = "_clearCha
155
157
  });
156
158
  };
157
159
  export {
158
- Ie as Chat,
159
- Ie as default
160
+ Ne as Chat,
161
+ Ne as default
160
162
  };
@@ -1,47 +1,36 @@
1
- import { FilterChip as t, Tooltip as a } from "@box/blueprint-web";
2
- import { File as r } from "@box/blueprint-web-assets/icons/Medium";
3
- import { useCallback as s, useMemo as c } from "react";
4
- import { useIntl as m } from "react-intl";
5
- import { isBoxDomain as p } from "../../utils/inlineCitationsUtils.js";
6
- import d from "../answer/messages.js";
7
- import { s as u } from "../../../../chunks/markdown.module.js";
8
- import { jsx as i, jsxs as f } from "react/jsx-runtime";
9
- const A = ({
1
+ import { Tooltip as l, Link as s } from "@box/blueprint-web";
2
+ import { useCallback as m, useMemo as p } from "react";
3
+ import { useIntl as c } from "react-intl";
4
+ import { isBoxDomain as d } from "../../utils/inlineCitationsUtils.js";
5
+ import k from "../answer/messages.js";
6
+ import { s as t } from "../../../../chunks/markdown.module.js";
7
+ import { jsx as o } from "react/jsx-runtime";
8
+ const x = ({
10
9
  fileName: n,
11
- href: o
10
+ href: i,
11
+ isInlineCitationV2Enabled: r = !1
12
12
  }) => {
13
13
  const {
14
- formatMessage: e
15
- } = m(), l = s(() => {
16
- window.open(o, "_blank", "noopener,noreferrer");
17
- }, [o]);
18
- return c(() => p(o), [o]) ? /* @__PURE__ */ i(t.Group, {
19
- className: u.inlineCitationGroup,
20
- name: "inline-citation-interactive",
21
- type: "single",
22
- children: /* @__PURE__ */ i(a, {
23
- content: n,
24
- children: /* @__PURE__ */ f(t.ChipButton, {
25
- "aria-label": e(d.inlineCitationAriaLabel, {
26
- fileName: n
27
- }),
28
- className: "inline-citation-chip-button",
29
- "data-testid": "inline-citation-chip",
30
- onClick: l,
31
- value: "interactive",
32
- children: [/* @__PURE__ */ i(t.Icon, {
33
- className: "inline-citation-file-icon",
34
- icon: r
35
- }), /* @__PURE__ */ i(t.Label, {
36
- className: "inline-citation-filename-label",
37
- children: n
38
- })]
39
- })
14
+ formatMessage: a
15
+ } = c(), e = m(() => {
16
+ window.open(i, "_blank", "noopener,noreferrer");
17
+ }, [i]);
18
+ return p(() => d(i), [i]) ? /* @__PURE__ */ o(l, {
19
+ content: n,
20
+ children: /* @__PURE__ */ o(s, {
21
+ "aria-label": a(k.inlineCitationAriaLabel, {
22
+ fileName: n
23
+ }),
24
+ className: r ? t.inlineCitation : t.inlineCitationWrapper,
25
+ href: i,
26
+ onClick: e,
27
+ "data-target-id": "Link-inlineCitationAriaLabel",
28
+ children: n
40
29
  })
41
- }) : /* @__PURE__ */ i("span", {
30
+ }) : /* @__PURE__ */ o("span", {
42
31
  children: n
43
32
  });
44
33
  };
45
34
  export {
46
- A as default
35
+ x as default
47
36
  };
@@ -1,121 +1,136 @@
1
+ import { Link as p } from "@box/blueprint-web";
1
2
  import d from "react-markdown";
2
- import h from "remark-gfm";
3
- import { isBoxCitation as f } from "../../utils/inlineCitationsUtils.js";
4
- import u from "./inline-citation.js";
5
- import { s as t } from "../../../../chunks/markdown.module.js";
6
- import { jsxs as c, jsx as n } from "react/jsx-runtime";
7
- const N = ({
8
- children: e,
9
- className: o
3
+ import f from "remark-gfm";
4
+ import { isBoxDomain as N, isBoxCitation as b } from "../../utils/inlineCitationsUtils.js";
5
+ import g from "./inline-citation.js";
6
+ import { s as r } from "../../../../chunks/markdown.module.js";
7
+ import { jsxs as m, jsx as n } from "react/jsx-runtime";
8
+ const k = (t) => (t == null ? void 0 : t.startsWith("#user-content-fn")) ?? !1, h = (t) => t ? b(t) : !1, j = (t) => t ? t.startsWith("http://") || t.startsWith("https://") : !1, x = (t) => t ? N(t) : !1, L = ({
9
+ children: t,
10
+ className: e
10
11
  }) => {
11
- const r = o ? o.replace("language-", "") : "", s = (i) => i.trim().split(/\r?\n/).map((a, m) => /* @__PURE__ */ c("div", {
12
+ const a = e ? e.replace("language-", "") : "", c = (s) => s.trim().split(/\r?\n/).map((i, l) => /* @__PURE__ */ m("div", {
12
13
  className: "hljs-line",
13
14
  children: [/* @__PURE__ */ n("span", {
14
15
  className: "hljs-line-number",
15
- children: m + 1
16
+ children: l + 1
16
17
  }), /* @__PURE__ */ n("span", {
17
18
  className: "hljs-line-content",
18
- children: a
19
+ children: i
19
20
  })]
20
- }, `line-${a.substring(0, 20)}-${Date.now()}`));
21
- return /* @__PURE__ */ c("div", {
22
- className: t.hljs,
21
+ }, `line-${i.substring(0, 20)}-${Date.now()}`));
22
+ return /* @__PURE__ */ m("div", {
23
+ className: r.hljs,
23
24
  children: [/* @__PURE__ */ n("span", {
24
- className: t.hljsLanguage,
25
- children: r || "auto"
25
+ className: r.hljsLanguage,
26
+ children: a || "auto"
26
27
  }), /* @__PURE__ */ n("code", {
27
- children: s(e)
28
+ children: c(t)
28
29
  })]
29
30
  });
30
- }, k = ({
31
- children: e
31
+ }, v = ({
32
+ children: t
32
33
  }) => /* @__PURE__ */ n("div", {
33
- className: t.tableWrapper,
34
+ className: r.tableWrapper,
34
35
  children: /* @__PURE__ */ n("table", {
35
- children: e
36
+ children: t
36
37
  })
37
- }), b = ({
38
+ }), u = ({
39
+ children: t,
40
+ href: e
41
+ }) => !e || e === "" ? null : x(e) ? /* @__PURE__ */ n("a", {
38
42
  href: e,
39
- children: o
40
- }) => /* @__PURE__ */ c("span", {
41
- children: [o, " (", e, ")"]
42
- }), g = ({
43
- children: e
43
+ rel: "noopener noreferrer",
44
+ target: "_blank",
45
+ children: t
46
+ }) : /* @__PURE__ */ m("span", {
47
+ children: [t, " (", e, ")"]
48
+ }), B = ({
49
+ children: t
44
50
  }) => /* @__PURE__ */ n("blockquote", {
45
- className: t.blockquote,
46
- children: e
47
- }), j = ({
48
- children: e
51
+ className: r.blockquote,
52
+ children: t
53
+ }), q = ({
54
+ children: t
49
55
  }) => /* @__PURE__ */ n("ol", {
50
- className: t.orderedList,
51
- children: e
52
- }), x = ({
53
- children: e
56
+ className: r.orderedList,
57
+ children: t
58
+ }), w = ({
59
+ children: t
54
60
  }) => {
55
- var r;
56
- const o = ((r = e == null ? void 0 : e.toString().match(/^(\d+)/)) == null ? void 0 : r[1]) || e;
61
+ var a;
62
+ const e = ((a = t == null ? void 0 : t.toString().match(/^(\d+)/)) == null ? void 0 : a[1]) || t;
57
63
  return /* @__PURE__ */ n("span", {
58
- className: t.footnote,
59
- children: o
64
+ className: r.footnote,
65
+ children: e
60
66
  });
61
- }, C = {
62
- code: N,
63
- table: k,
64
- blockquote: g,
65
- ol: j,
66
- sup: x,
67
- // Handle footnote references
68
- // Custom paragraph component to handle inline elements properly
67
+ }, R = {
68
+ code: L,
69
+ table: v,
70
+ blockquote: B,
71
+ ol: q,
72
+ sup: w,
69
73
  p: ({
70
- children: e
74
+ children: t
71
75
  }) => /* @__PURE__ */ n("div", {
72
- className: t.inlineParagraph,
73
- children: e
76
+ className: r.inlineParagraph,
77
+ children: t
74
78
  }),
75
- // Handle footnote references that might be rendered as links
76
- a: (e) => {
77
- var r, s, i, l;
78
- if ((r = e.href) != null && r.startsWith("#user-content-fn")) {
79
- const a = ((i = (s = e.children) == null ? void 0 : s.toString().match(/^(\d+)/)) == null ? void 0 : i[1]) || e.children;
80
- return /* @__PURE__ */ n("a", {
81
- className: t.footnoteReference,
82
- href: e.href,
83
- children: a
84
- });
85
- }
86
- if (e.href && f(e.href)) {
87
- const a = ((l = e.children) == null ? void 0 : l.toString()) || "";
88
- return /* @__PURE__ */ n("span", {
89
- style: {
90
- display: "inline-block"
91
- },
92
- children: /* @__PURE__ */ n(u, {
93
- fileName: a,
94
- href: e.href
95
- })
79
+ a: u
80
+ }, M = ({
81
+ children: t,
82
+ isInlineCitationV2Enabled: e = !1
83
+ }) => {
84
+ const a = {
85
+ ...R,
86
+ a: (c) => {
87
+ var i;
88
+ const {
89
+ href: s,
90
+ children: o
91
+ } = c;
92
+ if (k(s)) {
93
+ const l = ((i = o == null ? void 0 : o.toString().match(/^(\d+)/)) == null ? void 0 : i[1]) || o;
94
+ return /* @__PURE__ */ n(p, {
95
+ href: s,
96
+ children: /* @__PURE__ */ n("span", {
97
+ className: r.footnoteReference,
98
+ children: l
99
+ })
100
+ });
101
+ }
102
+ if (h(s)) {
103
+ const l = (o == null ? void 0 : o.toString()) || "";
104
+ return /* @__PURE__ */ n(g, {
105
+ fileName: l,
106
+ href: s,
107
+ isInlineCitationV2Enabled: e
108
+ });
109
+ }
110
+ return j(s) ? /* @__PURE__ */ n(u, {
111
+ href: s,
112
+ children: o
113
+ }) : /* @__PURE__ */ n(u, {
114
+ href: s,
115
+ children: o
96
116
  });
97
117
  }
98
- return /* @__PURE__ */ n(b, {
99
- href: e.href,
100
- children: e.children
101
- });
102
- }
103
- }, y = ({
104
- children: e
105
- }) => /* @__PURE__ */ n("div", {
106
- className: t.markdownContent,
107
- children: /* @__PURE__ */ n(d, {
108
- components: C,
109
- remarkPlugins: [h],
110
- children: e
111
- })
112
- });
118
+ };
119
+ return /* @__PURE__ */ n("div", {
120
+ className: r.markdownContent,
121
+ children: /* @__PURE__ */ n(d, {
122
+ components: a,
123
+ remarkPlugins: [f],
124
+ children: t
125
+ })
126
+ });
127
+ };
113
128
  export {
114
- g as Blockquote,
115
- N as CodeBlock,
116
- x as Footnote,
117
- b as Link,
118
- j as Ol,
119
- k as Table,
120
- y as default
129
+ B as Blockquote,
130
+ L as CodeBlock,
131
+ w as Footnote,
132
+ u as Link,
133
+ q as Ol,
134
+ v as Table,
135
+ M as default
121
136
  };
@@ -1,36 +1,32 @@
1
- const d = (e) => {
1
+ const u = (e) => {
2
2
  try {
3
3
  const {
4
- hostname: o
4
+ hostname: t
5
5
  } = new URL(e);
6
- return o.endsWith(".box.com") || o.endsWith(".box.net");
6
+ return t.endsWith(".box.com") || t.endsWith(".box.net");
7
7
  } catch {
8
8
  return !1;
9
9
  }
10
- }, u = (e) => e.includes(".box.com") || e.includes(".box.net"), f = (e, o = {}) => {
10
+ }, f = (e) => e.includes(".box.com") || e.includes(".box.net"), p = (e, t = {}) => {
11
11
  const {
12
- items: t = [],
13
- isCompleted: r = !0,
14
- isInlineCitationsEnabled: c = !0,
15
- baseUrl: i = typeof window < "u" ? window.location.origin : ""
16
- } = o;
17
- if (!t.length || !r || !c)
12
+ items: i = [],
13
+ isCompleted: s = !0,
14
+ isInlineCitationsEnabled: r = !0,
15
+ baseUrl: c = typeof window < "u" ? window.location.origin : ""
16
+ } = t;
17
+ if (!i.length || !s || !r)
18
18
  return e;
19
- let a = e;
20
- return t.forEach((n) => {
21
- if (!n.name)
19
+ let o = e;
20
+ return i.forEach((n) => {
21
+ if (!n.name || !n.id || n.type !== "file")
22
22
  return;
23
- const l = `${i}/file/${n.id}`, $ = [`["${n.name}"]`, `['${n.name}']`, `[${n.name}]`, `("${n.name}")`, `('${n.name}')`, `(${n.name})`, `{"${n.name}"}`, `{'${n.name}'}`, `{${n.name}}`, `"${n.name}"`, `'${n.name}'`, n.name];
24
- for (const s of $)
25
- if (a.includes(s)) {
26
- a = a.replaceAll(s, `[${n.name}](${l})`);
27
- return;
28
- }
29
- }), a;
23
+ const a = `${c}/file/${n.id}`, l = n.name.replace(/[.*+?^${}()|[\]\\]/g, "\\$&"), d = new RegExp(`\\b${l}\\b`, "gi");
24
+ o = o.replace(d, `[${n.name}](${a})`);
25
+ }), o;
30
26
  };
31
27
  export {
32
- f as default,
33
- f as injectInlineCitation,
34
- u as isBoxCitation,
35
- d as isBoxDomain
28
+ p as default,
29
+ p as injectInlineCitation,
30
+ f as isBoxCitation,
31
+ u as isBoxDomain
36
32
  };
@@ -1 +1 @@
1
- ._markdownContent_hd94b_1{display:block}._inlineParagraph_hd94b_5{display:block;margin:0 0 1em;line-height:1.6}._tableWrapper_hd94b_11{margin:var(--space-5) 0;overflow-x:auto}._tableWrapper_hd94b_11 table{width:max-content;min-width:100%;border-collapse:collapse}._tableWrapper_hd94b_11 table,._tableWrapper_hd94b_11 th,._tableWrapper_hd94b_11 td{padding:var(--space-2) var(--space-3);border:var(--border-1) solid var(--gray-10)}._tableWrapper_hd94b_11 th{color:var(--text-text-on-light);font-weight:var(--bp-font-weight-semibold);font-size:var(--bp-font-size-05);line-height:var(--bp-font-line-height-05);background-color:var(--gray-05)}._tableWrapper_hd94b_11 th,._tableWrapper_hd94b_11 td{max-width:calc(var(--space-20) * 3)}._hljs_hd94b_38{position:relative;display:flex;flex-direction:column;overflow-x:auto;background:var(--gray-100)}._hljs_hd94b_38 code{display:grid;white-space:pre}._hljsLanguage_hd94b_50{position:sticky;top:0;left:0;padding:var(--space-2) var(--space-3);color:var(--gray-white);font-weight:var(--bp-font-weight-semibold);font-size:var(--bp-font-size-05);line-height:var(--bp-font-line-height-05);background:var(--gray-90);border-bottom:var(--border-1) solid var(--gray-80)}._hljsContent_hd94b_63{flex:1 1 auto;padding:var(--space-5)}._hljsLine_hd94b_68{display:flex;align-items:flex-start}._hljsLineNumber_hd94b_73{flex:0 0 auto;box-sizing:border-box;width:var(--size-10);padding:var(--space-2) var(--space-1);color:var(--gray-40);text-align:center;background:var(--gray-90);border-right:var(--border-1) solid var(--gray-80);-webkit-user-select:none;user-select:none}._hljsLineContent_hd94b_85{padding:var(--space-2) 0 0 var(--space-1);overflow:hidden}._inlineCitationGroup_hd94b_90{display:inline-flex;max-width:calc(var(--size-20) * 2.5);vertical-align:baseline}._inlineCitationGroup_hd94b_90 ._inline-citation-chip-button_hd94b_95{display:flex;gap:var(--space-2);align-items:center;min-width:0;max-width:100%;overflow:hidden}._inlineCitationGroup_hd94b_90 ._inline-citation-chip-button_hd94b_95 svg,._inlineCitationGroup_hd94b_90 ._inline-citation-chip-button_hd94b_95 ._inline-citation-file-icon_hd94b_104{flex-shrink:0;width:var(--size-5);height:var(--size-5)}._inlineCitationGroup_hd94b_90 ._inline-citation-chip-button_hd94b_95 ._bp-filter-chip-label_hd94b_109,._inlineCitationGroup_hd94b_90 ._inline-citation-chip-button_hd94b_95 ._inline-citation-filename-label_hd94b_110{flex:1 1 auto;min-width:0;overflow:hidden;white-space:nowrap;text-overflow:ellipsis}
1
+ ._markdownContent_13xwk_1{display:block}._inlineParagraph_13xwk_5{display:block;margin:0 0 1em;line-height:1.6}._tableWrapper_13xwk_11{margin:var(--space-5) 0;overflow-x:auto}._tableWrapper_13xwk_11 table{width:max-content;min-width:100%;border-collapse:collapse}._tableWrapper_13xwk_11 table,._tableWrapper_13xwk_11 th,._tableWrapper_13xwk_11 td{padding:var(--space-2) var(--space-3);border:var(--border-1) solid var(--gray-10)}._tableWrapper_13xwk_11 th{color:var(--text-text-on-light);font-weight:var(--bp-font-weight-semibold);font-size:var(--bp-font-size-05);line-height:var(--bp-font-line-height-05);background-color:var(--gray-05)}._tableWrapper_13xwk_11 th,._tableWrapper_13xwk_11 td{max-width:calc(var(--space-20) * 3)}._hljs_13xwk_38{position:relative;display:flex;flex-direction:column;overflow-x:auto;background:var(--gray-100)}._hljs_13xwk_38 code{display:grid;white-space:pre}._hljsLanguage_13xwk_50{position:sticky;top:0;left:0;padding:var(--space-2) var(--space-3);color:var(--gray-white);font-weight:var(--bp-font-weight-semibold);font-size:var(--bp-font-size-05);line-height:var(--bp-font-line-height-05);background:var(--gray-90);border-bottom:var(--border-1) solid var(--gray-80)}._hljsContent_13xwk_63{flex:1 1 auto;padding:var(--space-5)}._hljsLine_13xwk_68{display:flex;align-items:flex-start}._hljsLineNumber_13xwk_73{flex:0 0 auto;box-sizing:border-box;width:var(--size-10);padding:var(--space-2) var(--space-1);color:var(--gray-40);text-align:center;background:var(--gray-90);border-right:var(--border-1) solid var(--gray-80);-webkit-user-select:none;user-select:none}._hljsLineContent_13xwk_85{padding:var(--space-2) 0 0 var(--space-1);overflow:hidden}._inlineCitation_13xwk_90._inlineCitation_13xwk_90._inlineCitation_13xwk_90{display:inline;color:var(--text-text-on-light-secondary, #6F6F6F);text-decoration:underline;text-decoration-style:dotted;text-decoration-thickness:1px;text-underline-offset:2px;vertical-align:baseline;cursor:pointer}._inlineCitation_13xwk_90._inlineCitation_13xwk_90._inlineCitation_13xwk_90:hover,._inlineCitation_13xwk_90._inlineCitation_13xwk_90._inlineCitation_13xwk_90:active{color:var(--text-text-on-light-secondary, #6F6F6F)}._inlineCitation_13xwk_90._inlineCitation_13xwk_90._inlineCitation_13xwk_90:focus-visible{color:var(--text-text-on-light-secondary, #6F6F6F)}._inlineCitation_13xwk_90._inlineCitation_13xwk_90._inlineCitation_13xwk_90:visited{color:var(--text-text-on-light-secondary, #6F6F6F);text-decoration:underline;text-decoration-style:dotted}._inlineCitationWrapper_13xwk_115{display:inline-block}
@@ -5,8 +5,16 @@ export type BoxAiContentAnswersProps = Omit<ContentProps, 'isErrorMessageShown'
5
5
  /** Flag to indicate if the host application has custom suggested questions */
6
6
  hasCustomSuggestedQuestions?: boolean;
7
7
  hostAppName?: string;
8
+ /** Items that are going to be shown within a dropdown to indicate which files are supported and which ones won't */
9
+ items?: Array<{
10
+ id: string;
11
+ name: string;
12
+ type: string;
13
+ }>;
8
14
  /** Whether to use the new React Markdown renderer instead of the legacy Remarkable renderer */
9
15
  isReactMarkdownEnabled?: boolean;
16
+ /** Whether to use the V2 inline citation component (stylized hyperlink) instead of plain hyperlink */
17
+ isInlineCitationV2Enabled?: boolean;
10
18
  /** Callback when the user clicks on retry */
11
19
  retryQuestion?: RetryQuestion;
12
20
  /** Callback when the user clicks on stop response */