@yushaw/sanqian-chat 0.1.1 → 0.2.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +116 -0
- package/dist/core/index.d.mts +180 -6
- package/dist/core/index.d.ts +180 -6
- package/dist/core/index.js +548 -64
- package/dist/core/index.mjs +534 -63
- package/dist/main/index.d.mts +320 -5
- package/dist/main/index.d.ts +320 -5
- package/dist/main/index.js +466 -39
- package/dist/main/index.mjs +454 -38
- package/dist/preload/index.d.ts +88 -0
- package/dist/preload/index.js +5 -1
- package/dist/renderer/index.d.mts +609 -18
- package/dist/renderer/index.d.ts +609 -18
- package/dist/renderer/index.js +7870 -537
- package/dist/renderer/index.mjs +7854 -538
- package/package.json +16 -4
- package/src/renderer/styles/baseStyles.ts +74 -0
- package/src/renderer/styles/chat.css +3674 -0
- package/src/renderer/styles/chatCss.ts +11 -0
- package/src/renderer/styles/coreCss.ts +3237 -0
- package/src/renderer/styles/preflightCss.ts +454 -0
- package/src/renderer/styles/safe.css +3227 -0
- package/src/renderer/styles/safeCss.ts +10 -0
- package/src/renderer/styles/tailwind.css +683 -0
- package/src/renderer/styles/variables.css +704 -0
|
@@ -0,0 +1,704 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @yushaw/sanqian-chat CSS Variables
|
|
3
|
+
*
|
|
4
|
+
* Design tokens for chat UI theming.
|
|
5
|
+
* Based on Sanqian Notes design system for consistency.
|
|
6
|
+
*
|
|
7
|
+
* Usage in Tailwind:
|
|
8
|
+
* - bg-chat-bg, text-chat-text, border-chat-border, etc.
|
|
9
|
+
*/
|
|
10
|
+
|
|
11
|
+
/* ========================================
|
|
12
|
+
Code Font
|
|
13
|
+
======================================== */
|
|
14
|
+
code {
|
|
15
|
+
font-family: 'Iosevka Mono', ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, 'Liberation Mono', 'Courier New', monospace;
|
|
16
|
+
}
|
|
17
|
+
|
|
18
|
+
:root {
|
|
19
|
+
/* ========================================
|
|
20
|
+
Background Colors
|
|
21
|
+
======================================== */
|
|
22
|
+
--chat-bg: #f5f5f7;
|
|
23
|
+
--chat-surface: #fbfbfd;
|
|
24
|
+
--chat-card: #ffffff;
|
|
25
|
+
|
|
26
|
+
/* ========================================
|
|
27
|
+
Border Colors
|
|
28
|
+
======================================== */
|
|
29
|
+
--chat-border: #e5e5ea;
|
|
30
|
+
--chat-divider: #e5e5ea;
|
|
31
|
+
--chat-border-focus: rgba(0, 0, 0, 0.12);
|
|
32
|
+
--chat-hover: rgba(0, 0, 0, 0.05);
|
|
33
|
+
|
|
34
|
+
/* ========================================
|
|
35
|
+
Text Colors
|
|
36
|
+
======================================== */
|
|
37
|
+
--chat-text: #1d1d1f;
|
|
38
|
+
--chat-muted: #6e6e73;
|
|
39
|
+
|
|
40
|
+
/* ========================================
|
|
41
|
+
Accent Colors
|
|
42
|
+
======================================== */
|
|
43
|
+
--chat-accent: #e85d75;
|
|
44
|
+
--chat-accent-soft: #fad0da;
|
|
45
|
+
--chat-selection: #fbe7ec;
|
|
46
|
+
|
|
47
|
+
/* ========================================
|
|
48
|
+
Status Colors
|
|
49
|
+
======================================== */
|
|
50
|
+
--chat-success: #34c759;
|
|
51
|
+
--chat-error: #ff3b30;
|
|
52
|
+
--chat-warning: #ff9500;
|
|
53
|
+
--chat-info: #007aff;
|
|
54
|
+
|
|
55
|
+
/* ========================================
|
|
56
|
+
Shadows
|
|
57
|
+
======================================== */
|
|
58
|
+
--chat-shadow-soft: 0 4px 16px rgba(15, 23, 42, 0.05), 0 1px 4px rgba(15, 23, 42, 0.03);
|
|
59
|
+
--chat-shadow-elevated: 0 10px 26px rgba(15, 23, 42, 0.08), 0 4px 12px rgba(15, 23, 42, 0.06);
|
|
60
|
+
|
|
61
|
+
/* ========================================
|
|
62
|
+
Scrollbar
|
|
63
|
+
======================================== */
|
|
64
|
+
--chat-scrollbar: rgba(0, 0, 0, 0.18);
|
|
65
|
+
|
|
66
|
+
/* ========================================
|
|
67
|
+
Message Bubbles
|
|
68
|
+
======================================== */
|
|
69
|
+
--chat-bubble-user: #3b82f6;
|
|
70
|
+
--chat-bubble-user-text: #ffffff;
|
|
71
|
+
--chat-bubble-assistant: var(--chat-surface);
|
|
72
|
+
--chat-bubble-assistant-text: var(--chat-text);
|
|
73
|
+
|
|
74
|
+
/* ========================================
|
|
75
|
+
Code Blocks
|
|
76
|
+
======================================== */
|
|
77
|
+
--chat-code-bg: rgba(0, 0, 0, 0.03);
|
|
78
|
+
--chat-code-border: var(--chat-border);
|
|
79
|
+
|
|
80
|
+
/* ========================================
|
|
81
|
+
Sanqian Aliases (for shared prose styles)
|
|
82
|
+
======================================== */
|
|
83
|
+
--color-bg: var(--chat-bg);
|
|
84
|
+
--color-card: var(--chat-card);
|
|
85
|
+
--color-card-solid: var(--chat-card);
|
|
86
|
+
--color-surface: var(--chat-surface);
|
|
87
|
+
--color-border: var(--chat-border);
|
|
88
|
+
--color-divider: var(--chat-divider);
|
|
89
|
+
--color-selection: var(--chat-selection);
|
|
90
|
+
--color-accent: var(--chat-accent);
|
|
91
|
+
--color-accent-soft: var(--chat-accent-soft);
|
|
92
|
+
--color-text: var(--chat-text);
|
|
93
|
+
--color-muted: var(--chat-muted);
|
|
94
|
+
--shadow-soft: var(--chat-shadow-soft);
|
|
95
|
+
--shadow-elevated: var(--chat-shadow-elevated);
|
|
96
|
+
}
|
|
97
|
+
|
|
98
|
+
/* ========================================
|
|
99
|
+
Dark Mode
|
|
100
|
+
======================================== */
|
|
101
|
+
.dark,
|
|
102
|
+
:root.dark {
|
|
103
|
+
--chat-bg: #1a1a1a;
|
|
104
|
+
--chat-surface: #2d2d2d;
|
|
105
|
+
--chat-card: #242424;
|
|
106
|
+
|
|
107
|
+
--chat-border: #333333;
|
|
108
|
+
--chat-divider: #333333;
|
|
109
|
+
--chat-border-focus: rgba(255, 255, 255, 0.12);
|
|
110
|
+
--chat-hover: rgba(255, 255, 255, 0.08);
|
|
111
|
+
|
|
112
|
+
--chat-text: #ffffff;
|
|
113
|
+
--chat-muted: #aeaeb2;
|
|
114
|
+
|
|
115
|
+
--chat-accent: #e85d75;
|
|
116
|
+
--chat-accent-soft: #4a2a32;
|
|
117
|
+
--chat-selection: #3a2028;
|
|
118
|
+
|
|
119
|
+
--chat-shadow-soft: 0 4px 16px rgba(0, 0, 0, 0.2), 0 1px 4px rgba(0, 0, 0, 0.1);
|
|
120
|
+
--chat-shadow-elevated: 0 10px 26px rgba(0, 0, 0, 0.3), 0 4px 12px rgba(0, 0, 0, 0.2);
|
|
121
|
+
|
|
122
|
+
--chat-scrollbar: rgba(255, 255, 255, 0.18);
|
|
123
|
+
|
|
124
|
+
--chat-bubble-user: #3b82f6;
|
|
125
|
+
--chat-bubble-user-text: #ffffff;
|
|
126
|
+
--chat-bubble-assistant: var(--chat-surface);
|
|
127
|
+
--chat-bubble-assistant-text: var(--chat-text);
|
|
128
|
+
|
|
129
|
+
--chat-code-bg: rgba(255, 255, 255, 0.05);
|
|
130
|
+
--chat-code-border: var(--chat-border);
|
|
131
|
+
}
|
|
132
|
+
|
|
133
|
+
/* ========================================
|
|
134
|
+
Scrollbar Styling
|
|
135
|
+
======================================== */
|
|
136
|
+
.chat-scrollbar {
|
|
137
|
+
scrollbar-width: thin;
|
|
138
|
+
scrollbar-color: transparent transparent;
|
|
139
|
+
}
|
|
140
|
+
|
|
141
|
+
.chat-scrollbar:hover {
|
|
142
|
+
scrollbar-color: var(--chat-scrollbar) transparent;
|
|
143
|
+
}
|
|
144
|
+
|
|
145
|
+
.chat-scrollbar::-webkit-scrollbar {
|
|
146
|
+
width: 6px;
|
|
147
|
+
height: 6px;
|
|
148
|
+
}
|
|
149
|
+
|
|
150
|
+
.chat-scrollbar::-webkit-scrollbar-track {
|
|
151
|
+
background: transparent;
|
|
152
|
+
}
|
|
153
|
+
|
|
154
|
+
.chat-scrollbar::-webkit-scrollbar-thumb {
|
|
155
|
+
background: transparent;
|
|
156
|
+
border-radius: 3px;
|
|
157
|
+
}
|
|
158
|
+
|
|
159
|
+
.chat-scrollbar:hover::-webkit-scrollbar-thumb {
|
|
160
|
+
background: var(--chat-scrollbar);
|
|
161
|
+
}
|
|
162
|
+
|
|
163
|
+
/* ========================================
|
|
164
|
+
Animations
|
|
165
|
+
======================================== */
|
|
166
|
+
@keyframes chat-cursor-blink {
|
|
167
|
+
0%, 49% { opacity: 1; }
|
|
168
|
+
50%, 100% { opacity: 0; }
|
|
169
|
+
}
|
|
170
|
+
|
|
171
|
+
@keyframes chat-cursor-breathing {
|
|
172
|
+
0%, 100% { opacity: 1; }
|
|
173
|
+
50% { opacity: 0.4; }
|
|
174
|
+
}
|
|
175
|
+
|
|
176
|
+
.chat-cursor-blink {
|
|
177
|
+
animation: chat-cursor-blink 1s step-end infinite;
|
|
178
|
+
}
|
|
179
|
+
|
|
180
|
+
.chat-cursor-breathing {
|
|
181
|
+
animation: chat-cursor-breathing 1s ease-in-out infinite;
|
|
182
|
+
}
|
|
183
|
+
|
|
184
|
+
@keyframes chat-fade-in {
|
|
185
|
+
from { opacity: 0; transform: translateY(4px); }
|
|
186
|
+
to { opacity: 1; transform: translateY(0); }
|
|
187
|
+
}
|
|
188
|
+
|
|
189
|
+
.chat-fade-in {
|
|
190
|
+
animation: chat-fade-in 0.2s ease-out;
|
|
191
|
+
}
|
|
192
|
+
|
|
193
|
+
/* ========================================
|
|
194
|
+
Prose Overrides
|
|
195
|
+
======================================== */
|
|
196
|
+
.prose {
|
|
197
|
+
--tw-prose-body: currentColor !important;
|
|
198
|
+
--tw-prose-headings: currentColor !important;
|
|
199
|
+
--tw-prose-lead: currentColor !important;
|
|
200
|
+
--tw-prose-links: var(--chat-accent) !important;
|
|
201
|
+
--tw-prose-bold: currentColor !important;
|
|
202
|
+
--tw-prose-counters: var(--chat-muted) !important;
|
|
203
|
+
--tw-prose-bullets: var(--chat-muted) !important;
|
|
204
|
+
--tw-prose-hr: var(--chat-divider) !important;
|
|
205
|
+
--tw-prose-quotes: var(--chat-muted) !important;
|
|
206
|
+
--tw-prose-quote-borders: var(--chat-accent) !important;
|
|
207
|
+
--tw-prose-captions: var(--chat-muted) !important;
|
|
208
|
+
--tw-prose-code: currentColor !important;
|
|
209
|
+
--tw-prose-pre-code: currentColor !important;
|
|
210
|
+
--tw-prose-pre-bg: var(--chat-code-bg) !important;
|
|
211
|
+
--tw-prose-th-borders: var(--chat-divider) !important;
|
|
212
|
+
--tw-prose-td-borders: var(--chat-divider) !important;
|
|
213
|
+
}
|
|
214
|
+
|
|
215
|
+
/* Override streamdown's default space-y-4 for compact layout */
|
|
216
|
+
.prose .space-y-4 > * + * {
|
|
217
|
+
margin-top: 0.25rem !important;
|
|
218
|
+
}
|
|
219
|
+
|
|
220
|
+
.prose .space-y-4 {
|
|
221
|
+
--tw-space-y-reverse: 0 !important;
|
|
222
|
+
}
|
|
223
|
+
|
|
224
|
+
/* Force list bullets to display */
|
|
225
|
+
.prose ul {
|
|
226
|
+
list-style-type: disc !important;
|
|
227
|
+
padding-left: 1.25rem !important;
|
|
228
|
+
}
|
|
229
|
+
|
|
230
|
+
.prose ol {
|
|
231
|
+
list-style-type: decimal !important;
|
|
232
|
+
padding-left: 1.25rem !important;
|
|
233
|
+
}
|
|
234
|
+
|
|
235
|
+
.prose li {
|
|
236
|
+
display: list-item !important;
|
|
237
|
+
margin-top: 0 !important;
|
|
238
|
+
margin-bottom: 0 !important;
|
|
239
|
+
padding-top: 0 !important;
|
|
240
|
+
padding-bottom: 0 !important;
|
|
241
|
+
}
|
|
242
|
+
|
|
243
|
+
/* ========================================
|
|
244
|
+
Markdown Layout Parity (Sanqian)
|
|
245
|
+
======================================== */
|
|
246
|
+
.prose :is(p, li, h1, h2, h3, h4, h5, h6):last-child {
|
|
247
|
+
color: inherit;
|
|
248
|
+
}
|
|
249
|
+
|
|
250
|
+
.prose p:has(img:nth-child(2)) {
|
|
251
|
+
display: flex;
|
|
252
|
+
flex-wrap: wrap;
|
|
253
|
+
gap: 0.5rem;
|
|
254
|
+
}
|
|
255
|
+
|
|
256
|
+
.prose p:has(img:nth-child(2)) img {
|
|
257
|
+
max-width: calc(50% - 0.25rem);
|
|
258
|
+
height: auto;
|
|
259
|
+
object-fit: cover;
|
|
260
|
+
cursor: pointer;
|
|
261
|
+
}
|
|
262
|
+
|
|
263
|
+
.prose p:has(img:nth-child(3)) img {
|
|
264
|
+
max-width: calc(33.333% - 0.333rem);
|
|
265
|
+
}
|
|
266
|
+
|
|
267
|
+
/* ========================================
|
|
268
|
+
Streamdown Code Block (Sanqian)
|
|
269
|
+
======================================== */
|
|
270
|
+
[data-streamdown="code-block"] {
|
|
271
|
+
position: relative;
|
|
272
|
+
border: none !important;
|
|
273
|
+
border-radius: 6px !important;
|
|
274
|
+
overflow: visible !important;
|
|
275
|
+
background: transparent !important;
|
|
276
|
+
margin: 6px 0 !important;
|
|
277
|
+
}
|
|
278
|
+
|
|
279
|
+
[data-streamdown="code-block-header"] {
|
|
280
|
+
position: absolute !important;
|
|
281
|
+
top: 14px !important;
|
|
282
|
+
right: 8px !important;
|
|
283
|
+
z-index: 10;
|
|
284
|
+
padding: 0 !important;
|
|
285
|
+
background: transparent !important;
|
|
286
|
+
border: none !important;
|
|
287
|
+
opacity: 0;
|
|
288
|
+
transition: opacity 150ms ease;
|
|
289
|
+
}
|
|
290
|
+
|
|
291
|
+
[data-streamdown="code-block"]:hover [data-streamdown="code-block-header"] {
|
|
292
|
+
opacity: 1;
|
|
293
|
+
}
|
|
294
|
+
|
|
295
|
+
[data-streamdown="code-block-header"] > span:first-child {
|
|
296
|
+
font-size: 11px;
|
|
297
|
+
color: var(--color-muted);
|
|
298
|
+
text-transform: lowercase;
|
|
299
|
+
margin-right: 8px;
|
|
300
|
+
}
|
|
301
|
+
|
|
302
|
+
[data-streamdown="code-block-header"] > div {
|
|
303
|
+
display: flex;
|
|
304
|
+
gap: 4px;
|
|
305
|
+
}
|
|
306
|
+
|
|
307
|
+
[data-streamdown="code-block-header"] button {
|
|
308
|
+
padding: 4px !important;
|
|
309
|
+
border-radius: 4px !important;
|
|
310
|
+
background: var(--color-surface) !important;
|
|
311
|
+
opacity: 0.7;
|
|
312
|
+
}
|
|
313
|
+
|
|
314
|
+
[data-streamdown="code-block-header"] button:hover {
|
|
315
|
+
opacity: 1;
|
|
316
|
+
background: var(--color-border) !important;
|
|
317
|
+
}
|
|
318
|
+
|
|
319
|
+
[data-streamdown="code-block-header"] svg {
|
|
320
|
+
color: var(--color-muted) !important;
|
|
321
|
+
width: 12px !important;
|
|
322
|
+
height: 12px !important;
|
|
323
|
+
}
|
|
324
|
+
|
|
325
|
+
[data-streamdown="code-block-header"] button:hover svg {
|
|
326
|
+
color: var(--color-text) !important;
|
|
327
|
+
}
|
|
328
|
+
|
|
329
|
+
[data-streamdown="code-block-body"] {
|
|
330
|
+
padding: 8px 12px !important;
|
|
331
|
+
background: rgba(0, 0, 0, 0.02) !important;
|
|
332
|
+
border-radius: 6px !important;
|
|
333
|
+
font-size: 13px !important;
|
|
334
|
+
line-height: 1.5 !important;
|
|
335
|
+
white-space: pre !important;
|
|
336
|
+
overflow-x: auto !important;
|
|
337
|
+
}
|
|
338
|
+
|
|
339
|
+
[data-streamdown="code-block-body"] code {
|
|
340
|
+
white-space: pre !important;
|
|
341
|
+
display: block !important;
|
|
342
|
+
}
|
|
343
|
+
|
|
344
|
+
.dark [data-streamdown="code-block-body"],
|
|
345
|
+
:root.dark [data-streamdown="code-block-body"] {
|
|
346
|
+
background: rgba(255, 255, 255, 0.03) !important;
|
|
347
|
+
}
|
|
348
|
+
|
|
349
|
+
[data-streamdown="code-block-body"] code span::before {
|
|
350
|
+
display: none !important;
|
|
351
|
+
}
|
|
352
|
+
|
|
353
|
+
[data-streamdown="code-block-body"],
|
|
354
|
+
[data-streamdown="code-block-body"] code {
|
|
355
|
+
color: var(--color-text) !important;
|
|
356
|
+
opacity: 0.85;
|
|
357
|
+
}
|
|
358
|
+
|
|
359
|
+
[data-streamdown="code-block-body"] code span[style] {
|
|
360
|
+
background-color: transparent !important;
|
|
361
|
+
}
|
|
362
|
+
|
|
363
|
+
.dark [data-streamdown="code-block-body"] code span[style],
|
|
364
|
+
:root.dark [data-streamdown="code-block-body"] code span[style] {
|
|
365
|
+
color: var(--shiki-dark) !important;
|
|
366
|
+
}
|
|
367
|
+
|
|
368
|
+
/* ========================================
|
|
369
|
+
Streamdown Table (Sanqian)
|
|
370
|
+
======================================== */
|
|
371
|
+
[data-streamdown="table-wrapper"].my-4 {
|
|
372
|
+
position: relative !important;
|
|
373
|
+
margin: 0 !important;
|
|
374
|
+
gap: 0 !important;
|
|
375
|
+
}
|
|
376
|
+
|
|
377
|
+
[data-streamdown="table-wrapper"].my-4 > .flex.items-center.justify-end.gap-1 {
|
|
378
|
+
position: absolute !important;
|
|
379
|
+
top: -8px !important;
|
|
380
|
+
right: 4px !important;
|
|
381
|
+
z-index: 10;
|
|
382
|
+
opacity: 0 !important;
|
|
383
|
+
transition: opacity 150ms ease;
|
|
384
|
+
margin: 0 !important;
|
|
385
|
+
}
|
|
386
|
+
|
|
387
|
+
[data-streamdown="table-wrapper"].my-4:hover > .flex.items-center.justify-end.gap-1 {
|
|
388
|
+
opacity: 1 !important;
|
|
389
|
+
}
|
|
390
|
+
|
|
391
|
+
[data-streamdown="table-wrapper"] .absolute.top-full {
|
|
392
|
+
border: 1px solid var(--color-divider) !important;
|
|
393
|
+
background: var(--color-card) !important;
|
|
394
|
+
backdrop-filter: blur(8px);
|
|
395
|
+
box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15) !important;
|
|
396
|
+
}
|
|
397
|
+
|
|
398
|
+
[data-streamdown="table-wrapper"] .absolute.top-full button {
|
|
399
|
+
color: var(--color-text) !important;
|
|
400
|
+
opacity: 0.8;
|
|
401
|
+
}
|
|
402
|
+
|
|
403
|
+
[data-streamdown="table-wrapper"] .absolute.top-full button:hover {
|
|
404
|
+
background: var(--color-surface) !important;
|
|
405
|
+
opacity: 1;
|
|
406
|
+
}
|
|
407
|
+
|
|
408
|
+
/* ========================================
|
|
409
|
+
Chat Input Styling (Sanqian style)
|
|
410
|
+
Layout: [Input box (flex-1)] [Send button]
|
|
411
|
+
======================================== */
|
|
412
|
+
|
|
413
|
+
/* Form container - flex row */
|
|
414
|
+
.chat-input-form {
|
|
415
|
+
display: flex;
|
|
416
|
+
align-items: center;
|
|
417
|
+
gap: 0.5rem;
|
|
418
|
+
}
|
|
419
|
+
|
|
420
|
+
/* Input box container - takes remaining space */
|
|
421
|
+
.chat-input-box {
|
|
422
|
+
flex: 1;
|
|
423
|
+
position: relative;
|
|
424
|
+
display: grid;
|
|
425
|
+
grid-template-columns: 1fr;
|
|
426
|
+
}
|
|
427
|
+
|
|
428
|
+
/* Hidden replica for auto-height */
|
|
429
|
+
.chat-input-replica {
|
|
430
|
+
grid-area: 1 / 1 / 2 / 2;
|
|
431
|
+
visibility: hidden;
|
|
432
|
+
white-space: pre-wrap;
|
|
433
|
+
word-break: break-word;
|
|
434
|
+
font-size: 0.875rem;
|
|
435
|
+
line-height: 1.5;
|
|
436
|
+
padding-top: 0.625em;
|
|
437
|
+
padding-bottom: 0.625em;
|
|
438
|
+
min-height: 2.75em;
|
|
439
|
+
max-height: 200px;
|
|
440
|
+
pointer-events: none;
|
|
441
|
+
border: 1px solid transparent;
|
|
442
|
+
border-radius: 1rem;
|
|
443
|
+
}
|
|
444
|
+
|
|
445
|
+
/* Actual textarea - matches Sanqian's .smart-textarea-editor .ProseMirror */
|
|
446
|
+
.chat-input-textarea {
|
|
447
|
+
grid-area: 1 / 1 / 2 / 2;
|
|
448
|
+
width: 100%;
|
|
449
|
+
min-height: 2.75em;
|
|
450
|
+
max-height: 200px;
|
|
451
|
+
padding-top: 0.625em;
|
|
452
|
+
padding-bottom: 0.625em;
|
|
453
|
+
border-radius: 1rem;
|
|
454
|
+
border: 1px solid var(--chat-border);
|
|
455
|
+
background: var(--chat-card);
|
|
456
|
+
font-size: 0.875rem;
|
|
457
|
+
line-height: 1.5;
|
|
458
|
+
box-shadow: var(--chat-shadow-elevated);
|
|
459
|
+
color: var(--chat-text);
|
|
460
|
+
overflow-y: auto;
|
|
461
|
+
outline: none;
|
|
462
|
+
resize: none;
|
|
463
|
+
transition: border-color 0.15s ease, box-shadow 0.15s ease;
|
|
464
|
+
}
|
|
465
|
+
|
|
466
|
+
.chat-input-textarea::placeholder {
|
|
467
|
+
color: var(--chat-muted);
|
|
468
|
+
}
|
|
469
|
+
|
|
470
|
+
.chat-input-textarea:focus {
|
|
471
|
+
border-color: var(--chat-border-focus);
|
|
472
|
+
}
|
|
473
|
+
|
|
474
|
+
.chat-input-textarea:disabled {
|
|
475
|
+
opacity: 0.5;
|
|
476
|
+
cursor: not-allowed;
|
|
477
|
+
}
|
|
478
|
+
|
|
479
|
+
/* Left slot - inside input box (matches Sanqian's left-1 bottom-[0.25em]) */
|
|
480
|
+
.chat-input-left-slot {
|
|
481
|
+
position: absolute;
|
|
482
|
+
left: 0.25rem;
|
|
483
|
+
bottom: 0.25em;
|
|
484
|
+
z-index: 10;
|
|
485
|
+
}
|
|
486
|
+
|
|
487
|
+
/* Right slot - inside input box (matches Sanqian's right-1 bottom-[0.25em]) */
|
|
488
|
+
.chat-input-right-slot {
|
|
489
|
+
position: absolute;
|
|
490
|
+
right: 0.25rem;
|
|
491
|
+
bottom: 0.25em;
|
|
492
|
+
z-index: 10;
|
|
493
|
+
}
|
|
494
|
+
|
|
495
|
+
/* Send button - OUTSIDE input box */
|
|
496
|
+
.chat-input-send-btn {
|
|
497
|
+
flex-shrink: 0;
|
|
498
|
+
width: 2.25rem;
|
|
499
|
+
height: 2.25rem;
|
|
500
|
+
border-radius: 50%;
|
|
501
|
+
border: none;
|
|
502
|
+
background: var(--chat-accent);
|
|
503
|
+
color: white;
|
|
504
|
+
display: flex;
|
|
505
|
+
align-items: center;
|
|
506
|
+
justify-content: center;
|
|
507
|
+
cursor: pointer;
|
|
508
|
+
transition: all 0.15s ease;
|
|
509
|
+
box-shadow: var(--chat-shadow-soft);
|
|
510
|
+
}
|
|
511
|
+
|
|
512
|
+
.chat-input-send-btn:hover:not(:disabled) {
|
|
513
|
+
transform: scale(1.05);
|
|
514
|
+
box-shadow: var(--chat-shadow-elevated);
|
|
515
|
+
}
|
|
516
|
+
|
|
517
|
+
.chat-input-send-btn:active:not(:disabled) {
|
|
518
|
+
transform: scale(0.95);
|
|
519
|
+
}
|
|
520
|
+
|
|
521
|
+
.chat-input-send-btn:disabled {
|
|
522
|
+
opacity: 0.4;
|
|
523
|
+
cursor: not-allowed;
|
|
524
|
+
transform: none;
|
|
525
|
+
}
|
|
526
|
+
|
|
527
|
+
.chat-input-send-btn svg {
|
|
528
|
+
width: 1rem;
|
|
529
|
+
height: 1rem;
|
|
530
|
+
}
|
|
531
|
+
|
|
532
|
+
/* Header visuals */
|
|
533
|
+
.chat-header-icon-btn {
|
|
534
|
+
display: inline-flex;
|
|
535
|
+
align-items: center;
|
|
536
|
+
justify-content: center;
|
|
537
|
+
width: 1.75rem;
|
|
538
|
+
height: 1.75rem;
|
|
539
|
+
border-radius: 0.5rem;
|
|
540
|
+
color: var(--chat-muted);
|
|
541
|
+
background: transparent;
|
|
542
|
+
transition: color 0.15s ease, background-color 0.15s ease;
|
|
543
|
+
}
|
|
544
|
+
|
|
545
|
+
.chat-header-icon-btn:hover {
|
|
546
|
+
color: var(--chat-text);
|
|
547
|
+
background: var(--chat-hover);
|
|
548
|
+
}
|
|
549
|
+
|
|
550
|
+
.chat-header-icon {
|
|
551
|
+
width: 1rem;
|
|
552
|
+
height: 1rem;
|
|
553
|
+
}
|
|
554
|
+
|
|
555
|
+
.chat-header-logo {
|
|
556
|
+
width: 1rem;
|
|
557
|
+
height: 1rem;
|
|
558
|
+
border-radius: 0.25rem;
|
|
559
|
+
object-fit: contain;
|
|
560
|
+
display: block;
|
|
561
|
+
}
|
|
562
|
+
|
|
563
|
+
.dark .chat-header-logo,
|
|
564
|
+
:root.dark .chat-header-logo {
|
|
565
|
+
filter: invert(1);
|
|
566
|
+
}
|
|
567
|
+
|
|
568
|
+
.chat-logo-wrapper {
|
|
569
|
+
display: inline-flex;
|
|
570
|
+
align-items: center;
|
|
571
|
+
justify-content: center;
|
|
572
|
+
}
|
|
573
|
+
|
|
574
|
+
.chat-logo-wrapper > * {
|
|
575
|
+
width: 100%;
|
|
576
|
+
height: 100%;
|
|
577
|
+
display: block;
|
|
578
|
+
}
|
|
579
|
+
|
|
580
|
+
.chat-logo-default {
|
|
581
|
+
opacity: 0.9;
|
|
582
|
+
}
|
|
583
|
+
|
|
584
|
+
.dark .chat-logo-default,
|
|
585
|
+
:root.dark .chat-logo-default {
|
|
586
|
+
filter: invert(1);
|
|
587
|
+
}
|
|
588
|
+
|
|
589
|
+
.chat-empty-logo {
|
|
590
|
+
width: 5rem;
|
|
591
|
+
height: 5rem;
|
|
592
|
+
object-fit: contain;
|
|
593
|
+
display: block;
|
|
594
|
+
}
|
|
595
|
+
|
|
596
|
+
.chat-divider-border {
|
|
597
|
+
border-color: var(--chat-divider);
|
|
598
|
+
}
|
|
599
|
+
|
|
600
|
+
/* ========================================
|
|
601
|
+
Floating Window Container
|
|
602
|
+
For transparent Electron windows
|
|
603
|
+
Uses CSS variables set by CompactChat for tinted backgrounds
|
|
604
|
+
======================================== */
|
|
605
|
+
.chat-window-container {
|
|
606
|
+
height: 100%;
|
|
607
|
+
display: flex;
|
|
608
|
+
flex-direction: column;
|
|
609
|
+
background: var(--chat-window-bg, #FAFAF9);
|
|
610
|
+
border-radius: 12px;
|
|
611
|
+
overflow: hidden;
|
|
612
|
+
border: 1px solid var(--chat-window-border, rgba(0, 0, 0, 0.1));
|
|
613
|
+
box-shadow:
|
|
614
|
+
0 0 0 1px rgba(0, 0, 0, 0.05),
|
|
615
|
+
0 8px 40px rgba(0, 0, 0, 0.12);
|
|
616
|
+
}
|
|
617
|
+
|
|
618
|
+
.dark .chat-window-container,
|
|
619
|
+
:root.dark .chat-window-container {
|
|
620
|
+
box-shadow:
|
|
621
|
+
0 0 0 1px rgba(255, 255, 255, 0.05),
|
|
622
|
+
0 8px 40px rgba(0, 0, 0, 0.5);
|
|
623
|
+
}
|
|
624
|
+
|
|
625
|
+
/* Send wrapper + stop tooltip (aligned with Sanqian stop affordance) */
|
|
626
|
+
|
|
627
|
+
.chat-input-send-wrapper {
|
|
628
|
+
position: relative;
|
|
629
|
+
display: flex;
|
|
630
|
+
align-items: center;
|
|
631
|
+
}
|
|
632
|
+
|
|
633
|
+
.chat-input-stop-tooltip {
|
|
634
|
+
position: absolute;
|
|
635
|
+
bottom: 100%;
|
|
636
|
+
left: 50%;
|
|
637
|
+
transform: translateX(-50%);
|
|
638
|
+
margin-bottom: 0.5rem;
|
|
639
|
+
padding: 0.25rem 0.5rem;
|
|
640
|
+
border-radius: 0.5rem;
|
|
641
|
+
border: 1px solid var(--chat-divider);
|
|
642
|
+
background: var(--chat-card);
|
|
643
|
+
color: var(--chat-text);
|
|
644
|
+
font-size: 0.75rem;
|
|
645
|
+
line-height: 1.2;
|
|
646
|
+
text-align: center;
|
|
647
|
+
white-space: nowrap;
|
|
648
|
+
opacity: 0;
|
|
649
|
+
visibility: hidden;
|
|
650
|
+
pointer-events: none;
|
|
651
|
+
box-shadow: var(--chat-shadow-soft);
|
|
652
|
+
transition: opacity 0.15s ease, visibility 0.15s ease;
|
|
653
|
+
}
|
|
654
|
+
|
|
655
|
+
.chat-input-stop-hotkey {
|
|
656
|
+
color: var(--chat-muted);
|
|
657
|
+
font-size: 0.7rem;
|
|
658
|
+
line-height: 1.1;
|
|
659
|
+
}
|
|
660
|
+
|
|
661
|
+
.chat-input-send-wrapper:hover .chat-input-stop-tooltip {
|
|
662
|
+
opacity: 1;
|
|
663
|
+
visibility: visible;
|
|
664
|
+
}
|
|
665
|
+
|
|
666
|
+
/* ========================================
|
|
667
|
+
Tooltip (for header buttons)
|
|
668
|
+
======================================== */
|
|
669
|
+
.chat-tooltip-wrapper {
|
|
670
|
+
position: relative;
|
|
671
|
+
}
|
|
672
|
+
|
|
673
|
+
.chat-tooltip {
|
|
674
|
+
position: absolute;
|
|
675
|
+
left: 50%;
|
|
676
|
+
transform: translateX(-50%);
|
|
677
|
+
top: 100%;
|
|
678
|
+
margin-top: 0.375rem;
|
|
679
|
+
padding: 0.25rem 0.5rem;
|
|
680
|
+
border-radius: 0.375rem;
|
|
681
|
+
background: var(--chat-card);
|
|
682
|
+
color: var(--chat-text);
|
|
683
|
+
font-size: 0.75rem;
|
|
684
|
+
line-height: 1.3;
|
|
685
|
+
white-space: nowrap;
|
|
686
|
+
text-align: center;
|
|
687
|
+
opacity: 0;
|
|
688
|
+
visibility: hidden;
|
|
689
|
+
pointer-events: none;
|
|
690
|
+
box-shadow: var(--chat-shadow-soft);
|
|
691
|
+
border: 1px solid var(--chat-border);
|
|
692
|
+
z-index: 50;
|
|
693
|
+
transition: opacity 100ms ease, visibility 100ms ease;
|
|
694
|
+
}
|
|
695
|
+
|
|
696
|
+
.chat-tooltip-wrapper:hover .chat-tooltip {
|
|
697
|
+
opacity: 1;
|
|
698
|
+
visibility: visible;
|
|
699
|
+
}
|
|
700
|
+
|
|
701
|
+
.chat-tooltip-shortcut {
|
|
702
|
+
color: var(--chat-muted);
|
|
703
|
+
font-size: 0.7rem;
|
|
704
|
+
}
|