@bikdotai/bik-component-library 0.0.856 → 0.0.857-beta.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 (93) hide show
  1. package/README.md +25 -4
  2. package/dist/cjs/components/bik-copilot/BIKCopilot.js +2 -0
  3. package/dist/cjs/components/bik-copilot/BIKCopilot.js.map +1 -0
  4. package/dist/cjs/components/bik-copilot/ControlledCopilot.js +2 -0
  5. package/dist/cjs/components/bik-copilot/ControlledCopilot.js.map +1 -0
  6. package/dist/cjs/components/bik-copilot/ControlledCopilot.styled.js +27 -0
  7. package/dist/cjs/components/bik-copilot/ControlledCopilot.styled.js.map +1 -0
  8. package/dist/cjs/components/bik-copilot/CopilotBall.js +2 -0
  9. package/dist/cjs/components/bik-copilot/CopilotBall.js.map +1 -0
  10. package/dist/cjs/components/bik-copilot/CopilotBall.styled.js +42 -0
  11. package/dist/cjs/components/bik-copilot/CopilotBall.styled.js.map +1 -0
  12. package/dist/cjs/components/bik-copilot/CopilotPanel.js +2 -0
  13. package/dist/cjs/components/bik-copilot/CopilotPanel.js.map +1 -0
  14. package/dist/cjs/components/bik-copilot/CopilotPanel.styled.js +419 -0
  15. package/dist/cjs/components/bik-copilot/CopilotPanel.styled.js.map +1 -0
  16. package/dist/cjs/components/bik-copilot/copilotPlacement.js +2 -0
  17. package/dist/cjs/components/bik-copilot/copilotPlacement.js.map +1 -0
  18. package/dist/cjs/components/bik-copilot/services/copilotDb.js +2 -0
  19. package/dist/cjs/components/bik-copilot/services/copilotDb.js.map +1 -0
  20. package/dist/cjs/components/bik-copilot/services/copilotIcebreakersClient.js +2 -0
  21. package/dist/cjs/components/bik-copilot/services/copilotIcebreakersClient.js.map +1 -0
  22. package/dist/cjs/components/bik-copilot/services/copilotMessagesClient.js +2 -0
  23. package/dist/cjs/components/bik-copilot/services/copilotMessagesClient.js.map +1 -0
  24. package/dist/cjs/components/bik-copilot/services/copilotPageSession.js +2 -0
  25. package/dist/cjs/components/bik-copilot/services/copilotPageSession.js.map +1 -0
  26. package/dist/cjs/components/bik-copilot/services/copilotSseParser.js +7 -0
  27. package/dist/cjs/components/bik-copilot/services/copilotSseParser.js.map +1 -0
  28. package/dist/cjs/components/bik-copilot/services/copilotStreamClient.js +2 -0
  29. package/dist/cjs/components/bik-copilot/services/copilotStreamClient.js.map +1 -0
  30. package/dist/cjs/components/bik-copilot/useCopilotIcebreakers.js +2 -0
  31. package/dist/cjs/components/bik-copilot/useCopilotIcebreakers.js.map +1 -0
  32. package/dist/cjs/components/bik-copilot/useCopilotStreamChat.js +2 -0
  33. package/dist/cjs/components/bik-copilot/useCopilotStreamChat.js.map +1 -0
  34. package/dist/cjs/components/bik-copilot/useDraggableFloater.js +2 -0
  35. package/dist/cjs/components/bik-copilot/useDraggableFloater.js.map +1 -0
  36. package/dist/cjs/index.js +1 -1
  37. package/dist/esm/components/bik-copilot/BIKCopilot.d.ts +32 -0
  38. package/dist/esm/components/bik-copilot/BIKCopilot.js +114 -0
  39. package/dist/esm/components/bik-copilot/BIKCopilot.js.map +1 -0
  40. package/dist/esm/components/bik-copilot/ControlledCopilot.d.ts +14 -0
  41. package/dist/esm/components/bik-copilot/ControlledCopilot.js +170 -0
  42. package/dist/esm/components/bik-copilot/ControlledCopilot.js.map +1 -0
  43. package/dist/esm/components/bik-copilot/ControlledCopilot.styled.d.ts +7 -0
  44. package/dist/esm/components/bik-copilot/ControlledCopilot.styled.js +31 -0
  45. package/dist/esm/components/bik-copilot/ControlledCopilot.styled.js.map +1 -0
  46. package/dist/esm/components/bik-copilot/CopilotBall.d.ts +13 -0
  47. package/dist/esm/components/bik-copilot/CopilotBall.js +50 -0
  48. package/dist/esm/components/bik-copilot/CopilotBall.js.map +1 -0
  49. package/dist/esm/components/bik-copilot/CopilotBall.styled.d.ts +9 -0
  50. package/dist/esm/components/bik-copilot/CopilotBall.styled.js +46 -0
  51. package/dist/esm/components/bik-copilot/CopilotBall.styled.js.map +1 -0
  52. package/dist/esm/components/bik-copilot/CopilotPanel.d.ts +9 -0
  53. package/dist/esm/components/bik-copilot/CopilotPanel.js +309 -0
  54. package/dist/esm/components/bik-copilot/CopilotPanel.js.map +1 -0
  55. package/dist/esm/components/bik-copilot/CopilotPanel.styled.d.ts +58 -0
  56. package/dist/esm/components/bik-copilot/CopilotPanel.styled.js +453 -0
  57. package/dist/esm/components/bik-copilot/CopilotPanel.styled.js.map +1 -0
  58. package/dist/esm/components/bik-copilot/copilotPlacement.d.ts +24 -0
  59. package/dist/esm/components/bik-copilot/copilotPlacement.js +38 -0
  60. package/dist/esm/components/bik-copilot/copilotPlacement.js.map +1 -0
  61. package/dist/esm/components/bik-copilot/index.d.ts +16 -0
  62. package/dist/esm/components/bik-copilot/model.d.ts +674 -0
  63. package/dist/esm/components/bik-copilot/services/copilotDb.d.ts +90 -0
  64. package/dist/esm/components/bik-copilot/services/copilotDb.js +96 -0
  65. package/dist/esm/components/bik-copilot/services/copilotDb.js.map +1 -0
  66. package/dist/esm/components/bik-copilot/services/copilotIcebreakersClient.d.ts +11 -0
  67. package/dist/esm/components/bik-copilot/services/copilotIcebreakersClient.js +54 -0
  68. package/dist/esm/components/bik-copilot/services/copilotIcebreakersClient.js.map +1 -0
  69. package/dist/esm/components/bik-copilot/services/copilotMessagesClient.d.ts +23 -0
  70. package/dist/esm/components/bik-copilot/services/copilotMessagesClient.js +78 -0
  71. package/dist/esm/components/bik-copilot/services/copilotMessagesClient.js.map +1 -0
  72. package/dist/esm/components/bik-copilot/services/copilotPageSession.d.ts +37 -0
  73. package/dist/esm/components/bik-copilot/services/copilotPageSession.js +35 -0
  74. package/dist/esm/components/bik-copilot/services/copilotPageSession.js.map +1 -0
  75. package/dist/esm/components/bik-copilot/services/copilotSseParser.d.ts +22 -0
  76. package/dist/esm/components/bik-copilot/services/copilotSseParser.js +52 -0
  77. package/dist/esm/components/bik-copilot/services/copilotSseParser.js.map +1 -0
  78. package/dist/esm/components/bik-copilot/services/copilotStreamClient.d.ts +31 -0
  79. package/dist/esm/components/bik-copilot/services/copilotStreamClient.js +103 -0
  80. package/dist/esm/components/bik-copilot/services/copilotStreamClient.js.map +1 -0
  81. package/dist/esm/components/bik-copilot/useCopilotIcebreakers.d.ts +17 -0
  82. package/dist/esm/components/bik-copilot/useCopilotIcebreakers.js +60 -0
  83. package/dist/esm/components/bik-copilot/useCopilotIcebreakers.js.map +1 -0
  84. package/dist/esm/components/bik-copilot/useCopilotStreamChat.d.ts +20 -0
  85. package/dist/esm/components/bik-copilot/useCopilotStreamChat.js +333 -0
  86. package/dist/esm/components/bik-copilot/useCopilotStreamChat.js.map +1 -0
  87. package/dist/esm/components/bik-copilot/useDraggableFloater.d.ts +9 -0
  88. package/dist/esm/components/bik-copilot/useDraggableFloater.js +118 -0
  89. package/dist/esm/components/bik-copilot/useDraggableFloater.js.map +1 -0
  90. package/dist/esm/index.d.ts +1 -0
  91. package/dist/esm/index.js +793 -743
  92. package/dist/esm/index.js.map +1 -1
  93. package/package.json +1 -1
@@ -0,0 +1,309 @@
1
+ import { jsxs as r, jsx as t, Fragment as we } from "react/jsx-runtime";
2
+ import p from "../../assets/icons/bik_ai_stars_icon.svg.js";
3
+ import ve from "../../assets/icons/cross.svg.js";
4
+ import ye from "../../assets/icons/refresh.svg.js";
5
+ import Ce, { useState as B, useRef as a, useEffect as K } from "react";
6
+ import { COLORS as s } from "../../constants/Theme.js";
7
+ import { renderMarkdownLite as Ie } from "../bik-chatbot/utils/markdown.js";
8
+ import { TitleSmall as ke, BodyCaption as z, BodySecondary as Se } from "../TypographyStyle.js";
9
+ import { PanelContainer as Te, PanelHeader as be, HeaderAvatar as Be, HeaderText as Ae, HeaderTitleRow as xe, HeaderBadge as Fe, HeaderActions as Le, IconAction as J, MessagesViewport as Me, MessagesArea as He, EmptyState as Re, EmptyStateIcon as _e, SuggestionList as Ee, SuggestionChip as Pe, HistoryLoader as Oe, MessageBubble as We, InterruptedNote as $e, FollowUpList as je, FollowUpsLabel as Ne, FollowUpChip as Ue, ThinkingBubble as Ve, ThinkingLabel as Xe, ScrollFade as Ke, JumpToLatestButton as ze, ErrorBanner as Je, InputArea as Ge, InputWrapper as qe, MessageInput as De, SendButton as Qe, Disclaimer as Ye } from "./CopilotPanel.styled.js";
10
+ import { DotPulse as G } from "../dot-pulse/DotPulse.js";
11
+ const Ze = 96, et = 24, tt = 48, rt = () => /* @__PURE__ */ r(
12
+ "svg",
13
+ {
14
+ viewBox: "0 0 24 24",
15
+ width: "16",
16
+ height: "16",
17
+ fill: "none",
18
+ stroke: "currentColor",
19
+ strokeWidth: "2",
20
+ strokeLinecap: "round",
21
+ strokeLinejoin: "round",
22
+ "aria-hidden": "true",
23
+ children: [
24
+ /* @__PURE__ */ t("path", { d: "M12 19V5" }),
25
+ /* @__PURE__ */ t("path", { d: "M6 11l6-6 6 6" })
26
+ ]
27
+ }
28
+ ), ot = () => /* @__PURE__ */ r(
29
+ "svg",
30
+ {
31
+ viewBox: "0 0 24 24",
32
+ width: "14",
33
+ height: "14",
34
+ fill: "none",
35
+ stroke: "currentColor",
36
+ strokeWidth: "2",
37
+ strokeLinecap: "round",
38
+ strokeLinejoin: "round",
39
+ "aria-hidden": "true",
40
+ children: [
41
+ /* @__PURE__ */ t("path", { d: "M5 12h14" }),
42
+ /* @__PURE__ */ t("path", { d: "M13 6l6 6-6 6" })
43
+ ]
44
+ }
45
+ ), q = ({ size: i = 16 }) => /* @__PURE__ */ t(
46
+ "svg",
47
+ {
48
+ viewBox: "0 0 24 24",
49
+ width: i,
50
+ height: i,
51
+ fill: "currentColor",
52
+ "aria-hidden": "true",
53
+ children: /* @__PURE__ */ t("rect", { x: "7", y: "7", width: "10", height: "10", rx: "2" })
54
+ }
55
+ ), nt = () => /* @__PURE__ */ t(
56
+ "svg",
57
+ {
58
+ viewBox: "0 0 24 24",
59
+ width: "14",
60
+ height: "14",
61
+ fill: "none",
62
+ stroke: "currentColor",
63
+ strokeWidth: "2.5",
64
+ strokeLinecap: "round",
65
+ strokeLinejoin: "round",
66
+ "aria-hidden": "true",
67
+ children: /* @__PURE__ */ t("path", { d: "M6 9l6 6 6-6" })
68
+ }
69
+ ), gt = ({
70
+ messages: i,
71
+ onSend: f,
72
+ onClose: D,
73
+ title: g = "Copilot",
74
+ badge: A,
75
+ subtitle: x,
76
+ avatar: Q,
77
+ placeholder: Y = "Write your message...",
78
+ disclaimer: F = "AI can make mistakes, Verify the responses.",
79
+ emptyStateTitle: Z,
80
+ emptyStateSubtitle: L = "Here are some things you can try",
81
+ suggestions: m,
82
+ onSuggestionClick: ee,
83
+ showRefresh: te = !0,
84
+ onRefresh: M,
85
+ isThinking: h = !1,
86
+ thinkingLabel: H = "Thinking",
87
+ isStreaming: re = !1,
88
+ onStop: R,
89
+ interruptedLabel: _ = "This message was interrupted",
90
+ followUpsLabel: E = "Follow ups",
91
+ hasMoreHistory: oe = !1,
92
+ isLoadingHistory: d = !1,
93
+ onLoadOlderMessages: P,
94
+ historyLoadingLabel: ne = "Loading earlier messages",
95
+ inputDisabled: n = !1,
96
+ errorMessage: O,
97
+ width: le,
98
+ height: ie,
99
+ className: ce,
100
+ style: ae
101
+ }) => {
102
+ const [w, W] = B(""), [se, $] = B(!1), [v, y] = B(!0), j = a(null), C = a(null), I = a(null), k = a(0), S = a(null), u = i.filter(
103
+ (e) => e.content.length > 0 || e.wasInterrupted
104
+ ), N = u.length === 0 && !h, l = h || re, U = !n && !l && w.trim().length > 0, c = l && !!R, V = u[u.length - 1], T = !l && V?.role === "assistant" ? V.followUps : void 0, b = !N && !v;
105
+ K(() => {
106
+ v && C.current?.scrollIntoView({ behavior: "smooth" });
107
+ }, [i, h, v]), K(() => {
108
+ const e = I.current, o = S.current;
109
+ !e || o === null || d || (S.current = null, e.scrollTop = e.scrollHeight - o, k.current = e.scrollTop);
110
+ }, [i, d]);
111
+ const he = () => {
112
+ const e = I.current;
113
+ if (!e)
114
+ return;
115
+ const o = e.scrollHeight - e.scrollTop - e.clientHeight;
116
+ e.scrollTop <= tt && oe && !d && P && (S.current = e.scrollHeight - e.scrollTop, P());
117
+ const me = e.scrollTop < k.current - 1;
118
+ if (k.current = e.scrollTop, o <= et) {
119
+ y(!0);
120
+ return;
121
+ }
122
+ me && y(!1);
123
+ }, de = () => {
124
+ y(!0), C.current?.scrollIntoView({ behavior: "smooth" });
125
+ }, X = () => {
126
+ const e = w.trim();
127
+ if (!e || n || l)
128
+ return;
129
+ f(e), W("");
130
+ const o = j.current;
131
+ o && (o.style.height = "auto");
132
+ }, ue = (e) => {
133
+ W(e.target.value);
134
+ const o = e.target;
135
+ o.style.height = "auto", o.style.height = `${Math.min(
136
+ o.scrollHeight,
137
+ Ze
138
+ )}px`;
139
+ }, pe = (e) => {
140
+ e.key === "Enter" && !e.shiftKey && (e.preventDefault(), X());
141
+ }, fe = (e) => {
142
+ n || l || (ee?.(e), f(e.text));
143
+ }, ge = (e) => {
144
+ n || l || f(e);
145
+ };
146
+ return /* @__PURE__ */ r(
147
+ Te,
148
+ {
149
+ className: ce,
150
+ style: { width: le, height: ie, ...ae },
151
+ role: "dialog",
152
+ "aria-label": g,
153
+ children: [
154
+ /* @__PURE__ */ r(be, { children: [
155
+ /* @__PURE__ */ t(Be, { children: Q ?? /* @__PURE__ */ t(p, { width: 18, height: 18 }) }),
156
+ /* @__PURE__ */ r(Ae, { children: [
157
+ /* @__PURE__ */ r(xe, { children: [
158
+ /* @__PURE__ */ t(ke, { children: g }),
159
+ A && /* @__PURE__ */ t(Fe, { children: A })
160
+ ] }),
161
+ x && /* @__PURE__ */ t(z, { color: s.content.secondary, children: x })
162
+ ] }),
163
+ /* @__PURE__ */ r(Le, { children: [
164
+ te && M && /* @__PURE__ */ t(
165
+ J,
166
+ {
167
+ type: "button",
168
+ onClick: M,
169
+ "aria-label": "Start a new conversation",
170
+ children: /* @__PURE__ */ t(ye, { width: 16, height: 16 })
171
+ }
172
+ ),
173
+ /* @__PURE__ */ t(
174
+ J,
175
+ {
176
+ type: "button",
177
+ onClick: D,
178
+ "aria-label": "Close copilot",
179
+ children: /* @__PURE__ */ t(ve, { width: 18, height: 18 })
180
+ }
181
+ )
182
+ ] })
183
+ ] }),
184
+ /* @__PURE__ */ r(Me, { children: [
185
+ /* @__PURE__ */ t(
186
+ He,
187
+ {
188
+ ref: I,
189
+ onScroll: he,
190
+ role: "region",
191
+ "aria-label": "Conversation",
192
+ children: N ? /* @__PURE__ */ r(Re, { children: [
193
+ /* @__PURE__ */ t(_e, { children: /* @__PURE__ */ t(p, { width: 28, height: 28 }) }),
194
+ /* @__PURE__ */ t(Se, { style: { fontWeight: 600 }, children: Z || g }),
195
+ L && /* @__PURE__ */ t(z, { color: s.content.secondary, children: L }),
196
+ m && m.length > 0 && /* @__PURE__ */ t(Ee, { children: m.map((e) => /* @__PURE__ */ r(
197
+ Pe,
198
+ {
199
+ type: "button",
200
+ disabled: n || l,
201
+ onClick: () => fe(e),
202
+ children: [
203
+ /* @__PURE__ */ t(p, { width: 14, height: 14 }),
204
+ e.text
205
+ ]
206
+ },
207
+ e.id
208
+ )) })
209
+ ] }) : /* @__PURE__ */ r(we, { children: [
210
+ d && /* @__PURE__ */ r(Oe, { role: "status", "aria-live": "polite", children: [
211
+ /* @__PURE__ */ t(G, { color: s.content.placeholder, size: 4 }),
212
+ ne
213
+ ] }),
214
+ u.map((e) => /* @__PURE__ */ r(Ce.Fragment, { children: [
215
+ e.content.length > 0 && /* @__PURE__ */ t(We, { $role: e.role, children: e.role === "assistant" ? /* @__PURE__ */ t(
216
+ "div",
217
+ {
218
+ dangerouslySetInnerHTML: {
219
+ __html: Ie(e.content)
220
+ }
221
+ }
222
+ ) : /* @__PURE__ */ t("div", { style: { whiteSpace: "pre-wrap" }, children: e.content }) }),
223
+ e.wasInterrupted && _ && /* @__PURE__ */ r($e, { children: [
224
+ /* @__PURE__ */ t(q, { size: 12 }),
225
+ _
226
+ ] })
227
+ ] }, e.id)),
228
+ T && T.length > 0 && /* @__PURE__ */ r(je, { children: [
229
+ E && /* @__PURE__ */ t(Ne, { children: E }),
230
+ T.map((e) => /* @__PURE__ */ r(
231
+ Ue,
232
+ {
233
+ type: "button",
234
+ disabled: n,
235
+ onClick: () => ge(e),
236
+ children: [
237
+ /* @__PURE__ */ t(ot, {}),
238
+ e
239
+ ]
240
+ },
241
+ e
242
+ ))
243
+ ] }),
244
+ h && /* @__PURE__ */ r(Ve, { role: "status", "aria-live": "polite", children: [
245
+ /* @__PURE__ */ t(
246
+ p,
247
+ {
248
+ width: 14,
249
+ height: 14,
250
+ color: s.content.brand
251
+ }
252
+ ),
253
+ H && /* @__PURE__ */ t(Xe, { children: H }),
254
+ /* @__PURE__ */ t(G, { color: s.background.brand, size: 5 })
255
+ ] }),
256
+ /* @__PURE__ */ t("div", { ref: C })
257
+ ] })
258
+ }
259
+ ),
260
+ /* @__PURE__ */ t(Ke, { $visible: b, "aria-hidden": "true" }),
261
+ /* @__PURE__ */ t(
262
+ ze,
263
+ {
264
+ type: "button",
265
+ $visible: b,
266
+ onClick: de,
267
+ tabIndex: b ? 0 : -1,
268
+ "aria-label": "Scroll to the latest message",
269
+ children: /* @__PURE__ */ t(nt, {})
270
+ }
271
+ )
272
+ ] }),
273
+ O && /* @__PURE__ */ t(Je, { role: "alert", children: O }),
274
+ /* @__PURE__ */ t(Ge, { children: /* @__PURE__ */ r(qe, { $focused: se, children: [
275
+ /* @__PURE__ */ t(
276
+ De,
277
+ {
278
+ ref: j,
279
+ rows: 1,
280
+ value: w,
281
+ placeholder: Y,
282
+ disabled: n,
283
+ onChange: ue,
284
+ onKeyDown: pe,
285
+ onFocus: () => $(!0),
286
+ onBlur: () => $(!1)
287
+ }
288
+ ),
289
+ /* @__PURE__ */ t(
290
+ Qe,
291
+ {
292
+ type: "button",
293
+ $active: c || U,
294
+ disabled: !c && !U,
295
+ onClick: c ? R : X,
296
+ "aria-label": c ? "Stop generating" : "Send message",
297
+ children: c ? /* @__PURE__ */ t(q, {}) : /* @__PURE__ */ t(rt, {})
298
+ }
299
+ )
300
+ ] }) }),
301
+ F && /* @__PURE__ */ t(Ye, { children: F })
302
+ ]
303
+ }
304
+ );
305
+ };
306
+ export {
307
+ gt as CopilotPanel
308
+ };
309
+ //# sourceMappingURL=CopilotPanel.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"CopilotPanel.js","sources":["../../../../src/components/bik-copilot/CopilotPanel.tsx"],"sourcesContent":["import AiStarsIcon from '@src/assets/icons/bik_ai_stars_icon.svg';\nimport CrossIcon from '@src/assets/icons/cross.svg';\nimport RefreshIcon from '@src/assets/icons/refresh.svg';\nimport React, { useEffect, useRef, useState } from 'react';\nimport { COLORS } from '@src/constants/Theme';\nimport { renderMarkdownLite } from '../bik-chatbot/utils/markdown';\nimport { DotPulse } from '../dot-pulse';\nimport { BodyCaption, BodySecondary, TitleSmall } from '../TypographyStyle';\nimport {\n\tDisclaimer,\n\tEmptyState,\n\tEmptyStateIcon,\n\tErrorBanner,\n\tFollowUpChip,\n\tFollowUpList,\n\tFollowUpsLabel,\n\tHeaderActions,\n\tHeaderAvatar,\n\tHeaderBadge,\n\tHeaderText,\n\tHeaderTitleRow,\n\tHistoryLoader,\n\tIconAction,\n\tInputArea,\n\tInputWrapper,\n\tInterruptedNote,\n\tJumpToLatestButton,\n\tMessageBubble,\n\tMessageInput,\n\tMessagesArea,\n\tMessagesViewport,\n\tPanelContainer,\n\tPanelHeader,\n\tScrollFade,\n\tSendButton,\n\tSuggestionChip,\n\tSuggestionList,\n\tThinkingBubble,\n\tThinkingLabel,\n} from './CopilotPanel.styled';\nimport { CopilotPanelProps } from './model';\n\nconst MAX_INPUT_HEIGHT_PX = 96;\n\n/** Slack at the bottom of the scroller that still counts as \"at the latest\". */\nconst AT_BOTTOM_TOLERANCE_PX = 24;\n\n/** How close to the top counts as asking for the previous page. */\nconst NEAR_TOP_TOLERANCE_PX = 48;\n\nconst SendArrowIcon = () => (\n\t<svg\n\t\tviewBox=\"0 0 24 24\"\n\t\twidth=\"16\"\n\t\theight=\"16\"\n\t\tfill=\"none\"\n\t\tstroke=\"currentColor\"\n\t\tstrokeWidth=\"2\"\n\t\tstrokeLinecap=\"round\"\n\t\tstrokeLinejoin=\"round\"\n\t\taria-hidden=\"true\"\n\t>\n\t\t<path d=\"M12 19V5\" />\n\t\t<path d=\"M6 11l6-6 6 6\" />\n\t</svg>\n);\n\nconst ArrowRightIcon = () => (\n\t<svg\n\t\tviewBox=\"0 0 24 24\"\n\t\twidth=\"14\"\n\t\theight=\"14\"\n\t\tfill=\"none\"\n\t\tstroke=\"currentColor\"\n\t\tstrokeWidth=\"2\"\n\t\tstrokeLinecap=\"round\"\n\t\tstrokeLinejoin=\"round\"\n\t\taria-hidden=\"true\"\n\t>\n\t\t<path d=\"M5 12h14\" />\n\t\t<path d=\"M13 6l6 6-6 6\" />\n\t</svg>\n);\n\nconst StopIcon = ({ size = 16 }: { size?: number }) => (\n\t<svg\n\t\tviewBox=\"0 0 24 24\"\n\t\twidth={size}\n\t\theight={size}\n\t\tfill=\"currentColor\"\n\t\taria-hidden=\"true\"\n\t>\n\t\t<rect x=\"7\" y=\"7\" width=\"10\" height=\"10\" rx=\"2\" />\n\t</svg>\n);\n\nconst ChevronDownIcon = () => (\n\t<svg\n\t\tviewBox=\"0 0 24 24\"\n\t\twidth=\"14\"\n\t\theight=\"14\"\n\t\tfill=\"none\"\n\t\tstroke=\"currentColor\"\n\t\tstrokeWidth=\"2.5\"\n\t\tstrokeLinecap=\"round\"\n\t\tstrokeLinejoin=\"round\"\n\t\taria-hidden=\"true\"\n\t>\n\t\t<path d=\"M6 9l6 6 6-6\" />\n\t</svg>\n);\n\n/**\n * Chat panel used by the copilot. Fully presentational: it renders the\n * transcript it is given and reports user intent through callbacks, so it works\n * against any backend.\n */\nexport const CopilotPanel: React.FC<CopilotPanelProps> = ({\n\tmessages,\n\tonSend,\n\tonClose,\n\ttitle = 'Copilot',\n\tbadge,\n\tsubtitle,\n\tavatar,\n\tplaceholder = 'Write your message...',\n\tdisclaimer = 'AI can make mistakes, Verify the responses.',\n\temptyStateTitle,\n\temptyStateSubtitle = 'Here are some things you can try',\n\tsuggestions,\n\tonSuggestionClick,\n\tshowRefresh = true,\n\tonRefresh,\n\tisThinking = false,\n\tthinkingLabel = 'Thinking',\n\tisStreaming = false,\n\tonStop,\n\tinterruptedLabel = 'This message was interrupted',\n\tfollowUpsLabel = 'Follow ups',\n\thasMoreHistory = false,\n\tisLoadingHistory = false,\n\tonLoadOlderMessages,\n\thistoryLoadingLabel = 'Loading earlier messages',\n\tinputDisabled = false,\n\terrorMessage,\n\twidth,\n\theight,\n\tclassName,\n\tstyle,\n}) => {\n\tconst [input, setInput] = useState('');\n\tconst [isInputFocused, setIsInputFocused] = useState(false);\n\tconst [isAtLatest, setIsAtLatest] = useState(true);\n\tconst inputRef = useRef<HTMLTextAreaElement>(null);\n\tconst bottomRef = useRef<HTMLDivElement>(null);\n\tconst scrollerRef = useRef<HTMLDivElement>(null);\n\tconst lastScrollTopRef = useRef(0);\n\t// Distance from the bottom at the moment an older page was asked for. Older\n\t// messages land *above* the viewport, so without restoring against this the\n\t// content under the reader jumps down by the height of what arrived.\n\tconst anchorFromBottomRef = useRef<number | null>(null);\n\n\t// An assistant bubble is pushed the moment a turn starts, before any text has\n\t// arrived; the thinking indicator stands in for it until then, so rendering it\n\t// too would show an empty balloon next to the dots. A turn stopped before its\n\t// first token keeps its place, carrying only the interrupted note.\n\tconst visibleMessages = messages.filter(\n\t\t(message) => message.content.length > 0 || message.wasInterrupted,\n\t);\n\tconst isEmpty = visibleMessages.length === 0 && !isThinking;\n\tconst isTurnInFlight = isThinking || isStreaming;\n\tconst canSend = !inputDisabled && !isTurnInFlight && input.trim().length > 0;\n\t// Stopping is the only thing the button can do mid-answer, so it becomes the\n\t// stop button rather than sitting there disabled.\n\tconst canStop = isTurnInFlight && Boolean(onStop);\n\t// Only the newest reply's suggestions are on offer — older ones answer a\n\t// question the conversation has already moved past.\n\tconst newestMessage = visibleMessages[visibleMessages.length - 1];\n\tconst followUps =\n\t\t!isTurnInFlight && newestMessage?.role === 'assistant'\n\t\t\t? newestMessage.followUps\n\t\t\t: undefined;\n\t// A long answer that the reader has scrolled up from: the tail is clipped, so\n\t// the fade and the arrow say there is more below.\n\tconst showScrollAffordance = !isEmpty && !isAtLatest;\n\n\t// Following the conversation is the default, but a reader who has scrolled up\n\t// mid-answer must not be yanked back down by the next chunk.\n\tuseEffect(() => {\n\t\tif (!isAtLatest) {\n\t\t\treturn;\n\t\t}\n\t\tbottomRef.current?.scrollIntoView({ behavior: 'smooth' });\n\t}, [messages, isThinking, isAtLatest]);\n\n\t// Older messages have landed: put the reader back on the message they were\n\t// looking at, which is now that much further down.\n\tuseEffect(() => {\n\t\tconst scroller = scrollerRef.current;\n\t\tconst anchor = anchorFromBottomRef.current;\n\t\tif (!scroller || anchor === null || isLoadingHistory) {\n\t\t\treturn;\n\t\t}\n\t\tanchorFromBottomRef.current = null;\n\t\tscroller.scrollTop = scroller.scrollHeight - anchor;\n\t\tlastScrollTopRef.current = scroller.scrollTop;\n\t}, [messages, isLoadingHistory]);\n\n\tconst handleScroll = () => {\n\t\tconst scroller = scrollerRef.current;\n\t\tif (!scroller) {\n\t\t\treturn;\n\t\t}\n\t\tconst distanceFromBottom =\n\t\t\tscroller.scrollHeight - scroller.scrollTop - scroller.clientHeight;\n\n\t\t// Reaching the top asks for the page before this one. The threshold gives\n\t\t// the request a head start, so the page is usually there by the time the\n\t\t// reader arrives.\n\t\tif (\n\t\t\tscroller.scrollTop <= NEAR_TOP_TOLERANCE_PX &&\n\t\t\thasMoreHistory &&\n\t\t\t!isLoadingHistory &&\n\t\t\tonLoadOlderMessages\n\t\t) {\n\t\t\tanchorFromBottomRef.current = scroller.scrollHeight - scroller.scrollTop;\n\t\t\tonLoadOlderMessages();\n\t\t}\n\t\t// Scrolling *up* is the only thing that detaches from the latest message:\n\t\t// growing content also pushes the bottom away, and auto-scroll itself only\n\t\t// ever moves down, so distance alone would flap mid-stream.\n\t\tconst scrolledUp = scroller.scrollTop < lastScrollTopRef.current - 1;\n\t\tlastScrollTopRef.current = scroller.scrollTop;\n\n\t\tif (distanceFromBottom <= AT_BOTTOM_TOLERANCE_PX) {\n\t\t\tsetIsAtLatest(true);\n\t\t\treturn;\n\t\t}\n\t\tif (scrolledUp) {\n\t\t\tsetIsAtLatest(false);\n\t\t}\n\t};\n\n\tconst handleJumpToLatest = () => {\n\t\tsetIsAtLatest(true);\n\t\tbottomRef.current?.scrollIntoView({ behavior: 'smooth' });\n\t};\n\n\tconst handleSend = () => {\n\t\tconst trimmed = input.trim();\n\t\tif (!trimmed || inputDisabled || isTurnInFlight) {\n\t\t\treturn;\n\t\t}\n\t\tonSend(trimmed);\n\t\tsetInput('');\n\t\tconst textarea = inputRef.current;\n\t\tif (textarea) {\n\t\t\ttextarea.style.height = 'auto';\n\t\t}\n\t};\n\n\tconst handleInputChange = (event: React.ChangeEvent<HTMLTextAreaElement>) => {\n\t\tsetInput(event.target.value);\n\t\tconst textarea = event.target;\n\t\ttextarea.style.height = 'auto';\n\t\ttextarea.style.height = `${Math.min(\n\t\t\ttextarea.scrollHeight,\n\t\t\tMAX_INPUT_HEIGHT_PX,\n\t\t)}px`;\n\t};\n\n\tconst handleKeyDown = (event: React.KeyboardEvent<HTMLTextAreaElement>) => {\n\t\tif (event.key === 'Enter' && !event.shiftKey) {\n\t\t\tevent.preventDefault();\n\t\t\thandleSend();\n\t\t}\n\t};\n\n\tconst handleSuggestionClick = (\n\t\tsuggestion: NonNullable<CopilotPanelProps['suggestions']>[number],\n\t) => {\n\t\tif (inputDisabled || isTurnInFlight) {\n\t\t\treturn;\n\t\t}\n\t\tonSuggestionClick?.(suggestion);\n\t\tonSend(suggestion.text);\n\t};\n\n\tconst handleFollowUpClick = (followUp: string) => {\n\t\tif (inputDisabled || isTurnInFlight) {\n\t\t\treturn;\n\t\t}\n\t\tonSend(followUp);\n\t};\n\n\treturn (\n\t\t<PanelContainer\n\t\t\tclassName={className}\n\t\t\tstyle={{ width, height, ...style }}\n\t\t\trole=\"dialog\"\n\t\t\taria-label={title}\n\t\t>\n\t\t\t<PanelHeader>\n\t\t\t\t<HeaderAvatar>\n\t\t\t\t\t{avatar ?? <AiStarsIcon width={18} height={18} />}\n\t\t\t\t</HeaderAvatar>\n\t\t\t\t<HeaderText>\n\t\t\t\t\t<HeaderTitleRow>\n\t\t\t\t\t\t<TitleSmall>{title}</TitleSmall>\n\t\t\t\t\t\t{badge && <HeaderBadge>{badge}</HeaderBadge>}\n\t\t\t\t\t</HeaderTitleRow>\n\t\t\t\t\t{subtitle && (\n\t\t\t\t\t\t<BodyCaption color={COLORS.content.secondary}>\n\t\t\t\t\t\t\t{subtitle}\n\t\t\t\t\t\t</BodyCaption>\n\t\t\t\t\t)}\n\t\t\t\t</HeaderText>\n\t\t\t\t<HeaderActions>\n\t\t\t\t\t{showRefresh && onRefresh && (\n\t\t\t\t\t\t<IconAction\n\t\t\t\t\t\t\ttype=\"button\"\n\t\t\t\t\t\t\tonClick={onRefresh}\n\t\t\t\t\t\t\taria-label=\"Start a new conversation\"\n\t\t\t\t\t\t>\n\t\t\t\t\t\t\t<RefreshIcon width={16} height={16} />\n\t\t\t\t\t\t</IconAction>\n\t\t\t\t\t)}\n\t\t\t\t\t<IconAction\n\t\t\t\t\t\ttype=\"button\"\n\t\t\t\t\t\tonClick={onClose}\n\t\t\t\t\t\taria-label=\"Close copilot\"\n\t\t\t\t\t>\n\t\t\t\t\t\t<CrossIcon width={18} height={18} />\n\t\t\t\t\t</IconAction>\n\t\t\t\t</HeaderActions>\n\t\t\t</PanelHeader>\n\n\t\t\t<MessagesViewport>\n\t\t\t\t<MessagesArea\n\t\t\t\t\tref={scrollerRef}\n\t\t\t\t\tonScroll={handleScroll}\n\t\t\t\t\trole=\"region\"\n\t\t\t\t\taria-label=\"Conversation\"\n\t\t\t\t>\n\t\t\t\t\t{isEmpty ? (\n\t\t\t\t\t\t<EmptyState>\n\t\t\t\t\t\t\t<EmptyStateIcon>\n\t\t\t\t\t\t\t\t<AiStarsIcon width={28} height={28} />\n\t\t\t\t\t\t\t</EmptyStateIcon>\n\t\t\t\t\t\t\t<BodySecondary style={{ fontWeight: 600 }}>\n\t\t\t\t\t\t\t\t{emptyStateTitle || title}\n\t\t\t\t\t\t\t</BodySecondary>\n\t\t\t\t\t\t\t{emptyStateSubtitle && (\n\t\t\t\t\t\t\t\t<BodyCaption color={COLORS.content.secondary}>\n\t\t\t\t\t\t\t\t\t{emptyStateSubtitle}\n\t\t\t\t\t\t\t\t</BodyCaption>\n\t\t\t\t\t\t\t)}\n\t\t\t\t\t\t\t{suggestions && suggestions.length > 0 && (\n\t\t\t\t\t\t\t\t<SuggestionList>\n\t\t\t\t\t\t\t\t\t{suggestions.map((suggestion) => (\n\t\t\t\t\t\t\t\t\t\t<SuggestionChip\n\t\t\t\t\t\t\t\t\t\t\tkey={suggestion.id}\n\t\t\t\t\t\t\t\t\t\t\ttype=\"button\"\n\t\t\t\t\t\t\t\t\t\t\tdisabled={inputDisabled || isTurnInFlight}\n\t\t\t\t\t\t\t\t\t\t\tonClick={() => handleSuggestionClick(suggestion)}\n\t\t\t\t\t\t\t\t\t\t>\n\t\t\t\t\t\t\t\t\t\t\t<AiStarsIcon width={14} height={14} />\n\t\t\t\t\t\t\t\t\t\t\t{suggestion.text}\n\t\t\t\t\t\t\t\t\t\t</SuggestionChip>\n\t\t\t\t\t\t\t\t\t))}\n\t\t\t\t\t\t\t\t</SuggestionList>\n\t\t\t\t\t\t\t)}\n\t\t\t\t\t\t</EmptyState>\n\t\t\t\t\t) : (\n\t\t\t\t\t\t<>\n\t\t\t\t\t\t\t{isLoadingHistory && (\n\t\t\t\t\t\t\t\t<HistoryLoader role=\"status\" aria-live=\"polite\">\n\t\t\t\t\t\t\t\t\t<DotPulse color={COLORS.content.placeholder} size={4} />\n\t\t\t\t\t\t\t\t\t{historyLoadingLabel}\n\t\t\t\t\t\t\t\t</HistoryLoader>\n\t\t\t\t\t\t\t)}\n\t\t\t\t\t\t\t{visibleMessages.map((message) => (\n\t\t\t\t\t\t\t\t<React.Fragment key={message.id}>\n\t\t\t\t\t\t\t\t\t{message.content.length > 0 && (\n\t\t\t\t\t\t\t\t\t\t<MessageBubble $role={message.role}>\n\t\t\t\t\t\t\t\t\t\t\t{message.role === 'assistant' ? (\n\t\t\t\t\t\t\t\t\t\t\t\t<div\n\t\t\t\t\t\t\t\t\t\t\t\t\tdangerouslySetInnerHTML={{\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t__html: renderMarkdownLite(message.content),\n\t\t\t\t\t\t\t\t\t\t\t\t\t}}\n\t\t\t\t\t\t\t\t\t\t\t\t/>\n\t\t\t\t\t\t\t\t\t\t\t) : (\n\t\t\t\t\t\t\t\t\t\t\t\t<div style={{ whiteSpace: 'pre-wrap' }}>\n\t\t\t\t\t\t\t\t\t\t\t\t\t{message.content}\n\t\t\t\t\t\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t\t\t\t\t\t)}\n\t\t\t\t\t\t\t\t\t\t</MessageBubble>\n\t\t\t\t\t\t\t\t\t)}\n\t\t\t\t\t\t\t\t\t{message.wasInterrupted && interruptedLabel && (\n\t\t\t\t\t\t\t\t\t\t<InterruptedNote>\n\t\t\t\t\t\t\t\t\t\t\t<StopIcon size={12} />\n\t\t\t\t\t\t\t\t\t\t\t{interruptedLabel}\n\t\t\t\t\t\t\t\t\t\t</InterruptedNote>\n\t\t\t\t\t\t\t\t\t)}\n\t\t\t\t\t\t\t\t</React.Fragment>\n\t\t\t\t\t\t\t))}\n\t\t\t\t\t\t\t{followUps && followUps.length > 0 && (\n\t\t\t\t\t\t\t\t<FollowUpList>\n\t\t\t\t\t\t\t\t\t{followUpsLabel && (\n\t\t\t\t\t\t\t\t\t\t<FollowUpsLabel>{followUpsLabel}</FollowUpsLabel>\n\t\t\t\t\t\t\t\t\t)}\n\t\t\t\t\t\t\t\t\t{followUps.map((followUp) => (\n\t\t\t\t\t\t\t\t\t\t<FollowUpChip\n\t\t\t\t\t\t\t\t\t\t\tkey={followUp}\n\t\t\t\t\t\t\t\t\t\t\ttype=\"button\"\n\t\t\t\t\t\t\t\t\t\t\tdisabled={inputDisabled}\n\t\t\t\t\t\t\t\t\t\t\tonClick={() => handleFollowUpClick(followUp)}\n\t\t\t\t\t\t\t\t\t\t>\n\t\t\t\t\t\t\t\t\t\t\t<ArrowRightIcon />\n\t\t\t\t\t\t\t\t\t\t\t{followUp}\n\t\t\t\t\t\t\t\t\t\t</FollowUpChip>\n\t\t\t\t\t\t\t\t\t))}\n\t\t\t\t\t\t\t\t</FollowUpList>\n\t\t\t\t\t\t\t)}\n\t\t\t\t\t\t\t{isThinking && (\n\t\t\t\t\t\t\t\t<ThinkingBubble role=\"status\" aria-live=\"polite\">\n\t\t\t\t\t\t\t\t\t<AiStarsIcon\n\t\t\t\t\t\t\t\t\t\twidth={14}\n\t\t\t\t\t\t\t\t\t\theight={14}\n\t\t\t\t\t\t\t\t\t\tcolor={COLORS.content.brand}\n\t\t\t\t\t\t\t\t\t/>\n\t\t\t\t\t\t\t\t\t{thinkingLabel && (\n\t\t\t\t\t\t\t\t\t\t<ThinkingLabel>{thinkingLabel}</ThinkingLabel>\n\t\t\t\t\t\t\t\t\t)}\n\t\t\t\t\t\t\t\t\t<DotPulse color={COLORS.background.brand} size={5} />\n\t\t\t\t\t\t\t\t</ThinkingBubble>\n\t\t\t\t\t\t\t)}\n\t\t\t\t\t\t\t<div ref={bottomRef} />\n\t\t\t\t\t\t</>\n\t\t\t\t\t)}\n\t\t\t\t</MessagesArea>\n\n\t\t\t\t<ScrollFade $visible={showScrollAffordance} aria-hidden=\"true\" />\n\t\t\t\t<JumpToLatestButton\n\t\t\t\t\ttype=\"button\"\n\t\t\t\t\t$visible={showScrollAffordance}\n\t\t\t\t\tonClick={handleJumpToLatest}\n\t\t\t\t\ttabIndex={showScrollAffordance ? 0 : -1}\n\t\t\t\t\taria-label=\"Scroll to the latest message\"\n\t\t\t\t>\n\t\t\t\t\t<ChevronDownIcon />\n\t\t\t\t</JumpToLatestButton>\n\t\t\t</MessagesViewport>\n\n\t\t\t{errorMessage && <ErrorBanner role=\"alert\">{errorMessage}</ErrorBanner>}\n\n\t\t\t<InputArea>\n\t\t\t\t<InputWrapper $focused={isInputFocused}>\n\t\t\t\t\t<MessageInput\n\t\t\t\t\t\tref={inputRef}\n\t\t\t\t\t\trows={1}\n\t\t\t\t\t\tvalue={input}\n\t\t\t\t\t\tplaceholder={placeholder}\n\t\t\t\t\t\tdisabled={inputDisabled}\n\t\t\t\t\t\tonChange={handleInputChange}\n\t\t\t\t\t\tonKeyDown={handleKeyDown}\n\t\t\t\t\t\tonFocus={() => setIsInputFocused(true)}\n\t\t\t\t\t\tonBlur={() => setIsInputFocused(false)}\n\t\t\t\t\t/>\n\t\t\t\t\t<SendButton\n\t\t\t\t\t\ttype=\"button\"\n\t\t\t\t\t\t$active={canStop || canSend}\n\t\t\t\t\t\tdisabled={!canStop && !canSend}\n\t\t\t\t\t\tonClick={canStop ? onStop : handleSend}\n\t\t\t\t\t\taria-label={canStop ? 'Stop generating' : 'Send message'}\n\t\t\t\t\t>\n\t\t\t\t\t\t{canStop ? <StopIcon /> : <SendArrowIcon />}\n\t\t\t\t\t</SendButton>\n\t\t\t\t</InputWrapper>\n\t\t\t</InputArea>\n\n\t\t\t{disclaimer && <Disclaimer>{disclaimer}</Disclaimer>}\n\t\t</PanelContainer>\n\t);\n};\n\nexport default CopilotPanel;\n"],"names":["MAX_INPUT_HEIGHT_PX","AT_BOTTOM_TOLERANCE_PX","NEAR_TOP_TOLERANCE_PX","SendArrowIcon","jsxs","jsx","ArrowRightIcon","StopIcon","size","ChevronDownIcon","CopilotPanel","messages","onSend","onClose","title","badge","subtitle","avatar","placeholder","disclaimer","emptyStateTitle","emptyStateSubtitle","suggestions","onSuggestionClick","showRefresh","onRefresh","isThinking","thinkingLabel","isStreaming","onStop","interruptedLabel","followUpsLabel","hasMoreHistory","isLoadingHistory","onLoadOlderMessages","historyLoadingLabel","inputDisabled","errorMessage","width","height","className","style","input","setInput","useState","isInputFocused","setIsInputFocused","isAtLatest","setIsAtLatest","inputRef","useRef","bottomRef","scrollerRef","lastScrollTopRef","anchorFromBottomRef","visibleMessages","message","isEmpty","isTurnInFlight","canSend","canStop","newestMessage","followUps","showScrollAffordance","useEffect","scroller","anchor","handleScroll","distanceFromBottom","scrolledUp","handleJumpToLatest","handleSend","trimmed","textarea","handleInputChange","event","handleKeyDown","handleSuggestionClick","suggestion","handleFollowUpClick","followUp","PanelContainer","PanelHeader","HeaderAvatar","AiStarsIcon","HeaderText","HeaderTitleRow","TitleSmall","HeaderBadge","BodyCaption","COLORS","HeaderActions","IconAction","RefreshIcon","CrossIcon","MessagesViewport","MessagesArea","EmptyState","EmptyStateIcon","BodySecondary","SuggestionList","SuggestionChip","Fragment","HistoryLoader","DotPulse","React","MessageBubble","renderMarkdownLite","InterruptedNote","FollowUpList","FollowUpsLabel","FollowUpChip","ThinkingBubble","ThinkingLabel","ScrollFade","JumpToLatestButton","ErrorBanner","InputArea","InputWrapper","MessageInput","SendButton","Disclaimer"],"mappings":";;;;;;;;;;AA0CA,MAAMA,KAAsB,IAGtBC,KAAyB,IAGzBC,KAAwB,IAExBC,KAAgB,MACrB,gBAAAC;AAAA,EAAC;AAAA,EAAA;AAAA,IACA,SAAQ;AAAA,IACR,OAAM;AAAA,IACN,QAAO;AAAA,IACP,MAAK;AAAA,IACL,QAAO;AAAA,IACP,aAAY;AAAA,IACZ,eAAc;AAAA,IACd,gBAAe;AAAA,IACf,eAAY;AAAA,IAEZ,UAAA;AAAA,MAAA,gBAAAC,EAAC,QAAA,EAAK,GAAE,WAAA,CAAW;AAAA,MACnB,gBAAAA,EAAC,QAAA,EAAK,GAAE,gBAAA,CAAgB;AAAA,IAAA;AAAA,EAAA;AACzB,GAGKC,KAAiB,MACtB,gBAAAF;AAAA,EAAC;AAAA,EAAA;AAAA,IACA,SAAQ;AAAA,IACR,OAAM;AAAA,IACN,QAAO;AAAA,IACP,MAAK;A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A,YAACmH;AAAA,YAAA;AAAA,cACA,MAAK;AAAA,cACL,SAAS5D,KAAWD;AAAA,cACpB,UAAU,CAACC,KAAW,CAACD;AAAA,cACvB,SAASC,IAAU/B,IAAS0C;AAAA,cAC5B,cAAYX,IAAU,oBAAoB;AAAA,cAEzC,UAAAA,IAAU,gBAAAvD,EAACE,GAAA,CAAA,CAAS,sBAAMJ,IAAA,CAAA,CAAc;AAAA,YAAA;AAAA,UAAA;AAAA,QAC1C,EAAA,CACD,EAAA,CACD;AAAA,QAECgB,KAAc,gBAAAd,EAACoH,IAAA,EAAY,UAAAtG,EAAA,CAAW;AAAA,MAAA;AAAA,IAAA;AAAA,EAAA;AAG1C;"}
@@ -0,0 +1,58 @@
1
+ export declare const PanelContainer: import('styled-components').StyledComponent<"div", any, {}, never>;
2
+ export declare const PanelHeader: import('styled-components').StyledComponent<"div", any, {}, never>;
3
+ export declare const HeaderAvatar: import('styled-components').StyledComponent<"div", any, {}, never>;
4
+ export declare const HeaderText: import('styled-components').StyledComponent<"div", any, {}, never>;
5
+ export declare const HeaderTitleRow: import('styled-components').StyledComponent<"div", any, {}, never>;
6
+ export declare const HeaderBadge: import('styled-components').StyledComponent<"span", any, {}, never>;
7
+ export declare const HeaderActions: import('styled-components').StyledComponent<"div", any, {}, never>;
8
+ export declare const IconAction: import('styled-components').StyledComponent<"button", any, {}, never>;
9
+ /**
10
+ * Wraps the scroller so the bottom fade and the jump-to-latest button can be
11
+ * absolutely positioned over it.
12
+ */
13
+ export declare const MessagesViewport: import('styled-components').StyledComponent<"div", any, {}, never>;
14
+ export declare const MessagesArea: import('styled-components').StyledComponent<"div", any, {}, never>;
15
+ /**
16
+ * Softens the cut-off edge of a long answer the reader has scrolled up from, so
17
+ * the clipped line reads as continuing rather than as the end of the message.
18
+ *
19
+ * Two layers, because one element cannot ramp a gradient and a blur
20
+ * independently: the element itself whitens the text out, and `::after` lays a
21
+ * masked blur over it that strengthens towards the bottom. Browsers without
22
+ * `backdrop-filter` still get the fade.
23
+ */
24
+ export declare const ScrollFade: import('styled-components').StyledComponent<"div", any, {
25
+ $visible: boolean;
26
+ }, never>;
27
+ export declare const JumpToLatestButton: import('styled-components').StyledComponent<"button", any, {
28
+ $visible: boolean;
29
+ }, never>;
30
+ export declare const EmptyState: import('styled-components').StyledComponent<"div", any, {}, never>;
31
+ export declare const EmptyStateIcon: import('styled-components').StyledComponent<"div", any, {}, never>;
32
+ export declare const SuggestionList: import('styled-components').StyledComponent<"div", any, {}, never>;
33
+ export declare const SuggestionChip: import('styled-components').StyledComponent<"button", any, {}, never>;
34
+ export declare const MessageBubble: import('styled-components').StyledComponent<"div", any, {
35
+ $role: 'user' | 'assistant' | 'system';
36
+ }, never>;
37
+ export declare const ThinkingBubble: import('styled-components').StyledComponent<"div", any, {}, never>;
38
+ /** Sits above the oldest message while the page before it is fetched. */
39
+ export declare const HistoryLoader: import('styled-components').StyledComponent<"div", any, {}, never>;
40
+ export declare const FollowUpList: import('styled-components').StyledComponent<"div", any, {}, never>;
41
+ export declare const FollowUpsLabel: import('styled-components').StyledComponent<"div", any, {}, never>;
42
+ export declare const FollowUpChip: import('styled-components').StyledComponent<"button", any, {}, never>;
43
+ /**
44
+ * Bubble-less on purpose: a stopped reply is a note about the transcript, not a
45
+ * message in it.
46
+ */
47
+ export declare const InterruptedNote: import('styled-components').StyledComponent<"div", any, {}, never>;
48
+ export declare const ThinkingLabel: import('styled-components').StyledComponent<"span", any, {}, never>;
49
+ export declare const ErrorBanner: import('styled-components').StyledComponent<"div", any, {}, never>;
50
+ export declare const InputArea: import('styled-components').StyledComponent<"div", any, {}, never>;
51
+ export declare const InputWrapper: import('styled-components').StyledComponent<"div", any, {
52
+ $focused: boolean;
53
+ }, never>;
54
+ export declare const MessageInput: import('styled-components').StyledComponent<"textarea", any, {}, never>;
55
+ export declare const SendButton: import('styled-components').StyledComponent<"button", any, {
56
+ $active: boolean;
57
+ }, never>;
58
+ export declare const Disclaimer: import('styled-components').StyledComponent<"div", any, {}, never>;