@happyvertical/smrt-chat 0.55.15 → 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.
- package/dist/chunks/{chat-stream-CXWE2vjb.js → chat-stream-D1xCl9IM.js} +2 -2
- package/dist/chunks/{chat-stream-CXWE2vjb.js.map → chat-stream-D1xCl9IM.js.map} +1 -1
- package/dist/index.js +1 -1
- package/dist/manifest.json +1 -1
- package/dist/smrt-knowledge.json +3 -3
- package/dist/svelte/components/agent/AgentChat.svelte +70 -67
- package/dist/svelte/components/agent/AgentSelector.svelte +26 -23
- package/dist/svelte/components/agent/AgentSessionPanel.svelte +47 -44
- package/dist/svelte/components/agent/ToolCallDisplay.svelte +52 -49
- package/dist/svelte/components/assistant/AssistantChoiceCards.svelte +19 -17
- package/dist/svelte/components/assistant/AssistantComposer.svelte +31 -28
- package/dist/svelte/components/assistant/AssistantDock.svelte +69 -66
- package/dist/svelte/components/assistant/AssistantThreadList.svelte +23 -20
- package/dist/svelte/components/assistant/FloatingAssistant.svelte +6 -3
- package/dist/svelte/components/assistant/captions/CaptionOverlay.svelte +4 -1
- package/dist/svelte/components/assistant/captions/HeardCaptions.svelte +5 -2
- package/dist/svelte/components/assistant/captions/SpokenCaptions.svelte +5 -2
- package/dist/svelte/components/dialogs/RoomCreateDialog.svelte +13 -10
- package/dist/svelte/components/dialogs/SearchMessages.svelte +35 -32
- package/dist/svelte/components/helper/HelperControlPanel.svelte +4 -1
- package/dist/svelte/components/layout/ChatLayout.svelte +14 -10
- package/dist/svelte/components/layout/MemberList.svelte +30 -27
- package/dist/svelte/components/layout/RoomHeader.svelte +19 -16
- package/dist/svelte/components/layout/RoomList.svelte +26 -23
- package/dist/svelte/components/messages/MessageInput.svelte +20 -17
- package/dist/svelte/components/messages/MessageItem.svelte +45 -42
- package/dist/svelte/components/messages/MessageList.svelte +8 -5
- package/dist/svelte/components/messages/ThreadPanel.svelte +15 -12
- package/dist/svelte/components/shared/FileUpload.svelte +39 -36
- package/dist/svelte/components/shared/LinkPreview.svelte +9 -6
- package/dist/svelte/components/shared/MentionAutocomplete.svelte +16 -13
- package/dist/svelte/components/shared/ReadReceipts.svelte +13 -10
- package/dist/svelte/components/shared/UserPresence.svelte +10 -7
- package/dist/svelte/components/tabs/ChatTab.svelte +26 -23
- package/dist/svelte/components/tabs/ChatTabList.svelte +20 -17
- package/dist/svelte/components/tabs/ChatTabs.svelte +7 -4
- package/dist/svelte/components/tabs/MiniChat.svelte +26 -23
- package/dist/sveltekit.js +1 -1
- package/package.json +17 -17
|
@@ -34,7 +34,7 @@ const replyCount = $derived(
|
|
|
34
34
|
);
|
|
35
35
|
</script>
|
|
36
36
|
|
|
37
|
-
<aside class="thread-panel" aria-label={t(M['chat.thread_panel.thread_label'], { title: threadTitle })}>
|
|
37
|
+
<aside class="thread-panel" aria-label={t(M['chat.thread_panel.thread_label'], { title: threadTitle })} data-smrt-component="ThreadPanel">
|
|
38
38
|
<header class="thread-panel__header">
|
|
39
39
|
<div class="thread-panel__header-text">
|
|
40
40
|
<h3 class="thread-panel__title">{threadTitle}</h3>
|
|
@@ -78,13 +78,15 @@ const replyCount = $derived(
|
|
|
78
78
|
</aside>
|
|
79
79
|
|
|
80
80
|
<style>
|
|
81
|
+
@layer smrt.reset, smrt.structure, smrt.theme;
|
|
82
|
+
@layer smrt.theme {
|
|
81
83
|
.thread-panel {
|
|
82
84
|
display: flex;
|
|
83
85
|
flex-direction: column;
|
|
84
86
|
height: 100%;
|
|
85
87
|
width: 100%;
|
|
86
|
-
background: var(--smrt-color-surface
|
|
87
|
-
border-left: 1px solid var(--smrt-color-outline-variant
|
|
88
|
+
background: var(--smrt-color-surface);
|
|
89
|
+
border-left: 1px solid var(--smrt-color-outline-variant);
|
|
88
90
|
}
|
|
89
91
|
|
|
90
92
|
.thread-panel__header {
|
|
@@ -92,7 +94,7 @@ const replyCount = $derived(
|
|
|
92
94
|
align-items: center;
|
|
93
95
|
gap: var(--smrt-spacing-3, 0.75rem);
|
|
94
96
|
padding: var(--smrt-spacing-4, 1rem);
|
|
95
|
-
border-bottom: 1px solid var(--smrt-color-outline-variant
|
|
97
|
+
border-bottom: 1px solid var(--smrt-color-outline-variant);
|
|
96
98
|
flex-shrink: 0;
|
|
97
99
|
}
|
|
98
100
|
|
|
@@ -105,7 +107,7 @@ const replyCount = $derived(
|
|
|
105
107
|
margin: 0;
|
|
106
108
|
font-size: var(--smrt-typography-body-medium-size, 0.875rem);
|
|
107
109
|
font-weight: var(--smrt-typography-weight-semibold, 600);
|
|
108
|
-
color: var(--smrt-color-on-surface
|
|
110
|
+
color: var(--smrt-color-on-surface);
|
|
109
111
|
white-space: nowrap;
|
|
110
112
|
overflow: hidden;
|
|
111
113
|
text-overflow: ellipsis;
|
|
@@ -113,16 +115,16 @@ const replyCount = $derived(
|
|
|
113
115
|
|
|
114
116
|
.thread-panel__meta {
|
|
115
117
|
font-size: var(--smrt-typography-body-small-size, 0.75rem);
|
|
116
|
-
color: var(--smrt-color-on-surface-variant
|
|
118
|
+
color: var(--smrt-color-on-surface-variant);
|
|
117
119
|
}
|
|
118
120
|
|
|
119
121
|
.thread-panel__resolved {
|
|
120
|
-
padding: var(--smrt-spacing-1
|
|
122
|
+
padding: var(--smrt-spacing-1) var(--smrt-spacing-2);
|
|
121
123
|
font-size: var(--smrt-typography-body-small-size, 0.75rem);
|
|
122
124
|
font-weight: var(--smrt-typography-weight-medium, 500);
|
|
123
|
-
color: var(--smrt-color-on-success-container
|
|
124
|
-
background: var(--smrt-color-success-container
|
|
125
|
-
border-radius: var(--smrt-radius-full
|
|
125
|
+
color: var(--smrt-color-on-success-container);
|
|
126
|
+
background: var(--smrt-color-success-container);
|
|
127
|
+
border-radius: var(--smrt-radius-full);
|
|
126
128
|
white-space: nowrap;
|
|
127
129
|
flex-shrink: 0;
|
|
128
130
|
}
|
|
@@ -134,13 +136,13 @@ const replyCount = $derived(
|
|
|
134
136
|
padding: 0;
|
|
135
137
|
border-radius: var(--smrt-radius-small, 0.25rem);
|
|
136
138
|
background: transparent;
|
|
137
|
-
color: var(--smrt-color-on-surface-variant
|
|
139
|
+
color: var(--smrt-color-on-surface-variant);
|
|
138
140
|
flex-shrink: 0;
|
|
139
141
|
transition: background var(--smrt-duration-short2, 150ms) var(--smrt-easing-standard, ease);
|
|
140
142
|
}
|
|
141
143
|
|
|
142
144
|
.thread-panel__header :global(.thread-panel__close:hover) {
|
|
143
|
-
background: var(--smrt-color-surface-container-high
|
|
145
|
+
background: var(--smrt-color-surface-container-high);
|
|
144
146
|
}
|
|
145
147
|
|
|
146
148
|
.thread-panel__messages {
|
|
@@ -153,4 +155,5 @@ const replyCount = $derived(
|
|
|
153
155
|
.thread-panel__input {
|
|
154
156
|
flex-shrink: 0;
|
|
155
157
|
}
|
|
158
|
+
}
|
|
156
159
|
</style>
|
|
@@ -107,7 +107,7 @@ function getFileIcon(type: string): string {
|
|
|
107
107
|
}
|
|
108
108
|
</script>
|
|
109
109
|
|
|
110
|
-
<div class="file-upload" class:file-upload--disabled={disabled}>
|
|
110
|
+
<div class="file-upload" class:file-upload--disabled={disabled} data-smrt-component="FileUpload">
|
|
111
111
|
{#if pendingFiles.length > 0}
|
|
112
112
|
<div class="file-upload__preview" aria-label={t(M['chat.file_upload.preview'])}>
|
|
113
113
|
{#each pendingFiles as file, i (file.name + i)}
|
|
@@ -194,10 +194,12 @@ function getFileIcon(type: string): string {
|
|
|
194
194
|
</div>
|
|
195
195
|
|
|
196
196
|
<style>
|
|
197
|
+
@layer smrt.reset, smrt.structure, smrt.theme;
|
|
198
|
+
@layer smrt.theme {
|
|
197
199
|
.file-upload {
|
|
198
200
|
display: flex;
|
|
199
201
|
flex-direction: column;
|
|
200
|
-
gap: var(--smrt-spacing-2
|
|
202
|
+
gap: var(--smrt-spacing-2);
|
|
201
203
|
}
|
|
202
204
|
|
|
203
205
|
.file-upload--disabled {
|
|
@@ -206,9 +208,9 @@ function getFileIcon(type: string): string {
|
|
|
206
208
|
}
|
|
207
209
|
|
|
208
210
|
.file-upload__drop-zone {
|
|
209
|
-
border: 2px dashed var(--smrt-color-outline-variant
|
|
210
|
-
border-radius: var(--smrt-radius-large
|
|
211
|
-
padding: var(--smrt-spacing-5
|
|
211
|
+
border: 2px dashed var(--smrt-color-outline-variant);
|
|
212
|
+
border-radius: var(--smrt-radius-large);
|
|
213
|
+
padding: var(--smrt-spacing-5);
|
|
212
214
|
text-align: center;
|
|
213
215
|
transition:
|
|
214
216
|
border-color var(--smrt-duration-short2, 150ms),
|
|
@@ -216,8 +218,8 @@ function getFileIcon(type: string): string {
|
|
|
216
218
|
}
|
|
217
219
|
|
|
218
220
|
.file-upload__drop-zone--active {
|
|
219
|
-
border-color: var(--smrt-color-primary
|
|
220
|
-
background: var(--smrt-color-primary-container
|
|
221
|
+
border-color: var(--smrt-color-primary);
|
|
222
|
+
background: var(--smrt-color-primary-container);
|
|
221
223
|
}
|
|
222
224
|
|
|
223
225
|
.file-upload__drop-zone--disabled {
|
|
@@ -228,7 +230,7 @@ function getFileIcon(type: string): string {
|
|
|
228
230
|
display: flex;
|
|
229
231
|
flex-direction: column;
|
|
230
232
|
align-items: center;
|
|
231
|
-
gap: var(--smrt-spacing-2
|
|
233
|
+
gap: var(--smrt-spacing-2);
|
|
232
234
|
cursor: pointer;
|
|
233
235
|
}
|
|
234
236
|
|
|
@@ -241,36 +243,36 @@ function getFileIcon(type: string): string {
|
|
|
241
243
|
}
|
|
242
244
|
|
|
243
245
|
.file-upload__icon {
|
|
244
|
-
color: var(--smrt-color-outline
|
|
246
|
+
color: var(--smrt-color-outline);
|
|
245
247
|
}
|
|
246
248
|
|
|
247
249
|
.file-upload__text {
|
|
248
250
|
font: var(--smrt-typography-body-medium-font, 0.875rem/1.4 sans-serif);
|
|
249
|
-
color: var(--smrt-color-on-surface
|
|
251
|
+
color: var(--smrt-color-on-surface);
|
|
250
252
|
}
|
|
251
253
|
|
|
252
254
|
.file-upload__hint {
|
|
253
255
|
font: var(--smrt-typography-label-small-font, 500 0.6875rem/1 sans-serif);
|
|
254
|
-
color: var(--smrt-color-outline
|
|
256
|
+
color: var(--smrt-color-outline);
|
|
255
257
|
}
|
|
256
258
|
|
|
257
259
|
.file-upload__preview {
|
|
258
260
|
display: flex;
|
|
259
261
|
flex-direction: column;
|
|
260
|
-
gap: var(--smrt-spacing-1
|
|
261
|
-
padding: var(--smrt-spacing-2
|
|
262
|
-
background: var(--smrt-color-surface-container-low
|
|
263
|
-
border-radius: var(--smrt-radius-medium
|
|
264
|
-
border: 1px solid var(--smrt-color-outline-variant
|
|
262
|
+
gap: var(--smrt-spacing-1);
|
|
263
|
+
padding: var(--smrt-spacing-2);
|
|
264
|
+
background: var(--smrt-color-surface-container-low);
|
|
265
|
+
border-radius: var(--smrt-radius-medium);
|
|
266
|
+
border: 1px solid var(--smrt-color-outline-variant);
|
|
265
267
|
}
|
|
266
268
|
|
|
267
269
|
.file-upload__file {
|
|
268
270
|
display: flex;
|
|
269
271
|
align-items: center;
|
|
270
|
-
gap: var(--smrt-spacing-2
|
|
271
|
-
padding: var(--smrt-spacing-2
|
|
272
|
-
border-radius: var(--smrt-radius-small
|
|
273
|
-
background: var(--smrt-color-surface
|
|
272
|
+
gap: var(--smrt-spacing-2);
|
|
273
|
+
padding: var(--smrt-spacing-2);
|
|
274
|
+
border-radius: var(--smrt-radius-small);
|
|
275
|
+
background: var(--smrt-color-surface);
|
|
274
276
|
}
|
|
275
277
|
|
|
276
278
|
.file-upload__file-icon {
|
|
@@ -279,10 +281,10 @@ function getFileIcon(type: string): string {
|
|
|
279
281
|
justify-content: center;
|
|
280
282
|
width: 28px;
|
|
281
283
|
height: 28px;
|
|
282
|
-
border-radius: var(--smrt-radius-small
|
|
283
|
-
background: var(--smrt-color-surface-variant
|
|
284
|
+
border-radius: var(--smrt-radius-small);
|
|
285
|
+
background: var(--smrt-color-surface-variant);
|
|
284
286
|
font: var(--smrt-typography-label-small-font, 500 0.6875rem/1 sans-serif);
|
|
285
|
-
color: var(--smrt-color-on-surface-variant
|
|
287
|
+
color: var(--smrt-color-on-surface-variant);
|
|
286
288
|
text-transform: uppercase;
|
|
287
289
|
flex-shrink: 0;
|
|
288
290
|
}
|
|
@@ -291,13 +293,13 @@ function getFileIcon(type: string): string {
|
|
|
291
293
|
flex: 1;
|
|
292
294
|
display: flex;
|
|
293
295
|
flex-direction: column;
|
|
294
|
-
gap: var(--smrt-spacing-1
|
|
296
|
+
gap: var(--smrt-spacing-1);
|
|
295
297
|
min-width: 0;
|
|
296
298
|
}
|
|
297
299
|
|
|
298
300
|
.file-upload__file-name {
|
|
299
301
|
font: var(--smrt-typography-body-small-font, 0.8125rem/1.4 sans-serif);
|
|
300
|
-
color: var(--smrt-color-on-surface
|
|
302
|
+
color: var(--smrt-color-on-surface);
|
|
301
303
|
white-space: nowrap;
|
|
302
304
|
overflow: hidden;
|
|
303
305
|
text-overflow: ellipsis;
|
|
@@ -305,7 +307,7 @@ function getFileIcon(type: string): string {
|
|
|
305
307
|
|
|
306
308
|
.file-upload__file-size {
|
|
307
309
|
font: var(--smrt-typography-label-small-font, 500 0.6875rem/1 sans-serif);
|
|
308
|
-
color: var(--smrt-color-outline
|
|
310
|
+
color: var(--smrt-color-outline);
|
|
309
311
|
}
|
|
310
312
|
|
|
311
313
|
/* :global() pierces into the Button child's rendered <button> (see #1589). */
|
|
@@ -314,28 +316,28 @@ function getFileIcon(type: string): string {
|
|
|
314
316
|
height: 24px;
|
|
315
317
|
padding: 0;
|
|
316
318
|
background: none;
|
|
317
|
-
color: var(--smrt-color-on-surface-variant
|
|
318
|
-
border-radius: var(--smrt-radius-full
|
|
319
|
+
color: var(--smrt-color-on-surface-variant);
|
|
320
|
+
border-radius: var(--smrt-radius-full);
|
|
319
321
|
flex-shrink: 0;
|
|
320
322
|
transition: background var(--smrt-duration-short2, 150ms);
|
|
321
323
|
}
|
|
322
324
|
|
|
323
325
|
.file-upload__file :global(.file-upload__file-remove:hover) {
|
|
324
|
-
background: var(--smrt-color-error-container
|
|
325
|
-
color: var(--smrt-color-error
|
|
326
|
+
background: var(--smrt-color-error-container);
|
|
327
|
+
color: var(--smrt-color-error);
|
|
326
328
|
}
|
|
327
329
|
|
|
328
330
|
.file-upload__preview-actions {
|
|
329
331
|
display: flex;
|
|
330
|
-
gap: var(--smrt-spacing-2
|
|
331
|
-
padding-top: var(--smrt-spacing-1
|
|
332
|
+
gap: var(--smrt-spacing-2);
|
|
333
|
+
padding-top: var(--smrt-spacing-1);
|
|
332
334
|
}
|
|
333
335
|
|
|
334
336
|
.file-upload__error {
|
|
335
|
-
padding: var(--smrt-spacing-2
|
|
336
|
-
border-radius: var(--smrt-radius-small
|
|
337
|
-
background: var(--smrt-color-error-container
|
|
338
|
-
color: var(--smrt-color-on-error-container
|
|
337
|
+
padding: var(--smrt-spacing-2) var(--smrt-spacing-3);
|
|
338
|
+
border-radius: var(--smrt-radius-small);
|
|
339
|
+
background: var(--smrt-color-error-container);
|
|
340
|
+
color: var(--smrt-color-on-error-container);
|
|
339
341
|
font: var(--smrt-typography-body-small-font, 0.8125rem/1.4 sans-serif);
|
|
340
342
|
}
|
|
341
343
|
|
|
@@ -348,4 +350,5 @@ function getFileIcon(type: string): string {
|
|
|
348
350
|
transition: none;
|
|
349
351
|
}
|
|
350
352
|
}
|
|
353
|
+
}
|
|
351
354
|
</style>
|
|
@@ -26,7 +26,7 @@ const hostname = $derived.by(() => {
|
|
|
26
26
|
});
|
|
27
27
|
</script>
|
|
28
28
|
|
|
29
|
-
<a class="link-preview" href={url} target="_blank" rel="noopener noreferrer">
|
|
29
|
+
<a class="link-preview" href={url} target="_blank" rel="noopener noreferrer" data-smrt-component="LinkPreview">
|
|
30
30
|
{#if imageUrl}
|
|
31
31
|
<div class="link-preview__image">
|
|
32
32
|
<img src={imageUrl} alt={title ?? ''} />
|
|
@@ -44,9 +44,11 @@ const hostname = $derived.by(() => {
|
|
|
44
44
|
</a>
|
|
45
45
|
|
|
46
46
|
<style>
|
|
47
|
+
@layer smrt.reset, smrt.structure, smrt.theme;
|
|
48
|
+
@layer smrt.theme {
|
|
47
49
|
.link-preview {
|
|
48
50
|
display: flex;
|
|
49
|
-
border: 1px solid var(--smrt-color-outline-variant
|
|
51
|
+
border: 1px solid var(--smrt-color-outline-variant);
|
|
50
52
|
border-radius: var(--smrt-radius-medium, 0.5rem);
|
|
51
53
|
overflow: hidden;
|
|
52
54
|
text-decoration: none;
|
|
@@ -64,7 +66,7 @@ const hostname = $derived.by(() => {
|
|
|
64
66
|
min-height: 60px;
|
|
65
67
|
flex-shrink: 0;
|
|
66
68
|
overflow: hidden;
|
|
67
|
-
background: var(--smrt-color-surface-container
|
|
69
|
+
background: var(--smrt-color-surface-container);
|
|
68
70
|
}
|
|
69
71
|
|
|
70
72
|
.link-preview__image img {
|
|
@@ -85,7 +87,7 @@ const hostname = $derived.by(() => {
|
|
|
85
87
|
.link-preview__title {
|
|
86
88
|
font-size: var(--smrt-typography-body-medium-size, 0.875rem);
|
|
87
89
|
font-weight: var(--smrt-typography-weight-medium, 500);
|
|
88
|
-
color: var(--smrt-color-on-surface
|
|
90
|
+
color: var(--smrt-color-on-surface);
|
|
89
91
|
white-space: nowrap;
|
|
90
92
|
overflow: hidden;
|
|
91
93
|
text-overflow: ellipsis;
|
|
@@ -93,7 +95,7 @@ const hostname = $derived.by(() => {
|
|
|
93
95
|
|
|
94
96
|
.link-preview__description {
|
|
95
97
|
font-size: var(--smrt-typography-body-small-size, 0.75rem);
|
|
96
|
-
color: var(--smrt-color-on-surface-variant
|
|
98
|
+
color: var(--smrt-color-on-surface-variant);
|
|
97
99
|
display: -webkit-box;
|
|
98
100
|
-webkit-line-clamp: 2;
|
|
99
101
|
line-clamp: 2;
|
|
@@ -103,6 +105,7 @@ const hostname = $derived.by(() => {
|
|
|
103
105
|
|
|
104
106
|
.link-preview__domain {
|
|
105
107
|
font-size: var(--smrt-typography-label-small-size, 0.6875rem);
|
|
106
|
-
color: var(--smrt-color-outline
|
|
108
|
+
color: var(--smrt-color-outline);
|
|
107
109
|
}
|
|
110
|
+
}
|
|
108
111
|
</style>
|
|
@@ -80,7 +80,7 @@ function highlightMatch(
|
|
|
80
80
|
<div
|
|
81
81
|
class="mention-autocomplete"
|
|
82
82
|
role="listbox"
|
|
83
|
-
aria-label={t(M['chat.mention_autocomplete.suggestions'])}
|
|
83
|
+
aria-label={t(M['chat.mention_autocomplete.suggestions'])} data-smrt-component="MentionAutocomplete"
|
|
84
84
|
>
|
|
85
85
|
{#each suggestions as suggestion, i (suggestion.id)}
|
|
86
86
|
{@const parts = highlightMatch(suggestion.name, query)}
|
|
@@ -108,21 +108,23 @@ function highlightMatch(
|
|
|
108
108
|
{/if}
|
|
109
109
|
|
|
110
110
|
<style>
|
|
111
|
+
@layer smrt.reset, smrt.structure, smrt.theme;
|
|
112
|
+
@layer smrt.theme {
|
|
111
113
|
.mention-autocomplete {
|
|
112
114
|
position: absolute;
|
|
113
115
|
bottom: 100%;
|
|
114
116
|
left: 0;
|
|
115
|
-
margin-bottom: var(--smrt-spacing-1
|
|
117
|
+
margin-bottom: var(--smrt-spacing-1);
|
|
116
118
|
min-width: 200px;
|
|
117
119
|
max-width: 320px;
|
|
118
120
|
max-height: 240px;
|
|
119
121
|
overflow-y: auto;
|
|
120
|
-
background: var(--smrt-color-surface
|
|
121
|
-
border: 1px solid var(--smrt-color-outline-variant
|
|
122
|
-
border-radius: var(--smrt-radius-medium
|
|
122
|
+
background: var(--smrt-color-surface);
|
|
123
|
+
border: 1px solid var(--smrt-color-outline-variant);
|
|
124
|
+
border-radius: var(--smrt-radius-medium);
|
|
123
125
|
box-shadow: var(--smrt-elevation-2, 0 2px 8px rgba(0, 0, 0, 0.15));
|
|
124
126
|
z-index: var(--smrt-z-index-dropdown, 1000);
|
|
125
|
-
padding: var(--smrt-spacing-1
|
|
127
|
+
padding: var(--smrt-spacing-1);
|
|
126
128
|
display: flex;
|
|
127
129
|
flex-direction: column;
|
|
128
130
|
}
|
|
@@ -130,25 +132,25 @@ function highlightMatch(
|
|
|
130
132
|
.mention-autocomplete__item {
|
|
131
133
|
display: flex;
|
|
132
134
|
align-items: center;
|
|
133
|
-
gap: var(--smrt-spacing-2
|
|
135
|
+
gap: var(--smrt-spacing-2);
|
|
134
136
|
width: 100%;
|
|
135
|
-
padding: var(--smrt-spacing-2
|
|
137
|
+
padding: var(--smrt-spacing-2);
|
|
136
138
|
border: none;
|
|
137
139
|
background: transparent;
|
|
138
140
|
cursor: pointer;
|
|
139
141
|
text-align: left;
|
|
140
|
-
color: var(--smrt-color-on-surface
|
|
141
|
-
border-radius: var(--smrt-radius-small
|
|
142
|
+
color: var(--smrt-color-on-surface);
|
|
143
|
+
border-radius: var(--smrt-radius-small);
|
|
142
144
|
transition: background var(--smrt-duration-short2, 150ms);
|
|
143
145
|
}
|
|
144
146
|
|
|
145
147
|
.mention-autocomplete__item:hover,
|
|
146
148
|
.mention-autocomplete__item--active {
|
|
147
|
-
background: var(--smrt-color-surface-container-high
|
|
149
|
+
background: var(--smrt-color-surface-container-high);
|
|
148
150
|
}
|
|
149
151
|
|
|
150
152
|
.mention-autocomplete__item:focus-visible {
|
|
151
|
-
outline: 2px solid var(--smrt-color-primary
|
|
153
|
+
outline: 2px solid var(--smrt-color-primary);
|
|
152
154
|
outline-offset: -2px;
|
|
153
155
|
}
|
|
154
156
|
|
|
@@ -161,7 +163,7 @@ function highlightMatch(
|
|
|
161
163
|
|
|
162
164
|
.mention-autocomplete__highlight {
|
|
163
165
|
background: transparent;
|
|
164
|
-
color: var(--smrt-color-primary
|
|
166
|
+
color: var(--smrt-color-primary);
|
|
165
167
|
font-weight: var(--smrt-typography-weight-semibold, 600);
|
|
166
168
|
}
|
|
167
169
|
|
|
@@ -170,4 +172,5 @@ function highlightMatch(
|
|
|
170
172
|
transition: none;
|
|
171
173
|
}
|
|
172
174
|
}
|
|
175
|
+
}
|
|
173
176
|
</style>
|
|
@@ -25,7 +25,7 @@ function getInitial(name: string): string {
|
|
|
25
25
|
}
|
|
26
26
|
</script>
|
|
27
27
|
|
|
28
|
-
<span class="read-receipts" aria-label={t(M['chat.read_receipts.read_status'], { readCount: readBy.length, total: totalParticipants })}>
|
|
28
|
+
<span class="read-receipts" aria-label={t(M['chat.read_receipts.read_status'], { readCount: readBy.length, total: totalParticipants })} data-smrt-component="ReadReceipts">
|
|
29
29
|
{#if readBy.length === 0}
|
|
30
30
|
<!-- Single check: sent -->
|
|
31
31
|
<svg class="read-receipts__icon" viewBox="0 0 16 16" width="14" height="14" aria-hidden="true">
|
|
@@ -66,11 +66,13 @@ function getInitial(name: string): string {
|
|
|
66
66
|
</span>
|
|
67
67
|
|
|
68
68
|
<style>
|
|
69
|
+
@layer smrt.reset, smrt.structure, smrt.theme;
|
|
70
|
+
@layer smrt.theme {
|
|
69
71
|
.read-receipts {
|
|
70
72
|
display: inline-flex;
|
|
71
73
|
align-items: center;
|
|
72
74
|
gap: var(--smrt-spacing-1, 0.25rem);
|
|
73
|
-
color: var(--smrt-color-outline
|
|
75
|
+
color: var(--smrt-color-outline);
|
|
74
76
|
}
|
|
75
77
|
|
|
76
78
|
.read-receipts__icon {
|
|
@@ -78,12 +80,12 @@ function getInitial(name: string): string {
|
|
|
78
80
|
}
|
|
79
81
|
|
|
80
82
|
.read-receipts__icon--read {
|
|
81
|
-
color: var(--smrt-color-primary
|
|
83
|
+
color: var(--smrt-color-primary);
|
|
82
84
|
}
|
|
83
85
|
|
|
84
86
|
.read-receipts__count {
|
|
85
87
|
font-size: var(--smrt-typography-label-small-size, 0.625rem);
|
|
86
|
-
color: var(--smrt-color-on-surface-variant
|
|
88
|
+
color: var(--smrt-color-on-surface-variant);
|
|
87
89
|
}
|
|
88
90
|
|
|
89
91
|
.read-receipts__avatars {
|
|
@@ -94,8 +96,8 @@ function getInitial(name: string): string {
|
|
|
94
96
|
.read-receipts__mini-avatar {
|
|
95
97
|
width: 16px;
|
|
96
98
|
height: 16px;
|
|
97
|
-
border-radius: var(--smrt-radius-full
|
|
98
|
-
border: 1px solid var(--smrt-color-surface
|
|
99
|
+
border-radius: var(--smrt-radius-full);
|
|
100
|
+
border: 1px solid var(--smrt-color-surface);
|
|
99
101
|
margin-left: -4px;
|
|
100
102
|
object-fit: cover;
|
|
101
103
|
flex-shrink: 0;
|
|
@@ -109,8 +111,8 @@ function getInitial(name: string): string {
|
|
|
109
111
|
display: inline-flex;
|
|
110
112
|
align-items: center;
|
|
111
113
|
justify-content: center;
|
|
112
|
-
background: var(--smrt-color-surface-container-high
|
|
113
|
-
color: var(--smrt-color-on-surface-variant
|
|
114
|
+
background: var(--smrt-color-surface-container-high);
|
|
115
|
+
color: var(--smrt-color-on-surface-variant);
|
|
114
116
|
font-size: var(--smrt-typography-label-small-size, 0.5rem);
|
|
115
117
|
font-weight: var(--smrt-typography-weight-medium, 500);
|
|
116
118
|
}
|
|
@@ -119,9 +121,10 @@ function getInitial(name: string): string {
|
|
|
119
121
|
display: inline-flex;
|
|
120
122
|
align-items: center;
|
|
121
123
|
justify-content: center;
|
|
122
|
-
background: var(--smrt-color-surface-container
|
|
123
|
-
color: var(--smrt-color-on-surface-variant
|
|
124
|
+
background: var(--smrt-color-surface-container);
|
|
125
|
+
color: var(--smrt-color-on-surface-variant);
|
|
124
126
|
font-size: var(--smrt-typography-label-small-size, 0.5rem);
|
|
125
127
|
font-weight: var(--smrt-typography-weight-medium, 500);
|
|
126
128
|
}
|
|
129
|
+
}
|
|
127
130
|
</style>
|
|
@@ -20,7 +20,7 @@ const labelText: Record<string, string> = {
|
|
|
20
20
|
};
|
|
21
21
|
</script>
|
|
22
22
|
|
|
23
|
-
<span class="presence" aria-label={labelText[status]}>
|
|
23
|
+
<span class="presence" aria-label={labelText[status]} data-smrt-component="UserPresence">
|
|
24
24
|
<span class="presence__dot {status}"></span>
|
|
25
25
|
{#if showLabel}
|
|
26
26
|
<span class="presence__label">{labelText[status]}</span>
|
|
@@ -28,6 +28,8 @@ const labelText: Record<string, string> = {
|
|
|
28
28
|
</span>
|
|
29
29
|
|
|
30
30
|
<style>
|
|
31
|
+
@layer smrt.reset, smrt.structure, smrt.theme;
|
|
32
|
+
@layer smrt.theme {
|
|
31
33
|
.presence {
|
|
32
34
|
display: inline-flex;
|
|
33
35
|
align-items: center;
|
|
@@ -37,29 +39,30 @@ const labelText: Record<string, string> = {
|
|
|
37
39
|
.presence__dot {
|
|
38
40
|
width: 8px;
|
|
39
41
|
height: 8px;
|
|
40
|
-
border-radius: var(--smrt-radius-full
|
|
42
|
+
border-radius: var(--smrt-radius-full);
|
|
41
43
|
flex-shrink: 0;
|
|
42
44
|
}
|
|
43
45
|
|
|
44
46
|
.presence__dot.online {
|
|
45
|
-
background: var(--smrt-color-success
|
|
47
|
+
background: var(--smrt-color-success);
|
|
46
48
|
}
|
|
47
49
|
|
|
48
50
|
.presence__dot.away {
|
|
49
|
-
background: var(--smrt-color-warning
|
|
51
|
+
background: var(--smrt-color-warning);
|
|
50
52
|
}
|
|
51
53
|
|
|
52
54
|
.presence__dot.dnd {
|
|
53
|
-
background: var(--smrt-color-error
|
|
55
|
+
background: var(--smrt-color-error);
|
|
54
56
|
}
|
|
55
57
|
|
|
56
58
|
.presence__dot.offline {
|
|
57
|
-
background: var(--smrt-color-outline
|
|
59
|
+
background: var(--smrt-color-outline);
|
|
58
60
|
}
|
|
59
61
|
|
|
60
62
|
.presence__label {
|
|
61
63
|
font-size: var(--smrt-typography-body-small-size, 0.75rem);
|
|
62
|
-
color: var(--smrt-color-on-surface-variant
|
|
64
|
+
color: var(--smrt-color-on-surface-variant);
|
|
63
65
|
line-height: 1;
|
|
64
66
|
}
|
|
67
|
+
}
|
|
65
68
|
</style>
|
|
@@ -42,7 +42,7 @@ const {
|
|
|
42
42
|
</script>
|
|
43
43
|
|
|
44
44
|
{#if tab.isExpanded}
|
|
45
|
-
<div class="chat-tab chat-tab--expanded" aria-label={t(M['chat.chat_tab.chat_with'], { name: tab.room.name })}>
|
|
45
|
+
<div class="chat-tab chat-tab--expanded" aria-label={t(M['chat.chat_tab.chat_with'], { name: tab.room.name })} data-smrt-component="ChatTab">
|
|
46
46
|
<div class="chat-tab__header">
|
|
47
47
|
<!-- raw-primitive-allow: pressable header title wrapping rich content (room avatar component and name) that collapses the chat window on click; no Button primitive owns this structural avatar-header pattern -->
|
|
48
48
|
<button
|
|
@@ -104,7 +104,7 @@ const {
|
|
|
104
104
|
class="chat-tab chat-tab--collapsed"
|
|
105
105
|
type="button"
|
|
106
106
|
onclick={onexpand}
|
|
107
|
-
aria-label={t(M['chat.chat_tab.open_chat_with'], { name: tab.room.name })}
|
|
107
|
+
aria-label={t(M['chat.chat_tab.open_chat_with'], { name: tab.room.name })} data-smrt-component="ChatTab"
|
|
108
108
|
>
|
|
109
109
|
<Avatar
|
|
110
110
|
name={tab.room.name}
|
|
@@ -119,12 +119,14 @@ const {
|
|
|
119
119
|
{/if}
|
|
120
120
|
|
|
121
121
|
<style>
|
|
122
|
+
@layer smrt.reset, smrt.structure, smrt.theme;
|
|
123
|
+
@layer smrt.theme {
|
|
122
124
|
.chat-tab--expanded {
|
|
123
125
|
display: flex;
|
|
124
126
|
flex-direction: column;
|
|
125
127
|
width: 328px;
|
|
126
|
-
background: var(--smrt-color-surface
|
|
127
|
-
border-radius: var(--smrt-radius-large
|
|
128
|
+
background: var(--smrt-color-surface);
|
|
129
|
+
border-radius: var(--smrt-radius-large) var(--smrt-radius-large) 0 0;
|
|
128
130
|
box-shadow: var(--smrt-elevation-3, 0 4px 8px rgba(0, 0, 0, 0.15));
|
|
129
131
|
overflow: hidden;
|
|
130
132
|
}
|
|
@@ -133,16 +135,16 @@ const {
|
|
|
133
135
|
display: flex;
|
|
134
136
|
align-items: center;
|
|
135
137
|
justify-content: space-between;
|
|
136
|
-
padding: var(--smrt-spacing-2
|
|
137
|
-
background: var(--smrt-color-primary
|
|
138
|
-
color: var(--smrt-color-on-primary
|
|
138
|
+
padding: var(--smrt-spacing-2) var(--smrt-spacing-3);
|
|
139
|
+
background: var(--smrt-color-primary);
|
|
140
|
+
color: var(--smrt-color-on-primary);
|
|
139
141
|
min-height: 44px;
|
|
140
142
|
}
|
|
141
143
|
|
|
142
144
|
.chat-tab__header-btn {
|
|
143
145
|
display: flex;
|
|
144
146
|
align-items: center;
|
|
145
|
-
gap: var(--smrt-spacing-2
|
|
147
|
+
gap: var(--smrt-spacing-2);
|
|
146
148
|
background: none;
|
|
147
149
|
border: none;
|
|
148
150
|
color: inherit;
|
|
@@ -152,9 +154,9 @@ const {
|
|
|
152
154
|
}
|
|
153
155
|
|
|
154
156
|
.chat-tab__header-btn:focus-visible {
|
|
155
|
-
outline: 2px solid var(--smrt-color-on-primary
|
|
157
|
+
outline: 2px solid var(--smrt-color-on-primary);
|
|
156
158
|
outline-offset: 2px;
|
|
157
|
-
border-radius: var(--smrt-radius-small
|
|
159
|
+
border-radius: var(--smrt-radius-small);
|
|
158
160
|
}
|
|
159
161
|
|
|
160
162
|
.chat-tab__name {
|
|
@@ -167,7 +169,7 @@ const {
|
|
|
167
169
|
.chat-tab__actions {
|
|
168
170
|
display: flex;
|
|
169
171
|
align-items: center;
|
|
170
|
-
gap: var(--smrt-spacing-1
|
|
172
|
+
gap: var(--smrt-spacing-1);
|
|
171
173
|
flex-shrink: 0;
|
|
172
174
|
}
|
|
173
175
|
|
|
@@ -178,7 +180,7 @@ const {
|
|
|
178
180
|
padding: 0;
|
|
179
181
|
background: none;
|
|
180
182
|
color: inherit;
|
|
181
|
-
border-radius: var(--smrt-radius-full
|
|
183
|
+
border-radius: var(--smrt-radius-full);
|
|
182
184
|
transition: background var(--smrt-duration-short2, 150ms);
|
|
183
185
|
}
|
|
184
186
|
|
|
@@ -194,24 +196,24 @@ const {
|
|
|
194
196
|
.chat-tab--collapsed {
|
|
195
197
|
display: flex;
|
|
196
198
|
align-items: center;
|
|
197
|
-
gap: var(--smrt-spacing-2
|
|
198
|
-
padding: var(--smrt-spacing-2
|
|
199
|
-
background: var(--smrt-color-surface-container
|
|
199
|
+
gap: var(--smrt-spacing-2);
|
|
200
|
+
padding: var(--smrt-spacing-2) var(--smrt-spacing-3);
|
|
201
|
+
background: var(--smrt-color-surface-container);
|
|
200
202
|
border: none;
|
|
201
|
-
border-radius: var(--smrt-radius-large
|
|
203
|
+
border-radius: var(--smrt-radius-large) var(--smrt-radius-large) 0 0;
|
|
202
204
|
cursor: pointer;
|
|
203
205
|
box-shadow: var(--smrt-elevation-2, 0 2px 6px rgba(0, 0, 0, 0.1));
|
|
204
|
-
color: var(--smrt-color-on-surface
|
|
206
|
+
color: var(--smrt-color-on-surface);
|
|
205
207
|
transition: background var(--smrt-duration-short2, 150ms);
|
|
206
208
|
white-space: nowrap;
|
|
207
209
|
}
|
|
208
210
|
|
|
209
211
|
.chat-tab--collapsed:hover {
|
|
210
|
-
background: var(--smrt-color-surface-container-high
|
|
212
|
+
background: var(--smrt-color-surface-container-high);
|
|
211
213
|
}
|
|
212
214
|
|
|
213
215
|
.chat-tab--collapsed:focus-visible {
|
|
214
|
-
outline: 2px solid var(--smrt-color-primary
|
|
216
|
+
outline: 2px solid var(--smrt-color-primary);
|
|
215
217
|
outline-offset: -2px;
|
|
216
218
|
}
|
|
217
219
|
|
|
@@ -221,10 +223,10 @@ const {
|
|
|
221
223
|
justify-content: center;
|
|
222
224
|
min-width: 18px;
|
|
223
225
|
height: 18px;
|
|
224
|
-
padding: 0 var(--smrt-spacing-1
|
|
225
|
-
border-radius: var(--smrt-radius-full
|
|
226
|
-
background: var(--smrt-color-error
|
|
227
|
-
color: var(--smrt-color-on-error
|
|
226
|
+
padding: 0 var(--smrt-spacing-1);
|
|
227
|
+
border-radius: var(--smrt-radius-full);
|
|
228
|
+
background: var(--smrt-color-error);
|
|
229
|
+
color: var(--smrt-color-on-error);
|
|
228
230
|
font-size: var(--smrt-typography-label-small-size, 0.6875rem);
|
|
229
231
|
font-weight: var(--smrt-typography-weight-semibold, 600);
|
|
230
232
|
line-height: 1;
|
|
@@ -239,4 +241,5 @@ const {
|
|
|
239
241
|
transition: none;
|
|
240
242
|
}
|
|
241
243
|
}
|
|
244
|
+
}
|
|
242
245
|
</style>
|