@burdenoff/fe-libs 2026.527.3 → 2026.527.5
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.
- package/dist/chrome/ContextSwitcher.js +90 -339
- package/dist/chrome/GlobalSearch.js +72 -456
- package/dist/chrome/NotificationCenter.js +69 -703
- package/dist/chrome/SideNavigation.js +73 -241
- package/dist/chrome/contextSwitcher/EmptyState.js +32 -0
- package/dist/chrome/contextSwitcher/OrganizationList.js +34 -0
- package/dist/chrome/contextSwitcher/ProjectList.js +34 -0
- package/dist/chrome/contextSwitcher/SearchInput.js +50 -0
- package/dist/chrome/contextSwitcher/TabButton.js +9 -0
- package/dist/chrome/contextSwitcher/TriggerButton.js +38 -0
- package/dist/chrome/contextSwitcher/WorkspaceList.js +34 -0
- package/dist/chrome/contextSwitcher/icons.js +58 -0
- package/dist/chrome/contextSwitcher/useIsMobile.js +11 -0
- package/dist/chrome/globalSearch/AdvancedFiltersPanel.js +253 -0
- package/dist/chrome/globalSearch/CategoryTabs.js +28 -0
- package/dist/chrome/globalSearch/ResultsList.js +58 -0
- package/dist/chrome/globalSearch/SearchInput.js +28 -0
- package/dist/chrome/globalSearch/SearchModeBar.js +36 -0
- package/dist/chrome/globalSearch/useAdvancedFilters.js +78 -0
- package/dist/chrome/globalSearch/utils.js +22 -0
- package/dist/chrome/notificationCenter/BellButton.js +27 -0
- package/dist/chrome/notificationCenter/NotificationCardItem.js +129 -0
- package/dist/chrome/notificationCenter/NotificationFilters.js +67 -0
- package/dist/chrome/notificationCenter/NotificationFooter.js +23 -0
- package/dist/chrome/notificationCenter/NotificationHeader.js +75 -0
- package/dist/chrome/notificationCenter/NotificationList.js +75 -0
- package/dist/chrome/notificationCenter/NotificationPanel.js +19 -0
- package/dist/chrome/notificationCenter/SkeletonCard.js +18 -0
- package/dist/chrome/notificationCenter/constants.js +93 -0
- package/dist/chrome/notificationCenter/gql.js +58 -0
- package/dist/chrome/notificationCenter/useNotificationCenter.js +149 -0
- package/dist/chrome/notificationCenter/usePanelChrome.js +36 -0
- package/dist/chrome/sideNavigation/CollapseToggle.js +29 -0
- package/dist/chrome/sideNavigation/MobileActionsBar.js +25 -0
- package/dist/chrome/sideNavigation/NavItemRenderer.js +79 -0
- package/dist/chrome/sideNavigation/SidebarHeader.js +29 -0
- package/dist/chrome/sideNavigation/helpers.js +19 -0
- package/dist/chrome/sideNavigation/useSideNavigationState.js +45 -0
- package/dist/shared/components/ContextConversationWidget.js +173 -767
- package/dist/shared/components/contextConversationWidget/Composer.js +66 -0
- package/dist/shared/components/contextConversationWidget/MessageItem.js +124 -0
- package/dist/shared/components/contextConversationWidget/MessageList.js +32 -0
- package/dist/shared/components/contextConversationWidget/NoWorkspaceCard.js +19 -0
- package/dist/shared/components/contextConversationWidget/PendingAttachmentsBar.js +28 -0
- package/dist/shared/components/contextConversationWidget/ReplyBanner.js +32 -0
- package/dist/shared/components/contextConversationWidget/WidgetHeader.js +70 -0
- package/dist/shared/components/contextConversationWidget/queries.js +197 -0
- package/dist/shared/components/contextConversationWidget/types.js +10 -0
- package/dist/shared/components/contextConversationWidget/useAttachmentUpload.js +57 -0
- package/dist/shared/components/contextConversationWidget/useConversationSubscriptions.js +26 -0
- package/dist/shared/components/contextConversationWidget/useMessageActions.js +34 -0
- package/dist/shared/components/contextConversationWidget/useSendMessage.js +45 -0
- package/dist/shared/components/contextConversationWidget/useWidgetMessages.js +44 -0
- package/dist/shared/components/contextConversationWidget/utils.js +56 -0
- package/dist/shared/pages/SearchPage.js +293 -1076
- package/dist/shared/pages/searchPage/ActiveFilterChips.js +176 -0
- package/dist/shared/pages/searchPage/FiltersPanel.js +329 -0
- package/dist/shared/pages/searchPage/ResultsList.js +119 -0
- package/dist/shared/pages/searchPage/ResultsStatus.js +32 -0
- package/dist/shared/pages/searchPage/SearchInput.js +31 -0
- package/dist/shared/pages/searchPage/SearchPagination.js +37 -0
- package/dist/shared/pages/searchPage/SearchToolbar.js +58 -0
- package/dist/shared/pages/searchPage/constants.js +155 -0
- package/dist/shared/pages/searchPage/utils.js +24 -0
- package/dist/shared/providers/shell/AuthProvider.js +130 -384
- package/dist/shared/providers/shell/authProvider/bridgeStateSync.js +34 -0
- package/dist/shared/providers/shell/authProvider/jwt.js +13 -0
- package/dist/shared/providers/shell/authProvider/ssoRelay.js +38 -0
- package/dist/shared/providers/shell/authProvider/useAuthActions.js +170 -0
- package/dist/shared/providers/shell/authProvider/useBridgeInitialization.js +86 -0
- package/dist/shared/providers/shell/authProvider/useRemoteSLO.js +32 -0
- package/dist/shared/providers/shell/authProvider/useStorageSync.js +35 -0
- package/dist/shared/providers/shell/authProvider/useTokenExpiryTimer.js +37 -0
- package/dist/shared/tours/TourTrigger.js +86 -262
- package/dist/shared/tours/ToursContext.js +108 -398
- package/dist/shared/tours/tourTrigger/DesktopTourDropdown.js +48 -0
- package/dist/shared/tours/tourTrigger/MobileTourSheet.js +68 -0
- package/dist/shared/tours/tourTrigger/TourListItemDesktop.js +36 -0
- package/dist/shared/tours/tourTrigger/TourListItemMobile.js +47 -0
- package/dist/shared/tours/tourTrigger/TourStatusChip.js +30 -0
- package/dist/shared/tours/tourTrigger/TourTriggerButton.js +22 -0
- package/dist/shared/tours/toursContext/errors.js +18 -0
- package/dist/shared/tours/toursContext/gql.js +152 -0
- package/dist/shared/tours/toursContext/route.js +20 -0
- package/dist/shared/tours/toursContext/session.js +19 -0
- package/dist/shared/tours/toursContext/useIdleReady.js +18 -0
- package/dist/shared/tours/toursContext/useTourMutations.js +118 -0
- package/dist/tag/TagsWidget.js +81 -226
- package/dist/tag/tagsWidget/AddTagTrigger.js +14 -0
- package/dist/tag/tagsWidget/TagBadgeList.js +17 -0
- package/dist/tag/tagsWidget/TagSearchPopover.js +80 -0
- package/dist/tag/tagsWidget/operations.js +64 -0
- package/dist/tag/tagsWidget/useVocabResolver.js +30 -0
- package/package.json +1 -1
|
@@ -1,399 +1,150 @@
|
|
|
1
1
|
import { Sheet as e, SheetContent as t, SheetHeader as n, SheetTitle as r } from "../ui/sheet.js";
|
|
2
|
-
import {
|
|
3
|
-
import {
|
|
2
|
+
import { useIsMobile as i } from "./contextSwitcher/useIsMobile.js";
|
|
3
|
+
import { TabButton as a } from "./contextSwitcher/TabButton.js";
|
|
4
|
+
import { OrganizationList as o } from "./contextSwitcher/OrganizationList.js";
|
|
5
|
+
import { WorkspaceList as s } from "./contextSwitcher/WorkspaceList.js";
|
|
6
|
+
import { ProjectList as c } from "./contextSwitcher/ProjectList.js";
|
|
7
|
+
import { TriggerButton as l } from "./contextSwitcher/TriggerButton.js";
|
|
8
|
+
import { useCallback as u, useEffect as d, useRef as f, useState as p } from "react";
|
|
9
|
+
import { Fragment as m, jsx as h, jsxs as g } from "react/jsx-runtime";
|
|
4
10
|
//#region src/chrome/ContextSwitcher.tsx
|
|
5
|
-
|
|
6
|
-
let [
|
|
7
|
-
return a(() => {
|
|
8
|
-
let t = () => n(window.innerWidth < e);
|
|
9
|
-
return t(), window.addEventListener("resize", t), () => window.removeEventListener("resize", t);
|
|
10
|
-
}, [e]), t;
|
|
11
|
-
}
|
|
12
|
-
var f = ({ value: e, onChange: t, placeholder: n, inputRef: r }) => /* @__PURE__ */ l("div", {
|
|
13
|
-
className: "relative px-3 py-2 border-b border-[var(--color-border-subtle)]",
|
|
14
|
-
children: /* @__PURE__ */ u("div", {
|
|
15
|
-
className: "relative",
|
|
16
|
-
children: [
|
|
17
|
-
/* @__PURE__ */ l("svg", {
|
|
18
|
-
className: "absolute left-3 top-1/2 -translate-y-1/2 size-4 text-[var(--color-text-tertiary)]",
|
|
19
|
-
fill: "none",
|
|
20
|
-
stroke: "currentColor",
|
|
21
|
-
viewBox: "0 0 24 24",
|
|
22
|
-
children: /* @__PURE__ */ l("path", {
|
|
23
|
-
strokeLinecap: "round",
|
|
24
|
-
strokeLinejoin: "round",
|
|
25
|
-
strokeWidth: 2,
|
|
26
|
-
d: "M21 21l-6-6m2-5a7 7 0 11-14 0 7 7 0 0114 0z"
|
|
27
|
-
})
|
|
28
|
-
}),
|
|
29
|
-
/* @__PURE__ */ l("input", {
|
|
30
|
-
ref: r,
|
|
31
|
-
type: "text",
|
|
32
|
-
value: e,
|
|
33
|
-
onChange: (e) => t(e.target.value),
|
|
34
|
-
placeholder: n,
|
|
35
|
-
className: "w-full pl-9 pr-8 py-2 text-sm bg-[var(--color-bg-surface)] border border-[var(--color-border-subtle)] rounded-md focus:outline-none focus:ring-2 focus:ring-[var(--color-action-primary-border)] focus:border-transparent text-[var(--color-text-primary)] placeholder:text-[var(--color-text-tertiary)] transition-all duration-200"
|
|
36
|
-
}),
|
|
37
|
-
e && /* @__PURE__ */ l("button", {
|
|
38
|
-
type: "button",
|
|
39
|
-
onClick: () => t(""),
|
|
40
|
-
className: "absolute right-2 top-1/2 -translate-y-1/2 p-1 rounded-md hover:bg-[var(--color-action-ghost-bgHover)] text-[var(--color-text-tertiary)] hover:text-[var(--color-text-primary)] transition-all duration-150 ease-out",
|
|
41
|
-
"aria-label": "Clear search",
|
|
42
|
-
children: /* @__PURE__ */ l("svg", {
|
|
43
|
-
className: "size-4",
|
|
44
|
-
fill: "none",
|
|
45
|
-
stroke: "currentColor",
|
|
46
|
-
viewBox: "0 0 24 24",
|
|
47
|
-
children: /* @__PURE__ */ l("path", {
|
|
48
|
-
strokeLinecap: "round",
|
|
49
|
-
strokeLinejoin: "round",
|
|
50
|
-
strokeWidth: 2,
|
|
51
|
-
d: "M6 18L18 6M6 6l12 12"
|
|
52
|
-
})
|
|
53
|
-
})
|
|
54
|
-
})
|
|
55
|
-
]
|
|
56
|
-
})
|
|
57
|
-
}), p = ({ message: e, isSearchResult: t }) => /* @__PURE__ */ l("div", {
|
|
58
|
-
className: "px-4 py-8 text-center animate-in fade-in-0 duration-200",
|
|
59
|
-
children: t ? /* @__PURE__ */ u(c, { children: [
|
|
60
|
-
/* @__PURE__ */ l("svg", {
|
|
61
|
-
className: "size-8 mx-auto mb-2 text-[var(--color-text-tertiary)]",
|
|
62
|
-
fill: "none",
|
|
63
|
-
stroke: "currentColor",
|
|
64
|
-
viewBox: "0 0 24 24",
|
|
65
|
-
children: /* @__PURE__ */ l("path", {
|
|
66
|
-
strokeLinecap: "round",
|
|
67
|
-
strokeLinejoin: "round",
|
|
68
|
-
strokeWidth: 2,
|
|
69
|
-
d: "M21 21l-6-6m2-5a7 7 0 11-14 0 7 7 0 0114 0z"
|
|
70
|
-
})
|
|
71
|
-
}),
|
|
72
|
-
/* @__PURE__ */ l("p", {
|
|
73
|
-
className: "text-[var(--color-text-secondary)] text-sm",
|
|
74
|
-
children: "No results found"
|
|
75
|
-
}),
|
|
76
|
-
/* @__PURE__ */ l("p", {
|
|
77
|
-
className: "text-[var(--color-text-tertiary)] text-xs mt-1",
|
|
78
|
-
children: "Try a different search term"
|
|
79
|
-
})
|
|
80
|
-
] }) : /* @__PURE__ */ l("p", {
|
|
81
|
-
className: "text-[var(--color-text-secondary)] text-sm",
|
|
82
|
-
children: e
|
|
83
|
-
})
|
|
84
|
-
}), m = ({ label: e, isActive: t, onClick: n }) => /* @__PURE__ */ l("button", {
|
|
85
|
-
onClick: n,
|
|
86
|
-
className: `flex-1 px-3 py-2.5 text-[13px] font-medium whitespace-nowrap text-center transition-all duration-200 ease-out ${t ? "text-[var(--color-text-link)] border-b-2 border-[var(--color-action-primary-bg)] bg-[var(--color-bg-accent)]" : "text-[var(--color-text-secondary)] hover:text-[var(--color-text-primary)] hover:bg-[var(--color-action-ghost-bgHover)] border-b-2 border-transparent"}`,
|
|
87
|
-
children: e
|
|
88
|
-
}), h = ({ organizations: h, workspaces: g, projects: _, currentOrganizationId: v, currentWorkspaceId: y, currentProjectId: b, onOrganizationChange: x, onWorkspaceChange: S, onProjectChange: C, compact: w = !1 }) => {
|
|
89
|
-
let [T, E] = s(!1), [D, O] = s(() => v ? "workspace" : "org"), [k, A] = s({
|
|
11
|
+
var _ = ({ organizations: _, workspaces: v, projects: y, currentOrganizationId: b, currentWorkspaceId: x, currentProjectId: S, onOrganizationChange: C, onWorkspaceChange: w, onProjectChange: T, compact: E = !1 }) => {
|
|
12
|
+
let [D, O] = p(!1), [k, A] = p(() => b ? "workspace" : "org"), [j, M] = p({
|
|
90
13
|
org: "",
|
|
91
14
|
workspace: "",
|
|
92
15
|
project: ""
|
|
93
|
-
}),
|
|
94
|
-
|
|
95
|
-
let
|
|
16
|
+
}), N = i(), P = f(null), F = f(null), I = f(b);
|
|
17
|
+
I.current = b;
|
|
18
|
+
let L = _.find((e) => e.id === b), R = v.find((e) => e.id === x), z = y.find((e) => e.id === S), B = v.filter((e) => e.organizationId === b), V = y.filter((e) => e.workspaceId === x), H = u((e, t) => {
|
|
96
19
|
if (!t.trim()) return e;
|
|
97
20
|
let n = t.toLowerCase().trim();
|
|
98
21
|
return e.filter((e) => e.name.toLowerCase().includes(n));
|
|
99
|
-
}, []),
|
|
100
|
-
|
|
22
|
+
}, []), U = H(_, j.org), W = H(B, j.workspace), G = H(V, j.project), K = u((e, t) => {
|
|
23
|
+
M((n) => ({
|
|
101
24
|
...n,
|
|
102
25
|
[e]: t
|
|
103
26
|
}));
|
|
104
|
-
}, []),
|
|
105
|
-
|
|
27
|
+
}, []), q = u((e) => {
|
|
28
|
+
A(e), M({
|
|
106
29
|
org: "",
|
|
107
30
|
workspace: "",
|
|
108
31
|
project: ""
|
|
109
32
|
}), setTimeout(() => {
|
|
110
|
-
|
|
33
|
+
F.current?.focus();
|
|
111
34
|
}, 50);
|
|
112
35
|
}, []);
|
|
113
|
-
|
|
114
|
-
if (
|
|
36
|
+
d(() => {
|
|
37
|
+
if (N) return;
|
|
115
38
|
let e = (e) => {
|
|
116
|
-
|
|
39
|
+
P.current && !P.current.contains(e.target) && O(!1);
|
|
117
40
|
};
|
|
118
|
-
if (
|
|
119
|
-
}, [
|
|
120
|
-
if (
|
|
121
|
-
|
|
41
|
+
if (D) return document.addEventListener("mousedown", e), () => document.removeEventListener("mousedown", e);
|
|
42
|
+
}, [D, N]), d(() => {
|
|
43
|
+
if (D) {
|
|
44
|
+
A(I.current ? "workspace" : "org");
|
|
122
45
|
let e = setTimeout(() => {
|
|
123
|
-
|
|
46
|
+
F.current?.focus();
|
|
124
47
|
}, 100);
|
|
125
48
|
return () => clearTimeout(e);
|
|
126
49
|
}
|
|
127
|
-
|
|
50
|
+
M({
|
|
128
51
|
org: "",
|
|
129
52
|
workspace: "",
|
|
130
53
|
project: ""
|
|
131
54
|
});
|
|
132
|
-
}, [
|
|
133
|
-
let
|
|
134
|
-
|
|
135
|
-
},
|
|
136
|
-
|
|
137
|
-
},
|
|
138
|
-
|
|
139
|
-
},
|
|
55
|
+
}, [D]);
|
|
56
|
+
let J = (e) => {
|
|
57
|
+
C && C(e);
|
|
58
|
+
}, Y = (e) => {
|
|
59
|
+
w && w(e);
|
|
60
|
+
}, X = (e) => {
|
|
61
|
+
T && T(e), O(!1);
|
|
62
|
+
}, Z = () => /* @__PURE__ */ g(m, { children: [/* @__PURE__ */ g("div", {
|
|
140
63
|
className: "flex items-stretch border-b border-[var(--color-border-subtle)] bg-[var(--color-bg-surface)]",
|
|
141
64
|
children: [
|
|
142
|
-
/* @__PURE__ */
|
|
65
|
+
/* @__PURE__ */ h(a, {
|
|
143
66
|
label: "Organization",
|
|
144
|
-
isActive:
|
|
145
|
-
onClick: () =>
|
|
67
|
+
isActive: k === "org",
|
|
68
|
+
onClick: () => q("org")
|
|
146
69
|
}),
|
|
147
|
-
/* @__PURE__ */
|
|
70
|
+
/* @__PURE__ */ h(a, {
|
|
148
71
|
label: "Workspace",
|
|
149
|
-
isActive:
|
|
150
|
-
onClick: () =>
|
|
72
|
+
isActive: k === "workspace",
|
|
73
|
+
onClick: () => q("workspace")
|
|
151
74
|
}),
|
|
152
|
-
/* @__PURE__ */
|
|
75
|
+
/* @__PURE__ */ h(a, {
|
|
153
76
|
label: "Project",
|
|
154
|
-
isActive:
|
|
155
|
-
onClick: () =>
|
|
77
|
+
isActive: k === "project",
|
|
78
|
+
onClick: () => q("project")
|
|
156
79
|
})
|
|
157
80
|
]
|
|
158
|
-
}), /* @__PURE__ */
|
|
81
|
+
}), /* @__PURE__ */ g("div", {
|
|
159
82
|
className: "flex-1 overflow-hidden",
|
|
160
83
|
children: [
|
|
161
|
-
|
|
162
|
-
|
|
163
|
-
|
|
164
|
-
|
|
165
|
-
|
|
166
|
-
|
|
167
|
-
|
|
168
|
-
|
|
169
|
-
className: "flex-1 overflow-y-auto py-1",
|
|
170
|
-
children: V.length > 0 ? V.map((e, t) => /* @__PURE__ */ u("button", {
|
|
171
|
-
onClick: () => K(e),
|
|
172
|
-
className: `w-full flex items-center gap-3 px-4 py-3 text-sm transition-all duration-200 ease-out animate-in fade-in-0 slide-in-from-left-2 ${e.id === v ? "bg-[var(--color-bg-accent)] text-[var(--color-text-primary)] font-medium" : "text-[var(--color-text-primary)] hover:bg-[var(--color-action-ghost-bgHover)] hover:translate-x-0.5"}`,
|
|
173
|
-
style: { animationDelay: `${t * 30}ms` },
|
|
174
|
-
children: [
|
|
175
|
-
/* @__PURE__ */ l("svg", {
|
|
176
|
-
className: "size-5 text-[var(--color-text-secondary)] flex-shrink-0",
|
|
177
|
-
fill: "none",
|
|
178
|
-
stroke: "currentColor",
|
|
179
|
-
viewBox: "0 0 24 24",
|
|
180
|
-
children: /* @__PURE__ */ l("path", {
|
|
181
|
-
strokeLinecap: "round",
|
|
182
|
-
strokeLinejoin: "round",
|
|
183
|
-
strokeWidth: 2,
|
|
184
|
-
d: "M19 21V5a2 2 0 00-2-2H7a2 2 0 00-2 2v16m14 0h2m-2 0h-5m-9 0H3m2 0h5M9 7h1m-1 4h1m4-4h1m-1 4h1m-5 10v-5a1 1 0 011-1h2a1 1 0 011 1v5m-4 0h4"
|
|
185
|
-
})
|
|
186
|
-
}),
|
|
187
|
-
/* @__PURE__ */ l("span", {
|
|
188
|
-
className: "flex-1 text-left truncate",
|
|
189
|
-
children: e.name
|
|
190
|
-
}),
|
|
191
|
-
e.id === v && /* @__PURE__ */ l("svg", {
|
|
192
|
-
className: "size-5 text-[var(--color-action-primary-bg)] flex-shrink-0 animate-in zoom-in-50 duration-200",
|
|
193
|
-
fill: "currentColor",
|
|
194
|
-
viewBox: "0 0 20 20",
|
|
195
|
-
children: /* @__PURE__ */ l("path", {
|
|
196
|
-
fillRule: "evenodd",
|
|
197
|
-
d: "M16.707 5.293a1 1 0 010 1.414l-8 8a1 1 0 01-1.414 0l-4-4a1 1 0 011.414-1.414L8 12.586l7.293-7.293a1 1 0 011.414 0z",
|
|
198
|
-
clipRule: "evenodd"
|
|
199
|
-
})
|
|
200
|
-
})
|
|
201
|
-
]
|
|
202
|
-
}, e.id)) : /* @__PURE__ */ l(p, {
|
|
203
|
-
message: "No organizations available",
|
|
204
|
-
isSearchResult: k.org.length > 0
|
|
205
|
-
})
|
|
206
|
-
})]
|
|
84
|
+
k === "org" && /* @__PURE__ */ h(o, {
|
|
85
|
+
organizations: _,
|
|
86
|
+
searchedOrganizations: U,
|
|
87
|
+
currentOrganizationId: b,
|
|
88
|
+
searchQuery: j.org,
|
|
89
|
+
onSearchChange: (e) => K("org", e),
|
|
90
|
+
onSelect: J,
|
|
91
|
+
searchInputRef: F
|
|
207
92
|
}),
|
|
208
|
-
|
|
209
|
-
|
|
210
|
-
|
|
211
|
-
|
|
212
|
-
|
|
213
|
-
|
|
214
|
-
|
|
215
|
-
|
|
216
|
-
className: "flex-1 overflow-y-auto py-1",
|
|
217
|
-
children: R.length === 0 ? /* @__PURE__ */ l(p, { message: "No workspaces in this organization" }) : H.length > 0 ? H.map((e, t) => /* @__PURE__ */ u("button", {
|
|
218
|
-
onClick: () => q(e),
|
|
219
|
-
className: `w-full flex items-center gap-3 px-4 py-3 text-sm transition-all duration-200 ease-out animate-in fade-in-0 slide-in-from-left-2 ${e.id === y ? "bg-[var(--color-bg-accent)] text-[var(--color-text-primary)] font-medium" : "text-[var(--color-text-primary)] hover:bg-[var(--color-action-ghost-bgHover)] hover:translate-x-0.5"}`,
|
|
220
|
-
style: { animationDelay: `${t * 30}ms` },
|
|
221
|
-
children: [
|
|
222
|
-
/* @__PURE__ */ l("svg", {
|
|
223
|
-
className: "size-5 text-[var(--color-text-secondary)] flex-shrink-0",
|
|
224
|
-
fill: "none",
|
|
225
|
-
stroke: "currentColor",
|
|
226
|
-
viewBox: "0 0 24 24",
|
|
227
|
-
children: /* @__PURE__ */ l("path", {
|
|
228
|
-
strokeLinecap: "round",
|
|
229
|
-
strokeLinejoin: "round",
|
|
230
|
-
strokeWidth: 2,
|
|
231
|
-
d: "M21 13.255A23.931 23.931 0 0112 15c-3.183 0-6.22-.62-9-1.745M16 6V4a2 2 0 00-2-2h-4a2 2 0 00-2 2v2m4 6h.01M5 20h14a2 2 0 002-2V8a2 2 0 00-2-2H5a2 2 0 00-2 2v10a2 2 0 002 2z"
|
|
232
|
-
})
|
|
233
|
-
}),
|
|
234
|
-
/* @__PURE__ */ l("span", {
|
|
235
|
-
className: "flex-1 text-left truncate",
|
|
236
|
-
children: e.name
|
|
237
|
-
}),
|
|
238
|
-
e.id === y && /* @__PURE__ */ l("svg", {
|
|
239
|
-
className: "size-5 text-[var(--color-action-primary-bg)] flex-shrink-0 animate-in zoom-in-50 duration-200",
|
|
240
|
-
fill: "currentColor",
|
|
241
|
-
viewBox: "0 0 20 20",
|
|
242
|
-
children: /* @__PURE__ */ l("path", {
|
|
243
|
-
fillRule: "evenodd",
|
|
244
|
-
d: "M16.707 5.293a1 1 0 010 1.414l-8 8a1 1 0 01-1.414 0l-4-4a1 1 0 011.414-1.414L8 12.586l7.293-7.293a1 1 0 011.414 0z",
|
|
245
|
-
clipRule: "evenodd"
|
|
246
|
-
})
|
|
247
|
-
})
|
|
248
|
-
]
|
|
249
|
-
}, e.id)) : /* @__PURE__ */ l(p, {
|
|
250
|
-
message: "No workspaces found",
|
|
251
|
-
isSearchResult: k.workspace.length > 0
|
|
252
|
-
})
|
|
253
|
-
})]
|
|
93
|
+
k === "workspace" && /* @__PURE__ */ h(s, {
|
|
94
|
+
filteredWorkspaces: B,
|
|
95
|
+
searchedWorkspaces: W,
|
|
96
|
+
currentWorkspaceId: x,
|
|
97
|
+
searchQuery: j.workspace,
|
|
98
|
+
onSearchChange: (e) => K("workspace", e),
|
|
99
|
+
onSelect: Y,
|
|
100
|
+
searchInputRef: F
|
|
254
101
|
}),
|
|
255
|
-
|
|
256
|
-
|
|
257
|
-
|
|
258
|
-
|
|
259
|
-
|
|
260
|
-
|
|
261
|
-
|
|
262
|
-
|
|
263
|
-
className: "flex-1 overflow-y-auto py-1",
|
|
264
|
-
children: z.length === 0 ? /* @__PURE__ */ l(p, { message: "No projects in this workspace" }) : U.length > 0 ? U.map((e, t) => /* @__PURE__ */ u("button", {
|
|
265
|
-
onClick: () => J(e),
|
|
266
|
-
className: `w-full flex items-center gap-3 px-4 py-3 text-sm transition-all duration-200 ease-out animate-in fade-in-0 slide-in-from-left-2 ${e.id === b ? "bg-[var(--color-bg-accent)] text-[var(--color-text-primary)] font-medium" : "text-[var(--color-text-primary)] hover:bg-[var(--color-action-ghost-bgHover)] hover:translate-x-0.5"}`,
|
|
267
|
-
style: { animationDelay: `${t * 30}ms` },
|
|
268
|
-
children: [
|
|
269
|
-
/* @__PURE__ */ l("svg", {
|
|
270
|
-
className: "size-5 text-[var(--color-text-secondary)] flex-shrink-0",
|
|
271
|
-
fill: "none",
|
|
272
|
-
stroke: "currentColor",
|
|
273
|
-
viewBox: "0 0 24 24",
|
|
274
|
-
children: /* @__PURE__ */ l("path", {
|
|
275
|
-
strokeLinecap: "round",
|
|
276
|
-
strokeLinejoin: "round",
|
|
277
|
-
strokeWidth: 2,
|
|
278
|
-
d: "M3 7v10a2 2 0 002 2h14a2 2 0 002-2V9a2 2 0 00-2-2h-6l-2-2H5a2 2 0 00-2 2z"
|
|
279
|
-
})
|
|
280
|
-
}),
|
|
281
|
-
/* @__PURE__ */ l("span", {
|
|
282
|
-
className: "flex-1 text-left truncate",
|
|
283
|
-
children: e.name
|
|
284
|
-
}),
|
|
285
|
-
e.id === b && /* @__PURE__ */ l("svg", {
|
|
286
|
-
className: "size-5 text-[var(--color-action-primary-bg)] flex-shrink-0 animate-in zoom-in-50 duration-200",
|
|
287
|
-
fill: "currentColor",
|
|
288
|
-
viewBox: "0 0 20 20",
|
|
289
|
-
children: /* @__PURE__ */ l("path", {
|
|
290
|
-
fillRule: "evenodd",
|
|
291
|
-
d: "M16.707 5.293a1 1 0 010 1.414l-8 8a1 1 0 01-1.414 0l-4-4a1 1 0 011.414-1.414L8 12.586l7.293-7.293a1 1 0 011.414 0z",
|
|
292
|
-
clipRule: "evenodd"
|
|
293
|
-
})
|
|
294
|
-
})
|
|
295
|
-
]
|
|
296
|
-
}, e.id)) : /* @__PURE__ */ l(p, {
|
|
297
|
-
message: "No projects found",
|
|
298
|
-
isSearchResult: k.project.length > 0
|
|
299
|
-
})
|
|
300
|
-
})]
|
|
102
|
+
k === "project" && /* @__PURE__ */ h(c, {
|
|
103
|
+
filteredProjects: V,
|
|
104
|
+
searchedProjects: G,
|
|
105
|
+
currentProjectId: S,
|
|
106
|
+
searchQuery: j.project,
|
|
107
|
+
onSearchChange: (e) => K("project", e),
|
|
108
|
+
onSelect: X,
|
|
109
|
+
searchInputRef: F
|
|
301
110
|
})
|
|
302
111
|
]
|
|
303
|
-
})] }),
|
|
304
|
-
|
|
305
|
-
|
|
306
|
-
|
|
307
|
-
|
|
308
|
-
|
|
309
|
-
|
|
310
|
-
fill: "none",
|
|
311
|
-
stroke: "currentColor",
|
|
312
|
-
viewBox: "0 0 24 24",
|
|
313
|
-
children: /* @__PURE__ */ l("path", {
|
|
314
|
-
strokeLinecap: "round",
|
|
315
|
-
strokeLinejoin: "round",
|
|
316
|
-
strokeWidth: 2,
|
|
317
|
-
d: "M19 21V5a2 2 0 00-2-2H7a2 2 0 00-2 2v16m14 0h2m-2 0h-5m-9 0H3m2 0h5M9 7h1m-1 4h1m4-4h1m-1 4h1m-5 10v-5a1 1 0 011-1h2a1 1 0 011 1v5m-4 0h4"
|
|
318
|
-
})
|
|
319
|
-
}) : /* @__PURE__ */ u(c, { children: [/* @__PURE__ */ u("div", {
|
|
320
|
-
className: "flex items-center gap-1.5",
|
|
321
|
-
children: [/* @__PURE__ */ l("svg", {
|
|
322
|
-
className: "size-4 text-[var(--color-text-secondary)]",
|
|
323
|
-
fill: "none",
|
|
324
|
-
stroke: "currentColor",
|
|
325
|
-
viewBox: "0 0 24 24",
|
|
326
|
-
children: /* @__PURE__ */ l("path", {
|
|
327
|
-
strokeLinecap: "round",
|
|
328
|
-
strokeLinejoin: "round",
|
|
329
|
-
strokeWidth: 2,
|
|
330
|
-
d: "M19 21V5a2 2 0 00-2-2H7a2 2 0 00-2 2v16m14 0h2m-2 0h-5m-9 0H3m2 0h5M9 7h1m-1 4h1m4-4h1m-1 4h1m-5 10v-5a1 1 0 011-1h2a1 1 0 011 1v5m-4 0h4"
|
|
331
|
-
})
|
|
332
|
-
}), /* @__PURE__ */ u("div", {
|
|
333
|
-
className: "flex items-center gap-1 text-sm",
|
|
334
|
-
children: [
|
|
335
|
-
/* @__PURE__ */ l("span", {
|
|
336
|
-
className: "text-[var(--color-text-primary)] font-medium",
|
|
337
|
-
children: F?.name || "Select Org"
|
|
338
|
-
}),
|
|
339
|
-
/* @__PURE__ */ l("span", {
|
|
340
|
-
className: "text-[var(--color-text-tertiary)]",
|
|
341
|
-
children: "/"
|
|
342
|
-
}),
|
|
343
|
-
/* @__PURE__ */ l("span", {
|
|
344
|
-
className: "text-[var(--color-text-secondary)]",
|
|
345
|
-
children: I?.name || "Workspace"
|
|
346
|
-
}),
|
|
347
|
-
L && /* @__PURE__ */ u(c, { children: [/* @__PURE__ */ l("span", {
|
|
348
|
-
className: "text-[var(--color-text-tertiary)]",
|
|
349
|
-
children: "/"
|
|
350
|
-
}), /* @__PURE__ */ l("span", {
|
|
351
|
-
className: "text-[var(--color-text-secondary)]",
|
|
352
|
-
children: L.name
|
|
353
|
-
})] })
|
|
354
|
-
]
|
|
355
|
-
})]
|
|
356
|
-
}), /* @__PURE__ */ l("svg", {
|
|
357
|
-
className: `w-4 h-4 text-[var(--color-text-secondary)] transition-transform duration-200 ${T ? "rotate-180" : ""}`,
|
|
358
|
-
fill: "none",
|
|
359
|
-
stroke: "currentColor",
|
|
360
|
-
viewBox: "0 0 24 24",
|
|
361
|
-
children: /* @__PURE__ */ l("path", {
|
|
362
|
-
strokeLinecap: "round",
|
|
363
|
-
strokeLinejoin: "round",
|
|
364
|
-
strokeWidth: 2,
|
|
365
|
-
d: "M19 9l-7 7-7-7"
|
|
366
|
-
})
|
|
367
|
-
})] })
|
|
112
|
+
})] }), Q = /* @__PURE__ */ h(l, {
|
|
113
|
+
isOpen: D,
|
|
114
|
+
compact: E,
|
|
115
|
+
currentOrg: L,
|
|
116
|
+
currentWorkspace: R,
|
|
117
|
+
currentProject: z,
|
|
118
|
+
onToggle: () => O(!D)
|
|
368
119
|
});
|
|
369
|
-
return
|
|
120
|
+
return N ? /* @__PURE__ */ g("div", {
|
|
370
121
|
className: "relative",
|
|
371
|
-
children: [
|
|
372
|
-
open:
|
|
373
|
-
onOpenChange:
|
|
374
|
-
children: /* @__PURE__ */
|
|
122
|
+
children: [Q, /* @__PURE__ */ h(e, {
|
|
123
|
+
open: D,
|
|
124
|
+
onOpenChange: O,
|
|
125
|
+
children: /* @__PURE__ */ g(t, {
|
|
375
126
|
side: "bottom",
|
|
376
127
|
className: "h-[70vh] flex flex-col p-0",
|
|
377
|
-
children: [/* @__PURE__ */
|
|
128
|
+
children: [/* @__PURE__ */ h(n, {
|
|
378
129
|
className: "px-4 pt-4 pb-2 border-b border-[var(--color-border-subtle)]",
|
|
379
|
-
children: /* @__PURE__ */
|
|
130
|
+
children: /* @__PURE__ */ h(r, {
|
|
380
131
|
className: "text-[var(--color-text-primary)]",
|
|
381
132
|
children: "Switch Context"
|
|
382
133
|
})
|
|
383
|
-
}), /* @__PURE__ */
|
|
134
|
+
}), /* @__PURE__ */ h("div", {
|
|
384
135
|
className: "flex-1 flex flex-col overflow-hidden",
|
|
385
|
-
children:
|
|
136
|
+
children: Z()
|
|
386
137
|
})]
|
|
387
138
|
})
|
|
388
139
|
})]
|
|
389
|
-
}) : /* @__PURE__ */
|
|
140
|
+
}) : /* @__PURE__ */ g("div", {
|
|
390
141
|
className: "relative",
|
|
391
|
-
ref:
|
|
392
|
-
children: [
|
|
142
|
+
ref: P,
|
|
143
|
+
children: [Q, D && /* @__PURE__ */ h("div", {
|
|
393
144
|
className: "absolute right-0 mt-2 w-[calc(100vw-2rem)] sm:w-[26rem] bg-[var(--color-bg-elevated)] border border-[var(--color-border-default)] rounded-lg shadow-lg z-50 flex flex-col max-h-[400px] animate-in fade-in-0 zoom-in-95 slide-in-from-top-2 duration-200",
|
|
394
|
-
children:
|
|
145
|
+
children: Z()
|
|
395
146
|
})]
|
|
396
147
|
});
|
|
397
148
|
};
|
|
398
149
|
//#endregion
|
|
399
|
-
export {
|
|
150
|
+
export { _ as ContextSwitcher };
|