@nivaro/react 0.2.56 → 0.3.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.
Files changed (59) hide show
  1. package/dist/components/slots/TasksSlot.js +31 -29
  2. package/dist/full.css +1 -1
  3. package/dist/hooks/useSessionRecorder.js +1 -1
  4. package/dist/index.d.ts +73 -1
  5. package/dist/index.js +515 -505
  6. package/dist/shared/components/ItemEditForm.js +666 -658
  7. package/dist/shared/components/MyWorkView.js +47 -37
  8. package/dist/shared/components/ProfileView.js +163 -144
  9. package/dist/shared/components/ai/AiPlanCard.js +427 -0
  10. package/dist/shared/components/ai/AiPlanChanges.js +117 -0
  11. package/dist/shared/components/ai/TaskDo.js +1022 -0
  12. package/dist/shared/components/chat/ChatAnalyticsView.js +19 -17
  13. package/dist/shared/components/chat/ChatPanel.js +1356 -1317
  14. package/dist/shared/components/chat/HuddleAnalyticsTab.js +198 -0
  15. package/dist/shared/components/chat/RoomHeaderMenu.js +78 -65
  16. package/dist/shared/components/chat/chat-core.js +273 -264
  17. package/dist/shared/components/chat/huddle/HuddleAudioUi.js +397 -0
  18. package/dist/shared/components/chat/huddle/HuddleCallBar.js +296 -0
  19. package/dist/shared/components/chat/huddle/HuddleCallLayer.js +180 -0
  20. package/dist/shared/components/chat/huddle/HuddleCamera.js +124 -0
  21. package/dist/shared/components/chat/huddle/HuddleCollab.js +320 -0
  22. package/dist/shared/components/chat/huddle/HuddleControls.js +82 -121
  23. package/dist/shared/components/chat/huddle/HuddleDraw.js +231 -0
  24. package/dist/shared/components/chat/huddle/HuddleLiveBadge.js +52 -0
  25. package/dist/shared/components/chat/huddle/HuddlePeoplePicker.js +143 -0
  26. package/dist/shared/components/chat/huddle/HuddleScheduleCard.js +190 -0
  27. package/dist/shared/components/chat/huddle/HuddleScheduleForm.js +188 -0
  28. package/dist/shared/components/chat/huddle/HuddleStage.js +184 -89
  29. package/dist/shared/components/chat/huddle/HuddleStageTools.js +197 -0
  30. package/dist/shared/components/chat/huddle/huddle-audio-logic.js +156 -0
  31. package/dist/shared/components/chat/huddle/huddle-audio.js +69 -0
  32. package/dist/shared/components/chat/huddle/huddle-calls.js +129 -0
  33. package/dist/shared/components/chat/huddle/huddle-camera.js +143 -0
  34. package/dist/shared/components/chat/huddle/huddle-collab-store.js +391 -0
  35. package/dist/shared/components/chat/huddle/huddle-device-prefs.js +55 -0
  36. package/dist/shared/components/chat/huddle/huddle-devices.js +99 -0
  37. package/dist/shared/components/chat/huddle/huddle-draw.js +226 -0
  38. package/dist/shared/components/chat/huddle/huddle-follow-bus.js +96 -0
  39. package/dist/shared/components/chat/huddle/huddle-hold.js +62 -0
  40. package/dist/shared/components/chat/huddle/huddle-link-quality.js +159 -0
  41. package/dist/shared/components/chat/huddle/huddle-live.js +82 -0
  42. package/dist/shared/components/chat/huddle/huddle-pip.js +343 -0
  43. package/dist/shared/components/chat/huddle/huddle-quality.js +22 -0
  44. package/dist/shared/components/chat/huddle/huddle-reactions.js +71 -0
  45. package/dist/shared/components/chat/huddle/huddle-ring-refused.js +34 -0
  46. package/dist/shared/components/chat/huddle/huddle-schedule.js +102 -0
  47. package/dist/shared/components/chat/huddle/huddle-sfu.js +176 -0
  48. package/dist/shared/components/chat/huddle/huddle-shortcuts.js +91 -0
  49. package/dist/shared/components/chat/huddle/huddle-speaking.js +100 -0
  50. package/dist/shared/components/chat/huddle/huddle-store.js +431 -157
  51. package/dist/shared/components/chat/huddle/useHuddle.js +46 -38
  52. package/dist/shared/components/chat/huddle/useHuddleAudio.js +35 -0
  53. package/dist/shared/components/item-edit/GroupSection.js +1 -0
  54. package/dist/shared/components/item-edit/RecordChatActions.js +68 -59
  55. package/dist/shared/components/item-edit/UserChip.js +145 -142
  56. package/dist/shared/components/panels/TaskPanel.js +51 -49
  57. package/dist/shared/components/support/TicketDetailSheet.js +57 -42
  58. package/dist/shared/lib/notification-sound.js +25 -16
  59. package/package.json +2 -1
@@ -0,0 +1,198 @@
1
+ import { jsxs as r, jsx as e, Fragment as v } from "react/jsx-runtime";
2
+ import { useQuery as y } from "@tanstack/react-query";
3
+ import { RotateCw as w, Headphones as _ } from "lucide-react";
4
+ import { useState as $, useMemo as S } from "react";
5
+ import { useNivaroClient as T } from "../../context.js";
6
+ import { get as C } from "../../lib/commands.js";
7
+ import { cn as c } from "../../lib/utils.js";
8
+ import { Skeleton as H } from "../ui/skeleton.js";
9
+ function m(s) {
10
+ if (s == null) return "—";
11
+ if (s < 1) return "under a minute";
12
+ if (s < 60) return `${Math.round(s * 10) / 10} min`;
13
+ const d = Math.floor(s / 60), n = Math.round(s % 60);
14
+ return n ? `${d} h ${n} min` : `${d} h`;
15
+ }
16
+ function p(s) {
17
+ return s ? (/* @__PURE__ */ new Date(`${s}T12:00:00`)).toLocaleDateString("en-US", { month: "short", day: "numeric" }) : "";
18
+ }
19
+ function o({ label: s, value: d, sub: n }) {
20
+ return /* @__PURE__ */ r("div", { className: "rounded-lg border border-slate-200 bg-white px-4 py-3 dark:border-border dark:bg-card", children: [
21
+ /* @__PURE__ */ e("p", { className: "text-[12px] font-medium text-slate-500 dark:text-slate-400", children: s }),
22
+ /* @__PURE__ */ e("p", { className: "mt-1 text-[20px] font-semibold tabular-nums text-slate-900 dark:text-slate-50", children: d }),
23
+ n && /* @__PURE__ */ e("p", { className: "mt-0.5 text-[11.5px] text-slate-500 dark:text-slate-400", children: n })
24
+ ] });
25
+ }
26
+ function U() {
27
+ var h, u;
28
+ const s = T(), [d, n] = $(30), { data: l, isLoading: x, isError: b, refetch: g, isFetching: f } = y({
29
+ queryKey: ["nvr-huddle-analytics", d],
30
+ queryFn: () => s.request(C("/chat/admin/huddles", { days: d })).then((t) => t.data),
31
+ staleTime: 3e4,
32
+ refetchInterval: 6e4
33
+ }), i = (l == null ? void 0 : l.per_day) ?? [], k = S(() => Math.max(1, ...i.map((t) => t.huddles)), [i]), a = l == null ? void 0 : l.totals;
34
+ return /* @__PURE__ */ r("div", { className: "space-y-4", "data-huddle-analytics": !0, children: [
35
+ /* @__PURE__ */ r("div", { className: "flex flex-wrap items-center gap-2", children: [
36
+ /* @__PURE__ */ e("div", { className: "inline-flex rounded-md border border-slate-200 bg-white p-0.5 dark:border-border dark:bg-card", children: [7, 30, 90].map((t) => /* @__PURE__ */ r(
37
+ "button",
38
+ {
39
+ type: "button",
40
+ onClick: () => n(t),
41
+ "aria-pressed": d === t,
42
+ className: c(
43
+ "rounded px-2.5 py-1 text-[12px] font-medium",
44
+ d === t ? "bg-slate-900 text-white dark:bg-slate-100 dark:text-slate-900" : "text-slate-600 hover:bg-slate-100 dark:text-slate-300 dark:hover:bg-muted"
45
+ ),
46
+ children: [
47
+ t,
48
+ " days"
49
+ ]
50
+ },
51
+ t
52
+ )) }),
53
+ /* @__PURE__ */ r(
54
+ "button",
55
+ {
56
+ type: "button",
57
+ onClick: () => void g(),
58
+ className: "inline-flex items-center gap-1.5 rounded-md border border-slate-200 bg-white px-2.5 py-1 text-[12px] text-slate-600 hover:bg-slate-50 dark:border-border dark:bg-card dark:text-slate-300 dark:hover:bg-muted",
59
+ children: [
60
+ /* @__PURE__ */ e(w, { className: c("h-3.5 w-3.5", f && "animate-spin") }),
61
+ " Refresh"
62
+ ]
63
+ }
64
+ ),
65
+ l && /* @__PURE__ */ r(
66
+ "span",
67
+ {
68
+ className: c(
69
+ "ml-auto inline-flex items-center gap-1.5 text-[12px]",
70
+ l.live.huddles ? "font-medium text-emerald-700 dark:text-emerald-300" : "text-slate-500 dark:text-slate-400"
71
+ ),
72
+ "data-huddle-live-now": l.live.huddles,
73
+ children: [
74
+ /* @__PURE__ */ e(_, { className: "h-3.5 w-3.5" }),
75
+ l.live.huddles ? `${l.live.huddles} live now, ${l.live.people} ${l.live.people === 1 ? "person" : "people"}` : "No huddle running right now"
76
+ ]
77
+ }
78
+ )
79
+ ] }),
80
+ b && /* @__PURE__ */ e("p", { className: "rounded-lg border border-red-200 bg-red-50 px-4 py-3 text-[12.5px] text-red-700 dark:border-red-900/50 dark:bg-red-950/30 dark:text-red-300", children: "Huddle figures could not be loaded. Refresh to try again." }),
81
+ x && /* @__PURE__ */ e("div", { className: "grid grid-cols-2 gap-3 md:grid-cols-3 xl:grid-cols-6", children: Array.from({ length: 6 }).map((t, N) => (
82
+ // biome-ignore lint/suspicious/noArrayIndexKey: static placeholders
83
+ /* @__PURE__ */ e(H, { className: "h-[78px] rounded-lg" }, N)
84
+ )) }),
85
+ l && a && /* @__PURE__ */ r(v, { children: [
86
+ /* @__PURE__ */ r("div", { className: "grid grid-cols-2 gap-3 md:grid-cols-3 xl:grid-cols-6", children: [
87
+ /* @__PURE__ */ e(o, { label: "Huddles", value: String(a.huddles), sub: `${a.people} joins` }),
88
+ /* @__PURE__ */ e(o, { label: "Time talking", value: m(a.minutes) }),
89
+ /* @__PURE__ */ e(o, { label: "Median length", value: m(a.median_minutes) }),
90
+ /* @__PURE__ */ e(
91
+ o,
92
+ {
93
+ label: "Through the relay",
94
+ value: a.turn_pct == null ? "—" : `${a.turn_pct}%`,
95
+ sub: a.turn_pct == null ? "No quality reports yet" : "of call links used TURN"
96
+ }
97
+ ),
98
+ /* @__PURE__ */ e(
99
+ o,
100
+ {
101
+ label: "Connection failures",
102
+ value: String(a.ice_failures),
103
+ sub: a.ice_failures ? `in ${a.ice_failure_sessions} ${a.ice_failure_sessions === 1 ? "huddle" : "huddles"}` : "None reported"
104
+ }
105
+ ),
106
+ /* @__PURE__ */ e(
107
+ o,
108
+ {
109
+ label: "Packet loss",
110
+ value: a.avg_loss_pct == null ? "—" : `${a.avg_loss_pct}%`,
111
+ sub: a.avg_rtt_ms == null ? void 0 : `${a.avg_rtt_ms} ms round trip`
112
+ }
113
+ )
114
+ ] }),
115
+ a.huddles === 0 ? /* @__PURE__ */ r("div", { className: "rounded-lg border border-dashed border-slate-300 px-4 py-10 text-center dark:border-border", children: [
116
+ /* @__PURE__ */ r("p", { className: "text-[13px] font-medium text-slate-700 dark:text-slate-200", children: [
117
+ "No huddles in the last ",
118
+ d,
119
+ " days"
120
+ ] }),
121
+ /* @__PURE__ */ e("p", { className: "mt-1 text-[12px] text-slate-500 dark:text-slate-400", children: "A huddle is recorded when the last person leaves. Start one from a channel or a record's chat." })
122
+ ] }) : /* @__PURE__ */ r("div", { className: "grid gap-4 lg:grid-cols-[minmax(0,3fr)_minmax(0,2fr)]", children: [
123
+ /* @__PURE__ */ r("section", { className: "rounded-lg border border-slate-200 bg-white p-4 dark:border-border dark:bg-card", children: [
124
+ /* @__PURE__ */ e("h3", { className: "mb-3 text-[13px] font-semibold text-slate-800 dark:text-slate-100", children: "Huddles per day" }),
125
+ /* @__PURE__ */ e(
126
+ "div",
127
+ {
128
+ className: "flex h-[120px] items-end gap-[2px]",
129
+ role: "img",
130
+ "aria-label": "Huddles per day",
131
+ children: i.map((t) => /* @__PURE__ */ e(
132
+ "div",
133
+ {
134
+ className: "group flex h-full min-w-0 flex-1 items-end",
135
+ "data-tip": `${(/* @__PURE__ */ new Date(`${t.day}T12:00:00`)).toLocaleDateString("en-US", { month: "short", day: "numeric" })}: ${t.huddles} ${t.huddles === 1 ? "huddle" : "huddles"}, ${t.minutes} min`,
136
+ children: /* @__PURE__ */ e(
137
+ "div",
138
+ {
139
+ className: c(
140
+ "w-full rounded-t-[4px] transition-colors",
141
+ t.huddles ? "bg-nvr-cyan group-hover:bg-nvr-navy dark:group-hover:bg-white" : "bg-transparent"
142
+ ),
143
+ style: { height: t.huddles ? Math.max(3, t.huddles / k * 120) : 0 }
144
+ }
145
+ )
146
+ },
147
+ t.day
148
+ ))
149
+ }
150
+ ),
151
+ /* @__PURE__ */ r("div", { className: "mt-1 flex justify-between border-t border-slate-200 pt-1 text-[10.5px] tabular-nums text-slate-500 dark:border-border dark:text-slate-400", children: [
152
+ /* @__PURE__ */ e("span", { children: p((h = i[0]) == null ? void 0 : h.day) }),
153
+ /* @__PURE__ */ e("span", { children: p((u = i[i.length - 1]) == null ? void 0 : u.day) })
154
+ ] })
155
+ ] }),
156
+ /* @__PURE__ */ r("section", { className: "rounded-lg border border-slate-200 bg-white p-4 dark:border-border dark:bg-card", children: [
157
+ /* @__PURE__ */ r("div", { className: "mb-3 flex items-baseline justify-between gap-3", children: [
158
+ /* @__PURE__ */ e("h3", { className: "text-[13px] font-semibold text-slate-800 dark:text-slate-100", children: "Busiest rooms" }),
159
+ /* @__PURE__ */ e("p", { className: "text-[11px] text-slate-500 dark:text-slate-400", children: "Channels and records" })
160
+ ] }),
161
+ l.busiest_rooms.length === 0 ? /* @__PURE__ */ e("p", { className: "text-[12px] text-slate-500 dark:text-slate-400", children: "Only direct huddles so far; those are counted but never named." }) : /* @__PURE__ */ r("table", { className: "w-full table-fixed text-[12.5px] tabular-nums", children: [
162
+ /* @__PURE__ */ e("thead", { children: /* @__PURE__ */ r("tr", { className: "text-left text-[11px] font-medium text-slate-500 dark:text-slate-400", children: [
163
+ /* @__PURE__ */ e("th", { className: "pb-1 pr-2 font-medium", children: "Room" }),
164
+ /* @__PURE__ */ e("th", { className: "w-[64px] pb-1 pr-2 text-right font-medium", children: "Huddles" }),
165
+ /* @__PURE__ */ e("th", { className: "w-[84px] pb-1 text-right font-medium", children: "Time" })
166
+ ] }) }),
167
+ /* @__PURE__ */ e("tbody", { children: l.busiest_rooms.map((t) => /* @__PURE__ */ r("tr", { className: "border-t border-slate-100 dark:border-border", children: [
168
+ /* @__PURE__ */ e("td", { className: "py-1.5 pr-2", children: /* @__PURE__ */ r("span", { className: "flex min-w-0 items-baseline gap-1.5", children: [
169
+ /* @__PURE__ */ e(
170
+ "span",
171
+ {
172
+ className: "truncate text-slate-800 dark:text-slate-100",
173
+ "data-tip": t.label,
174
+ children: t.label
175
+ }
176
+ ),
177
+ /* @__PURE__ */ e("span", { className: "shrink-0 text-[11px] text-slate-500 dark:text-slate-400", children: t.kind === "record" ? "record" : t.kind === "general" ? "General" : "channel" })
178
+ ] }) }),
179
+ /* @__PURE__ */ e("td", { className: "py-1.5 pr-2 text-right text-slate-600 dark:text-slate-300", children: t.huddles }),
180
+ /* @__PURE__ */ e("td", { className: "py-1.5 text-right text-slate-500 dark:text-slate-400", children: m(t.minutes) })
181
+ ] }, t.room)) })
182
+ ] })
183
+ ] })
184
+ ] }),
185
+ /* @__PURE__ */ r("p", { className: "text-[11.5px] text-slate-500 dark:text-slate-400", children: [
186
+ "Quality figures come from the browsers when people leave (",
187
+ a.quality_reports,
188
+ " report",
189
+ a.quality_reports === 1 ? "" : "s",
190
+ " in this window). Calls under 15 seconds send none. Nothing here records audio, screens or who spoke to whom.",
191
+ l.source === "redis" && " Sessions are held temporarily until the database is updated to keep them long term."
192
+ ] })
193
+ ] })
194
+ ] });
195
+ }
196
+ export {
197
+ U as HuddleAnalyticsTab
198
+ };
@@ -1,14 +1,14 @@
1
1
  import { jsxs as n, jsx as t, Fragment as g } from "react/jsx-runtime";
2
- import { Star as k, BellOff as N, AtSign as w, MoreHorizontal as y, ExternalLink as C, Video as S, CalendarDays as O, Check as M, Settings as R, ArchiveRestore as A, Archive as L, LogOut as W, HelpCircle as T, ChevronLeft as j } from "lucide-react";
3
- import { useState as v } from "react";
4
- import { cn as d } from "../../lib/utils.js";
5
- import { Popover as B, PopoverTrigger as D, PopoverContent as J } from "../ui/popover.js";
6
- import { JumpToDateForm as H } from "./RoomParts.js";
7
- const I = "grid h-7 w-7 shrink-0 place-items-center rounded-md transition-colors", P = "text-slate-400 hover:bg-slate-100 hover:text-slate-600 dark:hover:bg-white/10 dark:hover:text-slate-100";
8
- function q({ starred: e, notify: o }) {
9
- return !e && o === "all" ? null : /* @__PURE__ */ n("span", { className: "flex shrink-0 items-center gap-1", "data-chat-room-status": !0, children: [
2
+ import { Star as f, BellOff as w, AtSign as N, MoreHorizontal as C, ExternalLink as y, Video as S, CalendarClock as O, CalendarDays as M, Check as R, Settings as A, ArchiveRestore as L, Archive as W, LogOut as T, HelpCircle as j, ChevronLeft as B } from "lucide-react";
3
+ import { useState as k } from "react";
4
+ import { cn as h } from "../../lib/utils.js";
5
+ import { Popover as D, PopoverTrigger as J, PopoverContent as H } from "../ui/popover.js";
6
+ import { JumpToDateForm as I } from "./RoomParts.js";
7
+ const P = "grid h-7 w-7 shrink-0 place-items-center rounded-md transition-colors", F = "text-slate-400 hover:bg-slate-100 hover:text-slate-600 dark:hover:bg-white/10 dark:hover:text-slate-100";
8
+ function K({ starred: e, notify: i }) {
9
+ return !e && i === "all" ? null : /* @__PURE__ */ n("span", { className: "flex shrink-0 items-center gap-1", "data-chat-room-status": !0, children: [
10
10
  e && /* @__PURE__ */ t(
11
- k,
11
+ f,
12
12
  {
13
13
  role: "img",
14
14
  "aria-label": "Starred",
@@ -17,8 +17,8 @@ function q({ starred: e, notify: o }) {
17
17
  strokeWidth: 2
18
18
  }
19
19
  ),
20
- o === "muted" && /* @__PURE__ */ t(
21
- N,
20
+ i === "muted" && /* @__PURE__ */ t(
21
+ w,
22
22
  {
23
23
  role: "img",
24
24
  "aria-label": "Muted",
@@ -27,8 +27,8 @@ function q({ starred: e, notify: o }) {
27
27
  strokeWidth: 2
28
28
  }
29
29
  ),
30
- o === "mentions" && /* @__PURE__ */ t(
31
- w,
30
+ i === "mentions" && /* @__PURE__ */ t(
31
+ N,
32
32
  {
33
33
  role: "img",
34
34
  "aria-label": "Mentions only",
@@ -39,52 +39,61 @@ function q({ starred: e, notify: o }) {
39
39
  )
40
40
  ] });
41
41
  }
42
- function K(e) {
43
- const [o, c] = v(!1), [i, s] = v("menu"), h = () => c(!1), l = (a) => () => {
44
- h(), a == null || a();
45
- }, p = !!(e.onOpenRecord || e.onStar || e.onTeamsCall), u = !!(e.onSettings || e.onArchive || e.onLeave);
42
+ function Q(e) {
43
+ const [i, c] = k(!1), [o, r] = k("menu"), d = () => c(!1), s = (a) => () => {
44
+ d(), a == null || a();
45
+ }, p = !!(e.onOpenRecord || e.onStar || e.onTeamsCall), x = !!(e.onSettings || e.onArchive || e.onLeave);
46
46
  return /* @__PURE__ */ n(
47
- B,
47
+ D,
48
48
  {
49
- open: o,
49
+ open: i,
50
50
  onOpenChange: (a) => {
51
- c(a), a || s("menu");
51
+ c(a), a || r("menu");
52
52
  },
53
53
  children: [
54
- /* @__PURE__ */ t(D, { asChild: !0, children: /* @__PURE__ */ t(
54
+ /* @__PURE__ */ t(J, { asChild: !0, children: /* @__PURE__ */ t(
55
55
  "button",
56
56
  {
57
57
  type: "button",
58
- className: d(I, o ? e.th.accentSoft : P),
58
+ className: h(P, i ? e.th.accentSoft : F),
59
59
  "aria-label": "More room actions",
60
60
  "data-tip": "More",
61
61
  "data-chat-room-more": !0,
62
- children: /* @__PURE__ */ t(y, { className: "h-4 w-4", strokeWidth: 2 })
62
+ children: /* @__PURE__ */ t(C, { className: "h-4 w-4", strokeWidth: 2 })
63
63
  }
64
64
  ) }),
65
65
  /* @__PURE__ */ n(
66
- J,
66
+ H,
67
67
  {
68
68
  align: "end",
69
- className: d(
69
+ className: h(
70
70
  "p-1",
71
- i === "tips" ? "w-[420px] max-w-[92vw]" : i === "date" ? "w-[240px]" : "w-[232px]"
71
+ o === "tips" ? "w-[420px] max-w-[92vw]" : o === "date" ? "w-[240px]" : o === "huddle" ? "w-[320px] max-w-[92vw]" : "w-[232px]"
72
72
  ),
73
73
  "data-chat-room-menu": !0,
74
74
  children: [
75
- i === "menu" && /* @__PURE__ */ n("div", { role: "menu", "aria-label": "Room actions", className: "flex flex-col", children: [
76
- e.onOpenRecord && /* @__PURE__ */ t(r, { icon: /* @__PURE__ */ t(C, {}), onClick: l(e.onOpenRecord), data: "open-record", children: "Open the record" }),
75
+ o === "menu" && /* @__PURE__ */ n("div", { role: "menu", "aria-label": "Room actions", className: "flex flex-col", children: [
76
+ e.onOpenRecord && /* @__PURE__ */ t(l, { icon: /* @__PURE__ */ t(y, {}), onClick: s(e.onOpenRecord), data: "open-record", children: "Open the record" }),
77
77
  e.onStar && /* @__PURE__ */ t(
78
- r,
78
+ l,
79
79
  {
80
- icon: /* @__PURE__ */ t(k, { className: d(e.starred && "fill-current text-amber-500") }),
81
- onClick: l(e.onStar),
80
+ icon: /* @__PURE__ */ t(f, { className: h(e.starred && "fill-current text-amber-500") }),
81
+ onClick: s(e.onStar),
82
82
  data: "star",
83
83
  children: e.starred ? "Unstar" : "Star — keep it at the top"
84
84
  }
85
85
  ),
86
- e.onTeamsCall && /* @__PURE__ */ t(r, { icon: /* @__PURE__ */ t(S, {}), onClick: l(e.onTeamsCall), data: "teams-call", children: "Start a Teams call" }),
87
- /* @__PURE__ */ t(r, { icon: /* @__PURE__ */ t(O, {}), onClick: () => s("date"), data: "jump-date", children: "Jump to a date…" }),
86
+ e.onTeamsCall && /* @__PURE__ */ t(l, { icon: /* @__PURE__ */ t(S, {}), onClick: s(e.onTeamsCall), data: "teams-call", children: "Start a Teams call" }),
87
+ e.huddleSchedule && /* @__PURE__ */ t(
88
+ l,
89
+ {
90
+ icon: /* @__PURE__ */ t(O, {}),
91
+ onClick: () => r("huddle"),
92
+ data: "schedule-huddle",
93
+ children: "Schedule a huddle…"
94
+ }
95
+ ),
96
+ /* @__PURE__ */ t(l, { icon: /* @__PURE__ */ t(M, {}), onClick: () => r("date"), data: "jump-date", children: "Jump to a date…" }),
88
97
  e.notify && e.onNotify && /* @__PURE__ */ n(g, { children: [
89
98
  /* @__PURE__ */ t(m, {}),
90
99
  /* @__PURE__ */ t("p", { className: "px-2.5 pb-0.5 pt-1.5 text-[11px] font-medium text-slate-500 dark:text-slate-400", children: "Notify me" }),
@@ -98,51 +107,55 @@ function K(e) {
98
107
  type: "button",
99
108
  role: "menuitemradio",
100
109
  "aria-checked": e.notify === a,
101
- onClick: l(() => {
102
- var x;
103
- return (x = e.onNotify) == null ? void 0 : x.call(e, a);
110
+ onClick: s(() => {
111
+ var v;
112
+ return (v = e.onNotify) == null ? void 0 : v.call(e, a);
104
113
  }),
105
114
  className: "flex h-8 w-full items-center gap-2 rounded-md px-2.5 text-left text-[12.5px] text-slate-700 hover:bg-muted focus-visible:bg-muted focus-visible:outline-none dark:text-slate-200",
106
115
  "data-chat-notify": a,
107
116
  children: [
108
- /* @__PURE__ */ t("span", { className: "w-4 shrink-0", children: e.notify === a && /* @__PURE__ */ t(M, { className: "h-3.5 w-3.5", strokeWidth: 2.25 }) }),
117
+ /* @__PURE__ */ t("span", { className: "w-4 shrink-0", children: e.notify === a && /* @__PURE__ */ t(R, { className: "h-3.5 w-3.5", strokeWidth: 2.25 }) }),
109
118
  b
110
119
  ]
111
120
  },
112
121
  a
113
122
  ))
114
123
  ] }),
115
- u && /* @__PURE__ */ t(m, {}),
116
- e.onSettings && /* @__PURE__ */ t(r, { icon: /* @__PURE__ */ t(R, {}), onClick: l(e.onSettings), data: "settings", children: "Channel settings" }),
124
+ x && /* @__PURE__ */ t(m, {}),
125
+ e.onSettings && /* @__PURE__ */ t(l, { icon: /* @__PURE__ */ t(A, {}), onClick: s(e.onSettings), data: "settings", children: "Channel settings" }),
117
126
  e.onArchive && /* @__PURE__ */ t(
118
- r,
127
+ l,
119
128
  {
120
- icon: e.archived ? /* @__PURE__ */ t(A, {}) : /* @__PURE__ */ t(L, {}),
121
- onClick: l(e.onArchive),
129
+ icon: e.archived ? /* @__PURE__ */ t(L, {}) : /* @__PURE__ */ t(W, {}),
130
+ onClick: s(e.onArchive),
122
131
  data: e.archived ? "unarchive" : "archive",
123
132
  hint: e.archived ? void 0 : "Only for you — others still see it",
124
133
  children: e.archived ? "Unarchive" : "Archive for me"
125
134
  }
126
135
  ),
127
136
  e.onLeave && /* @__PURE__ */ t(
128
- r,
137
+ l,
129
138
  {
130
- icon: /* @__PURE__ */ t(W, {}),
131
- onClick: l(e.onLeave),
139
+ icon: /* @__PURE__ */ t(T, {}),
140
+ onClick: s(e.onLeave),
132
141
  data: "leave",
133
142
  hint: "Open it from the record again to rejoin",
134
143
  children: "Leave this record's chat"
135
144
  }
136
145
  ),
137
- (p || u || e.notify) && /* @__PURE__ */ t(m, {}),
138
- /* @__PURE__ */ t(r, { icon: /* @__PURE__ */ t(T, {}), onClick: () => s("tips"), data: "tips", children: "What this chat can do" })
146
+ (p || x || e.notify) && /* @__PURE__ */ t(m, {}),
147
+ /* @__PURE__ */ t(l, { icon: /* @__PURE__ */ t(j, {}), onClick: () => r("tips"), data: "tips", children: "What this chat can do" })
148
+ ] }),
149
+ o === "date" && /* @__PURE__ */ n("div", { className: "p-1.5", children: [
150
+ /* @__PURE__ */ t(u, { onClick: () => r("menu") }),
151
+ /* @__PURE__ */ t(I, { onJump: e.onJump, onDone: d })
139
152
  ] }),
140
- i === "date" && /* @__PURE__ */ n("div", { className: "p-1.5", children: [
141
- /* @__PURE__ */ t(f, { onClick: () => s("menu") }),
142
- /* @__PURE__ */ t(H, { onJump: e.onJump, onDone: h })
153
+ o === "huddle" && e.huddleSchedule && /* @__PURE__ */ n("div", { className: "p-1.5", children: [
154
+ /* @__PURE__ */ t(u, { onClick: () => r("menu") }),
155
+ e.huddleSchedule(d)
143
156
  ] }),
144
- i === "tips" && /* @__PURE__ */ n("div", { children: [
145
- /* @__PURE__ */ t("div", { className: "px-1.5 pt-1.5", children: /* @__PURE__ */ t(f, { onClick: () => s("menu") }) }),
157
+ o === "tips" && /* @__PURE__ */ n("div", { children: [
158
+ /* @__PURE__ */ t("div", { className: "px-1.5 pt-1.5", children: /* @__PURE__ */ t(u, { onClick: () => r("menu") }) }),
146
159
  e.tips
147
160
  ] })
148
161
  ]
@@ -152,25 +165,25 @@ function K(e) {
152
165
  }
153
166
  );
154
167
  }
155
- function r({
168
+ function l({
156
169
  icon: e,
157
- children: o,
170
+ children: i,
158
171
  hint: c,
159
- onClick: i,
160
- data: s
172
+ onClick: o,
173
+ data: r
161
174
  }) {
162
175
  return /* @__PURE__ */ n(
163
176
  "button",
164
177
  {
165
178
  type: "button",
166
179
  role: "menuitem",
167
- onClick: i,
180
+ onClick: o,
168
181
  className: "flex min-h-8 w-full items-center gap-2 rounded-md px-2.5 py-1.5 text-left text-[12.5px] text-slate-700 hover:bg-muted focus-visible:bg-muted focus-visible:outline-none dark:text-slate-200",
169
- "data-chat-room-action": s,
182
+ "data-chat-room-action": r,
170
183
  children: [
171
184
  /* @__PURE__ */ t("span", { className: "grid w-4 shrink-0 place-items-center text-slate-500 dark:text-slate-400 [&>svg]:h-3.5 [&>svg]:w-3.5", children: e }),
172
185
  /* @__PURE__ */ n("span", { className: "min-w-0", children: [
173
- /* @__PURE__ */ t("span", { className: "block", children: o }),
186
+ /* @__PURE__ */ t("span", { className: "block", children: i }),
174
187
  c && /* @__PURE__ */ t("span", { className: "block text-[11px] leading-snug text-slate-500 dark:text-slate-400", children: c })
175
188
  ] })
176
189
  ]
@@ -180,7 +193,7 @@ function r({
180
193
  function m() {
181
194
  return /* @__PURE__ */ t("hr", { className: "my-1 border-0 border-t border-slate-100 dark:border-border/60" });
182
195
  }
183
- function f({ onClick: e }) {
196
+ function u({ onClick: e }) {
184
197
  return /* @__PURE__ */ n(
185
198
  "button",
186
199
  {
@@ -188,15 +201,15 @@ function f({ onClick: e }) {
188
201
  onClick: e,
189
202
  className: "mb-1.5 flex items-center gap-1 rounded px-1 py-0.5 text-[11.5px] font-medium text-slate-500 hover:text-slate-800 dark:text-slate-400 dark:hover:text-slate-100",
190
203
  children: [
191
- /* @__PURE__ */ t(j, { className: "h-3.5 w-3.5", strokeWidth: 2 }),
204
+ /* @__PURE__ */ t(B, { className: "h-3.5 w-3.5", strokeWidth: 2 }),
192
205
  "Back"
193
206
  ]
194
207
  }
195
208
  );
196
209
  }
197
210
  export {
198
- K as RoomHeaderMenu,
199
- q as RoomStatusMarks,
200
- I as headerIconButton,
201
- P as headerIconIdle
211
+ Q as RoomHeaderMenu,
212
+ K as RoomStatusMarks,
213
+ P as headerIconButton,
214
+ F as headerIconIdle
202
215
  };