@tinyweb_dev/agent-framework-chat-ui 0.1.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.
- package/LICENSE +21 -0
- package/README.md +223 -0
- package/package.json +61 -0
- package/src/components/Composer.tsx +267 -0
- package/src/components/Header.tsx +16 -0
- package/src/components/Hero.tsx +16 -0
- package/src/components/RealtimeCallOverlay.tsx +894 -0
- package/src/components/RealtimeOrb.tsx +388 -0
- package/src/components/Sidebar.tsx +15 -0
- package/src/components/TinywebChat.tsx +95 -0
- package/src/components/Transcript.tsx +146 -0
- package/src/components/WireOrbEffect.tsx +541 -0
- package/src/components/condense/CondensePill.tsx +77 -0
- package/src/components/messages/AssistantMessage.tsx +15 -0
- package/src/components/messages/ErrorMessage.tsx +12 -0
- package/src/components/messages/ToolMessage.tsx +49 -0
- package/src/components/messages/UserMessage.tsx +37 -0
- package/src/components/tool/ExecRenderer.tsx +71 -0
- package/src/components/tool/ImageRenderer.tsx +47 -0
- package/src/components/tool/JsonRenderer.tsx +24 -0
- package/src/components/tool/ToolCard.tsx +65 -0
- package/src/components/tool/builtinRenderers.tsx +456 -0
- package/src/hooks/useAgentChat.ts +454 -0
- package/src/hooks/useAnchorLatestUser.ts +99 -0
- package/src/hooks/useInitialScrollToEnd.ts +41 -0
- package/src/hooks/useNdjsonStream.ts +71 -0
- package/src/hooks/useRealtimeCall.ts +452 -0
- package/src/index.ts +45 -0
- package/src/markdown/render.ts +121 -0
- package/src/styles.css +1662 -0
- package/src/types.ts +241 -0
- package/src/util/attachments.ts +87 -0
- package/src/util/escape.ts +16 -0
- package/src/util/theme.ts +40 -0
- package/src/util/tool-detect.ts +65 -0
- package/src/util/tool-labels.ts +34 -0
package/src/styles.css
ADDED
|
@@ -0,0 +1,1662 @@
|
|
|
1
|
+
/*
|
|
2
|
+
* @tinyweb-agent-framework/chat-ui — drop-in stylesheet.
|
|
3
|
+
*
|
|
4
|
+
*
|
|
5
|
+
* Scoping rule: every selector is nested under `.tinyweb-chat`, so importing
|
|
6
|
+
* this stylesheet has no effect on the host app's own `body` / `html` /
|
|
7
|
+
* `button` / `input` rules. Theme tokens are exposed as CSS custom
|
|
8
|
+
* properties on `.tinyweb-chat`, so consumers can override them via
|
|
9
|
+
* inline style (or via the `theme` prop on `<TinywebChat />`).
|
|
10
|
+
*/
|
|
11
|
+
|
|
12
|
+
.tinyweb-chat {
|
|
13
|
+
/* Neutral dark palette tuned for --bg: #1e1e1e (VS Code-ish).
|
|
14
|
+
* --panel sits one step above the canvas so bubbles/cards lift off
|
|
15
|
+
* the background; --border is a low-contrast separator that doesn't
|
|
16
|
+
* clash with the warm-neutral bg. */
|
|
17
|
+
--bg: #1e1e1e;
|
|
18
|
+
--panel: #2a2a2a;
|
|
19
|
+
--panel-2: #333333;
|
|
20
|
+
--border: #3a3a3a;
|
|
21
|
+
--text: #e6e8eb;
|
|
22
|
+
--muted: #9aa0aa;
|
|
23
|
+
--accent: #7c9eff;
|
|
24
|
+
--accent-2: #3ad29f;
|
|
25
|
+
--warn: #ffb86b;
|
|
26
|
+
--err: #ff7b7b;
|
|
27
|
+
|
|
28
|
+
display: flex;
|
|
29
|
+
flex-direction: column;
|
|
30
|
+
height: 100%;
|
|
31
|
+
min-height: 0;
|
|
32
|
+
background: var(--bg);
|
|
33
|
+
color: var(--text);
|
|
34
|
+
font: 14px/1.5 ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
|
|
35
|
+
}
|
|
36
|
+
|
|
37
|
+
.tinyweb-chat *,
|
|
38
|
+
.tinyweb-chat *::before,
|
|
39
|
+
.tinyweb-chat *::after { box-sizing: border-box; }
|
|
40
|
+
|
|
41
|
+
.tinyweb-chat a { color: var(--accent); }
|
|
42
|
+
|
|
43
|
+
.tinyweb-chat .header {
|
|
44
|
+
padding: 14px 22px;
|
|
45
|
+
border-bottom: 1px solid var(--border);
|
|
46
|
+
display: flex; align-items: center; justify-content: space-between;
|
|
47
|
+
flex: 0 0 auto;
|
|
48
|
+
background: linear-gradient(180deg, rgba(124, 158, 255, 0.04), transparent);
|
|
49
|
+
}
|
|
50
|
+
.tinyweb-chat .brand { display: flex; align-items: center; gap: 10px; }
|
|
51
|
+
.tinyweb-chat .brand-mark {
|
|
52
|
+
width: 22px; height: 22px; border-radius: 7px;
|
|
53
|
+
background: radial-gradient(circle at 30% 30%, #ffffff 0%, #c9d3ea 30%, #5b6a8a 70%, #1a1d24 100%);
|
|
54
|
+
box-shadow: 0 0 0 1px rgba(124, 158, 255, 0.35), 0 0 12px rgba(124, 158, 255, 0.35);
|
|
55
|
+
}
|
|
56
|
+
.tinyweb-chat .header h1 {
|
|
57
|
+
margin: 0; font-size: 15px; font-weight: 600; letter-spacing: -0.01em;
|
|
58
|
+
}
|
|
59
|
+
|
|
60
|
+
.tinyweb-chat .main {
|
|
61
|
+
display: grid; grid-template-columns: 320px 1fr; gap: 0;
|
|
62
|
+
flex: 1 1 auto; min-height: 0;
|
|
63
|
+
}
|
|
64
|
+
.tinyweb-chat .main.no-sidebar { grid-template-columns: 1fr; }
|
|
65
|
+
.tinyweb-chat .sidebar {
|
|
66
|
+
border-right: 1px solid var(--border);
|
|
67
|
+
padding: 18px 16px; overflow-y: auto;
|
|
68
|
+
background: linear-gradient(180deg, rgba(255, 255, 255, 0.015), transparent 220px);
|
|
69
|
+
}
|
|
70
|
+
.tinyweb-chat .chat {
|
|
71
|
+
display: flex; flex-direction: column; min-width: 0; min-height: 0; height: 100%;
|
|
72
|
+
}
|
|
73
|
+
|
|
74
|
+
.tinyweb-chat input,
|
|
75
|
+
.tinyweb-chat textarea,
|
|
76
|
+
.tinyweb-chat button {
|
|
77
|
+
font: inherit; color: inherit; background: var(--bg);
|
|
78
|
+
border: 1px solid var(--border); border-radius: 8px;
|
|
79
|
+
padding: 8px 12px; width: 100%;
|
|
80
|
+
transition: border-color 0.15s ease, box-shadow 0.15s ease;
|
|
81
|
+
}
|
|
82
|
+
.tinyweb-chat input::placeholder,
|
|
83
|
+
.tinyweb-chat textarea::placeholder { color: #6b6f78; }
|
|
84
|
+
.tinyweb-chat input:focus,
|
|
85
|
+
.tinyweb-chat textarea:focus {
|
|
86
|
+
outline: none; border-color: var(--accent);
|
|
87
|
+
box-shadow: 0 0 0 3px rgba(124, 158, 255, 0.15);
|
|
88
|
+
}
|
|
89
|
+
.tinyweb-chat button {
|
|
90
|
+
background: var(--accent); color: #0a0c10; border: none; font-weight: 600;
|
|
91
|
+
cursor: pointer; padding: 9px 14px; border-radius: 8px;
|
|
92
|
+
transition: background 0.15s ease, transform 0.05s ease, opacity 0.15s ease;
|
|
93
|
+
}
|
|
94
|
+
.tinyweb-chat button:hover:not(:disabled) { background: #93b0ff; }
|
|
95
|
+
.tinyweb-chat button:active:not(:disabled) { transform: translateY(1px); }
|
|
96
|
+
.tinyweb-chat button:disabled { opacity: 0.5; cursor: not-allowed; }
|
|
97
|
+
|
|
98
|
+
.tinyweb-chat .messages {
|
|
99
|
+
flex: 1 1 auto; min-height: 0; overflow-y: auto; padding: 20px 24px;
|
|
100
|
+
position: relative;
|
|
101
|
+
/* Used by `useAnchorLatestUser` to keep the freshly-sent user bubble
|
|
102
|
+
* pinned near the top of the viewport with a small breathing gap. */
|
|
103
|
+
scroll-padding-top: 16px;
|
|
104
|
+
}
|
|
105
|
+
.tinyweb-chat .messages-inner {
|
|
106
|
+
max-width: 860px;
|
|
107
|
+
margin: 0 auto;
|
|
108
|
+
width: 100%;
|
|
109
|
+
display: flex;
|
|
110
|
+
flex-direction: column;
|
|
111
|
+
}
|
|
112
|
+
/* Sentinel rendered after the last message. `useAnchorLatestUser` sets
|
|
113
|
+
* `min-height` at runtime so the latest user message can always be scrolled
|
|
114
|
+
* to the top of the viewport, even before the assistant reply is long
|
|
115
|
+
* enough to overflow on its own. The spacer is invisible and inert. */
|
|
116
|
+
.tinyweb-chat .msg-spacer {
|
|
117
|
+
flex: 0 0 auto;
|
|
118
|
+
width: 100%;
|
|
119
|
+
pointer-events: none;
|
|
120
|
+
}
|
|
121
|
+
|
|
122
|
+
/* Hero (empty state). Background: deep void with a faint purple ambient
|
|
123
|
+
* pool behind the orb (mirrors the realtime wire panel's vibe). The pool
|
|
124
|
+
* is intentionally subtle — visible only as a slight lift of the center
|
|
125
|
+
* compared to the pitch-black corners, plus a barely-there cool tint. */
|
|
126
|
+
.tinyweb-chat .hero {
|
|
127
|
+
position: absolute; inset: 0;
|
|
128
|
+
display: flex; flex-direction: column;
|
|
129
|
+
align-items: center; justify-content: center;
|
|
130
|
+
gap: 0; padding: 0;
|
|
131
|
+
text-align: center; pointer-events: none;
|
|
132
|
+
overflow: hidden;
|
|
133
|
+
isolation: isolate;
|
|
134
|
+
background:
|
|
135
|
+
/* Subtle purple ambient bloom — echoes --rt-halo-1 from realtime, dialled way down */
|
|
136
|
+
radial-gradient(
|
|
137
|
+
900px 700px at 50% 45%,
|
|
138
|
+
rgba(146, 130, 220, 0.06) 0%,
|
|
139
|
+
rgba(110, 120, 200, 0.03) 30%,
|
|
140
|
+
transparent 60%
|
|
141
|
+
),
|
|
142
|
+
/* Soft luminous void — lifts center slightly so corners read deeper */
|
|
143
|
+
radial-gradient(
|
|
144
|
+
1400px 1000px at 50% 50%,
|
|
145
|
+
#0a0a14 0%,
|
|
146
|
+
#050508 55%,
|
|
147
|
+
#000000 100%
|
|
148
|
+
);
|
|
149
|
+
}
|
|
150
|
+
.tinyweb-chat .hero > * { pointer-events: auto; position: relative; z-index: 2; }
|
|
151
|
+
|
|
152
|
+
/* 3D wireframe orb — big, raw, no filters. Let it breathe. */
|
|
153
|
+
.tinyweb-chat .hero-orb {
|
|
154
|
+
position: absolute;
|
|
155
|
+
top: 50%; left: 50%;
|
|
156
|
+
transform: translate(-50%, -54%);
|
|
157
|
+
width: min(72vh, 680px);
|
|
158
|
+
height: min(72vh, 680px);
|
|
159
|
+
pointer-events: none;
|
|
160
|
+
z-index: 2;
|
|
161
|
+
}
|
|
162
|
+
.tinyweb-chat .hero-orb .wire-orb-effect {
|
|
163
|
+
position: absolute;
|
|
164
|
+
inset: 0;
|
|
165
|
+
width: 100%;
|
|
166
|
+
height: 100%;
|
|
167
|
+
}
|
|
168
|
+
.tinyweb-chat .hero-orb .wire-orb-effect canvas {
|
|
169
|
+
display: block;
|
|
170
|
+
width: 100% !important;
|
|
171
|
+
height: 100% !important;
|
|
172
|
+
}
|
|
173
|
+
|
|
174
|
+
/* Title + subtitle sit at the bottom, out of the orb's way */
|
|
175
|
+
.tinyweb-chat .hero-title {
|
|
176
|
+
position: absolute;
|
|
177
|
+
bottom: 18%;
|
|
178
|
+
left: 50%;
|
|
179
|
+
transform: translateX(-50%);
|
|
180
|
+
margin: 0;
|
|
181
|
+
font-size: 30px;
|
|
182
|
+
font-weight: 500;
|
|
183
|
+
letter-spacing: -0.02em;
|
|
184
|
+
line-height: 1.1;
|
|
185
|
+
color: rgba(220, 228, 240, 0.82);
|
|
186
|
+
white-space: nowrap;
|
|
187
|
+
z-index: 3;
|
|
188
|
+
}
|
|
189
|
+
.tinyweb-chat .hero-sub {
|
|
190
|
+
position: absolute;
|
|
191
|
+
bottom: 13%;
|
|
192
|
+
left: 50%;
|
|
193
|
+
transform: translateX(-50%);
|
|
194
|
+
margin: 0;
|
|
195
|
+
font-size: 13px;
|
|
196
|
+
line-height: 1.5;
|
|
197
|
+
color: rgba(155, 168, 185, 0.6);
|
|
198
|
+
max-width: 600px;
|
|
199
|
+
width: 90%;
|
|
200
|
+
text-wrap: balance;
|
|
201
|
+
letter-spacing: 0.01em;
|
|
202
|
+
font-weight: 400;
|
|
203
|
+
z-index: 3;
|
|
204
|
+
}
|
|
205
|
+
|
|
206
|
+
.tinyweb-chat .msg-row {
|
|
207
|
+
display: flex;
|
|
208
|
+
flex-direction: column;
|
|
209
|
+
max-width: 100%;
|
|
210
|
+
}
|
|
211
|
+
.tinyweb-chat .msg-row:has(.msg.user) {
|
|
212
|
+
align-items: flex-end;
|
|
213
|
+
}
|
|
214
|
+
.tinyweb-chat .msg-row:has(.msg.assistant),
|
|
215
|
+
.tinyweb-chat .msg-row:has(.msg.tool),
|
|
216
|
+
.tinyweb-chat .msg-row:has(.msg.tool-pending),
|
|
217
|
+
.tinyweb-chat .msg-row:has(.msg.tool-card),
|
|
218
|
+
.tinyweb-chat .msg-row:has(.msg.error) {
|
|
219
|
+
align-items: flex-start;
|
|
220
|
+
}
|
|
221
|
+
.tinyweb-chat .msg {
|
|
222
|
+
margin-bottom: 14px;
|
|
223
|
+
max-width: 75%;
|
|
224
|
+
}
|
|
225
|
+
.tinyweb-chat .msg.user {
|
|
226
|
+
text-align: left;
|
|
227
|
+
}
|
|
228
|
+
.tinyweb-chat .msg .role {
|
|
229
|
+
font-size: 11px; color: var(--muted); text-transform: uppercase;
|
|
230
|
+
letter-spacing: 0.06em; margin-bottom: 4px;
|
|
231
|
+
}
|
|
232
|
+
.tinyweb-chat .msg.user .role { color: var(--accent); }
|
|
233
|
+
.tinyweb-chat .msg.assistant .role { color: var(--accent-2); }
|
|
234
|
+
.tinyweb-chat .msg.tool .role { color: var(--warn); }
|
|
235
|
+
.tinyweb-chat .msg.error .role { color: var(--err); }
|
|
236
|
+
/* Hide per-message role labels (USER / ASSISTANT) — alignment + bubble
|
|
237
|
+
* styling already disambiguate sender, so the label adds noise. Tool
|
|
238
|
+
* cards keep the .role-row variant (it pairs with action chips). */
|
|
239
|
+
.tinyweb-chat .msg.user > .role,
|
|
240
|
+
.tinyweb-chat .msg.assistant > .role,
|
|
241
|
+
.tinyweb-chat .msg.error > .role {
|
|
242
|
+
display: none;
|
|
243
|
+
}
|
|
244
|
+
.tinyweb-chat .msg .body { white-space: pre-wrap; word-wrap: break-word; }
|
|
245
|
+
.tinyweb-chat .msg.user .body {
|
|
246
|
+
background: var(--panel);
|
|
247
|
+
border: 1px solid var(--border);
|
|
248
|
+
border-radius: 14px;
|
|
249
|
+
padding: 8px 14px;
|
|
250
|
+
text-align: left;
|
|
251
|
+
display: inline-block;
|
|
252
|
+
}
|
|
253
|
+
.tinyweb-chat .msg.tool .body {
|
|
254
|
+
font-family: ui-monospace, monospace; font-size: 12px; background: var(--panel);
|
|
255
|
+
padding: 8px 10px; border-radius: 6px; border: 1px solid var(--border);
|
|
256
|
+
max-height: 200px; overflow-y: auto;
|
|
257
|
+
}
|
|
258
|
+
.tinyweb-chat .msg.tool .body.has-image,
|
|
259
|
+
.tinyweb-chat .msg.tool .body.has-exec {
|
|
260
|
+
font-family: inherit; background: transparent; padding: 0;
|
|
261
|
+
border: 0; border-radius: 0; max-height: none; overflow: visible;
|
|
262
|
+
}
|
|
263
|
+
.tinyweb-chat .tool-image {
|
|
264
|
+
display: block; max-width: 100%; height: auto;
|
|
265
|
+
border: 1px solid var(--border); border-radius: 8px; background: var(--panel);
|
|
266
|
+
}
|
|
267
|
+
.tinyweb-chat .tool-image-meta {
|
|
268
|
+
font-size: 10px; color: var(--muted); margin-top: 4px;
|
|
269
|
+
font-family: ui-monospace, monospace;
|
|
270
|
+
}
|
|
271
|
+
.tinyweb-chat .msg.tool .role-row {
|
|
272
|
+
display: flex; align-items: center; justify-content: space-between;
|
|
273
|
+
gap: 8px; margin-bottom: 4px;
|
|
274
|
+
}
|
|
275
|
+
.tinyweb-chat .msg.tool .role-row .role { margin-bottom: 0; }
|
|
276
|
+
.tinyweb-chat .tool-json-toggle {
|
|
277
|
+
background: transparent; border: 1px solid var(--border);
|
|
278
|
+
color: var(--muted); font-size: 10px; font-weight: 600;
|
|
279
|
+
text-transform: uppercase; letter-spacing: 0.04em;
|
|
280
|
+
padding: 2px 8px; border-radius: 999px; width: auto; cursor: pointer;
|
|
281
|
+
transition: border-color 0.15s ease, color 0.15s ease;
|
|
282
|
+
}
|
|
283
|
+
.tinyweb-chat .tool-json-toggle:hover:not(:disabled) {
|
|
284
|
+
border-color: rgba(124, 158, 255, 0.4); color: var(--text);
|
|
285
|
+
}
|
|
286
|
+
.tinyweb-chat .tool-json {
|
|
287
|
+
font-family: ui-monospace, monospace; font-size: 12px;
|
|
288
|
+
background: var(--panel); padding: 8px 10px; border-radius: 6px;
|
|
289
|
+
border: 1px solid var(--border); max-height: 200px; overflow: auto;
|
|
290
|
+
margin-top: 6px; white-space: pre-wrap; word-break: break-all;
|
|
291
|
+
}
|
|
292
|
+
|
|
293
|
+
.tinyweb-chat .exec-meta {
|
|
294
|
+
display: flex; align-items: center; flex-wrap: wrap; gap: 6px; margin-bottom: 6px;
|
|
295
|
+
}
|
|
296
|
+
.tinyweb-chat .exec-chip {
|
|
297
|
+
font-family: ui-monospace, monospace; font-size: 10px;
|
|
298
|
+
font-weight: 600; padding: 2px 8px; border-radius: 999px;
|
|
299
|
+
border: 1px solid var(--border); color: var(--muted);
|
|
300
|
+
text-transform: uppercase; letter-spacing: 0.04em;
|
|
301
|
+
}
|
|
302
|
+
.tinyweb-chat .exec-chip.ok { color: #4ade80; border-color: rgba(74, 222, 128, 0.4); background: rgba(74, 222, 128, 0.08); }
|
|
303
|
+
.tinyweb-chat .exec-chip.fail { color: #f87171; border-color: rgba(248, 113, 113, 0.4); background: rgba(248, 113, 113, 0.08); }
|
|
304
|
+
.tinyweb-chat .exec-chip.warn { color: #fbbf24; border-color: rgba(251, 191, 36, 0.4); background: rgba(251, 191, 36, 0.08); }
|
|
305
|
+
.tinyweb-chat .exec-stdout,
|
|
306
|
+
.tinyweb-chat .exec-stderr {
|
|
307
|
+
font-family: ui-monospace, monospace; font-size: 12px;
|
|
308
|
+
background: var(--panel); padding: 8px 10px; border-radius: 6px;
|
|
309
|
+
border: 1px solid var(--border); max-height: 320px; overflow: auto;
|
|
310
|
+
margin-top: 6px; white-space: pre-wrap; word-break: break-word;
|
|
311
|
+
}
|
|
312
|
+
.tinyweb-chat .exec-stderr { border-color: rgba(248, 113, 113, 0.3); background: rgba(248, 113, 113, 0.05); }
|
|
313
|
+
.tinyweb-chat .exec-section-label {
|
|
314
|
+
font-size: 10px; color: var(--muted);
|
|
315
|
+
text-transform: uppercase; letter-spacing: 0.04em;
|
|
316
|
+
margin-top: 8px; font-weight: 600;
|
|
317
|
+
}
|
|
318
|
+
.tinyweb-chat .exec-show-more {
|
|
319
|
+
background: transparent; border: 1px solid var(--border);
|
|
320
|
+
color: var(--muted); font-size: 10px; font-weight: 600;
|
|
321
|
+
text-transform: uppercase; letter-spacing: 0.04em;
|
|
322
|
+
padding: 2px 8px; border-radius: 999px; margin-top: 4px;
|
|
323
|
+
cursor: pointer; transition: border-color 0.15s ease, color 0.15s ease;
|
|
324
|
+
width: auto;
|
|
325
|
+
}
|
|
326
|
+
.tinyweb-chat .exec-show-more:hover {
|
|
327
|
+
border-color: rgba(124, 158, 255, 0.4); color: var(--text);
|
|
328
|
+
}
|
|
329
|
+
|
|
330
|
+
/* Assistant markdown bubble. */
|
|
331
|
+
.tinyweb-chat .msg.assistant .body { white-space: normal; }
|
|
332
|
+
.tinyweb-chat .msg.assistant .body > :first-child { margin-top: 0; }
|
|
333
|
+
.tinyweb-chat .msg.assistant .body > :last-child { margin-bottom: 0; }
|
|
334
|
+
.tinyweb-chat .msg.assistant .body p { margin: 0 0 8px; }
|
|
335
|
+
.tinyweb-chat .msg.assistant .body h1,
|
|
336
|
+
.tinyweb-chat .msg.assistant .body h2,
|
|
337
|
+
.tinyweb-chat .msg.assistant .body h3,
|
|
338
|
+
.tinyweb-chat .msg.assistant .body h4,
|
|
339
|
+
.tinyweb-chat .msg.assistant .body h5,
|
|
340
|
+
.tinyweb-chat .msg.assistant .body h6 {
|
|
341
|
+
margin: 14px 0 6px; font-weight: 600; line-height: 1.3;
|
|
342
|
+
color: var(--text); letter-spacing: -0.005em;
|
|
343
|
+
}
|
|
344
|
+
.tinyweb-chat .msg.assistant .body h1 { font-size: 18px; }
|
|
345
|
+
.tinyweb-chat .msg.assistant .body h2 { font-size: 16px; }
|
|
346
|
+
.tinyweb-chat .msg.assistant .body h3 { font-size: 14px; }
|
|
347
|
+
.tinyweb-chat .msg.assistant .body h4,
|
|
348
|
+
.tinyweb-chat .msg.assistant .body h5,
|
|
349
|
+
.tinyweb-chat .msg.assistant .body h6 {
|
|
350
|
+
font-size: 13px; color: var(--muted);
|
|
351
|
+
text-transform: uppercase; letter-spacing: 0.04em;
|
|
352
|
+
}
|
|
353
|
+
.tinyweb-chat .msg.assistant .body > h1:first-child,
|
|
354
|
+
.tinyweb-chat .msg.assistant .body > h2:first-child,
|
|
355
|
+
.tinyweb-chat .msg.assistant .body > h3:first-child,
|
|
356
|
+
.tinyweb-chat .msg.assistant .body > h4:first-child,
|
|
357
|
+
.tinyweb-chat .msg.assistant .body > h5:first-child,
|
|
358
|
+
.tinyweb-chat .msg.assistant .body > h6:first-child { margin-top: 0; }
|
|
359
|
+
.tinyweb-chat .msg.assistant .body ul,
|
|
360
|
+
.tinyweb-chat .msg.assistant .body ol { margin: 4px 0 8px; padding-left: 22px; }
|
|
361
|
+
.tinyweb-chat .msg.assistant .body li { margin: 2px 0; }
|
|
362
|
+
.tinyweb-chat .msg.assistant .body li > p { margin: 0; }
|
|
363
|
+
.tinyweb-chat .msg.assistant .body strong { color: var(--text); font-weight: 600; }
|
|
364
|
+
.tinyweb-chat .msg.assistant .body em { font-style: italic; }
|
|
365
|
+
.tinyweb-chat .msg.assistant .body a {
|
|
366
|
+
color: var(--accent); text-decoration: underline; text-underline-offset: 2px; word-break: break-all;
|
|
367
|
+
}
|
|
368
|
+
.tinyweb-chat .msg.assistant .body a:hover { color: var(--accent-2); }
|
|
369
|
+
.tinyweb-chat .msg.assistant .body code {
|
|
370
|
+
font-family: ui-monospace, "SF Mono", Menlo, monospace;
|
|
371
|
+
font-size: 0.9em; background: var(--panel);
|
|
372
|
+
border: 1px solid var(--border); border-radius: 4px;
|
|
373
|
+
padding: 1px 5px;
|
|
374
|
+
}
|
|
375
|
+
.tinyweb-chat .msg.assistant .body pre {
|
|
376
|
+
font-family: ui-monospace, "SF Mono", Menlo, monospace;
|
|
377
|
+
font-size: 12px; background: var(--panel);
|
|
378
|
+
border: 1px solid var(--border); border-radius: 6px;
|
|
379
|
+
padding: 10px 12px; margin: 6px 0 10px;
|
|
380
|
+
overflow-x: auto; max-width: 100%;
|
|
381
|
+
}
|
|
382
|
+
.tinyweb-chat .msg.assistant .body pre code {
|
|
383
|
+
background: transparent; border: 0; padding: 0; font-size: inherit;
|
|
384
|
+
}
|
|
385
|
+
|
|
386
|
+
.tinyweb-chat .composer {
|
|
387
|
+
padding: 14px 20px 20px; display: flex; flex-direction: column; gap: 8px; flex: 0 0 auto;
|
|
388
|
+
background: var(--bg);
|
|
389
|
+
position: relative;
|
|
390
|
+
}
|
|
391
|
+
.tinyweb-chat .composer.composer-drop {
|
|
392
|
+
outline: 2px dashed var(--accent);
|
|
393
|
+
outline-offset: -10px;
|
|
394
|
+
background: rgba(124, 158, 255, 0.05);
|
|
395
|
+
}
|
|
396
|
+
.tinyweb-chat .composer-attachments {
|
|
397
|
+
display: flex; gap: 8px; flex-wrap: wrap;
|
|
398
|
+
max-width: 860px; margin: 0 auto; width: 100%;
|
|
399
|
+
}
|
|
400
|
+
.tinyweb-chat .composer-thumb {
|
|
401
|
+
position: relative; width: 64px; height: 64px; border-radius: 8px;
|
|
402
|
+
overflow: hidden; border: 1px solid var(--border); background: var(--panel);
|
|
403
|
+
flex: 0 0 auto;
|
|
404
|
+
}
|
|
405
|
+
.tinyweb-chat .composer-thumb img {
|
|
406
|
+
width: 100%; height: 100%; object-fit: cover; display: block;
|
|
407
|
+
}
|
|
408
|
+
.tinyweb-chat .composer-thumb-fallback {
|
|
409
|
+
display: flex; align-items: center; justify-content: center;
|
|
410
|
+
width: 100%; height: 100%; font-size: 10px; color: var(--muted);
|
|
411
|
+
padding: 4px; text-align: center; word-break: break-all;
|
|
412
|
+
}
|
|
413
|
+
.tinyweb-chat .composer-thumb-remove {
|
|
414
|
+
position: absolute; top: 2px; right: 2px;
|
|
415
|
+
width: 18px; height: 18px; padding: 0;
|
|
416
|
+
border-radius: 50%; border: 0;
|
|
417
|
+
background: rgba(0, 0, 0, 0.65); color: #fff;
|
|
418
|
+
font-size: 14px; line-height: 1;
|
|
419
|
+
cursor: pointer; display: flex; align-items: center; justify-content: center;
|
|
420
|
+
}
|
|
421
|
+
.tinyweb-chat .composer-thumb-remove:hover { background: rgba(0, 0, 0, 0.85); }
|
|
422
|
+
.tinyweb-chat .composer-error {
|
|
423
|
+
max-width: 860px; margin: 0 auto; width: 100%;
|
|
424
|
+
color: var(--err); font-size: 12px;
|
|
425
|
+
padding: 4px 12px;
|
|
426
|
+
}
|
|
427
|
+
.tinyweb-chat .composer .attach-btn {
|
|
428
|
+
flex: 0 0 auto; width: 32px; height: 32px; padding: 0;
|
|
429
|
+
border-radius: 50%; border: 0; background: transparent;
|
|
430
|
+
color: var(--muted); cursor: pointer;
|
|
431
|
+
display: inline-flex; align-items: center; justify-content: center;
|
|
432
|
+
transition: color 0.15s ease, background 0.15s ease;
|
|
433
|
+
}
|
|
434
|
+
.tinyweb-chat .composer .attach-btn:hover:not(:disabled) {
|
|
435
|
+
color: var(--text); background: var(--border);
|
|
436
|
+
}
|
|
437
|
+
.tinyweb-chat .composer .attach-btn:disabled { opacity: 0.4; cursor: not-allowed; }
|
|
438
|
+
.tinyweb-chat .composer .attach-btn svg { width: 18px; height: 18px; display: block; }
|
|
439
|
+
|
|
440
|
+
.tinyweb-chat .msg-images {
|
|
441
|
+
display: flex; gap: 6px; flex-wrap: wrap;
|
|
442
|
+
margin: 6px 0 4px;
|
|
443
|
+
}
|
|
444
|
+
.tinyweb-chat .msg-image {
|
|
445
|
+
max-width: 240px; max-height: 240px;
|
|
446
|
+
border-radius: 8px; border: 1px solid var(--border);
|
|
447
|
+
object-fit: cover; display: block;
|
|
448
|
+
}
|
|
449
|
+
.tinyweb-chat .msg-image-fallback {
|
|
450
|
+
font-size: 11px; color: var(--muted);
|
|
451
|
+
padding: 6px 10px; border: 1px dashed var(--border); border-radius: 6px;
|
|
452
|
+
}
|
|
453
|
+
.tinyweb-chat .composer-inner {
|
|
454
|
+
flex: 1; display: flex; align-items: center; gap: 8px;
|
|
455
|
+
background: var(--panel); border: 1px solid var(--border);
|
|
456
|
+
border-radius: 999px; padding: 6px 6px 6px 20px;
|
|
457
|
+
max-width: 860px; margin: 0 auto; width: 100%;
|
|
458
|
+
transition: border-color 0.15s ease, box-shadow 0.15s ease;
|
|
459
|
+
}
|
|
460
|
+
.tinyweb-chat .composer-inner:focus-within {
|
|
461
|
+
border-color: var(--accent);
|
|
462
|
+
box-shadow: 0 0 0 3px rgba(124, 158, 255, 0.15);
|
|
463
|
+
}
|
|
464
|
+
.tinyweb-chat .composer textarea {
|
|
465
|
+
resize: none; height: 36px; line-height: 24px;
|
|
466
|
+
background: transparent;
|
|
467
|
+
border: 0 !important; box-shadow: none !important;
|
|
468
|
+
padding: 6px 0; border-radius: 0;
|
|
469
|
+
flex: 1; min-width: 0;
|
|
470
|
+
}
|
|
471
|
+
.tinyweb-chat .composer textarea:focus {
|
|
472
|
+
outline: none; border: 0 !important; box-shadow: none !important;
|
|
473
|
+
}
|
|
474
|
+
.tinyweb-chat .composer .send-btn {
|
|
475
|
+
flex: 0 0 auto; width: 36px; height: 36px; padding: 0;
|
|
476
|
+
border-radius: 50%; display: inline-flex;
|
|
477
|
+
align-items: center; justify-content: center;
|
|
478
|
+
}
|
|
479
|
+
.tinyweb-chat .composer .send-btn svg { width: 16px; height: 16px; display: block; }
|
|
480
|
+
.tinyweb-chat .composer .send-btn.stop-btn {
|
|
481
|
+
background: #ef4444; color: #fff; border-color: #ef4444;
|
|
482
|
+
cursor: pointer;
|
|
483
|
+
}
|
|
484
|
+
.tinyweb-chat .composer .send-btn.stop-btn:hover {
|
|
485
|
+
background: #dc2626; border-color: #dc2626;
|
|
486
|
+
}
|
|
487
|
+
.tinyweb-chat .composer .send-btn.stop-btn svg {
|
|
488
|
+
width: 14px; height: 14px;
|
|
489
|
+
}
|
|
490
|
+
|
|
491
|
+
.tinyweb-chat .condense {
|
|
492
|
+
display: inline-flex; align-items: center; gap: 8px;
|
|
493
|
+
font-size: 11px; color: var(--muted);
|
|
494
|
+
background: var(--panel); border: 1px solid var(--border);
|
|
495
|
+
border-radius: 999px; padding: 4px 10px;
|
|
496
|
+
margin: 8px 0;
|
|
497
|
+
}
|
|
498
|
+
.tinyweb-chat .condense .dot {
|
|
499
|
+
width: 8px; height: 8px; border-radius: 50%; background: var(--accent);
|
|
500
|
+
animation: tinyweb-pulse 1s ease-in-out infinite;
|
|
501
|
+
}
|
|
502
|
+
.tinyweb-chat .condense.overflow .dot { background: var(--warn); }
|
|
503
|
+
.tinyweb-chat .condense.error { color: var(--err); border-color: var(--err); }
|
|
504
|
+
.tinyweb-chat .condense.error .dot { background: var(--err); animation: none; }
|
|
505
|
+
.tinyweb-chat .condense.done .dot { background: var(--accent-2); animation: none; }
|
|
506
|
+
.tinyweb-chat .condense details { margin: 0; padding: 0; width: 100%; }
|
|
507
|
+
.tinyweb-chat .condense details summary {
|
|
508
|
+
cursor: pointer; user-select: none; outline: none;
|
|
509
|
+
list-style: none; display: inline-flex; gap: 8px; align-items: center;
|
|
510
|
+
}
|
|
511
|
+
.tinyweb-chat .condense details summary::-webkit-details-marker { display: none; }
|
|
512
|
+
.tinyweb-chat .condense details[open] { display: block; padding: 8px 0 4px; }
|
|
513
|
+
.tinyweb-chat .condense details[open] summary { margin-bottom: 6px; }
|
|
514
|
+
.tinyweb-chat .condense .summary-body {
|
|
515
|
+
white-space: pre-wrap; word-wrap: break-word;
|
|
516
|
+
font-family: ui-monospace, monospace; font-size: 11px;
|
|
517
|
+
color: var(--text); background: var(--bg);
|
|
518
|
+
padding: 6px 8px; border-radius: 4px; border: 1px solid var(--border);
|
|
519
|
+
max-height: 160px; overflow-y: auto;
|
|
520
|
+
}
|
|
521
|
+
.tinyweb-chat .condense .stat { color: var(--text); }
|
|
522
|
+
.tinyweb-chat .condense .arrow { color: var(--muted); margin: 0 2px; }
|
|
523
|
+
@keyframes tinyweb-pulse {
|
|
524
|
+
0%, 100% { opacity: 1; transform: scale(1); }
|
|
525
|
+
50% { opacity: 0.4; transform: scale(0.85); }
|
|
526
|
+
}
|
|
527
|
+
|
|
528
|
+
/* ─────────────────────────────────────────────────────────────────────
|
|
529
|
+
* Friendly tool-call pending row + ToolCard (built-in tool renderers).
|
|
530
|
+
* Replaces the legacy `name(args)` JSON dump with a card-style UI for
|
|
531
|
+
* non-technical users while keeping a "Dữ liệu thô" toggle for devs.
|
|
532
|
+
* ───────────────────────────────────────────────────────────────────── */
|
|
533
|
+
|
|
534
|
+
.tinyweb-chat .tool-pending {
|
|
535
|
+
display: inline-flex; align-items: center; gap: 8px;
|
|
536
|
+
font-size: 12px; color: var(--muted);
|
|
537
|
+
background: var(--panel); border: 1px solid var(--border);
|
|
538
|
+
border-radius: 999px; padding: 5px 12px 5px 10px;
|
|
539
|
+
margin: 0 0 10px;
|
|
540
|
+
max-width: 100%;
|
|
541
|
+
}
|
|
542
|
+
.tinyweb-chat .tool-pending .tool-pending-icon { font-size: 14px; line-height: 1; }
|
|
543
|
+
.tinyweb-chat .tool-pending .tool-pending-text { color: var(--text); }
|
|
544
|
+
.tinyweb-chat .tool-pending .tool-pending-dots {
|
|
545
|
+
display: inline-flex; gap: 3px; margin-left: 2px;
|
|
546
|
+
}
|
|
547
|
+
.tinyweb-chat .tool-pending .tool-pending-dots span {
|
|
548
|
+
width: 4px; height: 4px; border-radius: 50%;
|
|
549
|
+
background: var(--accent);
|
|
550
|
+
animation: tinyweb-dot 1.2s ease-in-out infinite;
|
|
551
|
+
}
|
|
552
|
+
.tinyweb-chat .tool-pending .tool-pending-dots span:nth-child(2) { animation-delay: 0.15s; }
|
|
553
|
+
.tinyweb-chat .tool-pending .tool-pending-dots span:nth-child(3) { animation-delay: 0.30s; }
|
|
554
|
+
.tinyweb-chat .tool-pending .tool-pending-details {
|
|
555
|
+
margin-left: 6px; font-size: 10px; color: var(--muted);
|
|
556
|
+
}
|
|
557
|
+
.tinyweb-chat .tool-pending .tool-pending-details summary {
|
|
558
|
+
cursor: pointer; user-select: none; outline: none;
|
|
559
|
+
list-style: none; opacity: 0.7;
|
|
560
|
+
}
|
|
561
|
+
.tinyweb-chat .tool-pending .tool-pending-details summary::-webkit-details-marker { display: none; }
|
|
562
|
+
.tinyweb-chat .tool-pending .tool-pending-details summary:hover { opacity: 1; }
|
|
563
|
+
.tinyweb-chat .tool-pending .tool-pending-details[open] {
|
|
564
|
+
display: block; width: 100%; padding-top: 6px;
|
|
565
|
+
}
|
|
566
|
+
.tinyweb-chat .tool-pending .tool-pending-details pre {
|
|
567
|
+
font-family: ui-monospace, monospace; font-size: 11px;
|
|
568
|
+
background: var(--bg); border: 1px solid var(--border);
|
|
569
|
+
border-radius: 6px; padding: 6px 8px; margin: 4px 0 0;
|
|
570
|
+
max-height: 160px; overflow: auto; white-space: pre-wrap;
|
|
571
|
+
}
|
|
572
|
+
@keyframes tinyweb-dot {
|
|
573
|
+
0%, 80%, 100% { transform: scale(0.6); opacity: 0.4; }
|
|
574
|
+
40% { transform: scale(1); opacity: 1; }
|
|
575
|
+
}
|
|
576
|
+
/* Standalone "Đang suy nghĩ" pill: no wrapper background/border, just the
|
|
577
|
+
* icon + text + dots. Keeps tool-pending styling for actual tool calls. */
|
|
578
|
+
.tinyweb-chat .tool-pending.thinking-pill {
|
|
579
|
+
background: transparent;
|
|
580
|
+
border: none;
|
|
581
|
+
padding: 5px 0;
|
|
582
|
+
}
|
|
583
|
+
|
|
584
|
+
.tinyweb-chat .msg.tool-card {
|
|
585
|
+
background: var(--panel);
|
|
586
|
+
border: 1px solid var(--border);
|
|
587
|
+
border-radius: 12px;
|
|
588
|
+
padding: 12px 14px;
|
|
589
|
+
margin-bottom: 14px;
|
|
590
|
+
max-width: 720px;
|
|
591
|
+
}
|
|
592
|
+
.tinyweb-chat .tool-card-head {
|
|
593
|
+
display: flex; align-items: center; gap: 10px;
|
|
594
|
+
margin-bottom: 8px;
|
|
595
|
+
}
|
|
596
|
+
.tinyweb-chat .tool-card-icon {
|
|
597
|
+
font-size: 18px; line-height: 1; flex: 0 0 auto;
|
|
598
|
+
width: 28px; height: 28px;
|
|
599
|
+
display: inline-flex; align-items: center; justify-content: center;
|
|
600
|
+
background: rgba(124, 158, 255, 0.1);
|
|
601
|
+
border: 1px solid rgba(124, 158, 255, 0.2);
|
|
602
|
+
border-radius: 8px;
|
|
603
|
+
}
|
|
604
|
+
.tinyweb-chat .tool-card-title-block { flex: 1 1 auto; min-width: 0; }
|
|
605
|
+
.tinyweb-chat .tool-card-title {
|
|
606
|
+
font-size: 13px; font-weight: 600; color: var(--text);
|
|
607
|
+
letter-spacing: -0.005em;
|
|
608
|
+
white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
|
|
609
|
+
}
|
|
610
|
+
.tinyweb-chat .tool-card-sub {
|
|
611
|
+
font-size: 11px; color: var(--muted); margin-top: 1px;
|
|
612
|
+
white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
|
|
613
|
+
}
|
|
614
|
+
.tinyweb-chat .tool-card-head-right {
|
|
615
|
+
flex: 0 0 auto; display: inline-flex; align-items: center; gap: 6px;
|
|
616
|
+
}
|
|
617
|
+
.tinyweb-chat .tool-card-source {
|
|
618
|
+
font-size: 10px; color: var(--muted);
|
|
619
|
+
text-transform: uppercase; letter-spacing: 0.04em;
|
|
620
|
+
padding: 2px 8px; border-radius: 999px;
|
|
621
|
+
border: 1px solid var(--border); background: var(--bg);
|
|
622
|
+
}
|
|
623
|
+
.tinyweb-chat .tool-card-warnings {
|
|
624
|
+
display: flex; flex-wrap: wrap; gap: 4px;
|
|
625
|
+
margin-bottom: 8px;
|
|
626
|
+
}
|
|
627
|
+
.tinyweb-chat .tool-card-warn-chip {
|
|
628
|
+
font-size: 11px; color: #fbbf24;
|
|
629
|
+
border: 1px solid rgba(251, 191, 36, 0.4);
|
|
630
|
+
background: rgba(251, 191, 36, 0.08);
|
|
631
|
+
border-radius: 999px; padding: 2px 8px;
|
|
632
|
+
}
|
|
633
|
+
.tinyweb-chat .tool-card-body { font-size: 13px; }
|
|
634
|
+
|
|
635
|
+
/* Generic tool primitives shared by friendly renderers. */
|
|
636
|
+
.tinyweb-chat .tool-hero-line {
|
|
637
|
+
font-size: 16px; font-weight: 600; color: var(--text);
|
|
638
|
+
margin-bottom: 4px;
|
|
639
|
+
}
|
|
640
|
+
.tinyweb-chat .tool-meta-line {
|
|
641
|
+
font-size: 12px; color: var(--muted);
|
|
642
|
+
}
|
|
643
|
+
.tinyweb-chat .tool-section-label {
|
|
644
|
+
font-size: 10px; color: var(--muted);
|
|
645
|
+
text-transform: uppercase; letter-spacing: 0.04em;
|
|
646
|
+
margin: 8px 0 4px; font-weight: 600;
|
|
647
|
+
}
|
|
648
|
+
.tinyweb-chat .tool-chip-row {
|
|
649
|
+
display: flex; flex-wrap: wrap; gap: 6px; margin-top: 6px;
|
|
650
|
+
}
|
|
651
|
+
.tinyweb-chat .tool-chip {
|
|
652
|
+
font-size: 11px; color: var(--text);
|
|
653
|
+
background: var(--bg); border: 1px solid var(--border);
|
|
654
|
+
border-radius: 999px; padding: 2px 9px;
|
|
655
|
+
}
|
|
656
|
+
.tinyweb-chat .tool-chip.subtle { color: var(--muted); }
|
|
657
|
+
|
|
658
|
+
.tinyweb-chat .tool-list { display: flex; flex-direction: column; gap: 6px; }
|
|
659
|
+
.tinyweb-chat .tool-row {
|
|
660
|
+
display: flex; align-items: center; justify-content: space-between;
|
|
661
|
+
gap: 10px; padding: 6px 10px;
|
|
662
|
+
background: var(--bg); border: 1px solid var(--border);
|
|
663
|
+
border-radius: 8px;
|
|
664
|
+
}
|
|
665
|
+
.tinyweb-chat .tool-row-label { font-weight: 600; color: var(--text); }
|
|
666
|
+
.tinyweb-chat .tool-row-value {
|
|
667
|
+
font-family: ui-monospace, monospace; font-size: 13px; color: var(--accent-2);
|
|
668
|
+
}
|
|
669
|
+
.tinyweb-chat .tool-row.tool-row-stacked {
|
|
670
|
+
flex-direction: column; align-items: stretch; gap: 4px;
|
|
671
|
+
}
|
|
672
|
+
.tinyweb-chat .tool-row-head {
|
|
673
|
+
display: flex; align-items: center; justify-content: space-between; gap: 8px;
|
|
674
|
+
}
|
|
675
|
+
.tinyweb-chat .tool-row-sub { font-size: 11px; color: var(--muted); }
|
|
676
|
+
.tinyweb-chat .tool-row-prices {
|
|
677
|
+
display: flex; gap: 12px; flex-wrap: wrap; margin-top: 2px;
|
|
678
|
+
}
|
|
679
|
+
.tinyweb-chat .tool-price {
|
|
680
|
+
font-family: ui-monospace, monospace; font-size: 13px; color: var(--text);
|
|
681
|
+
}
|
|
682
|
+
.tinyweb-chat .tool-price em {
|
|
683
|
+
font-style: normal; font-family: inherit; font-size: 10px;
|
|
684
|
+
text-transform: uppercase; letter-spacing: 0.04em;
|
|
685
|
+
color: var(--muted); margin-right: 4px;
|
|
686
|
+
}
|
|
687
|
+
|
|
688
|
+
/* Lottery numbers. */
|
|
689
|
+
.tinyweb-chat .tool-lottery-numbers {
|
|
690
|
+
display: flex; flex-wrap: wrap; gap: 4px; margin-top: 4px;
|
|
691
|
+
}
|
|
692
|
+
.tinyweb-chat .tool-lottery-num {
|
|
693
|
+
font-family: ui-monospace, monospace; font-size: 12px;
|
|
694
|
+
font-weight: 600; color: var(--text);
|
|
695
|
+
background: var(--panel); border: 1px solid var(--border);
|
|
696
|
+
border-radius: 4px; padding: 2px 6px;
|
|
697
|
+
}
|
|
698
|
+
|
|
699
|
+
/* Perplexity answer + citations. */
|
|
700
|
+
.tinyweb-chat .tool-answer {
|
|
701
|
+
font-size: 13px; color: var(--text);
|
|
702
|
+
word-wrap: break-word;
|
|
703
|
+
}
|
|
704
|
+
.tinyweb-chat .tool-answer.tool-answer-md p { margin: 0 0 6px 0; line-height: 1.5; }
|
|
705
|
+
.tinyweb-chat .tool-answer.tool-answer-md p:last-child { margin-bottom: 0; }
|
|
706
|
+
.tinyweb-chat .tool-answer.tool-answer-md h1,
|
|
707
|
+
.tinyweb-chat .tool-answer.tool-answer-md h2,
|
|
708
|
+
.tinyweb-chat .tool-answer.tool-answer-md h3,
|
|
709
|
+
.tinyweb-chat .tool-answer.tool-answer-md h4 {
|
|
710
|
+
margin: 8px 0 4px 0; font-weight: 600; line-height: 1.3;
|
|
711
|
+
}
|
|
712
|
+
.tinyweb-chat .tool-answer.tool-answer-md h1 { font-size: 15px; }
|
|
713
|
+
.tinyweb-chat .tool-answer.tool-answer-md h2 { font-size: 14px; }
|
|
714
|
+
.tinyweb-chat .tool-answer.tool-answer-md h3,
|
|
715
|
+
.tinyweb-chat .tool-answer.tool-answer-md h4 { font-size: 13px; }
|
|
716
|
+
.tinyweb-chat .tool-answer.tool-answer-md ul,
|
|
717
|
+
.tinyweb-chat .tool-answer.tool-answer-md ol {
|
|
718
|
+
margin: 4px 0 6px 0; padding-left: 20px;
|
|
719
|
+
}
|
|
720
|
+
.tinyweb-chat .tool-answer.tool-answer-md li { margin: 2px 0; line-height: 1.5; }
|
|
721
|
+
.tinyweb-chat .tool-answer.tool-answer-md a {
|
|
722
|
+
color: var(--accent); text-decoration: underline; text-underline-offset: 2px;
|
|
723
|
+
}
|
|
724
|
+
.tinyweb-chat .tool-answer.tool-answer-md strong { font-weight: 600; }
|
|
725
|
+
.tinyweb-chat .tool-answer.tool-answer-md code {
|
|
726
|
+
font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
|
|
727
|
+
font-size: 12px;
|
|
728
|
+
background: var(--bubble-2, rgba(255,255,255,0.06));
|
|
729
|
+
padding: 1px 4px; border-radius: 3px;
|
|
730
|
+
}
|
|
731
|
+
.tinyweb-chat .tool-answer.tool-answer-md pre {
|
|
732
|
+
margin: 6px 0;
|
|
733
|
+
padding: 8px 10px;
|
|
734
|
+
background: var(--bubble-2, rgba(255,255,255,0.06));
|
|
735
|
+
border-radius: 4px;
|
|
736
|
+
overflow-x: auto;
|
|
737
|
+
}
|
|
738
|
+
.tinyweb-chat .tool-answer.tool-answer-md pre code {
|
|
739
|
+
background: transparent; padding: 0; border-radius: 0;
|
|
740
|
+
}
|
|
741
|
+
.tinyweb-chat .tool-citations { margin-top: 8px; }
|
|
742
|
+
.tinyweb-chat .tool-citations-list {
|
|
743
|
+
margin: 0; padding-left: 20px;
|
|
744
|
+
display: flex; flex-direction: column; gap: 2px;
|
|
745
|
+
}
|
|
746
|
+
.tinyweb-chat .tool-citations-list li { font-size: 12px; }
|
|
747
|
+
.tinyweb-chat .tool-citations-list a {
|
|
748
|
+
color: var(--accent); text-decoration: underline; text-underline-offset: 2px;
|
|
749
|
+
}
|
|
750
|
+
.tinyweb-chat .tool-cite-host {
|
|
751
|
+
font-size: 10px; color: var(--muted); margin-left: 4px;
|
|
752
|
+
}
|
|
753
|
+
|
|
754
|
+
/* web_search list. */
|
|
755
|
+
.tinyweb-chat .tool-search-list {
|
|
756
|
+
margin: 0; padding: 0; list-style: none;
|
|
757
|
+
display: flex; flex-direction: column; gap: 8px;
|
|
758
|
+
}
|
|
759
|
+
.tinyweb-chat .tool-search-item {
|
|
760
|
+
display: flex; flex-direction: column; gap: 2px;
|
|
761
|
+
}
|
|
762
|
+
.tinyweb-chat .tool-search-title {
|
|
763
|
+
color: var(--accent); font-size: 13px; font-weight: 500;
|
|
764
|
+
text-decoration: none; line-height: 1.3;
|
|
765
|
+
}
|
|
766
|
+
.tinyweb-chat .tool-search-title:hover { text-decoration: underline; }
|
|
767
|
+
.tinyweb-chat .tool-search-host {
|
|
768
|
+
font-size: 10px; color: var(--accent-2);
|
|
769
|
+
}
|
|
770
|
+
.tinyweb-chat .tool-search-snippet {
|
|
771
|
+
font-size: 12px; color: var(--muted); line-height: 1.4;
|
|
772
|
+
}
|
|
773
|
+
|
|
774
|
+
/* web_fetch preview. */
|
|
775
|
+
.tinyweb-chat .tool-fetch-preview {
|
|
776
|
+
margin-top: 8px; font-size: 12px; color: var(--text);
|
|
777
|
+
background: var(--bg); border: 1px solid var(--border);
|
|
778
|
+
border-radius: 6px; padding: 8px 10px;
|
|
779
|
+
max-height: 220px; overflow: auto;
|
|
780
|
+
white-space: pre-wrap; word-wrap: break-word; line-height: 1.5;
|
|
781
|
+
}
|
|
782
|
+
|
|
783
|
+
/* Realtime call button (Composer). Sits next to the paperclip.
|
|
784
|
+
* Hidden unless `TinywebChatProps.realtime` is provided — see plan 0014 §9. */
|
|
785
|
+
.tinyweb-chat .call-btn {
|
|
786
|
+
flex: 0 0 auto; width: 32px; height: 32px; padding: 0;
|
|
787
|
+
display: inline-flex; align-items: center; justify-content: center;
|
|
788
|
+
border-radius: 50%;
|
|
789
|
+
background: transparent;
|
|
790
|
+
color: var(--muted);
|
|
791
|
+
border: 0;
|
|
792
|
+
cursor: pointer;
|
|
793
|
+
transition: color 0.15s ease, background 0.15s ease;
|
|
794
|
+
}
|
|
795
|
+
.tinyweb-chat .call-btn:hover:not(:disabled) {
|
|
796
|
+
color: var(--text); background: var(--border);
|
|
797
|
+
}
|
|
798
|
+
.tinyweb-chat .call-btn:disabled { opacity: 0.4; cursor: not-allowed; }
|
|
799
|
+
.tinyweb-chat .call-btn svg { width: 18px; height: 18px; flex: 0 0 auto; display: block; }
|
|
800
|
+
|
|
801
|
+
/* Realtime call — INLINE voice panel. Plan 0019 (halo orb v1).
|
|
802
|
+
*
|
|
803
|
+
* Lives INSIDE the `.chat` section, replacing the transcript +
|
|
804
|
+
* composer while a call is active. The visual stack:
|
|
805
|
+
*
|
|
806
|
+
* [status pill]
|
|
807
|
+
* [halo orb stage] ← three breathing rings + black core + specular
|
|
808
|
+
* [hero copy]
|
|
809
|
+
* [transcript one-liners]
|
|
810
|
+
* [keyboard | mic FAB + ripple | close]
|
|
811
|
+
*
|
|
812
|
+
* Animation is driven entirely by the single `--rt-level` (0..1) CSS
|
|
813
|
+
* custom property that `RealtimeOrb`'s RAF writes once per frame, plus
|
|
814
|
+
* a `data-speaker="idle|user|agent"` attribute for tinting. No canvas,
|
|
815
|
+
* no WebGL — pure transform/opacity composited animation.
|
|
816
|
+
*/
|
|
817
|
+
|
|
818
|
+
/* Theme tokens — overridable via the `ChatTheme.realtime` prop. */
|
|
819
|
+
.tinyweb-chat {
|
|
820
|
+
--rt-bg-from: #0a0e2a;
|
|
821
|
+
--rt-bg-to: #050818;
|
|
822
|
+
--rt-halo-1: rgba(146, 130, 220, 0.34);
|
|
823
|
+
--rt-halo-2: rgba(146, 130, 220, 0.22);
|
|
824
|
+
--rt-halo-3: rgba(146, 130, 220, 0.14);
|
|
825
|
+
--rt-core: #06070d;
|
|
826
|
+
--rt-specular: rgba(120, 140, 255, 0.55);
|
|
827
|
+
--rt-accent: #b9aef0;
|
|
828
|
+
--rt-mic-bg: #0d1024;
|
|
829
|
+
--rt-mic-fg: #ffffff;
|
|
830
|
+
}
|
|
831
|
+
|
|
832
|
+
/* Realtime stage wrapper. Hosts the call panel and the optional
|
|
833
|
+
* developer debug sidebar side-by-side. The wrapper is the flex child
|
|
834
|
+
* of `.chat`; both the panel and the sidebar flex inside it.
|
|
835
|
+
*/
|
|
836
|
+
.tinyweb-chat .realtime-stage-wrap {
|
|
837
|
+
flex: 1 1 auto;
|
|
838
|
+
min-height: 0;
|
|
839
|
+
display: flex;
|
|
840
|
+
flex-direction: row;
|
|
841
|
+
align-items: stretch;
|
|
842
|
+
width: 100%;
|
|
843
|
+
}
|
|
844
|
+
|
|
845
|
+
.tinyweb-chat .realtime-inline-panel {
|
|
846
|
+
position: relative;
|
|
847
|
+
flex: 1 1 auto;
|
|
848
|
+
min-width: 0;
|
|
849
|
+
min-height: 0;
|
|
850
|
+
display: flex;
|
|
851
|
+
flex-direction: column;
|
|
852
|
+
align-items: stretch;
|
|
853
|
+
color: #e9e6f7;
|
|
854
|
+
background: linear-gradient(180deg, var(--rt-bg-from) 0%, var(--rt-bg-to) 100%);
|
|
855
|
+
padding: 20px 18px 22px;
|
|
856
|
+
gap: 14px;
|
|
857
|
+
}
|
|
858
|
+
|
|
859
|
+
/* Right-side developer debug sidebar inside the realtime stage. Hosts
|
|
860
|
+
* a mini Transcript that mirrors the chat's nodes — voice turns are
|
|
861
|
+
* piped through `applyEvent` from the overlay so the standard tool
|
|
862
|
+
* renderers light up while a call is active. */
|
|
863
|
+
.tinyweb-chat .realtime-debug-side {
|
|
864
|
+
flex: 0 0 360px;
|
|
865
|
+
min-width: 0;
|
|
866
|
+
min-height: 0;
|
|
867
|
+
display: flex;
|
|
868
|
+
flex-direction: column;
|
|
869
|
+
background: #0a0c14;
|
|
870
|
+
border-left: 1px solid var(--border);
|
|
871
|
+
color: var(--text);
|
|
872
|
+
}
|
|
873
|
+
.tinyweb-chat .realtime-debug-side .realtime-debug-head {
|
|
874
|
+
padding: 10px 14px;
|
|
875
|
+
font-size: 12px;
|
|
876
|
+
letter-spacing: 0.06em;
|
|
877
|
+
text-transform: uppercase;
|
|
878
|
+
color: var(--muted);
|
|
879
|
+
border-bottom: 1px solid var(--border);
|
|
880
|
+
background: #06080f;
|
|
881
|
+
}
|
|
882
|
+
.tinyweb-chat .realtime-debug-side .transcript {
|
|
883
|
+
flex: 1 1 auto;
|
|
884
|
+
min-height: 0;
|
|
885
|
+
overflow-y: auto;
|
|
886
|
+
}
|
|
887
|
+
|
|
888
|
+
/* Bug toggle pinned to the top-right of the call panel. */
|
|
889
|
+
.tinyweb-chat .realtime-debug-toggle {
|
|
890
|
+
position: absolute;
|
|
891
|
+
top: 12px;
|
|
892
|
+
right: 12px;
|
|
893
|
+
z-index: 3;
|
|
894
|
+
width: 32px;
|
|
895
|
+
height: 32px;
|
|
896
|
+
padding: 0;
|
|
897
|
+
display: inline-flex;
|
|
898
|
+
align-items: center;
|
|
899
|
+
justify-content: center;
|
|
900
|
+
border-radius: 50%;
|
|
901
|
+
background: rgba(255, 255, 255, 0.05);
|
|
902
|
+
color: rgba(233, 230, 247, 0.7);
|
|
903
|
+
border: 1px solid rgba(255, 255, 255, 0.1);
|
|
904
|
+
cursor: pointer;
|
|
905
|
+
transition: color 120ms ease, background 120ms ease, border-color 120ms ease;
|
|
906
|
+
}
|
|
907
|
+
.tinyweb-chat .realtime-debug-toggle:hover {
|
|
908
|
+
color: #fff;
|
|
909
|
+
background: rgba(255, 255, 255, 0.1);
|
|
910
|
+
border-color: rgba(255, 255, 255, 0.2);
|
|
911
|
+
}
|
|
912
|
+
.tinyweb-chat .realtime-debug-toggle.is-open {
|
|
913
|
+
color: var(--accent);
|
|
914
|
+
border-color: var(--accent);
|
|
915
|
+
}
|
|
916
|
+
|
|
917
|
+
/* Wireframe-orb variant: panel goes near-black so the wireframe lines
|
|
918
|
+
* + dust read as luminous against a void (matches the demo gallery).
|
|
919
|
+
*
|
|
920
|
+
* Background: large soft radial centred at 50% 30% — same pattern the
|
|
921
|
+
* `3d-effects-gallery` reference uses for its dark stage. A faint cool
|
|
922
|
+
* tint at the focal point fades into pure black at the panel corners,
|
|
923
|
+
* so the orb sits on a luminous-but-quiet void. */
|
|
924
|
+
.tinyweb-chat .realtime-inline-panel--wire {
|
|
925
|
+
background:
|
|
926
|
+
radial-gradient(
|
|
927
|
+
1200px 800px at 50% 30%,
|
|
928
|
+
#0c0c1a 0%,
|
|
929
|
+
#050507 60%,
|
|
930
|
+
#000000 100%
|
|
931
|
+
);
|
|
932
|
+
overflow: hidden;
|
|
933
|
+
}
|
|
934
|
+
.tinyweb-chat .realtime-inline-panel--wire .realtime-status,
|
|
935
|
+
.tinyweb-chat .realtime-inline-panel--wire .realtime-hero,
|
|
936
|
+
.tinyweb-chat .realtime-inline-panel--wire .realtime-transcripts,
|
|
937
|
+
.tinyweb-chat .realtime-inline-panel--wire .realtime-inline-footer,
|
|
938
|
+
.tinyweb-chat .realtime-inline-panel--wire .realtime-stage {
|
|
939
|
+
position: relative;
|
|
940
|
+
z-index: 2;
|
|
941
|
+
}
|
|
942
|
+
.tinyweb-chat .realtime-stage--wire {
|
|
943
|
+
flex: 1 1 auto;
|
|
944
|
+
min-height: 0;
|
|
945
|
+
pointer-events: none;
|
|
946
|
+
}
|
|
947
|
+
|
|
948
|
+
/* Expanded mode pulls the 2-column history right under the hero copy so the
|
|
949
|
+
* messages read as living inside the orb. Compact mode keeps the default
|
|
950
|
+
* flexible spacer so the single live line stays anchored at the bottom,
|
|
951
|
+
* just above the 3 footer FAB controls (keyboard / mic / close). */
|
|
952
|
+
.tinyweb-chat .realtime-inline-panel--wire:has(.realtime-recents.is-expanded) .realtime-stage--wire {
|
|
953
|
+
flex: 0 0 2vh;
|
|
954
|
+
}
|
|
955
|
+
.tinyweb-chat .realtime-recents.is-expanded {
|
|
956
|
+
margin-top: 0;
|
|
957
|
+
margin-bottom: auto;
|
|
958
|
+
}
|
|
959
|
+
.tinyweb-chat .realtime-recents.is-compact {
|
|
960
|
+
margin-top: 0;
|
|
961
|
+
margin-bottom: auto;
|
|
962
|
+
}
|
|
963
|
+
|
|
964
|
+
/* ---------------------------------------------------------------- *
|
|
965
|
+
* Wire-variant controls — STANDALONE redesign. No inheritance from
|
|
966
|
+
* the default purple/ripple footer. Three equal frosted-glass circles
|
|
967
|
+
* floating in the void, with the mic visually anchored by a subtle
|
|
968
|
+
* inner glow that breathes with the audio level (var --rt-level).
|
|
969
|
+
* No concentric rings — the orb already does the radiating motion.
|
|
970
|
+
* ---------------------------------------------------------------- */
|
|
971
|
+
|
|
972
|
+
/* Status pill: monochrome glass, uppercase mono. */
|
|
973
|
+
.tinyweb-chat .realtime-inline-panel--wire .realtime-status {
|
|
974
|
+
background: rgba(255, 255, 255, 0.04);
|
|
975
|
+
border: 1px solid rgba(255, 255, 255, 0.08);
|
|
976
|
+
color: rgba(255, 255, 255, 0.82);
|
|
977
|
+
font-size: 12px;
|
|
978
|
+
letter-spacing: 0.08em;
|
|
979
|
+
text-transform: uppercase;
|
|
980
|
+
font-weight: 500;
|
|
981
|
+
padding: 5px 14px;
|
|
982
|
+
}
|
|
983
|
+
.tinyweb-chat .realtime-inline-panel--wire .realtime-status-connecting {
|
|
984
|
+
color: rgba(255, 255, 255, 0.6);
|
|
985
|
+
}
|
|
986
|
+
.tinyweb-chat .realtime-inline-panel--wire .realtime-status-error {
|
|
987
|
+
color: #ffb3b3;
|
|
988
|
+
border-color: rgba(255, 120, 120, 0.35);
|
|
989
|
+
}
|
|
990
|
+
|
|
991
|
+
/* Hero copy: lighter weight, looser tracking so it floats over the void. */
|
|
992
|
+
.tinyweb-chat .realtime-inline-panel--wire .realtime-hero {
|
|
993
|
+
color: rgba(255, 255, 255, 0.92);
|
|
994
|
+
font-weight: 400;
|
|
995
|
+
font-size: 18px;
|
|
996
|
+
letter-spacing: 0.005em;
|
|
997
|
+
}
|
|
998
|
+
|
|
999
|
+
/* Footer: 3 equal circles in a row. */
|
|
1000
|
+
.tinyweb-chat .realtime-inline-panel--wire .realtime-inline-footer {
|
|
1001
|
+
display: flex;
|
|
1002
|
+
align-items: center;
|
|
1003
|
+
justify-content: center;
|
|
1004
|
+
gap: 26px;
|
|
1005
|
+
padding: 14px 0 22px;
|
|
1006
|
+
}
|
|
1007
|
+
|
|
1008
|
+
/* Kill the legacy ripple rings — wire variant has none. */
|
|
1009
|
+
.tinyweb-chat .realtime-inline-panel--wire .realtime-mic-ripple {
|
|
1010
|
+
display: none;
|
|
1011
|
+
}
|
|
1012
|
+
|
|
1013
|
+
/* Collapse the .realtime-mic-stack wrapper so the FAB sits inline with
|
|
1014
|
+
* the other two icon buttons (3 equal circles in the flex row). */
|
|
1015
|
+
.tinyweb-chat .realtime-inline-panel--wire .realtime-mic-stack {
|
|
1016
|
+
display: contents;
|
|
1017
|
+
}
|
|
1018
|
+
|
|
1019
|
+
/* Unified glass circle — applied to ALL three footer buttons so they
|
|
1020
|
+
* read as one family. The mic is distinguished only by an inner accent
|
|
1021
|
+
* dot that breathes with the audio level. */
|
|
1022
|
+
.tinyweb-chat .realtime-inline-panel--wire .realtime-icon-btn,
|
|
1023
|
+
.tinyweb-chat .realtime-inline-panel--wire .realtime-mic-fab {
|
|
1024
|
+
position: relative;
|
|
1025
|
+
width: 56px;
|
|
1026
|
+
height: 56px;
|
|
1027
|
+
border-radius: 50%;
|
|
1028
|
+
display: inline-flex;
|
|
1029
|
+
align-items: center;
|
|
1030
|
+
justify-content: center;
|
|
1031
|
+
background: rgba(255, 255, 255, 0.05);
|
|
1032
|
+
border: 1px solid rgba(255, 255, 255, 0.14);
|
|
1033
|
+
color: rgba(255, 255, 255, 0.88);
|
|
1034
|
+
backdrop-filter: blur(14px) saturate(140%);
|
|
1035
|
+
-webkit-backdrop-filter: blur(14px) saturate(140%);
|
|
1036
|
+
box-shadow:
|
|
1037
|
+
inset 0 1px 0 rgba(255, 255, 255, 0.08),
|
|
1038
|
+
inset 0 0 0 1px rgba(255, 255, 255, 0.02),
|
|
1039
|
+
0 10px 28px rgba(0, 0, 0, 0.45);
|
|
1040
|
+
cursor: pointer;
|
|
1041
|
+
transition:
|
|
1042
|
+
background 200ms ease,
|
|
1043
|
+
border-color 200ms ease,
|
|
1044
|
+
color 200ms ease,
|
|
1045
|
+
transform 140ms ease,
|
|
1046
|
+
box-shadow 200ms ease;
|
|
1047
|
+
}
|
|
1048
|
+
.tinyweb-chat .realtime-inline-panel--wire .realtime-icon-btn:hover:not(:disabled),
|
|
1049
|
+
.tinyweb-chat .realtime-inline-panel--wire .realtime-mic-fab:hover:not(:disabled) {
|
|
1050
|
+
background: rgba(255, 255, 255, 0.10);
|
|
1051
|
+
border-color: rgba(255, 255, 255, 0.28);
|
|
1052
|
+
color: #ffffff;
|
|
1053
|
+
transform: translateY(-1px);
|
|
1054
|
+
box-shadow:
|
|
1055
|
+
inset 0 1px 0 rgba(255, 255, 255, 0.14),
|
|
1056
|
+
inset 0 0 0 1px rgba(255, 255, 255, 0.04),
|
|
1057
|
+
0 14px 34px rgba(0, 0, 0, 0.5);
|
|
1058
|
+
}
|
|
1059
|
+
.tinyweb-chat .realtime-inline-panel--wire .realtime-icon-btn:active:not(:disabled),
|
|
1060
|
+
.tinyweb-chat .realtime-inline-panel--wire .realtime-mic-fab:active:not(:disabled) {
|
|
1061
|
+
transform: translateY(0);
|
|
1062
|
+
}
|
|
1063
|
+
.tinyweb-chat .realtime-inline-panel--wire .realtime-icon-btn:disabled,
|
|
1064
|
+
.tinyweb-chat .realtime-inline-panel--wire .realtime-mic-fab:disabled {
|
|
1065
|
+
opacity: 0.4;
|
|
1066
|
+
cursor: not-allowed;
|
|
1067
|
+
}
|
|
1068
|
+
.tinyweb-chat .realtime-inline-panel--wire .realtime-icon-btn svg,
|
|
1069
|
+
.tinyweb-chat .realtime-inline-panel--wire .realtime-mic-fab svg {
|
|
1070
|
+
width: 20px;
|
|
1071
|
+
height: 20px;
|
|
1072
|
+
}
|
|
1073
|
+
|
|
1074
|
+
/* Close button: tints red on hover. */
|
|
1075
|
+
.tinyweb-chat .realtime-inline-panel--wire .realtime-icon-btn--close:hover:not(:disabled) {
|
|
1076
|
+
background: rgba(255, 110, 110, 0.10);
|
|
1077
|
+
border-color: rgba(255, 140, 140, 0.40);
|
|
1078
|
+
color: #ffd6d6;
|
|
1079
|
+
box-shadow:
|
|
1080
|
+
inset 0 1px 0 rgba(255, 200, 200, 0.10),
|
|
1081
|
+
0 14px 34px rgba(0, 0, 0, 0.5);
|
|
1082
|
+
}
|
|
1083
|
+
|
|
1084
|
+
/* Mic FAB: same shell + a soft inner radial glow that breathes with the
|
|
1085
|
+
* audio level. We piggyback on --rt-level (set on the orb wrapper) by
|
|
1086
|
+
* also reading it on the panel root via the same custom-prop fallback. */
|
|
1087
|
+
.tinyweb-chat .realtime-inline-panel--wire .realtime-mic-fab {
|
|
1088
|
+
background:
|
|
1089
|
+
radial-gradient(
|
|
1090
|
+
circle at 50% 50%,
|
|
1091
|
+
rgba(255, 255, 255, calc(0.14 + var(--rt-level, 0) * 0.18)) 0%,
|
|
1092
|
+
rgba(255, 255, 255, 0.06) 40%,
|
|
1093
|
+
rgba(255, 255, 255, 0.03) 100%
|
|
1094
|
+
);
|
|
1095
|
+
border-color: rgba(255, 255, 255, 0.22);
|
|
1096
|
+
}
|
|
1097
|
+
.tinyweb-chat .realtime-inline-panel--wire .realtime-mic-fab:hover:not(:disabled) {
|
|
1098
|
+
background:
|
|
1099
|
+
radial-gradient(
|
|
1100
|
+
circle at 50% 50%,
|
|
1101
|
+
rgba(255, 255, 255, calc(0.24 + var(--rt-level, 0) * 0.18)) 0%,
|
|
1102
|
+
rgba(255, 255, 255, 0.10) 40%,
|
|
1103
|
+
rgba(255, 255, 255, 0.04) 100%
|
|
1104
|
+
);
|
|
1105
|
+
border-color: rgba(255, 255, 255, 0.40);
|
|
1106
|
+
}
|
|
1107
|
+
|
|
1108
|
+
/* Muted state: warm red wash + persistent ring so the user can read the
|
|
1109
|
+
* status at a glance without scanning the icon. */
|
|
1110
|
+
.tinyweb-chat .realtime-inline-panel--wire .realtime-mic-fab[aria-pressed="true"] {
|
|
1111
|
+
background:
|
|
1112
|
+
radial-gradient(
|
|
1113
|
+
circle at 50% 50%,
|
|
1114
|
+
rgba(255, 120, 120, 0.22) 0%,
|
|
1115
|
+
rgba(255, 90, 90, 0.08) 50%,
|
|
1116
|
+
rgba(255, 70, 70, 0.03) 100%
|
|
1117
|
+
);
|
|
1118
|
+
border-color: rgba(255, 140, 140, 0.45);
|
|
1119
|
+
color: #ffd6d6;
|
|
1120
|
+
box-shadow:
|
|
1121
|
+
inset 0 1px 0 rgba(255, 200, 200, 0.10),
|
|
1122
|
+
0 10px 28px rgba(0, 0, 0, 0.45),
|
|
1123
|
+
0 0 20px rgba(255, 110, 110, 0.18);
|
|
1124
|
+
}
|
|
1125
|
+
.tinyweb-chat .realtime-inline-panel--wire .realtime-mic-fab[aria-pressed="true"]:hover:not(:disabled) {
|
|
1126
|
+
border-color: rgba(255, 160, 160, 0.65);
|
|
1127
|
+
box-shadow:
|
|
1128
|
+
inset 0 1px 0 rgba(255, 200, 200, 0.16),
|
|
1129
|
+
0 14px 34px rgba(0, 0, 0, 0.5),
|
|
1130
|
+
0 0 28px rgba(255, 110, 110, 0.28);
|
|
1131
|
+
}
|
|
1132
|
+
|
|
1133
|
+
/* Top status pill — centered, aria-live region. */
|
|
1134
|
+
.tinyweb-chat .realtime-status {
|
|
1135
|
+
align-self: center;
|
|
1136
|
+
font-size: 13px;
|
|
1137
|
+
letter-spacing: 0.01em;
|
|
1138
|
+
padding: 6px 16px;
|
|
1139
|
+
border-radius: 999px;
|
|
1140
|
+
background: rgba(255, 255, 255, 0.05);
|
|
1141
|
+
color: rgba(233, 230, 247, 0.85);
|
|
1142
|
+
border: 1px solid rgba(255, 255, 255, 0.06);
|
|
1143
|
+
backdrop-filter: blur(8px);
|
|
1144
|
+
-webkit-backdrop-filter: blur(8px);
|
|
1145
|
+
}
|
|
1146
|
+
.tinyweb-chat .realtime-status-connecting { color: var(--rt-accent); }
|
|
1147
|
+
.tinyweb-chat .realtime-status-ending { color: rgba(255, 200, 120, 0.95); }
|
|
1148
|
+
.tinyweb-chat .realtime-status-error {
|
|
1149
|
+
color: #ffb3b3;
|
|
1150
|
+
border-color: rgba(255, 90, 90, 0.4);
|
|
1151
|
+
background: rgba(255, 90, 90, 0.10);
|
|
1152
|
+
}
|
|
1153
|
+
|
|
1154
|
+
/* Stage that centers the halo orb. */
|
|
1155
|
+
.tinyweb-chat .realtime-stage {
|
|
1156
|
+
flex: 1 1 auto;
|
|
1157
|
+
min-height: 0;
|
|
1158
|
+
display: flex;
|
|
1159
|
+
align-items: center;
|
|
1160
|
+
justify-content: center;
|
|
1161
|
+
padding: 8px 0;
|
|
1162
|
+
}
|
|
1163
|
+
.tinyweb-chat .realtime-orb-wrap {
|
|
1164
|
+
position: relative;
|
|
1165
|
+
display: flex;
|
|
1166
|
+
align-items: center;
|
|
1167
|
+
justify-content: center;
|
|
1168
|
+
width: 100%;
|
|
1169
|
+
max-width: 320px;
|
|
1170
|
+
aspect-ratio: 1 / 1;
|
|
1171
|
+
}
|
|
1172
|
+
|
|
1173
|
+
/* Wireframe-orb wrap — full-bleed inside the realtime panel so the
|
|
1174
|
+
* dust halo has room to extend well past the sphere boundary (matches
|
|
1175
|
+
* the standalone demo). The wrap escapes the parent stage's padding
|
|
1176
|
+
* by positioning absolutely; the stage itself is treated purely as a
|
|
1177
|
+
* positioning anchor for the orb backdrop. */
|
|
1178
|
+
.tinyweb-chat .realtime-orb-wrap--wire {
|
|
1179
|
+
position: absolute;
|
|
1180
|
+
inset: 0;
|
|
1181
|
+
max-width: none;
|
|
1182
|
+
aspect-ratio: auto;
|
|
1183
|
+
width: auto;
|
|
1184
|
+
z-index: 0;
|
|
1185
|
+
}
|
|
1186
|
+
.tinyweb-chat .wire-orb-effect {
|
|
1187
|
+
width: 100%;
|
|
1188
|
+
height: 100%;
|
|
1189
|
+
pointer-events: none;
|
|
1190
|
+
}
|
|
1191
|
+
.tinyweb-chat .wire-orb-effect canvas {
|
|
1192
|
+
display: block;
|
|
1193
|
+
width: 100% !important;
|
|
1194
|
+
height: 100% !important;
|
|
1195
|
+
background: transparent;
|
|
1196
|
+
}
|
|
1197
|
+
|
|
1198
|
+
/* The orb itself. Square box. Halos absolutely stacked at center.
|
|
1199
|
+
* v2 (plan 0019 §3.5): hosts a full-bleed <Canvas> for the R3F ripple
|
|
1200
|
+
* in `.realtime-orb__canvas`. The halos persist as a soft backdrop. */
|
|
1201
|
+
.tinyweb-chat .realtime-orb {
|
|
1202
|
+
position: relative;
|
|
1203
|
+
width: 240px;
|
|
1204
|
+
height: 240px;
|
|
1205
|
+
max-width: 100%;
|
|
1206
|
+
max-height: 100%;
|
|
1207
|
+
display: grid;
|
|
1208
|
+
place-items: center;
|
|
1209
|
+
--rt-level: 0;
|
|
1210
|
+
}
|
|
1211
|
+
|
|
1212
|
+
/* Full-bleed canvas container for the R3F ripple. Positioned absolute
|
|
1213
|
+
* over the entire orb so the 3D scene fills the available space. The
|
|
1214
|
+
* pointer-events are disabled because the orb itself is decorative;
|
|
1215
|
+
* interactions happen at the mic FAB. */
|
|
1216
|
+
.tinyweb-chat .realtime-orb__canvas {
|
|
1217
|
+
position: absolute;
|
|
1218
|
+
inset: 0;
|
|
1219
|
+
border-radius: 50%;
|
|
1220
|
+
overflow: hidden;
|
|
1221
|
+
pointer-events: none;
|
|
1222
|
+
/* The canvas grows/shrinks with --rt-level — gives a subtle "the
|
|
1223
|
+
* sound is pushing toward the viewer" feel without recomputing
|
|
1224
|
+
* shader uniforms. */
|
|
1225
|
+
transform: scale(calc(0.96 + var(--rt-level, 0) * 0.06));
|
|
1226
|
+
transition: transform 120ms ease-out;
|
|
1227
|
+
z-index: 1;
|
|
1228
|
+
}
|
|
1229
|
+
.tinyweb-chat .realtime-orb__canvas canvas {
|
|
1230
|
+
display: block;
|
|
1231
|
+
width: 100% !important;
|
|
1232
|
+
height: 100% !important;
|
|
1233
|
+
background: transparent;
|
|
1234
|
+
}
|
|
1235
|
+
|
|
1236
|
+
/* Halo rings. Three concentric translucent circles. Each scales and
|
|
1237
|
+
* brightens with --rt-level; blur softens at low levels. */
|
|
1238
|
+
.tinyweb-chat .realtime-orb__halo {
|
|
1239
|
+
position: absolute;
|
|
1240
|
+
top: 50%;
|
|
1241
|
+
left: 50%;
|
|
1242
|
+
border-radius: 50%;
|
|
1243
|
+
pointer-events: none;
|
|
1244
|
+
transition:
|
|
1245
|
+
opacity 280ms ease,
|
|
1246
|
+
background-color 280ms ease,
|
|
1247
|
+
filter 280ms ease;
|
|
1248
|
+
will-change: transform, opacity, filter;
|
|
1249
|
+
}
|
|
1250
|
+
.tinyweb-chat .realtime-orb__halo--1 {
|
|
1251
|
+
width: 64%;
|
|
1252
|
+
height: 64%;
|
|
1253
|
+
background: var(--rt-halo-1);
|
|
1254
|
+
transform: translate(-50%, -50%) scale(calc(1 + var(--rt-level, 0) * 0.18));
|
|
1255
|
+
opacity: calc(0.55 + var(--rt-level, 0) * 0.35);
|
|
1256
|
+
filter: blur(calc((1 - var(--rt-level, 0)) * 6px));
|
|
1257
|
+
}
|
|
1258
|
+
.tinyweb-chat .realtime-orb__halo--2 {
|
|
1259
|
+
width: 82%;
|
|
1260
|
+
height: 82%;
|
|
1261
|
+
background: var(--rt-halo-2);
|
|
1262
|
+
transform: translate(-50%, -50%) scale(calc(1.05 + var(--rt-level, 0) * 0.14));
|
|
1263
|
+
opacity: calc(0.45 + var(--rt-level, 0) * 0.28);
|
|
1264
|
+
filter: blur(calc((1 - var(--rt-level, 0)) * 8px));
|
|
1265
|
+
}
|
|
1266
|
+
.tinyweb-chat .realtime-orb__halo--3 {
|
|
1267
|
+
width: 100%;
|
|
1268
|
+
height: 100%;
|
|
1269
|
+
background: var(--rt-halo-3);
|
|
1270
|
+
transform: translate(-50%, -50%) scale(calc(1.10 + var(--rt-level, 0) * 0.10));
|
|
1271
|
+
opacity: calc(0.40 + var(--rt-level, 0) * 0.20);
|
|
1272
|
+
filter: blur(calc((1 - var(--rt-level, 0)) * 10px));
|
|
1273
|
+
}
|
|
1274
|
+
|
|
1275
|
+
/* Per-speaker tinting via hue-rotate (cheap; uses the same base color). */
|
|
1276
|
+
.tinyweb-chat .realtime-orb[data-speaker="user"] .realtime-orb__halo {
|
|
1277
|
+
filter: hue-rotate(-12deg) brightness(1.08)
|
|
1278
|
+
blur(calc((1 - var(--rt-level, 0)) * 6px));
|
|
1279
|
+
}
|
|
1280
|
+
.tinyweb-chat .realtime-orb[data-speaker="agent"] .realtime-orb__halo {
|
|
1281
|
+
/* keep the cool purple — design baseline */
|
|
1282
|
+
}
|
|
1283
|
+
.tinyweb-chat .realtime-orb[data-speaker="idle"] .realtime-orb__halo {
|
|
1284
|
+
opacity: calc(0.28 + var(--rt-level, 0) * 0.12);
|
|
1285
|
+
}
|
|
1286
|
+
|
|
1287
|
+
/* Inner black "void" disc. v2 (plan 0019 §3.5): rendered *above* the
|
|
1288
|
+
* R3F canvas so the centre stays a deep void while the ripple radiates
|
|
1289
|
+
* outward into the halos. */
|
|
1290
|
+
.tinyweb-chat .realtime-orb__core {
|
|
1291
|
+
position: relative;
|
|
1292
|
+
width: 30%;
|
|
1293
|
+
height: 30%;
|
|
1294
|
+
border-radius: 50%;
|
|
1295
|
+
background: radial-gradient(circle at 35% 30%, #15182e 0%, var(--rt-core) 70%);
|
|
1296
|
+
box-shadow:
|
|
1297
|
+
inset 0 0 40px rgba(0, 0, 0, 0.85),
|
|
1298
|
+
0 0 32px rgba(0, 0, 0, 0.75),
|
|
1299
|
+
0 0 64px rgba(8, 6, 24, 0.5);
|
|
1300
|
+
z-index: 2;
|
|
1301
|
+
}
|
|
1302
|
+
/* v2 — when an R3F canvas is present we shrink the void slightly so the
|
|
1303
|
+
* ripple has room to breathe. The core stays centred. */
|
|
1304
|
+
.tinyweb-chat .realtime-orb--r3f .realtime-orb__core {
|
|
1305
|
+
width: 26%;
|
|
1306
|
+
height: 26%;
|
|
1307
|
+
}
|
|
1308
|
+
|
|
1309
|
+
/* Tiny specular highlight on the void. */
|
|
1310
|
+
.tinyweb-chat .realtime-orb__specular {
|
|
1311
|
+
position: absolute;
|
|
1312
|
+
top: 50%;
|
|
1313
|
+
left: 50%;
|
|
1314
|
+
width: 6%;
|
|
1315
|
+
height: 6%;
|
|
1316
|
+
border-radius: 50%;
|
|
1317
|
+
background: radial-gradient(circle at 50% 50%, var(--rt-specular), transparent 70%);
|
|
1318
|
+
/* Place inside the upper-left quadrant of the core (36% × 0.36 ≈ 13% of orb). */
|
|
1319
|
+
transform: translate(-220%, -220%);
|
|
1320
|
+
filter: blur(1px);
|
|
1321
|
+
pointer-events: none;
|
|
1322
|
+
z-index: 3;
|
|
1323
|
+
}
|
|
1324
|
+
|
|
1325
|
+
/* Hero copy under the orb. */
|
|
1326
|
+
.tinyweb-chat .realtime-hero {
|
|
1327
|
+
text-align: center;
|
|
1328
|
+
max-width: 32ch;
|
|
1329
|
+
margin: 0 auto;
|
|
1330
|
+
font-size: 16px;
|
|
1331
|
+
line-height: 1.5;
|
|
1332
|
+
color: rgba(233, 230, 247, 0.92);
|
|
1333
|
+
font-weight: 500;
|
|
1334
|
+
}
|
|
1335
|
+
|
|
1336
|
+
/* Recent turns: two-mode transcript surface for the realtime call.
|
|
1337
|
+
*
|
|
1338
|
+
* - is-compact (default): only the latest assistant utterance,
|
|
1339
|
+
* one centered line, hugs the bottom of
|
|
1340
|
+
* the orb.
|
|
1341
|
+
* - is-expanded: stacked chat-bubble timeline of the
|
|
1342
|
+
* last few turns (user bubbles aligned
|
|
1343
|
+
* right, agent bubbles aligned left,
|
|
1344
|
+
* top-down), with a fade mask at the top
|
|
1345
|
+
* so older messages recede.
|
|
1346
|
+
*
|
|
1347
|
+
* A small chevron toggle (top-right of the panel) switches between
|
|
1348
|
+
* the two states. The toggle replaces the old single-band
|
|
1349
|
+
* `.realtime-transcripts` band so the call surface keeps short-term
|
|
1350
|
+
* context on demand without dominating the screen by default. */
|
|
1351
|
+
.tinyweb-chat .realtime-recents {
|
|
1352
|
+
position: relative;
|
|
1353
|
+
display: flex;
|
|
1354
|
+
flex-direction: column;
|
|
1355
|
+
gap: 6px;
|
|
1356
|
+
width: 100%;
|
|
1357
|
+
max-width: 720px;
|
|
1358
|
+
margin: 0 auto;
|
|
1359
|
+
padding: 0 12px;
|
|
1360
|
+
min-height: 0;
|
|
1361
|
+
font-size: 12.5px;
|
|
1362
|
+
color: rgba(233, 230, 247, 0.78);
|
|
1363
|
+
}
|
|
1364
|
+
.tinyweb-chat .realtime-recents.is-compact {
|
|
1365
|
+
max-height: 64px;
|
|
1366
|
+
}
|
|
1367
|
+
.tinyweb-chat .realtime-recents.is-expanded {
|
|
1368
|
+
max-height: 52vh;
|
|
1369
|
+
}
|
|
1370
|
+
.tinyweb-chat .realtime-recents.is-expanded .realtime-recents-list {
|
|
1371
|
+
display: flex;
|
|
1372
|
+
flex-direction: column;
|
|
1373
|
+
gap: 6px;
|
|
1374
|
+
max-height: 100%;
|
|
1375
|
+
overflow-y: auto;
|
|
1376
|
+
padding-top: 6px;
|
|
1377
|
+
mask-image: linear-gradient(to bottom, transparent 0, #000 28px, #000 100%);
|
|
1378
|
+
-webkit-mask-image: linear-gradient(to bottom, transparent 0, #000 28px, #000 100%);
|
|
1379
|
+
}
|
|
1380
|
+
|
|
1381
|
+
/* Collapse/expand chevron — sits top-right of the transcript surface
|
|
1382
|
+
* so it doesn't compete with the orb or mic controls. */
|
|
1383
|
+
.tinyweb-chat .realtime-recents-toggle {
|
|
1384
|
+
position: absolute;
|
|
1385
|
+
top: -22px;
|
|
1386
|
+
right: 12px;
|
|
1387
|
+
width: 28px;
|
|
1388
|
+
height: 22px;
|
|
1389
|
+
display: inline-flex;
|
|
1390
|
+
align-items: center;
|
|
1391
|
+
justify-content: center;
|
|
1392
|
+
background: rgba(255, 255, 255, 0.06);
|
|
1393
|
+
border: 1px solid rgba(255, 255, 255, 0.1);
|
|
1394
|
+
border-radius: 999px;
|
|
1395
|
+
color: rgba(233, 230, 247, 0.85);
|
|
1396
|
+
cursor: pointer;
|
|
1397
|
+
transition: background 150ms ease, color 150ms ease, transform 150ms ease;
|
|
1398
|
+
padding: 0;
|
|
1399
|
+
z-index: 4;
|
|
1400
|
+
}
|
|
1401
|
+
.tinyweb-chat .realtime-recents-toggle:hover {
|
|
1402
|
+
background: rgba(255, 255, 255, 0.12);
|
|
1403
|
+
color: #fff;
|
|
1404
|
+
}
|
|
1405
|
+
.tinyweb-chat .realtime-recents-toggle:focus-visible {
|
|
1406
|
+
outline: 2px solid rgba(150, 200, 255, 0.6);
|
|
1407
|
+
outline-offset: 2px;
|
|
1408
|
+
}
|
|
1409
|
+
|
|
1410
|
+
/* Compact mode: one centered line (latest agent reply) + optional
|
|
1411
|
+
* tool pill. Clamped to 2 lines so even verbose replies stay tidy. */
|
|
1412
|
+
.tinyweb-chat .realtime-recents-compact {
|
|
1413
|
+
display: flex;
|
|
1414
|
+
flex-direction: column;
|
|
1415
|
+
align-items: center;
|
|
1416
|
+
gap: 4px;
|
|
1417
|
+
text-align: center;
|
|
1418
|
+
padding: 0 8px;
|
|
1419
|
+
}
|
|
1420
|
+
.tinyweb-chat .realtime-recents-compact-line {
|
|
1421
|
+
margin: 0;
|
|
1422
|
+
max-width: 60ch;
|
|
1423
|
+
line-height: 1.4;
|
|
1424
|
+
display: -webkit-box;
|
|
1425
|
+
-webkit-line-clamp: 2;
|
|
1426
|
+
-webkit-box-orient: vertical;
|
|
1427
|
+
overflow: hidden;
|
|
1428
|
+
}
|
|
1429
|
+
.tinyweb-chat .realtime-recents-compact-line--agent {
|
|
1430
|
+
color: rgba(220, 215, 250, 0.92);
|
|
1431
|
+
}
|
|
1432
|
+
.tinyweb-chat .realtime-recents-compact-line--user {
|
|
1433
|
+
color: rgba(233, 230, 247, 0.6);
|
|
1434
|
+
font-style: italic;
|
|
1435
|
+
}
|
|
1436
|
+
.tinyweb-chat .realtime-recents-compact.is-live .realtime-recents-compact-line--agent {
|
|
1437
|
+
text-shadow: 0 0 8px rgba(150, 200, 255, 0.15);
|
|
1438
|
+
}
|
|
1439
|
+
|
|
1440
|
+
/* Each turn = a vertical stack: user row (right-aligned) on top
|
|
1441
|
+
* followed by the agent row (left-aligned). Turns sit one under
|
|
1442
|
+
* the other to read like a normal chat timeline. */
|
|
1443
|
+
.tinyweb-chat .realtime-recent-turn {
|
|
1444
|
+
display: flex;
|
|
1445
|
+
flex-direction: column;
|
|
1446
|
+
gap: 4px;
|
|
1447
|
+
opacity: 0.55;
|
|
1448
|
+
transition: opacity 200ms ease;
|
|
1449
|
+
}
|
|
1450
|
+
/* Most recent turn gets a tiny boost so the eye lands there. */
|
|
1451
|
+
.tinyweb-chat .realtime-recent-turn:last-of-type { opacity: 1; }
|
|
1452
|
+
.tinyweb-chat .realtime-recent-turn:nth-last-of-type(2) { opacity: 0.85; }
|
|
1453
|
+
.tinyweb-chat .realtime-recent-turn:nth-last-of-type(3) { opacity: 0.65; }
|
|
1454
|
+
|
|
1455
|
+
/* A row holds a single bubble; alignment is controlled by the
|
|
1456
|
+
* modifier so each row spans full width and aligns its child. */
|
|
1457
|
+
.tinyweb-chat .realtime-recent-row {
|
|
1458
|
+
display: flex;
|
|
1459
|
+
width: 100%;
|
|
1460
|
+
min-width: 0;
|
|
1461
|
+
}
|
|
1462
|
+
.tinyweb-chat .realtime-recent-row--user { justify-content: flex-end; }
|
|
1463
|
+
.tinyweb-chat .realtime-recent-row--agent { justify-content: flex-start; }
|
|
1464
|
+
|
|
1465
|
+
.tinyweb-chat .realtime-recent-bubble {
|
|
1466
|
+
display: inline-block;
|
|
1467
|
+
max-width: 78%;
|
|
1468
|
+
padding: 6px 10px;
|
|
1469
|
+
border-radius: 12px;
|
|
1470
|
+
line-height: 1.4;
|
|
1471
|
+
word-wrap: break-word;
|
|
1472
|
+
overflow-wrap: anywhere;
|
|
1473
|
+
white-space: pre-wrap;
|
|
1474
|
+
}
|
|
1475
|
+
.tinyweb-chat .realtime-recent-bubble--user {
|
|
1476
|
+
background: rgba(150, 130, 255, 0.14);
|
|
1477
|
+
color: rgba(233, 230, 247, 0.95);
|
|
1478
|
+
border: 1px solid rgba(150, 130, 255, 0.24);
|
|
1479
|
+
border-top-right-radius: 4px;
|
|
1480
|
+
}
|
|
1481
|
+
.tinyweb-chat .realtime-recent-bubble--agent {
|
|
1482
|
+
background: rgba(255, 255, 255, 0.05);
|
|
1483
|
+
color: rgba(220, 215, 250, 0.95);
|
|
1484
|
+
border: 1px solid rgba(255, 255, 255, 0.08);
|
|
1485
|
+
border-top-left-radius: 4px;
|
|
1486
|
+
}
|
|
1487
|
+
|
|
1488
|
+
/* Live (streaming) turn: subtle pulse on the agent bubble. */
|
|
1489
|
+
.tinyweb-chat .realtime-recent-turn.is-live .realtime-recent-bubble--agent {
|
|
1490
|
+
border-color: rgba(150, 200, 255, 0.30);
|
|
1491
|
+
animation: tw-realtime-pulse 1.4s ease-in-out infinite;
|
|
1492
|
+
}
|
|
1493
|
+
@keyframes tw-realtime-pulse {
|
|
1494
|
+
0%, 100% { box-shadow: 0 0 0 0 rgba(150, 200, 255, 0); }
|
|
1495
|
+
50% { box-shadow: 0 0 0 3px rgba(150, 200, 255, 0.08); }
|
|
1496
|
+
}
|
|
1497
|
+
|
|
1498
|
+
/* Compact tool pill rendered under the assistant bubble it belongs to. */
|
|
1499
|
+
.tinyweb-chat .realtime-recent-tool {
|
|
1500
|
+
display: inline-flex;
|
|
1501
|
+
align-items: center;
|
|
1502
|
+
gap: 6px;
|
|
1503
|
+
font-size: 10.5px;
|
|
1504
|
+
font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
|
|
1505
|
+
color: rgba(220, 215, 250, 0.7);
|
|
1506
|
+
padding: 2px 8px;
|
|
1507
|
+
border: 1px dashed rgba(255, 255, 255, 0.12);
|
|
1508
|
+
border-radius: 999px;
|
|
1509
|
+
background: rgba(255, 255, 255, 0.02);
|
|
1510
|
+
}
|
|
1511
|
+
.tinyweb-chat .realtime-recent-tool-dot {
|
|
1512
|
+
width: 5px;
|
|
1513
|
+
height: 5px;
|
|
1514
|
+
border-radius: 50%;
|
|
1515
|
+
background: rgba(150, 200, 255, 0.7);
|
|
1516
|
+
box-shadow: 0 0 6px rgba(150, 200, 255, 0.6);
|
|
1517
|
+
}
|
|
1518
|
+
|
|
1519
|
+
.tinyweb-chat .realtime-recent-error {
|
|
1520
|
+
align-self: center;
|
|
1521
|
+
font-size: 12px;
|
|
1522
|
+
color: #ffb3b3;
|
|
1523
|
+
padding: 6px 10px;
|
|
1524
|
+
border: 1px solid rgba(255, 90, 90, 0.4);
|
|
1525
|
+
border-radius: 8px;
|
|
1526
|
+
background: rgba(255, 90, 90, 0.06);
|
|
1527
|
+
}
|
|
1528
|
+
|
|
1529
|
+
/* Mobile: give bubbles a bit more breathing room. */
|
|
1530
|
+
@media (max-width: 520px) {
|
|
1531
|
+
.tinyweb-chat .realtime-recent-bubble {
|
|
1532
|
+
max-width: 86%;
|
|
1533
|
+
}
|
|
1534
|
+
}
|
|
1535
|
+
|
|
1536
|
+
/* Bottom button row: [icon] [mic FAB+ripple] [icon]. */
|
|
1537
|
+
.tinyweb-chat .realtime-inline-footer {
|
|
1538
|
+
display: grid;
|
|
1539
|
+
grid-template-columns: 1fr auto 1fr;
|
|
1540
|
+
align-items: center;
|
|
1541
|
+
justify-items: center;
|
|
1542
|
+
gap: 12px;
|
|
1543
|
+
padding: 8px 4px 0;
|
|
1544
|
+
border-top: none;
|
|
1545
|
+
}
|
|
1546
|
+
|
|
1547
|
+
/* Small circular icon buttons (keyboard, close). */
|
|
1548
|
+
.tinyweb-chat .realtime-icon-btn {
|
|
1549
|
+
width: 44px;
|
|
1550
|
+
height: 44px;
|
|
1551
|
+
border-radius: 50%;
|
|
1552
|
+
background: rgba(255, 255, 255, 0.06);
|
|
1553
|
+
color: rgba(233, 230, 247, 0.85);
|
|
1554
|
+
border: 1px solid rgba(255, 255, 255, 0.08);
|
|
1555
|
+
display: inline-flex;
|
|
1556
|
+
align-items: center;
|
|
1557
|
+
justify-content: center;
|
|
1558
|
+
cursor: pointer;
|
|
1559
|
+
transition: background 160ms ease, color 160ms ease, border-color 160ms ease;
|
|
1560
|
+
}
|
|
1561
|
+
.tinyweb-chat .realtime-icon-btn:hover:not(:disabled) {
|
|
1562
|
+
background: rgba(255, 255, 255, 0.10);
|
|
1563
|
+
color: #fff;
|
|
1564
|
+
border-color: rgba(255, 255, 255, 0.16);
|
|
1565
|
+
}
|
|
1566
|
+
.tinyweb-chat .realtime-icon-btn:focus-visible {
|
|
1567
|
+
outline: 2px solid var(--rt-accent);
|
|
1568
|
+
outline-offset: 2px;
|
|
1569
|
+
}
|
|
1570
|
+
.tinyweb-chat .realtime-icon-btn--close:hover:not(:disabled) {
|
|
1571
|
+
background: rgba(255, 90, 90, 0.18);
|
|
1572
|
+
border-color: rgba(255, 90, 90, 0.32);
|
|
1573
|
+
color: #ffd0d0;
|
|
1574
|
+
}
|
|
1575
|
+
|
|
1576
|
+
/* Mic FAB + concentric ripples. */
|
|
1577
|
+
.tinyweb-chat .realtime-mic-stack {
|
|
1578
|
+
position: relative;
|
|
1579
|
+
width: 200px;
|
|
1580
|
+
height: 200px;
|
|
1581
|
+
display: flex;
|
|
1582
|
+
align-items: center;
|
|
1583
|
+
justify-content: center;
|
|
1584
|
+
pointer-events: none;
|
|
1585
|
+
}
|
|
1586
|
+
.tinyweb-chat .realtime-mic-stack > .realtime-mic-fab { pointer-events: auto; }
|
|
1587
|
+
|
|
1588
|
+
.tinyweb-chat .realtime-mic-ripple {
|
|
1589
|
+
position: absolute;
|
|
1590
|
+
top: 50%;
|
|
1591
|
+
left: 50%;
|
|
1592
|
+
border-radius: 50%;
|
|
1593
|
+
border: 1px solid var(--rt-accent);
|
|
1594
|
+
transform: translate(-50%, -50%) scale(0.7);
|
|
1595
|
+
opacity: 0;
|
|
1596
|
+
pointer-events: none;
|
|
1597
|
+
/* Speed up the ripple as the orb level rises. Clamp to a sane range
|
|
1598
|
+
* so it never goes ludicrously fast or freezes. */
|
|
1599
|
+
--rt-ripple-period: max(0.9s, calc(2.4s - var(--rt-level, 0) * 1.5s));
|
|
1600
|
+
animation: rt-mic-ripple var(--rt-ripple-period) linear infinite;
|
|
1601
|
+
will-change: transform, opacity;
|
|
1602
|
+
}
|
|
1603
|
+
.tinyweb-chat .realtime-mic-ripple--1 { width: 120px; height: 120px; animation-delay: 0s; }
|
|
1604
|
+
.tinyweb-chat .realtime-mic-ripple--2 { width: 160px; height: 160px; animation-delay: -0.6s; }
|
|
1605
|
+
.tinyweb-chat .realtime-mic-ripple--3 { width: 200px; height: 200px; animation-delay: -1.2s; }
|
|
1606
|
+
|
|
1607
|
+
.tinyweb-chat .realtime-mic-stack[data-active="false"] .realtime-mic-ripple {
|
|
1608
|
+
animation-play-state: paused;
|
|
1609
|
+
opacity: 0;
|
|
1610
|
+
}
|
|
1611
|
+
|
|
1612
|
+
@keyframes rt-mic-ripple {
|
|
1613
|
+
0% { transform: translate(-50%, -50%) scale(0.7); opacity: 0.45; }
|
|
1614
|
+
100% { transform: translate(-50%, -50%) scale(1.4); opacity: 0; }
|
|
1615
|
+
}
|
|
1616
|
+
|
|
1617
|
+
/* The mic FAB itself. */
|
|
1618
|
+
.tinyweb-chat .realtime-mic-fab {
|
|
1619
|
+
position: relative;
|
|
1620
|
+
z-index: 1;
|
|
1621
|
+
width: 72px;
|
|
1622
|
+
height: 72px;
|
|
1623
|
+
border-radius: 50%;
|
|
1624
|
+
background: var(--rt-mic-bg);
|
|
1625
|
+
color: var(--rt-mic-fg);
|
|
1626
|
+
border: 1px solid rgba(255, 255, 255, 0.08);
|
|
1627
|
+
display: inline-flex;
|
|
1628
|
+
align-items: center;
|
|
1629
|
+
justify-content: center;
|
|
1630
|
+
cursor: pointer;
|
|
1631
|
+
transition: transform 160ms ease, box-shadow 160ms ease, background 160ms ease;
|
|
1632
|
+
box-shadow:
|
|
1633
|
+
0 8px 24px rgba(0, 0, 0, 0.4),
|
|
1634
|
+
0 0 calc(12px + var(--rt-level, 0) * 24px) rgba(185, 174, 240, calc(0.20 + var(--rt-level, 0) * 0.35));
|
|
1635
|
+
}
|
|
1636
|
+
.tinyweb-chat .realtime-mic-fab:hover:not(:disabled) {
|
|
1637
|
+
background: #14183a;
|
|
1638
|
+
}
|
|
1639
|
+
.tinyweb-chat .realtime-mic-fab:focus-visible {
|
|
1640
|
+
outline: 2px solid var(--rt-accent);
|
|
1641
|
+
outline-offset: 3px;
|
|
1642
|
+
}
|
|
1643
|
+
.tinyweb-chat .realtime-mic-fab[aria-pressed="true"] {
|
|
1644
|
+
background: rgba(255, 90, 90, 0.85);
|
|
1645
|
+
color: #fff;
|
|
1646
|
+
transform: scale(0.96);
|
|
1647
|
+
}
|
|
1648
|
+
.tinyweb-chat .realtime-mic-fab:disabled {
|
|
1649
|
+
opacity: 0.5;
|
|
1650
|
+
cursor: not-allowed;
|
|
1651
|
+
}
|
|
1652
|
+
|
|
1653
|
+
/* Reduced motion: pin level, freeze ripple, drop halo transitions. */
|
|
1654
|
+
@media (prefers-reduced-motion: reduce) {
|
|
1655
|
+
.tinyweb-chat .realtime-orb { --rt-level: 0.25; }
|
|
1656
|
+
.tinyweb-chat .realtime-orb__halo { transition: none; }
|
|
1657
|
+
.tinyweb-chat .realtime-mic-ripple {
|
|
1658
|
+
animation: none;
|
|
1659
|
+
opacity: 0;
|
|
1660
|
+
}
|
|
1661
|
+
.tinyweb-chat .realtime-mic-fab { transition: none; }
|
|
1662
|
+
}
|