@btst/plugin-search 0.0.0-stage → 1.0.0-beta.2

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 (86) hide show
  1. package/LICENSE.md +17 -0
  2. package/dist/api/index.cjs +17 -0
  3. package/dist/api/index.d.cts +62 -0
  4. package/dist/api/index.d.mts +62 -0
  5. package/dist/api/index.d.ts +62 -0
  6. package/dist/api/index.mjs +4 -0
  7. package/dist/api/operations.cjs +127 -0
  8. package/dist/api/operations.mjs +125 -0
  9. package/dist/api/plugin.cjs +23 -0
  10. package/dist/api/plugin.mjs +21 -0
  11. package/dist/client/components/index.cjs +11 -0
  12. package/dist/client/components/index.d.cts +35 -0
  13. package/dist/client/components/index.d.mts +35 -0
  14. package/dist/client/components/index.d.ts +35 -0
  15. package/dist/client/components/index.mjs +3 -0
  16. package/dist/client/components/pages/search-page.cjs +39 -0
  17. package/dist/client/components/pages/search-page.internal.cjs +100 -0
  18. package/dist/client/components/pages/search-page.internal.mjs +98 -0
  19. package/dist/client/components/pages/search-page.mjs +37 -0
  20. package/dist/client/components/search-dialog.cjs +148 -0
  21. package/dist/client/components/search-dialog.mjs +145 -0
  22. package/dist/client/components/search-results.cjs +100 -0
  23. package/dist/client/components/search-results.mjs +96 -0
  24. package/dist/client/components/source-filter.cjs +31 -0
  25. package/dist/client/components/source-filter.mjs +29 -0
  26. package/dist/client/constants.cjs +5 -0
  27. package/dist/client/constants.mjs +3 -0
  28. package/dist/client/hooks/index.cjs +10 -0
  29. package/dist/client/hooks/index.d.cts +340 -0
  30. package/dist/client/hooks/index.d.mts +340 -0
  31. package/dist/client/hooks/index.d.ts +340 -0
  32. package/dist/client/hooks/index.mjs +3 -0
  33. package/dist/client/hooks/use-search-state.cjs +36 -0
  34. package/dist/client/hooks/use-search-state.mjs +34 -0
  35. package/dist/client/hooks/use-search.cjs +44 -0
  36. package/dist/client/hooks/use-search.mjs +42 -0
  37. package/dist/client/index.cjs +7 -0
  38. package/dist/client/index.d.cts +55 -0
  39. package/dist/client/index.d.mts +55 -0
  40. package/dist/client/index.d.ts +55 -0
  41. package/dist/client/index.mjs +1 -0
  42. package/dist/client/plugin.cjs +76 -0
  43. package/dist/client/plugin.mjs +74 -0
  44. package/dist/client/search-state.cjs +20 -0
  45. package/dist/client/search-state.mjs +17 -0
  46. package/dist/permissions.cjs +12 -0
  47. package/dist/permissions.d.cts +12 -0
  48. package/dist/permissions.d.mts +12 -0
  49. package/dist/permissions.d.ts +12 -0
  50. package/dist/permissions.mjs +10 -0
  51. package/dist/providers.cjs +122 -0
  52. package/dist/providers.d.cts +82 -0
  53. package/dist/providers.d.mts +82 -0
  54. package/dist/providers.d.ts +82 -0
  55. package/dist/providers.mjs +116 -0
  56. package/dist/query-keys.cjs +35 -0
  57. package/dist/query-keys.d.cts +71 -0
  58. package/dist/query-keys.d.mts +71 -0
  59. package/dist/query-keys.d.ts +71 -0
  60. package/dist/query-keys.mjs +32 -0
  61. package/dist/schemas.cjs +23 -0
  62. package/dist/schemas.d.cts +14 -0
  63. package/dist/schemas.d.mts +14 -0
  64. package/dist/schemas.d.ts +14 -0
  65. package/dist/schemas.mjs +17 -0
  66. package/dist/shared/plugin-search.5GvThkZW.d.cts +20 -0
  67. package/dist/shared/plugin-search.5GvThkZW.d.mts +20 -0
  68. package/dist/shared/plugin-search.5GvThkZW.d.ts +20 -0
  69. package/dist/style.css +2 -0
  70. package/dist/types.cjs +2 -0
  71. package/dist/types.d.cts +53 -0
  72. package/dist/types.d.mts +53 -0
  73. package/dist/types.d.ts +53 -0
  74. package/dist/types.mjs +1 -0
  75. package/dist/ui/src/components/button.cjs +56 -0
  76. package/dist/ui/src/components/button.mjs +53 -0
  77. package/dist/ui/src/components/command.cjs +88 -0
  78. package/dist/ui/src/components/command.mjs +83 -0
  79. package/dist/ui/src/components/dialog.cjs +127 -0
  80. package/dist/ui/src/components/dialog.mjs +105 -0
  81. package/dist/ui/src/components/input.cjs +23 -0
  82. package/dist/ui/src/components/input.mjs +21 -0
  83. package/dist/ui/src/lib/utils.cjs +10 -0
  84. package/dist/ui/src/lib/utils.mjs +8 -0
  85. package/package.json +181 -3
  86. package/README.md +0 -3
@@ -0,0 +1,96 @@
1
+ 'use client';
2
+ import { jsxs, jsx } from 'react/jsx-runtime';
3
+ import { useStack } from '@btst/stack/context';
4
+ import { Button } from '../../ui/src/components/button.mjs';
5
+
6
+ function SearchStatus({
7
+ query,
8
+ data,
9
+ loading,
10
+ error,
11
+ emptyMessage = "No results found.",
12
+ onRetry
13
+ }) {
14
+ if (error) {
15
+ return /* @__PURE__ */ jsxs("div", { className: "space-y-3 p-4", role: "alert", children: [
16
+ /* @__PURE__ */ jsx("p", { children: "Search could not be completed. Check your access or try again." }),
17
+ /* @__PURE__ */ jsx(Button, { type: "button", variant: "outline", onClick: onRetry, children: "Retry search" })
18
+ ] });
19
+ }
20
+ if (loading)
21
+ return /* @__PURE__ */ jsx("p", { className: "p-4 text-sm", role: "status", children: "Searching\u2026" });
22
+ if (!query.trim()) {
23
+ return /* @__PURE__ */ jsx("p", { className: "p-4 text-sm text-muted-foreground", children: "Enter a search term." });
24
+ }
25
+ if (data?.items.length === 0) {
26
+ return /* @__PURE__ */ jsx("p", { className: "p-4 text-sm text-muted-foreground", role: "status", children: emptyMessage });
27
+ }
28
+ return null;
29
+ }
30
+ function SearchResults({ data }) {
31
+ const { router } = useStack();
32
+ const Link = router?.Link ?? "a";
33
+ return /* @__PURE__ */ jsx(
34
+ "ul",
35
+ {
36
+ className: "divide-y",
37
+ "aria-label": "Search results",
38
+ "data-testid": "search-results",
39
+ children: data.items.map((item) => /* @__PURE__ */ jsx("li", { children: /* @__PURE__ */ jsxs(
40
+ Link,
41
+ {
42
+ href: item.href,
43
+ className: "block space-y-2 rounded-sm p-4 hover:bg-accent focus-visible:outline-2 focus-visible:outline-ring",
44
+ "data-testid": "search-result",
45
+ children: [
46
+ /* @__PURE__ */ jsx("span", { className: "block text-xs text-muted-foreground", children: item.sourceLabel }),
47
+ /* @__PURE__ */ jsx("span", { className: "block font-medium", children: item.title }),
48
+ item.snippet && /* @__PURE__ */ jsx("span", { className: "block text-sm text-muted-foreground", children: item.snippet })
49
+ ]
50
+ }
51
+ ) }, item.key))
52
+ }
53
+ );
54
+ }
55
+ function SearchPagination({
56
+ page,
57
+ hasMore,
58
+ loading,
59
+ onPageChange
60
+ }) {
61
+ return /* @__PURE__ */ jsxs(
62
+ "nav",
63
+ {
64
+ "aria-label": "Search pagination",
65
+ className: "flex items-center justify-between gap-3 border-t p-4 text-sm",
66
+ children: [
67
+ /* @__PURE__ */ jsx(
68
+ Button,
69
+ {
70
+ type: "button",
71
+ variant: "outline",
72
+ disabled: page <= 1 || loading,
73
+ onClick: () => onPageChange(page - 1),
74
+ children: "Previous page"
75
+ }
76
+ ),
77
+ /* @__PURE__ */ jsxs("span", { children: [
78
+ "Page ",
79
+ page
80
+ ] }),
81
+ /* @__PURE__ */ jsx(
82
+ Button,
83
+ {
84
+ type: "button",
85
+ variant: "outline",
86
+ disabled: !hasMore || loading,
87
+ onClick: () => onPageChange(page + 1),
88
+ children: "Next page"
89
+ }
90
+ )
91
+ ]
92
+ }
93
+ );
94
+ }
95
+
96
+ export { SearchPagination, SearchResults, SearchStatus };
@@ -0,0 +1,31 @@
1
+ 'use client';
2
+ 'use strict';
3
+
4
+ const jsxRuntime = require('react/jsx-runtime');
5
+ const react = require('react');
6
+
7
+ function SourceFilter({
8
+ sources,
9
+ value,
10
+ onChange
11
+ }) {
12
+ const id = react.useId();
13
+ return /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "flex flex-wrap items-center gap-3", children: [
14
+ /* @__PURE__ */ jsxRuntime.jsx("label", { htmlFor: id, className: "text-sm font-medium", children: "Source" }),
15
+ /* @__PURE__ */ jsxRuntime.jsxs(
16
+ "select",
17
+ {
18
+ id,
19
+ className: "min-h-10 max-w-full rounded-md border border-input bg-background px-3 text-sm focus-visible:outline-2 focus-visible:outline-ring",
20
+ value,
21
+ onChange: (event) => onChange(event.target.value),
22
+ children: [
23
+ /* @__PURE__ */ jsxRuntime.jsx("option", { value: "", children: "All sources" }),
24
+ sources.map((source) => /* @__PURE__ */ jsxRuntime.jsx("option", { value: source.id, children: source.label }, source.id))
25
+ ]
26
+ }
27
+ )
28
+ ] });
29
+ }
30
+
31
+ exports.SourceFilter = SourceFilter;
@@ -0,0 +1,29 @@
1
+ 'use client';
2
+ import { jsxs, jsx } from 'react/jsx-runtime';
3
+ import { useId } from 'react';
4
+
5
+ function SourceFilter({
6
+ sources,
7
+ value,
8
+ onChange
9
+ }) {
10
+ const id = useId();
11
+ return /* @__PURE__ */ jsxs("div", { className: "flex flex-wrap items-center gap-3", children: [
12
+ /* @__PURE__ */ jsx("label", { htmlFor: id, className: "text-sm font-medium", children: "Source" }),
13
+ /* @__PURE__ */ jsxs(
14
+ "select",
15
+ {
16
+ id,
17
+ className: "min-h-10 max-w-full rounded-md border border-input bg-background px-3 text-sm focus-visible:outline-2 focus-visible:outline-ring",
18
+ value,
19
+ onChange: (event) => onChange(event.target.value),
20
+ children: [
21
+ /* @__PURE__ */ jsx("option", { value: "", children: "All sources" }),
22
+ sources.map((source) => /* @__PURE__ */ jsx("option", { value: source.id, children: source.label }, source.id))
23
+ ]
24
+ }
25
+ )
26
+ ] });
27
+ }
28
+
29
+ export { SourceFilter };
@@ -0,0 +1,5 @@
1
+ 'use strict';
2
+
3
+ const SEARCH_PLUGIN_ID = "search";
4
+
5
+ exports.SEARCH_PLUGIN_ID = SEARCH_PLUGIN_ID;
@@ -0,0 +1,3 @@
1
+ const SEARCH_PLUGIN_ID = "search";
2
+
3
+ export { SEARCH_PLUGIN_ID };
@@ -0,0 +1,10 @@
1
+ 'use client';
2
+ 'use strict';
3
+
4
+ const useSearch = require('./use-search.cjs');
5
+ const useSearchState = require('./use-search-state.cjs');
6
+
7
+
8
+
9
+ exports.useSearch = useSearch.useSearch;
10
+ exports.useSearchState = useSearchState.useSearchState;
@@ -0,0 +1,340 @@
1
+ 'use client';
2
+ import * as _tanstack_react_query from '@tanstack/react-query';
3
+ import { SearchResponse } from '../../types.cjs';
4
+ import { SearchQueryParams } from '../../query-keys.cjs';
5
+ import * as _btst_stack_client from '@btst/stack/client';
6
+ import { S as SearchListState } from '../../shared/plugin-search.5GvThkZW.cjs';
7
+ import '@btst/stack/plugins/api';
8
+ import '@btst/stack/plugins/client';
9
+ import '@btst/stack/context';
10
+
11
+ /** Search results are isolated and discarded when the resolved identity changes. */
12
+ declare function useSearch(params: SearchQueryParams, enabled?: boolean): {
13
+ data: SearchResponse | undefined;
14
+ error: Error | null;
15
+ isLoading: boolean;
16
+ isError: true;
17
+ isPending: false;
18
+ isLoadingError: false;
19
+ isRefetchError: true;
20
+ isSuccess: false;
21
+ isPlaceholderData: false;
22
+ status: "error";
23
+ dataUpdatedAt: number;
24
+ errorUpdatedAt: number;
25
+ failureCount: number;
26
+ failureReason: Error | null;
27
+ errorUpdateCount: number;
28
+ isFetched: boolean;
29
+ isFetchedAfterMount: boolean;
30
+ isFetching: boolean;
31
+ isInitialLoading: boolean;
32
+ isPaused: boolean;
33
+ isRefetching: boolean;
34
+ isStale: boolean;
35
+ isEnabled: boolean;
36
+ refetch: (options?: _tanstack_react_query.RefetchOptions) => Promise<_tanstack_react_query.QueryObserverResult<SearchResponse, Error>>;
37
+ fetchStatus: _tanstack_react_query.FetchStatus;
38
+ } | {
39
+ data: SearchResponse | undefined;
40
+ error: Error | null;
41
+ isLoading: boolean;
42
+ isError: false;
43
+ isPending: false;
44
+ isLoadingError: false;
45
+ isRefetchError: false;
46
+ isSuccess: true;
47
+ isPlaceholderData: false;
48
+ status: "success";
49
+ dataUpdatedAt: number;
50
+ errorUpdatedAt: number;
51
+ failureCount: number;
52
+ failureReason: Error | null;
53
+ errorUpdateCount: number;
54
+ isFetched: boolean;
55
+ isFetchedAfterMount: boolean;
56
+ isFetching: boolean;
57
+ isInitialLoading: boolean;
58
+ isPaused: boolean;
59
+ isRefetching: boolean;
60
+ isStale: boolean;
61
+ isEnabled: boolean;
62
+ refetch: (options?: _tanstack_react_query.RefetchOptions) => Promise<_tanstack_react_query.QueryObserverResult<SearchResponse, Error>>;
63
+ fetchStatus: _tanstack_react_query.FetchStatus;
64
+ } | {
65
+ data: SearchResponse | undefined;
66
+ error: Error | null;
67
+ isLoading: boolean;
68
+ isError: true;
69
+ isPending: false;
70
+ isLoadingError: true;
71
+ isRefetchError: false;
72
+ isSuccess: false;
73
+ isPlaceholderData: false;
74
+ status: "error";
75
+ dataUpdatedAt: number;
76
+ errorUpdatedAt: number;
77
+ failureCount: number;
78
+ failureReason: Error | null;
79
+ errorUpdateCount: number;
80
+ isFetched: boolean;
81
+ isFetchedAfterMount: boolean;
82
+ isFetching: boolean;
83
+ isInitialLoading: boolean;
84
+ isPaused: boolean;
85
+ isRefetching: boolean;
86
+ isStale: boolean;
87
+ isEnabled: boolean;
88
+ refetch: (options?: _tanstack_react_query.RefetchOptions) => Promise<_tanstack_react_query.QueryObserverResult<SearchResponse, Error>>;
89
+ fetchStatus: _tanstack_react_query.FetchStatus;
90
+ } | {
91
+ data: SearchResponse | undefined;
92
+ error: Error | null;
93
+ isLoading: boolean;
94
+ isError: false;
95
+ isPending: true;
96
+ isLoadingError: false;
97
+ isRefetchError: false;
98
+ isSuccess: false;
99
+ isPlaceholderData: false;
100
+ status: "pending";
101
+ dataUpdatedAt: number;
102
+ errorUpdatedAt: number;
103
+ failureCount: number;
104
+ failureReason: Error | null;
105
+ errorUpdateCount: number;
106
+ isFetched: boolean;
107
+ isFetchedAfterMount: boolean;
108
+ isFetching: boolean;
109
+ isInitialLoading: boolean;
110
+ isPaused: boolean;
111
+ isRefetching: boolean;
112
+ isStale: boolean;
113
+ isEnabled: boolean;
114
+ refetch: (options?: _tanstack_react_query.RefetchOptions) => Promise<_tanstack_react_query.QueryObserverResult<SearchResponse, Error>>;
115
+ fetchStatus: _tanstack_react_query.FetchStatus;
116
+ } | {
117
+ data: SearchResponse | undefined;
118
+ error: Error | null;
119
+ isLoading: boolean;
120
+ isError: false;
121
+ isPending: true;
122
+ isLoadingError: false;
123
+ isRefetchError: false;
124
+ isSuccess: false;
125
+ isPlaceholderData: false;
126
+ status: "pending";
127
+ dataUpdatedAt: number;
128
+ errorUpdatedAt: number;
129
+ failureCount: number;
130
+ failureReason: Error | null;
131
+ errorUpdateCount: number;
132
+ isFetched: boolean;
133
+ isFetchedAfterMount: boolean;
134
+ isFetching: boolean;
135
+ isInitialLoading: boolean;
136
+ isPaused: boolean;
137
+ isRefetching: boolean;
138
+ isStale: boolean;
139
+ isEnabled: boolean;
140
+ refetch: (options?: _tanstack_react_query.RefetchOptions) => Promise<_tanstack_react_query.QueryObserverResult<SearchResponse, Error>>;
141
+ fetchStatus: _tanstack_react_query.FetchStatus;
142
+ } | {
143
+ data: SearchResponse | undefined;
144
+ error: Error | null;
145
+ isLoading: boolean;
146
+ isError: false;
147
+ isPending: false;
148
+ isLoadingError: false;
149
+ isRefetchError: false;
150
+ isSuccess: true;
151
+ isPlaceholderData: true;
152
+ status: "success";
153
+ dataUpdatedAt: number;
154
+ errorUpdatedAt: number;
155
+ failureCount: number;
156
+ failureReason: Error | null;
157
+ errorUpdateCount: number;
158
+ isFetched: boolean;
159
+ isFetchedAfterMount: boolean;
160
+ isFetching: boolean;
161
+ isInitialLoading: boolean;
162
+ isPaused: boolean;
163
+ isRefetching: boolean;
164
+ isStale: boolean;
165
+ isEnabled: boolean;
166
+ refetch: (options?: _tanstack_react_query.RefetchOptions) => Promise<_tanstack_react_query.QueryObserverResult<SearchResponse, Error>>;
167
+ fetchStatus: _tanstack_react_query.FetchStatus;
168
+ };
169
+
170
+ declare function useSearchState({ sources, initialSearch, enabled, }?: {
171
+ sources?: readonly string[];
172
+ initialSearch?: SearchListState;
173
+ enabled?: boolean;
174
+ }): {
175
+ state: _btst_stack_client.InferListState<{
176
+ readonly q: {
177
+ readonly type: "string";
178
+ readonly default: "";
179
+ readonly history: "replace";
180
+ };
181
+ readonly sources: {
182
+ readonly type: "string";
183
+ readonly default: "";
184
+ };
185
+ readonly page: {
186
+ readonly type: "number";
187
+ readonly default: 1;
188
+ };
189
+ }>;
190
+ setState: _btst_stack_client.SetListState<{
191
+ readonly q: {
192
+ readonly type: "string";
193
+ readonly default: "";
194
+ readonly history: "replace";
195
+ };
196
+ readonly sources: {
197
+ readonly type: "string";
198
+ readonly default: "";
199
+ };
200
+ readonly page: {
201
+ readonly type: "number";
202
+ readonly default: 1;
203
+ };
204
+ }>;
205
+ fixedSources: boolean;
206
+ result: {
207
+ data: SearchResponse | undefined;
208
+ error: Error | null;
209
+ isLoading: boolean;
210
+ isError: true;
211
+ isPending: false;
212
+ isLoadingError: false;
213
+ isRefetchError: true;
214
+ isSuccess: false;
215
+ isPlaceholderData: false;
216
+ status: "error";
217
+ dataUpdatedAt: number;
218
+ errorUpdatedAt: number;
219
+ failureCount: number;
220
+ failureReason: Error | null;
221
+ errorUpdateCount: number;
222
+ isFetched: boolean;
223
+ isFetchedAfterMount: boolean;
224
+ isFetching: boolean;
225
+ isInitialLoading: boolean;
226
+ isPaused: boolean;
227
+ isRefetching: boolean;
228
+ isStale: boolean;
229
+ isEnabled: boolean;
230
+ refetch: (options?: _tanstack_react_query.RefetchOptions) => Promise<_tanstack_react_query.QueryObserverResult<SearchResponse, Error>>;
231
+ fetchStatus: _tanstack_react_query.FetchStatus;
232
+ } | {
233
+ data: SearchResponse | undefined;
234
+ error: Error | null;
235
+ isLoading: boolean;
236
+ isError: false;
237
+ isPending: false;
238
+ isLoadingError: false;
239
+ isRefetchError: false;
240
+ isSuccess: true;
241
+ isPlaceholderData: false;
242
+ status: "success";
243
+ dataUpdatedAt: number;
244
+ errorUpdatedAt: number;
245
+ failureCount: number;
246
+ failureReason: Error | null;
247
+ errorUpdateCount: number;
248
+ isFetched: boolean;
249
+ isFetchedAfterMount: boolean;
250
+ isFetching: boolean;
251
+ isInitialLoading: boolean;
252
+ isPaused: boolean;
253
+ isRefetching: boolean;
254
+ isStale: boolean;
255
+ isEnabled: boolean;
256
+ refetch: (options?: _tanstack_react_query.RefetchOptions) => Promise<_tanstack_react_query.QueryObserverResult<SearchResponse, Error>>;
257
+ fetchStatus: _tanstack_react_query.FetchStatus;
258
+ } | {
259
+ data: SearchResponse | undefined;
260
+ error: Error | null;
261
+ isLoading: boolean;
262
+ isError: true;
263
+ isPending: false;
264
+ isLoadingError: true;
265
+ isRefetchError: false;
266
+ isSuccess: false;
267
+ isPlaceholderData: false;
268
+ status: "error";
269
+ dataUpdatedAt: number;
270
+ errorUpdatedAt: number;
271
+ failureCount: number;
272
+ failureReason: Error | null;
273
+ errorUpdateCount: number;
274
+ isFetched: boolean;
275
+ isFetchedAfterMount: boolean;
276
+ isFetching: boolean;
277
+ isInitialLoading: boolean;
278
+ isPaused: boolean;
279
+ isRefetching: boolean;
280
+ isStale: boolean;
281
+ isEnabled: boolean;
282
+ refetch: (options?: _tanstack_react_query.RefetchOptions) => Promise<_tanstack_react_query.QueryObserverResult<SearchResponse, Error>>;
283
+ fetchStatus: _tanstack_react_query.FetchStatus;
284
+ } | {
285
+ data: SearchResponse | undefined;
286
+ error: Error | null;
287
+ isLoading: boolean;
288
+ isError: false;
289
+ isPending: true;
290
+ isLoadingError: false;
291
+ isRefetchError: false;
292
+ isSuccess: false;
293
+ isPlaceholderData: false;
294
+ status: "pending";
295
+ dataUpdatedAt: number;
296
+ errorUpdatedAt: number;
297
+ failureCount: number;
298
+ failureReason: Error | null;
299
+ errorUpdateCount: number;
300
+ isFetched: boolean;
301
+ isFetchedAfterMount: boolean;
302
+ isFetching: boolean;
303
+ isInitialLoading: boolean;
304
+ isPaused: boolean;
305
+ isRefetching: boolean;
306
+ isStale: boolean;
307
+ isEnabled: boolean;
308
+ refetch: (options?: _tanstack_react_query.RefetchOptions) => Promise<_tanstack_react_query.QueryObserverResult<SearchResponse, Error>>;
309
+ fetchStatus: _tanstack_react_query.FetchStatus;
310
+ } | {
311
+ data: SearchResponse | undefined;
312
+ error: Error | null;
313
+ isLoading: boolean;
314
+ isError: false;
315
+ isPending: false;
316
+ isLoadingError: false;
317
+ isRefetchError: false;
318
+ isSuccess: true;
319
+ isPlaceholderData: true;
320
+ status: "success";
321
+ dataUpdatedAt: number;
322
+ errorUpdatedAt: number;
323
+ failureCount: number;
324
+ failureReason: Error | null;
325
+ errorUpdateCount: number;
326
+ isFetched: boolean;
327
+ isFetchedAfterMount: boolean;
328
+ isFetching: boolean;
329
+ isInitialLoading: boolean;
330
+ isPaused: boolean;
331
+ isRefetching: boolean;
332
+ isStale: boolean;
333
+ isEnabled: boolean;
334
+ refetch: (options?: _tanstack_react_query.RefetchOptions) => Promise<_tanstack_react_query.QueryObserverResult<SearchResponse, Error>>;
335
+ fetchStatus: _tanstack_react_query.FetchStatus;
336
+ };
337
+ loading: boolean;
338
+ };
339
+
340
+ export { useSearch, useSearchState };