@filipc77/cowrite 0.4.28 → 0.6.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.
- package/README.md +31 -18
- package/dist/bin/cowrite.js +154 -45
- package/dist/bin/cowrite.js.map +1 -1
- package/package.json +5 -2
- package/ui/client.js +1011 -112
- package/ui/index.html +20 -2
- package/ui/styles.css +435 -147
package/ui/styles.css
CHANGED
|
@@ -185,6 +185,32 @@ header h1 {
|
|
|
185
185
|
letter-spacing: 0.2px;
|
|
186
186
|
}
|
|
187
187
|
|
|
188
|
+
/* ---- Undo button ---- */
|
|
189
|
+
.undo-btn {
|
|
190
|
+
display: flex;
|
|
191
|
+
align-items: center;
|
|
192
|
+
justify-content: center;
|
|
193
|
+
width: 32px;
|
|
194
|
+
height: 32px;
|
|
195
|
+
border-radius: var(--radius-sm);
|
|
196
|
+
border: 1px solid var(--border);
|
|
197
|
+
background: var(--surface);
|
|
198
|
+
color: var(--text-dim);
|
|
199
|
+
cursor: pointer;
|
|
200
|
+
transition: all 0.15s ease;
|
|
201
|
+
flex-shrink: 0;
|
|
202
|
+
}
|
|
203
|
+
|
|
204
|
+
.undo-btn:hover:not(:disabled) {
|
|
205
|
+
color: var(--accent);
|
|
206
|
+
border-color: var(--accent);
|
|
207
|
+
}
|
|
208
|
+
|
|
209
|
+
.undo-btn:disabled {
|
|
210
|
+
opacity: 0.3;
|
|
211
|
+
cursor: default;
|
|
212
|
+
}
|
|
213
|
+
|
|
188
214
|
/* Status badge */
|
|
189
215
|
.status {
|
|
190
216
|
display: flex;
|
|
@@ -302,6 +328,7 @@ main {
|
|
|
302
328
|
}
|
|
303
329
|
|
|
304
330
|
#fileContent {
|
|
331
|
+
position: relative;
|
|
305
332
|
max-width: 860px;
|
|
306
333
|
margin: 0 auto;
|
|
307
334
|
font-size: 16px;
|
|
@@ -315,159 +342,69 @@ main {
|
|
|
315
342
|
to { opacity: 1; transform: translateY(0); }
|
|
316
343
|
}
|
|
317
344
|
|
|
318
|
-
/* ---- Markdown
|
|
345
|
+
/* ---- Markdown body theme overrides (on top of github-markdown-css) ---- */
|
|
319
346
|
.markdown-body {
|
|
320
|
-
|
|
321
|
-
|
|
322
|
-
line-height: 1.5;
|
|
323
|
-
word-wrap: break-word;
|
|
347
|
+
color-scheme: dark;
|
|
348
|
+
background: transparent !important;
|
|
324
349
|
}
|
|
325
|
-
|
|
350
|
+
[data-theme="light"] .markdown-body {
|
|
351
|
+
color-scheme: light;
|
|
352
|
+
}
|
|
353
|
+
.markdown-body a { color: var(--accent); text-decoration: none; }
|
|
354
|
+
.markdown-body a:hover { text-decoration: underline; }
|
|
355
|
+
.markdown-body pre code.hljs { background: none; padding: 0; }
|
|
326
356
|
.markdown-body > *:first-child { margin-top: 0; }
|
|
327
357
|
.markdown-body > *:last-child { margin-bottom: 0; }
|
|
328
358
|
|
|
329
|
-
|
|
330
|
-
.
|
|
331
|
-
|
|
332
|
-
margin-bottom: 16px;
|
|
333
|
-
font-weight: 600;
|
|
334
|
-
color: var(--text);
|
|
335
|
-
line-height: 1.25;
|
|
336
|
-
}
|
|
337
|
-
|
|
338
|
-
.markdown-body h1 {
|
|
339
|
-
font-size: 2em;
|
|
340
|
-
border-bottom: 1px solid var(--border);
|
|
341
|
-
padding-bottom: 0.3em;
|
|
342
|
-
}
|
|
343
|
-
|
|
344
|
-
.markdown-body h2 {
|
|
345
|
-
font-size: 1.5em;
|
|
346
|
-
border-bottom: 1px solid var(--border);
|
|
347
|
-
padding-bottom: 0.3em;
|
|
348
|
-
}
|
|
349
|
-
|
|
350
|
-
.markdown-body h3 { font-size: 1.25em; }
|
|
351
|
-
.markdown-body h4 { font-size: 1em; }
|
|
352
|
-
.markdown-body h5 { font-size: 0.875em; }
|
|
353
|
-
.markdown-body h6 { font-size: 0.85em; color: var(--text-dim); }
|
|
354
|
-
|
|
355
|
-
.markdown-body p {
|
|
356
|
-
margin-top: 0;
|
|
357
|
-
margin-bottom: 16px;
|
|
358
|
-
}
|
|
359
|
-
|
|
360
|
-
.markdown-body ul, .markdown-body ol {
|
|
361
|
-
margin-top: 0;
|
|
362
|
-
margin-bottom: 16px;
|
|
363
|
-
padding-left: 2em;
|
|
364
|
-
}
|
|
365
|
-
|
|
366
|
-
.markdown-body li {
|
|
367
|
-
margin-top: 0.25em;
|
|
368
|
-
}
|
|
369
|
-
|
|
370
|
-
.markdown-body li + li {
|
|
371
|
-
margin-top: 0.25em;
|
|
372
|
-
}
|
|
373
|
-
|
|
374
|
-
.markdown-body code {
|
|
375
|
-
font-family: var(--font-mono);
|
|
376
|
-
font-size: 85%;
|
|
377
|
-
background: var(--surface-hover);
|
|
378
|
-
padding: 0.2em 0.4em;
|
|
379
|
-
border-radius: 6px;
|
|
380
|
-
}
|
|
381
|
-
|
|
382
|
-
.markdown-body pre {
|
|
383
|
-
background: var(--surface);
|
|
384
|
-
padding: 16px;
|
|
385
|
-
border-radius: 6px;
|
|
386
|
-
overflow-x: auto;
|
|
359
|
+
/* ---- Code block wrapper ---- */
|
|
360
|
+
.code-block-wrapper {
|
|
361
|
+
position: relative;
|
|
387
362
|
margin-top: 0;
|
|
388
363
|
margin-bottom: 16px;
|
|
389
|
-
font-size: 85%;
|
|
390
|
-
line-height: 1.45;
|
|
391
364
|
border: 1px solid var(--border);
|
|
392
|
-
}
|
|
393
|
-
|
|
394
|
-
.markdown-body pre code {
|
|
395
|
-
background: none;
|
|
396
|
-
padding: 0;
|
|
397
|
-
border-radius: 0;
|
|
398
|
-
font-size: 100%;
|
|
399
|
-
word-break: normal;
|
|
400
|
-
white-space: pre;
|
|
401
|
-
}
|
|
402
|
-
|
|
403
|
-
.markdown-body blockquote {
|
|
404
|
-
border-left: 0.25em solid var(--border);
|
|
405
|
-
padding: 0 1em;
|
|
406
|
-
color: var(--text-dim);
|
|
407
|
-
margin-top: 0;
|
|
408
|
-
margin-bottom: 16px;
|
|
409
|
-
}
|
|
410
|
-
|
|
411
|
-
.markdown-body blockquote > :first-child { margin-top: 0; }
|
|
412
|
-
.markdown-body blockquote > :last-child { margin-bottom: 0; }
|
|
413
|
-
|
|
414
|
-
.markdown-body a { color: var(--accent); text-decoration: none; }
|
|
415
|
-
.markdown-body a:hover { text-decoration: underline; }
|
|
416
|
-
|
|
417
|
-
.markdown-body img {
|
|
418
|
-
max-width: 100%;
|
|
419
365
|
border-radius: 6px;
|
|
366
|
+
overflow: hidden;
|
|
420
367
|
}
|
|
421
368
|
|
|
422
|
-
.
|
|
423
|
-
|
|
424
|
-
|
|
425
|
-
|
|
426
|
-
|
|
427
|
-
|
|
428
|
-
border-
|
|
369
|
+
.code-block-header {
|
|
370
|
+
display: flex;
|
|
371
|
+
align-items: center;
|
|
372
|
+
justify-content: space-between;
|
|
373
|
+
padding: 6px 12px;
|
|
374
|
+
background: var(--surface-hover);
|
|
375
|
+
border-bottom: 1px solid var(--border);
|
|
376
|
+
font-size: 12px;
|
|
429
377
|
}
|
|
430
378
|
|
|
431
|
-
.
|
|
432
|
-
|
|
433
|
-
|
|
434
|
-
|
|
435
|
-
|
|
436
|
-
width: auto;
|
|
437
|
-
display: block;
|
|
438
|
-
overflow-x: auto;
|
|
379
|
+
.code-block-lang {
|
|
380
|
+
font-family: var(--font-mono);
|
|
381
|
+
font-size: 11px;
|
|
382
|
+
color: var(--text-dim);
|
|
383
|
+
text-transform: lowercase;
|
|
439
384
|
}
|
|
440
385
|
|
|
441
|
-
.
|
|
386
|
+
.code-copy-btn {
|
|
387
|
+
font-family: var(--font-sans);
|
|
388
|
+
font-size: 11px;
|
|
389
|
+
font-weight: 500;
|
|
390
|
+
padding: 2px 10px;
|
|
391
|
+
border-radius: 4px;
|
|
442
392
|
border: 1px solid var(--border);
|
|
443
|
-
padding: 6px 13px;
|
|
444
|
-
text-align: left;
|
|
445
|
-
}
|
|
446
|
-
|
|
447
|
-
.markdown-body th {
|
|
448
|
-
font-weight: 600;
|
|
449
393
|
background: var(--surface);
|
|
394
|
+
color: var(--text-dim);
|
|
395
|
+
cursor: pointer;
|
|
396
|
+
transition: all 0.15s ease;
|
|
450
397
|
}
|
|
451
398
|
|
|
452
|
-
.
|
|
453
|
-
|
|
454
|
-
|
|
455
|
-
|
|
456
|
-
.markdown-body dl {
|
|
457
|
-
padding: 0;
|
|
458
|
-
margin-bottom: 16px;
|
|
459
|
-
}
|
|
460
|
-
|
|
461
|
-
.markdown-body dl dt {
|
|
462
|
-
font-weight: 600;
|
|
463
|
-
margin-top: 16px;
|
|
464
|
-
padding: 0;
|
|
465
|
-
font-size: 1em;
|
|
399
|
+
.code-copy-btn:hover {
|
|
400
|
+
color: var(--accent);
|
|
401
|
+
border-color: var(--accent);
|
|
466
402
|
}
|
|
467
403
|
|
|
468
|
-
.
|
|
469
|
-
|
|
470
|
-
|
|
404
|
+
.code-block-wrapper pre {
|
|
405
|
+
margin: 0 !important;
|
|
406
|
+
border: none !important;
|
|
407
|
+
border-radius: 0 !important;
|
|
471
408
|
}
|
|
472
409
|
|
|
473
410
|
/* Plain text */
|
|
@@ -490,19 +427,32 @@ main {
|
|
|
490
427
|
border-radius: 2px;
|
|
491
428
|
}
|
|
492
429
|
|
|
493
|
-
.comment-highlight.resolved {
|
|
494
|
-
background: transparent;
|
|
495
|
-
border-bottom-color: transparent;
|
|
496
|
-
}
|
|
497
|
-
|
|
498
430
|
.comment-highlight:hover {
|
|
499
431
|
background: rgba(212, 165, 84, 0.18);
|
|
500
432
|
}
|
|
501
433
|
|
|
434
|
+
.comment-highlight.answered {
|
|
435
|
+
background: var(--blue-bg);
|
|
436
|
+
border-bottom: 2px solid var(--blue);
|
|
437
|
+
}
|
|
438
|
+
|
|
439
|
+
.comment-highlight.answered:hover {
|
|
440
|
+
background: rgba(107, 163, 212, 0.18);
|
|
441
|
+
}
|
|
442
|
+
|
|
443
|
+
.comment-highlight.resolved {
|
|
444
|
+
background: transparent;
|
|
445
|
+
border-bottom: none;
|
|
446
|
+
}
|
|
447
|
+
|
|
502
448
|
[data-theme="light"] .comment-highlight:hover {
|
|
503
449
|
background: rgba(176, 125, 46, 0.12);
|
|
504
450
|
}
|
|
505
451
|
|
|
452
|
+
[data-theme="light"] .comment-highlight.answered:hover {
|
|
453
|
+
background: rgba(58, 114, 160, 0.12);
|
|
454
|
+
}
|
|
455
|
+
|
|
506
456
|
/* ---- Sidebar ---- */
|
|
507
457
|
.sidebar {
|
|
508
458
|
width: 360px;
|
|
@@ -516,11 +466,45 @@ main {
|
|
|
516
466
|
}
|
|
517
467
|
|
|
518
468
|
.sidebar-header {
|
|
469
|
+
display: flex;
|
|
470
|
+
align-items: center;
|
|
471
|
+
justify-content: space-between;
|
|
519
472
|
padding: 16px 20px;
|
|
520
473
|
border-bottom: 1px solid var(--border);
|
|
521
474
|
flex-shrink: 0;
|
|
522
475
|
}
|
|
523
476
|
|
|
477
|
+
.file-comment-btn {
|
|
478
|
+
width: 26px;
|
|
479
|
+
height: 26px;
|
|
480
|
+
border-radius: 50%;
|
|
481
|
+
border: 1px solid var(--border);
|
|
482
|
+
background: transparent;
|
|
483
|
+
color: var(--text-dim);
|
|
484
|
+
font-size: 16px;
|
|
485
|
+
line-height: 1;
|
|
486
|
+
cursor: pointer;
|
|
487
|
+
display: flex;
|
|
488
|
+
align-items: center;
|
|
489
|
+
justify-content: center;
|
|
490
|
+
transition: all 0.15s ease;
|
|
491
|
+
flex-shrink: 0;
|
|
492
|
+
}
|
|
493
|
+
|
|
494
|
+
.file-comment-btn:hover {
|
|
495
|
+
color: var(--accent);
|
|
496
|
+
border-color: var(--accent);
|
|
497
|
+
}
|
|
498
|
+
|
|
499
|
+
.comment-file-badge {
|
|
500
|
+
font-size: 11px;
|
|
501
|
+
font-weight: 600;
|
|
502
|
+
color: var(--text-faint);
|
|
503
|
+
text-transform: uppercase;
|
|
504
|
+
letter-spacing: 0.5px;
|
|
505
|
+
margin-bottom: 10px;
|
|
506
|
+
}
|
|
507
|
+
|
|
524
508
|
.sidebar-header h2 {
|
|
525
509
|
font-size: 12px;
|
|
526
510
|
font-weight: 600;
|
|
@@ -553,6 +537,7 @@ main {
|
|
|
553
537
|
|
|
554
538
|
/* ---- Comment card ---- */
|
|
555
539
|
.comment-card {
|
|
540
|
+
position: relative;
|
|
556
541
|
background: var(--bg-subtle);
|
|
557
542
|
border: 1px solid var(--border);
|
|
558
543
|
border-radius: var(--radius-md);
|
|
@@ -563,6 +548,30 @@ main {
|
|
|
563
548
|
animation: card-enter 0.25s ease both;
|
|
564
549
|
}
|
|
565
550
|
|
|
551
|
+
.comment-delete-btn {
|
|
552
|
+
position: absolute;
|
|
553
|
+
top: 8px;
|
|
554
|
+
right: 8px;
|
|
555
|
+
background: none;
|
|
556
|
+
border: none;
|
|
557
|
+
color: var(--text-faint);
|
|
558
|
+
cursor: pointer;
|
|
559
|
+
padding: 4px;
|
|
560
|
+
border-radius: var(--radius-sm);
|
|
561
|
+
opacity: 0;
|
|
562
|
+
transition: opacity 0.15s, color 0.15s, background 0.15s;
|
|
563
|
+
line-height: 1;
|
|
564
|
+
}
|
|
565
|
+
|
|
566
|
+
.comment-card:hover .comment-delete-btn {
|
|
567
|
+
opacity: 1;
|
|
568
|
+
}
|
|
569
|
+
|
|
570
|
+
.comment-delete-btn:hover {
|
|
571
|
+
color: var(--red, #d4616e);
|
|
572
|
+
background: rgba(212, 97, 110, 0.1);
|
|
573
|
+
}
|
|
574
|
+
|
|
566
575
|
.comment-card:hover {
|
|
567
576
|
border-color: var(--border-hover);
|
|
568
577
|
box-shadow: var(--shadow-sm);
|
|
@@ -574,8 +583,21 @@ main {
|
|
|
574
583
|
box-shadow: 0 0 0 2px var(--accent-glow), var(--shadow-glow);
|
|
575
584
|
}
|
|
576
585
|
|
|
586
|
+
.comment-card.answered {
|
|
587
|
+
border-left: 3px solid var(--blue);
|
|
588
|
+
}
|
|
589
|
+
|
|
590
|
+
.comment-card.answered .comment-selected-text {
|
|
591
|
+
border-left-color: var(--blue);
|
|
592
|
+
}
|
|
593
|
+
|
|
594
|
+
.comment-card.resolved .comment-selected-text {
|
|
595
|
+
border-left-color: var(--green);
|
|
596
|
+
}
|
|
597
|
+
|
|
577
598
|
.comment-card.resolved {
|
|
578
599
|
opacity: 0.5;
|
|
600
|
+
border-left: 3px solid var(--green);
|
|
579
601
|
}
|
|
580
602
|
|
|
581
603
|
.comment-card.resolved:hover {
|
|
@@ -646,6 +668,11 @@ main {
|
|
|
646
668
|
background: var(--yellow-bg);
|
|
647
669
|
}
|
|
648
670
|
|
|
671
|
+
.comment-status.answered {
|
|
672
|
+
color: var(--blue);
|
|
673
|
+
background: var(--blue-bg);
|
|
674
|
+
}
|
|
675
|
+
|
|
649
676
|
.comment-status.resolved {
|
|
650
677
|
color: var(--green);
|
|
651
678
|
background: var(--green-bg);
|
|
@@ -762,31 +789,40 @@ main {
|
|
|
762
789
|
transform: scale(0.97);
|
|
763
790
|
}
|
|
764
791
|
|
|
765
|
-
/* ----
|
|
766
|
-
.
|
|
792
|
+
/* ---- Selection toolbar ---- */
|
|
793
|
+
.selection-toolbar {
|
|
767
794
|
position: fixed;
|
|
768
795
|
z-index: 999;
|
|
796
|
+
display: flex;
|
|
797
|
+
gap: 1px;
|
|
798
|
+
background: var(--border);
|
|
799
|
+
border-radius: var(--radius-sm);
|
|
800
|
+
box-shadow: var(--shadow-md);
|
|
801
|
+
overflow: hidden;
|
|
802
|
+
animation: popup-enter 0.15s ease;
|
|
803
|
+
}
|
|
804
|
+
|
|
805
|
+
.selection-toolbar[hidden] { display: none; }
|
|
806
|
+
.comment-popup[hidden] { display: none; }
|
|
807
|
+
|
|
808
|
+
.selection-toolbar button {
|
|
769
809
|
font-family: var(--font-sans);
|
|
770
810
|
font-size: 12px;
|
|
771
811
|
font-weight: 600;
|
|
772
812
|
padding: 6px 14px;
|
|
773
|
-
border
|
|
774
|
-
border: 1px solid var(--border);
|
|
813
|
+
border: none;
|
|
775
814
|
background: var(--surface);
|
|
776
815
|
color: var(--accent);
|
|
777
816
|
cursor: pointer;
|
|
778
|
-
|
|
779
|
-
transition: background 0.15s ease, border-color 0.15s ease, transform 0.1s ease;
|
|
780
|
-
animation: popup-enter 0.15s ease;
|
|
817
|
+
transition: background 0.15s ease, color 0.15s ease;
|
|
781
818
|
}
|
|
782
819
|
|
|
783
|
-
.
|
|
820
|
+
.selection-toolbar button:hover {
|
|
784
821
|
background: var(--accent);
|
|
785
822
|
color: var(--bg);
|
|
786
|
-
border-color: var(--accent);
|
|
787
823
|
}
|
|
788
824
|
|
|
789
|
-
.
|
|
825
|
+
.selection-toolbar button:active {
|
|
790
826
|
transform: scale(0.96);
|
|
791
827
|
}
|
|
792
828
|
|
|
@@ -822,6 +858,12 @@ main {
|
|
|
822
858
|
letter-spacing: 0.8px;
|
|
823
859
|
color: var(--text-faint);
|
|
824
860
|
margin-bottom: 6px;
|
|
861
|
+
cursor: grab;
|
|
862
|
+
user-select: none;
|
|
863
|
+
}
|
|
864
|
+
|
|
865
|
+
.popup-header:active {
|
|
866
|
+
cursor: grabbing;
|
|
825
867
|
}
|
|
826
868
|
|
|
827
869
|
.popup-selection {
|
|
@@ -950,3 +992,249 @@ main {
|
|
|
950
992
|
max-width: 100%;
|
|
951
993
|
height: auto;
|
|
952
994
|
}
|
|
995
|
+
|
|
996
|
+
/* ---- Highlight popover ---- */
|
|
997
|
+
.highlight-popover {
|
|
998
|
+
position: fixed;
|
|
999
|
+
z-index: 1000;
|
|
1000
|
+
width: 240px;
|
|
1001
|
+
background: var(--surface);
|
|
1002
|
+
border: 1px solid var(--border);
|
|
1003
|
+
border-radius: var(--radius-md);
|
|
1004
|
+
padding: 14px;
|
|
1005
|
+
box-shadow: var(--shadow-lg), var(--shadow-glow);
|
|
1006
|
+
animation: popup-enter 0.15s ease;
|
|
1007
|
+
}
|
|
1008
|
+
|
|
1009
|
+
.highlight-popover[hidden] { display: none; }
|
|
1010
|
+
|
|
1011
|
+
.highlight-popover-text {
|
|
1012
|
+
font-size: 13px;
|
|
1013
|
+
line-height: 1.5;
|
|
1014
|
+
color: var(--text);
|
|
1015
|
+
margin-bottom: 12px;
|
|
1016
|
+
max-height: 120px;
|
|
1017
|
+
overflow-y: auto;
|
|
1018
|
+
}
|
|
1019
|
+
|
|
1020
|
+
.highlight-popover-actions {
|
|
1021
|
+
display: flex;
|
|
1022
|
+
gap: 6px;
|
|
1023
|
+
}
|
|
1024
|
+
|
|
1025
|
+
.highlight-popover-actions button {
|
|
1026
|
+
font-family: var(--font-sans);
|
|
1027
|
+
font-size: 11px;
|
|
1028
|
+
font-weight: 600;
|
|
1029
|
+
padding: 6px 14px;
|
|
1030
|
+
border-radius: var(--radius-sm);
|
|
1031
|
+
border: 1px solid var(--border);
|
|
1032
|
+
background: var(--surface);
|
|
1033
|
+
color: var(--text-dim);
|
|
1034
|
+
cursor: pointer;
|
|
1035
|
+
transition: all 0.15s ease;
|
|
1036
|
+
}
|
|
1037
|
+
|
|
1038
|
+
.highlight-popover-actions button:hover {
|
|
1039
|
+
color: var(--accent);
|
|
1040
|
+
border-color: var(--accent);
|
|
1041
|
+
background: var(--accent-glow);
|
|
1042
|
+
}
|
|
1043
|
+
|
|
1044
|
+
/* ---- Block gutter insert button ---- */
|
|
1045
|
+
.block-insert-btn {
|
|
1046
|
+
position: absolute;
|
|
1047
|
+
left: -40px;
|
|
1048
|
+
width: 28px;
|
|
1049
|
+
height: 28px;
|
|
1050
|
+
border-radius: 50%;
|
|
1051
|
+
background: var(--surface);
|
|
1052
|
+
border: 1px solid var(--border);
|
|
1053
|
+
color: var(--text-faint);
|
|
1054
|
+
font-size: 18px;
|
|
1055
|
+
cursor: pointer;
|
|
1056
|
+
opacity: 0;
|
|
1057
|
+
transform: translateY(-50%);
|
|
1058
|
+
transition: opacity 0.15s, color 0.15s, border-color 0.15s;
|
|
1059
|
+
z-index: 10;
|
|
1060
|
+
display: flex;
|
|
1061
|
+
align-items: center;
|
|
1062
|
+
justify-content: center;
|
|
1063
|
+
line-height: 1;
|
|
1064
|
+
}
|
|
1065
|
+
|
|
1066
|
+
.block-insert-btn.visible {
|
|
1067
|
+
opacity: 1;
|
|
1068
|
+
}
|
|
1069
|
+
|
|
1070
|
+
.block-insert-btn:hover {
|
|
1071
|
+
color: var(--accent);
|
|
1072
|
+
border-color: var(--accent);
|
|
1073
|
+
}
|
|
1074
|
+
|
|
1075
|
+
/* ---- Block gap indicator line ---- */
|
|
1076
|
+
.block-insert-line {
|
|
1077
|
+
position: absolute;
|
|
1078
|
+
left: 0;
|
|
1079
|
+
right: 0;
|
|
1080
|
+
height: 2px;
|
|
1081
|
+
background: var(--accent);
|
|
1082
|
+
opacity: 0;
|
|
1083
|
+
transform: translateY(-50%);
|
|
1084
|
+
transition: opacity 0.15s;
|
|
1085
|
+
pointer-events: none;
|
|
1086
|
+
}
|
|
1087
|
+
|
|
1088
|
+
.block-insert-line.visible {
|
|
1089
|
+
opacity: 0.4;
|
|
1090
|
+
}
|
|
1091
|
+
|
|
1092
|
+
/* ---- Block type menu ---- */
|
|
1093
|
+
.block-type-menu {
|
|
1094
|
+
width: 260px;
|
|
1095
|
+
background: var(--surface);
|
|
1096
|
+
border: 1px solid var(--border);
|
|
1097
|
+
border-radius: var(--radius-md);
|
|
1098
|
+
box-shadow: var(--shadow-md);
|
|
1099
|
+
margin: 8px 0;
|
|
1100
|
+
overflow: hidden;
|
|
1101
|
+
animation: popup-enter 0.2s ease;
|
|
1102
|
+
}
|
|
1103
|
+
|
|
1104
|
+
.block-type-filter {
|
|
1105
|
+
width: 100%;
|
|
1106
|
+
font-family: var(--font-sans);
|
|
1107
|
+
font-size: 13px;
|
|
1108
|
+
color: var(--text);
|
|
1109
|
+
background: var(--bg);
|
|
1110
|
+
border: none;
|
|
1111
|
+
border-bottom: 1px solid var(--border);
|
|
1112
|
+
padding: 10px 14px;
|
|
1113
|
+
outline: none;
|
|
1114
|
+
transition: background 0.4s ease;
|
|
1115
|
+
}
|
|
1116
|
+
|
|
1117
|
+
.block-type-filter::placeholder {
|
|
1118
|
+
color: var(--text-faint);
|
|
1119
|
+
}
|
|
1120
|
+
|
|
1121
|
+
.block-type-list {
|
|
1122
|
+
max-height: 280px;
|
|
1123
|
+
overflow-y: auto;
|
|
1124
|
+
padding: 6px 0;
|
|
1125
|
+
}
|
|
1126
|
+
|
|
1127
|
+
.block-type-category {
|
|
1128
|
+
font-size: 10px;
|
|
1129
|
+
font-weight: 600;
|
|
1130
|
+
text-transform: uppercase;
|
|
1131
|
+
letter-spacing: 0.8px;
|
|
1132
|
+
color: var(--text-faint);
|
|
1133
|
+
padding: 8px 14px 4px;
|
|
1134
|
+
}
|
|
1135
|
+
|
|
1136
|
+
.block-type-item {
|
|
1137
|
+
display: flex;
|
|
1138
|
+
align-items: center;
|
|
1139
|
+
gap: 10px;
|
|
1140
|
+
padding: 7px 14px;
|
|
1141
|
+
cursor: pointer;
|
|
1142
|
+
font-size: 13px;
|
|
1143
|
+
color: var(--text);
|
|
1144
|
+
transition: background 0.1s ease;
|
|
1145
|
+
}
|
|
1146
|
+
|
|
1147
|
+
.block-type-item:hover,
|
|
1148
|
+
.block-type-item.highlighted {
|
|
1149
|
+
background: var(--surface-hover);
|
|
1150
|
+
}
|
|
1151
|
+
|
|
1152
|
+
.block-type-icon {
|
|
1153
|
+
width: 28px;
|
|
1154
|
+
height: 28px;
|
|
1155
|
+
display: flex;
|
|
1156
|
+
align-items: center;
|
|
1157
|
+
justify-content: center;
|
|
1158
|
+
border: 1px solid var(--border);
|
|
1159
|
+
border-radius: 6px;
|
|
1160
|
+
font-family: var(--font-mono);
|
|
1161
|
+
font-size: 12px;
|
|
1162
|
+
font-weight: 600;
|
|
1163
|
+
color: var(--text-dim);
|
|
1164
|
+
flex-shrink: 0;
|
|
1165
|
+
background: var(--bg);
|
|
1166
|
+
}
|
|
1167
|
+
|
|
1168
|
+
.block-type-empty {
|
|
1169
|
+
padding: 16px 14px;
|
|
1170
|
+
color: var(--text-faint);
|
|
1171
|
+
font-size: 13px;
|
|
1172
|
+
text-align: center;
|
|
1173
|
+
}
|
|
1174
|
+
|
|
1175
|
+
/* ---- Block hover affordance (click-to-edit) ---- */
|
|
1176
|
+
.markdown-body > *:not(.block-edit-wrapper):not(.block-type-menu):not(.block-insert-btn):not(.block-insert-line):not(.block-editing) {
|
|
1177
|
+
cursor: text;
|
|
1178
|
+
transition: outline-color 0.15s ease;
|
|
1179
|
+
outline: 1px solid transparent;
|
|
1180
|
+
outline-offset: 4px;
|
|
1181
|
+
border-radius: 2px;
|
|
1182
|
+
}
|
|
1183
|
+
|
|
1184
|
+
.markdown-body > *:not(.block-edit-wrapper):not(.block-type-menu):not(.block-insert-btn):not(.block-insert-line):not(.block-editing):hover {
|
|
1185
|
+
outline-color: var(--border-hover);
|
|
1186
|
+
}
|
|
1187
|
+
|
|
1188
|
+
.plain-text > *:not(.block-edit-wrapper):not(.block-type-menu):not(.block-insert-btn):not(.block-insert-line):not(.block-editing) {
|
|
1189
|
+
cursor: text;
|
|
1190
|
+
transition: outline-color 0.15s ease;
|
|
1191
|
+
outline: 1px solid transparent;
|
|
1192
|
+
outline-offset: 4px;
|
|
1193
|
+
border-radius: 2px;
|
|
1194
|
+
}
|
|
1195
|
+
|
|
1196
|
+
.plain-text > *:not(.block-edit-wrapper):not(.block-type-menu):not(.block-insert-btn):not(.block-insert-line):not(.block-editing):hover {
|
|
1197
|
+
outline-color: var(--border-hover);
|
|
1198
|
+
}
|
|
1199
|
+
|
|
1200
|
+
/* ---- Contenteditable inline editing ---- */
|
|
1201
|
+
.block-editing {
|
|
1202
|
+
outline: 2px solid var(--accent) !important;
|
|
1203
|
+
outline-offset: 4px;
|
|
1204
|
+
box-shadow: 0 0 0 6px var(--accent-glow);
|
|
1205
|
+
}
|
|
1206
|
+
|
|
1207
|
+
/* ---- Block edit wrapper (in-place editing) ---- */
|
|
1208
|
+
.block-edit-wrapper {
|
|
1209
|
+
margin: 4px 0;
|
|
1210
|
+
}
|
|
1211
|
+
|
|
1212
|
+
.block-edit-textarea {
|
|
1213
|
+
width: 100%;
|
|
1214
|
+
font-family: var(--font-mono);
|
|
1215
|
+
font-size: 13px;
|
|
1216
|
+
line-height: 1.5;
|
|
1217
|
+
color: var(--text);
|
|
1218
|
+
background: var(--bg);
|
|
1219
|
+
border: 2px solid var(--accent);
|
|
1220
|
+
border-radius: var(--radius-sm);
|
|
1221
|
+
padding: 10px 12px;
|
|
1222
|
+
white-space: pre;
|
|
1223
|
+
tab-size: 2;
|
|
1224
|
+
resize: none;
|
|
1225
|
+
outline: none;
|
|
1226
|
+
box-shadow: 0 0 0 4px var(--accent-glow);
|
|
1227
|
+
transition: border-color 0.2s, box-shadow 0.2s, background 0.4s ease;
|
|
1228
|
+
}
|
|
1229
|
+
|
|
1230
|
+
.block-edit-hint {
|
|
1231
|
+
text-align: right;
|
|
1232
|
+
font-size: 11px;
|
|
1233
|
+
color: var(--text-faint);
|
|
1234
|
+
margin-top: 4px;
|
|
1235
|
+
padding-right: 2px;
|
|
1236
|
+
}
|
|
1237
|
+
|
|
1238
|
+
|
|
1239
|
+
|
|
1240
|
+
|