@docusaurus/plugin-content-docs 0.0.0-4943 → 0.0.0-4946

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/docs.d.ts CHANGED
@@ -5,9 +5,9 @@
5
5
  * LICENSE file in the root directory of this source tree.
6
6
  */
7
7
  import type { LoadContext } from '@docusaurus/types';
8
- import type { DocFile, LoadedVersion } from './types';
8
+ import type { DocFile } from './types';
9
9
  import type { SidebarsUtils } from './sidebars/utils';
10
- import type { MetadataOptions, PluginOptions, CategoryIndexMatcher, DocMetadataBase, VersionMetadata } from '@docusaurus/plugin-content-docs';
10
+ import type { MetadataOptions, PluginOptions, CategoryIndexMatcher, DocMetadataBase, VersionMetadata, LoadedVersion } from '@docusaurus/plugin-content-docs';
11
11
  declare type LastUpdateOptions = Pick<PluginOptions, 'showLastUpdateAuthor' | 'showLastUpdateTime'>;
12
12
  export declare function readDocFile(versionMetadata: Pick<VersionMetadata, 'contentPath' | 'contentPathLocalized'>, source: string, options: LastUpdateOptions): Promise<DocFile>;
13
13
  export declare function readVersionDocs(versionMetadata: VersionMetadata, options: Pick<PluginOptions, 'include' | 'exclude' | 'showLastUpdateAuthor' | 'showLastUpdateTime'>): Promise<DocFile[]>;
package/lib/index.d.ts CHANGED
@@ -5,7 +5,6 @@
5
5
  * LICENSE file in the root directory of this source tree.
6
6
  */
7
7
  import type { LoadContext, Plugin } from '@docusaurus/types';
8
- import type { LoadedContent } from './types';
9
- import type { PluginOptions } from '@docusaurus/plugin-content-docs';
8
+ import type { PluginOptions, LoadedContent } from '@docusaurus/plugin-content-docs';
10
9
  export default function pluginContentDocs(context: LoadContext, options: PluginOptions): Promise<Plugin<LoadedContent>>;
11
10
  export { validateOptions } from './options';
package/lib/props.d.ts CHANGED
@@ -4,8 +4,8 @@
4
4
  * This source code is licensed under the MIT license found in the
5
5
  * LICENSE file in the root directory of this source tree.
6
6
  */
7
- import type { LoadedVersion, VersionTag } from './types';
8
- import type { PropSidebars, PropVersionMetadata, PropTagDocList, DocMetadata } from '@docusaurus/plugin-content-docs';
7
+ import type { VersionTag } from './types';
8
+ import type { PropSidebars, PropVersionMetadata, PropTagDocList, DocMetadata, LoadedVersion } from '@docusaurus/plugin-content-docs';
9
9
  export declare function toSidebarsProp(loadedVersion: LoadedVersion): PropSidebars;
10
10
  export declare function toVersionMetadataProp(pluginId: string, loadedVersion: LoadedVersion): PropVersionMetadata;
11
11
  export declare function toTagDocListProp({ allTagsPath, tag, docs, }: {
@@ -4,7 +4,7 @@
4
4
  * This source code is licensed under the MIT license found in the
5
5
  * LICENSE file in the root directory of this source tree.
6
6
  */
7
- import type { LoadedContent } from './types';
7
+ import type { LoadedContent } from '@docusaurus/plugin-content-docs';
8
8
  import type { TranslationFile } from '@docusaurus/types';
9
9
  export declare function getLoadedContentTranslationFiles(loadedContent: LoadedContent): TranslationFile[];
10
10
  export declare function translateLoadedContent(loadedContent: LoadedContent, translationFiles: TranslationFile[]): LoadedContent;
package/lib/types.d.ts CHANGED
@@ -4,10 +4,8 @@
4
4
  * This source code is licensed under the MIT license found in the
5
5
  * LICENSE file in the root directory of this source tree.
6
6
  */
7
- import type { Sidebars } from './sidebars/types';
8
- import type { BrokenMarkdownLink } from '@docusaurus/utils';
9
- import type { VersionMetadata, LastUpdateData, DocMetadata, CategoryGeneratedIndexMetadata } from '@docusaurus/plugin-content-docs';
10
- import type { Tag } from '@docusaurus/types';
7
+ import type { BrokenMarkdownLink, Tag } from '@docusaurus/utils';
8
+ import type { VersionMetadata, LastUpdateData, LoadedVersion, CategoryGeneratedIndexMetadata } from '@docusaurus/plugin-content-docs';
11
9
  import type { SidebarsUtils } from './sidebars/utils';
12
10
  export declare type DocFile = {
13
11
  contentPath: string;
@@ -26,14 +24,6 @@ export declare type VersionTag = Tag & {
26
24
  export declare type VersionTags = {
27
25
  [permalink: string]: VersionTag;
28
26
  };
29
- export declare type LoadedVersion = VersionMetadata & {
30
- docs: DocMetadata[];
31
- drafts: DocMetadata[];
32
- sidebars: Sidebars;
33
- };
34
- export declare type LoadedContent = {
35
- loadedVersions: LoadedVersion[];
36
- };
37
27
  export declare type FullVersion = LoadedVersion & {
38
28
  sidebarsUtils: SidebarsUtils;
39
29
  categoryGeneratedIndices: CategoryGeneratedIndexMetadata[];
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@docusaurus/plugin-content-docs",
3
- "version": "0.0.0-4943",
3
+ "version": "0.0.0-4946",
4
4
  "description": "Docs plugin for Docusaurus.",
5
5
  "main": "lib/index.js",
6
6
  "sideEffects": false,
@@ -25,11 +25,11 @@
25
25
  },
26
26
  "license": "MIT",
27
27
  "dependencies": {
28
- "@docusaurus/core": "0.0.0-4943",
29
- "@docusaurus/logger": "0.0.0-4943",
30
- "@docusaurus/mdx-loader": "0.0.0-4943",
31
- "@docusaurus/utils": "0.0.0-4943",
32
- "@docusaurus/utils-validation": "0.0.0-4943",
28
+ "@docusaurus/core": "0.0.0-4946",
29
+ "@docusaurus/logger": "0.0.0-4946",
30
+ "@docusaurus/mdx-loader": "0.0.0-4946",
31
+ "@docusaurus/utils": "0.0.0-4946",
32
+ "@docusaurus/utils-validation": "0.0.0-4946",
33
33
  "combine-promises": "^1.1.0",
34
34
  "fs-extra": "^10.1.0",
35
35
  "import-fresh": "^3.3.0",
@@ -41,8 +41,8 @@
41
41
  "webpack": "^5.72.0"
42
42
  },
43
43
  "devDependencies": {
44
- "@docusaurus/module-type-aliases": "0.0.0-4943",
45
- "@docusaurus/types": "0.0.0-4943",
44
+ "@docusaurus/module-type-aliases": "0.0.0-4946",
45
+ "@docusaurus/types": "0.0.0-4946",
46
46
  "@types/js-yaml": "^4.0.5",
47
47
  "@types/picomatch": "^2.3.0",
48
48
  "commander": "^5.1.0",
@@ -58,5 +58,5 @@
58
58
  "engines": {
59
59
  "node": ">=14"
60
60
  },
61
- "gitHead": "bd2b2328da8f23956a71e966ace97eb7cf951e7f"
61
+ "gitHead": "01073ce535af35aa33c1b221e2adb99ac993d589"
62
62
  }
package/src/docs.ts CHANGED
@@ -22,7 +22,7 @@ import {
22
22
  import type {LoadContext} from '@docusaurus/types';
23
23
 
24
24
  import {getFileLastUpdate} from './lastUpdate';
25
- import type {DocFile, LoadedVersion} from './types';
25
+ import type {DocFile} from './types';
26
26
  import getSlug from './slug';
27
27
  import {CURRENT_VERSION_NAME} from './constants';
28
28
  import {stripPathNumberPrefixes} from './numberPrefix';
@@ -39,6 +39,7 @@ import type {
39
39
  LastUpdateData,
40
40
  VersionMetadata,
41
41
  DocFrontMatter,
42
+ LoadedVersion,
42
43
  } from '@docusaurus/plugin-content-docs';
43
44
 
44
45
  type LastUpdateOptions = Pick<
package/src/index.ts CHANGED
@@ -26,9 +26,7 @@ import type {DocEnv} from './docs';
26
26
  import {readVersionDocs, processDocMetadata, addDocNavigation} from './docs';
27
27
  import {readVersionsMetadata} from './versions';
28
28
  import type {
29
- LoadedContent,
30
29
  SourceToPermalink,
31
- LoadedVersion,
32
30
  DocFile,
33
31
  DocsMarkdownOption,
34
32
  VersionTag,
@@ -53,6 +51,8 @@ import type {
53
51
  DocMetadataBase,
54
52
  VersionMetadata,
55
53
  DocFrontMatter,
54
+ LoadedContent,
55
+ LoadedVersion,
56
56
  } from '@docusaurus/plugin-content-docs';
57
57
  import {createSidebarsUtils} from './sidebars/utils';
58
58
  import _ from 'lodash';
@@ -7,8 +7,14 @@
7
7
 
8
8
  declare module '@docusaurus/plugin-content-docs' {
9
9
  import type {MDXOptions} from '@docusaurus/mdx-loader';
10
- import type {ContentPaths, FrontMatterTag} from '@docusaurus/utils';
11
- import type {TagsListItem, TagModule, Tag} from '@docusaurus/types';
10
+ import type {
11
+ ContentPaths,
12
+ FrontMatterTag,
13
+ TagsListItem,
14
+ TagModule,
15
+ Tag,
16
+ } from '@docusaurus/utils';
17
+ import type {Plugin, LoadContext} from '@docusaurus/types';
12
18
  import type {Required} from 'utility-types';
13
19
 
14
20
  export type Assets = {
@@ -499,6 +505,21 @@ declare module '@docusaurus/plugin-content-docs' {
499
505
  export type PropTagsListPage = {
500
506
  tags: TagsListItem[];
501
507
  };
508
+
509
+ export type LoadedVersion = VersionMetadata & {
510
+ docs: DocMetadata[];
511
+ drafts: DocMetadata[];
512
+ sidebars: import('./sidebars/types').Sidebars;
513
+ };
514
+
515
+ export type LoadedContent = {
516
+ loadedVersions: LoadedVersion[];
517
+ };
518
+
519
+ export default function pluginContentDocs(
520
+ context: LoadContext,
521
+ options: PluginOptions,
522
+ ): Promise<Plugin<LoadedContent>>;
502
523
  }
503
524
 
504
525
  declare module '@theme/DocItem' {
package/src/props.ts CHANGED
@@ -5,7 +5,7 @@
5
5
  * LICENSE file in the root directory of this source tree.
6
6
  */
7
7
 
8
- import type {LoadedVersion, VersionTag} from './types';
8
+ import type {VersionTag} from './types';
9
9
  import type {
10
10
  SidebarItemDoc,
11
11
  SidebarItem,
@@ -22,6 +22,7 @@ import type {
22
22
  PropSidebarItemLink,
23
23
  PropVersionDocs,
24
24
  DocMetadata,
25
+ LoadedVersion,
25
26
  } from '@docusaurus/plugin-content-docs';
26
27
  import _ from 'lodash';
27
28
  import {createDocsByIdIndex} from './docs';
@@ -5,7 +5,10 @@
5
5
  * LICENSE file in the root directory of this source tree.
6
6
  */
7
7
 
8
- import type {LoadedVersion, LoadedContent} from './types';
8
+ import type {
9
+ LoadedVersion,
10
+ LoadedContent,
11
+ } from '@docusaurus/plugin-content-docs';
9
12
  import type {
10
13
  Sidebar,
11
14
  SidebarItemCategory,
package/src/types.ts CHANGED
@@ -7,15 +7,13 @@
7
7
 
8
8
  /// <reference types="@docusaurus/module-type-aliases" />
9
9
 
10
- import type {Sidebars} from './sidebars/types';
11
- import type {BrokenMarkdownLink} from '@docusaurus/utils';
10
+ import type {BrokenMarkdownLink, Tag} from '@docusaurus/utils';
12
11
  import type {
13
12
  VersionMetadata,
14
13
  LastUpdateData,
15
- DocMetadata,
14
+ LoadedVersion,
16
15
  CategoryGeneratedIndexMetadata,
17
16
  } from '@docusaurus/plugin-content-docs';
18
- import type {Tag} from '@docusaurus/types';
19
17
  import type {SidebarsUtils} from './sidebars/utils';
20
18
 
21
19
  export type DocFile = {
@@ -38,16 +36,6 @@ export type VersionTags = {
38
36
  [permalink: string]: VersionTag;
39
37
  };
40
38
 
41
- export type LoadedVersion = VersionMetadata & {
42
- docs: DocMetadata[];
43
- drafts: DocMetadata[];
44
- sidebars: Sidebars;
45
- };
46
-
47
- export type LoadedContent = {
48
- loadedVersions: LoadedVersion[];
49
- };
50
-
51
39
  export type FullVersion = LoadedVersion & {
52
40
  sidebarsUtils: SidebarsUtils;
53
41
  categoryGeneratedIndices: CategoryGeneratedIndexMetadata[];