@docsearch/react 3.7.0 → 3.8.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/esm/index.d.ts +10 -6
- package/dist/esm/index.js +1 -1
- package/dist/umd/index.js +2 -2
- package/dist/umd/index.js.map +1 -1
- package/package.json +8 -7
package/dist/esm/index.d.ts
CHANGED
|
@@ -1,6 +1,5 @@
|
|
|
1
1
|
import { BaseItem, AutocompleteState, AutocompleteContext, AutocompleteInsightsApi, AutocompleteOptions } from '@algolia/autocomplete-core';
|
|
2
|
-
import {
|
|
3
|
-
import { SearchQuery, LiteClient } from 'algoliasearch/lite';
|
|
2
|
+
import { LiteClient, SearchParamsObject } from 'algoliasearch/lite';
|
|
4
3
|
import React from 'react';
|
|
5
4
|
|
|
6
5
|
type ContentType = 'content' | 'lvl0' | 'lvl1' | 'lvl2' | 'lvl3' | 'lvl4' | 'lvl5' | 'lvl6';
|
|
@@ -97,12 +96,17 @@ type DocSearchTranslations = Partial<{
|
|
|
97
96
|
button: ButtonTranslations;
|
|
98
97
|
modal: ModalTranslations;
|
|
99
98
|
}>;
|
|
99
|
+
type DocSearchTransformClient = {
|
|
100
|
+
search: LiteClient['search'];
|
|
101
|
+
addAlgoliaAgent: LiteClient['addAlgoliaAgent'];
|
|
102
|
+
transporter: Pick<LiteClient['transporter'], 'algoliaAgent'>;
|
|
103
|
+
};
|
|
100
104
|
interface DocSearchProps {
|
|
101
105
|
appId: string;
|
|
102
106
|
apiKey: string;
|
|
103
107
|
indexName: string;
|
|
104
108
|
placeholder?: string;
|
|
105
|
-
searchParameters?:
|
|
109
|
+
searchParameters?: SearchParamsObject;
|
|
106
110
|
maxResultsPerGroup?: number;
|
|
107
111
|
transformItems?: (items: DocSearchHit[]) => DocSearchHit[];
|
|
108
112
|
hitComponent?: (props: {
|
|
@@ -112,7 +116,7 @@ interface DocSearchProps {
|
|
|
112
116
|
resultsFooterComponent?: (props: {
|
|
113
117
|
state: AutocompleteState<InternalDocSearchHit>;
|
|
114
118
|
}) => JSX.Element | null;
|
|
115
|
-
transformSearchClient?:
|
|
119
|
+
transformSearchClient?: (searchClient: DocSearchTransformClient) => DocSearchTransformClient;
|
|
116
120
|
disableUserPersonalization?: boolean;
|
|
117
121
|
initialQuery?: string;
|
|
118
122
|
navigator?: AutocompleteOptions<InternalDocSearchHit>['navigator'];
|
|
@@ -199,6 +203,6 @@ interface UseDocSearchKeyboardEventsProps {
|
|
|
199
203
|
}
|
|
200
204
|
declare function useDocSearchKeyboardEvents({ isOpen, onOpen, onClose, onInput, searchButtonRef, }: UseDocSearchKeyboardEventsProps): void;
|
|
201
205
|
|
|
202
|
-
declare const version = "3.
|
|
206
|
+
declare const version = "3.8.1";
|
|
203
207
|
|
|
204
|
-
export { type ButtonTranslations, DocSearch, DocSearchButton, type DocSearchButtonProps, type DocSearchHit, DocSearchModal, type DocSearchModalProps, type DocSearchProps, type DocSearchState, type DocSearchTranslations, type InternalDocSearchHit, type ModalTranslations, type StoredDocSearchHit, type UseDocSearchKeyboardEventsProps, useDocSearchKeyboardEvents, version };
|
|
208
|
+
export { type ButtonTranslations, DocSearch, DocSearchButton, type DocSearchButtonProps, type DocSearchHit, DocSearchModal, type DocSearchModalProps, type DocSearchProps, type DocSearchState, type DocSearchTransformClient, type DocSearchTranslations, type InternalDocSearchHit, type ModalTranslations, type StoredDocSearchHit, type UseDocSearchKeyboardEventsProps, useDocSearchKeyboardEvents, version };
|