@box/box-ai-content-answers 0.86.2 → 0.87.2

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 (127) hide show
  1. package/chunks/clear-conversation-button.js +12 -13
  2. package/chunks/markdown.js +12168 -0
  3. package/esm/lib/box-ai-content-answers.js +11 -12
  4. package/esm/lib/components/agents/agent-editor.js +7 -8
  5. package/esm/lib/components/agents/agent-selector.js +3 -4
  6. package/esm/lib/components/answer/answer-content.js +5 -6
  7. package/esm/lib/components/answer/answer.js +604 -107
  8. package/esm/lib/components/answer/citation.js +4 -5
  9. package/esm/lib/components/answer/inline-error.js +4 -5
  10. package/esm/lib/components/answer/loading-element.js +4 -5
  11. package/esm/lib/components/answer/references.js +19 -20
  12. package/esm/lib/components/answer/thumb-buttons.js +11 -12
  13. package/esm/lib/components/chat/chat.js +13 -14
  14. package/esm/lib/components/common/markdown.js +3 -12212
  15. package/esm/lib/components/common/media-container.js +10 -11
  16. package/esm/lib/components/content/content.js +4 -5
  17. package/esm/lib/components/footer/footer-actions.js +3 -4
  18. package/esm/lib/components/footer/footer.js +3 -4
  19. package/esm/lib/components/modal-error/modal-error.js +3 -4
  20. package/esm/lib/components/question/question.js +12 -13
  21. package/esm/lib/components/suggested-questions/suggested-questions.js +10 -11
  22. package/esm/lib/components/suggested-questions/suggestions.js +8 -9
  23. package/esm/lib/components/welcome-message/contextual-items-message.js +4 -5
  24. package/esm/lib/components/welcome-message/items-dropdown.js +15 -16
  25. package/esm/lib/components/welcome-message/unsupported-items-notice.js +9 -10
  26. package/esm/lib/components/welcome-message/welcome-message.js +11 -12
  27. package/i18n/bn-IN.js +3 -3
  28. package/i18n/bn-IN.properties +7 -3
  29. package/i18n/da-DK.js +3 -3
  30. package/i18n/da-DK.properties +7 -3
  31. package/i18n/de-DE.js +3 -3
  32. package/i18n/de-DE.properties +7 -3
  33. package/i18n/en-AU.js +3 -3
  34. package/i18n/en-AU.properties +7 -3
  35. package/i18n/en-CA.js +1 -1
  36. package/i18n/en-CA.properties +5 -1
  37. package/i18n/en-GB.js +3 -3
  38. package/i18n/en-GB.properties +7 -3
  39. package/i18n/en-x-pseudo.js +59 -59
  40. package/i18n/en-x-pseudo.properties +61 -57
  41. package/i18n/es-419.js +3 -3
  42. package/i18n/es-419.properties +7 -3
  43. package/i18n/es-ES.js +3 -3
  44. package/i18n/es-ES.properties +7 -3
  45. package/i18n/fi-FI.js +3 -3
  46. package/i18n/fi-FI.properties +7 -3
  47. package/i18n/fr-CA.js +3 -3
  48. package/i18n/fr-CA.properties +7 -3
  49. package/i18n/fr-FR.js +3 -3
  50. package/i18n/fr-FR.properties +7 -3
  51. package/i18n/hi-IN.js +3 -3
  52. package/i18n/hi-IN.properties +7 -3
  53. package/i18n/it-IT.js +3 -3
  54. package/i18n/it-IT.properties +7 -3
  55. package/i18n/ja-JP.js +4 -4
  56. package/i18n/ja-JP.properties +8 -4
  57. package/i18n/ko-KR.js +3 -3
  58. package/i18n/ko-KR.properties +7 -3
  59. package/i18n/nb-NO.js +3 -3
  60. package/i18n/nb-NO.properties +7 -3
  61. package/i18n/nl-NL.js +3 -3
  62. package/i18n/nl-NL.properties +7 -3
  63. package/i18n/pl-PL.js +3 -3
  64. package/i18n/pl-PL.properties +7 -3
  65. package/i18n/pt-BR.js +3 -3
  66. package/i18n/pt-BR.properties +7 -3
  67. package/i18n/ru-RU.js +3 -3
  68. package/i18n/ru-RU.properties +7 -3
  69. package/i18n/sv-SE.js +3 -3
  70. package/i18n/sv-SE.properties +7 -3
  71. package/i18n/tr-TR.js +3 -3
  72. package/i18n/tr-TR.properties +7 -3
  73. package/i18n/zh-CN.js +3 -3
  74. package/i18n/zh-CN.properties +7 -3
  75. package/i18n/zh-TW.js +3 -3
  76. package/i18n/zh-TW.properties +7 -3
  77. package/package.json +7 -7
  78. package/types/lib/box-ai-content-answers.d.ts +1 -1
  79. package/types/lib/components/agents/agent-editor.d.ts +1 -1
  80. package/types/lib/components/agents/agent-selector.d.ts +1 -1
  81. package/types/lib/components/agents/stories/shared.d.ts +3 -3
  82. package/types/lib/components/answer/answer-content.d.ts +2 -2
  83. package/types/lib/components/answer/answer.d.ts +1 -1
  84. package/types/lib/components/answer/citation.d.ts +1 -1
  85. package/types/lib/components/answer/copy-button.d.ts +1 -1
  86. package/types/lib/components/answer/inline-error.d.ts +1 -1
  87. package/types/lib/components/answer/loading-element.d.ts +1 -1
  88. package/types/lib/components/answer/no-citations.d.ts +1 -1
  89. package/types/lib/components/answer/references.d.ts +1 -1
  90. package/types/lib/components/answer/stories/shared.d.ts +1 -1
  91. package/types/lib/components/answer/thumb-buttons.d.ts +1 -1
  92. package/types/lib/components/api-wrapper/api-wrapper.d.ts +1 -1
  93. package/types/lib/components/api-wrapper/constants.d.ts +1 -1
  94. package/types/lib/components/api-wrapper/content-answers-component.d.ts +1 -1
  95. package/types/lib/components/api-wrapper/hooks/useContentAnswers.d.ts +4 -4
  96. package/types/lib/components/api-wrapper/records.d.ts +1 -1
  97. package/types/lib/components/api-wrapper/stories/shared.d.ts +1 -1
  98. package/types/lib/components/api-wrapper/test-utils/ReadableStreamSimulator.d.ts +1 -1
  99. package/types/lib/components/api-wrapper/types.d.ts +3 -3
  100. package/types/lib/components/api-wrapper/utils/format.d.ts +1 -1
  101. package/types/lib/components/api-wrapper/utils/request.d.ts +3 -3
  102. package/types/lib/components/api-wrapper/utils/stream.d.ts +1 -1
  103. package/types/lib/components/chat/chat.d.ts +1 -1
  104. package/types/lib/components/common/constants.d.ts +1 -1
  105. package/types/lib/components/common/media-container.d.ts +2 -2
  106. package/types/lib/components/common/mock-data.d.ts +4 -4
  107. package/types/lib/components/content/content.d.ts +1 -1
  108. package/types/lib/components/footer/footer-actions.d.ts +1 -1
  109. package/types/lib/components/footer/footer.d.ts +1 -1
  110. package/types/lib/components/footer/stories/shared.d.ts +7 -7
  111. package/types/lib/components/modal/modal.d.ts +5 -5
  112. package/types/lib/components/modal/stories/shared.d.ts +2 -2
  113. package/types/lib/components/modal-error/stories/shared.d.ts +1 -1
  114. package/types/lib/components/question/question.d.ts +1 -1
  115. package/types/lib/components/question/stories/shared.d.ts +1 -1
  116. package/types/lib/components/suggested-questions/mocks.d.ts +1 -1
  117. package/types/lib/components/suggested-questions/stories/shared.d.ts +1 -1
  118. package/types/lib/components/suggested-questions/suggested-questions.d.ts +1 -1
  119. package/types/lib/components/suggested-questions/suggestions.d.ts +1 -1
  120. package/types/lib/components/welcome-message/contextual-items-message.d.ts +1 -1
  121. package/types/lib/components/welcome-message/items-dropdown.d.ts +1 -1
  122. package/types/lib/components/welcome-message/stories/shared.d.ts +4 -4
  123. package/types/lib/components/welcome-message/unsupported-items-notice.d.ts +1 -1
  124. package/types/lib/components/welcome-message/welcome-message.d.ts +1 -1
  125. package/types/lib/contexts/AgentsContext.d.ts +1 -1
  126. package/types/lib/stories/shared.d.ts +3 -3
  127. package/types/lib/types.d.ts +2 -2
@@ -1,16 +1,15 @@
1
- import "../../styles/box-ai-content-answers.css";
2
- import w from "clsx";
1
+ import S from "clsx";
3
2
  import * as t from "react";
4
3
  import { AgentEditor as R } from "./components/agents/agent-editor.js";
5
4
  import { Content as z } from "./components/content/content.js";
6
5
  import { Footer as G } from "./components/footer/footer.js";
7
6
  import { jsx as o, jsxs as H } from "react/jsx-runtime";
8
- const J = "_container_m6vks_1", K = "_contentAnswers_m6vks_8", O = "_sidebar_m6vks_19", a = {
7
+ import '../../styles/box-ai-content-answers.css';const J = "_container_m6vks_1", K = "_contentAnswers_m6vks_8", O = "_sidebar_m6vks_19", a = {
9
8
  container: J,
10
9
  contentAnswers: K,
11
10
  sidebar: O
12
- }, $ = ({
13
- className: S,
11
+ }, Z = ({
12
+ className: p,
14
13
  contentType: c,
15
14
  contentName: A,
16
15
  error: e,
@@ -35,13 +34,13 @@ const J = "_container_m6vks_1", K = "_contentAnswers_m6vks_8", O = "_sidebar_m6v
35
34
  hostAppName: N,
36
35
  ...y
37
36
  }) => {
38
- const [g, b] = t.useState(null), [f, _] = t.useState(e != null), [s, p] = t.useState(!1), B = !f && !d;
37
+ const [g, b] = t.useState(null), [f, _] = t.useState(e != null), [s, w] = t.useState(!1), B = !f && !d;
39
38
  return t.useEffect(() => {
40
39
  _(e != null);
41
40
  }, [e]), /* @__PURE__ */ o("div", {
42
- className: w(S, a.container),
41
+ className: S(p, a.container),
43
42
  children: /* @__PURE__ */ H("div", {
44
- className: w(a.contentAnswers, u === "sidebar" && a.sidebar),
43
+ className: S(a.contentAnswers, u === "sidebar" && a.sidebar),
45
44
  children: [!s && /* @__PURE__ */ o(z, {
46
45
  ...y,
47
46
  askSuggestedQuestion: g,
@@ -65,7 +64,7 @@ const J = "_container_m6vks_1", K = "_contentAnswers_m6vks_8", O = "_sidebar_m6v
65
64
  }), s && /* @__PURE__ */ o(R, {
66
65
  onAgentEditorToggle: F,
67
66
  recordAction: i,
68
- setIsDebugModeShown: p
67
+ setIsDebugModeShown: w
69
68
  }), B && /* @__PURE__ */ o(G, {
70
69
  askSuggestedQuestion: g,
71
70
  contentType: c,
@@ -83,7 +82,7 @@ const J = "_container_m6vks_1", K = "_contentAnswers_m6vks_8", O = "_sidebar_m6v
83
82
  sendQuestion: E,
84
83
  setAskSuggestedQuestion: b,
85
84
  toggleDebugMode: () => {
86
- p(!s);
85
+ w(!s);
87
86
  },
88
87
  user: m,
89
88
  variant: u
@@ -92,6 +91,6 @@ const J = "_container_m6vks_1", K = "_contentAnswers_m6vks_8", O = "_sidebar_m6v
92
91
  });
93
92
  };
94
93
  export {
95
- $ as BoxAiContentAnswers,
96
- $ as default
94
+ Z as BoxAiContentAnswers,
95
+ Z as default
97
96
  };
@@ -1,5 +1,4 @@
1
- import "../../../../styles/agent-editor.css";
2
- import { TextArea as c } from "@box/blueprint-web";
1
+ import { TextArea as m } from "@box/blueprint-web";
3
2
  import { useEffect as a, createRef as u } from "react";
4
3
  import { useIntl as d } from "react-intl";
5
4
  import { isDebugModeTrigger as l } from "../common/keyInputUtils.js";
@@ -7,10 +6,10 @@ import p from "../footer/messages.js";
7
6
  import { useAgents as b, useAgentsDispatch as _ } from "../../contexts/AgentsContext.js";
8
7
  import { LOGGER_BASE_CONFIG as h } from "../common/constants.js";
9
8
  import { jsx as E } from "react/jsx-runtime";
10
- const N = "_debug_gfw1n_1", O = "_sidebar_gfw1n_9", R = {
9
+ import '../../../../styles/agent-editor.css';const N = "_debug_gfw1n_1", O = "_sidebar_gfw1n_9", R = {
11
10
  debug: N,
12
11
  sidebar: O
13
- }, w = 25, T = ({
12
+ }, w = 25, S = ({
14
13
  onAgentEditorToggle: n,
15
14
  recordAction: o,
16
15
  setIsDebugModeShown: i
@@ -37,10 +36,10 @@ const N = "_debug_gfw1n_1", O = "_sidebar_gfw1n_9", R = {
37
36
  agentName: t.name,
38
37
  agentConfig: JSON.parse(e.current.value)
39
38
  });
40
- }, m = (s) => {
39
+ }, c = (s) => {
41
40
  l(s) && i(!1);
42
41
  };
43
- return /* @__PURE__ */ E(c, {
42
+ return /* @__PURE__ */ E(m, {
44
43
  ref: e,
45
44
  className: R.debug,
46
45
  "data-testid": "content-answers-debug",
@@ -48,9 +47,9 @@ const N = "_debug_gfw1n_1", O = "_sidebar_gfw1n_9", R = {
48
47
  label: r(p.askQuestionPlaceholder),
49
48
  maxRows: w,
50
49
  onChange: g,
51
- onKeyDown: m
50
+ onKeyDown: c
52
51
  });
53
52
  };
54
53
  export {
55
- T as AgentEditor
54
+ S as AgentEditor
56
55
  };
@@ -1,4 +1,3 @@
1
- import "../../../../styles/agent-selector.css";
2
1
  import { FilterChip as n, Popover as a, Status as S, SmallList as i } from "@box/blueprint-web";
3
2
  import { useState as f, useCallback as C } from "react";
4
3
  import { useIntl as I } from "react-intl";
@@ -6,12 +5,12 @@ import { useAgents as N, useAgentsDispatch as G } from "../../contexts/AgentsCon
6
5
  import { LOGGER_BASE_CONFIG as O, LOGGER_ACTION_CLICK as A } from "../common/constants.js";
7
6
  import p from "./messages.js";
8
7
  import { jsx as e, jsxs as d } from "react/jsx-runtime";
9
- const E = "_agentSelector_rri97_1", x = "_agentStatus_rri97_5", T = "_agentList_rri97_20", v = "_agentListItem_rri97_20", s = {
8
+ import '../../../../styles/agent-selector.css';const E = "_agentSelector_rri97_1", x = "_agentStatus_rri97_5", T = "_agentList_rri97_20", v = "_agentListItem_rri97_20", s = {
10
9
  agentSelector: E,
11
10
  agentStatus: x,
12
11
  agentList: T,
13
12
  agentListItem: v
14
- }, M = ({
13
+ }, K = ({
15
14
  onSelectAgent: r,
16
15
  recordAction: o
17
16
  }) => {
@@ -72,5 +71,5 @@ const E = "_agentSelector_rri97_1", x = "_agentStatus_rri97_5", T = "_agentList_
72
71
  });
73
72
  };
74
73
  export {
75
- M as AgentSelector
74
+ K as AgentSelector
76
75
  };
@@ -1,12 +1,11 @@
1
- import "../../../../styles/answer-content.css";
2
1
  import d from "clsx";
3
- import w from "../common/markdown.js";
2
+ import { m as w } from "../../../../chunks/markdown.js";
4
3
  import { jsxs as _, Fragment as c, jsx as i } from "react/jsx-runtime";
5
- const b = "_answerContent_o18bz_1", l = "_sidebar_o18bz_15", C = "_answerMarkdown_o18bz_18", e = {
4
+ import '../../../../styles/answer-content.css';const b = "_answerContent_o18bz_1", l = "_sidebar_o18bz_15", C = "_answerMarkdown_o18bz_18", e = {
6
5
  answerContent: b,
7
6
  sidebar: l,
8
7
  answerMarkdown: C
9
- }, u = ({
8
+ }, p = ({
10
9
  answer: n,
11
10
  isMarkdownEnabled: r,
12
11
  className: t,
@@ -30,6 +29,6 @@ const b = "_answerContent_o18bz_1", l = "_sidebar_o18bz_15", C = "_answerMarkdow
30
29
  });
31
30
  };
32
31
  export {
33
- u as AnswerContent,
34
- u as default
32
+ p as AnswerContent,
33
+ p as default
35
34
  };