@duskmoon-dev/core 1.20.5 → 1.20.6

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.
@@ -420,6 +420,103 @@ export const css = `@layer components {
420
420
  justify-self: end;
421
421
  }
422
422
 
423
+ .chat-agent {
424
+ align-items: start;
425
+ row-gap: 0.5rem;
426
+ padding: 0.75rem 0;
427
+ min-inline-size: 0;
428
+ color: var(--color-on-surface);
429
+ }
430
+
431
+ .chat-agent:not(:has(> .chat-avatar)) {
432
+ grid-template-columns: minmax(0, 1fr);
433
+ }
434
+
435
+ .chat-agent:not(:has(> .chat-avatar)) > * {
436
+ grid-column: 1;
437
+ }
438
+
439
+ .chat-agent .chat-avatar {
440
+ grid-row: 1;
441
+ }
442
+
443
+ .chat-content {
444
+ width: 100%;
445
+ min-inline-size: 0;
446
+ box-sizing: border-box;
447
+ color: var(--color-on-surface);
448
+ font-size: 0.9375rem;
449
+ line-height: 1.6;
450
+ overflow-wrap: anywhere;
451
+ }
452
+
453
+ .chat-content pre {
454
+ max-inline-size: 100%;
455
+ min-inline-size: 0;
456
+ overflow: auto;
457
+ white-space: pre;
458
+ }
459
+
460
+ .chat-content a {
461
+ overflow-wrap: anywhere;
462
+ text-decoration: underline;
463
+ }
464
+
465
+ .chat-work {
466
+ width: 100%;
467
+ min-inline-size: 0;
468
+ border: 0;
469
+ padding: 0;
470
+ background: transparent;
471
+ }
472
+
473
+ .chat-work-summary {
474
+ display: flex;
475
+ flex-wrap: wrap;
476
+ align-items: center;
477
+ gap: 0.5rem;
478
+ padding: 0.5rem 0;
479
+ border-block-end: 1px solid var(--color-outline-variant);
480
+ color: var(--color-on-surface-variant);
481
+ font-size: 0.8125rem;
482
+ line-height: 1.5;
483
+ overflow-wrap: anywhere;
484
+ list-style: none;
485
+ cursor: pointer;
486
+ }
487
+
488
+ .chat-work-summary::-webkit-details-marker {
489
+ display: none;
490
+ }
491
+
492
+ .chat-work-summary::after {
493
+ content: "›";
494
+ flex-shrink: 0;
495
+ }
496
+
497
+ .chat-work[open] > .chat-work-summary::after {
498
+ transform: rotate(90deg);
499
+ }
500
+
501
+ .chat-work-summary:focus-visible {
502
+ outline: none;
503
+ box-shadow: 0 0 0 3px color-mix(in oklch, currentColor 20%, transparent);
504
+ }
505
+
506
+ .chat-work-body {
507
+ display: flex;
508
+ flex-direction: column;
509
+ gap: 0.5rem;
510
+ padding: 0.75rem 0;
511
+ }
512
+
513
+ .chat-agent .chat-reasoning,
514
+ .chat-agent .chat-tool {
515
+ width: 100%;
516
+ max-width: none;
517
+ box-sizing: border-box;
518
+ }
519
+
423
520
  .chat-header,
424
521
  .chat-footer {
425
522
  color: var(--color-on-surface-variant);
@@ -484,6 +581,206 @@ export const css = `@layer components {
484
581
  }
485
582
  }
486
583
 
584
+ /** Waiting messages; the application owns dispatch, steer, and removal. */
585
+ .chat-input-area {
586
+ display: flex;
587
+ flex-direction: column;
588
+ min-inline-size: 0;
589
+ box-sizing: border-box;
590
+ color: var(--color-on-surface);
591
+ }
592
+
593
+ .chat-input-area > .chat-queue {
594
+ margin-inline: 0.75rem;
595
+ margin-block-end: -0.5rem;
596
+ padding: 0.125rem 0.5rem 0.625rem;
597
+ border-block-end: 0;
598
+ border-radius: var(--radius-xl) var(--radius-xl) 0 0;
599
+ }
600
+
601
+ .chat-input-area > .chat-queue .chat-queue-header:not(.sr-only) {
602
+ padding: 0.125rem 0 0.5rem;
603
+ }
604
+
605
+ .chat-input-area > .chat-queue .chat-queue-list {
606
+ padding: 0;
607
+ }
608
+
609
+ .chat-queue {
610
+ min-inline-size: 0;
611
+ max-inline-size: 100%;
612
+ box-sizing: border-box;
613
+ border: 1px solid var(--color-outline-variant);
614
+ border-radius: var(--radius-md);
615
+ background-color: var(--color-surface-container-low);
616
+ color: var(--color-on-surface);
617
+ font-size: 0.875rem;
618
+ line-height: 1.45;
619
+ }
620
+
621
+ .chat-queue-header:not(.sr-only) {
622
+ display: flex;
623
+ flex-wrap: wrap;
624
+ align-items: center;
625
+ justify-content: space-between;
626
+ gap: 0.5rem;
627
+ padding: 0.625rem 0.875rem;
628
+ }
629
+
630
+ .chat-queue-title {
631
+ margin: 0;
632
+ font-size: inherit;
633
+ font-weight: 600;
634
+ overflow-wrap: anywhere;
635
+ }
636
+
637
+ .chat-queue-list {
638
+ display: flex;
639
+ flex-direction: column;
640
+ gap: 0;
641
+ max-block-size: 16rem;
642
+ overflow-y: auto;
643
+ overscroll-behavior: contain;
644
+ margin: 0;
645
+ padding: 0 0.875rem 0.875rem;
646
+ box-sizing: border-box;
647
+ list-style: none;
648
+ }
649
+
650
+ .chat-queue-item {
651
+ display: flex;
652
+ flex-shrink: 0;
653
+ flex-wrap: nowrap;
654
+ align-items: center;
655
+ gap: 0.375rem;
656
+ min-inline-size: 0;
657
+ max-inline-size: 100%;
658
+ box-sizing: border-box;
659
+ padding: 0.375rem 0.5rem;
660
+ border: 0;
661
+ background-color: transparent;
662
+ }
663
+
664
+ .chat-queue-icon {
665
+ flex-shrink: 0;
666
+ inline-size: 1rem;
667
+ block-size: 1rem;
668
+ color: var(--color-on-surface-variant);
669
+ }
670
+
671
+ .chat-queue-item-active .chat-queue-icon {
672
+ color: var(--color-on-surface);
673
+ }
674
+
675
+ .chat-queue-attachment {
676
+ flex-shrink: 0;
677
+ inline-size: 2rem;
678
+ block-size: 2rem;
679
+ object-fit: cover;
680
+ border-radius: var(--radius-xs);
681
+ }
682
+
683
+ .chat-queue-number {
684
+ flex-shrink: 0;
685
+ color: var(--color-on-surface-variant);
686
+ font-variant-numeric: tabular-nums;
687
+ }
688
+
689
+ .chat-queue-count {
690
+ white-space: nowrap;
691
+ }
692
+
693
+ .chat-queue-content {
694
+ flex: 1 1 8rem;
695
+ min-inline-size: 0;
696
+ margin: 0;
697
+ overflow: hidden;
698
+ white-space: nowrap;
699
+ text-overflow: ellipsis;
700
+ }
701
+
702
+ .chat-queue-actions {
703
+ flex-wrap: nowrap;
704
+ flex-shrink: 0;
705
+ margin-inline-start: auto;
706
+ }
707
+
708
+ .chat-queue-steer,
709
+ .chat-queue-remove {
710
+ flex-shrink: 0;
711
+ }
712
+
713
+ .chat-queue[hidden],
714
+ .chat-queue-item[hidden] {
715
+ display: none;
716
+ }
717
+
718
+ .chat-composer {
719
+ position: relative;
720
+ display: flex;
721
+ flex-direction: column;
722
+ gap: 0.5rem;
723
+ min-inline-size: 0;
724
+ box-sizing: border-box;
725
+ margin: 0;
726
+ padding: 1rem;
727
+ border: 1px solid currentColor;
728
+ border-radius: var(--radius-xl);
729
+ background-color: var(--color-surface-container-high);
730
+ color: var(--color-on-surface);
731
+ }
732
+
733
+ .chat-composer:focus-within {
734
+ box-shadow: 0 0 0 3px color-mix(in oklch, currentColor 20%, transparent);
735
+ }
736
+
737
+ .chat-composer-input {
738
+ display: block;
739
+ width: 100%;
740
+ min-inline-size: 0;
741
+ min-block-size: 3rem;
742
+ box-sizing: border-box;
743
+ margin: 0;
744
+ padding: 0;
745
+ border: 0;
746
+ outline: none;
747
+ background-color: transparent;
748
+ color: var(--color-on-surface);
749
+ font: inherit;
750
+ font-size: 0.9375rem;
751
+ line-height: 1.5;
752
+ resize: vertical;
753
+ }
754
+
755
+ .chat-composer-input::placeholder {
756
+ color: var(--color-on-surface-variant);
757
+ opacity: 1;
758
+ }
759
+
760
+ .chat-composer-actions {
761
+ display: flex;
762
+ flex-wrap: wrap;
763
+ align-items: center;
764
+ justify-content: flex-end;
765
+ gap: 0.5rem;
766
+ }
767
+
768
+ .chat-composer-hint {
769
+ font-family: inherit;
770
+ font-size: 0.75rem;
771
+ font-weight: 400;
772
+ opacity: 1;
773
+ }
774
+
775
+ .chat-composer-primary { color: var(--color-primary); }
776
+ .chat-composer-secondary { color: var(--color-secondary); }
777
+ .chat-composer-tertiary { color: var(--color-tertiary); }
778
+ .chat-composer-info { color: var(--color-info); }
779
+ .chat-composer-success { color: var(--color-success); }
780
+ .chat-composer-warning { color: var(--color-warning); }
781
+ .chat-composer-error { color: var(--color-error); }
782
+ .chat-composer-ghost { border-color: transparent; }
783
+
487
784
  .chat-bubble {
488
785
  --chat-bubble-bg: var(--color-surface-container-highest);
489
786
  --chat-bubble-fg: var(--color-on-surface);
@@ -509,40 +806,29 @@ export const css = `@layer components {
509
806
  .chat-bubble-content {
510
807
  min-width: 0;
511
808
  }
512
- .chat-bubble pre { max-inline-size: 100%; min-inline-size: 0; overflow: auto; white-space: pre; }
513
- .chat-bubble a { overflow-wrap: anywhere; text-decoration: underline; }
514
-
515
- .chat-start .chat-bubble::before,
516
- .chat-end .chat-bubble::before {
517
- content: "";
518
- position: absolute;
519
- inset-block-start: 0;
520
- inline-size: 0.75rem;
521
- block-size: 0.75rem;
522
- background-color: var(--chat-bubble-bg);
523
- mask-image: radial-gradient(ellipse at 0 100%, transparent 68%, black 72%);
524
- pointer-events: none;
525
- }
526
809
 
527
- .chat-start .chat-bubble::before {
528
- inset-inline-start: -0.5rem;
810
+ .chat-bubble-collapsible > .chat-bubble-content {
811
+ max-block-size: 6lh;
812
+ overflow: hidden;
813
+ white-space: pre-wrap;
529
814
  }
530
815
 
531
- .chat-start .chat-bubble {
532
- border-start-start-radius: 0;
816
+ .chat-bubble-collapsible:has(> .chat-bubble-toggle[aria-expanded="true"]) > .chat-bubble-content {
817
+ max-block-size: none;
818
+ overflow: visible;
533
819
  }
534
820
 
535
- .chat-end .chat-bubble::before {
536
- inset-inline-end: -0.5rem;
537
- transform: scaleX(-1);
821
+ .chat-bubble-toggle {
822
+ align-self: flex-end;
823
+ color: inherit;
538
824
  }
539
825
 
540
- .chat-end .chat-bubble {
541
- border-start-end-radius: 0;
826
+ .chat-bubble-toggle[hidden] {
827
+ display: none;
542
828
  }
543
829
 
544
- .chat-start:dir(rtl) .chat-bubble::before { transform: scaleX(-1); }
545
- .chat-end:dir(rtl) .chat-bubble::before { transform: none; }
830
+ .chat-bubble pre { max-inline-size: 100%; min-inline-size: 0; overflow: auto; white-space: pre; }
831
+ .chat-bubble a { overflow-wrap: anywhere; text-decoration: underline; }
546
832
 
547
833
  .chat-bubble-primary {
548
834
  --chat-bubble-bg: var(--color-primary-container);
@@ -812,6 +1098,7 @@ export const css = `@layer components {
812
1098
  animation-delay: 300ms;
813
1099
  }
814
1100
 
1101
+ .chat-streaming::after,
815
1102
  .chat-bubble-streaming::after,
816
1103
  .chat-bubble-content.chat-bubble-streaming::after {
817
1104
  content: "";
@@ -891,12 +1178,14 @@ export const css = `@layer components {
891
1178
  .chat-typing::before,
892
1179
  .chat-typing::after,
893
1180
  .chat-typing span,
1181
+ .chat-streaming::after,
894
1182
  .chat-bubble-streaming::after,
895
1183
  .chat-bubble-content.chat-bubble-streaming::after,
896
1184
  .chat-tool-running .chat-tool-header::before {
897
1185
  animation: none;
898
1186
  }
899
1187
 
1188
+ .chat-streaming::after,
900
1189
  .chat-bubble-streaming::after,
901
1190
  .chat-bubble-content.chat-bubble-streaming::after {
902
1191
  opacity: 1;