@salmonui/chat 0.0.0-stage → 0.2.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 (103) hide show
  1. package/LICENSE +21 -0
  2. package/README.md +41 -2
  3. package/dist/conversation/Conversation.d.ts +4 -0
  4. package/dist/conversation/Conversation.d.ts.map +1 -0
  5. package/dist/conversation/Conversation.js +588 -0
  6. package/dist/conversation/Conversation.js.map +1 -0
  7. package/dist/conversation/Item.d.ts +67 -0
  8. package/dist/conversation/Item.d.ts.map +1 -0
  9. package/dist/conversation/Item.js +149 -0
  10. package/dist/conversation/Item.js.map +1 -0
  11. package/dist/conversation/assistant-lazy.d.ts +6 -0
  12. package/dist/conversation/assistant-lazy.d.ts.map +1 -0
  13. package/dist/conversation/assistant-lazy.js +16 -0
  14. package/dist/conversation/assistant-lazy.js.map +1 -0
  15. package/dist/conversation/assistant-static.d.ts +4 -0
  16. package/dist/conversation/assistant-static.d.ts.map +1 -0
  17. package/dist/conversation/assistant-static.js +9 -0
  18. package/dist/conversation/assistant-static.js.map +1 -0
  19. package/dist/conversation/assistant-types.d.ts +2 -0
  20. package/dist/conversation/assistant-types.d.ts.map +1 -0
  21. package/dist/conversation/assistant-types.js +3 -0
  22. package/dist/conversation/assistant-types.js.map +1 -0
  23. package/dist/conversation/assistant.d.ts +54 -0
  24. package/dist/conversation/assistant.d.ts.map +1 -0
  25. package/dist/conversation/assistant.js +348 -0
  26. package/dist/conversation/assistant.js.map +1 -0
  27. package/dist/conversation/context.d.ts +80 -0
  28. package/dist/conversation/context.d.ts.map +1 -0
  29. package/dist/conversation/context.js +40 -0
  30. package/dist/conversation/context.js.map +1 -0
  31. package/dist/conversation/format.d.ts +33 -0
  32. package/dist/conversation/format.d.ts.map +1 -0
  33. package/dist/conversation/format.js +150 -0
  34. package/dist/conversation/format.js.map +1 -0
  35. package/dist/conversation/parts.d.ts +16 -0
  36. package/dist/conversation/parts.d.ts.map +1 -0
  37. package/dist/conversation/parts.js +326 -0
  38. package/dist/conversation/parts.js.map +1 -0
  39. package/dist/conversation/runner.d.ts +15 -0
  40. package/dist/conversation/runner.d.ts.map +1 -0
  41. package/dist/conversation/runner.js +52 -0
  42. package/dist/conversation/runner.js.map +1 -0
  43. package/dist/conversation/store.d.ts +63 -0
  44. package/dist/conversation/store.d.ts.map +1 -0
  45. package/dist/conversation/store.js +142 -0
  46. package/dist/conversation/store.js.map +1 -0
  47. package/dist/conversation/types.d.ts +473 -0
  48. package/dist/conversation/types.d.ts.map +1 -0
  49. package/dist/conversation/types.js +5 -0
  50. package/dist/conversation/types.js.map +1 -0
  51. package/dist/conversation.css +788 -0
  52. package/dist/conversation.d.ts +18 -0
  53. package/dist/conversation.d.ts.map +1 -0
  54. package/dist/conversation.js +26 -0
  55. package/dist/conversation.js.map +1 -0
  56. package/dist/inline-assist/InlineAssist.d.ts +16 -0
  57. package/dist/inline-assist/InlineAssist.d.ts.map +1 -0
  58. package/dist/inline-assist/InlineAssist.js +384 -0
  59. package/dist/inline-assist/InlineAssist.js.map +1 -0
  60. package/dist/inline-assist/model.d.ts +40 -0
  61. package/dist/inline-assist/model.d.ts.map +1 -0
  62. package/dist/inline-assist/model.js +87 -0
  63. package/dist/inline-assist/model.js.map +1 -0
  64. package/dist/inline-assist/types.d.ts +216 -0
  65. package/dist/inline-assist/types.d.ts.map +1 -0
  66. package/dist/inline-assist/types.js +5 -0
  67. package/dist/inline-assist/types.js.map +1 -0
  68. package/dist/inline-assist.css +890 -0
  69. package/dist/inline-assist.d.ts +5 -0
  70. package/dist/inline-assist.d.ts.map +1 -0
  71. package/dist/inline-assist.js +12 -0
  72. package/dist/inline-assist.js.map +1 -0
  73. package/dist/internal/stream-run.d.ts +71 -0
  74. package/dist/internal/stream-run.d.ts.map +1 -0
  75. package/dist/internal/stream-run.js +161 -0
  76. package/dist/internal/stream-run.js.map +1 -0
  77. package/dist/internal/suggest.d.ts +90 -0
  78. package/dist/internal/suggest.d.ts.map +1 -0
  79. package/dist/internal/suggest.js +332 -0
  80. package/dist/internal/suggest.js.map +1 -0
  81. package/dist/smart-paste/fields.d.ts +31 -0
  82. package/dist/smart-paste/fields.d.ts.map +1 -0
  83. package/dist/smart-paste/fields.js +162 -0
  84. package/dist/smart-paste/fields.js.map +1 -0
  85. package/dist/smart-paste/useSmartPaste.d.ts +38 -0
  86. package/dist/smart-paste/useSmartPaste.d.ts.map +1 -0
  87. package/dist/smart-paste/useSmartPaste.js +56 -0
  88. package/dist/smart-paste/useSmartPaste.js.map +1 -0
  89. package/dist/smart-paste.d.ts +3 -0
  90. package/dist/smart-paste.d.ts.map +1 -0
  91. package/dist/smart-paste.js +6 -0
  92. package/dist/smart-paste.js.map +1 -0
  93. package/dist/styles.css +1754 -0
  94. package/dist/text-suggest/useTextSuggest.d.ts +13 -0
  95. package/dist/text-suggest/useTextSuggest.d.ts.map +1 -0
  96. package/dist/text-suggest/useTextSuggest.js +55 -0
  97. package/dist/text-suggest/useTextSuggest.js.map +1 -0
  98. package/dist/text-suggest.css +78 -0
  99. package/dist/text-suggest.d.ts +4 -0
  100. package/dist/text-suggest.d.ts.map +1 -0
  101. package/dist/text-suggest.js +9 -0
  102. package/dist/text-suggest.js.map +1 -0
  103. package/package.json +68 -4
@@ -0,0 +1,788 @@
1
+ @layer salmon.a,salmon.b;
2
+ @layer salmon.a {
3
+ /* @salmonui/react/mention: the suggestion popup.
4
+ The root only wraps the user's field; colors come from the theme variables. */
5
+ .salmon-mention {
6
+ display: block;
7
+ }
8
+
9
+ .salmon-mention-popup {
10
+ position: fixed;
11
+ z-index: 1000;
12
+ box-sizing: border-box;
13
+ min-inline-size: 180px;
14
+ max-inline-size: min(360px, calc(100vw - 16px));
15
+ max-block-size: min(calc(8 * 32px + 2 * var(--salmon-space-2) + 2px), calc(100vh - 16px));
16
+ overflow: auto;
17
+ padding: var(--salmon-space-2);
18
+ font-family: var(--salmon-font-sans, system-ui, sans-serif);
19
+ font-size: var(--salmon-font-size-md, 14px);
20
+ line-height: var(--salmon-line-height-tight, 1.25);
21
+ color: var(--salmon-text-primary, CanvasText);
22
+ background: var(--salmon-surface-overlay, Canvas);
23
+ border: 1px solid var(--salmon-border-default, GrayText);
24
+ border-radius: var(--salmon-radius-lg);
25
+ box-shadow: var(--salmon-shadow-md, none);
26
+ }
27
+
28
+ /* Fixed at the viewport origin (inline style) and moved by `transform` in a layout effect; hidden until placed. */
29
+ .salmon-mention-popup:not([data-placed]) {
30
+ visibility: hidden;
31
+ }
32
+
33
+ .salmon-mention-list {
34
+ margin: 0;
35
+ padding: 0;
36
+ list-style: none;
37
+ }
38
+
39
+ .salmon-mention-option {
40
+ display: flex;
41
+ align-items: center;
42
+ gap: var(--salmon-space-3);
43
+ min-block-size: 32px;
44
+ padding-inline: var(--salmon-space-4);
45
+ border-radius: var(--salmon-radius-sm, 4px);
46
+ white-space: nowrap;
47
+ overflow: hidden;
48
+ text-overflow: ellipsis;
49
+ cursor: pointer;
50
+ }
51
+
52
+ /* The default item text: one flex item, so a highlighted match sits flush with its text and long labels truncate. */
53
+ .salmon-mention-label {
54
+ min-inline-size: 0;
55
+ overflow: hidden;
56
+ text-overflow: ellipsis;
57
+ }
58
+
59
+ .salmon-mention-option[data-active] {
60
+ color: var(--salmon-text-primary, CanvasText);
61
+ background: var(--salmon-surface-selected, Highlight);
62
+ outline: var(--salmon-state-focus-ring-width, 2px) solid var(--salmon-state-focus-ring, Highlight);
63
+ outline-offset: calc(-1 * var(--salmon-state-focus-ring-width, 2px));
64
+ }
65
+
66
+ .salmon-mention-option[data-disabled] {
67
+ color: var(--salmon-text-disabled, GrayText);
68
+ cursor: default;
69
+ }
70
+
71
+ .salmon-mention-mark {
72
+ color: inherit;
73
+ background: none;
74
+ font-weight: var(--salmon-font-weight-semibold, 600);
75
+ text-decoration: underline;
76
+ }
77
+
78
+ .salmon-mention-status {
79
+ padding: var(--salmon-space-3) var(--salmon-space-4);
80
+ color: var(--salmon-text-secondary, GrayText);
81
+ }
82
+
83
+ .salmon-mention-status[data-error] {
84
+ color: var(--salmon-color-danger-text, CanvasText);
85
+ }
86
+
87
+ /* a mention inserted into a contenteditable target (createContentEditableMentionTarget). */
88
+ .salmon-mention-chip {
89
+ padding-inline: var(--salmon-space-2);
90
+ border-radius: var(--salmon-radius-sm, 4px);
91
+ color: var(--salmon-text-primary, CanvasText);
92
+ background: var(--salmon-surface-selected, Highlight);
93
+ white-space: nowrap;
94
+ user-select: all;
95
+ }
96
+
97
+ @media (forced-colors: active) {
98
+ .salmon-mention-chip {
99
+ border: 1px solid CanvasText;
100
+ }
101
+ .salmon-mention-popup {
102
+ color: CanvasText;
103
+ background: Canvas;
104
+ border-color: CanvasText;
105
+ }
106
+ .salmon-mention-option[data-active] {
107
+ color: HighlightText;
108
+ background: Highlight;
109
+ forced-color-adjust: none;
110
+ }
111
+ .salmon-mention-option[data-disabled] {
112
+ color: GrayText;
113
+ }
114
+ }
115
+
116
+ }
117
+ @layer salmon.b {
118
+ /* @salmonui/react/conversation: the chat and assistant variants. Colors come from
119
+ the theme variables; logical properties only (RTL mirrors). The scroller is
120
+ `flex-direction: column-reverse`, so server HTML is bottom-anchored. */
121
+ .salmon-conversation {
122
+ position: relative;
123
+ display: flex;
124
+ flex-direction: column;
125
+ box-sizing: border-box;
126
+ min-block-size: 0;
127
+ block-size: 100%;
128
+ font-family: var(--salmon-font-sans);
129
+ font-size: var(--salmon-font-size-md);
130
+ line-height: 1.4;
131
+ color: var(--salmon-text-primary);
132
+ background: var(--salmon-surface-base);
133
+ border: 1px solid var(--salmon-border-default);
134
+ border-radius: var(--salmon-radius-lg);
135
+ overflow: hidden;
136
+ }
137
+
138
+ .salmon-conversation-sr {
139
+ position: absolute;
140
+ inline-size: 1px;
141
+ block-size: 1px;
142
+ overflow: hidden;
143
+ clip-path: inset(50%);
144
+ }
145
+
146
+ /* Zero-specificity reset: a Button or other family's control placed in a slot keeps its own styles. */
147
+ :where(.salmon-conversation) button {
148
+ font: inherit;
149
+ color: inherit;
150
+ }
151
+
152
+ .salmon-conversation :is(button, a, article, textarea):focus-visible {
153
+ outline: var(--salmon-state-focus-ring-width) solid var(--salmon-state-focus-ring);
154
+ outline-offset: calc(-1 * var(--salmon-state-focus-ring-width));
155
+ }
156
+
157
+ /* Header and pinned bar */
158
+ .salmon-conversation-header,
159
+ .salmon-conversation-pinned-bar {
160
+ display: flex;
161
+ flex-wrap: wrap;
162
+ align-items: center;
163
+ gap: 8px;
164
+ padding: 8px 12px;
165
+ border-block-end: 1px solid var(--salmon-border-subtle);
166
+ }
167
+
168
+ .salmon-conversation-header__title {
169
+ flex: 1 1 8em;
170
+ font-weight: 600;
171
+ min-inline-size: 0;
172
+ }
173
+
174
+ .salmon-conversation-header__toolbar {
175
+ display: flex;
176
+ flex-wrap: wrap;
177
+ gap: 4px;
178
+ margin-inline-start: auto;
179
+ }
180
+
181
+ .salmon-conversation-pinned-bar {
182
+ padding-block: 4px;
183
+ background: var(--salmon-surface-sunken);
184
+ }
185
+
186
+ .salmon-conversation-pinned-bar__button {
187
+ display: flex;
188
+ gap: 6px;
189
+ min-inline-size: 0;
190
+ inline-size: 100%;
191
+ padding: 4px;
192
+ background: none;
193
+ border: 0;
194
+ border-radius: var(--salmon-radius-sm);
195
+ text-align: start;
196
+ white-space: nowrap;
197
+ cursor: pointer;
198
+ }
199
+
200
+ .salmon-conversation-pinned-bar__label {
201
+ font-weight: 600;
202
+ color: var(--salmon-color-primary-text);
203
+ }
204
+
205
+ /* Scroller and feed */
206
+ .salmon-conversation-scroller {
207
+ position: relative;
208
+ display: flex;
209
+ flex: 1;
210
+ flex-direction: column-reverse;
211
+ min-block-size: 0;
212
+ overflow-y: auto;
213
+ overflow-anchor: none;
214
+ overscroll-behavior: contain;
215
+ }
216
+
217
+ .salmon-conversation-content {
218
+ display: flex;
219
+ flex-direction: column;
220
+ padding-block: 8px;
221
+ }
222
+
223
+ .salmon-conversation-spacer {
224
+ flex: none;
225
+ }
226
+
227
+ .salmon-conversation-older {
228
+ min-block-size: 1px;
229
+ }
230
+
231
+ .salmon-conversation-skeleton {
232
+ display: block;
233
+ block-size: 40px;
234
+ margin: 8px 12px;
235
+ border-radius: var(--salmon-radius-md);
236
+ /* The Skeleton color: it also shows inside a sunken bubble (pending response). */
237
+ background: var(--salmon-border-subtle);
238
+ opacity: 0.6;
239
+ }
240
+
241
+ .salmon-conversation-empty {
242
+ padding: 24px 12px;
243
+ text-align: center;
244
+ color: var(--salmon-text-secondary);
245
+ }
246
+
247
+ .salmon-conversation-feed {
248
+ display: flex;
249
+ flex-direction: column;
250
+ }
251
+
252
+ .salmon-conversation-article {
253
+ padding: 4px 12px;
254
+ }
255
+
256
+ .salmon-conversation-date-separator {
257
+ display: flex;
258
+ justify-content: center;
259
+ margin-block: 8px;
260
+ font-size: 12px;
261
+ color: var(--salmon-text-secondary);
262
+ }
263
+
264
+ .salmon-conversation-date-separator > span {
265
+ padding: 2px 8px;
266
+ border-radius: var(--salmon-radius-full);
267
+ background: var(--salmon-surface-sunken);
268
+ }
269
+
270
+ /* Items */
271
+ .salmon-conversation-item {
272
+ position: relative;
273
+ display: flex;
274
+ flex-wrap: wrap;
275
+ align-items: flex-start;
276
+ gap: 8px;
277
+ }
278
+
279
+ .salmon-conversation[data-layout='bubbles'] .salmon-conversation-item[data-own] {
280
+ flex-direction: row-reverse;
281
+ }
282
+
283
+ .salmon-conversation[data-layout='bubbles'] .salmon-conversation-item[data-own] .salmon-conversation-item__body {
284
+ align-items: flex-end;
285
+ }
286
+
287
+ .salmon-conversation[data-layout='bubbles'] .salmon-conversation-item[data-own] .salmon-conversation-avatar {
288
+ display: none;
289
+ }
290
+
291
+ .salmon-conversation-avatar {
292
+ position: relative;
293
+ display: inline-flex;
294
+ flex: none;
295
+ align-items: center;
296
+ justify-content: center;
297
+ inline-size: 32px;
298
+ block-size: 32px;
299
+ border-radius: 50%;
300
+ overflow: hidden;
301
+ font-size: 12px;
302
+ font-weight: 600;
303
+ color: var(--salmon-color-primary-on);
304
+ background: var(--salmon-color-primary);
305
+ }
306
+
307
+ .salmon-conversation-avatar img {
308
+ inline-size: 100%;
309
+ block-size: 100%;
310
+ object-fit: cover;
311
+ }
312
+
313
+ .salmon-conversation-avatar__status {
314
+ position: absolute;
315
+ inset-block-end: 0;
316
+ inset-inline-end: 0;
317
+ }
318
+
319
+ .salmon-conversation-item__body {
320
+ display: flex;
321
+ flex-direction: column;
322
+ gap: 2px;
323
+ min-inline-size: 0;
324
+ max-inline-size: min(80%, 640px);
325
+ }
326
+
327
+ .salmon-conversation[data-layout='compact'] .salmon-conversation-item__body {
328
+ max-inline-size: none;
329
+ flex: 1;
330
+ }
331
+
332
+ .salmon-conversation-item__meta,
333
+ .salmon-conversation-item__forwarded {
334
+ display: flex;
335
+ flex-wrap: wrap;
336
+ align-items: baseline;
337
+ gap: 6px;
338
+ font-size: 12px;
339
+ color: var(--salmon-text-secondary);
340
+ }
341
+
342
+ .salmon-conversation-item__author,
343
+ .salmon-conversation-reply-preview__author {
344
+ font-weight: 600;
345
+ color: var(--salmon-text-primary);
346
+ }
347
+
348
+ .salmon-conversation-item__pinned,
349
+ .salmon-conversation-item__forwarded {
350
+ font-style: italic;
351
+ }
352
+
353
+ .salmon-conversation-item__bubble {
354
+ padding: 6px 10px;
355
+ white-space: pre-wrap;
356
+ overflow-wrap: anywhere;
357
+ border-radius: var(--salmon-radius-md);
358
+ background: var(--salmon-surface-sunken);
359
+ border: 1px solid var(--salmon-border-subtle);
360
+ }
361
+
362
+ .salmon-conversation[data-layout='bubbles'] .salmon-conversation-item[data-own] .salmon-conversation-item__bubble {
363
+ color: var(--salmon-color-primary-on);
364
+ background: var(--salmon-color-primary);
365
+ border-color: transparent;
366
+ }
367
+
368
+ .salmon-conversation[data-layout='compact'] .salmon-conversation-item__bubble {
369
+ padding: 0;
370
+ background: none;
371
+ border: 0;
372
+ }
373
+
374
+ .salmon-conversation-item[data-status='error'] .salmon-conversation-item__bubble {
375
+ border-color: var(--salmon-color-danger-border);
376
+ }
377
+
378
+ .salmon-conversation-mention {
379
+ font-weight: 600;
380
+ border-radius: var(--salmon-radius-sm);
381
+ background: var(--salmon-color-info-subtle);
382
+ color: var(--salmon-color-info-text);
383
+ }
384
+
385
+ .salmon-conversation[data-layout='bubbles'] .salmon-conversation-item[data-own] .salmon-conversation-mention {
386
+ color: inherit;
387
+ background: none;
388
+ text-decoration: underline;
389
+ }
390
+
391
+ .salmon-conversation-reply-preview {
392
+ display: flex;
393
+ flex-direction: column;
394
+ max-inline-size: 100%;
395
+ padding: 2px 8px;
396
+ border: 0;
397
+ border-inline-start: 3px solid var(--salmon-color-primary-border);
398
+ background: var(--salmon-surface-sunken);
399
+ text-align: start;
400
+ font-size: 12px;
401
+ cursor: pointer;
402
+ }
403
+
404
+ .salmon-conversation-header__title,
405
+ .salmon-conversation-pinned-bar__text,
406
+ .salmon-conversation-attachment__name,
407
+ .salmon-conversation-reply-preview__text,
408
+ .salmon-conversation-composer__reply-text {
409
+ overflow: hidden;
410
+ text-overflow: ellipsis;
411
+ white-space: nowrap;
412
+ }
413
+
414
+ .salmon-conversation-item__attachments,
415
+ .salmon-conversation-composer__attachments {
416
+ display: flex;
417
+ flex-wrap: wrap;
418
+ gap: 4px;
419
+ }
420
+
421
+ .salmon-conversation-attachment {
422
+ display: inline-flex;
423
+ align-items: center;
424
+ gap: 6px;
425
+ max-inline-size: 240px;
426
+ padding: 4px 8px;
427
+ font-size: 12px;
428
+ color: inherit;
429
+ text-decoration: none;
430
+ border: 1px solid var(--salmon-border-default);
431
+ border-radius: var(--salmon-radius-sm);
432
+ background: var(--salmon-surface-base);
433
+ cursor: pointer;
434
+ }
435
+
436
+ .salmon-conversation-attachment[data-error] {
437
+ border-color: var(--salmon-color-danger-border);
438
+ }
439
+
440
+ .salmon-conversation-attachment__open,
441
+ .salmon-conversation-attachment__remove,
442
+ .salmon-conversation-retry {
443
+ display: inline-flex;
444
+ gap: 6px;
445
+ padding: 0;
446
+ border: 0;
447
+ background: none;
448
+ cursor: pointer;
449
+ }
450
+
451
+ .salmon-conversation-attachment__size {
452
+ color: var(--salmon-text-secondary);
453
+ }
454
+
455
+ .salmon-conversation-attachment__progress {
456
+ inline-size: 48px;
457
+ accent-color: var(--salmon-color-primary);
458
+ }
459
+
460
+ .salmon-conversation-item__status {
461
+ display: flex;
462
+ align-items: center;
463
+ gap: 4px;
464
+ font-size: 12px;
465
+ color: var(--salmon-text-secondary);
466
+ }
467
+
468
+ .salmon-conversation-item__status[data-status='error'] {
469
+ color: var(--salmon-color-danger-text);
470
+ }
471
+
472
+ .salmon-conversation-retry {
473
+ padding: 0 4px;
474
+ text-decoration: underline;
475
+ }
476
+
477
+ /* Item actions: on touch, always shown on their own row under the item. With a hover pointer, a
478
+ floating toolbar over the item's top inline-end corner (the start corner of own bubbles),
479
+ shown on hover and focus within (opacity only: it stays in the accessibility tree), taking
480
+ no inline space from the bubble. */
481
+ .salmon-conversation-item-actions {
482
+ display: flex;
483
+ flex-basis: 100%;
484
+ gap: 2px;
485
+ }
486
+
487
+ .salmon-conversation[data-layout='bubbles'] .salmon-conversation-item[data-own] .salmon-conversation-item-actions {
488
+ justify-content: flex-end;
489
+ }
490
+
491
+ @media (hover: hover) {
492
+ .salmon-conversation-item-actions {
493
+ position: absolute;
494
+ inset-inline-end: 0;
495
+ background: var(--salmon-surface-overlay);
496
+ border: 1px solid var(--salmon-border-subtle);
497
+ border-radius: var(--salmon-radius-md);
498
+ opacity: 0;
499
+ }
500
+
501
+ .salmon-conversation[data-layout='bubbles'] .salmon-conversation-item[data-own] .salmon-conversation-item-actions {
502
+ inset-inline: 0 auto;
503
+ }
504
+
505
+ .salmon-conversation-article:is(:hover, :focus-within) .salmon-conversation-item-actions {
506
+ opacity: 1;
507
+ }
508
+ }
509
+
510
+ /* 28px in-item and header buttons; the composer row's are 32px squares, the input's height.
511
+ The header rule has zero specificity, so a slotted Button keeps its own metrics. */
512
+ .salmon-conversation-item-action,
513
+ :where(.salmon-conversation-header__toolbar > button),
514
+ .salmon-conversation-composer__reply-cancel,
515
+ .salmon-conversation-composer__attach,
516
+ .salmon-conversation-composer__send,
517
+ .salmon-conversation-composer__stop,
518
+ .salmon-conversation-composer__clear,
519
+ .salmon-conversation-composer__dictate {
520
+ display: inline-flex;
521
+ align-items: center;
522
+ justify-content: center;
523
+ min-inline-size: 28px;
524
+ block-size: 28px;
525
+ padding: 0 6px;
526
+ border: 0;
527
+ border-radius: var(--salmon-radius-sm);
528
+ background: none;
529
+ cursor: pointer;
530
+ }
531
+
532
+ .salmon-conversation-composer__attach,
533
+ .salmon-conversation-composer__send,
534
+ .salmon-conversation-composer__stop,
535
+ .salmon-conversation-composer__clear,
536
+ .salmon-conversation-composer__dictate {
537
+ inline-size: 32px;
538
+ block-size: 32px;
539
+ padding: 0;
540
+ border-radius: var(--salmon-radius-md);
541
+ }
542
+
543
+ .salmon-conversation-item-action:hover,
544
+ .salmon-conversation-composer__attach:hover,
545
+ .salmon-conversation-composer__dictate:hover,
546
+ .salmon-conversation-composer__reply-cancel:hover {
547
+ background: var(--salmon-surface-hover);
548
+ }
549
+
550
+ /* Typing, suggestions, jump button */
551
+ .salmon-conversation-typing {
552
+ display: flex;
553
+ align-items: center;
554
+ gap: 6px;
555
+ padding: 2px 12px;
556
+ font-size: 12px;
557
+ color: var(--salmon-text-secondary);
558
+ }
559
+
560
+ .salmon-conversation-typing__dots {
561
+ display: inline-flex;
562
+ gap: 2px;
563
+ }
564
+
565
+ .salmon-conversation-typing__dots > span {
566
+ inline-size: 4px;
567
+ block-size: 4px;
568
+ border-radius: 50%;
569
+ background: currentColor;
570
+ animation: salmon-conversation-typing 1s infinite ease-in-out;
571
+ }
572
+
573
+ .salmon-conversation-typing__dots > span:nth-child(2) {
574
+ animation-delay: 0.15s;
575
+ }
576
+
577
+ .salmon-conversation-typing__dots > span:nth-child(3) {
578
+ animation-delay: 0.3s;
579
+ }
580
+
581
+ @keyframes salmon-conversation-typing {
582
+ 0%,
583
+ 100% {
584
+ opacity: 0.3;
585
+ }
586
+ 50% {
587
+ opacity: 1;
588
+ }
589
+ }
590
+
591
+ @media (prefers-reduced-motion: reduce) {
592
+ .salmon-conversation-typing__dots > span {
593
+ animation: none;
594
+ }
595
+ }
596
+
597
+ .salmon-conversation-suggestions {
598
+ display: flex;
599
+ flex-wrap: wrap;
600
+ align-items: center;
601
+ gap: 6px;
602
+ padding: 6px 12px;
603
+ }
604
+
605
+ .salmon-conversation-suggestions__heading {
606
+ inline-size: 100%;
607
+ font-size: 12px;
608
+ color: var(--salmon-text-secondary);
609
+ }
610
+
611
+ .salmon-conversation-suggestion {
612
+ padding: 4px 10px;
613
+ color: var(--salmon-color-primary-text);
614
+ border: 1px solid var(--salmon-color-primary-border);
615
+ border-radius: var(--salmon-radius-full);
616
+ background: var(--salmon-surface-base);
617
+ cursor: pointer;
618
+ }
619
+
620
+ .salmon-conversation-jump {
621
+ position: absolute;
622
+ inset-inline-end: 16px;
623
+ inset-block-end: 72px;
624
+ display: inline-flex;
625
+ align-items: center;
626
+ gap: 4px;
627
+ min-inline-size: 36px;
628
+ block-size: 36px;
629
+ padding: 0 8px;
630
+ border: 1px solid var(--salmon-border-default);
631
+ border-radius: var(--salmon-radius-full);
632
+ background: var(--salmon-surface-overlay);
633
+ box-shadow: var(--salmon-shadow-md);
634
+ cursor: pointer;
635
+ }
636
+
637
+ .salmon-conversation-jump__count {
638
+ min-inline-size: 18px;
639
+ padding: 0 4px;
640
+ border-radius: var(--salmon-radius-full);
641
+ font-size: 11px;
642
+ color: var(--salmon-color-primary-on);
643
+ background: var(--salmon-color-primary);
644
+ }
645
+
646
+ /* Composer */
647
+ .salmon-conversation-composer {
648
+ display: flex;
649
+ flex-direction: column;
650
+ gap: 4px;
651
+ padding: 8px 12px;
652
+ padding-block-end: max(8px, env(safe-area-inset-bottom));
653
+ border-block-start: 1px solid var(--salmon-border-subtle);
654
+ }
655
+
656
+ .salmon-conversation-composer[data-dragging],
657
+ .salmon-conversation[data-dragging] {
658
+ outline: 2px dashed var(--salmon-color-primary-border);
659
+ outline-offset: -4px;
660
+ }
661
+
662
+ .salmon-conversation-composer__reply {
663
+ display: flex;
664
+ align-items: center;
665
+ gap: 6px;
666
+ padding: 4px 8px;
667
+ font-size: 12px;
668
+ border-inline-start: 3px solid var(--salmon-color-primary-border);
669
+ background: var(--salmon-surface-sunken);
670
+ }
671
+
672
+ .salmon-conversation-composer__reply-label {
673
+ flex: none;
674
+ font-weight: 600;
675
+ }
676
+
677
+ .salmon-conversation-composer__reply-text {
678
+ flex: 1;
679
+ min-inline-size: 0;
680
+ }
681
+
682
+ .salmon-conversation-composer__row {
683
+ display: flex;
684
+ align-items: flex-end;
685
+ gap: 4px;
686
+ }
687
+
688
+ .salmon-conversation-composer__input {
689
+ flex: 1;
690
+ box-sizing: border-box;
691
+ min-inline-size: 0;
692
+ min-block-size: 32px;
693
+ max-block-size: 160px;
694
+ padding: 5px 8px;
695
+ font: inherit;
696
+ color: inherit;
697
+ resize: none;
698
+ field-sizing: content;
699
+ border: 1px solid var(--salmon-border-default);
700
+ border-radius: var(--salmon-radius-md);
701
+ background: var(--salmon-surface-base);
702
+ }
703
+
704
+ .salmon-conversation-composer__input::placeholder {
705
+ color: var(--salmon-text-placeholder);
706
+ }
707
+
708
+ .salmon-conversation-composer__send {
709
+ color: var(--salmon-color-primary-on);
710
+ background: var(--salmon-color-primary);
711
+ }
712
+
713
+ .salmon-conversation-composer[data-empty] .salmon-conversation-composer__send {
714
+ opacity: 0.6;
715
+ }
716
+
717
+ .salmon-conversation-composer__stop {
718
+ color: var(--salmon-color-danger-on);
719
+ background: var(--salmon-color-danger);
720
+ }
721
+
722
+ /* Assistant variant: clear and dictation buttons, pending response, parts, alternatives, feedback. */
723
+ .salmon-conversation-composer[data-empty] .salmon-conversation-composer__clear,
724
+ .salmon-conversation-stream:not(:empty) + .salmon-conversation-pending {
725
+ display: none;
726
+ }
727
+
728
+ .salmon-conversation-composer__dictate[data-listening],
729
+ .salmon-conversation-item-action[aria-pressed='true'] {
730
+ color: var(--salmon-color-primary-text);
731
+ }
732
+
733
+ .salmon-conversation-pending .salmon-conversation-skeleton {
734
+ inline-size: 12em;
735
+ block-size: 1em;
736
+ margin: 0;
737
+ }
738
+
739
+ .salmon-conversation-reasoning,
740
+ .salmon-conversation-alternatives {
741
+ font-size: 12px;
742
+ color: var(--salmon-text-secondary);
743
+ }
744
+
745
+ .salmon-conversation-reasoning pre {
746
+ margin: 4px 0;
747
+ white-space: pre-wrap;
748
+ }
749
+
750
+ .salmon-conversation-alternatives {
751
+ display: flex;
752
+ align-items: center;
753
+ }
754
+
755
+ .salmon-conversation-footer {
756
+ padding: 6px 12px;
757
+ border-block-start: 1px solid var(--salmon-border-subtle);
758
+ }
759
+
760
+ /* Icons: currentColor masks, mirrored in RTL where directional. */
761
+ .salmon-conversation-icon {
762
+ display: inline-block;
763
+ inline-size: 16px;
764
+ block-size: 16px;
765
+ background: currentColor;
766
+ mask: var(--salmon-conversation-icon) center / contain no-repeat;
767
+ }
768
+
769
+ [dir='rtl'] .salmon-conversation-icon:is([data-icon='send'], [data-icon='reply']) {
770
+ transform: scaleX(-1);
771
+ }
772
+
773
+ .salmon-conversation-icon[data-icon='send'] { --salmon-conversation-icon: url("data:image/svg+xml,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'><path d='M1 14.5 15 8 1 1.5V6.5l9 1.5-9 1.5z'/></svg>"); }
774
+ .salmon-conversation-icon[data-icon='stop'] { --salmon-conversation-icon: url("data:image/svg+xml,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'><rect x='3' y='3' width='10' height='10' rx='1'/></svg>"); }
775
+ .salmon-conversation-icon[data-icon='attach'] { --salmon-conversation-icon: url("data:image/svg+xml,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16' fill='none' stroke='black' stroke-width='1.5'><path d='M13 7.5 7.8 12.7a3.2 3.2 0 0 1-4.5-4.5l5.6-5.6a2.1 2.1 0 0 1 3 3L6.3 11.2a1 1 0 0 1-1.5-1.5L9.7 4.8'/></svg>"); }
776
+ .salmon-conversation-icon[data-icon='close'] { --salmon-conversation-icon: url("data:image/svg+xml,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16' fill='none' stroke='black' stroke-width='1.5'><path d='M4 4l8 8M12 4l-8 8'/></svg>"); }
777
+ .salmon-conversation-icon[data-icon='jump'] { --salmon-conversation-icon: url("data:image/svg+xml,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16' fill='none' stroke='black' stroke-width='1.5'><path d='M8 2v11M3.5 8.5 8 13l4.5-4.5'/></svg>"); }
778
+ .salmon-conversation-icon[data-icon='copy'] { --salmon-conversation-icon: url("data:image/svg+xml,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16' fill='none' stroke='black' stroke-width='1.5'><rect x='5' y='5' width='9' height='9' rx='1'/><path d='M11 5V3a1 1 0 0 0-1-1H3a1 1 0 0 0-1 1v7a1 1 0 0 0 1 1h2'/></svg>"); }
779
+ .salmon-conversation-icon[data-icon='reply'] { --salmon-conversation-icon: url("data:image/svg+xml,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16' fill='none' stroke='black' stroke-width='1.5'><path d='M6 3 2 7l4 4M2 7h7a5 5 0 0 1 5 5v1'/></svg>"); }
780
+ .salmon-conversation-icon[data-icon='pin'] { --salmon-conversation-icon: url("data:image/svg+xml,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16' fill='none' stroke='black' stroke-width='1.5'><path d='M10 1.5 14.5 6l-2 .5-3 3 .5 3.5-1.5 1.5-3-3L2 15l3-3.5-3-3L3.5 7l3.5.5 3-3z'/></svg>"); }
781
+ .salmon-conversation-icon[data-icon='delete'] { --salmon-conversation-icon: url("data:image/svg+xml,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16' fill='none' stroke='black' stroke-width='1.5'><path d='M2.5 4h11M6 4V2.5h4V4M4 4l.7 9.5h6.6L12 4'/></svg>"); }
782
+ .salmon-conversation-icon:is([data-icon='status-sent'], [data-icon='status-delivered'], [data-icon='status-read']) { --salmon-conversation-icon: url("data:image/svg+xml,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16' fill='none' stroke='black' stroke-width='1.5'><path d='M2.5 8.5 6 12l7.5-8'/></svg>"); }
783
+ .salmon-conversation-icon[data-icon='mic'] { --salmon-conversation-icon: url("data:image/svg+xml,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16' fill='none' stroke='black' stroke-width='1.5'><rect x='5.5' y='1.5' width='5' height='9' rx='2.5'/><path d='M3 8a5 5 0 0 0 10 0M8 13v2'/></svg>"); }
784
+ .salmon-conversation-icon[data-icon='status-read'] { color: var(--salmon-color-primary-text); }
785
+ .salmon-conversation-icon[data-icon='status-sending'] { --salmon-conversation-icon: url("data:image/svg+xml,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16' fill='none' stroke='black' stroke-width='1.5'><circle cx='8' cy='8' r='6'/><path d='M8 4.5V8l2.5 1.5'/></svg>"); }
786
+ .salmon-conversation-icon[data-icon='status-error'] { --salmon-conversation-icon: url("data:image/svg+xml,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16' fill='none' stroke='black' stroke-width='1.5'><circle cx='8' cy='8' r='6'/><path d='M8 4.5v4.5M8 11v.5'/></svg>"); }
787
+
788
+ }