@crewlethq/ui 0.105.0 → 0.106.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/dist/AgentHandoffPanel/index.js +5 -4
- package/dist/AppShell/index.js +3 -2
- package/dist/ArtifactPanel/index.js +4 -3
- package/dist/ChatDay/index.js +2 -2
- package/dist/{ChatDay-Z67WTCTN.css → ChatDay-523C65KY.css} +7 -4
- package/dist/ChatDivider/ChatDivider.d.ts +8 -2
- package/dist/ChatDivider/index.js +1 -1
- package/dist/{ChatDivider-7ZNDL2PZ.css → ChatDivider-7SPCQXUQ.css} +27 -2
- package/dist/ChatThread/index.js +1 -1
- package/dist/{ChatThread-XANOIJXN.css → ChatThread-MKAN2Q4H.css} +4 -0
- package/dist/DataView/index.js +1 -1
- package/dist/DockColumn/DockColumn.d.ts +31 -1
- package/dist/DockColumn/index.d.ts +3 -1
- package/dist/DockColumn/index.js +3 -1
- package/dist/{DockColumn-SMJCXHS4.css → DockColumn-OVAA5PLL.css} +38 -8
- package/dist/EmojiPicker/EmojiPicker.d.ts +7 -1
- package/dist/EmojiPicker/index.js +1 -1
- package/dist/{EmojiPicker-FMWYN2WX.css → EmojiPicker-W722WJ5M.css} +43 -1
- package/dist/MessageActions/index.js +2 -2
- package/dist/PeekRail/index.js +3 -2
- package/dist/RailList/index.js +3 -3
- package/dist/ReactionBar/index.js +2 -2
- package/dist/{ResizeHandle-2UNSZ4ZQ.css → ResizeHandle-W6GA5OO6.css} +9 -0
- package/dist/SectionFrame/index.js +2 -2
- package/dist/ShareDialog/index.js +1 -1
- package/dist/SidePanel/index.js +4 -3
- package/dist/SidebarNav/SidebarNav.d.ts +17 -8
- package/dist/SidebarNav/index.js +1 -1
- package/dist/{SidebarNav-IKBKGXW4.css → SidebarNav-VXDUW6W5.css} +141 -27
- package/dist/ThreadSummary/ThreadSummary.d.ts +10 -7
- package/dist/ThreadSummary/index.js +1 -1
- package/dist/ThreadSummary-CFAHYY57.css +114 -0
- package/dist/{chunk-JUKHV7UH.js → chunk-2OK6PQ7W.js} +1 -1
- package/dist/{chunk-6YQRCPJ3.js → chunk-4GBEQZQ4.js} +22 -8
- package/dist/{chunk-ZNXTN76G.js → chunk-5HHDVJBY.js} +1 -1
- package/dist/{chunk-5AHNW5CP.js → chunk-5N3G7TK6.js} +1 -1
- package/dist/{chunk-INREAF4Z.js → chunk-7DMD3U7S.js} +1 -1
- package/dist/{chunk-5KAADF4G.js → chunk-EIHPORS4.js} +2 -1
- package/dist/chunk-EKWLQFL2.js +92 -0
- package/dist/{chunk-PIYJNCN7.js → chunk-FQ6J4DK7.js} +2 -10
- package/dist/{chunk-XQQN2NZB.js → chunk-FTSPBN7P.js} +2 -4
- package/dist/{chunk-2POUISAE.js → chunk-GKP2DWNQ.js} +1 -1
- package/dist/{chunk-I5W6I2HN.js → chunk-I7S7JJMM.js} +1 -1
- package/dist/{chunk-GAWG5TU7.js → chunk-KBUV24VV.js} +6 -4
- package/dist/chunk-MBEZOURR.js +13 -0
- package/dist/{chunk-T5P3K2TM.js → chunk-PFNTWGQB.js} +3 -2
- package/dist/{chunk-3CT7JOVJ.js → chunk-QQPF5SBJ.js} +3 -3
- package/dist/{chunk-4EZOLSUO.js → chunk-SKMTVBJT.js} +3 -2
- package/dist/{chunk-2ES6LAV2.js → chunk-U4YG5KBN.js} +2 -2
- package/dist/{chunk-KRAZYXAA.js → chunk-VWZECTOJ.js} +1 -1
- package/dist/{chunk-TRPYEDZM.js → chunk-YBO5PGUG.js} +39 -4
- package/dist/generated/index.js +53 -52
- package/dist/index.js +53 -52
- package/dist/styles.css +324 -73
- package/package.json +3 -3
- package/dist/ThreadSummary-AGR4NDMD.css +0 -90
- package/dist/chunk-5JPOFAVN.js +0 -58
|
@@ -130,11 +130,30 @@
|
|
|
130
130
|
color: inherit;
|
|
131
131
|
}
|
|
132
132
|
|
|
133
|
-
|
|
134
|
-
|
|
133
|
+
/*
|
|
134
|
+
* THE HEADING'S GLYPH COLUMN: a nav glyph's 14px, holding the chevron and, in
|
|
135
|
+
* a group with a glyph of its own (`icon`), that glyph on the same spot.
|
|
136
|
+
*/
|
|
137
|
+
.crewlet-nav-group__slot {
|
|
138
|
+
display: inline-grid;
|
|
135
139
|
flex: none;
|
|
136
|
-
|
|
137
|
-
|
|
140
|
+
place-items: center;
|
|
141
|
+
width: 14px;
|
|
142
|
+
}
|
|
143
|
+
|
|
144
|
+
.crewlet-nav-group__slot > * {
|
|
145
|
+
display: inline-flex;
|
|
146
|
+
grid-area: 1 / 1;
|
|
147
|
+
}
|
|
148
|
+
|
|
149
|
+
.crewlet-nav-group__chevron {
|
|
150
|
+
transition:
|
|
151
|
+
transform var(--motion-duration-fast) var(--motion-easing-default),
|
|
152
|
+
opacity var(--motion-duration-instant) var(--motion-easing-default);
|
|
153
|
+
}
|
|
154
|
+
|
|
155
|
+
.crewlet-nav-group__icon {
|
|
156
|
+
transition: opacity var(--motion-duration-instant) var(--motion-easing-default);
|
|
138
157
|
}
|
|
139
158
|
|
|
140
159
|
/* Folded, the chevron points at the words it would open. */
|
|
@@ -142,6 +161,25 @@
|
|
|
142
161
|
transform: rotate(-90deg);
|
|
143
162
|
}
|
|
144
163
|
|
|
164
|
+
/*
|
|
165
|
+
* A GROUP WITH A GLYPH shows it at rest, and the chevron takes its spot while
|
|
166
|
+
* the heading is pointed at or focused, and while the group is folded, so a
|
|
167
|
+
* folded group still says so at a glance.
|
|
168
|
+
*/
|
|
169
|
+
.crewlet-nav-group--iconic .crewlet-nav-group__chevron {
|
|
170
|
+
opacity: 0;
|
|
171
|
+
}
|
|
172
|
+
|
|
173
|
+
.crewlet-nav-group--iconic.crewlet-nav-group--collapsed .crewlet-nav-group__chevron,
|
|
174
|
+
.crewlet-nav-group--iconic .crewlet-nav-group__head:is(:hover, :focus-within) .crewlet-nav-group__chevron {
|
|
175
|
+
opacity: 1;
|
|
176
|
+
}
|
|
177
|
+
|
|
178
|
+
.crewlet-nav-group--iconic.crewlet-nav-group--collapsed .crewlet-nav-group__toggle .crewlet-nav-group__icon,
|
|
179
|
+
.crewlet-nav-group--iconic .crewlet-nav-group__head:is(:hover, :focus-within) .crewlet-nav-group__toggle .crewlet-nav-group__icon {
|
|
180
|
+
opacity: 0;
|
|
181
|
+
}
|
|
182
|
+
|
|
145
183
|
/* The heading's control. Pushed to the end whether or not the heading has
|
|
146
184
|
words, and at the floor the heading stands at. */
|
|
147
185
|
.crewlet-nav-group__action {
|
|
@@ -508,44 +546,119 @@
|
|
|
508
546
|
}
|
|
509
547
|
|
|
510
548
|
/*
|
|
511
|
-
* THE DENSE LIST (`dense`): a list read in passing that runs long,
|
|
512
|
-
*
|
|
549
|
+
* THE DENSE LIST (`dense`): a list read in passing that runs long, drawn as
|
|
550
|
+
* one even column.
|
|
551
|
+
*
|
|
552
|
+
* ROWS ON A 28px PITCH WITH NOTHING BETWEEN THEM (the target floor and a
|
|
553
|
+
* step), so a long list reads as a column rather than a stack of pills, and
|
|
554
|
+
* the highlight is inset by the gutter on both sides, at the small radius. The
|
|
555
|
+
* glyph column is as wide as a small face (an `Avatar` at `xs`), so a face, a
|
|
556
|
+
* glyph and a group's count stand in one column and every name starts on one
|
|
557
|
+
* line; names are at the chat's word step in the regular weight, which is
|
|
558
|
+
* what lets an unread row stand out by weight.
|
|
559
|
+
*
|
|
560
|
+
* THE ROWS UNDER A NAMED GROUP STAND A STEP IN from its heading, whose glyph
|
|
561
|
+
* column is the plain rows' (the views above the groups), so a room reads as
|
|
562
|
+
* a child of its section without a guide line.
|
|
513
563
|
*
|
|
514
|
-
*
|
|
515
|
-
*
|
|
516
|
-
* the row's pad grows by exactly what the gutter gave up, so every glyph and
|
|
517
|
-
* name stays on the line it was on, whatever the surface set the two tokens
|
|
518
|
-
* to. The glyph column is as wide as a small face (an `Avatar` at `xs`), so a
|
|
519
|
-
* face, a glyph and a group's count stand in one column and every name starts
|
|
520
|
-
* on one line. Names are set in the regular weight, a step lighter than the
|
|
521
|
-
* navigation's, which is what lets an unread row stand out by weight.
|
|
564
|
+
* A POINTED ROW IS DRAWN AT ONCE. In a list scanned by moving the pointer down
|
|
565
|
+
* it, a fade trails the pointer by a row.
|
|
522
566
|
*/
|
|
523
567
|
.crewlet-sidebar-nav--dense {
|
|
524
|
-
--crewlet-nav-dense-
|
|
568
|
+
--crewlet-nav-dense-row: calc(var(--spacing-6) + var(--spacing-1));
|
|
569
|
+
--crewlet-nav-dense-pad: var(--spacing-2);
|
|
570
|
+
--crewlet-nav-dense-indent: var(--spacing-4);
|
|
525
571
|
--crewlet-nav-dense-slot: 20px;
|
|
526
|
-
|
|
527
|
-
padding-
|
|
572
|
+
gap: 0;
|
|
573
|
+
padding-right: var(--size-nav-gutter);
|
|
574
|
+
padding-left: var(--size-nav-gutter);
|
|
575
|
+
}
|
|
576
|
+
|
|
577
|
+
.crewlet-sidebar-nav--dense .crewlet-nav-group {
|
|
578
|
+
--crewlet-nav-row-gap: 0px;
|
|
579
|
+
gap: 0;
|
|
528
580
|
}
|
|
529
581
|
|
|
530
582
|
.crewlet-sidebar-nav--dense .crewlet-nav-item__row {
|
|
531
|
-
min-height: var(--
|
|
583
|
+
min-height: var(--crewlet-nav-dense-row);
|
|
532
584
|
padding-right: var(--crewlet-nav-dense-pad);
|
|
533
585
|
padding-left: var(--crewlet-nav-dense-pad);
|
|
586
|
+
border-radius: var(--radius-sm);
|
|
587
|
+
font-size: var(--font-size-sm);
|
|
534
588
|
font-weight: var(--font-weight-regular);
|
|
589
|
+
transition-property: none;
|
|
535
590
|
}
|
|
536
591
|
|
|
592
|
+
.crewlet-sidebar-nav--dense .crewlet-nav-group--named > .crewlet-nav-item > .crewlet-nav-item__head > .crewlet-nav-item__row {
|
|
593
|
+
padding-left: calc(var(--crewlet-nav-dense-pad) + var(--crewlet-nav-dense-indent));
|
|
594
|
+
}
|
|
595
|
+
|
|
596
|
+
.crewlet-sidebar-nav--dense .crewlet-nav-item__icon,
|
|
597
|
+
.crewlet-sidebar-nav--dense .crewlet-nav-group__slot {
|
|
598
|
+
min-width: var(--crewlet-nav-dense-slot);
|
|
599
|
+
}
|
|
600
|
+
|
|
601
|
+
/*
|
|
602
|
+
* THE HEADING is a row of the list: the row's height, its pad and its type
|
|
603
|
+
* step, in the medium weight and the secondary ink, 10px below the run above.
|
|
604
|
+
* A heading that folds is pressed anywhere along it and takes the pointed
|
|
605
|
+
* fill at once, at the extra-small radius so it reads as a heading rather
|
|
606
|
+
* than a destination.
|
|
607
|
+
*/
|
|
537
608
|
.crewlet-sidebar-nav--dense .crewlet-nav-group__head {
|
|
609
|
+
min-height: var(--crewlet-nav-dense-row);
|
|
610
|
+
margin-top: calc(var(--spacing-2) + var(--spacing-1) / 2);
|
|
538
611
|
padding-right: calc(var(--crewlet-nav-dense-pad) - (var(--size-target-min) - 14px) / 2);
|
|
539
612
|
padding-left: var(--crewlet-nav-dense-pad);
|
|
613
|
+
border-radius: var(--radius-xs);
|
|
540
614
|
}
|
|
541
615
|
|
|
542
|
-
.crewlet-sidebar-nav--dense .crewlet-nav-
|
|
543
|
-
|
|
616
|
+
.crewlet-sidebar-nav--dense .crewlet-nav-group__head:has(> .crewlet-nav-group__toggle):hover {
|
|
617
|
+
background: var(--color-surface-hover);
|
|
618
|
+
}
|
|
619
|
+
|
|
620
|
+
.crewlet-sidebar-nav--dense .crewlet-nav-group__toggle {
|
|
621
|
+
flex: 1 1 auto;
|
|
622
|
+
align-self: stretch;
|
|
623
|
+
text-align: start;
|
|
624
|
+
color: var(--color-text-secondary);
|
|
625
|
+
transition-property: none;
|
|
626
|
+
}
|
|
627
|
+
|
|
628
|
+
.crewlet-sidebar-nav--dense .crewlet-nav-group__head:hover .crewlet-nav-group__toggle {
|
|
629
|
+
color: var(--color-text-primary);
|
|
630
|
+
}
|
|
631
|
+
|
|
632
|
+
.crewlet-sidebar-nav--dense .crewlet-nav-group__label {
|
|
633
|
+
font-size: var(--font-size-sm);
|
|
634
|
+
font-weight: var(--font-weight-medium);
|
|
635
|
+
color: var(--color-text-secondary);
|
|
636
|
+
}
|
|
637
|
+
|
|
638
|
+
.crewlet-sidebar-nav--dense .crewlet-nav-group__toggle > .crewlet-nav-group__label {
|
|
639
|
+
color: inherit;
|
|
544
640
|
}
|
|
545
641
|
|
|
546
|
-
|
|
547
|
-
|
|
548
|
-
|
|
642
|
+
/* Pressed on a pointed heading, the control is one step stronger than it. */
|
|
643
|
+
.crewlet-sidebar-nav--dense .crewlet-nav-group__action:hover {
|
|
644
|
+
background: var(--color-surface-pressed);
|
|
645
|
+
}
|
|
646
|
+
|
|
647
|
+
/*
|
|
648
|
+
* THE HEADING'S CONTROL SHOWS WHERE THE READER REACHES FOR IT: under the
|
|
649
|
+
* pointer and while focus is in the heading. It keeps its place while hidden,
|
|
650
|
+
* so the label never moves as it comes and goes, and it stays in the tab
|
|
651
|
+
* order, which is what shows it to a keyboard. Where nothing hovers (touch),
|
|
652
|
+
* it is always shown.
|
|
653
|
+
*/
|
|
654
|
+
@media (hover: hover) {
|
|
655
|
+
.crewlet-sidebar-nav--dense .crewlet-nav-group__action {
|
|
656
|
+
opacity: 0;
|
|
657
|
+
}
|
|
658
|
+
|
|
659
|
+
.crewlet-sidebar-nav--dense .crewlet-nav-group__head:is(:hover, :focus-within) .crewlet-nav-group__action {
|
|
660
|
+
opacity: 1;
|
|
661
|
+
}
|
|
549
662
|
}
|
|
550
663
|
|
|
551
664
|
.crewlet-sidebar-nav--dense .crewlet-nav-item__children {
|
|
@@ -554,14 +667,14 @@
|
|
|
554
667
|
}
|
|
555
668
|
|
|
556
669
|
/*
|
|
557
|
-
* A ROW WITH NEWS (`unread`): its name
|
|
558
|
-
* in the primary ink, which is the whole of the signal
|
|
559
|
-
*
|
|
670
|
+
* A ROW WITH NEWS (`unread`): its name two steps heavier than a dense row's
|
|
671
|
+
* regular (semibold) and in the primary ink, which is the whole of the signal:
|
|
672
|
+
* one step read as a different face rather than as news. A muted row is never drawn unread (the component drops
|
|
560
673
|
* the class), so the two rules never meet.
|
|
561
674
|
*/
|
|
562
675
|
.crewlet-nav-item--unread > .crewlet-nav-item__head > .crewlet-nav-item__row {
|
|
563
676
|
color: var(--color-text-primary);
|
|
564
|
-
font-weight: var(--font-weight-
|
|
677
|
+
font-weight: var(--font-weight-semibold);
|
|
565
678
|
}
|
|
566
679
|
|
|
567
680
|
/*
|
|
@@ -576,6 +689,7 @@
|
|
|
576
689
|
.crewlet-nav-group__action,
|
|
577
690
|
.crewlet-nav-group__toggle,
|
|
578
691
|
.crewlet-nav-group__chevron,
|
|
692
|
+
.crewlet-nav-group__icon,
|
|
579
693
|
.crewlet-nav-item__row,
|
|
580
694
|
.crewlet-nav-item__chevron {
|
|
581
695
|
transition: none;
|
|
@@ -7,7 +7,7 @@ export interface ThreadSummaryLabels {
|
|
|
7
7
|
fresh: (count: number) => string;
|
|
8
8
|
/** When the last reply came, given the caller's words for it: "Last reply 12m ago". */
|
|
9
9
|
last: (when: string) => string;
|
|
10
|
-
/**
|
|
10
|
+
/** At the line's end under the pointer, beside the chevron that says it opens. */
|
|
11
11
|
view: string;
|
|
12
12
|
/** Shown in its place while the thread is open beside the room. */
|
|
13
13
|
open: string;
|
|
@@ -32,12 +32,15 @@ export interface ThreadSummaryProps {
|
|
|
32
32
|
}
|
|
33
33
|
/**
|
|
34
34
|
* The line under a message that has replies: the repliers' faces, "4
|
|
35
|
-
* replies" at the medium weight in the accent's ink, how many are new
|
|
36
|
-
*
|
|
35
|
+
* replies" at the medium weight in the accent's ink, and how many are new.
|
|
36
|
+
* It opens the thread, from anywhere on the line.
|
|
37
37
|
*
|
|
38
|
-
*
|
|
39
|
-
*
|
|
40
|
-
*
|
|
41
|
-
*
|
|
38
|
+
* QUIET AT REST, so a room of threads stays calm: faces and the count. UNDER
|
|
39
|
+
* THE POINTER OR THE KEYBOARD it is set into the transcript's own ground inside
|
|
40
|
+
* a hairline, when the last reply came fades in, and "View thread" with a
|
|
41
|
+
* chevron stands at its end. Every part is always laid out, so nothing moves.
|
|
42
|
+
* While the thread is open beside the room, the message it hangs off wears the
|
|
43
|
+
* selected surface and the line's end says so. Its faces sit on the content
|
|
44
|
+
* edge: the line's inset and edge are taken back outside it.
|
|
42
45
|
*/
|
|
43
46
|
export declare function ThreadSummary({ replies, participants, last, unread, working, open, onOpen, labels: overrides, className, }: ThreadSummaryProps): import("react").JSX.Element;
|
|
@@ -0,0 +1,114 @@
|
|
|
1
|
+
/*
|
|
2
|
+
* The line under a message that has replies, and the working line under it.
|
|
3
|
+
*/
|
|
4
|
+
|
|
5
|
+
/* The column's width, so the line's own cap (below) is what bounds it. */
|
|
6
|
+
.crewlet-thread-summary-wrap {
|
|
7
|
+
display: flex;
|
|
8
|
+
flex-direction: column;
|
|
9
|
+
align-items: flex-start;
|
|
10
|
+
gap: var(--spacing-1);
|
|
11
|
+
width: 100%;
|
|
12
|
+
max-width: 100%;
|
|
13
|
+
}
|
|
14
|
+
|
|
15
|
+
/* No piece is wider than the column: a long working line truncates. */
|
|
16
|
+
.crewlet-thread-summary-wrap > * {
|
|
17
|
+
max-width: 100%;
|
|
18
|
+
}
|
|
19
|
+
|
|
20
|
+
/* The faces sit on the content edge: the line's 1px edge and its inset are
|
|
21
|
+
taken back by the same amount outside it. It runs the content column's
|
|
22
|
+
width up to a reading cap, so the whole line is the target and its end
|
|
23
|
+
stands at one place down a room. */
|
|
24
|
+
.crewlet-thread-summary {
|
|
25
|
+
--crewlet-thread-summary-inset: var(--spacing-1);
|
|
26
|
+
display: flex;
|
|
27
|
+
align-items: center;
|
|
28
|
+
gap: var(--spacing-2);
|
|
29
|
+
width: min(100%, 37.5rem);
|
|
30
|
+
height: var(--size-control-md);
|
|
31
|
+
box-sizing: border-box;
|
|
32
|
+
margin-inline-start: calc((var(--crewlet-thread-summary-inset) + 1px) * -1);
|
|
33
|
+
padding: 0 var(--crewlet-thread-summary-inset);
|
|
34
|
+
border: 1px solid transparent;
|
|
35
|
+
border-radius: var(--radius-sm);
|
|
36
|
+
background: transparent;
|
|
37
|
+
color: var(--color-text-secondary);
|
|
38
|
+
font: inherit;
|
|
39
|
+
font-size: var(--font-size-compact);
|
|
40
|
+
line-height: 1;
|
|
41
|
+
text-align: start;
|
|
42
|
+
cursor: pointer;
|
|
43
|
+
}
|
|
44
|
+
|
|
45
|
+
/* Set into the transcript's own ground inside a hairline, under the pointer
|
|
46
|
+
or the keyboard: a step back from the hovered row, not a raised button. */
|
|
47
|
+
.crewlet-thread-summary:is(:hover, :focus-visible) {
|
|
48
|
+
border-color: var(--color-edge-hairline);
|
|
49
|
+
background: var(--crewlet-chat-ground);
|
|
50
|
+
}
|
|
51
|
+
|
|
52
|
+
.crewlet-thread-summary:focus-visible {
|
|
53
|
+
outline: 2px solid var(--color-focus);
|
|
54
|
+
outline-offset: var(--size-focus-ring-inset-offset);
|
|
55
|
+
}
|
|
56
|
+
|
|
57
|
+
.crewlet-thread-summary__count {
|
|
58
|
+
flex: none;
|
|
59
|
+
color: var(--color-brand-accent-ink);
|
|
60
|
+
font-weight: var(--font-weight-medium);
|
|
61
|
+
white-space: nowrap;
|
|
62
|
+
}
|
|
63
|
+
|
|
64
|
+
/* When the last reply came, laid out at rest and shown on the line's hover:
|
|
65
|
+
the part that gives way first where the column is narrow. */
|
|
66
|
+
.crewlet-thread-summary__last {
|
|
67
|
+
min-width: 0;
|
|
68
|
+
overflow: hidden;
|
|
69
|
+
color: var(--color-text-tertiary);
|
|
70
|
+
text-overflow: ellipsis;
|
|
71
|
+
white-space: nowrap;
|
|
72
|
+
opacity: 0;
|
|
73
|
+
transition: opacity var(--motion-duration-moderate) var(--motion-easing-default);
|
|
74
|
+
}
|
|
75
|
+
|
|
76
|
+
/* "View thread" and the chevron that says the line opens, at its end. */
|
|
77
|
+
.crewlet-thread-summary__end {
|
|
78
|
+
display: inline-flex;
|
|
79
|
+
flex: none;
|
|
80
|
+
align-items: center;
|
|
81
|
+
gap: var(--spacing-1);
|
|
82
|
+
margin-inline-start: auto;
|
|
83
|
+
color: var(--color-text-secondary);
|
|
84
|
+
white-space: nowrap;
|
|
85
|
+
opacity: 0;
|
|
86
|
+
}
|
|
87
|
+
|
|
88
|
+
.crewlet-thread-summary__chevron {
|
|
89
|
+
color: var(--color-text-tertiary);
|
|
90
|
+
}
|
|
91
|
+
|
|
92
|
+
.crewlet-thread-summary:is(:hover, :focus-visible) .crewlet-thread-summary__last,
|
|
93
|
+
.crewlet-thread-summary:is(:hover, :focus-visible, .is-open) .crewlet-thread-summary__end {
|
|
94
|
+
opacity: 1;
|
|
95
|
+
}
|
|
96
|
+
|
|
97
|
+
/* OPEN, the end says so and opens nothing new. */
|
|
98
|
+
.crewlet-thread-summary.is-open .crewlet-thread-summary__chevron {
|
|
99
|
+
visibility: hidden;
|
|
100
|
+
}
|
|
101
|
+
|
|
102
|
+
/* THE MESSAGE WHOSE THREAD IS OPEN beside the room wears the selected
|
|
103
|
+
surface, under the pointer too: the one sign of which conversation the
|
|
104
|
+
pane belongs to, gone when the pane closes. */
|
|
105
|
+
.crewlet-chat-message:has(.crewlet-thread-summary.is-open),
|
|
106
|
+
.crewlet-chat-message:has(.crewlet-thread-summary.is-open):hover {
|
|
107
|
+
background: var(--color-surface-selected);
|
|
108
|
+
}
|
|
109
|
+
|
|
110
|
+
@media (prefers-reduced-motion: reduce) {
|
|
111
|
+
.crewlet-thread-summary__last {
|
|
112
|
+
transition: none;
|
|
113
|
+
}
|
|
114
|
+
}
|
|
@@ -2,7 +2,7 @@ import { Timeline } from './chunk-XDUXAQIS.js';
|
|
|
2
2
|
import { Section } from './chunk-WFCWPXJN.js';
|
|
3
3
|
import { Composer } from './chunk-6HMPYTZB.js';
|
|
4
4
|
import { Disclosure } from './chunk-D5O64CVE.js';
|
|
5
|
-
import { ArtifactPanel } from './chunk-
|
|
5
|
+
import { ArtifactPanel } from './chunk-U4YG5KBN.js';
|
|
6
6
|
import { Button } from './chunk-RTHWXAXT.js';
|
|
7
7
|
import { cx } from './chunk-ODEQTPFM.js';
|
|
8
8
|
import './AgentHandoffPanel-AIU7YWWB.css';
|
|
@@ -2,10 +2,11 @@ import { Popover } from './chunk-VYUEAMA4.js';
|
|
|
2
2
|
import { Input } from './chunk-DKFBBOVE.js';
|
|
3
3
|
import { Tooltip } from './chunk-4SKN3BLH.js';
|
|
4
4
|
import { isComposing } from './chunk-EDPMHSLZ.js';
|
|
5
|
-
import './
|
|
5
|
+
import { cx } from './chunk-ODEQTPFM.js';
|
|
6
|
+
import './EmojiPicker-W722WJ5M.css';
|
|
6
7
|
import { useId, useState, useRef, useMemo } from 'react';
|
|
7
8
|
import { SearchGlyph } from '@crewlethq/icons/glyphs';
|
|
8
|
-
import { jsx, jsxs } from 'react/jsx-runtime';
|
|
9
|
+
import { jsx, jsxs, Fragment } from 'react/jsx-runtime';
|
|
9
10
|
|
|
10
11
|
// src/EmojiPicker/emoji.ts
|
|
11
12
|
var entries = (rows) => rows.map(([emoji, name, shortcode]) => ({ emoji, name, shortcode }));
|
|
@@ -109,7 +110,8 @@ var EMOJI_PICKER_COLUMNS = 8;
|
|
|
109
110
|
var EMOJI_PICKER_LABELS = {
|
|
110
111
|
search: "Search emoji",
|
|
111
112
|
results: "Results",
|
|
112
|
-
none: (query) => `No emoji match \u201C${query}\u201D
|
|
113
|
+
none: (query) => `No emoji match \u201C${query}\u201D.`,
|
|
114
|
+
idle: "Pick an emoji"
|
|
113
115
|
};
|
|
114
116
|
function layout(groups) {
|
|
115
117
|
let index = 0;
|
|
@@ -142,6 +144,7 @@ function EmojiPicker({
|
|
|
142
144
|
const id = useId();
|
|
143
145
|
const [query, setQuery] = useState("");
|
|
144
146
|
const [at, setAt] = useState(0);
|
|
147
|
+
const [pointed, setPointed] = useState(null);
|
|
145
148
|
const field = useRef(null);
|
|
146
149
|
const grid = useRef(null);
|
|
147
150
|
const found = useMemo(() => searchEmoji(query, groups), [query, groups]);
|
|
@@ -150,6 +153,8 @@ function EmojiPicker({
|
|
|
150
153
|
[found, groups, labels.results]
|
|
151
154
|
);
|
|
152
155
|
const stop = Math.min(at, Math.max(0, cells.length - 1));
|
|
156
|
+
const chosen = found && found.length > 0 ? cells[stop] : void 0;
|
|
157
|
+
const shown = pointed ?? chosen?.entry ?? null;
|
|
153
158
|
const focusCell = (index) => {
|
|
154
159
|
setAt(index);
|
|
155
160
|
grid.current?.querySelector(`[data-emoji-index="${index}"]`)?.focus();
|
|
@@ -159,9 +164,9 @@ function EmojiPicker({
|
|
|
159
164
|
if (event.key === "ArrowDown" && cells.length > 0) {
|
|
160
165
|
event.preventDefault();
|
|
161
166
|
focusCell(0);
|
|
162
|
-
} else if (event.key === "Enter" &&
|
|
167
|
+
} else if (event.key === "Enter" && chosen) {
|
|
163
168
|
event.preventDefault();
|
|
164
|
-
onPick(
|
|
169
|
+
onPick(chosen.entry.emoji);
|
|
165
170
|
close();
|
|
166
171
|
}
|
|
167
172
|
}
|
|
@@ -199,6 +204,7 @@ function EmojiPicker({
|
|
|
199
204
|
if (!open) {
|
|
200
205
|
setQuery("");
|
|
201
206
|
setAt(0);
|
|
207
|
+
setPointed(null);
|
|
202
208
|
}
|
|
203
209
|
onOpenChange?.(open);
|
|
204
210
|
},
|
|
@@ -233,12 +239,13 @@ function EmojiPicker({
|
|
|
233
239
|
"button",
|
|
234
240
|
{
|
|
235
241
|
type: "button",
|
|
236
|
-
className: "crewlet-emoji-picker__cell",
|
|
242
|
+
className: cx("crewlet-emoji-picker__cell", cell === chosen && "is-chosen"),
|
|
237
243
|
"aria-label": cell.entry.name,
|
|
238
|
-
title: cell.entry.name,
|
|
239
244
|
"data-emoji-index": cell.index,
|
|
240
245
|
tabIndex: cell.index === stop ? 0 : -1,
|
|
241
246
|
onFocus: () => setAt(cell.index),
|
|
247
|
+
onPointerEnter: () => setPointed(cell.entry),
|
|
248
|
+
onPointerLeave: () => setPointed((now) => now === cell.entry ? null : now),
|
|
242
249
|
onKeyDown: (event) => onCellKeys(event, cell),
|
|
243
250
|
onClick: () => {
|
|
244
251
|
onPick(cell.entry.emoji);
|
|
@@ -253,7 +260,14 @@ function EmojiPicker({
|
|
|
253
260
|
found && found.length === 0 ? /* @__PURE__ */ jsx("p", { className: "crewlet-emoji-picker__none", role: "status", children: labels.none(query.trim()) }) : null
|
|
254
261
|
]
|
|
255
262
|
}
|
|
256
|
-
)
|
|
263
|
+
),
|
|
264
|
+
/* @__PURE__ */ jsx("div", { className: "crewlet-emoji-picker__preview", "aria-hidden": "true", children: shown ? /* @__PURE__ */ jsxs(Fragment, { children: [
|
|
265
|
+
/* @__PURE__ */ jsx("span", { className: "crewlet-emoji-picker__preview-emoji", children: shown.emoji }),
|
|
266
|
+
/* @__PURE__ */ jsxs("span", { className: "crewlet-emoji-picker__preview-words", children: [
|
|
267
|
+
/* @__PURE__ */ jsx("span", { className: "crewlet-emoji-picker__preview-name", children: shown.name }),
|
|
268
|
+
shown.shortcode ? /* @__PURE__ */ jsx("span", { className: "crewlet-emoji-picker__preview-code", children: shown.shortcode }) : null
|
|
269
|
+
] })
|
|
270
|
+
] }) : /* @__PURE__ */ jsx("span", { className: "crewlet-emoji-picker__preview-idle", children: labels.idle }) })
|
|
257
271
|
] })
|
|
258
272
|
}
|
|
259
273
|
);
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { Select } from './chunk-JUZOMYOZ.js';
|
|
2
|
-
import { SidebarNav, NavItem } from './chunk-
|
|
2
|
+
import { SidebarNav, NavItem } from './chunk-YBO5PGUG.js';
|
|
3
3
|
import { Card } from './chunk-3C3TSWRR.js';
|
|
4
4
|
import { Text } from './chunk-XLMURU75.js';
|
|
5
5
|
import './RailList-N2ZBPRM2.css';
|
|
@@ -1,4 +1,5 @@
|
|
|
1
|
-
import { useAppShellAside
|
|
1
|
+
import { useAppShellAside } from './chunk-MBEZOURR.js';
|
|
2
|
+
import { ResizeHandle } from './chunk-FQ6J4DK7.js';
|
|
2
3
|
import { IconButton } from './chunk-PNYANWZ6.js';
|
|
3
4
|
import { useEscapeWithin, useModalLayer } from './chunk-EDPMHSLZ.js';
|
|
4
5
|
import { HeadingLevelProvider } from './chunk-PQADV6P6.js';
|
|
@@ -0,0 +1,92 @@
|
|
|
1
|
+
import { usePresence, releaseFocus } from './chunk-PCAT2EFB.js';
|
|
2
|
+
import { ResizeHandle } from './chunk-FQ6J4DK7.js';
|
|
3
|
+
import { cx } from './chunk-ODEQTPFM.js';
|
|
4
|
+
import './HitArea-QUOS6ZDJ.css';
|
|
5
|
+
import './ResizeHandle-W6GA5OO6.css';
|
|
6
|
+
import './DockColumn-OVAA5PLL.css';
|
|
7
|
+
import { useRef, useCallback, useState, useLayoutEffect } from 'react';
|
|
8
|
+
import { jsxs, jsx } from 'react/jsx-runtime';
|
|
9
|
+
|
|
10
|
+
var DOCK_MOTION = { transitions: ["width"] };
|
|
11
|
+
function DockColumn({
|
|
12
|
+
open,
|
|
13
|
+
width,
|
|
14
|
+
side = "start",
|
|
15
|
+
divider = true,
|
|
16
|
+
focusOnClose,
|
|
17
|
+
resize,
|
|
18
|
+
className,
|
|
19
|
+
style,
|
|
20
|
+
children,
|
|
21
|
+
...rest
|
|
22
|
+
}) {
|
|
23
|
+
const column = useRef(null);
|
|
24
|
+
const drawn = useDrawnWidth(column, resize !== void 0 && typeof width !== "number");
|
|
25
|
+
const { present, leaving } = usePresence(open, column, DOCK_MOTION);
|
|
26
|
+
const closed = useRef(!open);
|
|
27
|
+
closed.current = !open;
|
|
28
|
+
const isClosed = useCallback(() => closed.current, []);
|
|
29
|
+
return /* @__PURE__ */ jsxs(
|
|
30
|
+
"div",
|
|
31
|
+
{
|
|
32
|
+
...rest,
|
|
33
|
+
ref: column,
|
|
34
|
+
className: cx("crewlet-dock-column", divider && "crewlet-dock-column--divider", className),
|
|
35
|
+
"data-side": side,
|
|
36
|
+
"data-open": open ? "" : void 0,
|
|
37
|
+
style: { ...style, "--crewlet-dock-column-width": typeof width === "number" ? `${width}px` : width },
|
|
38
|
+
children: [
|
|
39
|
+
/* @__PURE__ */ jsx("div", { className: "crewlet-dock-column__clip", children: present ? /* @__PURE__ */ jsx(DockPanel, { leaving, isClosed, focusOnClose, children }) : null }),
|
|
40
|
+
resize && open && !leaving ? /* @__PURE__ */ jsx(
|
|
41
|
+
ResizeHandle,
|
|
42
|
+
{
|
|
43
|
+
className: "crewlet-dock-column__handle",
|
|
44
|
+
label: resize.label,
|
|
45
|
+
edge: side === "start" ? "right" : "left",
|
|
46
|
+
value: typeof width === "number" ? width : drawn,
|
|
47
|
+
min: resize.min,
|
|
48
|
+
max: resize.max,
|
|
49
|
+
onValueChange: resize.onValueChange,
|
|
50
|
+
onValueCommit: resize.onValueCommit,
|
|
51
|
+
defaultValue: resize.defaultValue
|
|
52
|
+
}
|
|
53
|
+
) : null
|
|
54
|
+
]
|
|
55
|
+
}
|
|
56
|
+
);
|
|
57
|
+
}
|
|
58
|
+
function useDrawnWidth(column, needed) {
|
|
59
|
+
const [drawn, setDrawn] = useState(0);
|
|
60
|
+
useLayoutEffect(() => {
|
|
61
|
+
const element = column.current;
|
|
62
|
+
if (!needed || !element || typeof ResizeObserver === "undefined") return;
|
|
63
|
+
const measure = () => setDrawn(Math.round(element.getBoundingClientRect().width));
|
|
64
|
+
measure();
|
|
65
|
+
const observer = new ResizeObserver(measure);
|
|
66
|
+
observer.observe(element);
|
|
67
|
+
return () => observer.disconnect();
|
|
68
|
+
}, [column, needed]);
|
|
69
|
+
return drawn;
|
|
70
|
+
}
|
|
71
|
+
function DockPanel({
|
|
72
|
+
leaving,
|
|
73
|
+
isClosed,
|
|
74
|
+
focusOnClose,
|
|
75
|
+
children
|
|
76
|
+
}) {
|
|
77
|
+
const panel = useRef(null);
|
|
78
|
+
const target = useRef(focusOnClose);
|
|
79
|
+
target.current = focusOnClose;
|
|
80
|
+
useLayoutEffect(() => {
|
|
81
|
+
if (leaving) releaseFocus(panel.current, target.current?.());
|
|
82
|
+
}, [leaving]);
|
|
83
|
+
useLayoutEffect(() => {
|
|
84
|
+
const element = panel.current;
|
|
85
|
+
return () => {
|
|
86
|
+
if (isClosed()) releaseFocus(element, target.current?.());
|
|
87
|
+
};
|
|
88
|
+
}, [isClosed]);
|
|
89
|
+
return /* @__PURE__ */ jsx("div", { ref: panel, className: "crewlet-dock-column__panel", inert: leaving || void 0, children });
|
|
90
|
+
}
|
|
91
|
+
|
|
92
|
+
export { DockColumn };
|
|
@@ -1,16 +1,8 @@
|
|
|
1
1
|
import { HIT_AREA_CLASS } from './chunk-2YTOOH3A.js';
|
|
2
2
|
import { cx } from './chunk-ODEQTPFM.js';
|
|
3
|
-
import {
|
|
3
|
+
import { useState, useRef, useCallback } from 'react';
|
|
4
4
|
import { jsx } from 'react/jsx-runtime';
|
|
5
5
|
|
|
6
|
-
var AsideContext = createContext(null);
|
|
7
|
-
var PeekContext = createContext(null);
|
|
8
|
-
function useAppShellAside() {
|
|
9
|
-
return useContext(AsideContext);
|
|
10
|
-
}
|
|
11
|
-
function useAppShellPeek() {
|
|
12
|
-
return useContext(PeekContext);
|
|
13
|
-
}
|
|
14
6
|
var RESIZE_HANDLE_STEP = 16;
|
|
15
7
|
var RESIZE_HANDLE_LARGE_STEP = 64;
|
|
16
8
|
function clampSize(value, min, max) {
|
|
@@ -121,4 +113,4 @@ function ResizeHandle({
|
|
|
121
113
|
);
|
|
122
114
|
}
|
|
123
115
|
|
|
124
|
-
export {
|
|
116
|
+
export { RESIZE_HANDLE_LARGE_STEP, RESIZE_HANDLE_STEP, ResizeHandle, clampSize };
|
|
@@ -2,7 +2,7 @@ import { useMediaMatch, REDUCED_MOTION_QUERY } from './chunk-YJQXESOJ.js';
|
|
|
2
2
|
import { Button } from './chunk-RTHWXAXT.js';
|
|
3
3
|
import { VisuallyHidden } from './chunk-RRRK2KB6.js';
|
|
4
4
|
import { cx } from './chunk-ODEQTPFM.js';
|
|
5
|
-
import './ChatThread-
|
|
5
|
+
import './ChatThread-MKAN2Q4H.css';
|
|
6
6
|
import { forwardRef, useRef, Children, useState, useCallback, useEffect, useLayoutEffect, useImperativeHandle } from 'react';
|
|
7
7
|
import { ArrowDownGlyph } from '@crewlethq/icons/glyphs';
|
|
8
8
|
import { jsxs, jsx, Fragment } from 'react/jsx-runtime';
|
|
@@ -206,7 +206,6 @@ function anchorIn(view, content) {
|
|
|
206
206
|
let parent = content;
|
|
207
207
|
for (let depth = 0; parent && depth < ANCHOR_DEPTH; depth++) {
|
|
208
208
|
let next = null;
|
|
209
|
-
let whole = false;
|
|
210
209
|
for (const child of Array.from(parent.children)) {
|
|
211
210
|
const box = child.getBoundingClientRect();
|
|
212
211
|
if (box.height === 0 || box.bottom <= top || box.top >= bottom) continue;
|
|
@@ -214,12 +213,11 @@ function anchorIn(view, content) {
|
|
|
214
213
|
if (style.position === "sticky" || style.position === "fixed" || style.position === "absolute") continue;
|
|
215
214
|
if (style.overflowAnchor === "none") continue;
|
|
216
215
|
next = child;
|
|
217
|
-
whole = box.top >= top && box.bottom <= bottom;
|
|
218
216
|
break;
|
|
219
217
|
}
|
|
220
218
|
if (!next) break;
|
|
221
219
|
found = next;
|
|
222
|
-
parent =
|
|
220
|
+
parent = next;
|
|
223
221
|
}
|
|
224
222
|
return found ? { element: found, at: depthIn(view, found) } : null;
|
|
225
223
|
}
|