-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathoutput-example.html
More file actions
1843 lines (1693 loc) · 82.2 KB
/
output-example.html
File metadata and controls
1843 lines (1693 loc) · 82.2 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
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Diff: Calculator.cs → Calculator.cs</title>
<style>
:root {
--color-added-bg: #e6ffec;
--color-added-border: #2da44e;
--color-removed-bg: #ffebe9;
--color-removed-border: #cf222e;
--color-modified-bg: #fff3cd;
--color-modified-border: #bf8700;
--color-moved-bg: #ddf4ff;
--color-moved-border: #218bff;
--color-renamed-bg: #f5e8ff;
--color-renamed-border: #8250df;
--color-line-number: #57606a;
--color-border: #d0d7de;
--color-header-bg: #f6f8fa;
--color-code-bg: #f6f8fa;
--font-mono: ui-monospace, SFMono-Regular, SF Mono, Menlo, Consolas, Liberation Mono, monospace;
}
* {
box-sizing: border-box;
}
body {
font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', 'Noto Sans', Helvetica, Arial, sans-serif;
line-height: 1.5;
color: #24292f;
margin: 0;
padding: 20px;
background-color: #ffffff;
}
header {
margin-bottom: 24px;
padding-bottom: 16px;
border-bottom: 1px solid var(--color-border);
}
h1 {
font-size: 24px;
font-weight: 600;
margin: 0;
}
.header-title-row {
display: flex;
align-items: baseline;
gap: 16px;
margin-bottom: 16px;
flex-wrap: wrap;
justify-content: space-between;
}
.header-title-left {
display: flex;
align-items: baseline;
gap: 16px;
flex-wrap: wrap;
}
.header-timestamp {
font-size: 13px;
color: #57606a;
white-space: nowrap;
}
.header-stats {
display: flex;
align-items: center;
gap: 8px;
font-size: 13px;
color: #57606a;
}
.header-stats .stat-inline {
font-weight: 400;
}
.header-stats .stat-separator {
color: #d0d7de;
}
h2 {
font-size: 16px;
font-weight: 600;
margin: 0;
padding: 12px 16px;
background-color: var(--color-header-bg);
border: 1px solid var(--color-border);
border-radius: 6px 6px 0 0;
}
.summary {
display: flex;
gap: 16px;
flex-wrap: wrap;
}
.stat {
display: inline-flex;
align-items: center;
padding: 4px 12px;
border-radius: 20px;
font-size: 14px;
font-weight: 500;
}
.stat-additions {
background-color: var(--color-added-bg);
color: var(--color-added-border);
}
.stat-deletions {
background-color: var(--color-removed-bg);
color: var(--color-removed-border);
}
.stat-modifications {
background-color: var(--color-modified-bg);
color: var(--color-modified-border);
}
.stat-moves {
background-color: var(--color-moved-bg);
color: var(--color-moved-border);
}
.stat-renames {
background-color: var(--color-renamed-bg);
color: var(--color-renamed-border);
}
.stat-total {
background-color: var(--color-header-bg);
color: #57606a;
}
.stat-mode {
background-color: var(--color-header-bg);
color: #57606a;
border: 1px solid var(--color-border);
}
.diff-mode {
margin-top: 8px;
font-size: 12px;
color: #57606a;
}
main {
display: flex;
flex-direction: column;
gap: 16px;
}
.file-diff {
border-radius: 6px;
overflow: hidden;
}
.file-header {
display: flex;
justify-content: space-between;
align-items: center;
}
.diff-container {
display: flex;
border: 1px solid var(--color-border);
border-top: none;
border-radius: 0 0 6px 6px;
overflow: hidden;
}
.diff-side {
flex: 1;
min-width: 0;
overflow-x: auto;
}
.diff-old {
border-right: 1px solid var(--color-border);
}
.diff-side-header {
padding: 4px 12px;
background-color: var(--color-header-bg);
border-bottom: 1px solid var(--color-border);
font-size: 11px;
font-weight: 500;
color: #57606a;
}
.diff-old .diff-side-header {
background-color: rgba(255, 235, 233, 0.5);
}
.diff-new .diff-side-header {
background-color: rgba(230, 255, 236, 0.5);
}
.diff-content {
font-family: var(--font-mono);
font-size: 12px;
overflow-x: auto;
}
.diff-line {
display: flex;
line-height: 1.2;
}
.line-number {
flex-shrink: 0;
width: 40px;
padding: 0 6px;
text-align: right;
color: var(--color-line-number);
background-color: var(--color-code-bg);
border-right: 1px solid var(--color-border);
user-select: none;
white-space: pre;
}
.line-content {
flex: 1;
padding: 0 6px;
white-space: pre;
overflow-x: auto;
}
.line-added {
background-color: var(--color-added-bg);
}
.line-added .line-number {
background-color: rgba(46, 160, 67, 0.2);
}
.line-removed {
background-color: var(--color-removed-bg);
}
.line-removed .line-number {
background-color: rgba(207, 34, 46, 0.2);
}
.line-modified {
background-color: var(--color-modified-bg);
}
.line-modified .line-number {
background-color: rgba(191, 135, 0, 0.2);
}
.change-section {
margin-bottom: 8px;
border: 1px solid var(--color-border);
border-radius: 6px;
overflow: hidden;
}
.change-header {
display: flex;
justify-content: space-between;
align-items: center;
padding: 6px 12px;
background-color: var(--color-header-bg);
border-bottom: 1px solid var(--color-border);
cursor: pointer;
}
.change-header:hover {
background-color: #f3f4f6;
}
.change-title {
display: flex;
align-items: center;
gap: 8px;
}
.change-badge {
padding: 2px 8px;
border-radius: 12px;
font-size: 11px;
font-weight: 500;
text-transform: uppercase;
}
.badge-added {
background-color: var(--color-added-bg);
color: var(--color-added-border);
}
.badge-removed {
background-color: var(--color-removed-bg);
color: var(--color-removed-border);
}
.badge-modified {
background-color: var(--color-modified-bg);
color: var(--color-modified-border);
}
.badge-moved {
background-color: var(--color-moved-bg);
color: var(--color-moved-border);
}
.badge-renamed {
background-color: var(--color-renamed-bg);
color: var(--color-renamed-border);
}
.change-kind {
font-size: 12px;
color: #57606a;
}
.change-name {
font-family: var(--font-mono);
font-size: 13px;
}
.change-location {
font-size: 11px;
color: #57606a;
}
.change-body {
display: block;
}
.change-body.collapsed {
display: none;
}
.expand-icon {
font-size: 10px;
color: #57606a;
transition: transform 0.2s;
}
.change-header.collapsed .expand-icon {
transform: rotate(-90deg);
}
/* Top diff section header styling */
.top-diff-header {
display: flex;
justify-content: space-between;
align-items: center;
padding: 8px 12px;
background-color: var(--color-header-bg);
border: 1px solid var(--color-border);
border-bottom: none;
cursor: pointer;
}
.top-diff-header:hover {
background-color: #f3f4f6;
}
.top-diff-header .expand-icon {
font-size: 12px;
margin-right: 8px;
}
.top-diff-header.collapsed .expand-icon {
transform: rotate(-90deg);
}
.top-diff-header-left {
display: flex;
align-items: center;
gap: 12px;
}
.top-diff-header-stats {
display: flex;
align-items: center;
gap: 8px;
font-size: 12px;
}
.top-diff-header-stats .stat-inline {
color: #57606a;
}
.top-diff-header-stats .stat-added {
color: var(--color-added-border);
font-weight: 500;
}
.top-diff-header-stats .stat-removed {
color: var(--color-removed-border);
font-weight: 500;
}
.top-diff-header-stats .stat-mode {
color: #57606a;
padding-left: 8px;
border-left: 1px solid var(--color-border);
}
.top-diff-header-buttons {
display: flex;
gap: 4px;
}
.top-diff-content.collapsed {
display: none;
}
.no-changes {
padding: 40px;
text-align: center;
color: #57606a;
background-color: var(--color-header-bg);
border-radius: 6px;
}
/* Syntax highlighting */
.keyword { color: #cf222e; font-weight: 500; }
.string { color: #0a3069; }
.comment { color: #6e7781; font-style: italic; }
.type { color: #8250df; }
.number { color: #0550ae; }
.preprocessor { color: #6e7781; }
/* Copy buttons */
.copy-buttons {
display: flex;
gap: 4px;
margin-left: auto;
}
.copy-btn {
background: none;
border: 1px solid var(--color-border);
border-radius: 4px;
padding: 2px 8px;
font-size: 11px;
color: #57606a;
cursor: pointer;
transition: all 0.15s;
}
.copy-btn:hover {
background-color: var(--color-header-bg);
color: #24292f;
}
.copy-btn.copied {
background-color: var(--color-added-bg);
border-color: var(--color-added-border);
color: var(--color-added-border);
}
/* File info section */
.file-info {
margin: 0;
padding: 0;
}
.file-row {
display: flex;
align-items: center;
justify-content: space-between;
gap: 12px;
padding: 8px 12px;
background-color: var(--color-header-bg);
border: 1px solid var(--color-border);
border-radius: 6px;
margin-bottom: 6px;
}
.file-row:last-child {
margin-bottom: 0;
}
.file-row-left {
display: flex;
align-items: center;
gap: 8px;
min-width: 0;
flex: 1;
}
.file-path-label {
font-size: 12px;
font-weight: 500;
color: #57606a;
white-space: nowrap;
}
.file-path {
font-family: var(--font-mono);
font-size: 12px;
color: #24292f;
word-break: break-all;
min-width: 0;
}
.file-actions {
display: flex;
gap: 4px;
flex-shrink: 0;
}
.action-btn {
position: relative;
display: inline-flex;
align-items: center;
gap: 4px;
padding: 4px 10px;
font-size: 11px;
border: 1px solid var(--color-border);
border-radius: 4px;
background: white;
color: #24292f;
cursor: pointer;
text-decoration: none;
transition: all 0.15s;
}
.action-btn:hover {
background-color: var(--color-header-bg);
border-color: #57606a;
}
.action-btn svg {
width: 14px;
height: 14px;
}
.action-btn.icon-only {
padding: 6px;
gap: 0;
}
.action-btn.icon-only svg {
width: 16px;
height: 16px;
}
/* Notification popup */
.notification {
position: absolute;
top: calc(100% + 4px);
left: 0;
padding: 6px 10px;
font-size: 11px;
background: #1f2328;
color: white;
border-radius: 4px;
white-space: nowrap;
z-index: 1000;
opacity: 0;
transform: translateY(-4px);
transition: opacity 0.15s, transform 0.15s;
pointer-events: none;
}
.notification.show {
opacity: 1;
transform: translateY(0);
}
/* Navigation */
.nav-container {
position: fixed;
bottom: 20px;
right: 20px;
display: flex;
flex-direction: column;
gap: 8px;
z-index: 1000;
}
.nav-btn {
width: 40px;
height: 40px;
border-radius: 50%;
border: 1px solid var(--color-border);
background-color: white;
cursor: pointer;
display: flex;
align-items: center;
justify-content: center;
box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
font-size: 14px;
}
.nav-btn:hover {
background-color: var(--color-header-bg);
}
/* Custom CSS tooltips for buttons - more reliable than native title attribute */
.action-btn[title],
.copy-btn[title],
.nav-btn[title] {
position: relative;
}
.action-btn[title]::after,
.copy-btn[title]::after,
.nav-btn[title]::after {
content: attr(title);
position: absolute;
bottom: calc(100% + 8px);
left: 50%;
transform: translateX(-50%);
padding: 6px 10px;
background: #1f2328;
color: white;
font-size: 11px;
font-weight: normal;
white-space: nowrap;
border-radius: 4px;
z-index: 10000;
pointer-events: none;
opacity: 0;
visibility: hidden;
transition: opacity 0.15s ease-out, visibility 0.15s ease-out;
}
.action-btn[title]::before,
.copy-btn[title]::before,
.nav-btn[title]::before {
content: '';
position: absolute;
bottom: calc(100% + 4px);
left: 50%;
transform: translateX(-50%);
border: 5px solid transparent;
border-top-color: #1f2328;
z-index: 10000;
pointer-events: none;
opacity: 0;
visibility: hidden;
transition: opacity 0.15s ease-out, visibility 0.15s ease-out;
}
.action-btn[title]:hover::after,
.copy-btn[title]:hover::after,
.nav-btn[title]:hover::after,
.action-btn[title]:hover::before,
.copy-btn[title]:hover::before,
.nav-btn[title]:hover::before {
opacity: 1;
visibility: visible;
}
/* Position nav button tooltips to the left (since they're at the right edge) */
.nav-btn[title]::after {
bottom: 50%;
top: auto;
right: calc(100% + 8px);
left: auto;
transform: translateY(50%);
}
.nav-btn[title]::before {
bottom: 50%;
top: auto;
right: calc(100% + 3px);
left: auto;
transform: translateY(50%);
border-top-color: transparent;
border-left-color: #1f2328;
}
/* Impact indicator badges */
.impact-indicator {
font-size: 10px;
padding: 1px 6px;
border-radius: 3px;
margin-left: 8px;
}
.impact-breaking-public {
background-color: #fee2e2;
color: #dc2626;
}
.impact-breaking-internal {
background-color: #fef3c7;
color: #d97706;
}
.impact-nonbreaking {
background-color: #f3f4f6;
color: #6b7280;
}
.impact-formatting {
background-color: #f9fafb;
color: #9ca3af;
}
/* Caveat warnings */
.change-caveats {
font-size: 11px;
color: #b45309;
background-color: #fffbeb;
padding: 4px 8px;
border-radius: 4px;
margin-top: 4px;
}
/* Whitespace warnings */
.whitespace-warning {
font-size: 11px;
color: #b45309;
background-color: #fef3c7;
padding: 4px 8px;
border-radius: 4px;
margin-top: 4px;
display: flex;
align-items: center;
gap: 4px;
}
.whitespace-warning-icon {
font-size: 12px;
}
/* Muted styling for non-breaking changes */
.change-nonbreaking {
opacity: 0.7;
}
/* Print styles */
@media print {
body {
padding: 0;
font-size: 10px;
}
.nav-container {
display: none;
}
.file-diff {
page-break-inside: avoid;
}
.change-section {
page-break-inside: avoid;
}
.diff-container {
border: 1px solid #000;
}
.change-body.collapsed {
display: block !important;
}
}
/* Responsive */
@media (max-width: 768px) {
body {
padding: 10px;
}
.diff-container {
flex-direction: column;
}
.diff-old {
border-right: none;
border-bottom: 1px solid var(--color-border);
}
h1 {
font-size: 18px;
}
.summary {
gap: 8px;
}
.stat {
font-size: 12px;
padding: 2px 8px;
}
}
</style>
</head>
<body>
<header>
<div class="header-title-row">
<div class="header-title-left">
<h1>Diff Report</h1>
<div class="header-stats">
<span class="stat-inline">4 changes</span>
<span class="stat-separator">|</span>
<span class="stat-inline" style="color: var(--color-added-border);">+2 added</span>
<span class="stat-separator">|</span>
<span class="stat-inline" style="color: var(--color-modified-border);">~2 modified</span>
<span class="stat-separator">|</span>
<span class="stat-inline">Mode: Roslyn Semantic</span>
</div>
</div>
<span class="header-timestamp">Jan 19, 2026 2:45 PM</span>
</div>
<div class="file-info">
<div class="file-row">
<div class="file-row-left">
<span class="file-path-label">Old file:</span>
<span class="file-path" id="old-path" data-path="/Users/randlee/Documents/github/roslyn-diff/samples/before/Calculator.cs">/Users/randlee/Documents/github/roslyn-diff/samples/before/Calculator.cs</span>
</div>
<div class="file-actions">
<button class="action-btn icon-only" onclick="copyPathWithNotification(this, '/Users/randlee/Documents/github/roslyn-diff/samples/before/Calculator.cs')" title="Copy full path to clipboard">
<svg viewBox="0 0 16 16" fill="currentColor"><path d="M0 6.75C0 5.784.784 5 1.75 5h1.5a.75.75 0 010 1.5h-1.5a.25.25 0 00-.25.25v7.5c0 .138.112.25.25.25h7.5a.25.25 0 00.25-.25v-1.5a.75.75 0 011.5 0v1.5A1.75 1.75 0 019.25 16h-7.5A1.75 1.75 0 010 14.25v-7.5z"/><path d="M5 1.75C5 .784 5.784 0 6.75 0h7.5C15.216 0 16 .784 16 1.75v7.5A1.75 1.75 0 0114.25 11h-7.5A1.75 1.75 0 015 9.25v-7.5zm1.75-.25a.25.25 0 00-.25.25v7.5c0 .138.112.25.25.25h7.5a.25.25 0 00.25-.25v-7.5a.25.25 0 00-.25-.25h-7.5z"/></svg>
</button>
<button class="action-btn icon-only" onclick="copyPathWithNotification(this, '/Users/randlee/Documents/github/roslyn-diff/samples/before')" title="Copy folder path to clipboard">
<svg viewBox="0 0 16 16" fill="currentColor"><path d="M1.75 2h5.5c.551 0 1.064.278 1.365.737l.43.645A.25.25 0 009.25 3.5h5A1.75 1.75 0 0116 5.25v8A1.75 1.75 0 0114.25 15H1.75A1.75 1.75 0 010 13.25V3.75C0 2.784.784 2 1.75 2zm0 1.5a.25.25 0 00-.25.25v9.5c0 .138.112.25.25.25h12.5a.25.25 0 00.25-.25v-8a.25.25 0 00-.25-.25H9.25a1.75 1.75 0 01-1.458-.79l-.429-.644a.25.25 0 00-.208-.11z"/></svg>
</button>
<button class="action-btn editor-btn icon-only" data-editor="vscode" onclick="openInEditor('/Users/randlee/Documents/github/roslyn-diff/samples/before/Calculator.cs', 'vscode')" title="Open file in VS Code">
<svg viewBox="0 0 16 16" fill="currentColor"><path d="M14.25 1a.74.74 0 00-.218.033L10.7 2.252l-4.5 4-3.5-2.8a.75.75 0 00-.946.086l-.75.75a.75.75 0 00.033 1.09L4.5 8l-3.463 2.622a.75.75 0 00-.033 1.09l.75.75a.75.75 0 00.946.086l3.5-2.8 4.5 4 3.332 1.22A.74.74 0 0015 14.25V1.75a.75.75 0 00-.75-.75zM11 12.12L7.28 8 11 3.88v8.24z"/></svg>
</button>
<button class="action-btn editor-btn icon-only" data-editor="rider" onclick="openInEditor('/Users/randlee/Documents/github/roslyn-diff/samples/before/Calculator.cs', 'rider')" title="Open file in Rider">
<svg viewBox="0 0 16 16" fill="currentColor"><path d="M0 0v16h16V0H0zm13.2 2.8c.4.5.6 1 .6 1.7 0 .5-.1.9-.3 1.3-.2.4-.6.7-1 .9l1.6 2.5h-2.2l-1.4-2.2H8.8v2.2H7V2.1h3.7c.6 0 1.1.1 1.5.3.4.2.8.3 1 .4zM7 12h6v1.2H7V12z"/><path d="M8.8 3.6v2h1.3c.3 0 .6-.1.8-.3.2-.2.3-.4.3-.7s-.1-.5-.3-.7c-.2-.2-.5-.3-.8-.3H8.8z"/></svg>
</button>
<button class="action-btn editor-btn icon-only" data-editor="pycharm" onclick="openInEditor('/Users/randlee/Documents/github/roslyn-diff/samples/before/Calculator.cs', 'pycharm')" title="Open file in PyCharm">
<svg viewBox="0 0 16 16" fill="currentColor"><path d="M0 0v16h16V0H0zm2 13h5v1H2v-1zm6.3-5.5c-.1.4-.4.7-.8.9l1.2 1.8h-1.5l-1-1.5H5v1.5H3.5V4.5h2.8c.5 0 .9.1 1.2.3.3.2.5.4.7.7.1.3.2.6.2 1 0 .4-.1.7-.1 1zm-.9-1c0-.2-.1-.4-.2-.5-.1-.2-.3-.2-.5-.2H5v1.5h1.7c.2 0 .4-.1.5-.2.1-.2.2-.4.2-.6z"/></svg>
</button>
<button class="action-btn editor-btn icon-only" data-editor="zed" onclick="openInEditor('/Users/randlee/Documents/github/roslyn-diff/samples/before/Calculator.cs', 'zed')" title="Open file in Zed">
<svg viewBox="0 0 16 16" fill="currentColor"><path d="M2.5 1L13 1L15 3.5L15 14.5L13 16L3 16L1 13.5L1 2.5L2.5 1ZM3.5 3L3 3.5L3 12.5L4 14L12 14L13 12.5L13 4L12 3L3.5 3ZM5 5L11 5L11 6.5L7.5 11L11 11L11 13L5 13L5 11.5L8.5 7L5 7L5 5Z"/></svg>
</button>
</div>
</div>
<div class="file-row">
<div class="file-row-left">
<span class="file-path-label">New file:</span>
<span class="file-path" id="new-path" data-path="/Users/randlee/Documents/github/roslyn-diff/samples/after/Calculator.cs">/Users/randlee/Documents/github/roslyn-diff/samples/after/Calculator.cs</span>
</div>
<div class="file-actions">
<button class="action-btn icon-only" onclick="copyPathWithNotification(this, '/Users/randlee/Documents/github/roslyn-diff/samples/after/Calculator.cs')" title="Copy full path to clipboard">
<svg viewBox="0 0 16 16" fill="currentColor"><path d="M0 6.75C0 5.784.784 5 1.75 5h1.5a.75.75 0 010 1.5h-1.5a.25.25 0 00-.25.25v7.5c0 .138.112.25.25.25h7.5a.25.25 0 00.25-.25v-1.5a.75.75 0 011.5 0v1.5A1.75 1.75 0 019.25 16h-7.5A1.75 1.75 0 010 14.25v-7.5z"/><path d="M5 1.75C5 .784 5.784 0 6.75 0h7.5C15.216 0 16 .784 16 1.75v7.5A1.75 1.75 0 0114.25 11h-7.5A1.75 1.75 0 015 9.25v-7.5zm1.75-.25a.25.25 0 00-.25.25v7.5c0 .138.112.25.25.25h7.5a.25.25 0 00.25-.25v-7.5a.25.25 0 00-.25-.25h-7.5z"/></svg>
</button>
<button class="action-btn icon-only" onclick="copyPathWithNotification(this, '/Users/randlee/Documents/github/roslyn-diff/samples/after')" title="Copy folder path to clipboard">
<svg viewBox="0 0 16 16" fill="currentColor"><path d="M1.75 2h5.5c.551 0 1.064.278 1.365.737l.43.645A.25.25 0 009.25 3.5h5A1.75 1.75 0 0116 5.25v8A1.75 1.75 0 0114.25 15H1.75A1.75 1.75 0 010 13.25V3.75C0 2.784.784 2 1.75 2zm0 1.5a.25.25 0 00-.25.25v9.5c0 .138.112.25.25.25h12.5a.25.25 0 00.25-.25v-8a.25.25 0 00-.25-.25H9.25a1.75 1.75 0 01-1.458-.79l-.429-.644a.25.25 0 00-.208-.11z"/></svg>
</button>
<button class="action-btn editor-btn icon-only" data-editor="vscode" onclick="openInEditor('/Users/randlee/Documents/github/roslyn-diff/samples/after/Calculator.cs', 'vscode')" title="Open file in VS Code">
<svg viewBox="0 0 16 16" fill="currentColor"><path d="M14.25 1a.74.74 0 00-.218.033L10.7 2.252l-4.5 4-3.5-2.8a.75.75 0 00-.946.086l-.75.75a.75.75 0 00.033 1.09L4.5 8l-3.463 2.622a.75.75 0 00-.033 1.09l.75.75a.75.75 0 00.946.086l3.5-2.8 4.5 4 3.332 1.22A.74.74 0 0015 14.25V1.75a.75.75 0 00-.75-.75zM11 12.12L7.28 8 11 3.88v8.24z"/></svg>
</button>
<button class="action-btn editor-btn icon-only" data-editor="rider" onclick="openInEditor('/Users/randlee/Documents/github/roslyn-diff/samples/after/Calculator.cs', 'rider')" title="Open file in Rider">
<svg viewBox="0 0 16 16" fill="currentColor"><path d="M0 0v16h16V0H0zm13.2 2.8c.4.5.6 1 .6 1.7 0 .5-.1.9-.3 1.3-.2.4-.6.7-1 .9l1.6 2.5h-2.2l-1.4-2.2H8.8v2.2H7V2.1h3.7c.6 0 1.1.1 1.5.3.4.2.8.3 1 .4zM7 12h6v1.2H7V12z"/><path d="M8.8 3.6v2h1.3c.3 0 .6-.1.8-.3.2-.2.3-.4.3-.7s-.1-.5-.3-.7c-.2-.2-.5-.3-.8-.3H8.8z"/></svg>
</button>
<button class="action-btn editor-btn icon-only" data-editor="pycharm" onclick="openInEditor('/Users/randlee/Documents/github/roslyn-diff/samples/after/Calculator.cs', 'pycharm')" title="Open file in PyCharm">
<svg viewBox="0 0 16 16" fill="currentColor"><path d="M0 0v16h16V0H0zm2 13h5v1H2v-1zm6.3-5.5c-.1.4-.4.7-.8.9l1.2 1.8h-1.5l-1-1.5H5v1.5H3.5V4.5h2.8c.5 0 .9.1 1.2.3.3.2.5.4.7.7.1.3.2.6.2 1 0 .4-.1.7-.1 1zm-.9-1c0-.2-.1-.4-.2-.5-.1-.2-.3-.2-.5-.2H5v1.5h1.7c.2 0 .4-.1.5-.2.1-.2.2-.4.2-.6z"/></svg>
</button>
<button class="action-btn editor-btn icon-only" data-editor="zed" onclick="openInEditor('/Users/randlee/Documents/github/roslyn-diff/samples/after/Calculator.cs', 'zed')" title="Open file in Zed">
<svg viewBox="0 0 16 16" fill="currentColor"><path d="M2.5 1L13 1L15 3.5L15 14.5L13 16L3 16L1 13.5L1 2.5L2.5 1ZM3.5 3L3 3.5L3 12.5L4 14L12 14L13 12.5L13 4L12 3L3.5 3ZM5 5L11 5L11 6.5L7.5 11L11 11L11 13L5 13L5 11.5L8.5 7L5 7L5 5Z"/></svg>
</button>
</div>
</div>
</div>
</header>
<main>
<section class="file-diff" id="file-Calculator-cee7efb4">
<div class="file-header">
<h2>Calculator.cs</h2>
</div>
<div class="top-diff-header" onclick="toggleTopDiff('file-Calculator-cee7efb4-top-diff')" data-file-json="{"path":"/Users/randlee/Documents/github/roslyn-diff/samples/after/Calculator.cs","changes":[{"type":"Modified","kind":"Namespace","name":"Samples","oldLine":1,"newLine":1,"oldContent":"namespace Samples;\r\n/// <summary>\n/// A simple calculator class for basic arithmetic operations.\n/// </summary>\npublic class Calculator\r\n{\r\n /// <summary>\n /// Adds two numbers together.\n /// </summary>\n public int Add(int a, int b)\r\n {\r\n return a + b;\r\n }\r\n\r\n /// <summary>\n /// Subtracts the second number from the first.\n /// </summary>\n public int Subtract(int a, int b)\r\n {\r\n return a - b;\r\n }\r\n}","newContent":"namespace Samples;\r\n/// <summary>\n/// A simple calculator class for basic arithmetic operations.\n/// </summary>\npublic class Calculator\r\n{\r\n /// <summary>\n /// Adds two numbers together.\n /// </summary>\n /// <param name = \"a\">The first number.</param>\n /// <param name = \"b\">The second number.</param>\n /// <returns>The sum of a and b.</returns>\n public int Add(int a, int b)\r\n {\r\n return a + b;\r\n }\r\n\r\n /// <summary>\n /// Subtracts the second number from the first.\n /// </summary>\n /// <param name = \"a\">The first number.</param>\n /// <param name = \"b\">The second number.</param>\n /// <returns>The difference of a and b.</returns>\n public int Subtract(int a, int b)\r\n {\r\n return a - b;\r\n }\r\n\r\n /// <summary>\n /// Multiplies two numbers.\n /// </summary>\n /// <param name = \"a\">The first number.</param>\n /// <param name = \"b\">The second number.</param>\n /// <returns>The product of a and b.</returns>\n public int Multiply(int a, int b)\r\n {\r\n return a * b;\r\n }\r\n\r\n /// <summary>\n /// Divides the first number by the second.\n /// </summary>\n /// <param name = \"a\">The dividend.</param>\n /// <param name = \"b\">The divisor.</param>\n /// <returns>The quotient of a divided by b.</returns>\n /// <exception cref = \"DivideByZeroException\">Thrown when b is zero.</exception>\n public int Divide(int a, int b)\r\n {\r\n if (b == 0)\r\n {\r\n throw new DivideByZeroException(\"Cannot divide by zero.\");\r\n }\r\n\r\n return a / b;\r\n }\r\n}"}]}" data-file-diff="--- /Users/randlee/Documents/github/roslyn-diff/samples/before/Calculator.cs
+++ /Users/randlee/Documents/github/roslyn-diff/samples/after/Calculator.cs
@@ -1,22 +1,56 @@ Samples
-namespace Samples;
-/// <summary>
-/// A simple calculator class for basic arithmetic operations.
-/// </summary>
-public class Calculator
-{
- /// <summary>
- /// Adds two numbers together.
- /// </summary>
- public int Add(int a, int b)
- {
- return a + b;
- }
-
- /// <summary>
- /// Subtracts the second number from the first.
- /// </summary>
- public int Subtract(int a, int b)
- {
- return a - b;
- }
-}
+namespace Samples;
+/// <summary>
+/// A simple calculator class for basic arithmetic operations.
+/// </summary>
+public class Calculator
+{
+ /// <summary>
+ /// Adds two numbers together.
+ /// </summary>
+ /// <param name = "a">The first number.</param>
+ /// <param name = "b">The second number.</param>
+ /// <returns>The sum of a and b.</returns>
+ public int Add(int a, int b)
+ {
+ return a + b;
+ }
+
+ /// <summary>
+ /// Subtracts the second number from the first.
+ /// </summary>
+ /// <param name = "a">The first number.</param>
+ /// <param name = "b">The second number.</param>
+ /// <returns>The difference of a and b.</returns>
+ public int Subtract(int a, int b)
+ {
+ return a - b;
+ }
+
+ /// <summary>
+ /// Multiplies two numbers.
+ /// </summary>
+ /// <param name = "a">The first number.</param>
+ /// <param name = "b">The second number.</param>
+ /// <returns>The product of a and b.</returns>
+ public int Multiply(int a, int b)
+ {
+ return a * b;
+ }
+
+ /// <summary>
+ /// Divides the first number by the second.
+ /// </summary>
+ /// <param name = "a">The dividend.</param>
+ /// <param name = "b">The divisor.</param>
+ /// <returns>The quotient of a divided by b.</returns>
+ /// <exception cref = "DivideByZeroException">Thrown when b is zero.</exception>
+ public int Divide(int a, int b)
+ {
+ if (b == 0)
+ {
+ throw new DivideByZeroException("Cannot divide by zero.");
+ }
+
+ return a / b;
+ }
+}
">
<div class="top-diff-header-left">
<span class="expand-icon">▼</span>
<div class="top-diff-header-stats">
<span class="stat-inline">4 changes</span>
<span class="stat-added">+2 added</span>
<span class="stat-mode">Mode: Roslyn Semantic</span>
</div>
</div>
<div class="top-diff-header-buttons" onclick="event.stopPropagation()">
<button class="copy-btn" onclick="copyTopDiffAsJson(this)" title="Copy entire diff as JSON">JSON</button>
<button class="copy-btn" onclick="copyTopDiffAsDiff(this)" title="Copy entire diff in unified format">Diff</button>
</div>
</div>
<div class="top-diff-content" id="file-Calculator-cee7efb4-top-diff">
<div class="diff-container" id="file-Calculator-cee7efb4-content">
<div class="diff-side diff-old">
<div class="diff-side-header">Old Version</div>
<div class="diff-content">
<div class="diff-line line-modified">
<span class="line-number">1</span>
<span class="line-content"><span class="keyword">namespace</span> Samples;</span>
</div>
<div class="diff-line line-modified">
<span class="line-number">2</span>
<span class="line-content"><span class="comment">/// <summary></span></span>
</div>
<div class="diff-line line-modified">
<span class="line-number">3</span>
<span class="line-content"><span class="comment">/// A simple calculator <span class="keyword">class</span> <span class="keyword">for</span> basic arithmetic operations.</span></span>
</div>
<div class="diff-line line-modified">
<span class="line-number">4</span>
<span class="line-content"><span class="comment">/// </summary></span></span>
</div>
<div class="diff-line line-modified">
<span class="line-number">5</span>
<span class="line-content"><span class="keyword">public</span> <span class="keyword">class</span> Calculator</span>
</div>
<div class="diff-line line-modified">
<span class="line-number">6</span>
<span class="line-content">{</span>
</div>
<div class="diff-line line-modified">