Repository navigation
Expand file tree
/
Copy pathpopup.html
More file actions
1218 lines (1135 loc) · 59.9 KB
/
Copy pathpopup.html
File metadata and controls
1218 lines (1135 loc) · 59.9 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
832
833
834
835
836
837
838
839
840
841
842
843
844
845
846
847
848
849
850
851
852
853
854
855
856
857
858
859
860
861
862
863
864
865
866
867
868
869
870
871
872
873
874
875
876
877
878
879
880
881
882
883
884
885
886
887
888
889
890
891
892
893
894
895
896
897
898
899
900
901
902
903
904
905
906
907
908
909
910
911
912
913
914
915
916
917
918
919
920
921
922
923
924
925
926
927
928
929
930
931
932
933
934
935
936
937
938
939
940
941
942
943
944
945
946
947
948
949
950
951
952
953
954
955
956
957
958
959
960
961
962
963
964
965
966
967
968
969
970
971
972
973
974
975
976
977
978
979
980
981
982
983
984
985
986
987
988
989
990
991
992
993
994
995
996
997
998
999
1000
<!--
Copyright 2026 John Kost
Licensed under the Apache License, Version 2.0
-->
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>ReMixr IDE</title>
<link rel="stylesheet" href="popup.css">
<!-- Fonts -->
<link rel="preconnect" href="https://fonts.googleapis.com">
<link rel="preconnect" href="https://fonts.gstatic.com" crossorigin>
<link
href="https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700&family=JetBrains+Mono:wght@400;500&display=swap"
rel="stylesheet">
<!-- CodeMirror -->
<link rel="stylesheet" href="lib/codemirror/codemirror.min.css">
<link rel="stylesheet" href="lib/codemirror/theme/dracula.min.css">
</head>
<body>
<div class="container">
<!-- Header -->
<header>
<div class="header-main">
<h1>ReMixr IDE</h1>
<p class="tagline">Meta-Extension Builder</p>
</div>
<div class="header-actions-main">
<button id="theme-toggle" class="theme-toggle-btn" title="Toggle Dark/Light Mode">
<span class="moon-icon">🌙</span>
<span class="sun-icon">☀️</span>
</button>
</div>
</header>
<!-- Navigation -->
<nav class="tabs">
<button class="tab-btn active" data-tab="projects">Projects</button>
<button class="tab-btn" data-tab="templates">Templates</button>
<button class="tab-btn" data-tab="code">Code</button>
<button class="tab-btn" data-tab="ui">UI Builder</button>
<span class="tab-divider"></span>
<button class="tab-btn" data-tab="analyzer">Inspector</button>
<button class="tab-btn" data-tab="tools">Utilities</button>
<button class="tab-btn" data-tab="pipeline">Workflows</button>
</nav>
<!-- CONTENT AREAS -->
<!-- Projects Tab -->
<div id="projects-tab" class="tab-content active">
<div class="section">
<h2>Your Projects</h2>
<div id="projects-list" class="projects-list">
<!-- Populated by JS -->
<div class="empty-state">
<div class="empty-state-icon">📦</div>
<p>No projects yet. Create your first extension!</p>
<button id="empty-new-project-btn" class="btn btn-primary empty-state-cta">✨ Start from Template</button>
</div>
</div>
</div>
</div>
<!-- Pipeline Tab -->
<div id="pipeline-tab" class="tab-content">
<div class="section">
<div class="suite-header">
<h2>Automation Workflows</h2>
</div>
<p class="analyzer-subtitle">Run automated tasks to audit and analyze this site.</p>
<div class="spacer-16"></div>
<div class="pipeline-guide">
<div class="guide-item">
<div class="guide-icon">🔍</div>
<div class="guide-content">
<strong>One-Click Workflow</strong>
<span>Click the button below — we'll automatically scan the site and run the workflow for you.</span>
</div>
</div>
<div class="guide-item">
<div class="guide-icon">🤖</div>
<div class="guide-content">
<strong>What Happens</strong>
<span>Audits architecture, detects vulnerabilities, and synthesizes reports — all automated.</span>
</div>
</div>
</div>
<div class="spacer-24"></div>
<div class="pipeline-status-bar">
<div class="pipeline-progress-track">
<div id="pipeline-progress-fill" class="pipeline-progress-fill"></div>
</div>
</div>
<div class="pipeline-controls">
<button id="explain-pipeline-btn" class="btn" title="Explain the last run with the configured provider" style="margin-bottom:8px;">
<span>Explain last run</span>
</button>
<button id="run-remix-pipeline" class="btn btn-primary">
<span>🚀 Start Workflow Task</span>
</button>
</div>
<div class="spacer-24"></div>
<div id="pipeline-orchestrator" class="pipeline-container">
<!-- Pipeline steps injected here -->
<div class="empty-state">
<div class="empty-state-icon">🤖</div>
<p>No active tasks. Click <b>Start Workflow Task</b> above to begin.</p>
</div>
</div>
</div>
</div>
<!-- Templates Tab -->
<div id="templates-tab" class="tab-content">
<div class="section">
<h2>Quick Templates</h2>
<div class="templates-grid">
<div class="template-card" data-template="starter">
<div class="template-icon">🚀</div>
<h3>Starter</h3>
<p>Empty Boilerplate</p>
</div>
<div class="template-card" data-template="content-modifier">
<div class="template-icon">🎨</div>
<h3>Modifier</h3>
<p>Inject CSS/JS</p>
</div>
<div class="template-card" data-template="data-extractor">
<div class="template-icon">📊</div>
<h3>Scraper</h3>
<p>Extract Data</p>
</div>
<div class="template-card" data-template="productivity">
<div class="template-icon">⏱️</div>
<h3>Timer</h3>
<p>Productivity</p>
</div>
<div class="template-card" data-template="popup-tool">
<div class="template-icon">🔧</div>
<h3>Utility</h3>
<p>Popup Tool</p>
</div>
<div class="template-card" data-template="tab-manager">
<div class="template-icon">📑</div>
<h3>Tab Manager</h3>
<p>Organize Tabs</p>
</div>
<div class="template-card" data-template="bookmark-organizer">
<div class="template-icon">🔖</div>
<h3>Bookmarks</h3>
<p>Search & Save</p>
</div>
<div class="template-card" data-template="form-filler">
<div class="template-icon">📝</div>
<h3>Form Filler</h3>
<p>Auto-Fill Forms</p>
</div>
<div class="template-card" data-template="dark-mode">
<div class="template-icon">🌙</div>
<h3>Dark Mode</h3>
<p>Universal Theme</p>
</div>
<div class="template-card" data-template="ad-blocker">
<div class="template-icon">🛡️</div>
<h3>Ad Blocker</h3>
<p>Block Ads</p>
</div>
<div class="template-card" data-template="screenshot-tool">
<div class="template-icon">📸</div>
<h3>Screenshot</h3>
<p>Capture Pages</p>
</div>
<div class="template-card" data-template="password-generator">
<div class="template-icon">🔐</div>
<h3>Password Gen</h3>
<p>Secure Passwords</p>
</div>
<div class="template-card" data-template="note-taker">
<div class="template-icon">📝</div>
<h3>Quick Notes</h3>
<p>Take Notes</p>
</div>
</div>
<div class="spacer-32"></div>
<h2>Extension Wizard</h2>
<!-- Extension Wizard -->
<div class="wizard-container">
<div class="wizard-header">
<div class="wizard-icon">✨</div>
<div>
<h3 class="wizard-title">Scaffold Chrome Extension</h3>
<p class="wizard-subtitle">Configure features and
generate your extension structure</p>
</div>
</div>
<div class="wizard-section">
<label class="wizard-label" for="wizard-name">Extension Name</label>
<input type="text" id="wizard-name" class="wizard-input" placeholder="My Awesome Extension">
</div>
<div class="wizard-section">
<label class="wizard-label" for="wizard-description">Description</label>
<input type="text" id="wizard-description" class="wizard-input"
placeholder="Enhance your browsing experience">
</div>
<div class="wizard-section">
<div class="wizard-label">Extension Type</div>
<div class="wizard-radio-group">
<label class="wizard-radio">
<input type="radio" name="ext-type" value="content-script" checked>
<span>Content Script (Modify Pages)</span>
</label>
<label class="wizard-radio">
<input type="radio" name="ext-type" value="popup">
<span>Browser Action (Popup)</span>
</label>
<label class="wizard-radio">
<input type="radio" name="ext-type" value="side-panel">
<span>Side Panel</span>
</label>
<label class="wizard-radio">
<input type="radio" name="ext-type" value="page-action">
<span>Page Action (Contextual)</span>
</label>
</div>
</div>
<div class="wizard-section">
<div class="wizard-label">Features</div>
<div class="wizard-checkbox-grid">
<label class="wizard-checkbox">
<input type="checkbox" id="feat-background">
<span>Background Service Worker</span>
</label>
<label class="wizard-checkbox">
<input type="checkbox" id="feat-storage">
<span>Local Storage</span>
</label>
<label class="wizard-checkbox">
<input type="checkbox" id="feat-tabs">
<span>Tab Management</span>
</label>
<label class="wizard-checkbox">
<input type="checkbox" id="feat-context-menu">
<span>Context Menu Items</span>
</label>
<label class="wizard-checkbox">
<input type="checkbox" id="feat-notifications">
<span>Notifications</span>
</label>
<label class="wizard-checkbox">
<input type="checkbox" id="feat-bookmarks">
<span>Bookmarks Access</span>
</label>
<label class="wizard-checkbox">
<input type="checkbox" id="feat-history">
<span>History Access</span>
</label>
<label class="wizard-checkbox">
<input type="checkbox" id="feat-downloads">
<span>Download Management</span>
</label>
<label class="wizard-checkbox">
<input type="checkbox" id="feat-cookies">
<span>Cookie Access</span>
</label>
<label class="wizard-checkbox">
<input type="checkbox" id="feat-web-request">
<span>Network Interception</span>
</label>
</div>
</div>
<div class="wizard-section">
<div class="wizard-label">Host Permissions</div>
<div class="wizard-radio-group">
<label class="wizard-radio">
<input type="radio" name="host-perms" value="active-tab" checked>
<span>Active Tab Only</span>
</label>
<label class="wizard-radio">
<input type="radio" name="host-perms" value="all-urls">
<span>All Websites</span>
</label>
<label class="wizard-radio">
<input type="radio" name="host-perms" value="custom">
<span>Custom Domains</span>
</label>
</div>
<input type="text" id="wizard-custom-hosts" class="wizard-input custom-host-input"
placeholder="https://example.com/*" title="Custom domain patterns" aria-label="Custom host patterns">
</div>
<div class="wizard-section">
<label class="wizard-label" for="wizard-framework">UI Framework (Optional)</label>
<select id="wizard-framework" class="wizard-select" title="Select UI Framework">
<option value="vanilla">Vanilla JavaScript</option>
<option value="react">React</option>
<option value="vue">Vue</option>
<option value="svelte">Svelte</option>
</select>
</div>
<div class="wizard-section">
<div class="wizard-label">Behaviors</div>
<div class="wizard-checkbox-grid">
<label class="wizard-checkbox">
<input type="checkbox" id="behavior-match-site">
<span>Match Parent Site Style</span>
</label>
<label class="wizard-checkbox">
<input type="checkbox" id="behavior-auto-open">
<span>Auto-Open Side Panel</span>
</label>
<label class="wizard-checkbox">
<input type="checkbox" id="behavior-persist-state">
<span>Persist State</span>
</label>
<label class="wizard-checkbox">
<input type="checkbox" id="behavior-keyboard">
<span>Keyboard Shortcuts</span>
</label>
<label class="wizard-checkbox">
<input type="checkbox" id="behavior-badge">
<span>Badge Notifications</span>
</label>
<label class="wizard-checkbox">
<input type="checkbox" id="behavior-auto-run">
<span>Auto-Run on Load</span>
</label>
<label class="wizard-checkbox">
<input type="checkbox" id="behavior-sync">
<span>Sync Across Devices</span>
</label>
<label class="wizard-checkbox">
<input type="checkbox" id="behavior-theme">
<span>Theme Support</span>
</label>
<label class="wizard-checkbox">
<input type="checkbox" id="behavior-analytics">
<span>Usage Analytics</span>
</label>
<label class="wizard-checkbox">
<input type="checkbox" id="behavior-hotreload">
<span>Hot Reload Dev Mode</span>
</label>
<label class="wizard-checkbox">
<input type="checkbox" id="behavior-error-tracking">
<span>Error Tracking</span>
</label>
</div>
</div>
<button id="generate-extension-btn" class="btn btn-primary generate-btn-full">
Generate Extension
</button>
</div>
</div>
</div>
<!-- Code Tab -->
<div id="code-tab" class="tab-content">
<div class="vscode-layout">
<!-- Sidebar -->
<div class="vscode-sidebar">
<div class="sidebar-header">
<span>EXPLORER</span>
<span class="header-actions">...</span>
</div>
<div class="sidebar-content">
<!-- Project Name -->
<div class="vscode-section">
<div class="vscode-section-header">PROJECT</div>
<div class="vscode-section-content">
<input type="text" id="project-name" placeholder="Extension Name" class="vscode-input">
</div>
</div>
<!-- File Explorer -->
<div class="vscode-section">
<div class="vscode-section-header" style="justify-content: space-between;">
<span>FILES</span>
<span id="new-file-btn" title="Create New File" style="font-size: 14px; cursor: pointer; padding: 0 4px;" class="sidebar-action-icon">+</span>
</div>
<div class="vscode-section-content file-tree-padding-0">
<div class="file-tree" id="file-tree">
<!-- Dynamically populated -->
</div>
</div>
</div>
<!-- AI Generation (user-chosen provider, grounded in SITE_CONTEXT) -->
<div class="vscode-section">
<div class="vscode-section-header">AI GENERATION</div>
<div class="vscode-section-content">
<p class="feature-description">Generate with your own AI provider key.</p>
<label class="wizard-label" for="ai-provider">Provider</label>
<select id="ai-provider" class="vscode-input" title="AI provider" aria-label="AI provider"></select>
<label class="wizard-label" for="ai-model">Model</label>
<input type="text" id="ai-model" class="vscode-input" placeholder="gpt-4o-mini" title="Model name" aria-label="Model name">
<button id="ai-detect-models-btn" class="vscode-btn" title="List models from the local endpoint">Detect local models</button>
<label class="wizard-label" for="ai-base-url">Base URL (Ollama / custom)</label>
<input type="text" id="ai-base-url" class="vscode-input" placeholder="http://localhost:11434" title="Custom base URL" aria-label="Custom base URL">
<label class="wizard-label" for="ai-proxy-url">Proxy URL (server holds keys — optional)</label>
<input type="text" id="ai-proxy-url" class="vscode-input" placeholder="https://your-server.example/v1/chat" title="Proxy endpoint holding provider keys" aria-label="Proxy URL">
<label class="wizard-label" for="ai-proxy-mode">Proxy mode</label>
<select id="ai-proxy-mode" class="vscode-input" title="Proxy transport mode" aria-label="Proxy mode">
<option value="off">Off — direct provider calls</option>
<option value="prefer">Prefer proxy, fall back to direct</option>
<option value="required">Required — never call providers directly</option>
</select>
<label class="wizard-label" for="ai-api-key">API key (stored locally)</label>
<input type="password" id="ai-api-key" class="vscode-input" placeholder="sk-..." title="API key, stored in local extension storage" aria-label="API key" autocomplete="off">
<label class="wizard-label" for="ai-budget-cap">Budget cap USD per generation (0 = off)</label>
<input type="number" id="ai-budget-cap" class="vscode-input" min="0" step="0.01" placeholder="0" title="Block generations estimated above this cost" aria-label="Budget cap USD">
<label class="wizard-label" for="ai-temperature">Temperature 0–1 (lower = steadier)</label>
<input type="number" id="ai-temperature" class="vscode-input" min="0" max="1" step="0.1" placeholder="0.2" title="Sampling temperature" aria-label="Temperature">
<label class="wizard-label" for="ai-max-tokens">Max output tokens</label>
<input type="number" id="ai-max-tokens" class="vscode-input" min="256" max="32000" step="256" placeholder="4000" title="Maximum output tokens per call" aria-label="Max output tokens">
<label class="wizard-label" for="ai-brief">Brief (what should it build?)</label>
<textarea id="ai-brief" class="vscode-input" rows="3" placeholder="e.g. Dark-mode toggle matching this site's palette"></textarea>
<div class="footer-btn-group">
<button id="ai-test-btn" class="vscode-btn footer-btn-flex" title="Send a minimal test ping">Test</button>
<button id="ai-generate-btn" class="vscode-btn primary footer-btn-flex" title="Generate extension with AI">Generate</button>
<button id="ai-refine-btn" class="vscode-btn footer-btn-flex" title="Apply the brief as a change to the open project">Refine</button>
<button id="ai-benchmark-btn" class="vscode-btn footer-btn-flex" title="Run this brief on every configured provider and compare">Compare</button>
</div>
<div id="ai-status" class="feature-description" role="status"></div>
<div id="ai-providers-status" class="feature-description" title="Configured providers for Auto mode"></div>
</div>
</div>
<!-- Feature Injector -->
<div class="vscode-section collapsed">
<div class="vscode-section-header" id="feature-injector-toggle">FEATURE INJECTOR</div>
<div class="vscode-section-content feature-injector-hidden" id="feature-injector-content">
<p class="feature-injector-description feature-description">
Modify and enhance your project dynamically</p>
<h4 class="injector-category">Identity & Type</h4>
<input type="text" id="inject-name" class="vscode-input inject-input-mb4" placeholder="Update Name"
title="Update extension name" aria-label="Extension name">
<input type="text" id="inject-description" class="vscode-input inject-input-mb8"
placeholder="Update Description" title="Update extension description"
aria-label="Extension description">
<div class="wizard-radio-group">
<label class="wizard-radio"><input type="radio" name="inject-ext-type" value="none" checked><span>Keep
Original</span></label>
<label class="wizard-radio"><input type="radio" name="inject-ext-type"
value="content-script"><span>Content Script</span></label>
<label class="wizard-radio"><input type="radio" name="inject-ext-type"
value="popup"><span>Popup</span></label>
<label class="wizard-radio"><input type="radio" name="inject-ext-type" value="side-panel"><span>Side
Panel</span></label>
<label class="wizard-radio"><input type="radio" name="inject-ext-type" value="page-action"><span>Page
Action</span></label>
</div>
<h4 class="injector-category">Core Features</h4>
<div class="feature-injector-grid">
<label class="wizard-checkbox"><input type="checkbox" id="inject-storage"><span>💾
Storage</span></label>
<label class="wizard-checkbox"><input type="checkbox" id="inject-tabs"><span>📑 Tabs</span></label>
<label class="wizard-checkbox"><input type="checkbox" id="inject-notifications"><span>🔔
Notifications</span></label>
<label class="wizard-checkbox"><input type="checkbox" id="inject-context-menu"><span>📋 Context
Menu</span></label>
<label class="wizard-checkbox"><input type="checkbox" id="inject-background"><span>⚙️
Background</span></label>
<label class="wizard-checkbox"><input type="checkbox" id="inject-bookmarks"><span>🔖
Bookmarks</span></label>
<label class="wizard-checkbox"><input type="checkbox" id="inject-history"><span>📜
History</span></label>
<label class="wizard-checkbox"><input type="checkbox" id="inject-downloads"><span>⬇️
Downloads</span></label>
<label class="wizard-checkbox"><input type="checkbox" id="inject-cookies"><span>🍪
Cookies</span></label>
<label class="wizard-checkbox"><input type="checkbox" id="inject-web-request"><span>🌐 Web
Request</span></label>
</div>
<h4 class="injector-category">UI Components</h4>
<div class="feature-injector-grid">
<label class="wizard-checkbox"><input type="checkbox" id="inject-side-panel"><span>📱 Side
Panel</span></label>
<label class="wizard-checkbox"><input type="checkbox" id="inject-theme"><span>🌓 Theme
Toggle</span></label>
<label class="wizard-checkbox"><input type="checkbox" id="inject-keyboard"><span>⌨️
Keyboard</span></label>
<label class="wizard-checkbox"><input type="checkbox" id="inject-badge"><span>🔴 Badge</span></label>
</div>
<h4 class="injector-category">Host Permissions</h4>
<div class="wizard-radio-group">
<label class="wizard-radio"><input type="radio" name="inject-host-perms" value="active-tab"
checked><span>Active Tab Only</span></label>
<label class="wizard-radio"><input type="radio" name="inject-host-perms" value="all-urls"><span>All
Websites</span></label>
<label class="wizard-radio"><input type="radio" name="inject-host-perms" value="custom"><span>Custom
Domains</span></label>
</div>
<input type="text" id="inject-custom-hosts" class="vscode-input inject-custom-host"
placeholder="https://example.com/*" title="Custom domain patterns" aria-label="Custom host patterns">
<h4 class="injector-category">UI Framework</h4>
<select id="inject-framework" class="vscode-input inject-framework-select" title="Select UI Framework">
<option value="none">Keep Original</option>
<option value="vanilla">Vanilla JS</option>
<option value="react">React</option>
<option value="vue">Vue</option>
<option value="svelte">Svelte</option>
</select>
<h4 class="injector-category">Behaviors</h4>
<div class="feature-injector-grid">
<label class="wizard-checkbox"><input type="checkbox" id="inject-sync-storage"><span>☁️ Sync
Store</span></label>
<label class="wizard-checkbox"><input type="checkbox" id="inject-auto-open"><span>🚀
Auto-Open</span></label>
<label class="wizard-checkbox"><input type="checkbox" id="inject-persist-state"><span>💿
Persist</span></label>
<label class="wizard-checkbox"><input type="checkbox" id="inject-match-site"><span>🎨 Match
Site</span></label>
<label class="wizard-checkbox"><input type="checkbox" id="inject-auto-run"><span>⚡
Auto-Run</span></label>
<label class="wizard-checkbox"><input type="checkbox" id="inject-analytics"><span>📊
Analytics</span></label>
<label class="wizard-checkbox"><input type="checkbox" id="inject-hot-reload"><span>🔥 Hot
Reload</span></label>
<label class="wizard-checkbox"><input type="checkbox" id="inject-error-tracking"><span>🐛
Errors</span></label>
</div>
<button id="inject-features-btn" class="vscode-btn primary inject-btn-full">⚡
Inject Features</button>
<button id="undo-inject-btn" class="vscode-btn inject-btn-full" disabled title="Restore project files from before the last inject or refinement">↩️ Undo change</button>
</div>
</div>
</div>
<div class="sidebar-footer">
<button id="save-project-btn" class="vscode-btn">💾 Save <span class="kbd-hint">Ctrl+S</span></button>
<button id="test-extension-btn" class="vscode-btn primary">🚀 Load Extension</button>
<div class="footer-btn-group">
<button id="export-extension-btn" class="vscode-btn footer-btn-flex">📦 ZIP <span class="kbd-hint">Ctrl+E</span></button>
<button id="preview-btn" class="vscode-btn footer-btn-flex">👁️ Preview</button>
</div>
</div>
</div>
<div class="sidebar-resizer" id="ide-sidebar-resizer"></div>
<!-- Main Editor Area -->
<div class="vscode-main">
<div class="editor-tabs" id="editor-tabs-container">
<div class="editor-tab active">
<span id="current-file">manifest.json</span>
</div>
</div>
<div class="editor-section">
<textarea id="code-editor" title="Code Editor" aria-label="Source code editor"></textarea>
</div>
<!-- Preview Modal -->
<div id="preview-container" class="preview-container-hidden">
<div class="preview-header">
<h3 class="preview-title">PREVIEW</h3>
<button id="close-preview" class="btn btn-secondary btn-small">Close</button>
</div>
<div class="preview-iframe-wrapper">
<iframe id="preview-frame" class="preview-iframe" title="Extension Preview" sandbox="allow-scripts"></iframe>
</div>
</div>
</div>
</div>
</div>
<!-- UI Tab -->
<div id="ui-tab" class="tab-content">
<div class="shiny-container">
<!-- Sidebar - Chat & Context -->
<div class="shiny-sidebar">
<div class="shiny-sidebar-header">
<h3>UI Builder Assistant</h3>
<div class="ai-status">
<span class="status-dot"></span> Online
</div>
</div>
<div class="shiny-chat-history" id="shiny-chat-history">
<div class="chat-message ai">
<div class="chat-icon">✨</div>
<div class="chat-bubble">
Hello! I'm your AI UI Assistant. Describe the interface you want to build, and I'll generate it on the canvas.
<br><br>
Try: <em>"A sleek dashboard with a sidebar and a task list."</em>
</div>
</div>
</div>
<div class="shiny-input-area">
<div class="input-wrapper">
<textarea id="shiny-prompt" placeholder="Message UI Assistant..."></textarea>
<button id="shiny-generate-btn" title="Generate UI">
<svg viewBox="0 0 24 24" width="20" height="20" fill="white">
<path d="M2.01 21L23 12 2.01 3 2 10l15 2-15 2z"></path>
</svg>
</button>
</div>
</div>
</div>
<div class="sidebar-resizer" id="shiny-sidebar-resizer"></div>
<!-- Main - Canvas & Properties -->
<div class="shiny-main">
<div class="shiny-toolbar">
<div class="toolbar-left">
<div class="view-toggles">
<button class="view-btn active" data-view="desktop" title="Desktop View">🖥️</button>
<button class="view-btn" data-view="mobile" title="Mobile View">📱</button>
</div>
</div>
<div class="toolbar-center">
<span id="shiny-project-title">Untitled UI</span>
</div>
<div class="toolbar-right">
<button id="shiny-code-toggle" class="btn btn-small btn-secondary">Code</button>
<button id="shiny-publish-btn" class="btn btn-small btn-primary">Publish</button>
</div>
</div>
<div class="shiny-canvas-area">
<div id="canvas-wrapper" class="canvas-wrapper desktop">
<div class="canvas-chrome">
<div class="chrome-dots"><span></span><span></span><span></span></div>
<div class="chrome-address">re-mixr://preview</div>
</div>
<div class="iframe-container">
<iframe id="shiny-preview-frame" title="UI Preview Canvas" sandbox="allow-scripts"></iframe>
<div id="canvas-overlay" class="canvas-overlay">
<div class="loader-container canvas-loader-hidden">
<div class="shiny-loader"></div>
<p>Generating Interface...</p>
</div>
</div>
</div>
</div>
</div>
<div class="shiny-quick-controls">
<div class="control-group">
<div class="control-label">Theme</div>
<div class="swatch-group">
<button class="swatch dark active" data-theme="dark" title="Dark Mode"></button>
<button class="swatch light" data-theme="light" title="Light Mode"></button>
<button class="swatch glass" data-theme="glass" title="Glassmorphism"></button>
</div>
</div>
<div class="control-divider"></div>
<div class="control-group">
<div class="control-label">Accent</div>
<div class="accent-wrapper">
<input type="color" id="shiny-accent-picker" value="#6366f1" title="Accent color picker"
aria-label="Accent color">
</div>
</div>
<div class="control-divider"></div>
<div class="control-group">
<button id="shiny-magic-polish" class="btn btn-small btn-secondary">✨ Optimize</button>
<button id="shiny-undo" class="btn btn-small btn-secondary" title="Undo">↩️</button>
</div>
</div>
</div>
</div>
</div>
<!-- Analyzer/Inspector Tab - PROFESSIONAL REDESIGN -->
<div id="analyzer-tab" class="tab-content">
<div class="section inspector-workspace">
<!-- Compact Mining Toolbar (Pinned to Top) -->
<div class="inspector-toolbar">
<div class="toolbar-switcher">
<button class="switcher-btn active" data-cluster="actions">⚡ Actions</button>
<button class="switcher-btn" data-cluster="architecture">🏗 Structure</button>
<button class="switcher-btn" data-cluster="design">🎨 Design</button>
<button class="switcher-btn" data-cluster="tech">🛠 Tech</button>
<button class="switcher-btn" data-cluster="data">💾 Data</button>
<button class="switcher-btn" data-cluster="quality">✓ Quality</button>
<button class="switcher-btn" data-cluster="heuristics">🧠 UX Heuristics</button>
</div>
<div class="toolbar-tray">
<!-- Actions Cluster -->
<div class="toolbar-cluster active" id="cluster-actions">
<button id="run-omniscience-btn" class="labeled-icon-btn" title="Complete Extraction">
<span class="li-icon">💎</span><span class="li-label">Blueprint</span>
</button>
<button id="validate-sites-btn" class="labeled-icon-btn" title="Validate extraction across open sites">
<span class="li-icon">V</span><span class="li-label">Validate</span>
</button>
<button id="btn-extract-context" class="labeled-icon-btn" title="Transform Code">
<span class="li-icon">🔮</span><span class="li-label">Extract</span>
</button>
<div class="labeled-icon-btn-toggle" title="Element Miner">
<input type="checkbox" id="inspector-toggle" class="toolbar-checkbox">
<label for="inspector-toggle" class="toolbar-checkbox-label">
<span class="li-icon">🎯</span><span class="li-label">Pick</span>
</label>
</div>
</div>
<!-- Architecture Cluster -->
<div class="toolbar-cluster" id="cluster-architecture">
<button id="scan-structure" class="labeled-icon-btn" title="Structure Analysis">
<span class="li-icon">🏗️</span><span class="li-label">Structure</span>
</button>
<button id="scan-visualize" class="labeled-icon-btn" title="DOM Map Visualization">
<span class="li-icon">🗺️</span><span class="li-label">DOM Map</span>
</button>
<button id="scan-sequence" class="labeled-icon-btn" title="Flow & Sequence Analysis">
<span class="li-icon">🌊</span><span class="li-label">Flow</span>
</button>
<button id="scan-code" class="labeled-icon-btn" title="Code Review">
<span class="li-icon">💻</span><span class="li-label">Code</span>
</button>
</div>
<!-- Design Cluster -->
<div class="toolbar-cluster" id="cluster-design">
<button id="scan-palette" class="labeled-icon-btn" title="Color Palette Extraction">
<span class="li-icon">🎨</span><span class="li-label">Palette</span>
</button>
<button id="scan-fonts" class="labeled-icon-btn" title="Typography & Fonts">
<span class="li-icon">🅰️</span><span class="li-label">Fonts</span>
</button>
<button id="scan-emotion" class="labeled-icon-btn" title="Emotional Impact Analysis">
<span class="li-icon">😊</span><span class="li-label">Emotion</span>
</button>
</div>
<!-- Tech Stack Cluster -->
<div class="toolbar-cluster" id="cluster-tech">
<button id="scan-assets" class="labeled-icon-btn" title="Asset Inventory">
<span class="li-icon">📦</span><span class="li-label">Assets</span>
</button>
<button id="scan-net" class="labeled-icon-btn" title="API & Network Sniffer">
<span class="li-icon">🔌</span><span class="li-label">Network</span>
</button>
<button id="scan-perf" class="labeled-icon-btn premium" title="Performance Audit">
<span class="li-icon">⚡</span><span class="li-label">Perf</span>
</button>
<button id="scan-stack" class="labeled-icon-btn" title="Technology Stack Detection">
<span class="li-icon">🛠️</span><span class="li-label">Stack</span>
</button>
</div>
<!-- Data Cluster -->
<div class="toolbar-cluster" id="cluster-data">
<button id="scan-storage" class="labeled-icon-btn" title="Storage & Cache Explorer">
<span class="li-icon">💾</span><span class="li-label">Storage</span>
</button>
<button id="scan-workers" class="labeled-icon-btn" title="Service Workers & Threads">
<span class="li-icon">👷</span><span class="li-label">Workers</span>
</button>
</div>
<!-- Quality Cluster -->
<div class="toolbar-cluster" id="cluster-quality">
<button id="scan-a11y" class="labeled-icon-btn" title="Accessibility Audit">
<span class="li-icon">♿</span><span class="li-label">A11y</span>
</button>
<button id="scan-seo" class="labeled-icon-btn" title="SEO Optimization Check">
<span class="li-icon">🔍</span><span class="li-label">SEO</span>
</button>
</div>
<!-- Heuristics Cluster -->
<div class="toolbar-cluster" id="cluster-heuristics">
<button id="scan-strategy" class="labeled-icon-btn premium" title="Conversion Strategy">
<span class="li-icon">📈</span><span class="li-label">Convert</span>
</button>
<button id="scan-psyche" class="labeled-icon-btn premium" title="User Persona Analysis">
<span class="li-icon">👤</span><span class="li-label">Persona</span>
</button>
<button id="scan-rhetoric" class="labeled-icon-btn premium" title="Copywriting Analysis">
<span class="li-icon">📝</span><span class="li-label">Copy</span>
</button>
<button id="scan-archetype" class="labeled-icon-btn premium" title="Brand Identity">
<span class="li-icon">🛡️</span><span class="li-label">Brand</span>
</button>
<button id="scan-soul" class="labeled-icon-btn premium" title="Trust Signals">
<span class="li-icon">🤝</span><span class="li-label">Trust</span>
</button>
<button id="scan-shadow" class="labeled-icon-btn premium" title="Dark Pattern Detection">
<span class="li-icon">⚠️</span><span class="li-label">Dark UX</span>
</button>
</div>
</div>
</div>
<!-- Results Display -->
<div id="analysis-results" class="results-display">
<div class="results-header-inline">
<h3 id="result-title" class="result-title-inline">Results</h3>
<div class="results-actions-inline">
<button id="fullscreen-toggle" class="btn-icon-inline" title="Toggle fullscreen">⛶</button>
<button id="clear-results" class="btn-text-inline" title="Clear results">Clear</button>
<button id="view-extracted-context" class="btn-text-inline" title="View Context" style="margin-left: 8px;">Context</button>
</div>
</div>
<div id="result-content" class="results-content">
<div class="empty-state">
Select a cluster above, then click any tool to extract insights
</div>
</div>
<div id="d3-container" class="d3-container d3-container-hidden"></div>
</div>
<!-- Element Inspector Panel -->
<div id="inspector-panel" class="inspector-panel inspector-panel-hidden">
<div class="panel-header">
<span id="inspector-element-tag">DIV</span>
<code id="inspector-element-selector">body > div.main</code>
<button id="close-inspector-panel" class="close-btn">×</button>
</div>
<div class="panel-content">
<div class="style-group">
<div class="style-group-label">Context & A11y</div>
<div class="style-row">
<span style="font-size:10px; opacity:0.8;">ARIA Role</span>
<span id="inspector-a11y-role" style="font-size:10px; color:var(--accent-primary);">-</span>
</div>
<div class="style-row">
<span style="font-size:10px; opacity:0.8;">Tree Depth</span>
<span id="inspector-context-depth" style="font-size:10px;">-</span>
</div>
<div class="style-row">
<span style="font-size:10px; opacity:0.8;">Parent</span>
<span id="inspector-context-parent" style="font-size:10px; font-family:'JetBrains Mono';">-</span>
</div>
</div>
<div class="style-group">
<div class="style-group-label">Layout</div>
<div class="style-row">
<span>Display</span>
<select data-prop="display" class="style-select">
<option value="block">block</option>
<option value="flex">flex</option>
<option value="grid">grid</option>
<option value="inline-block">inline-block</option>
<option value="none">none</option>
</select>
</div>
<div class="style-row">
<span>Width</span>
<input type="text" data-prop="width" class="style-input">
</div>
<div class="style-row">
<span>Height</span>
<input type="text" data-prop="height" class="style-input">
</div>
</div>
<div class="style-group">
<div class="style-group-label">Appearance</div>
<div class="style-row">
<span>Background</span>
<input type="color" data-prop="backgroundColor" class="style-color">
</div>
<div class="style-row">
<span>Color</span>
<input type="color" data-prop="color" class="style-color">
</div>
<div class="style-row">
<span>Opacity</span>
<input type="range" data-prop="opacity" min="0" max="1" step="0.1" class="style-range">
</div>
<div class="style-row">
<span>B-Radius</span>
<input type="text" data-prop="borderRadius" class="style-input">
</div>
</div>
<div class="style-group">
<div class="style-group-label">Typography</div>
<div class="style-row">
<span>Font Size</span>
<input type="text" data-prop="fontSize" class="style-input">
</div>
<div class="style-row">
<span>Weight</span>
<select data-prop="fontWeight" class="style-select">
<option value="normal">Normal</option>
<option value="bold">Bold</option>
<option value="300">Light</option>
<option value="500">Medium</option>
<option value="700">Bold+</option>
</select>
</div>
</div>
<div class="style-group">
<div class="style-group-label">Spacing</div>
<div class="style-row">
<span>Padding</span>
<input type="text" data-prop="padding" class="style-input">
</div>
<div class="style-row">
<span>Margin</span>
<input type="text" data-prop="margin" class="style-input">
</div>
</div>
<div class="style-group">
<div class="style-group-label">Shadow</div>
<div class="style-row full">
<input type="text" data-prop="boxShadow" class="style-input" placeholder="box-shadow value">
</div>
</div>
<div class="style-group">
<div class="style-group-label">System Variables</div>
<div id="inspector-variables-list" class="variables-list">
<div class="inspector-variables-empty">Select an element to view CSS variables</div>
</div>
</div>
</div>
<div class="panel-footer">
<button id="copy-css-btn" class="btn btn-small btn-secondary">Copy CSS</button>
<button id="zap-element-btn" class="btn btn-small btn-danger">Zap</button>
</div>
</div>
</div>
</div>
<!-- Tools Tab -->
<div id="tools-tab" class="tab-content">
<div class="toolbar-container">
<!-- Tool Info Bar -->
<div id="tool-info-bar" class="tool-info-bar">
<span class="tool-info-icon" id="tool-info-icon">🛠</span>
<div class="tool-info-text">
<strong id="tool-info-name">Select a Tool</strong>
<span id="tool-info-desc">Click any tool below to apply it to the current page</span>
</div>
<span id="tool-info-type" class="tool-type-badge">—</span>
</div>
<!-- Group 0: Harness -->
<div class="toolbar-group">
<div class="toolbar-label">Harness</div>
<div class="toolbar-row">
<button id="harness-health-btn" class="tool-btn" title="Provider stats, lineage and costs"
data-desc="Show routing statistics, recent generation lineage and estimated costs" data-type="action">
<span class="icon">H</span> <span class="tool-btn-label">Health</span>
</button>
<button id="harness-reset-btn" class="tool-btn" title="Reset learned routing statistics"
data-desc="Clear accumulated provider outcome statistics" data-type="action">
<span class="icon">R</span> <span class="tool-btn-label">Reset</span>
</button>
</div>
</div>
<!-- Group 1: Visual Forensics -->
<div class="toolbar-group">
<div class="toolbar-label">Visual Forensics</div>
<div class="toolbar-row">
<button id="tool-xray" class="tool-btn highlight" title="Explode DOM in 3D layers"
data-desc="Explode the page into stacked 3D layers by DOM depth" data-type="toggle">
<span class="icon">🧊</span> <span class="tool-btn-label">X-Ray</span>
</button>
<button id="tool-heatmap" class="tool-btn highlight" title="Visualize visual weight and focus"
data-desc="Generate an attention heatmap showing visual weight distribution" data-type="toggle">
<span class="icon">🔥</span> <span class="tool-btn-label">Heatmap</span>
</button>