@parallelworks/tandem-web 0.192.1 → 0.193.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.
@@ -2,15 +2,15 @@ import { api as e } from "../api/client.js";
2
2
  import { inboxQuery as t, issuesQuery as n, meQuery as r, myTeamsQuery as i, notificationsQuery as a, workspaceQuery as o } from "../api/queries.js";
3
3
  import { AppLauncher as s } from "../components/AppLauncher.js";
4
4
  import { CommandPalette as c } from "../components/CommandPalette.js";
5
- import { EntityIcon as l } from "../components/EntityIcon.js";
6
- import { FavoritesNav as ee } from "../components/FavoritesNav.js";
5
+ import { DocMenuHost as l } from "../components/DocLook.js";
6
+ import { EntityIcon as ee } from "../components/EntityIcon.js";
7
+ import { FavoritesNav as te } from "../components/FavoritesNav.js";
7
8
  import { HostActions as u } from "../components/HostActions.js";
8
9
  import { HostPanel as d } from "../components/HostPanel.js";
9
- import { HoverCards as te } from "../components/HoverCards.js";
10
- import { AddIcon as f, AgentIcon as ne, AreaIcon as re, ChartIcon as ie, ChevronDownIcon as p, CycleIcon as ae, FileTextIcon as oe, InboxIcon as se, LibraryIcon as ce, ListViewIcon as le, NotificationIcon as ue, ProjectIcon as de, SearchIcon as m, TriageIcon as fe, UserIcon as pe } from "../components/icons.js";
10
+ import { HoverCards as f } from "../components/HoverCards.js";
11
+ import { AddIcon as p, AgentIcon as ne, AreaIcon as re, ChartIcon as ie, ChevronDownIcon as m, CycleIcon as ae, FileTextIcon as oe, InboxIcon as se, LibraryIcon as ce, ListViewIcon as le, NotificationIcon as ue, ProjectIcon as de, SearchIcon as h, TriageIcon as fe, UserIcon as pe } from "../components/icons.js";
11
12
  import { Logo as me } from "../components/Logo.js";
12
13
  import { NewIssueDialog as he } from "../components/NewIssueDialog.js";
13
- import { PersonHoverCard as h } from "../components/PersonHoverCard.js";
14
14
  import { SettingsNav as ge } from "../components/SettingsNav.js";
15
15
  import { ShareDialogHost as _e } from "../components/ShareDialog.js";
16
16
  import { ShortcutSheet as ve } from "../components/ShortcutSheet.js";
@@ -20,33 +20,31 @@ import { useHost as xe } from "../lib/host.js";
20
20
  import { HostPanelProvider as Se, useHostPanel as g } from "../lib/hostPanel.js";
21
21
  import { hostSignOut as Ce } from "../lib/hostSignOut.js";
22
22
  import { useInstall as we } from "../lib/install.js";
23
- import { LiveProvider as Te, useLive as _ } from "../lib/live.js";
23
+ import { LiveProvider as Te } from "../lib/live.js";
24
24
  import { copyItem as Ee, useLinkItems as De } from "../lib/menus.js";
25
25
  import { NewIssueContext as Oe } from "../lib/newIssue.js";
26
26
  import { usePushSync as ke } from "../lib/notifications.js";
27
27
  import { PaletteSelectionContext as Ae } from "../lib/palette.js";
28
- import { usePeople as v } from "../lib/people.js";
29
28
  import { isBuiltIn as je, useCan as Me } from "../lib/roles.js";
30
29
  import { useLocation as Ne, useNavigate as Pe } from "../lib/router.js";
31
30
  import { useShortcuts as Fe } from "../lib/shortcuts.js";
32
- import { teamPageOf as y, teamPath as Ie } from "../lib/teamPaths.js";
31
+ import { teamPageOf as _, teamPath as Ie } from "../lib/teamPaths.js";
33
32
  import { Route as Le } from "./_workspace.js";
34
- import { ActionMenu as Re, Avatar as ze, AvatarGroup as b, Combobox as Be, CountBadge as x, IconButton as S, Kbd as Ve, PageHeaderBar as He, PageHeaderProvider as Ue, Tooltip as C, menuDivider as w, useOpenMenu as We } from "@parallelworks/ui";
33
+ import { ActionMenu as Re, Avatar as ze, Combobox as Be, CountBadge as v, IconButton as y, Kbd as Ve, PageHeaderBar as He, PageHeaderProvider as Ue, Tooltip as b, menuDivider as x, useOpenMenu as We } from "@parallelworks/ui";
35
34
  import { Outlet as Ge, useParams as Ke } from "@tanstack/react-router";
36
- import { Suspense as qe, useCallback as Je, useEffect as T, useMemo as Ye, useState as E } from "react";
37
- import { useLocale as Xe, useTranslations as D } from "use-intl";
38
- import { Fragment as O, jsx as k, jsxs as A } from "react/jsx-runtime";
39
- import { useQuery as j, useQueryClient as Ze, useSuspenseQuery as M } from "@tanstack/react-query";
40
- import { MoreButton as Qe } from "@parallelworks/ui/list";
41
- import { AppFrame as $e, AppFrameNavGroup as et, AppFrameNavItem as N, AppFrameToggle as P, useAppFrame as F } from "@parallelworks/ui/app-frame";
42
- import { createPortal as tt } from "react-dom";
35
+ import { Suspense as qe, useCallback as Je, useEffect as S, useMemo as Ye, useState as C } from "react";
36
+ import { useLocale as Xe, useTranslations as w } from "use-intl";
37
+ import { Fragment as T, jsx as E, jsxs as D } from "react/jsx-runtime";
38
+ import { useQuery as O, useQueryClient as Ze, useSuspenseQuery as k } from "@tanstack/react-query";
39
+ import { AppFrame as Qe, AppFrameNavGroup as $e, AppFrameNavItem as A, AppFrameToggle as j, useAppFrame as M } from "@parallelworks/ui/app-frame";
40
+ import { createPortal as N } from "react-dom";
43
41
  // src/routes/$workspace.tsx?tsr-split=component
44
- var I = "inline-flex h-8 min-w-8 items-center justify-center rounded-md border border-[color-mix(in_oklab,currentColor_20%,transparent)] bg-[color-mix(in_oklab,currentColor_6%,transparent)] text-sm font-medium hover:bg-[color-mix(in_oklab,currentColor_12%,transparent)]", nt = "absolute top-1.5 right-3 size-2 rounded-full bg-primary", L = (...e) => e.filter(Boolean).join(" ");
45
- function R() {
46
- let { workspace: d } = Le.useParams(), { data: h } = M(r), { data: g } = M(o(d)), { data: _ } = M(i(d)), v = xe(), [b, F] = E(null), [tt, R] = E(!1), z = Me(d, "manage_teams"), { canInstall: B, install: mt } = we(), V = Pe(), ht = Ze(), H = We(), U = be(d), W = D("workspace"), G = D("common"), K = Xe(), q = D("favorites"), gt = D("roles"), _t = De(), vt = (e) => [
42
+ var P = "inline-flex h-8 min-w-8 items-center justify-center rounded-md border border-[color-mix(in_oklab,currentColor_20%,transparent)] bg-[color-mix(in_oklab,currentColor_6%,transparent)] text-sm font-medium hover:bg-[color-mix(in_oklab,currentColor_12%,transparent)]", et = "absolute top-1.5 right-3 size-2 rounded-full bg-primary", F = (...e) => e.filter(Boolean).join(" ");
43
+ function I() {
44
+ let { workspace: d } = Le.useParams(), { data: g } = k(r), { data: M } = k(o(d)), { data: N } = k(i(d)), I = xe(), [L, R] = C(null), [dt, z] = C(!1), ft = Me(d, "manage_teams"), { canInstall: pt, install: mt } = we(), B = Pe(), ht = Ze(), V = We(), H = be(d), U = w("workspace"), gt = w("common"), W = Xe(), G = w("favorites"), _t = w("roles"), K = De(), vt = (e) => [
47
45
  {
48
- label: G("open"),
49
- onClick: () => V({
46
+ label: gt("open"),
47
+ onClick: () => B({
50
48
  to: "/$workspace/teams/$key/issues",
51
49
  params: {
52
50
  workspace: d,
@@ -55,13 +53,13 @@ function R() {
55
53
  })
56
54
  },
57
55
  {
58
- label: W("newIssueInTeam"),
56
+ label: U("newIssueInTeam"),
59
57
  shortcut: "C",
60
58
  onClick: () => Z({ team: e.key })
61
59
  },
62
60
  ...e.cyclesEnabled ? [{
63
- label: W("cycles"),
64
- onClick: () => V({
61
+ label: U("cycles"),
62
+ onClick: () => B({
65
63
  to: "/$workspace/teams/$key/cycles",
66
64
  params: {
67
65
  workspace: d,
@@ -70,8 +68,8 @@ function R() {
70
68
  })
71
69
  }] : [],
72
70
  {
73
- label: W("teamSettings"),
74
- onClick: () => V({
71
+ label: U("teamSettings"),
72
+ onClick: () => B({
75
73
  to: "/$workspace/teams/$key/settings",
76
74
  params: {
77
75
  workspace: d,
@@ -80,414 +78,410 @@ function R() {
80
78
  })
81
79
  },
82
80
  {
83
- label: U.find("team", e.id) ? q("remove") : q("add"),
84
- onClick: () => U.toggle("team", e.id)
81
+ label: H.find("team", e.id) ? G("remove") : G("add"),
82
+ onClick: () => H.toggle("team", e.id)
85
83
  },
86
- w,
87
- ..._t(Ie(d, e.key, "issues")),
88
- Ee(G("copyKey"), e.key)
84
+ x,
85
+ ...K(Ie(d, e.key, "issues")),
86
+ Ee(gt("copyKey"), e.key)
89
87
  ], yt = (e) => ({
90
- label: U.find("page", e) ? q("remove") : q("add"),
91
- onClick: () => U.toggle("page", e)
92
- }), J = Ne(), [bt, xt] = E(() => lt().expanded), [St, Ct] = E(() => lt().width), wt = Ye(() => {
93
- let e = y(J.pathname, d), t = e?.page === "issues" ? e.team : void 0, n = J.pathname === `/${d}/issues` || t !== void 0, r = J.search;
88
+ label: H.find("page", e) ? G("remove") : G("add"),
89
+ onClick: () => H.toggle("page", e)
90
+ }), q = Ne(), [bt, xt] = C(() => ot().expanded), [St, Ct] = C(() => ot().width), wt = Ye(() => {
91
+ let e = _(q.pathname, d), t = e?.page === "issues" ? e.team : void 0, n = q.pathname === `/${d}/issues` || t !== void 0, r = q.search;
94
92
  return {
95
- mine: n && !r.saved && !t && (r.assignee === h?.user.username || r.creator === h?.user.username),
93
+ mine: n && !r.saved && !t && (r.assignee === g?.user.username || r.creator === g?.user.username),
96
94
  team: n && !r.assignee ? t : void 0
97
95
  };
98
96
  }, [
99
- J.pathname,
100
- J.search,
97
+ q.pathname,
98
+ q.search,
101
99
  d,
102
- h?.user.username
103
- ]), Y = (e, t) => {
104
- let n = y(J.pathname, d);
100
+ g?.user.username
101
+ ]), J = (e, t) => {
102
+ let n = _(q.pathname, d);
105
103
  return n?.page === e && n.team === t;
106
- }, [Tt, Et] = E(() => ct(d)), Dt = (e, t) => Et((n) => {
104
+ }, [Tt, Et] = C(() => at(d)), Dt = (e, t) => Et((n) => {
107
105
  let r = new Set(n);
108
- return t ? r.delete(e) : r.add(e), dt(d, r), r;
109
- }), X = J.pathname.startsWith(`/${d}/settings`), { data: Ot = [] } = j(t(d)), kt = _.some((e) => e.triageEnabled && !e.archivedAt), { data: At } = j({
106
+ return t ? r.delete(e) : r.add(e), ct(d, r), r;
107
+ }), Y = q.pathname.startsWith(`/${d}/settings`), { data: Ot = [] } = O(t(d)), kt = N.some((e) => e.triageEnabled && !e.archivedAt), { data: At } = O({
110
108
  ...n(d, { triage: "only" }),
111
109
  enabled: kt
112
- }), jt = (e) => At?.issues.filter((t) => t.teamId === e).length ?? 0, { data: Mt } = j(a(d)), Nt = Mt?.unread ?? 0;
110
+ }), jt = (e) => At?.issues.filter((t) => t.teamId === e).length ?? 0, { data: Mt } = O(a(d)), X = Mt?.unread ?? 0;
113
111
  ke();
114
- let { key: Pt } = Ke({ strict: !1 }), Z = Je((e) => F({
115
- ...Pt && { team: Pt },
112
+ let { key: Nt } = Ke({ strict: !1 }), Z = Je((e) => R({
113
+ ...Nt && { team: Nt },
116
114
  ...e
117
- }), [Pt]);
118
- Fe({ c: () => Z() }, b === null);
119
- let [Ft, It] = E(!1);
120
- Fe({ "?": () => It(!0) });
121
- let [Lt, Q] = E(!1), [Rt, zt] = E([]);
122
- if (T(() => {
115
+ }), [Nt]);
116
+ Fe({ c: () => Z() }, L === null);
117
+ let [Pt, Ft] = C(!1);
118
+ Fe({ "?": () => Ft(!0) });
119
+ let [It, Q] = C(!1), [Lt, Rt] = C([]);
120
+ if (S(() => {
123
121
  let e = (e) => {
124
- !e.metaKey && !e.ctrlKey || e.altKey || e.shiftKey || e.key.toLowerCase() !== "k" || e.defaultPrevented || (e.preventDefault(), Q((e) => !e)), !e.metaKey && !e.ctrlKey || e.altKey || e.shiftKey || e.key.toLowerCase() !== "f" || e.defaultPrevented || ft() || (e.preventDefault(), Q(!0));
122
+ !e.metaKey && !e.ctrlKey || e.altKey || e.shiftKey || e.key.toLowerCase() !== "k" || e.defaultPrevented || (e.preventDefault(), Q((e) => !e)), !e.metaKey && !e.ctrlKey || e.altKey || e.shiftKey || e.key.toLowerCase() !== "f" || e.defaultPrevented || lt() || (e.preventDefault(), Q(!0));
125
123
  };
126
124
  return window.addEventListener("keydown", e), () => window.removeEventListener("keydown", e);
127
- }, []), !h) return null;
128
- let Bt = h.mode === "platform", Vt = B && !Bt, $ = h.signOutUrl, Ht = !v && (!Bt || $ !== void 0), Ut = async () => {
129
- $ === void 0 ? (await e.POST("/api/v1/auth/logout"), ht.clear(), V({ to: "/login" })) : await Ce($);
130
- }, Wt = X ? void 0 : ({ expanded: e }) => {
131
- let t = /* @__PURE__ */ k(Be, {
132
- items: [...h.workspaces.map((e) => ({
125
+ }, []), !g) return null;
126
+ let zt = g.mode === "platform", Bt = pt && !zt, $ = g.signOutUrl, Vt = !I && (!zt || $ !== void 0), Ht = async () => {
127
+ $ === void 0 ? (await e.POST("/api/v1/auth/logout"), ht.clear(), B({ to: "/login" })) : await Ce($);
128
+ }, Ut = Y ? void 0 : ({ expanded: e }) => {
129
+ let t = /* @__PURE__ */ E(Be, {
130
+ items: [...g.workspaces.map((e) => ({
133
131
  value: e.slug,
134
132
  label: e.name,
135
- hint: je(e.role) ? gt(`${e.role}.name`) : gt("custom")
136
- })), ...h.canCreateWorkspace ? [{
133
+ hint: je(e.role) ? _t(`${e.role}.name`) : _t("custom")
134
+ })), ...g.canCreateWorkspace ? [{
137
135
  value: "__new",
138
- label: W("createWorkspace")
136
+ label: U("createWorkspace")
139
137
  }] : []],
140
138
  value: d,
141
- onValueChange: (e) => V(e === "__new" ? { to: "/new" } : {
139
+ onValueChange: (e) => B(e === "__new" ? { to: "/new" } : {
142
140
  to: "/$workspace/issues",
143
141
  params: { workspace: e ?? d }
144
142
  }),
145
- placeholder: W("switchWorkspacePlaceholder"),
146
- "aria-label": W("switchWorkspace"),
147
- trigger: /* @__PURE__ */ A("button", {
143
+ placeholder: U("switchWorkspacePlaceholder"),
144
+ "aria-label": U("switchWorkspace"),
145
+ trigger: /* @__PURE__ */ D("button", {
148
146
  type: "button",
149
- "aria-label": e ? void 0 : g.name,
150
- onContextMenu: (e) => H(e, [
147
+ "aria-label": e ? void 0 : M.name,
148
+ onContextMenu: (e) => V(e, [
151
149
  {
152
- label: W("workspaceSettings"),
153
- onClick: () => V({
150
+ label: U("workspaceSettings"),
151
+ onClick: () => B({
154
152
  to: "/$workspace/settings",
155
153
  params: { workspace: d }
156
154
  })
157
155
  },
158
156
  {
159
- label: W("switchWorkspace"),
160
- items: [...h.workspaces.map((e) => ({
157
+ label: U("switchWorkspace"),
158
+ items: [...g.workspaces.map((e) => ({
161
159
  label: e.name,
162
160
  checked: e.slug === d,
163
- onClick: () => V({
161
+ onClick: () => B({
164
162
  to: "/$workspace/issues",
165
163
  params: { workspace: e.slug }
166
164
  })
167
- })), ...h.canCreateWorkspace ? [w, {
168
- label: W("createWorkspace"),
169
- onClick: () => V({ to: "/new" })
165
+ })), ...g.canCreateWorkspace ? [x, {
166
+ label: U("createWorkspace"),
167
+ onClick: () => B({ to: "/new" })
170
168
  }] : []]
171
169
  },
172
- w,
173
- Ee(W("copyWorkspaceSlug"), d),
174
- ...Ht ? [w, {
175
- label: W("signOut"),
176
- onClick: Ut
170
+ x,
171
+ Ee(U("copyWorkspaceSlug"), d),
172
+ ...Vt ? [x, {
173
+ label: U("signOut"),
174
+ onClick: Ht
177
175
  }] : []
178
176
  ]),
179
- className: L("flex h-9 items-center gap-2 rounded-md text-left hover:bg-muted", e ? "w-full px-2" : "w-9 justify-center"),
180
- children: [g.icon ? /* @__PURE__ */ k(l, {
181
- icon: g.icon,
182
- color: g.color,
183
- name: g.name,
177
+ className: F("flex h-9 items-center gap-2 rounded-md text-left hover:bg-muted", e ? "w-full px-2" : "w-9 justify-center"),
178
+ children: [M.icon ? /* @__PURE__ */ E(ee, {
179
+ icon: M.icon,
180
+ color: M.color,
181
+ name: M.name,
184
182
  className: "size-6 text-base"
185
- }) : /* @__PURE__ */ k(me, { withName: !1 }), e && /* @__PURE__ */ A(O, { children: [/* @__PURE__ */ k("span", {
183
+ }) : /* @__PURE__ */ E(me, { withName: !1 }), e && /* @__PURE__ */ D(T, { children: [/* @__PURE__ */ E("span", {
186
184
  className: "min-w-0 flex-1 truncate text-sm font-semibold",
187
- children: g.name
188
- }), /* @__PURE__ */ k(p, { className: "size-3.5 text-muted-foreground" })] })]
185
+ children: M.name
186
+ }), /* @__PURE__ */ E(m, { className: "size-3.5 text-muted-foreground" })] })]
189
187
  })
190
188
  });
191
- return e ? /* @__PURE__ */ A(O, { children: [/* @__PURE__ */ A("div", {
189
+ return e ? /* @__PURE__ */ D(T, { children: [/* @__PURE__ */ D("div", {
192
190
  className: "flex items-center gap-1",
193
191
  children: [
194
- /* @__PURE__ */ k("div", {
192
+ /* @__PURE__ */ E("div", {
195
193
  className: "min-w-0 flex-1",
196
194
  children: t
197
195
  }),
198
- !v && /* @__PURE__ */ k(u, { className: "hidden md:flex" }),
199
- !v && /* @__PURE__ */ k(s, {
200
- apps: h.apps ?? [],
196
+ !I && /* @__PURE__ */ E(u, { className: "hidden md:flex" }),
197
+ !I && /* @__PURE__ */ E(s, {
198
+ apps: g.apps ?? [],
201
199
  className: "hidden md:block"
202
200
  })
203
201
  ]
204
- }), /* @__PURE__ */ A("div", {
202
+ }), /* @__PURE__ */ D("div", {
205
203
  className: "mt-3 flex gap-1.5",
206
- children: [/* @__PURE__ */ A("button", {
204
+ children: [/* @__PURE__ */ D("button", {
207
205
  type: "button",
208
206
  onClick: () => Z(),
209
- className: L(I, "min-w-0 flex-1 gap-2 px-2"),
207
+ className: F(P, "min-w-0 flex-1 gap-2 px-2"),
210
208
  children: [
211
- /* @__PURE__ */ k(f, { className: "size-3.5" }),
212
- /* @__PURE__ */ k("span", {
209
+ /* @__PURE__ */ E(p, { className: "size-3.5" }),
210
+ /* @__PURE__ */ E("span", {
213
211
  className: "flex-1 text-left",
214
- children: W("newIssue")
212
+ children: U("newIssue")
215
213
  }),
216
- /* @__PURE__ */ k(Ve, {
214
+ /* @__PURE__ */ E(Ve, {
217
215
  keys: "C",
218
216
  size: "xs",
219
217
  variant: "plain"
220
218
  })
221
219
  ]
222
- }), /* @__PURE__ */ k(C, {
223
- content: W("openPalette"),
220
+ }), /* @__PURE__ */ E(b, {
221
+ content: U("openPalette"),
224
222
  shortcut: "Mod+K",
225
- children: /* @__PURE__ */ k("button", {
223
+ children: /* @__PURE__ */ E("button", {
226
224
  type: "button",
227
225
  onClick: () => Q(!0),
228
- "aria-label": W("openPalette"),
226
+ "aria-label": U("openPalette"),
229
227
  "aria-keyshortcuts": "Meta+K Control+K",
230
- className: I,
231
- children: /* @__PURE__ */ k(m, { className: "size-3.5" })
228
+ className: P,
229
+ children: /* @__PURE__ */ E(h, { className: "size-3.5" })
232
230
  })
233
231
  })]
234
- })] }) : /* @__PURE__ */ A("div", {
232
+ })] }) : /* @__PURE__ */ D("div", {
235
233
  className: "flex flex-col items-center gap-1.5",
236
234
  children: [
237
235
  t,
238
- !v && /* @__PURE__ */ k(s, { apps: h.apps ?? [] }),
239
- !v && /* @__PURE__ */ k(u, { className: "flex-col" }),
240
- /* @__PURE__ */ k(C, {
241
- content: W("newIssue"),
236
+ !I && /* @__PURE__ */ E(s, { apps: g.apps ?? [] }),
237
+ !I && /* @__PURE__ */ E(u, { className: "flex-col" }),
238
+ /* @__PURE__ */ E(b, {
239
+ content: U("newIssue"),
242
240
  shortcut: "C",
243
241
  side: "right",
244
- children: /* @__PURE__ */ k("button", {
242
+ children: /* @__PURE__ */ E("button", {
245
243
  type: "button",
246
244
  onClick: () => Z(),
247
- "aria-label": W("newIssue"),
248
- className: I,
249
- children: /* @__PURE__ */ k(f, { className: "size-3.5" })
245
+ "aria-label": U("newIssue"),
246
+ className: P,
247
+ children: /* @__PURE__ */ E(p, { className: "size-3.5" })
250
248
  })
251
249
  }),
252
- /* @__PURE__ */ k(C, {
253
- content: W("openPalette"),
250
+ /* @__PURE__ */ E(b, {
251
+ content: U("openPalette"),
254
252
  shortcut: "Mod+K",
255
253
  side: "right",
256
- children: /* @__PURE__ */ k("button", {
254
+ children: /* @__PURE__ */ E("button", {
257
255
  type: "button",
258
256
  onClick: () => Q(!0),
259
- "aria-label": W("openPalette"),
257
+ "aria-label": U("openPalette"),
260
258
  "aria-keyshortcuts": "Meta+K Control+K",
261
- className: I,
262
- children: /* @__PURE__ */ k(m, { className: "size-3.5" })
259
+ className: P,
260
+ children: /* @__PURE__ */ E(h, { className: "size-3.5" })
263
261
  })
264
262
  })
265
263
  ]
266
264
  });
267
- }, Gt = ({ expanded: e, mobileOpen: t }) => {
268
- if (X) return /* @__PURE__ */ k(ge, { workspace: d });
269
- let n = !e, r = (e) => J.pathname === e || J.pathname.startsWith(`${e}/`), i = (e, t) => (n) => H(n, [
265
+ }, Wt = ({ expanded: e, mobileOpen: t }) => {
266
+ if (Y) return /* @__PURE__ */ E(ge, { workspace: d });
267
+ let n = !e, r = (e) => q.pathname === e || q.pathname.startsWith(`${e}/`), i = (e, t) => (n) => V(n, [
270
268
  yt(e),
271
- w,
272
- ..._t(t)
273
- ]), a = (e) => (t) => H(t, _t(e)), o = (e, t) => /* @__PURE__ */ A("span", {
269
+ x,
270
+ ...K(t)
271
+ ]), a = (e) => (t) => V(t, K(e)), o = (e, t) => /* @__PURE__ */ D("span", {
274
272
  className: "relative flex",
275
- children: [e, n && t && /* @__PURE__ */ k("span", { className: nt })]
276
- }), s = _.filter((e) => !e.archivedAt), c = new Set(s.map((e) => e.id)), u = (e) => s.filter((t) => (t.parentId && c.has(t.parentId) ? t.parentId : "") === e), te = (e) => {
273
+ children: [e, n && t && /* @__PURE__ */ E("span", { className: et })]
274
+ }), s = /* @__PURE__ */ E("hr", { className: "tandem-nav-divider mx-2 my-2 border-border" }), c = N.filter((e) => !e.archivedAt), l = new Set(c.map((e) => e.id)), u = (e) => c.filter((t) => (t.parentId && l.has(t.parentId) ? t.parentId : "") === e), f = (e) => {
277
275
  let t = (t) => Ie(d, e.key, t), n = Ot.filter((t) => t.identifier.startsWith(`${e.key}-`)).length, i = (t) => !(e.sidebarHidden ?? []).includes(t);
278
- return /* @__PURE__ */ A(et, {
276
+ return /* @__PURE__ */ D($e, {
279
277
  label: e.name,
280
- icon: o(/* @__PURE__ */ k(l, {
278
+ className: "tandem-team",
279
+ icon: o(/* @__PURE__ */ E(ee, {
281
280
  icon: e.icon,
282
281
  color: e.color,
283
282
  name: e.name
284
283
  }), i("triage") && jt(e.id) > 0),
285
- selected: y(J.pathname, d)?.team === e.key,
284
+ selected: _(q.pathname, d)?.team === e.key,
286
285
  open: !Tt.has(e.key),
287
286
  onOpenChange: (t) => Dt(e.key, t),
288
- onContextMenu: (t) => H(t, vt(e)),
289
- action: /* @__PURE__ */ k(Qe, {
290
- items: () => vt(e),
291
- label: G("moreActionsFor", { name: e.name })
292
- }),
287
+ onContextMenu: (t) => V(t, vt(e)),
293
288
  children: [
294
- e.triageEnabled && i("triage") && /* @__PURE__ */ k(N, {
295
- label: W("triage"),
296
- icon: /* @__PURE__ */ k(fe, { className: "size-4" }),
289
+ e.triageEnabled && i("triage") && /* @__PURE__ */ E(A, {
290
+ label: U("triage"),
291
+ icon: /* @__PURE__ */ E(fe, { className: "size-4" }),
297
292
  href: t("triage"),
298
- selected: Y("triage", e.key),
293
+ selected: J("triage", e.key),
299
294
  onContextMenu: a(t("triage")),
300
- badge: /* @__PURE__ */ k(x, {
295
+ badge: /* @__PURE__ */ E(v, {
301
296
  count: jt(e.id),
302
- locale: K,
303
- label: W("triageCount")
297
+ locale: W,
298
+ label: U("triageCount")
304
299
  })
305
300
  }),
306
- i("issues") && /* @__PURE__ */ k(N, {
307
- label: W("issues"),
308
- icon: /* @__PURE__ */ k(le, { className: "size-4" }),
301
+ i("issues") && /* @__PURE__ */ E(A, {
302
+ label: U("issues"),
303
+ icon: /* @__PURE__ */ E(le, { className: "size-4" }),
309
304
  href: t("issues"),
310
305
  selected: wt.team === e.key,
311
306
  onContextMenu: a(t("issues"))
312
307
  }),
313
- i("projects") && /* @__PURE__ */ k(N, {
314
- label: W("projects"),
315
- icon: /* @__PURE__ */ k(de, { className: "size-4" }),
308
+ i("projects") && /* @__PURE__ */ E(A, {
309
+ label: U("projects"),
310
+ icon: /* @__PURE__ */ E(de, { className: "size-4" }),
316
311
  href: t("projects"),
317
- selected: Y("projects", e.key),
312
+ selected: J("projects", e.key),
318
313
  onContextMenu: a(t("projects"))
319
314
  }),
320
- i("areas") && /* @__PURE__ */ k(N, {
321
- label: W("areas"),
322
- icon: /* @__PURE__ */ k(re, { className: "size-4" }),
315
+ i("areas") && /* @__PURE__ */ E(A, {
316
+ label: U("areas"),
317
+ icon: /* @__PURE__ */ E(re, { className: "size-4" }),
323
318
  href: t("areas"),
324
- selected: Y("areas", e.key),
319
+ selected: J("areas", e.key),
325
320
  onContextMenu: a(t("areas"))
326
321
  }),
327
- i("decisions") && /* @__PURE__ */ k(N, {
328
- label: W("decisions"),
329
- icon: /* @__PURE__ */ k(se, { className: "size-4" }),
322
+ i("decisions") && /* @__PURE__ */ E(A, {
323
+ label: U("decisions"),
324
+ icon: /* @__PURE__ */ E(se, { className: "size-4" }),
330
325
  href: t("decisions"),
331
- selected: Y("decisions", e.key),
326
+ selected: J("decisions", e.key),
332
327
  onContextMenu: a(t("decisions")),
333
- badge: /* @__PURE__ */ k(x, {
328
+ badge: /* @__PURE__ */ E(v, {
334
329
  count: n,
335
- locale: K,
336
- label: W("waitingCount"),
330
+ locale: W,
331
+ label: U("waitingCount"),
337
332
  className: "bg-agent! text-agent-foreground!"
338
333
  })
339
334
  }),
340
- i("docs") && /* @__PURE__ */ k(N, {
341
- label: W("docs"),
342
- icon: /* @__PURE__ */ k(oe, { className: "size-4" }),
335
+ i("docs") && /* @__PURE__ */ E(A, {
336
+ label: U("docs"),
337
+ icon: /* @__PURE__ */ E(oe, { className: "size-4" }),
343
338
  href: `/${d}/docs/space/${e.key}`,
344
339
  selected: r(`/${d}/docs/space/${e.key}`),
345
340
  onContextMenu: a(`/${d}/docs/space/${e.key}`)
346
341
  }),
347
- e.cyclesEnabled && i("cycles") && /* @__PURE__ */ k(N, {
348
- label: W("cycles"),
349
- icon: /* @__PURE__ */ k(ae, { className: "size-4" }),
342
+ e.cyclesEnabled && i("cycles") && /* @__PURE__ */ E(A, {
343
+ label: U("cycles"),
344
+ icon: /* @__PURE__ */ E(ae, { className: "size-4" }),
350
345
  href: t("cycles"),
351
- selected: Y("cycles", e.key)
346
+ selected: J("cycles", e.key)
352
347
  }),
353
- u(e.id).map(te)
348
+ u(e.id).map(f)
354
349
  ]
355
350
  }, e.id);
356
- }, p = u("").map(te), m = `/${d}/issues?assignee=${encodeURIComponent(h.user.username)}`;
357
- return /* @__PURE__ */ A(O, { children: [
358
- t && /* @__PURE__ */ k(rt, {}),
359
- /* @__PURE__ */ k(N, {
360
- label: W("notifications"),
361
- icon: o(/* @__PURE__ */ k(ue, { className: "size-4" }), Nt > 0),
351
+ }, m = u("").map(f), h = `/${d}/issues?assignee=${encodeURIComponent(g.user.username)}`;
352
+ return /* @__PURE__ */ D(T, { children: [
353
+ t && /* @__PURE__ */ E(tt, {}),
354
+ /* @__PURE__ */ E(A, {
355
+ label: U("notifications"),
356
+ icon: o(/* @__PURE__ */ E(ue, { className: "size-4" }), X > 0),
362
357
  href: `/${d}/notifications`,
363
358
  selected: r(`/${d}/notifications`),
364
359
  onContextMenu: i("notifications", `/${d}/notifications`),
365
- badge: /* @__PURE__ */ k(x, {
366
- count: Nt,
367
- locale: K,
368
- label: W("unreadCount")
360
+ badge: /* @__PURE__ */ E(v, {
361
+ count: X,
362
+ locale: W,
363
+ label: U("unreadCount")
369
364
  })
370
365
  }),
371
- /* @__PURE__ */ k(N, {
372
- label: W("myIssues"),
373
- icon: /* @__PURE__ */ k(pe, { className: "size-4" }),
374
- href: m,
366
+ /* @__PURE__ */ E(A, {
367
+ label: U("myIssues"),
368
+ icon: /* @__PURE__ */ E(pe, { className: "size-4" }),
369
+ href: h,
375
370
  selected: wt.mine,
376
- onContextMenu: i("my-issues", m)
371
+ onContextMenu: i("my-issues", h)
377
372
  }),
378
- /* @__PURE__ */ k(N, {
379
- label: W("projects"),
380
- icon: /* @__PURE__ */ k(de, { className: "size-4" }),
373
+ /* @__PURE__ */ E(A, {
374
+ label: U("projects"),
375
+ icon: /* @__PURE__ */ E(de, { className: "size-4" }),
381
376
  href: `/${d}/projects`,
382
377
  selected: r(`/${d}/projects`),
383
378
  onContextMenu: i("projects", `/${d}/projects`)
384
379
  }),
385
- /* @__PURE__ */ k(N, {
386
- label: W("dashboards"),
387
- icon: /* @__PURE__ */ k(ie, { className: "size-4" }),
380
+ /* @__PURE__ */ E(A, {
381
+ label: U("dashboards"),
382
+ icon: /* @__PURE__ */ E(ie, { className: "size-4" }),
388
383
  href: `/${d}/dashboards`,
389
384
  selected: r(`/${d}/dashboards`),
390
385
  onContextMenu: i("dashboards", `/${d}/dashboards`)
391
386
  }),
392
- /* @__PURE__ */ k(N, {
393
- label: W("knowledge"),
394
- icon: /* @__PURE__ */ k(ce, { className: "size-4" }),
387
+ /* @__PURE__ */ E(A, {
388
+ label: U("knowledge"),
389
+ icon: /* @__PURE__ */ E(ce, { className: "size-4" }),
395
390
  href: `/${d}/knowledge`,
396
391
  selected: r(`/${d}/knowledge`),
397
392
  onContextMenu: i("knowledge", `/${d}/knowledge`)
398
393
  }),
399
- /* @__PURE__ */ k(N, {
400
- label: W("agents"),
401
- icon: /* @__PURE__ */ k(ne, { className: "size-4" }),
394
+ /* @__PURE__ */ E(A, {
395
+ label: U("agents"),
396
+ icon: /* @__PURE__ */ E(ne, { className: "size-4" }),
402
397
  href: `/${d}/agents`,
403
398
  selected: r(`/${d}/agents`),
404
399
  onContextMenu: i("agents", `/${d}/agents`)
405
400
  }),
406
- n ? /* @__PURE__ */ k("div", {
401
+ n ? /* @__PURE__ */ E("div", {
407
402
  className: "mt-4 border-t border-border pt-4",
408
- children: p
409
- }) : /* @__PURE__ */ A(O, { children: [
410
- /* @__PURE__ */ k(ee, {
403
+ children: m
404
+ }) : /* @__PURE__ */ D(T, { children: [
405
+ s,
406
+ /* @__PURE__ */ E(te, {
411
407
  workspace: d,
412
- myUsername: h.user.username,
413
- currentHref: J.pathname + J.searchStr
408
+ myUsername: g.user.username,
409
+ currentHref: q.pathname + q.searchStr
414
410
  }),
415
- /* @__PURE__ */ k(et, {
416
- label: W("teams"),
411
+ s,
412
+ /* @__PURE__ */ E($e, {
413
+ label: U("teams"),
417
414
  collapsible: !1,
418
- action: z && /* @__PURE__ */ k(S, {
415
+ action: ft && /* @__PURE__ */ E(y, {
419
416
  variant: "ghost",
420
417
  size: "xs",
421
- icon: /* @__PURE__ */ k(f, {}),
422
- label: W("createTeam"),
423
- onClick: () => R(!0)
418
+ icon: /* @__PURE__ */ E(p, {}),
419
+ label: U("createTeam"),
420
+ onClick: () => z(!0)
424
421
  }),
425
- children: _.length === 0 && (z ? /* @__PURE__ */ k(N, {
426
- label: W("createFirstTeam"),
427
- icon: /* @__PURE__ */ k(f, { className: "size-4" }),
428
- onClick: () => R(!0)
429
- }) : /* @__PURE__ */ k("p", {
422
+ children: N.length === 0 && (ft ? /* @__PURE__ */ E(A, {
423
+ label: U("createFirstTeam"),
424
+ icon: /* @__PURE__ */ E(p, { className: "size-4" }),
425
+ onClick: () => z(!0)
426
+ }) : /* @__PURE__ */ E("p", {
430
427
  className: "px-2 text-sm text-muted-foreground",
431
- children: W("noTeams")
428
+ children: U("noTeams")
432
429
  }))
433
430
  }),
434
- p
431
+ m
435
432
  ] })
436
433
  ] });
437
- }, Kt = X ? void 0 : ({ expanded: e, isMobile: t }) => {
434
+ }, Gt = Y ? void 0 : ({ expanded: e, isMobile: t }) => {
438
435
  let n = [
439
436
  {
440
- label: W("myAccount"),
441
- onClick: () => V({
437
+ label: U("myAccount"),
438
+ onClick: () => B({
442
439
  to: "/$workspace/settings/account",
443
440
  params: { workspace: d }
444
441
  })
445
442
  },
446
443
  {
447
- label: W("settings"),
448
- onClick: () => V({
444
+ label: U("settings"),
445
+ onClick: () => B({
449
446
  to: "/$workspace/settings",
450
447
  params: { workspace: d }
451
448
  })
452
449
  },
453
- ...Vt ? [{
454
- label: W("installApp"),
450
+ ...Bt ? [{
451
+ label: U("installApp"),
455
452
  onClick: mt
456
453
  }] : [],
457
- ...Ht ? [w, {
458
- label: W("signOut"),
459
- onClick: Ut
454
+ ...Vt ? [x, {
455
+ label: U("signOut"),
456
+ onClick: Ht
460
457
  }] : []
461
- ], r = /* @__PURE__ */ k(ze, {
462
- name: h.user.name,
463
- src: h.user.avatarUrl,
458
+ ], r = /* @__PURE__ */ E(ze, {
459
+ name: g.user.name,
460
+ src: g.user.avatarUrl,
464
461
  size: "sm",
465
462
  decorative: !0
466
463
  });
467
- return e ? /* @__PURE__ */ A(O, { children: [/* @__PURE__ */ k(st, {
468
- myUsername: h.user.username,
469
- workspace: d
470
- }), /* @__PURE__ */ A("div", {
464
+ return e ? /* @__PURE__ */ D("div", {
471
465
  className: "flex items-center gap-1",
472
- children: [/* @__PURE__ */ k(Re, {
473
- label: W("accountMenu", { name: h.user.name }),
466
+ children: [/* @__PURE__ */ E(Re, {
467
+ label: U("accountMenu", { name: g.user.name }),
474
468
  side: "top",
475
469
  align: "start",
476
470
  matchTriggerWidth: !0,
477
471
  items: n,
478
- trigger: /* @__PURE__ */ A("button", {
472
+ trigger: /* @__PURE__ */ D("button", {
479
473
  type: "button",
480
474
  className: "flex h-9 min-w-0 flex-1 items-center gap-2 rounded-md px-1.5 text-left hover:bg-muted",
481
- children: [r, /* @__PURE__ */ k("span", {
475
+ children: [r, /* @__PURE__ */ E("span", {
482
476
  className: "min-w-0 flex-1 truncate text-sm",
483
- children: h.user.name
477
+ children: g.user.name
484
478
  })]
485
479
  })
486
- }), !t && /* @__PURE__ */ k(P, {})]
487
- })] }) : /* @__PURE__ */ A("div", {
480
+ }), !t && /* @__PURE__ */ E(j, {})]
481
+ }) : /* @__PURE__ */ D("div", {
488
482
  className: "flex flex-col items-center gap-2",
489
- children: [/* @__PURE__ */ k(P, {}), /* @__PURE__ */ k(Re, {
490
- label: W("accountMenu", { name: h.user.name }),
483
+ children: [/* @__PURE__ */ E(j, {}), /* @__PURE__ */ E(Re, {
484
+ label: U("accountMenu", { name: g.user.name }),
491
485
  side: "right",
492
486
  align: "end",
493
487
  items: n,
@@ -496,99 +490,96 @@ function R() {
496
490
  children: r
497
491
  })]
498
492
  });
499
- }, qt = /* @__PURE__ */ k(it, {
493
+ }, Kt = /* @__PURE__ */ E(nt, {
500
494
  workspace: d,
501
- name: g.name,
502
- apps: h.apps ?? [],
503
- unread: Nt,
495
+ name: M.name,
496
+ apps: g.apps ?? [],
497
+ unread: X,
504
498
  onSearch: () => Q(!0),
505
499
  onNewIssue: () => Z()
506
500
  });
507
- return /* @__PURE__ */ k(Te, {
501
+ return /* @__PURE__ */ E(Te, {
508
502
  workspace: d,
509
- children: /* @__PURE__ */ k(Se, {
510
- actions: h.actions ?? [],
511
- children: /* @__PURE__ */ k(Oe.Provider, {
503
+ children: /* @__PURE__ */ E(Se, {
504
+ actions: g.actions ?? [],
505
+ children: /* @__PURE__ */ E(Oe.Provider, {
512
506
  value: Z,
513
- children: /* @__PURE__ */ A(Ae.Provider, {
514
- value: zt,
507
+ children: /* @__PURE__ */ D(Ae.Provider, {
508
+ value: Rt,
515
509
  children: [
516
- v ? /* @__PURE__ */ k(Ue, { children: /* @__PURE__ */ k(at, {
517
- sidebar: v.sidebar,
518
- brand: Wt,
519
- navigation: Gt,
520
- header: qt,
521
- presence: /* @__PURE__ */ k(st, {
522
- myUsername: h.user.username,
523
- workspace: d
524
- }),
525
- children: /* @__PURE__ */ k(ot, { children: /* @__PURE__ */ A("div", {
510
+ I ? /* @__PURE__ */ E(Ue, { children: /* @__PURE__ */ E(rt, {
511
+ sidebar: I.sidebar,
512
+ brand: Ut,
513
+ navigation: Wt,
514
+ header: Kt,
515
+ children: /* @__PURE__ */ E(it, { children: /* @__PURE__ */ D("div", {
526
516
  className: "flex h-full min-h-0 flex-col",
527
- children: [/* @__PURE__ */ k(He, {}), /* @__PURE__ */ k("div", {
517
+ children: [/* @__PURE__ */ E(He, {}), /* @__PURE__ */ E("div", {
528
518
  className: "min-h-0 flex-1",
529
- children: /* @__PURE__ */ k(Ge, {})
519
+ children: /* @__PURE__ */ E(Ge, {})
530
520
  })]
531
521
  }) })
532
- }) }) : /* @__PURE__ */ k($e, {
533
- expanded: bt || X,
522
+ }) }) : /* @__PURE__ */ E(Qe, {
523
+ expanded: bt || Y,
534
524
  onExpandedChange: (e) => {
535
- xt(e), ut({
525
+ xt(e), st({
536
526
  expanded: e,
537
527
  width: St
538
528
  });
539
529
  },
540
530
  width: St,
541
531
  onWidthChange: (e) => {
542
- Ct(e), ut({
532
+ Ct(e), st({
543
533
  expanded: bt,
544
534
  width: e
545
535
  });
546
536
  },
547
- navigationKey: J.pathname + J.searchStr,
548
- navigationResetKey: X ? "settings" : "workspace",
537
+ navigationKey: q.pathname + q.searchStr,
538
+ navigationResetKey: Y ? "settings" : "workspace",
549
539
  mainClassName: "flex flex-col overflow-hidden",
550
540
  labels: {
551
- navigation: W("navigation"),
552
- skipToContent: W("skipToContent"),
553
- openNavigation: W("openNav"),
554
- closeNavigation: W("closeNav"),
555
- expandSidebar: W("expandSidebar"),
556
- collapseSidebar: W("collapseSidebar"),
557
- resizeSidebar: W("resizeSidebar")
541
+ navigation: U("navigation"),
542
+ skipToContent: U("skipToContent"),
543
+ openNavigation: U("openNav"),
544
+ closeNavigation: U("closeNav"),
545
+ expandSidebar: U("expandSidebar"),
546
+ collapseSidebar: U("collapseSidebar"),
547
+ resizeSidebar: U("resizeSidebar")
558
548
  },
559
- header: qt,
560
- brand: Wt,
561
- navigation: Gt,
562
- footer: Kt,
563
- children: /* @__PURE__ */ k(ot, { children: /* @__PURE__ */ k(Ge, {}) })
549
+ header: Kt,
550
+ brand: Ut,
551
+ navigation: Wt,
552
+ footer: Gt,
553
+ children: /* @__PURE__ */ E(it, { children: /* @__PURE__ */ E(Ge, {}) })
564
554
  }),
565
- /* @__PURE__ */ k(te, { workspace: d }),
566
- !Bt && /* @__PURE__ */ k(pt, {}),
567
- /* @__PURE__ */ k(c, {
555
+ /* @__PURE__ */ E(f, { workspace: d }),
556
+ !zt && /* @__PURE__ */ E(ut, {}),
557
+ /* @__PURE__ */ E(c, {
568
558
  workspace: d,
569
- open: Lt,
559
+ open: It,
570
560
  onClose: () => Q(!1),
571
- selection: Rt
561
+ selection: Lt
572
562
  }),
573
- /* @__PURE__ */ k(_e, { workspace: d }),
574
- /* @__PURE__ */ k(ve, {
575
- open: Ft,
576
- onClose: () => It(!1)
563
+ /* @__PURE__ */ E(_e, { workspace: d }),
564
+ /* @__PURE__ */ E(l, { workspace: d }),
565
+ /* @__PURE__ */ E(ve, {
566
+ open: Pt,
567
+ onClose: () => Ft(!1)
577
568
  }),
578
- tt && /* @__PURE__ */ k(ye, {
569
+ dt && /* @__PURE__ */ E(ye, {
579
570
  workspace: d,
580
- onClose: () => R(!1)
571
+ onClose: () => z(!1)
581
572
  }),
582
- b && /* @__PURE__ */ k(qe, { children: /* @__PURE__ */ k(he, {
573
+ L && /* @__PURE__ */ E(qe, { children: /* @__PURE__ */ E(he, {
583
574
  workspace: d,
584
- ...b.team && { defaultTeam: b.team },
585
- ...b.title && { defaultTitle: b.title },
586
- ...b.body && { defaultBody: b.body },
587
- ...b.area && { defaultArea: b.area },
588
- ...b.origin && { origin: b.origin },
589
- ...b.fields && { defaults: b.fields },
590
- ...b.onCreated && { onCreated: b.onCreated },
591
- onClose: () => F(null)
575
+ ...L.team && { defaultTeam: L.team },
576
+ ...L.title && { defaultTitle: L.title },
577
+ ...L.body && { defaultBody: L.body },
578
+ ...L.area && { defaultArea: L.area },
579
+ ...L.origin && { origin: L.origin },
580
+ ...L.fields && { defaults: L.fields },
581
+ ...L.onCreated && { onCreated: L.onCreated },
582
+ onClose: () => R(null)
592
583
  }) })
593
584
  ]
594
585
  })
@@ -596,111 +587,78 @@ function R() {
596
587
  })
597
588
  });
598
589
  }
599
- function rt() {
600
- return T(() => {
590
+ function tt() {
591
+ return S(() => {
601
592
  document.querySelector(".pw-frame-drawer [aria-current=\"page\"]")?.scrollIntoView({ block: "nearest" });
602
593
  }, []), null;
603
594
  }
604
- function it({ workspace: e, name: t, apps: n, unread: r, onSearch: i, onNewIssue: a }) {
605
- let { isMobile: o } = F(), c = xe(), l = D("workspace");
606
- return o ? /* @__PURE__ */ A("div", {
595
+ function nt({ workspace: e, name: t, apps: n, unread: r, onSearch: i, onNewIssue: a }) {
596
+ let { isMobile: o } = M(), c = xe(), l = w("workspace");
597
+ return o ? /* @__PURE__ */ D("div", {
607
598
  className: "flex h-12 items-center gap-1 border-b border-border px-1",
608
599
  children: [
609
- /* @__PURE__ */ k(P, {}),
610
- /* @__PURE__ */ k("span", {
600
+ /* @__PURE__ */ E(j, {}),
601
+ /* @__PURE__ */ E("span", {
611
602
  className: "min-w-0 flex-1 truncate text-sm font-semibold",
612
603
  children: t
613
604
  }),
614
- !c && /* @__PURE__ */ k(u, {}),
615
- !c && /* @__PURE__ */ k(s, { apps: n }),
616
- /* @__PURE__ */ k(S, {
605
+ !c && /* @__PURE__ */ E(u, {}),
606
+ !c && /* @__PURE__ */ E(s, { apps: n }),
607
+ /* @__PURE__ */ E(y, {
617
608
  variant: "ghost",
618
609
  size: "lg",
619
- icon: /* @__PURE__ */ k(m, {}),
610
+ icon: /* @__PURE__ */ E(h, {}),
620
611
  label: l("openPalette"),
621
612
  onClick: i
622
613
  }),
623
- /* @__PURE__ */ k(S, {
614
+ /* @__PURE__ */ E(y, {
624
615
  variant: "ghost",
625
616
  size: "lg",
626
- icon: /* @__PURE__ */ k(ue, {}),
617
+ icon: /* @__PURE__ */ E(ue, {}),
627
618
  label: l("notifications"),
628
619
  href: `/${e}/notifications`,
629
620
  dot: r > 0
630
621
  }),
631
- /* @__PURE__ */ k(S, {
622
+ /* @__PURE__ */ E(y, {
632
623
  variant: "ghost",
633
624
  size: "lg",
634
- icon: /* @__PURE__ */ k(f, {}),
625
+ icon: /* @__PURE__ */ E(p, {}),
635
626
  label: l("newIssue"),
636
627
  onClick: a
637
628
  })
638
629
  ]
639
630
  }) : null;
640
631
  }
641
- function at({ sidebar: e, brand: t, navigation: n, header: r, presence: i, children: a }) {
642
- let o = F();
643
- return /* @__PURE__ */ A(O, { children: [e && tt(/* @__PURE__ */ A("div", {
632
+ function rt({ sidebar: e, brand: t, navigation: n, header: r, children: i }) {
633
+ let a = M();
634
+ return /* @__PURE__ */ D(T, { children: [e && N(/* @__PURE__ */ D("div", {
644
635
  className: "tandem-hosted-sidebar flex flex-col gap-3",
645
- children: [
646
- t?.(o),
647
- n(o),
648
- o.expanded && i
649
- ]
650
- }), e), /* @__PURE__ */ A("div", {
636
+ children: [t?.(a), n(a)]
637
+ }), e), /* @__PURE__ */ D("div", {
651
638
  className: "flex h-full min-h-0 flex-col",
652
- children: [r, a]
639
+ children: [r, i]
653
640
  })] });
654
641
  }
655
- function ot({ children: e }) {
642
+ function it({ children: e }) {
656
643
  let { state: t } = g(), n = t?.open && t.maximized;
657
- return /* @__PURE__ */ A(O, { children: [/* @__PURE__ */ k("div", {
658
- className: L("min-h-0 min-w-0 flex-1 overflow-y-auto bg-card", n && "hidden"),
644
+ return /* @__PURE__ */ D(T, { children: [/* @__PURE__ */ E("div", {
645
+ className: F("min-h-0 min-w-0 flex-1 overflow-y-auto bg-card", n && "hidden"),
659
646
  children: e
660
- }), /* @__PURE__ */ k(d, {})] });
661
- }
662
- function st({ myUsername: e, workspace: t }) {
663
- let { people: n, page: r } = _(), { person: i } = v(t), a = D("workspace"), o = new Set(n.map((e) => e.username).filter((t) => t !== e));
664
- if (o.size === 0) return null;
665
- let s = [...new Set(n.filter((t) => t.username !== e && t.page === r).map((e) => e.username))];
666
- return /* @__PURE__ */ A("div", {
667
- className: "flex items-center gap-2 px-2 pb-2 text-xs text-muted-foreground",
668
- children: [s.length > 0 && /* @__PURE__ */ k(b, {
669
- size: "xs",
670
- max: 5,
671
- showOverflow: !1,
672
- ringColor: "var(--theme-sidebar-bg, var(--theme-muted-panel-bg))",
673
- label: a("onThisPage", { count: s.length }),
674
- children: s.map((e) => /* @__PURE__ */ k(h, {
675
- workspace: t,
676
- handle: e,
677
- children: /* @__PURE__ */ k(ze, {
678
- name: i(e).name,
679
- src: i(e).avatarUrl
680
- })
681
- }, e))
682
- }), /* @__PURE__ */ k("span", { children: s.length === 1 ? a("oneOnThisPage", {
683
- name: i(s[0] ?? "").name,
684
- count: o.size
685
- }) : s.length > 1 ? a("othersOnThisPage", {
686
- here: s.length,
687
- count: o.size
688
- }) : a("online", { count: o.size }) })]
689
- });
647
+ }), /* @__PURE__ */ E(d, {})] });
690
648
  }
691
- var z = (e) => `tandem:collapsed-teams:${e}`;
692
- function ct(e) {
649
+ var L = (e) => `tandem:collapsed-teams:${e}`;
650
+ function at(e) {
693
651
  try {
694
- let t = JSON.parse(localStorage.getItem(z(e)) ?? "[]");
652
+ let t = JSON.parse(localStorage.getItem(L(e)) ?? "[]");
695
653
  return new Set(Array.isArray(t) ? t.filter((e) => typeof e == "string") : []);
696
654
  } catch {
697
655
  return /* @__PURE__ */ new Set();
698
656
  }
699
657
  }
700
- var B = "tandem:sidebar";
701
- function lt() {
658
+ var R = "tandem:sidebar";
659
+ function ot() {
702
660
  try {
703
- let e = JSON.parse(localStorage.getItem(B) ?? "{}");
661
+ let e = JSON.parse(localStorage.getItem(R) ?? "{}");
704
662
  return {
705
663
  expanded: e?.expanded !== !1,
706
664
  width: typeof e?.width == "number" ? e.width : 240
@@ -712,21 +670,21 @@ function lt() {
712
670
  };
713
671
  }
714
672
  }
715
- function ut(e) {
673
+ function st(e) {
716
674
  try {
717
- localStorage.setItem(B, JSON.stringify(e));
675
+ localStorage.setItem(R, JSON.stringify(e));
718
676
  } catch {}
719
677
  }
720
- function dt(e, t) {
678
+ function ct(e, t) {
721
679
  try {
722
- localStorage.setItem(z(e), JSON.stringify([...t]));
680
+ localStorage.setItem(L(e), JSON.stringify([...t]));
723
681
  } catch {}
724
682
  }
725
- function ft() {
683
+ function lt() {
726
684
  return Array.from(document.querySelectorAll("[aria-keyshortcuts]")).some((e) => /\b(Meta|Control)\+F\b/.test(e.getAttribute("aria-keyshortcuts") ?? "") && e.getClientRects().length > 0);
727
685
  }
728
- function pt() {
729
- return T(() => {
686
+ function ut() {
687
+ return S(() => {
730
688
  let t = Intl.DateTimeFormat().resolvedOptions().timeZone;
731
689
  try {
732
690
  if (!t || sessionStorage.getItem("tandem:time-zone") === t) return;
@@ -735,4 +693,4 @@ function pt() {
735
693
  e.PATCH("/api/v1/me", { body: { timeZone: t } }).catch(() => {});
736
694
  }, []), null;
737
695
  }
738
- export { R as component };
696
+ export { I as component };