@browserbridge/bbx 1.0.1 → 1.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.
Files changed (63) hide show
  1. package/README.md +4 -4
  2. package/package.json +11 -13
  3. package/packages/agent-client/src/cli-helpers.js +33 -0
  4. package/packages/agent-client/src/cli.js +116 -41
  5. package/packages/agent-client/src/client.js +29 -4
  6. package/packages/agent-client/src/command-registry.js +3 -0
  7. package/packages/agent-client/src/detect.js +159 -48
  8. package/packages/agent-client/src/install.js +24 -1
  9. package/packages/agent-client/src/mcp-config.js +29 -10
  10. package/packages/agent-client/src/setup-status.js +12 -4
  11. package/packages/mcp-server/src/bin.js +57 -5
  12. package/packages/mcp-server/src/handlers.js +28 -7
  13. package/packages/mcp-server/src/server.js +12 -2
  14. package/packages/native-host/bin/bridge-daemon.js +33 -4
  15. package/packages/native-host/bin/install-manifest.js +24 -2
  16. package/packages/native-host/src/config.js +131 -6
  17. package/packages/native-host/src/daemon-process.js +396 -0
  18. package/packages/native-host/src/daemon.js +217 -68
  19. package/packages/native-host/src/framing.js +131 -11
  20. package/packages/native-host/src/install-manifest.js +121 -7
  21. package/packages/native-host/src/native-host.js +110 -73
  22. package/packages/protocol/src/capabilities.js +3 -0
  23. package/packages/protocol/src/defaults.js +1 -0
  24. package/packages/protocol/src/errors.js +4 -0
  25. package/packages/protocol/src/payload-cost.js +19 -6
  26. package/packages/protocol/src/protocol.js +143 -7
  27. package/packages/protocol/src/registry.js +11 -0
  28. package/packages/protocol/src/summary.js +18 -10
  29. package/packages/protocol/src/types.js +28 -3
  30. package/skills/browser-bridge/SKILL.md +2 -1
  31. package/skills/browser-bridge/references/interaction.md +1 -0
  32. package/skills/browser-bridge/references/protocol.md +2 -1
  33. package/CHANGELOG.md +0 -55
  34. package/assets/banner.jpg +0 -0
  35. package/assets/logo.png +0 -0
  36. package/assets/logo.svg +0 -65
  37. package/docs/api-reference.md +0 -157
  38. package/docs/cli-guide.md +0 -128
  39. package/docs/index.md +0 -25
  40. package/docs/manual-setup.md +0 -140
  41. package/docs/mcp-vs-cli.md +0 -258
  42. package/docs/publishing.md +0 -112
  43. package/docs/quickstart.md +0 -104
  44. package/docs/troubleshooting.md +0 -59
  45. package/docs/unpacked-extension.md +0 -72
  46. package/docs/usage-scenarios.md +0 -136
  47. package/manifest.json +0 -38
  48. package/packages/extension/assets/icon-128.png +0 -0
  49. package/packages/extension/assets/icon-16.png +0 -0
  50. package/packages/extension/assets/icon-32.png +0 -0
  51. package/packages/extension/assets/icon-48.png +0 -0
  52. package/packages/extension/src/background-helpers.js +0 -474
  53. package/packages/extension/src/background-routing.js +0 -89
  54. package/packages/extension/src/background.js +0 -3490
  55. package/packages/extension/src/content-script-helpers.js +0 -282
  56. package/packages/extension/src/content-script.js +0 -2043
  57. package/packages/extension/src/debugger-coordinator.js +0 -188
  58. package/packages/extension/src/sidepanel-helpers.js +0 -104
  59. package/packages/extension/ui/popup.html +0 -35
  60. package/packages/extension/ui/popup.js +0 -298
  61. package/packages/extension/ui/sidepanel.html +0 -102
  62. package/packages/extension/ui/sidepanel.js +0 -1771
  63. package/packages/extension/ui/ui.css +0 -1160
@@ -1,1160 +0,0 @@
1
- :root {
2
- color-scheme: light dark;
3
- --bg: #faf7f5;
4
- --panel: #ffffff;
5
- --ink: #1a1d23;
6
- --fg: #1a1d23;
7
- --muted: #7a7068;
8
- --accent: #d34a1e;
9
- --accent-strong: #b33e18;
10
- --update-bg: #4b8a6e;
11
- --update-bg-hover: #3d7259;
12
- --stroke: #e8e3de;
13
- --cmd-bg: rgba(128, 112, 100, 0.07);
14
- --cmd-bg-hover: rgba(128, 112, 100, 0.12);
15
- --card-shadow: rgba(0, 0, 0, 0.04);
16
- --disabled-bg: #c8c3be;
17
- --hist-surface-top: rgba(255, 255, 255, 0.38);
18
- --hist-surface-bottom: rgba(255, 255, 255, 0.12);
19
- --hist-border: rgba(226, 229, 234, 0.72);
20
- --hist-bar-bg: rgba(107, 114, 128, 0.13);
21
- --hist-bar-border: rgba(107, 114, 128, 0.18);
22
- --hist-dom: rgba(59, 108, 206, 0.82);
23
- --hist-page: rgba(45, 86, 168, 0.7);
24
- --hist-layout: rgba(75, 138, 110, 0.8);
25
- --hist-style: rgba(96, 165, 136, 0.7);
26
- --hist-input: rgba(107, 114, 128, 0.75);
27
- --hist-patch: rgba(168, 137, 88, 0.88);
28
- --hist-capture: rgba(196, 160, 98, 0.9);
29
- --hist-other: rgba(107, 114, 128, 0.35);
30
- }
31
-
32
- [hidden] {
33
- display: none !important;
34
- }
35
-
36
- html {
37
- min-height: 100%;
38
- background: var(--bg);
39
- }
40
-
41
- html[data-windowed="true"] {
42
- min-height: 0;
43
- }
44
-
45
- @media (prefers-color-scheme: dark) {
46
- :root {
47
- --bg: #1a1816;
48
- --panel: #222018;
49
- --ink: #e8e2da;
50
- --fg: #e8e2da;
51
- --muted: #9a9088;
52
- --accent: #e8673f;
53
- --accent-strong: #f08050;
54
- --update-bg: #5ea882;
55
- --update-bg-hover: #72bf96;
56
- --stroke: #352f2a;
57
- --cmd-bg: rgba(255, 248, 240, 0.06);
58
- --cmd-bg-hover: rgba(255, 248, 240, 0.10);
59
- --card-shadow: rgba(0, 0, 0, 0.3);
60
- --disabled-bg: #3d3a34;
61
- --hist-surface-top: rgba(224, 226, 232, 0.08);
62
- --hist-surface-bottom: rgba(224, 226, 232, 0.02);
63
- --hist-border: rgba(139, 144, 160, 0.2);
64
- --hist-bar-bg: rgba(224, 226, 232, 0.12);
65
- --hist-bar-border: rgba(224, 226, 232, 0.18);
66
- --hist-dom: #6b9bef;
67
- --hist-page: #5580d0;
68
- --hist-layout: #5ea882;
69
- --hist-style: #4d9070;
70
- --hist-input: #8b90a0;
71
- --hist-patch: #c5a66e;
72
- --hist-capture: #ddb87a;
73
- --hist-other: rgba(139, 144, 160, 0.45);
74
- }
75
-
76
- html {
77
- background: var(--bg);
78
- }
79
- }
80
-
81
- body {
82
- margin: 0;
83
- height: 100vh;
84
- font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
85
- font-size: 13px;
86
- background: transparent;
87
- color: var(--ink);
88
- overflow: hidden;
89
- border-radius: 8px;
90
- }
91
-
92
- body[data-windowed="true"] {
93
- height: auto;
94
- overflow: visible;
95
- }
96
-
97
- .panel {
98
- min-width: 0;
99
- min-height: 160px;
100
- padding: 14px;
101
- box-sizing: border-box;
102
- display: flex;
103
- flex-direction: column;
104
- height: 100%;
105
- overflow: hidden;
106
- }
107
-
108
- body[data-windowed="true"] .panel {
109
- height: auto;
110
- min-height: 0;
111
- overflow: visible;
112
- }
113
-
114
- body[data-windowed="true"] .panel-popup {
115
- min-height: 0;
116
- }
117
-
118
- .panel-popup {
119
- min-width: 380px;
120
- min-height: 240px;
121
- padding-top: 12px;
122
- padding-bottom: 14px;
123
- border-radius: 8px;
124
- }
125
-
126
- .panel-wide {
127
- width: 100%;
128
- max-width: none;
129
- flex: 1 1 auto;
130
- }
131
-
132
- .panel section + section {
133
- margin-top: 12px;
134
- }
135
-
136
- .panel header {
137
- margin-bottom: 12px;
138
- }
139
-
140
- .panel header.panel-header-compact {
141
- margin-bottom: 4px;
142
- }
143
-
144
- .panel-header {
145
- display: flex;
146
- align-items: baseline;
147
- justify-content: space-between;
148
- gap: 12px;
149
- }
150
-
151
- .panel-header-compact {
152
- justify-content: flex-end;
153
- align-items: center;
154
- gap: 8px;
155
- }
156
-
157
- .panel-header-compact .header-status-indicator[data-connected="true"] {
158
- display: none;
159
- }
160
-
161
- .stack {
162
- display: grid;
163
- gap: 8px;
164
- }
165
-
166
- .card {
167
- padding: 10px 12px;
168
- border: 1px solid var(--stroke);
169
- border-radius: 8px;
170
- background: var(--panel);
171
- box-shadow: 0 1px 3px var(--card-shadow);
172
- overflow-wrap: anywhere;
173
- flex-shrink: 0;
174
- }
175
-
176
- .activity-card {
177
- padding: 8px 10px 6px 10px;
178
- border-radius: 6px;
179
- box-shadow: 0 1px 2px var(--card-shadow);
180
- }
181
-
182
- .card-title {
183
- margin: 0;
184
- font-size: 13px;
185
- white-space: nowrap;
186
- overflow: hidden;
187
- text-overflow: ellipsis;
188
- min-width: 0;
189
- }
190
-
191
- .activity-title {
192
- display: flex;
193
- align-items: center;
194
- gap: 6px;
195
- }
196
-
197
- .activity-method {
198
- display: block;
199
- flex: 1 1 auto;
200
- min-width: 0;
201
- overflow: hidden;
202
- text-overflow: ellipsis;
203
- white-space: nowrap;
204
- }
205
-
206
- .activity-source-tag {
207
- flex-shrink: 0;
208
- padding: 1px 5px;
209
- border-radius: 3px;
210
- background: var(--cmd-bg);
211
- color: var(--muted);
212
- font-size: 9px;
213
- font-weight: 600;
214
- letter-spacing: 0.04em;
215
- text-transform: uppercase;
216
- }
217
-
218
- .popup-title {
219
- margin: 0;
220
- max-width: 360px;
221
- font-size: 15px;
222
- font-weight: 600;
223
- line-height: 1.15;
224
- letter-spacing: -0.01em;
225
- }
226
-
227
- .eyebrow {
228
- margin: 0 0 6px;
229
- font-size: 11px;
230
- font-weight: 600;
231
- letter-spacing: 0.04em;
232
- text-transform: uppercase;
233
- color: var(--muted);
234
- }
235
-
236
- .muted {
237
- margin: 0 0 10px;
238
- color: var(--muted);
239
- overflow-wrap: anywhere;
240
- }
241
-
242
- .control-card {
243
- display: grid;
244
- gap: 0;
245
- }
246
-
247
- .control-copy {
248
- display: grid;
249
- gap: 6px;
250
- }
251
-
252
- .control-heading {
253
- display: flex;
254
- align-items: baseline;
255
- justify-content: space-between;
256
- gap: 10px;
257
- }
258
-
259
- .control-heading .eyebrow {
260
- margin: 0;
261
- flex: 1 1 auto;
262
- min-width: 0;
263
- }
264
-
265
- .control-detail {
266
- margin: 0;
267
- font-size: 12px;
268
- line-height: 1.4;
269
- }
270
-
271
- .control-disclosure {
272
- color: var(--muted);
273
- }
274
-
275
- .control-links {
276
- display: flex;
277
- flex-wrap: nowrap;
278
- gap: 10px;
279
- margin-bottom: 0;
280
- justify-content: flex-end;
281
- flex: 0 0 auto;
282
- }
283
-
284
- @keyframes attention-pulse {
285
- 0% { box-shadow: 0 0 0 0 rgba(211, 74, 30, 0.4); }
286
- 30% { box-shadow: 0 0 0 3px rgba(211, 74, 30, 0.2); }
287
- 60% { box-shadow: 0 0 0 0 rgba(211, 74, 30, 0.4); }
288
- 100% { box-shadow: 0 0 0 0 rgba(211, 74, 30, 0.4); }
289
- }
290
-
291
- .control-card.attention {
292
- animation: attention-pulse 0.9s ease-out infinite;
293
- }
294
-
295
- .popup-control-card {
296
- margin-top: 2px;
297
- padding-right: 12px;
298
- padding-left: 12px;
299
- }
300
-
301
- .panel-popup .panel-header {
302
- margin-bottom: 8px;
303
- }
304
-
305
- .activity-header {
306
- display: flex;
307
- align-items: baseline;
308
- justify-content: space-between;
309
- gap: 8px;
310
- }
311
-
312
- .activity-footer {
313
- display: flex;
314
- align-items: flex-start;
315
- justify-content: space-between;
316
- flex-wrap: wrap;
317
- gap: 6px;
318
- margin-top: 3px;
319
- }
320
-
321
- .activity-badges {
322
- display: inline-flex;
323
- align-items: center;
324
- flex-wrap: wrap;
325
- gap: 4px;
326
- flex: 0 1 auto;
327
- max-width: 100%;
328
- min-width: 0;
329
- justify-content: flex-end;
330
- margin-left: auto;
331
- }
332
-
333
- .activity-time {
334
- margin: 0;
335
- font-size: 11px;
336
- white-space: nowrap;
337
- flex-shrink: 0;
338
- }
339
-
340
- .activity-tokens {
341
- margin: 0;
342
- font-size: 10px;
343
- flex: 0 1 auto;
344
- max-width: 100%;
345
- white-space: nowrap;
346
- overflow: hidden;
347
- text-overflow: ellipsis;
348
- text-align: right;
349
- line-height: 1.25;
350
- padding: 1px 5px;
351
- border-radius: 3px;
352
- background: var(--panel);
353
- border: 1px solid var(--stroke);
354
- letter-spacing: 0.01em;
355
- }
356
-
357
- .activity-tokens[data-cost-class="heavy"],
358
- .activity-tokens[data-cost-class="extreme"] {
359
- background: rgba(209, 17, 68, 0.1);
360
- color: var(--ink);
361
- }
362
-
363
- .activity-badge {
364
- margin: 0;
365
- font-size: 10px;
366
- white-space: nowrap;
367
- padding: 1px 5px;
368
- border-radius: 3px;
369
- letter-spacing: 0.02em;
370
- }
371
-
372
- .activity-badge-neutral {
373
- background: var(--cmd-bg);
374
- color: var(--muted);
375
- }
376
-
377
- .activity-badge-warn {
378
- background: rgba(209, 17, 68, 0.1);
379
- color: var(--ink);
380
- }
381
-
382
- .activity-hint {
383
- margin: 6px 0 0;
384
- font-size: 11px;
385
- line-height: 1.35;
386
- overflow-wrap: anywhere;
387
- word-break: break-word;
388
- white-space: normal;
389
- }
390
-
391
- .activity-scope-link {
392
- color: var(--muted);
393
- opacity: 0.5;
394
- transition: opacity 0.15s;
395
- line-height: 0;
396
- vertical-align: middle;
397
- margin-left: 3px;
398
- }
399
-
400
- .activity-scope-link:hover {
401
- opacity: 1;
402
- }
403
-
404
- .activity-summary {
405
- display: flex;
406
- align-items: flex-start;
407
- flex: 1 1 auto;
408
- min-width: 0;
409
- gap: 4px;
410
- font-size: 11px;
411
- line-height: 1.3;
412
- color: var(--muted);
413
- }
414
-
415
- .activity-summary > span:last-child {
416
- min-width: 0;
417
- overflow-wrap: anywhere;
418
- white-space: normal;
419
- }
420
-
421
- .activity-summary.activity-summary-error > span:last-child {
422
- color: var(--ink);
423
- }
424
-
425
- .activity-status-dot {
426
- display: inline-block;
427
- width: 6px;
428
- height: 6px;
429
- border-radius: 50%;
430
- background: #3faa6f;
431
- flex-shrink: 0;
432
- margin-top: 4px;
433
- }
434
-
435
- .activity-status-dot[data-ok="false"] {
436
- background: #c44;
437
- }
438
-
439
- .setup-status-note {
440
- margin-bottom: 10px;
441
- font-size: 12px;
442
- }
443
-
444
- .setup-status-note[hidden] {
445
- display: none;
446
- }
447
-
448
- .setup-status-item,
449
- .setup-status-placeholder {
450
- display: flex;
451
- align-items: flex-start;
452
- justify-content: space-between;
453
- gap: 10px;
454
- padding: 7px 9px;
455
- border-radius: 6px;
456
- background: var(--cmd-bg);
457
- }
458
-
459
- .setup-status-copy {
460
- display: grid;
461
- gap: 2px;
462
- min-width: 0;
463
- }
464
-
465
- .setup-status-label {
466
- font-size: 12px;
467
- font-weight: 600;
468
- }
469
-
470
- .setup-status-detail,
471
- .setup-status-placeholder {
472
- color: var(--muted);
473
- font-size: 11px;
474
- line-height: 1.35;
475
- }
476
-
477
- .setup-status-badge {
478
- display: inline-flex;
479
- align-items: center;
480
- justify-content: center;
481
- flex-shrink: 0;
482
- border-radius: 4px;
483
- padding: 2px 6px;
484
- font-size: 10px;
485
- font-weight: 500;
486
- letter-spacing: 0.02em;
487
- background: rgba(209, 17, 68, 0.1);
488
- color: #c44;
489
- white-space: nowrap;
490
- }
491
-
492
- .setup-status-badge[data-ok="true"] {
493
- background: rgba(45, 138, 87, 0.1);
494
- color: #2d8a57;
495
- }
496
-
497
- .setup-status-matrix-wrap {
498
- margin-top: 4px;
499
- overflow-x: auto;
500
- }
501
-
502
- .setup-status-guidance {
503
- margin: 10px 0 0;
504
- color: var(--muted);
505
- font-size: 11px;
506
- line-height: 1.45;
507
- }
508
-
509
- .setup-status-matrix {
510
- width: 100%;
511
- border-collapse: collapse;
512
- table-layout: auto;
513
- }
514
-
515
- .setup-status-matrix th:first-child,
516
- .setup-status-matrix td:first-child {
517
- width: 100%;
518
- }
519
-
520
- .setup-status-matrix th:nth-child(2),
521
- .setup-status-matrix td:nth-child(2),
522
- .setup-status-matrix th:nth-child(3),
523
- .setup-status-matrix td:nth-child(3) {
524
- width: 60px;
525
- min-width: 60px;
526
- white-space: nowrap;
527
- }
528
-
529
- .setup-status-matrix th,
530
- .setup-status-matrix td {
531
- padding: 8px 6px;
532
- text-align: left;
533
- vertical-align: middle;
534
- border-top: 1px solid var(--stroke);
535
- white-space: nowrap;
536
- }
537
-
538
- .setup-status-matrix thead th {
539
- padding-top: 8px;
540
- border-top: 1px solid var(--stroke);
541
- font-size: 11px;
542
- letter-spacing: 0.08em;
543
- text-transform: uppercase;
544
- color: var(--muted);
545
- }
546
-
547
- .setup-matrix-client {
548
- font-size: 12px;
549
- font-weight: 600;
550
- }
551
-
552
- .setup-matrix-beta {
553
- color: #9aa0a6;
554
- font-weight: 500;
555
- }
556
-
557
- .setup-matrix-muted {
558
- color: var(--muted);
559
- font-size: 12px;
560
- }
561
-
562
- .setup-install-button {
563
- display: inline-flex;
564
- align-items: center;
565
- justify-content: center;
566
- margin-right: 0;
567
- padding: 4px 10px;
568
- font-size: 11px;
569
- font-weight: 600;
570
- line-height: 1.1;
571
- white-space: nowrap;
572
- border-radius: 4px;
573
- }
574
-
575
- .setup-install-button[data-variant="update"] {
576
- background: var(--update-bg);
577
- }
578
-
579
- .setup-install-button[data-variant="update"]:hover {
580
- background: var(--update-bg-hover);
581
- }
582
-
583
- .setup-install-button:disabled {
584
- background: var(--disabled-bg);
585
- cursor: progress;
586
- }
587
-
588
- .setup-context-menu {
589
- position: fixed;
590
- z-index: 1000;
591
- min-width: 190px;
592
- padding: 4px;
593
- border: 1px solid var(--stroke);
594
- border-radius: 8px;
595
- background: var(--panel);
596
- box-shadow: 0 4px 16px rgba(0, 0, 0, 0.12);
597
- }
598
-
599
- .setup-context-menu[hidden] {
600
- display: none;
601
- }
602
-
603
- .setup-context-menu-item {
604
- width: 100%;
605
- justify-content: flex-start;
606
- padding: 6px 10px;
607
- font-size: 12px;
608
- text-align: left;
609
- background: transparent;
610
- color: var(--fg);
611
- border-radius: 6px;
612
- }
613
-
614
- .setup-context-menu-item:hover {
615
- background: var(--cmd-bg-hover);
616
- }
617
-
618
- .status-line {
619
- display: flex;
620
- align-items: center;
621
- gap: 10px;
622
- margin: 0;
623
- color: var(--muted);
624
- font-size: 14px;
625
- }
626
-
627
- .status-dot {
628
- width: 8px;
629
- height: 8px;
630
- border-radius: 999px;
631
- background: #d14;
632
- box-shadow: 0 0 0 3px rgba(209, 17, 68, 0.12);
633
- flex: 0 0 auto;
634
- }
635
-
636
- .status-dot[data-connected="true"] {
637
- background: #2d8a57;
638
- box-shadow: 0 0 0 3px rgba(45, 138, 87, 0.12);
639
- }
640
-
641
- .header-status-indicator {
642
- margin-top: 0;
643
- cursor: help;
644
- }
645
-
646
- .toggle-row {
647
- display: flex;
648
- align-items: center;
649
- justify-content: space-between;
650
- gap: 16px;
651
- }
652
-
653
- .toggle-row input[type="checkbox"] {
654
- width: 42px;
655
- height: 24px;
656
- accent-color: var(--accent);
657
- }
658
-
659
- button {
660
- margin-right: 8px;
661
- border: 0;
662
- border-radius: 6px;
663
- padding: 7px 14px;
664
- font-size: 13px;
665
- font-weight: 500;
666
- background: var(--accent);
667
- color: white;
668
- cursor: pointer;
669
- transition: background 0.12s;
670
- }
671
-
672
- button:hover {
673
- background: var(--accent-strong);
674
- }
675
-
676
- .popup-action {
677
- margin-top: 10px;
678
- width: 100%;
679
- margin-right: 0;
680
- }
681
-
682
- .popup-power-button {
683
- min-height: 40px;
684
- font-size: 14px;
685
- font-weight: 600;
686
- border-radius: 6px;
687
- }
688
-
689
- .popup-power-button[data-pending="true"] {
690
- opacity: 0.7;
691
- cursor: wait;
692
- pointer-events: none;
693
- }
694
-
695
- .power-button {
696
- width: 100%;
697
- min-height: 40px;
698
- margin-top: 10px;
699
- margin-right: 0;
700
- font-size: 14px;
701
- font-weight: 600;
702
- border-radius: 6px;
703
- }
704
-
705
- .power-button:disabled {
706
- background: var(--disabled-bg);
707
- cursor: not-allowed;
708
- }
709
-
710
- .power-button[data-pending="true"] {
711
- opacity: 0.7;
712
- cursor: wait;
713
- pointer-events: none;
714
- }
715
-
716
- .toggle-error {
717
- margin: 6px 0 0;
718
- padding: 6px 10px;
719
- background: var(--status-badge-bg, #fef3cd);
720
- color: var(--text-primary, #856404);
721
- border-radius: 6px;
722
- font-size: 12px;
723
- line-height: 1.4;
724
- }
725
-
726
- .setup-steps {
727
- display: grid;
728
- gap: 6px;
729
- margin-bottom: 12px;
730
- }
731
-
732
- .examples-eyebrow {
733
- margin-bottom: 8px;
734
- }
735
-
736
- .examples-list {
737
- display: grid;
738
- gap: 6px;
739
- min-width: 0;
740
- }
741
-
742
- .examples-content {
743
- display: grid;
744
- gap: 0px;
745
- padding-top: 12px;
746
- }
747
-
748
- .examples-group {
749
- display: grid;
750
- gap: 4px;
751
- }
752
-
753
- .examples-group-title {
754
- margin: 0;
755
- font-size: 11px;
756
- font-weight: 700;
757
- letter-spacing: 0.08em;
758
- text-transform: uppercase;
759
- color: var(--muted);
760
- }
761
-
762
- .example-cmd {
763
- width: 100%;
764
- min-width: 0;
765
- box-sizing: border-box;
766
- overflow: hidden;
767
- user-select: none;
768
- }
769
-
770
- .example-cmd::after {
771
- display: none;
772
- }
773
-
774
- .example-cmd-text {
775
- display: block;
776
- width: 100%;
777
- min-width: 0;
778
- max-width: 100%;
779
- font-size: 11px;
780
- white-space: nowrap;
781
- overflow: hidden;
782
- text-overflow: ellipsis;
783
- word-break: normal;
784
- user-select: none;
785
- }
786
-
787
- .example-copy-button {
788
- position: absolute;
789
- right: 6px;
790
- top: 6px;
791
- border: 0;
792
- background: transparent;
793
- padding: 0;
794
- margin: 0;
795
- font-size: 14px;
796
- font-family: system-ui, sans-serif;
797
- line-height: 1;
798
- color: var(--muted);
799
- cursor: pointer;
800
- }
801
-
802
- .example-copy-button:hover {
803
- background: transparent;
804
- color: var(--muted);
805
- }
806
-
807
- .example-copy-button:focus-visible {
808
- outline: 1px solid var(--accent);
809
- outline-offset: 2px;
810
- }
811
-
812
- .setup-step-hint {
813
- display: block;
814
- font-size: 11px;
815
- color: var(--muted);
816
- margin-top: 6px;
817
- }
818
-
819
- .setup-step-hint:first-child {
820
- margin-top: 0;
821
- }
822
-
823
- .setup-cmd {
824
- display: block;
825
- position: relative;
826
- padding: 6px 10px;
827
- padding-right: 28px;
828
- border-radius: 4px;
829
- background: var(--cmd-bg);
830
- border: 1px solid var(--stroke);
831
- font-family: ui-monospace, 'SF Mono', 'Menlo', 'Monaco', 'Courier New', monospace;
832
- font-size: 11.5px;
833
- color: var(--ink);
834
- cursor: pointer;
835
- word-break: break-all;
836
- user-select: none;
837
- }
838
-
839
- .setup-cmd:hover {
840
- background: var(--cmd-bg-hover);
841
- }
842
-
843
- .setup-cmd::after {
844
- content: '⧉';
845
- position: absolute;
846
- right: 6px;
847
- top: 6px;
848
- font-size: 14px;
849
- font-family: system-ui, sans-serif;
850
- color: var(--muted);
851
- user-select: none;
852
- line-height: 1;
853
- }
854
-
855
- .setup-cmd:hover::after {
856
- color: var(--ink);
857
- }
858
-
859
- .setup-cmd.copied {
860
- background: rgba(45, 138, 87, 0.07);
861
- border-color: rgba(45, 138, 87, 0.25);
862
- }
863
-
864
- .setup-cmd.copied::after {
865
- content: '✓';
866
- color: #2d8a57;
867
- }
868
-
869
- .setup-link {
870
- font-size: 12px;
871
- color: var(--accent);
872
- text-decoration: none;
873
- white-space: nowrap;
874
- }
875
-
876
- .setup-link:hover {
877
- text-decoration: underline;
878
- }
879
-
880
- /* Activity section: fill remaining space & scroll */
881
- #activity-section {
882
- flex: 1 1 0;
883
- min-height: 0;
884
- display: flex;
885
- flex-direction: column;
886
- overflow: hidden;
887
- margin-top: 12px;
888
- }
889
-
890
- .activity-histogram {
891
- display: flex;
892
- flex-direction: column;
893
- gap: 6px;
894
- margin: 0 0 10px;
895
- padding: 8px 10px 10px;
896
- border: 1px solid var(--hist-border);
897
- border-radius: 8px;
898
- background: var(--panel);
899
- box-shadow: 0 1px 3px var(--card-shadow);
900
- flex-shrink: 0;
901
- }
902
-
903
- .activity-histogram-meta {
904
- display: flex;
905
- align-items: center;
906
- justify-content: space-between;
907
- gap: 8px;
908
- }
909
-
910
- .activity-histogram-label {
911
- margin: 0;
912
- }
913
-
914
- .activity-histogram-range {
915
- margin: 0;
916
- font-size: 10px;
917
- line-height: 1.1;
918
- letter-spacing: 0.03em;
919
- opacity: 0.58;
920
- white-space: nowrap;
921
- }
922
-
923
- .activity-histogram-bars {
924
- display: grid;
925
- grid-auto-flow: column;
926
- grid-auto-columns: minmax(0, 1fr);
927
- align-items: end;
928
- gap: 4px;
929
- height: 58px;
930
- padding-top: 2px;
931
- }
932
-
933
- .activity-histogram-bar {
934
- display: flex;
935
- flex-direction: column-reverse;
936
- justify-content: flex-start;
937
- min-width: 0;
938
- min-height: 8px;
939
- overflow: hidden;
940
- background: var(--hist-bar-bg);
941
- border: 1px solid var(--hist-bar-border);
942
- opacity: 0.9;
943
- }
944
-
945
- .activity-histogram-bar[data-empty="true"] {
946
- opacity: 0.42;
947
- }
948
-
949
- .activity-histogram-segment {
950
- display: block;
951
- width: 100%;
952
- min-height: 2px;
953
- }
954
-
955
- .activity-histogram-segment[data-family="dom"] {
956
- background: var(--hist-dom);
957
- }
958
-
959
- .activity-histogram-segment[data-family="page"] {
960
- background: var(--hist-page);
961
- }
962
-
963
- .activity-histogram-segment[data-family="layout"] {
964
- background: var(--hist-layout);
965
- }
966
-
967
- .activity-histogram-segment[data-family="style"] {
968
- background: var(--hist-style);
969
- }
970
-
971
- .activity-histogram-segment[data-family="input"] {
972
- background: var(--hist-input);
973
- }
974
-
975
- .activity-histogram-segment[data-family="patch"] {
976
- background: var(--hist-patch);
977
- }
978
-
979
- .activity-histogram-segment[data-family="capture"] {
980
- background: var(--hist-capture);
981
- }
982
-
983
- .activity-histogram-segment[data-family="other"] {
984
- background: var(--hist-other);
985
- }
986
-
987
- .activity-section-header {
988
- display: flex;
989
- align-items: center;
990
- justify-content: space-between;
991
- gap: 8px;
992
- margin: 0 0 8px;
993
- flex-shrink: 0;
994
- }
995
-
996
- #activity-section h2 {
997
- margin: 0;
998
- font-size: 15px;
999
- flex-shrink: 0;
1000
- }
1001
-
1002
- .activity-summary-tokens {
1003
- font-size: 10px;
1004
- line-height: 1.2;
1005
- color: var(--muted);
1006
- white-space: nowrap;
1007
- padding: 2px 7px;
1008
- border-radius: 4px;
1009
- background: var(--panel);
1010
- border: 1px solid var(--stroke);
1011
- letter-spacing: 0.02em;
1012
- }
1013
-
1014
- .activity-summary-tokens[data-cost-class="heavy"],
1015
- .activity-summary-tokens[data-cost-class="extreme"] {
1016
- background: rgba(209, 17, 68, 0.1);
1017
- color: var(--ink);
1018
- }
1019
-
1020
- #activity-section .stack {
1021
- flex: 1 1 0;
1022
- min-height: 0;
1023
- overflow-y: auto;
1024
- overflow-x: hidden;
1025
- padding-right: 4px;
1026
- align-content: start;
1027
- }
1028
-
1029
- #activity-section .stack::-webkit-scrollbar {
1030
- width: 4px;
1031
- }
1032
- #activity-section .stack::-webkit-scrollbar-thumb {
1033
- background: var(--stroke);
1034
- border-radius: 2px;
1035
- }
1036
-
1037
- /* Collapsible examples section */
1038
- .examples-details,
1039
- .setup-details {
1040
- flex-shrink: 0;
1041
- margin-top: 12px;
1042
- }
1043
-
1044
- .setup-details,
1045
- .setup-details * {
1046
- -webkit-user-select: none;
1047
- user-select: none;
1048
- }
1049
-
1050
- .examples-details summary,
1051
- .setup-details summary {
1052
- cursor: pointer;
1053
- list-style: none;
1054
- display: flex;
1055
- align-items: center;
1056
- gap: 6px;
1057
- }
1058
-
1059
- .examples-details summary::-webkit-details-marker,
1060
- .setup-details summary::-webkit-details-marker {
1061
- display: none;
1062
- }
1063
-
1064
- .examples-details summary .eyebrow,
1065
- .setup-details summary .eyebrow {
1066
- margin: 0;
1067
- }
1068
-
1069
- .examples-details summary::after {
1070
- content: '\25B6';
1071
- font-size: 8px;
1072
- color: var(--muted);
1073
- transition: transform 0.15s;
1074
- }
1075
-
1076
- .examples-details[open] summary::after {
1077
- transform: rotate(90deg);
1078
- }
1079
-
1080
- .setup-details summary {
1081
- justify-content: space-between;
1082
- gap: 12px;
1083
- width: 100%;
1084
- }
1085
-
1086
- .setup-details-summary-heading {
1087
- display: inline-flex;
1088
- align-items: center;
1089
- gap: 6px;
1090
- flex-shrink: 0;
1091
- }
1092
-
1093
- .setup-details-summary-icon::before {
1094
- content: '\25B6';
1095
- font-size: 8px;
1096
- color: var(--muted);
1097
- transition: transform 0.15s;
1098
- display: inline-block;
1099
- }
1100
-
1101
- .setup-details[open] .setup-details-summary-icon::before {
1102
- transform: rotate(90deg);
1103
- }
1104
-
1105
- .setup-summary-note {
1106
- margin-left: auto;
1107
- color: var(--muted);
1108
- opacity: 0.72;
1109
- font-size: 12px;
1110
- flex: 1 1 auto;
1111
- min-width: 0;
1112
- text-align: right;
1113
- white-space: nowrap;
1114
- }
1115
-
1116
- .setup-details:not([open]) .setup-summary-note {
1117
- display: none;
1118
- }
1119
-
1120
- .examples-details .examples-list,
1121
- .setup-details .setup-details-body {
1122
- margin-top: 8px;
1123
- }
1124
-
1125
- @media (max-width: 360px) {
1126
- .panel {
1127
- padding: 10px;
1128
- }
1129
-
1130
- .panel header {
1131
- margin-bottom: 10px;
1132
- }
1133
-
1134
- .panel-header {
1135
- gap: 8px;
1136
- }
1137
-
1138
- .panel-header h1 {
1139
- margin: 0;
1140
- font-size: 16px;
1141
- line-height: 1.15;
1142
- }
1143
-
1144
- .card {
1145
- padding: 8px 10px;
1146
- }
1147
-
1148
- .control-card {
1149
- gap: 0;
1150
- }
1151
-
1152
- .power-button {
1153
- min-height: 36px;
1154
- font-size: 13px;
1155
- }
1156
-
1157
- .stack {
1158
- gap: 6px;
1159
- }
1160
- }