@burdenoff/fe-libs 2026.527.3 → 2026.527.4

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.
Files changed (94) hide show
  1. package/dist/chrome/ContextSwitcher.js +90 -339
  2. package/dist/chrome/GlobalSearch.js +72 -456
  3. package/dist/chrome/NotificationCenter.js +69 -703
  4. package/dist/chrome/SideNavigation.js +73 -241
  5. package/dist/chrome/contextSwitcher/EmptyState.js +32 -0
  6. package/dist/chrome/contextSwitcher/OrganizationList.js +34 -0
  7. package/dist/chrome/contextSwitcher/ProjectList.js +34 -0
  8. package/dist/chrome/contextSwitcher/SearchInput.js +50 -0
  9. package/dist/chrome/contextSwitcher/TabButton.js +9 -0
  10. package/dist/chrome/contextSwitcher/TriggerButton.js +38 -0
  11. package/dist/chrome/contextSwitcher/WorkspaceList.js +34 -0
  12. package/dist/chrome/contextSwitcher/icons.js +58 -0
  13. package/dist/chrome/contextSwitcher/useIsMobile.js +11 -0
  14. package/dist/chrome/globalSearch/AdvancedFiltersPanel.js +253 -0
  15. package/dist/chrome/globalSearch/CategoryTabs.js +28 -0
  16. package/dist/chrome/globalSearch/ResultsList.js +58 -0
  17. package/dist/chrome/globalSearch/SearchInput.js +28 -0
  18. package/dist/chrome/globalSearch/SearchModeBar.js +36 -0
  19. package/dist/chrome/globalSearch/useAdvancedFilters.js +78 -0
  20. package/dist/chrome/globalSearch/utils.js +22 -0
  21. package/dist/chrome/notificationCenter/BellButton.js +27 -0
  22. package/dist/chrome/notificationCenter/NotificationCardItem.js +129 -0
  23. package/dist/chrome/notificationCenter/NotificationFilters.js +67 -0
  24. package/dist/chrome/notificationCenter/NotificationFooter.js +23 -0
  25. package/dist/chrome/notificationCenter/NotificationHeader.js +75 -0
  26. package/dist/chrome/notificationCenter/NotificationList.js +75 -0
  27. package/dist/chrome/notificationCenter/NotificationPanel.js +19 -0
  28. package/dist/chrome/notificationCenter/SkeletonCard.js +18 -0
  29. package/dist/chrome/notificationCenter/constants.js +93 -0
  30. package/dist/chrome/notificationCenter/gql.js +58 -0
  31. package/dist/chrome/notificationCenter/useNotificationCenter.js +149 -0
  32. package/dist/chrome/notificationCenter/usePanelChrome.js +36 -0
  33. package/dist/chrome/sideNavigation/CollapseToggle.js +29 -0
  34. package/dist/chrome/sideNavigation/MobileActionsBar.js +25 -0
  35. package/dist/chrome/sideNavigation/NavItemRenderer.js +79 -0
  36. package/dist/chrome/sideNavigation/SidebarHeader.js +29 -0
  37. package/dist/chrome/sideNavigation/helpers.js +19 -0
  38. package/dist/chrome/sideNavigation/useSideNavigationState.js +45 -0
  39. package/dist/shared/components/ContextConversationWidget.js +173 -767
  40. package/dist/shared/components/contextConversationWidget/Composer.js +66 -0
  41. package/dist/shared/components/contextConversationWidget/MessageItem.js +124 -0
  42. package/dist/shared/components/contextConversationWidget/MessageList.js +32 -0
  43. package/dist/shared/components/contextConversationWidget/NoWorkspaceCard.js +19 -0
  44. package/dist/shared/components/contextConversationWidget/PendingAttachmentsBar.js +28 -0
  45. package/dist/shared/components/contextConversationWidget/ReplyBanner.js +32 -0
  46. package/dist/shared/components/contextConversationWidget/WidgetHeader.js +70 -0
  47. package/dist/shared/components/contextConversationWidget/queries.js +197 -0
  48. package/dist/shared/components/contextConversationWidget/types.js +10 -0
  49. package/dist/shared/components/contextConversationWidget/useAttachmentUpload.js +57 -0
  50. package/dist/shared/components/contextConversationWidget/useConversationSubscriptions.js +26 -0
  51. package/dist/shared/components/contextConversationWidget/useMessageActions.js +34 -0
  52. package/dist/shared/components/contextConversationWidget/useSendMessage.js +45 -0
  53. package/dist/shared/components/contextConversationWidget/useWidgetMessages.js +44 -0
  54. package/dist/shared/components/contextConversationWidget/utils.js +56 -0
  55. package/dist/shared/pages/SearchPage.js +293 -1076
  56. package/dist/shared/pages/searchPage/ActiveFilterChips.js +176 -0
  57. package/dist/shared/pages/searchPage/FiltersPanel.js +329 -0
  58. package/dist/shared/pages/searchPage/ResultsList.js +119 -0
  59. package/dist/shared/pages/searchPage/ResultsStatus.js +32 -0
  60. package/dist/shared/pages/searchPage/SearchInput.js +31 -0
  61. package/dist/shared/pages/searchPage/SearchPagination.js +37 -0
  62. package/dist/shared/pages/searchPage/SearchToolbar.js +58 -0
  63. package/dist/shared/pages/searchPage/constants.js +155 -0
  64. package/dist/shared/pages/searchPage/utils.js +24 -0
  65. package/dist/shared/providers/shell/AuthProvider.js +130 -384
  66. package/dist/shared/providers/shell/authProvider/bridgeStateSync.js +34 -0
  67. package/dist/shared/providers/shell/authProvider/jwt.js +13 -0
  68. package/dist/shared/providers/shell/authProvider/ssoRelay.js +38 -0
  69. package/dist/shared/providers/shell/authProvider/useAuthActions.js +170 -0
  70. package/dist/shared/providers/shell/authProvider/useBridgeInitialization.js +86 -0
  71. package/dist/shared/providers/shell/authProvider/useRemoteSLO.js +32 -0
  72. package/dist/shared/providers/shell/authProvider/useStorageSync.js +35 -0
  73. package/dist/shared/providers/shell/authProvider/useTokenExpiryTimer.js +37 -0
  74. package/dist/shared/tours/TourTrigger.js +86 -262
  75. package/dist/shared/tours/ToursContext.js +108 -398
  76. package/dist/shared/tours/tourTrigger/DesktopTourDropdown.js +48 -0
  77. package/dist/shared/tours/tourTrigger/MobileTourSheet.js +68 -0
  78. package/dist/shared/tours/tourTrigger/TourListItemDesktop.js +36 -0
  79. package/dist/shared/tours/tourTrigger/TourListItemMobile.js +47 -0
  80. package/dist/shared/tours/tourTrigger/TourStatusChip.js +30 -0
  81. package/dist/shared/tours/tourTrigger/TourTriggerButton.js +22 -0
  82. package/dist/shared/tours/toursContext/errors.js +18 -0
  83. package/dist/shared/tours/toursContext/gql.js +152 -0
  84. package/dist/shared/tours/toursContext/route.js +20 -0
  85. package/dist/shared/tours/toursContext/session.js +19 -0
  86. package/dist/shared/tours/toursContext/useIdleReady.js +18 -0
  87. package/dist/shared/tours/toursContext/useTourMutations.js +118 -0
  88. package/dist/tag/TagsWidget.js +81 -226
  89. package/dist/tag/tagsWidget/AddTagTrigger.js +14 -0
  90. package/dist/tag/tagsWidget/TagBadgeList.js +17 -0
  91. package/dist/tag/tagsWidget/TagSearchPopover.js +80 -0
  92. package/dist/tag/tagsWidget/operations.js +64 -0
  93. package/dist/tag/tagsWidget/useVocabResolver.js +30 -0
  94. package/package.json +1 -1
@@ -1,154 +1,43 @@
1
1
  import { Tooltip as e, TooltipContent as t, TooltipProvider as n, TooltipTrigger as r } from "../ui/tooltip.js";
2
- import { useCallback as i, useEffect as a, useRef as o, useState as s } from "react";
3
- import { Fragment as c, jsx as l, jsxs as u } from "react/jsx-runtime";
2
+ import { NavItemRenderer as i } from "./sideNavigation/NavItemRenderer.js";
3
+ import { SidebarHeader as a } from "./sideNavigation/SidebarHeader.js";
4
+ import { MobileActionsBar as o } from "./sideNavigation/MobileActionsBar.js";
5
+ import { CollapseToggle as s } from "./sideNavigation/CollapseToggle.js";
6
+ import { useSideNavigationState as c } from "./sideNavigation/useSideNavigationState.js";
7
+ import { Fragment as l, jsx as u, jsxs as d } from "react/jsx-runtime";
4
8
  //#region src/chrome/SideNavigation.tsx
5
- function d(e, t, n = !1) {
6
- return e ? e === "/" ? t === "/" : n ? t === e : t === e || t.startsWith(`${e}/`) : !1;
7
- }
8
- function f(e, t) {
9
- return d(e.path, t, e.exact) || d(e.homePath, t, e.exact);
10
- }
11
- var p = (e, t) => f(e, t) ? !0 : e.children ? e.children.some((e) => p(e, t)) : !1, m = (e, t, n = []) => {
12
- for (let r of e) {
13
- if (r.children && r.children.length > 0) {
14
- let e = m(r.children, t, [...n, r.id]);
15
- if (e.size > 0 || r.children.some((e) => f(e, t))) return e.add(r.id), n.forEach((t) => e.add(t)), e;
16
- }
17
- if (f(r, t)) return new Set(n);
18
- }
19
- return /* @__PURE__ */ new Set();
20
- }, h = ({ item: e, depth: t, maxDepth: n, currentPath: r, expandedItems: i, toggleExpand: a, onItemClick: o, onToggleCollapse: s, collapsed: c }) => {
21
- let d = e.children && e.children.length > 0 && t < n, m = i.has(e.id), g = p(e, r), _ = f(e, r), v = t === 0 ? "w-icon-md h-icon-md" : "w-4 h-4";
22
- return /* @__PURE__ */ u("li", { children: [/* @__PURE__ */ l("div", {
23
- className: "relative",
24
- children: /* @__PURE__ */ u("button", {
25
- type: "button",
26
- onClick: () => {
27
- if (c && t === 0 && d) {
28
- o(e.homePath || e.children?.[0]?.path || e.path);
29
- return;
30
- }
31
- d ? a(e.id) : (o(e.path), window.innerWidth < 768 && s && !c && s());
32
- },
33
- className: `
34
- w-full flex items-center gap-icon-gap ${t === 0 ? "py-2" : "py-1.5"} rounded-button
35
- transition-colors duration-200 ease-out
36
- active:scale-[0.98]
37
- ${c && t === 0 ? "md:px-2 md:justify-center" : "px-card-padding"}
38
- ${_ && !d ? "bg-action-primary-bg text-action-primary-text shadow-sm" : g && !m ? "bg-action-ghost-bg-hover text-text-primary" : "text-text-secondary hover:bg-action-ghost-bg-hover hover:text-text-primary"}
39
- `,
40
- "aria-label": e.label,
41
- children: [
42
- e.icon && /* @__PURE__ */ l("div", {
43
- className: `${v} flex-shrink-0 flex items-center justify-center [&>svg]:w-full [&>svg]:h-full [&>svg]:stroke-[1.75]`,
44
- children: typeof e.icon == "string" ? /* @__PURE__ */ l("svg", {
45
- className: "w-full h-full",
46
- fill: "none",
47
- stroke: "currentColor",
48
- viewBox: "0 0 24 24",
49
- children: /* @__PURE__ */ l("path", {
50
- strokeLinecap: "round",
51
- strokeLinejoin: "round",
52
- strokeWidth: 2,
53
- d: e.icon
54
- })
55
- }) : e.icon
56
- }),
57
- /* @__PURE__ */ l("span", {
58
- className: `text-body-sm font-medium flex-1 text-left ${c && t === 0 ? "md:hidden" : ""}`,
59
- children: e.label
60
- }),
61
- e.badge !== void 0 && e.badge > 0 && /* @__PURE__ */ l("span", {
62
- className: `text-xs bg-status-error-bg text-status-error-text px-2 py-0.5 rounded-pill ${c && t === 0 ? "md:hidden" : ""}`,
63
- children: e.badge
64
- }),
65
- d && !(c && t === 0) && /* @__PURE__ */ l("svg", {
66
- className: `w-4 h-4 transition-transform ${m ? "rotate-90" : ""}`,
67
- fill: "none",
68
- stroke: "currentColor",
69
- viewBox: "0 0 24 24",
70
- children: /* @__PURE__ */ l("path", {
71
- strokeLinecap: "round",
72
- strokeLinejoin: "round",
73
- strokeWidth: 2,
74
- d: "M9 5l7 7-7 7"
75
- })
76
- })
77
- ]
78
- })
79
- }), d && m && !c && /* @__PURE__ */ l("ul", {
80
- className: "mt-1 ml-6 space-y-1 border-l border-border-subtle pl-3 animate-in fade-in-0 slide-in-from-top-2 duration-200",
81
- children: e.children.map((e) => /* @__PURE__ */ l(h, {
82
- item: e,
83
- depth: t + 1,
84
- maxDepth: n,
85
- currentPath: r,
86
- expandedItems: i,
87
- toggleExpand: a,
88
- onItemClick: o,
89
- onToggleCollapse: s,
90
- collapsed: c
91
- }, e.id))
92
- })] });
93
- }, g = ({ items: d, currentPath: f, collapsed: p = !1, onItemClick: g, onToggleCollapse: _, collapseLabel: v = "Collapse", header: y, footer: b, mobileActions: x, groupOrder: S, groupLabels: C, maxDepth: w = 4 }) => {
94
- let [T, E] = s(/* @__PURE__ */ new Set()), D = o(p);
95
- a(() => {
96
- D.current = p;
97
- }, [p]), a(() => {
98
- let e = m(d, f);
99
- e.size > 0 && E((t) => {
100
- let n = new Set(t), r = !1;
101
- return e.forEach((e) => {
102
- n.has(e) || (n.add(e), r = !0);
103
- }), r ? n : t;
104
- });
105
- }, [f, d]), a(() => {
106
- if (typeof window > "u" || !_) return;
107
- let e = window.innerWidth < 768, t = () => {
108
- let t = window.innerWidth < 768;
109
- t && (!e || !D.current) && _(), e = t;
110
- };
111
- return t(), window.addEventListener("resize", t), () => {
112
- window.removeEventListener("resize", t);
113
- };
114
- }, [_]);
115
- let O = d.filter((e) => e.visible !== !1), k = (() => {
116
- if (p) return [{
9
+ var f = ({ items: f, currentPath: p, collapsed: m = !1, onItemClick: h, onToggleCollapse: g, collapseLabel: _ = "Collapse", header: v, footer: y, mobileActions: b, groupOrder: x, groupLabels: S, maxDepth: C = 4 }) => {
10
+ let { expandedItems: w, toggleExpand: T, collapseAll: E } = c({
11
+ items: f,
12
+ currentPath: p,
13
+ collapsed: m,
14
+ onToggleCollapse: g
15
+ }), D = f.filter((e) => e.visible !== !1), O = (() => {
16
+ if (m) return [{
117
17
  id: "__all__",
118
18
  label: null,
119
- items: O
19
+ items: D
120
20
  }];
121
21
  let e = /* @__PURE__ */ new Map();
122
- for (let t of O) {
22
+ for (let t of D) {
123
23
  let n = t.group ?? "__default__", r = e.get(n);
124
24
  r ? r.push(t) : e.set(n, [t]);
125
25
  }
126
- return [...S ?? [], ...Array.from(e.keys()).filter((e) => !(S ?? []).includes(e))].filter((t) => (e.get(t)?.length ?? 0) > 0).map((t) => ({
26
+ return [...x ?? [], ...Array.from(e.keys()).filter((e) => !(x ?? []).includes(e))].filter((t) => (e.get(t)?.length ?? 0) > 0).map((t) => ({
127
27
  id: t,
128
- label: t === "__default__" ? null : C?.[t] ?? t,
28
+ label: t === "__default__" ? null : S?.[t] ?? t,
129
29
  items: e.get(t) ?? []
130
30
  }));
131
- })(), A = i((e) => {
132
- E((t) => {
133
- let n = new Set(t);
134
- return n.has(e) ? n.delete(e) : n.add(e), n;
135
- });
136
- }, []);
137
- return a(() => {
138
- if (p) return;
139
- let e = (e) => {
140
- e.key === "Escape" && _ && _();
141
- };
142
- return window.addEventListener("keydown", e), () => window.removeEventListener("keydown", e);
143
- }, [p, _]), /* @__PURE__ */ u(c, { children: [!p && /* @__PURE__ */ u(c, { children: [/* @__PURE__ */ l("div", {
31
+ })();
32
+ return /* @__PURE__ */ d(l, { children: [!m && /* @__PURE__ */ d(l, { children: [/* @__PURE__ */ u("div", {
144
33
  className: "fixed inset-0 bg-bg-overlay z-[109] md:hidden",
145
34
  "aria-hidden": "true"
146
- }), /* @__PURE__ */ l("button", {
35
+ }), /* @__PURE__ */ u("button", {
147
36
  type: "button",
148
37
  className: "fixed inset-y-0 right-0 left-64 z-[112] md:hidden cursor-pointer",
149
- onClick: _,
38
+ onClick: g,
150
39
  "aria-label": "Close sidebar"
151
- })] }), /* @__PURE__ */ u("aside", {
40
+ })] }), /* @__PURE__ */ d("aside", {
152
41
  className: `
153
42
  bg-bg-surface border-r border-border-subtle
154
43
  transition-all duration-normal
@@ -158,28 +47,28 @@ var p = (e, t) => f(e, t) ? !0 : e.children ? e.children.some((e) => p(e, t)) :
158
47
  z-[110] md:z-auto
159
48
  md:h-full
160
49
  overflow-x-hidden
161
- ${p ? "-translate-x-full md:translate-x-0" : "translate-x-0"}
50
+ ${m ? "-translate-x-full md:translate-x-0" : "translate-x-0"}
162
51
  w-64 md:w-auto
163
- ${p ? "md:w-16" : "md:w-64"}
52
+ ${m ? "md:w-16" : "md:w-64"}
164
53
  `,
165
54
  style: {
166
55
  paddingTop: "env(safe-area-inset-top)",
167
56
  paddingBottom: "env(safe-area-inset-bottom)"
168
57
  },
169
58
  children: [
170
- !p && _ && /* @__PURE__ */ l("div", {
59
+ !m && g && /* @__PURE__ */ u("div", {
171
60
  className: "md:hidden flex justify-end px-2 pt-2",
172
- children: /* @__PURE__ */ l("button", {
61
+ children: /* @__PURE__ */ u("button", {
173
62
  type: "button",
174
- onClick: _,
63
+ onClick: g,
175
64
  className: "p-2 rounded-button hover:bg-action-ghost-bg-hover text-text-secondary hover:text-text-primary transition-colors",
176
65
  "aria-label": "Close sidebar",
177
- children: /* @__PURE__ */ l("svg", {
66
+ children: /* @__PURE__ */ u("svg", {
178
67
  className: "size-5",
179
68
  fill: "none",
180
69
  stroke: "currentColor",
181
70
  viewBox: "0 0 24 24",
182
- children: /* @__PURE__ */ l("path", {
71
+ children: /* @__PURE__ */ u("path", {
183
72
  strokeLinecap: "round",
184
73
  strokeLinejoin: "round",
185
74
  strokeWidth: 2,
@@ -188,78 +77,57 @@ var p = (e, t) => f(e, t) ? !0 : e.children ? e.children.some((e) => p(e, t)) :
188
77
  })
189
78
  })
190
79
  }),
191
- y && /* @__PURE__ */ u("div", {
192
- className: `py-card-padding border-b border-border-subtle ${p ? "md:px-2" : "px-card-padding"} relative`,
193
- children: [/* @__PURE__ */ l("div", {
194
- className: T.size > 0 && !p ? "mr-8" : "",
195
- children: y
196
- }), !p && T.size > 0 && /* @__PURE__ */ l("button", {
197
- type: "button",
198
- onClick: () => {
199
- E(/* @__PURE__ */ new Set());
200
- },
201
- className: "absolute top-1/2 -translate-y-1/2 right-3 p-1.5 rounded-button hover:bg-action-ghost-bg-hover text-text-secondary hover:text-text-primary transition-colors",
202
- title: "Collapse all",
203
- "aria-label": "Collapse all menu items",
204
- children: /* @__PURE__ */ l("svg", {
205
- className: "size-4",
206
- fill: "none",
207
- stroke: "currentColor",
208
- viewBox: "0 0 24 24",
209
- children: /* @__PURE__ */ l("path", {
210
- strokeLinecap: "round",
211
- strokeLinejoin: "round",
212
- strokeWidth: 2,
213
- d: "M5 15l7-7 7 7"
214
- })
215
- })
216
- })]
80
+ v && /* @__PURE__ */ u(a, {
81
+ header: v,
82
+ collapsed: m,
83
+ expandedCount: w.size,
84
+ onCollapseAll: E
217
85
  }),
218
- /* @__PURE__ */ l("nav", {
86
+ /* @__PURE__ */ u("nav", {
219
87
  className: "flex-1 min-h-0 py-card-padding overflow-y-auto overflow-x-hidden",
220
- children: /* @__PURE__ */ l(n, {
88
+ children: /* @__PURE__ */ u(n, {
221
89
  delayDuration: 300,
222
- children: /* @__PURE__ */ l("ul", {
90
+ children: /* @__PURE__ */ u("ul", {
223
91
  className: "space-y-list-gap",
224
- children: k.map((n, i) => /* @__PURE__ */ u("li", {
92
+ children: O.map((n, a) => /* @__PURE__ */ d("li", {
225
93
  className: "list-none",
226
94
  children: [
227
- i > 0 && !p && /* @__PURE__ */ l("div", { className: "my-2 border-t border-border-subtle" }),
228
- n.label && !p && /* @__PURE__ */ l("p", {
95
+ a > 0 && !m && /* @__PURE__ */ u("div", { className: "my-2 border-t border-border-subtle" }),
96
+ n.label && !m && /* @__PURE__ */ u("p", {
229
97
  className: "px-card-padding pb-1 text-xs font-semibold uppercase tracking-wider text-text-tertiary",
230
98
  children: n.label
231
99
  }),
232
- /* @__PURE__ */ l("ul", {
100
+ /* @__PURE__ */ u("ul", {
233
101
  className: "space-y-list-gap",
234
- children: n.items.map((n) => p ? /* @__PURE__ */ u(e, { children: [/* @__PURE__ */ l(r, {
102
+ children: n.items.map((n) => m ? /* @__PURE__ */ d(e, { children: [/* @__PURE__ */ u(r, {
235
103
  asChild: !0,
236
- children: /* @__PURE__ */ l(h, {
104
+ children: /* @__PURE__ */ u(i, {
237
105
  item: n,
238
106
  depth: 0,
239
- maxDepth: w,
240
- currentPath: f,
241
- expandedItems: T,
242
- toggleExpand: A,
243
- onItemClick: g,
244
- onToggleCollapse: _,
245
- collapsed: p
107
+ maxDepth: C,
108
+ currentPath: p,
109
+ expandedItems: w,
110
+ toggleExpand: T,
111
+ onItemClick: h,
112
+ onToggleCollapse: g,
113
+ collapsed: m
246
114
  })
247
- }), /* @__PURE__ */ u(t, {
115
+ }), /* @__PURE__ */ d(t, {
248
116
  side: "right",
249
- children: [/* @__PURE__ */ l("p", { children: n.label }), n.badge !== void 0 && n.badge > 0 && /* @__PURE__ */ l("span", {
117
+ children: [/* @__PURE__ */ u("p", { children: n.label }), n.badge !== void 0 && n.badge > 0 && /* @__PURE__ */ u("span", {
250
118
  className: "ml-2 text-xs bg-status-error-bg text-status-error-text px-2 py-0.5 rounded-pill",
251
119
  children: n.badge
252
120
  })]
253
- })] }, n.id) : /* @__PURE__ */ l(h, {
121
+ })] }, n.id) : /* @__PURE__ */ u(i, {
254
122
  item: n,
255
123
  depth: 0,
256
- maxDepth: w,
257
- currentPath: f,
258
- expandedItems: T,
259
- toggleExpand: A,
260
- onItemClick: g,
261
- onToggleCollapse: _,
262
- collapsed: p
124
+ maxDepth: C,
125
+ currentPath: p,
126
+ expandedItems: w,
127
+ toggleExpand: T,
128
+ onItemClick: h,
129
+ onToggleCollapse: g,
130
+ collapsed: m
263
131
  }, n.id))
264
132
  })
265
133
  ]
@@ -267,58 +135,22 @@ var p = (e, t) => f(e, t) ? !0 : e.children ? e.children.some((e) => p(e, t)) :
267
135
  })
268
136
  })
269
137
  }),
270
- b && /* @__PURE__ */ l("div", {
271
- className: `py-card-padding border-t border-border-subtle ${p ? "md:px-2" : "px-card-padding"}`,
272
- children: b
138
+ y && /* @__PURE__ */ u("div", {
139
+ className: `py-card-padding border-t border-border-subtle ${m ? "md:px-2" : "px-card-padding"}`,
140
+ children: y
273
141
  }),
274
- x && x.length > 0 && /* @__PURE__ */ u("div", {
275
- className: "md:hidden py-4 px-4 border-t border-border-subtle bg-bg-canvas/50",
276
- children: [/* @__PURE__ */ l("p", {
277
- className: "text-caption text-text-tertiary mb-3 font-medium uppercase tracking-wider",
278
- children: "Quick Actions"
279
- }), /* @__PURE__ */ l("div", {
280
- className: "flex items-center justify-center gap-3",
281
- children: x.map((e) => /* @__PURE__ */ l("button", {
282
- onClick: () => {
283
- e.onClick(), e.closeSidebar !== !1 && _ && !p && _();
284
- },
285
- className: `flex items-center justify-center w-12 h-12 rounded-xl text-body-sm font-medium transition-all ${e.isToggle && e.isActive ? "bg-action-primary-bg text-action-primary-text shadow-sm" : "bg-bg-surface text-text-primary hover:bg-action-ghost-bg-hover border border-border-subtle hover:border-border-default active:scale-95"}`,
286
- "aria-label": e.label,
287
- title: e.label,
288
- children: /* @__PURE__ */ l("span", {
289
- className: "size-5",
290
- children: e.icon
291
- })
292
- }, e.id))
293
- })]
142
+ b && b.length > 0 && /* @__PURE__ */ u(o, {
143
+ actions: b,
144
+ collapsed: m,
145
+ onToggleCollapse: g
294
146
  }),
295
- _ && /* @__PURE__ */ l("div", {
296
- className: `hidden md:block py-4 border-t border-border-subtle ${p ? "px-2" : "px-card-padding"}`,
297
- children: /* @__PURE__ */ u("button", {
298
- type: "button",
299
- onClick: _,
300
- className: `w-full flex items-center gap-icon-gap py-2 rounded-button text-text-secondary hover:bg-action-ghost-bg-hover hover:text-text-primary transition-colors ${p ? "justify-center px-2" : "px-card-padding"}`,
301
- "aria-label": p ? "Expand sidebar" : "Collapse sidebar",
302
- title: p ? "Expand sidebar" : "Collapse sidebar",
303
- children: [/* @__PURE__ */ l("svg", {
304
- className: `w-icon-md h-icon-md transition-transform ${p ? "rotate-180" : ""}`,
305
- fill: "none",
306
- stroke: "currentColor",
307
- viewBox: "0 0 24 24",
308
- children: /* @__PURE__ */ l("path", {
309
- strokeLinecap: "round",
310
- strokeLinejoin: "round",
311
- strokeWidth: 2,
312
- d: "M15 19l-7-7 7-7"
313
- })
314
- }), !p && /* @__PURE__ */ l("span", {
315
- className: "text-body-sm font-medium",
316
- children: v
317
- })]
318
- })
147
+ g && /* @__PURE__ */ u(s, {
148
+ collapsed: m,
149
+ collapseLabel: _,
150
+ onToggleCollapse: g
319
151
  })
320
152
  ]
321
153
  })] });
322
154
  };
323
155
  //#endregion
324
- export { g as SideNavigation };
156
+ export { f as SideNavigation };
@@ -0,0 +1,32 @@
1
+ import { Fragment as e, jsx as t, jsxs as n } from "react/jsx-runtime";
2
+ //#region src/chrome/contextSwitcher/EmptyState.tsx
3
+ var r = ({ message: r, isSearchResult: i }) => /* @__PURE__ */ t("div", {
4
+ className: "px-4 py-8 text-center animate-in fade-in-0 duration-200",
5
+ children: i ? /* @__PURE__ */ n(e, { children: [
6
+ /* @__PURE__ */ t("svg", {
7
+ className: "size-8 mx-auto mb-2 text-[var(--color-text-tertiary)]",
8
+ fill: "none",
9
+ stroke: "currentColor",
10
+ viewBox: "0 0 24 24",
11
+ children: /* @__PURE__ */ t("path", {
12
+ strokeLinecap: "round",
13
+ strokeLinejoin: "round",
14
+ strokeWidth: 2,
15
+ d: "M21 21l-6-6m2-5a7 7 0 11-14 0 7 7 0 0114 0z"
16
+ })
17
+ }),
18
+ /* @__PURE__ */ t("p", {
19
+ className: "text-[var(--color-text-secondary)] text-sm",
20
+ children: "No results found"
21
+ }),
22
+ /* @__PURE__ */ t("p", {
23
+ className: "text-[var(--color-text-tertiary)] text-xs mt-1",
24
+ children: "Try a different search term"
25
+ })
26
+ ] }) : /* @__PURE__ */ t("p", {
27
+ className: "text-[var(--color-text-secondary)] text-sm",
28
+ children: r
29
+ })
30
+ });
31
+ //#endregion
32
+ export { r as EmptyState };
@@ -0,0 +1,34 @@
1
+ import { SearchInput as e } from "./SearchInput.js";
2
+ import { EmptyState as t } from "./EmptyState.js";
3
+ import { BuildingIcon as n, CheckIcon as r } from "./icons.js";
4
+ import { jsx as i, jsxs as a } from "react/jsx-runtime";
5
+ //#region src/chrome/contextSwitcher/OrganizationList.tsx
6
+ var o = ({ searchedOrganizations: o, currentOrganizationId: s, searchQuery: c, onSearchChange: l, onSelect: u, searchInputRef: d }) => /* @__PURE__ */ a("div", {
7
+ className: "h-full flex flex-col",
8
+ children: [/* @__PURE__ */ i(e, {
9
+ value: c,
10
+ onChange: l,
11
+ placeholder: "Search organizations...",
12
+ inputRef: d
13
+ }), /* @__PURE__ */ i("div", {
14
+ className: "flex-1 overflow-y-auto py-1",
15
+ children: o.length > 0 ? o.map((e, t) => /* @__PURE__ */ a("button", {
16
+ onClick: () => u(e),
17
+ 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 === s ? "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"}`,
18
+ style: { animationDelay: `${t * 30}ms` },
19
+ children: [
20
+ /* @__PURE__ */ i(n, { className: "size-5 text-[var(--color-text-secondary)] flex-shrink-0" }),
21
+ /* @__PURE__ */ i("span", {
22
+ className: "flex-1 text-left truncate",
23
+ children: e.name
24
+ }),
25
+ e.id === s && /* @__PURE__ */ i(r, { className: "size-5 text-[var(--color-action-primary-bg)] flex-shrink-0 animate-in zoom-in-50 duration-200" })
26
+ ]
27
+ }, e.id)) : /* @__PURE__ */ i(t, {
28
+ message: "No organizations available",
29
+ isSearchResult: c.length > 0
30
+ })
31
+ })]
32
+ });
33
+ //#endregion
34
+ export { o as OrganizationList };
@@ -0,0 +1,34 @@
1
+ import { SearchInput as e } from "./SearchInput.js";
2
+ import { EmptyState as t } from "./EmptyState.js";
3
+ import { CheckIcon as n, FolderIcon as r } from "./icons.js";
4
+ import { jsx as i, jsxs as a } from "react/jsx-runtime";
5
+ //#region src/chrome/contextSwitcher/ProjectList.tsx
6
+ var o = ({ filteredProjects: o, searchedProjects: s, currentProjectId: c, searchQuery: l, onSearchChange: u, onSelect: d, searchInputRef: f }) => /* @__PURE__ */ a("div", {
7
+ className: "h-full flex flex-col",
8
+ children: [/* @__PURE__ */ i(e, {
9
+ value: l,
10
+ onChange: u,
11
+ placeholder: "Search projects...",
12
+ inputRef: f
13
+ }), /* @__PURE__ */ i("div", {
14
+ className: "flex-1 overflow-y-auto py-1",
15
+ children: o.length === 0 ? /* @__PURE__ */ i(t, { message: "No projects in this workspace" }) : s.length > 0 ? s.map((e, t) => /* @__PURE__ */ a("button", {
16
+ onClick: () => d(e),
17
+ 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 === c ? "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"}`,
18
+ style: { animationDelay: `${t * 30}ms` },
19
+ children: [
20
+ /* @__PURE__ */ i(r, { className: "size-5 text-[var(--color-text-secondary)] flex-shrink-0" }),
21
+ /* @__PURE__ */ i("span", {
22
+ className: "flex-1 text-left truncate",
23
+ children: e.name
24
+ }),
25
+ e.id === c && /* @__PURE__ */ i(n, { className: "size-5 text-[var(--color-action-primary-bg)] flex-shrink-0 animate-in zoom-in-50 duration-200" })
26
+ ]
27
+ }, e.id)) : /* @__PURE__ */ i(t, {
28
+ message: "No projects found",
29
+ isSearchResult: l.length > 0
30
+ })
31
+ })]
32
+ });
33
+ //#endregion
34
+ export { o as ProjectList };
@@ -0,0 +1,50 @@
1
+ import { jsx as e, jsxs as t } from "react/jsx-runtime";
2
+ //#region src/chrome/contextSwitcher/SearchInput.tsx
3
+ var n = ({ value: n, onChange: r, placeholder: i, inputRef: a }) => /* @__PURE__ */ e("div", {
4
+ className: "relative px-3 py-2 border-b border-[var(--color-border-subtle)]",
5
+ children: /* @__PURE__ */ t("div", {
6
+ className: "relative",
7
+ children: [
8
+ /* @__PURE__ */ e("svg", {
9
+ className: "absolute left-3 top-1/2 -translate-y-1/2 size-4 text-[var(--color-text-tertiary)]",
10
+ fill: "none",
11
+ stroke: "currentColor",
12
+ viewBox: "0 0 24 24",
13
+ children: /* @__PURE__ */ e("path", {
14
+ strokeLinecap: "round",
15
+ strokeLinejoin: "round",
16
+ strokeWidth: 2,
17
+ d: "M21 21l-6-6m2-5a7 7 0 11-14 0 7 7 0 0114 0z"
18
+ })
19
+ }),
20
+ /* @__PURE__ */ e("input", {
21
+ ref: a,
22
+ type: "text",
23
+ value: n,
24
+ onChange: (e) => r(e.target.value),
25
+ placeholder: i,
26
+ 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"
27
+ }),
28
+ n && /* @__PURE__ */ e("button", {
29
+ type: "button",
30
+ onClick: () => r(""),
31
+ 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",
32
+ "aria-label": "Clear search",
33
+ children: /* @__PURE__ */ e("svg", {
34
+ className: "size-4",
35
+ fill: "none",
36
+ stroke: "currentColor",
37
+ viewBox: "0 0 24 24",
38
+ children: /* @__PURE__ */ e("path", {
39
+ strokeLinecap: "round",
40
+ strokeLinejoin: "round",
41
+ strokeWidth: 2,
42
+ d: "M6 18L18 6M6 6l12 12"
43
+ })
44
+ })
45
+ })
46
+ ]
47
+ })
48
+ });
49
+ //#endregion
50
+ export { n as SearchInput };
@@ -0,0 +1,9 @@
1
+ import { jsx as e } from "react/jsx-runtime";
2
+ //#region src/chrome/contextSwitcher/TabButton.tsx
3
+ var t = ({ label: t, isActive: n, onClick: r }) => /* @__PURE__ */ e("button", {
4
+ onClick: r,
5
+ className: `flex-1 px-3 py-2.5 text-[13px] font-medium whitespace-nowrap text-center transition-all duration-200 ease-out ${n ? "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"}`,
6
+ children: t
7
+ });
8
+ //#endregion
9
+ export { t as TabButton };
@@ -0,0 +1,38 @@
1
+ import { BuildingIcon as e, ChevronDownIcon as t } from "./icons.js";
2
+ import { Fragment as n, jsx as r, jsxs as i } from "react/jsx-runtime";
3
+ //#region src/chrome/contextSwitcher/TriggerButton.tsx
4
+ var a = ({ isOpen: a, compact: o, currentOrg: s, currentWorkspace: c, currentProject: l, onToggle: u }) => /* @__PURE__ */ r("button", {
5
+ onClick: u,
6
+ className: `flex items-center gap-2 px-3 py-2 rounded-md hover:bg-[var(--color-action-ghost-bgHover)] transition-all duration-200 ease-out ${a ? "bg-[var(--color-action-ghost-bgHover)]" : ""}`,
7
+ "aria-label": "Switch context",
8
+ "aria-expanded": a,
9
+ children: o ? /* @__PURE__ */ r(e, { className: "size-5 text-[var(--color-text-primary)]" }) : /* @__PURE__ */ i(n, { children: [/* @__PURE__ */ i("div", {
10
+ className: "flex items-center gap-1.5",
11
+ children: [/* @__PURE__ */ r(e, { className: "size-4 text-[var(--color-text-secondary)]" }), /* @__PURE__ */ i("div", {
12
+ className: "flex items-center gap-1 text-sm",
13
+ children: [
14
+ /* @__PURE__ */ r("span", {
15
+ className: "text-[var(--color-text-primary)] font-medium",
16
+ children: s?.name || "Select Org"
17
+ }),
18
+ /* @__PURE__ */ r("span", {
19
+ className: "text-[var(--color-text-tertiary)]",
20
+ children: "/"
21
+ }),
22
+ /* @__PURE__ */ r("span", {
23
+ className: "text-[var(--color-text-secondary)]",
24
+ children: c?.name || "Workspace"
25
+ }),
26
+ l && /* @__PURE__ */ i(n, { children: [/* @__PURE__ */ r("span", {
27
+ className: "text-[var(--color-text-tertiary)]",
28
+ children: "/"
29
+ }), /* @__PURE__ */ r("span", {
30
+ className: "text-[var(--color-text-secondary)]",
31
+ children: l.name
32
+ })] })
33
+ ]
34
+ })]
35
+ }), /* @__PURE__ */ r(t, { className: `w-4 h-4 text-[var(--color-text-secondary)] transition-transform duration-200 ${a ? "rotate-180" : ""}` })] })
36
+ });
37
+ //#endregion
38
+ export { a as TriggerButton };
@@ -0,0 +1,34 @@
1
+ import { SearchInput as e } from "./SearchInput.js";
2
+ import { EmptyState as t } from "./EmptyState.js";
3
+ import { BriefcaseIcon as n, CheckIcon as r } from "./icons.js";
4
+ import { jsx as i, jsxs as a } from "react/jsx-runtime";
5
+ //#region src/chrome/contextSwitcher/WorkspaceList.tsx
6
+ var o = ({ filteredWorkspaces: o, searchedWorkspaces: s, currentWorkspaceId: c, searchQuery: l, onSearchChange: u, onSelect: d, searchInputRef: f }) => /* @__PURE__ */ a("div", {
7
+ className: "h-full flex flex-col",
8
+ children: [/* @__PURE__ */ i(e, {
9
+ value: l,
10
+ onChange: u,
11
+ placeholder: "Search workspaces...",
12
+ inputRef: f
13
+ }), /* @__PURE__ */ i("div", {
14
+ className: "flex-1 overflow-y-auto py-1",
15
+ children: o.length === 0 ? /* @__PURE__ */ i(t, { message: "No workspaces in this organization" }) : s.length > 0 ? s.map((e, t) => /* @__PURE__ */ a("button", {
16
+ onClick: () => d(e),
17
+ 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 === c ? "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"}`,
18
+ style: { animationDelay: `${t * 30}ms` },
19
+ children: [
20
+ /* @__PURE__ */ i(n, { className: "size-5 text-[var(--color-text-secondary)] flex-shrink-0" }),
21
+ /* @__PURE__ */ i("span", {
22
+ className: "flex-1 text-left truncate",
23
+ children: e.name
24
+ }),
25
+ e.id === c && /* @__PURE__ */ i(r, { className: "size-5 text-[var(--color-action-primary-bg)] flex-shrink-0 animate-in zoom-in-50 duration-200" })
26
+ ]
27
+ }, e.id)) : /* @__PURE__ */ i(t, {
28
+ message: "No workspaces found",
29
+ isSearchResult: l.length > 0
30
+ })
31
+ })]
32
+ });
33
+ //#endregion
34
+ export { o as WorkspaceList };