@parallelworks/tandem-web 0.175.1 → 0.175.3

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