@findlane/browser 0.34.0 → 0.35.0
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 +22 -0
- package/package.json +1 -1
package/dist/index.d.ts
CHANGED
|
@@ -95,6 +95,24 @@ export type SearchRequest = {
|
|
|
95
95
|
fields?: string[];
|
|
96
96
|
apply?: "never" | "whole" | "exact";
|
|
97
97
|
};
|
|
98
|
+
/** Advanced syntax (quotes and minus) for this search (0.35.0), over the index's `advancedSyntax`: `false` searches quotes and minus
|
|
99
|
+
* signs as punctuation, as a page whose shoppers type product names with quotes in them may want; `true` reads both. */
|
|
100
|
+
advancedSyntax?: AdvancedSyntax;
|
|
101
|
+
/** With advanced syntax: `false` keeps a phrase that finds nothing as it is. By default a search a phrase finds
|
|
102
|
+
* nothing for is searched again with its words loose, every page alike, and `query.relaxed` says so (0.35.0). */
|
|
103
|
+
relax?: boolean;
|
|
104
|
+
};
|
|
105
|
+
/** Advanced syntax (0.35.0): `true` reads both, `false` neither, or `{ phrases, exclude }` one of them. */
|
|
106
|
+
export type AdvancedSyntax = boolean | {
|
|
107
|
+
phrases?: boolean;
|
|
108
|
+
exclude?: boolean;
|
|
109
|
+
};
|
|
110
|
+
/** What a search with quotes or minus searched (0.35.0); see SearchResponse's `query`. */
|
|
111
|
+
export type SearchedQuery = {
|
|
112
|
+
words: string[];
|
|
113
|
+
phrases: string[];
|
|
114
|
+
excluded: string[];
|
|
115
|
+
relaxed: boolean;
|
|
98
116
|
};
|
|
99
117
|
/** A subindex's own search, in a search that asks for it. */
|
|
100
118
|
export type SubindexSearch = Omit<SearchRequest, "subindexes">;
|
|
@@ -236,6 +254,10 @@ export type SearchResponse<T> = {
|
|
|
236
254
|
/** With `facetMatches`: the facet values the query names, best first, at most 10 (0.30.0). Empty when it
|
|
237
255
|
* names none or the index has no facet matches setting. */
|
|
238
256
|
facetMatches?: FacetMatch[];
|
|
257
|
+
/** With quotes or minus in the query, on an index that reads them (0.35.0): what was searched. `words` outside quotes,
|
|
258
|
+
* `phrases` in quotes, what a minus `excluded`, each as its words joined by spaces; `relaxed` when a phrase found
|
|
259
|
+
* nothing and its words were searched loose: say so, as in "No exact matches for "red dress"". Left out otherwise. */
|
|
260
|
+
query?: SearchedQuery;
|
|
239
261
|
};
|
|
240
262
|
/** A facet value a query names (0.30.0), such as the category Prótein for "prót":
|
|
241
263
|
* - `values`: the field's values it stands for, as facet counts write them; several when values share a label,
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@findlane/browser",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.35.0",
|
|
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",
|