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