@bikdotai/bik-component-library 0.0.857-beta.0 → 0.0.857-beta.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 (106) hide show
  1. package/README.md +4 -25
  2. package/dist/cjs/components/feature-announcements/FeatureAnnouncementProvider.js +2 -2
  3. package/dist/cjs/components/feature-announcements/FeatureAnnouncementProvider.js.map +1 -1
  4. package/dist/cjs/components/feature-announcements/MajorUpdatePopup.js +2 -2
  5. package/dist/cjs/components/feature-announcements/MajorUpdatePopup.js.map +1 -1
  6. package/dist/cjs/components/feature-announcements/MinorUpdatePopup.js +1 -1
  7. package/dist/cjs/components/feature-announcements/MinorUpdatePopup.js.map +1 -1
  8. package/dist/cjs/index.js +1 -1
  9. package/dist/esm/components/feature-announcements/FeatureAnnouncementProvider.js +416 -333
  10. package/dist/esm/components/feature-announcements/FeatureAnnouncementProvider.js.map +1 -1
  11. package/dist/esm/components/feature-announcements/MajorUpdatePopup.js +33 -35
  12. package/dist/esm/components/feature-announcements/MajorUpdatePopup.js.map +1 -1
  13. package/dist/esm/components/feature-announcements/MinorUpdatePopup.js +47 -48
  14. package/dist/esm/components/feature-announcements/MinorUpdatePopup.js.map +1 -1
  15. package/dist/esm/components/feature-announcements/types/props.types.d.ts +2 -2
  16. package/dist/esm/index.d.ts +0 -1
  17. package/dist/esm/index.js +743 -793
  18. package/dist/esm/index.js.map +1 -1
  19. package/package.json +1 -1
  20. package/dist/cjs/components/bik-copilot/BIKCopilot.js +0 -2
  21. package/dist/cjs/components/bik-copilot/BIKCopilot.js.map +0 -1
  22. package/dist/cjs/components/bik-copilot/ControlledCopilot.js +0 -2
  23. package/dist/cjs/components/bik-copilot/ControlledCopilot.js.map +0 -1
  24. package/dist/cjs/components/bik-copilot/ControlledCopilot.styled.js +0 -27
  25. package/dist/cjs/components/bik-copilot/ControlledCopilot.styled.js.map +0 -1
  26. package/dist/cjs/components/bik-copilot/CopilotBall.js +0 -2
  27. package/dist/cjs/components/bik-copilot/CopilotBall.js.map +0 -1
  28. package/dist/cjs/components/bik-copilot/CopilotBall.styled.js +0 -42
  29. package/dist/cjs/components/bik-copilot/CopilotBall.styled.js.map +0 -1
  30. package/dist/cjs/components/bik-copilot/CopilotPanel.js +0 -2
  31. package/dist/cjs/components/bik-copilot/CopilotPanel.js.map +0 -1
  32. package/dist/cjs/components/bik-copilot/CopilotPanel.styled.js +0 -419
  33. package/dist/cjs/components/bik-copilot/CopilotPanel.styled.js.map +0 -1
  34. package/dist/cjs/components/bik-copilot/copilotPlacement.js +0 -2
  35. package/dist/cjs/components/bik-copilot/copilotPlacement.js.map +0 -1
  36. package/dist/cjs/components/bik-copilot/services/copilotDb.js +0 -2
  37. package/dist/cjs/components/bik-copilot/services/copilotDb.js.map +0 -1
  38. package/dist/cjs/components/bik-copilot/services/copilotIcebreakersClient.js +0 -2
  39. package/dist/cjs/components/bik-copilot/services/copilotIcebreakersClient.js.map +0 -1
  40. package/dist/cjs/components/bik-copilot/services/copilotMessagesClient.js +0 -2
  41. package/dist/cjs/components/bik-copilot/services/copilotMessagesClient.js.map +0 -1
  42. package/dist/cjs/components/bik-copilot/services/copilotPageSession.js +0 -2
  43. package/dist/cjs/components/bik-copilot/services/copilotPageSession.js.map +0 -1
  44. package/dist/cjs/components/bik-copilot/services/copilotSseParser.js +0 -7
  45. package/dist/cjs/components/bik-copilot/services/copilotSseParser.js.map +0 -1
  46. package/dist/cjs/components/bik-copilot/services/copilotStreamClient.js +0 -2
  47. package/dist/cjs/components/bik-copilot/services/copilotStreamClient.js.map +0 -1
  48. package/dist/cjs/components/bik-copilot/useCopilotIcebreakers.js +0 -2
  49. package/dist/cjs/components/bik-copilot/useCopilotIcebreakers.js.map +0 -1
  50. package/dist/cjs/components/bik-copilot/useCopilotStreamChat.js +0 -2
  51. package/dist/cjs/components/bik-copilot/useCopilotStreamChat.js.map +0 -1
  52. package/dist/cjs/components/bik-copilot/useDraggableFloater.js +0 -2
  53. package/dist/cjs/components/bik-copilot/useDraggableFloater.js.map +0 -1
  54. package/dist/esm/components/bik-copilot/BIKCopilot.d.ts +0 -32
  55. package/dist/esm/components/bik-copilot/BIKCopilot.js +0 -114
  56. package/dist/esm/components/bik-copilot/BIKCopilot.js.map +0 -1
  57. package/dist/esm/components/bik-copilot/ControlledCopilot.d.ts +0 -14
  58. package/dist/esm/components/bik-copilot/ControlledCopilot.js +0 -170
  59. package/dist/esm/components/bik-copilot/ControlledCopilot.js.map +0 -1
  60. package/dist/esm/components/bik-copilot/ControlledCopilot.styled.d.ts +0 -7
  61. package/dist/esm/components/bik-copilot/ControlledCopilot.styled.js +0 -31
  62. package/dist/esm/components/bik-copilot/ControlledCopilot.styled.js.map +0 -1
  63. package/dist/esm/components/bik-copilot/CopilotBall.d.ts +0 -13
  64. package/dist/esm/components/bik-copilot/CopilotBall.js +0 -50
  65. package/dist/esm/components/bik-copilot/CopilotBall.js.map +0 -1
  66. package/dist/esm/components/bik-copilot/CopilotBall.styled.d.ts +0 -9
  67. package/dist/esm/components/bik-copilot/CopilotBall.styled.js +0 -46
  68. package/dist/esm/components/bik-copilot/CopilotBall.styled.js.map +0 -1
  69. package/dist/esm/components/bik-copilot/CopilotPanel.d.ts +0 -9
  70. package/dist/esm/components/bik-copilot/CopilotPanel.js +0 -309
  71. package/dist/esm/components/bik-copilot/CopilotPanel.js.map +0 -1
  72. package/dist/esm/components/bik-copilot/CopilotPanel.styled.d.ts +0 -58
  73. package/dist/esm/components/bik-copilot/CopilotPanel.styled.js +0 -453
  74. package/dist/esm/components/bik-copilot/CopilotPanel.styled.js.map +0 -1
  75. package/dist/esm/components/bik-copilot/copilotPlacement.d.ts +0 -24
  76. package/dist/esm/components/bik-copilot/copilotPlacement.js +0 -38
  77. package/dist/esm/components/bik-copilot/copilotPlacement.js.map +0 -1
  78. package/dist/esm/components/bik-copilot/index.d.ts +0 -16
  79. package/dist/esm/components/bik-copilot/model.d.ts +0 -674
  80. package/dist/esm/components/bik-copilot/services/copilotDb.d.ts +0 -90
  81. package/dist/esm/components/bik-copilot/services/copilotDb.js +0 -96
  82. package/dist/esm/components/bik-copilot/services/copilotDb.js.map +0 -1
  83. package/dist/esm/components/bik-copilot/services/copilotIcebreakersClient.d.ts +0 -11
  84. package/dist/esm/components/bik-copilot/services/copilotIcebreakersClient.js +0 -54
  85. package/dist/esm/components/bik-copilot/services/copilotIcebreakersClient.js.map +0 -1
  86. package/dist/esm/components/bik-copilot/services/copilotMessagesClient.d.ts +0 -23
  87. package/dist/esm/components/bik-copilot/services/copilotMessagesClient.js +0 -78
  88. package/dist/esm/components/bik-copilot/services/copilotMessagesClient.js.map +0 -1
  89. package/dist/esm/components/bik-copilot/services/copilotPageSession.d.ts +0 -37
  90. package/dist/esm/components/bik-copilot/services/copilotPageSession.js +0 -35
  91. package/dist/esm/components/bik-copilot/services/copilotPageSession.js.map +0 -1
  92. package/dist/esm/components/bik-copilot/services/copilotSseParser.d.ts +0 -22
  93. package/dist/esm/components/bik-copilot/services/copilotSseParser.js +0 -52
  94. package/dist/esm/components/bik-copilot/services/copilotSseParser.js.map +0 -1
  95. package/dist/esm/components/bik-copilot/services/copilotStreamClient.d.ts +0 -31
  96. package/dist/esm/components/bik-copilot/services/copilotStreamClient.js +0 -103
  97. package/dist/esm/components/bik-copilot/services/copilotStreamClient.js.map +0 -1
  98. package/dist/esm/components/bik-copilot/useCopilotIcebreakers.d.ts +0 -17
  99. package/dist/esm/components/bik-copilot/useCopilotIcebreakers.js +0 -60
  100. package/dist/esm/components/bik-copilot/useCopilotIcebreakers.js.map +0 -1
  101. package/dist/esm/components/bik-copilot/useCopilotStreamChat.d.ts +0 -20
  102. package/dist/esm/components/bik-copilot/useCopilotStreamChat.js +0 -333
  103. package/dist/esm/components/bik-copilot/useCopilotStreamChat.js.map +0 -1
  104. package/dist/esm/components/bik-copilot/useDraggableFloater.d.ts +0 -9
  105. package/dist/esm/components/bik-copilot/useDraggableFloater.js +0 -118
  106. package/dist/esm/components/bik-copilot/useDraggableFloater.js.map +0 -1
@@ -1,453 +0,0 @@
1
- import r from "styled-components";
2
- import { COLORS as e } from "../../constants/Theme.js";
3
- const i = r.div`
4
- display: flex;
5
- flex-direction: column;
6
- min-height: 0;
7
- overflow: hidden;
8
- background: ${e.surface.standard};
9
- border: 1px solid ${e.stroke.primary};
10
- border-radius: 16px;
11
- box-shadow: 0 16px 48px rgba(40, 3, 78, 0.18);
12
- `, a = r.div`
13
- display: flex;
14
- align-items: flex-start;
15
- gap: 10px;
16
- padding: 12px 12px 12px 16px;
17
- border-bottom: 1px solid ${e.stroke.primary};
18
- flex-shrink: 0;
19
- `, d = r.div`
20
- width: 32px;
21
- height: 32px;
22
- flex-shrink: 0;
23
- border-radius: 8px;
24
- background: ${e.background.base};
25
- display: flex;
26
- align-items: center;
27
- justify-content: center;
28
- color: ${e.content.brand};
29
- overflow: hidden;
30
- `, s = r.div`
31
- display: flex;
32
- flex-direction: column;
33
- gap: 2px;
34
- min-width: 0;
35
- flex: 1;
36
- `, l = r.div`
37
- display: flex;
38
- align-items: center;
39
- gap: 6px;
40
- `, p = r.span`
41
- padding: 1px 6px;
42
- border-radius: 4px;
43
- background: ${e.background.brandLight};
44
- color: ${e.content.brand};
45
- font-size: 10px;
46
- font-weight: 600;
47
- line-height: 16px;
48
- white-space: nowrap;
49
- `, c = r.div`
50
- display: flex;
51
- align-items: center;
52
- gap: 2px;
53
- flex-shrink: 0;
54
- `, x = r.button`
55
- width: 28px;
56
- height: 28px;
57
- display: flex;
58
- align-items: center;
59
- justify-content: center;
60
- padding: 0;
61
- border: none;
62
- border-radius: 6px;
63
- background: transparent;
64
- color: ${e.content.secondary};
65
- cursor: pointer;
66
- transition: background 0.15s ease, color 0.15s ease;
67
-
68
- &:hover {
69
- background: ${e.surface.hovered};
70
- color: ${e.content.primary};
71
- }
72
-
73
- &:focus-visible {
74
- outline: 2px solid ${e.stroke.brand};
75
- outline-offset: 1px;
76
- }
77
- `, g = r.div`
78
- position: relative;
79
- flex: 1;
80
- min-height: 0;
81
- display: flex;
82
- flex-direction: column;
83
- `, b = r.div`
84
- flex: 1;
85
- min-height: 0;
86
- overflow-y: auto;
87
- padding: 16px;
88
- display: flex;
89
- flex-direction: column;
90
- gap: 12px;
91
-
92
- &::-webkit-scrollbar {
93
- width: 6px;
94
- }
95
-
96
- &::-webkit-scrollbar-thumb {
97
- background: ${e.background.inactive};
98
- border-radius: 3px;
99
- }
100
- `, f = r.div`
101
- position: absolute;
102
- left: 0;
103
- right: 0;
104
- bottom: 0;
105
- height: 72px;
106
- pointer-events: none;
107
- opacity: ${(t) => t.$visible ? 1 : 0};
108
- transition: opacity 0.2s ease;
109
- background: linear-gradient(
110
- to bottom,
111
- ${e.surface.standard}00 0%,
112
- ${e.surface.standard}B3 55%,
113
- ${e.surface.standard} 100%
114
- );
115
-
116
- &::after {
117
- content: '';
118
- position: absolute;
119
- inset: 0;
120
- backdrop-filter: blur(2px);
121
- -webkit-backdrop-filter: blur(2px);
122
- mask-image: linear-gradient(to bottom, transparent 0%, #000 60%);
123
- -webkit-mask-image: linear-gradient(to bottom, transparent 0%, #000 60%);
124
- }
125
- `, u = r.button`
126
- position: absolute;
127
- left: 50%;
128
- bottom: 12px;
129
- transform: translateX(-50%)
130
- translateY(${(t) => t.$visible ? "0" : "6px"});
131
- width: 28px;
132
- height: 28px;
133
- display: flex;
134
- align-items: center;
135
- justify-content: center;
136
- padding: 0;
137
- border: 1px solid ${e.stroke.primary};
138
- border-radius: 999px;
139
- background: ${e.surface.standard};
140
- color: ${e.content.secondary};
141
- box-shadow: 0 2px 8px rgba(40, 3, 78, 0.16);
142
- cursor: pointer;
143
- opacity: ${(t) => t.$visible ? 1 : 0};
144
- /* Hidden to the pointer and to focus order while it is faded out. */
145
- visibility: ${(t) => t.$visible ? "visible" : "hidden"};
146
- transition: opacity 0.2s ease, transform 0.2s ease, visibility 0.2s ease,
147
- background 0.15s ease, color 0.15s ease;
148
-
149
- &:hover {
150
- background: ${e.surface.hovered};
151
- color: ${e.content.primary};
152
- }
153
-
154
- &:focus-visible {
155
- outline: 2px solid ${e.stroke.brand};
156
- outline-offset: 1px;
157
- }
158
- `, h = r.div`
159
- flex: 1;
160
- display: flex;
161
- flex-direction: column;
162
- align-items: center;
163
- justify-content: center;
164
- gap: 8px;
165
- text-align: center;
166
- padding: 8px 4px;
167
- `, m = r.div`
168
- color: ${e.content.brand};
169
- display: flex;
170
- align-items: center;
171
- justify-content: center;
172
- margin-bottom: 4px;
173
- `, y = r.div`
174
- display: flex;
175
- flex-direction: column;
176
- align-items: center;
177
- gap: 8px;
178
- margin-top: 12px;
179
- width: 100%;
180
- `, k = r.button`
181
- display: inline-flex;
182
- align-items: center;
183
- gap: 6px;
184
- max-width: 100%;
185
- padding: 8px 14px;
186
- border: 1px solid ${e.stroke.primary};
187
- border-radius: 999px;
188
- background: ${e.surface.standard};
189
- color: ${e.content.primary};
190
- font-family: Inter;
191
- font-size: 13px;
192
- line-height: 18px;
193
- text-align: left;
194
- cursor: pointer;
195
- transition: border-color 0.15s ease, background 0.15s ease;
196
-
197
- svg {
198
- flex-shrink: 0;
199
- color: ${e.content.brand};
200
- }
201
-
202
- &:hover:not(:disabled) {
203
- border-color: ${e.stroke.brand};
204
- background: ${e.background.brandVeryLight};
205
- }
206
-
207
- &:disabled {
208
- cursor: not-allowed;
209
- opacity: 0.5;
210
- }
211
- `, $ = r.div`
212
- font-family: Inter;
213
- font-size: 13px;
214
- line-height: 20px;
215
- word-break: break-word;
216
- overflow-wrap: break-word;
217
-
218
- ${(t) => t.$role === "user" ? `
219
- align-self: flex-end;
220
- max-width: 85%;
221
- padding: 10px 14px;
222
- border-radius: 12px;
223
- border-bottom-right-radius: 4px;
224
- background: ${e.background.brandLight};
225
- color: ${e.content.primary};
226
- ` : t.$role === "system" ? `
227
- align-self: center;
228
- max-width: 90%;
229
- padding: 6px 10px;
230
- border-radius: 8px;
231
- background: ${e.surface.grey};
232
- color: ${e.content.secondary};
233
- font-size: 12px;
234
- text-align: center;
235
- ` : `
236
- align-self: flex-start;
237
- max-width: 90%;
238
- padding: 10px 14px;
239
- border-radius: 12px;
240
- border-bottom-left-radius: 4px;
241
- background: ${e.surface.grey};
242
- color: ${e.content.primary};
243
- border: 1px solid ${e.stroke.primary};
244
- `}
245
-
246
- /* Markdown emitted by renderMarkdownLite */
247
- h1,
248
- h2,
249
- h3,
250
- h4 {
251
- font-size: 14px;
252
- font-weight: 600;
253
- margin: 4px 0;
254
- }
255
-
256
- pre {
257
- background: ${e.background.base};
258
- border-radius: 6px;
259
- padding: 8px;
260
- margin: 6px 0;
261
- overflow-x: auto;
262
- font-size: 12px;
263
- }
264
-
265
- a {
266
- color: ${e.content.brand};
267
- }
268
- `, v = r.div`
269
- align-self: flex-start;
270
- display: inline-flex;
271
- align-items: center;
272
- gap: 8px;
273
- padding: 12px 14px;
274
- border-radius: 12px;
275
- border-bottom-left-radius: 4px;
276
- background: ${e.surface.grey};
277
- border: 1px solid ${e.stroke.primary};
278
- `, w = r.div`
279
- align-self: center;
280
- display: inline-flex;
281
- align-items: center;
282
- gap: 8px;
283
- padding: 4px 0;
284
- font-family: Inter;
285
- font-size: 11px;
286
- line-height: 16px;
287
- color: ${e.content.placeholder};
288
- `, I = r.div`
289
- display: flex;
290
- flex-direction: column;
291
- align-items: stretch;
292
- gap: 8px;
293
- margin-top: 4px;
294
- `, z = r.div`
295
- font-family: Inter;
296
- font-size: 11px;
297
- line-height: 16px;
298
- color: ${e.content.placeholder};
299
- `, L = r.button`
300
- display: flex;
301
- align-items: center;
302
- gap: 8px;
303
- width: 100%;
304
- padding: 10px 14px;
305
- border: 1px solid ${e.stroke.primary};
306
- border-radius: 10px;
307
- background: ${e.surface.standard};
308
- color: ${e.content.primary};
309
- font-family: Inter;
310
- font-size: 13px;
311
- line-height: 18px;
312
- text-align: left;
313
- cursor: pointer;
314
- transition: border-color 0.15s ease, background 0.15s ease;
315
-
316
- svg {
317
- flex-shrink: 0;
318
- color: ${e.content.secondary};
319
- }
320
-
321
- &:hover:not(:disabled) {
322
- border-color: ${e.stroke.brand};
323
- background: ${e.background.brandVeryLight};
324
- }
325
-
326
- &:disabled {
327
- cursor: not-allowed;
328
- opacity: 0.5;
329
- }
330
- `, H = r.div`
331
- align-self: flex-start;
332
- display: inline-flex;
333
- align-items: center;
334
- gap: 6px;
335
- font-family: Inter;
336
- font-size: 12px;
337
- line-height: 18px;
338
- color: ${e.content.secondary};
339
-
340
- svg {
341
- flex-shrink: 0;
342
- color: ${e.content.inactive};
343
- }
344
- `, B = r.span`
345
- font-family: Inter;
346
- font-size: 13px;
347
- line-height: 20px;
348
- color: ${e.content.secondary};
349
- `, S = r.div`
350
- margin: 0 16px;
351
- padding: 8px 10px;
352
- border-radius: 8px;
353
- background: ${e.background.negative.light};
354
- color: ${e.content.negative};
355
- font-family: Inter;
356
- font-size: 12px;
357
- line-height: 18px;
358
- flex-shrink: 0;
359
- `, j = r.div`
360
- padding: 12px 16px 4px;
361
- flex-shrink: 0;
362
- `, M = r.div`
363
- display: flex;
364
- align-items: flex-end;
365
- gap: 8px;
366
- padding: 8px 8px 8px 12px;
367
- border: 1px solid
368
- ${(t) => t.$focused ? e.stroke.brand : e.stroke.primary};
369
- border-radius: 12px;
370
- background: ${e.surface.standard};
371
- transition: border-color 0.15s ease;
372
- `, A = r.textarea`
373
- flex: 1;
374
- border: none;
375
- outline: none;
376
- resize: none;
377
- background: transparent;
378
- font-family: Inter;
379
- font-size: 13px;
380
- line-height: 20px;
381
- color: ${e.content.primary};
382
- max-height: 96px;
383
- min-height: 20px;
384
- padding: 4px 0;
385
-
386
- &::placeholder {
387
- color: ${e.content.placeholder};
388
- }
389
-
390
- &:disabled {
391
- cursor: not-allowed;
392
- }
393
- `, T = r.button`
394
- width: 28px;
395
- height: 28px;
396
- flex-shrink: 0;
397
- display: flex;
398
- align-items: center;
399
- justify-content: center;
400
- padding: 0;
401
- border: none;
402
- border-radius: 8px;
403
- background: ${(t) => t.$active ? e.background.brand : e.background.brandLight};
404
- color: ${(t) => t.$active ? e.content.primaryInverse : e.content.inactive};
405
- cursor: ${(t) => t.$active ? "pointer" : "not-allowed"};
406
- transition: background 0.15s ease, color 0.15s ease;
407
-
408
- &:focus-visible {
409
- outline: 2px solid ${e.stroke.brand};
410
- outline-offset: 1px;
411
- }
412
- `, C = r.div`
413
- padding: 6px 16px 12px;
414
- text-align: center;
415
- font-family: Inter;
416
- font-size: 11px;
417
- line-height: 16px;
418
- color: ${e.content.placeholder};
419
- flex-shrink: 0;
420
- `;
421
- export {
422
- C as Disclaimer,
423
- h as EmptyState,
424
- m as EmptyStateIcon,
425
- S as ErrorBanner,
426
- L as FollowUpChip,
427
- I as FollowUpList,
428
- z as FollowUpsLabel,
429
- c as HeaderActions,
430
- d as HeaderAvatar,
431
- p as HeaderBadge,
432
- s as HeaderText,
433
- l as HeaderTitleRow,
434
- w as HistoryLoader,
435
- x as IconAction,
436
- j as InputArea,
437
- M as InputWrapper,
438
- H as InterruptedNote,
439
- u as JumpToLatestButton,
440
- $ as MessageBubble,
441
- A as MessageInput,
442
- b as MessagesArea,
443
- g as MessagesViewport,
444
- i as PanelContainer,
445
- a as PanelHeader,
446
- f as ScrollFade,
447
- T as SendButton,
448
- k as SuggestionChip,
449
- y as SuggestionList,
450
- v as ThinkingBubble,
451
- B as ThinkingLabel
452
- };
453
- //# sourceMappingURL=CopilotPanel.styled.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"CopilotPanel.styled.js","sources":["../../../../src/components/bik-copilot/CopilotPanel.styled.ts"],"sourcesContent":["import styled from 'styled-components';\nimport { COLORS } from '@src/constants/Theme';\n\nexport const PanelContainer = styled.div`\n\tdisplay: flex;\n\tflex-direction: column;\n\tmin-height: 0;\n\toverflow: hidden;\n\tbackground: ${COLORS.surface.standard};\n\tborder: 1px solid ${COLORS.stroke.primary};\n\tborder-radius: 16px;\n\tbox-shadow: 0 16px 48px rgba(40, 3, 78, 0.18);\n`;\n\nexport const PanelHeader = styled.div`\n\tdisplay: flex;\n\talign-items: flex-start;\n\tgap: 10px;\n\tpadding: 12px 12px 12px 16px;\n\tborder-bottom: 1px solid ${COLORS.stroke.primary};\n\tflex-shrink: 0;\n`;\n\nexport const HeaderAvatar = styled.div`\n\twidth: 32px;\n\theight: 32px;\n\tflex-shrink: 0;\n\tborder-radius: 8px;\n\tbackground: ${COLORS.background.base};\n\tdisplay: flex;\n\talign-items: center;\n\tjustify-content: center;\n\tcolor: ${COLORS.content.brand};\n\toverflow: hidden;\n`;\n\nexport const HeaderText = styled.div`\n\tdisplay: flex;\n\tflex-direction: column;\n\tgap: 2px;\n\tmin-width: 0;\n\tflex: 1;\n`;\n\nexport const HeaderTitleRow = styled.div`\n\tdisplay: flex;\n\talign-items: center;\n\tgap: 6px;\n`;\n\nexport const HeaderBadge = styled.span`\n\tpadding: 1px 6px;\n\tborder-radius: 4px;\n\tbackground: ${COLORS.background.brandLight};\n\tcolor: ${COLORS.content.brand};\n\tfont-size: 10px;\n\tfont-weight: 600;\n\tline-height: 16px;\n\twhite-space: nowrap;\n`;\n\nexport const HeaderActions = styled.div`\n\tdisplay: flex;\n\talign-items: center;\n\tgap: 2px;\n\tflex-shrink: 0;\n`;\n\nexport const IconAction = styled.button`\n\twidth: 28px;\n\theight: 28px;\n\tdisplay: flex;\n\talign-items: center;\n\tjustify-content: center;\n\tpadding: 0;\n\tborder: none;\n\tborder-radius: 6px;\n\tbackground: transparent;\n\tcolor: ${COLORS.content.secondary};\n\tcursor: pointer;\n\ttransition: background 0.15s ease, color 0.15s ease;\n\n\t&:hover {\n\t\tbackground: ${COLORS.surface.hovered};\n\t\tcolor: ${COLORS.content.primary};\n\t}\n\n\t&:focus-visible {\n\t\toutline: 2px solid ${COLORS.stroke.brand};\n\t\toutline-offset: 1px;\n\t}\n`;\n\n/**\n * Wraps the scroller so the bottom fade and the jump-to-latest button can be\n * absolutely positioned over it.\n */\nexport const MessagesViewport = styled.div`\n\tposition: relative;\n\tflex: 1;\n\tmin-height: 0;\n\tdisplay: flex;\n\tflex-direction: column;\n`;\n\nexport const MessagesArea = styled.div`\n\tflex: 1;\n\tmin-height: 0;\n\toverflow-y: auto;\n\tpadding: 16px;\n\tdisplay: flex;\n\tflex-direction: column;\n\tgap: 12px;\n\n\t&::-webkit-scrollbar {\n\t\twidth: 6px;\n\t}\n\n\t&::-webkit-scrollbar-thumb {\n\t\tbackground: ${COLORS.background.inactive};\n\t\tborder-radius: 3px;\n\t}\n`;\n\n/**\n * Softens the cut-off edge of a long answer the reader has scrolled up from, so\n * the clipped line reads as continuing rather than as the end of the message.\n *\n * Two layers, because one element cannot ramp a gradient and a blur\n * independently: the element itself whitens the text out, and `::after` lays a\n * masked blur over it that strengthens towards the bottom. Browsers without\n * `backdrop-filter` still get the fade.\n */\nexport const ScrollFade = styled.div<{ $visible: boolean }>`\n\tposition: absolute;\n\tleft: 0;\n\tright: 0;\n\tbottom: 0;\n\theight: 72px;\n\tpointer-events: none;\n\topacity: ${(props) => (props.$visible ? 1 : 0)};\n\ttransition: opacity 0.2s ease;\n\tbackground: linear-gradient(\n\t\tto bottom,\n\t\t${COLORS.surface.standard}00 0%,\n\t\t${COLORS.surface.standard}B3 55%,\n\t\t${COLORS.surface.standard} 100%\n\t);\n\n\t&::after {\n\t\tcontent: '';\n\t\tposition: absolute;\n\t\tinset: 0;\n\t\tbackdrop-filter: blur(2px);\n\t\t-webkit-backdrop-filter: blur(2px);\n\t\tmask-image: linear-gradient(to bottom, transparent 0%, #000 60%);\n\t\t-webkit-mask-image: linear-gradient(to bottom, transparent 0%, #000 60%);\n\t}\n`;\n\nexport const JumpToLatestButton = styled.button<{ $visible: boolean }>`\n\tposition: absolute;\n\tleft: 50%;\n\tbottom: 12px;\n\ttransform: translateX(-50%)\n\t\ttranslateY(${(props) => (props.$visible ? '0' : '6px')});\n\twidth: 28px;\n\theight: 28px;\n\tdisplay: flex;\n\talign-items: center;\n\tjustify-content: center;\n\tpadding: 0;\n\tborder: 1px solid ${COLORS.stroke.primary};\n\tborder-radius: 999px;\n\tbackground: ${COLORS.surface.standard};\n\tcolor: ${COLORS.content.secondary};\n\tbox-shadow: 0 2px 8px rgba(40, 3, 78, 0.16);\n\tcursor: pointer;\n\topacity: ${(props) => (props.$visible ? 1 : 0)};\n\t/* Hidden to the pointer and to focus order while it is faded out. */\n\tvisibility: ${(props) => (props.$visible ? 'visible' : 'hidden')};\n\ttransition: opacity 0.2s ease, transform 0.2s ease, visibility 0.2s ease,\n\t\tbackground 0.15s ease, color 0.15s ease;\n\n\t&:hover {\n\t\tbackground: ${COLORS.surface.hovered};\n\t\tcolor: ${COLORS.content.primary};\n\t}\n\n\t&:focus-visible {\n\t\toutline: 2px solid ${COLORS.stroke.brand};\n\t\toutline-offset: 1px;\n\t}\n`;\n\nexport const EmptyState = styled.div`\n\tflex: 1;\n\tdisplay: flex;\n\tflex-direction: column;\n\talign-items: center;\n\tjustify-content: center;\n\tgap: 8px;\n\ttext-align: center;\n\tpadding: 8px 4px;\n`;\n\nexport const EmptyStateIcon = styled.div`\n\tcolor: ${COLORS.content.brand};\n\tdisplay: flex;\n\talign-items: center;\n\tjustify-content: center;\n\tmargin-bottom: 4px;\n`;\n\nexport const SuggestionList = styled.div`\n\tdisplay: flex;\n\tflex-direction: column;\n\talign-items: center;\n\tgap: 8px;\n\tmargin-top: 12px;\n\twidth: 100%;\n`;\n\nexport const SuggestionChip = styled.button`\n\tdisplay: inline-flex;\n\talign-items: center;\n\tgap: 6px;\n\tmax-width: 100%;\n\tpadding: 8px 14px;\n\tborder: 1px solid ${COLORS.stroke.primary};\n\tborder-radius: 999px;\n\tbackground: ${COLORS.surface.standard};\n\tcolor: ${COLORS.content.primary};\n\tfont-family: Inter;\n\tfont-size: 13px;\n\tline-height: 18px;\n\ttext-align: left;\n\tcursor: pointer;\n\ttransition: border-color 0.15s ease, background 0.15s ease;\n\n\tsvg {\n\t\tflex-shrink: 0;\n\t\tcolor: ${COLORS.content.brand};\n\t}\n\n\t&:hover:not(:disabled) {\n\t\tborder-color: ${COLORS.stroke.brand};\n\t\tbackground: ${COLORS.background.brandVeryLight};\n\t}\n\n\t&:disabled {\n\t\tcursor: not-allowed;\n\t\topacity: 0.5;\n\t}\n`;\n\nexport const MessageBubble = styled.div<{\n\t$role: 'user' | 'assistant' | 'system';\n}>`\n\tfont-family: Inter;\n\tfont-size: 13px;\n\tline-height: 20px;\n\tword-break: break-word;\n\toverflow-wrap: break-word;\n\n\t${(props) => {\n\t\tif (props.$role === 'user') {\n\t\t\treturn `\n\t\t\t\talign-self: flex-end;\n\t\t\t\tmax-width: 85%;\n\t\t\t\tpadding: 10px 14px;\n\t\t\t\tborder-radius: 12px;\n\t\t\t\tborder-bottom-right-radius: 4px;\n\t\t\t\tbackground: ${COLORS.background.brandLight};\n\t\t\t\tcolor: ${COLORS.content.primary};\n\t\t\t`;\n\t\t}\n\t\tif (props.$role === 'system') {\n\t\t\treturn `\n\t\t\t\talign-self: center;\n\t\t\t\tmax-width: 90%;\n\t\t\t\tpadding: 6px 10px;\n\t\t\t\tborder-radius: 8px;\n\t\t\t\tbackground: ${COLORS.surface.grey};\n\t\t\t\tcolor: ${COLORS.content.secondary};\n\t\t\t\tfont-size: 12px;\n\t\t\t\ttext-align: center;\n\t\t\t`;\n\t\t}\n\t\treturn `\n\t\t\talign-self: flex-start;\n\t\t\tmax-width: 90%;\n\t\t\tpadding: 10px 14px;\n\t\t\tborder-radius: 12px;\n\t\t\tborder-bottom-left-radius: 4px;\n\t\t\tbackground: ${COLORS.surface.grey};\n\t\t\tcolor: ${COLORS.content.primary};\n\t\t\tborder: 1px solid ${COLORS.stroke.primary};\n\t\t`;\n\t}}\n\n\t/* Markdown emitted by renderMarkdownLite */\n\th1,\n\th2,\n\th3,\n\th4 {\n\t\tfont-size: 14px;\n\t\tfont-weight: 600;\n\t\tmargin: 4px 0;\n\t}\n\n\tpre {\n\t\tbackground: ${COLORS.background.base};\n\t\tborder-radius: 6px;\n\t\tpadding: 8px;\n\t\tmargin: 6px 0;\n\t\toverflow-x: auto;\n\t\tfont-size: 12px;\n\t}\n\n\ta {\n\t\tcolor: ${COLORS.content.brand};\n\t}\n`;\n\nexport const ThinkingBubble = styled.div`\n\talign-self: flex-start;\n\tdisplay: inline-flex;\n\talign-items: center;\n\tgap: 8px;\n\tpadding: 12px 14px;\n\tborder-radius: 12px;\n\tborder-bottom-left-radius: 4px;\n\tbackground: ${COLORS.surface.grey};\n\tborder: 1px solid ${COLORS.stroke.primary};\n`;\n\n/** Sits above the oldest message while the page before it is fetched. */\nexport const HistoryLoader = styled.div`\n\talign-self: center;\n\tdisplay: inline-flex;\n\talign-items: center;\n\tgap: 8px;\n\tpadding: 4px 0;\n\tfont-family: Inter;\n\tfont-size: 11px;\n\tline-height: 16px;\n\tcolor: ${COLORS.content.placeholder};\n`;\n\nexport const FollowUpList = styled.div`\n\tdisplay: flex;\n\tflex-direction: column;\n\talign-items: stretch;\n\tgap: 8px;\n\tmargin-top: 4px;\n`;\n\nexport const FollowUpsLabel = styled.div`\n\tfont-family: Inter;\n\tfont-size: 11px;\n\tline-height: 16px;\n\tcolor: ${COLORS.content.placeholder};\n`;\n\nexport const FollowUpChip = styled.button`\n\tdisplay: flex;\n\talign-items: center;\n\tgap: 8px;\n\twidth: 100%;\n\tpadding: 10px 14px;\n\tborder: 1px solid ${COLORS.stroke.primary};\n\tborder-radius: 10px;\n\tbackground: ${COLORS.surface.standard};\n\tcolor: ${COLORS.content.primary};\n\tfont-family: Inter;\n\tfont-size: 13px;\n\tline-height: 18px;\n\ttext-align: left;\n\tcursor: pointer;\n\ttransition: border-color 0.15s ease, background 0.15s ease;\n\n\tsvg {\n\t\tflex-shrink: 0;\n\t\tcolor: ${COLORS.content.secondary};\n\t}\n\n\t&:hover:not(:disabled) {\n\t\tborder-color: ${COLORS.stroke.brand};\n\t\tbackground: ${COLORS.background.brandVeryLight};\n\t}\n\n\t&:disabled {\n\t\tcursor: not-allowed;\n\t\topacity: 0.5;\n\t}\n`;\n\n/**\n * Bubble-less on purpose: a stopped reply is a note about the transcript, not a\n * message in it.\n */\nexport const InterruptedNote = styled.div`\n\talign-self: flex-start;\n\tdisplay: inline-flex;\n\talign-items: center;\n\tgap: 6px;\n\tfont-family: Inter;\n\tfont-size: 12px;\n\tline-height: 18px;\n\tcolor: ${COLORS.content.secondary};\n\n\tsvg {\n\t\tflex-shrink: 0;\n\t\tcolor: ${COLORS.content.inactive};\n\t}\n`;\n\nexport const ThinkingLabel = styled.span`\n\tfont-family: Inter;\n\tfont-size: 13px;\n\tline-height: 20px;\n\tcolor: ${COLORS.content.secondary};\n`;\n\nexport const ErrorBanner = styled.div`\n\tmargin: 0 16px;\n\tpadding: 8px 10px;\n\tborder-radius: 8px;\n\tbackground: ${COLORS.background.negative.light};\n\tcolor: ${COLORS.content.negative};\n\tfont-family: Inter;\n\tfont-size: 12px;\n\tline-height: 18px;\n\tflex-shrink: 0;\n`;\n\nexport const InputArea = styled.div`\n\tpadding: 12px 16px 4px;\n\tflex-shrink: 0;\n`;\n\nexport const InputWrapper = styled.div<{ $focused: boolean }>`\n\tdisplay: flex;\n\talign-items: flex-end;\n\tgap: 8px;\n\tpadding: 8px 8px 8px 12px;\n\tborder: 1px solid\n\t\t${(props) => (props.$focused ? COLORS.stroke.brand : COLORS.stroke.primary)};\n\tborder-radius: 12px;\n\tbackground: ${COLORS.surface.standard};\n\ttransition: border-color 0.15s ease;\n`;\n\nexport const MessageInput = styled.textarea`\n\tflex: 1;\n\tborder: none;\n\toutline: none;\n\tresize: none;\n\tbackground: transparent;\n\tfont-family: Inter;\n\tfont-size: 13px;\n\tline-height: 20px;\n\tcolor: ${COLORS.content.primary};\n\tmax-height: 96px;\n\tmin-height: 20px;\n\tpadding: 4px 0;\n\n\t&::placeholder {\n\t\tcolor: ${COLORS.content.placeholder};\n\t}\n\n\t&:disabled {\n\t\tcursor: not-allowed;\n\t}\n`;\n\nexport const SendButton = styled.button<{ $active: boolean }>`\n\twidth: 28px;\n\theight: 28px;\n\tflex-shrink: 0;\n\tdisplay: flex;\n\talign-items: center;\n\tjustify-content: center;\n\tpadding: 0;\n\tborder: none;\n\tborder-radius: 8px;\n\tbackground: ${(props) =>\n\t\tprops.$active ? COLORS.background.brand : COLORS.background.brandLight};\n\tcolor: ${(props) =>\n\t\tprops.$active ? COLORS.content.primaryInverse : COLORS.content.inactive};\n\tcursor: ${(props) => (props.$active ? 'pointer' : 'not-allowed')};\n\ttransition: background 0.15s ease, color 0.15s ease;\n\n\t&:focus-visible {\n\t\toutline: 2px solid ${COLORS.stroke.brand};\n\t\toutline-offset: 1px;\n\t}\n`;\n\nexport const Disclaimer = styled.div`\n\tpadding: 6px 16px 12px;\n\ttext-align: center;\n\tfont-family: Inter;\n\tfont-size: 11px;\n\tline-height: 16px;\n\tcolor: ${COLORS.content.placeholder};\n\tflex-shrink: 0;\n`;\n"],"names":["PanelContainer","styled","COLORS","PanelHeader","HeaderAvatar","HeaderText","HeaderTitleRow","HeaderBadge","HeaderActions","IconAction","MessagesViewport","MessagesArea","ScrollFade","props","JumpToLatestButton","EmptyState","EmptyStateIcon","SuggestionList","SuggestionChip","MessageBubble","ThinkingBubble","HistoryLoader","FollowUpList","FollowUpsLabel","FollowUpChip","InterruptedNote","ThinkingLabel","ErrorBanner","InputArea","InputWrapper","MessageInput","SendButton","Disclaimer"],"mappings":";;AAGO,MAAMA,IAAiBC,EAAO;AAAA;AAAA;AAAA;AAAA;AAAA,eAKtBC,EAAO,QAAQ,QAAQ;AAAA,qBACjBA,EAAO,OAAO,OAAO;AAAA;AAAA;AAAA,GAK7BC,IAAcF,EAAO;AAAA;AAAA;AAAA;AAAA;AAAA,4BAKNC,EAAO,OAAO,OAAO;AAAA;AAAA,GAIpCE,IAAeH,EAAO;AAAA;AAAA;AAAA;AAAA;AAAA,eAKpBC,EAAO,WAAW,IAAI;AAAA;AAAA;AAAA;AAAA,UAI3BA,EAAO,QAAQ,KAAK;AAAA;AAAA,GAIjBG,IAAaJ,EAAO;AAAA;AAAA;AAAA;AAAA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otViewport } from './model';
2
- export interface CopilotPanelPlacementOptions {
3
- ballPosition: CopilotBallPosition;
4
- ballSize: number;
5
- panelWidth: number;
6
- panelHeight: number;
7
- gap: number;
8
- viewport: CopilotViewport;
9
- }
10
- export interface CopilotPanelPlacement {
11
- left: number;
12
- top: number;
13
- width: number;
14
- height: number;
15
- }
16
- /**
17
- * Places the panel next to the ball, on whichever side has room.
18
- *
19
- * The panel opens towards the middle of the screen: a ball parked bottom-right
20
- * gets a panel above and to its left, a ball parked top-left gets one below and
21
- * to its right. The result is always clamped inside the viewport, and the panel
22
- * shrinks on viewports too small to hold it at full size.
23
- */
24
- export declare const getCopilotPanelPlacement: ({ ballPosition, ballSize, panelWidth, panelHeight, gap, viewport, }: CopilotPanelPlacementOptions) => CopilotPanelPlacement;
@@ -1,38 +0,0 @@
1
- const M = (t, I, R) => Math.min(Math.max(t, I), Math.max(I, R)), E = ({
2
- ballPosition: t,
3
- ballSize: I,
4
- panelWidth: R,
5
- panelHeight: P,
6
- gap: n,
7
- viewport: h
8
- }) => {
9
- if (!h.width || !h.height)
10
- return {
11
- left: 8,
12
- top: 8,
13
- width: R,
14
- height: P
15
- };
16
- const _ = Math.min(R, h.width - 16), e = Math.min(
17
- P,
18
- h.height - 16
19
- ), c = t.x + I / 2, s = t.y + I / 2, T = c > h.width / 2, X = s > h.height / 2, d = T ? t.x + I - _ : t.x, A = X ? t.y - n - e : t.y + I + n;
20
- return {
21
- left: M(
22
- d,
23
- 8,
24
- h.width - _ - 8
25
- ),
26
- top: M(
27
- A,
28
- 8,
29
- h.height - e - 8
30
- ),
31
- width: _,
32
- height: e
33
- };
34
- };
35
- export {
36
- E as getCopilotPanelPlacement
37
- };
38
- //# sourceMappingURL=copilotPlacement.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"copilotPlacement.js","sources":["../../../../src/components/bik-copilot/copilotPlacement.ts"],"sourcesContent":["import { CopilotBallPosition, CopilotViewport } from './model';\n\n/** Smallest gap kept between the panel and the viewport edges. */\nconst VIEWPORT_MARGIN_PX = 8;\n\nexport interface CopilotPanelPlacementOptions {\n\tballPosition: CopilotBallPosition;\n\tballSize: number;\n\tpanelWidth: number;\n\tpanelHeight: number;\n\tgap: number;\n\tviewport: CopilotViewport;\n}\n\nexport interface CopilotPanelPlacement {\n\tleft: number;\n\ttop: number;\n\twidth: number;\n\theight: number;\n}\n\nconst clamp = (value: number, min: number, max: number) =>\n\tMath.min(Math.max(value, min), Math.max(min, max));\n\n/**\n * Places the panel next to the ball, on whichever side has room.\n *\n * The panel opens towards the middle of the screen: a ball parked bottom-right\n * gets a panel above and to its left, a ball parked top-left gets one below and\n * to its right. The result is always clamped inside the viewport, and the panel\n * shrinks on viewports too small to hold it at full size.\n */\nexport const getCopilotPanelPlacement = ({\n\tballPosition,\n\tballSize,\n\tpanelWidth,\n\tpanelHeight,\n\tgap,\n\tviewport,\n}: CopilotPanelPlacementOptions): CopilotPanelPlacement => {\n\tif (!viewport.width || !viewport.height) {\n\t\treturn {\n\t\t\tleft: VIEWPORT_MARGIN_PX,\n\t\t\ttop: VIEWPORT_MARGIN_PX,\n\t\t\twidth: panelWidth,\n\t\t\theight: panelHeight,\n\t\t};\n\t}\n\n\tconst width = Math.min(panelWidth, viewport.width - VIEWPORT_MARGIN_PX * 2);\n\tconst height = Math.min(\n\t\tpanelHeight,\n\t\tviewport.height - VIEWPORT_MARGIN_PX * 2,\n\t);\n\n\tconst ballCenterX = ballPosition.x + ballSize / 2;\n\tconst ballCenterY = ballPosition.y + ballSize / 2;\n\tconst opensLeftwards = ballCenterX > viewport.width / 2;\n\tconst opensUpwards = ballCenterY > viewport.height / 2;\n\n\t// Align the panel's near edge with the ball's, then push it towards the\n\t// screen centre.\n\tconst preferredLeft = opensLeftwards\n\t\t? ballPosition.x + ballSize - width\n\t\t: ballPosition.x;\n\tconst preferredTop = opensUpwards\n\t\t? ballPosition.y - gap - height\n\t\t: ballPosition.y + ballSize + gap;\n\n\treturn {\n\t\tleft: clamp(\n\t\t\tpreferredLeft,\n\t\t\tVIEWPORT_MARGIN_PX,\n\t\t\tviewport.width - width - VIEWPORT_MARGIN_PX,\n\t\t),\n\t\ttop: clamp(\n\t\t\tpreferredTop,\n\t\t\tVIEWPORT_MARGIN_PX,\n\t\t\tviewport.height - height - VIEWPORT_MARGIN_PX,\n\t\t),\n\t\twidth,\n\t\theight,\n\t};\n};\n"],"names":["clamp","value","min","max","getCopilotPanelPlacement","ballPosition","ballSize","panelWidth","panelHeight","gap","viewport","width","height","ballCenterX","ballCenterY","opensLeftwards","opensUpwards","preferredLeft","preferredTop"],"mappings":"AAqBA,MAAMA,IAAQ,CAACC,GAAeC,GAAaC,MAC1C,KAAK,IAAI,KAAK,IAAIF,GAAOC,CAAG,GAAG,KAAK,IAAIA,GAAKC,CAAG,CAAC,GAUrCC,IAA2B,CAAC;AAAA,EACxC,cAAAC;AAAA,EACA,UAAAC;AAAA,EACA,YAAAC;AAAA,EACA,aAAAC;AAAA,EACA,KAAAC;AAAA,EACA,UAAAC;AACD,MAA2D;AAC1D,MAAI,CAACA,EAAS,SAAS,CAACA,EAAS;AAChC,WAAO;AAAA,MACN,MAAM;AAAA,MACN,KAAK;AAAA,MACL,OAAOH;AAAA,MACP,QAAQC;AAAA,IAAA;AAIV,QAAMG,IAAQ,KAAK,IAAIJ,GAAYG,EAAS,QAAQ,EAAsB,GACpEE,IAAS,KAAK;AAAA,IACnBJ;AAAA,IACAE,EAAS,SAAS;AAAA,EAAqB,GAGlCG,IAAcR,EAAa,IAAIC,IAAW,GAC1CQ,IAAcT,EAAa,IAAIC,IAAW,GAC1CS,IAAiBF,IAAcH,EAAS,QAAQ,GAChDM,IAAeF,IAAcJ,EAAS,SAAS,GAI/CO,IAAgBF,IACnBV,EAAa,IAAIC,IAAWK,IAC5BN,EAAa,GACVa,IAAeF,IAClBX,EAAa,IAAII,IAAMG,IACvBP,EAAa,IAAIC,IAAWG;AAE/B,SAAO;AAAA,IACN,MAAMT;AAAA,MACLiB;AAAA,MACA;AAAA,MACAP,EAAS,QAAQC,IAAQ;AAAA,IAAA;AAAA,IAE1B,KAAKX;AAAA,MACJkB;AAAA,MACA;AAAA,MACAR,EAAS,SAASE,IAAS;AAAA,IAAA;AAAA,IAE5B,OAAAD;AAAA,IACA,QAAAC;AAAA,EAAA;AAEF;"}
@@ -1,16 +0,0 @@
1
- export { ControlledCopilot, default as default } from './ControlledCopilot';
2
- export { BIKCopilot } from './BIKCopilot';
3
- export { COPILOT_BALL_ATTRIBUTE, CopilotBall } from './CopilotBall';
4
- export { CopilotPanel } from './CopilotPanel';
5
- export { getCopilotPanelPlacement } from './copilotPlacement';
6
- export { DEFAULT_COPILOT_AGENT, DEFAULT_COPILOT_ROUTE, useCopilotIcebreakers, } from './useCopilotIcebreakers';
7
- export { useCopilotStreamChat } from './useCopilotStreamChat';
8
- export { useDraggableFloater } from './useDraggableFloater';
9
- export { COPILOT_ICEBREAKERS_PATH, fetchCopilotIcebreakers, } from './services/copilotIcebreakersClient';
10
- export { COPILOT_ENDPOINT_PATH, streamCopilotChat, } from './services/copilotStreamClient';
11
- export { CopilotSseParser } from './services/copilotSseParser';
12
- export { COPILOT_HISTORY_PAGE_SIZE, COPILOT_MESSAGES_PATH, fetchCopilotMessages, } from './services/copilotMessagesClient';
13
- export { COPILOT_SESSION_TTL_MS, MAX_PERSISTED_MESSAGES, copilotSessionKey, createCopilotSession, createCopilotSessionId, deleteCopilotSession, findLatestCopilotSessionId, isCopilotSessionExpired, listCopilotSessionKeys, loadCopilotSession, persistCopilotTurn, pruneCopilotSessions, saveCopilotSession, } from './services/copilotDb';
14
- export { clearCopilotPageSessions, getCopilotSessionIdForRoute, resetCopilotSessionForRoute, resolveCopilotSessionIdForRoute, } from './services/copilotPageSession';
15
- export type { CopilotPanelPlacement, CopilotPanelPlacementOptions, } from './copilotPlacement';
16
- export type { ControlledCopilotProps, BIKCopilotProps, CopilotAgent, CopilotBallPosition, CopilotBallProps, CopilotCorner, CopilotDragHandlers, CopilotIcebreakersResult, CopilotAnswerPayload, CopilotMessage, CopilotMessagesPage, CopilotPanelProps, CopilotSessionRecord, CopilotShellProps, CopilotStreamEvent, CopilotStreamHandlers, CopilotStreamRequest, CopilotTransportOptions, CopilotViewport, CopilotStoredMessageRow, FetchCopilotIcebreakersOptions, FetchCopilotMessagesOptions, StreamCopilotChatOptions, UseCopilotIcebreakersOptions, UseCopilotIcebreakersResult, UseCopilotStreamChatOptions, UseCopilotStreamChatResult, UseDraggableFloaterOptions, UseDraggableFloaterResult, } from './model';