@docusaurus/theme-search-algolia 0.0.0-5043 → 0.0.0-5048

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/lib/index.js CHANGED
@@ -39,7 +39,7 @@ function themeSearchAlgolia(context) {
39
39
  name: 'theme-search-algolia',
40
40
  });
41
41
  },
42
- async contentLoaded({ actions: { addRoute } }) {
42
+ contentLoaded({ actions: { addRoute } }) {
43
43
  if (searchPagePath) {
44
44
  addRoute({
45
45
  path: (0, utils_1.normalizeUrl)([baseUrl, searchPagePath]),
@@ -11,5 +11,5 @@ export declare const DEFAULT_CONFIG: {
11
11
  searchParameters: {};
12
12
  searchPagePath: string;
13
13
  };
14
- export declare const Schema: Joi.ObjectSchema<any>;
14
+ export declare const Schema: Joi.ObjectSchema<ThemeConfig>;
15
15
  export declare function validateThemeConfig({ validate, themeConfig, }: ThemeConfigValidationContext<ThemeConfig>): ThemeConfig;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@docusaurus/theme-search-algolia",
3
- "version": "0.0.0-5043",
3
+ "version": "0.0.0-5048",
4
4
  "description": "Algolia search component for Docusaurus.",
5
5
  "main": "lib/index.js",
6
6
  "sideEffects": [
@@ -28,13 +28,13 @@
28
28
  },
29
29
  "dependencies": {
30
30
  "@docsearch/react": "^3.1.0",
31
- "@docusaurus/core": "0.0.0-5043",
32
- "@docusaurus/logger": "0.0.0-5043",
33
- "@docusaurus/plugin-content-docs": "0.0.0-5043",
34
- "@docusaurus/theme-common": "0.0.0-5043",
35
- "@docusaurus/theme-translations": "0.0.0-5043",
36
- "@docusaurus/utils": "0.0.0-5043",
37
- "@docusaurus/utils-validation": "0.0.0-5043",
31
+ "@docusaurus/core": "0.0.0-5048",
32
+ "@docusaurus/logger": "0.0.0-5048",
33
+ "@docusaurus/plugin-content-docs": "0.0.0-5048",
34
+ "@docusaurus/theme-common": "0.0.0-5048",
35
+ "@docusaurus/theme-translations": "0.0.0-5048",
36
+ "@docusaurus/utils": "0.0.0-5048",
37
+ "@docusaurus/utils-validation": "0.0.0-5048",
38
38
  "algoliasearch": "^4.13.1",
39
39
  "algoliasearch-helper": "^3.8.2",
40
40
  "clsx": "^1.1.1",
@@ -45,7 +45,7 @@
45
45
  "utility-types": "^3.10.0"
46
46
  },
47
47
  "devDependencies": {
48
- "@docusaurus/module-type-aliases": "0.0.0-5043"
48
+ "@docusaurus/module-type-aliases": "0.0.0-5048"
49
49
  },
50
50
  "peerDependencies": {
51
51
  "react": "^16.8.4 || ^17.0.0",
@@ -54,5 +54,5 @@
54
54
  "engines": {
55
55
  "node": ">=14"
56
56
  },
57
- "gitHead": "28ad11cdb6c55b7a8355e327913f617d4fe359bd"
57
+ "gitHead": "f5680d2f2633fbd6594972ae1f4c1ddb1467f9ac"
58
58
  }
package/src/index.ts CHANGED
@@ -60,7 +60,7 @@ export default function themeSearchAlgolia(context: LoadContext): Plugin<void> {
60
60
  });
61
61
  },
62
62
 
63
- async contentLoaded({actions: {addRoute}}) {
63
+ contentLoaded({actions: {addRoute}}) {
64
64
  if (searchPagePath) {
65
65
  addRoute({
66
66
  path: normalizeUrl([baseUrl, searchPagePath]),
@@ -75,7 +75,7 @@ type FacetFilters = Required<
75
75
  function mergeFacetFilters(f1: FacetFilters, f2: FacetFilters): FacetFilters {
76
76
  const normalize = (
77
77
  f: FacetFilters,
78
- ): readonly string[] | ReadonlyArray<string | readonly string[]> =>
78
+ ): readonly string[] | readonly (string | readonly string[])[] =>
79
79
  typeof f === 'string' ? [f] : f;
80
80
  return [...normalize(f1), ...normalize(f2)] as FacetFilters;
81
81
  }
@@ -20,7 +20,7 @@ export const DEFAULT_CONFIG = {
20
20
  searchPagePath: 'search',
21
21
  };
22
22
 
23
- export const Schema = Joi.object({
23
+ export const Schema = Joi.object<ThemeConfig>({
24
24
  algolia: Joi.object({
25
25
  // Docusaurus attributes
26
26
  contextualSearch: Joi.boolean().default(DEFAULT_CONFIG.contextualSearch),