-
-
Notifications
You must be signed in to change notification settings - Fork 8.6k
/
theme-search-algolia.d.ts
57 lines (45 loc) · 1.53 KB
/
theme-search-algolia.d.ts
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
/**
* Copyright (c) Facebook, Inc. and its affiliates.
*
* This source code is licensed under the MIT license found in the
* LICENSE file in the root directory of this source tree.
*/
declare module '@docusaurus/theme-search-algolia' {
import type {DeepPartial} from 'utility-types';
export type ThemeConfig = {
algolia: {
contextualSearch: boolean;
externalUrlRegex?: string;
appId: string;
apiKey: string;
indexName: string;
searchParameters: {[key: string]: unknown};
searchPagePath: string | false | null;
replaceSearchResultPathname?: {
from: string;
to: string;
};
insights?: boolean;
};
};
export type UserThemeConfig = DeepPartial<ThemeConfig>;
}
declare module '@docusaurus/theme-search-algolia/client' {
import type {ThemeConfig} from '@docusaurus/theme-search-algolia';
export function useAlgoliaThemeConfig(): ThemeConfig;
export function useAlgoliaContextualFacetFilters(): [string, string[]];
export function useSearchResultUrlProcessor(): (url: string) => string;
}
declare module '@theme/SearchPage' {
import type {ReactNode} from 'react';
export default function SearchPage(): ReactNode;
}
declare module '@theme/SearchBar' {
import type {ReactNode} from 'react';
export default function SearchBar(): ReactNode;
}
declare module '@theme/SearchTranslations' {
import type {DocSearchTranslations} from '@docsearch/react';
const translations: DocSearchTranslations & {placeholder: string};
export default translations;
}