@parallelworks/tandem-web 0.152.1 → 0.153.1

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