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