@findlane/browser 0.4.0 → 0.4.1
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/index.d.ts
CHANGED
|
@@ -13,7 +13,7 @@ export type SearchRequest = {
|
|
|
13
13
|
facetStats?: string[];
|
|
14
14
|
/** Hits per request: 1–50 (default 20). */
|
|
15
15
|
limit?: number;
|
|
16
|
-
/** Up to
|
|
16
|
+
/** Up to 5,000. */
|
|
17
17
|
offset?: number;
|
|
18
18
|
attributesToRetrieve?: string[];
|
|
19
19
|
/** "page" (default) counts only the returned page when a query matches more; "exact" counts every match. */
|
|
@@ -114,7 +114,7 @@ export declare function useLoadMore(): {
|
|
|
114
114
|
shown: number;
|
|
115
115
|
total: number;
|
|
116
116
|
};
|
|
117
|
-
/** Numbered pages, from 0. The API returns hits up to the
|
|
117
|
+
/** Numbered pages, from 0. The API returns hits up to the 5,000th offset, so pages stop there. */
|
|
118
118
|
export declare function usePagination(): {
|
|
119
119
|
page: number;
|
|
120
120
|
pages: number;
|
|
@@ -208,7 +208,7 @@ export function useLoadMore() {
|
|
|
208
208
|
total: results?.response.total ?? 0,
|
|
209
209
|
};
|
|
210
210
|
}
|
|
211
|
-
/** Numbered pages, from 0. The API returns hits up to the
|
|
211
|
+
/** Numbered pages, from 0. The API returns hits up to the 5,000th offset, so pages stop there. */
|
|
212
212
|
export function usePagination() {
|
|
213
213
|
const [{ state, results }, store] = useSnapshot();
|
|
214
214
|
const pageSize = store.settings.pageSize ?? 20;
|
package/dist/react/state.d.ts
CHANGED
|
@@ -33,7 +33,7 @@ export type SearchConfig = {
|
|
|
33
33
|
};
|
|
34
34
|
export declare const emptyState: SearchState;
|
|
35
35
|
/** The API's largest offset. */
|
|
36
|
-
export declare const maxOffset =
|
|
36
|
+
export declare const maxOffset = 5000;
|
|
37
37
|
/** The request behind a state. A facet with selections is counted without them
|
|
38
38
|
* (`disjunctiveFacets`), so its other values stay listed and can be added. */
|
|
39
39
|
export declare function planSearch(config: SearchConfig, state: SearchState): SearchRequest;
|
package/dist/react/state.js
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
export const emptyState = { q: "", refinements: {}, filters: {}, page: 0 };
|
|
2
2
|
/** The API's largest offset. */
|
|
3
|
-
export const maxOffset =
|
|
3
|
+
export const maxOffset = 5000;
|
|
4
4
|
/** The request behind a state. A facet with selections is counted without them
|
|
5
5
|
* (`disjunctiveFacets`), so its other values stay listed and can be added. */
|
|
6
6
|
export function planSearch(config, state) {
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@findlane/browser",
|
|
3
|
-
"version": "0.4.
|
|
3
|
+
"version": "0.4.1",
|
|
4
4
|
"description": "Findlane browser SDK: fast, typo-tolerant public search from the browser with an index's public ID, plus React hooks and components.",
|
|
5
5
|
"keywords": ["findlane", "search", "full-text search", "typo tolerance", "instant search", "ecommerce search", "browser", "react", "autocomplete"],
|
|
6
6
|
"license": "MIT",
|