@happyvertical/smrt-chat 0.55.16 → 0.55.17

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 (39) hide show
  1. package/dist/chunks/{chat-stream-j6VuNo3t.js → chat-stream-D1xCl9IM.js} +2 -2
  2. package/dist/chunks/{chat-stream-j6VuNo3t.js.map → chat-stream-D1xCl9IM.js.map} +1 -1
  3. package/dist/index.js +1 -1
  4. package/dist/manifest.json +1 -1
  5. package/dist/smrt-knowledge.json +3 -3
  6. package/dist/svelte/components/agent/AgentChat.svelte +70 -67
  7. package/dist/svelte/components/agent/AgentSelector.svelte +26 -23
  8. package/dist/svelte/components/agent/AgentSessionPanel.svelte +47 -44
  9. package/dist/svelte/components/agent/ToolCallDisplay.svelte +52 -49
  10. package/dist/svelte/components/assistant/AssistantChoiceCards.svelte +19 -17
  11. package/dist/svelte/components/assistant/AssistantComposer.svelte +31 -28
  12. package/dist/svelte/components/assistant/AssistantDock.svelte +69 -66
  13. package/dist/svelte/components/assistant/AssistantThreadList.svelte +23 -20
  14. package/dist/svelte/components/assistant/FloatingAssistant.svelte +6 -3
  15. package/dist/svelte/components/assistant/captions/CaptionOverlay.svelte +4 -1
  16. package/dist/svelte/components/assistant/captions/HeardCaptions.svelte +5 -2
  17. package/dist/svelte/components/assistant/captions/SpokenCaptions.svelte +5 -2
  18. package/dist/svelte/components/dialogs/RoomCreateDialog.svelte +13 -10
  19. package/dist/svelte/components/dialogs/SearchMessages.svelte +35 -32
  20. package/dist/svelte/components/helper/HelperControlPanel.svelte +4 -1
  21. package/dist/svelte/components/layout/ChatLayout.svelte +14 -10
  22. package/dist/svelte/components/layout/MemberList.svelte +30 -27
  23. package/dist/svelte/components/layout/RoomHeader.svelte +19 -16
  24. package/dist/svelte/components/layout/RoomList.svelte +26 -23
  25. package/dist/svelte/components/messages/MessageInput.svelte +20 -17
  26. package/dist/svelte/components/messages/MessageItem.svelte +45 -42
  27. package/dist/svelte/components/messages/MessageList.svelte +8 -5
  28. package/dist/svelte/components/messages/ThreadPanel.svelte +15 -12
  29. package/dist/svelte/components/shared/FileUpload.svelte +39 -36
  30. package/dist/svelte/components/shared/LinkPreview.svelte +9 -6
  31. package/dist/svelte/components/shared/MentionAutocomplete.svelte +16 -13
  32. package/dist/svelte/components/shared/ReadReceipts.svelte +13 -10
  33. package/dist/svelte/components/shared/UserPresence.svelte +10 -7
  34. package/dist/svelte/components/tabs/ChatTab.svelte +26 -23
  35. package/dist/svelte/components/tabs/ChatTabList.svelte +20 -17
  36. package/dist/svelte/components/tabs/ChatTabs.svelte +7 -4
  37. package/dist/svelte/components/tabs/MiniChat.svelte +26 -23
  38. package/dist/sveltekit.js +1 -1
  39. package/package.json +17 -17
@@ -54,7 +54,7 @@ const roomTypeLabel = $derived.by(() => {
54
54
  });
55
55
  </script>
56
56
 
57
- <header class="room-header" aria-label={t(M['chat.room_header.room_label'], { name: room.name })}>
57
+ <header class="room-header" aria-label={t(M['chat.room_header.room_label'], { name: room.name })} data-smrt-component="RoomHeader">
58
58
  <div class="room-header__info">
59
59
  <div class="room-header__title-row">
60
60
  {#if room.roomType !== 'dm'}
@@ -118,14 +118,16 @@ const roomTypeLabel = $derived.by(() => {
118
118
  </header>
119
119
 
120
120
  <style>
121
+ @layer smrt.reset, smrt.structure, smrt.theme;
122
+ @layer smrt.theme {
121
123
  .room-header {
122
124
  display: flex;
123
125
  align-items: center;
124
126
  justify-content: space-between;
125
127
  gap: 1rem;
126
128
  padding: 0.75rem 1rem;
127
- background: var(--smrt-color-surface, #fefbff);
128
- border-bottom: 1px solid var(--smrt-color-outline-variant, #c4c6d0);
129
+ background: var(--smrt-color-surface);
130
+ border-bottom: 1px solid var(--smrt-color-outline-variant);
129
131
  min-height: 3.5rem;
130
132
  }
131
133
 
@@ -147,14 +149,14 @@ const roomTypeLabel = $derived.by(() => {
147
149
  flex-shrink: 0;
148
150
  font-size: var(--smrt-typography-title-medium-size, 1.125rem);
149
151
  font-weight: var(--smrt-typography-weight-bold, 700);
150
- color: var(--smrt-color-on-surface-variant, #43474e);
152
+ color: var(--smrt-color-on-surface-variant);
151
153
  }
152
154
 
153
155
  .room-header__avatar {
154
156
  flex-shrink: 0;
155
157
  width: 1.75rem;
156
158
  height: 1.75rem;
157
- border-radius: var(--smrt-radius-full, 9999px);
159
+ border-radius: var(--smrt-radius-full);
158
160
  object-fit: cover;
159
161
  }
160
162
 
@@ -162,9 +164,9 @@ const roomTypeLabel = $derived.by(() => {
162
164
  flex-shrink: 0;
163
165
  width: 1.75rem;
164
166
  height: 1.75rem;
165
- border-radius: var(--smrt-radius-full, 9999px);
166
- background: var(--smrt-color-primary-container, #d6e3ff);
167
- color: var(--smrt-color-on-primary-container, #001a41);
167
+ border-radius: var(--smrt-radius-full);
168
+ background: var(--smrt-color-primary-container);
169
+ color: var(--smrt-color-on-primary-container);
168
170
  display: inline-flex;
169
171
  align-items: center;
170
172
  justify-content: center;
@@ -174,7 +176,7 @@ const roomTypeLabel = $derived.by(() => {
174
176
  .room-header__name {
175
177
  margin: 0;
176
178
  font: var(--smrt-typography-title-medium-font, 600 1rem / 1.5 sans-serif);
177
- color: var(--smrt-color-on-surface, #1a1c1e);
179
+ color: var(--smrt-color-on-surface);
178
180
  overflow: hidden;
179
181
  text-overflow: ellipsis;
180
182
  white-space: nowrap;
@@ -183,16 +185,16 @@ const roomTypeLabel = $derived.by(() => {
183
185
  .room-header__type-badge {
184
186
  flex-shrink: 0;
185
187
  padding: 0.125rem 0.5rem;
186
- border-radius: var(--smrt-radius-full, 9999px);
187
- background: var(--smrt-color-surface-container, #f0f0f4);
188
- color: var(--smrt-color-on-surface-variant, #43474e);
188
+ border-radius: var(--smrt-radius-full);
189
+ background: var(--smrt-color-surface-container);
190
+ color: var(--smrt-color-on-surface-variant);
189
191
  font: var(--smrt-typography-label-small-font, 500 0.6875rem / 1 sans-serif);
190
192
  }
191
193
 
192
194
  .room-header__topic {
193
195
  margin: 0;
194
196
  font: var(--smrt-typography-body-small-font, 0.75rem / 1.25 sans-serif);
195
- color: var(--smrt-color-on-surface-variant, #43474e);
197
+ color: var(--smrt-color-on-surface-variant);
196
198
  overflow: hidden;
197
199
  text-overflow: ellipsis;
198
200
  white-space: nowrap;
@@ -212,12 +214,12 @@ const roomTypeLabel = $derived.by(() => {
212
214
  padding: 0.375rem 0.5rem;
213
215
  background: none;
214
216
  border-radius: var(--smrt-radius-medium, 0.5rem);
215
- color: var(--smrt-color-on-surface-variant, #43474e);
217
+ color: var(--smrt-color-on-surface-variant);
216
218
  transition: background var(--smrt-duration-short2, 150ms);
217
219
  }
218
220
 
219
221
  .room-header__actions :global(.header-btn:hover) {
220
- background: var(--smrt-color-surface-variant, #e1e2ec);
222
+ background: var(--smrt-color-surface-variant);
221
223
  }
222
224
 
223
225
  .header-btn__icon {
@@ -227,7 +229,7 @@ const roomTypeLabel = $derived.by(() => {
227
229
 
228
230
  .header-btn__count {
229
231
  font: var(--smrt-typography-label-medium-font, 500 0.75rem / 1 sans-serif);
230
- color: var(--smrt-color-on-surface-variant, #43474e);
232
+ color: var(--smrt-color-on-surface-variant);
231
233
  }
232
234
 
233
235
  @media (prefers-reduced-motion: reduce) {
@@ -235,4 +237,5 @@ const roomTypeLabel = $derived.by(() => {
235
237
  transition: none;
236
238
  }
237
239
  }
240
+ }
238
241
  </style>
@@ -69,7 +69,7 @@ function formatTimestamp(date?: string | Date | null): string {
69
69
  }
70
70
  </script>
71
71
 
72
- <nav class="room-list" aria-label={t(M['chat.room_list.rooms_label'])}>
72
+ <nav class="room-list" aria-label={t(M['chat.room_list.rooms_label'])} data-smrt-component="RoomList">
73
73
  {#if oncreateroom}
74
74
  <div class="room-list__header">
75
75
  <Button
@@ -245,6 +245,8 @@ function formatTimestamp(date?: string | Date | null): string {
245
245
  </nav>
246
246
 
247
247
  <style>
248
+ @layer smrt.reset, smrt.structure, smrt.theme;
249
+ @layer smrt.theme {
248
250
  .room-list {
249
251
  display: flex;
250
252
  flex-direction: column;
@@ -259,16 +261,16 @@ function formatTimestamp(date?: string | Date | null): string {
259
261
  /* :global() pierces into the Button child's rendered <button> (see #1589). */
260
262
  .room-list__header :global(.create-room-btn) {
261
263
  padding: 0.5rem 0.75rem;
262
- border: 1px dashed var(--smrt-color-outline, #74777f);
264
+ border: 1px dashed var(--smrt-color-outline);
263
265
  border-radius: var(--smrt-radius-medium, 0.5rem);
264
266
  background: transparent;
265
- color: var(--smrt-color-primary, #005ac1);
267
+ color: var(--smrt-color-primary);
266
268
  font: var(--smrt-typography-label-large-font, 500 0.875rem / 1.25 sans-serif);
267
269
  transition: background var(--smrt-duration-short2, 150ms);
268
270
  }
269
271
 
270
272
  .room-list__header :global(.create-room-btn:hover) {
271
- background: var(--smrt-color-primary-container, #d6e3ff);
273
+ background: var(--smrt-color-primary-container);
272
274
  }
273
275
 
274
276
  .room-group {
@@ -285,13 +287,13 @@ function formatTimestamp(date?: string | Date | null): string {
285
287
  background: none;
286
288
  cursor: pointer;
287
289
  font: var(--smrt-typography-label-small-font, 500 0.6875rem / 1 sans-serif);
288
- color: var(--smrt-color-on-surface-variant, #43474e);
290
+ color: var(--smrt-color-on-surface-variant);
289
291
  text-transform: uppercase;
290
292
  letter-spacing: var(--smrt-typography-label-small-tracking, 0.05em);
291
293
  }
292
294
 
293
295
  .room-group__header:hover {
294
- color: var(--smrt-color-on-surface, #1a1c1e);
296
+ color: var(--smrt-color-on-surface);
295
297
  }
296
298
 
297
299
  .room-group__chevron {
@@ -309,7 +311,7 @@ function formatTimestamp(date?: string | Date | null): string {
309
311
  }
310
312
 
311
313
  .room-group__count {
312
- color: var(--smrt-color-outline, #74777f);
314
+ color: var(--smrt-color-outline);
313
315
  font-size: var(--smrt-typography-label-small-size, 0.625rem);
314
316
  }
315
317
 
@@ -329,18 +331,18 @@ function formatTimestamp(date?: string | Date | null): string {
329
331
  background: none;
330
332
  cursor: pointer;
331
333
  font: var(--smrt-typography-body-medium-font, 0.875rem / 1.25 sans-serif);
332
- color: var(--smrt-color-on-surface, #1a1c1e);
334
+ color: var(--smrt-color-on-surface);
333
335
  border-radius: var(--smrt-radius-small, 0.25rem);
334
336
  text-align: left;
335
337
  transition: background var(--smrt-duration-short2, 150ms);
336
338
  }
337
339
 
338
340
  .room-item:hover {
339
- background: var(--smrt-color-surface-variant, #e1e2ec);
341
+ background: var(--smrt-color-surface-variant);
340
342
  }
341
343
 
342
344
  .room-item--active {
343
- background: var(--smrt-color-secondary-container, #d7e3f7);
345
+ background: var(--smrt-color-secondary-container);
344
346
  font-weight: var(--smrt-typography-weight-medium, 500);
345
347
  }
346
348
 
@@ -349,7 +351,7 @@ function formatTimestamp(date?: string | Date | null): string {
349
351
  }
350
352
 
351
353
  .room-item:focus-visible {
352
- outline: 2px solid var(--smrt-color-primary, #005ac1);
354
+ outline: 2px solid var(--smrt-color-primary);
353
355
  outline-offset: -2px;
354
356
  }
355
357
 
@@ -357,7 +359,7 @@ function formatTimestamp(date?: string | Date | null): string {
357
359
  flex-shrink: 0;
358
360
  width: 1.25rem;
359
361
  text-align: center;
360
- color: var(--smrt-color-on-surface-variant, #43474e);
362
+ color: var(--smrt-color-on-surface-variant);
361
363
  font-weight: var(--smrt-typography-weight-semibold, 600);
362
364
  }
363
365
 
@@ -372,7 +374,7 @@ function formatTimestamp(date?: string | Date | null): string {
372
374
  flex-shrink: 0;
373
375
  width: 2rem;
374
376
  height: 2rem;
375
- border-radius: var(--smrt-radius-full, 9999px);
377
+ border-radius: var(--smrt-radius-full);
376
378
  object-fit: cover;
377
379
  }
378
380
 
@@ -380,9 +382,9 @@ function formatTimestamp(date?: string | Date | null): string {
380
382
  flex-shrink: 0;
381
383
  width: 2rem;
382
384
  height: 2rem;
383
- border-radius: var(--smrt-radius-full, 9999px);
384
- background: var(--smrt-color-primary-container, #d6e3ff);
385
- color: var(--smrt-color-on-primary-container, #001a41);
385
+ border-radius: var(--smrt-radius-full);
386
+ background: var(--smrt-color-primary-container);
387
+ color: var(--smrt-color-on-primary-container);
386
388
  display: inline-flex;
387
389
  align-items: center;
388
390
  justify-content: center;
@@ -406,7 +408,7 @@ function formatTimestamp(date?: string | Date | null): string {
406
408
 
407
409
  .room-item__preview {
408
410
  font: var(--smrt-typography-body-small-font, 0.75rem / 1.25 sans-serif);
409
- color: var(--smrt-color-on-surface-variant, #43474e);
411
+ color: var(--smrt-color-on-surface-variant);
410
412
  overflow: hidden;
411
413
  text-overflow: ellipsis;
412
414
  white-space: nowrap;
@@ -422,7 +424,7 @@ function formatTimestamp(date?: string | Date | null): string {
422
424
 
423
425
  .room-item__time {
424
426
  font: var(--smrt-typography-label-small-font, 500 0.6875rem / 1 sans-serif);
425
- color: var(--smrt-color-on-surface-variant, #43474e);
427
+ color: var(--smrt-color-on-surface-variant);
426
428
  }
427
429
 
428
430
  .unread-badge {
@@ -432,9 +434,9 @@ function formatTimestamp(date?: string | Date | null): string {
432
434
  display: inline-flex;
433
435
  align-items: center;
434
436
  justify-content: center;
435
- border-radius: var(--smrt-radius-full, 9999px);
436
- background: var(--smrt-color-primary, #005ac1);
437
- color: var(--smrt-color-on-primary, #fff);
437
+ border-radius: var(--smrt-radius-full);
438
+ background: var(--smrt-color-primary);
439
+ color: var(--smrt-color-on-primary);
438
440
  font: var(--smrt-typography-label-small-font, 500 0.6875rem / 1 sans-serif);
439
441
  padding: 0 0.25rem;
440
442
  }
@@ -447,7 +449,7 @@ function formatTimestamp(date?: string | Date | null): string {
447
449
  gap: 0.5rem;
448
450
  padding: 2rem 1rem;
449
451
  text-align: center;
450
- color: var(--smrt-color-on-surface-variant, #43474e);
452
+ color: var(--smrt-color-on-surface-variant);
451
453
  }
452
454
 
453
455
  .room-list__empty p {
@@ -458,7 +460,7 @@ function formatTimestamp(date?: string | Date | null): string {
458
460
  /* :global() pierces into the Button child's rendered <button> (see #1589). */
459
461
  .room-list__empty :global(.create-link) {
460
462
  background: none;
461
- color: var(--smrt-color-primary, #005ac1);
463
+ color: var(--smrt-color-primary);
462
464
  font: var(--smrt-typography-label-large-font, 500 0.875rem / 1.25 sans-serif);
463
465
  text-decoration: underline;
464
466
  }
@@ -477,4 +479,5 @@ function formatTimestamp(date?: string | Date | null): string {
477
479
  transition: none;
478
480
  }
479
481
  }
482
+ }
480
483
  </style>
@@ -60,7 +60,7 @@ function handleInput(event: Event) {
60
60
  }
61
61
  </script>
62
62
 
63
- <div class="message-input" class:disabled>
63
+ <div class="message-input" class:disabled data-smrt-component="MessageInput">
64
64
  {#if replyTo}
65
65
  <div class="message-input__reply">
66
66
  <div class="message-input__reply-body">
@@ -115,11 +115,13 @@ function handleInput(event: Event) {
115
115
  </div>
116
116
 
117
117
  <style>
118
+ @layer smrt.reset, smrt.structure, smrt.theme;
119
+ @layer smrt.theme {
118
120
  .message-input {
119
121
  display: flex;
120
122
  flex-direction: column;
121
- border-top: 1px solid var(--smrt-color-outline-variant, #c4c6cf);
122
- background: var(--smrt-color-surface, #ffffff);
123
+ border-top: 1px solid var(--smrt-color-outline-variant);
124
+ background: var(--smrt-color-surface);
123
125
  }
124
126
 
125
127
  .message-input.disabled {
@@ -132,29 +134,29 @@ function handleInput(event: Event) {
132
134
  align-items: center;
133
135
  gap: var(--smrt-spacing-2, 0.375rem);
134
136
  padding: var(--smrt-spacing-2, 0.375rem) var(--smrt-spacing-4, 1rem);
135
- background: var(--smrt-color-surface-container-low, #f9fafb);
136
- border-bottom: 1px solid var(--smrt-color-outline-variant, #c4c6cf);
137
+ background: var(--smrt-color-surface-container-low);
138
+ border-bottom: 1px solid var(--smrt-color-outline-variant);
137
139
  }
138
140
 
139
141
  .message-input__reply-body {
140
142
  flex: 1;
141
143
  display: flex;
142
144
  flex-direction: column;
143
- gap: var(--smrt-spacing-1, 4px);
145
+ gap: var(--smrt-spacing-1);
144
146
  min-width: 0;
145
- border-left: 2px solid var(--smrt-color-primary, #005ac1);
147
+ border-left: 2px solid var(--smrt-color-primary);
146
148
  padding-left: var(--smrt-spacing-2, 0.375rem);
147
149
  }
148
150
 
149
151
  .message-input__reply-name {
150
152
  font-size: var(--smrt-typography-body-small-size, 0.75rem);
151
153
  font-weight: var(--smrt-typography-weight-medium, 500);
152
- color: var(--smrt-color-primary, #005ac1);
154
+ color: var(--smrt-color-primary);
153
155
  }
154
156
 
155
157
  .message-input__reply-text {
156
158
  font-size: var(--smrt-typography-body-small-size, 0.75rem);
157
- color: var(--smrt-color-on-surface-variant, #43474e);
159
+ color: var(--smrt-color-on-surface-variant);
158
160
  white-space: nowrap;
159
161
  overflow: hidden;
160
162
  text-overflow: ellipsis;
@@ -170,13 +172,13 @@ function handleInput(event: Event) {
170
172
  border: 0;
171
173
  border-radius: var(--smrt-radius-small, 0.25rem);
172
174
  background: transparent;
173
- color: var(--smrt-color-on-surface-variant, #43474e);
175
+ color: var(--smrt-color-on-surface-variant);
174
176
  cursor: pointer;
175
177
  flex-shrink: 0;
176
178
  }
177
179
 
178
180
  .message-input__reply-close:hover {
179
- background: var(--smrt-color-surface-container-high, #e1e3e8);
181
+ background: var(--smrt-color-surface-container-high);
180
182
  }
181
183
 
182
184
  .message-input__bar {
@@ -205,21 +207,22 @@ function handleInput(event: Event) {
205
207
  height: 36px;
206
208
  padding: 0;
207
209
  border: 0;
208
- border-radius: var(--smrt-radius-full, 9999px);
209
- background: var(--smrt-color-primary, #005ac1);
210
- color: var(--smrt-color-on-primary, #ffffff);
210
+ border-radius: var(--smrt-radius-full);
211
+ background: var(--smrt-color-primary);
212
+ color: var(--smrt-color-on-primary);
211
213
  cursor: pointer;
212
214
  flex-shrink: 0;
213
215
  transition: background var(--smrt-duration-short2, 150ms) var(--smrt-easing-standard, ease);
214
216
  }
215
217
 
216
218
  .message-input__send:hover:not(:disabled) {
217
- background: color-mix(in srgb, var(--smrt-color-primary, #005ac1) 85%, var(--smrt-color-shadow, #000));
219
+ background: color-mix(in srgb, var(--smrt-color-primary) 85%, var(--smrt-color-shadow));
218
220
  }
219
221
 
220
222
  .message-input__send:disabled {
221
- background: var(--smrt-color-surface-container-high, #e1e3e8);
222
- color: var(--smrt-color-outline, #74777f);
223
+ background: var(--smrt-color-surface-container-high);
224
+ color: var(--smrt-color-outline);
223
225
  cursor: default;
224
226
  }
227
+ }
225
228
  </style>
@@ -110,7 +110,7 @@ function handleEscape(event: KeyboardEvent) {
110
110
  />
111
111
 
112
112
  {#if message.messageType === 'system' || message.messageType === 'action'}
113
- <div class="message-item message-item--system">
113
+ <div class="message-item message-item--system" data-smrt-component="MessageItem">
114
114
  <MessageBubble content={message.content} own={false} variant="system" />
115
115
  </div>
116
116
  {:else}
@@ -121,7 +121,7 @@ function handleEscape(event: KeyboardEvent) {
121
121
  aria-label={t(M['chat.message_item.message_from'], { name: message.senderName })}
122
122
  onmouseenter={() => showActions = true}
123
123
  onmouseleave={() => { showActions = false; showReactionPicker = false; }}
124
- onfocusout={handleFocusOut}
124
+ onfocusout={handleFocusOut} data-smrt-component="MessageItem"
125
125
  >
126
126
  {#if !isOwn}
127
127
  <div class="message-item__avatar">
@@ -279,6 +279,8 @@ function handleEscape(event: KeyboardEvent) {
279
279
  {/if}
280
280
 
281
281
  <style>
282
+ @layer smrt.reset, smrt.structure, smrt.theme;
283
+ @layer smrt.theme {
282
284
  .message-item {
283
285
  display: flex;
284
286
  align-items: flex-start;
@@ -316,18 +318,18 @@ function handleEscape(event: KeyboardEvent) {
316
318
  .message-item__sender {
317
319
  font-size: var(--smrt-typography-body-small-size, 0.75rem);
318
320
  font-weight: var(--smrt-typography-weight-medium, 500);
319
- color: var(--smrt-color-on-surface-variant, #43474e);
321
+ color: var(--smrt-color-on-surface-variant);
320
322
  padding-left: var(--smrt-spacing-1, 0.25rem);
321
323
  }
322
324
 
323
325
  .message-item__reply-preview {
324
326
  display: flex;
325
327
  flex-direction: column;
326
- gap: var(--smrt-spacing-1, 4px);
328
+ gap: var(--smrt-spacing-1);
327
329
  padding: var(--smrt-spacing-1, 0.25rem) var(--smrt-spacing-3, 0.75rem);
328
- border-left: 2px solid var(--smrt-color-primary, #005ac1);
330
+ border-left: 2px solid var(--smrt-color-primary);
329
331
  border-radius: var(--smrt-radius-small, 0.25rem);
330
- background: var(--smrt-color-surface-container-low, #f9fafb);
332
+ background: var(--smrt-color-surface-container-low);
331
333
  font-size: var(--smrt-typography-body-small-size, 0.75rem);
332
334
  max-width: 100%;
333
335
  overflow: hidden;
@@ -335,11 +337,11 @@ function handleEscape(event: KeyboardEvent) {
335
337
 
336
338
  .message-item__reply-name {
337
339
  font-weight: var(--smrt-typography-weight-medium, 500);
338
- color: var(--smrt-color-primary, #005ac1);
340
+ color: var(--smrt-color-primary);
339
341
  }
340
342
 
341
343
  .message-item__reply-text {
342
- color: var(--smrt-color-on-surface-variant, #43474e);
344
+ color: var(--smrt-color-on-surface-variant);
343
345
  white-space: nowrap;
344
346
  overflow: hidden;
345
347
  text-overflow: ellipsis;
@@ -350,7 +352,7 @@ function handleEscape(event: KeyboardEvent) {
350
352
  align-items: center;
351
353
  gap: var(--smrt-spacing-2, 0.375rem);
352
354
  padding: var(--smrt-spacing-2, 0.375rem) var(--smrt-spacing-3, 0.75rem);
353
- background: var(--smrt-color-surface-container, #f3f4f6);
355
+ background: var(--smrt-color-surface-container);
354
356
  border-radius: var(--smrt-radius-small, 0.25rem);
355
357
  font-size: var(--smrt-typography-body-small-size, 0.75rem);
356
358
  font-family: var(--smrt-font-family-mono, ui-monospace, monospace);
@@ -358,11 +360,11 @@ function handleEscape(event: KeyboardEvent) {
358
360
 
359
361
  .message-item__tool-name {
360
362
  font-weight: var(--smrt-typography-weight-medium, 500);
361
- color: var(--smrt-color-on-surface, #1b1b1f);
363
+ color: var(--smrt-color-on-surface);
362
364
  }
363
365
 
364
366
  .message-item__tool-status {
365
- padding: var(--smrt-spacing-1, 4px) var(--smrt-spacing-2, 8px);
367
+ padding: var(--smrt-spacing-1) var(--smrt-spacing-2);
366
368
  border-radius: var(--smrt-radius-small, 0.25rem);
367
369
  font-size: var(--smrt-typography-label-small-size, 0.625rem);
368
370
  text-transform: uppercase;
@@ -370,31 +372,31 @@ function handleEscape(event: KeyboardEvent) {
370
372
  }
371
373
 
372
374
  .message-item__tool-status.pending {
373
- background: var(--smrt-color-surface-container-high, #e1e3e8);
374
- color: var(--smrt-color-on-surface-variant, #43474e);
375
+ background: var(--smrt-color-surface-container-high);
376
+ color: var(--smrt-color-on-surface-variant);
375
377
  }
376
378
 
377
379
  .message-item__tool-status.running {
378
- background: var(--smrt-color-primary-container, #e3f2fd);
379
- color: var(--smrt-color-on-primary-container, #1565c0);
380
+ background: var(--smrt-color-primary-container);
381
+ color: var(--smrt-color-on-primary-container);
380
382
  }
381
383
 
382
384
  .message-item__tool-status.success {
383
- background: var(--smrt-color-success-container, #e8f5e9);
384
- color: var(--smrt-color-on-success-container, #2e7d32);
385
+ background: var(--smrt-color-success-container);
386
+ color: var(--smrt-color-on-success-container);
385
387
  }
386
388
 
387
389
  .message-item__tool-status.error {
388
- background: var(--smrt-color-error-container, #ffebee);
389
- color: var(--smrt-color-on-error-container, #c62828);
390
+ background: var(--smrt-color-error-container);
391
+ color: var(--smrt-color-on-error-container);
390
392
  }
391
393
 
392
394
  .message-item__tool-duration {
393
- color: var(--smrt-color-outline, #74777f);
395
+ color: var(--smrt-color-outline);
394
396
  }
395
397
 
396
398
  .message-item__tool-error {
397
- color: var(--smrt-color-on-error-container, #c62828);
399
+ color: var(--smrt-color-on-error-container);
398
400
  }
399
401
 
400
402
  .message-item__reactions {
@@ -405,22 +407,22 @@ function handleEscape(event: KeyboardEvent) {
405
407
 
406
408
  /* :global() pierces into each Button's rendered <button> (see #1589). */
407
409
  .message-item__reactions :global(.message-item__reaction) {
408
- gap: var(--smrt-spacing-1, 4px);
409
- padding: var(--smrt-spacing-1, 4px) var(--smrt-spacing-2, 8px);
410
- border: 1px solid var(--smrt-color-outline-variant, #c4c6cf);
411
- border-radius: var(--smrt-radius-full, 9999px);
412
- background: var(--smrt-color-surface, #ffffff);
410
+ gap: var(--smrt-spacing-1);
411
+ padding: var(--smrt-spacing-1) var(--smrt-spacing-2);
412
+ border: 1px solid var(--smrt-color-outline-variant);
413
+ border-radius: var(--smrt-radius-full);
414
+ background: var(--smrt-color-surface);
413
415
  font-size: var(--smrt-typography-label-medium-size, 0.75rem);
414
416
  transition: background var(--smrt-duration-short2, 150ms) var(--smrt-easing-standard, ease);
415
417
  }
416
418
 
417
419
  .message-item__reactions :global(.message-item__reaction:hover) {
418
- background: var(--smrt-color-surface-container-high, #e1e3e8);
420
+ background: var(--smrt-color-surface-container-high);
419
421
  }
420
422
 
421
423
  .message-item__reactions :global(.message-item__reaction--active) {
422
- border-color: var(--smrt-color-primary, #005ac1);
423
- background: var(--smrt-color-primary-container, #d6e3ff);
424
+ border-color: var(--smrt-color-primary);
425
+ background: var(--smrt-color-primary-container);
424
426
  }
425
427
 
426
428
  .message-item__reaction-emoji {
@@ -430,7 +432,7 @@ function handleEscape(event: KeyboardEvent) {
430
432
 
431
433
  .message-item__reaction-count {
432
434
  font-size: var(--smrt-typography-label-small-size, 0.6875rem);
433
- color: var(--smrt-color-on-surface-variant, #43474e);
435
+ color: var(--smrt-color-on-surface-variant);
434
436
  }
435
437
 
436
438
  .message-item__meta {
@@ -442,12 +444,12 @@ function handleEscape(event: KeyboardEvent) {
442
444
 
443
445
  .message-item__time {
444
446
  font-size: var(--smrt-typography-label-small-size, 0.625rem);
445
- color: var(--smrt-color-outline, #74777f);
447
+ color: var(--smrt-color-outline);
446
448
  }
447
449
 
448
450
  .message-item__edited {
449
451
  font-size: var(--smrt-typography-label-small-size, 0.625rem);
450
- color: var(--smrt-color-outline, #74777f);
452
+ color: var(--smrt-color-outline);
451
453
  font-style: italic;
452
454
  }
453
455
 
@@ -459,10 +461,10 @@ function handleEscape(event: KeyboardEvent) {
459
461
  position: absolute;
460
462
  top: 0;
461
463
  right: var(--smrt-spacing-4, 1rem);
462
- border: 1px solid var(--smrt-color-outline-variant, #c4c6cf);
464
+ border: 1px solid var(--smrt-color-outline-variant);
463
465
  border-radius: var(--smrt-radius-small, 0.25rem);
464
- background: var(--smrt-color-surface, #ffffff);
465
- color: var(--smrt-color-on-surface-variant, #43474e);
466
+ background: var(--smrt-color-surface);
467
+ color: var(--smrt-color-on-surface-variant);
466
468
  opacity: 0;
467
469
  transition: opacity var(--smrt-duration-short2, 150ms) var(--smrt-easing-standard, ease);
468
470
  }
@@ -482,7 +484,7 @@ function handleEscape(event: KeyboardEvent) {
482
484
 
483
485
  .message-item :global(.message-item__more-btn:focus-visible) {
484
486
  opacity: 1;
485
- outline: 2px solid var(--smrt-color-primary, #005ac1);
487
+ outline: 2px solid var(--smrt-color-primary);
486
488
  outline-offset: 1px;
487
489
  }
488
490
 
@@ -495,14 +497,14 @@ function handleEscape(event: KeyboardEvent) {
495
497
  .message-item__actions {
496
498
  display: flex;
497
499
  align-items: center;
498
- gap: var(--smrt-spacing-1, 4px);
500
+ gap: var(--smrt-spacing-1);
499
501
  position: absolute;
500
502
  top: 0;
501
503
  right: var(--smrt-spacing-4, 1rem);
502
- background: var(--smrt-color-surface, #ffffff);
503
- border: 1px solid var(--smrt-color-outline-variant, #c4c6cf);
504
+ background: var(--smrt-color-surface);
505
+ border: 1px solid var(--smrt-color-outline-variant);
504
506
  border-radius: var(--smrt-radius-small, 0.25rem);
505
- padding: var(--smrt-spacing-1, 4px);
507
+ padding: var(--smrt-spacing-1);
506
508
  box-shadow: var(--smrt-elevation-1, 0 1px 3px rgba(0, 0, 0, 0.12));
507
509
  z-index: 1;
508
510
  }
@@ -519,12 +521,12 @@ function handleEscape(event: KeyboardEvent) {
519
521
  padding: 0;
520
522
  border-radius: var(--smrt-radius-small, 0.25rem);
521
523
  background: transparent;
522
- color: var(--smrt-color-on-surface-variant, #43474e);
524
+ color: var(--smrt-color-on-surface-variant);
523
525
  transition: background var(--smrt-duration-short2, 150ms) var(--smrt-easing-standard, ease);
524
526
  }
525
527
 
526
528
  .message-item__actions :global(.message-item__action-btn:hover) {
527
- background: var(--smrt-color-surface-container-high, #e1e3e8);
529
+ background: var(--smrt-color-surface-container-high);
528
530
  }
529
531
 
530
532
  .message-item__picker-popover {
@@ -551,4 +553,5 @@ function handleEscape(event: KeyboardEvent) {
551
553
  transition: none;
552
554
  }
553
555
  }
556
+ }
554
557
  </style>
@@ -68,7 +68,7 @@ function handleScroll(event: Event) {
68
68
  bind:this={scrollContainer}
69
69
  onscroll={handleScroll}
70
70
  role="log"
71
- aria-label={t(M['chat.message_list.messages_label'])}
71
+ aria-label={t(M['chat.message_list.messages_label'])} data-smrt-component="MessageList"
72
72
  >
73
73
  {#if messages.length === 0}
74
74
  <div class="message-list__empty">
@@ -92,6 +92,8 @@ function handleScroll(event: Event) {
92
92
  </div>
93
93
 
94
94
  <style>
95
+ @layer smrt.reset, smrt.structure, smrt.theme;
96
+ @layer smrt.theme {
95
97
  .message-list {
96
98
  display: flex;
97
99
  flex-direction: column;
@@ -107,7 +109,7 @@ function handleScroll(event: Event) {
107
109
  align-items: center;
108
110
  justify-content: center;
109
111
  flex: 1;
110
- color: var(--smrt-color-on-surface-variant, #43474e);
112
+ color: var(--smrt-color-on-surface-variant);
111
113
  font-size: var(--smrt-typography-body-medium-size, 0.875rem);
112
114
  }
113
115
 
@@ -121,9 +123,10 @@ function handleScroll(event: Event) {
121
123
  .message-list__date-label {
122
124
  padding: var(--smrt-spacing-1, 0.25rem) var(--smrt-spacing-3, 0.75rem);
123
125
  font-size: var(--smrt-typography-body-small-size, 0.75rem);
124
- color: var(--smrt-color-on-surface-variant, #43474e);
125
- background: var(--smrt-color-surface-container, #f3f4f6);
126
- border-radius: var(--smrt-radius-full, 9999px);
126
+ color: var(--smrt-color-on-surface-variant);
127
+ background: var(--smrt-color-surface-container);
128
+ border-radius: var(--smrt-radius-full);
127
129
  white-space: nowrap;
128
130
  }
131
+ }
129
132
  </style>