@crewlethq/ui 0.111.0 → 0.113.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +1 -1
- package/dist/ActivityLine/ActivityLine.d.ts +16 -22
- package/dist/ActivityLine/index.js +4 -2
- package/dist/ActivityLine-TIMSOQGU.css +32 -0
- 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 +6 -5
- package/dist/Avatar/AvatarStack.d.ts +9 -3
- package/dist/Avatar/index.js +1 -1
- package/dist/AvatarPicker/index.js +8 -8
- package/dist/{AvatarStack-EQZZJZ3V.css → AvatarStack-GNEJHEU6.css} +20 -0
- package/dist/CharacterPicker/index.js +2 -2
- 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 +6 -5
- 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-XT73VTSJ.js} +3 -2
- 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 +8 -7
- 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 +2 -2
- package/dist/SheetColumnEditor/index.js +8 -7
- package/dist/SheetGrid/index.js +5 -5
- package/dist/SlideFilmstrip/index.js +2 -2
- package/dist/Switcher/index.js +4 -3
- package/dist/TableCells/index.js +2 -2
- package/dist/Tabs/index.js +2 -2
- package/dist/ThemeSwitcher/index.js +4 -4
- package/dist/ThreadSummary/ThreadSummary.d.ts +3 -1
- package/dist/ThreadSummary/index.d.ts +1 -1
- package/dist/ThreadSummary/index.js +3 -3
- 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/WorkingLine/BouncingDots.d.ts +8 -0
- package/dist/WorkingLine/WorkingLine.d.ts +97 -0
- package/dist/WorkingLine/index.d.ts +5 -0
- package/dist/WorkingLine/index.js +5 -0
- package/dist/WorkingLine-NUFSSAOL.css +332 -0
- package/dist/{chunk-S4AQ7HAA.js → chunk-2NUQBD3O.js} +3 -3
- package/dist/{chunk-GMBXRSC5.js → chunk-32QH3CAO.js} +3 -3
- package/dist/{chunk-QEGOVWYP.js → chunk-3UFIYOVD.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-NQKHOLC7.js → chunk-6S2Q4DGN.js} +1 -1
- package/dist/{chunk-LTNWLZLG.js → chunk-76LJUPDA.js} +2 -2
- package/dist/{chunk-ECTHM76P.js → chunk-7TLM7E5N.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-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-RNIPNSCH.js +158 -0
- 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-2DXZ2ZJR.js → chunk-TEOJ7OKD.js} +2 -2
- 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-ZLCPU4HW.js +17 -0
- package/dist/{chunk-EXYO45GN.js → chunk-ZUFV7753.js} +5 -4
- package/dist/generated/index.d.ts +1 -0
- package/dist/generated/index.js +76 -74
- package/dist/index.js +76 -74
- package/dist/styles.css +552 -71
- package/dist/utils/fieldMirror.d.ts +22 -0
- package/package.json +3 -3
- package/dist/ActivityLine-AMSERTOB.css +0 -74
- package/dist/EmojiPicker-W722WJ5M.css +0 -105
- package/dist/chunk-3KLVK655.js +0 -2
- package/dist/chunk-5YFQMMTJ.js +0 -29
- package/dist/chunk-VZ7DNXCW.js +0 -58
- package/dist/{chunk-LNQSNXGJ.js → chunk-S4JRQJEP.js} +1 -1
- /package/dist/{chunk-2DYEPDT7.js → chunk-XDBCWSM5.js} +0 -0
|
@@ -0,0 +1,158 @@
|
|
|
1
|
+
import { AvatarStack } from './chunk-5SMYKL3D.js';
|
|
2
|
+
import { Avatar } from './chunk-XZY6S3UC.js';
|
|
3
|
+
import { VisuallyHidden } from './chunk-RRRK2KB6.js';
|
|
4
|
+
import { cx } from './chunk-ODEQTPFM.js';
|
|
5
|
+
import './ChatScale-6NM4TP7R.css';
|
|
6
|
+
import './WorkingLine-NUFSSAOL.css';
|
|
7
|
+
import { useState, useId } from 'react';
|
|
8
|
+
import { ChevronDownGlyph } from '@crewlethq/icons/glyphs';
|
|
9
|
+
import { jsxs, jsx, Fragment } from 'react/jsx-runtime';
|
|
10
|
+
|
|
11
|
+
function BouncingDots({ className }) {
|
|
12
|
+
return /* @__PURE__ */ jsxs("span", { className: cx("crewlet-bouncing-dots", className), "aria-hidden": "true", children: [
|
|
13
|
+
/* @__PURE__ */ jsx("i", {}),
|
|
14
|
+
/* @__PURE__ */ jsx("i", {}),
|
|
15
|
+
/* @__PURE__ */ jsx("i", {})
|
|
16
|
+
] });
|
|
17
|
+
}
|
|
18
|
+
var WORKING_LINE_LABELS = {
|
|
19
|
+
working: "are working",
|
|
20
|
+
queued: "are queued",
|
|
21
|
+
workingOne: "is working",
|
|
22
|
+
queuedOne: "is queued",
|
|
23
|
+
others: (count) => `and ${count} ${count === 1 ? "other" : "others"}`,
|
|
24
|
+
series: (names) => names.join(", "),
|
|
25
|
+
queuedCount: (count) => `${count} queued`,
|
|
26
|
+
list: (names) => names.length < 2 ? names.join("") : `${names.slice(0, -1).join(", ")} and ${names[names.length - 1]}`,
|
|
27
|
+
detail: "Each agent at work"
|
|
28
|
+
};
|
|
29
|
+
function phrase(status) {
|
|
30
|
+
return (status ?? "").trim().replace(/(?:\.{3}|…)$/u, "").trimEnd();
|
|
31
|
+
}
|
|
32
|
+
function agentPhrase(agent, labels) {
|
|
33
|
+
return phrase(agent.status) || (agent.queued ? labels.queuedOne : labels.workingOne);
|
|
34
|
+
}
|
|
35
|
+
function workingSentence(agents, overrides) {
|
|
36
|
+
const labels = overrides ? { ...WORKING_LINE_LABELS, ...overrides } : WORKING_LINE_LABELS;
|
|
37
|
+
const active = agents.filter((agent) => !agent.queued);
|
|
38
|
+
const waiting = agents.filter((agent) => agent.queued);
|
|
39
|
+
const lead = active.length > 0 ? active : waiting;
|
|
40
|
+
const counted = lead.length > 2;
|
|
41
|
+
const names = counted ? labels.series(lead.slice(0, 2).map((agent) => agent.name)) : labels.list(lead.map((agent) => agent.name));
|
|
42
|
+
const others = counted ? labels.others(lead.length - 2) : "";
|
|
43
|
+
const verb = lead.length === 1 ? agentPhrase(lead[0], labels) : active.length > 0 ? labels.working : labels.queued;
|
|
44
|
+
const queued = active.length > 0 && waiting.length > 0 ? labels.queuedCount(waiting.length) : "";
|
|
45
|
+
return { names, others, verb, queued, everyone: !counted && queued === "", waiting: active.length === 0 };
|
|
46
|
+
}
|
|
47
|
+
function workingAnnouncement(agents, overrides) {
|
|
48
|
+
const labels = overrides ? { ...WORKING_LINE_LABELS, ...overrides } : WORKING_LINE_LABELS;
|
|
49
|
+
const said = (group, one, many) => group.length === 0 ? "" : `${labels.list(group.map((agent) => agent.name))} ${group.length === 1 ? one : many}.`;
|
|
50
|
+
return [
|
|
51
|
+
said(
|
|
52
|
+
agents.filter((agent) => !agent.queued),
|
|
53
|
+
labels.workingOne,
|
|
54
|
+
labels.working
|
|
55
|
+
),
|
|
56
|
+
said(
|
|
57
|
+
agents.filter((agent) => agent.queued),
|
|
58
|
+
labels.queuedOne,
|
|
59
|
+
labels.queued
|
|
60
|
+
)
|
|
61
|
+
].filter(Boolean).join(" ");
|
|
62
|
+
}
|
|
63
|
+
function WorkingLine({
|
|
64
|
+
agents,
|
|
65
|
+
max = 3,
|
|
66
|
+
announce = true,
|
|
67
|
+
defaultExpanded = false,
|
|
68
|
+
labels: overrides,
|
|
69
|
+
className,
|
|
70
|
+
...rest
|
|
71
|
+
}) {
|
|
72
|
+
const labels = overrides ? { ...WORKING_LINE_LABELS, ...overrides } : WORKING_LINE_LABELS;
|
|
73
|
+
const [open, setOpen] = useState(defaultExpanded);
|
|
74
|
+
const detailID = useId();
|
|
75
|
+
const ordered = [...agents.filter((agent) => !agent.queued), ...agents.filter((agent) => agent.queued)];
|
|
76
|
+
const sentence = workingSentence(ordered, labels);
|
|
77
|
+
const expandable = ordered.length > 1;
|
|
78
|
+
const expanded = expandable && open;
|
|
79
|
+
return /* @__PURE__ */ jsxs(
|
|
80
|
+
"div",
|
|
81
|
+
{
|
|
82
|
+
...rest,
|
|
83
|
+
className: cx(
|
|
84
|
+
"crewlet-working-line",
|
|
85
|
+
ordered.length === 0 && "is-idle",
|
|
86
|
+
sentence.waiting && "is-queued",
|
|
87
|
+
expanded && "is-open",
|
|
88
|
+
className
|
|
89
|
+
),
|
|
90
|
+
children: [
|
|
91
|
+
announce ? /* @__PURE__ */ jsx(VisuallyHidden, { children: /* @__PURE__ */ jsx("span", { role: "status", children: workingAnnouncement(ordered, labels) }) }) : null,
|
|
92
|
+
ordered.length === 0 ? null : /* @__PURE__ */ jsxs("div", { className: "crewlet-working-line__summary", children: [
|
|
93
|
+
/* @__PURE__ */ jsx(
|
|
94
|
+
AvatarStack,
|
|
95
|
+
{
|
|
96
|
+
className: "crewlet-working-line__faces",
|
|
97
|
+
members: ordered,
|
|
98
|
+
max,
|
|
99
|
+
size: "xs",
|
|
100
|
+
decorative: sentence.everyone,
|
|
101
|
+
label: labels.list(ordered.map((agent) => agent.name))
|
|
102
|
+
}
|
|
103
|
+
),
|
|
104
|
+
/* @__PURE__ */ jsxs("span", { className: "crewlet-working-line__text", children: [
|
|
105
|
+
/* @__PURE__ */ jsxs("span", { className: "crewlet-working-line__who", children: [
|
|
106
|
+
/* @__PURE__ */ jsx("span", { className: "crewlet-working-line__names", children: sentence.names }),
|
|
107
|
+
sentence.others ? /* @__PURE__ */ jsxs(Fragment, { children: [
|
|
108
|
+
" ",
|
|
109
|
+
/* @__PURE__ */ jsx("span", { className: "crewlet-working-line__others", children: sentence.others })
|
|
110
|
+
] }) : null
|
|
111
|
+
] }),
|
|
112
|
+
" ",
|
|
113
|
+
/* @__PURE__ */ jsx("span", { className: "crewlet-working-line__verb", children: sentence.verb }, sentence.verb),
|
|
114
|
+
sentence.waiting ? null : /* @__PURE__ */ jsx(BouncingDots, { className: "crewlet-working-line__dots" }),
|
|
115
|
+
sentence.queued ? /* @__PURE__ */ jsxs(Fragment, { children: [
|
|
116
|
+
" ",
|
|
117
|
+
/* @__PURE__ */ jsx("span", { className: "crewlet-working-line__queued", children: sentence.queued })
|
|
118
|
+
] }) : null
|
|
119
|
+
] }),
|
|
120
|
+
expandable ? /* @__PURE__ */ jsx(
|
|
121
|
+
"button",
|
|
122
|
+
{
|
|
123
|
+
type: "button",
|
|
124
|
+
className: "crewlet-working-line__toggle",
|
|
125
|
+
"aria-label": labels.detail,
|
|
126
|
+
"aria-expanded": expanded,
|
|
127
|
+
"aria-controls": detailID,
|
|
128
|
+
onClick: () => setOpen((was) => !was),
|
|
129
|
+
children: /* @__PURE__ */ jsx(ChevronDownGlyph, { size: "sm", className: "crewlet-working-line__chevron" })
|
|
130
|
+
}
|
|
131
|
+
) : null
|
|
132
|
+
] }),
|
|
133
|
+
expanded ? /* @__PURE__ */ jsx("ul", { id: detailID, className: "crewlet-working-line__detail", "aria-label": labels.detail, children: ordered.map((agent) => {
|
|
134
|
+
const words = agentPhrase(agent, labels);
|
|
135
|
+
return /* @__PURE__ */ jsxs("li", { className: cx("crewlet-working-line__agent", agent.queued && "is-queued"), children: [
|
|
136
|
+
/* @__PURE__ */ jsx(
|
|
137
|
+
Avatar,
|
|
138
|
+
{
|
|
139
|
+
name: agent.name,
|
|
140
|
+
kind: agent.kind,
|
|
141
|
+
src: agent.src,
|
|
142
|
+
character: agent.character,
|
|
143
|
+
hue: agent.hue,
|
|
144
|
+
size: "xs",
|
|
145
|
+
decorative: true
|
|
146
|
+
}
|
|
147
|
+
),
|
|
148
|
+
/* @__PURE__ */ jsx("span", { className: "crewlet-working-line__agent-name", children: agent.name }),
|
|
149
|
+
" ",
|
|
150
|
+
/* @__PURE__ */ jsx("span", { className: "crewlet-working-line__agent-phrase", children: words }, words)
|
|
151
|
+
] }, agent.id ?? agent.name);
|
|
152
|
+
}) }) : null
|
|
153
|
+
]
|
|
154
|
+
}
|
|
155
|
+
);
|
|
156
|
+
}
|
|
157
|
+
|
|
158
|
+
export { BouncingDots, WORKING_LINE_LABELS, WorkingLine, workingAnnouncement, workingSentence };
|
|
@@ -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;
|
|
@@ -2,11 +2,11 @@ import { Skeleton } from './chunk-BMTNY3FK.js';
|
|
|
2
2
|
import { PrincipalAvatar } from './chunk-HF5L56YQ.js';
|
|
3
3
|
import { RelativeTime } from './chunk-GBKBME7Q.js';
|
|
4
4
|
import { Card } from './chunk-3C3TSWRR.js';
|
|
5
|
-
import { AvatarStack } from './chunk-WUCRLA25.js';
|
|
6
5
|
import { ArtifactKindGround } from './chunk-W3A6NBUM.js';
|
|
7
|
-
import { Checkbox } from './chunk-
|
|
6
|
+
import { Checkbox } from './chunk-DTEDUAEW.js';
|
|
8
7
|
import { ArtifactAccessGlyph } from './chunk-DOY3KC6I.js';
|
|
9
8
|
import { ArtifactKindGlyph } from './chunk-RSKW25Y5.js';
|
|
9
|
+
import { AvatarStack } from './chunk-5SMYKL3D.js';
|
|
10
10
|
import { VisuallyHidden } from './chunk-RRRK2KB6.js';
|
|
11
11
|
import { cx } from './chunk-ODEQTPFM.js';
|
|
12
12
|
import './ArtifactKinds-27TE3KJL.css';
|
|
@@ -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",
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
import { WorkingLine, BouncingDots } from './chunk-RNIPNSCH.js';
|
|
2
|
+
import { cx } from './chunk-ODEQTPFM.js';
|
|
3
|
+
import './ChatScale-6NM4TP7R.css';
|
|
4
|
+
import './ActivityLine-TIMSOQGU.css';
|
|
5
|
+
import { jsxs, jsx, Fragment } from 'react/jsx-runtime';
|
|
6
|
+
|
|
7
|
+
function ActivityLine({ typing, agents, workingLabels, className, ...rest }) {
|
|
8
|
+
return /* @__PURE__ */ jsxs("div", { ...rest, className: cx("crewlet-activity-line", className), children: [
|
|
9
|
+
/* @__PURE__ */ jsx(WorkingLine, { agents: agents ?? [], labels: workingLabels, className: "crewlet-activity-line__working" }),
|
|
10
|
+
/* @__PURE__ */ jsx("span", { className: "crewlet-activity-line__typing", role: "status", children: typing ? /* @__PURE__ */ jsxs(Fragment, { children: [
|
|
11
|
+
typing,
|
|
12
|
+
/* @__PURE__ */ jsx(BouncingDots, {})
|
|
13
|
+
] }) : null })
|
|
14
|
+
] });
|
|
15
|
+
}
|
|
16
|
+
|
|
17
|
+
export { ActivityLine };
|
|
@@ -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 };
|
|
@@ -258,4 +258,5 @@ export * from '../VersionCompare/index.js';
|
|
|
258
258
|
export * from '../VersionTimeline/index.js';
|
|
259
259
|
export * from '../VisuallyHidden/index.js';
|
|
260
260
|
export * from '../WidgetFrame/index.js';
|
|
261
|
+
export * from '../WorkingLine/index.js';
|
|
261
262
|
export * from '../utils/index.js';
|