@makemore/agent-frontend 1.0.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.
@@ -0,0 +1,503 @@
1
+ /**
2
+ * Agent Frontend - Chat Widget Styles
3
+ * Embeddable chat widget CSS - works standalone without any framework dependencies.
4
+ *
5
+ * CSS Isolation:
6
+ * - All classes prefixed with 'cw-' to avoid conflicts
7
+ * - CSS variables scoped to .cw-container
8
+ * - Uses 'all: initial' to reset inherited styles
9
+ * - High z-index to stay above host page content
10
+ */
11
+
12
+ /* Container - resets all inherited styles and scopes CSS variables */
13
+ .cw-container {
14
+ /* Reset all inherited styles */
15
+ all: initial;
16
+
17
+ /* CSS Variables scoped to widget */
18
+ --cw-primary: #0066cc;
19
+ --cw-bg: #ffffff;
20
+ --cw-bg-muted: #f5f5f5;
21
+ --cw-text: #1a1a1a;
22
+ --cw-text-muted: #666666;
23
+ --cw-border: #e0e0e0;
24
+ --cw-shadow: 0 4px 20px rgba(0, 0, 0, 0.15);
25
+ --cw-radius: 12px;
26
+ --cw-radius-sm: 8px;
27
+
28
+ /* Positioning */
29
+ position: fixed;
30
+ z-index: 99999;
31
+
32
+ /* Typography baseline */
33
+ font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, sans-serif;
34
+ font-size: 14px;
35
+ line-height: 1.5;
36
+ color: var(--cw-text);
37
+
38
+ /* Ensure text rendering */
39
+ -webkit-font-smoothing: antialiased;
40
+ -moz-osx-font-smoothing: grayscale;
41
+ }
42
+
43
+ /* Ensure all children inherit from container, not host page */
44
+ .cw-container *,
45
+ .cw-container *::before,
46
+ .cw-container *::after {
47
+ box-sizing: border-box;
48
+ }
49
+
50
+ .cw-position-bottom-right {
51
+ bottom: 24px;
52
+ right: 24px;
53
+ }
54
+
55
+ .cw-position-bottom-left {
56
+ bottom: 24px;
57
+ left: 24px;
58
+ }
59
+
60
+ /* Floating Action Button */
61
+ .cw-fab {
62
+ width: 56px;
63
+ height: 56px;
64
+ border-radius: 50%;
65
+ border: none;
66
+ cursor: pointer;
67
+ display: flex;
68
+ align-items: center;
69
+ justify-content: center;
70
+ box-shadow: var(--cw-shadow);
71
+ transition: transform 0.2s, box-shadow 0.2s;
72
+ color: white;
73
+ }
74
+
75
+ .cw-fab:hover {
76
+ transform: scale(1.05);
77
+ box-shadow: 0 6px 24px rgba(0, 0, 0, 0.2);
78
+ }
79
+
80
+ .cw-icon {
81
+ width: 24px;
82
+ height: 24px;
83
+ }
84
+
85
+ .cw-icon-sm {
86
+ width: 16px;
87
+ height: 16px;
88
+ }
89
+
90
+ /* Widget container */
91
+ .cw-widget {
92
+ width: 380px;
93
+ height: 500px;
94
+ background: var(--cw-bg);
95
+ border-radius: var(--cw-radius);
96
+ box-shadow: var(--cw-shadow);
97
+ display: flex;
98
+ flex-direction: column;
99
+ overflow: hidden;
100
+ transition: all 0.2s ease;
101
+ }
102
+
103
+ .cw-widget-expanded {
104
+ width: 600px;
105
+ height: 80vh;
106
+ max-height: 800px;
107
+ }
108
+
109
+ /* Header */
110
+ .cw-header {
111
+ display: flex;
112
+ align-items: center;
113
+ justify-content: space-between;
114
+ padding: 12px 16px;
115
+ color: white;
116
+ border-radius: var(--cw-radius) var(--cw-radius) 0 0;
117
+ }
118
+
119
+ .cw-title {
120
+ font-weight: 600;
121
+ font-size: 15px;
122
+ }
123
+
124
+ .cw-header-actions {
125
+ display: flex;
126
+ align-items: center;
127
+ gap: 4px;
128
+ }
129
+
130
+ .cw-header-btn {
131
+ background: transparent;
132
+ border: none;
133
+ color: white;
134
+ width: 28px;
135
+ height: 28px;
136
+ border-radius: 6px;
137
+ cursor: pointer;
138
+ display: flex;
139
+ align-items: center;
140
+ justify-content: center;
141
+ transition: background 0.15s;
142
+ font-size: 14px;
143
+ }
144
+
145
+ .cw-header-btn:hover:not(:disabled) {
146
+ background: rgba(255, 255, 255, 0.2);
147
+ }
148
+
149
+ .cw-header-btn:disabled {
150
+ opacity: 0.5;
151
+ cursor: not-allowed;
152
+ }
153
+
154
+ .cw-btn-active {
155
+ background: rgba(255, 255, 255, 0.3);
156
+ }
157
+
158
+ .cw-icon-warning {
159
+ color: #ffd700;
160
+ }
161
+
162
+ /* Status bar */
163
+ .cw-status-bar {
164
+ display: flex;
165
+ gap: 8px;
166
+ justify-content: center;
167
+ padding: 4px 16px;
168
+ background: var(--cw-bg-muted);
169
+ color: var(--cw-text-muted);
170
+ font-size: 12px;
171
+ border-bottom: 1px solid var(--cw-border);
172
+ }
173
+
174
+ /* Messages area */
175
+ .cw-messages {
176
+ flex: 1;
177
+ overflow-y: auto;
178
+ padding: 16px;
179
+ display: flex;
180
+ flex-direction: column;
181
+ gap: 12px;
182
+ }
183
+
184
+ /* Empty state */
185
+ .cw-empty-state {
186
+ flex: 1;
187
+ display: flex;
188
+ flex-direction: column;
189
+ align-items: center;
190
+ justify-content: center;
191
+ text-align: center;
192
+ color: var(--cw-text-muted);
193
+ padding: 24px;
194
+ }
195
+
196
+ .cw-empty-icon {
197
+ width: 48px;
198
+ height: 48px;
199
+ margin-bottom: 16px;
200
+ opacity: 0.5;
201
+ }
202
+
203
+ .cw-empty-state h3 {
204
+ margin: 0 0 8px 0;
205
+ font-size: 16px;
206
+ font-weight: 600;
207
+ color: var(--cw-text);
208
+ }
209
+
210
+ .cw-empty-state p {
211
+ margin: 0;
212
+ font-size: 13px;
213
+ }
214
+
215
+ /* Message rows */
216
+ .cw-message-row {
217
+ display: flex;
218
+ justify-content: flex-start;
219
+ }
220
+
221
+ .cw-message-row-user {
222
+ justify-content: flex-end;
223
+ }
224
+
225
+ /* Messages */
226
+ .cw-message {
227
+ max-width: 80%;
228
+ padding: 10px 14px;
229
+ border-radius: var(--cw-radius-sm);
230
+ background: var(--cw-bg-muted);
231
+ color: var(--cw-text);
232
+ word-wrap: break-word;
233
+ }
234
+
235
+ .cw-message-user {
236
+ background: var(--cw-primary);
237
+ color: white;
238
+ }
239
+
240
+ .cw-message-tool-call {
241
+ background: rgba(59, 130, 246, 0.1);
242
+ color: #1d4ed8;
243
+ border: 1px solid rgba(59, 130, 246, 0.2);
244
+ font-family: monospace;
245
+ font-size: 12px;
246
+ }
247
+
248
+ .cw-message-tool-result {
249
+ background: rgba(34, 197, 94, 0.1);
250
+ color: #15803d;
251
+ border: 1px solid rgba(34, 197, 94, 0.2);
252
+ font-family: monospace;
253
+ font-size: 12px;
254
+ }
255
+
256
+ .cw-message-error {
257
+ background: rgba(239, 68, 68, 0.1);
258
+ color: #dc2626;
259
+ border: 1px solid rgba(239, 68, 68, 0.2);
260
+ }
261
+
262
+ .cw-tool-args {
263
+ margin: 8px 0 0 0;
264
+ padding: 8px;
265
+ background: rgba(0, 0, 0, 0.05);
266
+ border-radius: 4px;
267
+ font-size: 11px;
268
+ overflow-x: auto;
269
+ white-space: pre-wrap;
270
+ }
271
+
272
+ /* Markdown styles in messages */
273
+ .cw-message a {
274
+ color: inherit;
275
+ text-decoration: underline;
276
+ }
277
+
278
+ .cw-message a:hover {
279
+ text-decoration: none;
280
+ }
281
+
282
+ .cw-message code {
283
+ background: rgba(0, 0, 0, 0.1);
284
+ padding: 2px 4px;
285
+ border-radius: 3px;
286
+ font-family: monospace;
287
+ font-size: 12px;
288
+ }
289
+
290
+ .cw-message strong {
291
+ font-weight: 600;
292
+ }
293
+
294
+ .cw-message ul, .cw-message ol {
295
+ margin: 8px 0;
296
+ padding-left: 20px;
297
+ }
298
+
299
+ .cw-message li {
300
+ margin: 4px 0;
301
+ }
302
+
303
+ /* Typing indicator */
304
+ .cw-typing {
305
+ display: flex;
306
+ align-items: center;
307
+ gap: 8px;
308
+ padding: 10px 14px;
309
+ background: var(--cw-bg-muted);
310
+ border-radius: var(--cw-radius-sm);
311
+ color: var(--cw-text-muted);
312
+ font-size: 13px;
313
+ }
314
+
315
+ /* Spinner */
316
+ .cw-spinner {
317
+ display: inline-block;
318
+ width: 16px;
319
+ height: 16px;
320
+ border: 2px solid currentColor;
321
+ border-right-color: transparent;
322
+ border-radius: 50%;
323
+ animation: cw-spin 0.75s linear infinite;
324
+ }
325
+
326
+ @keyframes cw-spin {
327
+ to { transform: rotate(360deg); }
328
+ }
329
+
330
+ /* Error bar */
331
+ .cw-error-bar {
332
+ padding: 8px 16px;
333
+ background: rgba(239, 68, 68, 0.1);
334
+ color: #dc2626;
335
+ font-size: 13px;
336
+ border-top: 1px solid rgba(239, 68, 68, 0.2);
337
+ }
338
+
339
+ /* Input form */
340
+ .cw-input-form {
341
+ display: flex;
342
+ gap: 8px;
343
+ padding: 12px 16px;
344
+ border-top: 1px solid var(--cw-border);
345
+ background: var(--cw-bg);
346
+ }
347
+
348
+ .cw-input {
349
+ flex: 1;
350
+ padding: 10px 14px;
351
+ border: 1px solid var(--cw-border);
352
+ border-radius: var(--cw-radius-sm);
353
+ font-size: 14px;
354
+ outline: none;
355
+ transition: border-color 0.15s;
356
+ }
357
+
358
+ .cw-input:focus {
359
+ border-color: var(--cw-primary);
360
+ }
361
+
362
+ .cw-input:disabled {
363
+ background: var(--cw-bg-muted);
364
+ cursor: not-allowed;
365
+ }
366
+
367
+ .cw-send-btn {
368
+ width: 40px;
369
+ height: 40px;
370
+ border: none;
371
+ border-radius: var(--cw-radius-sm);
372
+ cursor: pointer;
373
+ display: flex;
374
+ align-items: center;
375
+ justify-content: center;
376
+ color: white;
377
+ font-size: 16px;
378
+ transition: opacity 0.15s;
379
+ }
380
+
381
+ .cw-send-btn:hover:not(:disabled) {
382
+ opacity: 0.9;
383
+ }
384
+
385
+ .cw-send-btn:disabled {
386
+ opacity: 0.5;
387
+ cursor: not-allowed;
388
+ }
389
+
390
+ /* Dropdown */
391
+ .cw-dropdown {
392
+ position: relative;
393
+ }
394
+
395
+ .cw-dropdown-menu {
396
+ position: absolute;
397
+ top: 100%;
398
+ right: 0;
399
+ margin-top: 4px;
400
+ min-width: 200px;
401
+ background: var(--cw-bg);
402
+ border: 1px solid var(--cw-border);
403
+ border-radius: var(--cw-radius-sm);
404
+ box-shadow: var(--cw-shadow);
405
+ z-index: 100;
406
+ overflow: hidden;
407
+ }
408
+
409
+ .cw-dropdown-hidden {
410
+ display: none;
411
+ }
412
+
413
+ .cw-dropdown-label {
414
+ padding: 8px 12px;
415
+ font-size: 12px;
416
+ font-weight: 600;
417
+ color: var(--cw-text-muted);
418
+ text-transform: uppercase;
419
+ letter-spacing: 0.5px;
420
+ }
421
+
422
+ .cw-dropdown-separator {
423
+ height: 1px;
424
+ background: var(--cw-border);
425
+ margin: 4px 0;
426
+ }
427
+
428
+ .cw-dropdown-item {
429
+ display: block;
430
+ width: 100%;
431
+ padding: 10px 12px;
432
+ border: none;
433
+ background: transparent;
434
+ text-align: left;
435
+ font-size: 14px;
436
+ color: var(--cw-text);
437
+ cursor: pointer;
438
+ transition: background 0.15s;
439
+ }
440
+
441
+ .cw-dropdown-item:hover {
442
+ background: var(--cw-bg-muted);
443
+ }
444
+
445
+ .cw-dropdown-item-danger {
446
+ color: #dc2626;
447
+ }
448
+
449
+ .cw-dropdown-item-danger:hover {
450
+ background: rgba(239, 68, 68, 0.1);
451
+ }
452
+
453
+ /* Responsive */
454
+ @media (max-width: 480px) {
455
+ .cw-widget {
456
+ width: calc(100vw - 32px);
457
+ height: calc(100vh - 100px);
458
+ max-height: none;
459
+ }
460
+
461
+ .cw-widget-expanded {
462
+ width: calc(100vw - 16px);
463
+ height: calc(100vh - 32px);
464
+ }
465
+
466
+ .cw-container {
467
+ bottom: 16px;
468
+ right: 16px;
469
+ left: 16px;
470
+ }
471
+
472
+ .cw-position-bottom-left {
473
+ right: 16px;
474
+ }
475
+ }
476
+
477
+ /* Dark mode support */
478
+ @media (prefers-color-scheme: dark) {
479
+ :root {
480
+ --cw-bg: #1a1a1a;
481
+ --cw-bg-muted: #2a2a2a;
482
+ --cw-text: #f0f0f0;
483
+ --cw-text-muted: #999999;
484
+ --cw-border: #3a3a3a;
485
+ }
486
+
487
+ .cw-message-tool-call {
488
+ color: #93c5fd;
489
+ }
490
+
491
+ .cw-message-tool-result {
492
+ color: #86efac;
493
+ }
494
+
495
+ .cw-message code {
496
+ background: rgba(255, 255, 255, 0.1);
497
+ }
498
+
499
+ .cw-tool-args {
500
+ background: rgba(255, 255, 255, 0.05);
501
+ }
502
+ }
503
+