@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,1754 @@
1
+ @layer salmon.a,salmon.b,salmon.c,salmon.d;
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.a {
118
+ /* @salmonui/buttons/button/styles.css, first part (button-core): Button,
119
+ ToggleButton, ButtonGroup, ToggleButtonGroup without the chip, progress
120
+ and floating extras of styles/button.css. Colors come from --salmon-*
121
+ theme variables only; tone and variant are orthogonal (data-tone x
122
+ data-variant); sizes are three fixed metric sets. Logical properties only. */
123
+
124
+ .salmon-button {
125
+ --salmon-button-c: var(--salmon-surface-sunken);
126
+ --salmon-button-c-hover: var(--salmon-surface-hover);
127
+ --salmon-button-c-active: var(--salmon-border-subtle);
128
+ --salmon-button-c-on: var(--salmon-text-primary);
129
+ --salmon-button-c-edge: var(--salmon-border-default);
130
+ --salmon-button-c-subtle: var(--salmon-surface-hover);
131
+ --salmon-button-c-subtle-hover: var(--salmon-surface-sunken);
132
+ --salmon-button-c-text: var(--salmon-text-primary);
133
+ --salmon-button-c-border: var(--salmon-border-default);
134
+ --salmon-button-c-selected: var(--salmon-surface-selected);
135
+ --salmon-button-c-selected-edge: var(--salmon-border-selected);
136
+ --salmon-button-h: var(--salmon-control-height-md, 32px);
137
+ --salmon-button-pad: var(--salmon-control-padding-md, 12px);
138
+ --salmon-button-bg: var(--salmon-button-c);
139
+ --salmon-button-fg: var(--salmon-button-c-on);
140
+ --salmon-button-bd: var(--salmon-button-c-edge);
141
+ position: relative;
142
+ isolation: isolate;
143
+ display: inline-flex;
144
+ align-items: center;
145
+ justify-content: center;
146
+ gap: 6px;
147
+ box-sizing: border-box;
148
+ min-block-size: var(--salmon-button-h);
149
+ margin: 0;
150
+ padding-block: 0;
151
+ padding-inline: var(--salmon-button-pad);
152
+ overflow: hidden;
153
+ border: 1px solid var(--salmon-button-bd);
154
+ border-radius: var(--salmon-radius-md);
155
+ background: var(--salmon-button-bg);
156
+ color: var(--salmon-button-fg);
157
+ font-family: var(--salmon-font-sans);
158
+ font-size: var(--salmon-font-size-md);
159
+ font-weight: var(--salmon-font-weight-medium);
160
+ line-height: var(--salmon-line-height-tight);
161
+ text-decoration: none;
162
+ white-space: nowrap;
163
+ vertical-align: middle;
164
+ cursor: pointer;
165
+ user-select: none;
166
+ -webkit-tap-highlight-color: transparent;
167
+ transition: background-color var(--salmon-motion-duration-fast) var(--salmon-motion-easing), border-color var(--salmon-motion-duration-fast) var(--salmon-motion-easing), color var(--salmon-motion-duration-fast) var(--salmon-motion-easing);
168
+ }
169
+
170
+ /* The class's display would override the native hidden attribute. */
171
+ .salmon-button[hidden] {
172
+ display: none;
173
+ }
174
+
175
+ .salmon-button[data-tone='primary'],
176
+ .salmon-button[data-tone='success'],
177
+ .salmon-button[data-tone='warning'],
178
+ .salmon-button[data-tone='danger'],
179
+ .salmon-button[data-tone='info'] {
180
+ --salmon-button-c-edge: var(--salmon-button-c);
181
+ --salmon-button-c-selected: var(--salmon-button-c-subtle);
182
+ --salmon-button-c-selected-edge: var(--salmon-button-c);
183
+ }
184
+ .salmon-button[data-tone='primary'] {
185
+ --salmon-button-c: var(--salmon-color-primary);
186
+ --salmon-button-c-hover: var(--salmon-color-primary-hover);
187
+ --salmon-button-c-active: var(--salmon-color-primary-active);
188
+ --salmon-button-c-on: var(--salmon-color-primary-on);
189
+ --salmon-button-c-subtle: var(--salmon-color-primary-subtle);
190
+ --salmon-button-c-subtle-hover: var(--salmon-color-primary-subtle-hover);
191
+ --salmon-button-c-text: var(--salmon-color-primary-text);
192
+ --salmon-button-c-border: var(--salmon-color-primary-border);
193
+ }
194
+ .salmon-button[data-tone='success'] {
195
+ --salmon-button-c: var(--salmon-color-success);
196
+ --salmon-button-c-hover: var(--salmon-color-success-hover);
197
+ --salmon-button-c-active: var(--salmon-color-success-active);
198
+ --salmon-button-c-on: var(--salmon-color-success-on);
199
+ --salmon-button-c-subtle: var(--salmon-color-success-subtle);
200
+ --salmon-button-c-subtle-hover: var(--salmon-color-success-subtle-hover);
201
+ --salmon-button-c-text: var(--salmon-color-success-text);
202
+ --salmon-button-c-border: var(--salmon-color-success-border);
203
+ }
204
+ .salmon-button[data-tone='warning'] {
205
+ --salmon-button-c: var(--salmon-color-warning);
206
+ --salmon-button-c-hover: var(--salmon-color-warning-hover);
207
+ --salmon-button-c-active: var(--salmon-color-warning-active);
208
+ --salmon-button-c-on: var(--salmon-color-warning-on);
209
+ --salmon-button-c-subtle: var(--salmon-color-warning-subtle);
210
+ --salmon-button-c-subtle-hover: var(--salmon-color-warning-subtle-hover);
211
+ --salmon-button-c-text: var(--salmon-color-warning-text);
212
+ --salmon-button-c-border: var(--salmon-color-warning-border);
213
+ }
214
+ .salmon-button[data-tone='danger'] {
215
+ --salmon-button-c: var(--salmon-color-danger);
216
+ --salmon-button-c-hover: var(--salmon-color-danger-hover);
217
+ --salmon-button-c-active: var(--salmon-color-danger-active);
218
+ --salmon-button-c-on: var(--salmon-color-danger-on);
219
+ --salmon-button-c-subtle: var(--salmon-color-danger-subtle);
220
+ --salmon-button-c-subtle-hover: var(--salmon-color-danger-subtle-hover);
221
+ --salmon-button-c-text: var(--salmon-color-danger-text);
222
+ --salmon-button-c-border: var(--salmon-color-danger-border);
223
+ }
224
+ .salmon-button[data-tone='info'] {
225
+ --salmon-button-c: var(--salmon-color-info);
226
+ --salmon-button-c-hover: var(--salmon-color-info-hover);
227
+ --salmon-button-c-active: var(--salmon-color-info-active);
228
+ --salmon-button-c-on: var(--salmon-color-info-on);
229
+ --salmon-button-c-subtle: var(--salmon-color-info-subtle);
230
+ --salmon-button-c-subtle-hover: var(--salmon-color-info-subtle-hover);
231
+ --salmon-button-c-text: var(--salmon-color-info-text);
232
+ --salmon-button-c-border: var(--salmon-color-info-border);
233
+ }
234
+
235
+ /* Sizes: the density control metrics. */
236
+ .salmon-button[data-size='sm'] {
237
+ --salmon-button-h: var(--salmon-control-height-sm, 24px);
238
+ --salmon-button-pad: var(--salmon-control-padding-sm, 8px);
239
+ gap: 4px;
240
+ font-size: var(--salmon-font-size-sm);
241
+ }
242
+ .salmon-button[data-size='lg'] {
243
+ --salmon-button-h: var(--salmon-control-height-lg, 40px);
244
+ --salmon-button-pad: var(--salmon-control-padding-lg, 16px);
245
+ gap: 8px;
246
+ font-size: var(--salmon-font-size-lg);
247
+ }
248
+ .salmon-button[data-icon-only] {
249
+ min-inline-size: var(--salmon-button-h);
250
+ padding-inline: 0;
251
+ }
252
+ /* A glyph in the label is a flex item, not an inline box on the text baseline,
253
+ so it sits on the centre axis. */
254
+ .salmon-button[data-icon-only] > .salmon-button__label {
255
+ display: flex;
256
+ }
257
+
258
+ /* Variants. */
259
+ .salmon-button[data-variant='solid']:hover {
260
+ --salmon-button-bg: var(--salmon-button-c-hover);
261
+ }
262
+ .salmon-button[data-variant='solid']:active {
263
+ --salmon-button-bg: var(--salmon-button-c-active);
264
+ }
265
+ /* A pressed state persists, so it keeps the guaranteed pairs:
266
+ the fill with its on-color, marked by an inset ring
267
+ of that on-color; outline and ghost use the subtle surface with tone text. */
268
+ .salmon-button[data-variant='solid'][data-pressed] {
269
+ --salmon-button-bg: var(--salmon-button-c);
270
+ box-shadow: inset 0 0 0 2px var(--salmon-button-c-on);
271
+ }
272
+ .salmon-button[data-variant='outline'],
273
+ .salmon-button[data-variant='ghost'],
274
+ .salmon-button[data-variant='link'] {
275
+ --salmon-button-bg: transparent;
276
+ --salmon-button-fg: var(--salmon-button-c-text);
277
+ --salmon-button-bd: transparent;
278
+ }
279
+ .salmon-button[data-variant='outline'] {
280
+ --salmon-button-bd: var(--salmon-button-c-border);
281
+ }
282
+ .salmon-button[data-variant='outline']:hover,
283
+ .salmon-button[data-variant='ghost']:hover {
284
+ --salmon-button-bg: var(--salmon-button-c-subtle);
285
+ }
286
+ .salmon-button[data-variant='outline']:active,
287
+ .salmon-button[data-variant='ghost']:active {
288
+ --salmon-button-bg: var(--salmon-button-c-subtle-hover);
289
+ }
290
+ .salmon-button[data-variant='outline'][data-pressed],
291
+ .salmon-button[data-variant='ghost'][data-pressed] {
292
+ --salmon-button-bg: var(--salmon-button-c-subtle);
293
+ --salmon-button-bd: var(--salmon-button-c-selected-edge);
294
+ }
295
+ .salmon-button[data-variant='link'] {
296
+ padding-inline: 2px;
297
+ min-block-size: auto;
298
+ font-weight: var(--salmon-font-weight-regular);
299
+ }
300
+ .salmon-button[data-variant='link'][data-tone='neutral'] {
301
+ --salmon-button-fg: var(--salmon-text-link);
302
+ }
303
+ .salmon-button[data-variant='link']:hover,
304
+ .salmon-button[data-variant='link'][data-pressed] {
305
+ text-decoration: underline;
306
+ }
307
+ /* States. */
308
+ .salmon-button:focus-visible {
309
+ z-index: 1;
310
+ outline: var(--salmon-state-focus-ring-width) solid var(--salmon-state-focus-ring);
311
+ outline-offset: var(--salmon-state-focus-ring-offset);
312
+ }
313
+ .salmon-button[data-variant]:disabled,
314
+ .salmon-button[data-variant][aria-disabled='true']:not([data-loading]) {
315
+ --salmon-button-bg: var(--salmon-surface-disabled);
316
+ --salmon-button-fg: var(--salmon-text-disabled);
317
+ --salmon-button-bd: var(--salmon-border-subtle);
318
+ cursor: not-allowed;
319
+ }
320
+ .salmon-button[data-variant='link']:disabled,
321
+ .salmon-button[data-variant='link'][aria-disabled='true']:not([data-loading]),
322
+ .salmon-button[data-variant='ghost']:disabled {
323
+ --salmon-button-bg: transparent;
324
+ --salmon-button-bd: transparent;
325
+ }
326
+ .salmon-button[data-loading] {
327
+ cursor: progress;
328
+ }
329
+
330
+ .salmon-button__label {
331
+ min-inline-size: 0;
332
+ overflow: hidden;
333
+ text-overflow: ellipsis;
334
+ }
335
+ .salmon-button__icon,
336
+ .salmon-button__spinner {
337
+ display: inline-flex;
338
+ flex: none;
339
+ align-items: center;
340
+ justify-content: center;
341
+ }
342
+ .salmon-button__spinner:empty {
343
+ inline-size: 1em;
344
+ block-size: 1em;
345
+ box-sizing: border-box;
346
+ border: 2px solid currentColor;
347
+ border-inline-end-color: transparent;
348
+ border-radius: 50%;
349
+ animation: salmon-button-spin 0.8s linear infinite;
350
+ }
351
+ @keyframes salmon-button-spin {
352
+ to {
353
+ rotate: 360deg;
354
+ }
355
+ }
356
+ .salmon-button__sr {
357
+ position: absolute;
358
+ inline-size: 1px;
359
+ block-size: 1px;
360
+ margin: -1px;
361
+ padding: 0;
362
+ overflow: hidden;
363
+ clip-path: inset(50%);
364
+ white-space: nowrap;
365
+ border: 0;
366
+ }
367
+
368
+ /* Groups. */
369
+ .salmon-button-group,
370
+ .salmon-toggle-button-group {
371
+ display: inline-flex;
372
+ gap: 8px;
373
+ vertical-align: middle;
374
+ }
375
+ .salmon-button-group:not([data-attached]),
376
+ .salmon-toggle-button-group:not([data-attached]) {
377
+ flex-wrap: wrap;
378
+ }
379
+ .salmon-button-group[data-orientation='vertical'],
380
+ .salmon-toggle-button-group[data-orientation='vertical'] {
381
+ flex-direction: column;
382
+ align-items: stretch;
383
+ }
384
+ .salmon-button-group[data-attached],
385
+ .salmon-toggle-button-group[data-attached] {
386
+ gap: 0;
387
+ }
388
+ [data-attached][data-orientation='horizontal'] > .salmon-button:not(:first-of-type) {
389
+ margin-inline-start: -1px;
390
+ border-start-start-radius: 0;
391
+ border-end-start-radius: 0;
392
+ }
393
+ [data-attached][data-orientation='horizontal'] > .salmon-button:not(:last-of-type) {
394
+ border-start-end-radius: 0;
395
+ border-end-end-radius: 0;
396
+ }
397
+ [data-attached][data-orientation='vertical'] > .salmon-button:not(:first-of-type) {
398
+ margin-block-start: -1px;
399
+ border-start-start-radius: 0;
400
+ border-start-end-radius: 0;
401
+ }
402
+ [data-attached][data-orientation='vertical'] > .salmon-button:not(:last-of-type) {
403
+ border-end-start-radius: 0;
404
+ border-end-end-radius: 0;
405
+ }
406
+ [data-attached] > .salmon-button:hover,
407
+ [data-attached] > .salmon-button[data-pressed] {
408
+ z-index: 1;
409
+ }
410
+
411
+ @media (prefers-reduced-motion: reduce) {
412
+ .salmon-button {
413
+ transition: none;
414
+ }
415
+ .salmon-button__spinner:empty {
416
+ animation-duration: 2.4s;
417
+ }
418
+ }
419
+
420
+ @media (forced-colors: active) {
421
+ .salmon-button {
422
+ border-color: ButtonText;
423
+ }
424
+ .salmon-button[data-pressed] {
425
+ forced-color-adjust: none;
426
+ border-color: Highlight;
427
+ background: Highlight;
428
+ color: HighlightText;
429
+ }
430
+ .salmon-button:disabled {
431
+ border-color: GrayText;
432
+ color: GrayText;
433
+ }
434
+ }
435
+
436
+ }
437
+ @layer salmon.a {
438
+ /* Shared accessibility helper: text for assistive technology only (badge
439
+ counts, spinner labels, live regions). Carried by the family stylesheets
440
+ whose markup uses it (`@salmonui/core:a11y` in the manifest). */
441
+
442
+ .salmon-visually-hidden {
443
+ position: absolute;
444
+ inline-size: 1px;
445
+ block-size: 1px;
446
+ margin: -1px;
447
+ padding: 0;
448
+ overflow: hidden;
449
+ clip-path: inset(50%);
450
+ white-space: nowrap;
451
+ border: 0;
452
+ }
453
+
454
+ }
455
+ @layer salmon.a {
456
+ /* @salmonui/react/text-suggest: the overlay, hint and live region useTextSuggest adds next
457
+ to the textarea. The controller writes the suggestion into `.salmon-text-suggest` at
458
+ the caret (top/left, `--salmon-text-suggest-line` = one line,
459
+ `--salmon-text-suggest-room` = space to the content edge). `auto` is inline
460
+ ghost text on fine pointers and a popover on coarse pointers, decided here
461
+ by media query. */
462
+ .salmon-text-suggest {
463
+ position: absolute;
464
+ z-index: 1;
465
+ box-sizing: border-box;
466
+ max-inline-size: var(--salmon-text-suggest-room);
467
+ overflow: hidden;
468
+ color: var(--salmon-text-placeholder);
469
+ white-space: pre;
470
+ text-overflow: ellipsis;
471
+ pointer-events: none;
472
+ user-select: none;
473
+ }
474
+
475
+ .salmon-text-suggest[hidden] {
476
+ display: none;
477
+ }
478
+
479
+ /* Right-to-left: anchored at the caret's right edge, the text runs leftwards. */
480
+ .salmon-text-suggest[data-rtl] {
481
+ translate: -100% 0;
482
+ }
483
+
484
+ .salmon-text-suggest[data-suggestion-display='popover'] {
485
+ max-inline-size: min(360px, calc(100vw - 16px));
486
+ margin-block-start: var(--salmon-text-suggest-line);
487
+ padding: 4px 8px;
488
+ color: var(--salmon-text-secondary);
489
+ white-space: pre-wrap;
490
+ background: var(--salmon-surface-overlay);
491
+ border: 1px solid var(--salmon-border-default);
492
+ border-radius: var(--salmon-radius-md);
493
+ box-shadow: var(--salmon-shadow-md);
494
+ pointer-events: auto;
495
+ cursor: pointer;
496
+ }
497
+
498
+ @media (pointer: coarse) {
499
+ .salmon-text-suggest[data-suggestion-display='auto'] {
500
+ max-inline-size: min(360px, calc(100vw - 16px));
501
+ margin-block-start: var(--salmon-text-suggest-line);
502
+ padding: 4px 8px;
503
+ color: var(--salmon-text-secondary);
504
+ white-space: pre-wrap;
505
+ background: var(--salmon-surface-overlay);
506
+ border: 1px solid var(--salmon-border-default);
507
+ border-radius: var(--salmon-radius-md);
508
+ box-shadow: var(--salmon-shadow-md);
509
+ pointer-events: auto;
510
+ cursor: pointer;
511
+ }
512
+ }
513
+
514
+ /* The hint and the live region are in the accessibility tree only. */
515
+ .salmon-text-suggest-hint,
516
+ .salmon-text-suggest-live {
517
+ position: absolute;
518
+ inline-size: 1px;
519
+ block-size: 1px;
520
+ overflow: hidden;
521
+ clip-path: inset(50%);
522
+ white-space: nowrap;
523
+ }
524
+
525
+ @media (forced-colors: active) {
526
+ .salmon-text-suggest {
527
+ color: GrayText;
528
+ }
529
+ }
530
+
531
+ }
532
+ @layer salmon.b {
533
+ /* @salmonui/react/conversation: the chat and assistant variants. Colors come from
534
+ the theme variables; logical properties only (RTL mirrors). The scroller is
535
+ `flex-direction: column-reverse`, so server HTML is bottom-anchored. */
536
+ .salmon-conversation {
537
+ position: relative;
538
+ display: flex;
539
+ flex-direction: column;
540
+ box-sizing: border-box;
541
+ min-block-size: 0;
542
+ block-size: 100%;
543
+ font-family: var(--salmon-font-sans);
544
+ font-size: var(--salmon-font-size-md);
545
+ line-height: 1.4;
546
+ color: var(--salmon-text-primary);
547
+ background: var(--salmon-surface-base);
548
+ border: 1px solid var(--salmon-border-default);
549
+ border-radius: var(--salmon-radius-lg);
550
+ overflow: hidden;
551
+ }
552
+
553
+ .salmon-conversation-sr {
554
+ position: absolute;
555
+ inline-size: 1px;
556
+ block-size: 1px;
557
+ overflow: hidden;
558
+ clip-path: inset(50%);
559
+ }
560
+
561
+ /* Zero-specificity reset: a Button or other family's control placed in a slot keeps its own styles. */
562
+ :where(.salmon-conversation) button {
563
+ font: inherit;
564
+ color: inherit;
565
+ }
566
+
567
+ .salmon-conversation :is(button, a, article, textarea):focus-visible {
568
+ outline: var(--salmon-state-focus-ring-width) solid var(--salmon-state-focus-ring);
569
+ outline-offset: calc(-1 * var(--salmon-state-focus-ring-width));
570
+ }
571
+
572
+ /* Header and pinned bar */
573
+ .salmon-conversation-header,
574
+ .salmon-conversation-pinned-bar {
575
+ display: flex;
576
+ flex-wrap: wrap;
577
+ align-items: center;
578
+ gap: 8px;
579
+ padding: 8px 12px;
580
+ border-block-end: 1px solid var(--salmon-border-subtle);
581
+ }
582
+
583
+ .salmon-conversation-header__title {
584
+ flex: 1 1 8em;
585
+ font-weight: 600;
586
+ min-inline-size: 0;
587
+ }
588
+
589
+ .salmon-conversation-header__toolbar {
590
+ display: flex;
591
+ flex-wrap: wrap;
592
+ gap: 4px;
593
+ margin-inline-start: auto;
594
+ }
595
+
596
+ .salmon-conversation-pinned-bar {
597
+ padding-block: 4px;
598
+ background: var(--salmon-surface-sunken);
599
+ }
600
+
601
+ .salmon-conversation-pinned-bar__button {
602
+ display: flex;
603
+ gap: 6px;
604
+ min-inline-size: 0;
605
+ inline-size: 100%;
606
+ padding: 4px;
607
+ background: none;
608
+ border: 0;
609
+ border-radius: var(--salmon-radius-sm);
610
+ text-align: start;
611
+ white-space: nowrap;
612
+ cursor: pointer;
613
+ }
614
+
615
+ .salmon-conversation-pinned-bar__label {
616
+ font-weight: 600;
617
+ color: var(--salmon-color-primary-text);
618
+ }
619
+
620
+ /* Scroller and feed */
621
+ .salmon-conversation-scroller {
622
+ position: relative;
623
+ display: flex;
624
+ flex: 1;
625
+ flex-direction: column-reverse;
626
+ min-block-size: 0;
627
+ overflow-y: auto;
628
+ overflow-anchor: none;
629
+ overscroll-behavior: contain;
630
+ }
631
+
632
+ .salmon-conversation-content {
633
+ display: flex;
634
+ flex-direction: column;
635
+ padding-block: 8px;
636
+ }
637
+
638
+ .salmon-conversation-spacer {
639
+ flex: none;
640
+ }
641
+
642
+ .salmon-conversation-older {
643
+ min-block-size: 1px;
644
+ }
645
+
646
+ .salmon-conversation-skeleton {
647
+ display: block;
648
+ block-size: 40px;
649
+ margin: 8px 12px;
650
+ border-radius: var(--salmon-radius-md);
651
+ /* The Skeleton color: it also shows inside a sunken bubble (pending response). */
652
+ background: var(--salmon-border-subtle);
653
+ opacity: 0.6;
654
+ }
655
+
656
+ .salmon-conversation-empty {
657
+ padding: 24px 12px;
658
+ text-align: center;
659
+ color: var(--salmon-text-secondary);
660
+ }
661
+
662
+ .salmon-conversation-feed {
663
+ display: flex;
664
+ flex-direction: column;
665
+ }
666
+
667
+ .salmon-conversation-article {
668
+ padding: 4px 12px;
669
+ }
670
+
671
+ .salmon-conversation-date-separator {
672
+ display: flex;
673
+ justify-content: center;
674
+ margin-block: 8px;
675
+ font-size: 12px;
676
+ color: var(--salmon-text-secondary);
677
+ }
678
+
679
+ .salmon-conversation-date-separator > span {
680
+ padding: 2px 8px;
681
+ border-radius: var(--salmon-radius-full);
682
+ background: var(--salmon-surface-sunken);
683
+ }
684
+
685
+ /* Items */
686
+ .salmon-conversation-item {
687
+ position: relative;
688
+ display: flex;
689
+ flex-wrap: wrap;
690
+ align-items: flex-start;
691
+ gap: 8px;
692
+ }
693
+
694
+ .salmon-conversation[data-layout='bubbles'] .salmon-conversation-item[data-own] {
695
+ flex-direction: row-reverse;
696
+ }
697
+
698
+ .salmon-conversation[data-layout='bubbles'] .salmon-conversation-item[data-own] .salmon-conversation-item__body {
699
+ align-items: flex-end;
700
+ }
701
+
702
+ .salmon-conversation[data-layout='bubbles'] .salmon-conversation-item[data-own] .salmon-conversation-avatar {
703
+ display: none;
704
+ }
705
+
706
+ .salmon-conversation-avatar {
707
+ position: relative;
708
+ display: inline-flex;
709
+ flex: none;
710
+ align-items: center;
711
+ justify-content: center;
712
+ inline-size: 32px;
713
+ block-size: 32px;
714
+ border-radius: 50%;
715
+ overflow: hidden;
716
+ font-size: 12px;
717
+ font-weight: 600;
718
+ color: var(--salmon-color-primary-on);
719
+ background: var(--salmon-color-primary);
720
+ }
721
+
722
+ .salmon-conversation-avatar img {
723
+ inline-size: 100%;
724
+ block-size: 100%;
725
+ object-fit: cover;
726
+ }
727
+
728
+ .salmon-conversation-avatar__status {
729
+ position: absolute;
730
+ inset-block-end: 0;
731
+ inset-inline-end: 0;
732
+ }
733
+
734
+ .salmon-conversation-item__body {
735
+ display: flex;
736
+ flex-direction: column;
737
+ gap: 2px;
738
+ min-inline-size: 0;
739
+ max-inline-size: min(80%, 640px);
740
+ }
741
+
742
+ .salmon-conversation[data-layout='compact'] .salmon-conversation-item__body {
743
+ max-inline-size: none;
744
+ flex: 1;
745
+ }
746
+
747
+ .salmon-conversation-item__meta,
748
+ .salmon-conversation-item__forwarded {
749
+ display: flex;
750
+ flex-wrap: wrap;
751
+ align-items: baseline;
752
+ gap: 6px;
753
+ font-size: 12px;
754
+ color: var(--salmon-text-secondary);
755
+ }
756
+
757
+ .salmon-conversation-item__author,
758
+ .salmon-conversation-reply-preview__author {
759
+ font-weight: 600;
760
+ color: var(--salmon-text-primary);
761
+ }
762
+
763
+ .salmon-conversation-item__pinned,
764
+ .salmon-conversation-item__forwarded {
765
+ font-style: italic;
766
+ }
767
+
768
+ .salmon-conversation-item__bubble {
769
+ padding: 6px 10px;
770
+ white-space: pre-wrap;
771
+ overflow-wrap: anywhere;
772
+ border-radius: var(--salmon-radius-md);
773
+ background: var(--salmon-surface-sunken);
774
+ border: 1px solid var(--salmon-border-subtle);
775
+ }
776
+
777
+ .salmon-conversation[data-layout='bubbles'] .salmon-conversation-item[data-own] .salmon-conversation-item__bubble {
778
+ color: var(--salmon-color-primary-on);
779
+ background: var(--salmon-color-primary);
780
+ border-color: transparent;
781
+ }
782
+
783
+ .salmon-conversation[data-layout='compact'] .salmon-conversation-item__bubble {
784
+ padding: 0;
785
+ background: none;
786
+ border: 0;
787
+ }
788
+
789
+ .salmon-conversation-item[data-status='error'] .salmon-conversation-item__bubble {
790
+ border-color: var(--salmon-color-danger-border);
791
+ }
792
+
793
+ .salmon-conversation-mention {
794
+ font-weight: 600;
795
+ border-radius: var(--salmon-radius-sm);
796
+ background: var(--salmon-color-info-subtle);
797
+ color: var(--salmon-color-info-text);
798
+ }
799
+
800
+ .salmon-conversation[data-layout='bubbles'] .salmon-conversation-item[data-own] .salmon-conversation-mention {
801
+ color: inherit;
802
+ background: none;
803
+ text-decoration: underline;
804
+ }
805
+
806
+ .salmon-conversation-reply-preview {
807
+ display: flex;
808
+ flex-direction: column;
809
+ max-inline-size: 100%;
810
+ padding: 2px 8px;
811
+ border: 0;
812
+ border-inline-start: 3px solid var(--salmon-color-primary-border);
813
+ background: var(--salmon-surface-sunken);
814
+ text-align: start;
815
+ font-size: 12px;
816
+ cursor: pointer;
817
+ }
818
+
819
+ .salmon-conversation-header__title,
820
+ .salmon-conversation-pinned-bar__text,
821
+ .salmon-conversation-attachment__name,
822
+ .salmon-conversation-reply-preview__text,
823
+ .salmon-conversation-composer__reply-text {
824
+ overflow: hidden;
825
+ text-overflow: ellipsis;
826
+ white-space: nowrap;
827
+ }
828
+
829
+ .salmon-conversation-item__attachments,
830
+ .salmon-conversation-composer__attachments {
831
+ display: flex;
832
+ flex-wrap: wrap;
833
+ gap: 4px;
834
+ }
835
+
836
+ .salmon-conversation-attachment {
837
+ display: inline-flex;
838
+ align-items: center;
839
+ gap: 6px;
840
+ max-inline-size: 240px;
841
+ padding: 4px 8px;
842
+ font-size: 12px;
843
+ color: inherit;
844
+ text-decoration: none;
845
+ border: 1px solid var(--salmon-border-default);
846
+ border-radius: var(--salmon-radius-sm);
847
+ background: var(--salmon-surface-base);
848
+ cursor: pointer;
849
+ }
850
+
851
+ .salmon-conversation-attachment[data-error] {
852
+ border-color: var(--salmon-color-danger-border);
853
+ }
854
+
855
+ .salmon-conversation-attachment__open,
856
+ .salmon-conversation-attachment__remove,
857
+ .salmon-conversation-retry {
858
+ display: inline-flex;
859
+ gap: 6px;
860
+ padding: 0;
861
+ border: 0;
862
+ background: none;
863
+ cursor: pointer;
864
+ }
865
+
866
+ .salmon-conversation-attachment__size {
867
+ color: var(--salmon-text-secondary);
868
+ }
869
+
870
+ .salmon-conversation-attachment__progress {
871
+ inline-size: 48px;
872
+ accent-color: var(--salmon-color-primary);
873
+ }
874
+
875
+ .salmon-conversation-item__status {
876
+ display: flex;
877
+ align-items: center;
878
+ gap: 4px;
879
+ font-size: 12px;
880
+ color: var(--salmon-text-secondary);
881
+ }
882
+
883
+ .salmon-conversation-item__status[data-status='error'] {
884
+ color: var(--salmon-color-danger-text);
885
+ }
886
+
887
+ .salmon-conversation-retry {
888
+ padding: 0 4px;
889
+ text-decoration: underline;
890
+ }
891
+
892
+ /* Item actions: on touch, always shown on their own row under the item. With a hover pointer, a
893
+ floating toolbar over the item's top inline-end corner (the start corner of own bubbles),
894
+ shown on hover and focus within (opacity only: it stays in the accessibility tree), taking
895
+ no inline space from the bubble. */
896
+ .salmon-conversation-item-actions {
897
+ display: flex;
898
+ flex-basis: 100%;
899
+ gap: 2px;
900
+ }
901
+
902
+ .salmon-conversation[data-layout='bubbles'] .salmon-conversation-item[data-own] .salmon-conversation-item-actions {
903
+ justify-content: flex-end;
904
+ }
905
+
906
+ @media (hover: hover) {
907
+ .salmon-conversation-item-actions {
908
+ position: absolute;
909
+ inset-inline-end: 0;
910
+ background: var(--salmon-surface-overlay);
911
+ border: 1px solid var(--salmon-border-subtle);
912
+ border-radius: var(--salmon-radius-md);
913
+ opacity: 0;
914
+ }
915
+
916
+ .salmon-conversation[data-layout='bubbles'] .salmon-conversation-item[data-own] .salmon-conversation-item-actions {
917
+ inset-inline: 0 auto;
918
+ }
919
+
920
+ .salmon-conversation-article:is(:hover, :focus-within) .salmon-conversation-item-actions {
921
+ opacity: 1;
922
+ }
923
+ }
924
+
925
+ /* 28px in-item and header buttons; the composer row's are 32px squares, the input's height.
926
+ The header rule has zero specificity, so a slotted Button keeps its own metrics. */
927
+ .salmon-conversation-item-action,
928
+ :where(.salmon-conversation-header__toolbar > button),
929
+ .salmon-conversation-composer__reply-cancel,
930
+ .salmon-conversation-composer__attach,
931
+ .salmon-conversation-composer__send,
932
+ .salmon-conversation-composer__stop,
933
+ .salmon-conversation-composer__clear,
934
+ .salmon-conversation-composer__dictate {
935
+ display: inline-flex;
936
+ align-items: center;
937
+ justify-content: center;
938
+ min-inline-size: 28px;
939
+ block-size: 28px;
940
+ padding: 0 6px;
941
+ border: 0;
942
+ border-radius: var(--salmon-radius-sm);
943
+ background: none;
944
+ cursor: pointer;
945
+ }
946
+
947
+ .salmon-conversation-composer__attach,
948
+ .salmon-conversation-composer__send,
949
+ .salmon-conversation-composer__stop,
950
+ .salmon-conversation-composer__clear,
951
+ .salmon-conversation-composer__dictate {
952
+ inline-size: 32px;
953
+ block-size: 32px;
954
+ padding: 0;
955
+ border-radius: var(--salmon-radius-md);
956
+ }
957
+
958
+ .salmon-conversation-item-action:hover,
959
+ .salmon-conversation-composer__attach:hover,
960
+ .salmon-conversation-composer__dictate:hover,
961
+ .salmon-conversation-composer__reply-cancel:hover {
962
+ background: var(--salmon-surface-hover);
963
+ }
964
+
965
+ /* Typing, suggestions, jump button */
966
+ .salmon-conversation-typing {
967
+ display: flex;
968
+ align-items: center;
969
+ gap: 6px;
970
+ padding: 2px 12px;
971
+ font-size: 12px;
972
+ color: var(--salmon-text-secondary);
973
+ }
974
+
975
+ .salmon-conversation-typing__dots {
976
+ display: inline-flex;
977
+ gap: 2px;
978
+ }
979
+
980
+ .salmon-conversation-typing__dots > span {
981
+ inline-size: 4px;
982
+ block-size: 4px;
983
+ border-radius: 50%;
984
+ background: currentColor;
985
+ animation: salmon-conversation-typing 1s infinite ease-in-out;
986
+ }
987
+
988
+ .salmon-conversation-typing__dots > span:nth-child(2) {
989
+ animation-delay: 0.15s;
990
+ }
991
+
992
+ .salmon-conversation-typing__dots > span:nth-child(3) {
993
+ animation-delay: 0.3s;
994
+ }
995
+
996
+ @keyframes salmon-conversation-typing {
997
+ 0%,
998
+ 100% {
999
+ opacity: 0.3;
1000
+ }
1001
+ 50% {
1002
+ opacity: 1;
1003
+ }
1004
+ }
1005
+
1006
+ @media (prefers-reduced-motion: reduce) {
1007
+ .salmon-conversation-typing__dots > span {
1008
+ animation: none;
1009
+ }
1010
+ }
1011
+
1012
+ .salmon-conversation-suggestions {
1013
+ display: flex;
1014
+ flex-wrap: wrap;
1015
+ align-items: center;
1016
+ gap: 6px;
1017
+ padding: 6px 12px;
1018
+ }
1019
+
1020
+ .salmon-conversation-suggestions__heading {
1021
+ inline-size: 100%;
1022
+ font-size: 12px;
1023
+ color: var(--salmon-text-secondary);
1024
+ }
1025
+
1026
+ .salmon-conversation-suggestion {
1027
+ padding: 4px 10px;
1028
+ color: var(--salmon-color-primary-text);
1029
+ border: 1px solid var(--salmon-color-primary-border);
1030
+ border-radius: var(--salmon-radius-full);
1031
+ background: var(--salmon-surface-base);
1032
+ cursor: pointer;
1033
+ }
1034
+
1035
+ .salmon-conversation-jump {
1036
+ position: absolute;
1037
+ inset-inline-end: 16px;
1038
+ inset-block-end: 72px;
1039
+ display: inline-flex;
1040
+ align-items: center;
1041
+ gap: 4px;
1042
+ min-inline-size: 36px;
1043
+ block-size: 36px;
1044
+ padding: 0 8px;
1045
+ border: 1px solid var(--salmon-border-default);
1046
+ border-radius: var(--salmon-radius-full);
1047
+ background: var(--salmon-surface-overlay);
1048
+ box-shadow: var(--salmon-shadow-md);
1049
+ cursor: pointer;
1050
+ }
1051
+
1052
+ .salmon-conversation-jump__count {
1053
+ min-inline-size: 18px;
1054
+ padding: 0 4px;
1055
+ border-radius: var(--salmon-radius-full);
1056
+ font-size: 11px;
1057
+ color: var(--salmon-color-primary-on);
1058
+ background: var(--salmon-color-primary);
1059
+ }
1060
+
1061
+ /* Composer */
1062
+ .salmon-conversation-composer {
1063
+ display: flex;
1064
+ flex-direction: column;
1065
+ gap: 4px;
1066
+ padding: 8px 12px;
1067
+ padding-block-end: max(8px, env(safe-area-inset-bottom));
1068
+ border-block-start: 1px solid var(--salmon-border-subtle);
1069
+ }
1070
+
1071
+ .salmon-conversation-composer[data-dragging],
1072
+ .salmon-conversation[data-dragging] {
1073
+ outline: 2px dashed var(--salmon-color-primary-border);
1074
+ outline-offset: -4px;
1075
+ }
1076
+
1077
+ .salmon-conversation-composer__reply {
1078
+ display: flex;
1079
+ align-items: center;
1080
+ gap: 6px;
1081
+ padding: 4px 8px;
1082
+ font-size: 12px;
1083
+ border-inline-start: 3px solid var(--salmon-color-primary-border);
1084
+ background: var(--salmon-surface-sunken);
1085
+ }
1086
+
1087
+ .salmon-conversation-composer__reply-label {
1088
+ flex: none;
1089
+ font-weight: 600;
1090
+ }
1091
+
1092
+ .salmon-conversation-composer__reply-text {
1093
+ flex: 1;
1094
+ min-inline-size: 0;
1095
+ }
1096
+
1097
+ .salmon-conversation-composer__row {
1098
+ display: flex;
1099
+ align-items: flex-end;
1100
+ gap: 4px;
1101
+ }
1102
+
1103
+ .salmon-conversation-composer__input {
1104
+ flex: 1;
1105
+ box-sizing: border-box;
1106
+ min-inline-size: 0;
1107
+ min-block-size: 32px;
1108
+ max-block-size: 160px;
1109
+ padding: 5px 8px;
1110
+ font: inherit;
1111
+ color: inherit;
1112
+ resize: none;
1113
+ field-sizing: content;
1114
+ border: 1px solid var(--salmon-border-default);
1115
+ border-radius: var(--salmon-radius-md);
1116
+ background: var(--salmon-surface-base);
1117
+ }
1118
+
1119
+ .salmon-conversation-composer__input::placeholder {
1120
+ color: var(--salmon-text-placeholder);
1121
+ }
1122
+
1123
+ .salmon-conversation-composer__send {
1124
+ color: var(--salmon-color-primary-on);
1125
+ background: var(--salmon-color-primary);
1126
+ }
1127
+
1128
+ .salmon-conversation-composer[data-empty] .salmon-conversation-composer__send {
1129
+ opacity: 0.6;
1130
+ }
1131
+
1132
+ .salmon-conversation-composer__stop {
1133
+ color: var(--salmon-color-danger-on);
1134
+ background: var(--salmon-color-danger);
1135
+ }
1136
+
1137
+ /* Assistant variant: clear and dictation buttons, pending response, parts, alternatives, feedback. */
1138
+ .salmon-conversation-composer[data-empty] .salmon-conversation-composer__clear,
1139
+ .salmon-conversation-stream:not(:empty) + .salmon-conversation-pending {
1140
+ display: none;
1141
+ }
1142
+
1143
+ .salmon-conversation-composer__dictate[data-listening],
1144
+ .salmon-conversation-item-action[aria-pressed='true'] {
1145
+ color: var(--salmon-color-primary-text);
1146
+ }
1147
+
1148
+ .salmon-conversation-pending .salmon-conversation-skeleton {
1149
+ inline-size: 12em;
1150
+ block-size: 1em;
1151
+ margin: 0;
1152
+ }
1153
+
1154
+ .salmon-conversation-reasoning,
1155
+ .salmon-conversation-alternatives {
1156
+ font-size: 12px;
1157
+ color: var(--salmon-text-secondary);
1158
+ }
1159
+
1160
+ .salmon-conversation-reasoning pre {
1161
+ margin: 4px 0;
1162
+ white-space: pre-wrap;
1163
+ }
1164
+
1165
+ .salmon-conversation-alternatives {
1166
+ display: flex;
1167
+ align-items: center;
1168
+ }
1169
+
1170
+ .salmon-conversation-footer {
1171
+ padding: 6px 12px;
1172
+ border-block-start: 1px solid var(--salmon-border-subtle);
1173
+ }
1174
+
1175
+ /* Icons: currentColor masks, mirrored in RTL where directional. */
1176
+ .salmon-conversation-icon {
1177
+ display: inline-block;
1178
+ inline-size: 16px;
1179
+ block-size: 16px;
1180
+ background: currentColor;
1181
+ mask: var(--salmon-conversation-icon) center / contain no-repeat;
1182
+ }
1183
+
1184
+ [dir='rtl'] .salmon-conversation-icon:is([data-icon='send'], [data-icon='reply']) {
1185
+ transform: scaleX(-1);
1186
+ }
1187
+
1188
+ .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>"); }
1189
+ .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>"); }
1190
+ .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>"); }
1191
+ .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>"); }
1192
+ .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>"); }
1193
+ .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>"); }
1194
+ .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>"); }
1195
+ .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>"); }
1196
+ .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>"); }
1197
+ .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>"); }
1198
+ .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>"); }
1199
+ .salmon-conversation-icon[data-icon='status-read'] { color: var(--salmon-color-primary-text); }
1200
+ .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>"); }
1201
+ .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>"); }
1202
+
1203
+ }
1204
+ @layer salmon.b {
1205
+ /* @salmonui/buttons/button/styles.css, second part: the filter chip variant,
1206
+ the progress fill and the floating action button. tooling/checks/copy-css.mjs
1207
+ writes dist/button.css as styles/button-core.css followed by this file;
1208
+ families of other packages that render plain buttons only carry
1209
+ button-core.css (`@salmonui/buttons:button-core` in the manifest).
1210
+ Chip hover and pressed apply
1211
+ to enabled chips only, so the disabled state of button-core.css, which
1212
+ comes first, keeps winning. */
1213
+
1214
+ .salmon-button[data-variant='chip'] {
1215
+ --salmon-button-h: calc(var(--salmon-control-height-md, 32px) - 4px);
1216
+ --salmon-button-bg: transparent;
1217
+ --salmon-button-fg: var(--salmon-button-c-text);
1218
+ --salmon-button-bd: var(--salmon-button-c-border);
1219
+ border-radius: var(--salmon-radius-sm);
1220
+ font-weight: var(--salmon-font-weight-regular);
1221
+ }
1222
+ .salmon-button[data-variant='chip'][data-size='sm'] {
1223
+ --salmon-button-h: calc(var(--salmon-control-height-sm, 24px) - 2px);
1224
+ }
1225
+ .salmon-button[data-variant='chip'][data-size='lg'] {
1226
+ --salmon-button-h: calc(var(--salmon-control-height-lg, 40px) - 6px);
1227
+ }
1228
+ .salmon-button[data-variant='chip']:hover:where(:enabled) {
1229
+ --salmon-button-bg: var(--salmon-button-c-subtle);
1230
+ }
1231
+ .salmon-button[data-variant='chip'][data-pressed]:where(:enabled) {
1232
+ --salmon-button-bg: var(--salmon-button-c-selected);
1233
+ --salmon-button-bd: var(--salmon-button-c-selected-edge);
1234
+ }
1235
+ /* Filter chips show a check when pressed. */
1236
+ .salmon-button[data-variant='chip'][data-pressed]::after {
1237
+ content: '';
1238
+ order: -1;
1239
+ inline-size: 0.3em;
1240
+ block-size: 0.6em;
1241
+ margin-block-start: -0.2em;
1242
+ border: solid currentColor;
1243
+ border-width: 0 2px 2px 0;
1244
+ rotate: 45deg;
1245
+ }
1246
+
1247
+ /* Progress fill from inline-start. */
1248
+ .salmon-button[data-progress]::before {
1249
+ content: '';
1250
+ position: absolute;
1251
+ z-index: -1;
1252
+ inset-block: 0;
1253
+ inset-inline-start: 0;
1254
+ inline-size: var(--salmon-button-progress, 0%);
1255
+ background: currentColor;
1256
+ opacity: 0.22;
1257
+ transition: inline-size var(--salmon-motion-duration-fast) var(--salmon-motion-easing);
1258
+ }
1259
+
1260
+ /* Floating action button: circular, elevated, CSS positioned. */
1261
+ .salmon-button[data-floating] {
1262
+ --salmon-button-h: 56px;
1263
+ --salmon-button-pad: 20px;
1264
+ --salmon-button-inset: 16px;
1265
+ position: fixed;
1266
+ z-index: 10;
1267
+ border-radius: var(--salmon-radius-full);
1268
+ box-shadow: var(--salmon-shadow-lg);
1269
+ }
1270
+ .salmon-button[data-floating][data-size='sm'] {
1271
+ --salmon-button-h: 40px;
1272
+ --salmon-button-pad: 14px;
1273
+ }
1274
+ .salmon-button[data-floating][data-size='lg'] {
1275
+ --salmon-button-h: 64px;
1276
+ --salmon-button-pad: 24px;
1277
+ }
1278
+ .salmon-button[data-floating-scope='parent'] {
1279
+ position: absolute;
1280
+ }
1281
+ .salmon-button[data-floating^='top'] {
1282
+ inset-block-start: var(--salmon-button-inset);
1283
+ }
1284
+ .salmon-button[data-floating^='bottom'] {
1285
+ inset-block-end: var(--salmon-button-inset);
1286
+ }
1287
+ .salmon-button[data-floating$='Start'] {
1288
+ inset-inline-start: var(--salmon-button-inset);
1289
+ }
1290
+ .salmon-button[data-floating$='End'] {
1291
+ inset-inline-end: var(--salmon-button-inset);
1292
+ }
1293
+ .salmon-button[data-floating^='middle'] {
1294
+ inset-block-start: 50%;
1295
+ translate: 0 -50%;
1296
+ }
1297
+ /* Direction sign: -1 under the nearest dir="rtl", 1 under dir="ltr". */
1298
+ :where([dir='rtl']) { --salmon-dir: -1; }
1299
+ :where([dir='ltr']) { --salmon-dir: 1; }
1300
+ .salmon-button[data-floating$='Center'] {
1301
+ inset-inline-start: 50%;
1302
+ translate: calc(-50% * var(--salmon-dir, 1)) 0;
1303
+ }
1304
+ .salmon-button[data-floating='middleCenter'] {
1305
+ translate: calc(-50% * var(--salmon-dir, 1)) -50%;
1306
+ }
1307
+
1308
+ @media (prefers-reduced-motion: reduce) {
1309
+ .salmon-button[data-progress]::before {
1310
+ transition: none;
1311
+ }
1312
+ }
1313
+
1314
+ }
1315
+ @layer salmon.c {
1316
+ /* @salmonui/react/menu: Menu family, MenuButton and SplitButton parts.
1317
+ The trigger buttons are styled by /button/styles.css. Logical properties only. */
1318
+
1319
+ .salmon-menu {
1320
+ box-sizing: border-box;
1321
+ display: flex;
1322
+ flex-direction: column;
1323
+ /* A popup opened from a trigger is at least as wide as the trigger (list.tsx). */
1324
+ min-inline-size: max(160px, var(--salmon-menu-anchor-width, 0px));
1325
+ max-height: calc(100vh - 16px);
1326
+ overflow: auto;
1327
+ padding: var(--salmon-space-2);
1328
+ font-family: var(--salmon-font-sans);
1329
+ font-size: var(--salmon-font-size-md);
1330
+ line-height: var(--salmon-line-height-tight);
1331
+ color: var(--salmon-text-primary);
1332
+ background: var(--salmon-surface-overlay);
1333
+ border: 1px solid var(--salmon-border-default);
1334
+ border-radius: var(--salmon-radius-lg);
1335
+ outline: none;
1336
+ }
1337
+
1338
+ .salmon-menu[data-popup] {
1339
+ inset: 0 auto auto 0;
1340
+ margin: 0;
1341
+ z-index: 1000;
1342
+ box-shadow: var(--salmon-shadow-md);
1343
+ }
1344
+
1345
+ .salmon-menu[data-popup]:not([data-placed]) {
1346
+ visibility: hidden;
1347
+ }
1348
+
1349
+ .salmon-menu *,
1350
+ .salmon-menu ::before,
1351
+ .salmon-menu ::after {
1352
+ box-sizing: border-box;
1353
+ }
1354
+
1355
+ .salmon-menu-item {
1356
+ display: flex;
1357
+ align-items: center;
1358
+ gap: var(--salmon-space-2);
1359
+ min-height: var(--salmon-control-height-md, 32px);
1360
+ padding-block: var(--salmon-space-1);
1361
+ padding-inline: var(--salmon-space-3);
1362
+ border-radius: var(--salmon-radius-sm);
1363
+ color: inherit;
1364
+ text-decoration: none;
1365
+ white-space: nowrap;
1366
+ cursor: pointer;
1367
+ outline: none;
1368
+ user-select: none;
1369
+ }
1370
+
1371
+ .salmon-menu-item[data-highlighted],
1372
+ .salmon-menu-item[data-open] {
1373
+ background: var(--salmon-surface-hover);
1374
+ }
1375
+
1376
+ .salmon-menu-item:focus-visible {
1377
+ outline: var(--salmon-state-focus-ring-width) solid var(--salmon-state-focus-ring);
1378
+ outline-offset: calc(-1 * var(--salmon-state-focus-ring-width));
1379
+ }
1380
+
1381
+ .salmon-menu-item[data-disabled] {
1382
+ color: var(--salmon-text-disabled);
1383
+ background: none;
1384
+ cursor: default;
1385
+ }
1386
+
1387
+ .salmon-menu-item-icon,
1388
+ .salmon-menu-item-check,
1389
+ .salmon-menu-submenu-indicator {
1390
+ display: inline-flex;
1391
+ flex: none;
1392
+ align-items: center;
1393
+ justify-content: center;
1394
+ width: 16px;
1395
+ height: 16px;
1396
+ }
1397
+
1398
+ .salmon-menu-item-check {
1399
+ visibility: hidden;
1400
+ }
1401
+
1402
+ .salmon-menu-item[data-checked] .salmon-menu-item-check {
1403
+ visibility: visible;
1404
+ }
1405
+
1406
+ .salmon-menu-item-dot {
1407
+ width: 6px;
1408
+ height: 6px;
1409
+ border-radius: var(--salmon-radius-full);
1410
+ background: currentColor;
1411
+ }
1412
+
1413
+ .salmon-menu-item-label {
1414
+ flex: 1 1 auto;
1415
+ }
1416
+
1417
+ .salmon-menu-submenu-indicator {
1418
+ margin-inline-start: var(--salmon-space-3);
1419
+ color: var(--salmon-text-secondary);
1420
+ }
1421
+
1422
+ .salmon-menu-separator {
1423
+ flex: none;
1424
+ height: 1px;
1425
+ margin-block: var(--salmon-space-1);
1426
+ background: var(--salmon-border-subtle);
1427
+ }
1428
+
1429
+ .salmon-menu-group {
1430
+ display: flex;
1431
+ flex-direction: column;
1432
+ }
1433
+
1434
+ .salmon-menu-group-label {
1435
+ padding-block: var(--salmon-space-1);
1436
+ padding-inline: var(--salmon-space-3);
1437
+ font-size: var(--salmon-font-size-sm);
1438
+ font-weight: var(--salmon-font-weight-semibold);
1439
+ color: var(--salmon-text-secondary);
1440
+ }
1441
+
1442
+ .salmon-menu-button-indicator {
1443
+ display: inline-flex;
1444
+ transition: transform var(--salmon-motion-duration-fast) var(--salmon-motion-easing);
1445
+ }
1446
+
1447
+ [data-open] > .salmon-button__icon > .salmon-menu-button-indicator,
1448
+ [data-open] > .salmon-menu-button-indicator {
1449
+ transform: rotate(180deg);
1450
+ }
1451
+
1452
+ /* Directional icons supplied by the system mirror in RTL. */
1453
+ .salmon-menu[dir='rtl'] .salmon-menu-submenu-indicator svg {
1454
+ transform: scaleX(-1);
1455
+ }
1456
+
1457
+ /* SplitButton is an attached ButtonGroup (button.css). Nested in an outer group
1458
+ it joins its neighbours; in a vertical group it stretches and stays horizontal. */
1459
+ [data-attached][data-orientation='horizontal'] > .salmon-split-button:not(:first-child) {
1460
+ margin-inline-start: -1px;
1461
+ }
1462
+ [data-attached][data-orientation='horizontal'] > .salmon-split-button:not(:first-child) > .salmon-button:first-child,
1463
+ [data-attached][data-orientation='horizontal'] > .salmon-split-button + .salmon-button {
1464
+ border-start-start-radius: 0;
1465
+ border-end-start-radius: 0;
1466
+ }
1467
+ [data-attached][data-orientation='horizontal'] > .salmon-split-button:not(:last-child) > .salmon-button:last-child,
1468
+ [data-attached][data-orientation='horizontal'] > .salmon-button:has(+ .salmon-split-button) {
1469
+ border-start-end-radius: 0;
1470
+ border-end-end-radius: 0;
1471
+ }
1472
+ [data-orientation='vertical'] > .salmon-split-button {
1473
+ display: flex;
1474
+ }
1475
+ [data-orientation='vertical'] > .salmon-split-button > .salmon-split-button-primary {
1476
+ flex: 1 1 auto;
1477
+ }
1478
+ [data-attached][data-orientation='vertical'] > .salmon-split-button:not(:first-child) {
1479
+ margin-block-start: -1px;
1480
+ }
1481
+ [data-attached][data-orientation='vertical'] > .salmon-split-button:not(:first-child) > .salmon-button,
1482
+ [data-attached][data-orientation='vertical'] > .salmon-split-button + .salmon-button {
1483
+ border-start-start-radius: 0;
1484
+ border-start-end-radius: 0;
1485
+ }
1486
+ [data-attached][data-orientation='vertical'] > .salmon-split-button:not(:last-child) > .salmon-button,
1487
+ [data-attached][data-orientation='vertical'] > .salmon-button:has(+ .salmon-split-button) {
1488
+ border-end-start-radius: 0;
1489
+ border-end-end-radius: 0;
1490
+ }
1491
+
1492
+ /* ContextMenu target: a long-press opens the menu, not the touch callout. */
1493
+ .salmon-context-menu {
1494
+ -webkit-touch-callout: none;
1495
+ }
1496
+
1497
+ /* Menubar (APG Menubar, horizontal). */
1498
+ .salmon-menubar {
1499
+ box-sizing: border-box;
1500
+ display: flex;
1501
+ align-items: center;
1502
+ gap: 2px;
1503
+ min-width: 0;
1504
+ padding: var(--salmon-space-2);
1505
+ font-family: var(--salmon-font-sans);
1506
+ font-size: var(--salmon-font-size-md);
1507
+ line-height: var(--salmon-line-height-tight);
1508
+ color: var(--salmon-text-primary);
1509
+ background: var(--salmon-surface-raised);
1510
+ border: 1px solid var(--salmon-border-default);
1511
+ border-radius: var(--salmon-radius-lg);
1512
+ }
1513
+
1514
+ .salmon-menubar[data-overflow='scroll'] {
1515
+ overflow-x: auto;
1516
+ scrollbar-width: none;
1517
+ }
1518
+
1519
+ .salmon-menubar[data-overflow='scroll']::-webkit-scrollbar {
1520
+ display: none;
1521
+ }
1522
+
1523
+ .salmon-menubar-item {
1524
+ box-sizing: border-box;
1525
+ display: inline-flex;
1526
+ flex: none;
1527
+ align-items: center;
1528
+ gap: var(--salmon-space-2);
1529
+ min-height: var(--salmon-control-height-md, 32px);
1530
+ padding-block: var(--salmon-space-1);
1531
+ padding-inline: var(--salmon-space-3);
1532
+ border-radius: var(--salmon-radius-sm);
1533
+ color: inherit;
1534
+ text-decoration: none;
1535
+ white-space: nowrap;
1536
+ cursor: pointer;
1537
+ outline: none;
1538
+ user-select: none;
1539
+ }
1540
+
1541
+ .salmon-menubar-item:hover,
1542
+ .salmon-menubar-item[data-open] {
1543
+ background: var(--salmon-surface-hover);
1544
+ }
1545
+
1546
+ .salmon-menubar-item:focus-visible {
1547
+ outline: var(--salmon-state-focus-ring-width) solid var(--salmon-state-focus-ring);
1548
+ outline-offset: calc(-1 * var(--salmon-state-focus-ring-width));
1549
+ }
1550
+
1551
+ .salmon-menubar-item[data-disabled] {
1552
+ color: var(--salmon-text-disabled);
1553
+ background: none;
1554
+ cursor: default;
1555
+ }
1556
+
1557
+ .salmon-menubar-item-icon {
1558
+ display: inline-flex;
1559
+ flex: none;
1560
+ width: 16px;
1561
+ height: 16px;
1562
+ }
1563
+
1564
+ /* overflow: 'scroll' indicators, shown while there is more to scroll to on that side. */
1565
+ .salmon-menubar-scroll {
1566
+ position: sticky;
1567
+ z-index: 1;
1568
+ display: none;
1569
+ flex: none;
1570
+ align-self: stretch;
1571
+ align-items: center;
1572
+ justify-content: center;
1573
+ width: 24px;
1574
+ color: var(--salmon-text-secondary);
1575
+ background: var(--salmon-surface-raised);
1576
+ cursor: pointer;
1577
+ }
1578
+
1579
+ .salmon-menubar-scroll[data-direction='backward'] {
1580
+ inset-inline-start: calc(-1 * var(--salmon-space-2));
1581
+ }
1582
+
1583
+ .salmon-menubar-scroll[data-direction='forward'] {
1584
+ inset-inline-end: calc(-1 * var(--salmon-space-2));
1585
+ margin-inline-start: auto;
1586
+ }
1587
+
1588
+ .salmon-menubar-scroll[data-direction='forward'] svg {
1589
+ transform: scaleX(-1);
1590
+ }
1591
+
1592
+ .salmon-menubar[data-scroll-start] > .salmon-menubar-scroll[data-direction='backward'],
1593
+ .salmon-menubar[data-scroll-end] > .salmon-menubar-scroll[data-direction='forward'] {
1594
+ display: flex;
1595
+ }
1596
+
1597
+ .salmon-menubar[dir='rtl'] .salmon-menubar-scroll svg,
1598
+ [dir='rtl'] .salmon-menubar .salmon-menubar-scroll svg {
1599
+ transform: scaleX(-1);
1600
+ }
1601
+
1602
+ [dir='rtl'] .salmon-menubar .salmon-menubar-scroll[data-direction='forward'] svg {
1603
+ transform: none;
1604
+ }
1605
+
1606
+ @media (prefers-reduced-motion: reduce) {
1607
+ .salmon-menu-button-indicator {
1608
+ transition: none;
1609
+ }
1610
+ }
1611
+
1612
+ @media (forced-colors: active) {
1613
+ .salmon-menu-item[data-highlighted] {
1614
+ forced-color-adjust: none;
1615
+ color: HighlightText;
1616
+ background: Highlight;
1617
+ }
1618
+ }
1619
+
1620
+ }
1621
+ @layer salmon.c {
1622
+ /* SpeechToTextButton: the button rules come from
1623
+ button.css (prepended by tooling/checks/copy-css.mjs); this file adds the
1624
+ listening cue on top of the button's [data-pressed] colors.
1625
+ The glyph size follows the control size in SpeechToTextButton.tsx. */
1626
+ .salmon-speech-to-text[data-state='listening'] {
1627
+ animation: salmon-speech-to-text-pulse 1.6s ease-in-out infinite;
1628
+ }
1629
+
1630
+ @keyframes salmon-speech-to-text-pulse {
1631
+ 50% {
1632
+ box-shadow: 0 0 0 4px color-mix(in srgb, var(--salmon-button-c, currentColor) 35%, transparent);
1633
+ }
1634
+ }
1635
+
1636
+ @media (prefers-reduced-motion: reduce) {
1637
+ .salmon-speech-to-text[data-state='listening'] {
1638
+ animation: none;
1639
+ box-shadow: 0 0 0 2px var(--salmon-button-c, currentColor);
1640
+ }
1641
+ }
1642
+
1643
+ }
1644
+ @layer salmon.d {
1645
+ /* InlineAssist: the a11y helper, the Button, Menu
1646
+ and SpeechToText rules come first (prepended by tooling/checks/copy-css.mjs);
1647
+ this file is the panel, the prompt row, the command menu and the response.
1648
+ Logical properties only. */
1649
+ .salmon-inline-assist {
1650
+ box-sizing: border-box;
1651
+ display: flex;
1652
+ flex-direction: column;
1653
+ gap: 8px;
1654
+ inline-size: min(420px, calc(100vw - 16px));
1655
+ padding: 8px;
1656
+ font-family: var(--salmon-font-sans);
1657
+ font-size: var(--salmon-font-size-md);
1658
+ line-height: 1.5;
1659
+ color: var(--salmon-text-primary);
1660
+ background: var(--salmon-surface-overlay, Canvas);
1661
+ border: 1px solid var(--salmon-border-default, GrayText);
1662
+ border-radius: var(--salmon-radius-lg, 10px);
1663
+ box-shadow: var(--salmon-shadow-md);
1664
+ }
1665
+
1666
+ .salmon-inline-assist[data-mode='popover'] {
1667
+ z-index: 1000;
1668
+ max-block-size: var(--salmon-overlay-available-height, calc(100vh - 16px));
1669
+ overflow: auto;
1670
+ }
1671
+
1672
+ .salmon-inline-assist[data-mode='popover']:not([data-placed]) {
1673
+ visibility: hidden;
1674
+ }
1675
+
1676
+ .salmon-inline-assist[data-mode='inline'] {
1677
+ inline-size: auto;
1678
+ box-shadow: none;
1679
+ }
1680
+
1681
+ .salmon-inline-assist__composer,
1682
+ .salmon-inline-assist__toolbar,
1683
+ .salmon-inline-assist__actions {
1684
+ display: flex;
1685
+ flex-wrap: wrap;
1686
+ align-items: center;
1687
+ gap: 4px;
1688
+ }
1689
+
1690
+ .salmon-inline-assist__input {
1691
+ flex: 1;
1692
+ box-sizing: border-box;
1693
+ min-inline-size: 8rem;
1694
+ min-block-size: 32px;
1695
+ max-block-size: 160px;
1696
+ padding: 5px 8px;
1697
+ font: inherit;
1698
+ line-height: 20px;
1699
+ color: inherit;
1700
+ resize: none;
1701
+ field-sizing: content;
1702
+ background: var(--salmon-surface-base, Field);
1703
+ border: 1px solid var(--salmon-border-default, GrayText);
1704
+ border-radius: var(--salmon-radius-md, 6px);
1705
+ }
1706
+
1707
+ .salmon-inline-assist__input::placeholder {
1708
+ color: var(--salmon-text-placeholder, GrayText);
1709
+ }
1710
+
1711
+ .salmon-inline-assist__input:focus-visible {
1712
+ outline: var(--salmon-state-focus-ring-width, 2px) solid var(--salmon-state-focus-ring, Highlight);
1713
+ outline-offset: -1px;
1714
+ }
1715
+
1716
+ .salmon-inline-assist__commands {
1717
+ max-block-size: 240px;
1718
+ overflow: auto;
1719
+ }
1720
+
1721
+ .salmon-inline-assist__response {
1722
+ display: flex;
1723
+ flex-direction: column;
1724
+ gap: 8px;
1725
+ padding-block-start: 8px;
1726
+ border-block-start: 1px solid var(--salmon-border-subtle, GrayText);
1727
+ }
1728
+
1729
+ .salmon-inline-assist__text {
1730
+ white-space: pre-wrap;
1731
+ overflow-wrap: anywhere;
1732
+ }
1733
+
1734
+ .salmon-inline-assist__pending,
1735
+ .salmon-inline-assist__error {
1736
+ color: var(--salmon-text-secondary, GrayText);
1737
+ }
1738
+
1739
+ .salmon-inline-assist__error {
1740
+ color: var(--salmon-color-danger, red);
1741
+ }
1742
+
1743
+ /* Coarse pointers on narrow screens: a bottom sheet instead of an anchored box. */
1744
+ @media (pointer: coarse) and (max-width: 640px) {
1745
+ .salmon-inline-assist[data-mode='popover'] {
1746
+ inset: auto 0 0 0 !important;
1747
+ inline-size: 100%;
1748
+ transform: none !important;
1749
+ padding-block-end: max(8px, env(safe-area-inset-bottom));
1750
+ border-radius: var(--salmon-radius-lg, 10px) var(--salmon-radius-lg, 10px) 0 0;
1751
+ }
1752
+ }
1753
+
1754
+ }