@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,492 +1,108 @@
1
1
  import { cn as e } from "../utils/cn.js";
2
2
  import "../utils/index.js";
3
- import { useCallback as t, useEffect as n, useMemo as r, useState as i } from "react";
4
- import { ChevronDown as ee, ChevronUp as te, Clock as ne, ExternalLink as re, Loader2 as ie, Search as ae, SlidersHorizontal as oe, X as se } from "lucide-react";
5
- import { jsx as a, jsxs as o } from "react/jsx-runtime";
3
+ import { debounce as t, isSearchResults as n } from "./globalSearch/utils.js";
4
+ import { SearchInput as r } from "./globalSearch/SearchInput.js";
5
+ import { CategoryTabs as i } from "./globalSearch/CategoryTabs.js";
6
+ import { SearchModeBar as a } from "./globalSearch/SearchModeBar.js";
7
+ import { AdvancedFiltersPanel as o } from "./globalSearch/AdvancedFiltersPanel.js";
8
+ import { ResultsList as s } from "./globalSearch/ResultsList.js";
9
+ import { useAdvancedFilters as c } from "./globalSearch/useAdvancedFilters.js";
10
+ import { useCallback as l, useEffect as u, useMemo as d, useState as f } from "react";
11
+ import { ExternalLink as p } from "lucide-react";
12
+ import { jsx as m, jsxs as h } from "react/jsx-runtime";
6
13
  //#region src/chrome/GlobalSearch.tsx
7
- function ce(e, t) {
8
- let n;
9
- return (...r) => {
10
- n !== void 0 && clearTimeout(n), n = setTimeout(() => {
11
- e(...r);
12
- }, t);
13
- };
14
- }
15
- function s(e) {
16
- return e.split(",").map((e) => e.trim()).filter(Boolean);
17
- }
18
- function c(e) {
19
- if (typeof e != "object" || !e) return !1;
20
- let t = e;
21
- return typeof t.id == "string" && typeof t.title == "string" && typeof t.category == "string" && typeof t.href == "string" && (t.description === void 0 || typeof t.description == "string");
22
- }
23
- function le(e) {
24
- return Array.isArray(e) && e.every(c);
25
- }
26
- function l({ open: c, onClose: l, categories: ue = [], placeholder: de = "Search everything...", recentSearches: fe = [], onSearch: pe, onSelect: me, onViewAllResults: he, className: ge }) {
27
- let [u, d] = i(""), [f, p] = i(void 0), [m, h] = i([]), [g, _] = i(!1), [v, y] = i(null), [b, _e] = i(!1), [x, S] = i("PARTIAL"), [C, w] = i("SCORE_DESC"), [T, E] = i(""), [D, O] = i(""), [k, A] = i(""), [j, M] = i(""), [N, P] = i(""), [F, I] = i(""), [L, R] = i(""), [z, B] = i(""), [V, H] = i(""), [U, W] = i(""), [G, K] = i(""), [q, J] = i(""), [Y, X] = i(""), [Z, Q] = i("EQUALS"), $ = t(() => {
28
- let e = { searchMode: x };
29
- C !== "SCORE_DESC" && (e.sortBy = C);
30
- let t = s(T);
31
- t.length > 0 && (e.productSources = t), D.trim() && (e.projectId = D.trim()), k.trim() && (e.createdBy = k.trim()), j.trim() && (e.updatedBy = j.trim()), (N || F) && (e.dateRange = {}, N && (e.dateRange.from = new Date(N).toISOString()), F && (e.dateRange.to = new Date(F).toISOString())), (L || z) && (e.updatedDateRange = {}, L && (e.updatedDateRange.from = new Date(L).toISOString()), z && (e.updatedDateRange.to = new Date(z).toISOString()));
32
- let n = s(U), r = s(V), i = s(G);
33
- return (n.length > 0 || r.length > 0 || i.length > 0) && (e.tagFilter = {
34
- tagIds: n.length > 0 ? n : void 0,
35
- tagKeys: r.length > 0 ? r : void 0,
36
- hierarchyPaths: i.length > 0 ? i : void 0
37
- }), q.trim() && Y.trim() && (e.metadataConditions = [{
38
- key: q.trim(),
39
- value: Y.trim(),
40
- operator: Z
41
- }]), e;
42
- }, [
43
- k,
44
- N,
45
- F,
46
- q,
47
- Z,
48
- Y,
49
- T,
50
- D,
51
- x,
52
- C,
53
- U,
54
- V,
55
- G,
56
- j,
57
- L,
58
- z
59
- ]);
60
- n(() => {
61
- c || (d(""), p(void 0), h([]), y(null), _e(!1), S("PARTIAL"), w("SCORE_DESC"), E(""), O(""), A(""), M(""), P(""), I(""), R(""), B(""), H(""), W(""), K(""), J(""), X(""), Q("EQUALS"));
62
- }, [c]), n(() => {
63
- if (!c) return;
14
+ function g({ open: g, onClose: _, categories: v = [], placeholder: y = "Search everything...", recentSearches: b = [], onSearch: x, onSelect: S, onViewAllResults: C, className: w }) {
15
+ let [T, E] = f(""), [D, O] = f(void 0), [k, A] = f([]), [j, M] = f(!1), [N, P] = f(null), [F, I] = f(!1), L = c(), { buildFilters: R, reset: z, searchMode: B, setSearchMode: V } = L;
16
+ u(() => {
17
+ g || (E(""), O(void 0), A([]), P(null), I(!1), z());
18
+ }, [g, z]), u(() => {
19
+ if (!g) return;
64
20
  let e = (e) => {
65
- e.key === "Escape" && (e.preventDefault(), l());
21
+ e.key === "Escape" && (e.preventDefault(), _());
66
22
  };
67
23
  return document.addEventListener("keydown", e), () => {
68
24
  document.removeEventListener("keydown", e);
69
25
  };
70
- }, [c, l]);
71
- let ve = r(() => ce(async (e, t, n) => {
26
+ }, [g, _]);
27
+ let H = d(() => t(async (e, t, r) => {
72
28
  if (!e.trim()) {
73
- h([]), y(null);
29
+ A([]), P(null);
74
30
  return;
75
31
  }
76
- _(!0), y(null);
32
+ M(!0), P(null);
77
33
  try {
78
- let r = await pe(e, t, n);
79
- if (!le(r)) throw TypeError("Invalid search results format");
80
- h(r);
34
+ let i = await x(e, t, r);
35
+ if (!n(i)) throw TypeError("Invalid search results format");
36
+ A(i);
81
37
  } catch (e) {
82
- y(e instanceof Error ? e.message : "Search failed"), h([]), console.error("Search error:", e);
38
+ P(e instanceof Error ? e.message : "Search failed"), A([]), console.error("Search error:", e);
83
39
  } finally {
84
- _(!1);
40
+ M(!1);
85
41
  }
86
- }, 300), [pe]);
87
- n(() => {
88
- ve(u, f, $());
42
+ }, 300), [x]);
43
+ u(() => {
44
+ H(T, D, R());
89
45
  }, [
90
- u,
91
- f,
92
- ve,
93
- $
46
+ T,
47
+ D,
48
+ H,
49
+ R
94
50
  ]);
95
- let ye = r(() => m.reduce((e, t) => {
51
+ let U = d(() => k.reduce((e, t) => {
96
52
  let n = t.category;
97
53
  return e[n] || (e[n] = []), e[n].push(t), e;
98
- }, {}), [m]), be = t((e) => {
99
- me(e), l();
100
- }, [me, l]);
101
- return c ? /* @__PURE__ */ a("div", {
102
- className: e("fixed inset-0 z-[9999] flex items-center justify-center bg-bg-overlay backdrop-blur-md", "data-[state=open]:animate-in data-[state=closed]:animate-out", "data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0", ge),
103
- onClick: l,
104
- "data-state": c ? "open" : "closed",
54
+ }, {}), [k]), W = l((e) => {
55
+ S(e), _();
56
+ }, [S, _]);
57
+ return g ? /* @__PURE__ */ m("div", {
58
+ className: e("fixed inset-0 z-[9999] flex items-center justify-center bg-bg-overlay backdrop-blur-md", "data-[state=open]:animate-in data-[state=closed]:animate-out", "data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0", w),
59
+ onClick: _,
60
+ "data-state": g ? "open" : "closed",
105
61
  role: "dialog",
106
62
  "aria-modal": "true",
107
- children: /* @__PURE__ */ a("div", {
63
+ children: /* @__PURE__ */ m("div", {
108
64
  className: "w-full max-w-lg mx-4 max-h-[85dvh] overflow-hidden",
109
65
  onClick: (e) => e.stopPropagation(),
110
- children: /* @__PURE__ */ o("div", {
66
+ children: /* @__PURE__ */ h("div", {
111
67
  className: "overflow-hidden rounded-xl border-2 border-border/50 bg-background shadow-2xl",
112
68
  children: [
113
- /* @__PURE__ */ o("div", {
114
- className: "flex items-center border-b px-3",
115
- children: [
116
- /* @__PURE__ */ a(ae, { className: "size-4 mr-2 flex-shrink-0 opacity-50" }),
117
- /* @__PURE__ */ a("input", {
118
- type: "text",
119
- placeholder: de,
120
- value: u,
121
- onChange: (e) => d(e.target.value),
122
- className: "flex-1 bg-transparent py-3 text-sm outline-none placeholder:text-muted-foreground",
123
- autoFocus: !0
124
- }),
125
- u && /* @__PURE__ */ a("button", {
126
- type: "button",
127
- onClick: () => d(""),
128
- className: "ml-2 rounded-sm opacity-70 hover:opacity-100",
129
- "aria-label": "Clear search",
130
- children: /* @__PURE__ */ a(se, { className: "size-4" })
131
- })
132
- ]
69
+ /* @__PURE__ */ m(r, {
70
+ value: T,
71
+ placeholder: y,
72
+ onChange: E,
73
+ onClear: () => E("")
133
74
  }),
134
- ue.length > 0 && /* @__PURE__ */ o("div", {
135
- className: "flex items-center gap-1 p-2 border-b overflow-x-auto scrollbar-hide scroll-smooth snap-x snap-mandatory",
136
- children: [/* @__PURE__ */ a("button", {
137
- type: "button",
138
- onClick: () => p(void 0),
139
- className: e("px-3 py-1.5 text-xs rounded-md transition-colors whitespace-nowrap flex-shrink-0 snap-start", f === void 0 ? "bg-primary text-primary-foreground" : "bg-muted hover:bg-muted/80"),
140
- children: "All"
141
- }), ue.map((t) => {
142
- let n = t.icon;
143
- return /* @__PURE__ */ o("button", {
144
- type: "button",
145
- onClick: () => p(t.name),
146
- className: e("px-3 py-1.5 text-xs rounded-md transition-colors whitespace-nowrap flex-shrink-0 flex items-center gap-1.5 snap-start", f === t.name ? "bg-primary text-primary-foreground" : "bg-muted hover:bg-muted/80"),
147
- children: [/* @__PURE__ */ a(n, { className: "size-3.5" }), /* @__PURE__ */ a("span", {
148
- className: "hidden xs:inline",
149
- children: t.label
150
- })]
151
- }, t.name);
152
- })]
153
- }),
154
- /* @__PURE__ */ o("div", {
155
- className: "flex items-center justify-between px-3 py-1.5 border-b",
156
- children: [/* @__PURE__ */ a("div", {
157
- className: "flex items-center gap-1",
158
- children: [
159
- "PARTIAL",
160
- "FULLTEXT",
161
- "EXACT"
162
- ].map((t) => /* @__PURE__ */ a("button", {
163
- type: "button",
164
- onClick: () => S(t),
165
- className: e("px-2 py-1 text-[10px] font-medium rounded transition-colors", x === t ? "bg-primary text-primary-foreground" : "bg-muted/60 text-muted-foreground hover:bg-muted"),
166
- title: t === "PARTIAL" ? "Autocomplete — matches prefixes and substrings" : t === "FULLTEXT" ? "Full-text — BM25 word matching with stemming" : "Exact — all search terms must appear",
167
- children: t === "PARTIAL" ? "Partial" : t === "FULLTEXT" ? "Fulltext" : "Exact"
168
- }, t))
169
- }), /* @__PURE__ */ o("button", {
170
- type: "button",
171
- onClick: () => _e((e) => !e),
172
- className: "flex items-center gap-1 px-2 py-1 text-[10px] font-medium text-muted-foreground rounded hover:bg-muted transition-colors",
173
- "aria-expanded": b,
174
- children: [
175
- /* @__PURE__ */ a(oe, { className: "size-3" }),
176
- "Filters",
177
- a(b ? te : ee, { className: "size-3" })
178
- ]
179
- })]
75
+ /* @__PURE__ */ m(i, {
76
+ categories: v,
77
+ selectedCategory: D,
78
+ onSelect: O
180
79
  }),
181
- b && /* @__PURE__ */ o("div", {
182
- className: "px-3 py-2 border-b space-y-2 bg-muted/30 max-h-64 overflow-y-auto",
183
- children: [
184
- /* @__PURE__ */ o("div", {
185
- className: "flex items-center gap-2",
186
- children: [/* @__PURE__ */ a("label", {
187
- className: "text-[10px] font-medium text-muted-foreground w-16 flex-shrink-0",
188
- children: "Sort by"
189
- }), /* @__PURE__ */ o("select", {
190
- value: C,
191
- onChange: (e) => w(e.target.value),
192
- className: "flex-1 h-7 text-xs rounded border border-border bg-background px-2 outline-none",
193
- children: [
194
- /* @__PURE__ */ a("option", {
195
- value: "SCORE_DESC",
196
- children: "Relevance"
197
- }),
198
- /* @__PURE__ */ a("option", {
199
- value: "CREATED_DESC",
200
- children: "Newest first"
201
- }),
202
- /* @__PURE__ */ a("option", {
203
- value: "CREATED_ASC",
204
- children: "Oldest first"
205
- }),
206
- /* @__PURE__ */ a("option", {
207
- value: "UPDATED_DESC",
208
- children: "Recently updated"
209
- }),
210
- /* @__PURE__ */ a("option", {
211
- value: "UPDATED_ASC",
212
- children: "Least recently updated"
213
- }),
214
- /* @__PURE__ */ a("option", {
215
- value: "TITLE_ASC",
216
- children: "Title A-Z"
217
- }),
218
- /* @__PURE__ */ a("option", {
219
- value: "TITLE_DESC",
220
- children: "Title Z-A"
221
- })
222
- ]
223
- })]
224
- }),
225
- /* @__PURE__ */ o("div", {
226
- className: "flex items-center gap-2",
227
- children: [/* @__PURE__ */ a("label", {
228
- className: "text-[10px] font-medium text-muted-foreground w-16 flex-shrink-0",
229
- children: "Products"
230
- }), /* @__PURE__ */ a("input", {
231
- "aria-label": "Product sources filter",
232
- type: "text",
233
- placeholder: "vibecontrols, wspace-tags",
234
- value: T,
235
- onChange: (e) => E(e.target.value),
236
- className: "flex-1 h-7 text-xs rounded border border-border bg-background px-2 outline-none placeholder:text-muted-foreground"
237
- })]
238
- }),
239
- /* @__PURE__ */ o("div", {
240
- className: "flex items-center gap-2",
241
- children: [/* @__PURE__ */ a("label", {
242
- className: "text-[10px] font-medium text-muted-foreground w-16 flex-shrink-0",
243
- children: "Project"
244
- }), /* @__PURE__ */ a("input", {
245
- "aria-label": "Project ID filter",
246
- type: "text",
247
- placeholder: "Project ID",
248
- value: D,
249
- onChange: (e) => O(e.target.value),
250
- className: "flex-1 h-7 text-xs rounded border border-border bg-background px-2 outline-none placeholder:text-muted-foreground"
251
- })]
252
- }),
253
- /* @__PURE__ */ o("div", {
254
- className: "flex items-center gap-2",
255
- children: [/* @__PURE__ */ a("label", {
256
- className: "text-[10px] font-medium text-muted-foreground w-16 flex-shrink-0",
257
- children: "Created by"
258
- }), /* @__PURE__ */ a("input", {
259
- type: "text",
260
- placeholder: "Actor ID",
261
- value: k,
262
- onChange: (e) => A(e.target.value),
263
- className: "flex-1 h-7 text-xs rounded border border-border bg-background px-2 outline-none placeholder:text-muted-foreground"
264
- })]
265
- }),
266
- /* @__PURE__ */ o("div", {
267
- className: "flex items-center gap-2",
268
- children: [/* @__PURE__ */ a("label", {
269
- className: "text-[10px] font-medium text-muted-foreground w-16 flex-shrink-0",
270
- children: "Updated by"
271
- }), /* @__PURE__ */ a("input", {
272
- "aria-label": "Updated by filter",
273
- type: "text",
274
- placeholder: "Actor ID",
275
- value: j,
276
- onChange: (e) => M(e.target.value),
277
- className: "flex-1 h-7 text-xs rounded border border-border bg-background px-2 outline-none placeholder:text-muted-foreground"
278
- })]
279
- }),
280
- /* @__PURE__ */ o("div", {
281
- className: "flex items-center gap-2",
282
- children: [/* @__PURE__ */ a("label", {
283
- className: "text-[10px] font-medium text-muted-foreground w-16 flex-shrink-0",
284
- children: "Date from"
285
- }), /* @__PURE__ */ a("input", {
286
- type: "date",
287
- value: N,
288
- onChange: (e) => P(e.target.value),
289
- className: "flex-1 h-7 text-xs rounded border border-border bg-background px-2 outline-none"
290
- })]
291
- }),
292
- /* @__PURE__ */ o("div", {
293
- className: "flex items-center gap-2",
294
- children: [/* @__PURE__ */ a("label", {
295
- className: "text-[10px] font-medium text-muted-foreground w-16 flex-shrink-0",
296
- children: "Date to"
297
- }), /* @__PURE__ */ a("input", {
298
- type: "date",
299
- value: F,
300
- onChange: (e) => I(e.target.value),
301
- className: "flex-1 h-7 text-xs rounded border border-border bg-background px-2 outline-none"
302
- })]
303
- }),
304
- /* @__PURE__ */ o("div", {
305
- className: "flex items-center gap-2",
306
- children: [/* @__PURE__ */ a("label", {
307
- className: "text-[10px] font-medium text-muted-foreground w-16 flex-shrink-0",
308
- children: "Updated from"
309
- }), /* @__PURE__ */ a("input", {
310
- "aria-label": "Updated from date",
311
- type: "date",
312
- value: L,
313
- onChange: (e) => R(e.target.value),
314
- className: "flex-1 h-7 text-xs rounded border border-border bg-background px-2 outline-none"
315
- })]
316
- }),
317
- /* @__PURE__ */ o("div", {
318
- className: "flex items-center gap-2",
319
- children: [/* @__PURE__ */ a("label", {
320
- className: "text-[10px] font-medium text-muted-foreground w-16 flex-shrink-0",
321
- children: "Updated to"
322
- }), /* @__PURE__ */ a("input", {
323
- "aria-label": "Updated to date",
324
- type: "date",
325
- value: z,
326
- onChange: (e) => B(e.target.value),
327
- className: "flex-1 h-7 text-xs rounded border border-border bg-background px-2 outline-none"
328
- })]
329
- }),
330
- /* @__PURE__ */ o("div", {
331
- className: "flex items-center gap-2",
332
- children: [/* @__PURE__ */ a("label", {
333
- className: "text-[10px] font-medium text-muted-foreground w-16 flex-shrink-0",
334
- children: "Tag keys"
335
- }), /* @__PURE__ */ a("input", {
336
- "aria-label": "Tag keys filter",
337
- type: "text",
338
- placeholder: "search, team/platform",
339
- value: V,
340
- onChange: (e) => H(e.target.value),
341
- className: "flex-1 h-7 text-xs rounded border border-border bg-background px-2 outline-none placeholder:text-muted-foreground"
342
- })]
343
- }),
344
- /* @__PURE__ */ o("div", {
345
- className: "flex items-center gap-2",
346
- children: [/* @__PURE__ */ a("label", {
347
- className: "text-[10px] font-medium text-muted-foreground w-16 flex-shrink-0",
348
- children: "Tag IDs"
349
- }), /* @__PURE__ */ a("input", {
350
- "aria-label": "Tag IDs filter",
351
- type: "text",
352
- placeholder: "Comma-separated IDs",
353
- value: U,
354
- onChange: (e) => W(e.target.value),
355
- className: "flex-1 h-7 text-xs rounded border border-border bg-background px-2 outline-none placeholder:text-muted-foreground"
356
- })]
357
- }),
358
- /* @__PURE__ */ o("div", {
359
- className: "flex items-center gap-2",
360
- children: [/* @__PURE__ */ a("label", {
361
- className: "text-[10px] font-medium text-muted-foreground w-16 flex-shrink-0",
362
- children: "Tag paths"
363
- }), /* @__PURE__ */ a("input", {
364
- "aria-label": "Tag hierarchy filter",
365
- type: "text",
366
- placeholder: "team/engineering",
367
- value: G,
368
- onChange: (e) => K(e.target.value),
369
- className: "flex-1 h-7 text-xs rounded border border-border bg-background px-2 outline-none placeholder:text-muted-foreground"
370
- })]
371
- }),
372
- /* @__PURE__ */ o("div", {
373
- className: "grid grid-cols-[1fr_auto_1fr] gap-2 items-center",
374
- children: [
375
- /* @__PURE__ */ a("input", {
376
- "aria-label": "Metadata key filter",
377
- type: "text",
378
- placeholder: "metadata.path",
379
- value: q,
380
- onChange: (e) => J(e.target.value),
381
- className: "h-7 text-xs rounded border border-border bg-background px-2 outline-none placeholder:text-muted-foreground"
382
- }),
383
- /* @__PURE__ */ o("select", {
384
- "aria-label": "Metadata operator filter",
385
- value: Z,
386
- onChange: (e) => Q(e.target.value),
387
- className: "h-7 text-xs rounded border border-border bg-background px-2 outline-none",
388
- children: [
389
- /* @__PURE__ */ a("option", {
390
- value: "EQUALS",
391
- children: "="
392
- }),
393
- /* @__PURE__ */ a("option", {
394
- value: "NOT_EQUALS",
395
- children: "≠"
396
- }),
397
- /* @__PURE__ */ a("option", {
398
- value: "CONTAINS",
399
- children: "contains"
400
- }),
401
- /* @__PURE__ */ a("option", {
402
- value: "STARTS_WITH",
403
- children: "starts"
404
- })
405
- ]
406
- }),
407
- /* @__PURE__ */ a("input", {
408
- "aria-label": "Metadata value filter",
409
- type: "text",
410
- placeholder: "Value",
411
- value: Y,
412
- onChange: (e) => X(e.target.value),
413
- className: "h-7 text-xs rounded border border-border bg-background px-2 outline-none placeholder:text-muted-foreground"
414
- })
415
- ]
416
- }),
417
- /* @__PURE__ */ a("div", {
418
- className: "flex justify-end",
419
- children: /* @__PURE__ */ a("button", {
420
- type: "button",
421
- onClick: () => {
422
- S("PARTIAL"), w("SCORE_DESC"), E(""), O(""), A(""), M(""), P(""), I(""), R(""), B(""), H(""), W(""), K(""), J(""), X(""), Q("EQUALS");
423
- },
424
- className: "text-[10px] text-muted-foreground hover:text-foreground transition-colors",
425
- children: "Clear filters"
426
- })
427
- })
428
- ]
80
+ /* @__PURE__ */ m(a, {
81
+ searchMode: B,
82
+ onSearchModeChange: V,
83
+ showAdvanced: F,
84
+ onToggleAdvanced: () => I((e) => !e)
429
85
  }),
430
- /* @__PURE__ */ o("div", {
431
- className: "max-h-[60dvh] overflow-y-auto p-2",
432
- children: [
433
- g && /* @__PURE__ */ a("div", {
434
- className: "flex items-center justify-center py-6",
435
- children: /* @__PURE__ */ a(ie, { className: "size-4 animate-spin" })
436
- }),
437
- v && /* @__PURE__ */ a("div", {
438
- className: "py-6 text-center text-sm text-destructive",
439
- children: v
440
- }),
441
- !g && !v && !u && fe.length > 0 && /* @__PURE__ */ o("div", { children: [/* @__PURE__ */ a("div", {
442
- className: "px-2 py-1.5 text-xs font-medium text-muted-foreground",
443
- children: "Recent Searches"
444
- }), fe.map((e, t) => /* @__PURE__ */ o("button", {
445
- type: "button",
446
- onClick: () => d(e),
447
- className: "w-full flex items-center gap-2 px-2 py-2 text-sm rounded-md hover:bg-accent transition-colors text-left",
448
- children: [/* @__PURE__ */ a(ne, { className: "size-4 opacity-50" }), e]
449
- }, t))] }),
450
- !g && !v && u && m.length === 0 && /* @__PURE__ */ o("div", {
451
- className: "py-6 text-center text-sm text-muted-foreground",
452
- children: [
453
- "No results found for \"",
454
- u,
455
- "\""
456
- ]
457
- }),
458
- !g && !v && Object.entries(ye).map(([e, t]) => /* @__PURE__ */ o("div", { children: [/* @__PURE__ */ a("div", {
459
- className: "px-2 py-1.5 text-xs font-medium text-muted-foreground",
460
- children: e
461
- }), t.map((e) => {
462
- let t = e.icon;
463
- return /* @__PURE__ */ o("button", {
464
- type: "button",
465
- onClick: () => be(e),
466
- className: "w-full flex items-start gap-2 px-2 py-2 text-sm rounded-md hover:bg-accent transition-colors text-left",
467
- children: [t && /* @__PURE__ */ a(t, { className: "size-4 mt-0.5 flex-shrink-0" }), /* @__PURE__ */ o("div", {
468
- className: "flex-1 min-w-0",
469
- children: [/* @__PURE__ */ a("div", {
470
- className: "font-medium truncate",
471
- children: e.title
472
- }), e.description && /* @__PURE__ */ a("div", {
473
- className: "text-xs text-muted-foreground truncate",
474
- children: e.description
475
- })]
476
- })]
477
- }, e.id);
478
- })] }, e))
479
- ]
86
+ F && /* @__PURE__ */ m(o, { filters: L }),
87
+ /* @__PURE__ */ m(s, {
88
+ loading: j,
89
+ error: N,
90
+ query: T,
91
+ results: k,
92
+ groupedResults: U,
93
+ recentSearches: b,
94
+ onRecentSelect: E,
95
+ onResultSelect: W
480
96
  }),
481
- u && m.length > 0 && he && /* @__PURE__ */ a("div", {
97
+ T && k.length > 0 && C && /* @__PURE__ */ m("div", {
482
98
  className: "border-t p-2",
483
- children: /* @__PURE__ */ o("button", {
99
+ children: /* @__PURE__ */ h("button", {
484
100
  type: "button",
485
101
  onClick: () => {
486
- he(u, $(), f), l();
102
+ C(T, R(), D), _();
487
103
  },
488
104
  className: "w-full flex items-center justify-center gap-2 py-2 text-sm text-primary hover:bg-accent rounded-md transition-colors",
489
- children: [/* @__PURE__ */ a(re, { className: "size-4" }), "View all results"]
105
+ children: [/* @__PURE__ */ m(p, { className: "size-4" }), "View all results"]
490
106
  })
491
107
  })
492
108
  ]
@@ -495,4 +111,4 @@ function l({ open: c, onClose: l, categories: ue = [], placeholder: de = "Search
495
111
  }) : null;
496
112
  }
497
113
  //#endregion
498
- export { l as GlobalSearch };
114
+ export { g as GlobalSearch };