@docusaurus/plugin-content-docs 0.0.0-4816 → 0.0.0-4819

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
@@ -56,7 +56,7 @@ async function pluginContentDocs(context, options) {
56
56
  });
57
57
  });
58
58
  },
59
- async getTranslationFiles({ content }) {
59
+ getTranslationFiles({ content }) {
60
60
  return (0, translations_1.getLoadedContentTranslationFiles)(content);
61
61
  },
62
62
  getPathsToWatch() {
@@ -158,14 +158,14 @@ export declare type SidebarItemsGeneratorArgs = {
158
158
  };
159
159
  };
160
160
  export declare type SidebarItemsGenerator = (generatorArgs: SidebarItemsGeneratorArgs) => Promise<NormalizedSidebar>;
161
- export declare type SidebarItemsGeneratorOptionArgs = {
161
+ export declare type SidebarItemsGeneratorOption = (generatorArgs: {
162
162
  /**
163
163
  * Useful to re-use/enhance the default sidebar generation logic from
164
164
  * Docusaurus.
165
+ * @see https://github.com/facebook/docusaurus/issues/4640#issuecomment-822292320
165
166
  */
166
167
  defaultSidebarItemsGenerator: SidebarItemsGenerator;
167
- } & SidebarItemsGeneratorArgs;
168
- export declare type SidebarItemsGeneratorOption = (generatorArgs: SidebarItemsGeneratorOptionArgs) => Promise<NormalizedSidebarItem[]>;
168
+ } & SidebarItemsGeneratorArgs) => Promise<NormalizedSidebarItem[]>;
169
169
  export declare type SidebarProcessorParams = {
170
170
  sidebarItemsGenerator: SidebarItemsGeneratorOption;
171
171
  numberPrefixParser: NumberPrefixParser;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@docusaurus/plugin-content-docs",
3
- "version": "0.0.0-4816",
3
+ "version": "0.0.0-4819",
4
4
  "description": "Docs plugin for Docusaurus.",
5
5
  "main": "lib/index.js",
6
6
  "exports": {
@@ -23,11 +23,11 @@
23
23
  },
24
24
  "license": "MIT",
25
25
  "dependencies": {
26
- "@docusaurus/core": "0.0.0-4816",
27
- "@docusaurus/logger": "0.0.0-4816",
28
- "@docusaurus/mdx-loader": "0.0.0-4816",
29
- "@docusaurus/utils": "0.0.0-4816",
30
- "@docusaurus/utils-validation": "0.0.0-4816",
26
+ "@docusaurus/core": "0.0.0-4819",
27
+ "@docusaurus/logger": "0.0.0-4819",
28
+ "@docusaurus/mdx-loader": "0.0.0-4819",
29
+ "@docusaurus/utils": "0.0.0-4819",
30
+ "@docusaurus/utils-validation": "0.0.0-4819",
31
31
  "combine-promises": "^1.1.0",
32
32
  "fs-extra": "^10.0.1",
33
33
  "import-fresh": "^3.3.0",
@@ -39,8 +39,8 @@
39
39
  "webpack": "^5.70.0"
40
40
  },
41
41
  "devDependencies": {
42
- "@docusaurus/module-type-aliases": "0.0.0-4816",
43
- "@docusaurus/types": "0.0.0-4816",
42
+ "@docusaurus/module-type-aliases": "0.0.0-4819",
43
+ "@docusaurus/types": "0.0.0-4819",
44
44
  "@types/js-yaml": "^4.0.5",
45
45
  "@types/picomatch": "^2.3.0",
46
46
  "commander": "^5.1.0",
@@ -56,5 +56,5 @@
56
56
  "engines": {
57
57
  "node": ">=14"
58
58
  },
59
- "gitHead": "d5a8e65a97b9895a6cda1b858ea40a534e8a2483"
59
+ "gitHead": "f91fc42f44d6a94159c7d777ca5a776b1c623110"
60
60
  }
package/src/index.ts CHANGED
@@ -106,7 +106,7 @@ export default async function pluginContentDocs(
106
106
  });
107
107
  },
108
108
 
109
- async getTranslationFiles({content}) {
109
+ getTranslationFiles({content}) {
110
110
  return getLoadedContentTranslationFiles(content);
111
111
  },
112
112
 
@@ -10,9 +10,9 @@ declare module '@docusaurus/plugin-content-docs' {
10
10
  import type {ContentPaths, Tag, FrontMatterTag} from '@docusaurus/utils';
11
11
  import type {Required} from 'utility-types';
12
12
 
13
- export interface Assets {
13
+ export type Assets = {
14
14
  image?: string;
15
- }
15
+ };
16
16
 
17
17
  /**
18
18
  * Custom callback for parsing number prefixes from file/folder names.
@@ -254,18 +254,15 @@ export type SidebarItemsGenerator = (
254
254
  generatorArgs: SidebarItemsGeneratorArgs,
255
255
  ) => Promise<NormalizedSidebar>;
256
256
 
257
- // Also inject the default generator to conveniently wrap/enhance/sort the
258
- // default sidebar gen logic
259
- // see https://github.com/facebook/docusaurus/issues/4640#issuecomment-822292320
260
- export type SidebarItemsGeneratorOptionArgs = {
261
- /**
262
- * Useful to re-use/enhance the default sidebar generation logic from
263
- * Docusaurus.
264
- */
265
- defaultSidebarItemsGenerator: SidebarItemsGenerator;
266
- } & SidebarItemsGeneratorArgs;
267
257
  export type SidebarItemsGeneratorOption = (
268
- generatorArgs: SidebarItemsGeneratorOptionArgs,
258
+ generatorArgs: {
259
+ /**
260
+ * Useful to re-use/enhance the default sidebar generation logic from
261
+ * Docusaurus.
262
+ * @see https://github.com/facebook/docusaurus/issues/4640#issuecomment-822292320
263
+ */
264
+ defaultSidebarItemsGenerator: SidebarItemsGenerator;
265
+ } & SidebarItemsGeneratorArgs,
269
266
  ) => Promise<NormalizedSidebarItem[]>;
270
267
 
271
268
  export type SidebarProcessorParams = {