@filipc77/cowrite 0.6.3 → 0.6.5
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +15 -4
- package/dist/bin/cowrite.js +162 -19
- package/dist/bin/cowrite.js.map +1 -1
- package/package.json +1 -1
- package/ui/client.js +365 -99
- package/ui/index.html +16 -7
- package/ui/styles.css +278 -5
package/ui/styles.css
CHANGED
|
@@ -185,6 +185,53 @@ header h1 {
|
|
|
185
185
|
letter-spacing: 0.2px;
|
|
186
186
|
}
|
|
187
187
|
|
|
188
|
+
/* ---- Font size toggle ---- */
|
|
189
|
+
.font-size-toggle {
|
|
190
|
+
display: flex;
|
|
191
|
+
align-items: center;
|
|
192
|
+
gap: 2px;
|
|
193
|
+
background: var(--bg);
|
|
194
|
+
border: 1px solid var(--border);
|
|
195
|
+
border-radius: var(--radius-sm);
|
|
196
|
+
padding: 2px;
|
|
197
|
+
}
|
|
198
|
+
|
|
199
|
+
.font-size-btn {
|
|
200
|
+
display: flex;
|
|
201
|
+
align-items: center;
|
|
202
|
+
justify-content: center;
|
|
203
|
+
border: none;
|
|
204
|
+
background: transparent;
|
|
205
|
+
color: var(--text-faint);
|
|
206
|
+
cursor: pointer;
|
|
207
|
+
border-radius: 6px;
|
|
208
|
+
padding: 3px 8px;
|
|
209
|
+
font-family: var(--font-sans);
|
|
210
|
+
font-weight: 600;
|
|
211
|
+
transition: all 0.15s ease;
|
|
212
|
+
}
|
|
213
|
+
|
|
214
|
+
.font-size-btn[data-size="regular"] span { font-size: 11px; }
|
|
215
|
+
.font-size-btn[data-size="large"] span { font-size: 15px; }
|
|
216
|
+
|
|
217
|
+
.font-size-btn:hover {
|
|
218
|
+
color: var(--text-dim);
|
|
219
|
+
}
|
|
220
|
+
|
|
221
|
+
.font-size-btn[aria-pressed="true"] {
|
|
222
|
+
background: var(--surface-hover);
|
|
223
|
+
color: var(--accent);
|
|
224
|
+
}
|
|
225
|
+
|
|
226
|
+
/* Large font size mode */
|
|
227
|
+
body.font-large #fileContent .markdown-body {
|
|
228
|
+
font-size: 19px !important;
|
|
229
|
+
}
|
|
230
|
+
|
|
231
|
+
body.font-large #fileContent .plain-text {
|
|
232
|
+
font-size: 15px !important;
|
|
233
|
+
}
|
|
234
|
+
|
|
188
235
|
/* ---- Undo button ---- */
|
|
189
236
|
.undo-btn {
|
|
190
237
|
display: flex;
|
|
@@ -443,6 +490,7 @@ main {
|
|
|
443
490
|
.comment-highlight.resolved {
|
|
444
491
|
background: transparent;
|
|
445
492
|
border-bottom: none;
|
|
493
|
+
cursor: text;
|
|
446
494
|
}
|
|
447
495
|
|
|
448
496
|
[data-theme="light"] .comment-highlight:hover {
|
|
@@ -453,10 +501,31 @@ main {
|
|
|
453
501
|
background: rgba(58, 114, 160, 0.12);
|
|
454
502
|
}
|
|
455
503
|
|
|
504
|
+
/* ---- Sidebar drag handle ---- */
|
|
505
|
+
.sidebar-drag-handle {
|
|
506
|
+
width: 5px;
|
|
507
|
+
cursor: col-resize;
|
|
508
|
+
background: transparent;
|
|
509
|
+
flex-shrink: 0;
|
|
510
|
+
transition: background 0.15s ease;
|
|
511
|
+
z-index: 10;
|
|
512
|
+
}
|
|
513
|
+
|
|
514
|
+
.sidebar-drag-handle:hover,
|
|
515
|
+
body.sidebar-resizing .sidebar-drag-handle {
|
|
516
|
+
background: var(--accent);
|
|
517
|
+
}
|
|
518
|
+
|
|
519
|
+
body.sidebar-resizing {
|
|
520
|
+
cursor: col-resize;
|
|
521
|
+
user-select: none;
|
|
522
|
+
}
|
|
523
|
+
|
|
456
524
|
/* ---- Sidebar ---- */
|
|
457
525
|
.sidebar {
|
|
458
|
-
width: 360px;
|
|
459
|
-
min-width:
|
|
526
|
+
width: var(--sidebar-width, 360px);
|
|
527
|
+
min-width: 300px;
|
|
528
|
+
max-width: 50vw;
|
|
460
529
|
background: var(--surface);
|
|
461
530
|
border-left: 1px solid var(--border);
|
|
462
531
|
overflow-y: auto;
|
|
@@ -596,12 +665,58 @@ main {
|
|
|
596
665
|
}
|
|
597
666
|
|
|
598
667
|
.comment-card.resolved {
|
|
599
|
-
opacity: 0.5;
|
|
600
668
|
border-left: 3px solid var(--green);
|
|
669
|
+
padding: 10px 14px;
|
|
601
670
|
}
|
|
602
671
|
|
|
603
|
-
.comment-card.resolved
|
|
604
|
-
|
|
672
|
+
.comment-card.resolved .comment-text,
|
|
673
|
+
.comment-card.resolved .comment-selected-text,
|
|
674
|
+
.comment-card.resolved .comment-meta {
|
|
675
|
+
color: var(--text-faint);
|
|
676
|
+
}
|
|
677
|
+
|
|
678
|
+
.comment-card.resolved .comment-selected-text {
|
|
679
|
+
border-left-color: var(--green);
|
|
680
|
+
background: var(--green-bg);
|
|
681
|
+
}
|
|
682
|
+
|
|
683
|
+
/* Resolved collapsed summary */
|
|
684
|
+
.resolved-summary {
|
|
685
|
+
display: flex;
|
|
686
|
+
align-items: center;
|
|
687
|
+
gap: 8px;
|
|
688
|
+
cursor: pointer;
|
|
689
|
+
user-select: none;
|
|
690
|
+
}
|
|
691
|
+
|
|
692
|
+
.resolved-summary:hover .resolved-summary-text {
|
|
693
|
+
color: var(--text-dim);
|
|
694
|
+
}
|
|
695
|
+
|
|
696
|
+
.resolved-chevron {
|
|
697
|
+
flex-shrink: 0;
|
|
698
|
+
color: var(--text-faint);
|
|
699
|
+
transition: transform 0.15s ease;
|
|
700
|
+
}
|
|
701
|
+
|
|
702
|
+
.comment-card.resolved-expanded .resolved-chevron {
|
|
703
|
+
transform: rotate(90deg);
|
|
704
|
+
}
|
|
705
|
+
|
|
706
|
+
.resolved-summary-text {
|
|
707
|
+
font-size: 12px;
|
|
708
|
+
color: var(--text-faint);
|
|
709
|
+
white-space: nowrap;
|
|
710
|
+
overflow: hidden;
|
|
711
|
+
text-overflow: ellipsis;
|
|
712
|
+
min-width: 0;
|
|
713
|
+
transition: color 0.15s ease;
|
|
714
|
+
}
|
|
715
|
+
|
|
716
|
+
.resolved-details {
|
|
717
|
+
margin-top: 12px;
|
|
718
|
+
padding-top: 12px;
|
|
719
|
+
border-top: 1px solid var(--border);
|
|
605
720
|
}
|
|
606
721
|
|
|
607
722
|
@keyframes card-enter {
|
|
@@ -826,6 +941,40 @@ main {
|
|
|
826
941
|
transform: scale(0.96);
|
|
827
942
|
}
|
|
828
943
|
|
|
944
|
+
/* ---- Format buttons ---- */
|
|
945
|
+
.format-buttons {
|
|
946
|
+
display: flex;
|
|
947
|
+
align-items: center;
|
|
948
|
+
gap: 1px;
|
|
949
|
+
}
|
|
950
|
+
.format-buttons[hidden] { display: none; }
|
|
951
|
+
.format-buttons button {
|
|
952
|
+
width: 28px;
|
|
953
|
+
height: 28px;
|
|
954
|
+
border: none;
|
|
955
|
+
border-radius: 0;
|
|
956
|
+
background: var(--surface);
|
|
957
|
+
color: var(--text-dim);
|
|
958
|
+
font-size: 12px;
|
|
959
|
+
cursor: pointer;
|
|
960
|
+
display: flex;
|
|
961
|
+
align-items: center;
|
|
962
|
+
justify-content: center;
|
|
963
|
+
transition: background 0.15s ease, color 0.15s ease;
|
|
964
|
+
padding: 0;
|
|
965
|
+
}
|
|
966
|
+
.format-buttons button:hover {
|
|
967
|
+
background: var(--surface-hover);
|
|
968
|
+
color: var(--text);
|
|
969
|
+
}
|
|
970
|
+
.toolbar-divider {
|
|
971
|
+
width: 1px;
|
|
972
|
+
height: 16px;
|
|
973
|
+
background: var(--border);
|
|
974
|
+
margin: 0;
|
|
975
|
+
flex-shrink: 0;
|
|
976
|
+
}
|
|
977
|
+
|
|
829
978
|
/* ---- Comment popup ---- */
|
|
830
979
|
.comment-popup {
|
|
831
980
|
position: fixed;
|
|
@@ -1235,6 +1384,130 @@ main {
|
|
|
1235
1384
|
padding-right: 2px;
|
|
1236
1385
|
}
|
|
1237
1386
|
|
|
1387
|
+
/* ---- Proposal diff ---- */
|
|
1388
|
+
.proposal-explanation {
|
|
1389
|
+
font-size: 12px;
|
|
1390
|
+
line-height: 1.5;
|
|
1391
|
+
margin-bottom: 8px;
|
|
1392
|
+
}
|
|
1238
1393
|
|
|
1394
|
+
.proposal-diff {
|
|
1395
|
+
border: 1px solid var(--border);
|
|
1396
|
+
border-radius: var(--radius-sm);
|
|
1397
|
+
overflow: hidden;
|
|
1398
|
+
margin-bottom: 8px;
|
|
1399
|
+
}
|
|
1400
|
+
|
|
1401
|
+
.proposal-diff pre {
|
|
1402
|
+
margin: 0;
|
|
1403
|
+
padding: 8px 10px;
|
|
1404
|
+
font-family: var(--font-mono);
|
|
1405
|
+
font-size: 11px;
|
|
1406
|
+
line-height: 1.5;
|
|
1407
|
+
white-space: pre-wrap;
|
|
1408
|
+
word-wrap: break-word;
|
|
1409
|
+
}
|
|
1410
|
+
|
|
1411
|
+
.proposal-label {
|
|
1412
|
+
display: block;
|
|
1413
|
+
font-family: var(--font-sans);
|
|
1414
|
+
font-size: 10px;
|
|
1415
|
+
font-weight: 600;
|
|
1416
|
+
text-transform: uppercase;
|
|
1417
|
+
letter-spacing: 0.5px;
|
|
1418
|
+
padding: 4px 10px 0;
|
|
1419
|
+
}
|
|
1420
|
+
|
|
1421
|
+
.proposal-old {
|
|
1422
|
+
background: rgba(212, 97, 110, 0.08);
|
|
1423
|
+
border-bottom: 1px solid var(--border);
|
|
1424
|
+
}
|
|
1425
|
+
|
|
1426
|
+
.proposal-old .proposal-label { color: var(--red); }
|
|
1427
|
+
|
|
1428
|
+
.proposal-new {
|
|
1429
|
+
background: rgba(111, 191, 138, 0.08);
|
|
1430
|
+
}
|
|
1431
|
+
|
|
1432
|
+
.proposal-new .proposal-label { color: var(--green); }
|
|
1433
|
+
|
|
1434
|
+
.proposal-actions {
|
|
1435
|
+
display: flex;
|
|
1436
|
+
gap: 6px;
|
|
1437
|
+
}
|
|
1438
|
+
|
|
1439
|
+
.proposal-apply-btn {
|
|
1440
|
+
font-family: var(--font-sans);
|
|
1441
|
+
font-size: 11px;
|
|
1442
|
+
font-weight: 600;
|
|
1443
|
+
padding: 5px 14px;
|
|
1444
|
+
border-radius: var(--radius-sm);
|
|
1445
|
+
border: none;
|
|
1446
|
+
background: var(--green);
|
|
1447
|
+
color: var(--bg);
|
|
1448
|
+
cursor: pointer;
|
|
1449
|
+
transition: opacity 0.15s ease;
|
|
1450
|
+
}
|
|
1451
|
+
|
|
1452
|
+
.proposal-apply-btn:hover { opacity: 0.85; }
|
|
1453
|
+
|
|
1454
|
+
.proposal-reject-btn {
|
|
1455
|
+
font-family: var(--font-sans);
|
|
1456
|
+
font-size: 11px;
|
|
1457
|
+
font-weight: 500;
|
|
1458
|
+
padding: 5px 14px;
|
|
1459
|
+
border-radius: var(--radius-sm);
|
|
1460
|
+
border: 1px solid var(--border);
|
|
1461
|
+
background: var(--surface);
|
|
1462
|
+
color: var(--text-dim);
|
|
1463
|
+
cursor: pointer;
|
|
1464
|
+
transition: all 0.15s ease;
|
|
1465
|
+
}
|
|
1466
|
+
|
|
1467
|
+
.proposal-reject-btn:hover {
|
|
1468
|
+
color: var(--red);
|
|
1469
|
+
border-color: var(--red);
|
|
1470
|
+
}
|
|
1471
|
+
|
|
1472
|
+
.proposal-status-badge {
|
|
1473
|
+
display: inline-block;
|
|
1474
|
+
font-size: 10px;
|
|
1475
|
+
font-weight: 600;
|
|
1476
|
+
padding: 3px 10px;
|
|
1477
|
+
border-radius: 100px;
|
|
1478
|
+
text-transform: uppercase;
|
|
1479
|
+
letter-spacing: 0.4px;
|
|
1480
|
+
}
|
|
1481
|
+
|
|
1482
|
+
.proposal-status-badge.applied {
|
|
1483
|
+
color: var(--green);
|
|
1484
|
+
background: var(--green-bg);
|
|
1485
|
+
}
|
|
1486
|
+
|
|
1487
|
+
.proposal-status-badge.rejected {
|
|
1488
|
+
color: var(--red);
|
|
1489
|
+
background: rgba(212, 97, 110, 0.08);
|
|
1490
|
+
}
|
|
1491
|
+
|
|
1492
|
+
.proposal-reply.proposal-applied .proposal-diff {
|
|
1493
|
+
border-left: 3px solid var(--green);
|
|
1494
|
+
}
|
|
1495
|
+
|
|
1496
|
+
.proposal-reply.proposal-rejected .proposal-diff {
|
|
1497
|
+
border-left: 3px solid var(--text-faint);
|
|
1498
|
+
}
|
|
1499
|
+
|
|
1500
|
+
.proposal-reply.proposal-rejected .proposal-diff pre {
|
|
1501
|
+
text-decoration: line-through;
|
|
1502
|
+
color: var(--text-faint);
|
|
1503
|
+
}
|
|
1504
|
+
|
|
1505
|
+
.proposal-reply.proposal-rejected .proposal-label {
|
|
1506
|
+
color: var(--text-faint);
|
|
1507
|
+
}
|
|
1508
|
+
|
|
1509
|
+
.proposal-reply.proposal-rejected .proposal-old {
|
|
1510
|
+
background: var(--surface-hover);
|
|
1511
|
+
}
|
|
1239
1512
|
|
|
1240
1513
|
|