@crewlethq/ui 0.111.0 → 0.112.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 +4 -3
- package/dist/AppShell/index.js +2 -2
- package/dist/ArrangeList/index.js +4 -3
- package/dist/ArtifactBar/index.js +4 -4
- package/dist/ArtifactCard/index.js +5 -4
- package/dist/Avatar/AvatarStack.d.ts +9 -3
- package/dist/Avatar/index.js +1 -1
- package/dist/AvatarPicker/index.js +6 -6
- package/dist/{AvatarStack-EQZZJZ3V.css → AvatarStack-GNEJHEU6.css} +20 -0
- package/dist/ChatDay/ChatDay.d.ts +3 -1
- package/dist/ChatDay/index.js +2 -2
- package/dist/ChatDivider/ChatDivider.d.ts +8 -1
- package/dist/ChatDivider/index.js +1 -1
- package/dist/{ChatDivider-7SPCQXUQ.css → ChatDivider-BRODST2E.css} +23 -0
- package/dist/ChatMessage/ChatMessage.d.ts +10 -3
- package/dist/ChatMessage/index.js +2 -2
- package/dist/{ChatMessage-5AMJCGZY.css → ChatMessage-SZGZT7O2.css} +15 -0
- package/dist/ChatThread/index.js +2 -2
- package/dist/CheckGrid/index.js +4 -3
- package/dist/Checkbox/index.js +3 -2
- package/dist/ColorField/index.js +3 -2
- package/dist/Combobox/index.js +3 -2
- package/dist/CommandPalette/index.js +3 -2
- package/dist/CommentThread/index.js +5 -4
- package/dist/Composer/index.js +3 -2
- package/dist/ConfirmField/index.js +3 -2
- package/dist/ContrastHelp/index.js +2 -2
- package/dist/DataGrid/index.js +4 -3
- package/dist/DataTable/index.js +5 -4
- package/dist/DataView/index.js +8 -7
- package/dist/DateTimePicker/index.js +2 -2
- package/dist/DocTabsEditor/index.js +4 -3
- package/dist/{Editor-VAEC6MIJ.js → Editor-YITN2DWX.js} +4 -3
- package/dist/EmojiPicker/EmojiPicker.d.ts +23 -5
- package/dist/EmojiPicker/index.d.ts +1 -1
- package/dist/EmojiPicker/index.js +5 -3
- package/dist/EmojiPicker-V6XM56GJ.css +180 -0
- package/dist/EntityChip/index.js +1 -1
- package/dist/HuePicker/index.js +4 -4
- package/dist/ImageUpload/index.js +1 -1
- package/dist/Input/index.js +2 -1
- package/dist/KeyValueRows/index.js +3 -2
- package/dist/Layer/index.d.ts +1 -1
- package/dist/Layer/place.d.ts +6 -0
- package/dist/ListInput/index.js +3 -2
- package/dist/MarkdownEditor/index.js +4 -4
- package/dist/MemberPicker/index.js +4 -3
- package/dist/MentionMenu/MentionMenu.d.ts +18 -2
- package/dist/MentionMenu/index.d.ts +4 -1
- package/dist/MentionMenu/index.js +2 -1
- package/dist/{MentionMenu-77P7C4F7.css → MentionMenu-AWZSOTNU.css} +45 -1
- package/dist/Menu/Menu.d.ts +4 -1
- package/dist/Menu/index.js +1 -1
- package/dist/{Menu-UY2O4OCZ.css → Menu-PXOAJ4DP.css} +5 -0
- package/dist/MergeConflicts/index.js +4 -4
- package/dist/MessageActions/index.js +5 -4
- package/dist/OrgLabel/index.js +1 -1
- package/dist/OrgNode/index.js +1 -1
- package/dist/OrgTable/index.js +7 -6
- package/dist/PeopleRail/index.js +1 -1
- package/dist/Popover/Popover.d.ts +4 -2
- package/dist/Popover/index.js +1 -1
- package/dist/{Popover-QCINR7WG.css → Popover-EKG6OBZL.css} +5 -0
- package/dist/PresenceStack/index.js +1 -1
- package/dist/Principal/index.js +1 -1
- package/dist/PrincipalPicker/index.js +5 -4
- package/dist/ProposalCard/index.js +4 -3
- package/dist/ReactionBar/ReactionBar.d.ts +4 -2
- package/dist/ReactionBar/index.js +6 -4
- package/dist/RecordChip/index.js +2 -2
- package/dist/RichEditor/index.js +1 -1
- package/dist/SegmentedControl/index.js +3 -3
- package/dist/ShareDialog/index.js +1 -1
- package/dist/SheetColumnEditor/index.js +8 -7
- package/dist/SheetGrid/index.js +4 -4
- package/dist/SlideFilmstrip/index.js +2 -2
- package/dist/Switcher/index.js +4 -3
- package/dist/TableCells/index.js +1 -1
- package/dist/Tabs/index.js +2 -2
- package/dist/ThemeSwitcher/index.js +4 -4
- package/dist/ThreadSummary/ThreadSummary.d.ts +2 -0
- package/dist/ThreadSummary/index.d.ts +1 -1
- package/dist/ThreadSummary/index.js +2 -2
- package/dist/{ThreadSummary-CFAHYY57.css → ThreadSummary-2AFEU6NH.css} +2 -1
- package/dist/TimeRangePicker/index.js +6 -5
- package/dist/TimeWindowPicker/index.js +4 -3
- package/dist/TreeGrid/index.js +5 -4
- package/dist/ValueField/index.js +4 -3
- package/dist/VersionCompare/index.js +4 -4
- package/dist/VersionTimeline/index.js +1 -1
- package/dist/{chunk-QEGOVWYP.js → chunk-3UFIYOVD.js} +1 -1
- package/dist/{chunk-NQKHOLC7.js → chunk-45VQPH27.js} +1 -1
- package/dist/chunk-47V3ASMW.js +74 -0
- package/dist/{chunk-ADIJ6TLF.js → chunk-5FOJLJYN.js} +1 -1
- package/dist/{chunk-A2BL2EF6.js → chunk-5G3KASPV.js} +1 -1
- package/dist/{chunk-FXRXV6QH.js → chunk-5SBMYPWG.js} +1 -1
- package/dist/{chunk-WUCRLA25.js → chunk-5SMYKL3D.js} +9 -3
- package/dist/{chunk-LTNWLZLG.js → chunk-76LJUPDA.js} +2 -2
- package/dist/{chunk-ECTHM76P.js → chunk-7TLM7E5N.js} +2 -2
- package/dist/{chunk-S4AQ7HAA.js → chunk-AQMB6ONN.js} +2 -2
- package/dist/{chunk-5272PYQD.js → chunk-BBE656JU.js} +1 -1
- package/dist/{chunk-BM76TWJ7.js → chunk-CHB7T3PT.js} +4 -4
- package/dist/{chunk-XKU733RV.js → chunk-CJRWESDZ.js} +1 -1
- package/dist/{chunk-WIMKLLMH.js → chunk-CTIJTW4R.js} +1 -1
- package/dist/{chunk-MV56SO2V.js → chunk-D7NXK77P.js} +1 -1
- package/dist/{chunk-XR6IZOLT.js → chunk-DRI6OXWY.js} +1 -1
- package/dist/{chunk-E7NTBXXE.js → chunk-DTEDUAEW.js} +1 -1
- package/dist/{chunk-RG6X2EQP.js → chunk-DTZ72KVX.js} +2 -2
- package/dist/{chunk-GMBXRSC5.js → chunk-ECGYBWRI.js} +2 -2
- package/dist/{chunk-2DXZ2ZJR.js → chunk-ENYB3HIA.js} +2 -2
- package/dist/{chunk-TWNOYES7.js → chunk-GFOPTRRY.js} +1 -1
- package/dist/{chunk-PH5APLMB.js → chunk-GMQ54OQF.js} +1 -1
- package/dist/{chunk-TZNNLLXI.js → chunk-HHRYIXBM.js} +1 -1
- package/dist/{chunk-ETFBEHMH.js → chunk-J4OL6KHY.js} +1 -1
- package/dist/{chunk-VYUEAMA4.js → chunk-KDRJZWE3.js} +3 -1
- package/dist/{chunk-IW7EEYBS.js → chunk-KG3PHAUX.js} +2 -2
- package/dist/{chunk-GYLXJ6VC.js → chunk-KVNVLBCB.js} +1 -1
- package/dist/{chunk-EBIYEUE3.js → chunk-KYWIUH5R.js} +5 -5
- package/dist/{chunk-TDE6MUAQ.js → chunk-LGJJIPYZ.js} +1 -1
- package/dist/{chunk-XL6DTL36.js → chunk-M7EALYXZ.js} +1 -1
- package/dist/{chunk-L544S4UU.js → chunk-NOP55WRY.js} +107 -44
- package/dist/{chunk-WMLXOW7D.js → chunk-P366K4RX.js} +3 -2
- package/dist/{chunk-3ZIGF6LK.js → chunk-PBDMJHXV.js} +1 -1
- package/dist/chunk-PJV5HVZY.js +67 -0
- package/dist/{chunk-57SISFHX.js → chunk-PWB2LWBE.js} +1 -1
- package/dist/chunk-Q5LDZPFF.js +2 -0
- package/dist/{chunk-JLL7KQV5.js → chunk-QCJ3UBCZ.js} +1 -1
- package/dist/{chunk-YBPBSLGY.js → chunk-QHUKJN33.js} +3 -1
- package/dist/{chunk-3DUNIA3E.js → chunk-QLGZBN6A.js} +4 -4
- package/dist/{chunk-7ZIKXGIJ.js → chunk-QMEKGAEA.js} +2 -2
- package/dist/{chunk-TTQOKYTO.js → chunk-QVNEQSOL.js} +1 -1
- package/dist/{chunk-OTGWNFBE.js → chunk-RHD46WIZ.js} +1 -1
- package/dist/{chunk-4A75O7NL.js → chunk-RTDFRFTF.js} +8 -3
- package/dist/{chunk-6ZC2LPCM.js → chunk-SDYLFZKZ.js} +2 -2
- package/dist/{chunk-OIFITGYL.js → chunk-SJNJBXUA.js} +2 -2
- package/dist/{chunk-CJNSPA5F.js → chunk-STJPIP3R.js} +1 -1
- package/dist/{chunk-HKCOGDXN.js → chunk-TE3OMB3Z.js} +2 -28
- package/dist/{chunk-2SHRZ42G.js → chunk-TP7PRSGX.js} +1 -1
- package/dist/{chunk-YECS3C4D.js → chunk-V6BEBGO3.js} +2 -2
- package/dist/{chunk-LKBJE5J7.js → chunk-VZ42TS3C.js} +1 -1
- package/dist/{chunk-PZ4RVNSC.js → chunk-WEZU4DX2.js} +1 -1
- package/dist/{chunk-HKJTZG75.js → chunk-Y36N7TB7.js} +1 -1
- package/dist/{chunk-SRID7K37.js → chunk-Y3FLNQEE.js} +1 -1
- package/dist/{chunk-BHR72Z7M.js → chunk-YD5UCBFV.js} +1 -1
- package/dist/{chunk-MWKJEZBY.js → chunk-YE76GTQU.js} +2 -2
- package/dist/{chunk-SQSFVBDF.js → chunk-ZGJCVXFU.js} +1 -1
- package/dist/{chunk-PGMKJ4OD.js → chunk-ZJVGVTC3.js} +19 -5
- package/dist/{chunk-EXYO45GN.js → chunk-ZUFV7753.js} +5 -4
- package/dist/generated/index.js +70 -69
- package/dist/index.js +70 -69
- package/dist/styles.css +209 -21
- package/dist/utils/fieldMirror.d.ts +22 -0
- package/package.json +3 -3
- package/dist/EmojiPicker-W722WJ5M.css +0 -105
- package/dist/chunk-3KLVK655.js +0 -2
- package/dist/chunk-VZ7DNXCW.js +0 -58
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
import { cx } from './chunk-ODEQTPFM.js';
|
|
2
2
|
import './ChatScale-6NM4TP7R.css';
|
|
3
|
-
import './ChatDivider-
|
|
3
|
+
import './ChatDivider-BRODST2E.css';
|
|
4
4
|
import { jsx } from 'react/jsx-runtime';
|
|
5
5
|
|
|
6
|
-
function ChatDivider({ variant, label, className, ...rest }) {
|
|
6
|
+
function ChatDivider({ variant, label, pulse = false, className, ...rest }) {
|
|
7
7
|
return /* @__PURE__ */ jsx(
|
|
8
8
|
"div",
|
|
9
9
|
{
|
|
@@ -11,7 +11,12 @@ function ChatDivider({ variant, label, className, ...rest }) {
|
|
|
11
11
|
role: "separator",
|
|
12
12
|
"aria-label": label,
|
|
13
13
|
"data-divider": variant,
|
|
14
|
-
className: cx(
|
|
14
|
+
className: cx(
|
|
15
|
+
"crewlet-chat-divider",
|
|
16
|
+
`crewlet-chat-divider--${variant}`,
|
|
17
|
+
pulse && variant === "unread" && "is-pulsing",
|
|
18
|
+
className
|
|
19
|
+
),
|
|
15
20
|
children: /* @__PURE__ */ jsx("span", { className: "crewlet-chat-divider__label", "aria-hidden": "true", children: label })
|
|
16
21
|
}
|
|
17
22
|
);
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { Modal } from './chunk-A2TYEOB4.js';
|
|
2
2
|
import { Callout } from './chunk-BPCY7ZID.js';
|
|
3
|
-
import { SegmentedControl } from './chunk-
|
|
4
|
-
import { FormField, Input } from './chunk-
|
|
3
|
+
import { SegmentedControl } from './chunk-YD5UCBFV.js';
|
|
4
|
+
import { FormField, Input } from './chunk-TE3OMB3Z.js';
|
|
5
5
|
import { Button } from './chunk-NPPPQSRU.js';
|
|
6
6
|
import { useState } from 'react';
|
|
7
7
|
import { ClockGlyph } from '@crewlethq/icons/glyphs';
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import { SegmentedControl } from './chunk-
|
|
1
|
+
import { SegmentedControl } from './chunk-YD5UCBFV.js';
|
|
2
2
|
import { ArtifactIcon } from './chunk-AVL52EME.js';
|
|
3
|
-
import { Menu } from './chunk-
|
|
3
|
+
import { Menu } from './chunk-QHUKJN33.js';
|
|
4
4
|
import { isApplePlatform, Kbd, ariaKeyshortcuts } from './chunk-VBBLHS2Y.js';
|
|
5
5
|
import { Button } from './chunk-NPPPQSRU.js';
|
|
6
6
|
import { IconButton } from './chunk-BF2BXM6V.js';
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { useRoving, tabStop } from './chunk-EGMQURBR.js';
|
|
2
2
|
import { StatusDot } from './chunk-QRE6JCHS.js';
|
|
3
|
-
import { Menu } from './chunk-
|
|
3
|
+
import { Menu } from './chunk-QHUKJN33.js';
|
|
4
4
|
import { HIT_AREA_CLASS } from './chunk-2YTOOH3A.js';
|
|
5
5
|
import { Count } from './chunk-Y5CMDLQM.js';
|
|
6
6
|
import { VisuallyHidden } from './chunk-RRRK2KB6.js';
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import { SECRET_INPUT_PROPS } from './chunk-NICEDVZM.js';
|
|
2
2
|
import { useFieldError, FormFieldInvalidContext } from './chunk-JLKO7PSK.js';
|
|
3
|
+
import { copyTextStyles } from './chunk-PJV5HVZY.js';
|
|
3
4
|
import { characterCountState, CharacterCount } from './chunk-TEXK4RK6.js';
|
|
4
5
|
import { IconButton } from './chunk-BF2BXM6V.js';
|
|
5
6
|
import { isComposing } from './chunk-EDPMHSLZ.js';
|
|
@@ -95,33 +96,6 @@ var LINE_BREAKS = /[ \t]*(?:\r\n|[\r\n\v\f\u0085\u2028\u2029])+[ \t]*/g;
|
|
|
95
96
|
function foldLineBreaks(text) {
|
|
96
97
|
return text.replace(LINE_BREAKS, " ");
|
|
97
98
|
}
|
|
98
|
-
var MIRRORED = [
|
|
99
|
-
"boxSizing",
|
|
100
|
-
"width",
|
|
101
|
-
"paddingTop",
|
|
102
|
-
"paddingRight",
|
|
103
|
-
"paddingBottom",
|
|
104
|
-
"paddingLeft",
|
|
105
|
-
"borderTopWidth",
|
|
106
|
-
"borderRightWidth",
|
|
107
|
-
"borderBottomWidth",
|
|
108
|
-
"borderLeftWidth",
|
|
109
|
-
"borderStyle",
|
|
110
|
-
"fontFamily",
|
|
111
|
-
"fontSize",
|
|
112
|
-
"fontStyle",
|
|
113
|
-
"fontVariant",
|
|
114
|
-
"fontWeight",
|
|
115
|
-
"letterSpacing",
|
|
116
|
-
"lineHeight",
|
|
117
|
-
"tabSize",
|
|
118
|
-
"textIndent",
|
|
119
|
-
"textTransform",
|
|
120
|
-
"whiteSpace",
|
|
121
|
-
"wordBreak",
|
|
122
|
-
"wordSpacing",
|
|
123
|
-
"overflowWrap"
|
|
124
|
-
];
|
|
125
99
|
var mirrors = /* @__PURE__ */ new WeakMap();
|
|
126
100
|
function mirrorIn(doc) {
|
|
127
101
|
let mirror = mirrors.get(doc);
|
|
@@ -151,7 +125,7 @@ function contentHeight(el) {
|
|
|
151
125
|
const style = getComputedStyle(el);
|
|
152
126
|
if (!style.width.endsWith("px")) return null;
|
|
153
127
|
const mirror = mirrorIn(el.ownerDocument);
|
|
154
|
-
|
|
128
|
+
copyTextStyles(style, mirror);
|
|
155
129
|
mirror.rows = el.rows;
|
|
156
130
|
mirror.placeholder = el.placeholder;
|
|
157
131
|
mirror.value = el.value;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { ContrastLevelTag } from './chunk-3YOLD7WG.js';
|
|
2
|
-
import { Popover } from './chunk-
|
|
2
|
+
import { Popover } from './chunk-KDRJZWE3.js';
|
|
3
3
|
import { IconButton } from './chunk-BF2BXM6V.js';
|
|
4
4
|
import { cx } from './chunk-ODEQTPFM.js';
|
|
5
5
|
import './ContrastHelp-MZCAW5WQ.css';
|
|
@@ -2,8 +2,8 @@ import { Modal } from './chunk-A2TYEOB4.js';
|
|
|
2
2
|
import { useClipboard } from './chunk-STJ7QBC3.js';
|
|
3
3
|
import { EmptyValue } from './chunk-WGLOH33S.js';
|
|
4
4
|
import { useCardHeaderSlot } from './chunk-AV2DXAEL.js';
|
|
5
|
-
import { Checkbox } from './chunk-
|
|
6
|
-
import { Menu } from './chunk-
|
|
5
|
+
import { Checkbox } from './chunk-DTEDUAEW.js';
|
|
6
|
+
import { Menu } from './chunk-QHUKJN33.js';
|
|
7
7
|
import { Button } from './chunk-NPPPQSRU.js';
|
|
8
8
|
import { IconButton } from './chunk-BF2BXM6V.js';
|
|
9
9
|
import { VisuallyHidden } from './chunk-RRRK2KB6.js';
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { today, CalendarGrid, shiftMonth, compareDays } from './chunk-EE3DJMSQ.js';
|
|
2
|
-
import { Popover } from './chunk-
|
|
2
|
+
import { Popover } from './chunk-KDRJZWE3.js';
|
|
3
3
|
import { Button } from './chunk-NPPPQSRU.js';
|
|
4
4
|
import { IconButton } from './chunk-BF2BXM6V.js';
|
|
5
5
|
import { useFocusModality } from './chunk-4ITETIGZ.js';
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { Modal } from './chunk-A2TYEOB4.js';
|
|
2
2
|
import { useListbox, useHighlightRest } from './chunk-KW7T23RT.js';
|
|
3
|
-
import { Input } from './chunk-
|
|
3
|
+
import { Input } from './chunk-TE3OMB3Z.js';
|
|
4
4
|
import { Kbd } from './chunk-VBBLHS2Y.js';
|
|
5
5
|
import { HIT_AREA_CLASS } from './chunk-2YTOOH3A.js';
|
|
6
6
|
import { isComposing } from './chunk-EDPMHSLZ.js';
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { Skeleton } from './chunk-BMTNY3FK.js';
|
|
2
2
|
import { titleWhenCut, titleIfCut } from './chunk-WSIJDWUG.js';
|
|
3
3
|
import { useReorder } from './chunk-JMBPMSNI.js';
|
|
4
|
-
import { Checkbox } from './chunk-
|
|
4
|
+
import { Checkbox } from './chunk-DTEDUAEW.js';
|
|
5
5
|
import { useMediaMatch } from './chunk-COS6LJ4K.js';
|
|
6
6
|
import { EmptyState } from './chunk-PPUR46MK.js';
|
|
7
7
|
import { Button } from './chunk-NPPPQSRU.js';
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { Select } from './chunk-JUZOMYOZ.js';
|
|
2
2
|
import { today, shiftMonth, CalendarGrid, compareDays } from './chunk-EE3DJMSQ.js';
|
|
3
|
-
import { Popover } from './chunk-
|
|
4
|
-
import { Input } from './chunk-
|
|
3
|
+
import { Popover } from './chunk-KDRJZWE3.js';
|
|
4
|
+
import { Input } from './chunk-TE3OMB3Z.js';
|
|
5
5
|
import { Button } from './chunk-NPPPQSRU.js';
|
|
6
6
|
import { IconButton } from './chunk-BF2BXM6V.js';
|
|
7
7
|
import { isComposing } from './chunk-EDPMHSLZ.js';
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { PrincipalAvatar } from './chunk-HF5L56YQ.js';
|
|
2
2
|
import { toInstant, RelativeTime, formatExact, toISO } from './chunk-GBKBME7Q.js';
|
|
3
3
|
import { Document } from './chunk-I4PBFJGX.js';
|
|
4
|
-
import { Composer } from './chunk-
|
|
4
|
+
import { Composer } from './chunk-KVNVLBCB.js';
|
|
5
5
|
import { Button } from './chunk-NPPPQSRU.js';
|
|
6
6
|
import { IconButton } from './chunk-BF2BXM6V.js';
|
|
7
7
|
import { Count } from './chunk-Y5CMDLQM.js';
|
|
@@ -1,9 +1,14 @@
|
|
|
1
1
|
import { Button } from './chunk-NPPPQSRU.js';
|
|
2
|
+
import { Tooltip } from './chunk-HXVMXH6U.js';
|
|
2
3
|
import { cx } from './chunk-ODEQTPFM.js';
|
|
3
4
|
import { forwardRef, useState, useCallback } from 'react';
|
|
4
5
|
import { jsxs, jsx, Fragment } from 'react/jsx-runtime';
|
|
5
6
|
|
|
6
7
|
var CHAT_MESSAGE_CLASS = "crewlet-chat-message";
|
|
8
|
+
function landOn(row) {
|
|
9
|
+
row.scrollIntoView?.({ block: "nearest" });
|
|
10
|
+
row.focus({ preventScroll: true });
|
|
11
|
+
}
|
|
7
12
|
function scrollerOf(element) {
|
|
8
13
|
for (let node = element.parentElement; node; node = node.parentElement) {
|
|
9
14
|
const { overflowY } = getComputedStyle(node);
|
|
@@ -55,15 +60,21 @@ var ChatMessage = forwardRef(function ChatMessage2({
|
|
|
55
60
|
function keys(event) {
|
|
56
61
|
onKeyDown?.(event);
|
|
57
62
|
if (event.defaultPrevented || event.target !== event.currentTarget) return;
|
|
58
|
-
if (event.
|
|
63
|
+
if (event.altKey || event.ctrlKey || event.metaKey || event.shiftKey) return;
|
|
59
64
|
const row = event.currentTarget;
|
|
60
65
|
const within = row.closest('[role="log"]') ?? row.parentElement;
|
|
61
66
|
if (!within) return;
|
|
62
67
|
const rows = [...within.querySelectorAll(`.${CHAT_MESSAGE_CLASS}`)];
|
|
63
|
-
const
|
|
68
|
+
const at = rows.indexOf(row);
|
|
69
|
+
let next;
|
|
70
|
+
if (event.key === "ArrowUp") next = rows[at - 1];
|
|
71
|
+
else if (event.key === "ArrowDown") next = rows[at + 1];
|
|
72
|
+
else if (event.key === "Home") next = rows[0];
|
|
73
|
+
else if (event.key === "End") next = rows.at(-1);
|
|
74
|
+
else return;
|
|
64
75
|
if (!next) return;
|
|
65
76
|
event.preventDefault();
|
|
66
|
-
next
|
|
77
|
+
landOn(next);
|
|
67
78
|
}
|
|
68
79
|
return (
|
|
69
80
|
// A row is an article a reader can land on (a tap, a jump, the arrows)
|
|
@@ -99,12 +110,12 @@ var ChatMessage = forwardRef(function ChatMessage2({
|
|
|
99
110
|
onFocus?.(event);
|
|
100
111
|
},
|
|
101
112
|
children: [
|
|
102
|
-
/* @__PURE__ */ jsx("div", { className: "crewlet-chat-message__gutter", children: continuation ? /* @__PURE__ */ jsx(
|
|
113
|
+
/* @__PURE__ */ jsx("div", { className: "crewlet-chat-message__gutter", children: continuation ? /* @__PURE__ */ jsx(MessageTime, { className: "crewlet-chat-message__gutter-time", dateTime, full: timeTitle, children: gutterTime ?? time }) : avatar }),
|
|
103
114
|
/* @__PURE__ */ jsxs("div", { className: "crewlet-chat-message__main", children: [
|
|
104
115
|
continuation ? null : /* @__PURE__ */ jsxs("div", { className: "crewlet-chat-message__head", children: [
|
|
105
116
|
/* @__PURE__ */ jsx("span", { className: "crewlet-chat-message__author", children: author }),
|
|
106
117
|
badges,
|
|
107
|
-
/* @__PURE__ */ jsx(
|
|
118
|
+
/* @__PURE__ */ jsx(MessageTime, { className: "crewlet-chat-message__time", dateTime, full: timeTitle, children: time })
|
|
108
119
|
] }),
|
|
109
120
|
/* @__PURE__ */ jsx("div", { className: "crewlet-chat-message__body", children }),
|
|
110
121
|
footer ? /* @__PURE__ */ jsx("div", { className: "crewlet-chat-message__footer", children: footer }) : null
|
|
@@ -115,6 +126,9 @@ var ChatMessage = forwardRef(function ChatMessage2({
|
|
|
115
126
|
)
|
|
116
127
|
);
|
|
117
128
|
});
|
|
129
|
+
function MessageTime({ className, dateTime, full, children }) {
|
|
130
|
+
return /* @__PURE__ */ jsx(Tooltip, { content: full, children: /* @__PURE__ */ jsx("time", { className, dateTime, tabIndex: 0, children }) });
|
|
131
|
+
}
|
|
118
132
|
var CHAT_MESSAGE_FAILURE_LABELS = {
|
|
119
133
|
notSent: "Not sent.",
|
|
120
134
|
retry: "Retry",
|
|
@@ -1,11 +1,12 @@
|
|
|
1
1
|
import { Tag } from './chunk-SJ3EUCFD.js';
|
|
2
|
-
import { AvatarStack } from './chunk-
|
|
2
|
+
import { AvatarStack } from './chunk-5SMYKL3D.js';
|
|
3
3
|
import { cx } from './chunk-ODEQTPFM.js';
|
|
4
4
|
import './ChatScale-6NM4TP7R.css';
|
|
5
|
-
import './ThreadSummary-
|
|
5
|
+
import './ThreadSummary-2AFEU6NH.css';
|
|
6
6
|
import { ChevronRightGlyph } from '@crewlethq/icons/glyphs';
|
|
7
7
|
import { jsxs, jsx } from 'react/jsx-runtime';
|
|
8
8
|
|
|
9
|
+
var THREAD_SUMMARY_FACE = 24;
|
|
9
10
|
var THREAD_SUMMARY_LABELS = {
|
|
10
11
|
replies: (count) => count === 1 ? "1 reply" : `${count.toLocaleString()} replies`,
|
|
11
12
|
fresh: (count) => `${count.toLocaleString()} new`,
|
|
@@ -38,7 +39,7 @@ function ThreadSummary({
|
|
|
38
39
|
"aria-expanded": open,
|
|
39
40
|
onClick: onOpen,
|
|
40
41
|
children: [
|
|
41
|
-
/* @__PURE__ */ jsx(AvatarStack, { members: participants, size:
|
|
42
|
+
/* @__PURE__ */ jsx(AvatarStack, { members: participants, size: THREAD_SUMMARY_FACE, max: 3, spread: true, decorative: true }),
|
|
42
43
|
/* @__PURE__ */ jsx("span", { className: "crewlet-thread-summary__count", children: count }),
|
|
43
44
|
fresh ? /* @__PURE__ */ jsx(Tag, { size: "xs", variant: "brand", children: fresh }) : null,
|
|
44
45
|
/* @__PURE__ */ jsx("span", { className: "crewlet-thread-summary__last", "aria-hidden": "true", children: when }),
|
|
@@ -53,4 +54,4 @@ function ThreadSummary({
|
|
|
53
54
|
] });
|
|
54
55
|
}
|
|
55
56
|
|
|
56
|
-
export { THREAD_SUMMARY_LABELS, ThreadSummary };
|
|
57
|
+
export { THREAD_SUMMARY_FACE, THREAD_SUMMARY_LABELS, ThreadSummary };
|