@comty.io/core 0.1.3 → 0.1.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/src/style.js CHANGED
@@ -11,7 +11,8 @@ export function getComtyStyle() {
11
11
  --comty-muted: var(--comty-toolbar-muted);
12
12
  --comty-accent: #55aaf5;
13
13
  --comty-error: #ef7676;
14
- --comty-outline: oklch(0.62 0.18 255);
14
+ --comty-outline: var(--comty-toolbar-muted);
15
+ --comty-comment-focus: var(--comty-toolbar-muted);
15
16
  --comty-paper: #fff;
16
17
  --comty-ink: #171717;
17
18
  --comty-border: #434649;
@@ -35,6 +36,10 @@ export function getComtyStyle() {
35
36
  --comty-magnifier-gray: #999;
36
37
  --comty-magnifier-shadow: 0 .0625rem .375rem rgb(0 0 0 / .5);
37
38
  --comty-property-width: 16rem;
39
+ --comty-inspector-width: 18rem;
40
+ --comty-inspector-label-width: 5rem;
41
+ --comty-inspector-row-height: 1.5rem;
42
+ --comty-copy-size: 1.5rem;
38
43
  --comty-property-swatch: 2rem;
39
44
  --comty-property-font-size: .6875rem;
40
45
  --comty-property-row-height: 1.375rem;
@@ -48,7 +53,6 @@ export function getComtyStyle() {
48
53
  --comty-dialog-ink: var(--comty-foreground);
49
54
  --comty-dialog-soft: var(--comty-muted);
50
55
  --comty-dialog-field: var(--comty-field-surface);
51
- --comty-dialog-line: var(--comty-border);
52
56
  --comty-dialog-backdrop: rgb(0 0 0 / .4);
53
57
  --comty-dialog-radius: 2rem;
54
58
  --comty-dialog-width: 32rem;
@@ -323,11 +327,11 @@ export function getComtyStyle() {
323
327
  .comty-pin {
324
328
  position: fixed;
325
329
  z-index: 2147483645;
326
- width: 34px;
327
- height: 34px;
330
+ width: 28px;
331
+ height: 28px;
328
332
  padding: 0;
329
333
  border: none;
330
- border-radius: 999px 999px 999px 12px;
334
+ border-radius: 999px 999px 999px 10px;
331
335
  background: #0078FF;
332
336
  color: white;
333
337
  display: grid;
@@ -337,17 +341,17 @@ export function getComtyStyle() {
337
341
  transform: translate(-50%, -50%);
338
342
  appearance: none;
339
343
  font-family: sans-serif;
340
- filter: drop-shadow(0 8px 18px rgba(0, 120, 255, .28));
344
+ filter: drop-shadow(0 8px 16px rgba(0, 120, 255, .28));
341
345
  display: none;
342
346
  overflow: visible;
343
347
  }
344
348
 
345
- #comty-root > .comty-temp-pin { pointer-events: none; }
349
+ #comty-root > .comty-temp-pin { pointer-events: none; z-index: 2147483647; }
346
350
 
347
351
  .comty-pin-icon {
348
352
  display: block;
349
- width: 18px;
350
- height: 18px;
353
+ width: 16px;
354
+ height: 16px;
351
355
  pointer-events: none;
352
356
  }
353
357
 
@@ -356,11 +360,11 @@ export function getComtyStyle() {
356
360
  top: -4px;
357
361
  right: -4px;
358
362
  display: inline-flex;
359
- width: 12px;
360
- height: 12px;
363
+ width: 10px;
364
+ height: 10px;
361
365
  border: 1px solid rgba(255,255,255,.82);
362
366
  border-radius: 999px;
363
- box-shadow: 0 8px 18px rgba(15,23,42,.18);
367
+ box-shadow: 0 8px 16px rgba(15,23,42,.18);
364
368
  pointer-events: none;
365
369
  }
366
370
 
@@ -368,7 +372,7 @@ export function getComtyStyle() {
368
372
  background: var(--comty-surface);
369
373
  color: var(--comty-foreground);
370
374
  border: 2px solid var(--comty-border);
371
- box-shadow: 0 2px 6px rgba(0,0,0,.18);
375
+ box-shadow: 0 2px 4px rgba(0,0,0,.18);
372
376
  filter: none;
373
377
  transition:
374
378
  border-color 160ms ease,
@@ -418,14 +422,14 @@ export function getComtyStyle() {
418
422
  background: var(--comty-surface);
419
423
  color: var(--comty-foreground);
420
424
  border: 0;
421
- box-shadow: 0 10px 28px rgba(0,0,0,.2);
425
+ box-shadow: 0 8px 24px rgba(0,0,0,.2);
422
426
  padding: 0;
423
- border-radius: 14px;
424
- width: min(360px, calc(100vw - 32px));
427
+ border-radius: 12px;
428
+ width: min(288px, calc(100vw - 24px));
425
429
  overflow: hidden;
426
430
  box-sizing: border-box;
427
431
  font-family: Inter, ui-sans-serif, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
428
- font-size: 14px;
432
+ font-size: 12px;
429
433
  display: none;
430
434
  animation: comty-bubble-in 200ms cubic-bezier(.23,1,.32,1) forwards;
431
435
  transform-origin: top left;
@@ -453,37 +457,53 @@ export function getComtyStyle() {
453
457
  display: flex;
454
458
  align-items: center;
455
459
  justify-content: space-between;
456
- gap: 12px;
457
- min-height: 40px;
458
- padding: 0 16px;
459
- border-bottom: 1px solid var(--comty-border);
460
- }
461
-
462
- .comty-bubble-title {
463
- margin: 0;
464
- color: var(--comty-foreground);
465
- font-size: 12px;
466
- font-weight: 600;
467
- line-height: 1;
468
- }
469
-
470
- .comty-bubble-header-actions {
471
- display: flex;
472
- align-items: center;
473
- gap: 6px;
474
- margin-left: auto;
460
+ gap: 10px;
461
+ min-height: 1.5rem;
462
+ padding: .625rem .625rem 0;
475
463
  }
476
464
 
477
465
  .comty-bubble-content {
478
466
  flex: 1;
479
467
  color: var(--comty-foreground);
480
- font-size: 14px;
468
+ font-size: .75rem;
481
469
  line-height: 1.45;
482
470
  overflow-wrap: anywhere;
483
471
  cursor: text;
484
472
  white-space: pre-wrap;
485
473
  }
486
474
 
475
+ .comty-bubble-content a {
476
+ color: var(--comty-comment-focus);
477
+ text-decoration: underline;
478
+ text-underline-offset: .15em;
479
+ }
480
+
481
+ .comty-bubble-content a:focus-visible {
482
+ outline: .125rem solid var(--comty-comment-focus);
483
+ outline-offset: .125rem;
484
+ }
485
+
486
+ .comty-comment-link {
487
+ display: inline-block;
488
+ box-sizing: border-box;
489
+ max-width: 100%;
490
+ min-width: 0;
491
+ overflow: hidden;
492
+ padding: .375rem .625rem;
493
+ border-radius: .375rem;
494
+ background: var(--comty-field-surface);
495
+ color: var(--comty-foreground);
496
+ font: .75rem/1.25 var(--comty-font);
497
+ text-decoration: none;
498
+ text-overflow: ellipsis;
499
+ white-space: nowrap;
500
+ }
501
+
502
+ .comty-thread-item .comty-comment-link,
503
+ .comty-capture-annotation .comty-comment-link { margin-top: .5rem; }
504
+ .comty-comment-link:hover { text-decoration: underline; }
505
+ .comty-comment-link:focus-visible { outline: .125rem solid var(--comty-comment-focus); outline-offset: .125rem; }
506
+
487
507
  .comty-bubble-content-editor {
488
508
  display: block;
489
509
  flex: 1;
@@ -495,7 +515,7 @@ export function getComtyStyle() {
495
515
  background: transparent;
496
516
  color: var(--comty-foreground);
497
517
  cursor: text;
498
- font: 14px/1.45 Inter, ui-sans-serif, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
518
+ font: .75rem/1.45 Inter, ui-sans-serif, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
499
519
  outline: none;
500
520
  resize: none;
501
521
  overflow: hidden;
@@ -505,15 +525,15 @@ export function getComtyStyle() {
505
525
  }
506
526
 
507
527
  .comty-thread {
508
- padding: 18px 16px 16px;
528
+ padding: .625rem;
509
529
  }
510
530
 
511
531
  .comty-thread-list {
512
532
  display: grid;
513
533
  width: 100%;
514
534
  min-width: 0;
515
- gap: 20px;
516
- max-height: min(360px, calc(100vh - 152px));
535
+ gap: 16px;
536
+ max-height: min(288px, calc(100vh - 120px));
517
537
  overflow-x: hidden;
518
538
  overflow-y: auto;
519
539
  overscroll-behavior: contain;
@@ -526,9 +546,9 @@ export function getComtyStyle() {
526
546
  display: grid;
527
547
  width: 100%;
528
548
  min-width: 0;
529
- grid-template-columns: 24px minmax(0, 1fr);
549
+ grid-template-columns: 1.5rem minmax(0, 1fr);
530
550
  align-items: start;
531
- gap: 12px;
551
+ gap: 10px;
532
552
  }
533
553
 
534
554
  .comty-thread-item-body {
@@ -543,15 +563,15 @@ export function getComtyStyle() {
543
563
  display: flex;
544
564
  align-items: center;
545
565
  min-width: 0;
546
- min-height: 20px;
547
- gap: 7px;
566
+ min-height: 16px;
567
+ gap: 6px;
548
568
  }
549
569
 
550
570
  .comty-comment-author-name {
551
571
  min-width: 0;
552
572
  overflow: hidden;
553
573
  color: var(--comty-foreground);
554
- font-size: 14px;
574
+ font-size: .75rem;
555
575
  font-weight: 600;
556
576
  line-height: 1.25;
557
577
  text-overflow: ellipsis;
@@ -561,7 +581,7 @@ export function getComtyStyle() {
561
581
  .comty-comment-time {
562
582
  flex: 0 0 auto;
563
583
  color: var(--comty-muted);
564
- font-size: 13px;
584
+ font-size: .6875rem;
565
585
  font-weight: 400;
566
586
  line-height: 1.25;
567
587
  }
@@ -569,13 +589,13 @@ export function getComtyStyle() {
569
589
  .comty-comment-avatar {
570
590
  display: grid;
571
591
  place-items: center;
572
- width: 24px;
573
- height: 24px;
592
+ width: 1.5rem;
593
+ height: 1.5rem;
574
594
  overflow: hidden;
575
595
  border-radius: 50%;
576
596
  background: var(--comty-field-surface);
577
597
  color: var(--comty-foreground);
578
- font-size: 10px;
598
+ font-size: 8px;
579
599
  font-weight: 600;
580
600
  line-height: 1;
581
601
  }
@@ -587,8 +607,8 @@ export function getComtyStyle() {
587
607
  }
588
608
 
589
609
  .comty-pin-avatar {
590
- width: 28px;
591
- height: 28px;
610
+ width: 24px;
611
+ height: 24px;
592
612
  }
593
613
 
594
614
  .comty-thread-item .comty-bubble-content,
@@ -603,12 +623,12 @@ export function getComtyStyle() {
603
623
  .comty-icon-button {
604
624
  display: inline-grid;
605
625
  place-items: center;
606
- width: 28px;
607
- height: 28px;
626
+ width: 24px;
627
+ height: 24px;
608
628
  flex: 0 0 auto;
609
629
  padding: 0;
610
630
  border: 0;
611
- border-radius: 6px;
631
+ border-radius: 4px;
612
632
  background: transparent;
613
633
  color: var(--comty-foreground);
614
634
  cursor: pointer;
@@ -638,24 +658,24 @@ export function getComtyStyle() {
638
658
  }
639
659
 
640
660
  .comty-icon-button svg {
641
- width: 18px;
642
- height: 18px;
661
+ width: 16px;
662
+ height: 16px;
643
663
  pointer-events: none;
644
664
  }
645
665
 
646
666
  .comty-status-trigger {
647
667
  display: inline-flex;
648
668
  align-items: center;
649
- gap: 6px;
650
- min-height: 28px;
669
+ gap: 4px;
670
+ min-height: 24px;
651
671
  padding: 0 8px;
652
672
  border: 0;
653
- border-radius: 6px;
673
+ border-radius: 4px;
654
674
  background: transparent;
655
675
  color: var(--comty-foreground);
656
676
  cursor: pointer;
657
677
  appearance: none;
658
- font: 600 12px/1 Inter, ui-sans-serif, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
678
+ font: 600 .6875rem/1 Inter, ui-sans-serif, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
659
679
  transition:
660
680
  background-color 160ms ease,
661
681
  transform 140ms ease-out;
@@ -684,14 +704,14 @@ export function getComtyStyle() {
684
704
  }
685
705
 
686
706
  .comty-thread-more {
687
- width: 24px;
688
- height: 24px;
689
- margin: -2px -4px -2px auto;
707
+ width: 20px;
708
+ height: 20px;
709
+ margin: 0 0 0 auto;
690
710
  }
691
711
 
692
712
  .comty-thread-more svg {
693
- width: 16px;
694
- height: 16px;
713
+ width: 12px;
714
+ height: 12px;
695
715
  }
696
716
 
697
717
  .comty-entry-actions-popover {
@@ -710,38 +730,57 @@ export function getComtyStyle() {
710
730
 
711
731
  .comty-reply-form {
712
732
  display: grid;
713
- grid-template-columns: 24px minmax(0, 1fr);
733
+ grid-template-columns: 1.5rem minmax(0, 1fr);
714
734
  align-items: center;
715
- gap: 12px;
716
- margin-top: 20px;
735
+ gap: 10px;
736
+ margin-top: 16px;
717
737
  }
718
738
 
719
739
  .comty-reply-field {
720
740
  display: flex;
721
741
  align-items: center;
722
- min-height: 36px;
723
- padding: 4px 8px 4px 16px;
724
- border-radius: 14px;
742
+ min-height: 1.875rem;
743
+ padding: .25rem .25rem .25rem .625rem;
744
+ border-radius: 1.25rem;
725
745
  background: var(--comty-field-surface);
726
746
  box-sizing: border-box;
727
- transition: box-shadow 160ms ease;
747
+ transition: border-radius var(--comty-motion-duration) var(--comty-ease-in-out), box-shadow 160ms ease;
748
+ }
749
+
750
+ .comty-reply-field.comty-reply-expanded { border-radius: .75rem; }
751
+
752
+ .comty-reply-form:has(.comty-reply-expanded) > .comty-comment-avatar {
753
+ align-self: start;
754
+ }
755
+
756
+ .comty-reply-expanded .comty-reply-button {
757
+ align-self: flex-end;
728
758
  }
729
759
 
730
760
  .comty-reply-field:focus-within {
731
- box-shadow: inset 0 0 0 1px #a3a3a3;
761
+ box-shadow: inset 0 0 0 .0625rem var(--comty-comment-focus);
732
762
  }
733
763
 
734
764
  .comty-reply-input {
735
765
  min-width: 0;
766
+ min-height: 0;
736
767
  flex: 1;
737
768
  padding: 0;
738
769
  border: 0;
770
+ height: 1.125rem;
771
+ max-height: 5rem;
739
772
  background: transparent;
740
773
  color: var(--comty-foreground);
741
- font: 14px/1.3 Inter, ui-sans-serif, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
774
+ font: .6875rem/1.125rem Inter, ui-sans-serif, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
742
775
  outline: none;
776
+ resize: none;
777
+ overflow-y: hidden;
778
+ box-sizing: border-box;
779
+ transition: height var(--comty-motion-duration) var(--comty-ease-in-out);
743
780
  }
744
781
 
782
+ .comty-reply-expanded .comty-reply-input { overflow-y: auto; }
783
+
745
784
  .comty-reply-input::placeholder {
746
785
  color: var(--comty-muted);
747
786
  }
@@ -749,14 +788,14 @@ export function getComtyStyle() {
749
788
  .comty-reply-button {
750
789
  display: inline-grid;
751
790
  place-items: center;
752
- width: 28px;
753
- height: 28px;
791
+ width: 1.375rem;
792
+ height: 1.375rem;
754
793
  flex: 0 0 auto;
755
794
  padding: 0;
756
795
  border: 0;
757
796
  border-radius: 50%;
758
- background: #0d99ff;
759
- color: #fff;
797
+ background: var(--comty-foreground);
798
+ color: var(--comty-surface);
760
799
  cursor: pointer;
761
800
  transition:
762
801
  background-color 160ms ease,
@@ -765,7 +804,7 @@ export function getComtyStyle() {
765
804
  }
766
805
 
767
806
  .comty-reply-button:hover:not(:disabled) {
768
- background: #0b87e3;
807
+ background: var(--comty-muted);
769
808
  }
770
809
 
771
810
  .comty-reply-button:active:not(:disabled) {
@@ -773,13 +812,14 @@ export function getComtyStyle() {
773
812
  }
774
813
 
775
814
  .comty-reply-button:disabled {
815
+ color: var(--comty-muted);
776
816
  background: var(--comty-hover-surface);
777
817
  cursor: default;
778
818
  }
779
819
 
780
820
  .comty-reply-button svg {
781
- width: 16px;
782
- height: 16px;
821
+ width: 12px;
822
+ height: 12px;
783
823
  }
784
824
 
785
825
  .comty-reply-form-guest { display: block; }
@@ -787,20 +827,20 @@ export function getComtyStyle() {
787
827
  .comty-sign-in-reply {
788
828
  display: block;
789
829
  width: 100%;
790
- min-height: 36px;
791
- padding: 4px 16px;
830
+ min-height: 32px;
831
+ padding: 4px 12px;
792
832
  border: 0;
793
- border-radius: 14px;
833
+ border-radius: 12px;
794
834
  background: var(--comty-field-surface);
795
- color: #0d99ff;
835
+ color: var(--comty-foreground);
796
836
  text-align: left;
797
- font: 600 14px/1.3 Inter, ui-sans-serif, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
837
+ font: 600 12px/1.3 Inter, ui-sans-serif, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
798
838
  cursor: pointer;
799
839
  transition: background-color 160ms ease;
800
840
  }
801
841
 
802
842
  .comty-sign-in-reply:hover { background: var(--comty-hover-surface); }
803
- .comty-sign-in-reply:focus-visible { outline: 2px solid #0d99ff; outline-offset: 2px; }
843
+ .comty-sign-in-reply:focus-visible { outline: .0625rem solid var(--comty-comment-focus); outline-offset: .0625rem; }
804
844
 
805
845
  .comty-hover-bubble {
806
846
  width: min(240px, calc(100vw - 32px));
@@ -826,10 +866,6 @@ export function getComtyStyle() {
826
866
  height: 24px;
827
867
  }
828
868
 
829
- .comty-hover-bubble .comty-comment-author-name {
830
- font-size: 12px;
831
- }
832
-
833
869
  .comty-hover-bubble .comty-comment-author {
834
870
  min-height: 0;
835
871
  }
@@ -838,11 +874,6 @@ export function getComtyStyle() {
838
874
  font-size: 12px;
839
875
  }
840
876
 
841
- .comty-hover-bubble .comty-thread-item .comty-bubble-content {
842
- margin-top: 0;
843
- font-size: 12px;
844
- }
845
-
846
877
  .comty-auth-backdrop { position: fixed; inset: 0; z-index: 2147483647; display: grid; place-items: center; padding: 1rem; background: var(--comty-dialog-backdrop); font-family: var(--comty-font); }
847
878
  .comty-auth-dialog { box-sizing: border-box; width: min(var(--comty-dialog-width), 100%); max-height: calc(100dvh - 2rem); overflow: auto; padding: 1.75rem; border: 0; border-radius: var(--comty-dialog-radius); background: var(--comty-dialog-surface); color: var(--comty-dialog-ink); box-shadow: var(--comty-dialog-shadow); text-align: left; outline: none; }
848
879
  .comty-auth-dialog *, .comty-auth-dialog *::before, .comty-auth-dialog *::after { box-sizing: border-box; }
@@ -853,13 +884,23 @@ export function getComtyStyle() {
853
884
  .comty-auth-header svg { width: 1.25rem; height: 1.25rem; }
854
885
  .comty-auth-dialog h2 { margin: 0; color: inherit; font: 600 1.5rem/1.25 var(--comty-font); letter-spacing: -.025em; }
855
886
  .comty-auth-dialog p { margin: 1rem 0 0; color: var(--comty-dialog-soft); font: 400 .875rem/1.65 var(--comty-font); }
856
- .comty-auth-actions { display: flex; flex-wrap: wrap; justify-content: flex-end; gap: .5rem; margin-top: 1.75rem; padding-top: 1.5rem; border-top: .0625rem solid var(--comty-dialog-line); }
887
+ .comty-auth-actions { display: flex; flex-wrap: wrap; justify-content: flex-end; gap: .5rem; margin-top: 1.75rem; }
857
888
  .comty-auth-actions button { display: inline-flex; align-items: center; justify-content: center; min-height: 2.5rem; margin: 0; padding: .625rem 1rem; border: 0; border-radius: 999rem; background: transparent; color: var(--comty-dialog-soft); font: 500 .875rem/1.25 var(--comty-font); cursor: pointer; }
858
889
  .comty-auth-actions button:hover, .comty-auth-close:hover { background: var(--comty-dialog-field); color: var(--comty-dialog-ink); }
859
890
  .comty-auth-actions .comty-auth-primary { border-color: transparent; background: var(--comty-dialog-ink); color: var(--comty-dialog-surface); }
860
891
  .comty-auth-actions .comty-auth-primary:hover { background: var(--comty-dialog-soft); color: var(--comty-dialog-surface); }
861
892
  .comty-auth-dialog button:focus-visible { outline: .125rem solid var(--comty-dialog-ink); outline-offset: .1875rem; }
862
893
  .comty-auth-dialog button:disabled { opacity: .5; cursor: wait; }
894
+ .comty-guest-form { display: grid; gap: .5rem; margin-top: 1.5rem; }
895
+ .comty-guest-form label { color: var(--comty-dialog-soft); font: 500 .875rem/1.5 var(--comty-font); }
896
+ .comty-guest-form input { width: 100%; height: 2.75rem; padding: 0 1rem; border: .0625rem solid var(--comty-border); border-radius: .75rem; background: var(--comty-dialog-field); color: var(--comty-dialog-ink); font: 400 .875rem/1.5 var(--comty-font); outline: none; }
897
+ .comty-guest-form input::placeholder { color: var(--comty-dialog-soft); }
898
+ .comty-guest-form input:focus-visible { border-color: var(--comty-dialog-ink); box-shadow: 0 0 0 .0625rem var(--comty-dialog-ink); }
899
+ .comty-guest-form [role="alert"] { margin: 0; color: var(--comty-error); }
900
+ .comty-guest-actions { display: grid; justify-content: stretch; gap: .75rem; margin-top: 1rem; }
901
+ .comty-guest-actions button { width: 100%; }
902
+ .comty-guest-actions [data-comty-login] { background: var(--comty-dialog-field); color: var(--comty-dialog-ink); }
903
+ .comty-auth-or { color: var(--comty-dialog-soft); font: .75rem/1.5 var(--comty-font); text-align: center; }
863
904
  .comty-distance-layer { position: fixed; inset: 0; z-index: 1; width: 100%; height: 100%; overflow: visible; pointer-events: none; color: var(--comty-measure); }
864
905
  .comty-distance-line, .comty-distance-extension { stroke: currentColor; stroke-width: 1; fill: none; shape-rendering: crispEdges; }
865
906
  .comty-distance-extension { stroke-dasharray: 3 3; opacity: .65; }
@@ -925,8 +966,6 @@ export function getComtyStyle() {
925
966
  justify-content: space-between;
926
967
  gap: 8px;
927
968
  margin-top: 12px;
928
- padding-top: 10px;
929
- border-top: 1px solid var(--comty-border);
930
969
  }
931
970
 
932
971
  .comty-status-label {
@@ -1008,6 +1047,12 @@ export function getComtyStyle() {
1008
1047
  transform-origin: top right;
1009
1048
  }
1010
1049
 
1050
+ .comty-popover.comty-comment-popover {
1051
+ background: var(--comty-field-surface);
1052
+ border: .0625rem solid var(--comty-border);
1053
+ box-shadow: var(--comty-floating-shadow);
1054
+ }
1055
+
1011
1056
  .comty-popover-item {
1012
1057
  display: flex;
1013
1058
  align-items: center;
@@ -1123,11 +1168,11 @@ export function getComtyStyle() {
1123
1168
  .comty-property-row button > span { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-variant-numeric: tabular-nums; }
1124
1169
  .comty-property-row button[aria-label^="Copy Colour"] > span::before { content: ""; display: inline-block; width: .75rem; height: .75rem; margin-right: .375rem; border: .0625rem solid var(--comty-border); border-radius: .1875rem; background: var(--comty-picked-color); vertical-align: -.0625rem; }
1125
1170
  .comty-property-copy-icon { position: relative; flex: 0 0 .75rem; width: .75rem; height: .75rem; color: var(--comty-muted); opacity: .65; }
1126
- .comty-property-row button:hover .comty-property-copy-icon, .comty-property-row button[data-copied] .comty-property-copy-icon { opacity: 1; }
1171
+ .comty-property-row button:hover .comty-property-copy-icon, .comty-property-row button[data-copied] .comty-property-copy-icon, .comty-inspector-copy:hover .comty-property-copy-icon, .comty-inspector-copy[data-copied] .comty-property-copy-icon { opacity: 1; }
1127
1172
  .comty-property-copy-icon svg { position: absolute; inset: 0; width: 100%; height: 100%; transition: opacity 150ms var(--comty-ease-out), transform 150ms var(--comty-ease-out); }
1128
- .comty-property-copy-icon svg:last-child { opacity: 0; transform: scale(.5); }
1129
- .comty-property-row button[data-copied] svg:first-child { opacity: 0; transform: scale(.5); }
1130
- .comty-property-row button[data-copied] svg:last-child { opacity: 1; transform: scale(1); }
1173
+ .comty-property-copy-icon svg:last-child { opacity: 0; transform: scale(.9); }
1174
+ .comty-property-row button[data-copied] svg:first-child, .comty-inspector-copy[data-copied] svg:first-child { opacity: 0; transform: scale(.9); }
1175
+ .comty-property-row button[data-copied] svg:last-child, .comty-inspector-copy[data-copied] svg:last-child { opacity: 1; transform: scale(1); }
1131
1176
  @media (prefers-reduced-motion: reduce) { .comty-property-copy-icon svg { transition: none; } }
1132
1177
  .comty-property-row button[disabled] { cursor: default; opacity: .5; }
1133
1178
  .comty-property-strip { display: flex; align-items: center; justify-content: center; gap: .375rem; }
@@ -1178,29 +1223,29 @@ export function getComtyStyle() {
1178
1223
  .comty-inspect-gap { --comty-spacing-color: var(--comty-gap-fill); }
1179
1224
  .comty-inspect-spacing span { position: absolute; left: 50%; top: 50%; transform: translate(-50%, -50%); padding-inline: .2rem; border-radius: .2rem; background: var(--comty-spacing-color); color: var(--comty-foreground); font: 600 .625rem/1.3 ui-monospace, monospace; white-space: nowrap; }
1180
1225
  .comty-inspector {
1181
- position: fixed; width: 15rem; max-width: calc(100vw - 1rem);
1182
- padding-block: .5rem; border-radius: .5rem;
1183
- color: var(--comty-foreground); background: var(--comty-surface);
1184
- box-shadow: var(--comty-floating-shadow); font: .625rem/1.5 ui-sans-serif, system-ui, sans-serif;
1226
+ position: fixed; width: var(--comty-inspector-width); max-width: calc(100vw - 1rem); max-height: calc(100vh - 1rem);
1227
+ padding: .25rem; border-radius: .75rem; overflow-y: auto;
1228
+ color: var(--comty-foreground); background: var(--comty-toolbar-group);
1229
+ box-shadow: var(--comty-floating-shadow); font: var(--comty-property-font-size)/1.4 var(--comty-font);
1185
1230
  pointer-events: none; box-sizing: border-box;
1186
1231
  }
1187
1232
  .comty-inspector[data-selected] { pointer-events: auto; user-select: text; }
1188
- .comty-inspector-head, .comty-inspector-row { display: flex; align-items: baseline; justify-content: space-between; gap: .5rem; padding-inline: .5rem; }
1189
- .comty-inspector-head { margin-bottom: .5rem; }
1190
- .comty-inspector-head button:last-child { flex-shrink: 0; }
1191
- .comty-inspector-head button:first-child { flex: 1; font-family: ui-monospace, monospace; font-weight: 500; text-align: left; }
1192
- .comty-inspector-row span { color: var(--comty-muted); flex-shrink: 0; }
1193
- .comty-inspector button { min-width: 0; padding: 0; border: 0; color: inherit; background: transparent; font: inherit; text-overflow: ellipsis; overflow: hidden; white-space: nowrap; cursor: pointer; }
1194
- .comty-inspector button:hover { text-decoration: underline; }
1233
+ .comty-inspector-head { display: flex; align-items: center; gap: .25rem; padding: 0 .125rem 0 .375rem; min-height: 1.75rem; }
1234
+ .comty-inspector-selector { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; text-align: left; color: var(--comty-muted); font-family: ui-monospace, monospace; }
1235
+ .comty-inspector-details { padding: .25rem .25rem .25rem .5rem; border-radius: .5rem; background: var(--comty-toolbar-surface); }
1236
+ .comty-inspector-row { display: grid; grid-template-columns: var(--comty-inspector-label-width) minmax(0, 1fr) var(--comty-copy-size); align-items: center; gap: .25rem; min-height: var(--comty-inspector-row-height); }
1237
+ .comty-inspector-label, .comty-inspector-secondary { color: var(--comty-muted); }
1238
+ .comty-inspector-label { overflow-wrap: anywhere; }
1239
+ .comty-inspector button { min-width: 0; padding: 0; border: 0; color: inherit; background: transparent; font: inherit; cursor: pointer; }
1195
1240
  .comty-inspector button:focus-visible { outline: .125rem solid var(--comty-accent); outline-offset: .125rem; }
1196
- .comty-inspector-value { display: flex; flex-direction: column; align-items: flex-end; min-width: 0; }
1197
- .comty-inspector-value > button, .comty-inspector-tokens button { max-width: 100%; }
1198
- .comty-inspector-picker { display: inline-flex; align-items: center; gap: .25rem; }
1199
- .comty-inspector-swatch { display: inline-block; flex: 0 0 .625rem; width: .625rem; height: .625rem; border: .0625rem solid var(--comty-border); border-radius: .1875rem; }
1200
- .comty-inspector-tokens { display: flex; flex-direction: column; align-items: flex-end; max-width: 100%; }
1201
- .comty-inspector-tokens button { font-family: ui-monospace, monospace; color: var(--comty-muted); }
1202
- .comty-inspector-details { max-height: 50vh; overflow-y: auto; }
1203
- .comty-inspector .comty-inspector-expand { display: block; margin: .5rem auto 0; color: var(--comty-muted); }
1241
+ .comty-inspector-value { display: flex; align-items: center; gap: .3125rem; min-width: 0; padding-block: .125rem; text-align: left; font-variant-numeric: tabular-nums; }
1242
+ .comty-inspector button.comty-inspector-value { padding-block: .125rem; }
1243
+ .comty-inspector-text { min-width: 0; overflow-wrap: anywhere; }
1244
+ .comty-inspector-text:has(.comty-inspector-tokens) { display: flex; flex-wrap: wrap; gap: 0 .3125rem; }
1245
+ .comty-inspector-swatch { display: inline-block; flex: 0 0 .6875rem; width: .6875rem; height: .6875rem; border-radius: .1875rem; }
1246
+ .comty-inspector .comty-inspector-copy { display: grid; place-items: center; flex: 0 0 var(--comty-copy-size); width: var(--comty-copy-size); height: var(--comty-copy-size); border-radius: .375rem; }
1247
+ @media (hover: hover) and (pointer: fine) { .comty-inspector-copy:hover { background: var(--comty-hover-surface); } }
1248
+ @media (pointer: coarse) { .comty-inspector { --comty-copy-size: 2.75rem; } }
1204
1249
  .comty-measure-line { position: fixed; background: var(--comty-outline); pointer-events: none; }
1205
1250
  .comty-measure-tag { position: fixed; padding: .125rem .375rem; border-radius: .25rem; background: var(--comty-ink); color: var(--comty-paper); font: .625rem/1.4 ui-monospace, monospace; white-space: nowrap; pointer-events: none; }
1206
1251
 
@@ -1209,85 +1254,235 @@ export function getComtyStyle() {
1209
1254
  z-index: 2147483647;
1210
1255
  background: var(--comty-surface);
1211
1256
  border: 0;
1212
- box-shadow: 0 4px 20px rgba(0,0,0,.1);
1213
- border-radius: 999px;
1214
- width: 320px;
1215
- font-family: sans-serif;
1216
- display: flex;
1217
- align-items: center;
1218
- padding: 4px 4px 4px 16px;
1219
- gap: 8px;
1257
+ box-shadow: var(--comty-floating-shadow);
1258
+ border-radius: 1.125rem;
1259
+ width: min(16rem, calc(100vw - 1rem));
1260
+ height: 2.25rem;
1261
+ overflow: hidden;
1262
+ font: .75rem/1.25rem var(--comty-font);
1220
1263
  box-sizing: border-box;
1221
- animation: comty-bubble-in 220ms cubic-bezier(.2,.8,.2,1) forwards;
1264
+ animation: comty-bubble-in 200ms var(--comty-ease-out) forwards;
1222
1265
  transform-origin: top left;
1266
+ transition: height var(--comty-motion-duration) var(--comty-ease-in-out), border-radius var(--comty-motion-duration) var(--comty-ease-in-out), box-shadow 160ms var(--comty-ease-out);
1223
1267
  }
1224
1268
 
1225
- .comty-create-bubble.comty-bubble-left {
1226
- animation-name: comty-bubble-in-left;
1227
- transform-origin: top right;
1269
+ .comty-create-bubble.comty-create-expanded {
1270
+ height: 5.75rem;
1271
+ border-radius: .75rem;
1228
1272
  }
1229
1273
 
1274
+ .comty-create-bubble.comty-create-has-attachment { height: 7.5rem; }
1275
+ .comty-create-bubble.comty-bubble-left { transform-origin: top right; }
1276
+
1230
1277
  .comty-create-textarea {
1231
- flex: 1;
1232
- height: 24px;
1233
- min-height: 24px;
1234
- max-height: 150px;
1278
+ position: absolute;
1279
+ top: .5rem;
1280
+ left: .75rem;
1281
+ width: calc(100% - 3.25rem);
1282
+ height: 1.25rem;
1235
1283
  border: none;
1236
1284
  padding: 0;
1237
- font-family: inherit;
1238
- font-size: 14px;
1239
- line-height: 24px;
1285
+ font: inherit;
1240
1286
  resize: none;
1241
1287
  box-sizing: border-box;
1242
1288
  outline: none;
1243
1289
  background: transparent;
1244
- overflow-y: auto;
1290
+ overflow-y: hidden;
1245
1291
  color: var(--comty-foreground);
1246
1292
  scrollbar-width: thin;
1247
- scrollbar-color: gray transparent;
1293
+ scrollbar-color: var(--comty-muted) transparent;
1294
+ transition: width var(--comty-motion-duration) var(--comty-ease-in-out), height var(--comty-motion-duration) var(--comty-ease-in-out);
1248
1295
  }
1249
1296
 
1250
- .comty-create-textarea::placeholder {
1297
+ .comty-create-expanded .comty-create-textarea {
1298
+ width: calc(100% - 1.5rem);
1299
+ height: 2.5rem;
1300
+ overflow-y: auto;
1301
+ }
1302
+
1303
+ .comty-create-attachment {
1304
+ position: absolute;
1305
+ top: 3.25rem;
1306
+ left: .75rem;
1307
+ right: .75rem;
1308
+ display: none;
1309
+ min-width: 0;
1310
+ }
1311
+
1312
+ .comty-create-has-attachment .comty-create-attachment { display: flex; }
1313
+ .comty-create-attachment-chip {
1314
+ display: inline-flex;
1315
+ align-items: center;
1316
+ min-width: 0;
1317
+ max-width: 100%;
1318
+ padding: .125rem .125rem .125rem 0;
1319
+ border-radius: .375rem;
1320
+ background: var(--comty-field-surface);
1321
+ }
1322
+ .comty-create-attachment .comty-comment-link { flex: 0 1 auto; padding: 0 .5rem; line-height: 1.25rem; background: transparent; }
1323
+ .comty-create-attachment button {
1324
+ flex: 0 0 auto;
1325
+ width: 1.25rem;
1326
+ height: 1.25rem;
1327
+ padding: 0;
1328
+ border: 0;
1329
+ border-radius: .25rem;
1330
+ background: transparent;
1251
1331
  color: var(--comty-muted);
1332
+ cursor: pointer;
1252
1333
  }
1253
1334
 
1335
+ .comty-create-textarea::placeholder { color: var(--comty-muted); }
1336
+
1254
1337
  .comty-create-actions {
1338
+ position: absolute;
1339
+ right: 0;
1340
+ bottom: 0;
1341
+ left: 0;
1255
1342
  display: flex;
1256
1343
  align-items: center;
1344
+ justify-content: space-between;
1345
+ height: 2.25rem;
1346
+ padding: .375rem .375rem .375rem .5rem;
1347
+ box-sizing: border-box;
1348
+ pointer-events: none;
1349
+ }
1350
+ .comty-create-actions::before {
1351
+ content: "";
1352
+ position: absolute;
1353
+ inset: 0 0 auto;
1354
+ height: .0625rem;
1355
+ background: var(--comty-border);
1356
+ opacity: 0;
1357
+ transition: opacity 110ms var(--comty-ease-out);
1358
+ }
1359
+ .comty-create-expanded .comty-create-actions::before { opacity: 1; transition-delay: 110ms; }
1360
+ .comty-create-actions > button { pointer-events: auto; }
1361
+
1362
+ .comty-create-link-button {
1363
+ display: grid;
1364
+ place-items: center;
1365
+ width: 1.5rem;
1366
+ height: 1.5rem;
1367
+ padding: 0;
1368
+ border: 0;
1369
+ border-radius: .375rem;
1370
+ background: transparent;
1371
+ color: var(--comty-muted);
1372
+ cursor: pointer;
1373
+ opacity: 0;
1374
+ visibility: hidden;
1375
+ transform: translateY(.25rem);
1376
+ transition: opacity 110ms var(--comty-ease-out), transform 110ms var(--comty-ease-out), visibility 0s linear 110ms;
1377
+ }
1378
+ .comty-create-expanded .comty-create-link-button {
1379
+ opacity: 1;
1380
+ visibility: visible;
1381
+ transform: none;
1382
+ transition-delay: 110ms, 110ms, 0s;
1383
+ }
1384
+ .comty-create-link-button svg { width: .75rem; height: .75rem; }
1385
+
1386
+ @media (hover: hover) and (pointer: fine) {
1387
+ .comty-create-link-button:hover,
1388
+ .comty-create-link-editor button:hover,
1389
+ .comty-create-attachment button:hover {
1390
+ background: var(--comty-hover-surface);
1391
+ color: var(--comty-foreground);
1392
+ }
1393
+ }
1394
+ .comty-create-link-button:focus-visible,
1395
+ .comty-create-link-editor button:focus-visible,
1396
+ .comty-create-attachment button:focus-visible,
1397
+ .comty-btn-submit:focus-visible {
1398
+ outline: .0625rem solid var(--comty-comment-focus);
1399
+ outline-offset: .0625rem;
1400
+ }
1401
+
1402
+ .comty-create-link-editor {
1403
+ position: absolute;
1404
+ inset: .375rem;
1405
+ display: flex;
1406
+ align-items: center;
1407
+ gap: .375rem;
1408
+ background: var(--comty-surface);
1409
+ opacity: 0;
1410
+ visibility: hidden;
1411
+ transform: translateY(.25rem);
1412
+ pointer-events: none;
1413
+ transition: opacity 160ms var(--comty-ease-out), transform 160ms var(--comty-ease-out), visibility 0s linear 160ms;
1414
+ }
1415
+ .comty-create-link-open .comty-create-link-editor {
1416
+ opacity: 1;
1417
+ visibility: visible;
1418
+ transform: none;
1419
+ pointer-events: auto;
1420
+ transition-delay: 0s;
1421
+ }
1422
+ .comty-create-link-field { position: relative; flex: 1; min-width: 0; }
1423
+ .comty-create-link-editor input {
1424
+ display: block;
1425
+ box-sizing: border-box;
1426
+ width: 100%;
1427
+ min-width: 0;
1428
+ height: 1.5rem;
1429
+ padding: 0 1.75rem 0 .5rem;
1430
+ border: 0;
1431
+ border-radius: .375rem;
1432
+ background: var(--comty-field-surface);
1433
+ color: var(--comty-foreground);
1434
+ font: inherit;
1435
+ outline: none;
1436
+ }
1437
+ .comty-create-link-editor input:focus-visible { background: var(--comty-hover-surface); }
1438
+ .comty-create-link-editor input[aria-invalid="true"] { box-shadow: inset 0 0 0 .0625rem var(--comty-error); }
1439
+ .comty-create-link-editor button {
1257
1440
  flex: 0 0 auto;
1441
+ height: 1.5rem;
1442
+ padding: 0 .5rem;
1443
+ border: 0;
1444
+ border-radius: .375rem;
1445
+ background: var(--comty-field-surface);
1446
+ color: var(--comty-foreground);
1447
+ font: inherit;
1448
+ cursor: pointer;
1258
1449
  }
1450
+ .comty-create-link-field button {
1451
+ position: absolute;
1452
+ top: .125rem;
1453
+ right: .125rem;
1454
+ width: 1.25rem;
1455
+ height: 1.25rem;
1456
+ padding: 0;
1457
+ background: transparent;
1458
+ }
1459
+ .comty-create-link-open .comty-create-link-button,
1460
+ .comty-create-link-open .comty-btn-submit { opacity: 0; visibility: hidden; pointer-events: none; }
1259
1461
 
1260
1462
  .comty-btn-submit {
1261
1463
  display: flex;
1262
1464
  align-items: center;
1263
1465
  justify-content: center;
1264
- width: 32px;
1265
- height: 32px;
1466
+ width: 1.5rem;
1467
+ height: 1.5rem;
1266
1468
  padding: 0;
1267
1469
  border-radius: 50%;
1268
1470
  background: var(--comty-border);
1269
- color: white;
1471
+ color: var(--comty-muted);
1270
1472
  border: none;
1271
1473
  cursor: pointer;
1272
- transition: background 150ms ease, opacity 150ms ease;
1474
+ transition: background-color 160ms var(--comty-ease-out), color 160ms var(--comty-ease-out), opacity 160ms var(--comty-ease-out);
1273
1475
  }
1476
+ .comty-btn-submit svg { width: .875rem; height: .875rem; }
1477
+ .comty-btn-submit.comty-btn-active { background: var(--comty-foreground); color: var(--comty-surface); }
1478
+ .comty-btn-submit:disabled { opacity: .6; cursor: not-allowed; }
1274
1479
 
1275
- .comty-btn-submit svg {
1276
- width: 16px;
1277
- height: 16px;
1278
- }
1279
-
1280
- .comty-btn-submit.comty-btn-active {
1281
- background: #0078FF;
1282
- }
1283
-
1284
- .comty-btn-submit.comty-btn-active:hover {
1285
- background: #0062d1;
1286
- }
1287
-
1288
- .comty-btn-submit:disabled {
1289
- opacity: 0.6;
1290
- cursor: not-allowed;
1480
+ @media (prefers-reduced-motion: reduce) {
1481
+ .comty-create-bubble, .comty-create-actions::before, .comty-create-textarea, .comty-create-link-button, .comty-create-link-editor, .comty-reply-field, .comty-reply-input {
1482
+ transition-duration: 0ms;
1483
+ transition-delay: 0ms;
1484
+ }
1485
+ .comty-create-bubble { animation: none; }
1291
1486
  }
1292
1487
  `;
1293
1488
  }