@sarchauhan/chat 0.0.0-stage → 0.0.1
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.
- package/README.md +130 -2
- package/dist/blocks.css +291 -0
- package/dist/chat.css +959 -0
- package/dist/chat.select.css +345 -0
- package/dist/chips.css +248 -0
- package/dist/chunk-5SNRYULC.mjs +2201 -0
- package/dist/chunk-5SNRYULC.mjs.map +1 -0
- package/dist/index-DabpPX_p.d.mts +177 -0
- package/dist/index-DabpPX_p.d.ts +177 -0
- package/dist/index.d.mts +382 -0
- package/dist/index.d.ts +382 -0
- package/dist/index.js +4386 -0
- package/dist/index.js.map +1 -0
- package/dist/index.mjs +2247 -0
- package/dist/index.mjs.map +1 -0
- package/dist/markdown.css +247 -0
- package/dist/motion/error-state-shake.css +57 -0
- package/dist/motion/icon-swap.css +30 -0
- package/dist/motion/index.css +6 -0
- package/dist/motion/menu-dropdown.css +35 -0
- package/dist/motion/success-check.css +51 -0
- package/dist/motion/text-states-swap.css +28 -0
- package/dist/motion/tokens.css +96 -0
- package/dist/styles.css +11 -0
- package/dist/theme/tokens.css +253 -0
- package/dist/theme/typography.css +115 -0
- package/dist/widgets.css +570 -0
- package/dist/widgets.d.mts +4 -0
- package/dist/widgets.d.ts +4 -0
- package/dist/widgets.js +1996 -0
- package/dist/widgets.js.map +1 -0
- package/dist/widgets.mjs +48 -0
- package/dist/widgets.mjs.map +1 -0
- package/package.json +76 -4
package/dist/widgets.css
ADDED
|
@@ -0,0 +1,570 @@
|
|
|
1
|
+
.chat-widget {
|
|
2
|
+
width: 100%;
|
|
3
|
+
color: inherit;
|
|
4
|
+
}
|
|
5
|
+
|
|
6
|
+
.chat-widget-card {
|
|
7
|
+
display: flex;
|
|
8
|
+
width: min(100%, 46rem);
|
|
9
|
+
flex-direction: column;
|
|
10
|
+
gap: var(--chat-space-3);
|
|
11
|
+
color: inherit;
|
|
12
|
+
padding: var(--chat-space-1_5) 0;
|
|
13
|
+
}
|
|
14
|
+
|
|
15
|
+
.chat-widget-missing {
|
|
16
|
+
opacity: 0.72;
|
|
17
|
+
}
|
|
18
|
+
|
|
19
|
+
.chat-widget-header {
|
|
20
|
+
display: flex;
|
|
21
|
+
align-items: flex-start;
|
|
22
|
+
justify-content: space-between;
|
|
23
|
+
gap: var(--chat-space-4);
|
|
24
|
+
}
|
|
25
|
+
|
|
26
|
+
.chat-widget-heading {
|
|
27
|
+
min-width: 0;
|
|
28
|
+
}
|
|
29
|
+
|
|
30
|
+
.chat-widget-label-row {
|
|
31
|
+
display: flex;
|
|
32
|
+
align-items: center;
|
|
33
|
+
gap: var(--chat-space-1_5);
|
|
34
|
+
margin-bottom: var(--chat-space-1_5);
|
|
35
|
+
}
|
|
36
|
+
|
|
37
|
+
.chat-widget-status-dot {
|
|
38
|
+
width: 0.38rem;
|
|
39
|
+
height: 0.38rem;
|
|
40
|
+
flex: 0 0 auto;
|
|
41
|
+
border-radius: 999px;
|
|
42
|
+
background: var(--chat-accent, #10a37f);
|
|
43
|
+
opacity: 0.72;
|
|
44
|
+
}
|
|
45
|
+
|
|
46
|
+
.chat-widget-label {
|
|
47
|
+
color: inherit;
|
|
48
|
+
font-size: var(--chat-caption-size);
|
|
49
|
+
font-weight: var(--chat-label-weight);
|
|
50
|
+
letter-spacing: 0.08em;
|
|
51
|
+
opacity: 0.4;
|
|
52
|
+
text-transform: uppercase;
|
|
53
|
+
}
|
|
54
|
+
|
|
55
|
+
.chat-widget-title {
|
|
56
|
+
color: inherit;
|
|
57
|
+
font-size: var(--chat-heading-2-size);
|
|
58
|
+
font-weight: var(--chat-heading-2-weight);
|
|
59
|
+
line-height: var(--chat-heading-2-leading);
|
|
60
|
+
opacity: 0.92;
|
|
61
|
+
}
|
|
62
|
+
|
|
63
|
+
.chat-widget-status {
|
|
64
|
+
flex: 0 0 auto;
|
|
65
|
+
color: inherit;
|
|
66
|
+
font-size: var(--chat-caption-size);
|
|
67
|
+
font-weight: var(--chat-label-weight);
|
|
68
|
+
line-height: var(--chat-leading-tight);
|
|
69
|
+
opacity: 0.44;
|
|
70
|
+
white-space: nowrap;
|
|
71
|
+
}
|
|
72
|
+
|
|
73
|
+
.chat-widget-body {
|
|
74
|
+
min-width: 0;
|
|
75
|
+
}
|
|
76
|
+
|
|
77
|
+
.chat-widget-options {
|
|
78
|
+
display: flex;
|
|
79
|
+
flex-direction: column;
|
|
80
|
+
gap: var(--chat-space-1);
|
|
81
|
+
}
|
|
82
|
+
|
|
83
|
+
.chat-widget-option {
|
|
84
|
+
display: flex;
|
|
85
|
+
align-items: center;
|
|
86
|
+
justify-content: flex-start;
|
|
87
|
+
gap: var(--chat-space-2_5);
|
|
88
|
+
width: 100%;
|
|
89
|
+
min-height: 2.75rem;
|
|
90
|
+
border: 0;
|
|
91
|
+
border-radius: var(--chat-radius);
|
|
92
|
+
padding: var(--chat-space-2) var(--chat-space-3);
|
|
93
|
+
color: inherit;
|
|
94
|
+
background: transparent;
|
|
95
|
+
cursor: pointer;
|
|
96
|
+
font: inherit;
|
|
97
|
+
line-height: var(--chat-leading-snug);
|
|
98
|
+
text-align: left;
|
|
99
|
+
transition:
|
|
100
|
+
color var(--chat-transition),
|
|
101
|
+
opacity var(--chat-transition),
|
|
102
|
+
background-color var(--chat-transition),
|
|
103
|
+
transform var(--chat-transition);
|
|
104
|
+
}
|
|
105
|
+
|
|
106
|
+
.chat-widget-option::before {
|
|
107
|
+
width: 1.05rem;
|
|
108
|
+
height: 1.05rem;
|
|
109
|
+
flex: 0 0 auto;
|
|
110
|
+
border: 1.5px solid currentColor;
|
|
111
|
+
border-radius: 50%;
|
|
112
|
+
content: "";
|
|
113
|
+
opacity: 0.45;
|
|
114
|
+
transition:
|
|
115
|
+
border-color var(--chat-transition),
|
|
116
|
+
box-shadow var(--chat-transition),
|
|
117
|
+
transform var(--chat-transition);
|
|
118
|
+
}
|
|
119
|
+
|
|
120
|
+
.chat-widget-option:hover:not(:disabled) {
|
|
121
|
+
background: var(--chat-control-bg);
|
|
122
|
+
color: var(--chat-fg);
|
|
123
|
+
transform: translateX(0.2rem);
|
|
124
|
+
}
|
|
125
|
+
|
|
126
|
+
.chat-widget-option:focus-visible {
|
|
127
|
+
outline: 2px solid
|
|
128
|
+
color-mix(in oklab, var(--chat-accent, #10a37f) 55%, transparent);
|
|
129
|
+
outline-offset: 3px;
|
|
130
|
+
}
|
|
131
|
+
|
|
132
|
+
.chat-widget-option:disabled {
|
|
133
|
+
cursor: not-allowed;
|
|
134
|
+
opacity: 0.46;
|
|
135
|
+
}
|
|
136
|
+
|
|
137
|
+
.chat-widget-option[data-selected="true"] {
|
|
138
|
+
color: color-mix(in oklab, var(--chat-accent, #10a37f) 60%, currentColor);
|
|
139
|
+
background: color-mix(in oklab, var(--chat-accent, #10a37f) 10%, transparent);
|
|
140
|
+
}
|
|
141
|
+
|
|
142
|
+
.chat-widget-option[data-selected="true"]::before {
|
|
143
|
+
border-color: var(--chat-accent, #10a37f);
|
|
144
|
+
box-shadow:
|
|
145
|
+
inset 0 0 0 3px var(--chat-bg),
|
|
146
|
+
inset 0 0 0 6px var(--chat-accent, #10a37f);
|
|
147
|
+
opacity: 1;
|
|
148
|
+
transform: scale(1.06);
|
|
149
|
+
}
|
|
150
|
+
|
|
151
|
+
.chat-widget-option-text {
|
|
152
|
+
min-width: 0;
|
|
153
|
+
overflow-wrap: anywhere;
|
|
154
|
+
font-weight: var(--chat-weight-medium);
|
|
155
|
+
opacity: 0.86;
|
|
156
|
+
}
|
|
157
|
+
|
|
158
|
+
.chat-widget-option-check {
|
|
159
|
+
display: none;
|
|
160
|
+
}
|
|
161
|
+
|
|
162
|
+
.chat-widget-option-check svg {
|
|
163
|
+
width: 0.9rem;
|
|
164
|
+
height: 0.9rem;
|
|
165
|
+
}
|
|
166
|
+
|
|
167
|
+
.chat-widget-meta,
|
|
168
|
+
.chat-widget-inline-meta {
|
|
169
|
+
display: flex;
|
|
170
|
+
flex-wrap: wrap;
|
|
171
|
+
gap: var(--chat-space-1_5) var(--chat-space-2_5);
|
|
172
|
+
align-items: center;
|
|
173
|
+
color: inherit;
|
|
174
|
+
font-size: var(--chat-caption-size);
|
|
175
|
+
line-height: var(--chat-caption-leading);
|
|
176
|
+
opacity: 0.48;
|
|
177
|
+
}
|
|
178
|
+
|
|
179
|
+
.chat-widget-inline-meta {
|
|
180
|
+
margin-top: var(--chat-space-2);
|
|
181
|
+
}
|
|
182
|
+
|
|
183
|
+
.chat-widget-meta a,
|
|
184
|
+
.chat-widget-inline-meta a {
|
|
185
|
+
display: inline-flex;
|
|
186
|
+
align-items: center;
|
|
187
|
+
gap: var(--chat-space-1);
|
|
188
|
+
color: inherit;
|
|
189
|
+
text-decoration: underline;
|
|
190
|
+
text-decoration-thickness: 1px;
|
|
191
|
+
text-underline-offset: 3px;
|
|
192
|
+
}
|
|
193
|
+
|
|
194
|
+
.chat-widget-meta a:hover,
|
|
195
|
+
.chat-widget-inline-meta a:hover {
|
|
196
|
+
color: color-mix(in oklab, var(--chat-accent, #10a37f) 45%, currentColor);
|
|
197
|
+
opacity: 1;
|
|
198
|
+
}
|
|
199
|
+
|
|
200
|
+
.chat-widget-meta a svg,
|
|
201
|
+
.chat-widget-inline-meta a svg {
|
|
202
|
+
width: 0.78rem;
|
|
203
|
+
height: 0.78rem;
|
|
204
|
+
}
|
|
205
|
+
|
|
206
|
+
.chat-widget-map-frame {
|
|
207
|
+
position: relative;
|
|
208
|
+
overflow: hidden;
|
|
209
|
+
aspect-ratio: 16 / 10;
|
|
210
|
+
opacity: 0.82;
|
|
211
|
+
}
|
|
212
|
+
|
|
213
|
+
.chat-widget-map-frame iframe {
|
|
214
|
+
display: block;
|
|
215
|
+
width: 100%;
|
|
216
|
+
height: 100%;
|
|
217
|
+
border: 0;
|
|
218
|
+
filter: grayscale(0.92) contrast(1.04) brightness(0.72);
|
|
219
|
+
}
|
|
220
|
+
|
|
221
|
+
.chat-widget-map-pin {
|
|
222
|
+
position: absolute;
|
|
223
|
+
top: 50%;
|
|
224
|
+
left: 50%;
|
|
225
|
+
display: grid;
|
|
226
|
+
width: 1.8rem;
|
|
227
|
+
height: 1.8rem;
|
|
228
|
+
place-items: center;
|
|
229
|
+
border-radius: 999px;
|
|
230
|
+
color: var(--chat-accent, #10a37f);
|
|
231
|
+
opacity: 0.84;
|
|
232
|
+
transform: translate(-50%, -50%);
|
|
233
|
+
pointer-events: none;
|
|
234
|
+
}
|
|
235
|
+
|
|
236
|
+
.chat-widget-map-pin svg {
|
|
237
|
+
width: 1rem;
|
|
238
|
+
height: 1rem;
|
|
239
|
+
}
|
|
240
|
+
|
|
241
|
+
/* Prebuilt widgets: content-first, neutral chrome, scoped to the host theme. */
|
|
242
|
+
.chat-prebuilt {
|
|
243
|
+
min-width: 0;
|
|
244
|
+
margin-block: 0.75rem;
|
|
245
|
+
border: 1px solid var(--chat-border, #e5e5e5);
|
|
246
|
+
border-radius: var(--chat-radius, 0.5rem);
|
|
247
|
+
background: var(--chat-bg-elevated, #fff);
|
|
248
|
+
color: var(--chat-fg, #171717);
|
|
249
|
+
font: 0.8125rem/1.5 var(--chat-font-sans, system-ui);
|
|
250
|
+
overflow: hidden;
|
|
251
|
+
}
|
|
252
|
+
.chat-tool-widget > summary {
|
|
253
|
+
display: flex;
|
|
254
|
+
align-items: center;
|
|
255
|
+
gap: 0.5rem;
|
|
256
|
+
padding: 0.75rem;
|
|
257
|
+
cursor: pointer;
|
|
258
|
+
list-style: none;
|
|
259
|
+
}
|
|
260
|
+
.chat-tool-widget > summary::-webkit-details-marker {
|
|
261
|
+
display: none;
|
|
262
|
+
}
|
|
263
|
+
.chat-tool-widget > summary > svg {
|
|
264
|
+
flex-shrink: 0;
|
|
265
|
+
transition: transform 160ms ease;
|
|
266
|
+
}
|
|
267
|
+
.chat-tool-widget[open] > summary > svg {
|
|
268
|
+
transform: rotate(180deg);
|
|
269
|
+
}
|
|
270
|
+
.chat-tool-widget-label {
|
|
271
|
+
font-weight: 600;
|
|
272
|
+
white-space: nowrap;
|
|
273
|
+
}
|
|
274
|
+
.chat-tool-widget-title {
|
|
275
|
+
flex: 1;
|
|
276
|
+
overflow: hidden;
|
|
277
|
+
text-overflow: ellipsis;
|
|
278
|
+
white-space: nowrap;
|
|
279
|
+
font-family: var(--chat-font-mono, monospace);
|
|
280
|
+
color: var(--chat-fg-muted, #737373);
|
|
281
|
+
}
|
|
282
|
+
.chat-tool-widget-meta,
|
|
283
|
+
.chat-tool-widget-status {
|
|
284
|
+
font-size: 0.6875rem;
|
|
285
|
+
white-space: nowrap;
|
|
286
|
+
color: var(--chat-fg-muted, #737373);
|
|
287
|
+
}
|
|
288
|
+
.chat-tool-widget[data-state="error"] .chat-tool-widget-status,
|
|
289
|
+
.chat-widget-error {
|
|
290
|
+
color: var(--chat-danger, #b42318);
|
|
291
|
+
}
|
|
292
|
+
.chat-tool-widget-body {
|
|
293
|
+
border-top: 1px solid var(--chat-border, #e5e5e5);
|
|
294
|
+
}
|
|
295
|
+
.chat-code-preview {
|
|
296
|
+
overflow: auto;
|
|
297
|
+
max-height: 24rem;
|
|
298
|
+
padding-block: 0.5rem;
|
|
299
|
+
font: 0.75rem/1.7 var(--chat-font-mono, monospace);
|
|
300
|
+
}
|
|
301
|
+
.chat-code-line {
|
|
302
|
+
display: flex;
|
|
303
|
+
min-width: max-content;
|
|
304
|
+
padding-inline: 0.75rem;
|
|
305
|
+
}
|
|
306
|
+
.chat-code-line code {
|
|
307
|
+
white-space: pre;
|
|
308
|
+
font: inherit;
|
|
309
|
+
}
|
|
310
|
+
.chat-line-number {
|
|
311
|
+
flex: 0 0 3.5ch;
|
|
312
|
+
text-align: right;
|
|
313
|
+
margin-right: 1rem;
|
|
314
|
+
color: var(--chat-fg-subtle, #a3a3a3);
|
|
315
|
+
user-select: none;
|
|
316
|
+
}
|
|
317
|
+
.chat-diff [data-kind="header"] {
|
|
318
|
+
color: var(--chat-fg-muted, #737373);
|
|
319
|
+
background: var(--chat-control-bg, #f5f5f5);
|
|
320
|
+
}
|
|
321
|
+
.chat-diff [data-kind="add"] {
|
|
322
|
+
background: color-mix(in srgb, var(--chat-success, #059669) 9%, transparent);
|
|
323
|
+
}
|
|
324
|
+
.chat-diff [data-kind="remove"] {
|
|
325
|
+
background: color-mix(in srgb, var(--chat-danger, #b42318) 8%, transparent);
|
|
326
|
+
}
|
|
327
|
+
.chat-diff-add-count {
|
|
328
|
+
color: var(--chat-success, #059669);
|
|
329
|
+
}
|
|
330
|
+
.chat-diff-remove-count {
|
|
331
|
+
color: var(--chat-danger, #b42318);
|
|
332
|
+
}
|
|
333
|
+
.chat-widget-more {
|
|
334
|
+
display: block;
|
|
335
|
+
width: 100%;
|
|
336
|
+
border: 0;
|
|
337
|
+
border-top: 1px solid var(--chat-border, #e5e5e5);
|
|
338
|
+
background: transparent;
|
|
339
|
+
padding: 0.6rem;
|
|
340
|
+
font: inherit;
|
|
341
|
+
color: var(--chat-fg-muted, #737373);
|
|
342
|
+
cursor: pointer;
|
|
343
|
+
}
|
|
344
|
+
.chat-widget-more:hover {
|
|
345
|
+
background: var(--chat-control-hover, #f5f5f5);
|
|
346
|
+
}
|
|
347
|
+
.chat-widget-empty,
|
|
348
|
+
.chat-widget-error {
|
|
349
|
+
margin: 0;
|
|
350
|
+
padding: 0.75rem;
|
|
351
|
+
}
|
|
352
|
+
.chat-search-results {
|
|
353
|
+
margin: 0;
|
|
354
|
+
padding: 0;
|
|
355
|
+
list-style: none;
|
|
356
|
+
}
|
|
357
|
+
.chat-search-results li {
|
|
358
|
+
padding: 0.75rem;
|
|
359
|
+
border-bottom: 1px solid var(--chat-border, #e5e5e5);
|
|
360
|
+
}
|
|
361
|
+
.chat-search-results li:last-child {
|
|
362
|
+
border-bottom: 0;
|
|
363
|
+
}
|
|
364
|
+
.chat-search-path,
|
|
365
|
+
.chat-search-results a {
|
|
366
|
+
font-family: var(--chat-font-mono, monospace);
|
|
367
|
+
font-weight: 500;
|
|
368
|
+
color: inherit;
|
|
369
|
+
overflow-wrap: anywhere;
|
|
370
|
+
}
|
|
371
|
+
.chat-search-line {
|
|
372
|
+
color: var(--chat-fg-subtle, #a3a3a3);
|
|
373
|
+
}
|
|
374
|
+
.chat-search-results p {
|
|
375
|
+
margin: 0.25rem 0 0;
|
|
376
|
+
color: var(--chat-fg-muted, #737373);
|
|
377
|
+
white-space: pre-wrap;
|
|
378
|
+
overflow-wrap: anywhere;
|
|
379
|
+
}
|
|
380
|
+
.chat-question {
|
|
381
|
+
padding: 1rem;
|
|
382
|
+
}
|
|
383
|
+
.chat-question-eyebrow {
|
|
384
|
+
color: var(--chat-fg-muted, #737373);
|
|
385
|
+
font-size: 0.6875rem;
|
|
386
|
+
margin-bottom: 0.25rem;
|
|
387
|
+
}
|
|
388
|
+
.chat-question h3 {
|
|
389
|
+
font-size: 0.9375rem;
|
|
390
|
+
font-weight: 600;
|
|
391
|
+
margin: 0;
|
|
392
|
+
}
|
|
393
|
+
.chat-question-description {
|
|
394
|
+
margin: 0.4rem 0 0;
|
|
395
|
+
color: var(--chat-fg-muted, #737373);
|
|
396
|
+
}
|
|
397
|
+
.chat-question fieldset {
|
|
398
|
+
padding: 0;
|
|
399
|
+
margin: 0.875rem 0;
|
|
400
|
+
border: 0;
|
|
401
|
+
display: grid;
|
|
402
|
+
gap: 0.5rem;
|
|
403
|
+
min-width: 0;
|
|
404
|
+
}
|
|
405
|
+
.chat-question-option {
|
|
406
|
+
display: flex;
|
|
407
|
+
align-items: center;
|
|
408
|
+
gap: 0.75rem;
|
|
409
|
+
padding: 0.75rem;
|
|
410
|
+
border: 1px solid var(--chat-border, #e5e5e5);
|
|
411
|
+
border-radius: 0.375rem;
|
|
412
|
+
cursor: pointer;
|
|
413
|
+
}
|
|
414
|
+
.chat-question-option[data-selected="true"] {
|
|
415
|
+
border-color: var(--chat-fg, #171717);
|
|
416
|
+
background: var(--chat-control-bg, #f5f5f5);
|
|
417
|
+
}
|
|
418
|
+
.chat-question-option input {
|
|
419
|
+
accent-color: var(--chat-primary, #171717);
|
|
420
|
+
flex-shrink: 0;
|
|
421
|
+
}
|
|
422
|
+
.chat-question-option > span {
|
|
423
|
+
flex: 1;
|
|
424
|
+
min-width: 0;
|
|
425
|
+
}
|
|
426
|
+
.chat-question-option-title {
|
|
427
|
+
display: flex;
|
|
428
|
+
flex-wrap: wrap;
|
|
429
|
+
gap: 0.5rem;
|
|
430
|
+
align-items: center;
|
|
431
|
+
font-weight: 500;
|
|
432
|
+
}
|
|
433
|
+
.chat-question-option small {
|
|
434
|
+
font-size: 0.625rem;
|
|
435
|
+
color: var(--chat-fg-muted, #737373);
|
|
436
|
+
border: 1px solid var(--chat-border, #e5e5e5);
|
|
437
|
+
border-radius: 0.25rem;
|
|
438
|
+
padding-inline: 0.25rem;
|
|
439
|
+
}
|
|
440
|
+
.chat-question-option-description {
|
|
441
|
+
display: block;
|
|
442
|
+
color: var(--chat-fg-muted, #737373);
|
|
443
|
+
margin-top: 0.2rem;
|
|
444
|
+
font-size: 0.75rem;
|
|
445
|
+
}
|
|
446
|
+
.chat-question-custom {
|
|
447
|
+
display: grid;
|
|
448
|
+
gap: 0.4rem;
|
|
449
|
+
color: var(--chat-fg-muted, #737373);
|
|
450
|
+
}
|
|
451
|
+
.chat-question textarea {
|
|
452
|
+
font: inherit;
|
|
453
|
+
width: 100%;
|
|
454
|
+
box-sizing: border-box;
|
|
455
|
+
resize: vertical;
|
|
456
|
+
padding: 0.625rem;
|
|
457
|
+
border: 1px solid var(--chat-border, #e5e5e5);
|
|
458
|
+
border-radius: 0.375rem;
|
|
459
|
+
background: transparent;
|
|
460
|
+
color: var(--chat-fg, #171717);
|
|
461
|
+
}
|
|
462
|
+
.chat-question footer {
|
|
463
|
+
display: flex;
|
|
464
|
+
justify-content: space-between;
|
|
465
|
+
align-items: center;
|
|
466
|
+
gap: 0.75rem;
|
|
467
|
+
color: var(--chat-fg-muted, #737373);
|
|
468
|
+
font-size: 0.75rem;
|
|
469
|
+
}
|
|
470
|
+
.chat-question footer button {
|
|
471
|
+
display: flex;
|
|
472
|
+
align-items: center;
|
|
473
|
+
gap: 0.375rem;
|
|
474
|
+
padding: 0.5rem 0.75rem;
|
|
475
|
+
border: 0;
|
|
476
|
+
border-radius: 0.375rem;
|
|
477
|
+
background: var(--chat-primary, #171717);
|
|
478
|
+
color: var(--chat-primary-fg, #fff);
|
|
479
|
+
font: inherit;
|
|
480
|
+
cursor: pointer;
|
|
481
|
+
}
|
|
482
|
+
.chat-question button:disabled {
|
|
483
|
+
opacity: 0.5;
|
|
484
|
+
cursor: default;
|
|
485
|
+
}
|
|
486
|
+
.chat-prebuilt :focus-visible {
|
|
487
|
+
outline: 2px solid var(--chat-fg-muted, #737373);
|
|
488
|
+
outline-offset: 3px;
|
|
489
|
+
}
|
|
490
|
+
.chat-sr-only {
|
|
491
|
+
position: absolute;
|
|
492
|
+
width: 1px;
|
|
493
|
+
height: 1px;
|
|
494
|
+
padding: 0;
|
|
495
|
+
overflow: hidden;
|
|
496
|
+
clip-path: inset(50%);
|
|
497
|
+
white-space: nowrap;
|
|
498
|
+
}
|
|
499
|
+
@media (max-width: 480px) {
|
|
500
|
+
.chat-tool-widget-meta {
|
|
501
|
+
display: none;
|
|
502
|
+
}
|
|
503
|
+
.chat-tool-widget > summary {
|
|
504
|
+
gap: 0.375rem;
|
|
505
|
+
}
|
|
506
|
+
}
|
|
507
|
+
@media (prefers-reduced-motion: reduce) {
|
|
508
|
+
.chat-tool-widget > summary > svg {
|
|
509
|
+
transition: none;
|
|
510
|
+
}
|
|
511
|
+
}
|
|
512
|
+
|
|
513
|
+
/* Artifacts and agent activity reuse the chat theme, including inside portals. */
|
|
514
|
+
.chat-artifacts { display: grid; gap: .75rem; }
|
|
515
|
+
.chat-artifacts > .chat-artifact { margin: 0; }
|
|
516
|
+
.chat-artifact-row { display: flex; align-items: center; gap: .75rem; padding: .875rem; }
|
|
517
|
+
.chat-artifact-icon { display: grid; place-items: center; width: 2.5rem; height: 2.5rem; flex-shrink: 0; border-radius: .5rem; background: var(--chat-control-bg, #f5f5f5); color: var(--chat-fg-muted, #737373); }
|
|
518
|
+
.chat-artifact-heading { min-width: 0; flex: 1; display: grid; gap: .125rem; }
|
|
519
|
+
.chat-artifact-heading strong { overflow: hidden; white-space: nowrap; text-overflow: ellipsis; font-weight: 500; }
|
|
520
|
+
.chat-artifact-heading > span, .chat-artifact-state { font-size: .6875rem; color: var(--chat-fg-muted, #737373); }
|
|
521
|
+
.chat-artifact-state { white-space: nowrap; }
|
|
522
|
+
.chat-artifact[data-state="error"] .chat-artifact-state { color: var(--chat-danger, #b42318); }
|
|
523
|
+
.chat-artifact-thumbnail { display: grid; place-items: center; background: var(--chat-control-bg, #f5f5f5); border-bottom: 1px solid var(--chat-border, #e5e5e5); }
|
|
524
|
+
.chat-artifact-thumbnail img { display: block; width: 100%; max-height: 18rem; object-fit: contain; }
|
|
525
|
+
.chat-artifact-actions { display: flex; align-items: center; flex-wrap: wrap; gap: .5rem; padding: 0 .875rem .875rem; }
|
|
526
|
+
.chat-artifact-actions a, .chat-artifact-actions button { display: inline-flex; align-items: center; gap: .375rem; border: 1px solid var(--chat-border, #e5e5e5); border-radius: .375rem; padding: .375rem .625rem; background: transparent; color: inherit; font: inherit; text-decoration: none; cursor: pointer; }
|
|
527
|
+
.chat-artifact-actions a:hover, .chat-artifact-actions button:hover { background: var(--chat-control-hover, #f5f5f5); }
|
|
528
|
+
.chat-artifact-full-image { display: block; max-width: 100%; max-height: 65dvh; object-fit: contain; margin-inline: auto; }
|
|
529
|
+
.chat-artifact-text { margin: 0; white-space: pre-wrap; overflow-wrap: anywhere; font: .8125rem/1.7 var(--chat-font-mono, monospace); }
|
|
530
|
+
.chat-subagent { padding: 1rem; }
|
|
531
|
+
.chat-subagent-heading { display: flex; align-items: center; gap: .625rem; }
|
|
532
|
+
.chat-subagent-icon { flex-shrink: 0; color: var(--chat-fg-muted, #737373); }
|
|
533
|
+
.chat-subagent-heading > div:not(.chat-detail-origin) { flex: 1; min-width: 0; display: grid; gap: .125rem; }
|
|
534
|
+
.chat-subagent-heading strong { overflow-wrap: anywhere; font-weight: 500; }
|
|
535
|
+
.chat-subagent-state { font-size: .6875rem; color: var(--chat-fg-muted, #737373); }
|
|
536
|
+
.chat-subagent-inspect { display: flex; align-items: center; gap: .25rem; white-space: nowrap; border: 1px solid var(--chat-border, #e5e5e5); padding: .375rem .5rem; border-radius: .375rem; background: transparent; color: inherit; font: inherit; cursor: pointer; font-size: .75rem; }
|
|
537
|
+
.chat-subagent-inspect:hover { background: var(--chat-control-hover, #f5f5f5); }
|
|
538
|
+
.chat-subagent-task, .chat-subagent-summary { margin: .75rem 0 0; color: var(--chat-fg-muted, #737373); white-space: pre-wrap; overflow-wrap: anywhere; }
|
|
539
|
+
.chat-subagent-summary { color: var(--chat-fg, #171717); }
|
|
540
|
+
.chat-subagent-progress { display: block; width: 100%; height: .25rem; margin-top: .875rem; accent-color: var(--chat-primary, #171717); }
|
|
541
|
+
.chat-subagent-overview { display: flex; justify-content: space-between; align-items: center; font-size: .75rem; }
|
|
542
|
+
.chat-subagent-transcript { display: grid; gap: 1rem; margin-top: 1rem; }
|
|
543
|
+
.chat-subagent-message { min-width: 0; padding-bottom: 1rem; border-bottom: 1px solid var(--chat-border, #e5e5e5); }
|
|
544
|
+
.chat-subagent-message:last-child { border-bottom: 0; }
|
|
545
|
+
.chat-subagent-role { font-size: .6875rem; font-weight: 500; color: var(--chat-fg-muted, #737373); margin-bottom: .5rem; }
|
|
546
|
+
.chat-subagent-artifacts h4 { font-size: .8125rem; font-weight: 500; margin: 1rem 0 .625rem; }
|
|
547
|
+
.chat-subagent[data-state="running"] .chat-subagent-icon svg { animation: chat-agent-spin 1.5s linear infinite; }
|
|
548
|
+
.chat-subagent[data-state="failed"] .chat-subagent-state { color: var(--chat-danger, #b42318); }
|
|
549
|
+
.chat-detail-overlay { position: fixed; inset: 0; z-index: 1000; background: rgb(0 0 0 / .4); animation: chat-detail-fade 160ms ease-out; }
|
|
550
|
+
.chat-root.chat-detail-panel { box-sizing: border-box; position: fixed; z-index: 1001; left: 50%; top: 50%; transform: translate(-50%, -50%); width: min(46rem, calc(100vw - 3rem)); max-height: min(48rem, 85dvh); margin: 0; border: 1px solid var(--chat-border-strong); border-radius: .875rem; background: var(--chat-bg-elevated); box-shadow: 0 20px 80px rgb(0 0 0 / .2); animation: chat-detail-fade 160ms ease-out; }
|
|
551
|
+
.chat-detail-header { display: flex; align-items: flex-start; gap: 1rem; justify-content: space-between; padding: 1.125rem; flex-shrink: 0; border-bottom: 1px solid var(--chat-border); }
|
|
552
|
+
.chat-detail-header > div { min-width: 0; }
|
|
553
|
+
.chat-detail-title { margin: 0; font-size: 1rem; font-weight: 600; overflow-wrap: anywhere; }
|
|
554
|
+
.chat-detail-description { margin: .25rem 0 0; color: var(--chat-fg-muted); font-size: .8125rem; overflow-wrap: anywhere; }
|
|
555
|
+
.chat-detail-close { display: grid; place-items: center; flex-shrink: 0; width: 1.75rem; height: 1.75rem; border: 0; border-radius: .375rem; background: transparent; color: var(--chat-fg-muted); cursor: pointer; }
|
|
556
|
+
.chat-detail-close:hover { background: var(--chat-control-hover); }
|
|
557
|
+
.chat-detail-body { min-height: 0; overflow-y: auto; overscroll-behavior: contain; padding: 1.125rem; }
|
|
558
|
+
.chat-detail-handle { display: none; }
|
|
559
|
+
.chat-detail-panel :focus-visible { outline: 2px solid var(--chat-fg-muted); outline-offset: 3px; }
|
|
560
|
+
@keyframes chat-detail-fade { from { opacity: 0; } to { opacity: 1; } }
|
|
561
|
+
@keyframes chat-detail-slide { from { transform: translateY(100%); } to { transform: translateY(0); } }
|
|
562
|
+
@keyframes chat-agent-spin { to { transform: rotate(360deg); } }
|
|
563
|
+
@media (max-width: 640px) {
|
|
564
|
+
.chat-root.chat-detail-panel { inset: auto 0 0; transform: none; width: 100%; max-height: 90dvh; border-radius: 1rem 1rem 0 0; padding-bottom: env(safe-area-inset-bottom, 0px); animation: chat-detail-slide 180ms ease-out; }
|
|
565
|
+
.chat-detail-handle { display: block; flex-shrink: 0; width: 2.25rem; height: .25rem; margin: .625rem auto 0; border-radius: 1rem; background: var(--chat-border-strong); }
|
|
566
|
+
.chat-detail-header, .chat-detail-body { padding: 1rem; }
|
|
567
|
+
}
|
|
568
|
+
@media (prefers-reduced-motion: reduce) {
|
|
569
|
+
.chat-detail-overlay, .chat-root.chat-detail-panel, .chat-subagent[data-state="running"] .chat-subagent-icon svg { animation: none; }
|
|
570
|
+
}
|
|
@@ -0,0 +1,4 @@
|
|
|
1
|
+
export { A as ArtifactWidget, a as ArtifactWidgetProps, b as ArtifactsWidget, c as ArtifactsWidgetProps, i as DiffLine, P as PatchWidget, j as PatchWidgetProps, Q as QuestionAnswer, k as QuestionOption, l as QuestionWidget, m as QuestionWidgetProps, R as ReadFileWidget, n as ReadFileWidgetProps, o as ResponsiveDetail, p as ResponsiveDetailProps, S as SearchResult, q as SearchWidget, r as SearchWidgetProps, s as SubagentWidget, t as SubagentWidgetProps, T as ToolWidgetProps, x as WidgetState, y as computeDiff, z as computeTextDiff, B as computeToolState, E as computeToolWidget, H as formatArtifactSize, I as normalizeSearchResults, J as prebuiltWidgets, K as safeArtifactUrl, L as safeResultUrl } from './index-DabpPX_p.mjs';
|
|
2
|
+
export { AgentArtifact, AgentSubagent, AgentSubagentState, createArtifactData, createSubagentData, parseArtifact, parseSubagent } from '@sarchauhan/protocol';
|
|
3
|
+
import 'react/jsx-runtime';
|
|
4
|
+
import 'react';
|
|
@@ -0,0 +1,4 @@
|
|
|
1
|
+
export { A as ArtifactWidget, a as ArtifactWidgetProps, b as ArtifactsWidget, c as ArtifactsWidgetProps, i as DiffLine, P as PatchWidget, j as PatchWidgetProps, Q as QuestionAnswer, k as QuestionOption, l as QuestionWidget, m as QuestionWidgetProps, R as ReadFileWidget, n as ReadFileWidgetProps, o as ResponsiveDetail, p as ResponsiveDetailProps, S as SearchResult, q as SearchWidget, r as SearchWidgetProps, s as SubagentWidget, t as SubagentWidgetProps, T as ToolWidgetProps, x as WidgetState, y as computeDiff, z as computeTextDiff, B as computeToolState, E as computeToolWidget, H as formatArtifactSize, I as normalizeSearchResults, J as prebuiltWidgets, K as safeArtifactUrl, L as safeResultUrl } from './index-DabpPX_p.js';
|
|
2
|
+
export { AgentArtifact, AgentSubagent, AgentSubagentState, createArtifactData, createSubagentData, parseArtifact, parseSubagent } from '@sarchauhan/protocol';
|
|
3
|
+
import 'react/jsx-runtime';
|
|
4
|
+
import 'react';
|