@docsearch/react 3.6.3 → 3.7.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/esm/index.d.ts +14 -5
- 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 +15 -6
package/dist/esm/index.d.ts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { AutocompleteState, AutocompleteOptions } from '@algolia/autocomplete-core';
|
|
1
|
+
import { BaseItem, AutocompleteState, AutocompleteContext, AutocompleteInsightsApi, AutocompleteOptions } from '@algolia/autocomplete-core';
|
|
2
2
|
import { SearchClient } from 'algoliasearch';
|
|
3
3
|
import { SearchQuery, LiteClient } from 'algoliasearch/lite';
|
|
4
4
|
import React from 'react';
|
|
@@ -78,6 +78,15 @@ declare type DocSearchHit = {
|
|
|
78
78
|
__autocomplete_id?: number;
|
|
79
79
|
};
|
|
80
80
|
|
|
81
|
+
interface DocSearchContext extends AutocompleteContext {
|
|
82
|
+
algoliaInsightsPlugin?: {
|
|
83
|
+
insights: AutocompleteInsightsApi;
|
|
84
|
+
};
|
|
85
|
+
}
|
|
86
|
+
interface DocSearchState<TItem extends BaseItem> extends AutocompleteState<TItem> {
|
|
87
|
+
context: DocSearchContext;
|
|
88
|
+
}
|
|
89
|
+
|
|
81
90
|
type InternalDocSearchHit = DocSearchHit & {
|
|
82
91
|
__docsearch_parent: InternalDocSearchHit | null;
|
|
83
92
|
};
|
|
@@ -113,7 +122,7 @@ interface DocSearchProps {
|
|
|
113
122
|
}) => string;
|
|
114
123
|
insights?: AutocompleteOptions<InternalDocSearchHit>['insights'];
|
|
115
124
|
}
|
|
116
|
-
declare function DocSearch(props: DocSearchProps):
|
|
125
|
+
declare function DocSearch(props: DocSearchProps): JSX.Element;
|
|
117
126
|
|
|
118
127
|
type ButtonTranslations = Partial<{
|
|
119
128
|
buttonText: string;
|
|
@@ -179,7 +188,7 @@ type DocSearchModalProps = DocSearchProps & {
|
|
|
179
188
|
onClose?: () => void;
|
|
180
189
|
translations?: ModalTranslations;
|
|
181
190
|
};
|
|
182
|
-
declare function DocSearchModal({ appId, apiKey, indexName, placeholder, searchParameters, maxResultsPerGroup, onClose, transformItems, hitComponent, resultsFooterComponent, navigator, initialScrollY, transformSearchClient, disableUserPersonalization, initialQuery: initialQueryFromProp, translations, getMissingResultsUrl, insights, }: DocSearchModalProps):
|
|
191
|
+
declare function DocSearchModal({ appId, apiKey, indexName, placeholder, searchParameters, maxResultsPerGroup, onClose, transformItems, hitComponent, resultsFooterComponent, navigator, initialScrollY, transformSearchClient, disableUserPersonalization, initialQuery: initialQueryFromProp, translations, getMissingResultsUrl, insights, }: DocSearchModalProps): JSX.Element;
|
|
183
192
|
|
|
184
193
|
interface UseDocSearchKeyboardEventsProps {
|
|
185
194
|
isOpen: boolean;
|
|
@@ -190,6 +199,6 @@ interface UseDocSearchKeyboardEventsProps {
|
|
|
190
199
|
}
|
|
191
200
|
declare function useDocSearchKeyboardEvents({ isOpen, onOpen, onClose, onInput, searchButtonRef, }: UseDocSearchKeyboardEventsProps): void;
|
|
192
201
|
|
|
193
|
-
declare const version = "3.
|
|
202
|
+
declare const version = "3.7.0";
|
|
194
203
|
|
|
195
|
-
export { type ButtonTranslations, DocSearch, DocSearchButton, type DocSearchButtonProps, DocSearchModal, type DocSearchModalProps, type DocSearchProps, type DocSearchTranslations, type ModalTranslations, type UseDocSearchKeyboardEventsProps, useDocSearchKeyboardEvents, version };
|
|
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 };
|